Add debug output for recorded minsyms
[external/binutils.git] / gdb / ChangeLog
1 2018-12-21  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * minsyms.c (mst_str): New.
4         (minimal_symbol_reader::record_full): Add debug output.
5
6 2018-12-21  John Baldwin  <jhb@FreeBSD.org>
7
8         * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
9         equal PL_FLAG_SI.
10         (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
11
12 2018-12-21  Paul Marechal  <paul.marechal@ericsson.com>
13
14         PR gdb/23974
15         * target.c (target_read_stralloc): Check for empty vector.
16
17 2018-12-21  Дилян Палаузов  <dilyan.palauzov@aegee.org>
18
19         * top.c (print_gdb_configuration): Print "--without-python"
20         if GDB was configured without Python.
21
22 2018-12-21  Andrew Burgess  <andrew.burgess@embecosm.com>
23
24         * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
25         a signed offset as a string.
26
27 2018-12-21  Dave Murphy  <davem@devkitpro.org>
28
29         * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
30         initialise.
31         * probe.c (any_static_probe_ops): Ditto.
32         * record-btrace.c (record_btrace_thread_observer_token): Ditto.
33         * stap-probe.c (stap_static_probe_ops): Ditto.
34         * tui/tui-hooks.c (tui_observers_token): Ditto.
35         * unittests/observable-selftests.c (token1, token2, token3): Ditto.
36
37 2018-12-19  Andrew Burgess  <andrew.burgess@embecosm.com>
38
39         * gdb/dummy-frame.c (default_dummy_id): Defined new function.
40         * gdb/dummy-frame.h (default_dummy_id): Declare new function.
41         * gdb/frame-unwind.c (default_unwind_pc): Define new function.
42         (default_unwind_sp): Define new function.
43         * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
44         (default_unwind_sp): Declare new function.
45         * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
46         available.
47         (get_frame_sp): Assume that gdbarch_unwind_sp is available.
48         * gdb/gdbarch.c: Regenerate.
49         * gdb/gdbarch.h: Regenerate.
50         * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
51         unwind_sp.  Add additional header files to be included in
52         generated file.
53
54 2018-12-19  Dimitar Dimitrov  <dimitar@dinux.eu>
55
56         * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
57         sp clobbers.
58
59 2018-12-17  Andrew Burgess  <andrew.burgess@embecosm.com>
60
61         * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
62         'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
63         'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
64         'processing_has_namespace_info' from unsigned int to bool.  Update
65         comments.
66         (producer_is_icc_lt_14): Update return type.
67         (producer_is_gcc_lt_4_3): Likewise.
68         (producer_is_gxx_lt_4_6): Likewise.
69         (process_die): Write true instead of 1 into predicate fields.
70         (dwarf2_start_symtab): Likewise.
71         (var_decode_location): Likewise.
72         (dwarf2_mark_helper): Likewise.
73         (dwarf2_mark): Likewise.
74         (dwarf2_clear_marks): Write false instead of 0 into predicate
75         field.
76         (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
77         0.
78
79 2018-12-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
80
81         * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
82         asm/sigcontext.h.
83
84 2018-12-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
85
86         * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
87         warning trailing new line.
88
89 2018-12-16  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
90
91         * nat/linux-ptrace.c (kill_child): New function.
92         (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
93         Add a call to kill_child in case of early return after fork.
94         (linux_check_ptrace_features): Use kill_child instead of local code.
95         (linux_test_for_tracefork): Likewise.
96
97 2018-12-14  Tom Tromey  <tom@tromey.com>
98
99         * Makefile.in: Remove "alloca" comment.
100         (INFOFILES): Remove.
101         (local-maintainer-clean): Don't use INFOFILES.
102
103 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
104
105         * syscalls/update-freebsd.sh: New file.
106         * syscalls/freebsd.xml: Regenerate.
107
108 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
109
110         * NEWS: Add entry documenting system call aliases.
111         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
112         to get_syscalls_by_name.
113         * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
114         * gdbarch.h: Regenerate.
115         * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
116         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
117         from get_syscall_by_name.  Now accepts a pointer to a vector of
118         integers and returns a bool.
119         [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
120         (syscall_create_syscall_desc): Add alias parameter and pass it to
121         syscall_desc constructor.
122         (syscall_start_syscall): Handle alias attribute.
123         (syscall_attr): Add alias attribute.
124         (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
125         Now accepts a pointer to a vector of integers and returns a
126         bool.  Add syscalls whose alias or name matches the requested
127         name.
128         (get_syscalls_by_name): Rename from get_syscall_by_name.  Now
129         accepts a pointer to a vector of integers and returns a bool.
130         * xml-syscall.h (get_syscalls_by_name): Likewise.
131
132 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
133
134         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
135         to get_syscalls_by_group.
136         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
137         false.
138         [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
139         numbers to an existing vector of integers and return a bool.
140         (get_syscalls_by_group): Accept pointer to vector of integers
141         and change return type to bool.
142         * xml-syscall.h (get_syscalls_by_group): Likewise.
143
144 2018-12-13  Jim Wilson  <jimw@sifive.com>
145
146         * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
147         comment for SD field, and correct xlen calculation.  For MISA, add
148         comment for MXL field, add call to register_size, and correct base
149         calculation.
150
151 2018-12-13  Stafford Horne  <shorne@gmail.com>
152
153         * NEWS(New targets): Add or1k*-*-linux*.
154
155 2018-12-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
156
157         * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
158         declare on one line to fix ARI warning.
159
160 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
161
162         * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
163         (infcall_suspend_state::registers): New.
164         (infcall_suspend_state::restore): New.
165         (infcall_suspend_state::thread_suspend): Rename to...
166         (infcall_suspend_state::m_thread_suspend): ...this.
167         (infcall_suspend_state::registers): Rename to...
168         (infcall_suspend_state::m_registers): ...this.
169         (infcall_suspend_state::siginfo_gdbarch): Rename to...
170         (infcall_suspend_state::m_siginfo_gdbarch): ...this.
171         (infcall_suspend_state::siginfo_data): Rename to...
172         (infcall_suspend_state::m_siginfo_data): ...this.
173         (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
174         constructor.
175         (restore_infcall_suspend_state): Rewrite to use
176         infcall_suspend_state::restore method.
177         (get_infcall_suspend_state_regcache): Use
178         infcall_suspend_state::registers method.
179
180 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
181
182         * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
183         arguments are passed in integer registers.
184         (riscv_call_arg_complex_float): Likewise.
185
186 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
187
188         * nat/linux-osdata.c (common_getter): New function.
189         (struct osdata_type): Change getter to take_snapshot.
190         Add LONGEST len_avail and struct buffer buffer.
191         Change all elements in the initializer.
192         Add an element for the list of types.
193         (linux_xfer_osdata_info_os_types): New function.
194         (linux_common_xfer_osdata): Use common_getter for the list of types.
195         Replace getter call by common_getter.
196         (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
197         Add arg BUFFER.  Only keep the code that adds data in BUFFER.
198         (linux_xfer_osdata_fds): Likewise.
199         (linux_xfer_osdata_modules): Likewise.
200         (linux_xfer_osdata_msg): Likewise.
201         (linux_xfer_osdata_processes): Likewise.
202         (linux_xfer_osdata_processgroups): Likewise.
203         (linux_xfer_osdata_sem): Likewise.
204         (linux_xfer_osdata_shm): Likewise.
205         (linux_xfer_osdata_isockets): Likewise.
206         (linux_xfer_osdata_threads): Likewise.
207
208 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
209
210         * nat/linux-osdata.c: Removed various trailing spaces.
211
212 2018-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
213
214         * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
215         leading whitespace before #include line.
216
217 2018-12-08  Simon Marchi  <simon.marchi@ericsson.com>
218             Дилян Палаузов  <dilyan.palauzov@aegee.org>
219
220         PR gdb/23950
221         * configure.ac: Search for tgetent in libtinfow.
222         * configure: Re-generate.
223
224 2018-12-08  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
225
226         * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
227         (thread_db_err_str): Forward declare.
228         (delete_thread_db_info): Call td_ta_delete_p if available.
229         (try_thread_db_load_1): Acquire td_ta_delete address.
230         * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
231
232 2018-12-08  Pedro Alves  <palves@redhat.com>
233
234         * source.c (forward_search_command): Rename to ...
235         (search_command_helper): ... this.  Add 'forward' parameter.
236         Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
237         buffer.  Handle backward searches too.
238         (forward_search_command, reverse_search_command): Reimplement by
239         calling search_command_helper.
240
241 2018-12-07  Andrew Burgess  <andrew.burgess@embecosm.com>
242
243         * .dir-locals.el: Copy most of the settings from c-mode over to
244         c++-mode.
245
246 2018-12-08  Stafford Horne  <shorne@gmail.com>
247
248         * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
249         * configure.tgt: Add or1k*-*-linux*.
250         * or1k-linux-tdep.c: New file.
251         * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
252
253 2018-12-07  Pedro Alves  <palves@redhat.com>
254
255         * dwarf2read.c (get_gdb_index_contents_from_section): Use
256         gdb::make_array_view.
257
258 2018-12-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
259
260         * language.c (_initialize_language): Fix leak by assigning
261         a static string to language.  Same for range and case_sensitive,
262         even if no leak is detected for these variables.
263
264 2018-12-05  John Baldwin  <jhb@FreeBSD.org>
265
266         * configure: Re-generate.
267         * configure.ac: Use separate sed expressions to escape variables
268         in auto-load directories.
269
270 2018-12-05  Andrew Burgess  <andrew.burgess@embecosm.com>
271
272         * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
273         (riscv_find_default_target_description): Use new function to
274         extract feature from gdbarch_info.
275         (riscv_gdbarch_init): Add error checks for xlen and flen between
276         target description and bfd headers.  Be smarter about when we
277         think the hardware floating point abi should be used.
278
279 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
280
281         * nat/aarch64-linux-hw-point.c
282         (aarch64_linux_any_set_debug_regs_state): New function.
283         * nat/aarch64-linux-hw-point.h
284         (aarch64_linux_any_set_debug_regs_state): New declaration.
285         * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
286         BPs or WPs are set.
287
288 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
289
290         * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
291         (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
292
293 2018-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
294             Simon Marchi  <simon.marchi@ericsson.com>
295
296         * linespec.c (symtab_vector_up): Remove.
297         (symtabs_from_filename): Change return type to std::vector.
298         (collect_symtabs_from_filename): Likewise.
299         (create_sals_line_offset): Assign return value of
300         collect_symtabs_from_filename to *ls->file_symtabs.
301         (convert_explicit_location_to_linespec): Remove call to release.
302         (parse_linespec): Likewise.
303         (symtab_collector) <symtab_collector>: Remove initialization of
304         m_symtabs.
305         <release_symtabs>: Change return type to std::vector<symtab *>.
306         <operator ()>: Adjust.
307
308 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
309
310         * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
311         defined.
312         (union sigval32, struct siginfo32, fbsd_siginfo_size)
313         (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
314         of KERN_PROC_AUXV and PT_LWPINFO.
315         (fbsd_nat_target::xfer_partial): Define method unconditionally.
316         Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
317         Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
318         Make TARGET_OBJECT_FREEBSD_VMMAP and
319         TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
320         and KERN_PROC_PS_STRINGS.
321         * fbsd-nat.h: Include <sys/proc.h>.
322         (fbsd_nat_target::xfer_partial): Declare method unconditionally.
323
324 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
325
326         * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
327         header files.
328         (riscv_linux_nat_target::read_description): New method.
329
330 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
331
332         * arch/riscv.h (riscv_gdbarch_features::hash): New method.
333         * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
334         (riscv_tdesc_cache): New global.
335         (riscv_create_target_description): Look in the cache before
336         creating a new target description.
337
338 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
339
340         * arch/riscv.h (riscv_gdb_features::operator==): New.
341         (riscv_gdb_features::operator!=): New.
342         * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
343         operator.
344
345 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
346
347         * arch/riscv.h (riscv_create_target_description): Make return type
348         const.
349         * arch/riscv.c (riscv_create_target_description): Likewise.
350         * riscv-tdep.c (riscv_find_default_target_description): Likewise.
351
352 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
353             Keith Seitz  <keiths@redhat.com>
354             Tom Tromey  <tom@tromey.com>
355             Sergio Durigan Junior  <sergiodj@redhat.com>
356
357         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
358         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
359         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
360         inside the CU.
361
362 2018-11-30  Pedro Alves  <palves@redhat.com>
363
364         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
365         <stratum>: New override.
366         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
367         <stratum>: New override.
368         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
369         <stratum>: New override.
370         * exec.c (exec_target) <exec_target>: Delete.
371         <stratum>: New override.
372         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
373         stratum method instead of the to_stratum field.
374         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
375         <stratum>: New override.
376         (thread_db_target::thread_db_target): Delete.
377         * make-target-delegates (print_class): Don't print a ctor
378         declaration.  Print a stratum method override declaration.
379         * process-stratum-target.h (process_stratum_target)
380         <process_stratum_target>: Delete.
381         <stratum>: New override.
382         * ravenscar-thread.c (ravenscar_thread_target)
383         <ravenscar_thread_target>: Delete.
384         <stratum>: New override.
385         * record-btrace.c (record_btrace_target)
386         <record_btrace_target>: Delete.
387         <stratum>: New override.
388         * record-full.c (record_full_base_target)
389         <record_full_base_target>: Delete.
390         <stratum>: New override.
391         * record.c (record_disconnect, record_detach)
392         (record_mourn_inferior, record_kill): Adjust to use the stratum
393         method instead of the to_stratum field.
394         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
395         * sol-thread.c (sol_thread_target)
396         <sol_thread_target>: Delete.
397         <stratum>: New override.
398         * spu-multiarch.c (spu_multiarch_target)
399         <spu_multiarch_target>: Delete.
400         <stratum>: New override.
401         * target-delegates.c: Regenerate.
402         * target.c (target_stack::push, target_stack::unpush)
403         (pop_all_targets_above, pop_all_targets_at_and_above)
404         (info_target_command, target_require_runnable)
405         (target_stack::find_beneath): Adjust to use the stratum method
406         instead of the to_stratum field.
407         (dummy_target::dummy_target): Delete.
408         (dummy_target::stratum): New.
409         (debug_target::debug_target): Delete.
410         (debug_target::stratum): New.
411         (maintenance_print_target_stack): Adjust to use the stratum method
412         instead of the to_stratum field.
413         * target.h (struct target_ops) <stratum>: New method.
414         <to_stratum>: Delete.
415         <is_pushed>: Adjust to use the stratum method
416         instead of the to_stratum field.
417
418 2018-11-30  Pedro Alves  <palves@redhat.com>
419
420         * corelow.c (core_target) <has_all_memory, has_execution>: New
421         overrides.
422         * inf-child.c (inf_child_target::has_all_memory)
423         (inf_child_target::has_memory, inf_child_target::has_stack)
424         (inf_child_target::has_registers)
425         (inf_child_target::has_execution): Delete.
426         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
427         has_stack, has_registers, has_execution>: Delete.
428         * process-stratum-target.c
429         (process_stratum_target::has_all_memory)
430         (process_stratum_target::has_memory)
431         (process_stratum_target::has_stack)
432         (process_stratum_target::has_registers)
433         (process_stratum_target::has_execution): New.
434         * process-stratum-target.h (process_stratum_target)
435         <has_all_memory, has_memory, has_stack, has_registers,
436         has_execution>: New method overrides.
437         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
438         has_memory, has_stack, has_registers, has_execution>: Delete.
439         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
440         has_execution>: Delete.
441         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
442         has_registers, has_execution>: Delete.
443         * target.c (default_child_has_all_memory)
444         (default_child_has_memory, default_child_has_stack)
445         (default_child_has_registers, default_child_has_execution):
446         Delete.
447         * target.h (default_child_has_all_memory)
448         (default_child_has_memory, default_child_has_stack)
449         (default_child_has_registers, default_child_has_execution):
450         Delete.
451         * tracefile.h (tracefile_target) <has_execution>: New override.
452
453 2018-11-30  Pedro Alves  <palves@redhat.com>
454
455         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
456         * bsd-kvm.c: Include "process-stratum-target.h".
457         (bsd_kvm_target): Now inherits from process_stratum_target.
458         (bsd_kvm_target::bsd_kvm_target): Default it.
459         * corelow.c: Include "process-stratum-target.h".
460         (core_target): Now inherits from process_stratum_target.
461         (core_target::core_target): Don't set to_stratum here.
462         * inf-child.c (inf_child_target::inf_child_target): Delete.
463         * inf-child.h: Include "process-stratum-target.h".
464         (inf_child_target): Inherit from process_stratum_target.
465         (inf_child_target) <inf_child_target>: Default it.
466         <can_async_p, supports_non_stop, supports_disable_randomization>:
467         Delete overrides.
468         * process-stratum-target.c: New file.
469         * process-stratum-target.h: New file.
470         * remote-sim.c: Include "process-stratum-target.h".
471         (gdbsim_target): Inherit from process_stratum_target.
472         <gdbsim_target>: Default it.
473         * remote.c: Include "process-stratum-target.h".
474         (remote_target): Inherit from process_stratum_target.
475         <remote_target>: Default it.
476         * target.c (default_thread_address_space)
477         (default_thread_architecture): Delete.
478         * target.h (target_ops) <thread_architecture>: Now returns NULL by
479         default.
480         <thread_address_space>: Ditto.
481         * test-target.h: Include "process-stratum-target.h" instead of
482         "target.h".
483         (test_target_ops): Inherit from process_stratum_target.
484         <test_target_ops>: Default it.
485         * tracefile.c (tracefile_target::tracefile_target): Delete.
486         * tracefile.h: Include "process-stratum-target.h".
487         (tracefile_target): Inherit from process_stratum_target.
488         <tracefile_target>: Default it.
489         * target-delegates.c: Regenerate.
490
491 2018-11-30  Pedro Alves  <palves@redhat.com>
492
493         * Makefile.in (COMMON_SFILES): Add test-target.c.
494         * gdbarch-selftests.c: Include "test-target.h".
495         * regcache.c: Include "test-target.h".
496         * target.c (test_target_info, test_target_ops::info): Move to ...
497         * test-target.c: ... this new file.
498         * target.h (test_target_ops): Move to ...
499         * test-target.h: ... this new file.
500
501 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
502
503         * source.c (forward_search_command): Fix leak by using
504         xrealloc even for the first allocation in the loop, as buf
505         is static.
506
507 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
508
509         PR gdb/23093
510         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
511         (fbsd_gdb_signal_to_target): New.
512         (fbsd_init_abi): Install gdbarch "signal_from_target" and
513         "signal_to_target" methods.
514
515 2018-11-29  Tom Tromey  <tom@tromey.com>
516
517         * valarith.c (value_x_unop): Don't set argvec[3].
518
519 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
520
521         PR gdb/23917
522         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
523         semicolon.
524
525 2018-11-26  Pedro Alves  <palves@redhat.com>
526
527         * procfs.c (procfs_notice_thread): Replace uses of
528         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
529         * sol-thread.c (sol_thread_target::wait)
530         (sol_update_thread_list_callback): Likewise.
531
532 2018-11-25  Tom Tromey  <tom@tromey.com>
533
534         * ui-out.c (ui_out::field_fmt): Remove comment.
535         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
536         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
537
538 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
539
540         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
541         leak in open_source_file' has been partially undone by '2179fbc36d23
542         Return scoped_fd from open_source_file'. Re-add the transfer of
543         current s->fullname to the unique_xmalloc_ptr fullname given
544         to find_and_open_source.
545
546 2018-11-23  Pedro Alves  <palves@redhat.com>
547
548         * gdbthread.h (enum thread_state): Move comments here.
549         (is_running, is_stopped, is_exited): Remove declarations.
550
551 2018-11-22  Pedro Alves  <palves@redhat.com>
552
553         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
554         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
555         ALL_NON_EXITED_THREADS with all_non_exited_threads.
556         (print_one_breakpoint_location): Replace ALL_INFERIORS with
557         all_inferiors.
558         * bsd-kvm.c: Include inferior.h.
559         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
560         with all_non_exited_threads.
561         * common/filtered-iterator.h: New.
562         * common/safe-iterator.h: New.
563         * corelow.c (core_target_open): Don't call init_thread_list here.
564         * darwin-nat.c (thread_info_from_private_thread_info): Replace
565         ALL_THREADS with all_threads.
566         * fbsd-nat.c (fbsd_nat_target::resume): Replace
567         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
568         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
569         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
570         * fork-child.c (postfork_hook): Don't call init_thread_list here.
571         * gdbarch-selftests.c (register_to_value_test): Adjust.
572         * gdbthread.h: Don't include "inferior.h" here.
573         (struct inferior): Forward declare.
574         (enum step_over_calls_kind): Moved here from inferior.h.
575         (thread_info::deletable): Definition moved to thread.c.
576         (find_thread_ptid (inferior *, ptid_t)): Declare.
577         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
578         Include "thread-iter.h".
579         (all_threads, all_non_exited_threads, all_threads_safe): New.
580         (any_thread_p): Declare.
581         (thread_list): Delete.
582         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
583         all_non_exited_threads.
584         (proceed_after_attach_callback): Delete.
585         (proceed_after_attach): Take an inferior pointer instead of an
586         integer PID.  Adjust to use range-for.
587         (attach_post_wait): Pass down inferior pointer instead of pid.
588         Use range-for instead of ALL_NON_EXITED_THREADS.
589         (detach_command): Remove init_thread_list call.
590         * inferior-iter.h: New.
591         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
592         (delete_thread_of_inferior): Delete.
593         (delete_inferior, exit_inferior_1): Use range-for with
594         inf->threads_safe() instead of iterate_over_threads.
595         (inferior_appeared): Call init_thread_list here.
596         (discard_all_inferiors): Use all_non_exited_inferiors.
597         (find_inferior_id, find_inferior_pid): Use all_inferiors.
598         (iterate_over_inferiors): Use all_inferiors_safe.
599         (have_inferiors, number_of_live_inferiors): Use
600         all_non_exited_inferiors.
601         (number_of_inferiors): Use all_inferiors and std::distance.
602         (print_inferior): Use all_inferiors.
603         * inferior.h: Include gdbthread.h.
604         (enum step_over_calls_kind): Moved to gdbthread.h.
605         (struct inferior) <thread_list>: New field.
606         <threads, non_exited_threads, threads_safe>: New methods.
607         (ALL_INFERIORS): Delete.
608         Include "inferior-iter.h".
609         (ALL_NON_EXITED_INFERIORS): Delete.
610         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
611         functions.
612         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
613         ALL_NON_EXITED_THREADS with all_non_exited_threads.
614         * infrun.c (follow_exec): Use all_threads_safe.
615         (clear_proceed_status, proceed): Use all_non_exited_threads.
616         (init_wait_for_inferior): Don't clear inline frame state here.
617         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
618         all_threads instead of ALL_NON_EXITED_THREADS.
619         (random_pending_event_thread): Use all_non_exited_threads instead
620         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
621         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
622         instead of ALL_NON_EXITED_THREADS.
623         (handle_no_resumed): Use all_non_exited_threads instead of
624         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
625         ALL_INFERIORS.
626         (restart_threads, switch_back_to_stepped_thread): Use
627         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
628         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
629         all_inferiors.
630         (kill_unfollowed_fork_children): Use inf->non_exited_threads
631         instead of ALL_NON_EXITED_THREADS.
632         * linux-tdep.c (linux_make_corefile_notes): Use
633         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
634         * linux-thread-db.c (thread_db_target::update_thread_list):
635         Replace ALL_INFERIORS with all_inferiors.
636         (thread_db_target::thread_handle_to_thread_info): Use
637         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
638         * mi/mi-interp.c (multiple_inferiors_p): New.
639         (mi_on_resume_1): Simplify using all_non_exited_threads and
640         multiple_inferiors_p.
641         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
642         instead of ALL_NON_EXITED_THREADS.
643         * nto-procfs.c (nto_procfs_target::open): Don't call
644         init_thread_list here.
645         * record-btrace.c (record_btrace_target_open)
646         (record_btrace_target::stop_recording)
647         (record_btrace_target::close)
648         (record_btrace_target::record_is_replaying)
649         (record_btrace_target::resume, record_btrace_target::wait)
650         (record_btrace_target::record_stop_replaying): Use
651         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
652         * record-full.c (record_full_wait_1): Use all_non_exited_threads
653         instead of ALL_NON_EXITED_THREADS.
654         * regcache.c (cooked_read_test): Remove reference to global
655         thread_list.
656         * remote-sim.c (gdbsim_target::create_inferior): Don't call
657         init_thread_list here.
658         * remote.c (remote_target::update_thread_list): Use
659         all_threads_safe instead of ALL_NON_EXITED_THREADS.
660         (remote_target::process_initial_stop_replies): Replace
661         ALL_INFERIORS with all_non_exited_inferiors and use
662         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
663         (remote_target::open_1): Don't call init_thread_list here.
664         (remote_target::append_pending_thread_resumptions)
665         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
666         instead of ALL_NON_EXITED_THREADS.
667         (remote_target::commit_resume)
668         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
669         with all_non_exited_inferiors and use all_non_exited_threads
670         instead of ALL_NON_EXITED_THREADS.
671         (remote_target::kill_new_fork_children): Use
672         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
673         init_thread_list and init_wait_for_inferior calls.
674         (remote_target::remote_btrace_maybe_reopen)
675         (remote_target::thread_handle_to_thread_info): Use
676         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
677         * target.c (target_terminal::restore_inferior)
678         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
679         all_non_exited_inferiors.
680         * thread-iter.c: New file.
681         * thread-iter.h: New file.
682         * thread.c: Include "inline-frame.h".
683         (thread_list): Delete.
684         (clear_thread_inferior_resources): Call clear_inline_frame_state.
685         (init_thread_list): Use all_threads_safe instead of
686         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
687         (new_thread): Adjust to per-inferior thread lists.
688         (add_thread_silent): Pass inferior to find_thread_ptid.
689         (thread_info::deletable): New, moved from the header.
690         (delete_thread_1): Adjust to per-inferior thread lists.
691         (find_thread_global_id): Use inf->threads().
692         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
693         find_thread_ptid.
694         (find_thread_ptid(inferior*, ptid_t)): New overload.
695         (iterate_over_threads): Use all_threads_safe.
696         (any_thread_p): New.
697         (thread_count): Use all_threads and std::distance.
698         (live_threads_count): Use all_non_exited_threads and
699         std::distance.
700         (valid_global_thread_id): Use all_threads.
701         (in_thread_list): Use find_thread_ptid.
702         (first_thread_of_inferior): Adjust to per-inferior thread lists.
703         (any_thread_of_inferior, any_live_thread_of_inferior): Use
704         inf->non_exited_threads().
705         (prune_threads, delete_exited_threads): Use all_threads_safe.
706         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
707         (set_resumed, set_running): Use all_non_exited_threads.
708         (is_thread_state, is_stopped, is_exited, is_running)
709         (is_executing): Delete.
710         (set_executing, set_stop_requested, finish_thread_state): Use
711         all_non_exited_threads.
712         (print_thread_info_1): Use all_inferiors and all_threads.
713         (thread_apply_all_command): Use all_non_exited_threads.
714         (thread_find_command): Use all_threads.
715         (update_threads_executing): Use all_non_exited_threads.
716         * tid-parse.c (parse_thread_id): Use inf->threads.
717         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
718
719 2018-11-22  Pedro Alves  <palves@redhat.com>
720
721         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
722         switch to it before calling into try_open_exec_file.
723
724 2018-11-22  Pedro Alves  <palves@redhat.com>
725
726         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
727         inferior_thread instead of find_thread_ptid, and only when
728         inferior_ptid is not null_ptid.
729         * inferior.c (add_inferior): Don't include target_pid_to_str
730         output when the inferior is not started.
731         * python/py-inferior.c (python_on_normal_stop): Don't use
732         find_thread_ptid.
733         (tui_on_user_selected_context_changed): Use inferior_thread
734         instead of find_thread_ptid, and only when inferior_ptid is not
735         null_ptid.
736
737 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
738
739         PR python/23714
740         * gdb/python/python.c (execute_gdb_command): Call
741         prevent_dont_repeat earlier to avoid affecting dont_repeat.
742
743 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
744
745         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
746         (HFILES_NO_SRCDIR): Add arch/riscv.h.
747         * arch/riscv.c: New file.
748         * arch/riscv.h: New file.
749         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
750         this list, and add arch/riscv.o.
751         * features/Makefile: Add riscv features.
752         * features/riscv/32bit-cpu.c: New file.
753         * features/riscv/32bit-cpu.xml: New file.
754         * features/riscv/32bit-csr.c: New file.
755         * features/riscv/32bit-csr.xml: New file.
756         * features/riscv/32bit-fpu.c: New file.
757         * features/riscv/32bit-fpu.xml: New file.
758         * features/riscv/64bit-cpu.c: New file.
759         * features/riscv/64bit-cpu.xml: New file.
760         * features/riscv/64bit-csr.c: New file.
761         * features/riscv/64bit-csr.xml: New file.
762         * features/riscv/64bit-fpu.c: New file.
763         * features/riscv/64bit-fpu.xml: New file.
764         * features/riscv/rebuild-csr-xml.sh: New file.
765         * riscv-tdep.c: Add 'arch/riscv.h' include.
766         (riscv_gdb_reg_names): Delete.
767         (csr_reggroup): New global.
768         (struct riscv_register_alias): Delete.
769         (struct riscv_register_feature): New structure.
770         (riscv_register_aliases): Delete.
771         (riscv_xreg_feature): New global.
772         (riscv_freg_feature): New global.
773         (riscv_virtual_feature): New global.
774         (riscv_csr_feature): New global.
775         (riscv_create_csr_aliases): New function.
776         (riscv_read_misa_reg): Delete.
777         (riscv_has_feature): Delete.
778         (riscv_isa_xlen): Simplify, just return cached xlen.
779         (riscv_isa_flen): Simplify, just return cached flen.
780         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
781         (riscv_register_name): Update to make use of tdesc_register_name.
782         Look up xreg and freg names in the new globals riscv_xreg_feature
783         and riscv_freg_feature.  Don't supply csr aliases here.
784         (riscv_fpreg_q_type): Delete.
785         (riscv_register_type): Use tdesc_register_type in almost all
786         cases, override the returned type in a few specific cases only.
787         (riscv_print_one_register_info): Handle errors reading registers.
788         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
789         registers that are otherwise unknown to GDB.  Also check the
790         csr_reggroup.
791         (riscv_print_registers_info): Remove assert about upper register
792         number, and use gdbarch_register_reggroup_p instead of
793         short-cutting.
794         (riscv_find_default_target_description): New function.
795         (riscv_check_tdesc_feature): New function.
796         (riscv_add_reggroups): New function.
797         (riscv_setup_register_aliases): New function.
798         (riscv_init_reggroups): New function.
799         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
800         setup register groups.  Register new riscv debug variable.
801         * riscv-tdep.h: Add 'arch/riscv.h' include.
802         (struct gdbarch_tdep): Remove abi union, and add
803         riscv_gdbarch_features field.  Remove cached quad floating point
804         type, and provide initialisation for double type field.
805         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
806         the list of targets using the feature based target descriptions.
807         * NEWS: Mention target description support.
808
809 2018-11-21  Pedro Alves  <palves@redhat.com>
810
811         * valops.c (find_method_list, value_find_oload_method_list)
812         (find_overload_match, find_oload_champ): Rename parameters and
813         locals.
814
815 2018-11-21  Pedro Alves  <palves@redhat.com>
816
817         * valops.c (find_method_list): Replace pointer and length
818         parameters with an gdb::array_view.  Adjust.
819         (value_find_oload_method_list): Likewise.
820         (find_overload_match): Use gdb::array_view for methods list.
821         Adjust to find_oload_champ interface change.
822         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
823         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
824
825 2018-11-21  Pedro Alves  <palves@redhat.com>
826
827         * gdbtypes.c (compare_badness): Change type of parameters to const
828         reference.  Adjust to badness_vector being a std::vector now.
829         (rank_function): Adjust to badness_vector being a std::vector now.
830         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
831         (LENGTH_MATCH): Delete.
832         (compare_badness): Change type of parameters to const reference.
833         (rank_function): Return a badness_vector by value now.
834         (find_overload_match): Adjust to badness_vector being a
835         std::vector now.  Remove cleanups.
836         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
837         badness_vector pointer.
838         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
839         a badness_vector pointer.  Adjust to badness_vector being a
840         std::vector now.  Remove cleanups.
841         (find_oload_champ): 'oload_champ_bv' parameter now
842         a badness_vector pointer.  Adjust to badness_vector being a
843         std::vector now.  Remove cleanups.
844
845 2018-11-21  Pedro Alves  <palves@redhat.com>
846
847         * cp-support.c (sym_return_val_size, sym_return_val_index)
848         (sym_return_val): Delete.
849         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
850         add to the vector.
851         (make_symbol_overload_list): Adjust to return a std::vector
852         instead of maintaining a global open coded vector.
853         (make_symbol_overload_list_block): Add std::vector parameter.
854         (make_symbol_overload_list_block): Rename to ...
855         (add_symbol_overload_list_block): ... this and add std::vector
856         parameter.
857         (make_symbol_overload_list_namespace): Rename to ...
858         (add_symbol_overload_list_namespace): ... this and add std::vector
859         parameter.
860         (make_symbol_overload_list_adl_namespace): Rename to ...
861         (add_symbol_overload_list_adl_namespace): ... this and add
862         std::vector parameter.
863         (make_symbol_overload_list_adl): Delete.
864         (add_symbol_overload_list_adl): New.
865         (make_symbol_overload_list_using): Rename to ...
866         (add_symbol_overload_list_using): ... this and add std::vector
867         parameter.
868         (make_symbol_overload_list_qualified): Rename to ...
869         (add_symbol_overload_list_qualified): ... this and add std::vector
870         parameter.
871         * cp-support.h: Include "common/array-view.h" and <vector>.
872         (make_symbol_overload_list): Change return type to std::vector.
873         (make_symbol_overload_list_adl): Delete declaration.
874         (add_symbol_overload_list_adl): New declaration.
875         * valops.c (find_overload_match): Local 'oload_syms' now a
876         std::vector.
877         (find_oload_champ_namespace): 'oload_syms' parameter now a
878         std::vector pointer.
879         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
880         std::vector pointer.  Adjust to new make_symbol_overload_list
881         interface.
882
883 2018-11-21  Pedro Alves  <palves@redhat.com>
884
885         * common/array-view.h (array_view::splice(size_type, size_t)): New.
886         (array_view::splice(size_type)): New.
887         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
888         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
889         std::vector.
890         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
891         * extension.h: Include "common/array-view.h".
892         (xmethod_worker::invoke): Adjust to use gdb::array_view.
893         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
894         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
895         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
896         (xmethod_worker::do_get_result_type): Adjust to use
897         gdb::array_view.
898         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
899         * gdbtypes.h: Include "common/array-view.h".
900         (rank_function): Adjust to use gdb::array_view.
901         * python/py-xmethods.c (python_xmethod_worker::invoke)
902         (python_xmethod_worker::do_get_arg_types)
903         (python_xmethod_worker::do_get_result_type)
904         (python_xmethod_worker::invoke): Adjust to new interfaces.
905         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
906         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
907         * valops.c (find_overload_match, find_oload_champ_namespace)
908         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
909         gdb:array_view and the new xmethod_worker interfaces.
910         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
911         gdb::array_view.
912         * value.h (find_overload_match, result_type_of_xmethod)
913         (call_xmethod): Adjust to use gdb::array_view.
914         * unittests/array-view-selftests.c: Add slicing tests.
915
916 2018-11-21  Pedro Alves  <palves@redhat.com>
917
918         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
919         * common/array-view.h (make_array_view): New.
920         * compile/compile-object-run.c (compile_object_run): Adjust to
921         pass an array_view.
922         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
923         * eval.c (eval_call): Adjust to pass an array_view.
924         (evaluate_subexp_standard): Adjust to pass an array_view.
925         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
926         * guile/scm-value.c (gdbscm_value_call): Likewise.
927         * infcall.c (push_dummy_code): Replace pointer + size parameters
928         with an array_view parameter.
929         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
930         adjust.
931         * infcall.h: Include "common/array-view.h".
932         (call_function_by_hand, call_function_by_hand_dummy): Replace
933         pointer + size parameters with an array_view parameter.
934         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
935         * linux-tdep.c (linux_infcall_mmap): Likewise.
936         * objc-lang.c (lookup_objc_class, lookup_child_selector)
937         (value_nsstring, print_object_command): Likewise.
938         * python/py-value.c (valpy_call): Likewise.
939         * rust-lang.c (rust_evaluate_funcall): Likewise.
940         * spu-tdep.c (flush_ea_cache): Likewise.
941         * valarith.c (value_x_binop, value_x_unop): Likewise.
942         * valops.c (value_allocate_space_in_inferior): Likewise.
943         * unittests/array-view-selftests.c (run_tests): Add
944         gdb::make_array_view test.
945
946 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
947
948         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
949         than a fixed size buffer.
950
951 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
952
953         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
954         and remove insertion of extra spaces in GDB's output.
955         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
956         Layout field into a temporary buffer, and then output it as a
957         string field.
958
959 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
960
961         * NEWS: Document the language choice done by
962         'info [types|functions|variables]|rbreak'.
963
964 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
965
966         * symtab.c (treg_matches_sym_type_name): Use
967         scoped_switch_to_sym_language_if_auto instead of local logic.
968         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
969         to switch to SYM language when language mode is auto.
970
971 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
972
973         * language.h (scoped_switch_to_sym_language_if_auto): New class.
974
975 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
976
977         * symtab.c (search_symbols): Properly check absence of type regexp
978         before entering the loop scanning the minimal symbols.
979
980 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
981
982         * s12z-tdep.c (s12z_extract_return_value): New function.
983         (inv_reg_perm) New array.
984         (s12z_return_value): Populate readbuf if non-null.
985
986 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
987
988         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
989         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
990         to MinGW fixed by Gnulib.
991         (O_NOINHERIT): Define if not defined.
992
993 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
994
995         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
996
997 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
998
999         * infrun.c (displaced_step_inferior_state) <next>: Remove.
1000
1001 2018-11-19  Tom Tromey  <tom@tromey.com>
1002
1003         * source.c (get_filename_and_charpos): Return void.
1004
1005 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1006
1007         * skip.c (_initialize_step_skip): Fix "info skip" help.
1008
1009 2018-11-16  Tom Tromey  <tom@tromey.com>
1010
1011         PR rust/23625:
1012         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1013
1014 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1015
1016         * infrun.c (displaced_step_inferior_states): Change type to
1017         std::forward_list.
1018         (get_displaced_stepping_state): Adjust.
1019         (displaced_step_in_progress_any_inferior): Adjust.
1020         (add_displaced_stepping_state): Adjust.
1021         (remove_displaced_stepping_state): Adjust.
1022
1023 2018-11-18  Tom Tromey  <tom@tromey.com>
1024
1025         PR build/23814:
1026         * target-delegates.c: Rebuild.
1027         * ia64-linux-nat.c (class ia64_linux_nat_target)
1028         <have_steppable_watchpoint>: Use override.  Return true, not 1.
1029         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
1030         "self" argument.
1031         (ia64_linux_nat_target::low_new_thread): Rename.
1032         (class ia64_linux_nat_target) <read_description>: Don't declare.
1033         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1034         bool.
1035
1036 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1037
1038         PR gdb/22736:
1039         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1040         lang_struct_return code.
1041
1042 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1043
1044         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1045         return_method.
1046         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1047         * amd64-tdep.c (amd64_push_arguments): Likewise.
1048         (amd64_push_dummy_call): Likewise.
1049         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1050         * arc-tdep.c (arc_push_dummy_call): Likewise.
1051         * arm-tdep.c (arm_push_dummy_call): Likewise.
1052         * avr-tdep.c (avr_push_dummy_call): Likewise.
1053         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1054         * cris-tdep.c (cris_push_dummy_call): Likewise.
1055         * csky-tdep.c (csky_push_dummy_call): Likewise.
1056         * frv-tdep.c (frv_push_dummy_call): Likewise.
1057         * gdbarch.c: Regenerate.
1058         * gdbarch.h: Regenerate.
1059         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1060         return_method.
1061         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1062         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1063         (hppa64_push_dummy_call): Likewise.
1064         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1065         * i386-tdep.c (i386_push_dummy_call): Likewise.
1066         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1067         * infcall.c (call_function_by_hand_dummy): Likewise.
1068         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1069         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1070         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1071         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1072         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1073         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1074         * mep-tdep.c (mep_push_dummy_call): Likewise.
1075         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1076         (mips_n32n64_push_dummy_call): Likewise.
1077         (mips_o32_push_dummy_call): Likewise.
1078         (mips_o64_push_dummy_call): Likewise.
1079         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1080         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1081         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1082         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1083         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1084         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1085         (ppc64_sysv_abi_push_dummy_call): Likewise.
1086         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1087         (ppc64_sysv_abi_push_dummy_call): Likewise.
1088         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1089         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1090         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1091         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1092         * rx-tdep.c (rx_push_dummy_call): Likewise.
1093         * s390-tdep.c (s390_push_dummy_call): Likewise.
1094         * score-tdep.c (score_push_dummy_call): Likewise.
1095         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1096         (sh_push_dummy_call_nofpu): Likewise.
1097         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1098         (sparc32_push_dummy_call): Likewise.
1099         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1100         (sparc64_push_dummy_call): Likewise.
1101         * spu-tdep.c (spu_push_dummy_call): Likewise.
1102         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1103         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1104         * v850-tdep.c (v850_push_dummy_call): Likewise.
1105         * vax-tdep.c (vax_push_dummy_call): Likewise.
1106         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1107         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1108
1109 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1110
1111         * gdbarch.sh (enum function_call_return_method): Add enum.
1112         * gdbarch.h: Regenerate.
1113         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1114
1115 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
1116
1117         * unittests/copy_bitwise-selftests.c: New file.
1118         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1119         (selftests::copy_bitwise_tests): Delete, moving this code to
1120         unittests/copy_bitwise-selftests.c instead.
1121         (_initialize_utils): Do not register copy_bitwise tests.
1122         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1123         unittests/copy_bitwise-selftests.c.
1124
1125 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
1126
1127         * ada-lang.c (move_bits): Delete. Update all callers to use
1128         copy_bitwise instead.
1129         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1130         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1131         Move from here to utils.c.
1132         (_initialize_dwarf2loc): Remove call to register copy_bitwise
1133         selftests.
1134         * utils.h (copy_bitwise): Add declaration.
1135         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1136         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1137         Moved here from dwarf2loc.c.
1138         (_initialize_utils): Register copy_bitwise selftests.
1139
1140 2018-11-14  Jim Wilson  <jimw@sifive.com>
1141
1142         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1143         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1144         then increment next_regnum if odd.
1145         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
1146         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
1147         function type.  Pass new arg to riscv_arg_location based on function
1148         type.
1149         (riscv_return_value): Pass new arg to riscv_arg_location.
1150
1151         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1152         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1153         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1154
1155         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1156         setting len.  New local align, set to max of arg align and xlen,
1157         and pass to first riscv_assign_stack_location call.
1158
1159 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
1160
1161         * skip.c (complete_skip_number): New function.
1162         (_initialize_step_skip): Add completers to some skip commands.
1163
1164 2018-11-09  Tom Tromey  <tom@tromey.com>
1165
1166         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1167         (struct remote_g_packet_data): Derive from allocate_on_obstack.
1168         <guesses>: Now a std::vector.
1169         (remote_g_packet_data_init, register_remote_g_packet_guess):
1170         Update.
1171         (remote_read_description_p): Update.  Return bool.
1172         (remote_target::read_description): Update.
1173         (struct remote_g_packet_guess): Add constructor.
1174
1175 2018-11-09  Tom Tromey  <tom@tromey.com>
1176
1177         * common/scoped_fd.h (class scoped_fd): Add move constructor and
1178         move assignment operator.
1179         * psymtab.c (psymtab_to_fullname): Update.
1180         * source.h (open_source_file): Return scoped_fd.
1181         (find_and_open_source): Likewise.
1182         * source.c (open_source_file): Return scoped_fd.
1183         (get_filename_and_charpos): Update.
1184         (print_source_lines_base): Update.  Use scoped_fd::to_file.
1185         (forward_search_command): Likewise.
1186         (reverse_search_command): Likewise.
1187         (find_and_open_source): Return scoped_fd.
1188         * tui/tui-source.c (tui_set_source_content): Update.  Use
1189         gdb_file_up.
1190
1191 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
1192
1193         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1194         overflow.
1195
1196 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1197
1198         * configure: Regenerate.
1199
1200 2018-11-09  Tom de Vries  <tdevries@suse.de>
1201
1202         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1203         unconditionally, to set the language of the symbol.  Manage freeing
1204         returned pointer using gdb::unique_xmalloc_ptr.
1205
1206 2018-11-08  Tom Tromey  <tom@tromey.com>
1207
1208         * record.c (require_record_target): Upper-case "<TAB>".
1209
1210 2018-11-08  Tom Tromey  <tom@tromey.com>
1211
1212         * python/lib/gdb/command/pretty_printers.py
1213         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1214
1215 2018-11-08  Tom Tromey  <tom@tromey.com>
1216
1217         PR gdb/23555:
1218         PR gdb/23838:
1219         * target.h (target_supports_terminal_ours): Return bool.
1220         * target.c (target_supports_terminal_ours): Handle case where
1221         current_top_target returns nullptr.  Return bool.
1222
1223 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
1224
1225         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1226         return the correct count for potential HFAs.
1227
1228 2018-11-08  Jan Beulich  <jbeulich@suse.com>
1229
1230         * i387-tdep.c (i387_supply_xsave): Split handling of
1231         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1232         (i387_collect_xsave): Likewise.
1233
1234 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1235
1236         * riscv-tdep.c (riscv_insn::decode): Update header comment.
1237         (riscv_frame_this_id): Catch errors thrown while building the
1238         frame cache, leave the frame id as the default, which is the outer
1239         frame id.
1240
1241 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1242
1243         * ada-lang.c (read_atcb): Only set task_info->called_task if
1244         task_info->state == Entry_Caller_Sleep.
1245         (print_ada_task_info): Do not check task_info->state before
1246         checking task_info->called_task.
1247         (info_task): Likewise.
1248
1249 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1250
1251         * ada-tasks.c (read_atcb): Clear task_info before computing
1252         the value of each of its fields.
1253
1254 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1255
1256         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1257         NULL before dereferencing it.
1258
1259 2018-11-06  Tom de Vries  <tdevries@suse.de>
1260
1261         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1262         program headers.
1263
1264 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
1265
1266         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1267         so that it applies to uclinux as well.
1268
1269 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
1270
1271         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1272         when on AAPCS.
1273
1274 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
1275
1276         * riscv-fbsd-nat.c (getregs_supplies): Return true for
1277         RISCV_CSR_SSTATUS_REGNUM.
1278
1279 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1280
1281         * source.c (open_source_file): Fix leak by transferring the
1282         current s->fullname to the unique_xmalloc_ptr fullname given
1283         to find_and_open_source.
1284
1285 2018-11-04  Tom Tromey  <tom@tromey.com>
1286
1287         * varobj.c (install_default_visualizer): Update.
1288         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1289         Return gdbpy_ref.
1290         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1291         (find_pretty_printer_from_progspace)
1292         (find_pretty_printer_from_gdb, find_pretty_printer)
1293         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1294         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1295         Update.
1296
1297 2018-11-04  Tom Tromey  <tom@tromey.com>
1298
1299         * python/python.c (gdbpy_parameter_value): Update.
1300         * python/python-internal.h (python_string_to_unicode)
1301         (python_string_to_target_python_string)
1302         (host_string_to_python_string): Return gdbpy_ref.
1303         * python/py-utils.c (python_string_to_unicode)
1304         (unicode_to_encoded_python_string)
1305         (unicode_to_target_python_string)
1306         (python_string_to_target_string)
1307         (python_string_to_target_python_string): Return gdbpy_ref.
1308         (python_string_to_host_string): Update.
1309         (host_string_to_python_string): Return gdbpy_ref.
1310         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1311         (stpy_fullname): Update.
1312         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1313         Update.
1314         * python/py-prettyprint.c (print_string_repr): Update.
1315         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1316         (objfpy_get_build_id): Update.
1317         * python/py-breakpoint.c (bppy_get_location)
1318         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1319         Update.
1320
1321 2018-11-04  Tom Tromey  <tom@tromey.com>
1322
1323         * python/python-internal.h (gdb_py_object_from_longest)
1324         (gdb_py_object_from_ulongest): Return gdbpy_ref.
1325         * python/py-value.c (valpy_int): Update.
1326         * python/py-utils.c (gdb_py_object_from_longest): Return
1327         gdbpy_ref.
1328         (gdb_py_object_from_ulongest): Likewise.
1329         * python/py-type.c (typy_get_alignof): Update.
1330         * python/py-linetable.c (ltpy_get_all_source_lines)
1331         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1332         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1333
1334 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1335
1336         * ada-lang.c (_initialize_ada_language): Fix typo.
1337
1338 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1339
1340         * language.c (type): Remove.
1341         (_initialize_language): Remove assignment to type.
1342
1343 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
1344
1345         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1346         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1347         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1348         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1349         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1350         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1351         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1352         and aarch64-ravenscar-thread.o.
1353         * NEWS: Add entry documenting Ravenscar tasking support
1354         on AArch64 ELF.
1355
1356 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1357
1358         * symtab.c (info_functions_command): Initialize quiet flag.
1359         * stack.c (info_args_command): Likewise.
1360
1361 2018-11-01  Jim Wilson  <jimw@sifive.com>
1362
1363         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1364         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1365         debugging messages.
1366
1367 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1368
1369         * ada-lang.c (ada_watch_location_expression): New function.
1370         (ada_language_defn): Set la_watch_location_expression to
1371         ada_watch_location_expression.
1372
1373 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1374
1375         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1376
1377 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1378
1379         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1380         shifting.
1381
1382 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1383             Joel Brobecker  <brobecker@adacore.com>
1384
1385         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1386         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1387         * arm-pikeos-tdep.c: New file.
1388         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1389         embedded system.
1390         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1391
1392 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1393
1394         * common/pathstuff.c (get_standard_temp_dir): New.
1395         * common/pathstuff.h (get_standard_temp_dir): New.
1396         * config.in: Re-generate.
1397         * configure: Re-generate.
1398         * configure.ac: Don't check for mkdtemp.
1399         * gnulib/aclocal-m4-deps.mk: Re-generate.
1400         * gnulib/aclocal.m4: Re-generate.
1401         * gnulib/config.in: Re-generate.
1402         * gnulib/configure: Re-generate.
1403         * gnulib/import/Makefile.am: Re-generate.
1404         * gnulib/import/Makefile.in: Re-generate.
1405         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1406         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1407         * gnulib/import/m4/mkdtemp.m4: New file.
1408         * gnulib/import/mkdtemp.c: New file.
1409         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1410         Add mkdtemp module.
1411         * unittests/mkdir-recursive-selftests.c (test): Use
1412         get_standard_temp_dir.
1413         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1414         ifdef.
1415         * compile/compile.c (get_compile_file_tempdir): Likewise.
1416
1417 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1418
1419         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1420         (SIG_FRAME_LR_OFFSET64): New define.
1421         (SIG_FRAME_FP_OFFSET64): New define.
1422         (aix_sighandle_frame_cache): New Function.
1423         (aix_sighandle_frame_this_id): New Function.
1424         (aix_sighandle_frame_prev_register): New Function.
1425         (aix_sighandle_frame_sniffer): New Function.
1426         (aix_sighandle_frame_unwind): New global variable.
1427         (rs6000_aix_init_osabi): Install new frame unwinder.
1428
1429 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1430
1431         PR gdb/23835
1432         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1433         already defined.
1434
1435 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1436
1437         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1438
1439 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1440
1441         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1442         (producer_is_icc): New function.
1443         (check_producer): Set producer_is_icc field on dwarf2_cu.
1444         (dwarf2_init_integer_type): New function.
1445         (read_base_type): Call dwarf2_init_integer_type instead of
1446         init_integer_type in all cases.
1447         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1448         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1449         LEN is greater than 0.
1450
1451 2018-10-30  Tom Tromey  <tom@tromey.com>
1452
1453         * main.c (captured_main_1): Check return value of bfd_init.
1454
1455 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1456
1457         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1458         Adjust comments.
1459
1460 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1461
1462         * procfs.c: Include common/pathstuff.h.
1463
1464 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1465
1466         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1467         Add missing braces.  No functional change.
1468
1469 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1470
1471         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1472         to report a bad option and fix indentation.
1473         * demangle.c (demangle_command): Use report_unrecognized_option_error
1474         to report a bad option and correctly report the bad option.
1475
1476 2018-10-27  Tom Tromey  <tom@tromey.com>
1477
1478         PR cli/23364:
1479         * darwin-nat.c (copied_shell): New global.
1480         (may_have_sip): Rename from should_disable_startup_with_shell.
1481         (copy_shell_to_cache, maybe_cache_shell): New functions.
1482         (darwin_nat_target::create_inferior): Update.  Use
1483         copied_shell.
1484
1485 2018-10-27  Tom Tromey  <tom@tromey.com>
1486
1487         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1488         (run_tests): Call test_to_file.
1489         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1490         temporary files.
1491         * common/scoped_fd.h (scoped_fd::to_file): New method.
1492
1493 2018-10-27  Tom Tromey  <tom@tromey.com>
1494
1495         * unittests/scoped_mmap-selftests.c (test_normal): Use
1496         gdb_mkostemp_cloexec.
1497         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1498         Use gdb_mkostemp_cloexec.
1499         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1500         gnulib/config.in, gnulib/configure,
1501         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1502         gnulib/import/m4/gnulib-cache.m4,
1503         gnulib/import/m4/gnulib-comp.m4: Update.
1504         * gnulib/import/m4/mkostemp.m4: New file.
1505         * gnulib/import/m4/mkstemp.m4: Remove.
1506         * gnulib/import/mkostemp.c: New file.
1507         * gnulib/import/mkstemp.m4: Remove.
1508         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1509         mkstemp, add mkostemp.  Apply new patch.
1510         * gnulib/import/stdlib.in.h: Apply patch.
1511         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1512         New file.
1513         * dwarf-index-write.c (write_psymtabs_to_index): Use
1514         gdb_mkostemp_cloexec.
1515         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1516
1517 2018-10-27  Tom Tromey  <tom@tromey.com>
1518
1519         * unittests/mkdir-recursive-selftests.c: New file.
1520         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1521         unittests/mkdir-recursive-selftests.c.
1522         * dwarf-index-cache.c (mkdir_recursive): Move to
1523         common/filestuff.c.
1524         (index_cache::store): Check return value of mkdir_recursive.
1525         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1526         (_initialize_index_cache): Don't register test.
1527         * common/filestuff.h (mkdir_recursive): Declare.
1528         * common/filestuff.c (mkdir_recursive): Move from
1529         dwarf-index-cache.c.  Return bool.
1530
1531 2018-10-27  Tom Tromey  <tom@tromey.com>
1532
1533         * dwarf-index-write.c (write_psymtabs_to_index): Move
1534         make_temp_filename to common/pathstuff.c.
1535         * common/pathstuff.h (make_temp_filename): Declare.
1536         * common/pathstuff.c (make_temp_filename): New function, moved
1537         from dwarf-index-write.c.
1538
1539 2018-10-27  Tom Tromey  <tom@tromey.com>
1540
1541         * procfs.c (procfs_target::create_inferior): Use get_shell.
1542         * cli/cli-cmds.c (shell_escape): Use get_shell.
1543         * windows-nat.c (windows_nat_target::create_inferior): Use
1544         get_shell.
1545         * common/pathstuff.c (get_shell): New function.
1546         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1547         (fork_inferior): Use get_shell.
1548         * common/pathstuff.h (get_shell): Declare.
1549
1550 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1551
1552         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1553
1554 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1555
1556         * stack.c (print_variable_and_value_data): Add preg and treg.
1557         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1558         and update callers.
1559         (print_frame_arg_vars): Likewise.
1560         (prepare_reg): New function.
1561         (info_locals_command): Extract info print args and use them.
1562         (info_args_command): Likewise.
1563         (_initialize_stack): Modify on-line help.
1564         * symtab.c (treg_matches_sym_type_name): New function.
1565         (search_symbols): New arg t_regexp.
1566         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1567         (info_variables_command): Extract info print args and use them.
1568         (info_functions_command): Likewise.
1569         (info_types_command): Update call to symtab_symbol_info.
1570         (_initialize_symtab): Modify on-line help.
1571         * symtab.h (treg_matches_sym_type_name): New function.
1572         (search_symbols): New t_regexp arg.
1573
1574 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1575
1576         * cli-utils.c (extract_arg_maybe_quoted): New function.
1577         (extract_info_print_args): New function.
1578         (info_print_args_help): New function.
1579         (report_unrecognized_option_error): New function.
1580         * cli-utils.h (extract_arg_maybe_quoted): New function.
1581         (extract_info_print_args): New function.
1582         (info_print_args_help): New function.
1583         (report_unrecognized_option_error): New function.
1584
1585 2018-10-26  Tom Tromey  <tom@tromey.com>
1586
1587         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1588         (compute_compunit_symtab_includes): Update.
1589         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1590         (compunit_symtab_ptr): Likewise.
1591
1592 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1593
1594         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1595         default_print_auxv_entry for specific tag values.
1596
1597 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1598
1599         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1600
1601 2018-10-26  Jim Wilson  <jimw@sifive.com>
1602
1603         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1604         (riscv_linux_sigframe_init): Declare.
1605         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1606         (riscv_linux_sigframe): New.
1607         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1608         (riscv_linux_sigframe_init): Define.
1609         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1610
1611         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1612         (riscv_isa_flen): Likewise.  Drop static.
1613         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1614         (riscv_isa_flen): Likewise.  Declare.
1615
1616 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1617             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1618
1619         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1620         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1621         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1622         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1623         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1624         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1625         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1626         Define.
1627         (struct ppc_linux_features) <htm>: New field.
1628         (ppc_linux_no_features): Add initializer for htm field.
1629         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1630         new tdescs.
1631         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1632         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1633         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1634         Define if not already defined.
1635         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1636         and rs6000/powerpc-isa207-htm-vsx64l.
1637         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1638         rs6000/powerpc-isa207-htm-vsx64l.xml.
1639         * features/rs6000/power-htm-spr.xml: New file.
1640         * features/rs6000/power-htm-core.xml: New file.
1641         * features/rs6000/power64-htm-core.xml: New file.
1642         * features/rs6000/power-htm-fpu.xml: New file.
1643         * features/rs6000/power-htm-altivec.xml: New file.
1644         * features/rs6000/power-htm-vsx.xml: New file.
1645         * features/rs6000/power-htm-ppr.xml: New file.
1646         * features/rs6000/power-htm-dscr.xml: New file.
1647         * features/rs6000/power-htm-tar.xml: New file.
1648         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1649         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1650         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1651         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1652         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1653         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1654         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1655         fetch_regset with HTM regsets.
1656         (store_register, store_ppc_registers): Call store_regset with HTM
1657         regsets.
1658         (ppc_linux_nat_target::read_description): Set htm field in the
1659         features struct if needed.
1660         * ppc-linux-tdep.c: Include
1661         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1662         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1663         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1664         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1665         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1666         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1667         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1668         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1669         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1670         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1671         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1672         (ppc32_linux_ctarregset): New globals.
1673         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1674         (ppc_linux_collect_core_cpgrregset): New function.
1675         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1676         regsets.
1677         (ppc_linux_core_read_description): Check if the tm spr section is
1678         present and set htm in the features struct.
1679         (_initialize_ppc_linux_tdep): Call
1680         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1681         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1682         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1683         Declare.
1684         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1685         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1686         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1687         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1688         New fields.
1689         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1690         Likewise.
1691         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1692         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1693         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1694         New enum fields.
1695         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1696         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1697         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1698         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1699         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1700         <PPC_CTAR_REGNUM>: Likewise.
1701         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1702         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1703         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1704         (IS_CEFP_PSEUDOREG): Define.
1705         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1706         registers.  Return names for the checkpointed DFP, VSX, and EFP
1707         pseudo registers.
1708         (rs6000_pseudo_register_type): Remove initial assert and raise an
1709         internal error in the else clause instead.  Return types for the
1710         checkpointed DFP, VSX, and EFP pseudo registers.
1711         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1712         checkpointed DFP pseudo registers.
1713         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1714         checkpointed VSX pseudo registers.
1715         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1716         from efpr_pseudo_register_read and
1717         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1718         registers.
1719         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1720         Handle checkpointed DFP, VSX, and EFP registers.
1721         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1722         (efp_ax_pseudo_register_collect): New functions.
1723         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1724         register logic to new functions.  Handle checkpointed DFP, VSX,
1725         and EFP pseudo registers.
1726         (rs6000_gdbarch_init): Look for and validate the htm features.
1727         Include checkpointed DFP, VSX and EFP pseudo-registers.
1728         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1729         HTM registers.
1730
1731 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1732
1733         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1734         without altivec or fpu.
1735
1736 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1737             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1738
1739         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1740         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1741         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1742         Define if not already defined.
1743         * features/rs6000/power-ebb.xml: New file.
1744         * features/rs6000/power-linux-pmu.xml: New file.
1745         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1746         features.
1747         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1748         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1749         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1750         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1751         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1752         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1753         fetch_regset with ebb and pmu regsets.
1754         (store_register, store_ppc_registers): Call store_regset with ebb
1755         and pmu regsets.
1756         (ppc_linux_nat_target::read_description): Set isa207 field in the
1757         features struct if ebb and pmu are avaiable.
1758         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1759         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1760         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1761         and pmu regsets.
1762         (ppc_linux_core_read_description): Check if the pmu section is
1763         present and set isa207 in the features struct.
1764         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1765         (ppc32_linux_pmuregset): Declare.
1766         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1767         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1768         <ppc_sier_regnum>: New field.
1769         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1770         New enum values.
1771         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1772         values.
1773         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1774         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1775         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1776         ebb and pmu features.
1777
1778 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1779             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1780
1781         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1782         (tdesc_powerpc_isa207_vsx64l): Declare.
1783         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1784         (struct ppc_linux_features) <isa207>: New field.
1785         (ppc_linux_no_features): Add initializer for isa207 field.
1786         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1787         new tdescs.
1788         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1789         (NT_PPC_TAR): Define if not already defined.
1790         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1791         rs6000/powerpc-isa207-vsx64l.
1792         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1793         rs6000/powerpc-isa207-vsx64l.xml.
1794         * features/rs6000/power-tar.xml: New file.
1795         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1796         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1797         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1798         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1799         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1800         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1801         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1802         fetch_regset with the TAR regset.
1803         (store_register, store_ppc_registers): Call store_regset with the
1804         TAR regset.
1805         (ppc_linux_nat_target::read_description): Set isa207 field in the
1806         features struct if needed.
1807         * ppc-linux-tdep.c: Include
1808         features/rs6000/powerpc-isa207-vsx32l.c and
1809         features/rs6000/powerpc-isa207-vsx64l.c.
1810         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1811         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1812         regset.
1813         (ppc_linux_core_read_description): Check if the tar section is
1814         present and set isa207 in the features struct.
1815         (_initialize_ppc_linux_tdep): Call
1816         initialize_tdesc_powerpc_isa207_vsx32l and
1817         initialize_tdesc_powerpc_isa207_vsx64l.
1818         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1819         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1820         (enum) <PPC_TAR_REGNUM>: New enum value.
1821         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1822         feature.
1823         (ppc_process_record_op31): Record changes to TAR.
1824
1825 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1826             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1827
1828         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1829         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1830         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1831         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1832         (struct ppc_linux_features) <ppr_dscr>: New field.
1833         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1834         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1835         new tdescs.
1836         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1837         Define if not already defined.
1838         * features/Makefile (WHICH): Add
1839         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1840         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1841         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1842         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1843         * features/rs6000/power-dscr.xml: New file.
1844         * features/rs6000/power-ppr.xml: New file.
1845         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1846         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1847         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1848         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1849         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1850         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1851         * ppc-linux-nat.c: Include <sys/uio.h>.
1852         (fetch_regset, store_regset, check_regset): New functions.
1853         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1854         DSCR and PPR regsets.
1855         (store_register, store_ppc_registers): Call store_regset with
1856         DSCR and PPR regsets.
1857         (ppc_linux_get_hwcap2): New function.
1858         (ppc_linux_nat_target::read_description): Call
1859         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1860         features struct if needed.
1861         * ppc-linux-tdep.c: Include
1862         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1863         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1864         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1865         (ppc32_linux_dscrregset): New globals.
1866         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1867         and dscr regsets.
1868         (ppc_linux_core_read_description): Check if the ppr and dscr
1869         sections are present and set ppr_dscr in the features struct.
1870         (_initialize_ppc_linux_tdep): Call
1871         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1872         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1873         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1874         (ppc32_linux_dscrregset): Declare.
1875         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1876         <ppc_dscr_regnum>: New field.
1877         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1878         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1879         and dscr features.
1880         (ppc_process_record_op31): Record changes to PPR and DSCR.
1881
1882 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1883
1884         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1885         second initializer line for the have_* variables.  Initialize
1886         have_fpu to 0 instead of 1.
1887
1888 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1889
1890         * arch/ppc-linux-common.c (ppc_linux_match_description):
1891         Parenthesize tdesc assignements and indent them properly.
1892
1893 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1894
1895         * ppc-linux-nat.c (fetch_register): Change if statement to else
1896         if.
1897         (store_register): Likewise.
1898
1899 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1900
1901         * rs6000-tdep.c: Remove reggroups.h include.
1902         (rs6000_pseudo_register_reggroup_p): Remove.
1903         (rs6000_gdbarch_init): Remove call to
1904         set_tdesc_pseudo_register_reggroup_p.
1905
1906 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1907
1908         * reggroups.c (default_register_reggroup_p): Return true for
1909         decfloat registers and float_reggroup.
1910
1911 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1912
1913         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1914         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1915         ppc_linux_collect_vrregset by regcache_collect_regset.
1916
1917 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1918
1919         * linux-tdep.c (linux_collect_regset_section_cb): Use
1920         std::vector<gdb_byte> instead of char * and malloc for buf.
1921         Remove xfree.
1922
1923 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1924
1925         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1926         symtab_start instead of always using language_unknown.
1927
1928 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1929
1930         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1931         READ_P parameter, catch and ignore register access errors from
1932         either the old or new MISA location.
1933         (riscv_has_feature): Update call to riscv_read_misa_reg.
1934
1935 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1936
1937         * python/py-function.c (convert_values_to_python): Return
1938         gdbpy_ref<>.  Add header comment.
1939         (fnpy_call): Adjust.
1940
1941 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1942
1943         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1944         (cmdpy_completer_handle_brkchars): Adjust.
1945         (cmdpy_completer): Adjust.
1946
1947 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1948
1949         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1950         Pass correct regnum to raw_supply_zeroed.
1951
1952 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1953
1954         * regcache.c (cooked_read_test): Add CSKY to the list of
1955         architectures with a save_reggroup
1956
1957 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1958
1959         PR gdb/23368
1960         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1961         transfer terminal state from old new new inferior.
1962         * terminal.h (swap_terminal_info): New function.
1963         * inflow.c (swap_terminal_info): New function.
1964
1965 2018-10-23  Tom Tromey  <tom@tromey.com>
1966
1967         * record-btrace.c (get_thread_current_frame_id): Rename from
1968         get_thread_current_frame.  Return a frame_id.
1969         (record_btrace_start_replaying): Update.
1970
1971 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1972
1973         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1974         for CSRs.
1975
1976 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1977
1978         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1979         have_nonsteppable_watchpoint attribute to 1.
1980
1981 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1982
1983         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1984         register names.
1985         (struct register_alias): Rename to...
1986         (struct riscv_register_alias): ...this, and update comment.
1987         (riscv_register_aliases): Update type, and alias names.  Remove
1988         CSR names from this list.
1989         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1990         register names.  Add an extra assertion.
1991         (riscv_is_regnum_a_named_csr): New function.
1992         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1993
1994 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1995
1996         * configure.tgt: Add configuration for s12z.
1997         * s12z-tdep.c:  New file.
1998         * NEWS: Mention new target.
1999
2000 2018-10-22  Jim Wilson  <jimw@sifive.com>
2001
2002         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2003         FP reg smaller than FP reg size, and fill with -1 instead of 0.
2004
2005         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2006         (riscv_register_type): Use them.
2007         (riscv_print_one_register_info): Handle union of floats same as float.
2008         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2009         riscv_fpreg_q_type fields.
2010
2011 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2012
2013         * gdbarch.sh (gdbarch_num_cooked_regs): New.
2014         * gdbarch.h: Re-generate.
2015         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2016         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2017         * eval.c (evaluate_subexp_standard): Likewise.
2018         * findvar.c (value_of_register): Likewise.
2019         (value_of_register_lazy): Likewise.
2020         (address_from_register): Likewise.
2021         * frame.c (get_frame_register_bytes): Likewise.
2022         * gdbarch-selftests.c (register_to_value_test): Likewise.
2023         * h8300-tdep.c (h8300_register_type): Likewise.
2024         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2025         (i386_svr4_reg_to_regnum): Likewise.
2026         * infcmd.c (default_print_registers_info): Likewise.
2027         (registers_info): Likewise.
2028         (print_vector_info): Likewise.
2029         (default_print_float_info): Likewise.
2030         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2031         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2032         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2033         (mi_cmd_data_list_changed_registers): Likewise.
2034         (mi_cmd_data_list_register_values): Likewise.
2035         (mi_cmd_data_write_register_values): Likewise.
2036         (mi_cmd_trace_frame_collected): Likewise.
2037         * mips-tdep.c (print_gp_register_row): Likewise.
2038         (mips_print_registers_info): Likewise.
2039         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2040         * regcache.c (init_regcache_descr): Likewise.
2041         (register_size): Likewise.
2042         (register_dump::dump): Likewise.
2043         (cooked_read_test): Likewise.
2044         (cooked_write_test): Likewise.
2045         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2046         (rs6000_gdbarch_init): Likewise.
2047         * stabsread.c (stab_reg_to_regnum): Likewise.
2048         * stack.c (info_frame_command): Likewise.
2049         * target-descriptions.c (tdesc_register_name): Likewise.
2050         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2051         * tui/tui-regs.c (tui_show_register_group): Likewise.
2052         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2053         (user_reg_map_regnum_to_name): Likewise.
2054         (value_of_user_reg): Likewise.
2055         (maintenance_print_user_registers): Likewise.
2056         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2057         (xtensa_register_name): Likewise.
2058         (xtensa_register_type): Likewise.
2059         (xtensa_reg_to_regnum): Likewise.
2060         (xtensa_pseudo_register_read): Likewise.
2061         (xtensa_pseudo_register_write): Likewise.
2062
2063 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2064
2065         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2066         correctly-sized buffer with raw_read.
2067         (amd64_pseudo_register_write): Use correctly-sized buffer for
2068         raw_read/raw_write.
2069
2070 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2071
2072         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2073         in add_prefix_cmd of set print type.
2074
2075 2018-10-19  Tom Tromey  <tom@tromey.com>
2076
2077         PR tui/18388:
2078         * NEWS: Mention tabset deprecation.
2079         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2080         (update_tab_width): New function.
2081         (tui_set_tab_width, tui_show_tab_width): New functions.
2082         (tui_set_tab_width_command): Use update_tab_width.
2083         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
2084         Add new "set tui tab-width" command.
2085         * tui/tui-source.c (tui_set_source_content): Update.
2086         * tui/tui-disasm.c (tui_set_disassem_content): Update.
2087         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2088         Don't declare.
2089         (tui_tab_width): Declare.
2090         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2091         (tui_set_default_tab_len): Remove.
2092
2093 2018-10-19  Tom Tromey  <tom@tromey.com>
2094
2095         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2096         (key_is_backspace, tui_getc): Don't declare.
2097         * tui/tui-io.c (key_is_start_sequence): Now static.
2098         (key_is_end_sequence, key_is_backspace): Remove.
2099         (tui_getc): Now static.
2100
2101 2018-10-19  Tom Tromey  <tom@tromey.com>
2102
2103         * symfile.c (reread_symbols): Clear "static_links".
2104
2105 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
2106
2107         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2108         define.
2109         (aarch64_linux_sigframe_init): Extra boundary checks.
2110
2111 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
2112
2113         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2114         the possibly non-existent tdesc type 'vec128', but the type of raw
2115         register v16 instead.
2116
2117 2018-10-19  Gary Benson <gbenson@redhat.com>
2118
2119         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2120
2121 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
2122
2123         PR cli/23785
2124         * cli/cli-dump.c (restore_binary_file): Check if "file" is
2125         NULL.
2126
2127 2018-10-17  Paul Koning  <paul_koning@dell.com>
2128
2129         * charset.c (convert_between_encodings): Fix unsigned overflow.
2130
2131 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
2132
2133         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2134         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2135         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2136         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2137         New functions.
2138         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2139         and fbsd_info_proc_mappings_header.
2140         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2141         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2142         New.
2143
2144 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
2145
2146         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2147         Solaris Maintainer.
2148
2149 2018-10-15  Tom Tromey  <tom@tromey.com>
2150
2151         * tui/tui.c (strcat_to_buf): Remove casts.
2152         * tui/tui-winsource.c (tui_show_source_line)
2153         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2154         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2155         * tui/tui-windata.c (tui_first_data_item_displayed)
2156         (tui_delete_data_content_windows, tui_erase_data_content)
2157         (tui_display_all_data, tui_display_data_from)
2158         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2159         * tui/tui-win.c (tui_set_win_height)
2160         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2161         casts.
2162         * tui/tui-win.c (tui_resize_all): Remove casts.
2163         (tui_scroll_backward_command, tui_set_focus)
2164         (tui_set_tab_width_command): Likewise.
2165         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2166         * tui/tui-regs.c (tui_show_register_group): Remove cast.
2167         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2168         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2169         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2170         Remove casts.
2171
2172 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2173
2174         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2175         AArch64/ARM maintainer.
2176
2177 2018-10-11  Gary Benson <gbenson@redhat.com>
2178
2179         * interps.h (interp::m_name): Make private and mutable.
2180         * interps.c (interp::~interp): Free m_name.
2181
2182 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2183             Simon Marchi <simark@simark.ca>
2184
2185         * README (`configure' options): Add documentation for new
2186         "--enable-unit-tests" option.
2187         * acinclude.m4: Include "selftest.m4".
2188         * configure: Regenerate.
2189         * configure.ac: Use "GDB_AC_SELFTEST".
2190         * maint.c (maintenance_selftest): Update message informing
2191         that selftests have been disabled.
2192         (maintenance_info_selftests): Likewise.
2193         * selftest.m4: New file.
2194
2195 2018-10-10  Gary Benson <gbenson@redhat.com>
2196
2197         * remote.c (remote_target::remote_send_printf): Add
2198         missing va_end found by Coverity.
2199
2200 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
2201
2202         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2203
2204 2018-10-09  Tom Tromey  <tom@tromey.com>
2205
2206         * configure: Rebuild.
2207         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2208         * NEWS: Update --enable-ubsan documentation.
2209
2210 2018-10-09  Gary Benson <gbenson@redhat.com>
2211
2212         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2213         found by Coverity.
2214
2215 2018-10-08  Tom Tromey  <tom@tromey.com>
2216
2217         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2218         variable.
2219         (riscv_fbsd_init_abi): Likewise.
2220
2221 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2222         * valops.c (value_struct_elt_for_reference): Rename local variable
2223         to work around the shadowing a previous local warning.
2224
2225 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2226
2227         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2228         * NEWS: Mention new FreeBSD/riscv native configuration.
2229         * configure.host: Add riscv*-*-freebsd*.
2230         * configure.nat: Likewise.
2231         * riscv-fbsd-nat.c: New file.
2232
2233 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2234
2235         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2236         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2237         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2238         * NEWS: Mention new FreeBSD/riscv target.
2239         * configure.tgt: Add riscv*-*-freebsd*.
2240         * riscv-fbsd-tdep.c: New file.
2241         * riscv-fbsd-tdep.h: New file.
2242
2243 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2244
2245         * regcache.h (struct regcache_map_entry): Note that this type can
2246         be used with traditional frame caches.
2247         * trad-frame.c (trad_frame_set_reg_regmap): New.
2248         * trad-frame.h (trad_frame_set_reg_regmap): New.
2249
2250 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2251
2252         PR c++/16841
2253         * valops.c (get_virtual_base_offset): New function.
2254         (value_struct_elt_for_reference): Use it to get virtual base offset
2255         and add it in calculating class member address.
2256
2257 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
2258
2259         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2260         (check_producer): Check if the producer is codewarrior.
2261         (producer_is_codewarrior): New function.
2262         (lnp_state_machine::record_line): Ignore is_stmt flag for records
2263         produced by codewarrior.
2264         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2265
2266 2018-10-06  Tom Tromey  <tom@tromey.com>
2267
2268         PR python/19399:
2269         * python/py-inferior.c: Add "architecture" entry.
2270         (infpy_architecture): New function.
2271
2272 2018-10-06  Tom Tromey  <tom@tromey.com>
2273
2274         PR python/21765:
2275         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2276         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2277         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
2278         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2279
2280 2018-10-06  Tom Tromey  <tom@tromey.com>
2281
2282         PR build/17077:
2283         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2284         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2285         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2286         #include.
2287
2288 2018-10-06  Tom Tromey  <tom@tromey.com>
2289
2290         * python/py-breakpoint.c (bppy_get_location): Handle a
2291         bp_breakpoint without a location.
2292
2293 2018-10-06  Tom Tromey  <tom@tromey.com>
2294
2295         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2296         (_RegEx): Reformat help text.
2297         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2298         (AnyCallerIs, AnyCallerMatches): Reformat help text.
2299         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2300         text.
2301         * python/lib/gdb/command/xmethods.py (InfoXMethod)
2302         (EnableXMethod, DisableXMethod): Remove help indentation.
2303         Capitalize meta-syntactic variables.
2304         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2305         (EnableUnwinder, DisableUnwinder): Remove help indentation.
2306         Capitalize meta-syntactic variables.
2307         * python/lib/gdb/command/explore.py (ExploreCommand)
2308         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2309         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2310         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2311         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2312         Remove help indentation.
2313         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2314         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2315         (DisableFrameFilter, SetFrameFilterPriority)
2316         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2317
2318 2018-10-06  Tom Tromey  <tom@tromey.com>
2319
2320         PR tui/28819:
2321         * tui/tui-io.c (gdb_wgetch): New function.
2322         (tui_mld_getc, tui_getc): Use it.
2323
2324 2018-10-05  Tom Tromey  <tom@tromey.com>
2325
2326         * sol-thread.c (sol_thread_target::wait): Rename inner
2327         "save_ptid".
2328
2329 2018-10-04  Tom Tromey  <tom@tromey.com>
2330
2331         * configure: Rebuild.
2332         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2333
2334 2018-10-04  Tom Tromey  <tom@tromey.com>
2335
2336         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2337         declaration of "block".
2338
2339 2018-10-04  Tom Tromey  <tom@tromey.com>
2340
2341         * common/filestuff.c (fdwalk): Remove inner declaration of
2342         "result".
2343
2344 2018-10-04  Tom Tromey  <tom@tromey.com>
2345
2346         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2347         "structs_addr" and hoist declaration.
2348
2349 2018-10-04  Tom Tromey  <tom@tromey.com>
2350
2351         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2352         variable "size".
2353
2354 2018-10-04  Tom Tromey  <tom@tromey.com>
2355
2356         * mdebugread.c (parse_partial_symbols): Use std::string.
2357
2358 2018-10-04  Tom Tromey  <tom@tromey.com>
2359
2360         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2361         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2362         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2363         header.
2364         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2365         more inner scope.
2366         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2367         * varobj.c (varobj_update): Rename inner "newobj",
2368         "type_changed".
2369         * valprint.c (generic_emit_char): Rename inner "buf".
2370         * valops.c (find_overload_match): Rename inner "temp".
2371         (value_struct_elt_for_reference): Declare "v" in more inner
2372         scope.
2373         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2374         * unittests/array-view-selftests.c (run_tests): Rename inner
2375         "vec".
2376         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2377         header.
2378         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2379         "tsv" in more inner scope.
2380         (print_one_static_tracepoint_marker): Rename inner
2381         "tuple_emitter".
2382         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2383         (tic6x_push_dummy_call): Don't redeclare "addr".
2384         * target-float.c: Declare "dto" lower.
2385         * symtab.c (lookup_local_symbol): Rename inner "sym".
2386         (find_pc_sect_line): Rename inner "pc".
2387         * stack.c (print_frame): Don't redeclare "gdbarch".
2388         (return_command): Rename inner "gdbarch".
2389         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2390         "sp".
2391         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2392         header.
2393         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2394         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2395         scope.
2396         * remote.c (remote_target::update_thread_list): Don't redeclare
2397         "tp".
2398         (remote_target::process_initial_stop_replies): Rename inner
2399         "thread".
2400         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2401         (remote_target::wait_as): Don't redeclare "stop_reply".
2402         (remote_target::get_thread_local_address): Rename inner
2403         "result".
2404         (remote_target::get_tib_address): Likewise.
2405
2406         * regcache.c (cooked_read_test): Rename "regnum".
2407         * record-btrace.c (cmd_record_btrace_start): Rename inner
2408         "exception".
2409         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2410         loop header.
2411         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2412         header.
2413         (ppu2spu_sniffer): Rename inner "buf".
2414         * parse.c (operator_check_standard): Rename inner "type",
2415         "objfile".
2416         * p-valprint.c (pascal_val_print): Introduce new scope for
2417         "low_bound", "high_bound".
2418         * p-exp.y (yylex): Declare "i" in loop header.
2419         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2420         Lower declaration of "s".
2421         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2422         header.
2423         (nios2_push_dummy_call): Rename "len".
2424         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2425         "buf".
2426         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2427         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2428         (linux_xfer_osdata_modules): Likewise.
2429         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2430         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2431         (mips_o64_push_dummy_call): Likewise.
2432         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2433         "op".
2434         * mi/mi-main.c (list_available_thread_groups): Rename inner
2435         "tuple_emitter".
2436         (mi_cmd_data_read_memory): Rename inner "opts".
2437         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2438         "tuple_emitter".
2439         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2440         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2441         more inner scope.
2442         (parse_partial_symbols): Rename inner "pst", "p", "name"
2443         * main.c (captured_main_1): Rename inner "i"s.
2444         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2445         "oso2".
2446         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2447         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2448         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2449         (handle_signal_stop): Rename inner "gdbarch".
2450         (handle_command): Declare "signum" in loop header.
2451         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2452         "status".
2453         (examine_prologue): Rename inner "sol" and "sof".
2454         (ia64_extract_return_value): Rename inner "val".  Declare another
2455         "val" in a more inner scope.
2456         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2457         inner scope.
2458         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2459         "except".
2460         * findvar.c (default_read_var_value): Don't redeclare "addr".
2461         * f-exp.y (yylex): Declare "i" in loop header.
2462         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2463         Rename inner "type", "expect_type".
2464         (evaluate_subexp_for_sizeof): Rename inner "pc".
2465         * elfread.c (elf_symfile_read): Rename inner "abfd".
2466         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2467         "bytes_read".
2468         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2469         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2470         (dwarf_decode_line_header): Rename inner "lh".
2471         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2472         "offset".  Declare "i" in loop header.
2473         (disassemble_dwarf_expression): Rename inner "addr_size".
2474         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2475         inner "result".
2476         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2477         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2478         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2479         "inner_list_emitter".
2480         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2481         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2482         declaration in a block.
2483         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2484         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2485         "obstack_final_size".
2486         * cp-support.c (inspect_type): Declare "i" in loop header.
2487         * compile/compile.c (compile_instance::insert_symbol_error):
2488         Rename inner "e".
2489         * common/agent.c (agent_run_command): Remove inner "ret"
2490         declaration.
2491         * coffread.c (coff_symfile_read): Rename inner "name".
2492         (coff_symfile_read): Rename inner "abfd".
2493         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2494         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2495         "high".
2496         * c-exp.y (lex_one_token): Move "len" declaration lower.
2497         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2498         "gdbarch".
2499         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2500         "b".
2501         (watch_command_1): Declare "mark" later.
2502         (clear_command): Don't shadow "a" or "b".
2503         (delete_command): Rename inner "b".
2504         (delete_trace_command): Likewise.
2505         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2506         "op".
2507         (arm_gdbarch_init): Remove inner "e_flags".
2508         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2509         "offset" in inner blocks.
2510
2511 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2512
2513         * dwarf-index-write.c (file_write): Don't write if the vector is
2514         empty.
2515
2516 2018-10-05  Tom de Vries  <tdevries@suse.de>
2517
2518         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2519         PyArg_ParseTuple call.
2520
2521 2018-10-05  Tom de Vries  <tdevries@suse.de>
2522
2523         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2524         PyArg_ParseTuple call.
2525
2526 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2527
2528         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2529         to avoid exceeding 80 characters per line limit.
2530
2531 2018-10-04  Tom Tromey  <tom@tromey.com>
2532
2533         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2534         (reread_symbols): Update.
2535         * complaints.h (clear_complaints): Remove argument.
2536         * complaints.c (enum complaint_series): Remove.
2537         (series): Remove global.
2538         (complaint_internal): Update.
2539         (clear_complaints): Remove argument.
2540
2541 2018-10-04  Tom Tromey  <tom@tromey.com>
2542
2543         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2544         debugging symbols" message if there is a separate debug objfile.
2545
2546 2018-10-04  Tom Tromey  <tom@tromey.com>
2547
2548         PR cli/19551:
2549         * symfile.c (symbol_file_add_with_addrs): Update output.
2550         * psymtab.c (require_partial_symbols): Update output.
2551
2552 2018-10-04  Tom Tromey  <tom@tromey.com>
2553
2554         PR cli/22234:
2555         * complaints.c: Emit \n.
2556
2557 2018-10-04  Tom Tromey  <tom@tromey.com>
2558
2559         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2560         (separate_debug_file_exists, find_separate_debug_file)
2561         (add_symbol_file_command, reread_symbols, allocate_symtab)
2562         (allocate_compunit_symtab): Use filtered printing, not
2563         unfiltered.
2564         * psymtab.c (require_partial_symbols, dump_psymtab)
2565         (allocate_psymtab): Use filtered printing, not unfiltered.
2566
2567 2018-10-04  Tom Tromey  <tom@tromey.com>
2568
2569         * complaints.c (complaint_internal): Correctly check complaint
2570         count.
2571
2572 2018-10-04  Tom Tromey  <tom@tromey.com>
2573
2574         * complaints.h (struct complaints): Remove declaration.
2575         * complaints.c (clear_complaints): Remove an unused variable.
2576
2577 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2578
2579         * MAINTAINERS (Write After Approval): Add self.
2580
2581 2018-10-03  Tom Tromey  <tom@tromey.com>
2582
2583         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2584         "buffer_contents".
2585         * coffread.c (coff_symtab_read): Initialize "newobj".
2586
2587 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2588
2589         * dwarf2read.c (read_func_scope): Remove struct keyword in
2590         range-based for.
2591
2592 2018-10-03  Tom Tromey  <tom@tromey.com>
2593
2594         * README: Mention --enable-ubsan.
2595         * NEWS: Mention --enable-ubsan.
2596         * acinclude.m4: Include sanitize.m4.
2597         * configure: Rebuild.
2598         * configure.ac: Call AM_GDB_UBSAN.
2599         * sanitize.m4: New file.
2600
2601 2018-10-03  Tom Tromey  <tom@tromey.com>
2602
2603         * expression.h (enum exp_opcode): Use uint8_t as base type.
2604         * expprint.c (op_name): Handle invalid opcodes.
2605
2606 2018-10-03  Tom Tromey  <tom@tromey.com>
2607
2608         * parse.c (prefixify_expression): Add assert.
2609         (parse_exp_in_context_1): Throw exception if the expression is
2610         empty.
2611
2612 2018-10-03  Tom Tromey  <tom@tromey.com>
2613
2614         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2615
2616 2018-10-03  Tom Tromey  <tom@tromey.com>
2617
2618         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2619
2620 2018-10-03  Tom Tromey  <tom@tromey.com>
2621
2622         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2623         unsigned.
2624
2625 2018-10-03  Tom Tromey  <tom@tromey.com>
2626
2627         * findvar.c (extract_integer): Do work in an unsigned type.
2628
2629 2018-10-03  Tom Tromey  <tom@tromey.com>
2630
2631         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2632         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2633         base type.
2634         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2635         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2636         type.
2637         * c-lang.h (enum c_string_type_values): Use unsigned as base
2638         type.
2639         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2640
2641 2018-10-03  Tom Tromey  <tom@tromey.com>
2642
2643         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2644         <~dwarf2_frame_state_reg_info>: Update.
2645         <dwarf2_frame_state_reg_info>: Update.
2646         <alloc_regs>: Add assertion.  Update.
2647         <reg>: Now a std::vector.
2648         <num_regs>: Remove.
2649         <swap>: Update.
2650         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2651         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2652
2653 2018-10-03  Tom Tromey  <tom@tromey.com>
2654
2655         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2656
2657 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2658
2659         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2660
2661 2018-10-02  Tom Tromey  <tom@tromey.com>
2662
2663         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2664
2665 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2666
2667         * NEWS: Mention changed commands.
2668         * ser-uds.c: New file.
2669         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2670         * configure: Regenerate.
2671         * Makefile.in: Add new file.
2672         * serial.c (serial_open): Check if filename is a socket
2673         and lookup the appropriate interface accordingly.
2674
2675 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2676
2677         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2678         define.
2679         (AARCH64_EXTRA_MAGIC): Likewise.
2680         (AARCH64_FPSIMD_MAGIC): Likewise.
2681         (AARCH64_SVE_MAGIC): Likewise.
2682         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2683         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2684         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2685         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2686         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2687         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2688         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2689         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2690         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2691         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2692         (read_aarch64_ctx): Add function.
2693         (aarch64_linux_sigframe_init): Detect FP registers.
2694
2695 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2696
2697         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2698         (AARCH64_D0_REGNUM): Likewise.
2699         (AARCH64_S0_REGNUM): Likewise.
2700         (AARCH64_H0_REGNUM): Likewise.
2701         (AARCH64_B0_REGNUM): Likewise.
2702         (AARCH64_SVE_V0_REGNUM): Likewise.
2703         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from 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
2710 2018-10-01  Gary Benson <gbenson@redhat.com>
2711
2712         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2713         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2714         prfpregset_t instead of gdb_prfpregset_t.
2715         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2716         * configure, config.in: Rebuild.
2717
2718 2018-10-01  Gary Benson <gbenson@redhat.com>
2719
2720         * common/gdb_proc_service.h: New file, factored out from...
2721         * gdb_proc_service.h: Moved common code to the above file.
2722         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2723
2724 2018-10-01  Gary Benson <gbenson@redhat.com>
2725
2726         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2727         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2728
2729 2018-10-01  Gary Benson <gbenson@redhat.com>
2730
2731         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2732         (AC_CHECK_HEADERS): Check for linux/elf.h.
2733         * configure, config.in: Rebuild.
2734         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2735         doesn't define elf_fpregset_t.
2736
2737 2018-10-01  Gary Benson <gbenson@redhat.com>
2738
2739         * gdb_proc_service.h: Whitespace change.
2740
2741 2018-10-01  Tom Tromey  <tom@tromey.com>
2742
2743         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2744         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2745         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2746
2747 2018-10-01  Tom Tromey  <tom@tromey.com>
2748
2749         * README: Minor change.
2750
2751 2018-09-30  Pedro Alves  <palves@redhat.com>
2752
2753         * darwin-nat-info.c (darwin_debug_regions_recurse)
2754         (info_mach_exceptions_command): Remove unused local variables.
2755         * darwin-nat.c (darwin_decode_notify_message)
2756         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2757         (darwin_stop_inferior, darwin_setup_exceptions)
2758         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2759         (darwin_nat_target::attach, darwin_nat_target::detach)
2760         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2761         local variables.
2762         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2763         variables.
2764
2765 2018-09-29  Tom Tromey  <tom@tromey.com>
2766
2767         * README: Remove some leftover text.
2768
2769 2018-09-29  Tom Tromey  <tom@tromey.com>
2770
2771         * PROBLEMS: Rewrite.
2772         * README: Update.
2773
2774 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2775
2776         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2777         case with explicit breakpoint kind.
2778         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2779         'additional_info' and related logic.
2780         (riscv_debug_breakpoints): New variable.
2781         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2782         instruction to determine the breakpoint kind.
2783         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2784         flag.  Update description of 'set/show riscv
2785         use-compressed-breakpoints' flag.
2786
2787 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2788
2789         (NEWS): Mention changes to frame related commands.
2790         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2791         (add_prefix_cmd_suppress_notification): New function.
2792         (add_com_suppress_notification): Call
2793         add_cmd_suppress_notification.
2794         * command.h (add_cmd_suppress_notification): Declare.
2795         (add_prefix_cmd_suppress_notification): Declare.
2796         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2797         (parse_frame_specification): Moved from stack.c, with
2798         simplification to handle a single argument.
2799         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2800         switch to the selected frame.  Add a header comment.
2801         * stack.c: Remove 'safe-ctype.h' include.
2802         (find_frame_for_function): Add declaration.
2803         (find_frame_for_address): New function.
2804         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2805         (frame_selection_by_function_completer): New function.
2806         (info_frame_command): Rename to...
2807         (info_frame_command_core): ...this, and update parameter types.
2808         (select_frame_command): Rename to...
2809         (select_frame_command_core): ...this, and update parameter types.
2810         (frame_command): Rename to...
2811         (frame_command_core): ...this, and update parameter types.
2812         (class frame_command_helper): New class to wrap implementations of
2813         frame related sub-commands.
2814         (frame_apply_cmd_list): New static global.
2815         (frame_cmd_list): Make static.
2816         (select_frame_cmd_list): New global for sub-commands.
2817         (info_frame_cmd_list): New global for sub-commands.
2818         (_initialize_stack): Register sub-commands for 'frame',
2819         'select-frame', and 'info frame'.  Update 'frame apply' commands
2820         to use frame_apply_cmd_list.  Move function local static
2821         frame_apply_list to file static frame_apply_cmd_list for
2822         consistency.
2823         * stack.h (select_frame_command): Delete declarationn.
2824         (select_frame_for_mi): Declare new function.
2825
2826 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2827
2828         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2829         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2830         and NOP.
2831
2832 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2833
2834         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2835
2836 2018-09-26  Tom Tromey  <tom@tromey.com>
2837
2838         * valops.c (auto_abandon): Remove dead code.
2839
2840 2018-09-26  Tom Tromey  <tom@tromey.com>
2841
2842         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2843
2844 2018-09-24  Tom Tromey  <tom@tromey.com>
2845
2846         * common/pathstuff.c (get_standard_cache_dir): Make
2847         "xdg_cache_home" and "home" const.
2848         * top.c (init_history): Make "tmpenv" const.
2849         * main.c (get_init_files): Make "homedir" const.
2850
2851 2018-09-23  Tom Tromey  <tom@tromey.com>
2852
2853         PR python/18852:
2854         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2855
2856 2018-09-23  Tom Tromey  <tom@tromey.com>
2857
2858         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2859         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2860         * python/python-internal.h (gdbpy_handle_exception): Declare.
2861         * python/py-utils.c (gdbpy_handle_exception): New function.
2862
2863 2018-09-23  Tom Tromey  <tom@tromey.com>
2864
2865         PR python/17284:
2866         * python/py-type.c (typy_template_argument): Check for negative
2867         argument number.
2868
2869 2018-09-23  Tom Tromey  <tom@tromey.com>
2870
2871         PR python/14062:
2872         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2873
2874 2018-09-23  Tom Tromey  <tom@tromey.com>
2875
2876         PR python/18170:
2877         * python/py-value.c (valpy_int): Allow conversion from pointer
2878         type.
2879
2880 2018-09-23  Tom Tromey  <tom@tromey.com>
2881
2882         PR python/20126:
2883         * python/py-value.c (valpy_int): Respect type sign.
2884
2885 2018-09-23  Tom Tromey  <tom@tromey.com>
2886
2887         PR python/18352;
2888         * python/py-value.c (valpy_float): Allow conversions from int or
2889         char.
2890         (valpy_int, valpy_long): Allow conversions from float.
2891
2892 2018-09-23  Tom Tromey  <tom@tromey.com>
2893
2894         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2895         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2896
2897 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2898
2899         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2900         __sighndlr.
2901         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2902
2903 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2904
2905         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2906         target_terminal::ours().
2907
2908 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2909
2910         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2911         of vl to ULONGEST.
2912
2913 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2914
2915         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2916         redundant condition.
2917
2918 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2919
2920         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2921
2922         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2923         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2924         * sol-thread.c (ps_pdmodel): Don't guard definition.
2925
2926         * procfs.c: Fix formatting.
2927
2928         * procfs.c (sysset_t_alloc): Remove.
2929         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2930         (procfs_debug_inferior): Likewise.
2931         (procfs_set_exec_trap): Likewise.
2932         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2933         (proc_set_traced_sysexit): Likewise.
2934
2935         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2936         (dead_procinfo): Likewise.
2937         (proc_warn): Likewise.
2938         (proc_error): Likewise.
2939         (proc_get_LDT_entry): Likewise.
2940         (do_attach): Likewise.
2941         (procfs_target::pid_to_str): Likewise.
2942         (iterate_over_mappings): Likewise.
2943
2944         * procfs.c (create_procinfo): Fix ARI warning.
2945         (proc_get_status): Likewise.
2946         (proc_stop_process): Likewise.
2947         (proc_run_process): Likewise.
2948         (proc_kill): Likewise.
2949         (proc_get_LDT_entry): Likewise.
2950         (procfs_find_LDT_entry): Likewise.
2951         (proc_update_threads): Likewise.
2952         (proc_iterate_over_threads): Likewise.
2953         (do_attach): Likewise.
2954         (procfs_xfer_memory): Likewise.
2955         (invalidate_cache): Likewise.
2956         (procfs_target::resume): Likewise.
2957         (procfs_init_inferior): Likewise.
2958         (procfs_set_exec_trap): Likewise.
2959         (procfs_target::thread_alive): Likewise.
2960         (procfs_target::pid_to_exec_file): Likewise.
2961         (iterate_over_mappings): Likewise.
2962         (procfs_target::make_corefile_notes): Likewise.
2963         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2964
2965         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2966         (procfs_find_LDT_entry): Likewise.
2967         * sol-thread.c (ps_lgetLDT): Likewise.
2968
2969 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2970
2971         PR tdep/17903
2972         * procfs.c (procfs_target): Declare pid_to_exec_file.
2973         (procfs_target::pid_to_exec_file): New.
2974
2975 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2976
2977         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2978         renaming.
2979         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2980         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2981
2982 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2983
2984         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2985         (supply_fpregset, fill_fpregset): Move ...
2986         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2987         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2988         Remove references to ioctl-based procfs.
2989         Include <sys/reg.h>.
2990         Remove PR_MODEL_NATIVE guards.
2991         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2992         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2993
2994 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2995
2996         PR gdb/20981:
2997         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2998         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2999         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3000
3001 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
3002
3003         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3004         (fbsd_print_sockaddr_in6): Likewise.
3005
3006 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
3007             Chris January  <chris.january@arm.com>
3008
3009         * eval.c (skip_undetermined_arglist): Skip argument list helper.
3010         (evaluate_subexp_standard): Return a dummy type when
3011         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3012         OP_F77_UNDETERMINED_ARGLIST case.
3013         * expression.h (enum noside): Update comment.
3014
3015 2018-09-19  George Vasick <george.vasick@oracle.com>
3016
3017         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3018
3019 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
3020             April Chin <april.chin@oracle.com>
3021             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3022
3023         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3024         uint_t lwpid_t.
3025         (create_procinfo): Print pids in /proc without leading zeros.
3026
3027 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
3028
3029         * nios2-tdep.c (nios2_gcc_target_options): New.
3030         (nios2_gdb_arch_init): Install new hook.
3031
3032 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3033
3034         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3035         New file.
3036         * update-gnulib.sh: Apply patch.
3037         * configure: Re-generate.
3038
3039 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3040
3041         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3042         description.  Make "info proc" command descriptions more
3043         consistent.
3044
3045 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3046
3047         * NEWS: Mention 'info proc files' command.
3048
3049 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3050
3051         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3052         descriptors for IP_FILES and IP_ALL.
3053
3054 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3055
3056         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3057         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3058         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3059         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3060         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3061         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3062         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3063         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3064         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3065         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3066         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3067         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3068         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3069         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3070         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3071         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3072         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3073         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3074         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3075         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3076         (struct fbsd_sockaddr_un): New types.
3077         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3078         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3079         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3080         (fbsd_core_info_proc_files): New functions.
3081         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3082         IP_ALL.
3083         * fbsd-tdep.h (fbsd_info_proc_files_header)
3084         (fbsd_info_proc_files_entry): New.
3085
3086 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3087
3088         * defs.h (enum info_proc_what) [IP_FILES]: New value.
3089         * infcmd.c (info_proc_cmd_files): New function.
3090         (_initialize_infcmd): Register 'info proc files' command.
3091
3092 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3093
3094         * gnulib/aclocal-m4-deps.mk: Re-generate.
3095         * gnulib/aclocal.m4: Re-generate.
3096         * gnulib/config.in: Re-generate.
3097         * gnulib/configure: Re-generate.
3098         * gnulib/import/Makefile.am: Re-generate.
3099         * gnulib/import/Makefile.in: Re-generate.
3100         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3101         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3102         * gnulib/import/arpa_inet.in.h: New file.
3103         * gnulib/import/inet_ntop.c: New file.
3104         * gnulib/import/m4/arpa_inet_h.m4: New file.
3105         * gnulib/import/m4/inet_ntop.m4: New file.
3106         * gnulib/import/m4/netinet_in_h.m4: New file.
3107         * gnulib/import/m4/socklen.m4: New file.
3108         * gnulib/import/m4/sockpfaf.m4: New file.
3109         * gnulib/import/m4/stdalign.m4: New file.
3110         * gnulib/import/m4/sys_uio_h.m4: New file.
3111         * gnulib/import/netinet_in.in.h: New file.
3112         * gnulib/import/stdalign.in.h: New file.
3113         * gnulib/import/sys_socket.c: New file.
3114         * gnulib/import/sys_socket.in.h: New file.
3115         * gnulib/import/sys_uio.in.h: New file.
3116         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3117         module.
3118
3119 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3120
3121         * gnulib/aclocal-m4-deps.mk: New file.
3122         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3123         deterministically.
3124
3125 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3126
3127         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3128         KVE_PATH.
3129
3130 2018-09-18  Tom Tromey  <tom@tromey.com>
3131
3132         * compile/compile-object-load.c (struct
3133         link_hash_table_cleanup_data): Add constructor and destructor.
3134         Use DISABLE_COPY_AND_ASSIGN.
3135         (~link_hash_table_cleanup_data): Rename from
3136         link_hash_table_free.  Now a destructor.
3137         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
3138
3139 2018-09-18  Tom Tromey  <tom@tromey.com>
3140
3141         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3142         * compile/compile-object-load.c (struct munmap_list): Move to
3143         header file.
3144         (munmap_list::add): Rename from munmap_list_add; rewrite.
3145         (munmap_list::~munmap_list): Rename from munmap_list_free.
3146         (munmap_listp_free_cleanup): Remove.
3147         (compile_object_load): Update.
3148         * compile/compile-object-load.h (struct munmap_list): Move from
3149         compile-object-load.c.  Rewrite.
3150
3151 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
3152
3153         * aarch64-tdep.c (pass_in_v): Use register size.
3154         (aarch64_extract_return_value): Likewise.
3155         (aarch64_store_return_value): Likewise.
3156
3157 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3158
3159         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3160         rlim_t.
3161
3162 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3163
3164         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3165         Fix short help line.
3166
3167 2018-09-17  Tom Tromey  <tom@tromey.com>
3168
3169         PR python/20445:
3170         * configure: Rebuild.
3171         * configure.ac: Conditionally use -DNDEBUG for Python.
3172
3173 2018-09-17  Tom Tromey  <tom@tromey.com>
3174
3175         * configure: Rebuild.
3176         * configure.ac: Use gmp as a library dependency when checking for
3177         mpfr.
3178
3179 2018-09-17  Pedro Alves  <palves@redhat.com>
3180
3181         * python/py-inferior.c (find_inferior_object): Delete.
3182
3183 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
3184
3185         * compile/compile-cplus-types.c
3186         (compile_cplus_instance::enter_scope): Don't use new_scope after
3187         std::move.
3188
3189 2018-09-17  Tom Tromey  <tom@tromey.com>
3190
3191         * common/pathstuff.c (get_standard_cache_dir): Use
3192         ~/Library/Caches on macOS.
3193         * common/pathstuff.h (get_standard_cache_dir): Update comment.
3194
3195 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
3196
3197         PR python/23669
3198         * breakpoint.c (commands_cmd_element): New.
3199         (_initialize_breakpoint): Assign commands_cmd_element.
3200         * breakpoint.h (commands_cmd_element): New.
3201         * cli/cli-script.c (while_cmd_element, if_command,
3202         define_cmd_element): New.
3203         (command_name_equals): Remove.
3204         (process_next_line): Compare commands by pointer, not by name.
3205         (_initialize_cli_script): Assign the various cmd_list_element
3206         variables.
3207         * compile/compile.c (compile_cmd_element): New.
3208         (_initialize_compile): Assign compile_cmd_element.
3209         * compile/compile.h (compile_cmd_element): New.
3210         * guile/guile.c (guile_cmd_element): New.
3211         (install_gdb_commands): Assign guile_cmd_element.
3212         * guile/guile.h (guile_cmd_element): New.
3213         * python/python.c (python_cmd_element): New.
3214         (_initialize_python): Assign python_cmd_element.
3215         * python/python.h (python_cmd_element): New.
3216         * tracepoint.c (while_stepping_cmd_element): New.
3217         (_initialize_tracepoint): Assign while_stepping_cmd_element.
3218         * tracepoint.h (while_stepping_cmd_element): New.
3219
3220 2018-09-17  Tom Tromey  <tom@tromey.com>
3221
3222         * infrun.c (save_infcall_suspend_state): Return
3223         infcall_suspend_state_up.
3224         (save_infcall_control_state): Return infcall_control_state_up.
3225         * inferior.h (save_infcall_suspend_state)
3226         (save_infcall_control_state): Declare later.  Return unique
3227         pointers.
3228
3229 2018-09-17  Tom Tromey  <tom@tromey.com>
3230
3231         * infrun.c (struct stop_context): Declare constructor,
3232         destructor, "changed" method.
3233         (stop_context::stop_context): Rename from save_stop_context.
3234         (stop_context::~stop_context): Rename from
3235         release_stop_context_cleanup.
3236         (normal_stop): Update.
3237         (stop_context::changed): Rename from stop_context_changed.  Return
3238         bool.
3239
3240 2018-09-17  Tom Tromey  <tom@tromey.com>
3241
3242         * inferior.h (struct infcall_suspend_state_deleter): New.
3243         (infcall_suspend_state_up): New typedef.
3244         (struct infcall_control_state_deleter): New.
3245         (infcall_control_state_up): New typedef.
3246         (make_cleanup_restore_infcall_suspend_state)
3247         (make_cleanup_restore_infcall_control_state): Don't declare.
3248         * infcall.c (call_function_by_hand_dummy): Update.
3249         * infrun.c (do_restore_infcall_suspend_state_cleanup)
3250         (make_cleanup_restore_infcall_suspend_state): Remove.
3251         (do_restore_infcall_control_state_cleanup)
3252         (make_cleanup_restore_infcall_control_state): Remove.
3253
3254 2018-09-17  Tom Tromey  <tom@tromey.com>
3255
3256         * gdbthread.h (struct thread_control_state): Add initializer.
3257         (class thread_info) <control>: Remove initializer.
3258         * inferior.h (struct inferior_control_state): Add initializer.
3259         (class inferior) <control>: Remove initializer.
3260         (exit_inferior_1): Update.
3261         * infrun.c (struct infcall_control_state): Add constructors.
3262         (save_infcall_control_state): Use new.
3263         (restore_infcall_control_state, discard_infcall_control_state):
3264         Use delete.
3265
3266 2018-09-17  Tom Tromey  <tom@tromey.com>
3267
3268         * infrun.c (struct infcall_suspend_state) <registers>: Now a
3269         unique_ptr.
3270         <siginfo_data>: Now a unique_xmalloc_ptr.
3271         (save_infcall_suspend_state, restore_infcall_suspend_state)
3272         (discard_infcall_suspend_state)
3273         (get_infcall_suspend_state_regcache): Update.
3274
3275 2018-09-17  Tom Tromey  <tom@tromey.com>
3276
3277         * gdbthread.h (struct thread_suspend_state): Add initializers.
3278         (class thread_info) <suspend>: Remove initializer.
3279         * infrun.c (struct infcall_suspend_state): Add initializers.
3280         (save_infcall_suspend_state): Use new.
3281         (discard_infcall_suspend_state): Use delete.
3282
3283 2018-09-16  Tom Tromey  <tom@tromey.com>
3284
3285         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3286         Remove.
3287         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3288         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3289         (py_varobj_iter_new): Likewise.
3290         (py_varobj_get_iterator): Use gdbpy_ref.
3291
3292 2018-09-16  Tom Tromey  <tom@tromey.com>
3293
3294         * python/py-threadevent.c (py_get_event_thread): Simplify.
3295         * python/py-inferior.c (infpy_thread_from_thread_handle):
3296         Return immediately after calling thread_to_thread_object.  Use
3297         Py_RETURN_NONE.
3298         (thread_to_thread_object): Set the exception on a NULL return.
3299
3300 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
3301
3302         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3303
3304 2018-09-16  Tom Tromey  <tom@tromey.com>
3305
3306         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3307         Remove.
3308
3309 2018-09-16  Tom Tromey  <tom@tromey.com>
3310
3311         * python/python-internal.h (thread_to_thread_object): Change
3312         return type.
3313         * python/py-inferior.c (thread_to_thread_object): Return a new
3314         reference.
3315         (infpy_thread_from_thread_handle): Update.
3316         * python/py-infthread.c (gdbpy_selected_thread): Update.
3317         * python/py-stopevent.c (create_stop_event_object): Update.
3318         * python/py-threadevent.c (py_get_event_thread): Return a new
3319         reference.
3320         (py_get_event_thread): Update.
3321         * python/py-event.h (py_get_event_thread): Change return type.
3322         * python/py-continueevent.c (create_continue_event_object):
3323         Update.
3324
3325 2018-09-16  Tom Tromey  <tom@tromey.com>
3326
3327         * python/py-progspace.c (pspy_get_objfiles): Update.
3328         * python/python-internal.h (objfile_to_objfile_object): Change
3329         return type.
3330         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3331         Update.
3332         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3333         Update.
3334         * python/python.c (gdbpy_get_current_objfile): Update.
3335         (gdbpy_objfiles): Update.
3336         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3337         Update.
3338         (objfile_to_objfile_object): Return a new reference.
3339         * python/py-symtab.c (stpy_get_objfile): Update.
3340         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3341         Update.
3342
3343 2018-09-16  Tom Tromey  <tom@tromey.com>
3344
3345         * python/py-inferior.c (infpy_get_progspace): Update.
3346         * python/python-internal.h (pspace_to_pspace_object): Change
3347         return type.
3348         * python/py-newobjfileevent.c
3349         (create_clear_objfiles_event_object): Update.
3350         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3351         Update.
3352         * python/python.c (gdbpy_get_current_progspace): Update.
3353         (gdbpy_progspaces): Update.
3354         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3355         reference.
3356         * python/py-objfile.c (objfpy_get_progspace): Update.
3357         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3358         Update.
3359
3360 2018-09-16  Tom Tromey  <tom@tromey.com>
3361
3362         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3363         (solib_name, block_for_pc, find_pc_line): New functions.
3364         (execute_unwinders): Update.
3365         * python/py-block.c (gdbpy_block_for_pc): Remove.
3366         * python/py-inferior.c (infpy_get_progspace): New function.
3367         (inferior_object_getset) <progspace>: Add.
3368         * python/py-progspace.c (pspy_objfiles): Rewrite.
3369         (pspy_solib_name, pspy_block_for_pc)
3370         (pspy_find_pc_line, pspy_is_valid): New functions.
3371         (progspace_object_methods): Add entries for solib_name,
3372         block_for_pc, find_pc_line, is_valid.
3373         * python/python-internal.h (gdbpy_block_for_pc)
3374         (build_objfiles_list): Don't declare.
3375         * python/python.c: Don't include solib.h.
3376         (gdbpy_solib_name, gdbpy_find_pc_line)
3377         (gdbpy_get_current_progspace, build_objfiles_list)
3378         (gdbpy_objfiles): Remove.
3379         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3380         solib_name, find_pc_line>: Remove entries.
3381
3382 2018-09-16  Tom Tromey  <tom@tromey.com>
3383
3384         * top.c (new_ui_command): Use GNU style for metasyntactic
3385         variables.
3386         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3387         variables.
3388         * maint.c (maintenance_translate_address): Remove "<>" around
3389         text.
3390         * interps.c (interpreter_exec_cmd): Use GNU style for
3391         metasyntactic variables.
3392         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3393         metasyntactic variables.
3394         * tracepoint.c (tfind_range_command): Use GNU style for
3395         metasyntactic variables.
3396         (tfind_outside_command): Likewise.
3397         (_initialize_tracepoint): Likewise.
3398         * remote.c (extended_remote_target::create_inferior): Use GNU
3399         style for metasyntactic variables.
3400         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3401         metasyntactic variables.
3402         (adi_assign_command): Likewise.
3403
3404 2018-09-16  Tom Tromey  <tom@tromey.com>
3405
3406         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3407         metasyntactic variables.  Print message if no disassembler options
3408         are available.
3409
3410 2018-09-15  Tom Tromey  <tom@tromey.com>
3411
3412         * infcmd.c (get_inferior_args): Return const char *.
3413         * inferior.h (get_inferior_args): Return type now const.
3414         * linux-tdep.c (linux_fill_prpsinfo): Update.
3415         * procfs.c (procfs_target::make_corefile_notes): Update.
3416
3417 2018-09-07  Tom Tromey  <tom@tromey.com>
3418
3419         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3420         inside the TRY.
3421
3422 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3423
3424         * nios2-tdep.c (nios2_type_align): New.
3425         (nios2_gdb_arch_init): Install type_align hook.
3426
3427 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3428
3429         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3430         type that is neither object file owned, nor gdbarch owned.
3431         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3432         gdbarch is non-NULL.
3433         (alloc_type_instance): Allocate non-objfile owned types on the
3434         gdbarch obstack.
3435         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3436         using TYPE_ALLOC to ensure memory is allocated on the correct
3437         obstack.
3438         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3439         obstack, or the gdbarch obstack.
3440         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3441
3442 2018-09-14  Tom Tromey  <tom@tromey.com>
3443
3444         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3445         block.
3446
3447 2018-09-14  Tom Tromey  <tom@tromey.com>
3448
3449         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3450
3451 2018-09-13  Tom Tromey  <tom@tromey.com>
3452
3453         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3454         static.
3455
3456 2018-09-13  Tom Tromey  <tom@tromey.com>
3457
3458         * exec.c (try_open_exec_file): Use std::string.
3459
3460 2018-09-13  Tom Tromey  <tom@tromey.com>
3461
3462         * utils.h (gdb_bfd_errmsg): Return std::string.
3463         * exec.c (exec_file_attach): Update.
3464         * compile/compile-object-load.c (compile_object_load): Update.
3465         * utils.c (gdb_bfd_errmsg): Return std::string.
3466
3467 2018-09-13  Tom Tromey  <tom@tromey.com>
3468
3469         * procfs.c (struct procinfo_deleter): New.
3470         (procinfo_up): New typedef.
3471         (do_destroy_procinfo_cleanup): Remove.
3472         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3473
3474 2018-09-13  Tom Tromey  <tom@tromey.com>
3475
3476         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3477
3478 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3479 2018-09-13  Tom Tromey  <tom@tromey.com>
3480
3481         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3482         (pspy_get_objfiles): New function.
3483         (progspace_object_methods): New.
3484         (pspace_object_type): Add tp_methods callback.
3485         * python/python-internal.h (build_objfiles_list): New
3486         declaration.
3487         * python/python.c (build_objfiles_list): New function.
3488         (gdbpy_objfiles): Implement using build_objfiles_list.
3489         * NEWS: Mention the Progspace.objfiles method.
3490
3491 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3492
3493         * python/py-inferior.c (infpy_get_progspace): New function.
3494         (inferior_object_getset): Add progspace property.
3495         * NEWS: Mention the new property.
3496
3497 2018-09-13  Tom Tromey  <tom@tromey.com>
3498
3499         PR rust/23650:
3500         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3501
3502 2018-09-13  Tom Tromey  <tom@tromey.com>
3503
3504         PR rust/23626:
3505         * rust-lang.c (rust_enum_variant): Now static.
3506         (rust_empty_enum_p): New function.
3507         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3508         Handle empty enum.
3509
3510 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3511
3512         * python/py-inferior.c (infpy_repr): New.
3513         (inferior_object_type): Register infpy_repr.
3514         * python/py-objfile.c (objfpy_repr): New.
3515         (objfile_object_type): Register objfpy_repr.
3516
3517 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3518
3519         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3520
3521 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3522
3523         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3524         typo.
3525
3526 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3527
3528         * common/common-utils.c: Don't include '<sys/stat.h>'.
3529         (is_regular_file): Move to...
3530         * common/filestuff.c (is_regular_file): ... here.
3531         * common/common-utils.h (is_regular_file): Move to...
3532         * common/filestuff.h (is_regular_file): ... here.
3533
3534 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3535
3536         * skip.c (debug_skip): New variable.
3537         (skiplist_entry::do_skip_file_p): Add debug output.
3538         (skiplist_entry::do_skip_gfile_p): Likewise.
3539         (skiplist_entry::skip_function_p): Likewise.
3540         (_initialize_step_skip): Create debug command.
3541         * NEWS: Mention set/show debug skip.
3542
3543 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3544
3545         * darwin-nat.c (should_disable_startup_with_shell):
3546         New function.
3547         (darwin_nat_target::create_inferior): Add call.
3548
3549 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3550
3551         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3552         inf_port, msg_state>: Initialize.
3553         (struct darwin_thread_info) <signaled, single_step>: Change
3554         type and initialize.
3555         (struct darwin_thread_info) <event>: Initialize.
3556
3557 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3558
3559         PR gdb/23555
3560         PR gdb/23558
3561         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3562         guesses.
3563
3564 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3565
3566         Revert:
3567         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3568
3569         PR gdb/23555
3570         PR gdb/23558
3571         * gnulib/aclocal.m4: Regenerate.
3572         * gnulib/config.in: Regenerate.
3573         * gnulib/configure: Regenerate.
3574         * gnulib/import/Makefile.am: Update.
3575         * gnulib/import/Makefile.in: Update.
3576         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3577         * gnulib/import/_Noreturn.h: ... this.
3578         * gnulib/import/alloca.in.h: Update.
3579         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3580         * gnulib/import/arg-nonnull.h: ... this.
3581         * gnulib/import/assure.h: Update.
3582         * gnulib/import/at-func.c: Update.
3583         * gnulib/import/basename-lgpl.c: Update.
3584         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3585         * gnulib/import/c++defs.h: ... this.
3586         * gnulib/import/canonicalize-lgpl.c: Update.
3587         * gnulib/import/cdefs.h: Update.
3588         * gnulib/import/chdir-long.c: Update.
3589         * gnulib/import/chdir-long.h: Update.
3590         * gnulib/import/cloexec.c: Update.
3591         * gnulib/import/cloexec.h: Update.
3592         * gnulib/import/close.c: Update.
3593         * gnulib/import/closedir.c: Update.
3594         * gnulib/import/config.charset: Update.
3595         * gnulib/import/dirent-private.h: Update.
3596         * gnulib/import/dirent.in.h: Update.
3597         * gnulib/import/dirfd.c: Update.
3598         * gnulib/import/dirname-lgpl.c: Update.
3599         * gnulib/import/dirname.h: Update.
3600         * gnulib/import/dosname.h: Update.
3601         * gnulib/import/dup-safer-flag.c: Update.
3602         * gnulib/import/dup-safer.c: Update.
3603         * gnulib/import/dup.c: Update.
3604         * gnulib/import/dup2.c: Update.
3605         * gnulib/import/errno.in.h: Update.
3606         * gnulib/import/error.c: Update.
3607         * gnulib/import/error.h: Update.
3608         * gnulib/import/exitfail.c: Update.
3609         * gnulib/import/exitfail.h: Update.
3610         * gnulib/import/extra/update-copyright: Update.
3611         * gnulib/import/fchdir.c: Update.
3612         * gnulib/import/fcntl.c: Update.
3613         * gnulib/import/fcntl.in.h: Update.
3614         * gnulib/import/fd-hook.c: Update.
3615         * gnulib/import/fd-hook.h: Update.
3616         * gnulib/import/fd-safer-flag.c: Update.
3617         * gnulib/import/fd-safer.c: Update.
3618         * gnulib/import/fdopendir.c: Update.
3619         * gnulib/import/filename.h: Update.
3620         * gnulib/import/filenamecat-lgpl.c: Update.
3621         * gnulib/import/filenamecat.h: Update.
3622         * gnulib/import/flexmember.h: Update.
3623         * gnulib/import/float+.h: Update.
3624         * gnulib/import/float.c: Update.
3625         * gnulib/import/float.in.h: Update.
3626         * gnulib/import/fnmatch.c: Update.
3627         * gnulib/import/fnmatch.in.h: Update.
3628         * gnulib/import/fnmatch_loop.c: Update.
3629         * gnulib/import/fpucw.h: Update.
3630         * gnulib/import/frexp.c: Update.
3631         * gnulib/import/frexpl.c: Update.
3632         * gnulib/import/fstat.c: Update.
3633         * gnulib/import/fstatat.c: Update.
3634         * gnulib/import/getcwd-lgpl.c: Update.
3635         * gnulib/import/getcwd.c: Update.
3636         * gnulib/import/getdtablesize.c: Update.
3637         * gnulib/import/getlogin_r.c: Update.
3638         * gnulib/import/getprogname.c: Update.
3639         * gnulib/import/getprogname.h: Update.
3640         * gnulib/import/gettext.h: Update.
3641         * gnulib/import/gettimeofday.c: Update.
3642         * gnulib/import/glob-libc.h: Update.
3643         * gnulib/import/glob.c: Update.
3644         * gnulib/import/glob.in.h: Update.
3645         * gnulib/import/glob_internal.h: Update.
3646         * gnulib/import/glob_pattern_p.c: Update.
3647         * gnulib/import/globfree.c: Update.
3648         * gnulib/import/hard-locale.c: Update.
3649         * gnulib/import/hard-locale.h: Update.
3650         * gnulib/import/intprops.h: Update.
3651         * gnulib/import/inttypes.in.h: Update.
3652         * gnulib/import/isnan.c: Update.
3653         * gnulib/import/isnand-nolibm.h: Update.
3654         * gnulib/import/isnand.c: Update.
3655         * gnulib/import/isnanl-nolibm.h: Update.
3656         * gnulib/import/isnanl.c: Update.
3657         * gnulib/import/itold.c: Update.
3658         * gnulib/import/libc-config.h: Update.
3659         * gnulib/import/limits.in.h: Update.
3660         * gnulib/import/localcharset.c: Update.
3661         * gnulib/import/localcharset.h: Update.
3662         * gnulib/import/localtime-buffer.c: Update.
3663         * gnulib/import/localtime-buffer.h: Update.
3664         * gnulib/import/lstat.c: Update.
3665         * gnulib/import/m4/00gnulib.m4: Update.
3666         * gnulib/import/m4/__inline.m4: Update.
3667         * gnulib/import/m4/absolute-header.m4: Update.
3668         * gnulib/import/m4/alloca.m4: Update.
3669         * gnulib/import/m4/builtin-expect.m4: Update.
3670         * gnulib/import/m4/canonicalize.m4: Update.
3671         * gnulib/import/m4/chdir-long.m4: Update.
3672         * gnulib/import/m4/close.m4: Update.
3673         * gnulib/import/m4/closedir.m4: Update.
3674         * gnulib/import/m4/configmake.m4: Update.
3675         * gnulib/import/m4/d-ino.m4: Update.
3676         * gnulib/import/m4/d-type.m4: Update.
3677         * gnulib/import/m4/dirent_h.m4: Update.
3678         * gnulib/import/m4/dirfd.m4: Update.
3679         * gnulib/import/m4/dirname.m4: Update.
3680         * gnulib/import/m4/double-slash-root.m4: Update.
3681         * gnulib/import/m4/dup.m4: Update.
3682         * gnulib/import/m4/dup2.m4: Update.
3683         * gnulib/import/m4/eealloc.m4: Update.
3684         * gnulib/import/m4/environ.m4: Update.
3685         * gnulib/import/m4/errno_h.m4: Update.
3686         * gnulib/import/m4/error.m4: Update.
3687         * gnulib/import/m4/exponentd.m4: Update.
3688         * gnulib/import/m4/exponentl.m4: Update.
3689         * gnulib/import/m4/extensions.m4: Update.
3690         * gnulib/import/m4/extern-inline.m4: Update.
3691         * gnulib/import/m4/fchdir.m4: Update.
3692         * gnulib/import/m4/fcntl-o.m4: Update.
3693         * gnulib/import/m4/fcntl.m4: Update.
3694         * gnulib/import/m4/fcntl_h.m4: Update.
3695         * gnulib/import/m4/fdopendir.m4: Update.
3696         * gnulib/import/m4/filenamecat.m4: Update.
3697         * gnulib/import/m4/flexmember.m4: Update.
3698         * gnulib/import/m4/float_h.m4: Update.
3699         * gnulib/import/m4/fnmatch.m4: Update.
3700         * gnulib/import/m4/fnmatch_h.m4: Update.
3701         * gnulib/import/m4/fpieee.m4: Update.
3702         * gnulib/import/m4/frexp.m4: Update.
3703         * gnulib/import/m4/frexpl.m4: Update.
3704         * gnulib/import/m4/fstat.m4: Update.
3705         * gnulib/import/m4/fstatat.m4: Update.
3706         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3707         * gnulib/import/m4/getcwd-path-max.m4: Update.
3708         * gnulib/import/m4/getcwd.m4: Update.
3709         * gnulib/import/m4/getdtablesize.m4: Update.
3710         * gnulib/import/m4/getlogin.m4: Update.
3711         * gnulib/import/m4/getlogin_r.m4: Update.
3712         * gnulib/import/m4/getpagesize.m4: Update.
3713         * gnulib/import/m4/getprogname.m4: Update.
3714         * gnulib/import/m4/gettimeofday.m4: Update.
3715         * gnulib/import/m4/glibc21.m4: Update.
3716         * gnulib/import/m4/glob.m4: Update.
3717         * gnulib/import/m4/glob_h.m4: Update.
3718         * gnulib/import/m4/gnulib-cache.m4: Update.
3719         * gnulib/import/m4/gnulib-common.m4: Update.
3720         * gnulib/import/m4/gnulib-comp.m4: Update.
3721         * gnulib/import/m4/gnulib-tool.m4: Update.
3722         * gnulib/import/m4/hard-locale.m4: Update.
3723         * gnulib/import/m4/include_next.m4: Update.
3724         * gnulib/import/m4/inttypes-pri.m4: Update.
3725         * gnulib/import/m4/inttypes.m4: Update.
3726         * gnulib/import/m4/isnand.m4: Update.
3727         * gnulib/import/m4/isnanl.m4: Update.
3728         * gnulib/import/m4/largefile.m4: Update.
3729         * gnulib/import/m4/limits-h.m4: Update.
3730         * gnulib/import/m4/localcharset.m4: Update.
3731         * gnulib/import/m4/locale-fr.m4: Update.
3732         * gnulib/import/m4/locale-ja.m4: Update.
3733         * gnulib/import/m4/locale-zh.m4: Update.
3734         * gnulib/import/m4/localtime-buffer.m4: Update.
3735         * gnulib/import/m4/longlong.m4: Update.
3736         * gnulib/import/m4/lstat.m4: Update.
3737         * gnulib/import/m4/malloc.m4: Update.
3738         * gnulib/import/m4/malloca.m4: Update.
3739         * gnulib/import/m4/math_h.m4: Update.
3740         * gnulib/import/m4/mbrtowc.m4: Update.
3741         * gnulib/import/m4/mbsinit.m4: Update.
3742         * gnulib/import/m4/mbsrtowcs.m4: Update.
3743         * gnulib/import/m4/mbstate_t.m4: Update.
3744         * gnulib/import/m4/memchr.m4: Update.
3745         * gnulib/import/m4/memmem.m4: Update.
3746         * gnulib/import/m4/mempcpy.m4: Update.
3747         * gnulib/import/m4/memrchr.m4: Update.
3748         * gnulib/import/m4/mkdir.m4: Update.
3749         * gnulib/import/m4/mkstemp.m4: Update.
3750         * gnulib/import/m4/mmap-anon.m4: Update.
3751         * gnulib/import/m4/mode_t.m4: Update.
3752         * gnulib/import/m4/msvc-inval.m4: Update.
3753         * gnulib/import/m4/msvc-nothrow.m4: Update.
3754         * gnulib/import/m4/multiarch.m4: Update.
3755         * gnulib/import/m4/nocrash.m4: Update.
3756         * gnulib/import/m4/off_t.m4: Update.
3757         * gnulib/import/m4/onceonly.m4: Update.
3758         * gnulib/import/m4/open-cloexec.m4: Update.
3759         * gnulib/import/m4/open.m4: Update.
3760         * gnulib/import/m4/openat.m4: Update.
3761         * gnulib/import/m4/opendir.m4: Update.
3762         * gnulib/import/m4/pathmax.m4: Update.
3763         * gnulib/import/m4/rawmemchr.m4: Update.
3764         * gnulib/import/m4/readdir.m4: Update.
3765         * gnulib/import/m4/readlink.m4: Update.
3766         * gnulib/import/m4/realloc.m4: Update.
3767         * gnulib/import/m4/rename.m4: Update.
3768         * gnulib/import/m4/rewinddir.m4: Update.
3769         * gnulib/import/m4/rmdir.m4: Update.
3770         * gnulib/import/m4/save-cwd.m4: Update.
3771         * gnulib/import/m4/secure_getenv.m4: Update.
3772         * gnulib/import/m4/setenv.m4: Update.
3773         * gnulib/import/m4/signal_h.m4: Update.
3774         * gnulib/import/m4/ssize_t.m4: Update.
3775         * gnulib/import/m4/stat-time.m4: Update.
3776         * gnulib/import/m4/stat.m4: Update.
3777         * gnulib/import/m4/std-gnu11.m4: Update.
3778         * gnulib/import/m4/stdbool.m4: Update.
3779         * gnulib/import/m4/stddef_h.m4: Update.
3780         * gnulib/import/m4/stdint.m4: Update.
3781         * gnulib/import/m4/stdio_h.m4: Update.
3782         * gnulib/import/m4/stdlib_h.m4: Update.
3783         * gnulib/import/m4/strchrnul.m4: Update.
3784         * gnulib/import/m4/strdup.m4: Update.
3785         * gnulib/import/m4/strerror.m4: Update.
3786         * gnulib/import/m4/string_h.m4: Update.
3787         * gnulib/import/m4/strstr.m4: Update.
3788         * gnulib/import/m4/strtok_r.m4: Update.
3789         * gnulib/import/m4/sys_socket_h.m4: Update.
3790         * gnulib/import/m4/sys_stat_h.m4: Update.
3791         * gnulib/import/m4/sys_time_h.m4: Update.
3792         * gnulib/import/m4/sys_types_h.m4: Update.
3793         * gnulib/import/m4/tempname.m4: Update.
3794         * gnulib/import/m4/time_h.m4: Update.
3795         * gnulib/import/m4/unistd-safer.m4: Update.
3796         * gnulib/import/m4/unistd_h.m4: Update.
3797         * gnulib/import/m4/warn-on-use.m4: Update.
3798         * gnulib/import/m4/wchar_h.m4: Update.
3799         * gnulib/import/m4/wchar_t.m4: Update.
3800         * gnulib/import/m4/wctype_h.m4: Update.
3801         * gnulib/import/m4/wint_t.m4: Update.
3802         * gnulib/import/malloc.c: Update.
3803         * gnulib/import/malloc/scratch_buffer.h: Update.
3804         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3805         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3806         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3807         * gnulib/import/malloca.c: Update.
3808         * gnulib/import/malloca.h: Update.
3809         * gnulib/import/malloca.valgrind: Update.
3810         * gnulib/import/math.in.h: Update.
3811         * gnulib/import/mbrtowc.c: Update.
3812         * gnulib/import/mbsinit.c: Update.
3813         * gnulib/import/mbsrtowcs-impl.h: Update.
3814         * gnulib/import/mbsrtowcs-state.c: Update.
3815         * gnulib/import/mbsrtowcs.c: Update.
3816         * gnulib/import/memchr.c: Update.
3817         * gnulib/import/memmem.c: Update.
3818         * gnulib/import/mempcpy.c: Update.
3819         * gnulib/import/memrchr.c: Update.
3820         * gnulib/import/mkdir.c: Update.
3821         * gnulib/import/mkstemp.c: Update.
3822         * gnulib/import/msvc-inval.c: Update.
3823         * gnulib/import/msvc-inval.h: Update.
3824         * gnulib/import/msvc-nothrow.c: Update.
3825         * gnulib/import/msvc-nothrow.h: Update.
3826         * gnulib/import/open.c: Update.
3827         * gnulib/import/openat-die.c: Update.
3828         * gnulib/import/openat-priv.h: Update.
3829         * gnulib/import/openat-proc.c: Update.
3830         * gnulib/import/openat.c: Update.
3831         * gnulib/import/openat.h: Update.
3832         * gnulib/import/opendir.c: Update.
3833         * gnulib/import/pathmax.h: Update.
3834         * gnulib/import/pipe-safer.c: Update.
3835         * gnulib/import/rawmemchr.c: Update.
3836         * gnulib/import/readdir.c: Update.
3837         * gnulib/import/readlink.c: Update.
3838         * gnulib/import/realloc.c: Update.
3839         * gnulib/import/ref-add.sin: Update.
3840         * gnulib/import/ref-del.sin: Update.
3841         * gnulib/import/rename.c: Update.
3842         * gnulib/import/rewinddir.c: Update.
3843         * gnulib/import/rmdir.c: Update.
3844         * gnulib/import/same-inode.h: Update.
3845         * gnulib/import/save-cwd.c: Update.
3846         * gnulib/import/save-cwd.h: Update.
3847         * gnulib/import/scratch_buffer.h: Update.
3848         * gnulib/import/secure_getenv.c: Update.
3849         * gnulib/import/setenv.c: Update.
3850         * gnulib/import/signal.in.h: Update.
3851         * gnulib/import/stat-time.c: Update.
3852         * gnulib/import/stat-time.h: Update.
3853         * gnulib/import/stat-w32.c: Update.
3854         * gnulib/import/stat-w32.h: Update.
3855         * gnulib/import/stat.c: Update.
3856         * gnulib/import/stdbool.in.h: Update.
3857         * gnulib/import/stddef.in.h: Update.
3858         * gnulib/import/stdint.in.h: Update.
3859         * gnulib/import/stdio.in.h: Update.
3860         * gnulib/import/stdlib.in.h: Update.
3861         * gnulib/import/str-two-way.h: Update.
3862         * gnulib/import/strchrnul.c: Update.
3863         * gnulib/import/strdup.c: Update.
3864         * gnulib/import/streq.h: Update.
3865         * gnulib/import/strerror-override.c: Update.
3866         * gnulib/import/strerror-override.h: Update.
3867         * gnulib/import/strerror.c: Update.
3868         * gnulib/import/string.in.h: Update.
3869         * gnulib/import/stripslash.c: Update.
3870         * gnulib/import/strnlen1.c: Update.
3871         * gnulib/import/strnlen1.h: Update.
3872         * gnulib/import/strstr.c: Update.
3873         * gnulib/import/strtok_r.c: Update.
3874         * gnulib/import/sys_stat.in.h: Update.
3875         * gnulib/import/sys_time.in.h: Update.
3876         * gnulib/import/sys_types.in.h: Update.
3877         * gnulib/import/tempname.c: Update.
3878         * gnulib/import/tempname.h: Update.
3879         * gnulib/import/time.in.h: Update.
3880         * gnulib/import/unistd--.h: Update.
3881         * gnulib/import/unistd-safer.h: Update.
3882         * gnulib/import/unistd.in.h: Update.
3883         * gnulib/import/unsetenv.c: Update.
3884         * gnulib/import/verify.h: Update.
3885         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3886         * gnulib/import/wchar.in.h: Update.
3887         * gnulib/import/wctype.in.h: Update.
3888         * gnulib/import/xalloc-oversized.h: Update.
3889         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3890         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3891
3892 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3893
3894         * record-btrace.c (get_thread_current_frame): Remove
3895         old_inferior_ptid.
3896
3897 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3898
3899         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3900         with check_tag to 1 if and only if the type is tagged and the
3901         component being searched cannot been found in the current
3902         view. Otherwise, always call ada_to_fixed_type with
3903         check_tag to 0.
3904
3905 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3906
3907         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3908         declaration.
3909         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3910         * ada-varobj.c (ada_varobj_get_number_of_children,
3911         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3912
3913 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3914
3915         * ada-valprint.c (ada_value_print): Use type instead of
3916         enclosing type.
3917
3918 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3919
3920         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3921         an array of access to unconstrained array.
3922
3923 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3924
3925         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3926         (ada_check_typedef): Use it.
3927
3928 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3929
3930         * ada-varobj.c (ada_varobj_describe_struct_child)
3931         (ada_varobj_describe_child): Handle union case like struct one.
3932
3933 2018-09-10  Tom Tromey  <tom@tromey.com>
3934
3935         PR python/18380:
3936         * python/python.c (_initialize_python): Make example in "python"
3937         help work in Python 3.
3938
3939 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3940
3941         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3942         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3943         $(EXEEXT) to the script, as it is not a program.
3944
3945 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3946
3947         * python/py-prettyprint.c (pretty_print_one_value): Return
3948         gdbpy_ref<>.
3949         (print_string_repr): Adjust.
3950         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3951         * python/python-internal.h (apply_varobj_pretty_printer): Return
3952         gdbpy_ref<>.
3953         * varobj.c (varobj_value_get_print_value): Adjust.
3954
3955 2018-09-08  Tom Tromey  <tom@tromey.com>
3956
3957         PR python/16047:
3958         * python/py-prettyprint.c (pretty_print_one_value): Check for
3959         to_string method.
3960
3961 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3962
3963         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3964         replace_operator_with_call.
3965
3966 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3967
3968         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3969
3970 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3971
3972         * ada-typeprint.c (print_range): Print the bounds using TYPE
3973         rather than its TYPE_TARGET_TYPE.
3974
3975 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3976
3977         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3978         call to ada_to_fixed_value_create.
3979
3980 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3981
3982         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3983
3984 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3985
3986         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3987         by calls to error.
3988
3989 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3990
3991         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3992         Move update of loop variable "fi".
3993
3994 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3995
3996         * ada-lang.c (value_assign_to_component): In the case of
3997         big-endian targets, extract the bits of the given VAL
3998         using an src_offset of zero if container is not a scalar.
3999
4000 2018-09-06  Simon Ser  <contact@emersion.fr>
4001
4002         PR gdb/23105
4003         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4004         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4005         * fbsd-tdep.c (fbsd_make_note_desc): New.
4006         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4007         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4008         * target.h (enum target_object) Add FreeBSD-specific
4009         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4010
4011 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4012
4013         * compile/compile-c.h (generate_c_for_variable_locations):
4014         Change reference to pointer.
4015         * compile/compile-c-support.c (compile_program) <compute>:
4016         Likewise.
4017         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4018         (generate_c_for_for_one_variable): Likewise
4019         (generate_c_for_variable_locations): Likewise
4020         * compile/compile-c-types.c (compile_c_instance::convert_type):
4021         Likewise
4022         * compile/compile-cplus-symbols.c (convert_one_symbol):
4023         std::move the scope passed to enter_scope.
4024         * compile/compile-cplus-types.c
4025         (compile_cplus_instance::enter_scope): Make parameter
4026         rvalue-reference.
4027         (compile_cplus_instance::new_scope): Change reference to
4028         pointer.
4029         (compile_cplus_instance::convert_type): Likewise
4030         (compile_cplus_convert_typedef): std::move the scope passed to
4031         enter_scope.
4032         (compile_cplus_convert_struct_or_union): Likewise.
4033         (compile_cplus_convert_enum): Likewise.
4034         (compile_cplus_convert_namespace): Likewise.
4035         * compile/compile-cplus.h (compile_cplus_instance)
4036         <enter_scope>: Make parameter rvalue-reference.
4037         * compile/compile-internal.h (compile_instance)
4038         <get_cached_type>: Likewise
4039         * compile/compile-loc2c.c (push): Likewise
4040         (pushf): Likewise
4041         (unary): Likewise
4042         (binary): Likewise
4043         (print_label): Likewise
4044         (pushf_register_address): Likewise
4045         (pushf_register): Likewise
4046         (do_compile_dwarf_expr_to_c): Likewise
4047         (compile_dwarf_expr_to_c): Likewise
4048         (compile_dwarf_bounds_to_c): Likewise
4049         * compile/compile.c (compile_instance::get_cached_type):
4050         Likewise
4051         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4052         (compile_dwarf_bounds_to_c): Likewise
4053         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4054         (dwarf2_compile_property_to_c): Likewise
4055         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4056         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4057         Likewise
4058
4059 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4060
4061         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4062         * tui/tui-data.c (init_content_element): Don't initialize it.
4063
4064 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4065
4066         * tui/tui-data.h (struct tui_win_info)
4067         <detail::opaque>: Remove.
4068         * tui/tui-data.c (init_win_info): Remove assignment.
4069
4070 2018-09-05  Tom Tromey  <tom@tromey.com>
4071
4072         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4073         -Wformat-nonliteral.
4074         * target-float.c (host_float_ops<T>::to_string)
4075         (host_float_ops<T>::from_string): Use
4076         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4077         * configure: Rebuild.
4078
4079 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4080
4081         * printcmd.c (printf_c_string): Use
4082         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4083         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4084
4085 2018-09-05  Tom Tromey  <tom@tromey.com>
4086
4087         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4088
4089 2018-09-05  Tom de Vries  <tdevries@suse.de>
4090
4091         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4092         with resolve_abstract_p == true.
4093         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4094         defaulting to false. Propagate resolve_abstract_p to
4095         dwarf2_fetch_die_loc_sect_off.
4096         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4097         parameter, defaulting to false.
4098         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4099         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4100         parameter.
4101         * dwarf2read.h (struct die_info): Forward-declare.
4102         (die_info_ptr): New typedef.
4103         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4104
4105 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
4106
4107         GDB 8.2 released.
4108
4109 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4110             Pedro Alves  <palves@redhat.com>
4111
4112         * gnulib/Makefile.in (aclocal_m4_deps): Move to
4113         "aclocal-m4-deps.mk".  Include file here.
4114         $(srcdir)/aclocal.m4: Add "configure.ac".
4115         * gnulib/aclocal-m4-deps.mk: New file.
4116         * gnulib/update-gnulib.sh: Automatically update
4117         "aclocal-m4-deps.mk".
4118
4119 2018-09-04  Tom Tromey  <tom@tromey.com>
4120
4121         * configure: Rebuild.
4122         * configure.ac: Remove multi-ice code.
4123
4124 2018-09-04  Tom Tromey  <tom@tromey.com>
4125
4126         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4127         (ada-exp.o): Update.
4128
4129 2018-09-04  Tom Tromey  <tom@tromey.com>
4130
4131         * Makefile.in (printcmd.o, target-float.o): Remove.
4132         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4133
4134 2018-09-04  Tom Tromey  <tom@tromey.com>
4135
4136         * gnulib/Makefile.in: Remove obsolete comment.
4137         * Makefile.in: Remove obsolete comment.
4138
4139 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
4140
4141         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4142         line with '+'.
4143
4144 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4145
4146         * riscv-tdep.c: Add 'prologue-value.h' include.
4147         (struct riscv_unwind_cache): New struct.
4148         (riscv_debug_unwinder): New global.
4149         (riscv_scan_prologue): Update arguments, capture register details
4150         from prologue scan.
4151         (riscv_skip_prologue): Reformat arguments line, move end of
4152         prologue calculation into riscv_scan_prologue.
4153         (riscv_frame_cache): Update return type, create
4154         riscv_unwind_cache, scan the prologue, and fill in remaining cache
4155         details.
4156         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4157         (riscv_frame_prev_register): Use the trad_frame within the
4158         riscv_unwind_cache.
4159         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4160         flag.
4161
4162 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4163
4164         * trad-frame.h (trad_frame_set_realreg): Declare.
4165         (trad_frame_set_addr): Declare.
4166         * trad-frame.c (trad_frame_set_realreg): Define new function.
4167         (trad_frame_set_addr): Define new function.
4168         (trad_frame_set_reg_realreg): Use new function.
4169         (trad_frame_set_reg_addr): Use new function.
4170
4171 2018-09-01  Keith Seitz  <keiths@redhat.com>
4172
4173         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4174         pulongest instead of "%lld".
4175         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4176         ATTRIBUTE_UNUSED.
4177
4178 2018-08-31  Tom Tromey  <tom@tromey.com>
4179
4180         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4181         variant part type.
4182
4183 2018-08-31  Pedro Alves  <palves@redhat.com>
4184
4185         * gdbarch.h: Regenerate.
4186
4187 2018-08-31  Pedro Alves  <palves@redhat.com>
4188
4189         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4190         * target.h (Hardware watchpoint interfaces): Describe
4191         continuable/steppable/non-steppable watchpoints.
4192         * gdbarch.h, gdbarch.c: Regenerate.
4193
4194 2018-08-31  Pedro Alves  <palves@redhat.com>
4195
4196         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4197         Delete.
4198         * s390-linux-nat.c
4199         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4200         * target.h (target_ops::have_continuable_watchpoint): Delete.
4201         (target_have_continuable_watchpoint): Delete.
4202         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4203         * target-delegates.c: Regenerate.
4204
4205 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4206
4207         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4208         the files present in "gnulib/import/m4/".
4209
4210 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4211
4212         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4213         c.sw, c.swsp, and c.sdsp.
4214
4215 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4216
4217         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4218         (riscv_read_misa_reg): Don't cache value read into inferior data.
4219         (riscv_new_inferior_data): Delete.
4220         (riscv_inferior_data_cleanup): Delete.
4221         (riscv_inferior_data): Delete.
4222         (riscv_invalidate_inferior_data): Delete.
4223         (_initialize_riscv_tdep): Remove initialisation of inferior data.
4224
4225 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
4226
4227         * compile/compile-cplus-types.c
4228         (compile_cplus_instance::leave_scope): Take the address of scope
4229         object.
4230         (compile_cplus_instance::convert_qualified_base): Compare quals
4231         to 0.
4232
4233 2018-08-30  Keith Seitz  <keiths@redhat.com>
4234
4235         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4236         Use "%s" and host_address_to_string instead of "%p" in printf.
4237
4238 2018-08-29  Keith Seitz  <keiths@redhat.com>
4239
4240         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4241         and compile-cplus-types.c.
4242         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4243         * c-lang.c (cplus_language_defn): Set C++ compile functions.
4244         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4245         Declare.
4246         * compile/compile-c-support.c: Include compile-cplus.h.
4247         (load_libcompile): Templatize.
4248         (get_compile_context): "New" function.
4249         (c_get_compile_context): Use get_compile_context.
4250         (cplus_get_compile_context): New function.
4251         (cplus_push_user_expression, cplus_pop_user_expression)
4252         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4253         (cplus_compute_program): Define new structs/functions.
4254         * compile/compile-cplus-symmbols.c: New file.
4255         * compile/compile-cplus-types.c: New file.
4256         * compile/compile-cplus.h: New file.
4257         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4258         Declare.
4259         * compile/compile-object-load.c (get_out_value_type): Use
4260         strncmp_iw when comparing symbol names.
4261         (compile_object_load): Add mst_bss and mst_data.
4262         * compile/compile.c (_initialize_compile): Remove
4263         -Wno-implicit-function-declaration from `compile_args'.
4264         * compile/gcc-cp-plugin.h: New file.
4265         * NEWS: Mention C++ compile support and new debug options.
4266
4267 2018-08-29  Keith Seitz  <keiths@redhat.com>
4268
4269         * linespec.c (collect_info::add_symbol): Make virtual.
4270         (struct symbol_searcher_collect_info): New struct.
4271         (symbol_searcher::find_all_symbols): New method.
4272         * symtab.h (class symbol_searcher): New class.
4273
4274 2018-08-29  Keith Seitz  <keiths@redhat.com>
4275
4276         * linespec.c (struct linespec) <function_symbols, label_symbols>:
4277         Change to vector of block_symbol.  Update all users.
4278         (struct collect_info) <symbols>: Likewise.
4279         (collect_info::add_symbol): Take block_symbol as argument.
4280         Update all callers.
4281         (decode_compound_collector) <m_symbols>: Change type to vector
4282         of block_symbol.  Update all users.
4283         (decode_compound_collector::operator ()): Change parameter type
4284         to block_symbol.
4285         (find_method, find_function_symbols, find_linespec_symbols)
4286         (find_label_symbols_in_block, find_label_symbols): Change symbol
4287         vectors to block_symbol vectors.
4288         * symtab.h (symbol_found_callback_ftype): Change parameter type to
4289         block_symbol.
4290
4291 2018-08-29  Keith Seitz  <keiths@redhat.com>
4292
4293         * linespec.c (symbolp): Remove typedef and VEC definitions.
4294         (bound_minimal_symbol_d): Likewise.
4295
4296 2018-08-29  Keith Seitz  <keiths@redhat.com>
4297
4298         * linespec.c (decode_compound_collector::decode_compound_collector):
4299         Remove initialization for `m_symtabs'.
4300         (decode_compound_collector::release_symbols): Change return type
4301         to std::vector.  Update all callers.
4302         (class decode_compound_collector) <m_symbols>: Change type to
4303         std::vector.
4304         (lookup_prefix_sym): Change return type to std::vector.  Update all
4305         callers.
4306         (compare_symbols): Remove.
4307         (std_compare_symbols): Rename to `compare_symbols'.
4308         (find_method): Change `sym_classes' parameter to std::vector.
4309         Update all callers.  Use std::sort to sort sym_classes.
4310         (find_linespec_symbols): Remove cleanup.
4311
4312 2018-08-29  Keith Seitz  <keiths@redhat.com>
4313
4314         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4315         std::vector.  Update all users.
4316         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4317         (struct collect_info) <minimal_symbols>: Likewise.
4318         (compare_msymbols): Return bool.  Change parameters to const
4319         bound_minimal_symbol references.
4320         (find_method, find_function_symbols, find_linespec_symbols): Change
4321         `minsyms' parameter to std::vector.  Update all callers.
4322
4323 2018-08-29  Keith Seitz  <keiths@redhat.com>
4324
4325         * linespec.c (struct linespec) <label_symbols>: Change type to
4326         std::vector.  Update all users.
4327         (find_label_symbols_in_block): Change `result' parameter to
4328         std::vector.  Update all callers.
4329         (find_label_symbols): Return std::vector.  Update all callers.
4330
4331 2018-08-29  Keith Seitz  <keiths@redhat.com>
4332
4333         * linespec.c (struct linespec) <function_symbols>: Change type to
4334         std::vector.  Update all users.
4335         (struct collect_info) <function_symbols>: Likewise.
4336         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4337         (std_compare_symbols): New function.
4338         (find_method, find_function_symbols, find_linespec_symbols)
4339         (find_label_symbols_in_block): Change `symbols' parameter to
4340         std::vector.  Update all callers.
4341         (find_label_symbols): Likewise for `function_symbols' and
4342         `label_funcs_ret'.
4343
4344 2018-08-29  Keith Seitz  <keiths@redhat.com>
4345
4346         * linespec.c (symtab_vector_up): Define.
4347         (struct linespec) <file_symtabs>: Change type to std::vector *.
4348         Update all uses.
4349         (struct collect_info) <file_symtabs>: Likewise.
4350         (collect_symtabs_from_filename): Return symtab_vector_up.
4351         Update all callers.
4352         (decode_objc): Remove cleanup.
4353         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4354         (symtab_collector::release_symtabs): Return symtab_vector_up.
4355         Update all callers.
4356         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4357         Update all users.
4358         (collect_symtabs_from_filename, symtabs_from_filename): Return
4359         symtab_vector_up.  Update all callers.
4360
4361 2018-08-29  Tom Tromey  <tom@tromey.com>
4362
4363         * csky-tdep.c (csky_analyze_prologue): Use
4364         core_addr_to_string_nz.
4365
4366 2018-08-29  Tom Tromey  <tom@tromey.com>
4367
4368         * windows-nat.c (struct xlate_exception) <them>: Change type to
4369         DWORD.
4370         (xlate): Fix formatting.  Remove last entry.
4371         (struct xlate_exception, xlate): Comment out.
4372         (windows_nat_target::resume): Use ranged for.
4373
4374 2018-08-29  Jim Wilson  <jimw@sifive.com>
4375
4376         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4377         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4378         of NT_PRFPREG.
4379         (riscv_linux_nat_target::store_registers): Likewise.
4380
4381 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4382
4383         PR gdb/23555
4384         PR gdb/23558
4385         * gnulib/aclocal.m4: Regenerate.
4386         * gnulib/config.in: Regenerate.
4387         * gnulib/configure: Regenerate.
4388         * gnulib/import/Makefile.am: Update.
4389         * gnulib/import/Makefile.in: Update.
4390         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4391         * gnulib/import/_Noreturn.h: ... this.
4392         * gnulib/import/alloca.in.h: Update.
4393         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4394         * gnulib/import/arg-nonnull.h: ... this.
4395         * gnulib/import/assure.h: Update.
4396         * gnulib/import/at-func.c: Update.
4397         * gnulib/import/basename-lgpl.c: Update.
4398         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4399         * gnulib/import/c++defs.h: ... this.
4400         * gnulib/import/canonicalize-lgpl.c: Update.
4401         * gnulib/import/cdefs.h: Update.
4402         * gnulib/import/chdir-long.c: Update.
4403         * gnulib/import/chdir-long.h: Update.
4404         * gnulib/import/cloexec.c: Update.
4405         * gnulib/import/cloexec.h: Update.
4406         * gnulib/import/close.c: Update.
4407         * gnulib/import/closedir.c: Update.
4408         * gnulib/import/config.charset: Update.
4409         * gnulib/import/dirent-private.h: Update.
4410         * gnulib/import/dirent.in.h: Update.
4411         * gnulib/import/dirfd.c: Update.
4412         * gnulib/import/dirname-lgpl.c: Update.
4413         * gnulib/import/dirname.h: Update.
4414         * gnulib/import/dosname.h: Update.
4415         * gnulib/import/dup-safer-flag.c: Update.
4416         * gnulib/import/dup-safer.c: Update.
4417         * gnulib/import/dup.c: Update.
4418         * gnulib/import/dup2.c: Update.
4419         * gnulib/import/errno.in.h: Update.
4420         * gnulib/import/error.c: Update.
4421         * gnulib/import/error.h: Update.
4422         * gnulib/import/exitfail.c: Update.
4423         * gnulib/import/exitfail.h: Update.
4424         * gnulib/import/extra/update-copyright: Update.
4425         * gnulib/import/fchdir.c: Update.
4426         * gnulib/import/fcntl.c: Update.
4427         * gnulib/import/fcntl.in.h: Update.
4428         * gnulib/import/fd-hook.c: Update.
4429         * gnulib/import/fd-hook.h: Update.
4430         * gnulib/import/fd-safer-flag.c: Update.
4431         * gnulib/import/fd-safer.c: Update.
4432         * gnulib/import/fdopendir.c: Update.
4433         * gnulib/import/filename.h: Update.
4434         * gnulib/import/filenamecat-lgpl.c: Update.
4435         * gnulib/import/filenamecat.h: Update.
4436         * gnulib/import/flexmember.h: Update.
4437         * gnulib/import/float+.h: Update.
4438         * gnulib/import/float.c: Update.
4439         * gnulib/import/float.in.h: Update.
4440         * gnulib/import/fnmatch.c: Update.
4441         * gnulib/import/fnmatch.in.h: Update.
4442         * gnulib/import/fnmatch_loop.c: Update.
4443         * gnulib/import/fpucw.h: Update.
4444         * gnulib/import/frexp.c: Update.
4445         * gnulib/import/frexpl.c: Update.
4446         * gnulib/import/fstat.c: Update.
4447         * gnulib/import/fstatat.c: Update.
4448         * gnulib/import/getcwd-lgpl.c: Update.
4449         * gnulib/import/getcwd.c: Update.
4450         * gnulib/import/getdtablesize.c: Update.
4451         * gnulib/import/getlogin_r.c: Update.
4452         * gnulib/import/getprogname.c: Update.
4453         * gnulib/import/getprogname.h: Update.
4454         * gnulib/import/gettext.h: Update.
4455         * gnulib/import/gettimeofday.c: Update.
4456         * gnulib/import/glob-libc.h: Update.
4457         * gnulib/import/glob.c: Update.
4458         * gnulib/import/glob.in.h: Update.
4459         * gnulib/import/glob_internal.h: Update.
4460         * gnulib/import/glob_pattern_p.c: Update.
4461         * gnulib/import/globfree.c: Update.
4462         * gnulib/import/hard-locale.c: Update.
4463         * gnulib/import/hard-locale.h: Update.
4464         * gnulib/import/intprops.h: Update.
4465         * gnulib/import/inttypes.in.h: Update.
4466         * gnulib/import/isnan.c: Update.
4467         * gnulib/import/isnand-nolibm.h: Update.
4468         * gnulib/import/isnand.c: Update.
4469         * gnulib/import/isnanl-nolibm.h: Update.
4470         * gnulib/import/isnanl.c: Update.
4471         * gnulib/import/itold.c: Update.
4472         * gnulib/import/libc-config.h: Update.
4473         * gnulib/import/limits.in.h: Update.
4474         * gnulib/import/localcharset.c: Update.
4475         * gnulib/import/localcharset.h: Update.
4476         * gnulib/import/localtime-buffer.c: Update.
4477         * gnulib/import/localtime-buffer.h: Update.
4478         * gnulib/import/lstat.c: Update.
4479         * gnulib/import/m4/00gnulib.m4: Update.
4480         * gnulib/import/m4/__inline.m4: Update.
4481         * gnulib/import/m4/absolute-header.m4: Update.
4482         * gnulib/import/m4/alloca.m4: Update.
4483         * gnulib/import/m4/builtin-expect.m4: Update.
4484         * gnulib/import/m4/canonicalize.m4: Update.
4485         * gnulib/import/m4/chdir-long.m4: Update.
4486         * gnulib/import/m4/close.m4: Update.
4487         * gnulib/import/m4/closedir.m4: Update.
4488         * gnulib/import/m4/configmake.m4: Update.
4489         * gnulib/import/m4/d-ino.m4: Update.
4490         * gnulib/import/m4/d-type.m4: Update.
4491         * gnulib/import/m4/dirent_h.m4: Update.
4492         * gnulib/import/m4/dirfd.m4: Update.
4493         * gnulib/import/m4/dirname.m4: Update.
4494         * gnulib/import/m4/double-slash-root.m4: Update.
4495         * gnulib/import/m4/dup.m4: Update.
4496         * gnulib/import/m4/dup2.m4: Update.
4497         * gnulib/import/m4/eealloc.m4: Update.
4498         * gnulib/import/m4/environ.m4: Update.
4499         * gnulib/import/m4/errno_h.m4: Update.
4500         * gnulib/import/m4/error.m4: Update.
4501         * gnulib/import/m4/exponentd.m4: Update.
4502         * gnulib/import/m4/exponentl.m4: Update.
4503         * gnulib/import/m4/extensions.m4: Update.
4504         * gnulib/import/m4/extern-inline.m4: Update.
4505         * gnulib/import/m4/fchdir.m4: Update.
4506         * gnulib/import/m4/fcntl-o.m4: Update.
4507         * gnulib/import/m4/fcntl.m4: Update.
4508         * gnulib/import/m4/fcntl_h.m4: Update.
4509         * gnulib/import/m4/fdopendir.m4: Update.
4510         * gnulib/import/m4/filenamecat.m4: Update.
4511         * gnulib/import/m4/flexmember.m4: Update.
4512         * gnulib/import/m4/float_h.m4: Update.
4513         * gnulib/import/m4/fnmatch.m4: Update.
4514         * gnulib/import/m4/fnmatch_h.m4: Update.
4515         * gnulib/import/m4/fpieee.m4: Update.
4516         * gnulib/import/m4/frexp.m4: Update.
4517         * gnulib/import/m4/frexpl.m4: Update.
4518         * gnulib/import/m4/fstat.m4: Update.
4519         * gnulib/import/m4/fstatat.m4: Update.
4520         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4521         * gnulib/import/m4/getcwd-path-max.m4: Update.
4522         * gnulib/import/m4/getcwd.m4: Update.
4523         * gnulib/import/m4/getdtablesize.m4: Update.
4524         * gnulib/import/m4/getlogin.m4: Update.
4525         * gnulib/import/m4/getlogin_r.m4: Update.
4526         * gnulib/import/m4/getpagesize.m4: Update.
4527         * gnulib/import/m4/getprogname.m4: Update.
4528         * gnulib/import/m4/gettimeofday.m4: Update.
4529         * gnulib/import/m4/glibc21.m4: Update.
4530         * gnulib/import/m4/glob.m4: Update.
4531         * gnulib/import/m4/glob_h.m4: Update.
4532         * gnulib/import/m4/gnulib-cache.m4: Update.
4533         * gnulib/import/m4/gnulib-common.m4: Update.
4534         * gnulib/import/m4/gnulib-comp.m4: Update.
4535         * gnulib/import/m4/gnulib-tool.m4: Update.
4536         * gnulib/import/m4/hard-locale.m4: Update.
4537         * gnulib/import/m4/include_next.m4: Update.
4538         * gnulib/import/m4/inttypes-pri.m4: Update.
4539         * gnulib/import/m4/inttypes.m4: Update.
4540         * gnulib/import/m4/isnand.m4: Update.
4541         * gnulib/import/m4/isnanl.m4: Update.
4542         * gnulib/import/m4/largefile.m4: Update.
4543         * gnulib/import/m4/limits-h.m4: Update.
4544         * gnulib/import/m4/localcharset.m4: Update.
4545         * gnulib/import/m4/locale-fr.m4: Update.
4546         * gnulib/import/m4/locale-ja.m4: Update.
4547         * gnulib/import/m4/locale-zh.m4: Update.
4548         * gnulib/import/m4/localtime-buffer.m4: Update.
4549         * gnulib/import/m4/longlong.m4: Update.
4550         * gnulib/import/m4/lstat.m4: Update.
4551         * gnulib/import/m4/malloc.m4: Update.
4552         * gnulib/import/m4/malloca.m4: Update.
4553         * gnulib/import/m4/math_h.m4: Update.
4554         * gnulib/import/m4/mbrtowc.m4: Update.
4555         * gnulib/import/m4/mbsinit.m4: Update.
4556         * gnulib/import/m4/mbsrtowcs.m4: Update.
4557         * gnulib/import/m4/mbstate_t.m4: Update.
4558         * gnulib/import/m4/memchr.m4: Update.
4559         * gnulib/import/m4/memmem.m4: Update.
4560         * gnulib/import/m4/mempcpy.m4: Update.
4561         * gnulib/import/m4/memrchr.m4: Update.
4562         * gnulib/import/m4/mkdir.m4: Update.
4563         * gnulib/import/m4/mkstemp.m4: Update.
4564         * gnulib/import/m4/mmap-anon.m4: Update.
4565         * gnulib/import/m4/mode_t.m4: Update.
4566         * gnulib/import/m4/msvc-inval.m4: Update.
4567         * gnulib/import/m4/msvc-nothrow.m4: Update.
4568         * gnulib/import/m4/multiarch.m4: Update.
4569         * gnulib/import/m4/nocrash.m4: Update.
4570         * gnulib/import/m4/off_t.m4: Update.
4571         * gnulib/import/m4/onceonly.m4: Update.
4572         * gnulib/import/m4/open-cloexec.m4: Update.
4573         * gnulib/import/m4/open.m4: Update.
4574         * gnulib/import/m4/openat.m4: Update.
4575         * gnulib/import/m4/opendir.m4: Update.
4576         * gnulib/import/m4/pathmax.m4: Update.
4577         * gnulib/import/m4/rawmemchr.m4: Update.
4578         * gnulib/import/m4/readdir.m4: Update.
4579         * gnulib/import/m4/readlink.m4: Update.
4580         * gnulib/import/m4/realloc.m4: Update.
4581         * gnulib/import/m4/rename.m4: Update.
4582         * gnulib/import/m4/rewinddir.m4: Update.
4583         * gnulib/import/m4/rmdir.m4: Update.
4584         * gnulib/import/m4/save-cwd.m4: Update.
4585         * gnulib/import/m4/secure_getenv.m4: Update.
4586         * gnulib/import/m4/setenv.m4: Update.
4587         * gnulib/import/m4/signal_h.m4: Update.
4588         * gnulib/import/m4/ssize_t.m4: Update.
4589         * gnulib/import/m4/stat-time.m4: Update.
4590         * gnulib/import/m4/stat.m4: Update.
4591         * gnulib/import/m4/std-gnu11.m4: Update.
4592         * gnulib/import/m4/stdbool.m4: Update.
4593         * gnulib/import/m4/stddef_h.m4: Update.
4594         * gnulib/import/m4/stdint.m4: Update.
4595         * gnulib/import/m4/stdio_h.m4: Update.
4596         * gnulib/import/m4/stdlib_h.m4: Update.
4597         * gnulib/import/m4/strchrnul.m4: Update.
4598         * gnulib/import/m4/strdup.m4: Update.
4599         * gnulib/import/m4/strerror.m4: Update.
4600         * gnulib/import/m4/string_h.m4: Update.
4601         * gnulib/import/m4/strstr.m4: Update.
4602         * gnulib/import/m4/strtok_r.m4: Update.
4603         * gnulib/import/m4/sys_socket_h.m4: Update.
4604         * gnulib/import/m4/sys_stat_h.m4: Update.
4605         * gnulib/import/m4/sys_time_h.m4: Update.
4606         * gnulib/import/m4/sys_types_h.m4: Update.
4607         * gnulib/import/m4/tempname.m4: Update.
4608         * gnulib/import/m4/time_h.m4: Update.
4609         * gnulib/import/m4/unistd-safer.m4: Update.
4610         * gnulib/import/m4/unistd_h.m4: Update.
4611         * gnulib/import/m4/warn-on-use.m4: Update.
4612         * gnulib/import/m4/wchar_h.m4: Update.
4613         * gnulib/import/m4/wchar_t.m4: Update.
4614         * gnulib/import/m4/wctype_h.m4: Update.
4615         * gnulib/import/m4/wint_t.m4: Update.
4616         * gnulib/import/malloc.c: Update.
4617         * gnulib/import/malloc/scratch_buffer.h: Update.
4618         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4619         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4620         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4621         * gnulib/import/malloca.c: Update.
4622         * gnulib/import/malloca.h: Update.
4623         * gnulib/import/malloca.valgrind: Update.
4624         * gnulib/import/math.in.h: Update.
4625         * gnulib/import/mbrtowc.c: Update.
4626         * gnulib/import/mbsinit.c: Update.
4627         * gnulib/import/mbsrtowcs-impl.h: Update.
4628         * gnulib/import/mbsrtowcs-state.c: Update.
4629         * gnulib/import/mbsrtowcs.c: Update.
4630         * gnulib/import/memchr.c: Update.
4631         * gnulib/import/memmem.c: Update.
4632         * gnulib/import/mempcpy.c: Update.
4633         * gnulib/import/memrchr.c: Update.
4634         * gnulib/import/mkdir.c: Update.
4635         * gnulib/import/mkstemp.c: Update.
4636         * gnulib/import/msvc-inval.c: Update.
4637         * gnulib/import/msvc-inval.h: Update.
4638         * gnulib/import/msvc-nothrow.c: Update.
4639         * gnulib/import/msvc-nothrow.h: Update.
4640         * gnulib/import/open.c: Update.
4641         * gnulib/import/openat-die.c: Update.
4642         * gnulib/import/openat-priv.h: Update.
4643         * gnulib/import/openat-proc.c: Update.
4644         * gnulib/import/openat.c: Update.
4645         * gnulib/import/openat.h: Update.
4646         * gnulib/import/opendir.c: Update.
4647         * gnulib/import/pathmax.h: Update.
4648         * gnulib/import/pipe-safer.c: Update.
4649         * gnulib/import/rawmemchr.c: Update.
4650         * gnulib/import/readdir.c: Update.
4651         * gnulib/import/readlink.c: Update.
4652         * gnulib/import/realloc.c: Update.
4653         * gnulib/import/ref-add.sin: Update.
4654         * gnulib/import/ref-del.sin: Update.
4655         * gnulib/import/rename.c: Update.
4656         * gnulib/import/rewinddir.c: Update.
4657         * gnulib/import/rmdir.c: Update.
4658         * gnulib/import/same-inode.h: Update.
4659         * gnulib/import/save-cwd.c: Update.
4660         * gnulib/import/save-cwd.h: Update.
4661         * gnulib/import/scratch_buffer.h: Update.
4662         * gnulib/import/secure_getenv.c: Update.
4663         * gnulib/import/setenv.c: Update.
4664         * gnulib/import/signal.in.h: Update.
4665         * gnulib/import/stat-time.c: Update.
4666         * gnulib/import/stat-time.h: Update.
4667         * gnulib/import/stat-w32.c: Update.
4668         * gnulib/import/stat-w32.h: Update.
4669         * gnulib/import/stat.c: Update.
4670         * gnulib/import/stdbool.in.h: Update.
4671         * gnulib/import/stddef.in.h: Update.
4672         * gnulib/import/stdint.in.h: Update.
4673         * gnulib/import/stdio.in.h: Update.
4674         * gnulib/import/stdlib.in.h: Update.
4675         * gnulib/import/str-two-way.h: Update.
4676         * gnulib/import/strchrnul.c: Update.
4677         * gnulib/import/strdup.c: Update.
4678         * gnulib/import/streq.h: Update.
4679         * gnulib/import/strerror-override.c: Update.
4680         * gnulib/import/strerror-override.h: Update.
4681         * gnulib/import/strerror.c: Update.
4682         * gnulib/import/string.in.h: Update.
4683         * gnulib/import/stripslash.c: Update.
4684         * gnulib/import/strnlen1.c: Update.
4685         * gnulib/import/strnlen1.h: Update.
4686         * gnulib/import/strstr.c: Update.
4687         * gnulib/import/strtok_r.c: Update.
4688         * gnulib/import/sys_stat.in.h: Update.
4689         * gnulib/import/sys_time.in.h: Update.
4690         * gnulib/import/sys_types.in.h: Update.
4691         * gnulib/import/tempname.c: Update.
4692         * gnulib/import/tempname.h: Update.
4693         * gnulib/import/time.in.h: Update.
4694         * gnulib/import/unistd--.h: Update.
4695         * gnulib/import/unistd-safer.h: Update.
4696         * gnulib/import/unistd.in.h: Update.
4697         * gnulib/import/unsetenv.c: Update.
4698         * gnulib/import/verify.h: Update.
4699         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4700         * gnulib/import/wchar.in.h: Update.
4701         * gnulib/import/wctype.in.h: Update.
4702         * gnulib/import/xalloc-oversized.h: Update.
4703         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4704         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4705
4706 2018-08-16  Gary Benson <gbenson@redhat.com>
4707
4708         PR gdb/13000:
4709         * gdb/main.c (captured_main_1): Exit with nonzero status
4710         in batch mode if the last command to be executed failed.
4711         * NEWS: Mention the above.
4712
4713 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4714
4715         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4716         end of warning message.
4717
4718 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4719
4720         PR gdb/22943:
4721         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4722         (aarch64_extract_return_value): Use
4723         aapcs_is_vfp_call_or_return_candidate.
4724         (aarch64_return_in_memory): Likewise.
4725         (aarch64_store_return_value): Likewise.
4726
4727 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4728
4729         * aarch64-tdep.c
4730         (aapcs_is_vfp_call_or_return_candidate): Make static
4731         (pass_in_v_or_stack): Remove function.
4732         (pass_in_v_vfp_candidate): New function.
4733         (aarch64_push_dummy_call): Check for float register candidates.
4734
4735 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4736
4737         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4738         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4739         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4740
4741 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4742
4743         PR build/23399
4744         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4745         (struct ipa_sym_addresses): Rename to...
4746         (struct ipa_sym_addresses_common): ... this.
4747         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4748
4749 2018-08-28  Tom Tromey  <tom@tromey.com>
4750
4751         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4752         (token_fifo): Now a std::vector.
4753         (yylex, c_parse): Update.
4754         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4755         (token_fifo): Now a std::vector.
4756         (yylex, d_parse): Update.
4757         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4758         (token_fifo): Now a std::vector.
4759         (yylex, go_parse): Update.
4760
4761 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4762
4763         * parser-defs.h (struct type_stack) <elements>: Change type to
4764         std::vector<union type_stack_elt>.
4765         <depth, size>: Remove.
4766         * parse.c (parse_exp_in_context_1): Adjust.
4767         (type_stack_reserve): Remove.
4768         (check_type_stack_depth): Remove.
4769         (insert_into_type_stack): Adjust to std::vector.
4770         (insert_type): Likewise.
4771         (push_type): Likewise.
4772         (push_type_int): Likewise.
4773         (insert_type_address_space): Likewise.
4774         (pop_type): Likewise.
4775         (pop_type_int): Likewise.
4776         (pop_typelist): Likewise.
4777         (pop_type_stack): Likewise.
4778         (append_type_stack): Likewise.
4779         (push_type_stack): Likewise.
4780         (get_type_stack): Likewise.
4781         (type_stack_cleanup): Likewise.
4782         (push_typelist): Likewise.
4783         (follow_types): Likewise.
4784         (_initialize_parse): Likewise.
4785
4786 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4787
4788         * NEWS: Mention csky target.
4789
4790 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4791             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4792             Don Breazeal  <donb@codesourcery.com>
4793
4794         * csky-linux-tdep.c: New file.
4795         * csky-tdep.c: Likewise.
4796         * csky-tdep.h: Likewise.
4797         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4798         csky-tdep.o.
4799         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4800         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4801         * configure.tgt: Add csky support.
4802
4803 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4804
4805         * python/py-framefilter.c (py_print_frame): Print frame architecture
4806         when printing on an MI output.
4807
4808 2018-08-27  Tom Tromey  <tom@tromey.com>
4809
4810         PR build/23087:
4811         * configure: Rebuild.
4812         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4813
4814 2018-08-27  Tom Tromey  <tom@tromey.com>
4815
4816         * aarch64-linux-tdep.c
4817         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4818         casts to int.
4819
4820 2018-08-27  Tom Tromey  <tom@tromey.com>
4821
4822         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4823         unsigned.
4824         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4825         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4826         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4827         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4828         unsigned.
4829
4830 2018-08-27  Tom Tromey  <tom@tromey.com>
4831
4832         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4833         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4834
4835 2018-08-27  Tom Tromey  <tom@tromey.com>
4836
4837         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4838         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4839         ULONGEST_MAX.
4840         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4841         ULONGEST_MAX.
4842         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4843         ULONGEST_MAX.
4844         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4845         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4846         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4847         ULONGEST_MAX.
4848         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4849         (ppc64_linux_sigaction_tramp_frame)
4850         (ppc32_linux_sighandler_tramp_frame)
4851         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4852         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4853         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4854         * mn10300-linux-tdep.c (am33_linux_sigframe)
4855         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4856         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4857         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4858         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4859         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4860         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4861         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4862         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4863         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4864         * microblaze-linux-tdep.c
4865         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4866         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4867         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4868         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4869         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4870         * common/common-types.h (ULONGEST_MAX): New define.
4871         (CORE_ADDR_MAX): Fix formatting.
4872         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4873         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4874         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4875         (arm_linux_rt_sigreturn_tramp_frame)
4876         (arm_eabi_linux_sigreturn_tramp_frame)
4877         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4878         (thumb2_eabi_linux_sigreturn_tramp_frame)
4879         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4880         (arm_linux_restart_syscall_tramp_frame)
4881         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4882         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4883         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4884         ULONGEST_MAX.
4885         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4886
4887 2018-08-27  Tom Tromey  <tom@tromey.com>
4888
4889         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4890         CORE_ADDR_MAX.
4891         * mips-tdep.c (mips_deal_with_atomic_sequence)
4892         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4893         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4894         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4895         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4896         CORE_ADDR_MAX.
4897         * aarch64-tdep.c (aarch64_software_single_step): Use
4898         CORE_ADDR_MAX.
4899
4900 2018-08-27  Tom Tromey  <tom@tromey.com>
4901
4902         * linespec.c (complete_linespec_component): Add cast to "char".
4903         * completer.c (completion_tracker::build_completion_result): Add
4904         cast to "char".
4905
4906 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4907
4908         * solist.h (struct solist, struct target_so_ops): Fix
4909         indentation.
4910
4911 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4912
4913         * ada-tasks.c (ada_task_info_s): Remove typedef.
4914         (DEF_VEC_O(ada_task_info_s)): Remove.
4915         (struct ada_tasks_inferior_data): Initialize fields.
4916         <task_list>: Make an std::vector.
4917         (get_ada_tasks_inferior_data): Allocate with new.
4918         (ada_get_task_number): Adjust.
4919         (get_task_number_from_id): Likewise.
4920         (valid_task_id): Likewise.
4921         (ada_get_task_info_from_ptid): Likewise.
4922         (iterate_over_live_ada_tasks): Likewise.
4923         (add_ada_task): Likewise.
4924         (read_known_tasks): Likewise.
4925         (ada_build_task_list): Likewise.
4926         (print_ada_task_info): Likewise.
4927         (info_task): Likewise.
4928         (task_command_1): Likewise.
4929
4930 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4931
4932         * ada-lang.c (add_angle_brackets): Return std::string.
4933
4934 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4935
4936         * python/py-threadevent.c (py_get_event_thread): Initialize
4937         pythread.
4938
4939 2018-08-24  Pedro Alves  <palves@redhat.com>
4940
4941         * python/py-bpevent.c (create_breakpoint_event_object): Use
4942         copy-initialization.
4943         * python/py-continueevent.c (emit_continue_event): Use
4944         copy-initialization.
4945         * python/py-exitedevent.c (create_exited_event_object): Return a
4946         gdbpy_ref<>.
4947         (emit_exited_event): Use copy-initialization.
4948         * python/py-inferior.c (python_new_inferior)
4949         (python_inferior_deleted, add_thread_object): Use
4950         copy-initialization.
4951         * python/py-infevents.c (create_inferior_call_event_object)
4952         (create_register_changed_event_object)
4953         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4954         (emit_inferior_call_event, emit_memory_changed_event)
4955         (emit_register_changed_event): Use copy-initialization.
4956         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4957         Return a gdbpy_ref<>.
4958         (emit_new_objfile_event): Use copy-initialization.
4959         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4960         (emit_clear_objfiles_event): Use copy-initialization.
4961         * python/py-signalevent.c (create_signal_event_object): Use
4962         copy-initialization.
4963         * python/py-threadevent.c (create_thread_event_object): Use
4964         copy-initialization.
4965
4966 2018-08-24  Pedro Alves  <palves@redhat.com>
4967             Simon Marchi  <simon.marchi@ericsson.com>
4968
4969         PR gdb/23379
4970         * python/py-continueevent.c: Include "gdbthread.h".
4971         (create_continue_event_object): Add intro comment.  Add 'ptid'
4972         parameter.  Use it to find thread to pass to
4973         create_thread_event_object.
4974         (emit_continue_event): Pass PTID down to
4975         create_continue_event_object.
4976         * python/py-event.h (py_get_event_thread): Declare.
4977         (create_thread_event_object): Remove default from 'thread'
4978         parameter.
4979         * python/py-stopevent.c (create_stop_event_object): Use
4980         py_get_event_thread.
4981         * python/py-threadevent.c (get_event_thread): Rename to ...
4982         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4983         and use it to find the thread.
4984         (create_thread_event_object): Assert that THREAD isn't null.
4985         Don't find the event thread here.
4986
4987 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4988
4989         * block.h (blockrange, blockranges): New struct declarations.
4990         (struct block): Add new field named `ranges'.
4991         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4992         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4993         macros for accessing ranges in struct block.
4994         (make_blockranges): New declaration.
4995         block.c (make_blockranges): New function.
4996         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4997         for block.
4998         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4999         * blockframe.c (cache_pc_function_block): New static global.
5000         (clear_pc_function_cache): Clear cache_pc_function_block.
5001         (find_pc_partial_function): Move comment to symtab.h.  Add
5002         support for non-contiguous blocks.
5003         * cli/cli-cmds.c (block.h): Include.
5004         (print_disassembly): Handle printing of non-contiguous blocks.
5005         (disassemble_current_function): Likewise.
5006         (disassemble_command): Likewise.
5007
5008         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5009         BLOCK_START.
5010         * blockframe.c (get_pc_function_start): Likewise.
5011         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5012         (gcc_symbol_address): Likewise.
5013         * compile/compile-object-run.c (compile_object_run): Likewise.
5014         * compile/compile.c (get_expr_block_and_pc): Likewise.
5015         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5016         (func_addr_to_tail_call_list): Likewise.
5017         * findvar.c (default_read_var_value): Likewise.
5018         * inline-frame.c (inline_frame_this_id): Likewise.
5019         (skip-inline_frames): Likewise.
5020         * infcmd.c (until_next_command): Likewise.
5021         * linespec.c (convert_linespec_to_sals): Likewise.
5022         * parse.c (parse_exp_in_context_1): Likewise.
5023         * printcmd.c (build_address_symbolic): likewise.
5024         (info_address_command): Likewise.
5025         symtab.c (find_function_start_sal): Likewise.
5026         (skip_prologue_sal): Likewise.
5027         (find_function_alias_target): Likewise.
5028         (find_gnu_ifunc): Likewise.
5029         * stack.c (find_frame_funname): Likewise.
5030         * symtab.c (fixup_symbol_section): Likewise.
5031         (find_function_start_sal): Likewise.
5032         (skip_prologue_sal): Likewsie.
5033         (find_function_alias_target): Likewise.
5034         (find_gnu_ifunc): Likewise.
5035         * tracepoint.c (info_scope_command): Likewise.
5036         * value.c (value_fn_field): Likewise.
5037
5038         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5039         in place of find_pc_partial_function.
5040         * blockframe.c (find_function_entry_range_from_pc): New function.
5041         * symtab.h (find_function_entry_range_from_pc): Declare and document.
5042         * objfiles.c (objfile_relocate1): Relocate start and end addresses
5043         for each range in a block.
5044
5045
5046 2018-08-23  Xavier Roirand  <roirand@adacore.com>
5047
5048         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5049         incrementation.
5050
5051 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5052
5053         * solib-svr4.c (read_program_headers_from_bfd): Return
5054         gdb::optional<gdb::byte_vector>.
5055         (svr4_exec_displacement): Adjust.
5056
5057 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5058
5059         * solib-svr4.c (read_program_header): Return
5060         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5061         (find_program_interpreter): Return
5062         gdb::optional<gdb::byte_vector>.
5063         (scan_dyntag_auxv): Adjust.
5064         (enable_break): Adjust.
5065         (svr4_exec_displacement): Adjust.
5066
5067 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5068
5069         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5070         * inf-child.c (inf_child_target::terminal_save_inferior): New.
5071
5072 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5073
5074         * guile/scm-string.c (gdbscm_scm_from_printf): Use
5075         string_vprintf.
5076         * guile/scm-utils.c (gdbscm_printf): Likewise.
5077         * serial.c (serial_printf): Likewise.
5078         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5079
5080 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
5081
5082         * stack.c (print_frame): Print frame architecture when printing on
5083         an MI output.
5084         * NEWS: Mention new "arch" attribute in frame output.
5085
5086 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5087
5088         * arch/aarch64.h (aarch64_regnum): Update comment.
5089
5090 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5091
5092         * NEWS: Add SVE to 8.2 section.
5093
5094 2018-08-21  Pedro Alves  <palves@redhat.com>
5095
5096         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5097         out from gdbscm_parse_function_args.
5098         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5099         gdbscm_parse_function_args_1.
5100
5101 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
5102
5103         PR gdb/17816
5104         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5105         operator.
5106
5107 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
5108
5109         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5110
5111 2018-08-19  Michael Spang  <spang@google.com>
5112
5113         PR gdb/11786
5114         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5115         for PT_TLS segments.
5116
5117 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
5118
5119         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5120         dwarf_variable_value.
5121         * dwarf2-frame.c (class dwarf_expr_executor):
5122         Add override for dwarf_variable_value.
5123         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5124         (class symbol_needs_eval_context): Likewise.
5125         (indirect_synthetic_pointer): Add forward declaration.
5126         (sect_variable_value): New function.
5127         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5128         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5129         for DW_OP_GNU_variable_value.
5130
5131 2018-08-16  Tom Tromey  <tom@tromey.com>
5132
5133         * top.c (read_command_file): Update.
5134         (command_line_input): Remove "repeat" argument.
5135         * ada-lang.c (get_selections): Update.
5136         * linespec.c (decode_line_2): Update.
5137         * defs.h (command_line_input): Remove argument.
5138         * cli/cli-script.c (read_next_line): Update.
5139         * python/py-gdb-readline.c: Update.
5140
5141 2018-08-17  Tom Tromey  <tom@tromey.com>
5142
5143         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5144         command_line_input.
5145
5146 2018-08-15  Tom Tromey  <tom@tromey.com>
5147
5148         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5149
5150 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
5151
5152         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5153         If used, use find_pc_partial_function to find address range
5154         to disassemble.
5155         * mi/mi-main.c (mi_cmd_list_features): Report
5156         "data-disassemble-a-option" feature.
5157         * NEWS: Mention new -data-disassemble option -a.
5158
5159 2018-08-13  Tom Tromey  <tom@tromey.com>
5160
5161         * common/common-defs.h (_FORTIFY_SOURCE): Define.
5162
5163 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5164
5165         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5166         (aarch64_linux_collect_sve_regset): Likewise.
5167         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5168         * regcache.h (regcache_map_entry_size): New function.
5169
5170 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5171
5172         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5173         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5174         (SVE_HEADER_VL_LENGTH): Likewise.
5175         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5176         (SVE_HEADER_FLAGS_LENGTH): Likewise.
5177         (SVE_HEADER_RESERVED_LENGTH): Likewise.
5178         (SVE_HEADER_SIZE_OFFSET): Likewise.
5179         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5180         (SVE_HEADER_VL_OFFSET): Likewise.
5181         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5182         (SVE_HEADER_FLAGS_OFFSET): Likewise.
5183         (SVE_HEADER_RESERVED_OFFSET): Likewise.
5184         (SVE_HEADER_SIZE): Likewise.
5185         (aarch64_linux_core_read_vq): Add function.
5186         (aarch64_linux_core_read_description): Check for SVE section.
5187
5188 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5189
5190         * aarch64-fbsd-tdep.c
5191         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5192         collect_size.
5193         * aarch64-linux-tdep.c
5194         (aarch64_linux_iterate_over_regset_sections): Likewise.
5195         * alpha-linux-tdep.c
5196         (alpha_linux_iterate_over_regset_sections):
5197         * alpha-nbsd-tdep.c
5198         (alphanbsd_iterate_over_regset_sections): Likewise.
5199         * amd64-fbsd-tdep.c
5200         (amd64fbsd_iterate_over_regset_sections): Likewise.
5201         * amd64-linux-tdep.c
5202         (amd64_linux_iterate_over_regset_sections): Likewise.
5203         * arm-bsd-tdep.c
5204         (armbsd_iterate_over_regset_sections): Likewise.
5205         * arm-fbsd-tdep.c
5206         (arm_fbsd_iterate_over_regset_sections): Likewise.
5207         * arm-linux-tdep.c
5208         (arm_linux_iterate_over_regset_sections): Likewise.
5209         * corelow.c (get_core_registers_cb): Likewise.
5210         (core_target::fetch_registers): Likewise.
5211         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5212         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5213         * gdbarch.h (void): Regenerate.
5214         * gdbarch.sh: Add supply_size and collect_size.
5215         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5216         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5217         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5218         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5219         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5220         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5221         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5222         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5223         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5224         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5225         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5226         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5227         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5228         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5229         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5230         Likewise.
5231         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5232         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5233         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5234         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5235         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5236         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5237         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5238         Likewise.
5239         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5240         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5241         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5242         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5243         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5244         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5245         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5246         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5247
5248 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
5249
5250         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5251         with string_printf.
5252
5253 2018-08-10  Keith Seitz  <keiths@redhat.com>
5254
5255         * compile/compile-c-support.c (add_code_header, add_code_footer):
5256         Move into policy class.
5257         (c_push_user_expression, pop_user_expression_nop)
5258         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5259         (compile_program): New host class.
5260         (c_compile_program): New typedef.
5261         (c_compute_porgram): Use c_compile_program.
5262
5263 2018-08-10  Keith Seitz  <keiths@redhat.com>
5264
5265         * compile/compile-internal.h (compile_instance::~compile_instance):
5266         Remove calls to htab_delete.
5267         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5268         * compile.c (compile_instance::compile_instance): Initialize
5269         htab unique pointers.
5270         (compile_instance::get_cached_type, compile_instance::insert_type)
5271         (compile_instance::error_symbol_once): Update for unique_ptr.
5272
5273 2018-08-10  Keith Seitz  <keiths@redhat.com>
5274
5275         * compile/compile-c-symbols.c (struct symbol_error)
5276         (hash_symbol_error, eq_symbol_error, del_symbol_error)
5277         (compile_instance::insert_symbol_error)
5278         (compile_instance::error_symbol_once): Move to ...
5279         * compile/compile.c: ... here.
5280
5281 2018-08-10  Keith Seitz  <keiths@redhat.com>
5282
5283         * compile/compile-c-support.c (c_get_compile_context): Use `new'
5284         instead of `new_compile_instance'.
5285         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5286         Update description.
5287         If the symbol error map is not initialized, create it.
5288         (generate_c_for_for_one_symbol): Do not check/initialize
5289         the symbol error map.
5290         * compile/compile-c-types.c (compile_c_instance): Make a class.
5291         Update all callers.
5292         (compile_instance::compile_instance): Initialize the type cache.
5293         (get_cached_type): New function.
5294         (insert_type): Update description.
5295         (compile_c_instance::m_default_cflags): Define.
5296         (convert_type): Update description.  Use get_cached_type.
5297         (delete_instance): Moved to destructor.
5298         (new_compile_instance): Moved to constructor.
5299         * compile/compile-c.h (compile_c_instance): Make class inheriting
5300         from compile_instance.
5301         <base>: Remove field.
5302         <type_map, symbol_err_map>: Move to base class.
5303         <c_plugin>: Rename to `m_plugin' and remove pointer type.
5304         * compile/compile-internal.h (compile_instance): Make class.
5305         <type_map_t, symbol_err_map_t>: Define.
5306         <fe>: Rename to `m_gcc_fe'.
5307         <scope, block, gcc_target_options>: Add `m_' prefix.
5308         <m_type_map, m_symbol_err_map>: New fields, moved from
5309         compile_c_instance.
5310         <destroy>: Remove.
5311         (convert_type, new_compile_instance): Remove.
5312         * compile/compile.c (cleanup_compile_instance): Remove.
5313         (compile_to_object): Use unique_ptr to eliminate cleanups.
5314         (compile_instance::set_print_callback, compile_instance::version)
5315         (compile_instance::set_verbose)
5316         (compile_instance::set_driver_filename)
5317         (compile_instance::set_triplet_regexp)
5318         (compile_instance::set_arguments)
5319         (compile_instance::set_source_file)
5320         (compile_instance::compile): Define.
5321
5322 2018-08-10  Keith Seitz  <keiths@redhat.com>
5323
5324         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5325         * compile/compile-c-types.c: Define GCC_METHODN macros and include
5326         gcc-c-fe.def to define C plugin.
5327         (delete_instance): Delete `c_plugin'.
5328         (new_compile_instance): Initialize `c_plugin'.
5329         * compile/compile-c.h: Include gcc_c_plugin.h.
5330         (struct compile_c_instance) <c_plugin>: New member.
5331         * gcc-c-plugin.h: New file.
5332         Update all callers with API change.
5333
5334 2018-08-10  Keith Seitz  <keiths@redhat.com>
5335
5336         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5337         (HFILES_NO_SRCDIR): ... to here.
5338         Add compile-internal.h and compile-c.h.
5339         * compile/compile-c-support.c: Include compile-c.h.
5340         * compile/compile-c-symbols.c: Include compile-c.h.
5341         (generate_c_for_variable_locations): Update comment.
5342         * compile/compile-c-types.c: Include compile-c.h.
5343         * compile/compile-c.h: New file -- moved C language declarations
5344         from other files here.
5345         * compile/compile-internal.h: Do not include hashtab.h or
5346         common/enum-flags.h.
5347         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5348         (gcc_convert_symbol, gcc_symbol_address)
5349         (generate_c_for_variable_locations, c_get_mode_for_size)
5350         (c_get_range_decl_name): Definitions moved to compile-c.h.
5351         * compile/compile-loc2c.c: Include compile-c.h.
5352
5353 2018-08-10  Keith Seitz  <keiths@redhat.com>
5354
5355         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5356         (c_symbol_substitution_name): ... this.
5357         Update all callers.
5358
5359 2018-08-10  Keith Seitz  <keiths@redhat.com>
5360
5361         * compile/compile-c-support.c (c_compute_program): Use
5362         unique_xmalloc_ptr to eliminate cleanup.
5363         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5364         Return a unique_xmalloc_ptr and eliminate cleanup.
5365         * compile/compile-internal.h (generate_c_for_variable_locations):
5366         Return unique_xmalloc_ptr and update description.
5367
5368 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5369
5370         * corelow.c (core_target::get_core_register_section): Rename
5371         min_size to section_min_size.
5372
5373 2018-08-09  Jim Wilson  <jimw@sifive.com>
5374
5375         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5376         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5377         * NEWS: Mention new GNU/Linux RISC-V target.
5378         * configure.host: Add riscv*-*-linux*.
5379         * configure.nat: Add riscv*.
5380         * configure.tgt: Add riscv*-*-linux*.
5381         * riscv-linux-nat.c: New file.
5382         * riscv-linux-tdep.c: New file.
5383
5384 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5385
5386         * infrun.c (resume): Make static, add forward declaration.
5387         (proceed): Update header comment.
5388         * infrun.h (resume): Delete declaration.
5389
5390 2018-08-09  Tom Tromey  <tom@tromey.com>
5391
5392         * riscv-tdep.h: Minor formatting fixes.
5393
5394 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5395
5396         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5397         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5398         (test_mkdir_recursive): Likewise.
5399         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5400
5401 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5402
5403         * valarith.c (value_subscripted_rvalue): If an array is not in
5404         memory, and we don't know the upper bound, then we can't know that
5405         the requested element exists or not.
5406
5407 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5408
5409         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5410         (target_options_to_string): Add comment.
5411
5412 2018-08-08  Tom Tromey  <tom@tromey.com>
5413
5414         * unittests/scoped_mmap-selftests.c: Check result of "write".
5415
5416 2018-08-08  Jim Wilson  <jimw@sifive.com>
5417
5418         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5419         (decode_register_index_short): New.
5420         (decode_j_type_insn, decode_cj_type_insn): New.
5421         (decode_b_type_insn, decode_cb_type_insn): New.
5422         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5423         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5424         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5425         is_c_sw_insn instead of is_sw_insn.
5426         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5427         (riscv_software_single_step): New.
5428         * riscv-tdep.h (riscv_software_single_step): Declare.
5429
5430         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5431         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5432
5433 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5434
5435         PR gdb/18050:
5436         * target.c (dispose_inferior): Don't dispose of inferiors that are
5437         already killed.
5438
5439 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5440
5441         * remote.c (remote_target::download_tracepoint): Change char* to
5442         const char*.
5443
5444 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5445
5446         * target.h (target_options_to_string): Return an std::string.
5447         * target.c (str_comma_list_concat_elem): Return void, use
5448         std::string.
5449         (do_option): Likewise.
5450         (target_options_to_string): Return an std::string.
5451         * linux-nat.c (linux_nat_target::wait): Adjust.
5452         * target-debug.h (target_debug_print_options): Adjust.
5453
5454 2018-08-07  Tom Tromey  <tom@tromey.com>
5455
5456         * Makefile.in (CPPFLAGS): New variable.
5457         (INTERNAL_CPPFLAGS): Use it.
5458
5459 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5460
5461         * NEWS: Mention the index cache.
5462
5463 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5464
5465         * common/pathstuff.h (get_standard_cache_dir): New.
5466         * common/pathstuff.c (get_standard_cache_dir): New.
5467         * build-id.h (build_id_to_string): New.
5468         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5469         DEBUG_STR_SUFFIX): Move to here.
5470         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5471         DEBUG_STR_SUFFIX): Move from there.
5472         (write_psymtabs_to_index): Make non-static, add basename
5473         parameter.  Write to temporary files, rename when done.
5474         (save_gdb_index_command): Adjust call to
5475         write_psymtabs_to_index.
5476         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5477         field.
5478         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5479         (get_gdb_index_contents_from_cache): New.
5480         (get_gdb_index_contents_from_cache_dwz): New.
5481         (dwarf2_initialize_objfile): Read index from cache.
5482         (dwarf2_build_psymtabs): Save to index.
5483         * dwarf-index-cache.h: New file.
5484         * dwarf-index-cache.c: New file.
5485         * dwarf-index-write.h: New file.
5486
5487 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5488
5489         * gnulib/aclocal.m4: Re-generate.
5490         * gnulib/config.in: Re-generate.
5491         * gnulib/configure: Re-generate.
5492         * gnulib/import/Makefile.am: Re-generate.
5493         * gnulib/import/Makefile.in: Re-generate.
5494         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5495         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5496         * gnulib/import/m4/mkdir.m4: New file.
5497         * gnulib/import/mkdir.c: New file.
5498         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5499         module.
5500
5501 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5502
5503         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5504         * common/scoped_mmap.c: New file.
5505         * common/scoped_mmap.h (destroy): New method.
5506         (~scoped_mmap, reset): Use destroy.
5507         (scoped_mmap): New move constructor.
5508         (mmap_file): New declaration.
5509         * unittests/scoped_mmap-selftests.c (test_normal,
5510         test_invalid_filename, run_tests): New functions.
5511         (_initialize_scoped_mmap_selftests): Register selftest.
5512
5513 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5514
5515         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5516         (read_gdb_index_from_buffer): ... this.  Remove section
5517         parameter, add buffer parameter.
5518         (get_gdb_index_contents_ftype,
5519         get_gdb_index_contents_dwz_ftype): New typedefs.
5520         (dwarf2_read_gdb_index): Add callback parameters to get the
5521         index contents.
5522         (get_gdb_index_contents_from_section): New.
5523         (dwarf2_initialize_objfile): Update call to
5524         dwarf2_read_gdb_index.
5525
5526 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5527
5528         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5529         (gdb_open_cloexec): Likewise.
5530         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5531         (commandline_from_pid): Likewise.
5532         (linux_xfer_osdata_threads): Likewise.
5533         (linux_xfer_osdata_fds): Likewise.
5534         * ada-lang.c (is_package_name): Likewise.
5535         * auxv.c (procfs_xfer_auxv): Likewise.
5536         * breakpoint.c (print_one_breakpoint_location): Use
5537         uiout::field_fmt.
5538         (print_one_catch_solib): Use string_printf.
5539         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5540         (add_pe_forwarded_sym): Likewise.
5541         * dwarf2read.c (create_type_unit_group): Likewise.
5542         (build_error_marker_type): Likewise.
5543         * infcall.c (get_function_name): Likewise.
5544         * valprint.c (print_converted_chars_to_obstack): Likewise.
5545         * xtensa-tdep.c (xtensa_register_type): Likewise.
5546
5547 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5548
5549         * remote.c (remote_target::download_tracepoint): Fix format
5550         string errors.
5551
5552 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5553
5554         * tracefile.c: Include common/byte-vector.h.
5555         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5556         with trace_regblock_size if needed.  Update uses of buf.
5557
5558 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5559
5560         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5561         std::vector<unsigned char>.
5562         * tracepoint.c (collection_list::collection_list): Remove
5563         m_regs_mask initializer from initializer list.  Resize
5564         m_regs_mask using the largest remote register number.
5565         (collection_list::add_remote_register): Remove size check on
5566         m_regs_mask.  Use at to access element.
5567         (collection_list::stringify): Change type of temp_buf to
5568         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5569         stringify the register mask.  Use pack_hex_byte for the register
5570         mask.
5571
5572 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5573
5574         * tracepoint.h (class collection_list) <add_register>: Remove.
5575         <add_remote_register, add_ax_registers, add_local_register>:
5576         Declare.
5577         <add_memrange>: Add scope parameter.
5578         * tracepoint.c (encode_actions_1): Likewise.
5579         (collection_list::add_register): Rename to ...
5580         (collection_list::add_remote_register): ... this.  Update
5581         comment.
5582         (collection_list::add_ax_registers, add_local_register): New
5583         methods.
5584         (collection_list::add_memrange): Add scope parameter.  Call
5585         add_local_register instead of add_register.
5586         (finalize_tracepoint_aexpr): New function.
5587         (collection_list::collect_symbol): Update calls to add_memrange.
5588         Call add_local_register instead of add_register.  Call
5589         add_ax_registers.  Call finalize_tracepoint_aexpr.
5590         (encode_actions_1): Get remote regnos for $reg action.  Call
5591         add_remote_register, add_ax_registers, and add_local_register.
5592         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5593         (validate_actionline): Call finalize_tracepoint_aexpr.
5594
5595 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5596
5597         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5598         Replace array buf with gdb::char_vector buf, of size
5599         get_remote_packet_size ().  Replace references to buf and
5600         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5601         and xsnprintf with snprintf.  Raise errors if the buffer is too
5602         small.
5603
5604 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5605
5606         * remote.c (remote_target::download_tracepoint): Fix the has_more
5607         predicate in the QTDP action list iteration.
5608
5609 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5610
5611         * remote.c (remote_target::download_tracepoint): Fix indentation
5612         in for block.
5613
5614 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5615
5616         * proc-api.c (_initialize_proc_api): Remove c, unused.
5617         * procfs.c (procfs_init_inferior): Remove signals, unused.
5618         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5619         unused.
5620
5621 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5622             Andrew Burgess  <andrew.burgess@embecosm.com>
5623
5624         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5625         'W_STOPCODE (0)' as this could be ambiguous.
5626
5627 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5628
5629         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5630         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5631         "ai_socktype").
5632
5633 2018-08-02  Tom Tromey  <tom@tromey.com>
5634
5635         PR symtab/16842.
5636         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5637         symbols.
5638         (process_structure_scope): Likewise.
5639
5640 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5641
5642         PR gdb/22629:
5643         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5644         kill inferior.
5645
5646 2018-08-02  Tom Tromey  <tom@tromey.com>
5647
5648         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5649         (darwin_suspend_inferior, darwin_resume_inferior)
5650         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5651         (darwin_check_new_threads): Check result of get_darwin_inferior.
5652
5653 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5654
5655         GDB 8.1.1 released.
5656
5657 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5658
5659         * varobj.c (varobj_get_path_expr_parent): Report an error if
5660         parent is a dynamic varobj.
5661
5662 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5663
5664         * gnulib/aclocal.m4: Re-generate.
5665         * gnulib/config.in: Re-generate.
5666         * gnulib/configure: Re-generate.
5667         * gnulib/import/Makefile.in: Re-generate.
5668         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5669         * gnulib/import/m4/onceonly.m4: Re-generate.
5670
5671 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5672
5673         * target-descriptions.c (struct xml_test_tdesc): New.
5674         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5675         (record_xml_tdesc): Update.
5676         (maintenance_check_xml_descriptions): Update.
5677         * target-descriptions.h (record_xml_tdesc): Update comment.
5678
5679 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5680
5681         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5682         checking array bounds are defined.
5683
5684 2018-07-30  Tom Tromey  <tom@tromey.com>
5685
5686         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5687         irreflexivity violation.
5688
5689 2018-07-30  Tom Tromey  <tom@tromey.com>
5690
5691         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5692         * value.c (unpack_long): Remove lint code.
5693         * valops.c (value_ind): Remove lint code.
5694         * valarith.c (value_x_binop, value_x_unop, value_equal)
5695         (value_pos): Remove lint code.
5696
5697 2018-07-28  Tom de Vries  <tdevries@suse.de>
5698
5699         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5700         with undefined upper bound as <optimized out>.
5701
5702 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5703
5704         * gcore.in: Rename variable "name" to "prefix".  Expand
5705         "usage" text.
5706
5707 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5708
5709         * windows-nat.c (windows_nat_target::create_inferior): Update to
5710         call close() in global namespace.
5711
5712 2018-07-26  Tom Tromey  <tom@tromey.com>
5713
5714         * dwarf-index-write.c (add_address_entry): Don't add objfile
5715         offsets.
5716         * dbxread.c (find_stab_function): Rename from
5717         find_stab_function_addr.  Return a bound_minimal_symbol.
5718         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5719         Don't add objfile offsets.
5720         (end_psymtab): Use raw_text_low, raw_text_high,
5721         MSYMBOL_VALUE_RAW_ADDRESS.
5722         (read_ofile_symtab): Update.
5723         (process_one_symbol): Update.
5724         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5725         offsets.
5726         (dw2_relocate): Remove.
5727         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5728         searching addrmap.
5729         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5730         Update.
5731         (process_psymtab_comp_unit_reader, add_partial_symbol)
5732         (add_partial_subprogram, dwarf2_ranges_read): Update.
5733         (load_partial_dies): Update.
5734         (add_address_entry): Don't add objfile offsets.
5735         (dwarf2_build_include_psymtabs): Update.
5736         (create_addrmap_from_aranges): Don't add objfile offsets.
5737         (dw2_find_pc_sect_compunit_symtab): Update.
5738         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5739         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5740         Update.
5741         (parse_partial_symbols): Don't add objfile offsets.  Use
5742         raw_text_low, raw_text_high.  Update.
5743         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5744         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5745         or call 'relocate' quick function.  Clear psymbol_map.
5746         * psympriv.h (struct partial_symbol) <address>: Add section
5747         offset.
5748         <set_unrelocated_address>: Rename from set_address.
5749         <raw_text_low, raw_text_high>: New methods.
5750         <text_low, text_high>: Add objfile parameter.
5751         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5752         set_unrelocated_address.
5753         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5754         (find_pc_psymbol): Update.
5755         (fixup_psymbol_section, relocate_psymtabs): Remove.
5756         (dump_psymtab, psym_functions): Update.
5757         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5758         parameter.
5759         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5760         (start_psymtab_common): Update.
5761         * symfile-debug.c (debug_qf_relocate): Remove.
5762         (debug_sym_quick_functions): Update.
5763         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5764         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5765         Update.
5766
5767 2018-07-26  Tom Tromey  <tromey@redhat.com>
5768
5769         * dbxread.c (end_psymtab): Use text_high_valid and
5770         text_low_valid.
5771         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5772         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5773         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5774         Update comment.
5775         <text_low_valid, text_high_valid>: New fields.
5776         <set_text_low, set_text_high>: Update.
5777         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5778
5779 2018-07-26  Tom Tromey  <tom@tromey.com>
5780
5781         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5782         Update.
5783         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5784         textlow and texthigh fields.
5785         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5786         Update.
5787         * mdebugread.c (parse_lines, parse_partial_symbols)
5788         (psymtab_to_symtab_1): Update.
5789         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5790         Rename fields.  Update comment.  Now private.
5791         <text_low, text_high, set_text_low, set_text_high>: New methods.
5792         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5793         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5794         (start_psymtab_common, maintenance_info_psymtabs)
5795         (maintenance_check_psymtabs): Update.
5796         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5797         texthigh fields.
5798         (scan_xcoff_symtab): Update.
5799
5800 2018-07-26  Tom Tromey  <tromey@redhat.com>
5801
5802         * psympriv.h (struct partial_symbol) <unrelocated_address,
5803         address, set_address>: New methods.
5804         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5805         (fixup_psymbol_section, relocate_psymtabs): Update.
5806         (print_partial_symbols): Add 'objfile' parameter.  Update.
5807         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5808         Update.
5809
5810 2018-07-26  Tom Tromey  <tom@tromey.com>
5811
5812         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5813         (debug_names::write_psymbols): Update.
5814         * psympriv.h (struct partial_symbol): Derive from
5815         general_symbol_info.
5816         <obj_section>: New method.
5817         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5818         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5819         (find_pc_sect_psymbol, fixup_psymbol_section)
5820         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5821         (print_partial_symbols, recursively_search_psymtabs)
5822         (compare_psymbols, psymbol_hash, psymbol_compare)
5823         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5824         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5825
5826 2018-07-26  Tom Tromey  <tromey@redhat.com>
5827
5828         * dbxread.c (end_psymtab): Remove dead code.
5829
5830 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5831
5832         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5833         DWARF unwinders are disabled.
5834         * dwarf2-frame.c: Add dwarf2read.h include.
5835         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5836         disabled.
5837         (dwarf2_frame_unwinders_enabled_p): Define.
5838         (show_dwarf_unwinders_enabled_p): New function.
5839         (_initialize_dwarf2_frame): Register switch to control DWARF
5840         unwinder use.
5841         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5842         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5843         (show_dwarf_cmdlist): Remove static keyword.
5844         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5845         (show_dwarf_cmdlist): Declare.
5846         * NEWS: Document new feature.
5847
5848 2018-07-26  Tom de Vries  <tdevries@suse.de>
5849
5850         PR breakpoints/23366
5851         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5852
5853 2018-07-26  Tom de Vries  <tdevries@suse.de>
5854
5855         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5856         DW_AT_count can't be translated to a dynamic prop.
5857
5858 2018-07-25  Tom de Vries  <tdevries@suse.de>
5859
5860         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5861         try/catch.
5862
5863 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5864
5865         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5866
5867 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5868
5869         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5870
5871 2018-07-24  Keith Seitz  <keiths@redhat.comt
5872
5873         PR symtab/23010
5874         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5875         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5876         instead of add_symbol_to_list.
5877         (read_file_scope): Call prepare_one_comp_unit before reading
5878         any other DIEs.
5879
5880 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5881
5882         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5883
5884 2018-07-24  Tom Tromey  <tom@tromey.com>
5885
5886         * utils.c (malloc, realloc, free): Don't declare.
5887         * configure, config.in: Rebuild.
5888         * configure.ac: Don't check for declarations of free, malloc, or
5889         realloc.
5890
5891 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5892
5893         * aarch64-linux-nat.c
5894         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5895         variable.
5896         * arm-linux-nat.c (fetch_regs): Likewise.
5897         (store_regs): Likewise.
5898         (fetch_vfp_regs): Likewise.
5899         (store_vfp_regs): Likewise.
5900         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5901         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5902         (arm_linux_nat_target::insert_watchpoint): Likewise.
5903         (arm_linux_nat_target::remove_watchpoint): Likewise.
5904         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5905         Likewise.
5906         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5907         Likewise.
5908         * ppc-linux-nat.c (fetch_register): Likewise.
5909         (fetch_all_gp_regs): Likewise.
5910         (fetch_ppc_registers): Likewise.
5911         (store_all_gp_regs): Likewise.
5912         (store_ppc_registers): Likewise.
5913         (hwdebug_insert_point): Likewise.
5914         (can_use_watchpoint_cond_accel): Likewise.
5915         * remote-sim.c (gdb_os_write_stdout): Likewise.
5916
5917 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5918             Tom Tromey  <tom@tromey.com>
5919
5920         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5921         test for it.
5922         * configure: Rebuild.
5923
5924 2018-07-22  Tom Tromey  <tom@tromey.com>
5925
5926         * regformats/regdat.sh: Define xmltarget_${name} inside
5927         #ifndef IN_PROCESS_AGENT.
5928
5929 2018-07-22  Tom Tromey  <tom@tromey.com>
5930
5931         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5932
5933 2018-07-22  Tom Tromey  <tom@tromey.com>
5934
5935         * symfile.c (reread_symbols): Notify iter, not objfile.
5936
5937 2018-07-22  Tom Tromey  <tom@tromey.com>
5938
5939         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5940         Use arch_ops.
5941         (ravenscar_thread_target::prepare_to_store): Likewise.
5942
5943 2018-07-22  Tom Tromey  <tom@tromey.com>
5944
5945         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5946         unused variable.  Call value_fetch_lazy when needed.
5947         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5948         Remove unused variable.  Call value_fetch_lazy when needed.
5949
5950 2018-07-22  Tom Tromey  <tom@tromey.com>
5951
5952         * m32c-tdep.c (mark_dma): Return void.
5953         (make_regs): Remove unused declarations.
5954
5955 2018-07-22  Tom Tromey  <tom@tromey.com>
5956
5957         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5958         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5959         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5960         bkscm_get_valid_block_smob_arg_unsafe for effect.
5961
5962 2018-07-22  Tom Tromey  <tom@tromey.com>
5963
5964         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5965         value_type.
5966
5967 2018-07-22  Tom Tromey  <tom@tromey.com>
5968
5969         * windows-nat.c (saved_context): Conditionally define.
5970         * remote.c (remote_target::remote_btrace_maybe_reopen):
5971         Conditionally declare "warned".
5972         * inflow.c (sigquit_ours): Conditionally define.
5973         (new_tty): Move "tty" declaration inside #if.
5974         * guile/guile.c (guile_datadir): Conditionally define.
5975         * charset.c (set_be_le_names): Move some declarations inside #if.
5976         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5977         #if.
5978         (parse_xml_btrace_conf): Likewise.
5979
5980 2018-07-22  Tom Tromey  <tom@tromey.com>
5981
5982         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5983
5984 2018-07-22  Tom Tromey  <tom@tromey.com>
5985
5986         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5987         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5988         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5989         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5990         * stack.c (frame_apply_level_command): Remove unused variable.
5991         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5992         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5993         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5994         unused variable.
5995         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5996         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5997         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5998         variable.
5999         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6000         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6001         variable.
6002         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6003         Remove unused variable.
6004         * cli/cli-script.c (recurse_read_control_structure): Remove unused
6005         variable.
6006         * common/tdesc.c (print_xml_feature::visit): Remove unused
6007         variable.
6008         * compile/compile-object-load.c (store_regs): Remove unused
6009         variables.
6010         * complaints.c (clear_complaints): Remove unused variable.
6011         * corelow.c (core_target_open): Remove unused variable.
6012         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6013         variable.
6014         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6015         variable.
6016         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6017         variable.
6018         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6019         variable.
6020         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6021         variable.
6022         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6023         variable.
6024         * ia64-tdep.c (examine_prologue): Remove unused variable.
6025         * infcall.c (run_inferior_call): Remove unused variable.
6026         * inferior.c (exit_inferior): Remove unused variable.
6027         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6028         * linespec.c (decode_line_2): Remove unused variable.
6029         * linux-nat.c (super_close): Remove.
6030         * linux-tdep.c (linux_info_proc): Remove unused variable.
6031         * mi/mi-main.c (mi_execute_command): Remove unused variable.
6032         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6033         Remove unused variable.
6034         * parse.c (find_minsym_type_and_address): Remove unused variable.
6035         * printcmd.c (info_symbol_command, printf_floating): Remove unused
6036         variable.
6037         * python/py-breakpoint.c (bppy_set_commands): Remove unused
6038         variable.
6039         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6040         variables.
6041         * record-btrace.c (record_btrace_target::store_registers): Remove
6042         unused variable.
6043         (cmd_show_record_btrace_cpu): Remove unused variable.
6044         * riscv-tdep.c (riscv_register_reggroup_p)
6045         (riscv_push_dummy_call, riscv_return_value): Remove unused
6046         variable.
6047         * rust-exp.y (literal): Remove unused variable.
6048         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6049         unused variable.
6050         <STRUCTOP_ANONYMOUS>: Likewise.
6051         * s390-linux-tdep.c (s390_linux_init_abi_31)
6052         (s390_linux_init_abi_64): Remove unused variable.
6053         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6054         (file_select_thread, net_windows_open, _initialize_ser_windows):
6055         Remove unused variables.
6056         * symtab.c (find_pc_sect_line): Remove unused variable.
6057         * target-memory.c (compute_garbled_blocks): Remove unused
6058         variable.
6059         (target_write_memory_blocks): Remove unused variable.
6060         * target.c (target_stack::unpush): Remove unused variables.
6061         * tracepoint.c (start_tracing, all_tracepoint_actions)
6062         (merge_uploaded_trace_state_variables)
6063         (print_one_static_tracepoint_marker): Remove unused variable.
6064         * unittests/basic_string_view/element_access/char/1.cc (test01):
6065         Remove unused variable.
6066         * windows-nat.c (windows_continue, windows_add_all_dlls)
6067         (do_initial_windows_stuff, windows_nat_target::create_inferior):
6068         Remove unused variables.
6069
6070 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
6071
6072         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6073         attr_profile in HAVE_ELF.
6074         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6075         HAVE_ELF.
6076
6077 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
6078
6079         * frame.c (frame_register_unwind): Change parameter name.
6080         (frame_unwind_register): Likewise.
6081         (frame_unwind_register_value): Likewise.
6082         (frame_unwind_register_signed): Likewise.
6083         (frame_unwind_register_unsigned): Likewise.
6084         * frame.h (frame_register_unwind): Likewise.
6085         (frame_unwind_register): Likewise.
6086         (frame_unwind_register_value): Likewise.
6087         (frame_unwind_register_signed): Likewise.
6088         (frame_unwind_register_unsigned): Likewise.
6089         (frame_unwind_arch): Likewise.
6090
6091 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6092
6093         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6094         ISA maintenance.
6095
6096 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6097
6098         * mips-linux-nat.c (mips_linux_nat_target::read_description):
6099         Call `get_ptrace_pid' rather than extracting the ptrace PID by
6100         hand.
6101
6102 2018-07-20  Keith Seitz  <keiths@redhat.com>
6103
6104         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6105         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6106         m_compunit_symtab, m_language>: Add "m_" prefix.
6107         Update all uses.
6108         * buildsym.c: Update all uses.
6109
6110 2018-07-20  Tom Tromey  <tom@tromey.com>
6111
6112         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6113         * buildsym.h (record_line_ftype): Remove typedef.
6114
6115 2018-07-20  Tom Tromey  <tom@tromey.com>
6116
6117         * buildsym-legacy.h (augment_type_symtab): Don't declare.
6118         (end_expandable_symtab): Likewise.
6119         (end_symtab_get_static_block): Likewise.
6120         (end_symtab_from_static_block): Likewise.
6121         * buildsym-legacy.c (augment_type_symtab): Remove.
6122         (end_expandable_symtab): Remove.
6123         (end_symtab_get_static_block): Remove.
6124         (end_symtab_from_static_block): Remove.
6125
6126 2018-07-20  Tom Tromey  <tom@tromey.com>
6127
6128         * dwarf2read.c: Include buildsym.h.
6129         (struct dwarf2_cu) <builder>: New method.
6130         (fixup_go_packaging): Update.
6131         (process_full_comp_unit, process_full_type_unit): Update.  Don't
6132         use scoped_free_pendings.
6133         (using_directives): Add "cu" parameter, remove "language".
6134         (read_import_statement, setup_type_unit_groups, )
6135         (read_func_scope, read_lexical_block_scope)
6136         (dwarf2_record_block_ranges, read_namespace): Update.
6137         (lnp_state_machine::lnp_state_machine): Add cu parameter.
6138         (lnp_state_machine::handle_end_sequence): Update.
6139         (class lnp_state_machine) <m_cu>: New member.
6140         <m_record_line_callback>: Remove.
6141         <m_currently_recording_lines>: New member.
6142         (lnp_state_machine::handle_set_file): Update.
6143         (noop_record_line): Remove.
6144         (dwarf_record_line_p): Add cu parameter.
6145         (dwarf_record_line_1, dwarf_finish_line): Likewise.
6146         (lnp_state_machine::record_line)
6147         (lnp_state_machine::lnp_state_machine)
6148         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6149         (dwarf_decode_lines): Update.
6150         (dwarf2_start_subfile): Add cu parameter.
6151         (dwarf2_start_symtab, new_symbol): Update.
6152         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6153         Remove dwarf2_per_objfile parameter.
6154         (dwarf_decode_macros): Update.
6155
6156 2018-07-20  Tom Tromey  <tom@tromey.com>
6157
6158         * stabsread.c (define_symbol): Update.
6159         * buildsym-legacy.h (get_buildsym_compunit): Declare.
6160         * dwarf2read.c (new_symbol): Update.
6161         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6162         * cp-namespace.c: Include buildsym.h.
6163         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6164         * buildsym-legacy.c (get_buildsym_compunit): New function.
6165
6166 2018-07-20  Tom Tromey  <tom@tromey.com>
6167
6168         * xcoffread.c: Include buildsym-legacy.h.
6169         * windows-nat.c: Include buildsym-legacy.h.
6170         * stabsread.c: Include buildsym-legacy.h.
6171         * mdebugread.c: Include buildsym-legacy.h.
6172         * buildsym-legacy.h: New file.
6173         * buildsym-legacy.c: New file, from buildsym.c.
6174         * go32-nat.c: Include buildsym-legacy.h.
6175         * dwarf2read.c: Include buildsym-legacy.h.
6176         * dbxread.c: Include buildsym-legacy.h.
6177         * cp-namespace.c: Include buildsym-legacy.h.
6178         * coffread.c: Include buildsym-legacy.h.
6179         * buildsym.h: Move some contents to buildsym-legacy.h.
6180         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
6181         buildsym-legacy.c.
6182         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6183
6184 2018-07-20  Tom Tromey  <tom@tromey.com>
6185
6186         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6187         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6188         (buildsym_compunit::buildsym_compunit)
6189         (buildsym_compunit::~buildsym_compunit)
6190         (buildsym_compunit::get_macro_table): Define.
6191
6192 2018-07-20  Tom Tromey  <tom@tromey.com>
6193
6194         * buildsym.c (reset_symtab_globals): Remove.
6195         (buildsym_compunit::end_symtab_from_static_block): Update.
6196         (buildsym_compunit::augment_type_symtab): Update.
6197         (end_symtab_from_static_block): Call free_buildsym_compunit.
6198         (augment_type_symtab, end_symtab, end_expandable_symtab):
6199         Likewise.
6200
6201 2018-07-20  Tom Tromey  <tom@tromey.com>
6202
6203         * arch-utils.c: Do not include buildsym.h.
6204         * mipsread.c: Do not include buildsym.h.
6205         * machoread.c: Do not include buildsym.h.
6206         * elfread.c: Do not include buildsym.h.
6207
6208 2018-07-20  Tom Tromey  <tom@tromey.com>
6209
6210         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6211         initialization.
6212         (buildsym_compunit): Add new constructor.
6213         (struct buildsym_compunit) <get_last_source_file, finish_block,
6214         record_block_range, start_subfile, patch_subfile_names,
6215         push_subfile, pop_subfile, record_line, get_compunit_symtab,
6216         set_last_source_start_addr, get_last_source_start_addr,
6217         get_local_using_directives, set_local_using_directives,
6218         get_global_using_directives, outermost_context_p,
6219         get_current_context_stack, get_context_stack_depth,
6220         get_current_subfile, get_local_symbols, get_file_symbols,
6221         get_global_symbols, record_debugformat, record_producer,
6222         push_context, pop_context, end_symtab_get_static_block,
6223         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6224         New public methods.
6225         <record_pending_block, finish_block_internal, make_blockvector,
6226         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6227         private methods.
6228         Update all users.
6229
6230 2018-05-22  Tom Tromey  <tom@tromey.com>
6231
6232         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6233         parameter.
6234         (finish_block_internal): Update.
6235
6236 2018-07-20  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.h (EXTERN): Don't define or undef.
6245         * buildsym.c (EXTERN): Don't define.
6246
6247 2018-07-20  Tom Tromey  <tom@tromey.com>
6248
6249         * buildsym.c: Remove TODO comment.
6250
6251 2018-07-20  Tom Tromey  <tom@tromey.com>
6252
6253         * coffread.c (coff_symtab_read): Update.
6254         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6255         (xcoff_new_init): Update.
6256         * mipsread.c (mipscoff_new_init): Update.
6257         * mdebugread.c (mdebug_build_psymtabs): Update.
6258         * elfread.c (elf_new_init): Update.
6259         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6260         Update.
6261         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6262         (coffstab_build_psymtabs, elfstab_build_psymtabs)
6263         (stabsect_build_psymtabs): Update.
6264         * buildsym.h (buildsym_init): Don't declare.
6265         * buildsym.c: Update comment.
6266         (prepare_for_building): Remove.
6267         (start_symtab, restart_symtab): Update.
6268         (reset_symtab_globals): Update comment.
6269         (buildsym_init): Remove.
6270
6271 2018-07-20  Tom Tromey  <tom@tromey.com>
6272
6273         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6274         * stabsread.c (patch_block_stabs, define_symbol, read_type)
6275         (read_enum_type, common_block_start, common_block_end)
6276         (cleanup_undefined_types_1, finish_global_stabs): Update.
6277         * mdebugread.c (psymtab_to_symtab_1): Update.
6278         * dwarf2read.c (fixup_go_packaging, read_func_scope)
6279         (read_lexical_block_scope, new_symbol): Update.
6280         * dbxread.c (process_one_symbol): Update.
6281         * coffread.c (coff_symtab_read, process_coff_symbol)
6282         (coff_read_enum_type): Update.
6283         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6284         declare.
6285         (get_local_symbols, get_file_symbols, get_global_symbols): New
6286         functions.
6287         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6288         m_global_symbols.
6289         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6290         (~scoped_free_pendings): Update.
6291         (finish_block, prepare_for_building, reset_symtab_globals)
6292         (end_symtab_get_static_block, end_symtab_with_blockvector)
6293         (augment_type_symtab, push_context): Update.
6294         (get_local_symbols, get_file_symbols, get_global_symbols): New
6295         functions.
6296         (buildsym_init): Update.
6297
6298 2018-07-20  Tom Tromey  <tom@tromey.com>
6299
6300         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6301         (process_full_type_unit): Likewise.
6302         (dwarf2_start_symtab): Set list_in_scope.
6303
6304 2018-07-20  Tom Tromey  <tom@tromey.com>
6305
6306         * dwarf2read.c (process_psymtab_comp_unit_reader)
6307         (build_type_psymtabs_reader): Do not set list_in_scope.
6308
6309 2018-07-20  Tom Tromey  <tom@tromey.com>
6310
6311         * buildsym.c (free_pendings): Remove.
6312         (add_symbol_to_list, scoped_free_pendings)
6313         (finish_block_internal, buildsym_init): Update.
6314
6315 2018-07-20  Tom Tromey  <tom@tromey.com>
6316
6317         * xcoffread.c (read_xcoff_symtab): Update.
6318         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6319         Update.
6320         * dbxread.c (process_one_symbol): Update.
6321         * coffread.c (coff_symtab_read): Update.
6322         * buildsym.h (finish_block): Update.
6323         * buildsym.c (finish_block): Remove "listhead" argument.
6324         (end_symtab_get_static_block): Update.
6325
6326 2018-07-20  Tom Tromey  <tom@tromey.com>
6327
6328         * buildsym.h (class scoped_free_pendings): Remove constructor.
6329         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6330         method.
6331         <m_pending_block_obstack, m_pending_blocks>: New members.
6332         (pending_block_obstack, pending_blocks): Remove.
6333         (scoped_free_pendings::scoped_free_pendings): Default.
6334         (~scoped_free_pendings): Update.
6335         (free_pending_blocks): Remove.
6336         (finish_block_internal, record_pending_block, make_blockvector)
6337         (end_symtab_get_static_block, augment_type_symtab, push_context)
6338         (buildsym_init): Update.
6339
6340 2018-07-20  Tom Tromey  <tom@tromey.com>
6341
6342         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6343         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6344         members.
6345         (pending_addrmap, pending_addrmap_obstack)
6346         (pending_addrmap_interesting): Remove.
6347         (scoped_free_pendings, record_block_range, make_blockvector)
6348         (prepare_for_building, reset_symtab_globals, buildsym_init):
6349         Update.
6350
6351 2018-07-20  Tom Tromey  <tom@tromey.com>
6352
6353         * xcoffread.c (process_linenos): Update.
6354         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6355         * mdebugread.c (psymtab_to_symtab_1): Update.
6356         * dwarf2read.c (setup_type_unit_groups)
6357         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6358         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6359         * dbxread.c (process_one_symbol): Update.
6360         * coffread.c (coff_symtab_read, enter_linenos)
6361         (process_coff_symbol): Update.
6362         * buildsym.h (current_subfile): Don't declare.
6363         (get_current_subfile): Declare.
6364         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6365         member.
6366         (start_subfile, free_buildsym_compunit, push_subfile)
6367         (prepare_for_building, start_symtab): Update.
6368         (get_current_subfile): New function.
6369
6370 2018-07-20  Tom Tromey  <tom@tromey.com>
6371
6372         * coffread.c (coff_symtab_read): Update.
6373         * xcoffread.c (read_xcoff_symtab): Update.
6374         * dwarf2read.c (new_symbol): Update.
6375         (read_func_scope, read_lexical_block_scope): Update.
6376         * dbxread.c (process_one_symbol): Update.
6377         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6378         (outermost_context_p): Remove macro.
6379         (outermost_context_p, get_current_context_stack)
6380         (get_context_stack_depth): Declare.
6381         (pop_context): Return struct context_stack.
6382         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6383         member.
6384         (context_stack_size): Remove.
6385         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6386         (prepare_for_building, end_symtab_get_static_block)
6387         (augment_type_symtab, push_context): Update.
6388         (pop_context): Return struct context_stack.
6389         (outermost_context_p, get_current_context_stack)
6390         (get_context_stack_depth): New functions.
6391         (buildsym_init): Update.
6392
6393 2018-07-20  Tom Tromey  <tom@tromey.com>
6394
6395         * rust-exp.y: Now a pure parser.  Update all rules.
6396         (%union): Move earlier.
6397         (current_parser, work_obstack): Remove globals.
6398         (rust_parser, ~rust_parser): Update.
6399         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6400         lex_character, lex_number, lex_string, lex_identifier,
6401         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6402         convert_name, convert_params_to_expression,
6403         convert_ast_to_expression, ast_basic_type, ast_operation,
6404         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6405         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6406         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6407         ast_array_type, ast_slice_type, ast_reference_type,
6408         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6409         (rust_parse): Update.
6410         (rustyyerror, rustyylex): Add parser parameter.
6411         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6412         (rust_lex_stringish_test, rust_lex_test_sequence)
6413         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6414         (rust_lex_test_push_back, rust_lex_tests): Update.
6415
6416 2018-07-19  Pedro Alves  <palves@redhat.com>
6417
6418         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6419         gdb::unique_xmalloc_ptr.
6420         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6421         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6422         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6423         copy-initialization.
6424         * guile/scm-pretty-print.c (ppscm_print_children): Use
6425         gdb::unique_xmalloc_ptr instead of cleanups.
6426         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6427         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6428         gdb::unique_xmalloc_ptr.
6429         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6430         Adjust to use gdb::unique_xmalloc_ptr.
6431         * guile/scm-utils.c (extract_arg): Adjust.
6432         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6433         gdb::unique_xmalloc_ptr instead of a cleanup.
6434
6435 2018-07-19  Tom Tromey  <tom@tromey.com>
6436
6437         * utils.c (do_value_free_to_mark)
6438         (make_cleanup_value_free_to_mark): Remove.
6439         * utils.h (make_cleanup_value_free_to_mark): Remove.
6440
6441 2018-07-19  Pedro Alves  <palves@redhat.com>
6442
6443         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6444         forwarding reference.
6445
6446 2018-07-18  Pedro Alves  <palves@redhat.com>
6447
6448         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6449         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6450         cleanup.
6451
6452 2018-07-18  Pedro Alves  <palves@redhat.com>
6453
6454         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6455         exceptions.
6456         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6457         (gdbscm_wrap): New.
6458         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6459         directly instead of a cleanup.
6460         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6461         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6462         (vlscm_binop_gdbthrow): New, factored out from ...
6463         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6464         (vlscm_rich_compare): Use gdbscm_wrap.
6465         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6466         instead of a cleanup.
6467         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6468         cleanup.
6469         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6470         Use xfree directly instead of a cleanup.
6471         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6472         Adjust to use gdbscm_wrap and scoped_value_mark.
6473         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6474         (gdbscm_value_address, gdbscm_value_dereference)
6475         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6476         scoped_value_mark.
6477         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6478         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6479         scoped_value_mark.
6480         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6481         gdbscm_wrap and scoped_value_mark.
6482         (gdbscm_value_to_string): Use xfree directly instead of a
6483         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6484         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6485         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6486         scoped_value_mark.
6487         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6488         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6489         scoped_value_mark.
6490         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6491         gdbscm_wrap.
6492
6493 2018-07-18  Tom de Vries  <tdevries@suse.de>
6494
6495         * findvar.c (default_read_var_value): Also resolve dynamic type for
6496         LOC_OPTIMIZED_OUT vars.
6497
6498 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6499
6500         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6501         decoding.
6502
6503 2018-07-17  Tom Tromey  <tom@tromey.com>
6504
6505         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6506         (compute_enum_list, pascm_set_param_value_x)
6507         (gdbscm_parameter_value): Update.
6508         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6509         (gdbscm_scm_to_host_string): Update.
6510         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6511         Update.
6512         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6513         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6514         * guile/scm-string.c (gdbscm_scm_to_string): Return
6515         unique_xmalloc_ptr.
6516         (gdbscm_scm_to_host_string): Likewise.
6517
6518 2018-07-17  Tom Tromey  <tom@tromey.com>
6519
6520         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6521         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6522         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6523         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6524         unique_xmalloc_ptr.
6525
6526 2018-07-17  Tom Tromey  <tom@tromey.com>
6527
6528         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6529         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6530         Update.
6531         * guile/scm-cmd.c (cmdscm_function): Update.
6532         * guile/scm-pretty-print.c
6533         (ppscm_print_exception_unless_memory_error): Update.
6534         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6535         Return unique_xmalloc_ptr.
6536
6537 2018-07-17  Tom Tromey  <tom@tromey.com>
6538
6539         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6540         Use string_printf.
6541
6542 2018-07-17  Jim Wilson  <jimw@sifive.com>
6543
6544         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6545         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6546         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6547         unecessary braces after EF_RISCV_RVC test.  Delete call to
6548         set_gdbarch_decr_pc_after_break.
6549
6550         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6551         RISCV_LAST_FP_REGNUM + 1.
6552         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6553
6554 2018-07-17  Tom Tromey  <tom@tromey.com>
6555
6556         * configure.ac: Remove --disable-gdbcli.
6557         * configure: Rebuild.
6558         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6559         (SUBDIR_CLI_CFLAGS): Remove.
6560         (SFILES): Use SUBDIR_CLI_SRCS.
6561         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6562
6563 2018-07-17  Tom Tromey  <tom@tromey.com>
6564
6565         PR gdb/18624:
6566         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6567
6568 2018-07-16  Jim Wilson  <jimw@sifive.com>
6569
6570         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6571
6572 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6573
6574         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6575         variable.
6576         (libunwind_frame_sniffer): Likewise.
6577         (libunwind_frame_prev_register): Likewise.
6578         (libunwind_sigtramp_frame_sniffer): Likewise.
6579         * ia64-tdep.c (ia64_access_reg): Likewise.
6580         (ia64_access_rse_reg): Likewise.
6581         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6582         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6583
6584 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6585
6586         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6587
6588 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6589
6590         * remote-sim.c (gdbsim_target::close,
6591         gdbsim_target::mourn_inferior): Remove unused variables.
6592
6593 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6594
6595         * ia64-tdep.c (ktab_buf): New global.
6596         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6597         (get_kernel_table): Adjust.
6598
6599 2018-07-16  Tom Tromey  <tom@tromey.com>
6600
6601         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6602         * dwarf2read.c (using_directives, new_symbol): Use
6603         outermost_context_p.
6604         * dbxread.c (process_one_symbol): Use outermost_context_p.
6605         * coffread.c (coff_symtab_read): Use outermost_context_p.
6606
6607 2018-07-16  Tom Tromey  <tom@tromey.com>
6608
6609         * dwarf2read.c (using_directives, read_func_scope)
6610         (read_lexical_block_scope): Update.
6611         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6612         * buildsym.h (local_using_directives, global_using_directives):
6613         Don't declare.
6614         (get_local_using_directives, set_local_using_directives)
6615         (get_global_using_directives): Declare.
6616         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6617         m_global_using_directives>: New members.
6618         (finish_block_internal, prepare_for_building)
6619         (reset_symtab_globals, end_symtab_get_static_block)
6620         (push_context): Update.
6621         (get_local_using_directives, set_local_using_directives)
6622         (get_global_using_directives): New functions.
6623         (buildsym_init): Update.
6624
6625 2018-07-16  Tom Tromey  <tom@tromey.com>
6626
6627         * xcoffread.c (xcoff_initial_scan): Don't call
6628         free_pending_blocks.
6629         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6630         * buildsym.h (class scoped_free_pendings): Add constructor.
6631         (free_pending_blocks): Don't declare.
6632         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6633         (free_pending_blocks): Now static.
6634
6635 2018-07-16  Tom Tromey  <tom@tromey.com>
6636
6637         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6638         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6639         member.
6640         (struct subfile_stack): Remove.
6641         (subfile_stack): Remove.
6642         (push_subfile, pop_subfile, buildsym_init): Update.
6643
6644 2018-07-16  Tom Tromey  <tom@tromey.com>
6645
6646         * buildsym.c (push_subfile): Use gdb_assert.
6647         (pop_subfile): Use gdb_assert.
6648
6649 2018-07-16  Tom Tromey  <tom@tromey.com>
6650
6651         * buildsym.h (merge_symbol_lists): Remove.
6652         * buildsym.c (merge_symbol_lists): Remove.
6653
6654 2018-07-16  Tom Tromey  <tom@tromey.com>
6655
6656         * stabsread.c (scan_file_globals): Update comment.
6657         * stabsread.h (scan_file_globals): Move from buildsym.h.
6658         * buildsym.h (scan_file_globals): Move to stabsread.h.
6659
6660 2018-07-16  Tom Tromey  <tom@tromey.com>
6661
6662         * xcoffread.c (xcoff_new_init): Update.
6663         * mipsread.c (mipscoff_new_init): Update.
6664         * mdebugread.c (mdebug_build_psymtabs): Update.
6665         * elfread.c (elf_new_init): Update.
6666         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6667         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6668         * buildsym.h (buildsym_new_init): Don't declare.
6669         * buildsym.c (buildsym_new_init): Remove.
6670
6671 2018-07-16  Tom Tromey  <tom@tromey.com>
6672
6673         * stabsread.h (within_function): Move from buildsym.h.
6674         * stabsread.c (start_stabs): Clear within_function.
6675         * coffread.c (coff_start_symtab): Clear within_function.
6676         * buildsym.h (within_function): Move to stabsread.h.
6677         * buildsym.c (prepare_for_building): Update.
6678
6679 2018-07-16  Tom Tromey  <tom@tromey.com>
6680
6681         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6682         * dwarf2read.c (dwarf2_start_symtab): Don't set
6683         processing_gcc_compilation.
6684         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6685
6686 2018-07-16  Tom Tromey  <tom@tromey.com>
6687
6688         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6689         (next_symbol_text_func): Move from buildsym.h.
6690         * stabsread.c (hashname): Move from buildsym.c.
6691         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6692         (next_symbol_text_func, hashname): Move to stabsread.h.
6693         * buildsym.c: Don't include bcache.h
6694         (hashname): Move to stasbread.c.
6695
6696 2018-07-16  Tom Tromey  <tom@tromey.com>
6697
6698         * buildsym.h (context_stack_size): Don't declare.
6699         * buildsym.c (context_stack_size): New global.
6700
6701 2018-07-16  Tom Tromey  <tom@tromey.com>
6702
6703         * dbxread.c (processing_acc_compilation): New global.
6704         * buildsym.h (processing_acc_compilation): Don't declare.
6705
6706 2018-07-16  Tom Tromey  <tom@tromey.com>
6707
6708         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6709         * dbxread.c (read_ofile_symtab): Update.
6710         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6711         * buildsym.h (last_source_start_addr): Remove.
6712         (set_last_source_start_addr, get_last_source_start_addr):
6713         Declare.
6714         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6715         parameter.
6716         (struct buildsym_compunit) <m_last_source_start_addr>: New
6717         member.
6718         (prepare_for_building): Remove start_addr parameter.
6719         (start_symtab, restart_symtab, end_symtab_get_static_block)
6720         (end_symtab_with_blockvector): Update.
6721         (set_last_source_start_addr, get_last_source_start_addr): New
6722         functions.
6723
6724 2018-07-16  Tom Tromey  <tom@tromey.com>
6725
6726         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6727         member.
6728         (have_line_numbers): Remove.
6729         (record_line, prepare_for_building, end_symtab_get_static_block)
6730         (augment_type_symtab): Update.
6731
6732 2018-07-16  Tom Tromey  <tom@tromey.com>
6733
6734         * buildsym.c (~buildsym_compunit): Free the macro table.
6735         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6736         methods.
6737         <m_pending_macros>: New member.
6738         (pending_macros): Remove.
6739         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6740         (reset_symtab_globals, end_symtab_get_static_block)
6741         (end_symtab_with_blockvector, augment_type_symtab)
6742         (buildsym_init): Update.
6743
6744 2018-07-16  Tom Tromey  <tom@tromey.com>
6745
6746         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6747         parameter.
6748         (buildsym_compunit::set_last_source_file): New method.
6749         <m_last_source_file>: New member.
6750         (prepare_for_building): Remove "name" parameter.
6751         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6752         (last_source_file): Remove.
6753         (set_last_source_file, get_last_source_file): Update.
6754
6755 2018-07-16  Tom Tromey  <tom@tromey.com>
6756
6757         * buildsym.c (prepare_for_building): Add assert.
6758
6759 2018-07-16  Tom Tromey  <tom@tromey.com>
6760
6761         * buildsym.c (~buildsym_compunit): Update.
6762         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6763         (start_subfile, patch_subfile_names)
6764         (end_symtab_with_blockvector): Update.
6765
6766 2018-07-16  Tom Tromey  <tom@tromey.com>
6767
6768         * buildsym.c (struct buildsym_compunit): Add constructor,
6769         destructor, initializers.
6770         (start_buildsym_compunit): Remove.
6771         (free_buildsym_compunit): Use "delete".
6772         (start_symtab, restart_symtab): Use "new".
6773
6774 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6775
6776         * symfile.c (set_objfile_default_section_offset): Remove struct
6777         keyword.
6778
6779 2018-07-14  Stafford Horne  <shorne@gmail.com>
6780
6781         * (Responsible Maintainers): Add myself as or1k maintainer.
6782
6783 2018-07-13  Tom Tromey  <tom@tromey.com>
6784
6785         * symfile.c (set_objfile_default_section_offset): Use extra braces
6786         around initializer.
6787
6788 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6789
6790         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6791         non-branching basr.
6792
6793 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6794
6795         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6796         unittests/cli-utils-selftests.c
6797         * unittests/cli-utils-selftests.c: New file.
6798
6799 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6800
6801         * NEWS: Mention new commands. Mention change to 'thread apply'.
6802
6803 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6804
6805         * thread.c (thr_try_catch_cmd): New function.
6806         (thread_apply_all_command): Handle qcs flags.
6807         (thread_apply_command): Handle qcs flags.
6808         (taas_command): New function.
6809         (tfaas_command): New function.
6810         (_initialize_thread): Update to setup the new commands 'taas
6811         and 'tfaas'. Change doc string for 'thread apply'.
6812
6813 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6814
6815         * stack.c: (trailing_outermost_frame): New function, mostly
6816         extracted from backtrace_command_1.
6817         (leading_innermost_frame): New function.
6818         (backtrace_command_1): Update to call trailing_outermost_frame.
6819         (frame_apply_command_count): New function.
6820         (frame_apply_level_command): New function.
6821         (frame_apply_all_command): New function.
6822         (frame_apply_command): New function.
6823         (faas_command): New function.
6824         (frame_cmd_list): New variable.
6825         (_initialize_stack): Update to setup the new commands 'frame apply'
6826         and 'faas'.
6827
6828 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6829
6830         * cli-utils.c (number_or_range_parser::get_number): Only handle
6831         numbers or convenience var as numbers.
6832         (parse_flags): New function.
6833         (parse_flags_qcs): New function.
6834         (number_or_range_parser::finished): Ensure parsing end is detected
6835         before end of string.
6836         * cli-utils.h (parse_flags): New function.
6837         (parse_flags_qcs): New function.
6838         (number_or_range_parser): Remove m_finished bool.
6839         (number_or_range_parser::skip_range): Set m_in_range to false.
6840
6841 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6842
6843         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6844         on Windows.
6845
6846 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6847             Jan Kratochvil  <jan.kratochvil@redhat.com>
6848             Paul Fertser  <fercerpav@gmail.com>
6849             Tsutomu Seki  <sekiriki@gmail.com>
6850             Pedro Alves  <palves@redhat.com>
6851
6852         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6853         'unittests/parse-connection-spec-selftests.c'.
6854         (COMMON_SFILES): Add 'common/netstuff.c'.
6855         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6856         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6857         * common/netstuff.c: New file.
6858         * common/netstuff.h: New file.
6859         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6860         (wait_for_connect): Update comment.  New parameter
6861         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6862         Use 'sock' directly instead of 'scb->fd'.
6863         (try_connect): New function, with code from 'net_open'.
6864         (net_open): Rewrite main loop to deal with multiple
6865         sockets/addresses.  Handle IPv6-style hostnames; implement
6866         support for IPv6 connections.
6867         * unittests/parse-connection-spec-selftests.c: New file.
6868
6869 2018-07-11  Pedro Alves  <palves@redhat.com>
6870
6871         PR gdb/23377
6872         * remote.c (remote_target::remote_detach_pid): Call
6873         set_current_process.
6874
6875 2018-07-11  Pedro Alves  <palves@redhat.com>
6876
6877         * h8300-tdep.c (h8300_gdbarch_init): Remove
6878         set_gdbarch_ecoff_reg_to_regnum calls.
6879
6880 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6881
6882         PR c++/23373
6883         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6884         offsets/sizes for static members of a class/struct.
6885
6886 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6887
6888         * target-descriptions.c (tdesc_register_bitsize): Rename.
6889         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6890         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6891         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6892
6893 2018-07-10  Tom Tromey  <tom@tromey.com>
6894
6895         * breakpoint.c (moribund_locations): Now static and a
6896         std::vector.
6897         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6898         (build_bpstat_chain, update_global_location_list)
6899         (breakpoint_retire_moribund): Update.
6900         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6901         VEC.
6902
6903 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6904
6905         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6906         (riscv_register_reggroup_p): Use new function, remove unneeded
6907         parenthesis.
6908         (riscv_push_dummy_call): Extend assert to compare against xlen or
6909         flen based on register type.
6910
6911 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6912
6913         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6914
6915 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6916
6917         * remote.c (show_hardware_watchpoint_limit): New function.
6918         (show_hardware_watchpoint_length_limit): New function.
6919         (show_hardware_breakpoint_limit): New function.
6920         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6921         where appropriate, update help text.
6922
6923 2018-07-09  Tom Tromey  <tom@tromey.com>
6924
6925         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6926         (CLIBS): Don't mention NAT_CLIBS.
6927
6928 2018-07-09  Tom Tromey  <tom@tromey.com>
6929
6930         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6931         (LIBGDB_OBS, clean mostlyclean): Update.
6932         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6933
6934 2018-07-09  Tom Tromey  <tom@tromey.com>
6935
6936         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6937         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6938         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6939
6940 2018-07-09  Tom Tromey  <tom@tromey.com>
6941
6942         * Makefile.in (ALLDEPFILES): Remove exec.c.
6943         (COMMON_OBS): Remove exec.o.
6944         (COMMON_SFILES): Add exec.c.
6945
6946 2018-07-09  Tom Tromey  <tom@tromey.com>
6947
6948         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6949
6950 2018-07-09  Tom Tromey  <tom@tromey.com>
6951
6952         * Makefile.in (clean mostlyclean): Remove stamp-version.
6953         (version.c): Depend on stamp-version.
6954         (stamp-version): New rule, from version.c rule.
6955
6956 2018-07-09  Tom Tromey  <tom@tromey.com>
6957
6958         * Makefile.in (init.c): Depend on stamp-init.
6959         (stamp-init): New rule, from init.c rule.
6960         (clean mostlyclean): Remove stamp-init.
6961
6962 2018-07-09  Tom Tromey  <tom@tromey.com>
6963
6964         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6965         SUBDIR_GCC_COMPILE_SRCS.
6966
6967 2018-07-09  Tom Tromey  <tom@tromey.com>
6968
6969         * Makefile.in (init.c): Remove some unused sed rules.
6970
6971 2018-07-09  Tom Tromey  <tom@tromey.com>
6972
6973         * Makefile.in (TSOBS): Remove.
6974         (INIT_FILES): Update.
6975         (LIBGDB_OBS): Update.
6976         (COMMON_SFILES): Add inflow.c.
6977         (SFILES): Remove inflow.c.
6978
6979 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6980
6981         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6982
6983 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6984
6985         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6986         get_saveloc_name, is_signal_frame_name, step_name,
6987         init_remote_name, create_addr_space_name,
6988         destroy_addr_space_name, search_unwind_table_name,
6989         find_dyn_list_name): Constify.
6990
6991 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6992
6993         * darwin-nat.c (darwin_pthread_kill): New function.
6994         (darwin_resume_thread): Use darwin_pthread_kill.
6995
6996 2018-07-05  Tom de Vries  <tdevries@suse.de>
6997
6998         * macroexp.c (macro_buffer) <operator=>: New member function.
6999
7000 2018-07-04  Tom Tromey  <tom@tromey.com>
7001
7002         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7003
7004 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
7005
7006         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7007         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7008         * maint.c: Likewise.
7009         * top.c: Likewise.
7010
7011 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7012
7013         * NEWS: Create a new section for the next release branch.
7014         Rename the section of the current branch, now that it has
7015         been cut.
7016
7017 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7018
7019         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7020         * version.in: Bump version to 8.2.50.DATE-git.
7021
7022 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
7023             Pedro Alves  <palves@redhat.com>
7024
7025         * linux-nat.c (linux_init_ptrace): Rename to ...
7026         (linux_init_ptrace_procfs): ... this.  Call
7027         linux_proc_init_warnings.
7028         (linux_nat_target::post_attach)
7029         (linux_nat_target::post_startup_inferior): Adjust.
7030         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7031         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7032
7033 2018-07-04  Tom de Vries  <tdevries@suse.de>
7034
7035         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7036         check ...
7037         (read_comp_unit_head): ... here.
7038
7039 2018-07-03  Tom Tromey  <tom@tromey.com>
7040
7041         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7042         (stop_tracing, tstatus_command)
7043         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7044         (print_one_static_tracepoint_marker): Update.
7045         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7046         std::vector.
7047         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
7048         VEC.
7049         (all_tracepoints, static_tracepoints_here): Return std::vector.
7050
7051 2018-07-03  Tom Tromey  <tom@tromey.com>
7052
7053         * common/ptid.c (ptid_equal): Remove.
7054         * common/ptid.h (ptid_equal): Don't declare.
7055         * ada-tasks.c: Update.
7056         * breakpoint.c: Update.
7057         * common/agent.c: Update.
7058         * corelow.c: Update.
7059         * darwin-nat-info.c: Update.
7060         * darwin-nat.c: Update.
7061         * dcache.c: Update.
7062         * dtrace-probe.c: Update.
7063         * dummy-frame.c: Update.
7064         * fbsd-nat.c: Update.
7065         * frame.c: Update.
7066         * gdbthread.h: Update.
7067         * gnu-nat.c: Update.
7068         * go32-nat.c: Update.
7069         * inf-loop.c: Update.
7070         * inf-ptrace.c: Update.
7071         * infcall.c: Update.
7072         * infcmd.c: Update.
7073         * inflow.c: Update.
7074         * infrun.c: Update.
7075         * linux-fork.c: Update.
7076         * linux-nat.c: Update.
7077         * linux-thread-db.c: Update.
7078         * mi/mi-cmd-var.c: Update.
7079         * mi/mi-interp.c: Update.
7080         * mi/mi-main.c: Update.
7081         * nto-procfs.c: Update.
7082         * ppc-linux-tdep.c: Update.
7083         * procfs.c: Update.
7084         * python/py-inferior.c: Update.
7085         * python/py-record-btrace.c: Update.
7086         * python/py-record.c: Update.
7087         * ravenscar-thread.c: Update.
7088         * regcache.c: Update.
7089         * remote-sim.c: Update.
7090         * remote.c: Update.
7091         * sol-thread.c: Update.
7092         * solib.c: Update.
7093         * target.c: Update.
7094         * tui/tui-stack.c: Update.
7095         * varobj.c: Update.
7096         * windows-nat.c: Update.
7097         * windows-tdep.c: Update.
7098
7099 2018-07-03  Tom Tromey  <tom@tromey.com>
7100
7101         * common/ptid.c (ptid_match): Remove.
7102         * common/ptid.h (ptid_match): Don't declare.
7103         * fbsd-nat.c: Update.
7104         * infcmd.c: Update.
7105         * infrun.c: Update.
7106         * linux-nat.c: Update.
7107         * record-btrace.c: Update.
7108         * regcache.c: Update.
7109         * remote.c: Update.
7110
7111 2018-07-03  Tom Tromey  <tom@tromey.com>
7112
7113         * common/ptid.c (ptid_tid_p): Remove.
7114         * common/ptid.h (ptid_tid_p): Don't declare.
7115         * sol-thread.c: Update.
7116
7117 2018-07-03  Tom Tromey  <tom@tromey.com>
7118
7119         * common/ptid.c (ptid_lwp_p): Remove.
7120         * common/ptid.h (ptid_lwp_p): Don't declare.
7121         * fbsd-nat.c: Update.
7122         * linux-nat.c: Update.
7123         * nat/linux-procfs.c: Update.
7124         * nat/x86-linux-dregs.c: Update.
7125         * sol-thread.c: Update.
7126
7127 2018-07-03  Tom Tromey  <tom@tromey.com>
7128
7129         * common/ptid.c (ptid_is_pid): Remove.
7130         * common/ptid.h (ptid_is_pid): Don't declare.
7131         * infrun.c: Update.
7132         * linux-nat.c: Update.
7133         * mi/mi-interp.c: Update.
7134         * remote.c: Update.
7135         * thread.c: Update.
7136
7137 2018-07-03  Tom Tromey  <tom@tromey.com>
7138
7139         * common/ptid.c (ptid_get_tid): Remove.
7140         * common/ptid.h (ptid_get_tid): Don't declare.
7141         * ada-tasks.c: Update.
7142         * aix-thread.c: Update.
7143         * bsd-uthread.c: Update.
7144         * darwin-nat.c: Update.
7145         * fbsd-nat.c: Update.
7146         * i386-darwin-nat.c: Update.
7147         * infrun.c: Update.
7148         * linux-tdep.c: Update.
7149         * nto-procfs.c: Update.
7150         * ppc-ravenscar-thread.c: Update.
7151         * python/py-infthread.c: Update.
7152         * ravenscar-thread.c: Update.
7153         * sol-thread.c: Update.
7154         * sparc-ravenscar-thread.c: Update.
7155         * windows-nat.c: Update.
7156
7157 2018-07-03  Tom Tromey  <tom@tromey.com>
7158
7159         * common/ptid.c (ptid_get_lwp): Remove.
7160         * common/ptid.h (ptid_get_lwp): Don't declare.
7161         * aarch64-linux-nat.c: Update.
7162         * ada-tasks.c: Update.
7163         * aix-thread.c: Update.
7164         * amd64-linux-nat.c: Update.
7165         * arm-linux-nat.c: Update.
7166         * corelow.c: Update.
7167         * fbsd-nat.c: Update.
7168         * fbsd-tdep.c: Update.
7169         * gnu-nat.c: Update.
7170         * i386-cygwin-tdep.c: Update.
7171         * i386-gnu-nat.c: Update.
7172         * i386-linux-nat.c: Update.
7173         * ia64-linux-nat.c: Update.
7174         * inf-ptrace.c: Update.
7175         * infrun.c: Update.
7176         * linux-fork.c: Update.
7177         * linux-nat.c: Update.
7178         * linux-tdep.c: Update.
7179         * linux-thread-db.c: Update.
7180         * mips-linux-nat.c: Update.
7181         * nat/aarch64-linux-hw-point.c: Update.
7182         * nat/aarch64-linux.c: Update.
7183         * nat/linux-btrace.c: Update.
7184         * nat/linux-osdata.c: Update.
7185         * nat/linux-procfs.c: Update.
7186         * nat/x86-linux-dregs.c: Update.
7187         * obsd-nat.c: Update.
7188         * ppc-fbsd-nat.c: Update.
7189         * ppc-linux-nat.c: Update.
7190         * procfs.c: Update.
7191         * python/py-infthread.c: Update.
7192         * ravenscar-thread.c: Update.
7193         * remote.c: Update.
7194         * s390-linux-nat.c: Update.
7195         * sol-thread.c: Update.
7196         * sol2-tdep.c: Update.
7197         * spu-linux-nat.c: Update.
7198         * x86-linux-nat.c: Update.
7199         * xtensa-linux-nat.c: Update.
7200
7201 2018-07-03  Tom Tromey  <tom@tromey.com>
7202
7203         * common/ptid.c (ptid_get_pid): Remove.
7204         * common/ptid.h (ptid_get_pid): Don't declare.
7205         * aarch64-linux-nat.c: Update.
7206         * ada-lang.c: Update.
7207         * aix-thread.c: Update.
7208         * alpha-bsd-nat.c: Update.
7209         * amd64-fbsd-nat.c: Update.
7210         * amd64-linux-nat.c: Update.
7211         * arm-linux-nat.c: Update.
7212         * arm-nbsd-nat.c: Update.
7213         * auxv.c: Update.
7214         * break-catch-syscall.c: Update.
7215         * breakpoint.c: Update.
7216         * bsd-uthread.c: Update.
7217         * corelow.c: Update.
7218         * ctf.c: Update.
7219         * darwin-nat.c: Update.
7220         * fbsd-nat.c: Update.
7221         * fbsd-tdep.c: Update.
7222         * gcore.c: Update.
7223         * gnu-nat.c: Update.
7224         * hppa-nbsd-nat.c: Update.
7225         * hppa-obsd-nat.c: Update.
7226         * i386-fbsd-nat.c: Update.
7227         * ia64-linux-nat.c: Update.
7228         * inf-ptrace.c: Update.
7229         * infcmd.c: Update.
7230         * inferior.c: Update.
7231         * inferior.h: Update.
7232         * inflow.c: Update.
7233         * infrun.c: Update.
7234         * linux-fork.c: Update.
7235         * linux-nat.c: Update.
7236         * linux-tdep.c: Update.
7237         * linux-thread-db.c: Update.
7238         * m68k-bsd-nat.c: Update.
7239         * mi/mi-interp.c: Update.
7240         * mi/mi-main.c: Update.
7241         * mips-linux-nat.c: Update.
7242         * mips-nbsd-nat.c: Update.
7243         * mips64-obsd-nat.c: Update.
7244         * nat/aarch64-linux-hw-point.c: Update.
7245         * nat/aarch64-linux.c: Update.
7246         * nat/linux-btrace.c: Update.
7247         * nat/linux-osdata.c: Update.
7248         * nat/linux-procfs.c: Update.
7249         * nat/x86-linux-dregs.c: Update.
7250         * nto-procfs.c: Update.
7251         * obsd-nat.c: Update.
7252         * ppc-linux-nat.c: Update.
7253         * ppc-nbsd-nat.c: Update.
7254         * ppc-obsd-nat.c: Update.
7255         * proc-service.c: Update.
7256         * procfs.c: Update.
7257         * python/py-inferior.c: Update.
7258         * python/py-infthread.c: Update.
7259         * ravenscar-thread.c: Update.
7260         * record.c: Update.
7261         * remote-sim.c: Update.
7262         * remote.c: Update.
7263         * rs6000-nat.c: Update.
7264         * s390-linux-nat.c: Update.
7265         * sh-nbsd-nat.c: Update.
7266         * sol-thread.c: Update.
7267         * sparc-nat.c: Update.
7268         * sparc64-tdep.c: Update.
7269         * spu-linux-nat.c: Update.
7270         * spu-tdep.c: Update.
7271         * target-debug.h: Update.
7272         * target.c: Update.
7273         * thread.c: Update.
7274         * tid-parse.c: Update.
7275         * tracefile-tfile.c: Update.
7276         * vax-bsd-nat.c: Update.
7277         * windows-nat.c: Update.
7278         * x86-linux-nat.c: Update.
7279         * x86-nat.c: Update.
7280
7281 2018-07-03  Tom Tromey  <tom@tromey.com>
7282
7283         * common/ptid.c (pid_to_ptid): Remove.
7284         * common/ptid.h (pid_to_ptid): Don't declare.
7285         * aix-thread.c: Update.
7286         * arm-linux-nat.c: Update.
7287         * common/ptid.c: Update.
7288         * common/ptid.h: Update.
7289         * corelow.c: Update.
7290         * ctf.c: Update.
7291         * darwin-nat.c: Update.
7292         * fbsd-nat.c: Update.
7293         * fork-child.c: Update.
7294         * gnu-nat.c: Update.
7295         * go32-nat.c: Update.
7296         * inf-ptrace.c: Update.
7297         * infcmd.c: Update.
7298         * inferior.c: Update.
7299         * infrun.c: Update.
7300         * linux-fork.c: Update.
7301         * linux-nat.c: Update.
7302         * nat/aarch64-linux-hw-point.c: Update.
7303         * nat/fork-inferior.c: Update.
7304         * nat/x86-linux-dregs.c: Update.
7305         * nto-procfs.c: Update.
7306         * obsd-nat.c: Update.
7307         * procfs.c: Update.
7308         * progspace.c: Update.
7309         * remote.c: Update.
7310         * rs6000-nat.c: Update.
7311         * s390-linux-nat.c: Update.
7312         * sol-thread.c: Update.
7313         * spu-linux-nat.c: Update.
7314         * target.c: Update.
7315         * top.c: Update.
7316         * tracefile-tfile.c: Update.
7317         * windows-nat.c: Update.
7318
7319 2018-07-03  Tom Tromey  <tom@tromey.com>
7320
7321         * common/ptid.h (ptid_build): Don't declare.
7322         * common/ptid.c (ptid_build): Remove.
7323         * aix-thread.c: Update.
7324         * bsd-kvm.c: Update.
7325         * bsd-uthread.c: Update.
7326         * common/agent.c: Update.
7327         * common/ptid.c: Update.
7328         * common/ptid.h: Update.
7329         * corelow.c: Update.
7330         * darwin-nat.c: Update.
7331         * fbsd-nat.c: Update.
7332         * gnu-nat.c: Update.
7333         * linux-fork.c: Update.
7334         * linux-nat.c: Update.
7335         * linux-thread-db.c: Update.
7336         * nat/linux-osdata.c: Update.
7337         * nat/linux-procfs.c: Update.
7338         * nto-procfs.c: Update.
7339         * obsd-nat.c: Update.
7340         * proc-service.c: Update.
7341         * procfs.c: Update.
7342         * ravenscar-thread.c: Update.
7343         * remote-sim.c: Update.
7344         * remote.c: Update.
7345         * sol-thread.c: Update.
7346         * target.c: Update.
7347         * windows-nat.c: Update.
7348
7349 2018-07-03  Tom Tromey  <tom@tromey.com>
7350
7351         * infrun.c (follow_exec): Use exit_inferior_silent.
7352         * inferior.c (exit_inferior_num_silent): Remove.
7353         * inferior.h (exit_inferior_num_silent): Don't declare.
7354
7355 2018-07-03  Tom Tromey  <tom@tromey.com>
7356
7357         PR cli/23340:
7358         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7359         inferior_ptid on error.
7360
7361 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7362             Simon Marchi  <simon.marchi@polymtl.ca>
7363
7364         PR tdep/8282
7365         * disasm.h (gdb_disassembler): Add
7366         `m_disassembler_options_holder'. member
7367         * disasm.c (get_all_disassembler_options): New function.
7368         (gdb_disassembler::gdb_disassembler): Use it.
7369         (gdb_buffered_insn_length_init_dis): Likewise.
7370         (gdb_buffered_insn_length): Adjust accordingly.
7371         (set_disassembler_options): Handle options with arguments.
7372         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7373         line if showing options with descriptions.
7374         (disassembler_options_completer): Adapt to using the
7375         `disasm_options_and_args_t' structure.
7376         * mips-tdep.c (mips_disassembler_options): New variable.
7377         (mips_disassembler_options_o32): Likewise.
7378         (mips_disassembler_options_n32): Likewise.
7379         (mips_disassembler_options_n64): Likewise.
7380         (gdb_print_insn_mips): Don't set `disassembler_options'.
7381         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7382         functions.
7383         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7384         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7385         `gdbarch_disassembler_options_implicit' and
7386         `gdbarch_valid_disassembler_options'.
7387         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7388         `disasm_options_and_args_t' structure.
7389         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7390         method.
7391         (valid_disassembler_options): Switch from `disasm_options_t' to
7392         the `disasm_options_and_args_t' structure.
7393         * NEWS: Document `set disassembler-options' support for the MIPS
7394         target.
7395         * gdbarch.h: Regenerate.
7396         * gdbarch.c: Regenerate.
7397
7398 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7399
7400         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7401
7402 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7403
7404         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7405         parameter in call to amd64_target_description.
7406         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7407         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7408         (amd64fbsd_init_abi): Likewise.
7409         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7410         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7411         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7412         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7413
7414 2018-06-29  Pedro Alves  <palves@redhat.com>
7415
7416         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7417         "segments" parameter.
7418         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7419         (_initialize_amd64_tdep): Update call to
7420         amd64_create_target_description.
7421         (amd64_target_description): Add "segments" parameter.  Adjust
7422         the implementation to use it.
7423         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7424         call to amd64_create_target_description.
7425         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7426         * gdb/arch/amd64.h (amd64_create_target_description): Add
7427         "segments" register.
7428         * gdb/arch/amd64.c (amd64_create_target_description): Add
7429         "segments" parameter.  Call create_feature_i386_64bit_segments
7430         only if SEGMENTS is true.
7431         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7432         call to amd64_create_target_description.
7433
7434 2018-06-29  Pedro Alves  <palves@redhat.com>
7435
7436         * thread.c (thread_target_id_str): New, factored out from ...
7437         (print_thread_info_1): ... here.  Use it to compute the max
7438         "Target Id" column width.
7439
7440 2018-06-29  Pedro Alves  <palves@redhat.com>
7441
7442         * remote.c (remote_target::extra_thread_info): Delete
7443         'display_buf' and 'n' locals.  from the cache, regardless of
7444         packet mechanims is in use.  Use cache for qThreadExtra and qP
7445         methods too.
7446
7447 2018-06-29  Pedro Alves  <palves@redhat.com>
7448
7449         * blockframe.c (find_pc_sect_containing_function): New function.
7450         * breakpoint.c (print_breakpoint_location): Don't call
7451         find_pc_sect_function.
7452         * linespec.c (create_sals_line_offset): Record the location's
7453         symbol in the sal.
7454         * linespec.c (convert_address_location_to_sals): Fill in sal's
7455         symbol with find_pc_sect_containing_function.
7456         * symtab.c (find_function_start_sal): Rename to ...
7457         (find_function_start_sal_1): ... this.
7458         (find_function_start_sal): Reimplement as wrapper around
7459         find_function_start_sal_1, and use
7460         find_pc_sect_containing_function to fill in the sal's symbol.
7461         (find_function_start_sal(symbol*, bool)): Adjust.
7462         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7463         comments.
7464         (find_pc_sect_containing_function): Declare.
7465
7466 2018-06-29  Pedro Alves  <palves@redhat.com>
7467
7468         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7469         true if the the location has no symbol.
7470
7471 2018-06-28  Tom Tromey  <tom@tromey.com>
7472
7473         * NEWS: Mention --enable-codesign.
7474         * silent-rules.mk (ECHO_SIGN): New variable.
7475         * configure.ac: Add --enable-codesign.
7476         * configure: Rebuild.
7477         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7478         (gdb$(EXEEXT)): Optionally invoke codesign.
7479
7480 2018-06-28  Pedro Alves  <palves@redhat.com>
7481
7482         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7483         comments.
7484         (switch_to_thread_no_regs): Adjust comment.
7485         * infcmd.c (stop_pc): Delete.
7486         (post_create_inferior, info_program_command): Replace references
7487         to stop_pc with references to thread_info->suspend.stop_pc.
7488         * inferior.h (stop_pc): Delete declaration.
7489         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7490         (handle_inferior_event_1, handle_signal_stop)
7491         (process_event_stop_test, keep_going_stepped_thread)
7492         (handle_step_into_function, handle_step_into_function_backward)
7493         (print_stop_location): Replace references to stop_pc with
7494         references to thread_info->suspend.stop_pc.
7495         (struct infcall_suspend_state) <stop_pc>: Delete field.
7496         (save_infcall_suspend_state, restore_infcall_suspend_state):
7497         Remove references to inf_stat->stop_pc.
7498         * linux-fork.c (fork_load_infrun_state): Likewise.
7499         * record-btrace.c (record_btrace_set_replay): Likewise.
7500         * record-full.c (record_full_goto_entry): Likewise.
7501         * remote.c (print_one_stopped_thread): Likewise.
7502         * target.c (target_resume): Extend comment.
7503         * thread.c (set_executing_thread): New.
7504         (set_executing): Use it.
7505         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7506         Remove references to stop_pc.
7507
7508 2018-06-28  Pedro Alves  <palves@redhat.com>
7509
7510         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7511         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7512
7513 2018-06-28  Tom Tromey  <tom@tromey.com>
7514
7515         * coffread.c (coff_symfile_finish): Update.
7516         * xcoffread.c (xcoff_symfile_finish): Update.
7517         * elfread.c (elf_symfile_finish): Update.
7518         * symfile.h (dwarf2_free_objfile): Don't declare.
7519         * dwarf2read.c (_initialize_dwarf2_read): Use
7520         register_objfile_data_with_cleanup.
7521         (dwarf2_free_objfile): Now static.  Change signature.
7522
7523 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7524
7525         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7526         option "-o" to add-symbol-file-load to add an offset to each
7527         section's load address.
7528         * symfile.c (set_objfile_default_section_offset): New function.
7529
7530 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7531
7532         * symfile.c (add_symbol_file_command): Make sure that sections
7533         with the same name are sorted in the same order.
7534
7535 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7536
7537         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7538         require the second argument.  If omitted, load sections at the
7539         addresses specified in the file.
7540
7541 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7542
7543         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7544         (_initialize_symfile): Add option "-o" to symbol-file to add an
7545         offset to each section of the symbol file.
7546
7547 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7548
7549         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7550
7551 2018-06-27  Tom Tromey  <tom@tromey.com>
7552
7553         * stack.c (_initialize_stack): Update "func" help text.
7554
7555 2018-06-27  Tom Tromey  <tom@tromey.com>
7556
7557         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7558         std::vector.
7559         (unwind_infopy_str, pyuw_create_unwind_info)
7560         (unwind_infopy_add_saved_register, pyuw_sniffer)
7561         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7562         Update.
7563         (struct saved_reg): Add constructor.
7564         <value>: Now a gdbpy_ref<>.
7565
7566 2018-06-27  Tom Tromey  <tom@tromey.com>
7567
7568         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7569
7570 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7571
7572         * gdb-gdb.py.in: Format using autopep8.
7573
7574 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7575
7576         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7577         (type_lookup_function): Recognize CORE_ADDR values.
7578
7579 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7580
7581         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7582         print tag_name.
7583
7584 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7585
7586         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7587         <__lt__>: Add.
7588
7589 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7590
7591         * gdb-gdb.py: Move to...
7592         * gdb-gdb.py.in: ... here.
7593         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7594         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7595         dependencies.
7596         (distclean): Remove gdb-gdb.py when cleaning.
7597         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7598         * configure: Re-generate.
7599
7600 2018-06-27  Pedro Alves  <palves@redhat.com>
7601
7602         * proc-service.c (get_ps_regcache): New.
7603         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7604         (ps_lsetfpregs): Use it.
7605
7606 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7607
7608         PR gdb/21695
7609         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7610         declaration.
7611         (dwarf_decode_lines_1): Adjust.
7612
7613 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7614
7615         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7616         override.
7617         <info_proc>: Likewise.
7618
7619 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7620
7621         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7622         to windows_fetch_one_register, and only handle the case of
7623         fetching one register.  Move the code that reloads the context
7624         and iterates over all registers if R is negative to...
7625         (windows_nat_target::fetch_registers): ... here.
7626         (do_windows_store_inferior_registers): Rename to
7627         windows_store_one_register, and only handle the case of storing
7628         one register.  Move the code that handles the case where r is
7629         negative to...
7630         (windows_nat_target::store_registers) ... here.
7631
7632 2018-06-26  Tom Tromey  <tom@tromey.com>
7633
7634         PR rust/22574:
7635         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7636         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7637         Update.
7638         (rust_internal_print_type): Add podata parameter.
7639         (rust_print_type): Update.
7640
7641 2018-06-26  Tom Tromey  <tom@tromey.com>
7642
7643         * typeprint.h (struct print_offset_data) <update, finish,
7644         maybe_print_hole>: New methods.
7645         <indentation>: New constant.
7646         * typeprint.c (print_offset_data::indentation): Define.
7647         (print_offset_data::maybe_print_hole, print_offset_data::update)
7648         (print_offset_data::finish): Move from c-typeprint.c and rename.
7649         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7650         (print_spaces_filtered_with_print_options): Update.
7651         (c_print_type_union_field_offset, maybe_print_hole)
7652         (c_print_type_struct_field_offset): Move to typeprint.c and
7653         rename.
7654         (c_type_print_base_struct_union): Update.
7655
7656 2018-06-25  Pedro Alves  <palves@redhat.com>
7657
7658         * gdbthread.h (thread_info_ref, delete_thread)
7659         (delete_thread_silent, first_thread_of_inferior)
7660         (any_thread_of_inferior, switch_to_thread)
7661         (enable_thread_stack_temporaries)
7662         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7663         (get_last_thread_stack_temporary)
7664         (value_in_thread_stack_temporaries, can_access_registers_thread):
7665         Spell out "struct thread_info" instead of just "thread_info".
7666         * inferior.h (notice_new_inferior): Likewise.
7667
7668 2018-06-25  Pedro Alves  <palves@redhat.com>
7669
7670         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7671         pass thread_info pointer to delete_thread.
7672         (windows_nat_target::detach): Pass inferior pointer to
7673         detach_inferior.
7674         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7675         delete_thread.
7676         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7677         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7678         and pass a thread_info pointer to delete_thread.
7679         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7680         pass thread_info pointer to delete_thread.
7681         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7682         delete_thread_silent call.
7683         * procfs.c (procfs_target::detach): Pass inferior pointer to
7684         detach_inferior.
7685         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7686         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7687         delete_thread_silent call.
7688         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7689         pass thread_info pointer to delete_thread.
7690         (windows_nat_target::detach): Pass inferior pointer to
7691         delete_inferior.
7692
7693 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7694
7695         * regcache.c (readable_regcache::read_part): Fix asserts.
7696         (reg_buffer::raw_collect_part): New function.
7697         (regcache::write_part): Fix asserts.
7698         (reg_buffer::raw_supply_part): New function.
7699         (regcache::transfer_regset_register): New helper function.
7700         (regcache::transfer_regset): Call new functions.
7701         (regcache_supply_regset): Use gdb_byte*.
7702         (regcache::supply_regset): Likewise.
7703         (regcache_collect_regset): Likewise.
7704         (regcache::collect_regset): Likewise.
7705         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7706         (reg_buffer::raw_supply_part): Likewise.
7707         (regcache::transfer_regset_register): Likewise.
7708         (regcache::transfer_regset): Use gdb_byte*.
7709
7710 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7711
7712         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7713
7714 2018-06-21  Pedro Alves  <palves@redhat.com>
7715
7716         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7717         instead of a ptid_t.  All callers adjusted.
7718         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7719         adjusted.
7720         (print_ada_task_info, display_current_task_id, task_command_1):
7721         Adjust.
7722         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7723         inferior_thread.
7724         (breakpoint_kind): Adjust.
7725         (remove_breakpoints_pid): Rename to ...
7726         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7727         pointer.  All callers adjusted.
7728         (bpstat_clear_actions): Use inferior_thread.
7729         (get_bpstat_thread): New.
7730         (bpstat_do_actions): Use it.
7731         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7732         to take a thread_info pointer.  All callers adjusted.
7733         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7734         (breakpoint_re_set_thread): Use inferior_thread.
7735         * breakpoint.h (struct inferior): Forward declare.
7736         (bpstat_stop_status): Update.
7737         (remove_breakpoints_pid): Delete.
7738         (remove_breakpoints_inf): New.
7739         * bsd-uthread.c (bsd_uthread_target::wait)
7740         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7741         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7742         (maint_btrace_packet_history_cmd)
7743         (maint_btrace_clear_packet_history_cmd): Adjust.
7744         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7745         inferior_thread.
7746         * cli/cli-interp.c: Include "inferior.h".
7747         * common/refcounted-object.h (struct
7748         refcounted_object_ref_policy): New.
7749         * compile/compile-object-load.c: Include gdbthread.h.
7750         (store_regs): Use inferior_thread.
7751         * corelow.c (core_target::close): Use current_inferior.
7752         (core_target_open): Adjust to use first_thread_of_inferior and use
7753         the current inferior.
7754         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7755         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7756         <thread>: ... this new field.  All references adjusted.
7757         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7758         Take a thread_info pointer instead of a ptid_t.
7759         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7760         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7761         thread_info pointer instead of a ptid_t.
7762         * elfread.c: Include "inferior.h".
7763         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7764         Use inferior_thread.
7765         * eval.c (evaluate_subexp): Likewise.
7766         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7767         inferior_thread.
7768         * gdb_proc_service.h (struct thread_info): Forward declare.
7769         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7770         <thread>: ... this new field.  All references adjusted.
7771         * gdbarch.h, gdbarch.c: Regenerate.
7772         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7773         'thread' parameter.  All implementations and callers adjusted.
7774         * gdbthread.h (thread_info) <set_running>: New method.
7775         (delete_thread, delete_thread_silent): Take a thread_info pointer
7776         instead of a ptid.
7777         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7778         (first_thread_of_process): Delete, replaced by ...
7779         (first_thread_of_inferior): ... this new function.  All callers
7780         adjusted.
7781         (any_live_thread_of_process): Delete, replaced by ...
7782         (any_live_thread_of_inferior): ... this new function.  All callers
7783         adjusted.
7784         (switch_to_thread, switch_to_no_thread): Declare.
7785         (is_executing): Delete.
7786         (enable_thread_stack_temporaries): Update comment.
7787         <enable_thread_stack_temporaries>: Take a thread_info pointer
7788         instead of a ptid_t.  Incref the thread.
7789         <~enable_thread_stack_temporaries>: Decref the thread.
7790         <m_ptid>: Delete
7791         <m_thr>: New.
7792         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7793         (get_last_thread_stack_temporary)
7794         (value_in_thread_stack_temporaries, can_access_registers_thread):
7795         Take a thread_info pointer instead of a ptid_t.  All callers
7796         adjusted.
7797         * infcall.c (get_call_return_value): Use inferior_thread.
7798         (run_inferior_call): Work with thread pointers instead of ptid_t.
7799         (call_function_by_hand_dummy): Work with thread pointers instead
7800         of ptid_t.  Use thread_info_ref.
7801         * infcmd.c (proceed_thread_callback): Access thread's state
7802         directly.
7803         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7804         access thread's state directly.
7805         (continue_command): Use inferior_thread.
7806         (info_program_command): Use find_thread_ptid and access thread
7807         state directly.
7808         (proceed_after_attach_callback): Use thread state directly.
7809         (notice_new_inferior): Take a thread_info pointer instead of a
7810         ptid_t.  All callers adjusted.
7811         (exit_inferior): Take an inferior pointer instead of a pid.  All
7812         callers adjusted.
7813         (exit_inferior_silent): New.
7814         (detach_inferior): Delete.
7815         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7816         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7817         (detach_inferior_command, kill_inferior_command): Use
7818         find_inferior_id instead of valid_gdb_inferior_id and
7819         gdb_inferior_id_to_pid.
7820         (inferior_command): Use inferior and thread pointers.
7821         * inferior.h (struct thread_info): Forward declare.
7822         (notice_new_inferior): Take a thread_info pointer instead of a
7823         ptid_t.  All callers adjusted.
7824         (detach_inferior): Delete declaration.
7825         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7826         instead of a pid.  All callers adjusted.
7827         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7828         (valid_gdb_inferior_id): Delete.
7829         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7830         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7831         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7832         ...
7833         <inf>: ... this new field.
7834         <step_ptid>: Delete, replaced by ...
7835         <step_thread>: ... this new field.
7836         (get_displaced_stepping_state): Take an inferior pointer instead
7837         of a pid.  All callers adjusted.
7838         (displaced_step_in_progress_any_inferior): Adjust.
7839         (displaced_step_in_progress_thread): Take a thread pointer instead
7840         of a ptid_t.  All callers adjusted.
7841         (displaced_step_in_progress, add_displaced_stepping_state): Take
7842         an inferior pointer instead of a pid.  All callers adjusted.
7843         (get_displaced_step_closure_by_addr): Adjust.
7844         (remove_displaced_stepping_state): Take an inferior pointer
7845         instead of a pid.  All callers adjusted.
7846         (displaced_step_prepare_throw, displaced_step_prepare)
7847         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7848         All callers adjusted.
7849         (start_step_over): Adjust.
7850         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7851         displaced step queue.
7852         (do_target_resume): Adjust.
7853         (fetch_inferior_event): Use inferior_thread.
7854         (context_switch, get_inferior_stop_soon): Take an
7855         execution_control_state pointer instead of a ptid_t.  All callers
7856         adjusted.
7857         (switch_to_thread_cleanup): Delete.
7858         (stop_all_threads): Use scoped_restore_current_thread.
7859         * inline-frame.c: Include "gdbthread.h".
7860         (inline_state) <inline_state>: Take a thread pointer instead of a
7861         ptid_t.  All callers adjusted.
7862         <ptid>: Delete, replaced by ...
7863         <thread>: ... this new field.
7864         (find_inline_frame_state): Take a thread pointer instead of a
7865         ptid_t.  All callers adjusted.
7866         (skip_inline_frames, step_into_inline_frame)
7867         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7868         pointer instead of a ptid_t.  All callers adjusted.
7869         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7870         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7871         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7872         pointers directly.
7873         * linux-nat.c (get_detach_signal): Likewise.
7874         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7875         (thread_db_notice_clone): Adjust.
7876         (thread_db_find_new_threads_silently)
7877         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7878         a thread pointer instead of a ptid_t.  All callers adjusted.
7879         * mi/mi-cmd-var.c: Include "inferior.h".
7880         (mi_cmd_var_update_iter): Update to use thread pointers.
7881         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7882         inferior directly.
7883         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7884         out to ...
7885         (mi_output_running): ... this new function.
7886         (mi_on_resume_1): Adjust to use it.
7887         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7888         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7889         directly.
7890         (interrupt_thread_callback): : Adjust to use thread and inferior
7891         pointers.
7892         * proc-service.c: Include "gdbthread.h".
7893         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7894         * progspace-and-thread.c: Include "inferior.h".
7895         * progspace.c: Include "inferior.h".
7896         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7897         hold a reference to an inferior_object.
7898         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7899         inferior_thread.
7900         * python/py-inferior.c (struct inferior_object): Give the type a
7901         tag name instead of a typedef.
7902         (python_on_normal_stop): No need to check if the current thread is
7903         listed.
7904         (inferior_to_inferior_object): Change return type to
7905         inferior_object.  All callers adjusted.
7906         (find_thread_object): Delete, bits factored out to ...
7907         (thread_to_thread_object): ... this new function.
7908         * python/py-infthread.c (create_thread_object): Use
7909         inferior_to_inferior_object.
7910         (thpy_is_stopped): Use thread pointer directly.
7911         (gdbpy_selected_thread): Use inferior_thread.
7912         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7913         field, replaced with ...
7914         <thread>: ... this new field.  All users adjusted.
7915         (btpy_insn_or_gap_new): Drop const.
7916         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7917         callers adjusted.
7918         * python/py-record.c: Include "gdbthread.h".
7919         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7920         a ptid_t.  All callers adjusted.
7921         (gdbpy_current_recording): Use inferior_thread.
7922         * python/py-record.h (recpy_record_object) <ptid>: Delete
7923         field, replaced with ...
7924         <thread>: ... this new field.  All users adjusted.
7925         (recpy_element_object) <ptid>: Delete
7926         field, replaced with ...
7927         <thread>: ... this new field.  All users adjusted.
7928         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7929         a ptid_t.  All callers adjusted.
7930         * python/py-threadevent.c: Include "gdbthread.h".
7931         (get_event_thread): Use thread_to_thread_object.
7932         * python/python-internal.h (struct inferior_object): Forward
7933         declare.
7934         (find_thread_object, find_inferior_object): Delete declarations.
7935         (thread_to_thread_object, inferior_to_inferior_object): New
7936         declarations.
7937         * record-btrace.c: Include "inferior.h".
7938         (require_btrace_thread): Use inferior_thread.
7939         (record_btrace_frame_sniffer)
7940         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7941         (get_thread_current_frame): Use scoped_restore_current_thread and
7942         switch_to_thread.
7943         (get_thread_current_frame): Use thread pointer directly.
7944         (record_btrace_replay_at_breakpoint): Use thread's inferior
7945         pointer directly.
7946         * record-full.c: Include "inferior.h".
7947         * regcache.c: Include "gdbthread.h".
7948         (get_thread_arch_regcache): Use the inferior's address space
7949         directly.
7950         (get_thread_regcache, registers_changed_thread): New.
7951         * regcache.h (get_thread_regcache(thread_info *thread)): New
7952         overload.
7953         (registers_changed_thread): New.
7954         (remote_target) <remote_detach_1>: Swap order of parameters.
7955         (remote_add_thread): <remote_add_thread>: Return the new thread.
7956         (get_remote_thread_info(ptid_t)): New overload.
7957         (remote_target::remote_notice_new_inferior): Use thread pointers
7958         directly.
7959         (remote_target::process_initial_stop_replies): Use
7960         thread_info::set_running.
7961         (remote_target::remote_detach_1, remote_target::detach)
7962         (extended_remote_target::detach): Adjust.
7963         * stack.c (frame_show_address): Use inferior_thread.
7964         * target-debug.h (target_debug_print_thread_info_pp): New.
7965         * target-delegates.c: Regenerate.
7966         * target.c (default_thread_address_space): Delete.
7967         (memory_xfer_partial_1): Use current_inferior.
7968         (target_detach): Use current_inferior.
7969         (target_thread_address_space): Delete.
7970         (generic_mourn_inferior): Use current_inferior.
7971         * target.h (struct target_ops) <thread_address_space>: Delete.
7972         (target_thread_address_space): Delete.
7973         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7974         pointers directly.
7975         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7976         thread pointer instead of a ptid_t.  Adjust all callers.
7977         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7978         (first_thread_of_process): Delete, replaced by ...
7979         (first_thread_of_inferior): ... this new function.  All callers
7980         adjusted.
7981         (any_thread_of_process): Rename to ...
7982         (any_thread_of_inferior): ... this, and take an inferior pointer.
7983         (any_live_thread_of_process): Rename to ...
7984         (any_live_thread_of_inferior): ... this, and take an inferior
7985         pointer.
7986         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7987         (value_in_thread_stack_temporaries)
7988         (get_last_thread_stack_temporary): Take a thread pointer instead
7989         of a ptid_t.  Adjust all callers.
7990         (thread_info::set_running): New.
7991         (validate_registers_access): Use inferior_thread.
7992         (can_access_registers_ptid): Rename to ...
7993         (can_access_registers_thread): ... this, and take a thread
7994         pointer.
7995         (print_thread_info_1): Adjust to compare thread pointers instead
7996         of ptids.
7997         (switch_to_no_thread, switch_to_thread): Make extern.
7998         (scoped_restore_current_thread::~scoped_restore_current_thread):
7999         Use m_thread pointer directly.
8000         (scoped_restore_current_thread::scoped_restore_current_thread):
8001         Use inferior_thread.
8002         (thread_command): Use thread pointer directly.
8003         (thread_num_make_value_helper): Use inferior_thread.
8004         * top.c (execute_command): Use inferior_thread.
8005         * tui/tui-interp.c: Include "inferior.h".
8006         * varobj.c (varobj_create): Use inferior_thread.
8007         (value_of_root_1): Use find_thread_global_id instead of
8008         global_thread_id_to_ptid.
8009
8010 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
8011
8012         * regcache.c (readable_regcache::read_part): Avoid memcpy when
8013         possible.
8014         (regcache::write_part): Likewise.
8015         (readable_regcache::cooked_read_part): Update comment.
8016         (readable_regcache::cooked_write_part): Likewise.
8017         * regcache.h: (readable_regcache::read_part): Likewise.
8018         (regcache::write_part): Likewise.
8019
8020 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
8021             Dirk Schubert  <dirk.schubert@arm.com>
8022
8023         * aarch64-linux-nat.c (post_attach): New.
8024         (aarch64_linux_nat_target::post_attach): Override post_attach to
8025         record the number of hardware debug registers.
8026
8027 2018-06-20  Tom Tromey  <tom@tromey.com>
8028
8029         * python/py-param.c (add_setshow_generic): Make parameters const.
8030         (parmpy_init): Update.
8031
8032 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8033
8034         * regcache.h (regcache_cooked_read_ftype): Rename to...
8035         (register_read_ftype): ...this, change type to function_view.
8036         (class reg_buffer) <save>: Remove src parameter.
8037         (readonly_detached_regcache) <readonly_detached_regcache>: Make
8038         parameter non-const in first overload.  Remove src parameter in
8039         second overload.
8040         * regcache.c (do_cooked_read): Remove.
8041         (readonly_detached_regcache::readonly_detached_regcache): Make
8042         parameter non-const, adjust call to other constructor.
8043         (reg_buffer::save): Remove src parameter.
8044         * frame.c (do_frame_register_read): Remove.
8045         (frame_save_as_regcache): Use lambda function.
8046         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8047         parameter to ppu2spu_data *.
8048         (ppu2spu_sniffer): Use lambda function.
8049
8050 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8051
8052         * record-full.c (record_full_target::insert_breakpoint): Remove
8053         "struct" keyword, add const.
8054
8055 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
8056
8057         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8058         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8059         * configure.ac: Remove AC_PREREQ, add missing quoting.
8060         * gnulib/configure.ac: Modernize usage of
8061         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
8062         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8063         (AUTOMAKE_VERSION): Bump to 1.15.1.
8064         * configure: Re-generate.
8065         * config.in: Re-generate.
8066         * aclocal.m4: Re-generate.
8067         * gnulib/aclocal.m4: Re-generate.
8068         * gnulib/config.in: Re-generate.
8069         * gnulib/configure: Re-generate.
8070         * gnulib/import/Makefile.in: Re-generate.
8071
8072 2018-06-19  Pedro Alves  <palves@redhat.com>
8073
8074         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8075         (lookup_minimal_symbol_by_pc_section): ... here with
8076         gdb_assert_not_reached added.
8077
8078 2018-06-19  Pedro Alves  <palves@redhat.com>
8079
8080         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8081         parameter with a block parameter.  Compare location's block symbol
8082         with the frame's block instead of addresses.
8083         (skip_inline_frames): Pass the current block instead of the
8084         frame's address.  Break out as soon as we determine the frame
8085         should not be skipped.
8086
8087 2018-06-18  Tom Tromey  <tom@tromey.com>
8088
8089         * solib-aix.c (solib_aix_get_section_offsets): Return
8090         unique_xmalloc_ptr.
8091         (solib_aix_solib_create_inferior_hook): Update.
8092
8093 2018-06-18  Tom Tromey  <tom@tromey.com>
8094
8095         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8096
8097 2018-06-18  Tom Tromey  <tom@tromey.com>
8098
8099         * solib-frv.c (frv_relocate_main_executable): Use
8100         unique_xmalloc_ptr.
8101         * solib-dsbt.c (dsbt_relocate_main_executable): Use
8102         unique_xmalloc_ptr.
8103
8104 2018-06-18  Tom Tromey  <tom@tromey.com>
8105
8106         * objfiles.h (inhibit_section_map_updates): Update.
8107         (resume_section_map_updates, resume_section_map_updates_cleanup):
8108         Remove.
8109         * solib-svr4.c (svr4_handle_solib_event): Update.
8110         * objfiles.c (inhibit_section_map_updates): Return
8111         scoped_restore_tmpl<int>.
8112         (resume_section_map_updates, resume_section_map_updates_cleanup):
8113         Remove.
8114
8115 2018-06-18  Tom Tromey  <tom@tromey.com>
8116
8117         * valprint.h (read_string): Update.
8118         * valprint.c (read_string): Change type of "buffer".
8119         (val_print_string): Update.
8120         * python/py-value.c (valpy_string): Update.
8121         * language.h (struct language_defn) <la_get_string>: Change
8122         type of "buffer".
8123         (default_get_string, c_get_string): Update.
8124         * language.c (default_get_string): Change type of "buffer".
8125         * guile/scm-value.c (gdbscm_value_to_string): Update.
8126         * c-lang.c (c_get_string): Change type of "buffer".
8127
8128 2018-06-18  Tom Tromey  <tom@tromey.com>
8129
8130         * ser-mingw.c (struct pipe_state_destroyer): New.
8131         (pipe_state_up): New typedef.
8132         (cleanup_pipe_state): Remove.
8133         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
8134
8135 2018-06-18  Tom Tromey  <tom@tromey.com>
8136
8137         * rust-lang.h (rust_yyerror): Don't declare.
8138         * rust-lang.c (rust_language_defn): Update.
8139         * rust-exp.y (yyerror): Now static.
8140         * parse.c (parse_exp_in_context_1): Update.
8141         * p-lang.h (p_yyerror): Don't declare.
8142         * p-lang.c (p_language_defn): Update.
8143         * p-exp.y (yyerror): Now static.
8144         * opencl-lang.c (opencl_language_defn): Update.
8145         * objc-lang.c (objc_language_defn): Update.
8146         * m2-lang.h (m2_yyerror): Don't declare.
8147         * m2-lang.c (m2_language_defn): Update.
8148         * m2-exp.y (yyerror): Now static.
8149         * language.h (struct language_defn) <la_error>: Remove.
8150         * language.c (unk_lang_error): Remove.
8151         (unknown_language_defn, auto_language_defn): Remove.
8152         * go-lang.h (go_yyerror): Don't declare.
8153         * go-lang.c (go_language_defn): Update.
8154         * go-exp.y (yyerror): Now static.
8155         * f-lang.h (f_yyerror): Don't declare.
8156         * f-lang.c (f_language_defn): Update.
8157         * f-exp.y (yyerror): Now static.
8158         * d-lang.h (d_yyerror): Don't declare.
8159         * d-lang.c (d_language_defn): Update.
8160         * d-exp.y (yyerror): Now static.
8161         * c-lang.h (c_yyerror): Don't declare.
8162         * c-lang.c (c_language_defn, cplus_language_defn)
8163         (asm_language_defn, minimal_language_defn): Update.
8164         * c-exp.y (yyerror): Now static.
8165         * ada-lang.h (ada_yyerror): Don't declare.
8166         * ada-lang.c (ada_language_defn): Update.
8167         * ada-exp.y (yyerror): Now static.
8168
8169 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8170
8171         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8172         (store_sveregs_to_thread): Likewise.
8173         (aarch64_linux_fetch_inferior_registers): Check for SVE.
8174         (aarch64_linux_store_inferior_registers): Likewise.
8175         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8176         function.
8177         (aarch64_sve_regs_copy_to_regcache): Likewise.
8178         (aarch64_sve_regs_copy_from_regcache): Likewise.
8179         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8180         declaration.
8181         (aarch64_sve_regs_copy_to_regcache): Likewise.
8182         (aarch64_sve_regs_copy_from_regcache): Likewise.
8183         (sve_context): Structure from Linux headers.
8184         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8185         (SVE_SIG_ZREG_SIZE): Likewise.
8186         (SVE_SIG_PREG_SIZE): Likewise.
8187         (SVE_SIG_FFR_SIZE): Likewise.
8188         (SVE_SIG_REGS_OFFSET): Likewise.
8189         (SVE_SIG_ZREGS_OFFSET): Likewise.
8190         (SVE_SIG_ZREG_OFFSET): Likewise.
8191         (SVE_SIG_ZREGS_SIZE): Likewise.
8192         (SVE_SIG_PREGS_OFFSET): Likewise.
8193         (SVE_SIG_PREG_OFFSET): Likewise.
8194         (SVE_SIG_PREGS_SIZE): Likewise.
8195         (SVE_SIG_FFR_OFFSET): Likewise.
8196         (SVE_SIG_REGS_SIZE): Likewise.
8197         (SVE_SIG_CONTEXT_SIZE): Likewise.
8198         (SVE_PT_REGS_MASK): Likewise.
8199         (SVE_PT_REGS_FPSIMD): Likewise.
8200         (SVE_PT_REGS_SVE): Likewise.
8201         (SVE_PT_VL_INHERIT): Likewise.
8202         (SVE_PT_VL_ONEXEC): Likewise.
8203         (SVE_PT_REGS_OFFSET): Likewise.
8204         (SVE_PT_FPSIMD_OFFSET): Likewise.
8205         (SVE_PT_FPSIMD_SIZE): Likewise.
8206         (SVE_PT_SVE_ZREG_SIZE): Likewise.
8207         (SVE_PT_SVE_PREG_SIZE): Likewise.
8208         (SVE_PT_SVE_FFR_SIZE): Likewise.
8209         (SVE_PT_SVE_FPSR_SIZE): Likewise.
8210         (SVE_PT_SVE_FPCR_SIZE): Likewise.
8211         (__SVE_SIG_TO_PT): Likewise.
8212         (SVE_PT_SVE_OFFSET): Likewise.
8213         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8214         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8215         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8216         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8217         (SVE_PT_SVE_PREG_OFFSET): Likewise.
8218         (SVE_PT_SVE_PREGS_SIZE): Likewise.
8219         (SVE_PT_SVE_FFR_OFFSET): Likewise.
8220         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8221         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8222         (SVE_PT_SVE_SIZE): Likewise.
8223         (SVE_PT_SIZE): Likewise.
8224         (HAS_SVE_STATE): New define.
8225
8226 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8227
8228         * nat/aarch64-sve-linux-sigcontext.h: New file.
8229         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8230         new files.
8231         (SVE_VQ_MIN): Likewise.
8232         (SVE_VQ_MAX): Likewise.
8233         (SVE_VL_MIN): Likewise.
8234         (SVE_VL_MAX): Likewise.
8235         (SVE_NUM_ZREGS): Likewise.
8236         (SVE_NUM_PREGS): Likewise.
8237         (sve_vl_valid): Likewise.
8238         (struct user_sve_header): Likewise.
8239
8240 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
8241             Richard Bunt <Richard.Bunt@arm.com>
8242
8243         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8244         was requested by GDB.
8245
8246 2018-06-15  Tom de Vries  <tdevries@suse.de>
8247
8248         * MAINTAINERS (Write After Approval): Add Tom de Vries.
8249
8250 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
8251
8252         * gnulib/update-gnulib.sh: Print expected versions of
8253         autoconf/aclocal.
8254
8255 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
8256
8257         * arch-utils.c (default_type_align): Use type_length_units.
8258         * gdbtypes.c (type_align): Use type_length_units.
8259
8260 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8261
8262         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8263         of 'define' command.
8264
8265 2018-06-14  Tom de Vries  <tdevries@suse.de>
8266
8267         PR cli/22573
8268         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8269         get_no_prettyformat_print_options.
8270
8271 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8272
8273         * sparc-nat.h: Include target.h.
8274         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8275         <fetch_registers>: Remove this argument in function call.
8276         <store_registers>: Remove this argument in function call, remove
8277         extra semicolon.
8278         <low_forget_process>: Call sparc64_forget_process instead of
8279         sparc_forget_process.
8280
8281 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8282
8283         * procfs.c (_initialize_procfs): Use add_inf_child_target.
8284         (procfs_target::make_corefile_notes): Adjust to new
8285         target_read_alloc return type.
8286
8287 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8288             Stephen Roberts  <stephen.roberts@arm.com>
8289
8290         PR gdb/22882
8291         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8292         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8293         Move should_notify_stop local into more inner scope.
8294
8295 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8296             Stephen Roberts  <stephen.roberts@arm.com>
8297
8298         PR gdb/22882
8299         * infrun.c (resume_1): Add call to mark_async_event_handler.
8300
8301 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8302
8303         * infrun.c (do_target_wait): Change old version of $pc printed.
8304
8305 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8306
8307         * dwarf2read.c (read_index_from_section): Rename to...
8308         (read_gdb_index_from_section): ... this, update all callers.
8309         (dwarf2_read_index): Rename to...
8310         (dwarf2_read_gdb_index): ... this, update all callers.
8311
8312 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
8313
8314         * hppa-linux-nat.c
8315         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8316         hppa_linux_nat_target::fetch_registers.
8317
8318 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8319
8320         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8321         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8322         (AARCH64_DWARF_SVE_FFR): Likewise.
8323         (AARCH64_DWARF_SVE_P0): Likewise.
8324         (AARCH64_DWARF_SVE_Z0): Likewise.
8325
8326 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8327
8328         * common/common-regcache.h (raw_compare): New function.
8329         * regcache.c (regcache::raw_compare): Likewise.
8330         * regcache.h (regcache::raw_compare): New declaration.
8331
8332 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8333
8334         * common/common-regcache.h (reg_buffer_common): New structure.
8335         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8336         (reg_buffer::raw_supply): Likewise.
8337         (reg_buffer::raw_supply_integer): Likewise.
8338         (reg_buffer::raw_supply_zeroed): Likewise.
8339         (reg_buffer::raw_collect): Likewise.
8340         (reg_buffer::raw_collect_integer): Likewise.
8341         * regcache.h (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
8348 2018-06-10  Tom Tromey  <tom@tromey.com>
8349
8350         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8351         (class remote_state) <stop_reply_queue>: Now std::vector.
8352         (remote_state::~remote_state)
8353         (remote_target::stop_reply_queue_length): Update.
8354         (struct queue_iter_param, remove_child_of_pending_fork)
8355         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8356         (check_pending_event_prevents_wildcard_vcont_callback)
8357         (remove_stop_reply_for_inferior)
8358         (remove_stop_reply_of_remote_state)
8359         (remote_notif_remove_once_on_match)
8360         (stop_reply_match_ptid_and_ws)
8361         (remote_kill_child_of_pending_fork): Remove.
8362         (remote_target::remove_new_fork_children)
8363         (remote_target::check_pending_events_prevent_wildcard_vcont)
8364         (remote_target::discard_pending_stop_replies)
8365         (remote_target::discard_pending_stop_replies_in_queue)
8366         (remote_target::remote_notif_remove_queued_reply)
8367         (remote_target::queued_stop_reply)
8368         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8369         (remote_target::wait, remote_target::kill_new_fork_children)
8370         (remote_target::async): Update.
8371
8372 2018-06-10  Tom Tromey  <tom@tromey.com>
8373
8374         * record-full.c (record_full_arch_list_cleanups): Remove.
8375         (record_full_message): Use try/catch.
8376         (record_full_wait_cleanups): Remove.
8377         (record_full_wait_1): Use try/catch.
8378         (record_full_restore): Likewise.
8379
8380 2018-06-10  Tom Tromey  <tom@tromey.com>
8381
8382         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8383         declare VEC.  Add constructor.
8384         <in_target_beneath>: Now bool.
8385         (record_full_breakpoints): Now a std::vector, static.
8386         (record_full_sync_record_breakpoints)
8387         (record_full_init_record_breakpoints)
8388         (record_full_target::insert_breakpoint)
8389         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8390
8391 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8392
8393         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8394         * serial.c (serial_interface_lookup): Remove struct keyword.
8395
8396 2018-06-10  Tom Tromey  <tom@tromey.com>
8397
8398         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8399         method.
8400         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8401         a method.
8402         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8403         method.
8404         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8405         "beneath" as a method.
8406         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8407         Use "beneath" as a method.
8408
8409 2018-06-10  Tom Tromey  <tom@tromey.com>
8410
8411         * tracefile.c (struct trace_file_writer_deleter): New.
8412         <operator()>: Rename from trace_file_writer_xfree.
8413         (trace_file_writer_up): New typedef.
8414         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8415
8416 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8417
8418         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8419         <m_registers, m_register_status>: Change type to
8420         std::unique_ptr.
8421         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8422         XCNEWVEC.
8423
8424 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8425
8426         * common/common-regcache.h (enum register_status): Add
8427         underlying type "signed char".
8428         * regcache.h (reg_buffer) <m_register_status>: Change type to
8429         register_status *.
8430         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8431         register_status instead of signed char.
8432         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8433         (reg_buffer::get_register_status): Remove cast.
8434         (readable_regcache::raw_read): Remove cast.
8435         (readable_regcache::cooked_read): Remove cast.
8436
8437 2018-06-09  Tom Tromey  <tom@tromey.com>
8438
8439         * source.c (reverse_search_command, forward_search_command): Use
8440         scoped_fd.
8441
8442 2018-06-09  Tom Tromey  <tom@tromey.com>
8443
8444         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8445         (serial_ops_list): Now static, std::vector.
8446         (serial_interface_lookup, serial_add_interface): Update.
8447
8448 2018-06-09  Tom Tromey  <tom@tromey.com>
8449
8450         * dwarf2read.c (process_cu_includes): Update.
8451         (process_full_comp_unit): Update.
8452         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8453         std::vector.
8454
8455 2018-06-08  Paul Koning  <paul_koning@dell.com>
8456
8457         PR gdb/23252
8458
8459         * python/python.c (do_start_initialization):
8460         Avoid call to internal Python API.
8461         (init__gdb_module): New function.
8462
8463 2018-06-08  Gary Benson <gbenson@redhat.com>
8464
8465         * linux-thread-db.c (valprint.h): New include.
8466         (struct check_thread_db_info): New structure.
8467         (check_thread_db_on_load, tdb_testinfo): New static globals.
8468         (check_thread_db, check_thread_db_callback): New functions.
8469         (try_thread_db_load_1): Run integrity checks if requested.
8470         (maintenance_check_libthread_db): New function.
8471         (_initialize_thread_db): Register "maint check libthread-db"
8472         and "maint set/show check-libthread-db".
8473         * NEWS: Mention the above new commands.
8474
8475 2018-06-08  Tom Tromey  <tom@tromey.com>
8476
8477         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8478         now a method.
8479
8480 2018-06-08  Tom Tromey  <tom@tromey.com>
8481
8482         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8483
8484 2018-06-08  Tom Tromey  <tom@tromey.com>
8485
8486         * common/btrace-common.h (struct btrace_data): Add constructor,
8487         destructor, move assignment operator.
8488         <empty, clear, fini>: New methods.
8489         <format>: Initialize.
8490         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8491         (btrace_data_empty): Don't declare.
8492         * common/btrace-common.c (btrace_data_init): Remove.
8493         (btrace_data::fini): Rename from btrace_data_fini.
8494         (btrace_data::empty): Rename from btrace_data_empty.
8495         (btrace_data::clear): Rename from btrace_data_clear.  Return
8496         bool.
8497         * btrace.h (make_cleanup_btrace_data): Don't declare.
8498         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8499         (parse_xml_btrace): Update.
8500         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8501         (maint_btrace_clear_packet_history_cmd): Update.
8502
8503 2018-06-07  Pedro Alves  <palves@redhat.com>
8504
8505         * target.h (target_ops) <beneath>: Now a method.  All references
8506         updated.
8507         (class target_stack): New.
8508         * target.c (g_target_stack): New.
8509         (g_current_top_target): Delete.
8510         (current_top_target): Get the top target out of g_target_stack.
8511         (target_stack::push, target_stack::unpush): New.
8512         (push_target, unpush_target): Reimplement.
8513         (target_is_pushed): Reimplement in terms of g_target_stack.
8514         (target_ops::beneath, target_stack::find_beneath): New.
8515
8516 2018-06-07  Pedro Alves  <palves@redhat.com>
8517
8518         * target.h (find_target_beneath): Delete declaration.
8519         * target.c (find_target_beneath): Delete definition.
8520         * aix-thread.c: All callers of find_target_beneath adjusted to
8521         call target_ops::beneath instead.
8522         * bsd-uthread.c: Likewise.
8523         * linux-thread-db.c: Likewise.
8524         * ravenscar-thread.c: Likewise.
8525         * sol-thread.c: Likewise.
8526         * spu-multiarch.c: Likewise.
8527
8528 2018-06-07  Pedro Alves  <palves@redhat.com>
8529
8530         * target.h (target_ops) <beneath>: Now a method.  All references
8531         updated.
8532         (target_ops) <m_beneath>: New.
8533         * target.c (target_ops::beneath): New.
8534         * corelow.c: Adjust all references to target_ops::beneath.
8535         * linux-thread-db.c: Likewise.
8536         * make-target-delegates: Likewise.
8537         * record-btrace.c: Likewise.
8538         * record-full.c: Likewise.
8539         * remote.c: Likewise.
8540         * target.c: Likewise.
8541         * target-delegates.c: Regenerate.
8542
8543 2018-06-07  Pedro Alves  <palves@redhat.com>
8544
8545         * target.h (target_stack): Delete.
8546         (current_top_target): Declare function.
8547         * target.c (target_stack): Delete.
8548         (g_current_top_target): New.
8549         (current_top_target): New function.
8550         * auxv.c: Use current_top_target instead of target_stack
8551         throughout.
8552         * avr-tdep.c: Likewise.
8553         * breakpoint.c: Likewise.
8554         * corefile.c: Likewise.
8555         * elfread.c: Likewise.
8556         * eval.c: Likewise.
8557         * exceptions.c: Likewise.
8558         * frame.c: Likewise.
8559         * gdbarch-selftests.c: Likewise.
8560         * gnu-v3-abi.c: Likewise.
8561         * ia64-tdep.c: Likewise.
8562         * ia64-vms-tdep.c: Likewise.
8563         * infcall.c: Likewise.
8564         * infcmd.c: Likewise.
8565         * infrun.c: Likewise.
8566         * linespec.c: Likewise.
8567         * linux-tdep.c: Likewise.
8568         * minsyms.c: Likewise.
8569         * ppc-linux-nat.c: Likewise.
8570         * ppc-linux-tdep.c: Likewise.
8571         * procfs.c: Likewise.
8572         * regcache.c: Likewise.
8573         * remote.c: Likewise.
8574         * rs6000-tdep.c: Likewise.
8575         * s390-linux-nat.c: Likewise.
8576         * s390-tdep.c: Likewise.
8577         * solib-aix.c: Likewise.
8578         * solib-darwin.c: Likewise.
8579         * solib-dsbt.c: Likewise.
8580         * solib-spu.c: Likewise.
8581         * solib-svr4.c: Likewise.
8582         * solib-target.c: Likewise.
8583         * sparc-tdep.c: Likewise.
8584         * sparc64-tdep.c: Likewise.
8585         * spu-tdep.c: Likewise.
8586         * symfile.c: Likewise.
8587         * symtab.c: Likewise.
8588         * target-descriptions.c: Likewise.
8589         * target-memory.c: Likewise.
8590         * target.c: Likewise.
8591         * target.h: Likewise.
8592         * tracefile-tfile.c: Likewise.
8593         * tracepoint.c: Likewise.
8594         * valops.c: Likewise.
8595         * valprint.c: Likewise.
8596         * value.c: Likewise.
8597         * windows-tdep.c: Likewise.
8598         * mi/mi-main.c: Likewise.
8599
8600 2018-06-07  Tom Tromey  <tom@tromey.com>
8601
8602         * valprint.h (build_address_symbolic): Declare.
8603         * printcmd.c (print_address_symbolic): Update.
8604         (build_address_symbolic): Change "name" and "filename" to
8605         std::string.
8606         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8607         Update.
8608         * defs.h (build_address_symbolic): Remove declaration.
8609
8610 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8611
8612         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8613         (aarch64_vnv_type): Add function.
8614         (aarch64_pseudo_register_name): Add V regs for SVE.
8615         (aarch64_pseudo_register_type): Likewise.
8616         (aarch64_pseudo_register_reggroup_p): Likewise.
8617         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8618         (aarch64_pseudo_read_value): Add V regs for SVE.
8619         (aarch64_pseudo_write_2): Use V0 offset for SVE
8620         (aarch64_pseudo_write): Add V regs for SVE.
8621         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8622
8623 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8624
8625         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8626         (sve_vl_from_vq): Likewise.
8627
8628 2018-06-05  Tom Tromey  <tom@tromey.com>
8629
8630         * cli/cli-cmds.c (show_version): Update.
8631         * top.c (print_gdb_version): Add "interactive" parameter.
8632         Update.
8633         * main.c (captured_main_1): Update.
8634         * top.h (print_gdb_version): Add "interactive" parameter and a
8635         comment.
8636
8637 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8638
8639         * common/enum-flags.h: Add trailing semicolon to example in
8640         comment.
8641
8642 2018-06-05  Tom Tromey  <tom@tromey.com>
8643
8644         PR cli/12326:
8645         * NEWS: Add entry about pager.
8646         * utils.c (pagination_disabled_for_command): New global.
8647         (prompt_for_continue): Allow "c" response to prompt.
8648         (reinitialize_more_filter): Clear
8649         pagination_disabled_for_command.
8650         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8651
8652 2018-06-04  Tom Tromey  <tom@tromey.com>
8653
8654         * ada-lang.h (ada_lookup_symbol_list): Update.
8655         * ada-lang.c (resolve_subexp): Update.
8656         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8657         parameter.
8658         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8659         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8660         results parameter to std::vector.
8661         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8662         Update.
8663         * ada-exp.y (block_lookup): Update.
8664         (select_possible_type_sym): Change type of syms.  Remove nsyms
8665         parameter.
8666         (write_var_or_type, write_name_assoc): Update.
8667
8668 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8669
8670         * windows-nat.c (windows_nat_target::xfer_partial): Return
8671         TARGET_XFER_E_IO if we need to delegate to the target beneath
8672         but BENEATH is NULL.
8673
8674 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8675
8676         * Makefile.in (config.status): Add configure.nat as a
8677         dependency.
8678
8679 2018-06-04  Tom Tromey  <tom@tromey.com>
8680
8681         * cp-name-parser.y (cpname_state): Add method declarations.
8682         (HANDLE_QUAL): Update.
8683         (cpname_state::d_grab, cpname_state::fill_comp)
8684         (cpname_state::make_operator, cpname_state::make_dtor)
8685         (cpname_state::make_builtin_type, cpname_state::make_name)
8686         (cpname_state::d_qualify, cpname_state::d_int_type)
8687         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8688         (%union): Move earlier.
8689
8690 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8691
8692         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8693
8694 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8695
8696         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8697         (aarch64_pseudo_write_1): Likewise.
8698         (aarch64_pseudo_read_value): Use helper.
8699         (aarch64_pseudo_write): Likewise.
8700
8701 2018-06-04  Pedro Alves  <palves@redhat.com>
8702
8703         * darwin-nat.c (darwin_ops): Delete.
8704         (darwin_attach_pid): Use get_native_target.
8705
8706 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8707
8708         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8709         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8710
8711 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8712
8713         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8714         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8715         (aarch64_gdbarch_init): Check for SVE.
8716         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8717
8718 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8719
8720         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8721         * aarch64-tdep.h (aarch64_read_description): Likewise.
8722         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8723         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8724         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8725         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8726         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8727
8728 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8729
8730         * value.c (value_fetch_lazy_bitfield): New.
8731         (value_fetch_lazy_memory): New.
8732         (value_fetch_lazy_register): New.
8733         (value_fetch_lazy): Factor out to smaller functions.
8734
8735 2018-06-01  Tom Tromey  <tom@tromey.com>
8736
8737         * cp-name-parser.y (backslashable, represented): Now const.
8738
8739 2018-06-01  Tom Tromey  <tom@tromey.com>
8740
8741         * cp-name-parser.y: Include parser-defs.h.
8742         (parser_fprintf): Remove declaration.
8743
8744 2018-06-01  Tom Tromey  <tom@tromey.com>
8745
8746         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8747         %parse-param.
8748         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8749         (global_result): Remove globals.
8750         (struct cpname_state): New.
8751         (yyparse): Don't declare.
8752         (yylex, yyerror): Move declarations after %union.
8753         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8754         (make_name): Add state parameter.
8755         Update all callers.
8756         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8757         parameter.
8758         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8759         Update.
8760         (yylex): Add lvalp, state parameters.
8761         (yyerror): Add state parameter.
8762         (cp_demangled_name_to_comp): Update.
8763
8764 2018-06-01  Tom Tromey  <tom@tromey.com>
8765
8766         * cp-name-parser.y (parser_fprintf): Declare.
8767         (GDB_YY_REMAP_PREFIX): Define.
8768         Include yy-remap.h.  Don't redefine yy* identifiers.
8769
8770 2018-06-01  Tom Tromey  <tom@tromey.com>
8771
8772         * python/py-type.c (typy_legacy_template_argument): Update.
8773         * cp-support.h (cp_demangled_name_to_comp): Update.
8774         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8775         parameter to be a "std::string *".
8776         (main): Update.
8777
8778 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8779
8780         * ada-lex.l: Include "diagnostics.h" instead of
8781         "common/diagnostics.h".
8782         * unittests/environ-selftests.c: Likewise.
8783         * common/diagnostics.h: Moved to ../include.
8784
8785 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8786
8787         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8788         to language_mode_manual while calling breakpoint_re_set_one.
8789
8790 2018-06-01  Tom Tromey  <tom@tromey.com>
8791
8792         * valops.c (value_cast_structs, destructor_name_p): Update.
8793         * symtab.c (gdb_mangle_name): Update.
8794         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8795         Update.
8796         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8797         (pascal_object_print_value_fields, pascal_object_print_value):
8798         Update.
8799         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8800         * linespec.c (find_methods): Update.
8801         * gdbtypes.h (type_name_no_tag): Remove.
8802         (type_name_or_error): Rename from type_name_no_tag_or_error.
8803         * gdbtypes.c (type_name_no_tag): Remove.
8804         (type_name_or_error): Rename from type_name_no_tag_or_error.
8805         (lookup_struct_elt_type, check_typedef): Update.
8806         * expprint.c (print_subexp_standard): Update.
8807         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8808         * d-namespace.c (d_lookup_nested_symbol): Update.
8809         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8810         (cp_print_class_member): Update.
8811         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8812         * completer.c (add_struct_fields): Update.
8813         * c-typeprint.c (cp_type_print_derivation_info)
8814         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8815         Update.
8816         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8817         (ada_prefer_type, ada_is_exception_sym): Update.
8818
8819 2018-06-01  Tom Tromey  <tom@tromey.com>
8820
8821         * valops.c (enum_constant_from_type, value_namespace_elt)
8822         (value_maybe_namespace_elt): Update.
8823         * valarith.c (find_size_for_pointer_math): Update.
8824         * target-descriptions.c (make_gdb_type): Update.
8825         * symmisc.c (print_symbol): Update.
8826         * stabsread.c (define_symbol, read_type)
8827         (complain_about_struct_wipeout, add_undefined_type)
8828         (cleanup_undefined_types_1): Update.
8829         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8830         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8831         (rust_internal_print_type, rust_composite_type)
8832         (rust_evaluate_funcall, rust_evaluate_subexp)
8833         (rust_inclusive_range_type_p): Update.
8834         * python/py-type.c (typy_get_tag): Update.
8835         * p-typeprint.c (pascal_type_print_base): Update.
8836         * mdebugread.c (parse_symbol, parse_type): Update.
8837         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8838         Update.
8839         * guile/scm-type.c (gdbscm_type_tag): Update.
8840         * go-lang.c (sixg_string_p): Update.
8841         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8842         Update.
8843         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8844         (TYPE_TAG_NAME): Remove.
8845         * gdbtypes.c (type_name_no_tag): Simplify.
8846         (check_typedef, check_types_equal, recursive_dump_type)
8847         (copy_type_recursive, arch_composite_type): Update.
8848         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8849         in summary mode when needed.
8850         * eval.c (evaluate_funcall): Update.
8851         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8852         (process_structure_scope, read_enumeration_type)
8853         (read_namespace_type, read_module_type, determine_prefix): Update.
8854         * cp-support.c (inspect_type): Update.
8855         * coffread.c (process_coff_symbol, decode_base_type): Update.
8856         * c-varobj.c (c_is_path_expr_parent): Update.
8857         * c-typeprint.c (c_type_print_base_struct_union): Update.
8858         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8859         summary when using C language.
8860         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8861         (gen_maybe_namespace_elt): Update.
8862         * ada-lang.c (ada_type_name): Simplify.
8863         (empty_record, ada_template_to_fixed_record_type_1)
8864         (template_to_static_fixed_type)
8865         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8866
8867 2018-06-01  Tom Tromey  <tom@tromey.com>
8868
8869         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8870         c_print_type.
8871         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8872         (c_print_type): Update.
8873         (c_print_type): New overload.
8874         (c_type_print_varspec_prefix, c_type_print_args)
8875         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8876         (c_type_print_base_struct_union, c_type_print_base_1)
8877         (cp_type_print_method_args): Add "language" parameter.
8878         (c_type_print_base): Update.
8879         * c-lang.h (c_print_type): Add new overload.
8880
8881 2018-06-01  Tom Tromey  <tom@tromey.com>
8882
8883         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8884         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8885
8886 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8887
8888         * aarch64-tdep.c (aarch64_sve_register_names): New const
8889         var.
8890         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8891         (AARCH64_SVE_Z_REGS_NUM): New define.
8892         (AARCH64_SVE_P_REGS_NUM): Likewise.
8893         (AARCH64_SVE_NUM_REGS): Likewise.
8894
8895 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8896
8897         * nat/linux-ptrace.h [__alpha__]
8898         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8899         definitions.
8900
8901 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8902
8903         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8904         the endianness selected.
8905         * NEWS: Document `set endian auto' mode operation update.
8906
8907 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8908
8909         * Makefile.in: Add new header.
8910         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8911         (sve_vl_from_vg): Likewise.
8912         (sve_vq_from_vl): Likewise.
8913         (sve_vl_from_vq): Likewise.
8914         (sve_vq_from_vg): Likewise.
8915         (sve_vg_from_vq): Likewise.
8916         * configure.nat: Add new c file.
8917         * nat/aarch64-sve-linux-ptrace.c: New file.
8918         * nat/aarch64-sve-linux-ptrace.h: New file.
8919
8920 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8921
8922         * aarch64-linux-nat.c (aarch64_linux_read_description):
8923         Add parmeter zero.
8924         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8925         Likewise.
8926         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8927         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8928         (aarch64_gdbarch_init): Add parmeter zero.
8929         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8930         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8931         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8932         parmeter.
8933         * doc/gdb.texinfo: Describe SVE feature
8934         * features/aarch64-sve.c: New file.
8935
8936 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8937
8938         PR gdb/23210
8939         * gdbarch.sh (significant_addr_bit): Default to zero when
8940         not set by target architecture.
8941         * gdbarch.c: Re-generated.
8942         * utils.c (address_significant): Update.
8943
8944 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8945
8946         * stack.c (func_command): Remove trailing newline in call to error.
8947
8948 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8949
8950         * regcache.h (regcache_raw_collect): Remove, update callers to
8951         use regcache::raw_collect.
8952         * regcache.c (regcache_raw_collect): Remove.
8953
8954 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8955
8956         * regcache.h (regcache_raw_supply): Remove, update callers to
8957         use detached_regcache::raw_supply.
8958         * regcache.c (regcache_raw_supply): Remove.
8959
8960 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8961
8962         * regcache.h (regcache_cooked_write_part): Remove, update
8963         callers to use regcache::cooked_write_part.
8964         * regcache.c (regcache_cooked_write_part): Remove.
8965
8966 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8967
8968         * regcache.h (regcache_cooked_read_part): Remove, update callers
8969         to use readable_regcache::cooked_read_part.
8970         * regcache.c (regcache_cooked_read_part): Remove.
8971
8972 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8973
8974         * regcache.h (regcache_cooked_read_value): Remove, update
8975         callers to use readable_regcache::cooked_read_value.
8976         * regcache.c (regcache_cooked_read_value): Remove.
8977
8978 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8979
8980         * regcache.h (regcache_cooked_write): Remove, update callers to
8981         use regcache::cooked_write.
8982         * regcache.c (regcache_cooked_write): Remove.
8983
8984 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8985
8986         * regcache.h (regcache_invalidate): Remove, update callers to
8987         use detached_regcache::invalidate instead.
8988         * regcache.c (regcache_invalidate): Remove.
8989
8990 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8991
8992         * regcache.h (regcache_raw_write_part): Remove, update callers
8993         to use regcache::raw_write_part instead.
8994         * regcache.c (regcache_raw_write_part): Remove.
8995
8996 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8997
8998         * regcache.h (regcache_raw_read_part): Remove, update callers to
8999         use readable_regcache::raw_read_part instead.
9000         * regcache.c (regcache_raw_read_part): Remove.
9001
9002 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9003
9004         * regcache.h (regcache_cooked_read): Remove, update callers to
9005         use readable_regcache::cooked_read instead.
9006         * regcache.c (regcache_cooked_read): Remove.
9007
9008 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9009
9010         * regcache.h (regcache_raw_write): Remove, update callers to use
9011         regcache::raw_write instead.
9012         * regcache.c (regcache_raw_write): Remove.
9013
9014 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9015
9016         * regcache.h (regcache_raw_read): Remove, update callers to use
9017         readable_regcache::raw_read instead.
9018         * regcache.c (regcache_raw_read): Remove.
9019
9020 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9021
9022         * regcache.h (regcache_raw_update): Remove, update callers to
9023         use readable_regcache::raw_update instead.
9024         * regcache.c (regcache_raw_update): Remove.
9025
9026 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9027
9028         * regcache.h (regcache_register_status): Remove, update callers
9029         to use reg_buffer::get_register_status directly instead.
9030         * regcache.c (regcache_register_status): Remove.
9031
9032 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9033
9034         * regcache.h (regcache_get_ptid): Remove, update all callers to
9035         call regcache::ptid instead.
9036         * regcache.c (regcache_get_ptid): Remove.
9037
9038 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9039
9040         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9041
9042 2018-05-30  Pedro Alves  <palves@redhat.com>
9043
9044         * common/common-exceptions.h (exception_rethrow): Use
9045         ATTRIBUTE_NORETURN.
9046
9047 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
9048
9049         * breakpoint.c (print_solib_event, check_status_catch_solib):
9050         Remove struct keyword in range-based for loops.
9051         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9052         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9053         Likewise.
9054         * linespec.c (find_superclass_methods, search_minsyms_for_name):
9055         Likewise.
9056         * symfile.c (addr_info_make_relative): Likewise.
9057         * thread.c (value_in_thread_stack_temporaries): Likewise.
9058
9059 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
9060
9061         PR gdb/16841
9062         * valops.c (value_struct_elt_for_reference): Call check_typedef on
9063         aggregate type to get its real type before accessing it.
9064
9065 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
9066
9067         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9068         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9069         * coff-pe-read.c (add_pe_forwarded_sym): Replace
9070         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9071         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9072         * jit.c (jit_breakpoint_re_set_internal): Likewise.
9073         * printcmd.c (info_address_command): Likewise.
9074
9075 2018-05-29  Tom Tromey  <tom@tromey.com>
9076
9077         * windows-nat.c (handle_exception): Update fall-through comment.
9078
9079 2018-05-29  Tom Tromey  <tom@tromey.com>
9080
9081         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
9082         (struct program_space) <added_solibs>: Now a std::vector.
9083         * breakpoint.c (print_solib_event): Update.
9084         (check_status_catch_solib): Update.
9085         * progspace.c (clear_program_space_solib_cache): Update.
9086         * solib.c (update_solib_list): Update.
9087
9088 2018-05-29  Tom Tromey  <tom@tromey.com>
9089
9090         * python/py-type.c (typy_richcompare): Update.
9091         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9092         * gdbtypes.h (types_deeply_equal): Return bool.
9093         (types_equal): Likewise.
9094         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
9095         declare VEC.
9096         (check_types_equal): Change worklist to std::vector.  Return
9097         bool.
9098         (struct type_equality_entry): Add constructor.
9099         (compare_maybe_null_strings): Return bool.
9100         (check_types_worklist): Return bool.  Change worklist to
9101         std::vector.
9102         (types_deeply_equal): Use std::vector.
9103         (types_equal): Return bool.
9104         (compare_maybe_null_strings): Simplify.
9105
9106 2018-05-29  Tom Tromey  <tom@tromey.com>
9107
9108         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
9109
9110 2018-05-29  Tom Tromey  <tom@tromey.com>
9111
9112         * objc-lang.h: Don't include cp-support.h.
9113         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
9114         declare VEC.
9115
9116 2018-05-27  Tom Tromey  <tom@tromey.com>
9117
9118         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9119
9120 2018-05-25  Tom Tromey  <tom@tromey.com>
9121
9122         * value.c (value::location): Initialize.
9123
9124 2018-05-25  Tom Tromey  <tom@tromey.com>
9125
9126         * dbxread.c (init_bincl_list): Remove.
9127         (bincl_list): Now a std::vector.
9128         (bincls_allocated, next_bincl): Remove.
9129         (free_bincl_list, do_free_bincl_list_cleanup)
9130         (make_cleanup_free_bincl_list): Remove.
9131         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9132         unique_xmalloc_ptr.
9133         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9134         (struct header_file_location): Add constructor.
9135         (add_bincl_to_list): Remove.
9136
9137 2018-05-25  Tom Tromey  <tom@tromey.com>
9138
9139         * tui/tui.c (tui_enable): Update.
9140         * mi/mi-interp.c (mi_interp::init): Update.
9141         * interps.h (class interp) <name>: New method.
9142         <m_name>: Rename from name.
9143         (~scoped_restore_interp): Update.
9144         * interps.c (interp::interp): Update.
9145         (interp_add, interp_set, interp_lookup_existing)
9146         (current_interp_named_p): Update.
9147
9148 2018-05-25  Tom Tromey  <tom@tromey.com>
9149
9150         * interps.c (interp_name): Remove.
9151         * mi/mi-interp.c (mi_interp::init): Update.
9152         * interps.h (interp_name): Remove.
9153         (~scoped_restore_interp): Update.
9154         * tui/tui.c (tui_enable): Update.
9155
9156 2018-05-25  Tom Tromey  <tom@tromey.com>
9157
9158         * utils.c (fputs_maybe_filtered): Update.
9159         * linespec.c (decode_line_full): Update.
9160         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9161         (mi_print_breakpoint_for_event, mi_solib_loaded)
9162         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9163         (mi_user_selected_context_changed): Update.
9164         * mi/mi-main.c (mi_execute_command): Update.
9165         * cli/cli-script.c (execute_control_command): Update.
9166         * python/python.c (execute_gdb_command): Update.
9167         * solib.c (info_sharedlibrary_command): Update.
9168         * interps.c (interp_ui_out): Remove.
9169         * interps.h (interp_ui_out): Remove.
9170
9171 2018-05-25  Tom Tromey  <tom@tromey.com>
9172
9173         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9174         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9175         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9176
9177 2018-05-25  Tom Tromey  <tom@tromey.com>
9178
9179         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9180         * interps.c (interp_exec): Use scoped_restore.
9181
9182 2018-05-25  Tom Tromey  <tom@tromey.com>
9183
9184         * remote.c (remote_target::remote_file_get): Use
9185         gdb::byte_vector.
9186         (remote_target::remote_file_put): Likewise.
9187
9188 2018-05-25  Tom Tromey  <tom@tromey.com>
9189
9190         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9191         a std::string.
9192         (get_pe_section_index, add_pe_exported_sym): Update.
9193         (read_pe_exported_syms): Use gdb::def_vector.
9194
9195 2018-05-25  Tom Tromey  <tom@tromey.com>
9196
9197         * frame.c (remove_prev_frame): Remove.
9198         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9199
9200 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
9201
9202         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9203         Remove prototypes.
9204         * mips-linux-nat.c (supply_fpregset): Always call
9205         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9206         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9207         `mips_fill_fpregset'.
9208         * mips-linux-tdep.c (mips_supply_fpregset)
9209         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9210         (mips_fill_fpregset_wrapper): Remove functions.
9211         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9212         (mips_linux_fpregset): Remove variable.
9213         (mips_linux_iterate_over_regset_sections): Use
9214         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9215         (mips_linux_o32_sigframe_init): Remove comment.
9216
9217 2018-05-25  Pedro Alves  <palves@redhat.com>
9218
9219         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9220         (struct readahead_cache, struct packet_reg, struct
9221         remote_arch_state, class remote_state): Move higher up in the
9222         file.
9223         (remote_target::m_remote_state): Now an object instead of a pointer.
9224         (remote_target::get_remote_state): Adjust.
9225
9226 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9227
9228         * stack.c (select_and_print_frame): Delete.
9229         (struct function_bounds): Move struct within function.
9230         (func_command): Most content moved into new function
9231         find_frame_for_function, use new function, print result, add
9232         function comment.
9233         (find_frame_for_function): New function, now returns a result.
9234
9235 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9236
9237         * stack.c (iterate_over_block_arg_vars): Fix comment.
9238         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9239
9240 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9241
9242         PR gdb/23203
9243         * frame.c
9244         (scoped_restore_selected_frame::scoped_restore_selected_frame):
9245         Define.
9246         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9247         Define.
9248         * frame.h (class scoped_restore_selected_frame): New class.
9249         * stack.c (print_frame_local_vars): Remove catching and rethrowing
9250         of any exception, use scoped_restore_selected_frame to restore the
9251         frame instead.
9252
9253 2018-05-24  Pedro Alves  <palves@redhat.com>
9254
9255         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9256         override.
9257
9258 2018-05-23  Tom Tromey  <tom@tromey.com>
9259
9260         * complaints.c (struct complaints): Remove.
9261         (symfile_complaint_book): Remove.
9262         (series): New global.
9263         (complaint_internal): Update.
9264         (clear_complaints): Update.
9265
9266 2018-05-23  Tom Tromey  <tom@tromey.com>
9267
9268         * complaints.c (counters): New global.
9269         (struct complain): Remove.
9270         (struct complaints) <root>: Remove.
9271         (complaint_sentinel): Remove.
9272         (symfile_complaint_book): Update.
9273         (find_complaint) Remove.
9274         (complaint_internal, clear_complaints): Update.
9275
9276 2018-05-23  Tom Tromey  <tom@tromey.com>
9277
9278         * complaints.c (struct complain) <file, line>: Remove.
9279         (find_complaint): Remove file, line parameters.
9280         (complaint_internal): Update.
9281
9282 2018-05-23  Tom Tromey  <tom@tromey.com>
9283
9284         * complaints.c (vcomplaint): Remove.
9285         (complaint_internal) Merge in contents of vcomplaint.
9286
9287 2018-05-23  Tom Tromey  <tom@tromey.com>
9288
9289         * complaints.c (struct complaints) <explanation>: Remove.
9290         (symfile_explanations): Remove.
9291         (symfile_complaint_book): Update.
9292         (vcomplaint): Update.
9293         (struct explanation): Remove.
9294
9295 2018-05-23  Tom Tromey  <tom@tromey.com>
9296
9297         * complaints.c (symfile_complaints): Remove.
9298         (complaint_internal): Remove "complaints" parameter.
9299         (clear_complaints, vcomplaint): Remove "c" parameter.
9300         (get_complaints): Remove.
9301         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9302         (dwarf2_debug_line_missing_file_complaint)
9303         (dwarf2_debug_line_missing_end_sequence_complaint)
9304         (dwarf2_complex_location_expr_complaint)
9305         (dwarf2_const_value_length_mismatch_complaint)
9306         (dwarf2_section_buffer_overflow_complaint)
9307         (dwarf2_macro_malformed_definition_complaint)
9308         (dwarf2_invalid_attrib_class_complaint)
9309         (create_addrmap_from_index, dw2_symtab_iter_next)
9310         (dw2_expand_marked_cus)
9311         (dw2_debug_names_iterator::find_vec_in_debug_names)
9312         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9313         (create_debug_type_hash_table, init_cutu_and_read_dies)
9314         (partial_die_parent_scope, add_partial_enumeration)
9315         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9316         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9317         (read_import_statement, read_file_scope, create_dwo_cu_reader)
9318         (create_cus_hash_table, create_dwp_hash_table)
9319         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9320         (dwarf2_rnglists_process, dwarf2_ranges_process)
9321         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9322         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9323         (handle_struct_member_die, process_structure_scope)
9324         (read_array_type, read_common_block, read_module_type)
9325         (read_tag_pointer_type, read_typedef, read_base_type)
9326         (read_subrange_type, load_partial_dies, partial_die_info::read)
9327         (partial_die_info::read, partial_die_info::read)
9328         (partial_die_info::read, read_checked_initial_length_and_offset)
9329         (dwarf2_string_attr, read_formatted_entries)
9330         (dwarf_decode_line_header)
9331         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9332         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9333         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9334         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9335         (get_signatured_type, get_DW_AT_signature_type)
9336         (decode_locdesc, file_file_name, consume_improper_spaces)
9337         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9338         (dwarf_decode_macro_bytes, dwarf_decode_macros)
9339         (dwarf2_symbol_mark_computed, set_die_type)
9340         (read_attribute_value): Update.
9341         * stap-probe.c (handle_stap_probe, get_stap_base_address):
9342         Update.
9343         * dbxread.c (unknown_symtype_complaint)
9344         (lbrac_mismatch_complaint, repeated_header_complaint)
9345         (set_namestring, function_outside_compilation_unit_complaint)
9346         (read_dbx_symtab, process_one_symbol): Update.
9347         * gdbtypes.c (stub_noname_complaint): Update.
9348         * windows-nat.c (handle_unload_dll): Update.
9349         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9350         (decode_base_type): Update.
9351         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9352         (eb_complaint, record_include_begin, record_include_end)
9353         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9354         (process_xcoff_symbol, read_symbol)
9355         (function_outside_compilation_unit_complaint)
9356         (scan_xcoff_symtab): Update.
9357         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9358         * buildsym.c (finish_block_internal, make_blockvector)
9359         (end_symtab_get_static_block, augment_type_symtab): Update.
9360         * dtrace-probe.c (dtrace_process_dof)
9361         (dtrace_static_probe_ops::get_probes): Update.
9362         * complaints.h (struct complaint): Don't declare.
9363         (symfile_complaints): Remove.
9364         (complaint_internal): Remove "complaints" parameter.
9365         (complaint): Likewise.
9366         (clear_complaints): Likewise.
9367         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9368         (reread_symbols): Update.
9369         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9370         (dwarf2_frame_cache, decode_frame_entry): Update.
9371         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9372         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9373         (info_selectors_command): Update.
9374         * macrotab.c (macro_include, check_for_redefinition)
9375         (macro_undef): Update.
9376         * objfiles.c (filter_overlapping_sections): Update.
9377         * stabsread.c (invalid_cpp_abbrev_complaint)
9378         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9379         (define_symbol, error_type, read_type, rs6000_builtin_type)
9380         (stabs_method_name_from_physname, read_member_functions)
9381         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9382         (attach_fields_to_type, complain_about_struct_wipeout)
9383         (read_range_type, read_args, common_block_start)
9384         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9385         Update.
9386         * mdebugread.c (index_complaint, unknown_ext_complaint)
9387         (basic_type_complaint, bad_tag_guess_complaint)
9388         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9389         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9390         (parse_procedure, parse_lines)
9391         (function_outside_compilation_unit_complaint)
9392         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9393         (bad_tag_guess_complaint, reg_value_complaint): Update.
9394         * cp-support.c (demangled_name_complaint): Update.
9395         * macroscope.c (sal_macro_scope): Update.
9396         * dwarf-index-write.c (class debug_names): Update.
9397
9398 2018-05-23  Tom Tromey  <tom@tromey.com>
9399
9400         * complaints.c (clear_complaints): Remove "noisy" parameter.
9401         * complaints.h (clear_complaints): Update.
9402         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9403         (reread_symbols): Update.
9404
9405 2018-05-23  Tom Tromey  <tom@tromey.com>
9406
9407         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9408         SUBSEQUENT_MESSAGE.
9409         (vcomplaint, clear_complaints): Update.
9410         (symfile_explanations): Remove some messages.
9411
9412 2018-05-23  Tom Tromey  <tom@tromey.com>
9413
9414         * complaints.c (internal_complaint): Remove.
9415         * complaints.h (internal_complaint): Remove.
9416
9417 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9418
9419         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9420
9421 2018-05-22  Pedro Alves  <palves@redhat.com>
9422
9423         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9424         (remote_fileio_badfd, remote_fileio_return_errno)
9425         (remote_fileio_return_success, remote_fileio_func_open)
9426         (remote_fileio_func_open, remote_fileio_func_close)
9427         (remote_fileio_func_read, remote_fileio_func_write)
9428         (remote_fileio_func_lseek, remote_fileio_func_rename)
9429         (remote_fileio_func_unlink, remote_fileio_func_stat)
9430         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9431         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9432         remote_target parameter.
9433         (remote_fio_func_map) <func>: Add remote_target parameter.
9434         (do_remote_fileio_request, remote_fileio_request):
9435         * remote-fileio.h (remote_fileio_request):
9436         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9437         remote_target parameter.
9438         (remote_notif_process, handle_notification): Adjust to pass down
9439         the remote.
9440         (remote_notif_state_allocate): Add remote_target parameter.  Save
9441         it.
9442         * remote-notif.h (struct remote_target): Forward declare.
9443         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9444         remote_target parameter.
9445         (struct remote_notif_state) <remote>: New field.
9446         (remote_notif_ack, remote_notif_parse): Add remote_target
9447         parameter.
9448         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9449         remote_target parameter.
9450         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9451         (threads_listing_context, rmt_thread_action, protocol_feature)
9452         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9453         (packet_result, struct threads_listing_context, remote_state):
9454         Move definitions and declarations higher up.
9455         (remote_target) <~remote_target>: Declare.
9456         (remote_download_command_source, remote_file_put, remote_file_get)
9457         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9458         (remote_hostio_pread_vFile, remote_hostio_send_command)
9459         (remote_hostio_set_filesystem, remote_hostio_open)
9460         (remote_hostio_close, remote_hostio_unlink, remote_state)
9461         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9462         (get_memory_write_packet_size, get_memory_read_packet_size)
9463         (append_pending_thread_resumptions, remote_detach_1)
9464         (append_resumption, remote_resume_with_vcont)
9465         (add_current_inferior_and_thread, wait_ns, wait_as)
9466         (process_stop_reply, remote_notice_new_inferior)
9467         (process_initial_stop_replies, remote_add_thread)
9468         (btrace_sync_conf, remote_btrace_maybe_reopen)
9469         (remove_new_fork_children, kill_new_fork_children)
9470         (discard_pending_stop_replies, stop_reply_queue_length)
9471         (check_pending_events_prevent_wildcard_vcont)
9472         (discard_pending_stop_replies_in_queue, stop_reply)
9473         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9474         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9475         (remote_interrupt_as, remote_interrupt_ns)
9476         (remote_get_noisy_reply, remote_query_attached)
9477         (remote_add_inferior, remote_current_thread, get_current_thread)
9478         (set_thread, set_general_thread, set_continue_thread)
9479         (set_general_process, write_ptid)
9480         (remote_unpack_thread_info_response, remote_get_threadinfo)
9481         (parse_threadlist_response, remote_get_threadlist)
9482         (remote_threadlist_iterator, remote_get_threads_with_ql)
9483         (remote_get_threads_with_qxfer)
9484         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9485         (get_offsets, remote_check_symbols, remote_supported_packet)
9486         (remote_query_supported, remote_packet_size)
9487         (remote_serial_quit_handler, remote_detach_pid)
9488         (remote_vcont_probe, remote_resume_with_hc)
9489         (send_interrupt_sequence, interrupt_query)
9490         (remote_notif_get_pending_events, fetch_register_using_p)
9491         (send_g_packet, process_g_packet, fetch_registers_using_g)
9492         (store_register_using_P, store_registers_using_G)
9493         (set_remote_traceframe, check_binary_download)
9494         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9495         (remote_xfer_live_readonly_partial, remote_read_bytes)
9496         (remote_send_printf, remote_flash_write, readchar)
9497         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9498         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9499         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9500         (extended_remote_disable_randomization, extended_remote_run)
9501         (send_environment_packet, extended_remote_environment_support)
9502         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9503         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9504         (packet_command): Now methods of ...
9505         (remote_target): ... this class.
9506         (m_remote_state) <remote_target>: New field.
9507         (struct remote_state) <stop_reply_queue,
9508         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9509         fields.
9510         (remote_state::remote_state): Allocate stop_reply_queue.
9511         (remote_state): Delete global.
9512         (get_remote_state_raw): Delete.
9513         (remote_target::get_remote_state): Allocate m_remote_state on
9514         demand.
9515         (get_current_remote_target): New.
9516         (remote_ops, extended_remote_ops): Delete.
9517         (wait_forever_enabled_p, remote_async_inferior_event_token):
9518         Delete, moved to struct remote_state.
9519         (remote_target::close): Delete self.  Destruction bits split to
9520         ...
9521         (remote_target::~remote_target): ... this.
9522         (show_memory_packet_size): Adjust to use
9523         get_current_remote_target.
9524         (struct protocol_feature) <func>: Add remote_target parameter.
9525         All callers adjusted.
9526         (curr_quit_handler_target): New.
9527         (remote_serial_quit_handler): Reimplement.
9528         (remote_target::open_1): Adjust to use get_current_remote_target.
9529         Heap-allocate remote_target/extended_remote_target instances.
9530         (vcont_builder::vcont_builder): Add remote_target parameter, and
9531         save it in m_remote.  All callers adjusted.
9532         (vcont_builder::m_remote): New field.
9533         (vcont_builder::restart, vcont_builder::flush)
9534         (vcont_builder::push_action): Use it.
9535         (remote_target::commit_resume): Use it.
9536         (struct queue_iter_param) <remote>: New field.
9537         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9538         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9539         (check_pending_event_prevents_wildcard_vcont_callback)
9540         (remote_target::check_pending_events_prevent_wildcard_vcont)
9541         (remote_target::discard_pending_stop_replies)
9542         (remote_target::discard_pending_stop_replies_in_queue)
9543         (remote_target::remote_notif_remove_queued_reply): Fill in
9544         'remote' field.
9545         (remote_notif_get_pending_events): New.
9546         (remote_target::readchar, remote_target::remote_serial_write):
9547         Save/restore curr_quit_handler_target.
9548         (putpkt): New.
9549         (kill_new_fork_children): Fill in 'remote' field.
9550         (packet_command): Use get_current_remote_target, defer to
9551         remote_target method of same name.
9552         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9553         parameter, and save it in m_remote.  All callers adjusted.
9554         (scoped_remote_fd::release): Use m_remote.
9555         (scoped_remote_fd::m_remote): New field.
9556         (remote_file_put, remote_file_get, remote_file_delete): Use
9557         get_current_remote_target, defer to remote_target method of same
9558         name.
9559         (remote_btrace_reset): Add remote_state paremeter.  Update all
9560         callers.
9561         (remote_async_inferior_event_handler). Pass down 'data'.
9562         (remote_new_objfile): Use get_current_remote_target.
9563         (remote_target::vcont_r_supported): New.
9564         (set_range_stepping): Use get_current_remote_target and
9565         remote_target::vcont_r_supported.
9566         (_initialize_remote): Don't allocate 'remote_state' and
9567         'stop_reply_queue' globals.
9568         * remote.h (struct remote_target): Forward declare.
9569         (getpkt, putpkt, remote_notif_get_pending_events): Add
9570         'remote_target' parameter.
9571
9572 2018-05-22  Pedro Alves  <palves@redhat.com>
9573
9574         * remote.c (vcont_builder): Now a class.  Make all data members
9575         private.
9576         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9577         Declare methods.
9578         (vcont_builder_restart): Rename to ...
9579         (vcont_builder::restart): ... this.
9580         (vcont_builder_flush): Rename to ...
9581         (vcont_builder::flush): ... this.
9582         (vcont_builder_push_action): Rename to ...
9583         (vcont_builder::push_action): ... this.
9584         (remote_target::commit_resume): Adjust.
9585
9586 2018-05-22  Pedro Alves  <palves@redhat.com>
9587
9588         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9589         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9590         (get_fixed_memory_packet_size): New.
9591         (get_memory_packet_size): Use it.
9592         (set_memory_packet_size): Don't override the config size with
9593         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9594         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9595         Don't refer to get_memory_packet_size if not connected to a remote
9596         target.  Show "(default)" if configured size is 0.
9597
9598 2018-05-22  Pedro Alves  <palves@redhat.com>
9599
9600         * remote.c (remote_target::mourn_inferior): Move
9601         discard_pending_stop_replies call here from ...
9602         (_initialize_remote): ... here.
9603
9604 2018-05-22  Pedro Alves  <palves@redhat.com>
9605
9606         * remote.c (compare_section_command): Remove set_general_process
9607         call.
9608
9609 2018-05-22  Pedro Alves  <palves@redhat.com>
9610
9611         * remote.c (struct packet_reg, struct remote_arch_state):
9612         Move higher up in the file.
9613         (remote_state) <m_arch_states>: Store remote_arch_state values
9614         instead of remote_arch_state pointers.
9615         (remote_state::get_remote_arch_state): Adjust.
9616
9617 2018-05-22  Pedro Alves  <palves@redhat.com>
9618
9619         * remote.c: Include <unordered_map>.
9620         (remote_state): Now a class.
9621         (remote_state) <get_remote_arch_state>: Declare method.
9622         <get_remote_arch_state>: New field.
9623         (remote_arch_state) <remote_arch_state>: Declare ctor.
9624         <regs>: Now a unique_ptr.
9625         (remote_gdbarch_data_handle): Delete.
9626         (get_remote_arch_state): Delete.
9627         (remote_state::get_remote_arch_state): New.
9628         (get_remote_state): Adjust to call remote_state's
9629         get_remote_arch_state method.
9630         (init_remote_state): Delete, bits factored out to ...
9631         (remote_arch_state::remote_arch_state): ... this new method.
9632         (get_remote_packet_size, get_memory_packet_size)
9633         (process_g_packet, remote_target::fetch_registers)
9634         (remote_target::prepare_to_store, store_registers_using_G)
9635         (remote_target::store_registers, remote_target::get_trace_status):
9636         Adjust to call remote_state's method.
9637         (_initialize_remote): Remove reference to
9638         remote_gdbarch_data_handle.
9639
9640 2018-05-22  Pedro Alves  <palves@redhat.com>
9641
9642         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9643         pread>: New method declarations.
9644         (remote_target::open_1): Adjust.
9645         (readahead_cache_invalidate): Rename to ...
9646         (readahead_cache::invalidate): ... this, and adjust to be a class
9647         method.
9648         (readahead_cache_invalidate_fd): Rename to ...
9649         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9650         class method.
9651         (remote_hostio_pwrite): Adjust.
9652         (remote_hostio_pread_from_cache): Rename to ...
9653         (readahead_cache::pread): ... this, and adjust to be a class
9654         method.
9655         (remote_hostio_close): Adjust.
9656
9657 2018-05-22  Pedro Alves  <palves@redhat.com>
9658
9659         * remote.c (remote_hostio_close_cleanup): Delete.
9660         (class scoped_remote_fd): New.
9661         (remote_file_put, remote_file_get): Use it.
9662
9663 2018-05-22  Pedro Alves  <palves@redhat.com>
9664
9665         (struct vCont_action_support): Use bool and initialize all fields.
9666         (struct readahead_cache): Initialize all fields.
9667         (remote_state): Use bool and initialize all fields.
9668         (remote_state::remote_state, remote_state::~remote_state): New.
9669         (new_remote_state): Delete.
9670         (_initialize_remote): Use new to allocate remote_state.
9671
9672 2018-05-22  Pedro Alves  <palves@redhat.com>
9673             張俊芝  <zjz@zjz.name>
9674
9675         PR gdb/22973
9676         * c-exp.y: Include "c-support.h".
9677         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9678         of tolower.  Use c_ident_is_alpha to scan names.
9679         * c-lang.c: Include "c-support.h".
9680         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9681         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9682         * c-support.h: New file, with bits factored out from ...
9683         * cp-name-parser.y: ... this file.
9684         Include "c-support.h".
9685         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9686         c-support.h and renamed.
9687         (symbol_end, yylex): Adjust.
9688
9689 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9690
9691         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9692         parameter type to CORE_ADDR.
9693         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9694         parameter type in declaration to CORE_ADDR.
9695         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9696         target_auxv_search to get AT_HWCAP and use the result to get the
9697         target description.
9698         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9699         to CORE_ADDR. Remove the cast of the return value to unsigned
9700         long. Fix error predicate of target_auxv_search.
9701         (ppc_linux_nat_target::read_description): Change the type of the
9702         hwcap variable to CORE_ADDR.
9703
9704 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9705
9706         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9707         if the size of fpscr is larger than 32 bits.
9708
9709 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9710
9711         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9712         (ppc32_linux_vsxregmap): New global.
9713         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9714         regcache_supply_regset, and regcache_collect_regset.
9715         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9716         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9717         (fetch_vsx_register, store_vsx_register): Remove.
9718         (fetch_vsx_registers): Add regno parameter. Get regset using
9719         ppc_linux_vsxregset. Use regset to supply registers.
9720         (store_vsx_registers): Add regno parameter. Get regset using
9721         ppc_linux_vsxregset. Use regset to collect registers.
9722         (fetch_register): Call fetch_vsx_registers instead of
9723         fetch_vsx_register.
9724         (store_register): Call store_vsx_registers instead of
9725         store_vsx_register.
9726         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9727         new regno parameter.
9728         (store_ppc_registers): Call store_vsx_registers with -1 for the
9729         new regno parameter.
9730         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9731         (ppc_collect_vsxregset): Remove.
9732
9733 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9734
9735         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9736         offset fields.
9737         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9738         for vector register offset fields.
9739         (ppc64_fbsd_reg_offsets): Likewise.
9740         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9741         to vector register offset fields.
9742         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9743         to vector register offset fields.
9744         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9745         vector register offset fields.
9746         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9747         initializers for vector register offset fields.
9748         (rs6000_aix64_reg_offsets): Likewise.
9749         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9750         (ppc_supply_vrregset): Remove.
9751         (ppc_collect_vrregset): Remove.
9752         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9753         (ppc_linux_vrregset) : New function.
9754         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9755         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9756         (ppc32_linux_vrregset): Remove.
9757         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9758         and use result instead of ppc32_linux_vrregset.
9759         (ppc32_linux_reg_offsets): Remove initializers for vector register
9760         offset fields.
9761         (ppc64_linux_reg_offsets): Likewise.
9762         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9763         * ppc-linux-nat.c: Include regset.h.
9764         (gdb_vrregset_t): Adjust comment to account for little-endian
9765         mode.
9766         (supply_vrregset, fill_vrregset): Remove.
9767         (fetch_altivec_register, store_altivec_register): Remove.
9768         (fetch_altivec_registers): Add regno parameter. Get regset using
9769         ppc_linux_vrregset. Use regset to supply registers.
9770         (store_altivec_registers): Add regno parameter. Get regset using
9771         ppc_linux_vrregset. Use regset to collect registers.
9772         (fetch_register): Call fetch_altivec_registers instead of
9773         fetch_altivec_register.
9774         (store_register): Call store_altivec_registers instead of
9775         store_altivec_register.
9776         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9777         the new regno parameter.
9778         (store_ppc_registers): Call store_altivec_registers with -1 for
9779         the new regno parameter.
9780
9781 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9782
9783         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9784         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9785         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9786         (gdb_vrregset_t): Change array type size to
9787         PPC_LINUX_SIZEOF_VRREGSET.
9788         (gdb_vsxregset_t): Change array type size to
9789         PPC_LINUX_SIZEOF_VSXREGSET.
9790         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9791         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9792         PPC_LINUX_SIZEOF_VSXREGSET.
9793
9794 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9795
9796         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9797         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9798         nat/ppc-linux.c.
9799         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9800         ppc_linux_target_wordsize with tid.
9801         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9802         wordsize with tid.
9803         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9804         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9805         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9806         tid parameter. Remove static specifier.
9807         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9808         (ppc_linux_target_wordsize): New declaration.
9809
9810 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9811
9812         * arch/ppc-linux-common.c: New file.
9813         * arch/ppc-linux-common.h: New file.
9814         * arch/ppc-linux-tdesc.h: New file.
9815         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9816         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9817         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9818         arch/ppc-linux-tdesc.h.
9819         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9820         arch/ppc-linux-tdesc.h.
9821         (ppc_linux_nat_target::read_description): Remove target
9822         description matching code. Fill a ppc_linux_features struct and
9823         call ppc_linux_match_description with it. Move comment about ISA
9824         2.05 to ppc-linux-common.c.
9825         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9826         arch/ppc-linux-tdesc.h.
9827         (ppc_linux_core_read_description): Remove target description
9828         matching code. Fill a ppc_linux_features struct and call
9829         ppc_linux_match_description with it.
9830         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9831         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9832         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9833         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9834         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9835         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9836         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9837         (tdesc_powerpc_e500l): Remove.
9838
9839 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9840
9841         * ada-lang.c (catch_assert_command): Pass empty string instead
9842         of NULL for excep_string argument.
9843
9844 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9845
9846         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9847         the width of the requested register exceeds the width of the
9848         `ptrace' data type.
9849
9850 2018-05-21  Tom Tromey  <tom@tromey.com>
9851
9852         * printcmd.c (output_command): Remove.
9853         (output_command_const): Rename to output_command.
9854         * valprint.h (output_command): Rename from output_command_const.
9855         * tracepoint.c (trace_dump_actions): Call output_command.
9856
9857 2018-05-21  Tom Tromey  <tom@tromey.com>
9858
9859         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9860         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9861         * ada-lang.h (create_ada_exception_catchpoint): Update.
9862         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9863         std::string.
9864         (create_excep_cond_exprs, ~ada_catchpoint)
9865         (should_stop_exception, print_one_exception)
9866         (print_mention_exception, print_recreate_exception): Update.
9867         (ada_get_next_arg): Remove.
9868         (catch_ada_exception_command_split): Use std::string.  Change type
9869         of "excep_string", "cond_string".
9870         (catch_ada_exception_command): Update.
9871         (create_ada_exception_catchpoint): Change type of excep_string.
9872         (ada_exception_sal): Remove excep_string parameter.
9873         (~ada_catchpoint): Remove.
9874
9875 2018-05-21  Tom Tromey  <tom@tromey.com>
9876
9877         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9878         cleanup.
9879
9880 2018-05-21  Tom Tromey  <tom@tromey.com>
9881
9882         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9883         Return unique_xmalloc_ptr.
9884         (print_it_exception): Update.
9885
9886 2018-05-21  Tom Tromey  <tom@tromey.com>
9887
9888         * tracepoint.c (trace_dump_actions): Use std::string.
9889
9890 2018-05-21  Tom Tromey  <tom@tromey.com>
9891
9892         * symfile.c (reread_symbols): Use std::string for original_name.
9893
9894 2018-05-21  Tom Tromey  <tom@tromey.com>
9895
9896         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9897         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9898         constructor.
9899
9900 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9901
9902         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9903         instance to...
9904         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9905         * objfiles.c (get_objfile_bfd_data): Allocate
9906         objfile_per_bfd_storage with obstack_new when allocating on
9907         obstack.
9908
9909 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9910
9911         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9912         OBSTACK_ZALLOC.
9913         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9914         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9915         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9916         (add_pending): Likewise.
9917         (parse_symbol): Likewise.
9918         (parse_partial_symbols): Likewise.
9919         (psymtab_to_symtab_1): Likewise.
9920         (new_psymtab): Likewise.
9921         (elfmdebug_build_psymtabs): Likewise.
9922         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9923         * objfiles.c (get_objfile_bfd_data): Likewise.
9924         (objfile_register_static_link): Likewise.
9925         * psymtab.c (allocate_psymtab): Likewise.
9926         * stabsread.c (read_member_functions): Likewise.
9927         * xcoffread.c (xcoff_end_psymtab): Likewise.
9928
9929 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9930
9931         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9932         compiler supports std::is_trivially_constructible.
9933         * common/poison.h: Include obstack.h.
9934         (IsMallocable): Define to is_trivially_constructible if the
9935         compiler supports it, define to true_type otherwise.
9936         (xobnew): New.
9937         (XOBNEW): Redefine.
9938         (xobnewvec): New.
9939         (XOBNEWVEC): Redefine.
9940         * gdb_obstack.h (obstack_zalloc): New.
9941         (OBSTACK_ZALLOC): Redefine.
9942         (obstack_calloc): New.
9943         (OBSTACK_CALLOC): Redefine.
9944         (obstack_new): New.
9945         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9946         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9947         gdbarch.c.
9948         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9949         obstack_calloc/obstack_zalloc.
9950         (gdbarch_obstack_zalloc): Remove.
9951         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9952
9953 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9954
9955         * stack.c (backtrace_command_1): Remove useless variable int i.
9956
9957 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9958
9959         * stack.c (print_frame_info): Fix comment.
9960
9961 2018-05-18  Tom Tromey  <tom@tromey.com>
9962
9963         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9964         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9965         (~dwarf2_per_objfile): Update
9966         (dwarf2_get_dwz_file): Use new.
9967         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9968         unique_ptr.
9969
9970 2018-05-18  Tom Tromey  <tom@tromey.com>
9971
9972         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9973         unique_ptr.
9974         * dwarf2read.c (struct dwp_file): Add constructor and
9975         initializers.
9976         (open_and_init_dwp_file): Return a unique_ptr.
9977         (dwarf2_per_objfile, create_dwp_hash_table)
9978         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9979         (lookup_dwo_unit_in_dwp): Update.
9980         (open_and_init_dwp_file, get_dwp_file): Update.
9981
9982 2018-05-18  Tom Tromey  <tom@tromey.com>
9983
9984         * dwarf2read.c (dwarf2_per_objfile): Update.
9985         (struct mapped_index): Add initializers.
9986         (dwarf2_read_index): Use new.
9987         (dw2_symtab_iter_init): Update.
9988         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9989         unique_ptr.
9990
9991 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9992
9993         * dwarf2read.c (mapped_index) <total_size>: Remove.
9994
9995 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9996
9997         * unittests/format_pieces-selftests.c (test_format_specifier):
9998         Add ARI comments.
9999
10000 2018-05-18  Tom Tromey  <tom@tromey.com>
10001
10002         * c-typeprint.c (maybe_print_hole): New function.
10003         (c_print_type_struct_field_offset): Update.
10004         (c_type_print_base_struct_union): Call maybe_print_hole.
10005
10006 2018-05-17  Keith Seitz  <keiths@redhat.com>
10007
10008         * breakpoint.c (build_bpstat_chain): New function, moved from
10009         bpstat_stop_status.
10010         (bpstat_stop_status): Add optional parameter, `stop_chain'.
10011         If no stop chain is passed, call build_bpstat_chain to build it.
10012         * breakpoint.h (build_bpstat_chain): Declare.
10013         (bpstat_stop_status): Move documentation here from breakpoint.c.
10014         * infrun.c (handle_signal_stop): Before eliding inlined frames,
10015         build the stop chain and pass it to skip_inline_frames.
10016         Pass this stop chain to bpstat_stop_status.
10017         * inline-frame.c: Include breakpoint.h.
10018         (stopped_by_user_bp_inline_frame): New function.
10019         (skip_inline_frames): Add parameter `stop_chain'.
10020         Move documention to inline-frame.h.
10021         If non-NULL, use stopped_by_user_bp_inline_frame to determine
10022         whether the frame should be elided.
10023         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10024         Add moved documentation and update for new parameter.
10025
10026 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10027
10028         PR cli/14975
10029         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10030         unittests/format_pieces-selftests.c.
10031         * common/format.h (format_piece) <operator==>: New.
10032         (format_pieces) <operator[]>: Remove.
10033         * common/format.c (format_pieces::format_pieces): Handle \e.
10034         * unittests/format_pieces-selftests.c: New.
10035
10036 2018-05-17  Tom Tromey  <tom@tromey.com>
10037
10038         PR symtab/23010:
10039         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10040         (dw2_instantiate_symtab): Add skip_partial parameter.
10041         (dw2_find_last_source_symtab, dw2_map_expand_apply)
10042         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10043         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10044         (dw2_expand_symtabs_matching_one)
10045         (dw2_find_pc_sect_compunit_symtab)
10046         (dw2_debug_names_lookup_symbol)
10047         (dw2_debug_names_expand_symtabs_for_function): Update.
10048         (init_cutu_and_read_dies): Add skip_partial parameter.
10049         (process_psymtab_comp_unit, build_type_psymtabs_1)
10050         (process_skeletonless_type_unit, load_partial_comp_unit)
10051         (psymtab_to_symtab_1): Update.
10052         (load_full_comp_unit): Add skip_partial parameter.
10053         (process_imported_unit_die, dwarf2_read_addr_index)
10054         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10055         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10056         (read_signatured_type): Update.
10057
10058 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10059
10060         * value.c (release_value): Remove unused variable.
10061         (record_latest_value): Likewise.
10062         (access_value_history): Likewise.
10063         (preserve_values): Likewise.
10064
10065 2018-05-17  Tom Tromey  <tom@tromey.com>
10066
10067         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10068         Initialize.
10069
10070 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
10071
10072         PR gdb/22286
10073         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10074         Also handle registers whose width is not a multiple of
10075         PTRACE_TYPE_RET.
10076         (linux_nat_trad_target::store_register): Likewise.
10077
10078 2018-05-16  Tom Tromey  <tom@tromey.com>
10079
10080         * gdbcore.h (core_bfd): Redefine.
10081         * corelow.c (core_target::close): Update.
10082         (core_target_open): Update.
10083         * progspace.h (struct program_space) <cbfd>: Now a
10084         gdb_bfd_ref_ptr.
10085
10086 2018-05-16  Tom Tromey  <tom@tromey.com>
10087
10088         PR cli/19551:
10089         * symfile-add-flags.h (enum symfile_add_flags)
10090         <SYMFILE_NOT_FILENAME>: New constant.
10091         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
10092         objfile name from BFD.
10093         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10094         * minidebug.c (find_separate_debug_file_in_section): Put
10095         ".gnu_debugdata" into BFD's file name.
10096
10097 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
10098
10099         * regcache.c (regcache_read_ftype, regcache_write_ftype):
10100         Remove.
10101
10102 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
10103
10104         PR binutils/21446
10105         * aarch64-tdep.c (aarch64_analyze_prologue,
10106         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10107         Indicate not interested in errors.
10108
10109 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10110
10111         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10112         Supply the MIPS_ZERO_REGNUM register.
10113
10114 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10115
10116         * mips-tdep.c (mask_address_var): Make variable static.
10117
10118 2018-05-14  Tom Tromey  <tom@tromey.com>
10119
10120         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10121
10122 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
10123
10124         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10125         FXSAVE_ADDR for the mxcsr register.
10126
10127 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
10128
10129         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10130
10131 2018-05-11  Pedro Alves  <palves@redhat.com>
10132
10133         * corelow.c (core_target) <core_target>: No longer inline.
10134         Initialize m_core_gdbarch, m_core_vec and build the section table
10135         here.
10136         <~core_target>: New.
10137         <core_gdbarch, get_core_register_section>: New methods.
10138         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10139         factored out from ...
10140         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10141         (core_ops): Delete.
10142         (sniff_core_bfd): Add gdbarch parameter.
10143         (core_close): Delete, merged into ...
10144         (core_target::close): ... here.  Delete self.
10145         (core_close_cleanup): Delete.
10146         (core_target_open): Allocate a core_target on the heap.  Use a
10147         unique_ptr instead of a cleanup.  Bits moved into the core_target
10148         ctor.  Adjust to use core_target methods instead of globals.
10149         (get_core_register_section): Rename to ...
10150         (core_target::get_core_register_section): ... this and adjust.
10151         (struct get_core_registers_cb_data): New.
10152         (get_core_registers_cb): Use it.  Use bool.
10153         (core_target::fetch_registers, core_target::files_info)
10154         (core_target::xfer_partial, core_target::read_description)
10155         (core_target::pid_to, core_target::thread_name): Adjust to
10156         reference class fields instead of globals.
10157         * target.h (struct target_ops_deleter, target_ops_up): New.
10158
10159 2018-05-11  Pedro Alves  <palves@redhat.com>
10160
10161         * corefile.c (core_file_command): Move to corelow.c.
10162         * corelow.c (the_core_target): Delete.
10163         (core_file_command): Moved from corefile.c.  Check exec_bfd
10164         instead of the_core_target.  Use target_detach instead of calling
10165         into the_core_target directly.
10166         (maybe_say_no_core_file_now): New.
10167         (core_target::detach): Use it.
10168         (_initialize_corelow): Remove references to the_core_target.
10169         * gdbcore.h (the_core_target): Delete.
10170
10171 2018-05-11  Tom Tromey  <tromey@redhat.com>
10172             Pedro Alves  <palves@redhat.com>
10173
10174         * corefile.c (core_bfd): Remove.
10175         * gdbcore.h (core_bfd): Now a macro.
10176         * progspace.h (struct program_space) <cbfd>: New field.
10177
10178 2018-05-11  Tom Tromey  <tom@tromey.com>
10179
10180         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10181         gdb::def_vector.
10182
10183 2018-05-10  Tom Tromey  <tom@tromey.com>
10184
10185         * configure: Rebuild.
10186         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10187
10188 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
10189
10190         PR server/23158:
10191         * regformats/regdat.sh: Adjust script, following the addition
10192         of the new expedite_regs parameter to init_target_desc.
10193
10194 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
10195     
10196         PR gdb/23127
10197         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10198         set_gdbarch_significant_addr_bit.
10199         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10200         set_gdbarch_significant_addr_bit.
10201         * utils.c (address_significant): Update to sign extend addr.
10202
10203 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
10204
10205         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10206         (xtensa_linux_init_abi): Limit tdep->num_regs by
10207         tdep->num_nopriv_regs.
10208         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10209         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10210         not initialized.
10211
10212 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
10213
10214         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10215
10216 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
10217
10218         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10219         (I387_MXCSR_INIT_VAL): New constant.
10220         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10221         buffer if it was supplied by the inferior.
10222         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10223         (i387_xsave_get_clear_bv): New function.
10224         (i387_supply_xsave): Only read x87 control registers from the
10225         xsave buffer if the feature is enabled, and the state will have
10226         been written, otherwise, provide a suitable default.
10227         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10228         including x87 control registers.  Update control registers if they
10229         have changed from the default value, and mark features as enabled
10230         as required.
10231         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10232
10233 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10234
10235         * spu-tdep.c (info_spu_event_command): Fix output formatting.
10236
10237 2018-05-07  Tom Tromey  <tom@tromey.com>
10238
10239         * configure: Rebuild.
10240         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10241
10242 2018-05-07  Tom Tromey  <tom@tromey.com>
10243
10244         PR tdep/20362:
10245         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10246         bit.  Use correct value for VDIV.
10247
10248 2018-05-04  Tom Tromey  <tom@tromey.com>
10249
10250         * configure: Rebuild.
10251         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10252
10253 2018-05-04  Tom Tromey  <tom@tromey.com>
10254
10255         * linux-record.c (record_linux_system_call) <case
10256         RECORD_SYS_RECVFROM>: Add "break".
10257
10258 2018-05-04  Tom Tromey  <tom@tromey.com>
10259
10260         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10261         Add missing "break".
10262         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10263         Add missing "break".
10264
10265 2018-05-04  Tom Tromey  <tom@tromey.com>
10266
10267         * rs6000-tdep.c (ppc_process_record_op4)
10268         (ppc_process_record_op63): Add fall-through comment.
10269
10270 2018-05-04  Tom Tromey  <tom@tromey.com>
10271
10272         * i386-tdep.c (i386_process_record): Add fall-through comment.
10273
10274 2018-05-04  Tom Tromey  <tom@tromey.com>
10275
10276         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10277         comment.
10278
10279 2018-05-04  Tom Tromey  <tom@tromey.com>
10280
10281         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10282         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10283         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10284         comment.
10285         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10286         comment.
10287         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10288         comment.
10289
10290 2018-05-04  Tom Tromey  <tom@tromey.com>
10291
10292         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10293
10294 2018-05-04  Tom Tromey  <tom@tromey.com>
10295
10296         * s390-tdep.c (s390_process_record): Fix fall-through comments.
10297         * xcoffread.c (scan_xcoff_symtab): Move comment later.
10298         * symfile.c (section_is_mapped): Fix fall-through comment.
10299         * stabsread.c (define_symbol, read_member_functions): Fix
10300         fall-through comment.
10301         * s390-linux-tdep.c (s390_process_record): Fix fall-through
10302         comment.
10303         * remote.c (remote_wait_as): Fix fall-through comment.
10304         * p-exp.y (yylex): Fix fall-through comment.
10305         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10306         comment.
10307         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10308         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10309         * jv-exp.y (yylex): Fix fall-through comment.
10310         * go-exp.y (lex_one_token): Fix fall-through comment.
10311         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10312         fall-through comment.
10313         * f-exp.y (yylex): Fix fall-through comment.
10314         * dwarf2read.c (process_die): Fix fall-through comments.
10315         * dbxread.c (process_one_symbol): Fix fall-through comment.
10316         * d-exp.y (lex_one_token): Fix fall-through comment.
10317         * cp-name-parser.y (yylex): Fix fall-through comment.
10318         * coffread.c (coff_symtab_read): Fix fall-through comment.
10319         * c-exp.y (lex_one_token): Fix fall-through comment.
10320         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10321         comment.
10322         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10323         comment.
10324
10325 2018-05-04  Tom Tromey  <tom@tromey.com>
10326
10327         PR python/22730:
10328         * NEWS: Mention gdb.execute change.
10329         * gdbcmd.h (execute_control_command): Don't declare.
10330         * python/python.c (execute_gdb_command): Use read_command_lines_1,
10331         execute_control_commands, execute_control_commands_to_string.
10332         * cli/cli-script.h (execute_control_commands)
10333         (execute_control_commands_to_string): Declare.
10334         (execute_control_command): Add from_tty parameter.
10335         * cli/cli-script.c (execute_control_commands)
10336         (execute_control_commands_to_string): New functions.
10337         (execute_user_command): Use execute_control_commands.
10338         (execute_control_command_1): Add "from_tty" parameter.  Update.
10339         (execute_control_command): Likewise.
10340
10341 2018-05-04  Tom Tromey  <tom@tromey.com>
10342
10343         PR python/22731:
10344         * NEWS: Mention that breakpoint commands are writable.
10345         * python/py-breakpoint.c (bppy_set_commands): New function.
10346         (breakpoint_object_getset) <"commands">: Use it.
10347
10348 2018-05-04  Tom Tromey  <tom@tromey.com>
10349
10350         * tracepoint.c (actions_command): Update.
10351         * mi/mi-cmd-break.c (mi_command_line_array)
10352         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10353         (mi_read_next_line): Remove.
10354         (mi_cmd_break_commands): Update.
10355         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10356         function_view.
10357         * cli/cli-script.c (get_command_line): Update.
10358         (process_next_line): Use function_view.  Constify.
10359         (recurse_read_control_structure, read_command_lines)
10360         (read_command_lines_1): Change argument types to function_view.
10361         (do_define_command, document_command): Update.
10362         * breakpoint.h (check_tracepoint_command): Don't declare.
10363         * breakpoint.c (check_tracepoint_command): Remove.
10364         (commands_command_1, create_tracepoint_from_upload): Update.
10365
10366 2018-05-04  Tom Tromey  <tom@tromey.com>
10367
10368         PR gdb/11750:
10369         * cli/cli-script.h (enum command_control_type) <define_control>:
10370         New constant.
10371         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10372         (build_command_line, execute_control_command_1)
10373         (process_next_line): Likewise.
10374         (do_define_command): New function, extracted from define_command.
10375         (define_command): Use it.
10376
10377 2018-05-04  Tom Tromey  <tom@tromey.com>
10378
10379         * tracepoint.c (actions_command): Update.
10380         * cli/cli-script.h (read_command_lines): Update.
10381         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10382         (MAX_TMPBUF): Remove define.
10383         (define_command): Use string_printf.
10384         (document_command): Likewise.
10385         * breakpoint.c (commands_command_1): Update.
10386
10387 2018-05-04  Tom Tromey  <tom@tromey.com>
10388
10389         * top.c (execute_command): Update.
10390         * cli/cli-script.h (print_command_lines): Now varargs.
10391         * cli/cli-script.c (print_command_lines): Now varargs.
10392         (execute_control_command_1) <case while_control, case if_control>:
10393         Update.
10394
10395 2018-05-04  Tom Tromey  <tom@tromey.com>
10396
10397         * tracepoint.c (all_tracepoint_actions): Rename from
10398         all_tracepoint_actions_and_cleanup.  Change return type.
10399         (actions_command, encode_actions_1, encode_actions)
10400         (trace_dump_actions, tdump_command): Update.
10401         * remote.c (remote_download_command_source): Update.
10402         * python/python.c (gdbpy_eval_from_control_command)
10403         (python_command, python_interactive_command): Update.
10404         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10405         * guile/guile.c (guile_command)
10406         (gdbscm_eval_from_control_command, guile_command): Update.
10407         * compile/compile.c (compile_code_command)
10408         (compile_print_command, compile_to_object): Update.
10409         * cli/cli-script.h (struct command_lines_deleter): New.
10410         (counted_command_line): New typedef.
10411         (struct command_line): Add constructor, destructor.
10412         <body_list>: Remove.
10413         <body_list_0, body_list_1>: New members.
10414         (command_line_up): Remove typedef.
10415         (read_command_lines, read_command_lines_1, get_command_line):
10416         Update.
10417         (copy_command_lines): Don't declare.
10418         * cli/cli-script.c (build_command_line): Use "new".
10419         (get_command_line): Return counted_command_line.
10420         (print_command_lines, execute_user_command)
10421         (execute_control_command_1, while_command, if_command): Update.
10422         (realloc_body_list): Remove.
10423         (process_next_line, recurse_read_control_structure): Update.
10424         (read_command_lines, read_command_lines_1): Return counted_command_line.
10425         (free_command_lines): Use "delete".
10426         (copy_command_lines): Remove.
10427         (define_command, document_command, show_user_1): Update.
10428         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10429         a counted_command_line.
10430         * breakpoint.h (counted_command_line): Remove typedef.
10431         (breakpoint_set_commands): Update.
10432         * breakpoint.c (check_no_tracepoint_commands)
10433         (validate_commands_for_breakpoint): Update.
10434         (breakpoint_set_commands): Change commands to be a
10435         counted_command_line.
10436         (commands_command_1, update_dprintf_command_list)
10437         (create_tracepoint_from_upload): Update.
10438
10439 2018-05-04  Tom Tromey  <tom@tromey.com>
10440
10441         * cli/cli-decode.h (cmd_list_element): New constructor.
10442         (~cmd_list_element): New destructor.
10443         (struct cmd_list_element): Add initializers.
10444         * cli/cli-decode.c (do_add_cmd): Use "new".
10445         (delete_cmd): Use "delete".
10446
10447 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10448             Pedro Alves <palves@redhat.com>
10449
10450         PR breakpoints/19806 and support for PR external/20207.
10451         * NEWS: Mention Aarch64 watchpoint improvements.
10452         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10453         watchpoints and PR external/20207 watchpoints.
10454         * nat/aarch64-linux-hw-point.c
10455         (kernel_supports_any_contiguous_range): New.
10456         (aarch64_watchpoint_offset): New.
10457         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10458         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10459         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10460         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10461         next_addr_orig_p.  Support PR external/20207 watchpoints.
10462         (aarch64_downgrade_regs): New.
10463         (aarch64_dr_state_insert_one_point): New parameters offset and
10464         addr_orig.
10465         (aarch64_dr_state_remove_one_point): Likewise.
10466         (aarch64_handle_breakpoint): Update caller.
10467         (aarch64_handle_aligned_watchpoint): Likewise.
10468         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10469         aligned_offset.
10470         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10471         aarch64_downgrade_regs.
10472         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10473         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10474         (DR_CONTROL_MASK): ... this.
10475         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10476         (unsigned int aarch64_watchpoint_offset): New prototype.
10477         (aarch64_linux_set_debug_regs): Remove const from state.
10478         * utils.c (align_up, align_down): Move to ...
10479         * common/common-utils.c (align_up, align_down): ... here.
10480         * utils.h (align_up, align_down): Move to ...
10481         * common/common-utils.h (align_up, align_down): ... here.
10482
10483 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10484
10485         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10486         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10487         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10488         Re-implement to match the ABI as summarized in GCC's
10489         gcc/config/sparc/sparc.c.  All callers updated.
10490         (sparc32_store_arguments): Remove assertion.
10491
10492 2018-05-04  Tom Tromey  <tom@tromey.com>
10493
10494         * printcmd.c: Don't include tui.h.
10495         (decode_format): Use skip_spaces.
10496
10497 2018-05-04  Tom Tromey  <tom@tromey.com>
10498
10499         PR gdb/22619:
10500         * printcmd.c (last_count): New global.
10501         (x_command): Use saved count when repeating.
10502
10503 2018-05-04  Tom Tromey  <tom@tromey.com>
10504
10505         * nto-procfs.c (do_closedir_cleanup): Remove.
10506         (procfs_pidlist): Use gdb_dir_up.
10507         * procfs.c (do_closedir_cleanup): Remove.
10508         (proc_update_threads): Use gdb_dir_up.
10509         * common/filestuff.h (struct gdb_dir_deleter): New.
10510         (gdb_dir_up): New typedef.
10511
10512 2018-05-04  Tom Tromey  <tom@tromey.com>
10513
10514         * ada-lang.c (print_mention_exception): Use std::string.
10515
10516 2018-05-04  Tom Tromey  <tom@tromey.com>
10517
10518         * ada-lang.c (create_excep_cond_exprs): Update.
10519         (ada_exception_catchpoint_cond_string): Use std::string.
10520
10521 2018-05-04  Tom Tromey  <tom@tromey.com>
10522
10523         * ada-lang.c (xget_renaming_scope): Return std::string.
10524         (old_renaming_is_invisible): Update.
10525
10526 2018-05-04  Tom Tromey  <tom@tromey.com>
10527
10528         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10529         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10530
10531 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10532
10533         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10534
10535 2018-05-04  Tom Tromey  <tom@tromey.com>
10536
10537         * remote.c (remote_query_supported_append): Change type.
10538         (remote_check_symbols): Update.
10539
10540 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10541
10542         PR gdb/11420
10543         * configure.ac: Prepend libpython.
10544         * python/python-config.py: Likewise.
10545         * configure: Regenerate.
10546
10547 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10548
10549         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10550
10551 2018-05-03  Pedro Alves  <palves@redhat.com>
10552
10553         * s390-linux-nat.c
10554         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10555         override.  Write 'true' instead of '1'.
10556         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10557         declaration.
10558
10559 2018-05-02  Pedro Alves  <palves@redhat.com>
10560
10561         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10562         add_inf_child_target.
10563         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10564         add_inf_child_target.
10565         * aix-thread.c (aix_thread_target_info): New.
10566         (aix_thread_target) <shortname, longname, doc>: Delete.
10567         <info>: New.
10568         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10569         add_inf_child_target.
10570         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10571         add_inf_child_target.
10572         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10573         add_inf_child_target.
10574         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10575         add_inf_child_target.
10576         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10577         add_inf_child_target.
10578         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10579         add_inf_child_target.
10580         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10581         add_inf_child_target.
10582         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10583         add_inf_child_target.
10584         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10585         add_inf_child_target.
10586         * bfd-target.c (target_bfd_target_info): New.
10587         (target_bfd) <shortname, longname, doc>: Delete.
10588         <info>: New.
10589         * bsd-kvm.c (bsd_kvm_target_info): New.
10590         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10591         <info>: New.
10592         (bsd_kvm_target::open): Rename to ...
10593         (bsd_kvm_target_open): ... this.  Adjust.
10594         * bsd-uthread.c (bsd_uthread_target_info): New.
10595         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10596         <info>: New.
10597         * corefile.c (core_file_command): Adjust.
10598         * corelow.c (core_target_info): New.
10599         (core_target) <shortname, longname, doc>: Delete.
10600         <info>: New.
10601         (core_target::open): Rename to ...
10602         (core_target_open): ... this.  Adjust.
10603         * ctf.c (ctf_target_info): New.
10604         (ctf_target) <shortname, longname, doc>: Delete.
10605         <info>: New.
10606         (ctf_target::open): Rename to ...
10607         (ctf_target_open): ... this.
10608         (_initialize_ctf): Adjust.
10609         * exec.c (exec_target_info): New.
10610         (exec_target) <shortname, longname, doc>: Delete.
10611         <info>: New.
10612         (exec_target::open): Rename to ...
10613         (exec_target_open): ... this.
10614         * gdbcore.h (core_target_open): Declare.
10615         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10616         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10617         add_inf_child_target.
10618         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10619         add_inf_child_target.
10620         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10621         add_inf_child_target.
10622         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10623         add_inf_child_target.
10624         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10625         add_inf_child_target.
10626         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10627         add_inf_child_target.
10628         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10629         add_inf_child_target.
10630         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10631         add_inf_child_target.
10632         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10633         add_inf_child_target.
10634         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10635         add_inf_child_target.
10636         * inf-child.c (inf_child_target_info): New.
10637         (inf_child_target::info): New.
10638         (inf_child_open_target): Remove 'target' parameter.  Use
10639         get_native_target instead.
10640         (inf_child_target::open): Delete.
10641         (add_inf_child_target): New.
10642         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10643         Delete.
10644         <info>: New.
10645         (add_inf_child_target): Declare.
10646         (inf_child_open_target): Declare.
10647         * linux-thread-db.c (thread_db_target_info): New.
10648         (thread_db_target) <shortname, longname, doc>: Delete.
10649         <info>: New.
10650         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10651         add_inf_child_target.
10652         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10653         add_inf_child_target.
10654         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10655         add_inf_child_target.
10656         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10657         add_inf_child_target.
10658         * make-target-delegates (print_class): Adjust.
10659         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10660         add_inf_child_target.
10661         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10662         add_inf_child_target.
10663         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10664         add_inf_child_target.
10665         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10666         add_inf_child_target.
10667         * nto-procfs.c (nto_native_target_info): New.
10668         (nto_procfs_target_native) <shortname, longname, doc>:
10669         Delete.
10670         <info>: New.
10671         (nto_procfs_target_info): New.
10672         (nto_procfs_target_procfs) <shortname, longname, doc>:
10673         Delete.
10674         <info>: New.
10675         (init_procfs_targets): Adjust.
10676         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10677         add_inf_child_target.
10678         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10679         add_inf_child_target.
10680         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10681         add_inf_child_target.
10682         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10683         add_inf_child_target.
10684         * ravenscar-thread.c (ravenscar_target_info): New.
10685         (ravenscar_thread_target) <shortname, longname, doc>:
10686         Delete.
10687         <info>: New.
10688         * record-btrace.c (record_btrace_target_info):
10689         (record_btrace_target) <shortname, longname, doc>: Delete.
10690         <info>: New.
10691         (record_btrace_target::open): Rename to ...
10692         (record_btrace_target_open): ... this.  Adjust.
10693         * record-full.c (record_longname, record_doc): New.
10694         (record_full_base_target) <shortname, longname, doc>: Delete.
10695         <info>: New.
10696         (record_full_target_info): New.
10697         (record_full_target): <shortname>: Delete.
10698         <info>: New.
10699         (record_full_core_open_1, record_full_open_1): Update comments.
10700         (record_full_base_target::open): Rename to ...
10701         (record_full_open): ... this.
10702         (cmd_record_full_restore): Update.
10703         (_initialize_record_full): Update.
10704         * remote-sim.c (remote_sim_target_info): New.
10705         (gdbsim_target) <shortname, longname, doc>: Delete.
10706         <info>: New.
10707         (gdbsim_target::open): Rename to ...
10708         (gdbsim_target_open): ... this.
10709         (_initialize_remote_sim): Adjust.
10710         * remote.c (remote_doc): New.
10711         (remote_target_info): New.
10712         (remote_target) <shortname, longname, doc>: Delete.
10713         <info>: New.
10714         (extended_remote_target_info): New.
10715         (extended_remote_target) <shortname, longname, doc>: Delete.
10716         <info>: New.
10717         (remote_target::open_1): Make static.  Adjust.
10718         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10719         * s390-linux-nat.c (_initialize_s390_nat): Use
10720         add_inf_child_target.
10721         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10722         add_inf_child_target.
10723         * sol-thread.c (thread_db_target_info): New.
10724         (sol_thread_target) <shortname, longname, doc>: Delete.
10725         <info>: New.
10726         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10727         add_inf_child_target.
10728         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10729         add_inf_child_target.
10730         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10731         add_inf_child_target.
10732         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10733         add_inf_child_target.
10734         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10735         add_inf_child_target.
10736         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10737         add_inf_child_target.
10738         * spu-linux-nat.c (_initialize_spu_nat): Use
10739         add_inf_child_target.
10740         * spu-multiarch.c (spu_multiarch_target_info): New.
10741         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10742         <info>: New.
10743         * target-delegates.c: Regenerate.
10744         * target.c: Include <unordered_map>.
10745         (target_ops_p): Delete.
10746         (DEF_VEC_P(target_ops_p)): Delete.
10747         (target_factories): New.
10748         (test_target_info): New.
10749         (test_target_ops::info): New.
10750         (open_target): Adjust to use target_factories.
10751         (add_target_with_completer): Rename to ...
10752         (add_target): ... this.  Change prototype.  Register target_info
10753         and open callback in target_factories.  Register target_info in
10754         command context instead of target_ops.
10755         (add_target): Delete old implementation.
10756         (add_deprecated_target_alias): Change prototype.  Adjust.
10757         (the_native_target): New.
10758         (set_native_target, get_native_target): New.
10759         (find_default_run_target): Use the_native_target.
10760         (find_attach_target, find_run_target): Simplify.
10761         (target_ops::open): Delete.
10762         (dummy_target_info): New.
10763         (dummy_target::shortname, dummy_target::longname)
10764         (dummy_target::doc): Delete.
10765         (dummy_target::info): New.
10766         (debug_target::shortname, debug_target::longname)
10767         (debug_target::doc): Delete.
10768         (debug_target::info): New.
10769         * target.h (struct target_info): New.
10770         (target_ops::~target_ops): Add comment.
10771         (target_ops::info): New.
10772         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10773         longer virtual.  Implement in terms of target_info.
10774         (set_native_target, get_native_target): Declare.
10775         (target_open_ftype): New.
10776         (add_target, add_target_with_completer)
10777         (add_deprecated_target_alias): Change prototype.
10778         (test_target) <shortname, longname, doc>: Delete.
10779         <info>: New.
10780         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10781         add_inf_child_target.
10782         * tracefile-tfile.c (tfile_target_info): New.
10783         (tfile_target) <shortname, longname, doc>: Delete.
10784         <info>: New.
10785         (tfile_target::open): Rename to ...
10786         (tfile_target_open): ... this.
10787         (_initialize_tracefile_tfile): Adjust.
10788         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10789         add_inf_child_target.
10790         * windows-nat.c (_initialize_windows_nat): Use
10791         add_inf_child_target.
10792         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10793         add_inf_child_target.
10794
10795 2018-05-02  Pedro Alves  <palves@redhat.com>
10796
10797         * linux-nat.h (linux_nat_target) <low_new_thread,
10798         low_delete_thread, low_new_fork, low_forget_process,
10799         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10800         New virtual methods.
10801         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10802         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10803         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10804         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10805         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10806         Delete.
10807         * linux-fork.c (delete_fork): Adjust to call low method.
10808         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10809         (linux_nat_new_fork, linux_nat_forget_process_hook)
10810         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10811         (linux_nat_status_is_event):
10812         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10813         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10814         to call low method.
10815         (sigtrap_is_event): Rename to ...
10816         (linux_nat_target::low_status_is_event): ... this.
10817         (linux_nat_set_status_is_event): Delete.
10818         (save_stop_reason, linux_nat_wait_1)
10819         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10820         low methods.
10821         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10822         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10823         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10824         (linux_nat_set_prepare_to_resume): Delete.
10825         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10826         low virtual methods.
10827         * amd64-linux-nat.c: Likewise.
10828         * arm-linux-nat.c: Likewise.
10829         * i386-linux-nat.c: Likewise.
10830         * ia64-linux-nat.c: Likewise.
10831         * mips-linux-nat.c: Likewise.
10832         * ppc-linux-nat.c: Likewise.
10833         * s390-linux-nat.c: Likewise.
10834         * sparc64-linux-nat.c: Likewise.
10835         * x86-linux-nat.c: Likewise.
10836         * x86-linux-nat.h: Include "nat/x86-linux.h".
10837         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10838         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10839         Override methods.
10840
10841 2018-05-02  Pedro Alves  <palves@redhat.com>
10842
10843         * target.h (target_ops)
10844         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10845         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10846         stopped_by_watchpoint, have_continuable_watchpoint,
10847         stopped_data_address, watchpoint_addr_within_range,
10848         can_accel_watchpoint_condition, can_run, thread_alive,
10849         has_all_memory, has_memory, has_stack, has_registers,
10850         has_execution, can_async_p, is_async_p, supports_non_stop,
10851         always_non_stop_p, can_execute_reverse, supports_multi_process,
10852         supports_enable_disable_tracepoint,
10853         supports_disable_randomization, supports_string_tracing,
10854         supports_evaluation_of_breakpoint_conditions,
10855         can_run_breakpoint_commands, filesystem_is_local,
10856         can_download_tracepoint, get_trace_state_variable_value,
10857         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10858         record_is_replaying, record_will_replay,
10859         augmented_libraries_svr4_read>: Adjust to return bool.
10860         * aarch64-linux-nat.c: All implementations adjusted.
10861         * aix-thread.c: All implementations adjusted.
10862         * arm-linux-nat.c: All implementations adjusted.
10863         * breakpoint.c: All implementations adjusted.
10864         * bsd-kvm.c: All implementations adjusted.
10865         * bsd-uthread.c: All implementations adjusted.
10866         * corelow.c: All implementations adjusted.
10867         * ctf.c: All implementations adjusted.
10868         * darwin-nat.c: All implementations adjusted.
10869         * darwin-nat.h: All implementations adjusted.
10870         * exec.c: All implementations adjusted.
10871         * fbsd-nat.c: All implementations adjusted.
10872         * fbsd-nat.h: All implementations adjusted.
10873         * gnu-nat.c: All implementations adjusted.
10874         * gnu-nat.h: All implementations adjusted.
10875         * go32-nat.c: All implementations adjusted.
10876         * ia64-linux-nat.c: All implementations adjusted.
10877         * inf-child.c: All implementations adjusted.
10878         * inf-child.h: All implementations adjusted.
10879         * inf-ptrace.c: All implementations adjusted.
10880         * inf-ptrace.h: All implementations adjusted.
10881         * linux-nat.c: All implementations adjusted.
10882         * linux-nat.h: All implementations adjusted.
10883         * mips-linux-nat.c: All implementations adjusted.
10884         * nto-procfs.c: All implementations adjusted.
10885         * ppc-linux-nat.c: All implementations adjusted.
10886         * procfs.c: All implementations adjusted.
10887         * ravenscar-thread.c: All implementations adjusted.
10888         * record-btrace.c: All implementations adjusted.
10889         * record-full.c: All implementations adjusted.
10890         * remote-sim.c: All implementations adjusted.
10891         * remote.c: All implementations adjusted.
10892         * s390-linux-nat.c: All implementations adjusted.
10893         * sol-thread.c: All implementations adjusted.
10894         * spu-multiarch.c: All implementations adjusted.
10895         * target-delegates.c: All implementations adjusted.
10896         * target.c: All implementations adjusted.
10897         * target.h: All implementations adjusted.
10898         * tracefile-tfile.c: All implementations adjusted.
10899         * tracefile.c: All implementations adjusted.
10900         * tracefile.h: All implementations adjusted.
10901         * windows-nat.c: All implementations adjusted.
10902         * x86-linux-nat.h: All implementations adjusted.
10903         * x86-nat.h: All implementations adjusted.
10904
10905 2018-05-02  Pedro Alves  <palves@redhat.com>
10906
10907         * make-target-delegates (scan_target_h): Don't trim lines here.
10908         Replace sequences of tabs and/or whitespace with a single
10909         whitespace.
10910         (top level, parsing methods): Trim each line before processing it
10911         here.
10912
10913 2018-05-02  Pedro Alves  <palves@redhat.com>
10914             John Baldwin  <jhb@freebsd.org>
10915
10916         * target.h (enum strata) <debug_stratum>: New.
10917         (struct target_ops) <all delegation methods>: Replace by C++
10918         virtual methods, and drop "to_" prefix.  All references updated
10919         throughout.
10920         <to_shortname, to_longname, to_doc, to_data,
10921         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10922         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10923         virtual methods.  All references updated throughout.
10924         <can_attach, supports_terminal_ours, can_create_inferior,
10925         get_thread_control_capabilities, attach_no_wait>: New
10926         virtual methods.
10927         <insert_breakpoint, remove_breakpoint>: Now
10928         TARGET_DEFAULT_NORETURN methods.
10929         <info_proc>: Now returns bool.
10930         <to_magic>: Delete.
10931         (OPS_MAGIC): Delete.
10932         (current_target): Delete.  All references replaced by references
10933         to ...
10934         (target_stack): ... this.  New.
10935         (target_shortname, target_longname): Adjust.
10936         (target_can_run): Now a function declaration.
10937         (default_child_has_all_memory, default_child_has_memory)
10938         (default_child_has_stack, default_child_has_registers)
10939         (default_child_has_execution): Remove target_ops parameter.
10940         (complete_target_initialization): Delete.
10941         (memory_breakpoint_target): New template class.
10942         (test_target_ops): Refactor as a C++ class with virtual methods.
10943         * make-target-delegates (NAME_PART): Tighten.
10944         (POINTER_PART, CP_SYMBOL): New.
10945         (SIMPLE_RETURN_PART): Reimplement.
10946         (VEC_RETURN_PART): Expect less.
10947         (RETURN_PART, VIRTUAL_PART): New.
10948         (METHOD): Adjust to C++ virtual methods.
10949         (scan_target_h): Remove reference to C99.
10950         (dname): Output "target_ops::" prefix.
10951         (write_function_header): Adjust to output a C++ class method.
10952         (write_declaration): New.
10953         (write_delegator): Adjust to output a C++ class method.
10954         (tdname): Output "dummy_target::" prefix.
10955         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10956         method.
10957         (tdefault_names, debug_names): Delete.
10958         (return_types, tdefaults, styles, argtypes_array): New.
10959         (top level): All methods are delegators.
10960         (print_class): New.
10961         (top level): Print dummy_target and debug_target classes.
10962         * target-delegates.c: Regenerate.
10963         * target-debug.h (target_debug_print_enum_info_proc_what)
10964         (target_debug_print_thread_control_capabilities)
10965         (target_debug_print_thread_info_p): New.
10966         * target.c (dummy_target): Delete.
10967         (the_dummy_target, the_debug_target): New.
10968         (target_stack): Now extern.
10969         (set_targetdebug): Push/unpush debug target.
10970         (default_child_has_all_memory, default_child_has_memory)
10971         (default_child_has_stack, default_child_has_registers)
10972         (default_child_has_execution): Remove target_ops parameter.
10973         (complete_target_initialization): Delete.
10974         (add_target_with_completer): No longer call
10975         complete_target_initialization.
10976         (target_supports_terminal_ours): Use regular delegation.
10977         (update_current_target): Delete.
10978         (push_target): No longer check magic number.  Don't call
10979         update_current_target.
10980         (unpush_target): Don't call update_current_target.
10981         (target_is_pushed): No longer check magic number.
10982         (target_require_runnable): Skip for all stratums over
10983         process_stratum.
10984         (target_ops::info_proc): New.
10985         (target_info_proc): Use find_target_at and
10986         find_default_run_target.
10987         (target_supports_disable_randomization): Use regular delegation.
10988         (target_get_osdata): Use find_target_at.
10989         (target_ops::open, target_ops::close, target_ops::can_attach)
10990         (target_ops::attach, target_ops::can_create_inferior)
10991         (target_ops::create_inferior, target_ops::can_run)
10992         (target_can_run): New.
10993         (default_fileio_target): Use regular delegation.
10994         (target_ops::fileio_open, target_ops::fileio_pwrite)
10995         (target_ops::fileio_pread, target_ops::fileio_fstat)
10996         (target_ops::fileio_close, target_ops::fileio_unlink)
10997         (target_ops::fileio_readlink): New.
10998         (target_fileio_open_1, target_fileio_unlink)
10999         (target_fileio_readlink): Always call the target method.  Handle
11000         FILEIO_ENOSYS.
11001         (return_zero, return_zero_has_execution): Delete.
11002         (init_dummy_target): Delete.
11003         (dummy_target::dummy_target, dummy_target::shortname)
11004         (dummy_target::longname, dummy_target::doc)
11005         (debug_target::debug_target, debug_target::shortname)
11006         (debug_target::longname, debug_target::doc): New.
11007         (target_supports_delete_record): Use regular delegation.
11008         (setup_target_debug): Delete.
11009         (maintenance_print_target_stack): Skip debug_stratum.
11010         (initialize_targets): Instantiate the_dummy_target and
11011         the_debug_target.
11012         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
11013         use target_stack.
11014         (target_auxv_search, fprint_target_auxv): Adjust.
11015         (info_auxv_command): Adjust to use target_stack.
11016         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11017         * exceptions.c (print_flush): Handle a NULL target_stack.
11018         * regcache.c (target_ops_no_register): Refactor as class with
11019         virtual methods.
11020
11021         * exec.c (exec_target): New class.
11022         (exec_ops): Now an exec_target.
11023         (exec_open, exec_close_1, exec_get_section_table)
11024         (exec_xfer_partial, exec_files_info, exec_has_memory)
11025         (exec_make_note_section): Refactor as exec_target methods.
11026         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11027         Delete.
11028         (exec_target::find_memory_regions): New.
11029         (_initialize_exec): Don't call init_exec_ops.
11030         * gdbcore.h (exec_file_clear): Delete.
11031
11032         * corefile.c (core_target): Delete.
11033         (core_file_command): Adjust.
11034         * corelow.c (core_target): New class.
11035         (the_core_target): New.
11036         (core_close): Remove target_ops parameter.
11037         (core_close_cleanup): Adjust.
11038         (core_target::close): New.
11039         (core_open, core_detach, get_core_registers, core_files_info)
11040         (core_xfer_partial, core_thread_alive, core_read_description)
11041         (core_pid_to_str, core_thread_name, core_has_memory)
11042         (core_has_stack, core_has_registers, core_info_proc): Rework as
11043         core_target methods.
11044         (ignore, core_remove_breakpoint, init_core_ops): Delete.
11045         (_initialize_corelow): Initialize the_core_target.
11046         * gdbcore.h (core_target): Delete.
11047         (the_core_target): New.
11048
11049         * ctf.c: (ctf_target): New class.
11050         (ctf_ops): Now a ctf_target.
11051         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11052         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11053         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11054         methods.
11055         (init_ctf_ops): Delete.
11056         (_initialize_ctf): Don't call it.
11057         * tracefile-tfile.c (tfile_target): New class.
11058         (tfile_ops): Now a tfile_target.
11059         (tfile_open, tfile_close, tfile_files_info)
11060         (tfile_get_tracepoint_status, tfile_trace_find)
11061         (tfile_fetch_registers, tfile_xfer_partial)
11062         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11063         Refactor as tfile_target methods.
11064         (tfile_xfer_partial_features): Remove target_ops parameter.
11065         (init_tfile_ops): Delete.
11066         (_initialize_tracefile_tfile): Don't call it.
11067         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11068         (tracefile_has_stack, tracefile_has_registers)
11069         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11070         tracefile_target methods.
11071         (init_tracefile_ops): Delete.
11072         (tracefile_target::tracefile_target): New.
11073         * tracefile.h: Include "target.h".
11074         (tracefile_target): New class.
11075         (init_tracefile_ops): Delete.
11076
11077         * spu-multiarch.c (spu_multiarch_target): New class.
11078         (spu_ops): Now a spu_multiarch_target.
11079         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11080         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11081         (spu_search_memory, spu_mourn_inferior): Refactor as
11082         spu_multiarch_target methods.
11083         (init_spu_ops): Delete.
11084         (_initialize_spu_multiarch): Remove references to init_spu_ops,
11085         complete_target_initialization.
11086
11087         * ravenscar-thread.c (ravenscar_thread_target): New class.
11088         (ravenscar_ops): Now a ravenscar_thread_target.
11089         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11090         (ravenscar_thread_alive, ravenscar_pid_to_str)
11091         (ravenscar_fetch_registers, ravenscar_store_registers)
11092         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11093         (ravenscar_stopped_by_hw_breakpoint)
11094         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11095         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11096         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11097         methods.
11098         (init_ravenscar_thread_ops): Delete.
11099         (_initialize_ravenscar): Remove references to
11100         init_ravenscar_thread_ops and complete_target_initialization.
11101
11102         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11103         (bsd_uthread_target): New class.
11104         (bsd_uthread_ops): Now a bsd_uthread_target.
11105         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11106         (bsd_uthread_close, bsd_uthread_mourn_inferior)
11107         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11108         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11109         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11110         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11111         (bsd_uthread_target): Delete function.
11112         (_initialize_bsd_uthread): Remove reference to
11113         complete_target_initialization.
11114
11115         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
11116         (target_bfd): ... this new class.
11117         (target_bfd_xfer_partial, target_bfd_get_section_table)
11118         (target_bfd_close): Refactor as target_bfd methods.
11119         (target_bfd::~target_bfd): New.
11120         (target_bfd_reopen): Adjust.
11121         (target_bfd::close): New.
11122
11123         * record-btrace.c (record_btrace_target): New class.
11124         (record_btrace_ops): Now a record_btrace_target.
11125         (record_btrace_open, record_btrace_stop_recording)
11126         (record_btrace_disconnect, record_btrace_close)
11127         (record_btrace_async, record_btrace_info)
11128         (record_btrace_insn_history, record_btrace_insn_history_range)
11129         (record_btrace_insn_history_from, record_btrace_call_history)
11130         (record_btrace_call_history_range)
11131         (record_btrace_call_history_from, record_btrace_record_method)
11132         (record_btrace_is_replaying, record_btrace_will_replay)
11133         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11134         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11135         (record_btrace_store_registers, record_btrace_prepare_to_store)
11136         (record_btrace_to_get_unwinder)
11137         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11138         (record_btrace_commit_resume, record_btrace_wait)
11139         (record_btrace_stop, record_btrace_can_execute_reverse)
11140         (record_btrace_stopped_by_sw_breakpoint)
11141         (record_btrace_supports_stopped_by_sw_breakpoint)
11142         (record_btrace_stopped_by_hw_breakpoint)
11143         (record_btrace_supports_stopped_by_hw_breakpoint)
11144         (record_btrace_update_thread_list, record_btrace_thread_alive)
11145         (record_btrace_goto_begin, record_btrace_goto_end)
11146         (record_btrace_goto, record_btrace_stop_replaying_all)
11147         (record_btrace_execution_direction)
11148         (record_btrace_prepare_to_generate_core)
11149         (record_btrace_done_generating_core): Refactor as
11150         record_btrace_target methods.
11151         (init_record_btrace_ops): Delete.
11152         (_initialize_record_btrace): Remove reference to
11153         init_record_btrace_ops.
11154         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11155         the execution_direction global.
11156         (record_full_base_target, record_full_target)
11157         (record_full_core_target): New classes.
11158         (record_full_ops): Now a record_full_target.
11159         (record_full_core_ops): Now a record_full_core_target.
11160         (record_full_target::detach, record_full_target::disconnect)
11161         (record_full_core_target::disconnect)
11162         (record_full_target::mourn_inferior, record_full_target::kill):
11163         New.
11164         (record_full_open, record_full_close, record_full_async): Refactor
11165         as methods of the record_full_base_target class.
11166         (record_full_resume, record_full_commit_resume): Refactor
11167         as methods of the record_full_target class.
11168         (record_full_wait, record_full_stopped_by_watchpoint)
11169         (record_full_stopped_data_address)
11170         (record_full_stopped_by_sw_breakpoint)
11171         (record_full_supports_stopped_by_sw_breakpoint)
11172         (record_full_stopped_by_hw_breakpoint)
11173         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11174         methods of the record_full_base_target class.
11175         (record_full_store_registers, record_full_xfer_partial)
11176         (record_full_insert_breakpoint, record_full_remove_breakpoint):
11177         Refactor as methods of the record_full_target class.
11178         (record_full_can_execute_reverse, record_full_get_bookmark)
11179         (record_full_goto_bookmark, record_full_execution_direction)
11180         (record_full_record_method, record_full_info, record_full_delete)
11181         (record_full_is_replaying, record_full_will_replay)
11182         (record_full_goto_begin, record_full_goto_end, record_full_goto)
11183         (record_full_stop_replaying): Refactor as methods of the
11184         record_full_base_target class.
11185         (record_full_core_resume, record_full_core_kill)
11186         (record_full_core_fetch_registers)
11187         (record_full_core_prepare_to_store)
11188         (record_full_core_store_registers, record_full_core_xfer_partial)
11189         (record_full_core_insert_breakpoint)
11190         (record_full_core_remove_breakpoint)
11191         (record_full_core_has_execution): Refactor
11192         as methods of the record_full_core_target class.
11193         (record_full_base_target::supports_delete_record): New.
11194         (init_record_full_ops): Delete.
11195         (init_record_full_core_ops): Delete.
11196         (record_full_save): Refactor as method of the
11197         record_full_base_target class.
11198         (_initialize_record_full): Remove references to
11199         init_record_full_ops and init_record_full_core_ops.
11200
11201         * remote.c (remote_target, extended_remote_target): New classes.
11202         (remote_ops): Now a remote_target.
11203         (extended_remote_ops): Now an extended_remote_target.
11204         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11205         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11206         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11207         (remote_pass_signals, remote_set_syscall_catchpoint)
11208         (remote_program_signals, )
11209         (remote_thread_always_alive): Remove target_ops parameter.
11210         (remote_thread_alive, remote_thread_name)
11211         (remote_update_thread_list, remote_threads_extra_info)
11212         (remote_static_tracepoint_marker_at)
11213         (remote_static_tracepoint_markers_by_strid)
11214         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11215         (remote_open): Refactor as methods of remote_target.
11216         (extended_remote_open, extended_remote_detach)
11217         (extended_remote_attach, extended_remote_post_attach):
11218         (extended_remote_supports_disable_randomization)
11219         (extended_remote_create_inferior): : Refactor as method of
11220         extended_remote_target.
11221         (remote_set_permissions, remote_open_1, remote_detach)
11222         (remote_follow_fork, remote_follow_exec, remote_disconnect)
11223         (remote_resume, remote_commit_resume, remote_stop)
11224         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11225         (remote_terminal_ours, remote_wait, remote_fetch_registers)
11226         (remote_prepare_to_store, remote_store_registers)
11227         (remote_flash_erase, remote_flash_done, remote_files_info)
11228         (remote_kill, remote_mourn, remote_insert_breakpoint)
11229         (remote_remove_breakpoint, remote_insert_watchpoint)
11230         (remote_watchpoint_addr_within_range)
11231         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11232         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11233         (remote_supports_stopped_by_sw_breakpoint)
11234         (remote_stopped_by_hw_breakpoint)
11235         (remote_supports_stopped_by_hw_breakpoint)
11236         (remote_stopped_by_watchpoint, remote_stopped_data_address)
11237         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11238         (remote_verify_memory): Refactor as methods of remote_target.
11239         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11240         parameter.
11241         (remote_xfer_partial, remote_get_memory_xfer_limit)
11242         (remote_search_memory, remote_rcmd, remote_memory_map)
11243         (remote_pid_to_str, remote_get_thread_local_address)
11244         (remote_get_tib_address, remote_read_description): Refactor as
11245         methods of remote_target.
11246         (remote_target::fileio_open, remote_target::fileio_pwrite)
11247         (remote_target::fileio_pread, remote_target::fileio_close): New.
11248         (remote_hostio_readlink, remote_hostio_fstat)
11249         (remote_filesystem_is_local, remote_can_execute_reverse)
11250         (remote_supports_non_stop, remote_supports_disable_randomization)
11251         (remote_supports_multi_process, remote_supports_cond_breakpoints)
11252         (remote_supports_enable_disable_tracepoint)
11253         (remote_supports_string_tracing)
11254         (remote_can_run_breakpoint_commands, remote_trace_init)
11255         (remote_download_tracepoint, remote_can_download_tracepoint)
11256         (remote_download_trace_state_variable, remote_enable_tracepoint)
11257         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11258         (remote_trace_start, remote_get_trace_status)
11259         (remote_get_tracepoint_status, remote_trace_stop)
11260         (remote_trace_find, remote_get_trace_state_variable_value)
11261         (remote_save_trace_data, remote_get_raw_trace_data)
11262         (remote_set_disconnected_tracing, remote_core_of_thread)
11263         (remote_set_circular_trace_buffer, remote_traceframe_info)
11264         (remote_get_min_fast_tracepoint_insn_len)
11265         (remote_set_trace_buffer_size, remote_set_trace_notes)
11266         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11267         (remote_disable_btrace, remote_teardown_btrace)
11268         (remote_read_btrace, remote_btrace_conf)
11269         (remote_augmented_libraries_svr4_read, remote_load)
11270         (remote_pid_to_exec_file, remote_can_do_single_step)
11271         (remote_execution_direction, remote_thread_handle_to_thread_info):
11272         Refactor as methods of remote_target.
11273         (init_remote_ops, init_extended_remote_ops): Delete.
11274         (remote_can_async_p, remote_is_async_p, remote_async)
11275         (remote_thread_events, remote_upload_tracepoints)
11276         (remote_upload_trace_state_variables): Refactor as methods of
11277         remote_target.
11278         (_initialize_remote): Remove references to init_remote_ops and
11279         init_extended_remote_ops.
11280
11281         * remote-sim.c (gdbsim_target): New class.
11282         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11283         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11284         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11285         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11286         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11287         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11288         Refactor as methods of gdbsim_target.
11289         (gdbsim_ops): Now a gdbsim_target.
11290         (init_gdbsim_ops): Delete.
11291         (gdbsim_cntrl_c): Adjust.
11292         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11293
11294         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11295         (the_amd64_linux_nat_target): New.
11296         (amd64_linux_fetch_inferior_registers)
11297         (amd64_linux_store_inferior_registers): Refactor as methods of
11298         amd64_linux_nat_target.
11299         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
11300         * i386-linux-nat.c: Don't include "linux-nat.h".
11301         (i386_linux_nat_target): New class.
11302         (the_i386_linux_nat_target): New.
11303         (i386_linux_fetch_inferior_registers)
11304         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11305         as methods of i386_linux_nat_target.
11306         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
11307         * inf-child.c (inf_child_ops): Delete.
11308         (inf_child_fetch_inferior_registers)
11309         (inf_child_store_inferior_registers): Delete.
11310         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11311         methods of inf_child_target.
11312         (inf_child_target::supports_terminal_ours)
11313         (inf_child_target::terminal_init)
11314         (inf_child_target::terminal_inferior)
11315         (inf_child_target::terminal_ours_for_output)
11316         (inf_child_target::terminal_ours, inf_child_target::interrupt)
11317         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11318         New.
11319         (inf_child_open, inf_child_disconnect, inf_child_close)
11320         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11321         (inf_child_post_startup_inferior, inf_child_can_run)
11322         (inf_child_pid_to_exec_file): Refactor as methods of
11323         inf_child_target.
11324         (inf_child_follow_fork): Delete.
11325         (inf_child_target::can_create_inferior)
11326         (inf_child_target::can_attach): New.
11327         (inf_child_target::has_all_memory, inf_child_target::has_memory)
11328         (inf_child_target::has_stack, inf_child_target::has_registers)
11329         (inf_child_target::has_execution): New.
11330         (inf_child_fileio_open, inf_child_fileio_pwrite)
11331         (inf_child_fileio_pread, inf_child_fileio_fstat)
11332         (inf_child_fileio_close, inf_child_fileio_unlink)
11333         (inf_child_fileio_readlink, inf_child_use_agent)
11334         (inf_child_can_use_agent): Refactor as methods of
11335         inf_child_target.
11336         (return_zero, inf_child_target): Delete.
11337         (inf_child_target::inf_child_target): New.
11338         * inf-child.h: Include "target.h".
11339         (inf_child_target): Delete function prototype.
11340         (inf_child_target): New class.
11341         (inf_child_open_target, inf_child_mourn_inferior)
11342         (inf_child_maybe_unpush_target): Delete.
11343         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11344         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11345         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11346         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11347         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11348         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11349         (inf_ptrace_wait, inf_ptrace_xfer_partial)
11350         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11351         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11352         methods of inf_ptrace_target.
11353         (inf_ptrace_target): Delete function.
11354         * inf-ptrace.h: Include "inf-child.h".
11355         (inf_ptrace_target): Delete function declaration.
11356         (inf_ptrace_target): New class.
11357         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11358         * linux-nat.c (linux_target): New.
11359         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11360         (linux_nat_target::~linux_nat_target): New.
11361         (linux_child_post_attach, linux_child_post_startup_inferior)
11362         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11363         (linux_child_remove_fork_catchpoint)
11364         (linux_child_insert_vfork_catchpoint)
11365         (linux_child_remove_vfork_catchpoint)
11366         (linux_child_insert_exec_catchpoint)
11367         (linux_child_remove_exec_catchpoint)
11368         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11369         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11370         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11371         (linux_nat_stopped_data_address)
11372         (linux_nat_stopped_by_sw_breakpoint)
11373         (linux_nat_supports_stopped_by_sw_breakpoint)
11374         (linux_nat_stopped_by_hw_breakpoint)
11375         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11376         (linux_nat_kill, linux_nat_mourn_inferior)
11377         (linux_nat_xfer_partial, linux_nat_thread_alive)
11378         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11379         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11380         (linux_child_static_tracepoint_markers_by_strid)
11381         (linux_nat_is_async_p, linux_nat_can_async_p)
11382         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11383         (linux_nat_supports_multi_process)
11384         (linux_nat_supports_disable_randomization, linux_nat_async)
11385         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11386         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11387         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11388         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11389         methods of linux_nat_target.
11390         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11391         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11392         parameter.
11393         (check_stopped_by_watchpoint): Adjust.
11394         (linux_xfer_partial): Delete.
11395         (linux_target_install_ops, linux_target, linux_nat_add_target):
11396         Delete.
11397         (linux_nat_target::linux_nat_target): New.
11398         * linux-nat.h: Include "inf-ptrace.h".
11399         (linux_nat_target): New.
11400         (linux_target, linux_target_install_ops, linux_nat_add_target):
11401         Delete function declarations.
11402         (linux_target): Declare global.
11403         * linux-thread-db.c (thread_db_target): New.
11404         (thread_db_target::thread_db_target): New.
11405         (thread_db_ops): Delete.
11406         (the_thread_db_target): New.
11407         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11408         (thread_db_update_thread_list, thread_db_pid_to_str)
11409         (thread_db_extra_thread_info)
11410         (thread_db_thread_handle_to_thread_info)
11411         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11412         (thread_db_resume): Refactor as methods of thread_db_target.
11413         (init_thread_db_ops): Delete.
11414         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11415         * x86-linux-nat.c: Don't include "linux-nat.h".
11416         (super_post_startup_inferior): Delete.
11417         (x86_linux_nat_target::~x86_linux_nat_target): New.
11418         (x86_linux_child_post_startup_inferior)
11419         (x86_linux_read_description, x86_linux_enable_btrace)
11420         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11421         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11422         methods of x86_linux_nat_target.
11423         (x86_linux_create_target): Delete.  Bits folded ...
11424         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11425         pointer.
11426         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11427         (x86_linux_nat_target): New class.
11428         (x86_linux_create_target): Delete.
11429         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11430         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11431         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11432         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11433         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11434         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11435         make extern.
11436         (x86_use_watchpoints): Delete.
11437         * x86-nat.h: Include "breakpoint.h" and "target.h".
11438         (x86_use_watchpoints): Delete.
11439         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11440         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11441         (x86_insert_watchpoint, x86_remove_watchpoint)
11442         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11443         (x86_stopped_by_hw_breakpoint): New declarations.
11444         (x86_nat_target): New template class.
11445
11446         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11447         (the_ppc_linux_nat_target): New.
11448         (ppc_linux_fetch_inferior_registers)
11449         (ppc_linux_can_use_hw_breakpoint)
11450         (ppc_linux_region_ok_for_hw_watchpoint)
11451         (ppc_linux_ranged_break_num_registers)
11452         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11453         (ppc_linux_insert_mask_watchpoint)
11454         (ppc_linux_remove_mask_watchpoint)
11455         (ppc_linux_can_accel_watchpoint_condition)
11456         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11457         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11458         (ppc_linux_watchpoint_addr_within_range)
11459         (ppc_linux_masked_watch_num_registers)
11460         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11461         (ppc_linux_read_description): Refactor as methods of
11462         ppc_linux_nat_target.
11463         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11464
11465         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11466         (procfs_target): New class.
11467         (the_procfs_target): New.
11468         (procfs_target): Delete function.
11469         (procfs_auxv_parse, procfs_attach, procfs_detach)
11470         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11471         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11472         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11473         (procfs_create_inferior, procfs_update_thread_list)
11474         (procfs_thread_alive, procfs_pid_to_str)
11475         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11476         (procfs_stopped_data_address, procfs_insert_watchpoint)
11477         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11478         (proc_find_memory_regions, procfs_info_proc)
11479         (procfs_make_note_section): Refactor as methods of procfs_target.
11480         (_initialize_procfs): Adjust.
11481         * sol-thread.c (sol_thread_target): New class.
11482         (sol_thread_ops): Now a sol_thread_target.
11483         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11484         (sol_thread_fetch_registers, sol_thread_store_registers)
11485         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11486         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11487         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11488         (init_sol_thread_ops): Delete.
11489         (_initialize_sol_thread): Adjust.  Remove references to
11490         init_sol_thread_ops and complete_target_initialization.
11491
11492         * windows-nat.c (windows_nat_target): New class.
11493         (windows_fetch_inferior_registers)
11494         (windows_store_inferior_registers, windows_resume, windows_wait)
11495         (windows_attach, windows_detach, windows_pid_to_exec_file)
11496         (windows_files_info, windows_create_inferior)
11497         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11498         (windows_close, windows_pid_to_str, windows_xfer_partial)
11499         (windows_get_tib_address, windows_get_ada_task_ptid)
11500         (windows_thread_name, windows_thread_alive): Refactor as
11501         windows_nat_target methods.
11502         (do_initial_windows_stuff): Adjust.
11503         (windows_target): Delete function.
11504         (_initialize_windows_nat): Adjust.
11505
11506         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11507         (darwin_mourn_inferior, darwin_kill_inferior)
11508         (darwin_create_inferior, darwin_attach, darwin_detach)
11509         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11510         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11511         (darwin_supports_multi_process): Refactor as darwin_nat_target
11512         methods.
11513         (darwin_resume_to, darwin_files_info): Delete.
11514         (_initialize_darwin_inferior): Rename to ...
11515         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11516         * darwin-nat.h: Include "inf-child.h".
11517         (darwin_nat_target): New class.
11518         (darwin_complete_target): Delete.
11519         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11520         (darwin_target): New.
11521         (i386_darwin_fetch_inferior_registers)
11522         (i386_darwin_store_inferior_registers): Refactor as methods of
11523         darwin_nat_target.
11524         (darwin_complete_target): Delete, with ...
11525         (_initialize_i386_darwin_nat): ... bits factored out here.
11526
11527         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11528         (the_alpha_linux_nat_target): New.
11529         (alpha_linux_register_u_offset): Refactor as
11530         alpha_linux_nat_target method.
11531         (_initialize_alpha_linux_nat): Adjust.
11532         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11533         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11534         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11535         methods of linux_nat_trad_target.
11536         (linux_trad_target): Delete.
11537         * linux-nat-trad.h (linux_trad_target): Delete function.
11538         (linux_nat_trad_target): New class.
11539         * mips-linux-nat.c (mips_linux_nat_target): New class.
11540         (super_fetch_registers, super_store_registers, super_close):
11541         Delete.
11542         (the_mips_linux_nat_target): New.
11543         (mips64_linux_regsets_fetch_registers)
11544         (mips64_linux_regsets_store_registers)
11545         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11546         (mips_linux_register_u_offset, mips_linux_read_description)
11547         (mips_linux_can_use_hw_breakpoint)
11548         (mips_linux_stopped_by_watchpoint)
11549         (mips_linux_stopped_data_address)
11550         (mips_linux_region_ok_for_hw_watchpoint)
11551         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11552         (mips_linux_close): Refactor as methods of mips_linux_nat.
11553         (_initialize_mips_linux_nat): Adjust to C++ification.
11554
11555         * aix-thread.c (aix_thread_target): New class.
11556         (aix_thread_ops): Now an aix_thread_target.
11557         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11558         (aix_thread_fetch_registers, aix_thread_store_registers)
11559         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11560         (aix_thread_thread_alive, aix_thread_pid_to_str)
11561         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11562         Refactor as methods of aix_thread_target.
11563         (init_aix_thread_ops): Delete.
11564         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11565         and complete_target_initialization.
11566         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11567         (rs6000_nat_target): New class.
11568         (the_rs6000_nat_target): New.
11569         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11570         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11571         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11572         (super_create_inferior): Delete.
11573         (_initialize_rs6000_nat): Adjust to C++ification.
11574
11575         * arm-linux-nat.c (arm_linux_nat_target): New class.
11576         (the_arm_linux_nat_target): New.
11577         (arm_linux_fetch_inferior_registers)
11578         (arm_linux_store_inferior_registers, arm_linux_read_description)
11579         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11580         (arm_linux_remove_hw_breakpoint)
11581         (arm_linux_region_ok_for_hw_watchpoint)
11582         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11583         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11584         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11585         arm_linux_nat_target.
11586         (_initialize_arm_linux_nat): Adjust to C++ification.
11587
11588         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11589         (the_aarch64_linux_nat_target): New.
11590         (aarch64_linux_fetch_inferior_registers)
11591         (aarch64_linux_store_inferior_registers)
11592         (aarch64_linux_child_post_startup_inferior)
11593         (aarch64_linux_read_description)
11594         (aarch64_linux_can_use_hw_breakpoint)
11595         (aarch64_linux_insert_hw_breakpoint)
11596         (aarch64_linux_remove_hw_breakpoint)
11597         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11598         (aarch64_linux_region_ok_for_hw_watchpoint)
11599         (aarch64_linux_stopped_data_address)
11600         (aarch64_linux_stopped_by_watchpoint)
11601         (aarch64_linux_watchpoint_addr_within_range)
11602         (aarch64_linux_can_do_single_step): Refactor as methods of
11603         aarch64_linux_nat_target.
11604         (super_post_startup_inferior): Delete.
11605         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11606
11607         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11608         (the_hppa_linux_nat_target): New.
11609         (hppa_linux_fetch_inferior_registers)
11610         (hppa_linux_store_inferior_registers): Refactor as methods of
11611         hppa_linux_nat_target.
11612         (_initialize_hppa_linux_nat): Adjust to C++ification.
11613
11614         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11615         (the_ia64_linux_nat_target): New.
11616         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11617         (ia64_linux_stopped_data_address)
11618         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11619         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11620         ia64_linux_nat_target methods.
11621         (super_xfer_partial): Delete.
11622         (_initialize_ia64_linux_nat): Adjust to C++ification.
11623
11624         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11625         (the_m32r_linux_nat_target): New.
11626         (m32r_linux_fetch_inferior_registers)
11627         (m32r_linux_store_inferior_registers): Refactor as
11628         m32r_linux_nat_target methods.
11629         (_initialize_m32r_linux_nat): Adjust to C++ification.
11630
11631         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11632         (the_m68k_linux_nat_target): New.
11633         (m68k_linux_fetch_inferior_registers)
11634         (m68k_linux_store_inferior_registers): Refactor as
11635         m68k_linux_nat_target methods.
11636         (_initialize_m68k_linux_nat): Adjust to C++ification.
11637
11638         * s390-linux-nat.c (s390_linux_nat_target): New class.
11639         (the_s390_linux_nat_target): New.
11640         (s390_linux_fetch_inferior_registers)
11641         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11642         (s390_insert_watchpoint, s390_remove_watchpoint)
11643         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11644         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11645         (s390_auxv_parse, s390_read_description): Refactor as methods of
11646         s390_linux_nat_target.
11647         (_initialize_s390_nat): Adjust to C++ification.
11648
11649         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11650         (the_sparc_linux_nat_target): New.
11651         (_initialize_sparc_linux_nat): Adjust to C++ification.
11652         * sparc-nat.c (sparc_fetch_inferior_registers)
11653         (sparc_store_inferior_registers): Remove target_ops parameter.
11654         * sparc-nat.h (sparc_fetch_inferior_registers)
11655         (sparc_store_inferior_registers): Remove target_ops parameter.
11656         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11657         (the_sparc64_linux_nat_target): New.
11658         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11659
11660         * spu-linux-nat.c (spu_linux_nat_target): New class.
11661         (the_spu_linux_nat_target): New.
11662         (spu_child_post_startup_inferior, spu_child_post_attach)
11663         (spu_child_wait, spu_fetch_inferior_registers)
11664         (spu_store_inferior_registers, spu_xfer_partial)
11665         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11666         methods.
11667         (_initialize_spu_nat): Adjust to C++ification.
11668
11669         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11670         (the_tilegx_linux_nat_target): New.
11671         (fetch_inferior_registers, store_inferior_registers):
11672         Refactor as methods.
11673         (_initialize_tile_linux_nat): Adjust to C++ification.
11674
11675         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11676         (the_xtensa_linux_nat_target): New.
11677         (xtensa_linux_fetch_inferior_registers)
11678         (xtensa_linux_store_inferior_registers): Refactor as
11679         xtensa_linux_nat_target methods.
11680         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11681
11682         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11683         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11684         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11685         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11686         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11687         (fbsd_stopped_by_sw_breakpoint)
11688         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11689         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11690         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11691         (fbsd_post_startup_inferior, fbsd_post_attach)
11692         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11693         (fbsd_set_syscall_catchpoint)
11694         (super_xfer_partial, super_resume, super_wait)
11695         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11696         (fbsd_handle_debug_trap): Remove target_ops parameter.
11697         (fbsd_nat_add_target): Delete.
11698         * fbsd-nat.h: Include "inf-ptrace.h".
11699         (fbsd_nat_add_target): Delete.
11700         (USE_SIGTRAP_SIGINFO): Define.
11701         (fbsd_nat_target): New class.
11702
11703         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11704         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11705         (amd64bsd_target): Delete.
11706         * amd64-bsd-nat.h: New file.
11707         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11708         "x86-bsd-nat.h".
11709         (amd64_fbsd_nat_target): New class.
11710         (the_amd64_fbsd_nat_target): New.
11711         (amd64fbsd_read_description): Refactor as method of
11712         amd64_fbsd_nat_target.
11713         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11714         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11715         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11716         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11717         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11718         (i386bsd_target): Delete.
11719         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11720         (i386bsd_fetch_inferior_registers)
11721         (i386bsd_store_inferior_registers): Declare.
11722         (i386_bsd_nat_target): New class.
11723         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11724         (the_i386_fbsd_nat_target): New.
11725         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11726         i386_fbsd_nat_target methods.
11727         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11728         (_initialize_i386fbsd_nat): Adjust to C++ification.
11729         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11730         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11731         (_initialize_x86_bsd_nat): Adjust to C++ification.
11732         * x86-bsd-nat.h: Include "x86-nat.h".
11733         (x86bsd_target): Delete declaration.
11734         (x86bsd_nat_target): New class.
11735
11736         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11737         (the_aarch64_fbsd_nat_target): New.
11738         (aarch64_fbsd_fetch_inferior_registers)
11739         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11740         aarch64_fbsd_nat_target.
11741         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11742         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11743         (the_alpha_bsd_nat_target): New.
11744         (alphabsd_fetch_inferior_registers)
11745         (alphabsd_store_inferior_registers): Refactor as
11746         alpha_bsd_nat_target methods.
11747         (_initialize_alphabsd_nat): Refactor as methods of
11748         alpha_bsd_nat_target.
11749         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11750         (the_amd64_nbsd_nat_target): New.
11751         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11752         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11753         (the_amd64_obsd_nat_target): New.
11754         (_initialize_amd64obsd_nat): Adjust to C++ification.
11755         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11756         (the_arm_fbsd_nat_target): New.
11757         (arm_fbsd_fetch_inferior_registers)
11758         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11759         (_initialize_arm_fbsd_nat): Refactor as methods of
11760         arm_fbsd_nat_target.
11761         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11762         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11763         (the_arm_netbsd_nat_target): New.
11764         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11765         arm_netbsd_nat_target.
11766         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11767         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11768         (the_hppa_nbsd_nat_target): New.
11769         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11770         hppa_nbsd_nat_target methods.
11771         (_initialize_hppanbsd_nat): Adjust to C++ification.
11772         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11773         (the_hppa_obsd_nat_target): New.
11774         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11775         methods of hppa_obsd_nat_target.
11776         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11777         add_target.
11778         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11779         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11780         add_target.
11781         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11782         (_initialize_i386obsd_nat): Use add_target.
11783         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11784         (the_m68k_bsd_nat_target): New.
11785         (m68kbsd_fetch_inferior_registers)
11786         (m68kbsd_store_inferior_registers): Refactor as methods of
11787         m68k_bsd_nat_target.
11788         (_initialize_m68kbsd_nat): Adjust to C++ification.
11789         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11790         (the_mips_fbsd_nat_target): New.
11791         (mips_fbsd_fetch_inferior_registers)
11792         (mips_fbsd_store_inferior_registers): Refactor as methods of
11793         mips_fbsd_nat_target.
11794         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11795         add_target.
11796         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11797         (the_mips_nbsd_nat_target): New.
11798         (mipsnbsd_fetch_inferior_registers)
11799         (mipsnbsd_store_inferior_registers): Refactor as methods of
11800         mips_nbsd_nat_target.
11801         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11802         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11803         (the_mips64_obsd_nat_target): New.
11804         (mips64obsd_fetch_inferior_registers)
11805         (mips64obsd_store_inferior_registers): Refactor as methods of
11806         mips64_obsd_nat_target.
11807         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11808         add_target.
11809         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11810         nbsd_nat_target.
11811         * nbsd-nat.h: Include "inf-ptrace.h".
11812         (nbsd_nat_target): New class.
11813         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11814         (obsd_wait): Refactor as methods of obsd_nat_target.
11815         (obsd_add_target): Delete.
11816         * obsd-nat.h: Include "inf-ptrace.h".
11817         (obsd_nat_target): New class.
11818         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11819         (the_ppc_fbsd_nat_target): New.
11820         (ppcfbsd_fetch_inferior_registers)
11821         (ppcfbsd_store_inferior_registers): Refactor as methods of
11822         ppc_fbsd_nat_target.
11823         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11824         add_target.
11825         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11826         (the_ppc_nbsd_nat_target): New.
11827         (ppcnbsd_fetch_inferior_registers)
11828         (ppcnbsd_store_inferior_registers): Refactor as methods of
11829         ppc_nbsd_nat_target.
11830         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11831         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11832         (the_ppc_obsd_nat_target): New.
11833         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11834         methods of ppc_obsd_nat_target.
11835         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11836         add_target.
11837         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11838         (the_sh_nbsd_nat_target): New.
11839         (shnbsd_fetch_inferior_registers)
11840         (shnbsd_store_inferior_registers): Refactor as methods of
11841         sh_nbsd_nat_target.
11842         (_initialize_shnbsd_nat): Adjust to C++ification.
11843         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11844         (inf_ptrace_xfer_partial): Delete.
11845         (sparc_xfer_partial, sparc_target): Delete.
11846         * sparc-nat.h (sparc_fetch_inferior_registers)
11847         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11848         (sparc_target): Delete function declaration.
11849         (sparc_target): New template class.
11850         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11851         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11852         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11853         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11854         add_target.
11855         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11856         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11857         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11858         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11859         add_target.
11860         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11861         (the_vax_bsd_nat_target): New.
11862         (vaxbsd_fetch_inferior_registers)
11863         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11864         methods.
11865         (_initialize_vaxbsd_nat): Adjust to C++ification.
11866
11867         * bsd-kvm.c (bsd_kvm_target): New class.
11868         (bsd_kvm_ops): Now a bsd_kvm_target.
11869         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11870         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11871         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11872         bsd_kvm_target.
11873         (bsd_kvm_return_one): Delete.
11874         (bsd_kvm_add_target): Adjust to C++ification.
11875
11876         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11877         (nto_procfs_target_procfs): New classes.
11878         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11879         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11880         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11881         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11882         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11883         (procfs_remove_hw_breakpoint, procfs_resume)
11884         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11885         (procfs_kill_inferior, procfs_store_registers)
11886         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11887         as methods of nto_procfs_target.
11888         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11889         (nto_native_ops): Delete.
11890         (procfs_open, procfs_native_open): Delete.
11891         (nto_native_ops): Now an nto_procfs_target_native.
11892         (init_procfs_targets): Adjust to C++ification.
11893         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11894         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11895         Refactor as methods of nto_procfs_target.
11896
11897         * go32-nat.c (go32_nat_target): New class.
11898         (the_go32_nat_target): New.
11899         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11900         (go32_store_registers, go32_xfer_partial, go32_files_info)
11901         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11902         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11903         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11904         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11905         (go32_target): Delete.
11906         (_initialize_go32_nat): Adjust to C++ification.
11907
11908         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11909         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11910         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11911         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11912         gnu_nat_target.
11913         (gnu_target): Delete.
11914         * gnu-nat.h (gnu_target): Delete.
11915         (gnu_nat_target): New class.
11916         * i386-gnu-nat.c (gnu_base_target): New.
11917         (i386_gnu_nat_target): New class.
11918         (the_i386_gnu_nat_target): New.
11919         (_initialize_i386gnu_nat): Adjust to C++ification.
11920
11921 2018-05-02  Pedro Alves  <palves@redhat.com>
11922
11923         * bfd-target.c (target_bfd_xclose): Rename to ...
11924         (target_bfd_close): ... this.
11925         (target_bfd_reopen): Adjust.
11926         * target.c (target_close): Remove references to to_xclose.
11927         * target.h (target_ops::to_xclose): Delete.
11928         (target_ops::to_close): Update comments.
11929
11930 2018-05-02  Pedro Alves  <palves@redhat.com>
11931
11932         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11933         "linux-nat.h".
11934         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11935         * inf-ptrace.c (inf_ptrace_register_u_offset)
11936         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11937         (inf_ptrace_store_register, inf_ptrace_store_registers)
11938         (inf_ptrace_trad_target): Move to ...
11939         * linux-nat-trad.c: ... this new file.
11940         * linux-nat-trad.h: New file.
11941         * linux-nat.c (linux_target_install_ops): Make extern.
11942         (linux_trad_target): Delete.
11943         * linux-nat.h (linux_trad_target): Delete declaration.
11944         (linux_target_install_ops): Declare.
11945         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11946         "linux-nat.h".
11947
11948 2018-05-02  Pedro Alves  <palves@redhat.com>
11949
11950         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11951         procfs_target/add_target here.
11952         * procfs.c (procfs_target): Make static.
11953         (_initialize_procfs): Call add_target here.
11954         * procfs.h (struct target_ops): Remove forward declaration.
11955         (procfs_target): Remove declaration.
11956         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11957
11958 2018-05-02  Pedro Alves  <palves@redhat.com>
11959
11960         * procfs.c (procfs_stopped_by_watchpoint)
11961         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11962         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11963         Forward declare.
11964         (procfs_use_watchpoints): Delete, move contents...
11965         (procfs_target): ... here.
11966         * procfs.h (procfs_use_watchpoints): Delete declaration.
11967         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11968         procfs_use_watchpoints.
11969         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11970         procfs_use_watchpoints.
11971
11972 2018-05-02  Tom Tromey  <tom@tromey.com>
11973
11974         PR python/20084:
11975         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11976         and var_zuinteger_unlimited.
11977         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11978         and PARAM_ZUINTEGER_UNLIMITED.
11979         (set_parameter_value): Handle var_zuinteger and
11980         var_zuinteger_unlimited.
11981         (add_setshow_generic): Likewise.
11982         (parmpy_init): Likewise.
11983
11984 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11985
11986         PR rust/23124
11987         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11988         pointer is not null before dereferencing it.
11989
11990 2018-04-30  Tom Tromey  <tom@tromey.com>
11991
11992         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11993         is_mi_like_p.
11994
11995 2018-04-30  Tom Tromey  <tom@tromey.com>
11996
11997         * breakpoint.c (mention): Remove use of is_mi_like_p.
11998         (print_mention_ranged_breakpoint): Likewise.
11999         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12000         of is_mi_like_p.
12001
12002 2018-04-30  Tom Tromey  <tom@tromey.com>
12003
12004         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12005
12006 2018-04-30  Tom Tromey  <tom@tromey.com>
12007
12008         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12009         (info_spu_event_command): Remove some uses of is_mi_like_p.
12010
12011 2018-04-30  Tom Tromey  <tom@tromey.com>
12012
12013         * python/py-framefilter.c (py_print_single_arg)
12014         (enumerate_locals, py_print_args, py_print_frame): Remove some
12015         uses of is_mi_like_p.
12016
12017 2018-04-30  Tom Tromey  <tom@tromey.com>
12018
12019         * ui-out.c: Update.
12020         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12021         * ui-out.h (ui_out::is_mi_like_p): Now const.
12022         (ui_out::do_is_mi_like_p): Now const.
12023         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12024
12025 2018-04-30  Tom Tromey  <tom@tromey.com>
12026
12027         * varobj.c (varobj_set_visualizer): Use new_reference.
12028         * python/python.c (gdbpy_decode_line): Use new_reference.
12029         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12030         new_reference.
12031
12032 2018-04-30  Tom Tromey  <tom@tromey.com>
12033
12034         * varobj.c (install_new_value): Use new_reference.
12035         * value.h (value_incref): Return void.  Swap intro comment with
12036         value_decref.
12037         * value.c (set_value_parent): Use new_reference.
12038         (value_incref): Return void.  Update intro comment.
12039         (release_value): Use new_reference.
12040         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12041
12042 2018-04-30  Tom Tromey  <tom@tromey.com>
12043
12044         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12045         * gdb_bfd.h (new_bfd_ref): Remove.
12046         (gdb_bfd_open): Update comment.
12047         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12048         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12049         (gdb_bfd_fdopenr): Use new_reference.
12050         * exec.c (exec_file_attach): Use new_reference.
12051
12052 2018-04-30  Tom Tromey  <tom@tromey.com>
12053
12054         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12055         method.
12056
12057 2018-04-30  Tom Tromey  <tom@tromey.com>
12058
12059         * jit.c (jit_read_code_entry): Use type_align.
12060         * i386-tdep.c (i386_gdbarch_init): Don't call
12061         set_gdbarch_long_long_align_bit.
12062         * gdbarch.sh: Remove long_long_align_bit.
12063         * gdbarch.c, gdbarch.h: Rebuild.
12064         * arc-tdep.c (arc_type_align): New function.
12065         (arc_gdbarch_init): Use arc_type_align.  Don't call
12066         set_gdbarch_long_long_align_bit.
12067
12068 2018-04-30  Tom Tromey  <tom@tromey.com>
12069
12070         * rust-lang.c (rust_type_alignment): Remove.
12071         (rust_composite_type): Use type_align.
12072
12073 2018-04-30  Tom Tromey  <tom@tromey.com>
12074
12075         * NEWS: Mention Type.align.
12076         * python/py-type.c (typy_get_alignof): New function.
12077         (type_object_getset): Add "alignof".
12078
12079 2018-04-30  Tom Tromey  <tom@tromey.com>
12080
12081         PR exp/17095:
12082         * NEWS: Update.
12083         * std-operator.def (UNOP_ALIGNOF): New operator.
12084         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12085         New.
12086         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12087         * c-lang.c (c_op_print_tab): Add alignof.
12088         * c-exp.y (ALIGNOF): New token.
12089         (exp): Add "ALIGNOF" production.
12090         (ident_tokens): Add _Alignof and alignof.
12091
12092 2018-04-30  Tom Tromey  <tom@tromey.com>
12093
12094         * i386-tdep.c (i386_type_align): New function.
12095         (i386_gdbarch_init): Update.
12096         * gdbarch.sh (type_align): New method.
12097         * gdbarch.c, gdbarch.h: Rebuild.
12098         * arch-utils.h (default_type_align): Declare.
12099         * arch-utils.c (default_type_align): New function.
12100         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12101         (struct type) <align_log2>: New field.
12102         <instance_flags>: Now a bitfield.
12103         (TYPE_RAW_ALIGN): New macro.
12104         (type_align, type_raw_align, set_type_align): Declare.
12105         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12106         functions.
12107         * dwarf2read.c (quirk_rust_enum): Set type alignment.
12108         (get_alignment, maybe_set_alignment): New functions.
12109         (read_structure_type, read_enumeration_type, read_array_type)
12110         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12111         (read_subrange_type, read_base_type): Set type alignment.
12112
12113 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
12114
12115         * dwarf2read.c (read_index_from_section): Use bool.
12116
12117 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
12118
12119         PR gdb/22950
12120         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12121         with #ifdef.
12122
12123 2018-04-29  John Reiser  <jreiser@BitWagon.com>
12124
12125         PR build/22873
12126         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12127         last step, and do it atomically.
12128
12129 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
12130
12131         * compile/compile-c-types.c (convert_int, convert_float):
12132         Update for C FE v1.
12133
12134 2018-04-27  Tom Tromey  <tom@tromey.com>
12135
12136         PR rust/22545:
12137         * rust-lang.c (rust_inclusive_range_type_p): New function.
12138         (rust_range): Handle inclusive ranges.
12139         (rust_compute_range): Likewise.
12140         * rust-exp.y (struct rust_op) <inclusive>: New field.
12141         (DOTDOTEQ): New constant.
12142         (range_expr): Add "..=" productions.
12143         (operator_tokens): Add "..=" token.
12144         (ast_range): Add "inclusive" parameter.
12145         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12146         ranges.
12147         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12148         bounds values.
12149         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12150         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12151         Update comments.
12152         * expprint.c (print_subexp_standard): Handle new bounds values.
12153         (dump_subexp_body_standard): Likewise.
12154
12155 2018-04-27  Tom Tromey  <tom@tromey.com>
12156
12157         * configure: Rebuild.
12158         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12159         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12160         "OVERRIDE".
12161         (class symbol_needs_eval_context): Likewise.
12162         * dwarf2read.c (mock_mapped_index::symbol_name_count)
12163         (mock_mapped_index::symbol_name_at): Use "override".  Remove
12164         "virtual".
12165         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12166         "override".
12167         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12168         * aarch64-tdep.c (instruction_reader::read): Use "override".
12169         (instruction_reader_test::read): Likewise.
12170         * arm-tdep.c (instruction_reader::read): Use "override".
12171         (instruction_reader_thumb::read): Likewise.
12172
12173 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
12174
12175         PR remote/9665
12176         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12177         instead of remote_send.
12178         (remote_send): Remove.
12179
12180 2018-04-26  Pedro Alves  <palves@redhat.com>
12181
12182         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12183         find_function_start_sal instead of find_pc_line.
12184
12185 2018-04-26  Pedro Alves  <palves@redhat.com>
12186
12187         * breakpoint.c (set_breakpoint_location_function): Handle
12188         mst_data_gnu_ifunc.
12189         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12190         * elfread.c (elf_symtab_read): Give data symbols with
12191         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12192         (elf_rel_plt_read): Update comment.
12193         * linespec.c (convert_linespec_to_sals): Handle
12194         mst_data_gnu_ifunc.
12195         (minsym_found): Handle mst_data_gnu_ifunc.
12196         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12197         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12198         * parse.c (find_minsym_type_and_address): Handle
12199         mst_data_gnu_ifunc.
12200         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12201         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12202         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12203         comment.
12204         <mst_data_gnu_ifunc>: New enumerator.
12205
12206 2018-04-26  Pedro Alves  <palves@redhat.com>
12207
12208         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12209         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
12210         'want_trampoline' parameter by a lookup_msym_prefer parameter.
12211         Handle it.
12212         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12213         (lookup_minimal_symbol_by_pc): Adjust.
12214         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12215         (lookup_solib_trampoline_symbol_by_pc): Adjust.
12216         * minsyms.h (lookup_msym_prefer): New enum.
12217         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12218         parameter by a lookup_msym_prefer parameter.
12219
12220 2018-04-26  Pedro Alves  <palves@redhat.com>
12221
12222         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12223         ends in "@plt" instead of looking at the symbol's section.
12224
12225 2018-04-26  Pedro Alves  <palves@redhat.com>
12226
12227         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
12228         all references.
12229         (find_pc_partial_function_gnu_ifunc): Rename to ...
12230         (find_pc_partial_function): ... this, and remove references to
12231         'is_gnu_ifunc_p'.
12232         (find_pc_partial_function): Delete old implementation.
12233         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12234
12235 2018-04-26  Pedro Alves  <palves@redhat.com>
12236
12237         * linespec.c (struct bound_minimal_symbol_search_key): New.
12238         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
12239         skip first line if we found a GNU ifunc minimal symbol by name.
12240         (compare_msymbols): Change parameters to work with a destructured
12241         lhs minsym.
12242         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12243         functions.
12244
12245 2018-04-26  Pedro Alves  <palves@redhat.com>
12246
12247         * breakpoint.c (set_breakpoint_location_function): Don't resolve
12248         ifunc targets here.  Instead, if we have an ifunc minsym, use its
12249         address/name.
12250         (add_location_to_breakpoint): Store the minsym and the objfile in
12251         the breakpoint location.
12252         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12253         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12254         Record the minsym in the sal.
12255         * symtab.h (symtab_and_line) <msymbol>: New field.
12256
12257 2018-04-26  Pedro Alves  <palves@redhat.com>
12258
12259         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12260         unless we actually resolved the ifunc.
12261
12262 2018-04-26  Pedro Alves  <palves@redhat.com>
12263
12264         * c-exp.y (variable production): Prefer ifunc minsyms over
12265         regular function symbols.
12266         * symtab.c (find_gnu_ifunc): New function.
12267         * minsyms.h (lookup_msym_prefer): New enum.
12268         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12269         parameter by a lookup_msym_prefer parameter.
12270         * symtab.h (find_gnu_ifunc): New declaration.
12271
12272 2018-04-26  Pedro Alves  <palves@redhat.com>
12273
12274         * blockframe.c (find_gnu_ifunc_target_type): New function.
12275         (find_function_type): New.
12276         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12277         return a value with a memory address.
12278         (eval_call): For calls to GNU ifunc functions, try to find the
12279         type of the target function from the type that the resolver
12280         returns.
12281         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12282         symbols.
12283         * infcall.c (find_function_return_type): Delete.
12284         (find_function_addr): Add 'function_type' parameter.  For calls to
12285         GNU ifunc functions, try to find the type of the target function
12286         from the type that the resolver returns, and return it via
12287         FUNCTION_TYPE.
12288         (call_function_by_hand_dummy): Adjust to use the function type
12289         returned by find_function_addr.
12290         (find_function_addr): Add 'function_type' parameter and move
12291         description here.
12292         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12293         declarations.
12294
12295 2018-04-26  Pedro Alves  <palves@redhat.com>
12296
12297         * c-exp.y (variable production): Skip finding an alias for ifunc
12298         symbols.
12299
12300 2018-04-26  Pedro Alves  <palves@redhat.com>
12301
12302         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12303
12304 2018-04-25  Pedro Alves  <palves@redhat.com>
12305
12306         * infcmd.c (kill_command): Print the pid as string, not the whole
12307         thread's ptid.  Add comment.  s/has been killed/killed/ in output
12308         message.
12309         * remote.c (remote_detach_1): Print the pid as string, not the
12310         whole thread's ptid.
12311
12312 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
12313             Sergio Durigan Junior  <sergiodj@redhat.com>
12314             Pedro Alves  <palves@redhat.com>
12315
12316         * infcmd.c (kill_command): Print message when inferior has
12317         been killed.
12318         * inferior.c (print_inferior_events): Remove 'static'.  Set as
12319         '1'.
12320         (add_inferior): Improve message printed when
12321         'print_inferior_events' is on.
12322         (exit_inferior): Remove message printed when
12323         'print_inferior_events' is on.
12324         (detach_inferior): Improve message printed when
12325         'print_inferior_events' is on.
12326         (initialize_inferiors): Use 'add_inferior_silent' to set
12327         'current_inferior_'.
12328         * inferior.h (print_inferior_events): Declare here as
12329         'extern'.
12330         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12331         '[Detaching...]' messages when 'print_inferior_events' is on.
12332         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
12333         as prefix/suffix for messages.  Remove periods.  Fix erroneous
12334         'Detaching after fork from child...', replace it by '... from
12335         parent...'.
12336         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12337         prefix/suffix when printing 'Detaching...' messages.  Print
12338         them when 'print_inferior_events' is on.
12339         * remote.c (remote_detach_1): Print message when detaching
12340         from inferior and '!is_fork_parent'.
12341
12342 2018-04-24  Tom Tromey  <tom@tromey.com>
12343
12344         * cli-out.h: Reindent.
12345
12346 2018-04-24  Tom Tromey  <tom@tromey.com>
12347
12348         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12349         (cli_ui_out::do_field_string): Use fputs_filtered.
12350         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12351
12352 2018-04-23  Tom Tromey  <tom@tromey.com>
12353
12354         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12355         gdb::unique_xmalloc_ptr.
12356
12357 2018-04-23  Tom Tromey  <tom@tromey.com>
12358
12359         * configure: Rebuild.
12360
12361 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12362
12363         PR gdb/23095
12364         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12365         prepare_for_testing.  Set normal_bp to r_debug_state if target
12366         is bsd.
12367
12368 2018-04-21  Pedro Alves  <palves@redhat.com>
12369             Rajendra SY  <rajendra.sy@gmail.com>
12370
12371         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12372         * remote.c (extended_remote_attach): In all-stop mode, mark the
12373         thread as executing.
12374
12375 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12376
12377         * thread.c (thread_apply_all_command): Fix comment.
12378         (thread_command): Fix comment.
12379
12380 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12381
12382         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12383         parameter.
12384         * features/aarch64-core.c (create_feature_aarch64_core):
12385         Regenerate.
12386         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12387         Likewise.
12388         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12389         Likewise.
12390         * features/i386/32bit-avx512.c
12391         (create_feature_i386_32bit_avx512): Likewise.
12392         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12393         Likewise.
12394         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12395         Likewise.
12396         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12397         Likewise.
12398         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12399         Likewise.
12400         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12401         Likewise.
12402         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12403         Likewise.
12404         * features/i386/64bit-avx512.c
12405         (create_feature_i386_64bit_avx512): Likewise.
12406         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12407         Likewise.
12408         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12409         Likewise.
12410         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12411         Likewise.
12412         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12413         Likewise.
12414         * features/i386/64bit-segments.c
12415         (create_feature_i386_64bit_segments): Likewise.
12416         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12417         Likewise.
12418         * features/i386/x32-core.c
12419         (create_feature_i386_x32_core): Likewise.
12420         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12421         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12422         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12423         * target-descriptions.c: In generated code, don't pass xml
12424         filename.
12425
12426 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12427
12428         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12429         (print_xml_feature::visit_post): Likewise.
12430         (print_xml_feature::visit): Likewise.
12431         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12432         (print_xml_feature): Add new class.
12433         * regformats/regdat.sh: Null xmltarget on feature targets.
12434         * target-descriptions.c (struct target_desc): Add xmltarget.
12435         (maintenance_check_tdesc_xml_convert): Add unittest function.
12436         (tdesc_get_features_xml): Add function to get xml.
12437         (maintenance_check_xml_descriptions): Test xml generation.
12438         * xml-tdesc.c (string_read_description_xml): Add function.
12439         * xml-tdesc.h (string_read_description_xml): Add declaration.
12440
12441 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12442
12443         * features/Makefile: Add feature marker to targets with new style
12444         target descriptions.
12445         * regformats/aarch64.dat: Regenerate.
12446         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12447         * regformats/i386/amd64-avx-linux.dat: Likewise.
12448         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12449         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12450         * regformats/i386/amd64-linux.dat: Likewise.
12451         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12452         * regformats/i386/amd64.dat: Likewise.
12453         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12454         * regformats/i386/i386-avx-linux.dat: Likewise.
12455         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12456         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12457         * regformats/i386/i386-linux.dat: Likewise.
12458         * regformats/i386/i386-mmx-linux.dat: Likewise.
12459         * regformats/i386/i386-mpx-linux.dat: Likewise.
12460         * regformats/i386/i386.dat: Likewise.
12461         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12462         * regformats/i386/x32-avx-linux.dat: Likewise.
12463         * regformats/i386/x32-linux.dat: Likewise.
12464         * regformats/tic6x-c62x-linux.dat: Likewise.
12465         * regformats/tic6x-c64x-linux.dat: Likewise.
12466         * regformats/tic6x-c64xp-linux.dat: Likewise.
12467         * regformats/regdat.sh: Parse feature marker.
12468
12469 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12470
12471         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12472         (tdesc_osabi_name): Likewise.
12473         * target-descriptions.c (tdesc_architecture_name): Add new
12474         function.
12475         (tdesc_osabi_name): Likewise.
12476
12477 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12478
12479         * common/tdesc.c (tdesc_predefined_type): Move to here.
12480         (tdesc_named_type): Likewise.
12481         (tdesc_create_vector): Likewise.
12482         (tdesc_create_struct): Likewise.
12483         (tdesc_set_struct_size): Likewise.
12484         (tdesc_create_union): Likewise.
12485         (tdesc_create_flags): Likewise.
12486         (tdesc_create_enum): Likewise.
12487         (tdesc_add_field): Likewise.
12488         (tdesc_add_typed_bitfield): Likewise.
12489         (tdesc_add_bitfield): Likewise.
12490         (tdesc_add_flag): Likewise.
12491         (tdesc_add_enum_value): Likewise.
12492         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12493         (struct tdesc_type_vector): Likewise.
12494         (struct tdesc_type_field): Likewise.
12495         (struct tdesc_type_with_fields): Likewise.
12496         (tdesc_create_enum): Add declaration.
12497         (tdesc_add_typed_bitfield): Likewise.
12498         (tdesc_add_enum_value): Likewise.
12499         * target-descriptions.c (tdesc_type_field): Move from here.
12500         (tdesc_type_builtin): Likewise.
12501         (tdesc_type_vector): Likewise.
12502         (tdesc_type_with_fields): Likewise.
12503         (tdesc_predefined_types): Likewise.
12504         (tdesc_named_type): Likewise.
12505         (tdesc_create_vector): Likewise.
12506         (tdesc_create_struct): Likewise.
12507         (tdesc_set_struct_size): Likewise.
12508         (tdesc_create_union): Likewise.
12509         (tdesc_create_flags): Likewise.
12510         (tdesc_create_enum): Likewise.
12511         (tdesc_add_field): Likewise.
12512         (tdesc_add_typed_bitfield): Likewise.
12513         (tdesc_add_bitfield): Likewise.
12514         (tdesc_add_flag): Likewise.
12515         (tdesc_add_enum_value): Likewise.
12516         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12517         (tdesc_add_typed_bitfield): Likewise.
12518         (tdesc_add_enum_value): Likewise.
12519
12520 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12521
12522         * common/tdesc.c (tdesc_feature::accept): Move to here.
12523         (tdesc_feature::operator==): Likewise.
12524         (tdesc_create_reg): Likewise.
12525         * common/tdesc.h (tdesc_type_kind): Likewise.
12526         (struct tdesc_type): Likewise.
12527         (struct tdesc_feature): Likewise.
12528         * regformats/regdat.sh: Create a feature.
12529         * target-descriptions.c (tdesc_type_kind): Move from here.
12530         (tdesc_type): Likewise.
12531         (tdesc_type_up): Likewise.
12532         (tdesc_feature): Likewise.
12533         (tdesc_create_reg): Likewise.
12534
12535 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12536
12537         * Makefile.in: Add arch/tdesc.c
12538         * common/tdesc.c: New file.
12539         * common/tdesc.h (tdesc_element_visitor): Move to here.
12540         (tdesc_element): Likewise.
12541         (tdesc_reg): Likewise.
12542         (tdesc_reg_up): Likewise.
12543         * regformats/regdef.h (reg): Add offset to constructors.
12544         * target-descriptions.c (tdesc_element_visitor): Move from here.
12545         (tdesc_element): Likewise.
12546         (tdesc_reg): Likewise.
12547         (tdesc_reg_up): Likewise.
12548
12549 2018-04-17  Tom Tromey  <tom@tromey.com>
12550
12551         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12552         discriminant field.
12553
12554 2018-04-17  Tom Tromey  <tom@tromey.com>
12555
12556         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12557
12558 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12559
12560         * symtab.c (print_symbol_info): Skip printing filename and line
12561         number when `last' is NULL.
12562         (symtab_symbol_info): Use empty string instead of NULL for first
12563         invocation of print_symbol_info.
12564         (rbreak_command): Pass NULL to `last' parameter of
12565         print_symbol_info.
12566
12567 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12568
12569         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12570         instead of nullptr.
12571
12572 2018-04-16  Pedro Alves  <palves@redhat.com>
12573
12574         * MAINTAINERS (sh): Remove.
12575         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12576         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12577         (ALLDEPFILES): Remove sh64-tdep.c.
12578         * NEWS: Mentions that support for SH-5/SH64 is removed.
12579         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12580         (sh*-*-openbsd*): Ditto.
12581         (sh64-*-elf*): Remove.
12582         (sh*): Remove.
12583         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12584         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12585         * sh-tdep.c: No longer include "sh64-tdep.h".
12586         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12587         * sh64-tdep.c, sh64-tdep.h: Remove files.
12588
12589 2018-04-16  Pedro Alves  <palves@redhat.com>
12590
12591         * MAINTAINERS: Remove m88k.
12592         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12593         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12594         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12595         * NEWS: Mention that support for m88k was removed.
12596         * configure.host (m88*-*-*): Remove support.
12597         * configure.nat (m88k-*-*): Remove support.
12598         * configure.tgt (m88*-*-openbsd*): Remove.
12599         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12600
12601 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12602
12603         * configure.tgt (x86_tobjs): New variable.
12604         (amd64_tobjs, i386_tobjs): Use it.
12605
12606 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12607
12608         * symtab.c (print_symbol_info): Precede the symbol definition by
12609         the line number when available.
12610         * NEWS: Advertise this enhancement.
12611
12612 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12613
12614         * NEWS (New options): announce set/show record btrace cpu.
12615         * btrace.c: Include record-btrace.h.
12616         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12617         the vendor is unknown.
12618         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12619         Maybe overwrite the btrace configuration's cpu.
12620         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12621         (btrace_fetch): Add cpu parameter.  Update callers.
12622         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12623         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12624         errata workarounds if the vendor is unknown.
12625         * python/py-record-btrace.c: Include record-btrace.h.
12626         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12627         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12628         * record-btrace.c (record_btrace_cpu_state_kind): New.
12629         (record_btrace_cpu): New.
12630         (set_record_btrace_cpu_cmdlist): New.
12631         (record_btrace_get_cpu): New.
12632         (require_btrace_thread, record_btrace_info)
12633         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12634         (cmd_set_record_btrace_cpu_none): New.
12635         (cmd_set_record_btrace_cpu_auto): New.
12636         (cmd_set_record_btrace_cpu): New.
12637         (cmd_show_record_btrace_cpu): New.
12638         (_initialize_record_btrace): Initialize set/show record btrace cpu
12639         commands.
12640         * record-btrace.h (record_btrace_get_cpu): New.
12641
12642 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12643
12644         * record.c (set_record_command): Fix typo in message.
12645
12646 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12647
12648         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12649
12650 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12651
12652         * infrun.c (process_event_stop_test): Call
12653         gdbarch_in_indirect_branch_thunk.
12654         * gdbarch.sh (in_indirect_branch_thunk): New.
12655         * gdbarch.c: Regenerated.
12656         * gdbarch.h: Regenerated.
12657         * x86-tdep.h: New.
12658         * x86-tdep.c: New.
12659         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12660         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12661         (ALLDEPFILES): Add x86-tdep.c.
12662         * arch-utils.h (default_in_indirect_branch_thunk): New.
12663         * arch-utils.c (default_in_indirect_branch_thunk): New.
12664         * i386-tdep: Include x86-tdep.h.
12665         (i386_in_indirect_branch_thunk): New.
12666         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12667         function.
12668         * amd64-tdep: Include x86-tdep.h.
12669         (amd64_in_indirect_branch_thunk): New.
12670         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12671
12672 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12673
12674         PR gdb/23053
12675         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12676         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12677         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12678         regression.
12679
12680 2018-04-12  Tom Tromey  <tom@tromey.com>
12681
12682         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12683         (rust_evaluate_subexp): Likewise.
12684
12685 2018-04-12  Pedro Alves  <palves@redhat.com>
12686
12687         * procfs.c (procfs_detach): Make forward declaration's prototype
12688         match definition's protototype.
12689         (proc_get_LDT_entry): Remove stale do_cleanups call.
12690
12691 2018-04-12  Pedro Alves  <palves@redhat.com>
12692
12693         * target.h (target_ops::to_has_exited): Delete.
12694         (target_has_exited): Delete.
12695         * target-delegates.c: Regenerate.
12696
12697 2018-04-11  Pedro Alves  <palves@redhat.com>
12698
12699         * target.c (fileio_fh_t::t): Add comment.
12700         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12701         (target_fileio_close): Handle a NULL target.
12702         (invalidate_fileio_fh): New.
12703         (target_close): Call it.
12704         * remote.c (remote_hostio_send_command): No longer check whether
12705         remote_desc is open.
12706
12707 2018-04-11  Pedro Alves  <palves@redhat.com>
12708
12709         * target.c (fileio_fh_t): Make it a named struct instead of a
12710         typedef.
12711         (fileio_fh_t::is_closed): New method.
12712         (DEF_VEC_O (fileio_fh_t)): Remove.
12713         (fileio_fhandles): Now a std::vector.
12714         (is_closed_fileio_fh): Delete.
12715         (acquire_fileio_fd): Adjust.  Rename parameters.
12716         (release_fileio_fd): Adjust.
12717         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12718         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12719         (target_fileio_close): Adjust.
12720
12721 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12722
12723         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12724         index.
12725
12726 2018-04-10  Pedro Alves  <palves@redhat.com>
12727
12728         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12729         (scoped_finish_thread_state): New class.
12730         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12731         cleanup.
12732         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12733         (fetch_inferior_event, normal_stop): Likewise.
12734         * thread.c (finish_thread_state_cleanup): Delete.
12735
12736 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12737             Pedro Alves  <palves@redhat.com>
12738
12739         * value.c: Include "selftest.h" and "common/array-view.h".
12740         (struct range) <operator ==>: New.
12741         (test_ranges_contain): New.
12742         (check_ranges_vector): New.
12743         (test_insert_into_bit_range_vector): New.
12744         (_initialize_values): Register selftests.
12745         * common/array-view.h (operator==, operator!=): New.
12746
12747 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12748
12749         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12750         an iterator.
12751         * inline-frame.c: Include <algorithm>.
12752         (struct inline_state): Add constructor.
12753         (inline_state_s): Remove.
12754         (DEF_VEC_O(inline_state_s)): Remove.
12755         (inline_states): Change type to std::vector.
12756         (find_inline_frame_state): Adjust to std::vector.
12757         (allocate_inline_frame_state): Remove.
12758         (clear_inline_frame_state): Adjust to std::vector.
12759         (skip_inline_frames): Adjust to std::vector.
12760
12761 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12762
12763         * tracepoint.h (struct trace_state_variable): Add constructor.
12764         <name>: Change type to std::string.
12765         * tracepoint.c (tsv_s): Remove.
12766         (DEF_VEC_O(tsv_s)): Remove.
12767         (tvariables): Change to std::vector.
12768         (create_trace_state_variable): Adjust to std::vector.
12769         (find_trace_state_variable): Likewise.
12770         (find_trace_state_variable_by_number): Likewise.
12771         (delete_trace_state_variable): Likewise.
12772         (trace_variable_command): Adjust to std::string.
12773         (delete_trace_variable_command): Likewise.
12774         (tvariables_info_1): Adjust to std::vector.
12775         (save_trace_state_variables): Likewise.
12776         (start_tracing): Likewise.
12777         (merge_uploaded_trace_state_variables): Adjust to std::vector
12778         and std::string.
12779         * target.h (struct target_ops)
12780         <to_download_trace_state_variable>: Pass reference to
12781         trace_state_variable.
12782         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12783         * target-delegates.c: Re-generate.
12784         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12785         (mi_tsv_deleted): Likewise.
12786         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12787         * remote.c (remote_download_trace_state_variable): Change
12788         pointer to reference and adjust.
12789         * make-target-delegates (parse_argtypes): Handle references.
12790         (write_function_header): Likewise.
12791         (munge_type): Likewise.
12792
12793 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12794
12795         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12796         string_view-selftests.c.
12797         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12798         testsuite.
12799         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12800         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12801         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12802         * unittests/basic_string_view/element_access/char/1.cc:
12803         Likewise.
12804         * unittests/basic_string_view/element_access/char/empty.cc:
12805         Likewise.
12806         * unittests/basic_string_view/element_access/char/front_back.cc:
12807         Likewise.
12808         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12809         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12810         Likewise.
12811         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12812         Likewise.
12813         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12814         Likewise.
12815         * unittests/basic_string_view/operations/compare/char/1.cc:
12816         Likewise.
12817         * unittests/basic_string_view/operations/compare/char/13650.cc:
12818         Likewise.
12819         * unittests/basic_string_view/operations/copy/char/1.cc:
12820         Likewise.
12821         * unittests/basic_string_view/operations/data/char/1.cc:
12822         Likewise.
12823         * unittests/basic_string_view/operations/find/char/1.cc:
12824         Likewise.
12825         * unittests/basic_string_view/operations/find/char/2.cc:
12826         Likewise.
12827         * unittests/basic_string_view/operations/find/char/3.cc:
12828         Likewise.
12829         * unittests/basic_string_view/operations/find/char/4.cc:
12830         Likewise.
12831         * unittests/basic_string_view/operations/rfind/char/1.cc:
12832         Likewise.
12833         * unittests/basic_string_view/operations/rfind/char/2.cc:
12834         Likewise.
12835         * unittests/basic_string_view/operations/rfind/char/3.cc:
12836         Likewise.
12837         * unittests/basic_string_view/operations/substr/char/1.cc:
12838         Likewise.
12839         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12840         * unittests/string_view-selftests.c: New file.
12841
12842 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12843
12844         * unittests/basic_string_view/capacity/1.cc: New file.
12845         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12846         * unittests/basic_string_view/cons/char/1.cc: New file.
12847         * unittests/basic_string_view/cons/char/2.cc: New file.
12848         * unittests/basic_string_view/cons/char/3.cc: New file.
12849         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12850         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12851         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12852         * unittests/basic_string_view/element_access/char/1.cc: New file.
12853         * unittests/basic_string_view/element_access/char/2.cc: New file.
12854         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12855         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12856         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12857         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12858         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12859         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12860         * unittests/basic_string_view/include.cc: New file.
12861         * unittests/basic_string_view/inserters/char/1.cc: New file.
12862         * unittests/basic_string_view/inserters/char/2.cc: New file.
12863         * unittests/basic_string_view/inserters/char/3.cc: New file.
12864         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12865         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12866         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12867         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12868         * unittests/basic_string_view/literals/types.cc: New file.
12869         * unittests/basic_string_view/literals/values.cc: New file.
12870         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12871         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12872         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12873         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12874         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12875         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12876         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12877         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12878         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12879         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12880         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12881         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12882         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12883         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12884         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12885         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12886         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12887         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12888         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12889         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12890         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12891         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12892         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12893         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12894         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12895         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12896         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12897         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12898         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12899         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12900         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12901         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12902         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12903         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12904         * unittests/basic_string_view/operators/char/2.cc: New file.
12905         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12906         * unittests/basic_string_view/range_access/char/1.cc: New file.
12907         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12908         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12909         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12910         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12911         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12912         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12913         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12914         * unittests/basic_string_view/typedefs.cc: New file.
12915         * unittests/basic_string_view/types/1.cc: New file.
12916
12917 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12918
12919         * common/gdb_string_view.h: Remove libstdc++ implementation
12920         details, adjust to gdb reality.
12921         * common/gdb_string_view.tcc: Likewise.
12922         * cli/cli-script.c (struct string_view): Remove.
12923         (user_args) <m_args>: Change element type to gdb::string_view.
12924         (user_args::insert_args): Adjust.
12925
12926 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12927
12928         * common/gdb_string_view.h: New file.
12929         * common/gdb_string_view.tcc: New file.
12930
12931 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12932
12933         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12934         * configure: Re-generate.
12935
12936 2018-04-09  Pedro Alves  <palves@redhat.com>
12937
12938         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12939         (set_target_gdbarch): Call
12940         gdb::observers::architecture_changed.notify instead of
12941         observer_notify_architecture_changed.
12942
12943 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12944
12945         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12946         (do_restore_current_traceframe_cleanup): Remove.
12947         (restore_current_traceframe_cleanup_dtor): Remove.
12948         (make_cleanup_restore_current_traceframe): Remove.
12949         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12950         New.
12951         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12952         * infrun.c (fetch_inferior_event): Use
12953         scoped_restore_current_traceframe.
12954
12955 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12956
12957         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12958         Remove.
12959         <n_allocated_type_units>: Remove.
12960         <all_type_units>: Change to std::vector.
12961         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12962         to std::vector change.
12963         (dwarf2_per_objfile::get_cutu): Likewise.
12964         (dwarf2_per_objfile::get_tu): Likewise.
12965         (create_signatured_type_table_from_index): Likewise.
12966         (create_signatured_type_table_from_debug_names): Likewise.
12967         (dw2_symtab_iter_next): Likewise.
12968         (dw2_print_stats): Likewise.
12969         (dw2_expand_all_symtabs): Likewise.
12970         (dw2_expand_marked_cus): Likewise.
12971         (dw2_debug_names_iterator::next): Likewise.
12972         (dwarf2_initialize_objfile): Likewise.
12973         (add_signatured_type_cu_to_table): Likewise.
12974         (create_all_type_units): Likewise.
12975         (add_type_unit): Likewise.
12976         (struct tu_abbrev_offset): Add constructor.
12977         (build_type_psymtabs_1): Adjust to std::vector change.
12978         (print_tu_stats): Likewise.
12979         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12980         (write_debug_names): Likewise.
12981
12982 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12983
12984         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12985         Make an std::vector.
12986         <n_comp_units>: Remove.
12987         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12988         to std::vector change.
12989         (dwarf2_per_objfile::get_cutu): Likewise.
12990         (dwarf2_per_objfile::get_cu): Likewise.
12991         (create_cus_from_index): Likewise.
12992         (create_addrmap_from_index): Likewise.
12993         (create_addrmap_from_aranges): Likewise.
12994         (dwarf2_read_index): Likewise.
12995         (dw2_find_last_source_symtab): Likewise.
12996         (dw2_map_symtabs_matching_filename): Likewise.
12997         (dw2_symtab_iter_next): Likewise.
12998         (dw2_print_stats): Likewise.
12999         (dw2_expand_all_symtabs): Likewise.
13000         (dw2_expand_symtabs_with_fullname): Likewise.
13001         (dw2_expand_marked_cus): Likewise.
13002         (dw2_map_symbol_filenames): Likewise.
13003         (create_cus_from_debug_names): Likewise.
13004         (dwarf2_read_debug_names): Likewise.
13005         (dw2_debug_names_iterator::next): Likewise.
13006         (dwarf2_initialize_objfile): Likewise.
13007         (set_partial_user): Likewise.
13008         (dwarf2_build_psymtabs_hard): Likewise.
13009         (read_comp_units_from_section): Remove arguments, adjust to
13010         std::vector change.
13011         (create_all_comp_units): Adjust to std::vector and
13012         read_comp_units_from_section changes.
13013         (dwarf2_find_containing_comp_unit): Adjust to std::vector
13014         change.
13015         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13016         (psyms_seen_size): Likewise.
13017         (write_gdbindex): Likewise.
13018         (write_debug_names): Likewise.
13019
13020 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13021
13022         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13023         with dwarf2_per_objfile.
13024         (create_cus_from_index): Likewise.
13025         (create_signatured_type_table_from_index): Likewise.
13026         (dwarf2_read_index): Likewise.
13027         (dwarf2_initialize_objfile): Likewise.
13028         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
13029         per_cu rather than get_dwarf2_per_objfile.
13030
13031 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13032
13033         * dwarf2read.h (struct signatured_type): Forward declare.
13034         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13035         New methods.
13036         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13037         (dw2_get_cutu): ...this.
13038         (dwarf2_per_objfile::get_cu): Rename from...
13039         (dw2_get_cu): ...this.
13040         (dwarf2_per_objfile::get_tu): New.
13041         (create_addrmap_from_index): Adjust.
13042         (create_addrmap_from_aranges): Adjust.
13043         (dw2_find_last_source_symtab): Adjust.
13044         (dw2_map_symtabs_matching_filename): Adjust.
13045         (dw2_symtab_iter_next): Adjust.
13046         (dw2_print_stats): Adjust.
13047         (dw2_expand_all_symtabs): Adjust.
13048         (dw2_expand_symtabs_with_fullname): Adjust.
13049         (dw2_expand_marked_cus): Adjust.
13050         (dw_expand_symtabs_matching_file_matcher): Adjust.
13051         (dw2_map_symbol_filenames): Adjust.
13052         (dw2_debug_names_iterator::next): Adjust.
13053         (dwarf2_initialize_objfile): Adjust.
13054         (set_partial_user): Adjust.
13055         (dwarf2_build_psymtabs_hard): Adjust.
13056
13057 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13058
13059         * dwarf2read.c (create_signatured_type_table_from_debug_names):
13060         Remove unused variables.
13061         (dw2_map_symtabs_matching_filename): Likewise.
13062         (dwarf2_record_block_ranges): Likewise.
13063         (dwarf2_read_addr_index): Likewise.
13064         (follow_die_offset): Likewise.
13065
13066 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13067
13068         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13069         to symbol_file_add_main.
13070
13071 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13072
13073         PR mi/22299
13074         * mi/mi-console.c (do_fputc_async_safe): New.
13075         (mi_console_file::write_async_safe): New.
13076         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13077         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13078         New.
13079         * ui-file.c (ui_file::putstrn): Adjust call to
13080         fputstrn_unfiltered.
13081         * utils.c (printchar): Replace do_fputs and do_fprintf
13082         parameters by do_fputc.
13083         (fputstr_filtered): Adjust call to printchar.
13084         (fputstr_unfiltered): Likewise.
13085         (fputstrn_filtered): Likewise.
13086         (fputstrn_unfiltered): Add do_fputc parameter, pass to
13087         printchar.
13088         * utils.h (do_fputc_ftype): New typedef.
13089         (fputstrn_unfiltered): Add do_fputc parameter.
13090
13091 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13092
13093         * regformats/i386/i386-avx.dat: Remove.
13094
13095 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13096
13097         PR gdb/22979
13098         * amd64-tdep.c (amd64_none_init_abi): New function.
13099         (amd64_x32_none_init_abi): New function.
13100         (_initialize_amd64_tdep): Register handlers for x86-64 and
13101         x64_32 with GDB_OSABI_NONE.
13102         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13103         GDB_OSABI_NONE osabi.
13104
13105 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13106
13107         PR gdb/22980
13108         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13109         GDB_OSABI_NONE.
13110         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13111         * osabi.c (gdb_osabi_names): Add "unknown" entry.
13112
13113 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13114
13115         * common/byte-vector.h (char_vector): New type.
13116         * target.h (target_read_alloc): Return
13117         gdb::optional<byte_vector>.
13118         (target_read_stralloc): Return gdb::optional<char_vector>.
13119         (target_get_osdata): Return gdb::optional<char_vector>.
13120         * target.c (target_read_alloc_1): Templatize.  Replacement
13121         manual memory management with vector.
13122         (target_read_alloc): Change return type, adjust.
13123         (target_read_stralloc): Change return type, adjust.
13124         (target_get_osdata): Change return type, adjust.
13125         * auxv.c (struct auxv_info) <length>: Remove.
13126         <data>: Change type to gdb::optional<byte_vector>.
13127         (auxv_inferior_data_cleanup): Free auxv_info with delete.
13128         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13129         (target_auxv_search): Adjust.
13130         (fprint_target_auxv): Adjust.
13131         * avr-tdep.c (avr_io_reg_read_command): Adjust.
13132         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13133         (linux_make_corefile_notes): Adjust.
13134         * osdata.c (get_osdata): Adjust.
13135         * remote.c (remote_get_threads_with_qxfer): Adjust.
13136         (remote_memory_map): Adjust.
13137         (remote_traceframe_info): Adjust.
13138         (btrace_read_config): Adjust.
13139         (remote_read_btrace): Adjust.
13140         (remote_pid_to_exec_file): Adjust.
13141         * solib-aix.c (solib_aix_get_library_list): Adjust.
13142         * solib-dsbt.c (decode_loadmap): Don't free buf.
13143         (dsbt_get_initial_loadmaps): Adjust.
13144         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13145         * solib-target.c (solib_target_current_sos): Adjust.
13146         * tracepoint.c (sdata_make_value): Adjust.
13147         * xml-support.c (xinclude_start_include): Adjust.
13148         (xml_fetch_content_from_file): Adjust.
13149         * xml-support.h (xml_fetch_another): Change return type.
13150         (xml_fetch_content_from_file): Change return type.
13151         * xml-syscall.c (xml_init_syscalls_info): Adjust.
13152         * xml-tdesc.c (file_read_description_xml): Adjust.
13153         (fetch_available_features_from_target): Change return type.
13154         (target_fetch_description_xml): Adjust.
13155         (target_read_description_xml): Adjust.
13156
13157 2018-04-06  Tom Tromey  <tom@tromey.com>
13158
13159         * value.c (~value): Update.
13160         (struct value) <contents>: Now unique_xmalloc_ptr.
13161         (value_contents_bits_eq, allocate_value_contents)
13162         (value_contents_raw, value_contents_all_raw)
13163         (value_contents_for_printing, value_contents_for_printing_const)
13164         (set_value_enclosing_type): Update.
13165
13166 2018-04-06  Tom Tromey  <tom@tromey.com>
13167
13168         * value.c (range_s): Remove typedef, VEC.
13169         (struct range): Add operator<.
13170         (range_lessthan): Remove.
13171         (ranges_contain): Change type.
13172         (~value): Update.
13173         (struct value) <unavailable, optimized_out>: Now std::vector.
13174         (value_entirely_available)
13175         (value_entirely_covered_by_range_vector)
13176         (value_entirely_unavailable, value_entirely_optimized_out):
13177         Update.
13178         (insert_into_bit_range_vector): Change argument type.
13179         (find_first_range_overlap): Likewise.
13180         (struct ranges_and_idx, value_contents_bits_eq)
13181         (require_not_optimized_out, require_available): Update.
13182         (ranges_copy_adjusted): Change argument types.
13183         (value_optimized_out, value_copy, value_fetch_lazy): Update.
13184
13185 2018-04-06  Tom Tromey  <tom@tromey.com>
13186
13187         * value.c (~value): Update.
13188         (struct value) <parent>: Now a value_ref_ptr.
13189         (value_parent, set_value_parent, value_address, value_copy):
13190         Update.
13191
13192 2018-04-06  Tom Tromey  <tom@tromey.com>
13193
13194         * value.c (struct value): Add constructor, destructor, and member
13195         initializers.
13196         (allocate_value_lazy, value_decref): Update.
13197
13198 2018-04-06  Tom Tromey  <tom@tromey.com>
13199
13200         * value.c (struct value) <released, next>: Remove.
13201         (all_values): Now a std::vector.
13202         (allocate_value_lazy): Update.
13203         (value_next): Remove.
13204         (value_mark, value_free_to_mark, release_value)
13205         (value_release_to_mark): Update.
13206
13207 2018-04-06  Tom Tromey  <tom@tromey.com>
13208
13209         * value.h (fetch_subexp_value, value_release_to_mark): Update.
13210         (free_value_chain): Remove.
13211         * value.c (free_value_chain): Remove.
13212         (value_release_to_mark): Return a std::vector.
13213         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13214         std::vector.
13215         (check_condition): Update.
13216         * eval.c (fetch_subexp_value): Change "val_chain" to a
13217         std::vector.
13218         * breakpoint.c (update_watchpoint): Update.
13219         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13220
13221 2018-04-06  Tom Tromey  <tom@tromey.com>
13222
13223         * value.h (free_all_values): Remove.
13224         * value.c (free_all_values): Remove.
13225
13226 2018-04-06  Tom Tromey  <tom@tromey.com>
13227
13228         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13229         (value_history_chain, value_history_count): Remove.
13230         (value_history): New global.
13231         (record_latest_value, access_value_history, show_values)
13232         (preserve_values): Update.
13233
13234 2018-04-06  Tom Tromey  <tom@tromey.com>
13235
13236         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13237         * varobj.c (varobj_set_display_format, varobj_set_value)
13238         (install_default_visualizer, construct_visualizer)
13239         (install_new_value, ~varobj, varobj_get_value_type)
13240         (my_value_of_variable, varobj_editable_p): Update.
13241         * c-varobj.c (c_describe_child, c_value_of_variable)
13242         (cplus_number_of_children, cplus_describe_child): Update.
13243         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13244         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13245         (ada_value_of_variable, ada_value_is_changeable_p): Update.
13246
13247 2018-04-06  Tom Tromey  <tom@tromey.com>
13248
13249         * printcmd.c (last_examine_address): Change type to
13250         value_ref_ptr.
13251         (do_examine, x_command): Update.
13252
13253 2018-04-06  Tom Tromey  <tom@tromey.com>
13254
13255         * value.c (release_value): Update.
13256         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13257         (struct bpstats) <val>: Now a value_ref_ptr.
13258         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13259         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13260         (~watchpoint, print_it_watchpoint, watch_command_1)
13261         (invalidate_bp_value_on_memory_change): Update.
13262
13263 2018-04-06  Tom Tromey  <tom@tromey.com>
13264
13265         * varobj.c (varobj_clear_saved_item)
13266         (update_dynamic_varobj_children, install_new_value, ~varobj):
13267         Update.
13268         * value.h (value_incref): Move declaration earlier.
13269         (value_decref): Rename from value_free.
13270         (struct value_ref_policy): New.
13271         (value_ref_ptr): New typedef.
13272         (struct value_deleter): Remove.
13273         (gdb_value_up): Remove typedef.
13274         (release_value): Change return type.
13275         (release_value_or_incref): Remove.
13276         * value.c (set_value_parent): Update.
13277         (value_incref): Change return type.
13278         (value_decref): Rename from value_free.
13279         (value_free_to_mark, free_all_values, free_value_chain): Update.
13280         (release_value): Return value_ref_ptr.
13281         (release_value_or_incref): Remove.
13282         (record_latest_value, set_internalvar, clear_internalvar):
13283         Update.
13284         * stack.c (info_frame_command): Don't call value_free.
13285         * python/py-value.c (valpy_dealloc, valpy_new)
13286         (value_to_value_object): Update.
13287         * printcmd.c (do_examine): Update.
13288         * opencl-lang.c (lval_func_free_closure): Update.
13289         * mi/mi-main.c (register_changed_p): Don't call value_free.
13290         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13291         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13292         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13293         value_free.
13294         * guile/scm-value.c (vlscm_free_value_smob)
13295         (vlscm_scm_from_value): Update.
13296         * frame.c (frame_register_unwind, frame_unwind_register_signed)
13297         (frame_unwind_register_unsigned, get_frame_register_bytes)
13298         (put_frame_register_bytes): Don't call value_free.
13299         * findvar.c (address_from_register): Don't call value_free.
13300         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13301         * dwarf2loc.c (entry_data_value_free_closure)
13302         (value_of_dwarf_reg_entry, free_pieced_value_closure)
13303         (dwarf2_evaluate_loc_desc_full): Update.
13304         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13305         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13306         (~watchpoint, watch_command_1)
13307         (invalidate_bp_value_on_memory_change): Update.
13308         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13309
13310 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
13311
13312         PR gdb/23022
13313         * warning.m4: Add -Wno-error=deprecated-register.
13314         * configure: Re-generate.
13315
13316 2018-04-05  Tom Tromey  <tom@tromey.com>
13317
13318         * linespec.h: Remove include of "vec.h".
13319
13320 2018-04-05  Tom Tromey  <tom@tromey.com>
13321
13322         * linespec.c (typep): Remove typedef.
13323         (find_methods, find_superclass_methods): Take a std::vector.
13324         (find_method): Use std::vector.
13325
13326 2018-04-05  Tom Tromey  <tom@tromey.com>
13327
13328         * utils.c (compare_strings): Remove.
13329         * utils.h (compare_strings): Remove.
13330         * objc-lang.h (find_imps): Update.
13331         * objc-lang.c (find_methods): Take a std::vector.
13332         (uniquify_strings, find_imps): Likewise.
13333         * linespec.c (find_methods): Take a std::vector.
13334         (decode_objc): Use std::vector.
13335         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13336         a std::vector.
13337         (find_method, find_function_symbols): Use std::vector.
13338
13339 2018-04-05  Tom Tromey  <tom@tromey.com>
13340
13341         * completer.c (completion_tracker::completion_tracker): Remove
13342         cast.
13343         (completion_tracker::discard_completions): Likewise.
13344         * breakpoint.c (ambiguous_names_p): Remove cast.
13345         * ada-lang.c (_initialize_ada_language): Remove cast.
13346         * utils.h (streq): Update.
13347         (streq_hash): Add new declaration.
13348         * utils.c (streq): Return bool.
13349         (streq_hash): New function.
13350
13351 2018-04-05  Tom Tromey  <tom@tromey.com>
13352
13353         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13354         Remove a string copy.
13355
13356 2018-04-05  Tom Tromey  <tom@tromey.com>
13357
13358         * linespec.c (filter_results): Use std::vector.
13359         (decode_line_2, decode_line_full): Update.
13360
13361 2018-04-05  Tom Tromey  <tom@tromey.com>
13362
13363         * linespec.c (canonical_to_fullform): Return std::string.
13364         (filter_results): Update.
13365         (struct decode_line_2_item): Add constructor.
13366         <fullform, displayform>: Now std::string.
13367         (decode_line_2_compare_items): Now a std::sort comparator.
13368         (decode_line_2): Update.
13369
13370 2018-04-05  Tom Tromey  <tom@tromey.com>
13371
13372         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13373         (unexpected_linespec_error): Update.
13374         (linespec_parse_basic, parse_linespec): Update.
13375
13376 2018-04-05  Tom Tromey  <tom@tromey.com>
13377
13378         * linespec.c (linespec_parse_basic): Reindent.
13379
13380 2018-04-05  Tom Tromey  <tom@tromey.com>
13381
13382         * minsyms.h (iterate_over_minimal_symbols): Update.
13383         * minsyms.c (iterate_over_minimal_symbols): Take a
13384         gdb::function_view.
13385         * linespec.c (struct collect_minsyms): Remove.
13386         (compare_msyms): Now a std::sort comparator.
13387         (add_minsym): Add parameters.
13388         (search_minsyms_for_name): Update.  Use std::vector.
13389
13390 2018-04-03  Tom Tromey  <tom@tromey.com>
13391
13392         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13393         gdb::byte_vector.
13394
13395 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13396
13397         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13398
13399 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13400
13401         PR gdb/16959
13402         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13403         printing static type.
13404
13405 2018-04-01  Tom Tromey  <tom@tromey.com>
13406
13407         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13408         (rs6000_xfer_shared_libraries): Update.
13409
13410 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13411
13412         * common/gdb_vecs.h (char_ptr): Remove.
13413         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13414
13415 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13416
13417         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13418         with std::vector.
13419         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13420
13421 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13422
13423         * tracepoint.h (struct uploaded_tp): Initialize fields.
13424         <actions, step_actions, cmd_strings>: Change type to
13425         std::vector<char *>.
13426         * tracepoint.c (get_uploaded_tp): Allocate with new.
13427         (free_uploaded_tps): Free with delete.
13428         (parse_tracepoint_definition): Adjust to std::vector change.
13429         * breakpoint.c (read_uploaded_action): Likewise.
13430         (create_tracepoint_from_upload): Likewise.
13431         * ctf.c (ctf_write_uploaded_tp): Likewise.
13432         (SET_ARRAY_FIELD): Likewise.
13433         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13434
13435 2018-03-30  Tom Tromey  <tom@tromey.com>
13436
13437         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13438         std::unique_ptr.
13439         (svr4_keep_data_in_core): Update.
13440         (svr4_read_so_list): Update.
13441
13442 2018-03-30  Tom Tromey  <tom@tromey.com>
13443
13444         * windows-nat.c (handle_output_debug_string, handle_exception):
13445         Update.
13446         * target.h (target_read_string): Update.
13447         * target.c (target_read_string): Change "string" to
13448         unique_xmalloc_ptr.
13449         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13450         Update.
13451         * solib-frv.c (frv_current_sos): Update.
13452         * solib-dsbt.c (dsbt_current_sos): Update.
13453         * solib-darwin.c (darwin_current_sos): Update.
13454         * linux-thread-db.c (inferior_has_bug): Update.
13455         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13456         Update.  Remove alloca.
13457         * ada-lang.c (ada_main_name): Update.
13458
13459 2018-03-30  Tom Tromey  <tom@tromey.com>
13460
13461         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13462         (struct dwo_file_deleter): New.
13463         (dwo_file_up): New typedef.
13464         (open_and_init_dwo_file): Use dwo_file_up.
13465         (free_dwo_file_cleanup): Remove.
13466
13467 2018-03-30  Tom Tromey  <tom@tromey.com>
13468
13469         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13470         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13471
13472 2018-03-30  Tom Tromey  <tom@tromey.com>
13473
13474         * dwarf2read.c (class free_cached_comp_units): New class.
13475         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13476         (free_cached_comp_units): Remove function.
13477
13478 2018-03-30  Tom Tromey  <tom@tromey.com>
13479
13480         * utils.h (make_cleanup_unpush_target): Remove.
13481         * inf-ptrace.c (struct target_unpusher): New.
13482         (target_unpush_up) New typedef.
13483         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13484         target_unpush_up.
13485         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13486
13487 2018-03-27  Tom Tromey  <tom@tromey.com>
13488
13489         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13490
13491 2018-03-27  Pedro Alves  <palves@redhat.com>
13492             Tom Tromey  <tom@tromey.com>
13493
13494         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13495         destructor.  Now a class.
13496         (gdb_readline_wrapper_cleanup): Remove function.
13497         (gdb_readline_wrapper): Remove cleanups.
13498
13499 2018-03-27  Tom Tromey  <tom@tromey.com>
13500
13501         * typeprint.h (struct type_print_options) <local_typedefs,
13502         global_typedefs>: Remove "struct" keyword.
13503         (class typedef_hash_table): New class.
13504         (recursively_update_typedef_hash, add_template_parameters)
13505         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13506         (find_typedef_in_hash): Don't declare.
13507         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13508         (typedef_hash_table::recursively_update): Rename from
13509         recursively_update_typedef_hash.  Now a member.
13510         (typedef_hash_table::add_template_parameters): Rename from
13511         add_template_parameters.  Now a member.
13512         (typedef_hash_table::typedef_hash_table): Now a constructor;
13513         rename from create_typedef_hash.
13514         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13515         rename from free_typedef_hash.
13516         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13517         (do_free_global_table): Remove.
13518         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13519         from copy_type_recursive.
13520         (create_global_typedef_table): Remove.
13521         (typedef_hash_table::find_global_typedef): Now a member of
13522         typedef_hash_table.
13523         (typedef_hash_table::find_typedef): Rename from
13524         find_typedef_in_hash; now a member.
13525         (whatis_exp): Update.
13526         * extension.h (struct ext_lang_type_printers): Add constructor and
13527         destructor.
13528         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13529         declare.
13530         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13531         Now a constructor; rename from start_ext_lang_type_printers.
13532         (ext_lang_type_printers): Now a destructor; rename from
13533         free_ext_lang_type_printers.
13534         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13535         Update.
13536         (c_type_print_base_struct_union): Update.  Remove cleanups.
13537
13538 2018-03-27  Tom Tromey  <tom@tromey.com>
13539
13540         * dwarf-index-write.c: Include <cmath>.
13541
13542 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13543
13544         * NEWS: Add entry describing new "set|show varsize-limit" command.
13545         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13546         command.
13547         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13548         "set variable".
13549
13550 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13551
13552         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13553         dwarf-index-write.c
13554         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13555         * dwarf-index-common.c: New file.
13556         * dwarf-index-common.h: New file.
13557         * dwarf-index-write.c: New file.
13558         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13559         (struct dwarf2_section_info): Move from here.
13560         (dwarf2_section_info_def): Likewise.
13561         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13562         (offset_type): Likewise.
13563         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13564         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13565         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13566         (byte_swap): Likewise.
13567         (MAYBE_SWAP): Likewise.
13568         (dwarf2_per_cu_ptr): Likewise.
13569         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13570         (struct tu_stats): Likewise.
13571         (struct dwarf2_per_objfile): Likewise.
13572         (struct dwarf2_per_cu_data): Likewise.
13573         (struct signatured_type): Likewise.
13574         (sig_type_ptr): Likewise.
13575         (DEF_VEC_P (sig_type_ptr)): Likewise.
13576         (INDEX4_SUFFIX): Likewise.
13577         (INDEX5_SUFFIX): Likewise.
13578         (DEBUG_STR_SUFFIX): Likewise.
13579         (dwarf2_read_section): Make non-static.
13580         (mapped_index_string_hash): Move from here.
13581         (dwarf5_djb_hash): Likewise.
13582         (file_write): Likewise.
13583         (class data_buf): Likewise.
13584         (struct symtab_index_entry): Likewise.
13585         (struct mapped_symtab): Likewise.
13586         (find_slot): Likewise.
13587         (hash_expand): Likewise.
13588         (add_index_entry): Likewise.
13589         (uniquify_cu_indices): Likewise.
13590         (class c_str_view): Likewise.
13591         (class c_str_view_hasher): Likewise.
13592         (class vector_hasher): Likewise.
13593         (write_hash_table): Likewise.
13594         (psym_index_map): Likewise.
13595         (struct addrmap_index_data): Likewise.
13596         (add_address_entry): Likewise.
13597         (add_address_entry_worker): Likewise.
13598         (write_address_map): Likewise.
13599         (symbol_kind): Likewise.
13600         (write_psymbols): Likewise.
13601         (struct signatured_type_index_data): Likewise.
13602         (write_one_signatured_type): Likewise.
13603         (recursively_count_psymbols): Likewise.
13604         (recursively_write_psymbols): Likewise.
13605         (class debug_names): Likewise.
13606         (check_dwarf64_offsets): Likewise.
13607         (psyms_seen_size): Likewise.
13608         (write_gdbindex): Likewise.
13609         (write_debug_names): Likewise.
13610         (assert_file_size): Likewise.
13611         (write_psymtabs_to_index): Likewise.
13612         (save_gdb_index_command): Likewise.
13613         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13614         command.
13615         * dwarf2read.h: New file.
13616
13617 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13618
13619         PR gdb/22670
13620         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13621         symbol name if the CU's language stores symbol names in linkage
13622         format.
13623         * language.h (struct language_defn)
13624         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13625         all instances of this struct.
13626
13627 2018-03-26  Tom Tromey  <tom@tromey.com>
13628
13629         * stack.c (backtrace_command_1): Remove verbose code.
13630
13631 2018-03-26  Tom Tromey  <tom@tromey.com>
13632
13633         * python/py-framefilter.c (py_print_type): Don't catch
13634         exceptions.  Return void.
13635         (py_print_value): Likewise.
13636         (py_print_single_arg): Likewise.
13637         (enumerate_args): Don't catch exceptions.
13638         (py_print_args): Likewise.
13639         (py_print_frame): Likewise.
13640         (gdbpy_apply_frame_filter): Catch exceptions here.
13641
13642 2018-03-26  Tom Tromey  <tom@tromey.com>
13643
13644         * stack.c (_initialize_stack): Remove trailing newlines from help
13645         text.  Add "Usage" line to "backtrace" help.
13646
13647 2018-03-26  Tom Tromey  <tom@tromey.com>
13648
13649         PR python/16486:
13650         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13651
13652 2018-03-26  Tom Tromey  <tom@tromey.com>
13653
13654         * python/py-framefilter.c (py_print_single_arg): Return
13655         EXT_LANG_BT_ERROR from catch.
13656
13657 2018-03-26  Tom Tromey  <tom@tromey.com>
13658
13659         PR backtrace/15584:
13660         * stack.c (backtrace_command_1): Move some code into no-filters
13661         "if".
13662
13663 2018-03-26  Tom Tromey  <tom@tromey.com>
13664
13665         * python/py-framefilter.c (throw_quit_or_print_exception): New
13666         function.
13667         (gdbpy_apply_frame_filter): Use it.
13668
13669 2018-03-26  Tom Tromey  <tom@tromey.com>
13670
13671         PR cli/17716:
13672         * python/py-framefilter.c (py_print_type, py_print_value)
13673         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13674         RETURN_MASK_ERROR.
13675
13676 2018-03-26  Tom Tromey  <tom@tromey.com>
13677
13678         * python/py-framefilter.c (enumerate_args): Use
13679         gdb::unique_xmalloc_ptr.
13680
13681 2018-03-26  Tom Tromey  <tom@tromey.com>
13682
13683         * python/py-framefilter.c (py_print_frame): Return
13684         EXT_LANG_BT_OK.
13685         (gdbpy_apply_frame_filter): Update comment.
13686         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13687         Remove.
13688         <EXT_LANG_BT_NO_FILTERS>: Change value.
13689
13690 2018-03-26  Tom Tromey  <tom@tromey.com>
13691
13692         PR backtrace/15582:
13693         * stack.c (backtrace_command): Parse "hide" argument.
13694         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13695         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13696         constant.
13697
13698 2018-03-26  Tom Tromey  <tom@tromey.com>
13699
13700         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13701         add "flags".
13702         (backtrace_command): Remove "fulltrace", add "flags".
13703
13704 2018-03-26  Tom Tromey  <tom@tromey.com>
13705
13706         * stack.c (backtrace_command): Rewrite command line parsing.
13707
13708 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13709
13710         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13711
13712 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13713
13714         * filename-seen-cache.h: Add include guard.
13715
13716 2018-03-26  Keith Seitz  <keiths@redhat.com>
13717
13718         * symfile.c (place_section): Remove "struct" from section_addr_info
13719         in comment.
13720         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13721         "struct" keyword from section_addr_info.
13722
13723 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13724
13725         * regformats/regdef.h (reg): Add constructors.
13726
13727 2018-03-25  Pedro Alves  <palves@redhat.com>
13728
13729         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13730         if then/else bodies in var_func_name extraction.
13731
13732 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13733
13734         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13735         lookup_minimal_symbol() to find symbol entry.
13736         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13737
13738 2018-03-23  Keith Seitz  <keiths@redhat.com>
13739
13740         PR c++/22968
13741         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13742         nested type definitions for C++, too.
13743
13744 2018-03-23  Tom Tromey  <tom@tromey.com>
13745
13746         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13747         a typedef.
13748         (macho_register_oso): Remove.
13749         (macho_symtab_read): Take a std::vector.
13750         (oso_el_compare_name): Now a std::sort comparator.
13751         (macho_symfile_read_all_oso): Take a std::vector.
13752         (macho_symfile_read): Use std::vector.  Remove cleanups.
13753
13754 2018-03-22  Tom Tromey  <tom@tromey.com>
13755
13756         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13757         (record_full_goto_bookmark): Use std::string.
13758
13759 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13760
13761         PR tdep/18295
13762         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13763         a single mask.
13764
13765 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13766
13767         * rs6000-tdep.c (store_insn_p): New function.
13768         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13769         and cr_reg to their unshifted values. Use store_insn_p to
13770         match LR saves using either R1 or fdata->alloca_reg. Use
13771         store_insn_p to match CR saves. Set alloca_reg_offset
13772         when alloca_reg and framep are set. Remove lr_reg shift
13773         when assigning to fdata->lr_register.
13774
13775 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13776
13777         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13778         command line args instead of emitting a warning.
13779
13780 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13781
13782         * tracepoint.h (struct static_tracepoint_marker): Initialize
13783         fields, define default constructor, move constructor and move
13784         assignment, disable the rest.
13785         <str_id, extra>: Make std::string.
13786         (release_static_tracepoint_marker): Remove.
13787         (free_current_marker): Remove.
13788         * tracepoint.c (free_current_marker): Remove.
13789         (parse_static_tracepoint_marker_definition): Adjust to
13790         std::string, use new hex2str overload.
13791         (release_static_tracepoint_marker): Remove.
13792         (print_one_static_tracepoint_marker): Get marker by reference
13793         and adjust to std::string.
13794         (info_static_tracepoint_markers_command): Adjust to std::vector
13795         changes
13796         * target.h (static_tracepoint_marker_p): Remove typedef.
13797         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13798         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13799         bool.
13800         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13801         * target-debug.h
13802         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13803         (target_debug_print_std_vector_static_tracepoint_marker): New.
13804         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13805         to...
13806         (target_debug_print_static_tracepoint_marker_p): ... this.
13807         * target-delegates.c: Re-generate.
13808         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13809         Make std::string.
13810         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13811         (decode_static_tracepoint_spec): Adjust to std::vector.
13812         (tracepoint_print_one_detail): Adjust to std::string.
13813         (strace_marker_decode_location): Adjust to std::string.
13814         (update_static_tracepoint): Adjust to std::string, remove call
13815         to release_static_tracepoint_marker.
13816         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13817         Adjust to std::vector.
13818         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13819         (remote_static_tracepoint_markers_by_strid): Adjust to
13820         std::vector.
13821         * common/rsp-low.h (hex2str): New overload with explicit count
13822         of bytes.
13823         * common/rsp-low.c (hex2str): New overload with explicit count
13824         of bytes.
13825         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13826         (_initialize_rsp_low_selftests): Add test_hex2str test.
13827         * unittests/tracepoint-selftests.c
13828         (test_parse_static_tracepoint_marker_definition): Adjust to
13829         std::string.
13830
13831 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13832
13833         * tracepoint.c (parse_static_tracepoint_marker_definition):
13834         Consider case where the definition is followed by more
13835         definitions.
13836         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13837         tracepoint-selftests.c.
13838         * unittests/tracepoint-selftests.c: New.
13839
13840 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13841
13842         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13843         Carvalho.
13844
13845 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13846
13847         * symtab.c (find_pc_sect_line): fixed indentation.
13848
13849 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13850
13851         * symtab.c (find_pc_sect_line): now uses binary search.
13852
13853 2018-03-19  Tom Tromey  <tom@tromey.com>
13854
13855         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13856         "IDENT" production.
13857
13858 2018-03-19  Pedro Alves  <palves@redhat.com>
13859             Tom Tromey  <tom@tromey.com>
13860
13861         * unittests/observable-selftests.c: New file.
13862         * common/observable.h: New file.
13863         * observable.h: New file.
13864         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13865         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13866         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13867         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13868         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13869         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13870         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13871         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13872         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13873         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13874         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13875         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13876         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13877         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13878         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13879         tui/tui-interp.c, valops.c: Update all users.
13880         * tui/tui-hooks.c (tui_bp_created_observer)
13881         (tui_bp_deleted_observer, tui_bp_modified_observer)
13882         (tui_inferior_exit_observer, tui_before_prompt_observer)
13883         (tui_normal_stop_observer, tui_register_changed_observer):
13884         Remove.
13885         (tui_observers_token): New global.
13886         (attach_or_detach, tui_attach_detach_observers): New functions.
13887         (tui_install_hooks, tui_remove_hooks): Use
13888         tui_attach_detach_observers.
13889         * record-btrace.c (record_btrace_thread_observer): Remove.
13890         (record_btrace_thread_observer_token): New global.
13891         * observer.sh: Remove.
13892         * observer.c: Rename to observable.c.
13893         * observable.c (namespace gdb_observers): Define new objects.
13894         (observer_debug): Move into gdb_observers namespace.
13895         (struct observer, struct observer_list, xalloc_observer_list_node)
13896         (xfree_observer_list_node, generic_observer_attach)
13897         (generic_observer_detach, generic_observer_notify): Remove.
13898         (_initialize_observer): Update.
13899         Don't include observer.inc.
13900         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13901         (clean mostlyclean): Likewise.
13902         (observer.h, observer.inc): Remove targets.
13903         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13904         (COMMON_SFILES): Use observable.c, not observer.c.
13905         * .gitignore: Remove observer.h.
13906
13907 2018-03-18  Tom Tromey  <tom@tromey.com>
13908
13909         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13910         gdb::def_vector.
13911         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13912
13913 2018-03-17  Tom Tromey  <tom@tromey.com>
13914
13915         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13916
13917 2018-03-17  Tom Tromey  <tom@tromey.com>
13918
13919         * target.c (class scoped_target_fd): New.
13920         (target_fileio_close_cleanup): Remove.
13921         (target_fileio_read_alloc_1): Use scoped_target_fd.
13922
13923 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13924
13925         * silent-rules.mk: New.
13926         * Makefile.in: Include silent-rules.mk
13927         (srcdir, VPATH, top_srcdir): Move up.
13928         (COMPILE): Add ECHO_CXX.
13929         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13930         (init.c): Add ECHO_INIT_C.
13931         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13932         (version.c): Add ECHO_GEN.
13933         (printcmd.o): Add ECHO_CXX.
13934         (target-float.o): Add ECHO_CXX.
13935         (ada-exp.o): Add ECHO_CXX.
13936         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13937         (insight$(EXEEXT)): Add ECHO_CXXLD.
13938         * gnulib/configure.ac: Add AM_SILENT_RULES.
13939         * gnulib/aclocal.m4: Re-generate.
13940         * gnulib/configure: Re-generate.
13941         * gnulib/import/Makefile.in: Re-generate.
13942
13943 2018-03-16  Tom Tromey  <tom@tromey.com>
13944
13945         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13946         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13947         * utils.c (do_free_section_addr_info)
13948         (make_cleanup_free_section_addr_info): Remove.
13949         * symfile.h (struct other_sections): Add constructor.
13950         (struct section_addr_info): Remove.
13951         (section_addr_info): New typedef.
13952         (struct sym_fns) <sym_offsets>: Change type of parameter.
13953         (build_section_addr_info_from_objfile)
13954         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13955         (default_symfile_offsets, symbol_file_add)
13956         (symbol_file_add_from_bfd)
13957         (build_section_addr_info_from_section_table): Update.
13958         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13959         * symfile.c (alloc_section_addr_info): Remove.
13960         (build_section_addr_info_from_section_table): Change return type.
13961         Update.
13962         (build_section_addr_info_from_bfd)
13963         (build_section_addr_info_from_objfile): Likewise.
13964         (free_section_addr_info): Remove.
13965         (relative_addr_info_to_section_offsets): Change type of "addrs".
13966         (addrs_section_compar): Now a std::sort comparator.
13967         (addrs_section_sort): Change return type.
13968         (addr_info_make_relative): Change type of "addrs".  Update.
13969         (default_symfile_offsets, syms_from_objfile_1)
13970         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13971         (symbol_file_add_separate): Update.
13972         (symbol_file_add): Change type of "addrs".  Update.
13973         (add_symbol_file_command): Update.  Remove cleanups.
13974         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13975         cleanups.
13976         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13977         * solib.c (solib_read_symbols): Update.
13978         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13979         * machoread.c (macho_symfile_offsets): Update.
13980         * jit.c (jit_bfd_try_read_symtab): Update.
13981
13982 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13983
13984         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13985         unittests/utils-selftests.c.
13986         * unittests/utils-selftests.c: New file.
13987
13988 2018-03-14  Tom Tromey  <tom@tromey.com>
13989
13990         PR cli/14977:
13991         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13992         for NULL.
13993
13994 2018-03-14  Tom Tromey  <tom@tromey.com>
13995
13996         PR cli/19918:
13997         * printcmd.c (printf_pointer): Allow "-" in format.
13998
13999 2018-03-14  Tom Tromey  <tom@tromey.com>
14000
14001         * printcmd.c (_initialize_printcmd): Add usage to printf.
14002
14003 2018-03-14  Yao Qi  <qiyao@sourceware.org>
14004
14005         * MAINTAINERS: Update my email address.
14006
14007 2018-03-13  Tom Tromey  <tom@tromey.com>
14008
14009         * machoread.c (macho_check_dsym): Change filenamep to a
14010         std::string*.
14011         (macho_symfile_read): Update.
14012         * symfile.c (load_command): Use std::string.
14013
14014 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14015
14016         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14017         to error message string.
14018         (riscv_register_name): Use xsnprintf instead of sprintf.
14019         (riscv_insn::fetch_instruction): Use gdb_assert instead of
14020         internal_error.
14021         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14022         error.
14023         (riscv_push_dummy_call): Likewise.
14024
14025 2018-03-12  Tom Tromey  <tom@tromey.com>
14026
14027         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14028         Use gdb::byte_vector.
14029         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14030
14031 2018-03-12  Yao Qi  <yao.qi@linaro.org>
14032
14033         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14034         parameter type to readable_regcache.
14035         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14036         the declaration.
14037
14038 2018-03-11  Tom Tromey  <tom@tromey.com>
14039
14040         * dwarf2read.c (struct nextfield): Add initializers.
14041         (struct nextfnfield): Remove.
14042         (struct fnfieldlist): Add initializers.  Remove "length" and
14043         "head", use std::vector.
14044         (struct decl_field_list): Remove.
14045         (struct field_info): Add initializers.
14046         <fields, baseclasses>: Now std::vector.
14047         <nbaseclasses, nfnfields, typedef_field_list_count,
14048         nested_types_list_count>: Remove.
14049         (dwarf2_add_field, dwarf2_add_type_defn)
14050         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14051         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14052         (process_structure_scope): Update.
14053
14054 2018-03-11  Tom Tromey  <tom@tromey.com>
14055
14056         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14057         for use by std::sort.
14058         (build_type_psymtabs_1): Use std::vector.
14059
14060 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
14061
14062         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14063         and LIBMPFR in the printed configuration.
14064
14065 2018-03-08  Tom Tromey  <tom@tromey.com>
14066
14067         * source.c (get_filename_and_charpos): Use scoped_fd.
14068         * nto-procfs.c (procfs_open_1): Use scoped_fd.
14069         (procfs_pidlist): Likewise.
14070         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14071         (iterate_over_mappings): Likewise.
14072
14073 2018-03-08  Tom Tromey  <tom@tromey.com>
14074
14075         * infcall.c (struct call_return_meta_info)
14076         <stack_temporaries_enabled>: Remove.
14077         (get_call_return_value, call_function_by_hand_dummy): Update.
14078         * thread.c (disable_thread_stack_temporaries): Remove.
14079         (enable_thread_stack_temporaries): Remove.
14080         (thread_stack_temporaries_enabled_p): Return bool.
14081         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14082         (get_last_thread_stack_temporary): Update.
14083         * eval.c (evaluate_subexp): Update.
14084         * gdbthread.h (class enable_thread_stack_temporaries): Now a
14085         class, not a function.
14086         (value_ptr, value_vec): Remove typedefs.
14087         (class thread_info) <stack_temporaries_enabled>: Now bool.
14088         <stack_temporaries>: Now a std::vector.
14089         (thread_stack_temporaries_enabled_p)
14090         (value_in_thread_stack_temporaries): Return bool.
14091
14092 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
14093
14094         * remote.c (putpkt_binary): Fix omitted bytes reporting.
14095         (getpkt_or_notif_sane_1): Likewise.
14096
14097 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14098
14099         * build-id.c (build_id_to_debug_bfd): Use std::string.
14100
14101 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14102
14103         * build-id.c (find_separate_debug_file_by_buildid): Return
14104         std::string.
14105         * build-id.h (find_separate_debug_file_by_buildid): Return
14106         std::string.
14107         * coffread.c (coff_symfile_read): Adjust to std::string.
14108         * elfread.c (elf_symfile_read): Adjust to std::string.
14109         * symfile.c (separate_debug_file_exists): Change parameter to
14110         std::string.
14111         (find_separate_debug_file): Return std::string.
14112         (find_separate_debug_file_by_debuglink): Return std::string.
14113         * symfile.h (find_separate_debug_file_by_debuglink): Return
14114         std::string.
14115
14116 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14117
14118         * common/xml-utils.c (xml_escape_text): Move code to...
14119         (xml_escape_text_append): ... this new function.
14120         * common/xml-utils.h (xml_escape_text_append): New declaration.
14121         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14122         New function.
14123         (_initialize_xml_utils): register test_xml_escape_text_append as
14124         a selftest.
14125
14126 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
14127
14128         * defs.h: Remove MAX_REGISTER_SIZE.
14129         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14130         asserts.
14131         * python/py-unwind.c (pyuw_sniffer): Likewise.
14132
14133 2018-03-07  Tom Tromey  <tom@tromey.com>
14134
14135         * linux-tdep.c (linux_info_proc): Update.
14136         * target.h (struct target_ops) <to_fileio_readlink>: Return
14137         optional<string>.
14138         (target_fileio_readlink): Return optional<string>.
14139         * remote.c (remote_hostio_readlink): Return optional<string>.
14140         * inf-child.c (inf_child_fileio_readlink): Return
14141         optional<string>.
14142         * target.c (target_fileio_readlink): Return optional<string>.
14143
14144 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
14145
14146         * regcache.c (cooked_read_test): Add riscv to the list of
14147         architectures that have a save_reggroup.
14148
14149 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14150
14151         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14152         value is not a dynamic class object.
14153
14154 2018-03-06  Tom Tromey  <tom@tromey.com>
14155
14156         * rust-exp.y: Formatting fixes.
14157
14158 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14159
14160         * riscv-tdep.c (riscv_register_name): Remove target description
14161         support.
14162         (riscv_gdbarch_init): Remove target description check.
14163
14164 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14165
14166         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14167         comment.
14168         * riscv-tdep.h: Likewise.
14169
14170 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14171
14172         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14173         (riscv_pseudo_register_write): Delete.
14174         (riscv_gdbarch_init): Remove all use of pseudo registers.
14175
14176 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14177
14178         * record-btrace.c (btrace_print_lines): Replace cleanup
14179         parameter with RAII equivalents.
14180         (btrace_insn_history): Replace cleanup with RAII equivalents.
14181         * ui-out.h (make_cleanup_ui_out_list_begin_end,
14182         make_cleanup_ui_out_tuple_begin_end): Remove.
14183         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14184         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14185         make_cleanup_ui_out_list_begin_end): Remove.
14186
14187 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14188
14189         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14190         parameter types to std::vector.  Use bool.
14191         (record_btrace_wait): Replace VEC(tp_t) with
14192         std::vector<thread_info *>.
14193         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14194
14195 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14196
14197         * record-btrace.c (record_btrace_disable_callback): Remove.
14198         (struct scoped_btrace_disable): New.
14199         (record_btrace_open): Use scoped_btrace_disable.
14200
14201 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14202
14203         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14204         reading values from registers.
14205
14206 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14207
14208         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14209         where appropriate.
14210
14211 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14212
14213         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14214         change parameter type.  Use GDB's print functions, and use
14215         core_addr_to_string where appropriate.
14216         (riscv_push_dummy_call): Use core_addr_to_string where
14217         appropriate, update call to riscv_print_arg_location, and reindent
14218         a few lines.
14219         (riscv_return_value): Update call to riscv_print_arg_location.
14220
14221 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14222             Tim Newsome <tim@sifive.com>
14223             Albert Ou <a0u@eecs.berkeley.edu>
14224             Darius Rad <darius@bluespec.com>
14225
14226         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14227         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14228         (ALLDEPFILES): Add riscv-tdep.c
14229         * configure.tgt: Add riscv support.
14230         * riscv-tdep.c: New file.
14231         * riscv-tdep.h: New file.
14232         * NEWS: Mention new target.
14233         * MAINTAINERS: Add entry for riscv.
14234
14235 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14236
14237         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14238         fields within aggregates.
14239
14240 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
14241
14242         * record-btrace.c (btrace_print_lines): Change type of flags to
14243         gdb_disassembly_flags.
14244
14245 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14246
14247         * fbsd-nat.c: Include "inf-ptrace.h".
14248         (USE_SIGTRAP_SIGINFO): Conditionally define.
14249         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14250         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14251         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14252         function.
14253         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14254         Likewise.
14255         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14256         Likewise.
14257         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14258         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14259         "supports_stopped_by_hw_breakpoint" target methods.
14260
14261 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14262
14263         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14264         * fbsd-nat.c (debug_fbsd_nat): New variable.
14265         (show_fbsd_nat_debug): New function.
14266         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14267         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14268
14269 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14270
14271         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14272         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14273         prototype.
14274         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14275         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14276         method.
14277
14278 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14279
14280         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14281         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14282
14283 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14284
14285         * charset.c (struct charset_vector): New.
14286         (charsets): Change type to charset_vector.
14287         (find_charset_names): Adjust.
14288         (add_one): Adjust.
14289         (_initialize_charset): Adjust.
14290
14291 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14292
14293         * progspace.h (struct program_space) <deleted_solibs>: Change
14294         type to std::vector<std::string>.
14295         * progspace.c (clear_program_space_solib_cache): Adjust.
14296         * breakpoint.c (print_solib_event): Adjust.
14297         (check_status_catch_solib): Adjust.
14298         * solib.c (update_solib_list): Adjust.
14299         * ui-out.h (class ui_out) <field_string>: New overload.
14300         * ui-out.c (ui_out::field_string): New overload.
14301
14302 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14303
14304         * progspace.h (struct program_space): Add constructor and
14305         destructor, initialize fields.
14306         (add_program_space): Remove.
14307         * progspace.c (add_program_space): Rename to...
14308         (program_space::program_space): ... this.
14309         (release_program_space): Rename to...
14310         (program_space::~program_space): ... this.
14311         (delete_program_space): Use delete to delete program_space.
14312         (initialize_progspace): Use new to allocate program_space.
14313         * inferior.c (add_inferior_with_spaces): Likewise.
14314         (clone_inferior_command): Likewise.
14315         * infrun.c (follow_fork_inferior): Likewise.
14316         (handle_vfork_child_exec_or_exit): Likewise.
14317
14318 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14319
14320         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14321         (delim_string_to_char_ptr_vec): Return std::vector of
14322         gdb::unique_xmalloc_ptr.
14323         (dirnames_to_char_ptr_vec_append): Take std::vector of
14324         gdb::unique_xmalloc_ptr.
14325         (dirnames_to_char_ptr_vec): Return std::vector of
14326         gdb::unique_xmalloc_ptr.
14327         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14328         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14329         (delim_string_to_char_ptr_vec): Return an std::vector of
14330         gdb::unique_xmalloc_ptr, adjust the code.
14331         (dirnames_to_char_ptr_vec_append): Take an std::vector of
14332         gdb::unique_xmalloc_ptr, adjust the code.
14333         (dirnames_to_char_ptr_vec): Return an std::vector of
14334         gdb::unique_xmalloc_ptr, adjust the code.
14335         * auto-load.c (auto_load_safe_path_vec): Change type to
14336         std::vector of gdb::unique_xmalloc_ptr.
14337         (auto_load_expand_dir_vars): Return an std::vector of
14338         gdb::unique_xmalloc_ptr, adjust the code.
14339         (auto_load_safe_path_vec_update): Adjust.
14340         (filename_is_in_auto_load_safe_path_vec): Adjust.
14341         (auto_load_objfile_script_1): Adjust.
14342         * build-id.c (build_id_to_debug_bfd): Adjust.
14343         * linux-thread-db.c (thread_db_load_search): Adjust.
14344         * source.c (add_path): Adjust.
14345         (openp): Adjust.
14346         * symfile.c (find_separate_debug_file): Adjust.
14347         * utils.c (do_free_char_ptr_vec): Remove.
14348         (make_cleanup_free_char_ptr_vec): Remove.
14349
14350 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14351
14352         PR gdb/22907
14353         * common/pathstuff.c: Conditionally include "<windows.h>".
14354
14355 2018-03-01  Georg Sauthoff  <mail@georg.so>
14356
14357         PR gdb/22888
14358         * gcore.in: Quote variables and switch interpreter to bash.
14359
14360 2018-03-01  Tom Tromey  <tom@tromey.com>
14361
14362         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14363         assertion.  Add assertion for discriminant_index.
14364         (quirk_rust_enum): Use correct base type name in univariant case.
14365
14366 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14367
14368         * record.c (get_call_history_modifiers): Return a
14369         record_print_flags.
14370         (cmd_record_call_history): Adjust.
14371         * record-btrace.c (record_btrace_call_history): Adjust.
14372         (record_btrace_call_history_range): Adjust.
14373         (record_btrace_call_history_from): Adjust.
14374         * target-debug.h (target_debug_print_record_print_flags): New.
14375         * target-delegates.c: Re-generate.
14376         * target.c (target_call_history): Change flags type.
14377         (target_call_history_from): Likewise.
14378         (target_call_history_range): Likewise.
14379         * target.h (struct target_ops) <target_call_history>: Likewise.
14380         (target_call_history_from): Likewise.
14381         (target_call_history_range): Likewise.
14382
14383 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14384             Simon Marchi  <simon.marchi@polymtl.ca>
14385
14386         * common/common-utils.c: Include "sys/stat.h".
14387         (is_regular_file): Move here from "source.c"; change return
14388         type to "bool".
14389         * common/common-utils.h (is_regular_file): New prototype.
14390         * common/pathstuff.c (contains_dir_separator): New function.
14391         * common/pathstuff.h (contains_dir_separator): New prototype.
14392         * source.c: Don't include "sys/stat.h".
14393         (is_regular_file): Move to "common/common-utils.c".
14394
14395 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14396
14397         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14398         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14399         * auto-load.c: Include "common/pathstuff.h".
14400         * common/common-def.h (current_directory): Move here.
14401         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14402         function.
14403         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14404         prototype.
14405         * common/pathstuff.c: New file.
14406         * common/pathstuff.h: New file.
14407         * compile/compile.c: Include "common/pathstuff.h".
14408         * defs.h (current_directory): Move to "common/common-defs.h".
14409         * dwarf2read.c: Include "common/pathstuff.h".
14410         * exec.c: Likewise.
14411         * guile/scm-safe-call.c: Likewise.
14412         * linux-thread-db.c: Likewise.
14413         * main.c: Likewise.
14414         * nto-tdep.c: Likewise.
14415         * objfiles.c: Likewise.
14416         * source.c: Likewise.
14417         * symtab.c: Likewise.
14418         * utils.c: Include "common/pathstuff.h".
14419         (gdb_realpath): Move to "common/pathstuff.c".
14420         (gdb_realpath_keepfile): Likewise.
14421         (gdb_abspath): Likewise.
14422         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14423         (gdb_realpath_keepfile): Likewise.
14424         (gdb_abspath): Likewise.
14425
14426 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14427
14428         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14429         wildcard process pid for super_resume for kernels with a
14430         specific bug.
14431
14432 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14433
14434         * compile/compile.c (get_args): Add additional comments
14435         explaining function.
14436
14437 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14438             Tom Tromey  <tom@tromey.com>
14439
14440         * target.h (memory_write_request_s): Remove typedef.  Don't define
14441         VEC.
14442         (target_write_memory_blocks): Change argument to std::vector.
14443         (struct memory_write_request): Add constructor.
14444         * target-memory.c (compare_block_starting_address): Return bool.
14445         Change argument types.
14446         (claim_memory): Change arguments to use std::vector.
14447         (split_regular_and_flash_blocks, blocks_to_erase)
14448         (compute_garbled_blocks): Likewise.
14449         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14450         (target_write_memory_blocks): Change argument to std::vector.
14451         * symfile.c (struct load_section_data): Add constructor and
14452         destructor.  Use std::vector for "requests".
14453         (struct load_progress_data): Add initializers.
14454         (load_section_callback): Update.  Use "new".
14455         (clear_memory_write_data): Remove.
14456         (generic_load): Update.
14457
14458 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14459
14460         * arch/aarch64.h: Use common/tdesc.h.
14461
14462 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14463
14464         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14465         architecture with a 64-bit ABI.
14466
14467 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14468
14469         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14470         ahead of target description loading.
14471
14472 2018-02-26  Tom Tromey  <tom@tromey.com>
14473
14474         * stack.c (backtrace_command_1): Update.
14475         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14476         of "flags".
14477         * python/py-framefilter.c (py_print_frame)
14478         (gdbpy_apply_frame_filter): Change type of "flags".
14479         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14480         of "flags".
14481         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14482         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14483         * extension.h (enum frame_filter_flag): Rename from
14484         frame_filter_flags.
14485         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14486         (apply_ext_lang_frame_filter): Change type of "flags".
14487         * extension.c (apply_ext_lang_frame_filter): Change type of
14488         "flags".
14489         * extension-priv.h (struct extension_language_ops)
14490         <apply_frame_filter>: Change type of "flags".
14491
14492 2018-02-26  Tom Tromey  <tom@tromey.com>
14493
14494         PR python/16497:
14495         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14496         off-by-one in py_end computation.
14497         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14498         PRINT_MORE_FRAMES.
14499         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14500         constant.
14501
14502 2018-02-26  Tom Tromey  <tom@tromey.com>
14503
14504         * dwarf2read.c (struct variant_field): New.
14505         (struct nextfield) <variant>: New field.
14506         (dwarf2_add_field): Handle DW_TAG_variant_part.
14507         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14508         discriminated union.
14509         (read_structure_type): Handle DW_TAG_variant_part.
14510         (handle_struct_member_die): New function, extracted from
14511         process_structure_scope.  Handle DW_TAG_variant.
14512         (process_structure_scope): Handle discriminated unions.  Call
14513         handle_struct_member_die.
14514
14515 2018-02-26  Tom Tromey  <tom@tromey.com>
14516
14517         * rust-lang.h (rust_last_path_segment): Declare.
14518         * rust-lang.c (rust_last_path_segment): Now public.  Change
14519         contract.
14520         (struct disr_info): Remove.
14521         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14522         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14523         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14524         (rust_enum_p, rust_enum_variant): New function.
14525         (rust_underscore_fields): Remove "offset" parameter.
14526         (rust_print_enum): New function.
14527         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14528         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14529         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14530         enums.
14531         (rust_internal_print_type): New function, from rust_print_type.
14532         Remove enum code.
14533         (rust_print_type): Call rust_internal_print_type.
14534         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14535         Update enum handling.
14536         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14537         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14538         (rust_union_quirks): New functions.
14539         (process_full_comp_unit, process_full_type_unit): Call
14540         rust_union_quirks.
14541         (process_structure_scope): Update rust_unions if necessary.
14542
14543 2018-02-26  Tom Tromey  <tom@tromey.com>
14544
14545         * value.h (value_union_variant): Declare.
14546         * valops.c (value_union_variant): New function.
14547         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14548         (struct discriminant_info): New.
14549         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14550         enumerator.
14551         (struct main_type) <flag_discriminated_union>: New field.
14552
14553 2018-02-26  Tom Tromey  <tom@tromey.com>
14554
14555         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14556         unittests/unpack-selftests.c.
14557         * unittests/unpack-selftests.c: New file.
14558         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14559
14560 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14561
14562         * dwarf2read.c (struct partial_die_info) <read>: New method.
14563         (read_partial_die): Remove the declaration.
14564         (load_partial_dies): Update.
14565         (partial_die_info::partial_die_info):
14566         (read_partial_die): Change it to partial_die_info::read.
14567
14568 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14569
14570         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14571         (fixup_partial_die): Remove declaration.
14572         (scan_partial_symbols): Update.
14573         (partial_die_parent_scope): Likewise.
14574         (partial_die_full_name): Likewise.
14575         (fixup_partial_die): Change it to partial_die_info::fixup.
14576
14577 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14578
14579         * dwarf2read.c (read_partial_die): Update the declaration.
14580         (load_partial_dies): Caller update.
14581         (read_partial_die): Remove one argument abbrev_len.
14582
14583 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14584
14585         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14586         assignment operator.
14587         (load_partial_dies): Use ctor and copy ctor.
14588         (read_partial_die): Update.
14589         (dwarf2_cu::find_partial_die): Use ctor.
14590
14591 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14592
14593         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14594         (find_partial_die_in_comp_unit): Change it to
14595         dwarf2_cu::find_partial_die.
14596         (find_partial_die): Update.
14597
14598 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14599
14600         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14601         is NULL.
14602
14603 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14604
14605         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14606
14607 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14608
14609         * arch/amd64.h: Use common/tdesc.h.
14610         * arch/i386.c: Likewise.
14611         * arch/i386.h: Likewise.
14612         * arch/tic6x.c: Likewise.
14613         * arch/tdesc.h: Move file from here...
14614         * common/tdesc.h: ...to here.
14615         * features/aarch64-core.c: Regenerate.
14616         * features/aarch64-fpu.c: Regenerate.
14617         * features/i386/32bit-avx.c: Regenerate.
14618         * features/i386/32bit-avx512.c: Regenerate.
14619         * features/i386/32bit-core.c: Regenerate.
14620         * features/i386/32bit-linux.c: Regenerate.
14621         * features/i386/32bit-mpx.c: Regenerate.
14622         * features/i386/32bit-pkeys.c: Regenerate.
14623         * features/i386/32bit-sse.c: Regenerate.
14624         * features/i386/64bit-avx.c: Regenerate.
14625         * features/i386/64bit-avx512.c: Regenerate.
14626         * features/i386/64bit-core.c: Regenerate.
14627         * features/i386/64bit-linux.c: Regenerate.
14628         * features/i386/64bit-mpx.c: Regenerate.
14629         * features/i386/64bit-pkeys.c: Regenerate.
14630         * features/i386/64bit-segments.c: Regenerate.
14631         * features/i386/64bit-sse.c: Regenerate.
14632         * features/i386/x32-core.c: Regenerate.
14633         * features/tic6x-c6xp.c: Regenerate.
14634         * features/tic6x-core.c: Regenerate.
14635         * features/tic6x-gp.c: Regenerate.
14636         * target-descriptions.c: Use common/tdesc.h.
14637         * target-descriptions.h: Likewise.
14638
14639 2018-02-24  Tom Tromey  <tom@tromey.com>
14640
14641         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14642         (try_thread_db_load_from_dir, thread_db_load_search): Use
14643         std::string.
14644         (info_auto_load_libthread_db_compare): Return bool.  Change
14645         argument types.
14646         (info_auto_load_libthread_db): Use std::vector, std::string.
14647         Remove cleanups.
14648
14649 2018-02-24  Tom Tromey  <tom@tromey.com>
14650
14651         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14652         std::string.
14653         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14654         std::string*.
14655         * gdbarch.c: Rebuild.
14656         * gdbarch.h: Rebuild.
14657         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14658         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14659         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14660         std::string*.
14661
14662 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14663
14664         * gdbtypes.h (sect_offset): Change type to uint64_t.
14665         (sect_offset_str): New function.
14666         * dwarf2read.c (create_addrmap_from_aranges): Use
14667         sect_offset_str.
14668         (error_check_comp_unit_head): Likewise.
14669         (create_debug_type_hash_table): Likewise.
14670         (read_cutu_die_from_dwo): Likewise.
14671         (init_cutu_and_read_dies): Likewise.
14672         (init_cutu_and_read_dies_no_follow): Likewise.
14673         (process_psymtab_comp_unit_reader): Likewise.
14674         (partial_die_parent_scope): Likewise.
14675         (peek_die_abbrev): Likewise.
14676         (process_queue): Likewise.
14677         (dwarf2_physname): Likewise.
14678         (read_namespace_alias): Likewise.
14679         (read_import_statement): Likewise.
14680         (create_dwo_cu_reader): Likewise.
14681         (create_cus_hash_table): Likewise.
14682         (lookup_dwo_cutu): Likewise.
14683         (inherit_abstract_dies): Likewise.
14684         (read_func_scope): Likewise.
14685         (read_call_site_scope): Likewise.
14686         (dwarf2_add_member_fn): Likewise.
14687         (read_common_block): Likewise.
14688         (read_module_type): Likewise.
14689         (read_typedef): Likewise.
14690         (read_subrange_type): Likewise.
14691         (load_partial_dies): Likewise.
14692         (read_partial_die): Likewise.
14693         (find_partial_die): Likewise.
14694         (read_str_index): Likewise.
14695         (dwarf2_string_attr): Likewise.
14696         (build_error_marker_type): Likewise.
14697         (lookup_die_type): Likewise.
14698         (dump_die_shallow): Likewise.
14699         (follow_die_ref): Likewise.
14700         (dwarf2_fetch_die_loc_sect_off): Likewise.
14701         (dwarf2_fetch_constant_bytes): Likewise.
14702         (follow_die_sig): Likewise.
14703         (get_signatured_type): Likewise.
14704         (get_DW_AT_signature_type): Likewise.
14705         (dwarf2_find_containing_comp_unit): Likewise.
14706         (set_die_type): Likewise.
14707
14708 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14709
14710         * arch/aarch64.c: Include "common-defs.h".
14711         * arch/amd64.c: Likewise.
14712         * arch/i386.c: Likewise.
14713
14714 2018-02-21  Tom Tromey  <tom@tromey.com>
14715
14716         * value.h: (extract_field_op): Update.
14717         * eval.c (extract_field_op): Return a const char *.
14718         * expression.h (parse_expression_for_completion): Update.
14719         * completer.c (complete_expression): Update.
14720         (add_struct_fields): Make fieldname const.
14721         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14722         (mark_completion_tag, parse_exp_in_context_1): Update.
14723         (parse_expression_for_completion): Change "name" to
14724         unique_xmalloc_ptr*.
14725
14726 2018-02-21  Tom Tromey  <tom@tromey.com>
14727
14728         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14729
14730 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14731
14732         * avr-tdep.c (avr_read_pc): Change parameter type to
14733         readable_regcache.
14734         * gdbarch.sh (read_pc): Likewise.
14735         * gdbarch.c: Re-generated.
14736         * gdbarch.h: Re-generated.
14737         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14738         readable_regcache.
14739         * ia64-tdep.c (ia64_read_pc): Likewise.
14740         * mips-tdep.c (mips_read_pc): Likewise.
14741         * spu-tdep.c (spu_read_pc): Likewise.
14742
14743 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14744
14745         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14746         * regcache-dump.c: New file.
14747         * regcache.c: Move register_dump to regcache-dump.c.
14748         (maintenance_print_registers): Likewise.
14749         (maintenance_print_raw_registers): Likewise.
14750         (maintenance_print_cooked_registers): Likewise.
14751         (maintenance_print_register_groups): Likewise.
14752         (maintenance_print_remote_registers): Likewise.
14753         (_initialize_regcache): Likewise.
14754         * regcache.h (register_dump): Moved from regcache.c.
14755
14756 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14757
14758         * regcache.c (regcache::regcache): Update.
14759         (regcache::invalidate): Move it to detached_regcache::invalidate.
14760         (get_thread_arch_aspace_regcache): Update.
14761         (regcache::raw_update): Update.
14762         (regcache::cooked_read): Remove some code.
14763         (regcache::cooked_read_value): Likewise.
14764         (regcache::raw_write): Remove assert on m_readonly_p.
14765         (regcache::raw_supply_integer): Move it to
14766         detached_regcache::raw_supply_integer.
14767         (regcache::raw_supply_zeroed): Likewise.
14768         * regcache.h (detached_regcache) <raw_supply_integer>: New
14769         declaration.
14770         <raw_supply_zeroed, invalidate>: Likewise.
14771         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14772         <invalidate>: Likewise.
14773         <m_readonly_p>: Removed.
14774
14775 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14776
14777         * infcmd.c (get_return_value): Let stop_regs point to
14778         get_current_regcache.
14779         * regcache.c (regcache::regcache): Remove.
14780         (register_dump_reg_buffer): New class.
14781         (regcache_print): Adjust.
14782         * regcache.h (regcache): Remove constructors.
14783
14784 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14785
14786         * regcache.c (class register_dump): New class.
14787         (register_dump_regcache, register_dump_none): New class.
14788         (register_dump_remote, register_dump_groups): New class.
14789         (regcache_print): Update.
14790         * regcache.h (regcache_dump_what): Move it to regcache.c.
14791         (regcache) <dump>: Remove.
14792
14793 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14794
14795         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14796          reg_buffer_rw *.
14797         (jit_unwind_reg_set_impl): Call raw_supply.
14798         (jit_frame_sniffer): Use reg_buffer_rw.
14799         * record-full.c (record_full_core_regbuf): Change its type.
14800         (record_full_core_open_1): Use reg_buffer_rw.
14801         (record_full_close): Likewise.
14802         (record_full_core_fetch_registers): Use regcache->raw_supply.
14803         (record_full_core_store_registers): Likewise.
14804         * regcache.c (regcache::get_register_status): Move it to
14805         reg_buffer.
14806         (regcache_raw_set_cached_value): Remove.
14807         (regcache::raw_set_cached_value): Remove.
14808         (regcache::raw_write): Call raw_supply.
14809         (regcache::raw_supply): Move it to reg_buffer_rw.
14810         * regcache.h (regcache_raw_set_cached_value): Remove.
14811         (reg_buffer_rw): New class.
14812
14813 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14814
14815         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14816         readonly_detached_regcache.
14817         (dummy_frame_prev_register): Use regcache->cooked_read.
14818         * frame.c (frame_save_as_regcache): Change return type.
14819         (frame_pop): Update.
14820         * frame.h (frame_save_as_regcache): Update declaration.
14821         * inferior.h (get_infcall_suspend_state_regcache): Update
14822         declaration.
14823         * infrun.c (infcall_suspend_state) <registers>: use
14824         readonly_detached_regcache.
14825         (save_infcall_suspend_state): Don't use regcache_dup.
14826         (get_infcall_suspend_state_regcache): Change return type.
14827         * linux-fork.c (struct fork_info) <savedregs>: Change to
14828         readonly_detached_regcache.
14829         <pc>: New field.
14830         (fork_save_infrun_state): Don't use regcache_dup.
14831         (info_checkpoints_command): Adjust.
14832         * mi/mi-main.c (register_changed_p): Update declaration.
14833         (mi_cmd_data_list_changed_registers): Use
14834         readonly_detached_regcache.
14835         (register_changed_p): Change parameter type to
14836         readonly_detached_regcache.
14837         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14838         readonly_detached_regcache.
14839         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14840         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14841         New.
14842         (regcache::save): Move it to reg_buffer.
14843         (regcache::restore): Change parameter type.
14844         (regcache_dup): Remove.
14845         * regcache.h (reg_buffer) <save>: New method.
14846         (readonly_detached_regcache): New class.
14847         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14848         readonly_detached_regcache.
14849         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14850
14851 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14852
14853         * frame.c (frame_save_as_regcache): Use regcache method save.
14854         (frame_pop): Use regcache method restore.
14855         * infrun.c (restore_infcall_suspend_state): Likewise.
14856         * linux-fork.c (fork_load_infrun_state): Likewise.
14857         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14858         save.
14859         * regcache.c (regcache_save): Remove.
14860         (regcache::restore): More asserts.
14861         (regcache_cpy): Remove.
14862         * regcache.h (regcache_save): Remove the declaration.
14863         (regcache::restore): Move from private to public.
14864         Remove the friend declaration of regcache_cpy.
14865         (regcache_cpy): Remove declaration.
14866
14867 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14868
14869         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14870         parameter type to 'readable_regcache *'.
14871         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14872         * arm-tdep.c (arm_neon_quad_read): Likewise.
14873         (arm_pseudo_read): Likewise.
14874         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14875         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14876         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14877         * gdbarch.c: Re-generated.
14878         * gdbarch.h: Re-generated.
14879         * gdbarch.sh (pseudo_register_read): Change parameter type to
14880         'readable_regcache *'.
14881         (pseudo_register_read_value): Likewise.
14882         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14883         (h8300_pseudo_register_read): Likewise.
14884         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14885         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14886         (i386_pseudo_register_read_into_value): Likewise.
14887         (i386_pseudo_register_read_value): Likewise.
14888         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14889         declaration.
14890         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14891         * m32c-tdep.c (m32c_raw_read): Likewise.
14892         (m32c_read_flg): Likewise.
14893         (m32c_banked_register): Likewise.
14894         (m32c_banked_read): Likewise.
14895         (m32c_sb_read): Likewise.
14896         (m32c_part_read): Likewise.
14897         (m32c_cat_read): Likewise.
14898         (m32c_r3r2r1r0_read): Likewise.
14899         (m32c_pseudo_register_read): Likewise.
14900         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14901         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14902         (mep_pseudo_cr64_read): Likewise.
14903         (mep_pseudo_register_read): Likewise.
14904         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14905         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14906         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14907         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14908         (regcache::cooked_read): Likewise.
14909         (regcache::cooked_read_value): Likewise.
14910         (regcache_cooked_read_signed):
14911         (regcache::cooked_read): Likewise.
14912         * regcache.h (readable_regcache): New class.
14913         (regcache): Inherit readable_regcache.  Move some methods to
14914         readable_regcache.
14915         * rl78-tdep.c (rl78_pseudo_register_read): Change
14916         parameter type to 'readable_regcache *'.
14917         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14918         (e500_pseudo_register_read): Change parameter type to
14919         'readable_regcache *'.
14920         (dfp_pseudo_register_read): Likewise.
14921         (vsx_pseudo_register_read): Likewise.
14922         (efpr_pseudo_register_read): Likewise.
14923         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14924         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14925         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14926         (sh64_pseudo_register_read): Likewise.
14927         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14928         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14929         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14930         (spu_pseudo_register_read): Likewise.
14931         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14932         (xtensa_pseudo_register_read): Likewise.
14933
14934 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14935
14936         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14937         (regcache::arch): Move it to reg_buffer::arch.
14938         (regcache::register_buffer): Likewise.
14939         (regcache::assert_regnum): Likewise.
14940         (regcache::num_raw_registers): Likewise.
14941         * regcache.h (reg_buffer): New class.
14942         (regcache): Inherit reg_buffer.
14943
14944 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14945
14946         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14947         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14948
14949 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14950
14951         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14952
14953 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14954
14955         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14956         (SFILES): Remove common/*.c files.
14957         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14958         * common/common.host: Add common reference.
14959         * configure.ac: Likewise.
14960         * configure: Regenerate.
14961
14962 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14963
14964         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14965         (block_initialize_namespace): Use new.
14966         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14967         (dwarf2_free_objfile): Use delete.
14968         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14969         (copy_type_recursive): Use new.
14970         * gdb_obstack.h (allocate_on_obstack): New.
14971
14972 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14973
14974         PR gdb/22849
14975         * inferior.c (exit_inferior_1): Reset inf->control.
14976
14977 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14978
14979         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14980         declaration.
14981
14982 2018-02-14  Pedro Alves  <palves@redhat.com>
14983
14984         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14985         frame_cleanup_after_sniffer on exception.
14986
14987 2018-02-14  Tom Tromey  <tom@tromey.com>
14988
14989         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14990         const.
14991         (solib_bfd_open): Make pathname const.
14992         * solib.c (solib_bfd_open): Make pathname const.
14993         * solib-spu.c (spu_bfd_fopen): Make name const.
14994         (spu_bfd_open): Make pathname const.
14995         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14996         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14997
14998 2018-02-14  Tom Tromey  <tom@tromey.com>
14999
15000         * symfile.c (symfile_bfd_open): Update.
15001         * source.h (openp, source_full_path_of, find_and_open_source):
15002         Change argument type to unique_xmalloc_ptr.
15003         * source.c (openp): Take a unique_xmalloc_ptr.
15004         (source_full_path_of, find_and_open_source): Likewise.
15005         (open_source_file, symtab_to_fullname): Update.
15006         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15007         unique_xmalloc_ptr.
15008         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15009         (exec_file_find): Update.
15010         * psymtab.c (psymtab_to_fullname): Update.
15011         * nto-tdep.h (nto_find_and_open_solib): Update.
15012         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15013         unique_xmalloc_ptr.
15014         * exec.c (exec_file_attach): Update.
15015         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15016         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15017
15018 2018-02-14  Tom Tromey  <tom@tromey.com>
15019
15020         * solib.c: Include source.h.
15021         * nto-tdep.c: Include source.h.
15022         * mi/mi-cmd-env.c: Include source.h.
15023         * infcmd.c: Include source.h.
15024         * exec.c: Include source.h.
15025         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15026         (add_path, directory_switch, source_path, init_source_path): Move
15027         declarations...
15028         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15029         (add_path, directory_switch, source_path, init_source_path):
15030         ...here.
15031
15032 2018-02-14  Tom Tromey  <tom@tromey.com>
15033
15034         * solist.h (exec_file_find, solib_find): Return
15035         unique_xmalloc_ptr.
15036         (solib_bfd_fopen): Take a const char *.
15037         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15038         (exec_file_find, solib_find): Likewise.
15039         (solib_bfd_fopen): Do not take ownership of "pathname".
15040         (solib_bfd_open): Use unique_xmalloc_ptr.
15041         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15042         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15043         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15044         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15045
15046 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
15047
15048         * ada-lang.c (name_match_type_from_name): Remove reference to
15049         ada_name_for_lookup in function's documentation.
15050         * ada-lang.h (ada_name_for_lookup): Delete declaration.
15051
15052 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15053
15054         * defs.h (enum openp_flags): New enum.
15055         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15056         Move to enum openp_flags.
15057         (openp_flags): New enum flags.
15058         (openp): Change parameter type to openp_flags.
15059         * source.c (openp): Change parameter type to openp_flags.
15060         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15061         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15062
15063 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15064
15065         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15066         per-command.
15067
15068 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
15069
15070         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15071         into...
15072         (class dwarf2_queue_guard): ...the destructor of this new class.
15073         (dw2_do_instantiate_symtab): Create instance of the new class
15074         dwarf2_queue_guard, remove cleanup.
15075
15076 2018-02-09  Tom Tromey  <tom@tromey.com>
15077
15078         * source.c (find_source_lines): Don't reference past the end of
15079         the vector.
15080
15081 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15082
15083         * remote.c (remote_btrace_maybe_reopen): Change error message.
15084         * btrace.c (btrace_enable): Likewise.
15085         (parse_xml_btrace): Likewise.
15086         (parse_xml_btrace_conf): Likewise.
15087
15088 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15089
15090         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15091         (linux_enable_pt, linux_enable_bts): Call
15092         diagnose_perf_event_open_fail.
15093
15094 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15095
15096         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15097         Remove parameter and change return type.  Update callers.  Move it.
15098         (linux_enable_bts, linux_enable_pt): Improve error message.
15099         (linux_enable_pt): Remove zero buffer size check.
15100         (linux_enable_btrace): Improve error messages.  Remove NULL return
15101         check.
15102
15103 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15104
15105         * btrace.c (btrace_enable): Remove target_supports_btrace call.
15106         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15107         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15108         (linux_supports_pt, linux_supports_btrace): Remove.
15109         (linux_enable_bts): Call cpu_supports_bts.
15110         * nat/linux-btrace.h (linux_supports_btrace): Remove.
15111         * remote.c (remote_supports_btrace): Remove.
15112         (init_remote_ops): Remove remote_supports_btrace.
15113         * target-delegates.c: Regenerated.
15114         * target.c (target_supports_btrace): Remove.
15115         * target.h (target_ops) <to_supports_btrace>: Remove
15116         (target_supports_btrace): Remove.
15117         * x86-linux-nat.c (x86_linux_create_target): Remove
15118         linux_supports_btrace.
15119
15120 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15121
15122         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15123         btrace failed.
15124         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15125         exception and use message in own exception.
15126
15127 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15128
15129         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15130         (perf_event_pt_event_type): Use gdb_file_up.
15131         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15132         scoped_fd, and scoped_mmap.
15133
15134 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15135
15136         * common/scoped_mmap.h: New.
15137         * unittests/scoped_mmap-selftest.c: New.
15138         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15139         unittests/scoped_mmap-selftest.c.
15140
15141 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15142
15143         * common/scoped_fd.h: New.
15144         * unittests/scoped_fd-selftest.c: New.
15145         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15146         unittests/scoped_fd-selftest.c.
15147
15148 2018-02-09  Tom Tromey  <tom@tromey.com>
15149
15150         * auto-load.c (auto_load_section_scripts): Use
15151         gdb::unique_xmalloc_ptr.
15152
15153 2018-02-09  Tom Tromey  <tom@tromey.com>
15154
15155         * auto-load.c (execute_script_contents): Use std::string.
15156
15157 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
15158
15159         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15160         Python function, rather than a new command.
15161
15162 2018-02-08  Tom Tromey  <tom@tromey.com>
15163
15164         * solib.c (solib_find_1): Use std::string.
15165         (solib_bfd_fopen): Use unique_xmalloc_ptr.
15166
15167 2018-02-08  Tom Tromey  <tom@tromey.com>
15168
15169         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15170
15171 2018-02-08  Tom Tromey  <tom@tromey.com>
15172
15173         * source.c (find_source_lines): Use gdb::def_vector.
15174
15175 2018-02-08  Tom Tromey  <tom@tromey.com>
15176
15177         * macrocmd.c (struct temporary_macro_definition): New.
15178         (macro_define_command): Use temporary_macro_definition.  Remove
15179         cleanups.
15180         (free_macro_definition_ptr): Remove.
15181
15182 2018-02-08  Tom Tromey  <tom@tromey.com>
15183
15184         * macroexp.c (maybe_expand): Use std::string.
15185
15186 2018-02-08  Tom Tromey  <tom@tromey.com>
15187
15188         * macroexp.c (struct macro_buffer): Add initializers for some
15189         members.
15190         (init_buffer, init_shared_buffer, free_buffer)
15191         (free_buffer_return_text): Remove.
15192         (macro_buffer): New constructors.
15193         (~macro_buffer): New destructor.
15194         (macro_buffer::set_shared): New method.
15195         (macro_buffer::resize_buffer, macro_buffer::appendc)
15196         (macro_buffer::appendmem): Now methods, not free functions.
15197         (set_token, append_tokens_without_splicing, stringify)
15198         (macro_stringify): Update.
15199         (gather_arguments): Change return type.  Remove argc_p argument,
15200         add args_ptr argument.  Use std::vector.
15201         (substitute_args): Remove argc argument.  Accept std::vector.
15202         (expand): Update.  Use std::vector.
15203         (scan, macro_expand, macro_expand_next): Update.
15204
15205 2018-02-08  Tom Tromey  <tom@tromey.com>
15206
15207         * symtab.c (default_collect_symbol_completion_matches_break_on):
15208         Use unique_xmalloc_ptr.
15209         * macroscope.h: (sal_macro_scope, user_macro_scope)
15210         (default_macro_scope): Return unique_xmalloc_ptr.
15211         * macroscope.c (sal_macro_scope, user_macro_scope)
15212         (default_macro_scope): Return unique_xmalloc_ptr.
15213         * macroexp.h (macro_expand, macro_expand_once): Return
15214         unique_xmalloc_ptr.
15215         * macroexp.c (macro_expand, macro_expand_once): Return
15216         unique_xmalloc_ptr.
15217         * macrocmd.c (macro_expand_command, macro_expand_once_command)
15218         (info_macro_command, info_macros_command): Use
15219         unique_xmalloc_ptr.
15220         * compile/compile-c-support.c (write_macro_definitions): Use
15221         unique_xmalloc_ptr.
15222         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15223
15224 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
15225
15226         * value.c (value_static_field): Assign field type instead of
15227         containing type when returning an optimized out value.
15228
15229 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15230
15231         * ft32-tdep.c (ft32_read_pc): Remove.
15232         (ft32_write_pc): Remove.
15233         (ft32_gdbarch_init): Update.
15234         * m32r-tdep.c (m32r_read_pc): Remove.
15235         (m32r_gdbarch_init): Update.
15236         * mep-tdep.c (mep_read_pc): Remove.
15237         (mep_gdbarch_init): Update.
15238         * microblaze-tdep.c (microblaze_write_pc): Remove.
15239         (microblaze_gdbarch_init): Update.
15240         * mn10300-tdep.c (mn10300_read_pc): Remove.
15241         (mn10300_write_pc): Remove.
15242         (mn10300_gdbarch_init): Update.
15243         * moxie-tdep.c (moxie_read_pc): Remove.
15244         (moxie_write_pc): Remove.
15245         (moxie_gdbarch_init): Update.
15246
15247 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15248
15249         * expprint.c (print_subexp_standard): Handle
15250         OP_F77_UNDETERMINED_ARGLIST.
15251         (dump_subexp_body_standard): Likewise.
15252
15253 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
15254
15255         * target-descriptions.c (tdesc_element_visitor) Add empty
15256         implementations.
15257         (tdesc_type): Move make_gdb_type from here.
15258         (tdesc_type_builtin): Likewise.
15259         (tdesc_type_vector): Likewise.
15260         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15261         (make_gdb_type_struct): Move from tdesc_type_with_fields.
15262         (make_gdb_type_union): Likewise.
15263         (make_gdb_type_flags): Likewise.
15264         (make_gdb_type_enum): Likewise.
15265         (make_gdb_type): New function.
15266         (tdesc_register_type): Use static make_gdb_type.
15267
15268 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
15269
15270         * infcmd.c (default_print_one_register_info): Align natural-format
15271         column values consistently one under another.
15272         (pad_to_column): New function.
15273
15274 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
15275
15276         * dwarf2read.c (dwarf2_physname): Move commment.
15277
15278 2018-02-01  Leszek Swirski  <leszeks@google.com>
15279
15280         * varobj.c (varobj_formatted_print_options): Allow recursive
15281         pretty printing if pretty printing is enabled.
15282
15283 2018-02-01  Leszek Swirski  <leszeks@google.com>
15284
15285         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15286         names after a structop as a filename.
15287
15288 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15289
15290         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15291         (arm_record_coproc_data_proc): Likewise.
15292
15293 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15294
15295         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15296
15297 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
15298
15299         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15300         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15301
15302 2018-01-31  Pedro Alves  <palves@redhat.com>
15303
15304         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15305         * inflow.c (child_terminal_save_inferior): Wrap reference to
15306         tcgetpgrp in HAVE_TERMIOS_H.
15307         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15308         _WIN32.
15309         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15310         always iterate over all inferiors.
15311         (gdbsim_cntrl_c): Adjust.
15312         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15313
15314 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15315
15316         * gdbtypes.c (lookup_array_range_type): Make sure the array's
15317         index type is objfile-owned if the element type is as well.
15318
15319 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15320
15321         GDB 8.1 released.
15322
15323 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15324
15325         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15326         "features/s390x-linux64.c".
15327         (_initialize_s390_linux_tdep): Remove initialization of tdescs
15328         s390_linux32 and s390x_linux64.
15329         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15330         default tdesc.
15331         * s390-tdep.c: Include "features/s390-linux32.c" and
15332         "features/s390x-linux64.c".
15333         (s390_tdesc_valid): Add check for tdesc_has_registers.
15334         (s390_gdbarch_init): Make sure there is always a valid tdesc.
15335         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15336         tdesc_s390x_linux64.
15337         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15338         tdesc_s390x_linux64 to...
15339         * s390-tdep.h: ...here.
15340
15341 2018-01-30  Pedro Alves  <palves@redhat.com>
15342
15343         PR gdb/13211
15344         * config.in, configure: Regenerate.
15345         * configure.ac: Check for getpgid.
15346         * go32-nat.c (go32_pass_ctrlc): New.
15347         (go32_target): Install it.
15348         * inf-child.c (inf_child_target): Install
15349         child_terminal_save_inferior, child_pass_ctrlc and
15350         child_interrupt.
15351         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15352         (inf_ptrace_target): No longer install it.
15353         * infcmd.c (interrupt_target_1): Adjust.
15354         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15355         (child_interrupt): Declare.
15356         (inferior::terminal_state): New.
15357         * inflow.c (struct terminal_info): Update comments.
15358         (inferior_process_group): Delete.
15359         (terminal_is_ours): Delete.
15360         (gdb_tty_state): New.
15361         (child_terminal_init): Adjust.
15362         (is_gdb_terminal, sharing_input_terminal_1)
15363         (sharing_input_terminal): New functions.
15364         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15365         Set the process's actual process group in the foreground if
15366         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15367         mark terminal as the inferior's if not sharing GDB's terminal.
15368         Don't check attach_flag.
15369         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15370         pass down a target_terminal_state.
15371         (child_terminal_save_inferior): New, factored out from ...
15372         (child_terminal_ours_1): ... this.  Handle
15373         target_terminal_state::is_ours_for_output.
15374         (child_interrupt, child_pass_ctrlc): New.
15375         (inflow_inferior_exit): Clear the inferior's terminal_state.
15376         (copy_terminal_info): Copy the inferior's terminal state.
15377         (_initialize_inflow): Remove reference to terminal_is_ours.
15378         * inflow.h (inferior_process_group): Delete.
15379         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15380         * procfs.c (procfs_target): Don't install procfs_interrupt.
15381         (procfs_interrupt): Delete.
15382         * remote.c (remote_serial_quit_handler): Adjust.
15383         (remote_interrupt): Remove ptid parameter.  Adjust.
15384         * target-delegates.c: Regenerate.
15385         * target.c: Include "terminal.h".
15386         (target_terminal::terminal_state): Rename to ...
15387         (target_terminal::m_terminal_state): ... this.
15388         (target_terminal::init): Adjust.
15389         (target_terminal::inferior): Adjust to per-inferior
15390         terminal_state.
15391         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15392         (target_terminal::ours, target_terminal::ours_for_output): Use
15393         target_terminal_is_ours_kind.
15394         (target_interrupt): Remove ptid parameter.  Adjust.
15395         (default_target_pass_ctrlc): Adjust.
15396         * target.h (target_ops::to_terminal_save_inferior): New field.
15397         (target_ops::to_interrupt): Remove ptid_t parameter.
15398         (target_interrupt): Remove ptid_t parameter.  Update comment.
15399         (target_pass_ctrlc): Update comment.
15400         * target/target.h (target_terminal_state): New scoped enum,
15401         factored out of ...
15402         (target_terminal::terminal_state): ... here.
15403         (target_terminal::inferior): Update comments.
15404         (target_terminal::restore_inferior): New.
15405         (target_terminal::is_inferior, target_terminal::is_ours)
15406         (target_terminal::is_ours_for_output): Adjust.
15407         (target_terminal::scoped_restore_terminal_state): Adjust to
15408         rename, and call restore_inferior() instead of inferior().
15409         (target_terminal::scoped_restore_terminal_state::m_state): Change
15410         type.
15411         (target_terminal::terminal_state): Rename to ...
15412         (target_terminal::m_terminal_state): ... this and change type.
15413
15414 2018-01-30  Pedro Alves  <palves@redhat.com>
15415
15416         * linux-nat.c (wait_for_signal): New function.
15417         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15418         directly.
15419         (async_terminal_is_ours)
15420         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15421         (linux_nat_add_target): Don't override
15422         to_terminal_inferior/to_terminal_ours.
15423
15424 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15425
15426         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15427
15428 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15429
15430         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15431         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15432         dwarf2_per_objfile_free here.
15433         (dwarf2_per_objfile_free): Remove.
15434         (_initialize_dwarf2_read): Don't register
15435         dwarf2_per_objfile_free as a registry cleanup.
15436
15437 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15438
15439         Avoid compilation errors in MinGW native builds
15440
15441         The error is triggered by including python-internal.h, and the
15442         error message is:
15443
15444              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15445                       from build-gnulib/import/math.h:27,
15446                       from d:/usr/Python26/include/pyport.h:235,
15447                       from d:/usr/Python26/include/Python.h:58,
15448                       from python/python-internal.h:94,
15449                       from python/py-arch.c:24:
15450              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15451         using ::hypot;
15452                 ^~~~~
15453
15454         This happens because Python headers define 'hypot' to expand t
15455         '_hypot' in the Windows builds.
15456         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15457         'hypoth'.  This avoids a compilation error.
15458
15459 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15460
15461         * MAINTAINERS (Write After Approval): Fix ordering.
15462
15463 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15464
15465         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15466
15467 2018-01-26  Alan Modra  <amodra@gmail.com>
15468
15469         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15470         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15471         Remove nop.  Make const.  Comment.
15472         (powerpc32_plt_stub_so_2): New.
15473         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15474         Correct count.  Update uses.
15475         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15476         Move common code reading PLT entry word.  Correct
15477         powerpc32_plt_stub PLT address calculation.
15478         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15479         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15480         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15481         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15482         (ppc64_standard_linkage8): Likewise.
15483         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15484         Correct insns description.
15485         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15486
15487 2018-01-24  Pedro Alves  <palves@redhat.com>
15488
15489         GCC PR libstdc++/83906
15490         * gdbtypes.c (operator==(const dynamic_prop &,
15491         const dynamic_prop &)): New.
15492         (operator==(const range_bounds &, const range_bounds &)): New.
15493         (check_types_equal): Use them instead of memcmp.
15494         * gdbtypes.h (operator==(const dynamic_prop &,
15495         const dynamic_prop &)): Declare.
15496         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15497         (operator==(const range_bounds &, const range_bounds &)): Declare.
15498         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15499
15500 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15501
15502         * s390-linux-tdep.c (s390_record_address_mask)
15503         (s390_record_calc_disp_common, s390_record_calc_disp)
15504         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15505         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15506         (s390_process_record): Move to s390-tdep.c.
15507         (s390_linux_init_abi_any): Adjust.
15508         * s390-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): Moved from s390-linux-tdep.c
15513         (s390_gdbarch_init): Adjust.
15514
15515 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15516
15517         * s390-linux-nat.c (s390-tdep.h): New include.
15518         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15519         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15520         (ALLDEPFILES): Add s390-tdep.c.
15521         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15522         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15523         * s390-tdep.h: ...this.  New file.
15524         * s390-linux-tdep.c (s390-tdep.h): New include.
15525         (_initialize_s390_tdep): Rename to...
15526         (_initialize_s390_linux_tdep): ...this and adjust.
15527         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15528         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15529         s390-tdep.h.
15530         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15531         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15532         (s390_is_partial_instruction, s390_software_single_step)
15533         (is_non_branch_ril, s390_displaced_step_copy_insn)
15534         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15535         (s390_prologue_data, s390_addr, s390_store, s390_load)
15536         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15537         (s390_register_call_saved, s390_guess_tracepoint_registers)
15538         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15539         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15540         (s390_pseudo_register_name, s390_pseudo_register_type)
15541         (s390_pseudo_register_read, s390_pseudo_register_write)
15542         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15543         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15544         (s390_addr_bits_remove, s390_address_class_type_flags)
15545         (s390_address_class_type_flags_to_name)
15546         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15547         (s390_function_arg_float, s390_function_arg_vector)
15548         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15549         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15550         (s390_frame_align, s390_register_return_value, s390_return_value)
15551         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15552         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15553         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15554         (s390_trad_frame_prev_register, s390_unwind_cache)
15555         (s390_prologue_frame_unwind_cache)
15556         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15557         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15558         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15559         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15560         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15561         (s390_frame_base_address, s390_local_base_address)
15562         (s390_frame_base, s390_gcc_target_options)
15563         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15564         (s390_validate_reg_range, s390_tdesc_valid)
15565         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15566         * s390-tdep.c: ...this.  New file.
15567
15568 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15569
15570         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15571         (s390_process_record, s390_gdbarch_tdep_alloc)
15572         (s390_linux_init_abi_any): Use/set new hook.
15573
15574 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15575
15576         * s390-linux-tdep.c (osabi.h): New include.
15577         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15578         (s390_linux_init_abi_any): New functions.
15579         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15580
15581 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15582
15583         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15584         tdesc_has_registers check
15585
15586 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15587
15588         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15589         (s390_validate_reg_range): New macro.
15590         (s390_gdbarch_init): Adjust.
15591
15592 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15593
15594         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15595         (s390_gdbarch_tdep_alloc): Adjust.
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) <have_linux_v1, have_linux_v2>
15601         <have_tdb>: Change type to bool.
15602         (s390_gdbarch_tdep_alloc): Adjust.
15603         (s390_gdbarch_init): Adjust.
15604
15605 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15606
15607         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15608         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15609         (s390_gdbarch_tdep_alloc): New function.
15610         (s390_gdbarch_init): Allocate tdep at start and use its fields
15611         instead of separate variables.
15612
15613 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15614
15615         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15616         when looking for cached gdbarch and add comment for remaining.
15617
15618 2018-01-22  Pedro Alves  <palves@redhat.com>
15619             Sergio Durigan Junior  <sergiodj@redhat.com>
15620
15621         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15622         case.
15623
15624 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15625
15626         * MAINTAINERS: Update my company e-mail address.
15627
15628 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15629
15630         * regcache.c (cooked_write_test): New function.
15631         (_initialize_regcache): Register the test.
15632
15633 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15634
15635         * ia64-tdep.c (ia64_pseudo_register_read): Call
15636         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15637         * m32c-tdep.c (m32c_cat_read): Likewise.
15638         (m32c_r3r2r1r0_read): Likewise.
15639         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15640         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15641
15642 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15643
15644         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15645         method raw_read instead of regcache_raw_read.
15646         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15647         * arm-tdep.c (arm_neon_quad_read): Likewise.
15648         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15649         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15650         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15651         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15652         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15653         (i386_pseudo_register_read_into_value): Likewise.
15654         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15655         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15656         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15657         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15658         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15659         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15660         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15661         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15662         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15663
15664 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15665
15666         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15667         * configure.tgt: Remove target mt.
15668         * mt-tdep.c: Remove.
15669         * regcache.c (cooked_read_test): Remove the check for mt.
15670
15671 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15672
15673         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15674         instead of gdbarch_pseudo_register_read_value.
15675
15676 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15677
15678         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15679         language is Ada.
15680
15681 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15682
15683         * linespec.c (create_sals_line_offset): Remove code that preserved
15684         the symtab_and_line's line number.
15685
15686 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15687
15688         * varobj.c (varobj_create): Don't set valid_block when creating a
15689         floating varobj.
15690
15691 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15692
15693         * varobj.c (varobj_create): Remove out of date comment.
15694
15695 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15696
15697         PR mi/20395
15698         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15699         updating innermost block.
15700         * parse.c (innermost_block_tracker::update): Take extra type
15701         parameter, and check types match before updating innermost block.
15702         (write_dollar_variable): Update innermost block for registers.
15703         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15704         (innermost_block_tracker::innermost_block_tracker): Initialise
15705         m_types member.
15706         (innermost_block_tracker::reset): Take type parameter.
15707         (innermost_block_tracker::update): Take type parameter, and pass
15708         type through as needed.
15709         (innermost_block_tracker::m_types): New member.
15710         * varobj.c (varobj_create): Pass type when reseting innermost
15711         block.
15712
15713 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15714
15715         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15716         * ada-lang.c (resolve_subexp): Likewise.
15717         * breakpoint.c (set_breakpoint_condition) Likewise.
15718         (watch_command_1) Likewise.
15719         * c-exp.y (variable): Likewise.
15720         * d-exp.y (PrimaryExpression): Likewise.
15721         * f-exp.y (variable): Likewise.
15722         * go-exp.y (variable): Likewise.
15723         * m2-exp.y (variable): Likewise.
15724         * objfiles.c (objfile::~objfile): Likewise.
15725         * p-exp.y (variable): Likewise.
15726         * parse.c (innermost_block): Change type.
15727         * parser-defs.h (class innermost_block_tracker): New.
15728         (innermost_block): Change to innermost_block_tracker.
15729         * printcmd.c (display_command): Switch to innermost_block API.
15730         (do_one_display): Likewise.
15731         * rust-exp.y (do_one_display): Likewise.
15732         * symfile.c (clear_symtab_users): Likewise.
15733         * varobj.c (varobj_create): Switch to innermost_block API, replace
15734         use of innermost_block with block stored on varobj object.
15735
15736 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15737
15738         * expression.h (innermost_block): Remove declaration.
15739         * varobj.c: Add 'parser-defs.h' include.
15740
15741 2018-01-19  Tom Tromey  <tom@tromey.com>
15742
15743         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15744         symbols in the static and global blocks.
15745
15746 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15747
15748         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15749         gdb_ptrace.h, and move including gdb_wait.h ...
15750         * nat/linux-ptrace.h: ... to here.
15751
15752 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15753
15754         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15755         inf_ptrace_detach_success.
15756         (inf_ptrace_detach_success): Add inferior parameter, use it
15757         instead of inferior_ptid, pass it to detach_inferior.
15758         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15759         parameter.
15760         * inferior.c (detach_inferior): Add overload that takes an
15761         inferior object.
15762         * inferior.h (detach_inferior): Likewise.
15763         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15764         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15765         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15766
15767 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15768
15769         * target.h (struct target_ops) <to_detach>: Add inferior
15770         parameter.
15771         (target_detach): Likewise.
15772         * target.c (dispose_inferior): Pass inferior down.
15773         (target_detach): Pass inferior down.  Assert that it is equal to
15774         the current inferior.
15775         * aix-thread.c (aix_thread_detach): Pass inferior down.
15776         * corefile.c (core_file_command): Pass current_inferior() down.
15777         * corelow.c (core_detach): Add inferior parameter.
15778         * darwin-nat.c (darwin_detach): Likewise.
15779         * gnu-nat.c (gnu_detach): Likewise.
15780         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15781         * infcmd.c (detach_command): Pass current_inferior() down to
15782         target_detach.
15783         * infrun.c (follow_fork_inferior): Pass parent_inf to
15784         target_detach.
15785         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15786         target_detach.
15787         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15788         * linux-thread-db.c (thread_db_detach): Likewise.
15789         * nto-procfs.c (procfs_detach): Likewise.
15790         * procfs.c (procfs_detach): Likewise.
15791         * record.c (record_detach): Likewise.
15792         * record.h (struct inferior): Forward-declare.
15793         (record_detach): Add inferior parameter.
15794         * remote-sim.c (gdbsim_detach): Likewise.
15795         * remote.c (remote_detach_1): Likewise.
15796         (remote_detach): Likewise.
15797         (extended_remote_detach): Likewise.
15798         * sol-thread.c (sol_thread_detach): Likewise.
15799         * target-debug.h (target_debug_print_inferior_p): New macro.
15800         * target-delegates.c: Re-generate.
15801         * top.c (kill_or_detach): Pass inferior down to target_detach.
15802         * windows-nat.c (windows_detach): Add inferior parameter.
15803
15804 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15805
15806         * target.h (struct target_ops) <to_detach>: Remove args
15807         parameter.
15808         (target_detach): Likewise.
15809         * target.c (dispose_inferior): Adjust.
15810         (target_detach): Remove args parameter, adjust.
15811         * aix-thread.c (aix_thread_detach): Adjust.
15812         * corefile.c (core_file_command): Adjust.
15813         * corelow.c (core_detach): Adjust.
15814         * darwin-nat.c (darwin_detach): Adjust.
15815         * gnu-nat.c (gnu_detach): Adjust.
15816         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15817         * infcmd.c (detach_command): Adjust
15818         * infrun.c (follow_fork_inferior): Adjust.
15819         (handle_vfork_child_exec_or_exit): Adjust.
15820         * linux-fork.c (linux_fork_detach): Remove args parameter.
15821         * linux-fork.h (linux_fork_detach): Likewise.
15822         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15823         * linux-thread-db.c (thread_db_detach): Likewise.
15824         * nto-procfs.c (procfs_detach): Likewise.
15825         * procfs.c (procfs_detach): Likewise.
15826         (do_detach): Remove signo parameter.
15827         * record.c (record_detach): Remove args parameter.
15828         * record.h (record_detach): Likewise.
15829         * remote-sim.c (gdbsim_detach): Likewise.
15830         * remote.c (remote_detach_1): Likewise.
15831         (remote_detach): Likewise.
15832         (extended_remote_detach): Likewise.
15833         * sol-thread.c (sol_thread_detach): Likewise.
15834         * target-delegates.c: Re-generate.
15835         * top.c (struct qt_args) <args>: Remove field.
15836         (kill_or_detach): Don't pass args.
15837         (quit_force): Don't set args.
15838         * windows-nat.c (windows_detach): Remove args parameter.
15839
15840 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15841
15842         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15843         (arm_linux_init_abi): Install it.
15844
15845 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15846
15847         * osabi.c (gdb_osabi_names): Extend the regexp for
15848         arm-linux-gnueabihf.
15849
15850 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15851
15852         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15853         m_abbrevs.
15854         (abbrev_table::add_abbrev): Update.
15855         (abbrev_table::lookup_abbrev): Update.
15856
15857 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15858
15859         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15860
15861 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15862
15863         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15864         to "std::string".
15865
15866 2018-01-17  Tom Tromey  <tom@tromey.com>
15867
15868         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15869
15870 2018-01-17  Tom Tromey  <tom@tromey.com>
15871
15872         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15873         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15874         (create_array_type_with_stride): Update.
15875         * dwarf2read.c (set_die_type): Update.
15876
15877 2018-01-17  Tom Tromey  <tom@tromey.com>
15878
15879         * dwarf2read.c (delayed_method_info): Remove typedef.
15880         (dwarf2_cu::method_info): Now a std::vector.
15881         (add_to_method_list): Update.
15882         (free_delayed_list): Remove.
15883         (compute_delayed_physnames): Update.
15884         (process_full_comp_unit, process_full_type_unit): Clear the method
15885         list.  Remove cleanups.
15886         (psymtab_include_file_name): Add name_holder parameter.  Use
15887         unique_xmalloc_ptr.
15888         (dwarf_decode_lines): Update.
15889
15890 2018-01-17  Tom Tromey  <tom@tromey.com>
15891             Simon Marchi  <simon.marchi@ericsson.com>
15892
15893         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15894         (dwarf2_per_objfile::free_cached_comp_units)
15895         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15896         (init_cutu_and_read_dies_no_follow): Update.
15897         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15898         (dwarf2_cu::~dwarf2_cu): New.
15899         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15900         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15901
15902 2018-01-17  Tom Tromey  <tom@tromey.com>
15903             Simon Marchi  <simon.marchi@ericsson.com>
15904
15905         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15906         (struct die_reader_specs) <abbrev_table>: New member.
15907         (struct abbrev_table): Add constructor.
15908         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15909         <abbrev_obstack>: Now an auto_obstack.
15910         (abbrev_table_up): New typedef.
15911         (init_cu_die_reader): Add abbrev_table parameter.
15912         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15913         Add result_dwo_abbrev_table.
15914         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15915         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15916         Update.
15917         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15918         parameter.
15919         (skip_children): Update.
15920         (abbrev_table::alloc_abbrev): Rename from
15921         abbrev_table_alloc_abbrev.
15922         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15923         (abbrev_table::lookup_abbrev): Rename from
15924         abbrev_table_lookup_abbrev.
15925         (abbrev_table_read_table): Return abbrev_table_up.
15926         (abbrev_table_free, abbrev_table_free_cleanup)
15927         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15928         (load_partial_dies): Update.
15929
15930 2018-01-17  Tom Tromey  <tom@tromey.com>
15931
15932         * dwarf2read.c (dwarf2_compute_name): Update comment.
15933         (read_func_scope, read_variable): Update.
15934         (new_symbol): Remove.
15935         (new_symbol_full): Rename to new_symbol.
15936
15937 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15938
15939         PR gdb/16577
15940         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15941         a warning instead of throwing an error, set section size to 0 and return
15942         NULL.
15943         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15944
15945 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15946
15947         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15948         std::string.
15949         (linux_ptrace_attach_fail_reason_string): Likewise.
15950         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15951         Likewise.
15952         (linux_ptrace_attach_fail_reason_string): Likewise.
15953         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15954
15955 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15956
15957         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15958
15959 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15960
15961         PR gdb/21559
15962         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15963         checking for fs_base/gs_base fields in struct user_regs_struct.
15964         * configure: Regenerate.
15965
15966 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15967
15968         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15969         function.
15970         (aarch64_linux_init_abi): Install it to gdbarch hook
15971         gcc_target_options.
15972
15973 2018-01-15  Pedro Alves  <palves@redhat.com>
15974
15975         * common/signals-state-save-restore.c
15976         (save_original_signals_state): Fix typos.
15977
15978 2017-01-12  Tom Tromey  <tom@tromey.com>
15979             Sergio Durigan Junior  <sergiodj@redhat.com>
15980
15981         * Makefile.in (install-only): Install gdb-add-index.
15982
15983 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15984
15985         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15986
15987 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15988
15989         * infrun.c (keep_going_pass_signal): Clear step-over info when
15990         insert_breakpoints fails.
15991
15992 2018-01-11  Pedro Alves  <palves@redhat.com>
15993
15994         PR gdb/22583
15995         * infrun.c (resume): Rename to ...
15996         (resume_1): ... this.
15997         (resume): Reimplement as wrapper around resume_1.
15998
15999 2018-01-11  Pedro Alves  <palves@redhat.com>
16000
16001         PR remote/22597
16002         * remote.c (remote_parse_stop_reply): Default to the last-set
16003         general thread instead of to 'magic_null_ptid'.
16004
16005 2018-01-10  Pedro Alves  <palves@redhat.com>
16006
16007         * language.h (language_get_symbol_name_matcher): Rename ...
16008         (get_symbol_name_matcher): ... this.
16009         * language.c (language_get_symbol_name_matcher): Ditto.
16010         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16011         callers adjusted.
16012
16013 2018-01-10  Pedro Alves  <palves@redhat.com>
16014
16015         PR gdb/22670
16016         * dwarf2read.c
16017         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16018         Adjust to use language_get_symbol_name_matcher instead of
16019         language_defn::la_get_symbol_name_matcher.
16020         * language.c (language_get_symbol_name_matcher): If in Ada mode
16021         and the lookup name is a verbatim match, return Ada's matcher.
16022         * language.h (language_get_symbol_name_matcher): Adjust comment.
16023         (ada_lookup_name_info::verbatim_p):: New method.
16024
16025 2018-01-10  Pedro Alves  <palves@redhat.com>
16026
16027         PR gdb/22670
16028         * ada-lang.c (ada_collect_symbol_completion_matches): If the
16029         minsym's language is language_auto or language_cplus, pass down
16030         language_ada instead.
16031         * symtab.c (compare_symbol_name): Don't frob symbol language here.
16032
16033 2018-01-10  Pedro Alves  <palves@redhat.com>
16034
16035         PR gdb/22670
16036         * minsyms.c (linkage_name_str): New function.
16037         (iterate_over_minimal_symbols): Use it.
16038
16039 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16040
16041         * NEWS: Document that 'info proc' now works on FreeBSD.
16042
16043 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16044
16045         * configure.ac: Check for kinfo_getfile in libutil.
16046         * configure: Regenerate.
16047         * config.in: Regenerate.
16048         * fbsd-nat.c: Include "fbsd-tdep.h".
16049         (fbsd_fetch_cmdline): New.
16050         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16051         rather than calling error.
16052         (fbsd_info_proc): New.
16053         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16054         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16055         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16056
16057 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16058
16059         * fbsd-nat.c (struct free_deleter): Remove.
16060         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16061
16062 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16063
16064         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16065         NULL for an empty pathname.
16066
16067 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16068
16069         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16070         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16071         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16072         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16073         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16074         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16075         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16076         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16077         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16078         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16079         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16080         (fbsd_core_fetch_timeval, fbsd_print_sigset)
16081         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16082         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
16083         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16084
16085 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
16086
16087         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16088         (gnu_xfer_auxv): New function.
16089         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16090         TARGET_OBJECT_AUXV.
16091
16092 2018-01-08  Yao Qi  <yao.qi@linaro.org>
16093             Simon Marchi  <simon.marchi@ericsson.com>
16094
16095         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16096         common/selftest.c.
16097         (COMMON_OBS): Remove selftest.o.
16098         * configure.ac: Append selftest-arch.c and common/selftest.c to
16099         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
16100         * configure: Re-generated.
16101         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16102         GDB_SELF_TEST.
16103         (maintenance_info_selftests): Likewise.
16104
16105 2018-01-08  Xavier Roirand  <roirand@adacore.com>
16106
16107         * ada-valprint.c (val_print_packed_array_elements): Use
16108         proper number of elements when printing an array indexed
16109         by an enumeration type.
16110
16111 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16112
16113         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16114         (dw2_get_file_names_reader): Adjust.
16115         (lookup_dwo_signatured_type): Adjust.
16116         (lookup_dwp_signatured_type): Adjust.
16117         (lookup_signatured_type): Adjust.
16118         (create_type_unit_group): Adjust.
16119         (get_type_unit_group): Adjust.
16120         (process_psymtab_comp_unit_reader): Adjust.
16121         (build_type_psymtabs_reader): Adjust.
16122         (scan_partial_symbols): Adjust.
16123         (add_partial_symbol): Adjust.
16124         (add_partial_subprogram): Adjust.
16125         (peek_die_abbrev): Adjust.
16126         (fixup_go_packaging): Adjust.
16127         (process_imported_unit_die): Adjust.
16128         (dwarf2_compute_name): Adjust.
16129         (dwarf2_physname): Adjust.
16130         (read_import_statement): Adjust.
16131         (handle_DW_AT_stmt_list): Adjust.
16132         (read_file_scope): Adjust.
16133         (read_func_scope): Adjust.
16134         (read_lexical_block_scope): Adjust.
16135         (read_call_site_scope): Adjust.
16136         (read_variable): Adjust.
16137         (dwarf2_rnglists_process): Adjust.
16138         (dwarf2_ranges_process): Adjust.
16139         (dwarf2_ranges_read): Adjust.
16140         (dwarf2_get_pc_bounds): Adjust.
16141         (dwarf2_record_block_ranges): Adjust.
16142         (dwarf2_add_field): Adjust.
16143         (dwarf2_add_member_fn): Adjust.
16144         (read_structure_type): Adjust.
16145         (process_structure_scope): Adjust.
16146         (read_enumeration_type): Adjust.
16147         (read_array_type): Adjust.
16148         (mark_common_block_symbol_computed): Adjust.
16149         (read_common_block): Adjust.
16150         (read_namespace_type): Adjust.
16151         (read_namespace): Adjust.
16152         (read_module_type): Adjust.
16153         (read_tag_pointer_type): Adjust.
16154         (read_tag_ptr_to_member_type): Adjust.
16155         (read_tag_string_type): Adjust.
16156         (read_subroutine_type): Adjust.
16157         (read_typedef): Adjust.
16158         (read_base_type): Adjust.
16159         (attr_to_dynamic_prop): Adjust.
16160         (read_subrange_type): Adjust.
16161         (read_unspecified_type): Adjust.
16162         (dwarf2_read_abbrevs): Adjust.
16163         (load_partial_dies): Adjust.
16164         (read_partial_die): Adjust.
16165         (find_partial_die): Adjust.
16166         (guess_partial_die_structure_name): Adjust.
16167         (fixup_partial_die): Adjust.
16168         (read_attribute_value): Adjust.
16169         (read_addr_index): Adjust.
16170         (read_addr_index_from_leb128): Adjust.
16171         (read_str_index): Adjust.
16172         (dwarf2_string_attr): Adjust.
16173         (get_debug_line_section): Adjust.
16174         (dwarf_decode_line_header): Adjust.
16175         (lnp_state_machine::check_line_address): Adjust.
16176         (dwarf_decode_lines_1): Adjust.
16177         (dwarf_decode_lines): Adjust.
16178         (dwarf2_start_symtab): Adjust.
16179         (var_decode_location): Adjust.
16180         (new_symbol_full): Adjust.
16181         (dwarf2_const_value_data): Adjust.
16182         (dwarf2_const_value_attr): Adjust.
16183         (dwarf2_const_value): Adjust.
16184         (die_type): Adjust.
16185         (die_containing_type): Adjust.
16186         (build_error_marker_type): Adjust.
16187         (lookup_die_type): Adjust.
16188         (guess_full_die_structure_name): Adjust.
16189         (anonymous_struct_prefix): Adjust.
16190         (determine_prefix): Adjust.
16191         (dwarf2_name): Adjust.
16192         (follow_die_ref_or_sig): Adjust.
16193         (follow_die_offset): Adjust.
16194         (follow_die_ref): Adjust.
16195         (follow_die_sig_1): Adjust.
16196         (follow_die_sig): Adjust.
16197         (get_signatured_type): Adjust.
16198         (get_DW_AT_signature_type): Adjust.
16199         (decode_locdesc): Adjust.
16200         (dwarf_decode_macros): Adjust.
16201         (cu_debug_loc_section): Adjust.
16202         (fill_in_loclist_baton): Adjust.
16203         (dwarf2_symbol_mark_computed): Adjust.
16204         (init_one_comp_unit): Don't assign
16205         dwarf2_cu::dwarf2_per_objfile.
16206         (set_die_type): Adjust.
16207
16208 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16209
16210         * dwarf2read.c (struct mapped_debug_names): Add constructor.
16211         <dwarf2_per_objfile>: New field.
16212         (dwarf2_per_objfile): Remove global.
16213         (get_dwarf2_per_objfile): New function.
16214         (set_dwarf2_per_objfile): New function.
16215         (dwarf2_build_psymtabs_hard): Change objfile parameter to
16216         dwarf2_per_objfile.
16217         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16218         (read_abbrev_offset): Likewise.
16219         (read_indirect_string): Likewise.
16220         (read_indirect_line_string): Likewise.
16221         (read_indirect_string_at_offset): Likewise.
16222         (read_indirect_string_from_dwz): Likewise.
16223         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16224         dwarf2_per_objfile.
16225         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16226         (create_all_comp_units): Change objfile parameter to
16227         dwarf2_per_objfile.
16228         (create_all_type_units): Likewise.
16229         (process_queue): Add dwarf2_per_objfile parameter.
16230         (read_and_check_comp_unit_head): Likewise.
16231         (lookup_dwo_unit_in_dwp): Likewise.
16232         (get_dwp_file): Likewise.
16233         (process_cu_includes): Likewise.
16234         (struct free_dwo_file_cleanup_data): New struct.
16235         (dwarf2_has_info): Use get_dwarf2_per_objfile and
16236         set_dwarf2_per_objfile.
16237         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16238         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16239         context, adjust calls.
16240         (dw2_instantiate_symtab): Likewise.
16241         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16242         (dw2_get_cu): Likewise.
16243         (create_cu_from_index_list): Change objfile parameter to
16244         dwarf2_per_objfile.
16245         (create_cus_from_index_list): Get dwarf2_per_objfile from
16246         context, adjust calls.
16247         (create_cus_from_index): Likewise.
16248         (create_signatured_type_table_from_index): Change objfile
16249         parameter to dwarf2_per_objfile.
16250         (create_signatured_type_table_from_debug_names): Change objfile
16251         parameter to dwarf2_per_objfile.
16252         (create_addrmap_from_index): Likewise.
16253         (create_addrmap_from_aranges): Likewise.
16254         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16255         (dw2_setup): Remove.
16256         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16257         context.
16258         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16259         get_dwarf2_per_objfile.
16260         (dw2_forget_cached_source_info): Likewise.
16261         (dw2_map_symtabs_matching_filename): Likewise.
16262         (struct dw2_symtab_iterator) <index>: Remove.
16263         <dwarf2_per_objfile>: New field.
16264         (dw2_symtab_iter_init): Replace index parameter with
16265         dwarf2_per_objfile.
16266         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16267         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16268         (dw2_print_stats): Likewise.
16269         (dw2_dump): Likewise.
16270         (dw2_expand_symtabs_for_function): Likewise.
16271         (dw2_expand_all_symtabs): Likewise.
16272         (dw2_expand_symtabs_with_fullname): Likewise.
16273         (dw2_expand_marked_cus): Replace index and objfile parameters
16274         with dwarf2_per_objfile.
16275         (dw_expand_symtabs_matching_file_matcher): Add
16276         dwarf2_per_objfile parameter and adjust calls.
16277         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16278         adjust calls.
16279         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16280         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16281         adjust calls.
16282         (create_cus_from_debug_names_list): Replace objfile parameter
16283         with dwarf2_per_objfile and adjust calls.
16284         (create_cus_from_debug_names): Likewise.
16285         (dwarf2_read_debug_names): Likewise.
16286         (mapped_debug_names::namei_to_name): Adjust call.
16287         (dw2_debug_names_iterator::next): Likewise.
16288         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16289         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16290         (dw2_debug_names_dump): Likewise.
16291         (dw2_debug_names_expand_symtabs_for_function): Likewise.
16292         (dw2_debug_names_expand_symtabs_matching): Likewise.
16293         (dwarf2_initialize_objfile): Likewise.
16294         (dwarf2_build_psymtabs): Likewise.
16295         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16296         this_cu.
16297         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16298         (read_and_check_comp_unit_head): Likewise.
16299         (read_abbrev_offset): Likewise.
16300         (create_debug_type_hash_table): Likewise.
16301         (create_debug_types_hash_table): Likewise.
16302         (create_all_type_units): Replace objfile parameter with
16303         dwarf2_per_objfile.
16304         (add_type_unit): Add dwarf2_per_objfile parameter.
16305         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16306         with dwarf2_per_objfile.
16307         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16308         (lookup_dwp_signatured_type): Likewise.
16309         (lookup_signatured_type): Likewise.
16310         (read_cutu_die_from_dwo): Likewise.
16311         (init_tu_and_read_dwo_dies): Likewise.
16312         (init_cutu_and_read_dies): Likewise.
16313         (init_cutu_and_read_dies_no_follow): Likewise.
16314         (allocate_type_unit_groups_table): Add objfile parameter.
16315         (create_type_unit_group): Use dwarf2_per_objfile from cu.
16316         (get_type_unit_group): Likewise.
16317         (process_psymtab_comp_unit): Update call.
16318         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16319         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16320         (print_tu_stats): Likewise.
16321         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16322         in void* parameter.
16323         (build_type_psymtabs): Change objfile parameter to
16324         dwarf2_per_objfile.
16325         (process_skeletonless_type_unit): Use dwarf2_per_objfile
16326         passed in void* parameter.
16327         (process_skeletonless_type_units): Change objfile parameter to
16328         dwarf2_per_objfile.
16329         (set_partial_user): Likewise.
16330         (dwarf2_build_psymtabs_hard): Likewise.
16331         (read_comp_units_from_section): Likewise.
16332         (create_all_comp_units): Likewise.
16333         (scan_partial_symbols): Update calls.
16334         (add_partial_symbol): Likewise.
16335         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16336         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16337         (process_queue): Add dwarf2_per_objfile parameter.
16338         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16339         (compute_compunit_symtab_includes): Likewise.
16340         (process_cu_includes): Add dwarf2_per_objfile parameter.
16341         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16342         (process_full_type_unit): Likewise.
16343         (process_imported_unit_die): Update call.
16344         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16345         (read_file_scope): Likewise.
16346         (allocate_dwo_file_hash_table): Add objfile parameter.
16347         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16348         (create_cus_hash_table): Likewise.
16349         (create_dwp_hash_table): Likewise.
16350         (create_dwo_unit_in_dwp_v1): Likewise.
16351         (create_dwp_v2_section): Likewise.
16352         (create_dwo_unit_in_dwp_v2): Likewise.
16353         (lookup_dwo_unit_in_dwp): Likewise.
16354         (try_open_dwop_file): Likewise.
16355         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16356         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16357         cleanup to include a reference to dwarf2_per_objfile.
16358         (open_dwp_file): Add dwarf2_per_objfile parameter.
16359         (open_and_init_dwp_file): Likewise.
16360         (get_dwp_file): Likewise.
16361         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16362         (queue_and_load_all_dwo_tus): Update call.
16363         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16364         data.
16365         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16366         (dwarf2_ranges_process): Likewise.
16367         (dwarf2_get_pc_bounds): Likewise.
16368         (mark_common_block_symbol_computed): Likewise.
16369         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16370         (dwarf2_read_abbrevs): Update call.
16371         (read_partial_die): Use dwarf2_per_objfile from cu.
16372         (find_partial_die): Likewise.
16373         (fixup_partial_die): Likewise.
16374         (read_attribute_value): Likewise.
16375         (read_indirect_string_at_offset_from): Add objfile parameter.
16376         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16377         parameter.
16378         (read_indirect_string_from_dwz): Add objfile parameter.
16379         (read_indirect_string): Add objfile parameter.
16380         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16381         (read_addr_index): Use dwarf2_per_objfile from cu.
16382         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16383         call dw2_setup.
16384         (read_str_index): Use dwarf2_per_objfile from cu.
16385         (get_debug_line_section): Likewise.
16386         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16387         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16388         (new_symbol_full): Use dwarf2_per_objfile from cu.
16389         (build_error_marker_type): Likewise.
16390         (lookup_die_type): Likewise.
16391         (determine_prefix): Likewise.
16392         (follow_die_offset): Likewise.
16393         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16394         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16395         (dwarf2_fetch_die_type_sect_off): Likewise.
16396         (dwarf2_get_die_type): Likewise.
16397         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16398         (get_signatured_type): Likewise.
16399         (get_DW_AT_signature_type): Likewise.
16400         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16401         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16402         (cu_debug_loc_section): Likewise.
16403         (fill_in_loclist_baton): Likewise.
16404         (dwarf2_symbol_mark_computed): Likewise.
16405         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16406         dwarf2_per_objfile.
16407         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16408         parameter.
16409         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16410         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16411         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16412         (set_die_type): Use dwarf2_free_objfile from cu.
16413         (get_die_type_at_offset): Likewise.
16414         (dwarf2_per_objfile_free): Don't assign global variable.
16415         (debug_names) <constructor>: Add dwarf2_per_objfile
16416         parameter, update m_debugstrlookup construction.
16417         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16418         parameter.
16419         <m_dwarf2_per_objfile>: New field.
16420         <lookup>: Use m_dwarf2_per_objfile.
16421         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16422         (psyms_seen_size): Likewise.
16423         (write_gdbindex): Replace objfile parameter with
16424         dwarf2_per_objfile.
16425         (write_debug_names): Likewise.
16426         (write_psymtabs_to_index): Likewise.
16427         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16428         calls.
16429
16430 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16431
16432         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16433         <dwarf2_per_objfile>: New field.
16434         (struct dwarf2_per_cu_data) <objfile>: Remove.
16435         <dwarf2_per_objfile>: New field.
16436         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16437         of objfile.
16438         (create_signatured_type_table_from_index): Likewise.
16439         (create_debug_type_hash_table): Likewise.
16440         (fill_in_sig_entry_from_dwo_entry): Likewise.
16441         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16442         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16443         objfile.
16444         (create_partial_symtab): Access objfile through
16445         dwarf2_per_objfile.
16446         (process_psymtab_comp_unit_reader): Likewise.
16447         (read_comp_units_from_section): Likewise.
16448         (scan_partial_symbols): Likewise.
16449         (add_partial_symbol): Likewise.
16450         (add_partial_subprogram): Likewise.
16451         (peek_die_abbrev): Likewise.
16452         (fixup_go_packaging): Likewise.
16453         (process_full_comp_unit): Likewise.
16454         (process_full_type_unit): Likewise.
16455         (process_imported_unit_die): Likewise.
16456         (dwarf2_compute_name): Likewise.
16457         (dwarf2_physname): Likewise.
16458         (read_import_statement): Likewise.
16459         (create_cus_hash_table): Assign dwarf2_physname instead of
16460         objfile.
16461         (read_func_scope): Access objfile through dwarf2_per_objfile.
16462         (read_lexical_block_scope): Likewise.
16463         (read_call_site_scope): Likewise.
16464         (read_variable): Likewise.
16465         (dwarf2_rnglists_process): Likewise.
16466         (dwarf2_ranges_process): Likewise.
16467         (dwarf2_ranges_read): Likewise.
16468         (dwarf2_record_block_ranges): Likewise.
16469         (dwarf2_add_field): Likewise.
16470         (dwarf2_add_member_fn): Likewise.
16471         (read_structure_type): Likewise.
16472         (process_structure_scope): Likewise.
16473         (read_enumeration_type): Likewise.
16474         (read_array_type): Likewise.
16475         (read_common_block): Likewise.
16476         (read_namespace_type): Likewise.
16477         (read_namespace): Likewise.
16478         (read_module_type): Likewise.
16479         (read_tag_pointer_type): Likewise.
16480         (read_tag_ptr_to_member_type): Likewise.
16481         (read_tag_string_type): Likewise.
16482         (read_subroutine_type): Likewise.
16483         (read_typedef): Likewise.
16484         (read_base_type): Likewise.
16485         (attr_to_dynamic_prop): Likewise.
16486         (read_subrange_type): Likewise.
16487         (read_unspecified_type): Likewise.
16488         (load_partial_dies): Likewise.
16489         (read_partial_die): Likewise.
16490         (find_partial_die): Likewise.
16491         (guess_partial_die_structure_name): Likewise.
16492         (fixup_partial_die): Likewise.
16493         (read_attribute_value): Likewise.
16494         (read_addr_index_from_leb128): Likewise.
16495         (dwarf2_read_addr_index): Likewise.
16496         (dwarf2_string_attr): Likewise.
16497         (lnp_state_machine::check_line_address): Likewise.
16498         (dwarf_decode_lines_1): Likewise.
16499         (dwarf_decode_lines): Likewise.
16500         (dwarf2_start_symtab): Likewise.
16501         (var_decode_location): Likewise.
16502         (new_symbol_full): Likewise.
16503         (dwarf2_const_value_data): Likewise.
16504         (dwarf2_const_value_attr): Likewise.
16505         (dwarf2_const_value): Likewise.
16506         (die_type): Likewise.
16507         (die_containing_type): Likewise.
16508         (lookup_die_type): Likewise.
16509         (guess_full_die_structure_name): Likewise.
16510         (anonymous_struct_prefix): Likewise.
16511         (dwarf2_name): Likewise.
16512         (follow_die_ref_or_sig): Likewise.
16513         (follow_die_offset): Likewise.
16514         (follow_die_ref): Likewise.
16515         (dwarf2_fetch_die_loc_sect_off): Likewise.
16516         (dwarf2_fetch_constant_bytes): Likewise.
16517         (dwarf2_fetch_die_type_sect_off): Likewise.
16518         (dwarf2_get_die_type): Likewise.
16519         (follow_die_sig): Likewise.
16520         (decode_locdesc): Likewise.
16521         (dwarf2_per_cu_objfile): Likewise.
16522         (dwarf2_per_cu_text_offset): Likewise.
16523         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16524         objfile.
16525         (set_die_type): Access objfile through
16526         dwarf2_per_objfile.
16527
16528 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16529
16530         * valprint.c (converted_character_d): Remove typedef.
16531         (DEF_VEC_O (converted_character_d)): Remove.
16532         (count_next_character): Use std::vector.
16533         (print_converted_chars_to_obstack): Likewise.
16534         (generic_printstr): Likewise.
16535
16536 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16537
16538         * xml-support.h (struct gdb_xml_value): Add constructor.
16539         <value>: Change type to unique_xmalloc_ptr.
16540         (gdb_xml_value_s): Remove typedef.
16541         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16542         (gdb_xml_element_start_handler): Change parameter type to
16543         std::vector.
16544         (xml_find_attribute): Likewise.
16545         * xml-support.c (xml_find_attribute): Change parameter type to
16546         std::vector and adjust.
16547         (gdb_xml_values_cleanup): Remove.
16548         (gdb_xml_parser::start_element): Adjust to std::vector.
16549         (xinclude_start_include): Change paraeter type to std::vector
16550         and adjust.
16551         * btrace.c (check_xml_btrace_version): Likewise.
16552         (parse_xml_btrace_block): Likewise.
16553         (parse_xml_btrace_pt_config_cpu): Likewise.
16554         (parse_xml_btrace_pt): Likewise.
16555         (parse_xml_btrace_conf_bts): Likewise.
16556         (parse_xml_btrace_conf_pt): Likewise.
16557         * memory-map.c (memory_map_start_memory): Likewise.
16558         (memory_map_start_property): Likewise.
16559         * osdata.c (osdata_start_osdata): Likewise.
16560         (osdata_start_item): Likewise.
16561         (osdata_start_column): Likewise.
16562         * remote.c (start_thread): Likewise.
16563         * solib-aix.c (library_list_start_library): Likewise.
16564         (library_list_start_list): Likewise.
16565         * solib-svr4.c (library_list_start_library): Likewise.
16566         (svr4_library_list_start_list): Likewise.
16567         * solib-target.c (library_list_start_segment): Likewise.
16568         (library_list_start_section): Likewise.
16569         (library_list_start_library): Likewise.
16570         (library_list_start_list): Likewise.
16571         * tracepoint.c (traceframe_info_start_memory): Likewise.
16572         (traceframe_info_start_tvar): Likewise.
16573         * xml-syscall.c (syscall_start_syscall): Likewise.
16574         * xml-tdesc.c (tdesc_start_target): Likewise.
16575         (tdesc_start_feature): Likewise.
16576         (tdesc_start_reg): Likewise.
16577         (tdesc_start_union): Likewise.
16578         (tdesc_start_struct): Likewise.
16579         (tdesc_start_flags): Likewise.
16580         (tdesc_start_enum): Likewise.
16581         (tdesc_start_field): Likewise.
16582         (tdesc_start_enum_value): Likewise.
16583         (tdesc_start_vector): Likewise.
16584
16585 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16586
16587         * extension.h (struct xmethod_worker) <clone>: Remove.
16588         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16589         Remove.
16590         (python_xmethod_worker::clone): Remove.
16591         * valops.c (find_overload_match): Use std::move instead of
16592         clone.
16593
16594 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16595
16596         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16597         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16598         <free_xmethod_worker_data>: Remove.
16599         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16600         <get_xmethod_arg_types>: Remove.
16601         <get_xmethod_result_type>: Remove.
16602         <invoke_xmethod>: Remove.
16603         * extension.c (new_xmethod_worker): Remove.
16604         (clone_xmethod_worker): Remove.
16605         (get_matching_xmethod_workers): Return void, pass std::vector by
16606         pointer.
16607         (get_xmethod_arg_types): Rename to...
16608         (xmethod_worker::get_arg_types): ... this, and adjust.
16609         (get_xmethod_result_type): Rename to...
16610         (xmethod_worker::get_result_type): ... this, and adjust.
16611         (invoke_xmethod): Remove.
16612         (free_xmethod_worker): Remove.
16613         (free_xmethod_worker_vec): Remove.
16614         * extension.h (enum ext_lang_rc): Move here from
16615         extension-priv.h.
16616         (struct xmethod_worker): Add constructor and destructor.
16617         <data>: Remove.
16618         <value>: Remove.
16619         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16620         virtual pure methods.
16621         <get_arg_types, get_result_type>: New methods.
16622         (xmethod_worker_ptr): Remove typedef.
16623         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16624         (xmethod_worker_vec): Remove typedef.
16625         (xmethod_worker_up): New typedef.
16626         (invoke_xmethod): Remove.
16627         (clone_xmethod_worker): Remove.
16628         (free_xmethod_worker): Remove.
16629         (free_xmethod_worker_vec): Remove.
16630         (get_xmethod_arg_types): Remove.
16631         (get_xmethod_result_type): Remove.
16632         * valops.c (find_method_list): Use std::vector, don't use
16633         intermediate vector.
16634         (value_find_oload_method_list): Use std::vector.
16635         (find_overload_match): Use std::vector.
16636         (find_oload_champ): Use std::vector.
16637         * value.c (value_free): Use operator delete.
16638         (value_of_xmethod): Rename to...
16639         (value_from_xmethod): ... this.  Don't assign
16640         xmethod_worker::value, take rvalue-reference.
16641         (result_type_of_xmethod): Adjust.
16642         (call_xmethod): Adjust.
16643         * value.h: Include extension.h.
16644         (struct xmethod_worker): Don't forward-declare.
16645         (value_of_xmethod): Rename to...
16646         (value_from_xmethod): ... this, take rvalue-reference.
16647         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16648         (struct python_xmethod_worker): ... this, add constructor and
16649         destructor.
16650         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16651         (gdbpy_free_xmethod_worker_data): Rename to...
16652         (python_xmethod_worker::~python_xmethod_worker): ... this and
16653         adjust.
16654         (gdbpy_clone_xmethod_worker_data): Rename to...
16655         (python_xmethod_worker::clone): ... this and adjust.
16656         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16657         temporary vector.
16658         (gdbpy_get_xmethod_arg_types): Rename to...
16659         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16660         (gdbpy_get_xmethod_result_type): Rename to...
16661         (python_xmethod_worker::do_get_result_type): ... this and
16662         adjust.
16663         (gdbpy_invoke_xmethod): Rename to...
16664         (python_xmethod_worker::invoke): ... this and adjust.
16665         (new_python_xmethod_worker): Rename to...
16666         (python_xmethod_worker::python_xmethod_worker): ... this and
16667         adjust.
16668         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16669         Remove.
16670         (gdbpy_free_xmethod_worker_data): Remove.
16671         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16672         (gdbpy_get_xmethod_arg_types): Remove.
16673         (gdbpy_get_xmethod_result_type): Remove.
16674         (gdbpy_invoke_xmethod): Remove.
16675         * python/python.c (python_extension_ops): Remove obsolete
16676         callbacks.
16677
16678 2018-01-05  Pedro Alves  <palves@redhat.com>
16679
16680         PR gdb/18653
16681         * common/signals-state-save-restore.c
16682         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16683         find a custom handler preinstalled, instead of internal erroring.
16684         But only warn if !quiet.
16685         * common/signals-state-save-restore.h
16686         (save_original_signals_state): New parameter 'quiet'.
16687         * main.c (captured_main_1): Move save_original_signals_state call
16688         after option handling, and pass QUIET.
16689
16690 2018-01-05  Pedro Alves  <palves@redhat.com>
16691
16692         * spu-tdep.c (spu_catch_start): Pass
16693         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16694
16695 2018-01-05  Pedro Alves  <palves@redhat.com>
16696
16697         PR gdb/22670
16698         * ada-lang.c (literal_symbol_name_matcher): New function.
16699         (ada_get_symbol_name_matcher): Use it for
16700         symbol_name_match_type::SEARCH_NAME.
16701         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16702         it down instead of assuming symbol_name_match_type::FULL.
16703         * block.h (block_lookup_symbol): New parameter 'match_type'.
16704         * c-valprint.c (print_unpacked_pointer): Use
16705         lookup_symbol_search_name instead of lookup_symbol.
16706         * compile/compile-object-load.c (get_out_value_type): Pass down
16707         symbol_name_match_type::SEARCH_NAME.
16708         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16709         symbol_name_match_type::FULL.
16710         * cp-support.c (cp_get_symbol_name_matcher): Handle
16711         symbol_name_match_type::SEARCH_NAME.
16712         * infrun.c (insert_exception_resume_breakpoint): Use
16713         lookup_symbol_search_name.
16714         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16715         * psymtab.c (maintenance_check_psymtabs): Use
16716         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16717         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16718         SYMBOL_SEARCH_NAME.
16719         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16720         if symbol_name_match_type::SEARCH_NAME.
16721         (lookup_symbol_in_language): Pass down
16722         symbol_name_match_type::FULL.
16723         (lookup_symbol_search_name): New.
16724         (lookup_language_this): Pass down
16725         symbol_name_match_type::SEARCH_NAME.
16726         (lookup_symbol_aux, lookup_local_symbol): New parameter
16727         'match_type'.  Pass it down.
16728         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16729         (lookup_symbol_search_name): New declaration.
16730         (lookup_symbol_in_block): New 'match_type' parameter.
16731
16732 2018-01-05  Pedro Alves  <palves@redhat.com>
16733
16734         PR gdb/22670
16735         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16736         ada_lookup_symbol.
16737         (ada_lookup_symbol): Reimplement in terms of
16738         ada_lookup_symbol_list, bits factored out from
16739         ada_lookup_encoded_symbol.
16740
16741 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16742
16743         * ada-exp.y (write_object_renaming): When subscripting an array
16744         using a symbol as the index, pass the block in call to
16745         ada_lookup_encoded_symbol when looking that symbol up.
16746
16747 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16748
16749         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16750         TYPE_INDEX_TYPE.
16751
16752 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16753
16754         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16755         the case where VALUE_LVAL (val0) is not lval_memory.
16756
16757 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16758
16759         * ada-valprint.c (print_optional_low_bound): Handle
16760         character-indexed array printing like boolean-indexed array
16761         printing.
16762
16763 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16764
16765         * NEWS: Create a new section for the next release branch.
16766         Rename the section of the current branch, now that it has
16767         been cut.
16768
16769 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16770
16771         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16772         * version.in: Bump version to 8.1.50.DATE-git.
16773
16774 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16775
16776         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16777         Add field.
16778         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16779         Add field.
16780         (default_exception_support_info) <catch_handlers_sym>: Add field.
16781         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16782         (ada_exception_name_addr_1): Add "catch handlers" handling.
16783         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16784         Update all callers.
16785         (create_excep_cond_exprs) <ex>: Add parameter.
16786         (re_set_exception): Update create_excep_cond_exprs call.
16787         (print_it_exception, print_one_exception, print_mention_exception)
16788         (print_recreate_exception): Add "catch handler" handling.
16789         (allocate_location_catch_handlers, re_set_catch_handlers)
16790         (check_status_catch_handlers, print_it_catch_handlers)
16791         (print_one_catch_handlers, print_mention_catch_handlers)
16792         (print_recreate_catch_handlers): New function.
16793         (catch_handlers_breakpoint_ops): New variable.
16794         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16795         Add parameter.  Add "catch handler" handling.
16796         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16797         Add "catch handler" handling.
16798         (ada_exception_catchpoint_cond_string): Add "catch handler"
16799         handling.
16800         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16801         call.
16802         (catch_ada_handlers_command): New function.
16803         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16804         operations structure.
16805         (_initialize_ada_language): Add "catch handlers" command entry.
16806         * NEWS: Document "catch handlers" feature.
16807
16808 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16809
16810         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16811         account when creating the array type of the slice.
16812         (ada_value_slice): Likewise.
16813
16814 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16815
16816         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16817         New enum value.
16818         (create_array_type_with_stride): Add byte_stride_prop parameter.
16819         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16820         New parameter.  Update all callers in this file.
16821         (array_type_has_dynamic_stride): New function.
16822         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16823         of arrays with dynamic byte strides.
16824         * dwarf2read.c (read_array_type): Add support for dynamic
16825         DW_AT_byte_stride attributes.
16826
16827 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16828
16829         * dwarf2read.c (read_unspecified_type): Treat
16830         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16831
16832 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16833
16834         Update copyright year range in all GDB files.
16835
16836 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16837
16838         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16839         and gdb/testsuite/gdb.base/step-line.c.
16840
16841 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16842
16843         * copyright.py (main): Dump the contents of
16844         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16845         even if BY_HAND is empty.
16846
16847 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16848
16849         * top.c (print_gdb_version): Update Copyright year in version
16850         message.
16851
16852 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16853
16854         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16855
16856 For older changes see ChangeLog-2017.
16857 \f
16858 Local Variables:
16859 mode: change-log
16860 left-margin: 8
16861 fill-column: 74
16862 version-control: never
16863 coding: utf-8
16864 End: