gdb: Add new parser rule for structure field names
[external/binutils.git] / gdb / ChangeLog
1 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
2
3         * c-exp.y (field_name): New %token, and new rule.
4         (exp): Replace uses of 'name' with 'field_name' where appropriate.
5
6 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7
8         PR gdb/13368
9         * c-exp.y (typebase): Extend the comment.
10         (ident_tokens): Likewise.
11
12 2018-12-18  Tom Tromey  <tom@tromey.com>
13
14         * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
15         address of sect_off.
16
17 2018-12-23  Joel Brobecker  <brobecker@adacore.com>
18
19         GDB 8.2.1 released.
20
21 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
22
23         * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
24         assigning locations.
25         (riscv_return_value): Take more care not to read/write outside of
26         argument buffer.  Cast return value between the declared type and
27         the abi type.
28
29 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
30
31         * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
32         fflags, and frm registers.
33
34 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
35
36         * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
37         (riscv_gdbarch_init): Register new function with gdbarch.
38         * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
39
40 2018-12-21  Simon Marchi  <simon.marchi@ericsson.com>
41
42         * minsyms.c (mst_str): New.
43         (minimal_symbol_reader::record_full): Add debug output.
44
45 2018-12-21  John Baldwin  <jhb@FreeBSD.org>
46
47         * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
48         equal PL_FLAG_SI.
49         (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
50
51 2018-12-21  Paul Marechal  <paul.marechal@ericsson.com>
52
53         PR gdb/23974
54         * target.c (target_read_stralloc): Check for empty vector.
55
56 2018-12-21  Дилян Палаузов  <dilyan.palauzov@aegee.org>
57
58         * top.c (print_gdb_configuration): Print "--without-python"
59         if GDB was configured without Python.
60
61 2018-12-21  Andrew Burgess  <andrew.burgess@embecosm.com>
62
63         * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
64         a signed offset as a string.
65
66 2018-12-21  Dave Murphy  <davem@devkitpro.org>
67
68         * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
69         initialise.
70         * probe.c (any_static_probe_ops): Ditto.
71         * record-btrace.c (record_btrace_thread_observer_token): Ditto.
72         * stap-probe.c (stap_static_probe_ops): Ditto.
73         * tui/tui-hooks.c (tui_observers_token): Ditto.
74         * unittests/observable-selftests.c (token1, token2, token3): Ditto.
75
76 2018-12-19  Andrew Burgess  <andrew.burgess@embecosm.com>
77
78         * gdb/dummy-frame.c (default_dummy_id): Defined new function.
79         * gdb/dummy-frame.h (default_dummy_id): Declare new function.
80         * gdb/frame-unwind.c (default_unwind_pc): Define new function.
81         (default_unwind_sp): Define new function.
82         * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
83         (default_unwind_sp): Declare new function.
84         * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
85         available.
86         (get_frame_sp): Assume that gdbarch_unwind_sp is available.
87         * gdb/gdbarch.c: Regenerate.
88         * gdb/gdbarch.h: Regenerate.
89         * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
90         unwind_sp.  Add additional header files to be included in
91         generated file.
92
93 2018-12-19  Dimitar Dimitrov  <dimitar@dinux.eu>
94
95         * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
96         sp clobbers.
97
98 2018-12-17  Andrew Burgess  <andrew.burgess@embecosm.com>
99
100         * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
101         'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
102         'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
103         'processing_has_namespace_info' from unsigned int to bool.  Update
104         comments.
105         (producer_is_icc_lt_14): Update return type.
106         (producer_is_gcc_lt_4_3): Likewise.
107         (producer_is_gxx_lt_4_6): Likewise.
108         (process_die): Write true instead of 1 into predicate fields.
109         (dwarf2_start_symtab): Likewise.
110         (var_decode_location): Likewise.
111         (dwarf2_mark_helper): Likewise.
112         (dwarf2_mark): Likewise.
113         (dwarf2_clear_marks): Write false instead of 0 into predicate
114         field.
115         (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
116         0.
117
118 2018-12-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
119
120         * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
121         asm/sigcontext.h.
122
123 2018-12-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
124
125         * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
126         warning trailing new line.
127
128 2018-12-16  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
129
130         * nat/linux-ptrace.c (kill_child): New function.
131         (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
132         Add a call to kill_child in case of early return after fork.
133         (linux_check_ptrace_features): Use kill_child instead of local code.
134         (linux_test_for_tracefork): Likewise.
135
136 2018-12-14  Tom Tromey  <tom@tromey.com>
137
138         * Makefile.in: Remove "alloca" comment.
139         (INFOFILES): Remove.
140         (local-maintainer-clean): Don't use INFOFILES.
141
142 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
143
144         * syscalls/update-freebsd.sh: New file.
145         * syscalls/freebsd.xml: Regenerate.
146
147 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
148
149         * NEWS: Add entry documenting system call aliases.
150         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
151         to get_syscalls_by_name.
152         * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
153         * gdbarch.h: Regenerate.
154         * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
155         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
156         from get_syscall_by_name.  Now accepts a pointer to a vector of
157         integers and returns a bool.
158         [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
159         (syscall_create_syscall_desc): Add alias parameter and pass it to
160         syscall_desc constructor.
161         (syscall_start_syscall): Handle alias attribute.
162         (syscall_attr): Add alias attribute.
163         (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
164         Now accepts a pointer to a vector of integers and returns a
165         bool.  Add syscalls whose alias or name matches the requested
166         name.
167         (get_syscalls_by_name): Rename from get_syscall_by_name.  Now
168         accepts a pointer to a vector of integers and returns a bool.
169         * xml-syscall.h (get_syscalls_by_name): Likewise.
170
171 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
172
173         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
174         to get_syscalls_by_group.
175         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
176         false.
177         [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
178         numbers to an existing vector of integers and return a bool.
179         (get_syscalls_by_group): Accept pointer to vector of integers
180         and change return type to bool.
181         * xml-syscall.h (get_syscalls_by_group): Likewise.
182
183 2018-12-13  Jim Wilson  <jimw@sifive.com>
184
185         * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
186         comment for SD field, and correct xlen calculation.  For MISA, add
187         comment for MXL field, add call to register_size, and correct base
188         calculation.
189
190 2018-12-13  Stafford Horne  <shorne@gmail.com>
191
192         * NEWS(New targets): Add or1k*-*-linux*.
193
194 2018-12-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
195
196         * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
197         declare on one line to fix ARI warning.
198
199 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
200
201         * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
202         (infcall_suspend_state::registers): New.
203         (infcall_suspend_state::restore): New.
204         (infcall_suspend_state::thread_suspend): Rename to...
205         (infcall_suspend_state::m_thread_suspend): ...this.
206         (infcall_suspend_state::registers): Rename to...
207         (infcall_suspend_state::m_registers): ...this.
208         (infcall_suspend_state::siginfo_gdbarch): Rename to...
209         (infcall_suspend_state::m_siginfo_gdbarch): ...this.
210         (infcall_suspend_state::siginfo_data): Rename to...
211         (infcall_suspend_state::m_siginfo_data): ...this.
212         (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
213         constructor.
214         (restore_infcall_suspend_state): Rewrite to use
215         infcall_suspend_state::restore method.
216         (get_infcall_suspend_state_regcache): Use
217         infcall_suspend_state::registers method.
218
219 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
220
221         * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
222         arguments are passed in integer registers.
223         (riscv_call_arg_complex_float): Likewise.
224
225 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
226
227         * nat/linux-osdata.c (common_getter): New function.
228         (struct osdata_type): Change getter to take_snapshot.
229         Add LONGEST len_avail and struct buffer buffer.
230         Change all elements in the initializer.
231         Add an element for the list of types.
232         (linux_xfer_osdata_info_os_types): New function.
233         (linux_common_xfer_osdata): Use common_getter for the list of types.
234         Replace getter call by common_getter.
235         (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
236         Add arg BUFFER.  Only keep the code that adds data in BUFFER.
237         (linux_xfer_osdata_fds): Likewise.
238         (linux_xfer_osdata_modules): Likewise.
239         (linux_xfer_osdata_msg): Likewise.
240         (linux_xfer_osdata_processes): Likewise.
241         (linux_xfer_osdata_processgroups): Likewise.
242         (linux_xfer_osdata_sem): Likewise.
243         (linux_xfer_osdata_shm): Likewise.
244         (linux_xfer_osdata_isockets): Likewise.
245         (linux_xfer_osdata_threads): Likewise.
246
247 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
248
249         * nat/linux-osdata.c: Removed various trailing spaces.
250
251 2018-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
252
253         * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
254         leading whitespace before #include line.
255
256 2018-12-08  Simon Marchi  <simon.marchi@ericsson.com>
257             Дилян Палаузов  <dilyan.palauzov@aegee.org>
258
259         PR gdb/23950
260         * configure.ac: Search for tgetent in libtinfow.
261         * configure: Re-generate.
262
263 2018-12-08  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
264
265         * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
266         (thread_db_err_str): Forward declare.
267         (delete_thread_db_info): Call td_ta_delete_p if available.
268         (try_thread_db_load_1): Acquire td_ta_delete address.
269         * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
270
271 2018-12-08  Pedro Alves  <palves@redhat.com>
272
273         * source.c (forward_search_command): Rename to ...
274         (search_command_helper): ... this.  Add 'forward' parameter.
275         Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
276         buffer.  Handle backward searches too.
277         (forward_search_command, reverse_search_command): Reimplement by
278         calling search_command_helper.
279
280 2018-12-07  Andrew Burgess  <andrew.burgess@embecosm.com>
281
282         * .dir-locals.el: Copy most of the settings from c-mode over to
283         c++-mode.
284
285 2018-12-08  Stafford Horne  <shorne@gmail.com>
286
287         * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
288         * configure.tgt: Add or1k*-*-linux*.
289         * or1k-linux-tdep.c: New file.
290         * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
291
292 2018-12-07  Pedro Alves  <palves@redhat.com>
293
294         * dwarf2read.c (get_gdb_index_contents_from_section): Use
295         gdb::make_array_view.
296
297 2018-12-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
298
299         * language.c (_initialize_language): Fix leak by assigning
300         a static string to language.  Same for range and case_sensitive,
301         even if no leak is detected for these variables.
302
303 2018-12-05  John Baldwin  <jhb@FreeBSD.org>
304
305         * configure: Re-generate.
306         * configure.ac: Use separate sed expressions to escape variables
307         in auto-load directories.
308
309 2018-12-05  Andrew Burgess  <andrew.burgess@embecosm.com>
310
311         * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
312         (riscv_find_default_target_description): Use new function to
313         extract feature from gdbarch_info.
314         (riscv_gdbarch_init): Add error checks for xlen and flen between
315         target description and bfd headers.  Be smarter about when we
316         think the hardware floating point abi should be used.
317
318 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
319
320         * nat/aarch64-linux-hw-point.c
321         (aarch64_linux_any_set_debug_regs_state): New function.
322         * nat/aarch64-linux-hw-point.h
323         (aarch64_linux_any_set_debug_regs_state): New declaration.
324         * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
325         BPs or WPs are set.
326
327 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
328
329         * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
330         (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
331
332 2018-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
333             Simon Marchi  <simon.marchi@ericsson.com>
334
335         * linespec.c (symtab_vector_up): Remove.
336         (symtabs_from_filename): Change return type to std::vector.
337         (collect_symtabs_from_filename): Likewise.
338         (create_sals_line_offset): Assign return value of
339         collect_symtabs_from_filename to *ls->file_symtabs.
340         (convert_explicit_location_to_linespec): Remove call to release.
341         (parse_linespec): Likewise.
342         (symtab_collector) <symtab_collector>: Remove initialization of
343         m_symtabs.
344         <release_symtabs>: Change return type to std::vector<symtab *>.
345         <operator ()>: Adjust.
346
347 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
348
349         * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
350         defined.
351         (union sigval32, struct siginfo32, fbsd_siginfo_size)
352         (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
353         of KERN_PROC_AUXV and PT_LWPINFO.
354         (fbsd_nat_target::xfer_partial): Define method unconditionally.
355         Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
356         Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
357         Make TARGET_OBJECT_FREEBSD_VMMAP and
358         TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
359         and KERN_PROC_PS_STRINGS.
360         * fbsd-nat.h: Include <sys/proc.h>.
361         (fbsd_nat_target::xfer_partial): Declare method unconditionally.
362
363 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
364
365         * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
366         header files.
367         (riscv_linux_nat_target::read_description): New method.
368
369 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
370
371         * arch/riscv.h (riscv_gdbarch_features::hash): New method.
372         * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
373         (riscv_tdesc_cache): New global.
374         (riscv_create_target_description): Look in the cache before
375         creating a new target description.
376
377 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
378
379         * arch/riscv.h (riscv_gdb_features::operator==): New.
380         (riscv_gdb_features::operator!=): New.
381         * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
382         operator.
383
384 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
385
386         * arch/riscv.h (riscv_create_target_description): Make return type
387         const.
388         * arch/riscv.c (riscv_create_target_description): Likewise.
389         * riscv-tdep.c (riscv_find_default_target_description): Likewise.
390
391 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
392             Keith Seitz  <keiths@redhat.com>
393             Tom Tromey  <tom@tromey.com>
394             Sergio Durigan Junior  <sergiodj@redhat.com>
395
396         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
397         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
398         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
399         inside the CU.
400
401 2018-11-30  Pedro Alves  <palves@redhat.com>
402
403         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
404         <stratum>: New override.
405         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
406         <stratum>: New override.
407         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
408         <stratum>: New override.
409         * exec.c (exec_target) <exec_target>: Delete.
410         <stratum>: New override.
411         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
412         stratum method instead of the to_stratum field.
413         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
414         <stratum>: New override.
415         (thread_db_target::thread_db_target): Delete.
416         * make-target-delegates (print_class): Don't print a ctor
417         declaration.  Print a stratum method override declaration.
418         * process-stratum-target.h (process_stratum_target)
419         <process_stratum_target>: Delete.
420         <stratum>: New override.
421         * ravenscar-thread.c (ravenscar_thread_target)
422         <ravenscar_thread_target>: Delete.
423         <stratum>: New override.
424         * record-btrace.c (record_btrace_target)
425         <record_btrace_target>: Delete.
426         <stratum>: New override.
427         * record-full.c (record_full_base_target)
428         <record_full_base_target>: Delete.
429         <stratum>: New override.
430         * record.c (record_disconnect, record_detach)
431         (record_mourn_inferior, record_kill): Adjust to use the stratum
432         method instead of the to_stratum field.
433         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
434         * sol-thread.c (sol_thread_target)
435         <sol_thread_target>: Delete.
436         <stratum>: New override.
437         * spu-multiarch.c (spu_multiarch_target)
438         <spu_multiarch_target>: Delete.
439         <stratum>: New override.
440         * target-delegates.c: Regenerate.
441         * target.c (target_stack::push, target_stack::unpush)
442         (pop_all_targets_above, pop_all_targets_at_and_above)
443         (info_target_command, target_require_runnable)
444         (target_stack::find_beneath): Adjust to use the stratum method
445         instead of the to_stratum field.
446         (dummy_target::dummy_target): Delete.
447         (dummy_target::stratum): New.
448         (debug_target::debug_target): Delete.
449         (debug_target::stratum): New.
450         (maintenance_print_target_stack): Adjust to use the stratum method
451         instead of the to_stratum field.
452         * target.h (struct target_ops) <stratum>: New method.
453         <to_stratum>: Delete.
454         <is_pushed>: Adjust to use the stratum method
455         instead of the to_stratum field.
456
457 2018-11-30  Pedro Alves  <palves@redhat.com>
458
459         * corelow.c (core_target) <has_all_memory, has_execution>: New
460         overrides.
461         * inf-child.c (inf_child_target::has_all_memory)
462         (inf_child_target::has_memory, inf_child_target::has_stack)
463         (inf_child_target::has_registers)
464         (inf_child_target::has_execution): Delete.
465         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
466         has_stack, has_registers, has_execution>: Delete.
467         * process-stratum-target.c
468         (process_stratum_target::has_all_memory)
469         (process_stratum_target::has_memory)
470         (process_stratum_target::has_stack)
471         (process_stratum_target::has_registers)
472         (process_stratum_target::has_execution): New.
473         * process-stratum-target.h (process_stratum_target)
474         <has_all_memory, has_memory, has_stack, has_registers,
475         has_execution>: New method overrides.
476         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
477         has_memory, has_stack, has_registers, has_execution>: Delete.
478         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
479         has_execution>: Delete.
480         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
481         has_registers, has_execution>: Delete.
482         * target.c (default_child_has_all_memory)
483         (default_child_has_memory, default_child_has_stack)
484         (default_child_has_registers, default_child_has_execution):
485         Delete.
486         * target.h (default_child_has_all_memory)
487         (default_child_has_memory, default_child_has_stack)
488         (default_child_has_registers, default_child_has_execution):
489         Delete.
490         * tracefile.h (tracefile_target) <has_execution>: New override.
491
492 2018-11-30  Pedro Alves  <palves@redhat.com>
493
494         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
495         * bsd-kvm.c: Include "process-stratum-target.h".
496         (bsd_kvm_target): Now inherits from process_stratum_target.
497         (bsd_kvm_target::bsd_kvm_target): Default it.
498         * corelow.c: Include "process-stratum-target.h".
499         (core_target): Now inherits from process_stratum_target.
500         (core_target::core_target): Don't set to_stratum here.
501         * inf-child.c (inf_child_target::inf_child_target): Delete.
502         * inf-child.h: Include "process-stratum-target.h".
503         (inf_child_target): Inherit from process_stratum_target.
504         (inf_child_target) <inf_child_target>: Default it.
505         <can_async_p, supports_non_stop, supports_disable_randomization>:
506         Delete overrides.
507         * process-stratum-target.c: New file.
508         * process-stratum-target.h: New file.
509         * remote-sim.c: Include "process-stratum-target.h".
510         (gdbsim_target): Inherit from process_stratum_target.
511         <gdbsim_target>: Default it.
512         * remote.c: Include "process-stratum-target.h".
513         (remote_target): Inherit from process_stratum_target.
514         <remote_target>: Default it.
515         * target.c (default_thread_address_space)
516         (default_thread_architecture): Delete.
517         * target.h (target_ops) <thread_architecture>: Now returns NULL by
518         default.
519         <thread_address_space>: Ditto.
520         * test-target.h: Include "process-stratum-target.h" instead of
521         "target.h".
522         (test_target_ops): Inherit from process_stratum_target.
523         <test_target_ops>: Default it.
524         * tracefile.c (tracefile_target::tracefile_target): Delete.
525         * tracefile.h: Include "process-stratum-target.h".
526         (tracefile_target): Inherit from process_stratum_target.
527         <tracefile_target>: Default it.
528         * target-delegates.c: Regenerate.
529
530 2018-11-30  Pedro Alves  <palves@redhat.com>
531
532         * Makefile.in (COMMON_SFILES): Add test-target.c.
533         * gdbarch-selftests.c: Include "test-target.h".
534         * regcache.c: Include "test-target.h".
535         * target.c (test_target_info, test_target_ops::info): Move to ...
536         * test-target.c: ... this new file.
537         * target.h (test_target_ops): Move to ...
538         * test-target.h: ... this new file.
539
540 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
541
542         * source.c (forward_search_command): Fix leak by using
543         xrealloc even for the first allocation in the loop, as buf
544         is static.
545
546 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
547
548         PR gdb/23093
549         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
550         (fbsd_gdb_signal_to_target): New.
551         (fbsd_init_abi): Install gdbarch "signal_from_target" and
552         "signal_to_target" methods.
553
554 2018-11-29  Tom Tromey  <tom@tromey.com>
555
556         * valarith.c (value_x_unop): Don't set argvec[3].
557
558 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
559
560         PR gdb/23917
561         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
562         semicolon.
563
564 2018-11-26  Pedro Alves  <palves@redhat.com>
565
566         * procfs.c (procfs_notice_thread): Replace uses of
567         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
568         * sol-thread.c (sol_thread_target::wait)
569         (sol_update_thread_list_callback): Likewise.
570
571 2018-11-25  Tom Tromey  <tom@tromey.com>
572
573         * ui-out.c (ui_out::field_fmt): Remove comment.
574         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
575         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
576
577 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
578
579         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
580         leak in open_source_file' has been partially undone by '2179fbc36d23
581         Return scoped_fd from open_source_file'. Re-add the transfer of
582         current s->fullname to the unique_xmalloc_ptr fullname given
583         to find_and_open_source.
584
585 2018-11-23  Pedro Alves  <palves@redhat.com>
586
587         * gdbthread.h (enum thread_state): Move comments here.
588         (is_running, is_stopped, is_exited): Remove declarations.
589
590 2018-11-22  Pedro Alves  <palves@redhat.com>
591
592         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
593         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
594         ALL_NON_EXITED_THREADS with all_non_exited_threads.
595         (print_one_breakpoint_location): Replace ALL_INFERIORS with
596         all_inferiors.
597         * bsd-kvm.c: Include inferior.h.
598         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
599         with all_non_exited_threads.
600         * common/filtered-iterator.h: New.
601         * common/safe-iterator.h: New.
602         * corelow.c (core_target_open): Don't call init_thread_list here.
603         * darwin-nat.c (thread_info_from_private_thread_info): Replace
604         ALL_THREADS with all_threads.
605         * fbsd-nat.c (fbsd_nat_target::resume): Replace
606         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
607         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
608         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
609         * fork-child.c (postfork_hook): Don't call init_thread_list here.
610         * gdbarch-selftests.c (register_to_value_test): Adjust.
611         * gdbthread.h: Don't include "inferior.h" here.
612         (struct inferior): Forward declare.
613         (enum step_over_calls_kind): Moved here from inferior.h.
614         (thread_info::deletable): Definition moved to thread.c.
615         (find_thread_ptid (inferior *, ptid_t)): Declare.
616         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
617         Include "thread-iter.h".
618         (all_threads, all_non_exited_threads, all_threads_safe): New.
619         (any_thread_p): Declare.
620         (thread_list): Delete.
621         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
622         all_non_exited_threads.
623         (proceed_after_attach_callback): Delete.
624         (proceed_after_attach): Take an inferior pointer instead of an
625         integer PID.  Adjust to use range-for.
626         (attach_post_wait): Pass down inferior pointer instead of pid.
627         Use range-for instead of ALL_NON_EXITED_THREADS.
628         (detach_command): Remove init_thread_list call.
629         * inferior-iter.h: New.
630         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
631         (delete_thread_of_inferior): Delete.
632         (delete_inferior, exit_inferior_1): Use range-for with
633         inf->threads_safe() instead of iterate_over_threads.
634         (inferior_appeared): Call init_thread_list here.
635         (discard_all_inferiors): Use all_non_exited_inferiors.
636         (find_inferior_id, find_inferior_pid): Use all_inferiors.
637         (iterate_over_inferiors): Use all_inferiors_safe.
638         (have_inferiors, number_of_live_inferiors): Use
639         all_non_exited_inferiors.
640         (number_of_inferiors): Use all_inferiors and std::distance.
641         (print_inferior): Use all_inferiors.
642         * inferior.h: Include gdbthread.h.
643         (enum step_over_calls_kind): Moved to gdbthread.h.
644         (struct inferior) <thread_list>: New field.
645         <threads, non_exited_threads, threads_safe>: New methods.
646         (ALL_INFERIORS): Delete.
647         Include "inferior-iter.h".
648         (ALL_NON_EXITED_INFERIORS): Delete.
649         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
650         functions.
651         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
652         ALL_NON_EXITED_THREADS with all_non_exited_threads.
653         * infrun.c (follow_exec): Use all_threads_safe.
654         (clear_proceed_status, proceed): Use all_non_exited_threads.
655         (init_wait_for_inferior): Don't clear inline frame state here.
656         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
657         all_threads instead of ALL_NON_EXITED_THREADS.
658         (random_pending_event_thread): Use all_non_exited_threads instead
659         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
660         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
661         instead of ALL_NON_EXITED_THREADS.
662         (handle_no_resumed): Use all_non_exited_threads instead of
663         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
664         ALL_INFERIORS.
665         (restart_threads, switch_back_to_stepped_thread): Use
666         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
667         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
668         all_inferiors.
669         (kill_unfollowed_fork_children): Use inf->non_exited_threads
670         instead of ALL_NON_EXITED_THREADS.
671         * linux-tdep.c (linux_make_corefile_notes): Use
672         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
673         * linux-thread-db.c (thread_db_target::update_thread_list):
674         Replace ALL_INFERIORS with all_inferiors.
675         (thread_db_target::thread_handle_to_thread_info): Use
676         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
677         * mi/mi-interp.c (multiple_inferiors_p): New.
678         (mi_on_resume_1): Simplify using all_non_exited_threads and
679         multiple_inferiors_p.
680         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
681         instead of ALL_NON_EXITED_THREADS.
682         * nto-procfs.c (nto_procfs_target::open): Don't call
683         init_thread_list here.
684         * record-btrace.c (record_btrace_target_open)
685         (record_btrace_target::stop_recording)
686         (record_btrace_target::close)
687         (record_btrace_target::record_is_replaying)
688         (record_btrace_target::resume, record_btrace_target::wait)
689         (record_btrace_target::record_stop_replaying): Use
690         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
691         * record-full.c (record_full_wait_1): Use all_non_exited_threads
692         instead of ALL_NON_EXITED_THREADS.
693         * regcache.c (cooked_read_test): Remove reference to global
694         thread_list.
695         * remote-sim.c (gdbsim_target::create_inferior): Don't call
696         init_thread_list here.
697         * remote.c (remote_target::update_thread_list): Use
698         all_threads_safe instead of ALL_NON_EXITED_THREADS.
699         (remote_target::process_initial_stop_replies): Replace
700         ALL_INFERIORS with all_non_exited_inferiors and use
701         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
702         (remote_target::open_1): Don't call init_thread_list here.
703         (remote_target::append_pending_thread_resumptions)
704         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
705         instead of ALL_NON_EXITED_THREADS.
706         (remote_target::commit_resume)
707         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
708         with all_non_exited_inferiors and use all_non_exited_threads
709         instead of ALL_NON_EXITED_THREADS.
710         (remote_target::kill_new_fork_children): Use
711         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
712         init_thread_list and init_wait_for_inferior calls.
713         (remote_target::remote_btrace_maybe_reopen)
714         (remote_target::thread_handle_to_thread_info): Use
715         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
716         * target.c (target_terminal::restore_inferior)
717         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
718         all_non_exited_inferiors.
719         * thread-iter.c: New file.
720         * thread-iter.h: New file.
721         * thread.c: Include "inline-frame.h".
722         (thread_list): Delete.
723         (clear_thread_inferior_resources): Call clear_inline_frame_state.
724         (init_thread_list): Use all_threads_safe instead of
725         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
726         (new_thread): Adjust to per-inferior thread lists.
727         (add_thread_silent): Pass inferior to find_thread_ptid.
728         (thread_info::deletable): New, moved from the header.
729         (delete_thread_1): Adjust to per-inferior thread lists.
730         (find_thread_global_id): Use inf->threads().
731         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
732         find_thread_ptid.
733         (find_thread_ptid(inferior*, ptid_t)): New overload.
734         (iterate_over_threads): Use all_threads_safe.
735         (any_thread_p): New.
736         (thread_count): Use all_threads and std::distance.
737         (live_threads_count): Use all_non_exited_threads and
738         std::distance.
739         (valid_global_thread_id): Use all_threads.
740         (in_thread_list): Use find_thread_ptid.
741         (first_thread_of_inferior): Adjust to per-inferior thread lists.
742         (any_thread_of_inferior, any_live_thread_of_inferior): Use
743         inf->non_exited_threads().
744         (prune_threads, delete_exited_threads): Use all_threads_safe.
745         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
746         (set_resumed, set_running): Use all_non_exited_threads.
747         (is_thread_state, is_stopped, is_exited, is_running)
748         (is_executing): Delete.
749         (set_executing, set_stop_requested, finish_thread_state): Use
750         all_non_exited_threads.
751         (print_thread_info_1): Use all_inferiors and all_threads.
752         (thread_apply_all_command): Use all_non_exited_threads.
753         (thread_find_command): Use all_threads.
754         (update_threads_executing): Use all_non_exited_threads.
755         * tid-parse.c (parse_thread_id): Use inf->threads.
756         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
757
758 2018-11-22  Pedro Alves  <palves@redhat.com>
759
760         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
761         switch to it before calling into try_open_exec_file.
762
763 2018-11-22  Pedro Alves  <palves@redhat.com>
764
765         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
766         inferior_thread instead of find_thread_ptid, and only when
767         inferior_ptid is not null_ptid.
768         * inferior.c (add_inferior): Don't include target_pid_to_str
769         output when the inferior is not started.
770         * python/py-inferior.c (python_on_normal_stop): Don't use
771         find_thread_ptid.
772         (tui_on_user_selected_context_changed): Use inferior_thread
773         instead of find_thread_ptid, and only when inferior_ptid is not
774         null_ptid.
775
776 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
777
778         PR python/23714
779         * gdb/python/python.c (execute_gdb_command): Call
780         prevent_dont_repeat earlier to avoid affecting dont_repeat.
781
782 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
783
784         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
785         (HFILES_NO_SRCDIR): Add arch/riscv.h.
786         * arch/riscv.c: New file.
787         * arch/riscv.h: New file.
788         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
789         this list, and add arch/riscv.o.
790         * features/Makefile: Add riscv features.
791         * features/riscv/32bit-cpu.c: New file.
792         * features/riscv/32bit-cpu.xml: New file.
793         * features/riscv/32bit-csr.c: New file.
794         * features/riscv/32bit-csr.xml: New file.
795         * features/riscv/32bit-fpu.c: New file.
796         * features/riscv/32bit-fpu.xml: New file.
797         * features/riscv/64bit-cpu.c: New file.
798         * features/riscv/64bit-cpu.xml: New file.
799         * features/riscv/64bit-csr.c: New file.
800         * features/riscv/64bit-csr.xml: New file.
801         * features/riscv/64bit-fpu.c: New file.
802         * features/riscv/64bit-fpu.xml: New file.
803         * features/riscv/rebuild-csr-xml.sh: New file.
804         * riscv-tdep.c: Add 'arch/riscv.h' include.
805         (riscv_gdb_reg_names): Delete.
806         (csr_reggroup): New global.
807         (struct riscv_register_alias): Delete.
808         (struct riscv_register_feature): New structure.
809         (riscv_register_aliases): Delete.
810         (riscv_xreg_feature): New global.
811         (riscv_freg_feature): New global.
812         (riscv_virtual_feature): New global.
813         (riscv_csr_feature): New global.
814         (riscv_create_csr_aliases): New function.
815         (riscv_read_misa_reg): Delete.
816         (riscv_has_feature): Delete.
817         (riscv_isa_xlen): Simplify, just return cached xlen.
818         (riscv_isa_flen): Simplify, just return cached flen.
819         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
820         (riscv_register_name): Update to make use of tdesc_register_name.
821         Look up xreg and freg names in the new globals riscv_xreg_feature
822         and riscv_freg_feature.  Don't supply csr aliases here.
823         (riscv_fpreg_q_type): Delete.
824         (riscv_register_type): Use tdesc_register_type in almost all
825         cases, override the returned type in a few specific cases only.
826         (riscv_print_one_register_info): Handle errors reading registers.
827         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
828         registers that are otherwise unknown to GDB.  Also check the
829         csr_reggroup.
830         (riscv_print_registers_info): Remove assert about upper register
831         number, and use gdbarch_register_reggroup_p instead of
832         short-cutting.
833         (riscv_find_default_target_description): New function.
834         (riscv_check_tdesc_feature): New function.
835         (riscv_add_reggroups): New function.
836         (riscv_setup_register_aliases): New function.
837         (riscv_init_reggroups): New function.
838         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
839         setup register groups.  Register new riscv debug variable.
840         * riscv-tdep.h: Add 'arch/riscv.h' include.
841         (struct gdbarch_tdep): Remove abi union, and add
842         riscv_gdbarch_features field.  Remove cached quad floating point
843         type, and provide initialisation for double type field.
844         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
845         the list of targets using the feature based target descriptions.
846         * NEWS: Mention target description support.
847
848 2018-11-21  Pedro Alves  <palves@redhat.com>
849
850         * valops.c (find_method_list, value_find_oload_method_list)
851         (find_overload_match, find_oload_champ): Rename parameters and
852         locals.
853
854 2018-11-21  Pedro Alves  <palves@redhat.com>
855
856         * valops.c (find_method_list): Replace pointer and length
857         parameters with an gdb::array_view.  Adjust.
858         (value_find_oload_method_list): Likewise.
859         (find_overload_match): Use gdb::array_view for methods list.
860         Adjust to find_oload_champ interface change.
861         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
862         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
863
864 2018-11-21  Pedro Alves  <palves@redhat.com>
865
866         * gdbtypes.c (compare_badness): Change type of parameters to const
867         reference.  Adjust to badness_vector being a std::vector now.
868         (rank_function): Adjust to badness_vector being a std::vector now.
869         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
870         (LENGTH_MATCH): Delete.
871         (compare_badness): Change type of parameters to const reference.
872         (rank_function): Return a badness_vector by value now.
873         (find_overload_match): Adjust to badness_vector being a
874         std::vector now.  Remove cleanups.
875         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
876         badness_vector pointer.
877         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
878         a badness_vector pointer.  Adjust to badness_vector being a
879         std::vector now.  Remove cleanups.
880         (find_oload_champ): 'oload_champ_bv' parameter now
881         a badness_vector pointer.  Adjust to badness_vector being a
882         std::vector now.  Remove cleanups.
883
884 2018-11-21  Pedro Alves  <palves@redhat.com>
885
886         * cp-support.c (sym_return_val_size, sym_return_val_index)
887         (sym_return_val): Delete.
888         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
889         add to the vector.
890         (make_symbol_overload_list): Adjust to return a std::vector
891         instead of maintaining a global open coded vector.
892         (make_symbol_overload_list_block): Add std::vector parameter.
893         (make_symbol_overload_list_block): Rename to ...
894         (add_symbol_overload_list_block): ... this and add std::vector
895         parameter.
896         (make_symbol_overload_list_namespace): Rename to ...
897         (add_symbol_overload_list_namespace): ... this and add std::vector
898         parameter.
899         (make_symbol_overload_list_adl_namespace): Rename to ...
900         (add_symbol_overload_list_adl_namespace): ... this and add
901         std::vector parameter.
902         (make_symbol_overload_list_adl): Delete.
903         (add_symbol_overload_list_adl): New.
904         (make_symbol_overload_list_using): Rename to ...
905         (add_symbol_overload_list_using): ... this and add std::vector
906         parameter.
907         (make_symbol_overload_list_qualified): Rename to ...
908         (add_symbol_overload_list_qualified): ... this and add std::vector
909         parameter.
910         * cp-support.h: Include "common/array-view.h" and <vector>.
911         (make_symbol_overload_list): Change return type to std::vector.
912         (make_symbol_overload_list_adl): Delete declaration.
913         (add_symbol_overload_list_adl): New declaration.
914         * valops.c (find_overload_match): Local 'oload_syms' now a
915         std::vector.
916         (find_oload_champ_namespace): 'oload_syms' parameter now a
917         std::vector pointer.
918         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
919         std::vector pointer.  Adjust to new make_symbol_overload_list
920         interface.
921
922 2018-11-21  Pedro Alves  <palves@redhat.com>
923
924         * common/array-view.h (array_view::splice(size_type, size_t)): New.
925         (array_view::splice(size_type)): New.
926         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
927         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
928         std::vector.
929         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
930         * extension.h: Include "common/array-view.h".
931         (xmethod_worker::invoke): Adjust to use gdb::array_view.
932         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
933         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
934         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
935         (xmethod_worker::do_get_result_type): Adjust to use
936         gdb::array_view.
937         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
938         * gdbtypes.h: Include "common/array-view.h".
939         (rank_function): Adjust to use gdb::array_view.
940         * python/py-xmethods.c (python_xmethod_worker::invoke)
941         (python_xmethod_worker::do_get_arg_types)
942         (python_xmethod_worker::do_get_result_type)
943         (python_xmethod_worker::invoke): Adjust to new interfaces.
944         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
945         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
946         * valops.c (find_overload_match, find_oload_champ_namespace)
947         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
948         gdb:array_view and the new xmethod_worker interfaces.
949         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
950         gdb::array_view.
951         * value.h (find_overload_match, result_type_of_xmethod)
952         (call_xmethod): Adjust to use gdb::array_view.
953         * unittests/array-view-selftests.c: Add slicing tests.
954
955 2018-11-21  Pedro Alves  <palves@redhat.com>
956
957         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
958         * common/array-view.h (make_array_view): New.
959         * compile/compile-object-run.c (compile_object_run): Adjust to
960         pass an array_view.
961         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
962         * eval.c (eval_call): Adjust to pass an array_view.
963         (evaluate_subexp_standard): Adjust to pass an array_view.
964         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
965         * guile/scm-value.c (gdbscm_value_call): Likewise.
966         * infcall.c (push_dummy_code): Replace pointer + size parameters
967         with an array_view parameter.
968         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
969         adjust.
970         * infcall.h: Include "common/array-view.h".
971         (call_function_by_hand, call_function_by_hand_dummy): Replace
972         pointer + size parameters with an array_view parameter.
973         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
974         * linux-tdep.c (linux_infcall_mmap): Likewise.
975         * objc-lang.c (lookup_objc_class, lookup_child_selector)
976         (value_nsstring, print_object_command): Likewise.
977         * python/py-value.c (valpy_call): Likewise.
978         * rust-lang.c (rust_evaluate_funcall): Likewise.
979         * spu-tdep.c (flush_ea_cache): Likewise.
980         * valarith.c (value_x_binop, value_x_unop): Likewise.
981         * valops.c (value_allocate_space_in_inferior): Likewise.
982         * unittests/array-view-selftests.c (run_tests): Add
983         gdb::make_array_view test.
984
985 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
986
987         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
988         than a fixed size buffer.
989
990 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
991
992         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
993         and remove insertion of extra spaces in GDB's output.
994         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
995         Layout field into a temporary buffer, and then output it as a
996         string field.
997
998 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
999
1000         * NEWS: Document the language choice done by
1001         'info [types|functions|variables]|rbreak'.
1002
1003 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1004
1005         * symtab.c (treg_matches_sym_type_name): Use
1006         scoped_switch_to_sym_language_if_auto instead of local logic.
1007         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1008         to switch to SYM language when language mode is auto.
1009
1010 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1011
1012         * language.h (scoped_switch_to_sym_language_if_auto): New class.
1013
1014 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1015
1016         * symtab.c (search_symbols): Properly check absence of type regexp
1017         before entering the loop scanning the minimal symbols.
1018
1019 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
1020
1021         * s12z-tdep.c (s12z_extract_return_value): New function.
1022         (inv_reg_perm) New array.
1023         (s12z_return_value): Populate readbuf if non-null.
1024
1025 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
1026
1027         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1028         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1029         to MinGW fixed by Gnulib.
1030         (O_NOINHERIT): Define if not defined.
1031
1032 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
1033
1034         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1035
1036 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1037
1038         * infrun.c (displaced_step_inferior_state) <next>: Remove.
1039
1040 2018-11-19  Tom Tromey  <tom@tromey.com>
1041
1042         * source.c (get_filename_and_charpos): Return void.
1043
1044 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1045
1046         * skip.c (_initialize_step_skip): Fix "info skip" help.
1047
1048 2018-11-16  Tom Tromey  <tom@tromey.com>
1049
1050         PR rust/23625:
1051         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1052
1053 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1054
1055         * infrun.c (displaced_step_inferior_states): Change type to
1056         std::forward_list.
1057         (get_displaced_stepping_state): Adjust.
1058         (displaced_step_in_progress_any_inferior): Adjust.
1059         (add_displaced_stepping_state): Adjust.
1060         (remove_displaced_stepping_state): Adjust.
1061
1062 2018-11-18  Tom Tromey  <tom@tromey.com>
1063
1064         PR build/23814:
1065         * target-delegates.c: Rebuild.
1066         * ia64-linux-nat.c (class ia64_linux_nat_target)
1067         <have_steppable_watchpoint>: Use override.  Return true, not 1.
1068         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
1069         "self" argument.
1070         (ia64_linux_nat_target::low_new_thread): Rename.
1071         (class ia64_linux_nat_target) <read_description>: Don't declare.
1072         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1073         bool.
1074
1075 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1076
1077         PR gdb/22736:
1078         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1079         lang_struct_return code.
1080
1081 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1082
1083         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1084         return_method.
1085         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1086         * amd64-tdep.c (amd64_push_arguments): Likewise.
1087         (amd64_push_dummy_call): Likewise.
1088         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1089         * arc-tdep.c (arc_push_dummy_call): Likewise.
1090         * arm-tdep.c (arm_push_dummy_call): Likewise.
1091         * avr-tdep.c (avr_push_dummy_call): Likewise.
1092         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1093         * cris-tdep.c (cris_push_dummy_call): Likewise.
1094         * csky-tdep.c (csky_push_dummy_call): Likewise.
1095         * frv-tdep.c (frv_push_dummy_call): Likewise.
1096         * gdbarch.c: Regenerate.
1097         * gdbarch.h: Regenerate.
1098         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1099         return_method.
1100         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1101         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1102         (hppa64_push_dummy_call): Likewise.
1103         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1104         * i386-tdep.c (i386_push_dummy_call): Likewise.
1105         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1106         * infcall.c (call_function_by_hand_dummy): Likewise.
1107         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1108         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1109         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1110         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1111         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1112         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1113         * mep-tdep.c (mep_push_dummy_call): Likewise.
1114         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1115         (mips_n32n64_push_dummy_call): Likewise.
1116         (mips_o32_push_dummy_call): Likewise.
1117         (mips_o64_push_dummy_call): Likewise.
1118         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1119         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1120         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1121         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1122         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1123         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1124         (ppc64_sysv_abi_push_dummy_call): Likewise.
1125         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1126         (ppc64_sysv_abi_push_dummy_call): Likewise.
1127         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1128         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1129         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1130         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1131         * rx-tdep.c (rx_push_dummy_call): Likewise.
1132         * s390-tdep.c (s390_push_dummy_call): Likewise.
1133         * score-tdep.c (score_push_dummy_call): Likewise.
1134         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1135         (sh_push_dummy_call_nofpu): Likewise.
1136         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1137         (sparc32_push_dummy_call): Likewise.
1138         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1139         (sparc64_push_dummy_call): Likewise.
1140         * spu-tdep.c (spu_push_dummy_call): Likewise.
1141         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1142         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1143         * v850-tdep.c (v850_push_dummy_call): Likewise.
1144         * vax-tdep.c (vax_push_dummy_call): Likewise.
1145         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1146         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1147
1148 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1149
1150         * gdbarch.sh (enum function_call_return_method): Add enum.
1151         * gdbarch.h: Regenerate.
1152         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1153
1154 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
1155
1156         * unittests/copy_bitwise-selftests.c: New file.
1157         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1158         (selftests::copy_bitwise_tests): Delete, moving this code to
1159         unittests/copy_bitwise-selftests.c instead.
1160         (_initialize_utils): Do not register copy_bitwise tests.
1161         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1162         unittests/copy_bitwise-selftests.c.
1163
1164 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
1165
1166         * ada-lang.c (move_bits): Delete. Update all callers to use
1167         copy_bitwise instead.
1168         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1169         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1170         Move from here to utils.c.
1171         (_initialize_dwarf2loc): Remove call to register copy_bitwise
1172         selftests.
1173         * utils.h (copy_bitwise): Add declaration.
1174         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1175         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1176         Moved here from dwarf2loc.c.
1177         (_initialize_utils): Register copy_bitwise selftests.
1178
1179 2018-11-14  Jim Wilson  <jimw@sifive.com>
1180
1181         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1182         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1183         then increment next_regnum if odd.
1184         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
1185         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
1186         function type.  Pass new arg to riscv_arg_location based on function
1187         type.
1188         (riscv_return_value): Pass new arg to riscv_arg_location.
1189
1190         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1191         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1192         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1193
1194         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1195         setting len.  New local align, set to max of arg align and xlen,
1196         and pass to first riscv_assign_stack_location call.
1197
1198 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
1199
1200         * skip.c (complete_skip_number): New function.
1201         (_initialize_step_skip): Add completers to some skip commands.
1202
1203 2018-11-09  Tom Tromey  <tom@tromey.com>
1204
1205         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1206         (struct remote_g_packet_data): Derive from allocate_on_obstack.
1207         <guesses>: Now a std::vector.
1208         (remote_g_packet_data_init, register_remote_g_packet_guess):
1209         Update.
1210         (remote_read_description_p): Update.  Return bool.
1211         (remote_target::read_description): Update.
1212         (struct remote_g_packet_guess): Add constructor.
1213
1214 2018-11-09  Tom Tromey  <tom@tromey.com>
1215
1216         * common/scoped_fd.h (class scoped_fd): Add move constructor and
1217         move assignment operator.
1218         * psymtab.c (psymtab_to_fullname): Update.
1219         * source.h (open_source_file): Return scoped_fd.
1220         (find_and_open_source): Likewise.
1221         * source.c (open_source_file): Return scoped_fd.
1222         (get_filename_and_charpos): Update.
1223         (print_source_lines_base): Update.  Use scoped_fd::to_file.
1224         (forward_search_command): Likewise.
1225         (reverse_search_command): Likewise.
1226         (find_and_open_source): Return scoped_fd.
1227         * tui/tui-source.c (tui_set_source_content): Update.  Use
1228         gdb_file_up.
1229
1230 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
1231
1232         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1233         overflow.
1234
1235 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1236
1237         * configure: Regenerate.
1238
1239 2018-11-09  Tom de Vries  <tdevries@suse.de>
1240
1241         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1242         unconditionally, to set the language of the symbol.  Manage freeing
1243         returned pointer using gdb::unique_xmalloc_ptr.
1244
1245 2018-11-08  Tom Tromey  <tom@tromey.com>
1246
1247         * record.c (require_record_target): Upper-case "<TAB>".
1248
1249 2018-11-08  Tom Tromey  <tom@tromey.com>
1250
1251         * python/lib/gdb/command/pretty_printers.py
1252         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1253
1254 2018-11-08  Tom Tromey  <tom@tromey.com>
1255
1256         PR gdb/23555:
1257         PR gdb/23838:
1258         * target.h (target_supports_terminal_ours): Return bool.
1259         * target.c (target_supports_terminal_ours): Handle case where
1260         current_top_target returns nullptr.  Return bool.
1261
1262 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
1263
1264         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1265         return the correct count for potential HFAs.
1266
1267 2018-11-08  Jan Beulich  <jbeulich@suse.com>
1268
1269         * i387-tdep.c (i387_supply_xsave): Split handling of
1270         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1271         (i387_collect_xsave): Likewise.
1272
1273 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1274
1275         * riscv-tdep.c (riscv_insn::decode): Update header comment.
1276         (riscv_frame_this_id): Catch errors thrown while building the
1277         frame cache, leave the frame id as the default, which is the outer
1278         frame id.
1279
1280 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1281
1282         * ada-lang.c (read_atcb): Only set task_info->called_task if
1283         task_info->state == Entry_Caller_Sleep.
1284         (print_ada_task_info): Do not check task_info->state before
1285         checking task_info->called_task.
1286         (info_task): Likewise.
1287
1288 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1289
1290         * ada-tasks.c (read_atcb): Clear task_info before computing
1291         the value of each of its fields.
1292
1293 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1294
1295         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1296         NULL before dereferencing it.
1297
1298 2018-11-06  Tom de Vries  <tdevries@suse.de>
1299
1300         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1301         program headers.
1302
1303 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
1304
1305         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1306         so that it applies to uclinux as well.
1307
1308 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
1309
1310         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1311         when on AAPCS.
1312
1313 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
1314
1315         * riscv-fbsd-nat.c (getregs_supplies): Return true for
1316         RISCV_CSR_SSTATUS_REGNUM.
1317
1318 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1319
1320         * source.c (open_source_file): Fix leak by transferring the
1321         current s->fullname to the unique_xmalloc_ptr fullname given
1322         to find_and_open_source.
1323
1324 2018-11-04  Tom Tromey  <tom@tromey.com>
1325
1326         * varobj.c (install_default_visualizer): Update.
1327         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1328         Return gdbpy_ref.
1329         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1330         (find_pretty_printer_from_progspace)
1331         (find_pretty_printer_from_gdb, find_pretty_printer)
1332         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1333         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1334         Update.
1335
1336 2018-11-04  Tom Tromey  <tom@tromey.com>
1337
1338         * python/python.c (gdbpy_parameter_value): Update.
1339         * python/python-internal.h (python_string_to_unicode)
1340         (python_string_to_target_python_string)
1341         (host_string_to_python_string): Return gdbpy_ref.
1342         * python/py-utils.c (python_string_to_unicode)
1343         (unicode_to_encoded_python_string)
1344         (unicode_to_target_python_string)
1345         (python_string_to_target_string)
1346         (python_string_to_target_python_string): Return gdbpy_ref.
1347         (python_string_to_host_string): Update.
1348         (host_string_to_python_string): Return gdbpy_ref.
1349         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1350         (stpy_fullname): Update.
1351         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1352         Update.
1353         * python/py-prettyprint.c (print_string_repr): Update.
1354         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1355         (objfpy_get_build_id): Update.
1356         * python/py-breakpoint.c (bppy_get_location)
1357         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1358         Update.
1359
1360 2018-11-04  Tom Tromey  <tom@tromey.com>
1361
1362         * python/python-internal.h (gdb_py_object_from_longest)
1363         (gdb_py_object_from_ulongest): Return gdbpy_ref.
1364         * python/py-value.c (valpy_int): Update.
1365         * python/py-utils.c (gdb_py_object_from_longest): Return
1366         gdbpy_ref.
1367         (gdb_py_object_from_ulongest): Likewise.
1368         * python/py-type.c (typy_get_alignof): Update.
1369         * python/py-linetable.c (ltpy_get_all_source_lines)
1370         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1371         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1372
1373 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1374
1375         * ada-lang.c (_initialize_ada_language): Fix typo.
1376
1377 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1378
1379         * language.c (type): Remove.
1380         (_initialize_language): Remove assignment to type.
1381
1382 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
1383
1384         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1385         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1386         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1387         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1388         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1389         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1390         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1391         and aarch64-ravenscar-thread.o.
1392         * NEWS: Add entry documenting Ravenscar tasking support
1393         on AArch64 ELF.
1394
1395 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1396
1397         * symtab.c (info_functions_command): Initialize quiet flag.
1398         * stack.c (info_args_command): Likewise.
1399
1400 2018-11-01  Jim Wilson  <jimw@sifive.com>
1401
1402         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1403         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1404         debugging messages.
1405
1406 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1407
1408         * ada-lang.c (ada_watch_location_expression): New function.
1409         (ada_language_defn): Set la_watch_location_expression to
1410         ada_watch_location_expression.
1411
1412 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1413
1414         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1415
1416 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1417
1418         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1419         shifting.
1420
1421 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1422             Joel Brobecker  <brobecker@adacore.com>
1423
1424         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1425         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1426         * arm-pikeos-tdep.c: New file.
1427         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1428         embedded system.
1429         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1430
1431 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1432
1433         * common/pathstuff.c (get_standard_temp_dir): New.
1434         * common/pathstuff.h (get_standard_temp_dir): New.
1435         * config.in: Re-generate.
1436         * configure: Re-generate.
1437         * configure.ac: Don't check for mkdtemp.
1438         * gnulib/aclocal-m4-deps.mk: Re-generate.
1439         * gnulib/aclocal.m4: Re-generate.
1440         * gnulib/config.in: Re-generate.
1441         * gnulib/configure: Re-generate.
1442         * gnulib/import/Makefile.am: Re-generate.
1443         * gnulib/import/Makefile.in: Re-generate.
1444         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1445         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1446         * gnulib/import/m4/mkdtemp.m4: New file.
1447         * gnulib/import/mkdtemp.c: New file.
1448         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1449         Add mkdtemp module.
1450         * unittests/mkdir-recursive-selftests.c (test): Use
1451         get_standard_temp_dir.
1452         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1453         ifdef.
1454         * compile/compile.c (get_compile_file_tempdir): Likewise.
1455
1456 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1457
1458         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1459         (SIG_FRAME_LR_OFFSET64): New define.
1460         (SIG_FRAME_FP_OFFSET64): New define.
1461         (aix_sighandle_frame_cache): New Function.
1462         (aix_sighandle_frame_this_id): New Function.
1463         (aix_sighandle_frame_prev_register): New Function.
1464         (aix_sighandle_frame_sniffer): New Function.
1465         (aix_sighandle_frame_unwind): New global variable.
1466         (rs6000_aix_init_osabi): Install new frame unwinder.
1467
1468 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1469
1470         PR gdb/23835
1471         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1472         already defined.
1473
1474 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1475
1476         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1477
1478 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1479
1480         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1481         (producer_is_icc): New function.
1482         (check_producer): Set producer_is_icc field on dwarf2_cu.
1483         (dwarf2_init_integer_type): New function.
1484         (read_base_type): Call dwarf2_init_integer_type instead of
1485         init_integer_type in all cases.
1486         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1487         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1488         LEN is greater than 0.
1489
1490 2018-10-30  Tom Tromey  <tom@tromey.com>
1491
1492         * main.c (captured_main_1): Check return value of bfd_init.
1493
1494 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1495
1496         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1497         Adjust comments.
1498
1499 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1500
1501         * procfs.c: Include common/pathstuff.h.
1502
1503 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1504
1505         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1506         Add missing braces.  No functional change.
1507
1508 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1509
1510         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1511         to report a bad option and fix indentation.
1512         * demangle.c (demangle_command): Use report_unrecognized_option_error
1513         to report a bad option and correctly report the bad option.
1514
1515 2018-10-27  Tom Tromey  <tom@tromey.com>
1516
1517         PR cli/23364:
1518         * darwin-nat.c (copied_shell): New global.
1519         (may_have_sip): Rename from should_disable_startup_with_shell.
1520         (copy_shell_to_cache, maybe_cache_shell): New functions.
1521         (darwin_nat_target::create_inferior): Update.  Use
1522         copied_shell.
1523
1524 2018-10-27  Tom Tromey  <tom@tromey.com>
1525
1526         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1527         (run_tests): Call test_to_file.
1528         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1529         temporary files.
1530         * common/scoped_fd.h (scoped_fd::to_file): New method.
1531
1532 2018-10-27  Tom Tromey  <tom@tromey.com>
1533
1534         * unittests/scoped_mmap-selftests.c (test_normal): Use
1535         gdb_mkostemp_cloexec.
1536         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1537         Use gdb_mkostemp_cloexec.
1538         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1539         gnulib/config.in, gnulib/configure,
1540         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1541         gnulib/import/m4/gnulib-cache.m4,
1542         gnulib/import/m4/gnulib-comp.m4: Update.
1543         * gnulib/import/m4/mkostemp.m4: New file.
1544         * gnulib/import/m4/mkstemp.m4: Remove.
1545         * gnulib/import/mkostemp.c: New file.
1546         * gnulib/import/mkstemp.m4: Remove.
1547         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1548         mkstemp, add mkostemp.  Apply new patch.
1549         * gnulib/import/stdlib.in.h: Apply patch.
1550         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1551         New file.
1552         * dwarf-index-write.c (write_psymtabs_to_index): Use
1553         gdb_mkostemp_cloexec.
1554         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1555
1556 2018-10-27  Tom Tromey  <tom@tromey.com>
1557
1558         * unittests/mkdir-recursive-selftests.c: New file.
1559         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1560         unittests/mkdir-recursive-selftests.c.
1561         * dwarf-index-cache.c (mkdir_recursive): Move to
1562         common/filestuff.c.
1563         (index_cache::store): Check return value of mkdir_recursive.
1564         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1565         (_initialize_index_cache): Don't register test.
1566         * common/filestuff.h (mkdir_recursive): Declare.
1567         * common/filestuff.c (mkdir_recursive): Move from
1568         dwarf-index-cache.c.  Return bool.
1569
1570 2018-10-27  Tom Tromey  <tom@tromey.com>
1571
1572         * dwarf-index-write.c (write_psymtabs_to_index): Move
1573         make_temp_filename to common/pathstuff.c.
1574         * common/pathstuff.h (make_temp_filename): Declare.
1575         * common/pathstuff.c (make_temp_filename): New function, moved
1576         from dwarf-index-write.c.
1577
1578 2018-10-27  Tom Tromey  <tom@tromey.com>
1579
1580         * procfs.c (procfs_target::create_inferior): Use get_shell.
1581         * cli/cli-cmds.c (shell_escape): Use get_shell.
1582         * windows-nat.c (windows_nat_target::create_inferior): Use
1583         get_shell.
1584         * common/pathstuff.c (get_shell): New function.
1585         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1586         (fork_inferior): Use get_shell.
1587         * common/pathstuff.h (get_shell): Declare.
1588
1589 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1590
1591         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1592
1593 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1594
1595         * stack.c (print_variable_and_value_data): Add preg and treg.
1596         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1597         and update callers.
1598         (print_frame_arg_vars): Likewise.
1599         (prepare_reg): New function.
1600         (info_locals_command): Extract info print args and use them.
1601         (info_args_command): Likewise.
1602         (_initialize_stack): Modify on-line help.
1603         * symtab.c (treg_matches_sym_type_name): New function.
1604         (search_symbols): New arg t_regexp.
1605         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1606         (info_variables_command): Extract info print args and use them.
1607         (info_functions_command): Likewise.
1608         (info_types_command): Update call to symtab_symbol_info.
1609         (_initialize_symtab): Modify on-line help.
1610         * symtab.h (treg_matches_sym_type_name): New function.
1611         (search_symbols): New t_regexp arg.
1612
1613 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1614
1615         * cli-utils.c (extract_arg_maybe_quoted): New function.
1616         (extract_info_print_args): New function.
1617         (info_print_args_help): New function.
1618         (report_unrecognized_option_error): New function.
1619         * cli-utils.h (extract_arg_maybe_quoted): New function.
1620         (extract_info_print_args): New function.
1621         (info_print_args_help): New function.
1622         (report_unrecognized_option_error): New function.
1623
1624 2018-10-26  Tom Tromey  <tom@tromey.com>
1625
1626         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1627         (compute_compunit_symtab_includes): Update.
1628         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1629         (compunit_symtab_ptr): Likewise.
1630
1631 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1632
1633         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1634         default_print_auxv_entry for specific tag values.
1635
1636 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1637
1638         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1639
1640 2018-10-26  Jim Wilson  <jimw@sifive.com>
1641
1642         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1643         (riscv_linux_sigframe_init): Declare.
1644         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1645         (riscv_linux_sigframe): New.
1646         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1647         (riscv_linux_sigframe_init): Define.
1648         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1649
1650         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1651         (riscv_isa_flen): Likewise.  Drop static.
1652         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1653         (riscv_isa_flen): Likewise.  Declare.
1654
1655 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1656             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1657
1658         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1659         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1660         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1661         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1662         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1663         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1664         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1665         Define.
1666         (struct ppc_linux_features) <htm>: New field.
1667         (ppc_linux_no_features): Add initializer for htm field.
1668         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1669         new tdescs.
1670         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1671         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1672         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1673         Define if not already defined.
1674         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1675         and rs6000/powerpc-isa207-htm-vsx64l.
1676         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1677         rs6000/powerpc-isa207-htm-vsx64l.xml.
1678         * features/rs6000/power-htm-spr.xml: New file.
1679         * features/rs6000/power-htm-core.xml: New file.
1680         * features/rs6000/power64-htm-core.xml: New file.
1681         * features/rs6000/power-htm-fpu.xml: New file.
1682         * features/rs6000/power-htm-altivec.xml: New file.
1683         * features/rs6000/power-htm-vsx.xml: New file.
1684         * features/rs6000/power-htm-ppr.xml: New file.
1685         * features/rs6000/power-htm-dscr.xml: New file.
1686         * features/rs6000/power-htm-tar.xml: New file.
1687         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1688         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1689         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1690         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1691         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1692         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1693         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1694         fetch_regset with HTM regsets.
1695         (store_register, store_ppc_registers): Call store_regset with HTM
1696         regsets.
1697         (ppc_linux_nat_target::read_description): Set htm field in the
1698         features struct if needed.
1699         * ppc-linux-tdep.c: Include
1700         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1701         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1702         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1703         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1704         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1705         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1706         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1707         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1708         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1709         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1710         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1711         (ppc32_linux_ctarregset): New globals.
1712         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1713         (ppc_linux_collect_core_cpgrregset): New function.
1714         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1715         regsets.
1716         (ppc_linux_core_read_description): Check if the tm spr section is
1717         present and set htm in the features struct.
1718         (_initialize_ppc_linux_tdep): Call
1719         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1720         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1721         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1722         Declare.
1723         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1724         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1725         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1726         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1727         New fields.
1728         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1729         Likewise.
1730         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1731         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1732         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1733         New enum fields.
1734         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1735         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1736         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1737         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1738         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1739         <PPC_CTAR_REGNUM>: Likewise.
1740         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1741         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1742         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1743         (IS_CEFP_PSEUDOREG): Define.
1744         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1745         registers.  Return names for the checkpointed DFP, VSX, and EFP
1746         pseudo registers.
1747         (rs6000_pseudo_register_type): Remove initial assert and raise an
1748         internal error in the else clause instead.  Return types for the
1749         checkpointed DFP, VSX, and EFP pseudo registers.
1750         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1751         checkpointed DFP pseudo registers.
1752         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1753         checkpointed VSX pseudo registers.
1754         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1755         from efpr_pseudo_register_read and
1756         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1757         registers.
1758         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1759         Handle checkpointed DFP, VSX, and EFP registers.
1760         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1761         (efp_ax_pseudo_register_collect): New functions.
1762         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1763         register logic to new functions.  Handle checkpointed DFP, VSX,
1764         and EFP pseudo registers.
1765         (rs6000_gdbarch_init): Look for and validate the htm features.
1766         Include checkpointed DFP, VSX and EFP pseudo-registers.
1767         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1768         HTM registers.
1769
1770 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1771
1772         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1773         without altivec or fpu.
1774
1775 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1776             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1777
1778         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1779         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1780         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1781         Define if not already defined.
1782         * features/rs6000/power-ebb.xml: New file.
1783         * features/rs6000/power-linux-pmu.xml: New file.
1784         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1785         features.
1786         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1787         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1788         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1789         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1790         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1791         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1792         fetch_regset with ebb and pmu regsets.
1793         (store_register, store_ppc_registers): Call store_regset with ebb
1794         and pmu regsets.
1795         (ppc_linux_nat_target::read_description): Set isa207 field in the
1796         features struct if ebb and pmu are avaiable.
1797         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1798         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1799         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1800         and pmu regsets.
1801         (ppc_linux_core_read_description): Check if the pmu section is
1802         present and set isa207 in the features struct.
1803         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1804         (ppc32_linux_pmuregset): Declare.
1805         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1806         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1807         <ppc_sier_regnum>: New field.
1808         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1809         New enum values.
1810         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1811         values.
1812         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1813         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1814         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1815         ebb and pmu features.
1816
1817 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1818             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1819
1820         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1821         (tdesc_powerpc_isa207_vsx64l): Declare.
1822         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1823         (struct ppc_linux_features) <isa207>: New field.
1824         (ppc_linux_no_features): Add initializer for isa207 field.
1825         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1826         new tdescs.
1827         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1828         (NT_PPC_TAR): Define if not already defined.
1829         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1830         rs6000/powerpc-isa207-vsx64l.
1831         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1832         rs6000/powerpc-isa207-vsx64l.xml.
1833         * features/rs6000/power-tar.xml: New file.
1834         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1835         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1836         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1837         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1838         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1839         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1840         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1841         fetch_regset with the TAR regset.
1842         (store_register, store_ppc_registers): Call store_regset with the
1843         TAR regset.
1844         (ppc_linux_nat_target::read_description): Set isa207 field in the
1845         features struct if needed.
1846         * ppc-linux-tdep.c: Include
1847         features/rs6000/powerpc-isa207-vsx32l.c and
1848         features/rs6000/powerpc-isa207-vsx64l.c.
1849         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1850         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1851         regset.
1852         (ppc_linux_core_read_description): Check if the tar section is
1853         present and set isa207 in the features struct.
1854         (_initialize_ppc_linux_tdep): Call
1855         initialize_tdesc_powerpc_isa207_vsx32l and
1856         initialize_tdesc_powerpc_isa207_vsx64l.
1857         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1858         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1859         (enum) <PPC_TAR_REGNUM>: New enum value.
1860         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1861         feature.
1862         (ppc_process_record_op31): Record changes to TAR.
1863
1864 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1865             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1866
1867         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1868         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1869         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1870         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1871         (struct ppc_linux_features) <ppr_dscr>: New field.
1872         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1873         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1874         new tdescs.
1875         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1876         Define if not already defined.
1877         * features/Makefile (WHICH): Add
1878         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1879         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1880         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1881         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1882         * features/rs6000/power-dscr.xml: New file.
1883         * features/rs6000/power-ppr.xml: New file.
1884         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1885         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1886         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1887         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1888         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1889         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1890         * ppc-linux-nat.c: Include <sys/uio.h>.
1891         (fetch_regset, store_regset, check_regset): New functions.
1892         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1893         DSCR and PPR regsets.
1894         (store_register, store_ppc_registers): Call store_regset with
1895         DSCR and PPR regsets.
1896         (ppc_linux_get_hwcap2): New function.
1897         (ppc_linux_nat_target::read_description): Call
1898         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1899         features struct if needed.
1900         * ppc-linux-tdep.c: Include
1901         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1902         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1903         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1904         (ppc32_linux_dscrregset): New globals.
1905         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1906         and dscr regsets.
1907         (ppc_linux_core_read_description): Check if the ppr and dscr
1908         sections are present and set ppr_dscr in the features struct.
1909         (_initialize_ppc_linux_tdep): Call
1910         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1911         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1912         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1913         (ppc32_linux_dscrregset): Declare.
1914         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1915         <ppc_dscr_regnum>: New field.
1916         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1917         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1918         and dscr features.
1919         (ppc_process_record_op31): Record changes to PPR and DSCR.
1920
1921 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1922
1923         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1924         second initializer line for the have_* variables.  Initialize
1925         have_fpu to 0 instead of 1.
1926
1927 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1928
1929         * arch/ppc-linux-common.c (ppc_linux_match_description):
1930         Parenthesize tdesc assignements and indent them properly.
1931
1932 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1933
1934         * ppc-linux-nat.c (fetch_register): Change if statement to else
1935         if.
1936         (store_register): Likewise.
1937
1938 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1939
1940         * rs6000-tdep.c: Remove reggroups.h include.
1941         (rs6000_pseudo_register_reggroup_p): Remove.
1942         (rs6000_gdbarch_init): Remove call to
1943         set_tdesc_pseudo_register_reggroup_p.
1944
1945 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1946
1947         * reggroups.c (default_register_reggroup_p): Return true for
1948         decfloat registers and float_reggroup.
1949
1950 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1951
1952         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1953         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1954         ppc_linux_collect_vrregset by regcache_collect_regset.
1955
1956 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1957
1958         * linux-tdep.c (linux_collect_regset_section_cb): Use
1959         std::vector<gdb_byte> instead of char * and malloc for buf.
1960         Remove xfree.
1961
1962 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1963
1964         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1965         symtab_start instead of always using language_unknown.
1966
1967 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1968
1969         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1970         READ_P parameter, catch and ignore register access errors from
1971         either the old or new MISA location.
1972         (riscv_has_feature): Update call to riscv_read_misa_reg.
1973
1974 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1975
1976         * python/py-function.c (convert_values_to_python): Return
1977         gdbpy_ref<>.  Add header comment.
1978         (fnpy_call): Adjust.
1979
1980 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1981
1982         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1983         (cmdpy_completer_handle_brkchars): Adjust.
1984         (cmdpy_completer): Adjust.
1985
1986 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1987
1988         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1989         Pass correct regnum to raw_supply_zeroed.
1990
1991 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1992
1993         * regcache.c (cooked_read_test): Add CSKY to the list of
1994         architectures with a save_reggroup
1995
1996 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1997
1998         PR gdb/23368
1999         * infrun.c (follow_exec): In the follow_exec_mode_new case,
2000         transfer terminal state from old new new inferior.
2001         * terminal.h (swap_terminal_info): New function.
2002         * inflow.c (swap_terminal_info): New function.
2003
2004 2018-10-23  Tom Tromey  <tom@tromey.com>
2005
2006         * record-btrace.c (get_thread_current_frame_id): Rename from
2007         get_thread_current_frame.  Return a frame_id.
2008         (record_btrace_start_replaying): Update.
2009
2010 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2011
2012         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2013         for CSRs.
2014
2015 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
2016
2017         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2018         have_nonsteppable_watchpoint attribute to 1.
2019
2020 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2021
2022         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2023         register names.
2024         (struct register_alias): Rename to...
2025         (struct riscv_register_alias): ...this, and update comment.
2026         (riscv_register_aliases): Update type, and alias names.  Remove
2027         CSR names from this list.
2028         (riscv_register_name): Use riscv_gdb_reg_names for int and float
2029         register names.  Add an extra assertion.
2030         (riscv_is_regnum_a_named_csr): New function.
2031         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2032
2033 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
2034
2035         * configure.tgt: Add configuration for s12z.
2036         * s12z-tdep.c:  New file.
2037         * NEWS: Mention new target.
2038
2039 2018-10-22  Jim Wilson  <jimw@sifive.com>
2040
2041         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2042         FP reg smaller than FP reg size, and fill with -1 instead of 0.
2043
2044         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2045         (riscv_register_type): Use them.
2046         (riscv_print_one_register_info): Handle union of floats same as float.
2047         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2048         riscv_fpreg_q_type fields.
2049
2050 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2051
2052         * gdbarch.sh (gdbarch_num_cooked_regs): New.
2053         * gdbarch.h: Re-generate.
2054         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2055         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2056         * eval.c (evaluate_subexp_standard): Likewise.
2057         * findvar.c (value_of_register): Likewise.
2058         (value_of_register_lazy): Likewise.
2059         (address_from_register): Likewise.
2060         * frame.c (get_frame_register_bytes): Likewise.
2061         * gdbarch-selftests.c (register_to_value_test): Likewise.
2062         * h8300-tdep.c (h8300_register_type): Likewise.
2063         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2064         (i386_svr4_reg_to_regnum): Likewise.
2065         * infcmd.c (default_print_registers_info): Likewise.
2066         (registers_info): Likewise.
2067         (print_vector_info): Likewise.
2068         (default_print_float_info): Likewise.
2069         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2070         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2071         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2072         (mi_cmd_data_list_changed_registers): Likewise.
2073         (mi_cmd_data_list_register_values): Likewise.
2074         (mi_cmd_data_write_register_values): Likewise.
2075         (mi_cmd_trace_frame_collected): Likewise.
2076         * mips-tdep.c (print_gp_register_row): Likewise.
2077         (mips_print_registers_info): Likewise.
2078         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2079         * regcache.c (init_regcache_descr): Likewise.
2080         (register_size): Likewise.
2081         (register_dump::dump): Likewise.
2082         (cooked_read_test): Likewise.
2083         (cooked_write_test): Likewise.
2084         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2085         (rs6000_gdbarch_init): Likewise.
2086         * stabsread.c (stab_reg_to_regnum): Likewise.
2087         * stack.c (info_frame_command): Likewise.
2088         * target-descriptions.c (tdesc_register_name): Likewise.
2089         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2090         * tui/tui-regs.c (tui_show_register_group): Likewise.
2091         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2092         (user_reg_map_regnum_to_name): Likewise.
2093         (value_of_user_reg): Likewise.
2094         (maintenance_print_user_registers): Likewise.
2095         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2096         (xtensa_register_name): Likewise.
2097         (xtensa_register_type): Likewise.
2098         (xtensa_reg_to_regnum): Likewise.
2099         (xtensa_pseudo_register_read): Likewise.
2100         (xtensa_pseudo_register_write): Likewise.
2101
2102 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2103
2104         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2105         correctly-sized buffer with raw_read.
2106         (amd64_pseudo_register_write): Use correctly-sized buffer for
2107         raw_read/raw_write.
2108
2109 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2110
2111         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2112         in add_prefix_cmd of set print type.
2113
2114 2018-10-19  Tom Tromey  <tom@tromey.com>
2115
2116         PR tui/18388:
2117         * NEWS: Mention tabset deprecation.
2118         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2119         (update_tab_width): New function.
2120         (tui_set_tab_width, tui_show_tab_width): New functions.
2121         (tui_set_tab_width_command): Use update_tab_width.
2122         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
2123         Add new "set tui tab-width" command.
2124         * tui/tui-source.c (tui_set_source_content): Update.
2125         * tui/tui-disasm.c (tui_set_disassem_content): Update.
2126         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2127         Don't declare.
2128         (tui_tab_width): Declare.
2129         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2130         (tui_set_default_tab_len): Remove.
2131
2132 2018-10-19  Tom Tromey  <tom@tromey.com>
2133
2134         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2135         (key_is_backspace, tui_getc): Don't declare.
2136         * tui/tui-io.c (key_is_start_sequence): Now static.
2137         (key_is_end_sequence, key_is_backspace): Remove.
2138         (tui_getc): Now static.
2139
2140 2018-10-19  Tom Tromey  <tom@tromey.com>
2141
2142         * symfile.c (reread_symbols): Clear "static_links".
2143
2144 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
2145
2146         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2147         define.
2148         (aarch64_linux_sigframe_init): Extra boundary checks.
2149
2150 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
2151
2152         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2153         the possibly non-existent tdesc type 'vec128', but the type of raw
2154         register v16 instead.
2155
2156 2018-10-19  Gary Benson <gbenson@redhat.com>
2157
2158         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2159
2160 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
2161
2162         PR cli/23785
2163         * cli/cli-dump.c (restore_binary_file): Check if "file" is
2164         NULL.
2165
2166 2018-10-17  Paul Koning  <paul_koning@dell.com>
2167
2168         * charset.c (convert_between_encodings): Fix unsigned overflow.
2169
2170 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
2171
2172         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2173         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2174         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2175         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2176         New functions.
2177         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2178         and fbsd_info_proc_mappings_header.
2179         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2180         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2181         New.
2182
2183 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
2184
2185         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2186         Solaris Maintainer.
2187
2188 2018-10-15  Tom Tromey  <tom@tromey.com>
2189
2190         * tui/tui.c (strcat_to_buf): Remove casts.
2191         * tui/tui-winsource.c (tui_show_source_line)
2192         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2193         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2194         * tui/tui-windata.c (tui_first_data_item_displayed)
2195         (tui_delete_data_content_windows, tui_erase_data_content)
2196         (tui_display_all_data, tui_display_data_from)
2197         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2198         * tui/tui-win.c (tui_set_win_height)
2199         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2200         casts.
2201         * tui/tui-win.c (tui_resize_all): Remove casts.
2202         (tui_scroll_backward_command, tui_set_focus)
2203         (tui_set_tab_width_command): Likewise.
2204         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2205         * tui/tui-regs.c (tui_show_register_group): Remove cast.
2206         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2207         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2208         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2209         Remove casts.
2210
2211 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2212
2213         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2214         AArch64/ARM maintainer.
2215
2216 2018-10-11  Gary Benson <gbenson@redhat.com>
2217
2218         * interps.h (interp::m_name): Make private and mutable.
2219         * interps.c (interp::~interp): Free m_name.
2220
2221 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2222             Simon Marchi <simark@simark.ca>
2223
2224         * README (`configure' options): Add documentation for new
2225         "--enable-unit-tests" option.
2226         * acinclude.m4: Include "selftest.m4".
2227         * configure: Regenerate.
2228         * configure.ac: Use "GDB_AC_SELFTEST".
2229         * maint.c (maintenance_selftest): Update message informing
2230         that selftests have been disabled.
2231         (maintenance_info_selftests): Likewise.
2232         * selftest.m4: New file.
2233
2234 2018-10-10  Gary Benson <gbenson@redhat.com>
2235
2236         * remote.c (remote_target::remote_send_printf): Add
2237         missing va_end found by Coverity.
2238
2239 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
2240
2241         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2242
2243 2018-10-09  Tom Tromey  <tom@tromey.com>
2244
2245         * configure: Rebuild.
2246         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2247         * NEWS: Update --enable-ubsan documentation.
2248
2249 2018-10-09  Gary Benson <gbenson@redhat.com>
2250
2251         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2252         found by Coverity.
2253
2254 2018-10-08  Tom Tromey  <tom@tromey.com>
2255
2256         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2257         variable.
2258         (riscv_fbsd_init_abi): Likewise.
2259
2260 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2261         * valops.c (value_struct_elt_for_reference): Rename local variable
2262         to work around the shadowing a previous local warning.
2263
2264 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2265
2266         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2267         * NEWS: Mention new FreeBSD/riscv native configuration.
2268         * configure.host: Add riscv*-*-freebsd*.
2269         * configure.nat: Likewise.
2270         * riscv-fbsd-nat.c: New file.
2271
2272 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2273
2274         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2275         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2276         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2277         * NEWS: Mention new FreeBSD/riscv target.
2278         * configure.tgt: Add riscv*-*-freebsd*.
2279         * riscv-fbsd-tdep.c: New file.
2280         * riscv-fbsd-tdep.h: New file.
2281
2282 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2283
2284         * regcache.h (struct regcache_map_entry): Note that this type can
2285         be used with traditional frame caches.
2286         * trad-frame.c (trad_frame_set_reg_regmap): New.
2287         * trad-frame.h (trad_frame_set_reg_regmap): New.
2288
2289 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2290
2291         PR c++/16841
2292         * valops.c (get_virtual_base_offset): New function.
2293         (value_struct_elt_for_reference): Use it to get virtual base offset
2294         and add it in calculating class member address.
2295
2296 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
2297
2298         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2299         (check_producer): Check if the producer is codewarrior.
2300         (producer_is_codewarrior): New function.
2301         (lnp_state_machine::record_line): Ignore is_stmt flag for records
2302         produced by codewarrior.
2303         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2304
2305 2018-10-06  Tom Tromey  <tom@tromey.com>
2306
2307         PR python/19399:
2308         * python/py-inferior.c: Add "architecture" entry.
2309         (infpy_architecture): New function.
2310
2311 2018-10-06  Tom Tromey  <tom@tromey.com>
2312
2313         PR python/21765:
2314         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2315         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2316         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
2317         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2318
2319 2018-10-06  Tom Tromey  <tom@tromey.com>
2320
2321         PR build/17077:
2322         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2323         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2324         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2325         #include.
2326
2327 2018-10-06  Tom Tromey  <tom@tromey.com>
2328
2329         * python/py-breakpoint.c (bppy_get_location): Handle a
2330         bp_breakpoint without a location.
2331
2332 2018-10-06  Tom Tromey  <tom@tromey.com>
2333
2334         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2335         (_RegEx): Reformat help text.
2336         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2337         (AnyCallerIs, AnyCallerMatches): Reformat help text.
2338         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2339         text.
2340         * python/lib/gdb/command/xmethods.py (InfoXMethod)
2341         (EnableXMethod, DisableXMethod): Remove help indentation.
2342         Capitalize meta-syntactic variables.
2343         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2344         (EnableUnwinder, DisableUnwinder): Remove help indentation.
2345         Capitalize meta-syntactic variables.
2346         * python/lib/gdb/command/explore.py (ExploreCommand)
2347         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2348         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2349         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2350         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2351         Remove help indentation.
2352         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2353         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2354         (DisableFrameFilter, SetFrameFilterPriority)
2355         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2356
2357 2018-10-06  Tom Tromey  <tom@tromey.com>
2358
2359         PR tui/28819:
2360         * tui/tui-io.c (gdb_wgetch): New function.
2361         (tui_mld_getc, tui_getc): Use it.
2362
2363 2018-10-05  Tom Tromey  <tom@tromey.com>
2364
2365         * sol-thread.c (sol_thread_target::wait): Rename inner
2366         "save_ptid".
2367
2368 2018-10-04  Tom Tromey  <tom@tromey.com>
2369
2370         * configure: Rebuild.
2371         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2372
2373 2018-10-04  Tom Tromey  <tom@tromey.com>
2374
2375         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2376         declaration of "block".
2377
2378 2018-10-04  Tom Tromey  <tom@tromey.com>
2379
2380         * common/filestuff.c (fdwalk): Remove inner declaration of
2381         "result".
2382
2383 2018-10-04  Tom Tromey  <tom@tromey.com>
2384
2385         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2386         "structs_addr" and hoist declaration.
2387
2388 2018-10-04  Tom Tromey  <tom@tromey.com>
2389
2390         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2391         variable "size".
2392
2393 2018-10-04  Tom Tromey  <tom@tromey.com>
2394
2395         * mdebugread.c (parse_partial_symbols): Use std::string.
2396
2397 2018-10-04  Tom Tromey  <tom@tromey.com>
2398
2399         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2400         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2401         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2402         header.
2403         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2404         more inner scope.
2405         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2406         * varobj.c (varobj_update): Rename inner "newobj",
2407         "type_changed".
2408         * valprint.c (generic_emit_char): Rename inner "buf".
2409         * valops.c (find_overload_match): Rename inner "temp".
2410         (value_struct_elt_for_reference): Declare "v" in more inner
2411         scope.
2412         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2413         * unittests/array-view-selftests.c (run_tests): Rename inner
2414         "vec".
2415         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2416         header.
2417         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2418         "tsv" in more inner scope.
2419         (print_one_static_tracepoint_marker): Rename inner
2420         "tuple_emitter".
2421         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2422         (tic6x_push_dummy_call): Don't redeclare "addr".
2423         * target-float.c: Declare "dto" lower.
2424         * symtab.c (lookup_local_symbol): Rename inner "sym".
2425         (find_pc_sect_line): Rename inner "pc".
2426         * stack.c (print_frame): Don't redeclare "gdbarch".
2427         (return_command): Rename inner "gdbarch".
2428         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2429         "sp".
2430         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2431         header.
2432         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2433         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2434         scope.
2435         * remote.c (remote_target::update_thread_list): Don't redeclare
2436         "tp".
2437         (remote_target::process_initial_stop_replies): Rename inner
2438         "thread".
2439         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2440         (remote_target::wait_as): Don't redeclare "stop_reply".
2441         (remote_target::get_thread_local_address): Rename inner
2442         "result".
2443         (remote_target::get_tib_address): Likewise.
2444
2445         * regcache.c (cooked_read_test): Rename "regnum".
2446         * record-btrace.c (cmd_record_btrace_start): Rename inner
2447         "exception".
2448         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2449         loop header.
2450         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2451         header.
2452         (ppu2spu_sniffer): Rename inner "buf".
2453         * parse.c (operator_check_standard): Rename inner "type",
2454         "objfile".
2455         * p-valprint.c (pascal_val_print): Introduce new scope for
2456         "low_bound", "high_bound".
2457         * p-exp.y (yylex): Declare "i" in loop header.
2458         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2459         Lower declaration of "s".
2460         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2461         header.
2462         (nios2_push_dummy_call): Rename "len".
2463         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2464         "buf".
2465         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2466         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2467         (linux_xfer_osdata_modules): Likewise.
2468         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2469         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2470         (mips_o64_push_dummy_call): Likewise.
2471         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2472         "op".
2473         * mi/mi-main.c (list_available_thread_groups): Rename inner
2474         "tuple_emitter".
2475         (mi_cmd_data_read_memory): Rename inner "opts".
2476         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2477         "tuple_emitter".
2478         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2479         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2480         more inner scope.
2481         (parse_partial_symbols): Rename inner "pst", "p", "name"
2482         * main.c (captured_main_1): Rename inner "i"s.
2483         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2484         "oso2".
2485         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2486         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2487         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2488         (handle_signal_stop): Rename inner "gdbarch".
2489         (handle_command): Declare "signum" in loop header.
2490         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2491         "status".
2492         (examine_prologue): Rename inner "sol" and "sof".
2493         (ia64_extract_return_value): Rename inner "val".  Declare another
2494         "val" in a more inner scope.
2495         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2496         inner scope.
2497         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2498         "except".
2499         * findvar.c (default_read_var_value): Don't redeclare "addr".
2500         * f-exp.y (yylex): Declare "i" in loop header.
2501         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2502         Rename inner "type", "expect_type".
2503         (evaluate_subexp_for_sizeof): Rename inner "pc".
2504         * elfread.c (elf_symfile_read): Rename inner "abfd".
2505         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2506         "bytes_read".
2507         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2508         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2509         (dwarf_decode_line_header): Rename inner "lh".
2510         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2511         "offset".  Declare "i" in loop header.
2512         (disassemble_dwarf_expression): Rename inner "addr_size".
2513         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2514         inner "result".
2515         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2516         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2517         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2518         "inner_list_emitter".
2519         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2520         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2521         declaration in a block.
2522         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2523         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2524         "obstack_final_size".
2525         * cp-support.c (inspect_type): Declare "i" in loop header.
2526         * compile/compile.c (compile_instance::insert_symbol_error):
2527         Rename inner "e".
2528         * common/agent.c (agent_run_command): Remove inner "ret"
2529         declaration.
2530         * coffread.c (coff_symfile_read): Rename inner "name".
2531         (coff_symfile_read): Rename inner "abfd".
2532         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2533         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2534         "high".
2535         * c-exp.y (lex_one_token): Move "len" declaration lower.
2536         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2537         "gdbarch".
2538         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2539         "b".
2540         (watch_command_1): Declare "mark" later.
2541         (clear_command): Don't shadow "a" or "b".
2542         (delete_command): Rename inner "b".
2543         (delete_trace_command): Likewise.
2544         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2545         "op".
2546         (arm_gdbarch_init): Remove inner "e_flags".
2547         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2548         "offset" in inner blocks.
2549
2550 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2551
2552         * dwarf-index-write.c (file_write): Don't write if the vector is
2553         empty.
2554
2555 2018-10-05  Tom de Vries  <tdevries@suse.de>
2556
2557         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2558         PyArg_ParseTuple call.
2559
2560 2018-10-05  Tom de Vries  <tdevries@suse.de>
2561
2562         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2563         PyArg_ParseTuple call.
2564
2565 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2566
2567         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2568         to avoid exceeding 80 characters per line limit.
2569
2570 2018-10-04  Tom Tromey  <tom@tromey.com>
2571
2572         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2573         (reread_symbols): Update.
2574         * complaints.h (clear_complaints): Remove argument.
2575         * complaints.c (enum complaint_series): Remove.
2576         (series): Remove global.
2577         (complaint_internal): Update.
2578         (clear_complaints): Remove argument.
2579
2580 2018-10-04  Tom Tromey  <tom@tromey.com>
2581
2582         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2583         debugging symbols" message if there is a separate debug objfile.
2584
2585 2018-10-04  Tom Tromey  <tom@tromey.com>
2586
2587         PR cli/19551:
2588         * symfile.c (symbol_file_add_with_addrs): Update output.
2589         * psymtab.c (require_partial_symbols): Update output.
2590
2591 2018-10-04  Tom Tromey  <tom@tromey.com>
2592
2593         PR cli/22234:
2594         * complaints.c: Emit \n.
2595
2596 2018-10-04  Tom Tromey  <tom@tromey.com>
2597
2598         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2599         (separate_debug_file_exists, find_separate_debug_file)
2600         (add_symbol_file_command, reread_symbols, allocate_symtab)
2601         (allocate_compunit_symtab): Use filtered printing, not
2602         unfiltered.
2603         * psymtab.c (require_partial_symbols, dump_psymtab)
2604         (allocate_psymtab): Use filtered printing, not unfiltered.
2605
2606 2018-10-04  Tom Tromey  <tom@tromey.com>
2607
2608         * complaints.c (complaint_internal): Correctly check complaint
2609         count.
2610
2611 2018-10-04  Tom Tromey  <tom@tromey.com>
2612
2613         * complaints.h (struct complaints): Remove declaration.
2614         * complaints.c (clear_complaints): Remove an unused variable.
2615
2616 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2617
2618         * MAINTAINERS (Write After Approval): Add self.
2619
2620 2018-10-03  Tom Tromey  <tom@tromey.com>
2621
2622         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2623         "buffer_contents".
2624         * coffread.c (coff_symtab_read): Initialize "newobj".
2625
2626 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2627
2628         * dwarf2read.c (read_func_scope): Remove struct keyword in
2629         range-based for.
2630
2631 2018-10-03  Tom Tromey  <tom@tromey.com>
2632
2633         * README: Mention --enable-ubsan.
2634         * NEWS: Mention --enable-ubsan.
2635         * acinclude.m4: Include sanitize.m4.
2636         * configure: Rebuild.
2637         * configure.ac: Call AM_GDB_UBSAN.
2638         * sanitize.m4: New file.
2639
2640 2018-10-03  Tom Tromey  <tom@tromey.com>
2641
2642         * expression.h (enum exp_opcode): Use uint8_t as base type.
2643         * expprint.c (op_name): Handle invalid opcodes.
2644
2645 2018-10-03  Tom Tromey  <tom@tromey.com>
2646
2647         * parse.c (prefixify_expression): Add assert.
2648         (parse_exp_in_context_1): Throw exception if the expression is
2649         empty.
2650
2651 2018-10-03  Tom Tromey  <tom@tromey.com>
2652
2653         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2654
2655 2018-10-03  Tom Tromey  <tom@tromey.com>
2656
2657         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2658
2659 2018-10-03  Tom Tromey  <tom@tromey.com>
2660
2661         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2662         unsigned.
2663
2664 2018-10-03  Tom Tromey  <tom@tromey.com>
2665
2666         * findvar.c (extract_integer): Do work in an unsigned type.
2667
2668 2018-10-03  Tom Tromey  <tom@tromey.com>
2669
2670         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2671         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2672         base type.
2673         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2674         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2675         type.
2676         * c-lang.h (enum c_string_type_values): Use unsigned as base
2677         type.
2678         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2679
2680 2018-10-03  Tom Tromey  <tom@tromey.com>
2681
2682         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2683         <~dwarf2_frame_state_reg_info>: Update.
2684         <dwarf2_frame_state_reg_info>: Update.
2685         <alloc_regs>: Add assertion.  Update.
2686         <reg>: Now a std::vector.
2687         <num_regs>: Remove.
2688         <swap>: Update.
2689         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2690         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2691
2692 2018-10-03  Tom Tromey  <tom@tromey.com>
2693
2694         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2695
2696 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2697
2698         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2699
2700 2018-10-02  Tom Tromey  <tom@tromey.com>
2701
2702         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2703
2704 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2705
2706         * NEWS: Mention changed commands.
2707         * ser-uds.c: New file.
2708         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2709         * configure: Regenerate.
2710         * Makefile.in: Add new file.
2711         * serial.c (serial_open): Check if filename is a socket
2712         and lookup the appropriate interface accordingly.
2713
2714 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2715
2716         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2717         define.
2718         (AARCH64_EXTRA_MAGIC): Likewise.
2719         (AARCH64_FPSIMD_MAGIC): Likewise.
2720         (AARCH64_SVE_MAGIC): Likewise.
2721         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2722         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2723         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2724         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2725         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2726         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2727         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2728         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2729         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2730         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2731         (read_aarch64_ctx): Add function.
2732         (aarch64_linux_sigframe_init): Detect FP registers.
2733
2734 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2735
2736         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2737         (AARCH64_D0_REGNUM): Likewise.
2738         (AARCH64_S0_REGNUM): Likewise.
2739         (AARCH64_H0_REGNUM): Likewise.
2740         (AARCH64_B0_REGNUM): Likewise.
2741         (AARCH64_SVE_V0_REGNUM): Likewise.
2742         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2743         (AARCH64_D0_REGNUM): Likewise.
2744         (AARCH64_S0_REGNUM): Likewise.
2745         (AARCH64_H0_REGNUM): Likewise.
2746         (AARCH64_B0_REGNUM): Likewise.
2747         (AARCH64_SVE_V0_REGNUM): Likewise.
2748
2749 2018-10-01  Gary Benson <gbenson@redhat.com>
2750
2751         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2752         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2753         prfpregset_t instead of gdb_prfpregset_t.
2754         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2755         * configure, config.in: Rebuild.
2756
2757 2018-10-01  Gary Benson <gbenson@redhat.com>
2758
2759         * common/gdb_proc_service.h: New file, factored out from...
2760         * gdb_proc_service.h: Moved common code to the above file.
2761         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2762
2763 2018-10-01  Gary Benson <gbenson@redhat.com>
2764
2765         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2766         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2767
2768 2018-10-01  Gary Benson <gbenson@redhat.com>
2769
2770         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2771         (AC_CHECK_HEADERS): Check for linux/elf.h.
2772         * configure, config.in: Rebuild.
2773         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2774         doesn't define elf_fpregset_t.
2775
2776 2018-10-01  Gary Benson <gbenson@redhat.com>
2777
2778         * gdb_proc_service.h: Whitespace change.
2779
2780 2018-10-01  Tom Tromey  <tom@tromey.com>
2781
2782         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2783         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2784         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2785
2786 2018-10-01  Tom Tromey  <tom@tromey.com>
2787
2788         * README: Minor change.
2789
2790 2018-09-30  Pedro Alves  <palves@redhat.com>
2791
2792         * darwin-nat-info.c (darwin_debug_regions_recurse)
2793         (info_mach_exceptions_command): Remove unused local variables.
2794         * darwin-nat.c (darwin_decode_notify_message)
2795         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2796         (darwin_stop_inferior, darwin_setup_exceptions)
2797         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2798         (darwin_nat_target::attach, darwin_nat_target::detach)
2799         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2800         local variables.
2801         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2802         variables.
2803
2804 2018-09-29  Tom Tromey  <tom@tromey.com>
2805
2806         * README: Remove some leftover text.
2807
2808 2018-09-29  Tom Tromey  <tom@tromey.com>
2809
2810         * PROBLEMS: Rewrite.
2811         * README: Update.
2812
2813 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2814
2815         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2816         case with explicit breakpoint kind.
2817         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2818         'additional_info' and related logic.
2819         (riscv_debug_breakpoints): New variable.
2820         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2821         instruction to determine the breakpoint kind.
2822         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2823         flag.  Update description of 'set/show riscv
2824         use-compressed-breakpoints' flag.
2825
2826 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2827
2828         (NEWS): Mention changes to frame related commands.
2829         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2830         (add_prefix_cmd_suppress_notification): New function.
2831         (add_com_suppress_notification): Call
2832         add_cmd_suppress_notification.
2833         * command.h (add_cmd_suppress_notification): Declare.
2834         (add_prefix_cmd_suppress_notification): Declare.
2835         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2836         (parse_frame_specification): Moved from stack.c, with
2837         simplification to handle a single argument.
2838         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2839         switch to the selected frame.  Add a header comment.
2840         * stack.c: Remove 'safe-ctype.h' include.
2841         (find_frame_for_function): Add declaration.
2842         (find_frame_for_address): New function.
2843         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2844         (frame_selection_by_function_completer): New function.
2845         (info_frame_command): Rename to...
2846         (info_frame_command_core): ...this, and update parameter types.
2847         (select_frame_command): Rename to...
2848         (select_frame_command_core): ...this, and update parameter types.
2849         (frame_command): Rename to...
2850         (frame_command_core): ...this, and update parameter types.
2851         (class frame_command_helper): New class to wrap implementations of
2852         frame related sub-commands.
2853         (frame_apply_cmd_list): New static global.
2854         (frame_cmd_list): Make static.
2855         (select_frame_cmd_list): New global for sub-commands.
2856         (info_frame_cmd_list): New global for sub-commands.
2857         (_initialize_stack): Register sub-commands for 'frame',
2858         'select-frame', and 'info frame'.  Update 'frame apply' commands
2859         to use frame_apply_cmd_list.  Move function local static
2860         frame_apply_list to file static frame_apply_cmd_list for
2861         consistency.
2862         * stack.h (select_frame_command): Delete declarationn.
2863         (select_frame_for_mi): Declare new function.
2864
2865 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2866
2867         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2868         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2869         and NOP.
2870
2871 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2872
2873         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2874
2875 2018-09-26  Tom Tromey  <tom@tromey.com>
2876
2877         * valops.c (auto_abandon): Remove dead code.
2878
2879 2018-09-26  Tom Tromey  <tom@tromey.com>
2880
2881         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2882
2883 2018-09-24  Tom Tromey  <tom@tromey.com>
2884
2885         * common/pathstuff.c (get_standard_cache_dir): Make
2886         "xdg_cache_home" and "home" const.
2887         * top.c (init_history): Make "tmpenv" const.
2888         * main.c (get_init_files): Make "homedir" const.
2889
2890 2018-09-23  Tom Tromey  <tom@tromey.com>
2891
2892         PR python/18852:
2893         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2894
2895 2018-09-23  Tom Tromey  <tom@tromey.com>
2896
2897         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2898         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2899         * python/python-internal.h (gdbpy_handle_exception): Declare.
2900         * python/py-utils.c (gdbpy_handle_exception): New function.
2901
2902 2018-09-23  Tom Tromey  <tom@tromey.com>
2903
2904         PR python/17284:
2905         * python/py-type.c (typy_template_argument): Check for negative
2906         argument number.
2907
2908 2018-09-23  Tom Tromey  <tom@tromey.com>
2909
2910         PR python/14062:
2911         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2912
2913 2018-09-23  Tom Tromey  <tom@tromey.com>
2914
2915         PR python/18170:
2916         * python/py-value.c (valpy_int): Allow conversion from pointer
2917         type.
2918
2919 2018-09-23  Tom Tromey  <tom@tromey.com>
2920
2921         PR python/20126:
2922         * python/py-value.c (valpy_int): Respect type sign.
2923
2924 2018-09-23  Tom Tromey  <tom@tromey.com>
2925
2926         PR python/18352;
2927         * python/py-value.c (valpy_float): Allow conversions from int or
2928         char.
2929         (valpy_int, valpy_long): Allow conversions from float.
2930
2931 2018-09-23  Tom Tromey  <tom@tromey.com>
2932
2933         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2934         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2935
2936 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2937
2938         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2939         __sighndlr.
2940         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2941
2942 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2943
2944         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2945         target_terminal::ours().
2946
2947 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2948
2949         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2950         of vl to ULONGEST.
2951
2952 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2953
2954         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2955         redundant condition.
2956
2957 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2958
2959         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2960
2961         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2962         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2963         * sol-thread.c (ps_pdmodel): Don't guard definition.
2964
2965         * procfs.c: Fix formatting.
2966
2967         * procfs.c (sysset_t_alloc): Remove.
2968         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2969         (procfs_debug_inferior): Likewise.
2970         (procfs_set_exec_trap): Likewise.
2971         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2972         (proc_set_traced_sysexit): Likewise.
2973
2974         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2975         (dead_procinfo): Likewise.
2976         (proc_warn): Likewise.
2977         (proc_error): Likewise.
2978         (proc_get_LDT_entry): Likewise.
2979         (do_attach): Likewise.
2980         (procfs_target::pid_to_str): Likewise.
2981         (iterate_over_mappings): Likewise.
2982
2983         * procfs.c (create_procinfo): Fix ARI warning.
2984         (proc_get_status): Likewise.
2985         (proc_stop_process): Likewise.
2986         (proc_run_process): Likewise.
2987         (proc_kill): Likewise.
2988         (proc_get_LDT_entry): Likewise.
2989         (procfs_find_LDT_entry): Likewise.
2990         (proc_update_threads): Likewise.
2991         (proc_iterate_over_threads): Likewise.
2992         (do_attach): Likewise.
2993         (procfs_xfer_memory): Likewise.
2994         (invalidate_cache): Likewise.
2995         (procfs_target::resume): Likewise.
2996         (procfs_init_inferior): Likewise.
2997         (procfs_set_exec_trap): Likewise.
2998         (procfs_target::thread_alive): Likewise.
2999         (procfs_target::pid_to_exec_file): Likewise.
3000         (iterate_over_mappings): Likewise.
3001         (procfs_target::make_corefile_notes): Likewise.
3002         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
3003
3004         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3005         (procfs_find_LDT_entry): Likewise.
3006         * sol-thread.c (ps_lgetLDT): Likewise.
3007
3008 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3009
3010         PR tdep/17903
3011         * procfs.c (procfs_target): Declare pid_to_exec_file.
3012         (procfs_target::pid_to_exec_file): New.
3013
3014 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3015
3016         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3017         renaming.
3018         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3019         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3020
3021 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3022
3023         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3024         (supply_fpregset, fill_fpregset): Move ...
3025         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3026         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3027         Remove references to ioctl-based procfs.
3028         Include <sys/reg.h>.
3029         Remove PR_MODEL_NATIVE guards.
3030         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3031         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3032
3033 2018-09-19  Xavier Roirand  <roirand@adacore.com>
3034
3035         PR gdb/20981:
3036         * solib-darwin.c (darwin_get_dyld_bfd): New function.
3037         (darwin_solib_get_all_image_info_addr_at_init): Update call.
3038         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3039
3040 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
3041
3042         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3043         (fbsd_print_sockaddr_in6): Likewise.
3044
3045 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
3046             Chris January  <chris.january@arm.com>
3047
3048         * eval.c (skip_undetermined_arglist): Skip argument list helper.
3049         (evaluate_subexp_standard): Return a dummy type when
3050         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3051         OP_F77_UNDETERMINED_ARGLIST case.
3052         * expression.h (enum noside): Update comment.
3053
3054 2018-09-19  George Vasick <george.vasick@oracle.com>
3055
3056         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3057
3058 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
3059             April Chin <april.chin@oracle.com>
3060             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3061
3062         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3063         uint_t lwpid_t.
3064         (create_procinfo): Print pids in /proc without leading zeros.
3065
3066 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
3067
3068         * nios2-tdep.c (nios2_gcc_target_options): New.
3069         (nios2_gdb_arch_init): Install new hook.
3070
3071 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3072
3073         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3074         New file.
3075         * update-gnulib.sh: Apply patch.
3076         * configure: Re-generate.
3077
3078 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3079
3080         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3081         description.  Make "info proc" command descriptions more
3082         consistent.
3083
3084 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3085
3086         * NEWS: Mention 'info proc files' command.
3087
3088 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3089
3090         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3091         descriptors for IP_FILES and IP_ALL.
3092
3093 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3094
3095         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3096         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3097         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3098         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3099         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3100         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3101         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3102         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3103         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3104         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3105         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3106         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3107         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3108         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3109         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3110         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3111         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3112         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3113         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3114         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3115         (struct fbsd_sockaddr_un): New types.
3116         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3117         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3118         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3119         (fbsd_core_info_proc_files): New functions.
3120         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3121         IP_ALL.
3122         * fbsd-tdep.h (fbsd_info_proc_files_header)
3123         (fbsd_info_proc_files_entry): New.
3124
3125 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3126
3127         * defs.h (enum info_proc_what) [IP_FILES]: New value.
3128         * infcmd.c (info_proc_cmd_files): New function.
3129         (_initialize_infcmd): Register 'info proc files' command.
3130
3131 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3132
3133         * gnulib/aclocal-m4-deps.mk: Re-generate.
3134         * gnulib/aclocal.m4: Re-generate.
3135         * gnulib/config.in: Re-generate.
3136         * gnulib/configure: Re-generate.
3137         * gnulib/import/Makefile.am: Re-generate.
3138         * gnulib/import/Makefile.in: Re-generate.
3139         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3140         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3141         * gnulib/import/arpa_inet.in.h: New file.
3142         * gnulib/import/inet_ntop.c: New file.
3143         * gnulib/import/m4/arpa_inet_h.m4: New file.
3144         * gnulib/import/m4/inet_ntop.m4: New file.
3145         * gnulib/import/m4/netinet_in_h.m4: New file.
3146         * gnulib/import/m4/socklen.m4: New file.
3147         * gnulib/import/m4/sockpfaf.m4: New file.
3148         * gnulib/import/m4/stdalign.m4: New file.
3149         * gnulib/import/m4/sys_uio_h.m4: New file.
3150         * gnulib/import/netinet_in.in.h: New file.
3151         * gnulib/import/stdalign.in.h: New file.
3152         * gnulib/import/sys_socket.c: New file.
3153         * gnulib/import/sys_socket.in.h: New file.
3154         * gnulib/import/sys_uio.in.h: New file.
3155         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3156         module.
3157
3158 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3159
3160         * gnulib/aclocal-m4-deps.mk: New file.
3161         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3162         deterministically.
3163
3164 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3165
3166         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3167         KVE_PATH.
3168
3169 2018-09-18  Tom Tromey  <tom@tromey.com>
3170
3171         * compile/compile-object-load.c (struct
3172         link_hash_table_cleanup_data): Add constructor and destructor.
3173         Use DISABLE_COPY_AND_ASSIGN.
3174         (~link_hash_table_cleanup_data): Rename from
3175         link_hash_table_free.  Now a destructor.
3176         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
3177
3178 2018-09-18  Tom Tromey  <tom@tromey.com>
3179
3180         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3181         * compile/compile-object-load.c (struct munmap_list): Move to
3182         header file.
3183         (munmap_list::add): Rename from munmap_list_add; rewrite.
3184         (munmap_list::~munmap_list): Rename from munmap_list_free.
3185         (munmap_listp_free_cleanup): Remove.
3186         (compile_object_load): Update.
3187         * compile/compile-object-load.h (struct munmap_list): Move from
3188         compile-object-load.c.  Rewrite.
3189
3190 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
3191
3192         * aarch64-tdep.c (pass_in_v): Use register size.
3193         (aarch64_extract_return_value): Likewise.
3194         (aarch64_store_return_value): Likewise.
3195
3196 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3197
3198         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3199         rlim_t.
3200
3201 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3202
3203         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3204         Fix short help line.
3205
3206 2018-09-17  Tom Tromey  <tom@tromey.com>
3207
3208         PR python/20445:
3209         * configure: Rebuild.
3210         * configure.ac: Conditionally use -DNDEBUG for Python.
3211
3212 2018-09-17  Tom Tromey  <tom@tromey.com>
3213
3214         * configure: Rebuild.
3215         * configure.ac: Use gmp as a library dependency when checking for
3216         mpfr.
3217
3218 2018-09-17  Pedro Alves  <palves@redhat.com>
3219
3220         * python/py-inferior.c (find_inferior_object): Delete.
3221
3222 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
3223
3224         * compile/compile-cplus-types.c
3225         (compile_cplus_instance::enter_scope): Don't use new_scope after
3226         std::move.
3227
3228 2018-09-17  Tom Tromey  <tom@tromey.com>
3229
3230         * common/pathstuff.c (get_standard_cache_dir): Use
3231         ~/Library/Caches on macOS.
3232         * common/pathstuff.h (get_standard_cache_dir): Update comment.
3233
3234 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
3235
3236         PR python/23669
3237         * breakpoint.c (commands_cmd_element): New.
3238         (_initialize_breakpoint): Assign commands_cmd_element.
3239         * breakpoint.h (commands_cmd_element): New.
3240         * cli/cli-script.c (while_cmd_element, if_command,
3241         define_cmd_element): New.
3242         (command_name_equals): Remove.
3243         (process_next_line): Compare commands by pointer, not by name.
3244         (_initialize_cli_script): Assign the various cmd_list_element
3245         variables.
3246         * compile/compile.c (compile_cmd_element): New.
3247         (_initialize_compile): Assign compile_cmd_element.
3248         * compile/compile.h (compile_cmd_element): New.
3249         * guile/guile.c (guile_cmd_element): New.
3250         (install_gdb_commands): Assign guile_cmd_element.
3251         * guile/guile.h (guile_cmd_element): New.
3252         * python/python.c (python_cmd_element): New.
3253         (_initialize_python): Assign python_cmd_element.
3254         * python/python.h (python_cmd_element): New.
3255         * tracepoint.c (while_stepping_cmd_element): New.
3256         (_initialize_tracepoint): Assign while_stepping_cmd_element.
3257         * tracepoint.h (while_stepping_cmd_element): New.
3258
3259 2018-09-17  Tom Tromey  <tom@tromey.com>
3260
3261         * infrun.c (save_infcall_suspend_state): Return
3262         infcall_suspend_state_up.
3263         (save_infcall_control_state): Return infcall_control_state_up.
3264         * inferior.h (save_infcall_suspend_state)
3265         (save_infcall_control_state): Declare later.  Return unique
3266         pointers.
3267
3268 2018-09-17  Tom Tromey  <tom@tromey.com>
3269
3270         * infrun.c (struct stop_context): Declare constructor,
3271         destructor, "changed" method.
3272         (stop_context::stop_context): Rename from save_stop_context.
3273         (stop_context::~stop_context): Rename from
3274         release_stop_context_cleanup.
3275         (normal_stop): Update.
3276         (stop_context::changed): Rename from stop_context_changed.  Return
3277         bool.
3278
3279 2018-09-17  Tom Tromey  <tom@tromey.com>
3280
3281         * inferior.h (struct infcall_suspend_state_deleter): New.
3282         (infcall_suspend_state_up): New typedef.
3283         (struct infcall_control_state_deleter): New.
3284         (infcall_control_state_up): New typedef.
3285         (make_cleanup_restore_infcall_suspend_state)
3286         (make_cleanup_restore_infcall_control_state): Don't declare.
3287         * infcall.c (call_function_by_hand_dummy): Update.
3288         * infrun.c (do_restore_infcall_suspend_state_cleanup)
3289         (make_cleanup_restore_infcall_suspend_state): Remove.
3290         (do_restore_infcall_control_state_cleanup)
3291         (make_cleanup_restore_infcall_control_state): Remove.
3292
3293 2018-09-17  Tom Tromey  <tom@tromey.com>
3294
3295         * gdbthread.h (struct thread_control_state): Add initializer.
3296         (class thread_info) <control>: Remove initializer.
3297         * inferior.h (struct inferior_control_state): Add initializer.
3298         (class inferior) <control>: Remove initializer.
3299         (exit_inferior_1): Update.
3300         * infrun.c (struct infcall_control_state): Add constructors.
3301         (save_infcall_control_state): Use new.
3302         (restore_infcall_control_state, discard_infcall_control_state):
3303         Use delete.
3304
3305 2018-09-17  Tom Tromey  <tom@tromey.com>
3306
3307         * infrun.c (struct infcall_suspend_state) <registers>: Now a
3308         unique_ptr.
3309         <siginfo_data>: Now a unique_xmalloc_ptr.
3310         (save_infcall_suspend_state, restore_infcall_suspend_state)
3311         (discard_infcall_suspend_state)
3312         (get_infcall_suspend_state_regcache): Update.
3313
3314 2018-09-17  Tom Tromey  <tom@tromey.com>
3315
3316         * gdbthread.h (struct thread_suspend_state): Add initializers.
3317         (class thread_info) <suspend>: Remove initializer.
3318         * infrun.c (struct infcall_suspend_state): Add initializers.
3319         (save_infcall_suspend_state): Use new.
3320         (discard_infcall_suspend_state): Use delete.
3321
3322 2018-09-16  Tom Tromey  <tom@tromey.com>
3323
3324         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3325         Remove.
3326         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3327         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3328         (py_varobj_iter_new): Likewise.
3329         (py_varobj_get_iterator): Use gdbpy_ref.
3330
3331 2018-09-16  Tom Tromey  <tom@tromey.com>
3332
3333         * python/py-threadevent.c (py_get_event_thread): Simplify.
3334         * python/py-inferior.c (infpy_thread_from_thread_handle):
3335         Return immediately after calling thread_to_thread_object.  Use
3336         Py_RETURN_NONE.
3337         (thread_to_thread_object): Set the exception on a NULL return.
3338
3339 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
3340
3341         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3342
3343 2018-09-16  Tom Tromey  <tom@tromey.com>
3344
3345         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3346         Remove.
3347
3348 2018-09-16  Tom Tromey  <tom@tromey.com>
3349
3350         * python/python-internal.h (thread_to_thread_object): Change
3351         return type.
3352         * python/py-inferior.c (thread_to_thread_object): Return a new
3353         reference.
3354         (infpy_thread_from_thread_handle): Update.
3355         * python/py-infthread.c (gdbpy_selected_thread): Update.
3356         * python/py-stopevent.c (create_stop_event_object): Update.
3357         * python/py-threadevent.c (py_get_event_thread): Return a new
3358         reference.
3359         (py_get_event_thread): Update.
3360         * python/py-event.h (py_get_event_thread): Change return type.
3361         * python/py-continueevent.c (create_continue_event_object):
3362         Update.
3363
3364 2018-09-16  Tom Tromey  <tom@tromey.com>
3365
3366         * python/py-progspace.c (pspy_get_objfiles): Update.
3367         * python/python-internal.h (objfile_to_objfile_object): Change
3368         return type.
3369         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3370         Update.
3371         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3372         Update.
3373         * python/python.c (gdbpy_get_current_objfile): Update.
3374         (gdbpy_objfiles): Update.
3375         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3376         Update.
3377         (objfile_to_objfile_object): Return a new reference.
3378         * python/py-symtab.c (stpy_get_objfile): Update.
3379         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3380         Update.
3381
3382 2018-09-16  Tom Tromey  <tom@tromey.com>
3383
3384         * python/py-inferior.c (infpy_get_progspace): Update.
3385         * python/python-internal.h (pspace_to_pspace_object): Change
3386         return type.
3387         * python/py-newobjfileevent.c
3388         (create_clear_objfiles_event_object): Update.
3389         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3390         Update.
3391         * python/python.c (gdbpy_get_current_progspace): Update.
3392         (gdbpy_progspaces): Update.
3393         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3394         reference.
3395         * python/py-objfile.c (objfpy_get_progspace): Update.
3396         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3397         Update.
3398
3399 2018-09-16  Tom Tromey  <tom@tromey.com>
3400
3401         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3402         (solib_name, block_for_pc, find_pc_line): New functions.
3403         (execute_unwinders): Update.
3404         * python/py-block.c (gdbpy_block_for_pc): Remove.
3405         * python/py-inferior.c (infpy_get_progspace): New function.
3406         (inferior_object_getset) <progspace>: Add.
3407         * python/py-progspace.c (pspy_objfiles): Rewrite.
3408         (pspy_solib_name, pspy_block_for_pc)
3409         (pspy_find_pc_line, pspy_is_valid): New functions.
3410         (progspace_object_methods): Add entries for solib_name,
3411         block_for_pc, find_pc_line, is_valid.
3412         * python/python-internal.h (gdbpy_block_for_pc)
3413         (build_objfiles_list): Don't declare.
3414         * python/python.c: Don't include solib.h.
3415         (gdbpy_solib_name, gdbpy_find_pc_line)
3416         (gdbpy_get_current_progspace, build_objfiles_list)
3417         (gdbpy_objfiles): Remove.
3418         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3419         solib_name, find_pc_line>: Remove entries.
3420
3421 2018-09-16  Tom Tromey  <tom@tromey.com>
3422
3423         * top.c (new_ui_command): Use GNU style for metasyntactic
3424         variables.
3425         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3426         variables.
3427         * maint.c (maintenance_translate_address): Remove "<>" around
3428         text.
3429         * interps.c (interpreter_exec_cmd): Use GNU style for
3430         metasyntactic variables.
3431         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3432         metasyntactic variables.
3433         * tracepoint.c (tfind_range_command): Use GNU style for
3434         metasyntactic variables.
3435         (tfind_outside_command): Likewise.
3436         (_initialize_tracepoint): Likewise.
3437         * remote.c (extended_remote_target::create_inferior): Use GNU
3438         style for metasyntactic variables.
3439         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3440         metasyntactic variables.
3441         (adi_assign_command): Likewise.
3442
3443 2018-09-16  Tom Tromey  <tom@tromey.com>
3444
3445         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3446         metasyntactic variables.  Print message if no disassembler options
3447         are available.
3448
3449 2018-09-15  Tom Tromey  <tom@tromey.com>
3450
3451         * infcmd.c (get_inferior_args): Return const char *.
3452         * inferior.h (get_inferior_args): Return type now const.
3453         * linux-tdep.c (linux_fill_prpsinfo): Update.
3454         * procfs.c (procfs_target::make_corefile_notes): Update.
3455
3456 2018-09-07  Tom Tromey  <tom@tromey.com>
3457
3458         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3459         inside the TRY.
3460
3461 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3462
3463         * nios2-tdep.c (nios2_type_align): New.
3464         (nios2_gdb_arch_init): Install type_align hook.
3465
3466 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3467
3468         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3469         type that is neither object file owned, nor gdbarch owned.
3470         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3471         gdbarch is non-NULL.
3472         (alloc_type_instance): Allocate non-objfile owned types on the
3473         gdbarch obstack.
3474         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3475         using TYPE_ALLOC to ensure memory is allocated on the correct
3476         obstack.
3477         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3478         obstack, or the gdbarch obstack.
3479         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3480
3481 2018-09-14  Tom Tromey  <tom@tromey.com>
3482
3483         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3484         block.
3485
3486 2018-09-14  Tom Tromey  <tom@tromey.com>
3487
3488         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3489
3490 2018-09-13  Tom Tromey  <tom@tromey.com>
3491
3492         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3493         static.
3494
3495 2018-09-13  Tom Tromey  <tom@tromey.com>
3496
3497         * exec.c (try_open_exec_file): Use std::string.
3498
3499 2018-09-13  Tom Tromey  <tom@tromey.com>
3500
3501         * utils.h (gdb_bfd_errmsg): Return std::string.
3502         * exec.c (exec_file_attach): Update.
3503         * compile/compile-object-load.c (compile_object_load): Update.
3504         * utils.c (gdb_bfd_errmsg): Return std::string.
3505
3506 2018-09-13  Tom Tromey  <tom@tromey.com>
3507
3508         * procfs.c (struct procinfo_deleter): New.
3509         (procinfo_up): New typedef.
3510         (do_destroy_procinfo_cleanup): Remove.
3511         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3512
3513 2018-09-13  Tom Tromey  <tom@tromey.com>
3514
3515         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3516
3517 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3518 2018-09-13  Tom Tromey  <tom@tromey.com>
3519
3520         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3521         (pspy_get_objfiles): New function.
3522         (progspace_object_methods): New.
3523         (pspace_object_type): Add tp_methods callback.
3524         * python/python-internal.h (build_objfiles_list): New
3525         declaration.
3526         * python/python.c (build_objfiles_list): New function.
3527         (gdbpy_objfiles): Implement using build_objfiles_list.
3528         * NEWS: Mention the Progspace.objfiles method.
3529
3530 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3531
3532         * python/py-inferior.c (infpy_get_progspace): New function.
3533         (inferior_object_getset): Add progspace property.
3534         * NEWS: Mention the new property.
3535
3536 2018-09-13  Tom Tromey  <tom@tromey.com>
3537
3538         PR rust/23650:
3539         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3540
3541 2018-09-13  Tom Tromey  <tom@tromey.com>
3542
3543         PR rust/23626:
3544         * rust-lang.c (rust_enum_variant): Now static.
3545         (rust_empty_enum_p): New function.
3546         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3547         Handle empty enum.
3548
3549 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3550
3551         * python/py-inferior.c (infpy_repr): New.
3552         (inferior_object_type): Register infpy_repr.
3553         * python/py-objfile.c (objfpy_repr): New.
3554         (objfile_object_type): Register objfpy_repr.
3555
3556 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3557
3558         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3559
3560 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3561
3562         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3563         typo.
3564
3565 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3566
3567         * common/common-utils.c: Don't include '<sys/stat.h>'.
3568         (is_regular_file): Move to...
3569         * common/filestuff.c (is_regular_file): ... here.
3570         * common/common-utils.h (is_regular_file): Move to...
3571         * common/filestuff.h (is_regular_file): ... here.
3572
3573 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3574
3575         * skip.c (debug_skip): New variable.
3576         (skiplist_entry::do_skip_file_p): Add debug output.
3577         (skiplist_entry::do_skip_gfile_p): Likewise.
3578         (skiplist_entry::skip_function_p): Likewise.
3579         (_initialize_step_skip): Create debug command.
3580         * NEWS: Mention set/show debug skip.
3581
3582 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3583
3584         * darwin-nat.c (should_disable_startup_with_shell):
3585         New function.
3586         (darwin_nat_target::create_inferior): Add call.
3587
3588 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3589
3590         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3591         inf_port, msg_state>: Initialize.
3592         (struct darwin_thread_info) <signaled, single_step>: Change
3593         type and initialize.
3594         (struct darwin_thread_info) <event>: Initialize.
3595
3596 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3597
3598         PR gdb/23555
3599         PR gdb/23558
3600         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3601         guesses.
3602
3603 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3604
3605         Revert:
3606         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3607
3608         PR gdb/23555
3609         PR gdb/23558
3610         * gnulib/aclocal.m4: Regenerate.
3611         * gnulib/config.in: Regenerate.
3612         * gnulib/configure: Regenerate.
3613         * gnulib/import/Makefile.am: Update.
3614         * gnulib/import/Makefile.in: Update.
3615         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3616         * gnulib/import/_Noreturn.h: ... this.
3617         * gnulib/import/alloca.in.h: Update.
3618         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3619         * gnulib/import/arg-nonnull.h: ... this.
3620         * gnulib/import/assure.h: Update.
3621         * gnulib/import/at-func.c: Update.
3622         * gnulib/import/basename-lgpl.c: Update.
3623         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3624         * gnulib/import/c++defs.h: ... this.
3625         * gnulib/import/canonicalize-lgpl.c: Update.
3626         * gnulib/import/cdefs.h: Update.
3627         * gnulib/import/chdir-long.c: Update.
3628         * gnulib/import/chdir-long.h: Update.
3629         * gnulib/import/cloexec.c: Update.
3630         * gnulib/import/cloexec.h: Update.
3631         * gnulib/import/close.c: Update.
3632         * gnulib/import/closedir.c: Update.
3633         * gnulib/import/config.charset: Update.
3634         * gnulib/import/dirent-private.h: Update.
3635         * gnulib/import/dirent.in.h: Update.
3636         * gnulib/import/dirfd.c: Update.
3637         * gnulib/import/dirname-lgpl.c: Update.
3638         * gnulib/import/dirname.h: Update.
3639         * gnulib/import/dosname.h: Update.
3640         * gnulib/import/dup-safer-flag.c: Update.
3641         * gnulib/import/dup-safer.c: Update.
3642         * gnulib/import/dup.c: Update.
3643         * gnulib/import/dup2.c: Update.
3644         * gnulib/import/errno.in.h: Update.
3645         * gnulib/import/error.c: Update.
3646         * gnulib/import/error.h: Update.
3647         * gnulib/import/exitfail.c: Update.
3648         * gnulib/import/exitfail.h: Update.
3649         * gnulib/import/extra/update-copyright: Update.
3650         * gnulib/import/fchdir.c: Update.
3651         * gnulib/import/fcntl.c: Update.
3652         * gnulib/import/fcntl.in.h: Update.
3653         * gnulib/import/fd-hook.c: Update.
3654         * gnulib/import/fd-hook.h: Update.
3655         * gnulib/import/fd-safer-flag.c: Update.
3656         * gnulib/import/fd-safer.c: Update.
3657         * gnulib/import/fdopendir.c: Update.
3658         * gnulib/import/filename.h: Update.
3659         * gnulib/import/filenamecat-lgpl.c: Update.
3660         * gnulib/import/filenamecat.h: Update.
3661         * gnulib/import/flexmember.h: Update.
3662         * gnulib/import/float+.h: Update.
3663         * gnulib/import/float.c: Update.
3664         * gnulib/import/float.in.h: Update.
3665         * gnulib/import/fnmatch.c: Update.
3666         * gnulib/import/fnmatch.in.h: Update.
3667         * gnulib/import/fnmatch_loop.c: Update.
3668         * gnulib/import/fpucw.h: Update.
3669         * gnulib/import/frexp.c: Update.
3670         * gnulib/import/frexpl.c: Update.
3671         * gnulib/import/fstat.c: Update.
3672         * gnulib/import/fstatat.c: Update.
3673         * gnulib/import/getcwd-lgpl.c: Update.
3674         * gnulib/import/getcwd.c: Update.
3675         * gnulib/import/getdtablesize.c: Update.
3676         * gnulib/import/getlogin_r.c: Update.
3677         * gnulib/import/getprogname.c: Update.
3678         * gnulib/import/getprogname.h: Update.
3679         * gnulib/import/gettext.h: Update.
3680         * gnulib/import/gettimeofday.c: Update.
3681         * gnulib/import/glob-libc.h: Update.
3682         * gnulib/import/glob.c: Update.
3683         * gnulib/import/glob.in.h: Update.
3684         * gnulib/import/glob_internal.h: Update.
3685         * gnulib/import/glob_pattern_p.c: Update.
3686         * gnulib/import/globfree.c: Update.
3687         * gnulib/import/hard-locale.c: Update.
3688         * gnulib/import/hard-locale.h: Update.
3689         * gnulib/import/intprops.h: Update.
3690         * gnulib/import/inttypes.in.h: Update.
3691         * gnulib/import/isnan.c: Update.
3692         * gnulib/import/isnand-nolibm.h: Update.
3693         * gnulib/import/isnand.c: Update.
3694         * gnulib/import/isnanl-nolibm.h: Update.
3695         * gnulib/import/isnanl.c: Update.
3696         * gnulib/import/itold.c: Update.
3697         * gnulib/import/libc-config.h: Update.
3698         * gnulib/import/limits.in.h: Update.
3699         * gnulib/import/localcharset.c: Update.
3700         * gnulib/import/localcharset.h: Update.
3701         * gnulib/import/localtime-buffer.c: Update.
3702         * gnulib/import/localtime-buffer.h: Update.
3703         * gnulib/import/lstat.c: Update.
3704         * gnulib/import/m4/00gnulib.m4: Update.
3705         * gnulib/import/m4/__inline.m4: Update.
3706         * gnulib/import/m4/absolute-header.m4: Update.
3707         * gnulib/import/m4/alloca.m4: Update.
3708         * gnulib/import/m4/builtin-expect.m4: Update.
3709         * gnulib/import/m4/canonicalize.m4: Update.
3710         * gnulib/import/m4/chdir-long.m4: Update.
3711         * gnulib/import/m4/close.m4: Update.
3712         * gnulib/import/m4/closedir.m4: Update.
3713         * gnulib/import/m4/configmake.m4: Update.
3714         * gnulib/import/m4/d-ino.m4: Update.
3715         * gnulib/import/m4/d-type.m4: Update.
3716         * gnulib/import/m4/dirent_h.m4: Update.
3717         * gnulib/import/m4/dirfd.m4: Update.
3718         * gnulib/import/m4/dirname.m4: Update.
3719         * gnulib/import/m4/double-slash-root.m4: Update.
3720         * gnulib/import/m4/dup.m4: Update.
3721         * gnulib/import/m4/dup2.m4: Update.
3722         * gnulib/import/m4/eealloc.m4: Update.
3723         * gnulib/import/m4/environ.m4: Update.
3724         * gnulib/import/m4/errno_h.m4: Update.
3725         * gnulib/import/m4/error.m4: Update.
3726         * gnulib/import/m4/exponentd.m4: Update.
3727         * gnulib/import/m4/exponentl.m4: Update.
3728         * gnulib/import/m4/extensions.m4: Update.
3729         * gnulib/import/m4/extern-inline.m4: Update.
3730         * gnulib/import/m4/fchdir.m4: Update.
3731         * gnulib/import/m4/fcntl-o.m4: Update.
3732         * gnulib/import/m4/fcntl.m4: Update.
3733         * gnulib/import/m4/fcntl_h.m4: Update.
3734         * gnulib/import/m4/fdopendir.m4: Update.
3735         * gnulib/import/m4/filenamecat.m4: Update.
3736         * gnulib/import/m4/flexmember.m4: Update.
3737         * gnulib/import/m4/float_h.m4: Update.
3738         * gnulib/import/m4/fnmatch.m4: Update.
3739         * gnulib/import/m4/fnmatch_h.m4: Update.
3740         * gnulib/import/m4/fpieee.m4: Update.
3741         * gnulib/import/m4/frexp.m4: Update.
3742         * gnulib/import/m4/frexpl.m4: Update.
3743         * gnulib/import/m4/fstat.m4: Update.
3744         * gnulib/import/m4/fstatat.m4: Update.
3745         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3746         * gnulib/import/m4/getcwd-path-max.m4: Update.
3747         * gnulib/import/m4/getcwd.m4: Update.
3748         * gnulib/import/m4/getdtablesize.m4: Update.
3749         * gnulib/import/m4/getlogin.m4: Update.
3750         * gnulib/import/m4/getlogin_r.m4: Update.
3751         * gnulib/import/m4/getpagesize.m4: Update.
3752         * gnulib/import/m4/getprogname.m4: Update.
3753         * gnulib/import/m4/gettimeofday.m4: Update.
3754         * gnulib/import/m4/glibc21.m4: Update.
3755         * gnulib/import/m4/glob.m4: Update.
3756         * gnulib/import/m4/glob_h.m4: Update.
3757         * gnulib/import/m4/gnulib-cache.m4: Update.
3758         * gnulib/import/m4/gnulib-common.m4: Update.
3759         * gnulib/import/m4/gnulib-comp.m4: Update.
3760         * gnulib/import/m4/gnulib-tool.m4: Update.
3761         * gnulib/import/m4/hard-locale.m4: Update.
3762         * gnulib/import/m4/include_next.m4: Update.
3763         * gnulib/import/m4/inttypes-pri.m4: Update.
3764         * gnulib/import/m4/inttypes.m4: Update.
3765         * gnulib/import/m4/isnand.m4: Update.
3766         * gnulib/import/m4/isnanl.m4: Update.
3767         * gnulib/import/m4/largefile.m4: Update.
3768         * gnulib/import/m4/limits-h.m4: Update.
3769         * gnulib/import/m4/localcharset.m4: Update.
3770         * gnulib/import/m4/locale-fr.m4: Update.
3771         * gnulib/import/m4/locale-ja.m4: Update.
3772         * gnulib/import/m4/locale-zh.m4: Update.
3773         * gnulib/import/m4/localtime-buffer.m4: Update.
3774         * gnulib/import/m4/longlong.m4: Update.
3775         * gnulib/import/m4/lstat.m4: Update.
3776         * gnulib/import/m4/malloc.m4: Update.
3777         * gnulib/import/m4/malloca.m4: Update.
3778         * gnulib/import/m4/math_h.m4: Update.
3779         * gnulib/import/m4/mbrtowc.m4: Update.
3780         * gnulib/import/m4/mbsinit.m4: Update.
3781         * gnulib/import/m4/mbsrtowcs.m4: Update.
3782         * gnulib/import/m4/mbstate_t.m4: Update.
3783         * gnulib/import/m4/memchr.m4: Update.
3784         * gnulib/import/m4/memmem.m4: Update.
3785         * gnulib/import/m4/mempcpy.m4: Update.
3786         * gnulib/import/m4/memrchr.m4: Update.
3787         * gnulib/import/m4/mkdir.m4: Update.
3788         * gnulib/import/m4/mkstemp.m4: Update.
3789         * gnulib/import/m4/mmap-anon.m4: Update.
3790         * gnulib/import/m4/mode_t.m4: Update.
3791         * gnulib/import/m4/msvc-inval.m4: Update.
3792         * gnulib/import/m4/msvc-nothrow.m4: Update.
3793         * gnulib/import/m4/multiarch.m4: Update.
3794         * gnulib/import/m4/nocrash.m4: Update.
3795         * gnulib/import/m4/off_t.m4: Update.
3796         * gnulib/import/m4/onceonly.m4: Update.
3797         * gnulib/import/m4/open-cloexec.m4: Update.
3798         * gnulib/import/m4/open.m4: Update.
3799         * gnulib/import/m4/openat.m4: Update.
3800         * gnulib/import/m4/opendir.m4: Update.
3801         * gnulib/import/m4/pathmax.m4: Update.
3802         * gnulib/import/m4/rawmemchr.m4: Update.
3803         * gnulib/import/m4/readdir.m4: Update.
3804         * gnulib/import/m4/readlink.m4: Update.
3805         * gnulib/import/m4/realloc.m4: Update.
3806         * gnulib/import/m4/rename.m4: Update.
3807         * gnulib/import/m4/rewinddir.m4: Update.
3808         * gnulib/import/m4/rmdir.m4: Update.
3809         * gnulib/import/m4/save-cwd.m4: Update.
3810         * gnulib/import/m4/secure_getenv.m4: Update.
3811         * gnulib/import/m4/setenv.m4: Update.
3812         * gnulib/import/m4/signal_h.m4: Update.
3813         * gnulib/import/m4/ssize_t.m4: Update.
3814         * gnulib/import/m4/stat-time.m4: Update.
3815         * gnulib/import/m4/stat.m4: Update.
3816         * gnulib/import/m4/std-gnu11.m4: Update.
3817         * gnulib/import/m4/stdbool.m4: Update.
3818         * gnulib/import/m4/stddef_h.m4: Update.
3819         * gnulib/import/m4/stdint.m4: Update.
3820         * gnulib/import/m4/stdio_h.m4: Update.
3821         * gnulib/import/m4/stdlib_h.m4: Update.
3822         * gnulib/import/m4/strchrnul.m4: Update.
3823         * gnulib/import/m4/strdup.m4: Update.
3824         * gnulib/import/m4/strerror.m4: Update.
3825         * gnulib/import/m4/string_h.m4: Update.
3826         * gnulib/import/m4/strstr.m4: Update.
3827         * gnulib/import/m4/strtok_r.m4: Update.
3828         * gnulib/import/m4/sys_socket_h.m4: Update.
3829         * gnulib/import/m4/sys_stat_h.m4: Update.
3830         * gnulib/import/m4/sys_time_h.m4: Update.
3831         * gnulib/import/m4/sys_types_h.m4: Update.
3832         * gnulib/import/m4/tempname.m4: Update.
3833         * gnulib/import/m4/time_h.m4: Update.
3834         * gnulib/import/m4/unistd-safer.m4: Update.
3835         * gnulib/import/m4/unistd_h.m4: Update.
3836         * gnulib/import/m4/warn-on-use.m4: Update.
3837         * gnulib/import/m4/wchar_h.m4: Update.
3838         * gnulib/import/m4/wchar_t.m4: Update.
3839         * gnulib/import/m4/wctype_h.m4: Update.
3840         * gnulib/import/m4/wint_t.m4: Update.
3841         * gnulib/import/malloc.c: Update.
3842         * gnulib/import/malloc/scratch_buffer.h: Update.
3843         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3844         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3845         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3846         * gnulib/import/malloca.c: Update.
3847         * gnulib/import/malloca.h: Update.
3848         * gnulib/import/malloca.valgrind: Update.
3849         * gnulib/import/math.in.h: Update.
3850         * gnulib/import/mbrtowc.c: Update.
3851         * gnulib/import/mbsinit.c: Update.
3852         * gnulib/import/mbsrtowcs-impl.h: Update.
3853         * gnulib/import/mbsrtowcs-state.c: Update.
3854         * gnulib/import/mbsrtowcs.c: Update.
3855         * gnulib/import/memchr.c: Update.
3856         * gnulib/import/memmem.c: Update.
3857         * gnulib/import/mempcpy.c: Update.
3858         * gnulib/import/memrchr.c: Update.
3859         * gnulib/import/mkdir.c: Update.
3860         * gnulib/import/mkstemp.c: Update.
3861         * gnulib/import/msvc-inval.c: Update.
3862         * gnulib/import/msvc-inval.h: Update.
3863         * gnulib/import/msvc-nothrow.c: Update.
3864         * gnulib/import/msvc-nothrow.h: Update.
3865         * gnulib/import/open.c: Update.
3866         * gnulib/import/openat-die.c: Update.
3867         * gnulib/import/openat-priv.h: Update.
3868         * gnulib/import/openat-proc.c: Update.
3869         * gnulib/import/openat.c: Update.
3870         * gnulib/import/openat.h: Update.
3871         * gnulib/import/opendir.c: Update.
3872         * gnulib/import/pathmax.h: Update.
3873         * gnulib/import/pipe-safer.c: Update.
3874         * gnulib/import/rawmemchr.c: Update.
3875         * gnulib/import/readdir.c: Update.
3876         * gnulib/import/readlink.c: Update.
3877         * gnulib/import/realloc.c: Update.
3878         * gnulib/import/ref-add.sin: Update.
3879         * gnulib/import/ref-del.sin: Update.
3880         * gnulib/import/rename.c: Update.
3881         * gnulib/import/rewinddir.c: Update.
3882         * gnulib/import/rmdir.c: Update.
3883         * gnulib/import/same-inode.h: Update.
3884         * gnulib/import/save-cwd.c: Update.
3885         * gnulib/import/save-cwd.h: Update.
3886         * gnulib/import/scratch_buffer.h: Update.
3887         * gnulib/import/secure_getenv.c: Update.
3888         * gnulib/import/setenv.c: Update.
3889         * gnulib/import/signal.in.h: Update.
3890         * gnulib/import/stat-time.c: Update.
3891         * gnulib/import/stat-time.h: Update.
3892         * gnulib/import/stat-w32.c: Update.
3893         * gnulib/import/stat-w32.h: Update.
3894         * gnulib/import/stat.c: Update.
3895         * gnulib/import/stdbool.in.h: Update.
3896         * gnulib/import/stddef.in.h: Update.
3897         * gnulib/import/stdint.in.h: Update.
3898         * gnulib/import/stdio.in.h: Update.
3899         * gnulib/import/stdlib.in.h: Update.
3900         * gnulib/import/str-two-way.h: Update.
3901         * gnulib/import/strchrnul.c: Update.
3902         * gnulib/import/strdup.c: Update.
3903         * gnulib/import/streq.h: Update.
3904         * gnulib/import/strerror-override.c: Update.
3905         * gnulib/import/strerror-override.h: Update.
3906         * gnulib/import/strerror.c: Update.
3907         * gnulib/import/string.in.h: Update.
3908         * gnulib/import/stripslash.c: Update.
3909         * gnulib/import/strnlen1.c: Update.
3910         * gnulib/import/strnlen1.h: Update.
3911         * gnulib/import/strstr.c: Update.
3912         * gnulib/import/strtok_r.c: Update.
3913         * gnulib/import/sys_stat.in.h: Update.
3914         * gnulib/import/sys_time.in.h: Update.
3915         * gnulib/import/sys_types.in.h: Update.
3916         * gnulib/import/tempname.c: Update.
3917         * gnulib/import/tempname.h: Update.
3918         * gnulib/import/time.in.h: Update.
3919         * gnulib/import/unistd--.h: Update.
3920         * gnulib/import/unistd-safer.h: Update.
3921         * gnulib/import/unistd.in.h: Update.
3922         * gnulib/import/unsetenv.c: Update.
3923         * gnulib/import/verify.h: Update.
3924         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3925         * gnulib/import/wchar.in.h: Update.
3926         * gnulib/import/wctype.in.h: Update.
3927         * gnulib/import/xalloc-oversized.h: Update.
3928         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3929         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3930
3931 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3932
3933         * record-btrace.c (get_thread_current_frame): Remove
3934         old_inferior_ptid.
3935
3936 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3937
3938         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3939         with check_tag to 1 if and only if the type is tagged and the
3940         component being searched cannot been found in the current
3941         view. Otherwise, always call ada_to_fixed_type with
3942         check_tag to 0.
3943
3944 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3945
3946         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3947         declaration.
3948         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3949         * ada-varobj.c (ada_varobj_get_number_of_children,
3950         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3951
3952 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3953
3954         * ada-valprint.c (ada_value_print): Use type instead of
3955         enclosing type.
3956
3957 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3958
3959         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3960         an array of access to unconstrained array.
3961
3962 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3963
3964         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3965         (ada_check_typedef): Use it.
3966
3967 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3968
3969         * ada-varobj.c (ada_varobj_describe_struct_child)
3970         (ada_varobj_describe_child): Handle union case like struct one.
3971
3972 2018-09-10  Tom Tromey  <tom@tromey.com>
3973
3974         PR python/18380:
3975         * python/python.c (_initialize_python): Make example in "python"
3976         help work in Python 3.
3977
3978 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3979
3980         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3981         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3982         $(EXEEXT) to the script, as it is not a program.
3983
3984 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3985
3986         * python/py-prettyprint.c (pretty_print_one_value): Return
3987         gdbpy_ref<>.
3988         (print_string_repr): Adjust.
3989         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3990         * python/python-internal.h (apply_varobj_pretty_printer): Return
3991         gdbpy_ref<>.
3992         * varobj.c (varobj_value_get_print_value): Adjust.
3993
3994 2018-09-08  Tom Tromey  <tom@tromey.com>
3995
3996         PR python/16047:
3997         * python/py-prettyprint.c (pretty_print_one_value): Check for
3998         to_string method.
3999
4000 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4001
4002         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4003         replace_operator_with_call.
4004
4005 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4006
4007         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4008
4009 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4010
4011         * ada-typeprint.c (print_range): Print the bounds using TYPE
4012         rather than its TYPE_TARGET_TYPE.
4013
4014 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4015
4016         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4017         call to ada_to_fixed_value_create.
4018
4019 2018-09-08  Jerome Guitton  <guitton@adacore.com>
4020
4021         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4022
4023 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4024
4025         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4026         by calls to error.
4027
4028 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4029
4030         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4031         Move update of loop variable "fi".
4032
4033 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4034
4035         * ada-lang.c (value_assign_to_component): In the case of
4036         big-endian targets, extract the bits of the given VAL
4037         using an src_offset of zero if container is not a scalar.
4038
4039 2018-09-06  Simon Ser  <contact@emersion.fr>
4040
4041         PR gdb/23105
4042         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4043         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4044         * fbsd-tdep.c (fbsd_make_note_desc): New.
4045         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4046         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4047         * target.h (enum target_object) Add FreeBSD-specific
4048         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4049
4050 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4051
4052         * compile/compile-c.h (generate_c_for_variable_locations):
4053         Change reference to pointer.
4054         * compile/compile-c-support.c (compile_program) <compute>:
4055         Likewise.
4056         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4057         (generate_c_for_for_one_variable): Likewise
4058         (generate_c_for_variable_locations): Likewise
4059         * compile/compile-c-types.c (compile_c_instance::convert_type):
4060         Likewise
4061         * compile/compile-cplus-symbols.c (convert_one_symbol):
4062         std::move the scope passed to enter_scope.
4063         * compile/compile-cplus-types.c
4064         (compile_cplus_instance::enter_scope): Make parameter
4065         rvalue-reference.
4066         (compile_cplus_instance::new_scope): Change reference to
4067         pointer.
4068         (compile_cplus_instance::convert_type): Likewise
4069         (compile_cplus_convert_typedef): std::move the scope passed to
4070         enter_scope.
4071         (compile_cplus_convert_struct_or_union): Likewise.
4072         (compile_cplus_convert_enum): Likewise.
4073         (compile_cplus_convert_namespace): Likewise.
4074         * compile/compile-cplus.h (compile_cplus_instance)
4075         <enter_scope>: Make parameter rvalue-reference.
4076         * compile/compile-internal.h (compile_instance)
4077         <get_cached_type>: Likewise
4078         * compile/compile-loc2c.c (push): Likewise
4079         (pushf): Likewise
4080         (unary): Likewise
4081         (binary): Likewise
4082         (print_label): Likewise
4083         (pushf_register_address): Likewise
4084         (pushf_register): Likewise
4085         (do_compile_dwarf_expr_to_c): Likewise
4086         (compile_dwarf_expr_to_c): Likewise
4087         (compile_dwarf_bounds_to_c): Likewise
4088         * compile/compile.c (compile_instance::get_cached_type):
4089         Likewise
4090         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4091         (compile_dwarf_bounds_to_c): Likewise
4092         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4093         (dwarf2_compile_property_to_c): Likewise
4094         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4095         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4096         Likewise
4097
4098 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4099
4100         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4101         * tui/tui-data.c (init_content_element): Don't initialize it.
4102
4103 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4104
4105         * tui/tui-data.h (struct tui_win_info)
4106         <detail::opaque>: Remove.
4107         * tui/tui-data.c (init_win_info): Remove assignment.
4108
4109 2018-09-05  Tom Tromey  <tom@tromey.com>
4110
4111         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4112         -Wformat-nonliteral.
4113         * target-float.c (host_float_ops<T>::to_string)
4114         (host_float_ops<T>::from_string): Use
4115         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4116         * configure: Rebuild.
4117
4118 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4119
4120         * printcmd.c (printf_c_string): Use
4121         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4122         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4123
4124 2018-09-05  Tom Tromey  <tom@tromey.com>
4125
4126         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4127
4128 2018-09-05  Tom de Vries  <tdevries@suse.de>
4129
4130         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4131         with resolve_abstract_p == true.
4132         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4133         defaulting to false. Propagate resolve_abstract_p to
4134         dwarf2_fetch_die_loc_sect_off.
4135         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4136         parameter, defaulting to false.
4137         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4138         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4139         parameter.
4140         * dwarf2read.h (struct die_info): Forward-declare.
4141         (die_info_ptr): New typedef.
4142         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4143
4144 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
4145
4146         GDB 8.2 released.
4147
4148 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4149             Pedro Alves  <palves@redhat.com>
4150
4151         * gnulib/Makefile.in (aclocal_m4_deps): Move to
4152         "aclocal-m4-deps.mk".  Include file here.
4153         $(srcdir)/aclocal.m4: Add "configure.ac".
4154         * gnulib/aclocal-m4-deps.mk: New file.
4155         * gnulib/update-gnulib.sh: Automatically update
4156         "aclocal-m4-deps.mk".
4157
4158 2018-09-04  Tom Tromey  <tom@tromey.com>
4159
4160         * configure: Rebuild.
4161         * configure.ac: Remove multi-ice code.
4162
4163 2018-09-04  Tom Tromey  <tom@tromey.com>
4164
4165         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4166         (ada-exp.o): Update.
4167
4168 2018-09-04  Tom Tromey  <tom@tromey.com>
4169
4170         * Makefile.in (printcmd.o, target-float.o): Remove.
4171         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4172
4173 2018-09-04  Tom Tromey  <tom@tromey.com>
4174
4175         * gnulib/Makefile.in: Remove obsolete comment.
4176         * Makefile.in: Remove obsolete comment.
4177
4178 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
4179
4180         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4181         line with '+'.
4182
4183 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4184
4185         * riscv-tdep.c: Add 'prologue-value.h' include.
4186         (struct riscv_unwind_cache): New struct.
4187         (riscv_debug_unwinder): New global.
4188         (riscv_scan_prologue): Update arguments, capture register details
4189         from prologue scan.
4190         (riscv_skip_prologue): Reformat arguments line, move end of
4191         prologue calculation into riscv_scan_prologue.
4192         (riscv_frame_cache): Update return type, create
4193         riscv_unwind_cache, scan the prologue, and fill in remaining cache
4194         details.
4195         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4196         (riscv_frame_prev_register): Use the trad_frame within the
4197         riscv_unwind_cache.
4198         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4199         flag.
4200
4201 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4202
4203         * trad-frame.h (trad_frame_set_realreg): Declare.
4204         (trad_frame_set_addr): Declare.
4205         * trad-frame.c (trad_frame_set_realreg): Define new function.
4206         (trad_frame_set_addr): Define new function.
4207         (trad_frame_set_reg_realreg): Use new function.
4208         (trad_frame_set_reg_addr): Use new function.
4209
4210 2018-09-01  Keith Seitz  <keiths@redhat.com>
4211
4212         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4213         pulongest instead of "%lld".
4214         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4215         ATTRIBUTE_UNUSED.
4216
4217 2018-08-31  Tom Tromey  <tom@tromey.com>
4218
4219         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4220         variant part type.
4221
4222 2018-08-31  Pedro Alves  <palves@redhat.com>
4223
4224         * gdbarch.h: Regenerate.
4225
4226 2018-08-31  Pedro Alves  <palves@redhat.com>
4227
4228         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4229         * target.h (Hardware watchpoint interfaces): Describe
4230         continuable/steppable/non-steppable watchpoints.
4231         * gdbarch.h, gdbarch.c: Regenerate.
4232
4233 2018-08-31  Pedro Alves  <palves@redhat.com>
4234
4235         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4236         Delete.
4237         * s390-linux-nat.c
4238         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4239         * target.h (target_ops::have_continuable_watchpoint): Delete.
4240         (target_have_continuable_watchpoint): Delete.
4241         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4242         * target-delegates.c: Regenerate.
4243
4244 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4245
4246         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4247         the files present in "gnulib/import/m4/".
4248
4249 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4250
4251         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4252         c.sw, c.swsp, and c.sdsp.
4253
4254 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4255
4256         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4257         (riscv_read_misa_reg): Don't cache value read into inferior data.
4258         (riscv_new_inferior_data): Delete.
4259         (riscv_inferior_data_cleanup): Delete.
4260         (riscv_inferior_data): Delete.
4261         (riscv_invalidate_inferior_data): Delete.
4262         (_initialize_riscv_tdep): Remove initialisation of inferior data.
4263
4264 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
4265
4266         * compile/compile-cplus-types.c
4267         (compile_cplus_instance::leave_scope): Take the address of scope
4268         object.
4269         (compile_cplus_instance::convert_qualified_base): Compare quals
4270         to 0.
4271
4272 2018-08-30  Keith Seitz  <keiths@redhat.com>
4273
4274         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4275         Use "%s" and host_address_to_string instead of "%p" in printf.
4276
4277 2018-08-29  Keith Seitz  <keiths@redhat.com>
4278
4279         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4280         and compile-cplus-types.c.
4281         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4282         * c-lang.c (cplus_language_defn): Set C++ compile functions.
4283         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4284         Declare.
4285         * compile/compile-c-support.c: Include compile-cplus.h.
4286         (load_libcompile): Templatize.
4287         (get_compile_context): "New" function.
4288         (c_get_compile_context): Use get_compile_context.
4289         (cplus_get_compile_context): New function.
4290         (cplus_push_user_expression, cplus_pop_user_expression)
4291         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4292         (cplus_compute_program): Define new structs/functions.
4293         * compile/compile-cplus-symmbols.c: New file.
4294         * compile/compile-cplus-types.c: New file.
4295         * compile/compile-cplus.h: New file.
4296         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4297         Declare.
4298         * compile/compile-object-load.c (get_out_value_type): Use
4299         strncmp_iw when comparing symbol names.
4300         (compile_object_load): Add mst_bss and mst_data.
4301         * compile/compile.c (_initialize_compile): Remove
4302         -Wno-implicit-function-declaration from `compile_args'.
4303         * compile/gcc-cp-plugin.h: New file.
4304         * NEWS: Mention C++ compile support and new debug options.
4305
4306 2018-08-29  Keith Seitz  <keiths@redhat.com>
4307
4308         * linespec.c (collect_info::add_symbol): Make virtual.
4309         (struct symbol_searcher_collect_info): New struct.
4310         (symbol_searcher::find_all_symbols): New method.
4311         * symtab.h (class symbol_searcher): New class.
4312
4313 2018-08-29  Keith Seitz  <keiths@redhat.com>
4314
4315         * linespec.c (struct linespec) <function_symbols, label_symbols>:
4316         Change to vector of block_symbol.  Update all users.
4317         (struct collect_info) <symbols>: Likewise.
4318         (collect_info::add_symbol): Take block_symbol as argument.
4319         Update all callers.
4320         (decode_compound_collector) <m_symbols>: Change type to vector
4321         of block_symbol.  Update all users.
4322         (decode_compound_collector::operator ()): Change parameter type
4323         to block_symbol.
4324         (find_method, find_function_symbols, find_linespec_symbols)
4325         (find_label_symbols_in_block, find_label_symbols): Change symbol
4326         vectors to block_symbol vectors.
4327         * symtab.h (symbol_found_callback_ftype): Change parameter type to
4328         block_symbol.
4329
4330 2018-08-29  Keith Seitz  <keiths@redhat.com>
4331
4332         * linespec.c (symbolp): Remove typedef and VEC definitions.
4333         (bound_minimal_symbol_d): Likewise.
4334
4335 2018-08-29  Keith Seitz  <keiths@redhat.com>
4336
4337         * linespec.c (decode_compound_collector::decode_compound_collector):
4338         Remove initialization for `m_symtabs'.
4339         (decode_compound_collector::release_symbols): Change return type
4340         to std::vector.  Update all callers.
4341         (class decode_compound_collector) <m_symbols>: Change type to
4342         std::vector.
4343         (lookup_prefix_sym): Change return type to std::vector.  Update all
4344         callers.
4345         (compare_symbols): Remove.
4346         (std_compare_symbols): Rename to `compare_symbols'.
4347         (find_method): Change `sym_classes' parameter to std::vector.
4348         Update all callers.  Use std::sort to sort sym_classes.
4349         (find_linespec_symbols): Remove cleanup.
4350
4351 2018-08-29  Keith Seitz  <keiths@redhat.com>
4352
4353         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4354         std::vector.  Update all users.
4355         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4356         (struct collect_info) <minimal_symbols>: Likewise.
4357         (compare_msymbols): Return bool.  Change parameters to const
4358         bound_minimal_symbol references.
4359         (find_method, find_function_symbols, find_linespec_symbols): Change
4360         `minsyms' parameter to std::vector.  Update all callers.
4361
4362 2018-08-29  Keith Seitz  <keiths@redhat.com>
4363
4364         * linespec.c (struct linespec) <label_symbols>: Change type to
4365         std::vector.  Update all users.
4366         (find_label_symbols_in_block): Change `result' parameter to
4367         std::vector.  Update all callers.
4368         (find_label_symbols): Return std::vector.  Update all callers.
4369
4370 2018-08-29  Keith Seitz  <keiths@redhat.com>
4371
4372         * linespec.c (struct linespec) <function_symbols>: Change type to
4373         std::vector.  Update all users.
4374         (struct collect_info) <function_symbols>: Likewise.
4375         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4376         (std_compare_symbols): New function.
4377         (find_method, find_function_symbols, find_linespec_symbols)
4378         (find_label_symbols_in_block): Change `symbols' parameter to
4379         std::vector.  Update all callers.
4380         (find_label_symbols): Likewise for `function_symbols' and
4381         `label_funcs_ret'.
4382
4383 2018-08-29  Keith Seitz  <keiths@redhat.com>
4384
4385         * linespec.c (symtab_vector_up): Define.
4386         (struct linespec) <file_symtabs>: Change type to std::vector *.
4387         Update all uses.
4388         (struct collect_info) <file_symtabs>: Likewise.
4389         (collect_symtabs_from_filename): Return symtab_vector_up.
4390         Update all callers.
4391         (decode_objc): Remove cleanup.
4392         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4393         (symtab_collector::release_symtabs): Return symtab_vector_up.
4394         Update all callers.
4395         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4396         Update all users.
4397         (collect_symtabs_from_filename, symtabs_from_filename): Return
4398         symtab_vector_up.  Update all callers.
4399
4400 2018-08-29  Tom Tromey  <tom@tromey.com>
4401
4402         * csky-tdep.c (csky_analyze_prologue): Use
4403         core_addr_to_string_nz.
4404
4405 2018-08-29  Tom Tromey  <tom@tromey.com>
4406
4407         * windows-nat.c (struct xlate_exception) <them>: Change type to
4408         DWORD.
4409         (xlate): Fix formatting.  Remove last entry.
4410         (struct xlate_exception, xlate): Comment out.
4411         (windows_nat_target::resume): Use ranged for.
4412
4413 2018-08-29  Jim Wilson  <jimw@sifive.com>
4414
4415         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4416         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4417         of NT_PRFPREG.
4418         (riscv_linux_nat_target::store_registers): Likewise.
4419
4420 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4421
4422         PR gdb/23555
4423         PR gdb/23558
4424         * gnulib/aclocal.m4: Regenerate.
4425         * gnulib/config.in: Regenerate.
4426         * gnulib/configure: Regenerate.
4427         * gnulib/import/Makefile.am: Update.
4428         * gnulib/import/Makefile.in: Update.
4429         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4430         * gnulib/import/_Noreturn.h: ... this.
4431         * gnulib/import/alloca.in.h: Update.
4432         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4433         * gnulib/import/arg-nonnull.h: ... this.
4434         * gnulib/import/assure.h: Update.
4435         * gnulib/import/at-func.c: Update.
4436         * gnulib/import/basename-lgpl.c: Update.
4437         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4438         * gnulib/import/c++defs.h: ... this.
4439         * gnulib/import/canonicalize-lgpl.c: Update.
4440         * gnulib/import/cdefs.h: Update.
4441         * gnulib/import/chdir-long.c: Update.
4442         * gnulib/import/chdir-long.h: Update.
4443         * gnulib/import/cloexec.c: Update.
4444         * gnulib/import/cloexec.h: Update.
4445         * gnulib/import/close.c: Update.
4446         * gnulib/import/closedir.c: Update.
4447         * gnulib/import/config.charset: Update.
4448         * gnulib/import/dirent-private.h: Update.
4449         * gnulib/import/dirent.in.h: Update.
4450         * gnulib/import/dirfd.c: Update.
4451         * gnulib/import/dirname-lgpl.c: Update.
4452         * gnulib/import/dirname.h: Update.
4453         * gnulib/import/dosname.h: Update.
4454         * gnulib/import/dup-safer-flag.c: Update.
4455         * gnulib/import/dup-safer.c: Update.
4456         * gnulib/import/dup.c: Update.
4457         * gnulib/import/dup2.c: Update.
4458         * gnulib/import/errno.in.h: Update.
4459         * gnulib/import/error.c: Update.
4460         * gnulib/import/error.h: Update.
4461         * gnulib/import/exitfail.c: Update.
4462         * gnulib/import/exitfail.h: Update.
4463         * gnulib/import/extra/update-copyright: Update.
4464         * gnulib/import/fchdir.c: Update.
4465         * gnulib/import/fcntl.c: Update.
4466         * gnulib/import/fcntl.in.h: Update.
4467         * gnulib/import/fd-hook.c: Update.
4468         * gnulib/import/fd-hook.h: Update.
4469         * gnulib/import/fd-safer-flag.c: Update.
4470         * gnulib/import/fd-safer.c: Update.
4471         * gnulib/import/fdopendir.c: Update.
4472         * gnulib/import/filename.h: Update.
4473         * gnulib/import/filenamecat-lgpl.c: Update.
4474         * gnulib/import/filenamecat.h: Update.
4475         * gnulib/import/flexmember.h: Update.
4476         * gnulib/import/float+.h: Update.
4477         * gnulib/import/float.c: Update.
4478         * gnulib/import/float.in.h: Update.
4479         * gnulib/import/fnmatch.c: Update.
4480         * gnulib/import/fnmatch.in.h: Update.
4481         * gnulib/import/fnmatch_loop.c: Update.
4482         * gnulib/import/fpucw.h: Update.
4483         * gnulib/import/frexp.c: Update.
4484         * gnulib/import/frexpl.c: Update.
4485         * gnulib/import/fstat.c: Update.
4486         * gnulib/import/fstatat.c: Update.
4487         * gnulib/import/getcwd-lgpl.c: Update.
4488         * gnulib/import/getcwd.c: Update.
4489         * gnulib/import/getdtablesize.c: Update.
4490         * gnulib/import/getlogin_r.c: Update.
4491         * gnulib/import/getprogname.c: Update.
4492         * gnulib/import/getprogname.h: Update.
4493         * gnulib/import/gettext.h: Update.
4494         * gnulib/import/gettimeofday.c: Update.
4495         * gnulib/import/glob-libc.h: Update.
4496         * gnulib/import/glob.c: Update.
4497         * gnulib/import/glob.in.h: Update.
4498         * gnulib/import/glob_internal.h: Update.
4499         * gnulib/import/glob_pattern_p.c: Update.
4500         * gnulib/import/globfree.c: Update.
4501         * gnulib/import/hard-locale.c: Update.
4502         * gnulib/import/hard-locale.h: Update.
4503         * gnulib/import/intprops.h: Update.
4504         * gnulib/import/inttypes.in.h: Update.
4505         * gnulib/import/isnan.c: Update.
4506         * gnulib/import/isnand-nolibm.h: Update.
4507         * gnulib/import/isnand.c: Update.
4508         * gnulib/import/isnanl-nolibm.h: Update.
4509         * gnulib/import/isnanl.c: Update.
4510         * gnulib/import/itold.c: Update.
4511         * gnulib/import/libc-config.h: Update.
4512         * gnulib/import/limits.in.h: Update.
4513         * gnulib/import/localcharset.c: Update.
4514         * gnulib/import/localcharset.h: Update.
4515         * gnulib/import/localtime-buffer.c: Update.
4516         * gnulib/import/localtime-buffer.h: Update.
4517         * gnulib/import/lstat.c: Update.
4518         * gnulib/import/m4/00gnulib.m4: Update.
4519         * gnulib/import/m4/__inline.m4: Update.
4520         * gnulib/import/m4/absolute-header.m4: Update.
4521         * gnulib/import/m4/alloca.m4: Update.
4522         * gnulib/import/m4/builtin-expect.m4: Update.
4523         * gnulib/import/m4/canonicalize.m4: Update.
4524         * gnulib/import/m4/chdir-long.m4: Update.
4525         * gnulib/import/m4/close.m4: Update.
4526         * gnulib/import/m4/closedir.m4: Update.
4527         * gnulib/import/m4/configmake.m4: Update.
4528         * gnulib/import/m4/d-ino.m4: Update.
4529         * gnulib/import/m4/d-type.m4: Update.
4530         * gnulib/import/m4/dirent_h.m4: Update.
4531         * gnulib/import/m4/dirfd.m4: Update.
4532         * gnulib/import/m4/dirname.m4: Update.
4533         * gnulib/import/m4/double-slash-root.m4: Update.
4534         * gnulib/import/m4/dup.m4: Update.
4535         * gnulib/import/m4/dup2.m4: Update.
4536         * gnulib/import/m4/eealloc.m4: Update.
4537         * gnulib/import/m4/environ.m4: Update.
4538         * gnulib/import/m4/errno_h.m4: Update.
4539         * gnulib/import/m4/error.m4: Update.
4540         * gnulib/import/m4/exponentd.m4: Update.
4541         * gnulib/import/m4/exponentl.m4: Update.
4542         * gnulib/import/m4/extensions.m4: Update.
4543         * gnulib/import/m4/extern-inline.m4: Update.
4544         * gnulib/import/m4/fchdir.m4: Update.
4545         * gnulib/import/m4/fcntl-o.m4: Update.
4546         * gnulib/import/m4/fcntl.m4: Update.
4547         * gnulib/import/m4/fcntl_h.m4: Update.
4548         * gnulib/import/m4/fdopendir.m4: Update.
4549         * gnulib/import/m4/filenamecat.m4: Update.
4550         * gnulib/import/m4/flexmember.m4: Update.
4551         * gnulib/import/m4/float_h.m4: Update.
4552         * gnulib/import/m4/fnmatch.m4: Update.
4553         * gnulib/import/m4/fnmatch_h.m4: Update.
4554         * gnulib/import/m4/fpieee.m4: Update.
4555         * gnulib/import/m4/frexp.m4: Update.
4556         * gnulib/import/m4/frexpl.m4: Update.
4557         * gnulib/import/m4/fstat.m4: Update.
4558         * gnulib/import/m4/fstatat.m4: Update.
4559         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4560         * gnulib/import/m4/getcwd-path-max.m4: Update.
4561         * gnulib/import/m4/getcwd.m4: Update.
4562         * gnulib/import/m4/getdtablesize.m4: Update.
4563         * gnulib/import/m4/getlogin.m4: Update.
4564         * gnulib/import/m4/getlogin_r.m4: Update.
4565         * gnulib/import/m4/getpagesize.m4: Update.
4566         * gnulib/import/m4/getprogname.m4: Update.
4567         * gnulib/import/m4/gettimeofday.m4: Update.
4568         * gnulib/import/m4/glibc21.m4: Update.
4569         * gnulib/import/m4/glob.m4: Update.
4570         * gnulib/import/m4/glob_h.m4: Update.
4571         * gnulib/import/m4/gnulib-cache.m4: Update.
4572         * gnulib/import/m4/gnulib-common.m4: Update.
4573         * gnulib/import/m4/gnulib-comp.m4: Update.
4574         * gnulib/import/m4/gnulib-tool.m4: Update.
4575         * gnulib/import/m4/hard-locale.m4: Update.
4576         * gnulib/import/m4/include_next.m4: Update.
4577         * gnulib/import/m4/inttypes-pri.m4: Update.
4578         * gnulib/import/m4/inttypes.m4: Update.
4579         * gnulib/import/m4/isnand.m4: Update.
4580         * gnulib/import/m4/isnanl.m4: Update.
4581         * gnulib/import/m4/largefile.m4: Update.
4582         * gnulib/import/m4/limits-h.m4: Update.
4583         * gnulib/import/m4/localcharset.m4: Update.
4584         * gnulib/import/m4/locale-fr.m4: Update.
4585         * gnulib/import/m4/locale-ja.m4: Update.
4586         * gnulib/import/m4/locale-zh.m4: Update.
4587         * gnulib/import/m4/localtime-buffer.m4: Update.
4588         * gnulib/import/m4/longlong.m4: Update.
4589         * gnulib/import/m4/lstat.m4: Update.
4590         * gnulib/import/m4/malloc.m4: Update.
4591         * gnulib/import/m4/malloca.m4: Update.
4592         * gnulib/import/m4/math_h.m4: Update.
4593         * gnulib/import/m4/mbrtowc.m4: Update.
4594         * gnulib/import/m4/mbsinit.m4: Update.
4595         * gnulib/import/m4/mbsrtowcs.m4: Update.
4596         * gnulib/import/m4/mbstate_t.m4: Update.
4597         * gnulib/import/m4/memchr.m4: Update.
4598         * gnulib/import/m4/memmem.m4: Update.
4599         * gnulib/import/m4/mempcpy.m4: Update.
4600         * gnulib/import/m4/memrchr.m4: Update.
4601         * gnulib/import/m4/mkdir.m4: Update.
4602         * gnulib/import/m4/mkstemp.m4: Update.
4603         * gnulib/import/m4/mmap-anon.m4: Update.
4604         * gnulib/import/m4/mode_t.m4: Update.
4605         * gnulib/import/m4/msvc-inval.m4: Update.
4606         * gnulib/import/m4/msvc-nothrow.m4: Update.
4607         * gnulib/import/m4/multiarch.m4: Update.
4608         * gnulib/import/m4/nocrash.m4: Update.
4609         * gnulib/import/m4/off_t.m4: Update.
4610         * gnulib/import/m4/onceonly.m4: Update.
4611         * gnulib/import/m4/open-cloexec.m4: Update.
4612         * gnulib/import/m4/open.m4: Update.
4613         * gnulib/import/m4/openat.m4: Update.
4614         * gnulib/import/m4/opendir.m4: Update.
4615         * gnulib/import/m4/pathmax.m4: Update.
4616         * gnulib/import/m4/rawmemchr.m4: Update.
4617         * gnulib/import/m4/readdir.m4: Update.
4618         * gnulib/import/m4/readlink.m4: Update.
4619         * gnulib/import/m4/realloc.m4: Update.
4620         * gnulib/import/m4/rename.m4: Update.
4621         * gnulib/import/m4/rewinddir.m4: Update.
4622         * gnulib/import/m4/rmdir.m4: Update.
4623         * gnulib/import/m4/save-cwd.m4: Update.
4624         * gnulib/import/m4/secure_getenv.m4: Update.
4625         * gnulib/import/m4/setenv.m4: Update.
4626         * gnulib/import/m4/signal_h.m4: Update.
4627         * gnulib/import/m4/ssize_t.m4: Update.
4628         * gnulib/import/m4/stat-time.m4: Update.
4629         * gnulib/import/m4/stat.m4: Update.
4630         * gnulib/import/m4/std-gnu11.m4: Update.
4631         * gnulib/import/m4/stdbool.m4: Update.
4632         * gnulib/import/m4/stddef_h.m4: Update.
4633         * gnulib/import/m4/stdint.m4: Update.
4634         * gnulib/import/m4/stdio_h.m4: Update.
4635         * gnulib/import/m4/stdlib_h.m4: Update.
4636         * gnulib/import/m4/strchrnul.m4: Update.
4637         * gnulib/import/m4/strdup.m4: Update.
4638         * gnulib/import/m4/strerror.m4: Update.
4639         * gnulib/import/m4/string_h.m4: Update.
4640         * gnulib/import/m4/strstr.m4: Update.
4641         * gnulib/import/m4/strtok_r.m4: Update.
4642         * gnulib/import/m4/sys_socket_h.m4: Update.
4643         * gnulib/import/m4/sys_stat_h.m4: Update.
4644         * gnulib/import/m4/sys_time_h.m4: Update.
4645         * gnulib/import/m4/sys_types_h.m4: Update.
4646         * gnulib/import/m4/tempname.m4: Update.
4647         * gnulib/import/m4/time_h.m4: Update.
4648         * gnulib/import/m4/unistd-safer.m4: Update.
4649         * gnulib/import/m4/unistd_h.m4: Update.
4650         * gnulib/import/m4/warn-on-use.m4: Update.
4651         * gnulib/import/m4/wchar_h.m4: Update.
4652         * gnulib/import/m4/wchar_t.m4: Update.
4653         * gnulib/import/m4/wctype_h.m4: Update.
4654         * gnulib/import/m4/wint_t.m4: Update.
4655         * gnulib/import/malloc.c: Update.
4656         * gnulib/import/malloc/scratch_buffer.h: Update.
4657         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4658         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4659         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4660         * gnulib/import/malloca.c: Update.
4661         * gnulib/import/malloca.h: Update.
4662         * gnulib/import/malloca.valgrind: Update.
4663         * gnulib/import/math.in.h: Update.
4664         * gnulib/import/mbrtowc.c: Update.
4665         * gnulib/import/mbsinit.c: Update.
4666         * gnulib/import/mbsrtowcs-impl.h: Update.
4667         * gnulib/import/mbsrtowcs-state.c: Update.
4668         * gnulib/import/mbsrtowcs.c: Update.
4669         * gnulib/import/memchr.c: Update.
4670         * gnulib/import/memmem.c: Update.
4671         * gnulib/import/mempcpy.c: Update.
4672         * gnulib/import/memrchr.c: Update.
4673         * gnulib/import/mkdir.c: Update.
4674         * gnulib/import/mkstemp.c: Update.
4675         * gnulib/import/msvc-inval.c: Update.
4676         * gnulib/import/msvc-inval.h: Update.
4677         * gnulib/import/msvc-nothrow.c: Update.
4678         * gnulib/import/msvc-nothrow.h: Update.
4679         * gnulib/import/open.c: Update.
4680         * gnulib/import/openat-die.c: Update.
4681         * gnulib/import/openat-priv.h: Update.
4682         * gnulib/import/openat-proc.c: Update.
4683         * gnulib/import/openat.c: Update.
4684         * gnulib/import/openat.h: Update.
4685         * gnulib/import/opendir.c: Update.
4686         * gnulib/import/pathmax.h: Update.
4687         * gnulib/import/pipe-safer.c: Update.
4688         * gnulib/import/rawmemchr.c: Update.
4689         * gnulib/import/readdir.c: Update.
4690         * gnulib/import/readlink.c: Update.
4691         * gnulib/import/realloc.c: Update.
4692         * gnulib/import/ref-add.sin: Update.
4693         * gnulib/import/ref-del.sin: Update.
4694         * gnulib/import/rename.c: Update.
4695         * gnulib/import/rewinddir.c: Update.
4696         * gnulib/import/rmdir.c: Update.
4697         * gnulib/import/same-inode.h: Update.
4698         * gnulib/import/save-cwd.c: Update.
4699         * gnulib/import/save-cwd.h: Update.
4700         * gnulib/import/scratch_buffer.h: Update.
4701         * gnulib/import/secure_getenv.c: Update.
4702         * gnulib/import/setenv.c: Update.
4703         * gnulib/import/signal.in.h: Update.
4704         * gnulib/import/stat-time.c: Update.
4705         * gnulib/import/stat-time.h: Update.
4706         * gnulib/import/stat-w32.c: Update.
4707         * gnulib/import/stat-w32.h: Update.
4708         * gnulib/import/stat.c: Update.
4709         * gnulib/import/stdbool.in.h: Update.
4710         * gnulib/import/stddef.in.h: Update.
4711         * gnulib/import/stdint.in.h: Update.
4712         * gnulib/import/stdio.in.h: Update.
4713         * gnulib/import/stdlib.in.h: Update.
4714         * gnulib/import/str-two-way.h: Update.
4715         * gnulib/import/strchrnul.c: Update.
4716         * gnulib/import/strdup.c: Update.
4717         * gnulib/import/streq.h: Update.
4718         * gnulib/import/strerror-override.c: Update.
4719         * gnulib/import/strerror-override.h: Update.
4720         * gnulib/import/strerror.c: Update.
4721         * gnulib/import/string.in.h: Update.
4722         * gnulib/import/stripslash.c: Update.
4723         * gnulib/import/strnlen1.c: Update.
4724         * gnulib/import/strnlen1.h: Update.
4725         * gnulib/import/strstr.c: Update.
4726         * gnulib/import/strtok_r.c: Update.
4727         * gnulib/import/sys_stat.in.h: Update.
4728         * gnulib/import/sys_time.in.h: Update.
4729         * gnulib/import/sys_types.in.h: Update.
4730         * gnulib/import/tempname.c: Update.
4731         * gnulib/import/tempname.h: Update.
4732         * gnulib/import/time.in.h: Update.
4733         * gnulib/import/unistd--.h: Update.
4734         * gnulib/import/unistd-safer.h: Update.
4735         * gnulib/import/unistd.in.h: Update.
4736         * gnulib/import/unsetenv.c: Update.
4737         * gnulib/import/verify.h: Update.
4738         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4739         * gnulib/import/wchar.in.h: Update.
4740         * gnulib/import/wctype.in.h: Update.
4741         * gnulib/import/xalloc-oversized.h: Update.
4742         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4743         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4744
4745 2018-08-16  Gary Benson <gbenson@redhat.com>
4746
4747         PR gdb/13000:
4748         * gdb/main.c (captured_main_1): Exit with nonzero status
4749         in batch mode if the last command to be executed failed.
4750         * NEWS: Mention the above.
4751
4752 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4753
4754         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4755         end of warning message.
4756
4757 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4758
4759         PR gdb/22943:
4760         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4761         (aarch64_extract_return_value): Use
4762         aapcs_is_vfp_call_or_return_candidate.
4763         (aarch64_return_in_memory): Likewise.
4764         (aarch64_store_return_value): Likewise.
4765
4766 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4767
4768         * aarch64-tdep.c
4769         (aapcs_is_vfp_call_or_return_candidate): Make static
4770         (pass_in_v_or_stack): Remove function.
4771         (pass_in_v_vfp_candidate): New function.
4772         (aarch64_push_dummy_call): Check for float register candidates.
4773
4774 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4775
4776         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4777         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4778         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4779
4780 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4781
4782         PR build/23399
4783         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4784         (struct ipa_sym_addresses): Rename to...
4785         (struct ipa_sym_addresses_common): ... this.
4786         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4787
4788 2018-08-28  Tom Tromey  <tom@tromey.com>
4789
4790         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4791         (token_fifo): Now a std::vector.
4792         (yylex, c_parse): Update.
4793         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4794         (token_fifo): Now a std::vector.
4795         (yylex, d_parse): Update.
4796         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4797         (token_fifo): Now a std::vector.
4798         (yylex, go_parse): Update.
4799
4800 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4801
4802         * parser-defs.h (struct type_stack) <elements>: Change type to
4803         std::vector<union type_stack_elt>.
4804         <depth, size>: Remove.
4805         * parse.c (parse_exp_in_context_1): Adjust.
4806         (type_stack_reserve): Remove.
4807         (check_type_stack_depth): Remove.
4808         (insert_into_type_stack): Adjust to std::vector.
4809         (insert_type): Likewise.
4810         (push_type): Likewise.
4811         (push_type_int): Likewise.
4812         (insert_type_address_space): Likewise.
4813         (pop_type): Likewise.
4814         (pop_type_int): Likewise.
4815         (pop_typelist): Likewise.
4816         (pop_type_stack): Likewise.
4817         (append_type_stack): Likewise.
4818         (push_type_stack): Likewise.
4819         (get_type_stack): Likewise.
4820         (type_stack_cleanup): Likewise.
4821         (push_typelist): Likewise.
4822         (follow_types): Likewise.
4823         (_initialize_parse): Likewise.
4824
4825 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4826
4827         * NEWS: Mention csky target.
4828
4829 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4830             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4831             Don Breazeal  <donb@codesourcery.com>
4832
4833         * csky-linux-tdep.c: New file.
4834         * csky-tdep.c: Likewise.
4835         * csky-tdep.h: Likewise.
4836         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4837         csky-tdep.o.
4838         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4839         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4840         * configure.tgt: Add csky support.
4841
4842 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4843
4844         * python/py-framefilter.c (py_print_frame): Print frame architecture
4845         when printing on an MI output.
4846
4847 2018-08-27  Tom Tromey  <tom@tromey.com>
4848
4849         PR build/23087:
4850         * configure: Rebuild.
4851         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4852
4853 2018-08-27  Tom Tromey  <tom@tromey.com>
4854
4855         * aarch64-linux-tdep.c
4856         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4857         casts to int.
4858
4859 2018-08-27  Tom Tromey  <tom@tromey.com>
4860
4861         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4862         unsigned.
4863         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4864         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4865         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4866         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4867         unsigned.
4868
4869 2018-08-27  Tom Tromey  <tom@tromey.com>
4870
4871         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4872         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4873
4874 2018-08-27  Tom Tromey  <tom@tromey.com>
4875
4876         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4877         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4878         ULONGEST_MAX.
4879         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4880         ULONGEST_MAX.
4881         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4882         ULONGEST_MAX.
4883         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4884         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4885         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4886         ULONGEST_MAX.
4887         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4888         (ppc64_linux_sigaction_tramp_frame)
4889         (ppc32_linux_sighandler_tramp_frame)
4890         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4891         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4892         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4893         * mn10300-linux-tdep.c (am33_linux_sigframe)
4894         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4895         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4896         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4897         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4898         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4899         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4900         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4901         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4902         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4903         * microblaze-linux-tdep.c
4904         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4905         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4906         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4907         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4908         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4909         * common/common-types.h (ULONGEST_MAX): New define.
4910         (CORE_ADDR_MAX): Fix formatting.
4911         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4912         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4913         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4914         (arm_linux_rt_sigreturn_tramp_frame)
4915         (arm_eabi_linux_sigreturn_tramp_frame)
4916         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4917         (thumb2_eabi_linux_sigreturn_tramp_frame)
4918         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4919         (arm_linux_restart_syscall_tramp_frame)
4920         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4921         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4922         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4923         ULONGEST_MAX.
4924         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4925
4926 2018-08-27  Tom Tromey  <tom@tromey.com>
4927
4928         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4929         CORE_ADDR_MAX.
4930         * mips-tdep.c (mips_deal_with_atomic_sequence)
4931         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4932         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4933         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4934         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4935         CORE_ADDR_MAX.
4936         * aarch64-tdep.c (aarch64_software_single_step): Use
4937         CORE_ADDR_MAX.
4938
4939 2018-08-27  Tom Tromey  <tom@tromey.com>
4940
4941         * linespec.c (complete_linespec_component): Add cast to "char".
4942         * completer.c (completion_tracker::build_completion_result): Add
4943         cast to "char".
4944
4945 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4946
4947         * solist.h (struct solist, struct target_so_ops): Fix
4948         indentation.
4949
4950 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4951
4952         * ada-tasks.c (ada_task_info_s): Remove typedef.
4953         (DEF_VEC_O(ada_task_info_s)): Remove.
4954         (struct ada_tasks_inferior_data): Initialize fields.
4955         <task_list>: Make an std::vector.
4956         (get_ada_tasks_inferior_data): Allocate with new.
4957         (ada_get_task_number): Adjust.
4958         (get_task_number_from_id): Likewise.
4959         (valid_task_id): Likewise.
4960         (ada_get_task_info_from_ptid): Likewise.
4961         (iterate_over_live_ada_tasks): Likewise.
4962         (add_ada_task): Likewise.
4963         (read_known_tasks): Likewise.
4964         (ada_build_task_list): Likewise.
4965         (print_ada_task_info): Likewise.
4966         (info_task): Likewise.
4967         (task_command_1): Likewise.
4968
4969 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4970
4971         * ada-lang.c (add_angle_brackets): Return std::string.
4972
4973 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4974
4975         * python/py-threadevent.c (py_get_event_thread): Initialize
4976         pythread.
4977
4978 2018-08-24  Pedro Alves  <palves@redhat.com>
4979
4980         * python/py-bpevent.c (create_breakpoint_event_object): Use
4981         copy-initialization.
4982         * python/py-continueevent.c (emit_continue_event): Use
4983         copy-initialization.
4984         * python/py-exitedevent.c (create_exited_event_object): Return a
4985         gdbpy_ref<>.
4986         (emit_exited_event): Use copy-initialization.
4987         * python/py-inferior.c (python_new_inferior)
4988         (python_inferior_deleted, add_thread_object): Use
4989         copy-initialization.
4990         * python/py-infevents.c (create_inferior_call_event_object)
4991         (create_register_changed_event_object)
4992         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4993         (emit_inferior_call_event, emit_memory_changed_event)
4994         (emit_register_changed_event): Use copy-initialization.
4995         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4996         Return a gdbpy_ref<>.
4997         (emit_new_objfile_event): Use copy-initialization.
4998         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4999         (emit_clear_objfiles_event): Use copy-initialization.
5000         * python/py-signalevent.c (create_signal_event_object): Use
5001         copy-initialization.
5002         * python/py-threadevent.c (create_thread_event_object): Use
5003         copy-initialization.
5004
5005 2018-08-24  Pedro Alves  <palves@redhat.com>
5006             Simon Marchi  <simon.marchi@ericsson.com>
5007
5008         PR gdb/23379
5009         * python/py-continueevent.c: Include "gdbthread.h".
5010         (create_continue_event_object): Add intro comment.  Add 'ptid'
5011         parameter.  Use it to find thread to pass to
5012         create_thread_event_object.
5013         (emit_continue_event): Pass PTID down to
5014         create_continue_event_object.
5015         * python/py-event.h (py_get_event_thread): Declare.
5016         (create_thread_event_object): Remove default from 'thread'
5017         parameter.
5018         * python/py-stopevent.c (create_stop_event_object): Use
5019         py_get_event_thread.
5020         * python/py-threadevent.c (get_event_thread): Rename to ...
5021         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5022         and use it to find the thread.
5023         (create_thread_event_object): Assert that THREAD isn't null.
5024         Don't find the event thread here.
5025
5026 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
5027
5028         * block.h (blockrange, blockranges): New struct declarations.
5029         (struct block): Add new field named `ranges'.
5030         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5031         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5032         macros for accessing ranges in struct block.
5033         (make_blockranges): New declaration.
5034         block.c (make_blockranges): New function.
5035         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5036         for block.
5037         * symtab.h (find_pc_partial_function): Add new parameter `block'.
5038         * blockframe.c (cache_pc_function_block): New static global.
5039         (clear_pc_function_cache): Clear cache_pc_function_block.
5040         (find_pc_partial_function): Move comment to symtab.h.  Add
5041         support for non-contiguous blocks.
5042         * cli/cli-cmds.c (block.h): Include.
5043         (print_disassembly): Handle printing of non-contiguous blocks.
5044         (disassemble_current_function): Likewise.
5045         (disassemble_command): Likewise.
5046
5047         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5048         BLOCK_START.
5049         * blockframe.c (get_pc_function_start): Likewise.
5050         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5051         (gcc_symbol_address): Likewise.
5052         * compile/compile-object-run.c (compile_object_run): Likewise.
5053         * compile/compile.c (get_expr_block_and_pc): Likewise.
5054         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5055         (func_addr_to_tail_call_list): Likewise.
5056         * findvar.c (default_read_var_value): Likewise.
5057         * inline-frame.c (inline_frame_this_id): Likewise.
5058         (skip-inline_frames): Likewise.
5059         * infcmd.c (until_next_command): Likewise.
5060         * linespec.c (convert_linespec_to_sals): Likewise.
5061         * parse.c (parse_exp_in_context_1): Likewise.
5062         * printcmd.c (build_address_symbolic): likewise.
5063         (info_address_command): Likewise.
5064         symtab.c (find_function_start_sal): Likewise.
5065         (skip_prologue_sal): Likewise.
5066         (find_function_alias_target): Likewise.
5067         (find_gnu_ifunc): Likewise.
5068         * stack.c (find_frame_funname): Likewise.
5069         * symtab.c (fixup_symbol_section): Likewise.
5070         (find_function_start_sal): Likewise.
5071         (skip_prologue_sal): Likewsie.
5072         (find_function_alias_target): Likewise.
5073         (find_gnu_ifunc): Likewise.
5074         * tracepoint.c (info_scope_command): Likewise.
5075         * value.c (value_fn_field): Likewise.
5076
5077         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5078         in place of find_pc_partial_function.
5079         * blockframe.c (find_function_entry_range_from_pc): New function.
5080         * symtab.h (find_function_entry_range_from_pc): Declare and document.
5081         * objfiles.c (objfile_relocate1): Relocate start and end addresses
5082         for each range in a block.
5083
5084
5085 2018-08-23  Xavier Roirand  <roirand@adacore.com>
5086
5087         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5088         incrementation.
5089
5090 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5091
5092         * solib-svr4.c (read_program_headers_from_bfd): Return
5093         gdb::optional<gdb::byte_vector>.
5094         (svr4_exec_displacement): Adjust.
5095
5096 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5097
5098         * solib-svr4.c (read_program_header): Return
5099         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5100         (find_program_interpreter): Return
5101         gdb::optional<gdb::byte_vector>.
5102         (scan_dyntag_auxv): Adjust.
5103         (enable_break): Adjust.
5104         (svr4_exec_displacement): Adjust.
5105
5106 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5107
5108         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5109         * inf-child.c (inf_child_target::terminal_save_inferior): New.
5110
5111 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5112
5113         * guile/scm-string.c (gdbscm_scm_from_printf): Use
5114         string_vprintf.
5115         * guile/scm-utils.c (gdbscm_printf): Likewise.
5116         * serial.c (serial_printf): Likewise.
5117         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5118
5119 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
5120
5121         * stack.c (print_frame): Print frame architecture when printing on
5122         an MI output.
5123         * NEWS: Mention new "arch" attribute in frame output.
5124
5125 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5126
5127         * arch/aarch64.h (aarch64_regnum): Update comment.
5128
5129 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5130
5131         * NEWS: Add SVE to 8.2 section.
5132
5133 2018-08-21  Pedro Alves  <palves@redhat.com>
5134
5135         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5136         out from gdbscm_parse_function_args.
5137         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5138         gdbscm_parse_function_args_1.
5139
5140 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
5141
5142         PR gdb/17816
5143         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5144         operator.
5145
5146 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
5147
5148         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5149
5150 2018-08-19  Michael Spang  <spang@google.com>
5151
5152         PR gdb/11786
5153         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5154         for PT_TLS segments.
5155
5156 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
5157
5158         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5159         dwarf_variable_value.
5160         * dwarf2-frame.c (class dwarf_expr_executor):
5161         Add override for dwarf_variable_value.
5162         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5163         (class symbol_needs_eval_context): Likewise.
5164         (indirect_synthetic_pointer): Add forward declaration.
5165         (sect_variable_value): New function.
5166         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5167         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5168         for DW_OP_GNU_variable_value.
5169
5170 2018-08-16  Tom Tromey  <tom@tromey.com>
5171
5172         * top.c (read_command_file): Update.
5173         (command_line_input): Remove "repeat" argument.
5174         * ada-lang.c (get_selections): Update.
5175         * linespec.c (decode_line_2): Update.
5176         * defs.h (command_line_input): Remove argument.
5177         * cli/cli-script.c (read_next_line): Update.
5178         * python/py-gdb-readline.c: Update.
5179
5180 2018-08-17  Tom Tromey  <tom@tromey.com>
5181
5182         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5183         command_line_input.
5184
5185 2018-08-15  Tom Tromey  <tom@tromey.com>
5186
5187         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5188
5189 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
5190
5191         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5192         If used, use find_pc_partial_function to find address range
5193         to disassemble.
5194         * mi/mi-main.c (mi_cmd_list_features): Report
5195         "data-disassemble-a-option" feature.
5196         * NEWS: Mention new -data-disassemble option -a.
5197
5198 2018-08-13  Tom Tromey  <tom@tromey.com>
5199
5200         * common/common-defs.h (_FORTIFY_SOURCE): Define.
5201
5202 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5203
5204         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5205         (aarch64_linux_collect_sve_regset): Likewise.
5206         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5207         * regcache.h (regcache_map_entry_size): New function.
5208
5209 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5210
5211         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5212         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5213         (SVE_HEADER_VL_LENGTH): Likewise.
5214         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5215         (SVE_HEADER_FLAGS_LENGTH): Likewise.
5216         (SVE_HEADER_RESERVED_LENGTH): Likewise.
5217         (SVE_HEADER_SIZE_OFFSET): Likewise.
5218         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5219         (SVE_HEADER_VL_OFFSET): Likewise.
5220         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5221         (SVE_HEADER_FLAGS_OFFSET): Likewise.
5222         (SVE_HEADER_RESERVED_OFFSET): Likewise.
5223         (SVE_HEADER_SIZE): Likewise.
5224         (aarch64_linux_core_read_vq): Add function.
5225         (aarch64_linux_core_read_description): Check for SVE section.
5226
5227 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5228
5229         * aarch64-fbsd-tdep.c
5230         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5231         collect_size.
5232         * aarch64-linux-tdep.c
5233         (aarch64_linux_iterate_over_regset_sections): Likewise.
5234         * alpha-linux-tdep.c
5235         (alpha_linux_iterate_over_regset_sections):
5236         * alpha-nbsd-tdep.c
5237         (alphanbsd_iterate_over_regset_sections): Likewise.
5238         * amd64-fbsd-tdep.c
5239         (amd64fbsd_iterate_over_regset_sections): Likewise.
5240         * amd64-linux-tdep.c
5241         (amd64_linux_iterate_over_regset_sections): Likewise.
5242         * arm-bsd-tdep.c
5243         (armbsd_iterate_over_regset_sections): Likewise.
5244         * arm-fbsd-tdep.c
5245         (arm_fbsd_iterate_over_regset_sections): Likewise.
5246         * arm-linux-tdep.c
5247         (arm_linux_iterate_over_regset_sections): Likewise.
5248         * corelow.c (get_core_registers_cb): Likewise.
5249         (core_target::fetch_registers): Likewise.
5250         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5251         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5252         * gdbarch.h (void): Regenerate.
5253         * gdbarch.sh: Add supply_size and collect_size.
5254         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5255         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5256         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5257         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5258         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5259         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5260         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5261         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5262         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5263         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5264         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5265         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5266         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5267         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5268         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5269         Likewise.
5270         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5271         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5272         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5273         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5274         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5275         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5276         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5277         Likewise.
5278         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5279         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5280         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5281         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5282         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5283         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5284         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5285         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5286
5287 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
5288
5289         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5290         with string_printf.
5291
5292 2018-08-10  Keith Seitz  <keiths@redhat.com>
5293
5294         * compile/compile-c-support.c (add_code_header, add_code_footer):
5295         Move into policy class.
5296         (c_push_user_expression, pop_user_expression_nop)
5297         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5298         (compile_program): New host class.
5299         (c_compile_program): New typedef.
5300         (c_compute_porgram): Use c_compile_program.
5301
5302 2018-08-10  Keith Seitz  <keiths@redhat.com>
5303
5304         * compile/compile-internal.h (compile_instance::~compile_instance):
5305         Remove calls to htab_delete.
5306         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5307         * compile.c (compile_instance::compile_instance): Initialize
5308         htab unique pointers.
5309         (compile_instance::get_cached_type, compile_instance::insert_type)
5310         (compile_instance::error_symbol_once): Update for unique_ptr.
5311
5312 2018-08-10  Keith Seitz  <keiths@redhat.com>
5313
5314         * compile/compile-c-symbols.c (struct symbol_error)
5315         (hash_symbol_error, eq_symbol_error, del_symbol_error)
5316         (compile_instance::insert_symbol_error)
5317         (compile_instance::error_symbol_once): Move to ...
5318         * compile/compile.c: ... here.
5319
5320 2018-08-10  Keith Seitz  <keiths@redhat.com>
5321
5322         * compile/compile-c-support.c (c_get_compile_context): Use `new'
5323         instead of `new_compile_instance'.
5324         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5325         Update description.
5326         If the symbol error map is not initialized, create it.
5327         (generate_c_for_for_one_symbol): Do not check/initialize
5328         the symbol error map.
5329         * compile/compile-c-types.c (compile_c_instance): Make a class.
5330         Update all callers.
5331         (compile_instance::compile_instance): Initialize the type cache.
5332         (get_cached_type): New function.
5333         (insert_type): Update description.
5334         (compile_c_instance::m_default_cflags): Define.
5335         (convert_type): Update description.  Use get_cached_type.
5336         (delete_instance): Moved to destructor.
5337         (new_compile_instance): Moved to constructor.
5338         * compile/compile-c.h (compile_c_instance): Make class inheriting
5339         from compile_instance.
5340         <base>: Remove field.
5341         <type_map, symbol_err_map>: Move to base class.
5342         <c_plugin>: Rename to `m_plugin' and remove pointer type.
5343         * compile/compile-internal.h (compile_instance): Make class.
5344         <type_map_t, symbol_err_map_t>: Define.
5345         <fe>: Rename to `m_gcc_fe'.
5346         <scope, block, gcc_target_options>: Add `m_' prefix.
5347         <m_type_map, m_symbol_err_map>: New fields, moved from
5348         compile_c_instance.
5349         <destroy>: Remove.
5350         (convert_type, new_compile_instance): Remove.
5351         * compile/compile.c (cleanup_compile_instance): Remove.
5352         (compile_to_object): Use unique_ptr to eliminate cleanups.
5353         (compile_instance::set_print_callback, compile_instance::version)
5354         (compile_instance::set_verbose)
5355         (compile_instance::set_driver_filename)
5356         (compile_instance::set_triplet_regexp)
5357         (compile_instance::set_arguments)
5358         (compile_instance::set_source_file)
5359         (compile_instance::compile): Define.
5360
5361 2018-08-10  Keith Seitz  <keiths@redhat.com>
5362
5363         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5364         * compile/compile-c-types.c: Define GCC_METHODN macros and include
5365         gcc-c-fe.def to define C plugin.
5366         (delete_instance): Delete `c_plugin'.
5367         (new_compile_instance): Initialize `c_plugin'.
5368         * compile/compile-c.h: Include gcc_c_plugin.h.
5369         (struct compile_c_instance) <c_plugin>: New member.
5370         * gcc-c-plugin.h: New file.
5371         Update all callers with API change.
5372
5373 2018-08-10  Keith Seitz  <keiths@redhat.com>
5374
5375         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5376         (HFILES_NO_SRCDIR): ... to here.
5377         Add compile-internal.h and compile-c.h.
5378         * compile/compile-c-support.c: Include compile-c.h.
5379         * compile/compile-c-symbols.c: Include compile-c.h.
5380         (generate_c_for_variable_locations): Update comment.
5381         * compile/compile-c-types.c: Include compile-c.h.
5382         * compile/compile-c.h: New file -- moved C language declarations
5383         from other files here.
5384         * compile/compile-internal.h: Do not include hashtab.h or
5385         common/enum-flags.h.
5386         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5387         (gcc_convert_symbol, gcc_symbol_address)
5388         (generate_c_for_variable_locations, c_get_mode_for_size)
5389         (c_get_range_decl_name): Definitions moved to compile-c.h.
5390         * compile/compile-loc2c.c: Include compile-c.h.
5391
5392 2018-08-10  Keith Seitz  <keiths@redhat.com>
5393
5394         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5395         (c_symbol_substitution_name): ... this.
5396         Update all callers.
5397
5398 2018-08-10  Keith Seitz  <keiths@redhat.com>
5399
5400         * compile/compile-c-support.c (c_compute_program): Use
5401         unique_xmalloc_ptr to eliminate cleanup.
5402         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5403         Return a unique_xmalloc_ptr and eliminate cleanup.
5404         * compile/compile-internal.h (generate_c_for_variable_locations):
5405         Return unique_xmalloc_ptr and update description.
5406
5407 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5408
5409         * corelow.c (core_target::get_core_register_section): Rename
5410         min_size to section_min_size.
5411
5412 2018-08-09  Jim Wilson  <jimw@sifive.com>
5413
5414         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5415         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5416         * NEWS: Mention new GNU/Linux RISC-V target.
5417         * configure.host: Add riscv*-*-linux*.
5418         * configure.nat: Add riscv*.
5419         * configure.tgt: Add riscv*-*-linux*.
5420         * riscv-linux-nat.c: New file.
5421         * riscv-linux-tdep.c: New file.
5422
5423 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5424
5425         * infrun.c (resume): Make static, add forward declaration.
5426         (proceed): Update header comment.
5427         * infrun.h (resume): Delete declaration.
5428
5429 2018-08-09  Tom Tromey  <tom@tromey.com>
5430
5431         * riscv-tdep.h: Minor formatting fixes.
5432
5433 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5434
5435         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5436         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5437         (test_mkdir_recursive): Likewise.
5438         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5439
5440 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5441
5442         * valarith.c (value_subscripted_rvalue): If an array is not in
5443         memory, and we don't know the upper bound, then we can't know that
5444         the requested element exists or not.
5445
5446 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5447
5448         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5449         (target_options_to_string): Add comment.
5450
5451 2018-08-08  Tom Tromey  <tom@tromey.com>
5452
5453         * unittests/scoped_mmap-selftests.c: Check result of "write".
5454
5455 2018-08-08  Jim Wilson  <jimw@sifive.com>
5456
5457         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5458         (decode_register_index_short): New.
5459         (decode_j_type_insn, decode_cj_type_insn): New.
5460         (decode_b_type_insn, decode_cb_type_insn): New.
5461         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5462         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5463         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5464         is_c_sw_insn instead of is_sw_insn.
5465         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5466         (riscv_software_single_step): New.
5467         * riscv-tdep.h (riscv_software_single_step): Declare.
5468
5469         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5470         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5471
5472 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5473
5474         PR gdb/18050:
5475         * target.c (dispose_inferior): Don't dispose of inferiors that are
5476         already killed.
5477
5478 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5479
5480         * remote.c (remote_target::download_tracepoint): Change char* to
5481         const char*.
5482
5483 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5484
5485         * target.h (target_options_to_string): Return an std::string.
5486         * target.c (str_comma_list_concat_elem): Return void, use
5487         std::string.
5488         (do_option): Likewise.
5489         (target_options_to_string): Return an std::string.
5490         * linux-nat.c (linux_nat_target::wait): Adjust.
5491         * target-debug.h (target_debug_print_options): Adjust.
5492
5493 2018-08-07  Tom Tromey  <tom@tromey.com>
5494
5495         * Makefile.in (CPPFLAGS): New variable.
5496         (INTERNAL_CPPFLAGS): Use it.
5497
5498 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5499
5500         * NEWS: Mention the index cache.
5501
5502 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5503
5504         * common/pathstuff.h (get_standard_cache_dir): New.
5505         * common/pathstuff.c (get_standard_cache_dir): New.
5506         * build-id.h (build_id_to_string): New.
5507         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5508         DEBUG_STR_SUFFIX): Move to here.
5509         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5510         DEBUG_STR_SUFFIX): Move from there.
5511         (write_psymtabs_to_index): Make non-static, add basename
5512         parameter.  Write to temporary files, rename when done.
5513         (save_gdb_index_command): Adjust call to
5514         write_psymtabs_to_index.
5515         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5516         field.
5517         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5518         (get_gdb_index_contents_from_cache): New.
5519         (get_gdb_index_contents_from_cache_dwz): New.
5520         (dwarf2_initialize_objfile): Read index from cache.
5521         (dwarf2_build_psymtabs): Save to index.
5522         * dwarf-index-cache.h: New file.
5523         * dwarf-index-cache.c: New file.
5524         * dwarf-index-write.h: New file.
5525
5526 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5527
5528         * gnulib/aclocal.m4: Re-generate.
5529         * gnulib/config.in: Re-generate.
5530         * gnulib/configure: Re-generate.
5531         * gnulib/import/Makefile.am: Re-generate.
5532         * gnulib/import/Makefile.in: Re-generate.
5533         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5534         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5535         * gnulib/import/m4/mkdir.m4: New file.
5536         * gnulib/import/mkdir.c: New file.
5537         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5538         module.
5539
5540 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5541
5542         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5543         * common/scoped_mmap.c: New file.
5544         * common/scoped_mmap.h (destroy): New method.
5545         (~scoped_mmap, reset): Use destroy.
5546         (scoped_mmap): New move constructor.
5547         (mmap_file): New declaration.
5548         * unittests/scoped_mmap-selftests.c (test_normal,
5549         test_invalid_filename, run_tests): New functions.
5550         (_initialize_scoped_mmap_selftests): Register selftest.
5551
5552 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5553
5554         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5555         (read_gdb_index_from_buffer): ... this.  Remove section
5556         parameter, add buffer parameter.
5557         (get_gdb_index_contents_ftype,
5558         get_gdb_index_contents_dwz_ftype): New typedefs.
5559         (dwarf2_read_gdb_index): Add callback parameters to get the
5560         index contents.
5561         (get_gdb_index_contents_from_section): New.
5562         (dwarf2_initialize_objfile): Update call to
5563         dwarf2_read_gdb_index.
5564
5565 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5566
5567         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5568         (gdb_open_cloexec): Likewise.
5569         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5570         (commandline_from_pid): Likewise.
5571         (linux_xfer_osdata_threads): Likewise.
5572         (linux_xfer_osdata_fds): Likewise.
5573         * ada-lang.c (is_package_name): Likewise.
5574         * auxv.c (procfs_xfer_auxv): Likewise.
5575         * breakpoint.c (print_one_breakpoint_location): Use
5576         uiout::field_fmt.
5577         (print_one_catch_solib): Use string_printf.
5578         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5579         (add_pe_forwarded_sym): Likewise.
5580         * dwarf2read.c (create_type_unit_group): Likewise.
5581         (build_error_marker_type): Likewise.
5582         * infcall.c (get_function_name): Likewise.
5583         * valprint.c (print_converted_chars_to_obstack): Likewise.
5584         * xtensa-tdep.c (xtensa_register_type): Likewise.
5585
5586 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5587
5588         * remote.c (remote_target::download_tracepoint): Fix format
5589         string errors.
5590
5591 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5592
5593         * tracefile.c: Include common/byte-vector.h.
5594         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5595         with trace_regblock_size if needed.  Update uses of buf.
5596
5597 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5598
5599         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5600         std::vector<unsigned char>.
5601         * tracepoint.c (collection_list::collection_list): Remove
5602         m_regs_mask initializer from initializer list.  Resize
5603         m_regs_mask using the largest remote register number.
5604         (collection_list::add_remote_register): Remove size check on
5605         m_regs_mask.  Use at to access element.
5606         (collection_list::stringify): Change type of temp_buf to
5607         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5608         stringify the register mask.  Use pack_hex_byte for the register
5609         mask.
5610
5611 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5612
5613         * tracepoint.h (class collection_list) <add_register>: Remove.
5614         <add_remote_register, add_ax_registers, add_local_register>:
5615         Declare.
5616         <add_memrange>: Add scope parameter.
5617         * tracepoint.c (encode_actions_1): Likewise.
5618         (collection_list::add_register): Rename to ...
5619         (collection_list::add_remote_register): ... this.  Update
5620         comment.
5621         (collection_list::add_ax_registers, add_local_register): New
5622         methods.
5623         (collection_list::add_memrange): Add scope parameter.  Call
5624         add_local_register instead of add_register.
5625         (finalize_tracepoint_aexpr): New function.
5626         (collection_list::collect_symbol): Update calls to add_memrange.
5627         Call add_local_register instead of add_register.  Call
5628         add_ax_registers.  Call finalize_tracepoint_aexpr.
5629         (encode_actions_1): Get remote regnos for $reg action.  Call
5630         add_remote_register, add_ax_registers, and add_local_register.
5631         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5632         (validate_actionline): Call finalize_tracepoint_aexpr.
5633
5634 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5635
5636         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5637         Replace array buf with gdb::char_vector buf, of size
5638         get_remote_packet_size ().  Replace references to buf and
5639         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5640         and xsnprintf with snprintf.  Raise errors if the buffer is too
5641         small.
5642
5643 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5644
5645         * remote.c (remote_target::download_tracepoint): Fix the has_more
5646         predicate in the QTDP action list iteration.
5647
5648 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5649
5650         * remote.c (remote_target::download_tracepoint): Fix indentation
5651         in for block.
5652
5653 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5654
5655         * proc-api.c (_initialize_proc_api): Remove c, unused.
5656         * procfs.c (procfs_init_inferior): Remove signals, unused.
5657         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5658         unused.
5659
5660 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5661             Andrew Burgess  <andrew.burgess@embecosm.com>
5662
5663         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5664         'W_STOPCODE (0)' as this could be ambiguous.
5665
5666 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5667
5668         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5669         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5670         "ai_socktype").
5671
5672 2018-08-02  Tom Tromey  <tom@tromey.com>
5673
5674         PR symtab/16842.
5675         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5676         symbols.
5677         (process_structure_scope): Likewise.
5678
5679 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5680
5681         PR gdb/22629:
5682         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5683         kill inferior.
5684
5685 2018-08-02  Tom Tromey  <tom@tromey.com>
5686
5687         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5688         (darwin_suspend_inferior, darwin_resume_inferior)
5689         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5690         (darwin_check_new_threads): Check result of get_darwin_inferior.
5691
5692 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5693
5694         GDB 8.1.1 released.
5695
5696 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5697
5698         * varobj.c (varobj_get_path_expr_parent): Report an error if
5699         parent is a dynamic varobj.
5700
5701 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5702
5703         * gnulib/aclocal.m4: Re-generate.
5704         * gnulib/config.in: Re-generate.
5705         * gnulib/configure: Re-generate.
5706         * gnulib/import/Makefile.in: Re-generate.
5707         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5708         * gnulib/import/m4/onceonly.m4: Re-generate.
5709
5710 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5711
5712         * target-descriptions.c (struct xml_test_tdesc): New.
5713         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5714         (record_xml_tdesc): Update.
5715         (maintenance_check_xml_descriptions): Update.
5716         * target-descriptions.h (record_xml_tdesc): Update comment.
5717
5718 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5719
5720         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5721         checking array bounds are defined.
5722
5723 2018-07-30  Tom Tromey  <tom@tromey.com>
5724
5725         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5726         irreflexivity violation.
5727
5728 2018-07-30  Tom Tromey  <tom@tromey.com>
5729
5730         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5731         * value.c (unpack_long): Remove lint code.
5732         * valops.c (value_ind): Remove lint code.
5733         * valarith.c (value_x_binop, value_x_unop, value_equal)
5734         (value_pos): Remove lint code.
5735
5736 2018-07-28  Tom de Vries  <tdevries@suse.de>
5737
5738         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5739         with undefined upper bound as <optimized out>.
5740
5741 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5742
5743         * gcore.in: Rename variable "name" to "prefix".  Expand
5744         "usage" text.
5745
5746 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5747
5748         * windows-nat.c (windows_nat_target::create_inferior): Update to
5749         call close() in global namespace.
5750
5751 2018-07-26  Tom Tromey  <tom@tromey.com>
5752
5753         * dwarf-index-write.c (add_address_entry): Don't add objfile
5754         offsets.
5755         * dbxread.c (find_stab_function): Rename from
5756         find_stab_function_addr.  Return a bound_minimal_symbol.
5757         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5758         Don't add objfile offsets.
5759         (end_psymtab): Use raw_text_low, raw_text_high,
5760         MSYMBOL_VALUE_RAW_ADDRESS.
5761         (read_ofile_symtab): Update.
5762         (process_one_symbol): Update.
5763         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5764         offsets.
5765         (dw2_relocate): Remove.
5766         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5767         searching addrmap.
5768         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5769         Update.
5770         (process_psymtab_comp_unit_reader, add_partial_symbol)
5771         (add_partial_subprogram, dwarf2_ranges_read): Update.
5772         (load_partial_dies): Update.
5773         (add_address_entry): Don't add objfile offsets.
5774         (dwarf2_build_include_psymtabs): Update.
5775         (create_addrmap_from_aranges): Don't add objfile offsets.
5776         (dw2_find_pc_sect_compunit_symtab): Update.
5777         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5778         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5779         Update.
5780         (parse_partial_symbols): Don't add objfile offsets.  Use
5781         raw_text_low, raw_text_high.  Update.
5782         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5783         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5784         or call 'relocate' quick function.  Clear psymbol_map.
5785         * psympriv.h (struct partial_symbol) <address>: Add section
5786         offset.
5787         <set_unrelocated_address>: Rename from set_address.
5788         <raw_text_low, raw_text_high>: New methods.
5789         <text_low, text_high>: Add objfile parameter.
5790         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5791         set_unrelocated_address.
5792         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5793         (find_pc_psymbol): Update.
5794         (fixup_psymbol_section, relocate_psymtabs): Remove.
5795         (dump_psymtab, psym_functions): Update.
5796         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5797         parameter.
5798         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5799         (start_psymtab_common): Update.
5800         * symfile-debug.c (debug_qf_relocate): Remove.
5801         (debug_sym_quick_functions): Update.
5802         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5803         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5804         Update.
5805
5806 2018-07-26  Tom Tromey  <tromey@redhat.com>
5807
5808         * dbxread.c (end_psymtab): Use text_high_valid and
5809         text_low_valid.
5810         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5811         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5812         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5813         Update comment.
5814         <text_low_valid, text_high_valid>: New fields.
5815         <set_text_low, set_text_high>: Update.
5816         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5817
5818 2018-07-26  Tom Tromey  <tom@tromey.com>
5819
5820         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5821         Update.
5822         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5823         textlow and texthigh fields.
5824         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5825         Update.
5826         * mdebugread.c (parse_lines, parse_partial_symbols)
5827         (psymtab_to_symtab_1): Update.
5828         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5829         Rename fields.  Update comment.  Now private.
5830         <text_low, text_high, set_text_low, set_text_high>: New methods.
5831         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5832         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5833         (start_psymtab_common, maintenance_info_psymtabs)
5834         (maintenance_check_psymtabs): Update.
5835         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5836         texthigh fields.
5837         (scan_xcoff_symtab): Update.
5838
5839 2018-07-26  Tom Tromey  <tromey@redhat.com>
5840
5841         * psympriv.h (struct partial_symbol) <unrelocated_address,
5842         address, set_address>: New methods.
5843         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5844         (fixup_psymbol_section, relocate_psymtabs): Update.
5845         (print_partial_symbols): Add 'objfile' parameter.  Update.
5846         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5847         Update.
5848
5849 2018-07-26  Tom Tromey  <tom@tromey.com>
5850
5851         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5852         (debug_names::write_psymbols): Update.
5853         * psympriv.h (struct partial_symbol): Derive from
5854         general_symbol_info.
5855         <obj_section>: New method.
5856         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5857         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5858         (find_pc_sect_psymbol, fixup_psymbol_section)
5859         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5860         (print_partial_symbols, recursively_search_psymtabs)
5861         (compare_psymbols, psymbol_hash, psymbol_compare)
5862         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5863         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5864
5865 2018-07-26  Tom Tromey  <tromey@redhat.com>
5866
5867         * dbxread.c (end_psymtab): Remove dead code.
5868
5869 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5870
5871         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5872         DWARF unwinders are disabled.
5873         * dwarf2-frame.c: Add dwarf2read.h include.
5874         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5875         disabled.
5876         (dwarf2_frame_unwinders_enabled_p): Define.
5877         (show_dwarf_unwinders_enabled_p): New function.
5878         (_initialize_dwarf2_frame): Register switch to control DWARF
5879         unwinder use.
5880         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5881         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5882         (show_dwarf_cmdlist): Remove static keyword.
5883         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5884         (show_dwarf_cmdlist): Declare.
5885         * NEWS: Document new feature.
5886
5887 2018-07-26  Tom de Vries  <tdevries@suse.de>
5888
5889         PR breakpoints/23366
5890         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5891
5892 2018-07-26  Tom de Vries  <tdevries@suse.de>
5893
5894         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5895         DW_AT_count can't be translated to a dynamic prop.
5896
5897 2018-07-25  Tom de Vries  <tdevries@suse.de>
5898
5899         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5900         try/catch.
5901
5902 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5903
5904         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5905
5906 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5907
5908         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5909
5910 2018-07-24  Keith Seitz  <keiths@redhat.comt
5911
5912         PR symtab/23010
5913         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5914         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5915         instead of add_symbol_to_list.
5916         (read_file_scope): Call prepare_one_comp_unit before reading
5917         any other DIEs.
5918
5919 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5920
5921         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5922
5923 2018-07-24  Tom Tromey  <tom@tromey.com>
5924
5925         * utils.c (malloc, realloc, free): Don't declare.
5926         * configure, config.in: Rebuild.
5927         * configure.ac: Don't check for declarations of free, malloc, or
5928         realloc.
5929
5930 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5931
5932         * aarch64-linux-nat.c
5933         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5934         variable.
5935         * arm-linux-nat.c (fetch_regs): Likewise.
5936         (store_regs): Likewise.
5937         (fetch_vfp_regs): Likewise.
5938         (store_vfp_regs): Likewise.
5939         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5940         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5941         (arm_linux_nat_target::insert_watchpoint): Likewise.
5942         (arm_linux_nat_target::remove_watchpoint): Likewise.
5943         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5944         Likewise.
5945         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5946         Likewise.
5947         * ppc-linux-nat.c (fetch_register): Likewise.
5948         (fetch_all_gp_regs): Likewise.
5949         (fetch_ppc_registers): Likewise.
5950         (store_all_gp_regs): Likewise.
5951         (store_ppc_registers): Likewise.
5952         (hwdebug_insert_point): Likewise.
5953         (can_use_watchpoint_cond_accel): Likewise.
5954         * remote-sim.c (gdb_os_write_stdout): Likewise.
5955
5956 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5957             Tom Tromey  <tom@tromey.com>
5958
5959         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5960         test for it.
5961         * configure: Rebuild.
5962
5963 2018-07-22  Tom Tromey  <tom@tromey.com>
5964
5965         * regformats/regdat.sh: Define xmltarget_${name} inside
5966         #ifndef IN_PROCESS_AGENT.
5967
5968 2018-07-22  Tom Tromey  <tom@tromey.com>
5969
5970         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5971
5972 2018-07-22  Tom Tromey  <tom@tromey.com>
5973
5974         * symfile.c (reread_symbols): Notify iter, not objfile.
5975
5976 2018-07-22  Tom Tromey  <tom@tromey.com>
5977
5978         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5979         Use arch_ops.
5980         (ravenscar_thread_target::prepare_to_store): Likewise.
5981
5982 2018-07-22  Tom Tromey  <tom@tromey.com>
5983
5984         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5985         unused variable.  Call value_fetch_lazy when needed.
5986         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5987         Remove unused variable.  Call value_fetch_lazy when needed.
5988
5989 2018-07-22  Tom Tromey  <tom@tromey.com>
5990
5991         * m32c-tdep.c (mark_dma): Return void.
5992         (make_regs): Remove unused declarations.
5993
5994 2018-07-22  Tom Tromey  <tom@tromey.com>
5995
5996         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5997         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5998         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5999         bkscm_get_valid_block_smob_arg_unsafe for effect.
6000
6001 2018-07-22  Tom Tromey  <tom@tromey.com>
6002
6003         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
6004         value_type.
6005
6006 2018-07-22  Tom Tromey  <tom@tromey.com>
6007
6008         * windows-nat.c (saved_context): Conditionally define.
6009         * remote.c (remote_target::remote_btrace_maybe_reopen):
6010         Conditionally declare "warned".
6011         * inflow.c (sigquit_ours): Conditionally define.
6012         (new_tty): Move "tty" declaration inside #if.
6013         * guile/guile.c (guile_datadir): Conditionally define.
6014         * charset.c (set_be_le_names): Move some declarations inside #if.
6015         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6016         #if.
6017         (parse_xml_btrace_conf): Likewise.
6018
6019 2018-07-22  Tom Tromey  <tom@tromey.com>
6020
6021         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6022
6023 2018-07-22  Tom Tromey  <tom@tromey.com>
6024
6025         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6026         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6027         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6028         * buildsym-legacy.c (get_macro_table): Remove unused variable.
6029         * stack.c (frame_apply_level_command): Remove unused variable.
6030         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6031         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6032         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6033         unused variable.
6034         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6035         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6036         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6037         variable.
6038         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6039         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6040         variable.
6041         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6042         Remove unused variable.
6043         * cli/cli-script.c (recurse_read_control_structure): Remove unused
6044         variable.
6045         * common/tdesc.c (print_xml_feature::visit): Remove unused
6046         variable.
6047         * compile/compile-object-load.c (store_regs): Remove unused
6048         variables.
6049         * complaints.c (clear_complaints): Remove unused variable.
6050         * corelow.c (core_target_open): Remove unused variable.
6051         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6052         variable.
6053         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6054         variable.
6055         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6056         variable.
6057         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6058         variable.
6059         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6060         variable.
6061         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6062         variable.
6063         * ia64-tdep.c (examine_prologue): Remove unused variable.
6064         * infcall.c (run_inferior_call): Remove unused variable.
6065         * inferior.c (exit_inferior): Remove unused variable.
6066         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6067         * linespec.c (decode_line_2): Remove unused variable.
6068         * linux-nat.c (super_close): Remove.
6069         * linux-tdep.c (linux_info_proc): Remove unused variable.
6070         * mi/mi-main.c (mi_execute_command): Remove unused variable.
6071         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6072         Remove unused variable.
6073         * parse.c (find_minsym_type_and_address): Remove unused variable.
6074         * printcmd.c (info_symbol_command, printf_floating): Remove unused
6075         variable.
6076         * python/py-breakpoint.c (bppy_set_commands): Remove unused
6077         variable.
6078         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6079         variables.
6080         * record-btrace.c (record_btrace_target::store_registers): Remove
6081         unused variable.
6082         (cmd_show_record_btrace_cpu): Remove unused variable.
6083         * riscv-tdep.c (riscv_register_reggroup_p)
6084         (riscv_push_dummy_call, riscv_return_value): Remove unused
6085         variable.
6086         * rust-exp.y (literal): Remove unused variable.
6087         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6088         unused variable.
6089         <STRUCTOP_ANONYMOUS>: Likewise.
6090         * s390-linux-tdep.c (s390_linux_init_abi_31)
6091         (s390_linux_init_abi_64): Remove unused variable.
6092         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6093         (file_select_thread, net_windows_open, _initialize_ser_windows):
6094         Remove unused variables.
6095         * symtab.c (find_pc_sect_line): Remove unused variable.
6096         * target-memory.c (compute_garbled_blocks): Remove unused
6097         variable.
6098         (target_write_memory_blocks): Remove unused variable.
6099         * target.c (target_stack::unpush): Remove unused variables.
6100         * tracepoint.c (start_tracing, all_tracepoint_actions)
6101         (merge_uploaded_trace_state_variables)
6102         (print_one_static_tracepoint_marker): Remove unused variable.
6103         * unittests/basic_string_view/element_access/char/1.cc (test01):
6104         Remove unused variable.
6105         * windows-nat.c (windows_continue, windows_add_all_dlls)
6106         (do_initial_windows_stuff, windows_nat_target::create_inferior):
6107         Remove unused variables.
6108
6109 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
6110
6111         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6112         attr_profile in HAVE_ELF.
6113         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6114         HAVE_ELF.
6115
6116 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
6117
6118         * frame.c (frame_register_unwind): Change parameter name.
6119         (frame_unwind_register): Likewise.
6120         (frame_unwind_register_value): Likewise.
6121         (frame_unwind_register_signed): Likewise.
6122         (frame_unwind_register_unsigned): Likewise.
6123         * frame.h (frame_register_unwind): Likewise.
6124         (frame_unwind_register): Likewise.
6125         (frame_unwind_register_value): Likewise.
6126         (frame_unwind_register_signed): Likewise.
6127         (frame_unwind_register_unsigned): Likewise.
6128         (frame_unwind_arch): Likewise.
6129
6130 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6131
6132         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6133         ISA maintenance.
6134
6135 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6136
6137         * mips-linux-nat.c (mips_linux_nat_target::read_description):
6138         Call `get_ptrace_pid' rather than extracting the ptrace PID by
6139         hand.
6140
6141 2018-07-20  Keith Seitz  <keiths@redhat.com>
6142
6143         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6144         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6145         m_compunit_symtab, m_language>: Add "m_" prefix.
6146         Update all uses.
6147         * buildsym.c: Update all uses.
6148
6149 2018-07-20  Tom Tromey  <tom@tromey.com>
6150
6151         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6152         * buildsym.h (record_line_ftype): Remove typedef.
6153
6154 2018-07-20  Tom Tromey  <tom@tromey.com>
6155
6156         * buildsym-legacy.h (augment_type_symtab): Don't declare.
6157         (end_expandable_symtab): Likewise.
6158         (end_symtab_get_static_block): Likewise.
6159         (end_symtab_from_static_block): Likewise.
6160         * buildsym-legacy.c (augment_type_symtab): Remove.
6161         (end_expandable_symtab): Remove.
6162         (end_symtab_get_static_block): Remove.
6163         (end_symtab_from_static_block): Remove.
6164
6165 2018-07-20  Tom Tromey  <tom@tromey.com>
6166
6167         * dwarf2read.c: Include buildsym.h.
6168         (struct dwarf2_cu) <builder>: New method.
6169         (fixup_go_packaging): Update.
6170         (process_full_comp_unit, process_full_type_unit): Update.  Don't
6171         use scoped_free_pendings.
6172         (using_directives): Add "cu" parameter, remove "language".
6173         (read_import_statement, setup_type_unit_groups, )
6174         (read_func_scope, read_lexical_block_scope)
6175         (dwarf2_record_block_ranges, read_namespace): Update.
6176         (lnp_state_machine::lnp_state_machine): Add cu parameter.
6177         (lnp_state_machine::handle_end_sequence): Update.
6178         (class lnp_state_machine) <m_cu>: New member.
6179         <m_record_line_callback>: Remove.
6180         <m_currently_recording_lines>: New member.
6181         (lnp_state_machine::handle_set_file): Update.
6182         (noop_record_line): Remove.
6183         (dwarf_record_line_p): Add cu parameter.
6184         (dwarf_record_line_1, dwarf_finish_line): Likewise.
6185         (lnp_state_machine::record_line)
6186         (lnp_state_machine::lnp_state_machine)
6187         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6188         (dwarf_decode_lines): Update.
6189         (dwarf2_start_subfile): Add cu parameter.
6190         (dwarf2_start_symtab, new_symbol): Update.
6191         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6192         Remove dwarf2_per_objfile parameter.
6193         (dwarf_decode_macros): Update.
6194
6195 2018-07-20  Tom Tromey  <tom@tromey.com>
6196
6197         * stabsread.c (define_symbol): Update.
6198         * buildsym-legacy.h (get_buildsym_compunit): Declare.
6199         * dwarf2read.c (new_symbol): Update.
6200         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6201         * cp-namespace.c: Include buildsym.h.
6202         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6203         * buildsym-legacy.c (get_buildsym_compunit): New function.
6204
6205 2018-07-20  Tom Tromey  <tom@tromey.com>
6206
6207         * xcoffread.c: Include buildsym-legacy.h.
6208         * windows-nat.c: Include buildsym-legacy.h.
6209         * stabsread.c: Include buildsym-legacy.h.
6210         * mdebugread.c: Include buildsym-legacy.h.
6211         * buildsym-legacy.h: New file.
6212         * buildsym-legacy.c: New file, from buildsym.c.
6213         * go32-nat.c: Include buildsym-legacy.h.
6214         * dwarf2read.c: Include buildsym-legacy.h.
6215         * dbxread.c: Include buildsym-legacy.h.
6216         * cp-namespace.c: Include buildsym-legacy.h.
6217         * coffread.c: Include buildsym-legacy.h.
6218         * buildsym.h: Move some contents to buildsym-legacy.h.
6219         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
6220         buildsym-legacy.c.
6221         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6222
6223 2018-07-20  Tom Tromey  <tom@tromey.com>
6224
6225         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6226         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6227         (buildsym_compunit::buildsym_compunit)
6228         (buildsym_compunit::~buildsym_compunit)
6229         (buildsym_compunit::get_macro_table): Define.
6230
6231 2018-07-20  Tom Tromey  <tom@tromey.com>
6232
6233         * buildsym.c (reset_symtab_globals): Remove.
6234         (buildsym_compunit::end_symtab_from_static_block): Update.
6235         (buildsym_compunit::augment_type_symtab): Update.
6236         (end_symtab_from_static_block): Call free_buildsym_compunit.
6237         (augment_type_symtab, end_symtab, end_expandable_symtab):
6238         Likewise.
6239
6240 2018-07-20  Tom Tromey  <tom@tromey.com>
6241
6242         * arch-utils.c: Do not include buildsym.h.
6243         * mipsread.c: Do not include buildsym.h.
6244         * machoread.c: Do not include buildsym.h.
6245         * elfread.c: Do not include buildsym.h.
6246
6247 2018-07-20  Tom Tromey  <tom@tromey.com>
6248
6249         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6250         initialization.
6251         (buildsym_compunit): Add new constructor.
6252         (struct buildsym_compunit) <get_last_source_file, finish_block,
6253         record_block_range, start_subfile, patch_subfile_names,
6254         push_subfile, pop_subfile, record_line, get_compunit_symtab,
6255         set_last_source_start_addr, get_last_source_start_addr,
6256         get_local_using_directives, set_local_using_directives,
6257         get_global_using_directives, outermost_context_p,
6258         get_current_context_stack, get_context_stack_depth,
6259         get_current_subfile, get_local_symbols, get_file_symbols,
6260         get_global_symbols, record_debugformat, record_producer,
6261         push_context, pop_context, end_symtab_get_static_block,
6262         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6263         New public methods.
6264         <record_pending_block, finish_block_internal, make_blockvector,
6265         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6266         private methods.
6267         Update all users.
6268
6269 2018-05-22  Tom Tromey  <tom@tromey.com>
6270
6271         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6272         parameter.
6273         (finish_block_internal): Update.
6274
6275 2018-07-20  Tom Tromey  <tom@tromey.com>
6276
6277         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6278         parameter.
6279         (finish_block_internal): Update.
6280
6281 2018-07-20  Tom Tromey  <tom@tromey.com>
6282
6283         * buildsym.h (EXTERN): Don't define or undef.
6284         * buildsym.c (EXTERN): Don't define.
6285
6286 2018-07-20  Tom Tromey  <tom@tromey.com>
6287
6288         * buildsym.c: Remove TODO comment.
6289
6290 2018-07-20  Tom Tromey  <tom@tromey.com>
6291
6292         * coffread.c (coff_symtab_read): Update.
6293         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6294         (xcoff_new_init): Update.
6295         * mipsread.c (mipscoff_new_init): Update.
6296         * mdebugread.c (mdebug_build_psymtabs): Update.
6297         * elfread.c (elf_new_init): Update.
6298         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6299         Update.
6300         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6301         (coffstab_build_psymtabs, elfstab_build_psymtabs)
6302         (stabsect_build_psymtabs): Update.
6303         * buildsym.h (buildsym_init): Don't declare.
6304         * buildsym.c: Update comment.
6305         (prepare_for_building): Remove.
6306         (start_symtab, restart_symtab): Update.
6307         (reset_symtab_globals): Update comment.
6308         (buildsym_init): Remove.
6309
6310 2018-07-20  Tom Tromey  <tom@tromey.com>
6311
6312         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6313         * stabsread.c (patch_block_stabs, define_symbol, read_type)
6314         (read_enum_type, common_block_start, common_block_end)
6315         (cleanup_undefined_types_1, finish_global_stabs): Update.
6316         * mdebugread.c (psymtab_to_symtab_1): Update.
6317         * dwarf2read.c (fixup_go_packaging, read_func_scope)
6318         (read_lexical_block_scope, new_symbol): Update.
6319         * dbxread.c (process_one_symbol): Update.
6320         * coffread.c (coff_symtab_read, process_coff_symbol)
6321         (coff_read_enum_type): Update.
6322         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6323         declare.
6324         (get_local_symbols, get_file_symbols, get_global_symbols): New
6325         functions.
6326         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6327         m_global_symbols.
6328         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6329         (~scoped_free_pendings): Update.
6330         (finish_block, prepare_for_building, reset_symtab_globals)
6331         (end_symtab_get_static_block, end_symtab_with_blockvector)
6332         (augment_type_symtab, push_context): Update.
6333         (get_local_symbols, get_file_symbols, get_global_symbols): New
6334         functions.
6335         (buildsym_init): Update.
6336
6337 2018-07-20  Tom Tromey  <tom@tromey.com>
6338
6339         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6340         (process_full_type_unit): Likewise.
6341         (dwarf2_start_symtab): Set list_in_scope.
6342
6343 2018-07-20  Tom Tromey  <tom@tromey.com>
6344
6345         * dwarf2read.c (process_psymtab_comp_unit_reader)
6346         (build_type_psymtabs_reader): Do not set list_in_scope.
6347
6348 2018-07-20  Tom Tromey  <tom@tromey.com>
6349
6350         * buildsym.c (free_pendings): Remove.
6351         (add_symbol_to_list, scoped_free_pendings)
6352         (finish_block_internal, buildsym_init): Update.
6353
6354 2018-07-20  Tom Tromey  <tom@tromey.com>
6355
6356         * xcoffread.c (read_xcoff_symtab): Update.
6357         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6358         Update.
6359         * dbxread.c (process_one_symbol): Update.
6360         * coffread.c (coff_symtab_read): Update.
6361         * buildsym.h (finish_block): Update.
6362         * buildsym.c (finish_block): Remove "listhead" argument.
6363         (end_symtab_get_static_block): Update.
6364
6365 2018-07-20  Tom Tromey  <tom@tromey.com>
6366
6367         * buildsym.h (class scoped_free_pendings): Remove constructor.
6368         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6369         method.
6370         <m_pending_block_obstack, m_pending_blocks>: New members.
6371         (pending_block_obstack, pending_blocks): Remove.
6372         (scoped_free_pendings::scoped_free_pendings): Default.
6373         (~scoped_free_pendings): Update.
6374         (free_pending_blocks): Remove.
6375         (finish_block_internal, record_pending_block, make_blockvector)
6376         (end_symtab_get_static_block, augment_type_symtab, push_context)
6377         (buildsym_init): Update.
6378
6379 2018-07-20  Tom Tromey  <tom@tromey.com>
6380
6381         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6382         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6383         members.
6384         (pending_addrmap, pending_addrmap_obstack)
6385         (pending_addrmap_interesting): Remove.
6386         (scoped_free_pendings, record_block_range, make_blockvector)
6387         (prepare_for_building, reset_symtab_globals, buildsym_init):
6388         Update.
6389
6390 2018-07-20  Tom Tromey  <tom@tromey.com>
6391
6392         * xcoffread.c (process_linenos): Update.
6393         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6394         * mdebugread.c (psymtab_to_symtab_1): Update.
6395         * dwarf2read.c (setup_type_unit_groups)
6396         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6397         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6398         * dbxread.c (process_one_symbol): Update.
6399         * coffread.c (coff_symtab_read, enter_linenos)
6400         (process_coff_symbol): Update.
6401         * buildsym.h (current_subfile): Don't declare.
6402         (get_current_subfile): Declare.
6403         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6404         member.
6405         (start_subfile, free_buildsym_compunit, push_subfile)
6406         (prepare_for_building, start_symtab): Update.
6407         (get_current_subfile): New function.
6408
6409 2018-07-20  Tom Tromey  <tom@tromey.com>
6410
6411         * coffread.c (coff_symtab_read): Update.
6412         * xcoffread.c (read_xcoff_symtab): Update.
6413         * dwarf2read.c (new_symbol): Update.
6414         (read_func_scope, read_lexical_block_scope): Update.
6415         * dbxread.c (process_one_symbol): Update.
6416         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6417         (outermost_context_p): Remove macro.
6418         (outermost_context_p, get_current_context_stack)
6419         (get_context_stack_depth): Declare.
6420         (pop_context): Return struct context_stack.
6421         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6422         member.
6423         (context_stack_size): Remove.
6424         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6425         (prepare_for_building, end_symtab_get_static_block)
6426         (augment_type_symtab, push_context): Update.
6427         (pop_context): Return struct context_stack.
6428         (outermost_context_p, get_current_context_stack)
6429         (get_context_stack_depth): New functions.
6430         (buildsym_init): Update.
6431
6432 2018-07-20  Tom Tromey  <tom@tromey.com>
6433
6434         * rust-exp.y: Now a pure parser.  Update all rules.
6435         (%union): Move earlier.
6436         (current_parser, work_obstack): Remove globals.
6437         (rust_parser, ~rust_parser): Update.
6438         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6439         lex_character, lex_number, lex_string, lex_identifier,
6440         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6441         convert_name, convert_params_to_expression,
6442         convert_ast_to_expression, ast_basic_type, ast_operation,
6443         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6444         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6445         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6446         ast_array_type, ast_slice_type, ast_reference_type,
6447         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6448         (rust_parse): Update.
6449         (rustyyerror, rustyylex): Add parser parameter.
6450         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6451         (rust_lex_stringish_test, rust_lex_test_sequence)
6452         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6453         (rust_lex_test_push_back, rust_lex_tests): Update.
6454
6455 2018-07-19  Pedro Alves  <palves@redhat.com>
6456
6457         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6458         gdb::unique_xmalloc_ptr.
6459         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6460         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6461         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6462         copy-initialization.
6463         * guile/scm-pretty-print.c (ppscm_print_children): Use
6464         gdb::unique_xmalloc_ptr instead of cleanups.
6465         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6466         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6467         gdb::unique_xmalloc_ptr.
6468         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6469         Adjust to use gdb::unique_xmalloc_ptr.
6470         * guile/scm-utils.c (extract_arg): Adjust.
6471         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6472         gdb::unique_xmalloc_ptr instead of a cleanup.
6473
6474 2018-07-19  Tom Tromey  <tom@tromey.com>
6475
6476         * utils.c (do_value_free_to_mark)
6477         (make_cleanup_value_free_to_mark): Remove.
6478         * utils.h (make_cleanup_value_free_to_mark): Remove.
6479
6480 2018-07-19  Pedro Alves  <palves@redhat.com>
6481
6482         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6483         forwarding reference.
6484
6485 2018-07-18  Pedro Alves  <palves@redhat.com>
6486
6487         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6488         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6489         cleanup.
6490
6491 2018-07-18  Pedro Alves  <palves@redhat.com>
6492
6493         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6494         exceptions.
6495         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6496         (gdbscm_wrap): New.
6497         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6498         directly instead of a cleanup.
6499         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6500         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6501         (vlscm_binop_gdbthrow): New, factored out from ...
6502         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6503         (vlscm_rich_compare): Use gdbscm_wrap.
6504         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6505         instead of a cleanup.
6506         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6507         cleanup.
6508         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6509         Use xfree directly instead of a cleanup.
6510         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6511         Adjust to use gdbscm_wrap and scoped_value_mark.
6512         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6513         (gdbscm_value_address, gdbscm_value_dereference)
6514         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6515         scoped_value_mark.
6516         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6517         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6518         scoped_value_mark.
6519         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6520         gdbscm_wrap and scoped_value_mark.
6521         (gdbscm_value_to_string): Use xfree directly instead of a
6522         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6523         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6524         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6525         scoped_value_mark.
6526         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6527         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6528         scoped_value_mark.
6529         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6530         gdbscm_wrap.
6531
6532 2018-07-18  Tom de Vries  <tdevries@suse.de>
6533
6534         * findvar.c (default_read_var_value): Also resolve dynamic type for
6535         LOC_OPTIMIZED_OUT vars.
6536
6537 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6538
6539         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6540         decoding.
6541
6542 2018-07-17  Tom Tromey  <tom@tromey.com>
6543
6544         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6545         (compute_enum_list, pascm_set_param_value_x)
6546         (gdbscm_parameter_value): Update.
6547         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6548         (gdbscm_scm_to_host_string): Update.
6549         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6550         Update.
6551         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6552         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6553         * guile/scm-string.c (gdbscm_scm_to_string): Return
6554         unique_xmalloc_ptr.
6555         (gdbscm_scm_to_host_string): Likewise.
6556
6557 2018-07-17  Tom Tromey  <tom@tromey.com>
6558
6559         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6560         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6561         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6562         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6563         unique_xmalloc_ptr.
6564
6565 2018-07-17  Tom Tromey  <tom@tromey.com>
6566
6567         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6568         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6569         Update.
6570         * guile/scm-cmd.c (cmdscm_function): Update.
6571         * guile/scm-pretty-print.c
6572         (ppscm_print_exception_unless_memory_error): Update.
6573         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6574         Return unique_xmalloc_ptr.
6575
6576 2018-07-17  Tom Tromey  <tom@tromey.com>
6577
6578         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6579         Use string_printf.
6580
6581 2018-07-17  Jim Wilson  <jimw@sifive.com>
6582
6583         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6584         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6585         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6586         unecessary braces after EF_RISCV_RVC test.  Delete call to
6587         set_gdbarch_decr_pc_after_break.
6588
6589         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6590         RISCV_LAST_FP_REGNUM + 1.
6591         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6592
6593 2018-07-17  Tom Tromey  <tom@tromey.com>
6594
6595         * configure.ac: Remove --disable-gdbcli.
6596         * configure: Rebuild.
6597         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6598         (SUBDIR_CLI_CFLAGS): Remove.
6599         (SFILES): Use SUBDIR_CLI_SRCS.
6600         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6601
6602 2018-07-17  Tom Tromey  <tom@tromey.com>
6603
6604         PR gdb/18624:
6605         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6606
6607 2018-07-16  Jim Wilson  <jimw@sifive.com>
6608
6609         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6610
6611 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6612
6613         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6614         variable.
6615         (libunwind_frame_sniffer): Likewise.
6616         (libunwind_frame_prev_register): Likewise.
6617         (libunwind_sigtramp_frame_sniffer): Likewise.
6618         * ia64-tdep.c (ia64_access_reg): Likewise.
6619         (ia64_access_rse_reg): Likewise.
6620         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6621         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6622
6623 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6624
6625         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6626
6627 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6628
6629         * remote-sim.c (gdbsim_target::close,
6630         gdbsim_target::mourn_inferior): Remove unused variables.
6631
6632 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6633
6634         * ia64-tdep.c (ktab_buf): New global.
6635         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6636         (get_kernel_table): Adjust.
6637
6638 2018-07-16  Tom Tromey  <tom@tromey.com>
6639
6640         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6641         * dwarf2read.c (using_directives, new_symbol): Use
6642         outermost_context_p.
6643         * dbxread.c (process_one_symbol): Use outermost_context_p.
6644         * coffread.c (coff_symtab_read): Use outermost_context_p.
6645
6646 2018-07-16  Tom Tromey  <tom@tromey.com>
6647
6648         * dwarf2read.c (using_directives, read_func_scope)
6649         (read_lexical_block_scope): Update.
6650         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6651         * buildsym.h (local_using_directives, global_using_directives):
6652         Don't declare.
6653         (get_local_using_directives, set_local_using_directives)
6654         (get_global_using_directives): Declare.
6655         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6656         m_global_using_directives>: New members.
6657         (finish_block_internal, prepare_for_building)
6658         (reset_symtab_globals, end_symtab_get_static_block)
6659         (push_context): Update.
6660         (get_local_using_directives, set_local_using_directives)
6661         (get_global_using_directives): New functions.
6662         (buildsym_init): Update.
6663
6664 2018-07-16  Tom Tromey  <tom@tromey.com>
6665
6666         * xcoffread.c (xcoff_initial_scan): Don't call
6667         free_pending_blocks.
6668         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6669         * buildsym.h (class scoped_free_pendings): Add constructor.
6670         (free_pending_blocks): Don't declare.
6671         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6672         (free_pending_blocks): Now static.
6673
6674 2018-07-16  Tom Tromey  <tom@tromey.com>
6675
6676         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6677         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6678         member.
6679         (struct subfile_stack): Remove.
6680         (subfile_stack): Remove.
6681         (push_subfile, pop_subfile, buildsym_init): Update.
6682
6683 2018-07-16  Tom Tromey  <tom@tromey.com>
6684
6685         * buildsym.c (push_subfile): Use gdb_assert.
6686         (pop_subfile): Use gdb_assert.
6687
6688 2018-07-16  Tom Tromey  <tom@tromey.com>
6689
6690         * buildsym.h (merge_symbol_lists): Remove.
6691         * buildsym.c (merge_symbol_lists): Remove.
6692
6693 2018-07-16  Tom Tromey  <tom@tromey.com>
6694
6695         * stabsread.c (scan_file_globals): Update comment.
6696         * stabsread.h (scan_file_globals): Move from buildsym.h.
6697         * buildsym.h (scan_file_globals): Move to stabsread.h.
6698
6699 2018-07-16  Tom Tromey  <tom@tromey.com>
6700
6701         * xcoffread.c (xcoff_new_init): Update.
6702         * mipsread.c (mipscoff_new_init): Update.
6703         * mdebugread.c (mdebug_build_psymtabs): Update.
6704         * elfread.c (elf_new_init): Update.
6705         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6706         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6707         * buildsym.h (buildsym_new_init): Don't declare.
6708         * buildsym.c (buildsym_new_init): Remove.
6709
6710 2018-07-16  Tom Tromey  <tom@tromey.com>
6711
6712         * stabsread.h (within_function): Move from buildsym.h.
6713         * stabsread.c (start_stabs): Clear within_function.
6714         * coffread.c (coff_start_symtab): Clear within_function.
6715         * buildsym.h (within_function): Move to stabsread.h.
6716         * buildsym.c (prepare_for_building): Update.
6717
6718 2018-07-16  Tom Tromey  <tom@tromey.com>
6719
6720         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6721         * dwarf2read.c (dwarf2_start_symtab): Don't set
6722         processing_gcc_compilation.
6723         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6724
6725 2018-07-16  Tom Tromey  <tom@tromey.com>
6726
6727         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6728         (next_symbol_text_func): Move from buildsym.h.
6729         * stabsread.c (hashname): Move from buildsym.c.
6730         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6731         (next_symbol_text_func, hashname): Move to stabsread.h.
6732         * buildsym.c: Don't include bcache.h
6733         (hashname): Move to stasbread.c.
6734
6735 2018-07-16  Tom Tromey  <tom@tromey.com>
6736
6737         * buildsym.h (context_stack_size): Don't declare.
6738         * buildsym.c (context_stack_size): New global.
6739
6740 2018-07-16  Tom Tromey  <tom@tromey.com>
6741
6742         * dbxread.c (processing_acc_compilation): New global.
6743         * buildsym.h (processing_acc_compilation): Don't declare.
6744
6745 2018-07-16  Tom Tromey  <tom@tromey.com>
6746
6747         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6748         * dbxread.c (read_ofile_symtab): Update.
6749         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6750         * buildsym.h (last_source_start_addr): Remove.
6751         (set_last_source_start_addr, get_last_source_start_addr):
6752         Declare.
6753         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6754         parameter.
6755         (struct buildsym_compunit) <m_last_source_start_addr>: New
6756         member.
6757         (prepare_for_building): Remove start_addr parameter.
6758         (start_symtab, restart_symtab, end_symtab_get_static_block)
6759         (end_symtab_with_blockvector): Update.
6760         (set_last_source_start_addr, get_last_source_start_addr): New
6761         functions.
6762
6763 2018-07-16  Tom Tromey  <tom@tromey.com>
6764
6765         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6766         member.
6767         (have_line_numbers): Remove.
6768         (record_line, prepare_for_building, end_symtab_get_static_block)
6769         (augment_type_symtab): Update.
6770
6771 2018-07-16  Tom Tromey  <tom@tromey.com>
6772
6773         * buildsym.c (~buildsym_compunit): Free the macro table.
6774         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6775         methods.
6776         <m_pending_macros>: New member.
6777         (pending_macros): Remove.
6778         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6779         (reset_symtab_globals, end_symtab_get_static_block)
6780         (end_symtab_with_blockvector, augment_type_symtab)
6781         (buildsym_init): Update.
6782
6783 2018-07-16  Tom Tromey  <tom@tromey.com>
6784
6785         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6786         parameter.
6787         (buildsym_compunit::set_last_source_file): New method.
6788         <m_last_source_file>: New member.
6789         (prepare_for_building): Remove "name" parameter.
6790         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6791         (last_source_file): Remove.
6792         (set_last_source_file, get_last_source_file): Update.
6793
6794 2018-07-16  Tom Tromey  <tom@tromey.com>
6795
6796         * buildsym.c (prepare_for_building): Add assert.
6797
6798 2018-07-16  Tom Tromey  <tom@tromey.com>
6799
6800         * buildsym.c (~buildsym_compunit): Update.
6801         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6802         (start_subfile, patch_subfile_names)
6803         (end_symtab_with_blockvector): Update.
6804
6805 2018-07-16  Tom Tromey  <tom@tromey.com>
6806
6807         * buildsym.c (struct buildsym_compunit): Add constructor,
6808         destructor, initializers.
6809         (start_buildsym_compunit): Remove.
6810         (free_buildsym_compunit): Use "delete".
6811         (start_symtab, restart_symtab): Use "new".
6812
6813 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6814
6815         * symfile.c (set_objfile_default_section_offset): Remove struct
6816         keyword.
6817
6818 2018-07-14  Stafford Horne  <shorne@gmail.com>
6819
6820         * (Responsible Maintainers): Add myself as or1k maintainer.
6821
6822 2018-07-13  Tom Tromey  <tom@tromey.com>
6823
6824         * symfile.c (set_objfile_default_section_offset): Use extra braces
6825         around initializer.
6826
6827 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6828
6829         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6830         non-branching basr.
6831
6832 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6833
6834         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6835         unittests/cli-utils-selftests.c
6836         * unittests/cli-utils-selftests.c: New file.
6837
6838 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6839
6840         * NEWS: Mention new commands. Mention change to 'thread apply'.
6841
6842 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6843
6844         * thread.c (thr_try_catch_cmd): New function.
6845         (thread_apply_all_command): Handle qcs flags.
6846         (thread_apply_command): Handle qcs flags.
6847         (taas_command): New function.
6848         (tfaas_command): New function.
6849         (_initialize_thread): Update to setup the new commands 'taas
6850         and 'tfaas'. Change doc string for 'thread apply'.
6851
6852 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6853
6854         * stack.c: (trailing_outermost_frame): New function, mostly
6855         extracted from backtrace_command_1.
6856         (leading_innermost_frame): New function.
6857         (backtrace_command_1): Update to call trailing_outermost_frame.
6858         (frame_apply_command_count): New function.
6859         (frame_apply_level_command): New function.
6860         (frame_apply_all_command): New function.
6861         (frame_apply_command): New function.
6862         (faas_command): New function.
6863         (frame_cmd_list): New variable.
6864         (_initialize_stack): Update to setup the new commands 'frame apply'
6865         and 'faas'.
6866
6867 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6868
6869         * cli-utils.c (number_or_range_parser::get_number): Only handle
6870         numbers or convenience var as numbers.
6871         (parse_flags): New function.
6872         (parse_flags_qcs): New function.
6873         (number_or_range_parser::finished): Ensure parsing end is detected
6874         before end of string.
6875         * cli-utils.h (parse_flags): New function.
6876         (parse_flags_qcs): New function.
6877         (number_or_range_parser): Remove m_finished bool.
6878         (number_or_range_parser::skip_range): Set m_in_range to false.
6879
6880 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6881
6882         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6883         on Windows.
6884
6885 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6886             Jan Kratochvil  <jan.kratochvil@redhat.com>
6887             Paul Fertser  <fercerpav@gmail.com>
6888             Tsutomu Seki  <sekiriki@gmail.com>
6889             Pedro Alves  <palves@redhat.com>
6890
6891         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6892         'unittests/parse-connection-spec-selftests.c'.
6893         (COMMON_SFILES): Add 'common/netstuff.c'.
6894         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6895         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6896         * common/netstuff.c: New file.
6897         * common/netstuff.h: New file.
6898         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6899         (wait_for_connect): Update comment.  New parameter
6900         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6901         Use 'sock' directly instead of 'scb->fd'.
6902         (try_connect): New function, with code from 'net_open'.
6903         (net_open): Rewrite main loop to deal with multiple
6904         sockets/addresses.  Handle IPv6-style hostnames; implement
6905         support for IPv6 connections.
6906         * unittests/parse-connection-spec-selftests.c: New file.
6907
6908 2018-07-11  Pedro Alves  <palves@redhat.com>
6909
6910         PR gdb/23377
6911         * remote.c (remote_target::remote_detach_pid): Call
6912         set_current_process.
6913
6914 2018-07-11  Pedro Alves  <palves@redhat.com>
6915
6916         * h8300-tdep.c (h8300_gdbarch_init): Remove
6917         set_gdbarch_ecoff_reg_to_regnum calls.
6918
6919 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6920
6921         PR c++/23373
6922         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6923         offsets/sizes for static members of a class/struct.
6924
6925 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6926
6927         * target-descriptions.c (tdesc_register_bitsize): Rename.
6928         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6929         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6930         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6931
6932 2018-07-10  Tom Tromey  <tom@tromey.com>
6933
6934         * breakpoint.c (moribund_locations): Now static and a
6935         std::vector.
6936         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6937         (build_bpstat_chain, update_global_location_list)
6938         (breakpoint_retire_moribund): Update.
6939         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6940         VEC.
6941
6942 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6943
6944         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6945         (riscv_register_reggroup_p): Use new function, remove unneeded
6946         parenthesis.
6947         (riscv_push_dummy_call): Extend assert to compare against xlen or
6948         flen based on register type.
6949
6950 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6951
6952         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6953
6954 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6955
6956         * remote.c (show_hardware_watchpoint_limit): New function.
6957         (show_hardware_watchpoint_length_limit): New function.
6958         (show_hardware_breakpoint_limit): New function.
6959         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6960         where appropriate, update help text.
6961
6962 2018-07-09  Tom Tromey  <tom@tromey.com>
6963
6964         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6965         (CLIBS): Don't mention NAT_CLIBS.
6966
6967 2018-07-09  Tom Tromey  <tom@tromey.com>
6968
6969         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6970         (LIBGDB_OBS, clean mostlyclean): Update.
6971         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6972
6973 2018-07-09  Tom Tromey  <tom@tromey.com>
6974
6975         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6976         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6977         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6978
6979 2018-07-09  Tom Tromey  <tom@tromey.com>
6980
6981         * Makefile.in (ALLDEPFILES): Remove exec.c.
6982         (COMMON_OBS): Remove exec.o.
6983         (COMMON_SFILES): Add exec.c.
6984
6985 2018-07-09  Tom Tromey  <tom@tromey.com>
6986
6987         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6988
6989 2018-07-09  Tom Tromey  <tom@tromey.com>
6990
6991         * Makefile.in (clean mostlyclean): Remove stamp-version.
6992         (version.c): Depend on stamp-version.
6993         (stamp-version): New rule, from version.c rule.
6994
6995 2018-07-09  Tom Tromey  <tom@tromey.com>
6996
6997         * Makefile.in (init.c): Depend on stamp-init.
6998         (stamp-init): New rule, from init.c rule.
6999         (clean mostlyclean): Remove stamp-init.
7000
7001 2018-07-09  Tom Tromey  <tom@tromey.com>
7002
7003         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
7004         SUBDIR_GCC_COMPILE_SRCS.
7005
7006 2018-07-09  Tom Tromey  <tom@tromey.com>
7007
7008         * Makefile.in (init.c): Remove some unused sed rules.
7009
7010 2018-07-09  Tom Tromey  <tom@tromey.com>
7011
7012         * Makefile.in (TSOBS): Remove.
7013         (INIT_FILES): Update.
7014         (LIBGDB_OBS): Update.
7015         (COMMON_SFILES): Add inflow.c.
7016         (SFILES): Remove inflow.c.
7017
7018 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7019
7020         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7021
7022 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
7023
7024         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7025         get_saveloc_name, is_signal_frame_name, step_name,
7026         init_remote_name, create_addr_space_name,
7027         destroy_addr_space_name, search_unwind_table_name,
7028         find_dyn_list_name): Constify.
7029
7030 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
7031
7032         * darwin-nat.c (darwin_pthread_kill): New function.
7033         (darwin_resume_thread): Use darwin_pthread_kill.
7034
7035 2018-07-05  Tom de Vries  <tdevries@suse.de>
7036
7037         * macroexp.c (macro_buffer) <operator=>: New member function.
7038
7039 2018-07-04  Tom Tromey  <tom@tromey.com>
7040
7041         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7042
7043 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
7044
7045         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7046         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7047         * maint.c: Likewise.
7048         * top.c: Likewise.
7049
7050 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7051
7052         * NEWS: Create a new section for the next release branch.
7053         Rename the section of the current branch, now that it has
7054         been cut.
7055
7056 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7057
7058         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7059         * version.in: Bump version to 8.2.50.DATE-git.
7060
7061 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
7062             Pedro Alves  <palves@redhat.com>
7063
7064         * linux-nat.c (linux_init_ptrace): Rename to ...
7065         (linux_init_ptrace_procfs): ... this.  Call
7066         linux_proc_init_warnings.
7067         (linux_nat_target::post_attach)
7068         (linux_nat_target::post_startup_inferior): Adjust.
7069         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7070         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7071
7072 2018-07-04  Tom de Vries  <tdevries@suse.de>
7073
7074         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7075         check ...
7076         (read_comp_unit_head): ... here.
7077
7078 2018-07-03  Tom Tromey  <tom@tromey.com>
7079
7080         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7081         (stop_tracing, tstatus_command)
7082         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7083         (print_one_static_tracepoint_marker): Update.
7084         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7085         std::vector.
7086         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
7087         VEC.
7088         (all_tracepoints, static_tracepoints_here): Return std::vector.
7089
7090 2018-07-03  Tom Tromey  <tom@tromey.com>
7091
7092         * common/ptid.c (ptid_equal): Remove.
7093         * common/ptid.h (ptid_equal): Don't declare.
7094         * ada-tasks.c: Update.
7095         * breakpoint.c: Update.
7096         * common/agent.c: Update.
7097         * corelow.c: Update.
7098         * darwin-nat-info.c: Update.
7099         * darwin-nat.c: Update.
7100         * dcache.c: Update.
7101         * dtrace-probe.c: Update.
7102         * dummy-frame.c: Update.
7103         * fbsd-nat.c: Update.
7104         * frame.c: Update.
7105         * gdbthread.h: Update.
7106         * gnu-nat.c: Update.
7107         * go32-nat.c: Update.
7108         * inf-loop.c: Update.
7109         * inf-ptrace.c: Update.
7110         * infcall.c: Update.
7111         * infcmd.c: Update.
7112         * inflow.c: Update.
7113         * infrun.c: Update.
7114         * linux-fork.c: Update.
7115         * linux-nat.c: Update.
7116         * linux-thread-db.c: Update.
7117         * mi/mi-cmd-var.c: Update.
7118         * mi/mi-interp.c: Update.
7119         * mi/mi-main.c: Update.
7120         * nto-procfs.c: Update.
7121         * ppc-linux-tdep.c: Update.
7122         * procfs.c: Update.
7123         * python/py-inferior.c: Update.
7124         * python/py-record-btrace.c: Update.
7125         * python/py-record.c: Update.
7126         * ravenscar-thread.c: Update.
7127         * regcache.c: Update.
7128         * remote-sim.c: Update.
7129         * remote.c: Update.
7130         * sol-thread.c: Update.
7131         * solib.c: Update.
7132         * target.c: Update.
7133         * tui/tui-stack.c: Update.
7134         * varobj.c: Update.
7135         * windows-nat.c: Update.
7136         * windows-tdep.c: Update.
7137
7138 2018-07-03  Tom Tromey  <tom@tromey.com>
7139
7140         * common/ptid.c (ptid_match): Remove.
7141         * common/ptid.h (ptid_match): Don't declare.
7142         * fbsd-nat.c: Update.
7143         * infcmd.c: Update.
7144         * infrun.c: Update.
7145         * linux-nat.c: Update.
7146         * record-btrace.c: Update.
7147         * regcache.c: Update.
7148         * remote.c: Update.
7149
7150 2018-07-03  Tom Tromey  <tom@tromey.com>
7151
7152         * common/ptid.c (ptid_tid_p): Remove.
7153         * common/ptid.h (ptid_tid_p): Don't declare.
7154         * sol-thread.c: Update.
7155
7156 2018-07-03  Tom Tromey  <tom@tromey.com>
7157
7158         * common/ptid.c (ptid_lwp_p): Remove.
7159         * common/ptid.h (ptid_lwp_p): Don't declare.
7160         * fbsd-nat.c: Update.
7161         * linux-nat.c: Update.
7162         * nat/linux-procfs.c: Update.
7163         * nat/x86-linux-dregs.c: Update.
7164         * sol-thread.c: Update.
7165
7166 2018-07-03  Tom Tromey  <tom@tromey.com>
7167
7168         * common/ptid.c (ptid_is_pid): Remove.
7169         * common/ptid.h (ptid_is_pid): Don't declare.
7170         * infrun.c: Update.
7171         * linux-nat.c: Update.
7172         * mi/mi-interp.c: Update.
7173         * remote.c: Update.
7174         * thread.c: Update.
7175
7176 2018-07-03  Tom Tromey  <tom@tromey.com>
7177
7178         * common/ptid.c (ptid_get_tid): Remove.
7179         * common/ptid.h (ptid_get_tid): Don't declare.
7180         * ada-tasks.c: Update.
7181         * aix-thread.c: Update.
7182         * bsd-uthread.c: Update.
7183         * darwin-nat.c: Update.
7184         * fbsd-nat.c: Update.
7185         * i386-darwin-nat.c: Update.
7186         * infrun.c: Update.
7187         * linux-tdep.c: Update.
7188         * nto-procfs.c: Update.
7189         * ppc-ravenscar-thread.c: Update.
7190         * python/py-infthread.c: Update.
7191         * ravenscar-thread.c: Update.
7192         * sol-thread.c: Update.
7193         * sparc-ravenscar-thread.c: Update.
7194         * windows-nat.c: Update.
7195
7196 2018-07-03  Tom Tromey  <tom@tromey.com>
7197
7198         * common/ptid.c (ptid_get_lwp): Remove.
7199         * common/ptid.h (ptid_get_lwp): Don't declare.
7200         * aarch64-linux-nat.c: Update.
7201         * ada-tasks.c: Update.
7202         * aix-thread.c: Update.
7203         * amd64-linux-nat.c: Update.
7204         * arm-linux-nat.c: Update.
7205         * corelow.c: Update.
7206         * fbsd-nat.c: Update.
7207         * fbsd-tdep.c: Update.
7208         * gnu-nat.c: Update.
7209         * i386-cygwin-tdep.c: Update.
7210         * i386-gnu-nat.c: Update.
7211         * i386-linux-nat.c: Update.
7212         * ia64-linux-nat.c: Update.
7213         * inf-ptrace.c: Update.
7214         * infrun.c: Update.
7215         * linux-fork.c: Update.
7216         * linux-nat.c: Update.
7217         * linux-tdep.c: Update.
7218         * linux-thread-db.c: Update.
7219         * mips-linux-nat.c: Update.
7220         * nat/aarch64-linux-hw-point.c: Update.
7221         * nat/aarch64-linux.c: Update.
7222         * nat/linux-btrace.c: Update.
7223         * nat/linux-osdata.c: Update.
7224         * nat/linux-procfs.c: Update.
7225         * nat/x86-linux-dregs.c: Update.
7226         * obsd-nat.c: Update.
7227         * ppc-fbsd-nat.c: Update.
7228         * ppc-linux-nat.c: Update.
7229         * procfs.c: Update.
7230         * python/py-infthread.c: Update.
7231         * ravenscar-thread.c: Update.
7232         * remote.c: Update.
7233         * s390-linux-nat.c: Update.
7234         * sol-thread.c: Update.
7235         * sol2-tdep.c: Update.
7236         * spu-linux-nat.c: Update.
7237         * x86-linux-nat.c: Update.
7238         * xtensa-linux-nat.c: Update.
7239
7240 2018-07-03  Tom Tromey  <tom@tromey.com>
7241
7242         * common/ptid.c (ptid_get_pid): Remove.
7243         * common/ptid.h (ptid_get_pid): Don't declare.
7244         * aarch64-linux-nat.c: Update.
7245         * ada-lang.c: Update.
7246         * aix-thread.c: Update.
7247         * alpha-bsd-nat.c: Update.
7248         * amd64-fbsd-nat.c: Update.
7249         * amd64-linux-nat.c: Update.
7250         * arm-linux-nat.c: Update.
7251         * arm-nbsd-nat.c: Update.
7252         * auxv.c: Update.
7253         * break-catch-syscall.c: Update.
7254         * breakpoint.c: Update.
7255         * bsd-uthread.c: Update.
7256         * corelow.c: Update.
7257         * ctf.c: Update.
7258         * darwin-nat.c: Update.
7259         * fbsd-nat.c: Update.
7260         * fbsd-tdep.c: Update.
7261         * gcore.c: Update.
7262         * gnu-nat.c: Update.
7263         * hppa-nbsd-nat.c: Update.
7264         * hppa-obsd-nat.c: Update.
7265         * i386-fbsd-nat.c: Update.
7266         * ia64-linux-nat.c: Update.
7267         * inf-ptrace.c: Update.
7268         * infcmd.c: Update.
7269         * inferior.c: Update.
7270         * inferior.h: Update.
7271         * inflow.c: Update.
7272         * infrun.c: Update.
7273         * linux-fork.c: Update.
7274         * linux-nat.c: Update.
7275         * linux-tdep.c: Update.
7276         * linux-thread-db.c: Update.
7277         * m68k-bsd-nat.c: Update.
7278         * mi/mi-interp.c: Update.
7279         * mi/mi-main.c: Update.
7280         * mips-linux-nat.c: Update.
7281         * mips-nbsd-nat.c: Update.
7282         * mips64-obsd-nat.c: Update.
7283         * nat/aarch64-linux-hw-point.c: Update.
7284         * nat/aarch64-linux.c: Update.
7285         * nat/linux-btrace.c: Update.
7286         * nat/linux-osdata.c: Update.
7287         * nat/linux-procfs.c: Update.
7288         * nat/x86-linux-dregs.c: Update.
7289         * nto-procfs.c: Update.
7290         * obsd-nat.c: Update.
7291         * ppc-linux-nat.c: Update.
7292         * ppc-nbsd-nat.c: Update.
7293         * ppc-obsd-nat.c: Update.
7294         * proc-service.c: Update.
7295         * procfs.c: Update.
7296         * python/py-inferior.c: Update.
7297         * python/py-infthread.c: Update.
7298         * ravenscar-thread.c: Update.
7299         * record.c: Update.
7300         * remote-sim.c: Update.
7301         * remote.c: Update.
7302         * rs6000-nat.c: Update.
7303         * s390-linux-nat.c: Update.
7304         * sh-nbsd-nat.c: Update.
7305         * sol-thread.c: Update.
7306         * sparc-nat.c: Update.
7307         * sparc64-tdep.c: Update.
7308         * spu-linux-nat.c: Update.
7309         * spu-tdep.c: Update.
7310         * target-debug.h: Update.
7311         * target.c: Update.
7312         * thread.c: Update.
7313         * tid-parse.c: Update.
7314         * tracefile-tfile.c: Update.
7315         * vax-bsd-nat.c: Update.
7316         * windows-nat.c: Update.
7317         * x86-linux-nat.c: Update.
7318         * x86-nat.c: Update.
7319
7320 2018-07-03  Tom Tromey  <tom@tromey.com>
7321
7322         * common/ptid.c (pid_to_ptid): Remove.
7323         * common/ptid.h (pid_to_ptid): Don't declare.
7324         * aix-thread.c: Update.
7325         * arm-linux-nat.c: Update.
7326         * common/ptid.c: Update.
7327         * common/ptid.h: Update.
7328         * corelow.c: Update.
7329         * ctf.c: Update.
7330         * darwin-nat.c: Update.
7331         * fbsd-nat.c: Update.
7332         * fork-child.c: Update.
7333         * gnu-nat.c: Update.
7334         * go32-nat.c: Update.
7335         * inf-ptrace.c: Update.
7336         * infcmd.c: Update.
7337         * inferior.c: Update.
7338         * infrun.c: Update.
7339         * linux-fork.c: Update.
7340         * linux-nat.c: Update.
7341         * nat/aarch64-linux-hw-point.c: Update.
7342         * nat/fork-inferior.c: Update.
7343         * nat/x86-linux-dregs.c: Update.
7344         * nto-procfs.c: Update.
7345         * obsd-nat.c: Update.
7346         * procfs.c: Update.
7347         * progspace.c: Update.
7348         * remote.c: Update.
7349         * rs6000-nat.c: Update.
7350         * s390-linux-nat.c: Update.
7351         * sol-thread.c: Update.
7352         * spu-linux-nat.c: Update.
7353         * target.c: Update.
7354         * top.c: Update.
7355         * tracefile-tfile.c: Update.
7356         * windows-nat.c: Update.
7357
7358 2018-07-03  Tom Tromey  <tom@tromey.com>
7359
7360         * common/ptid.h (ptid_build): Don't declare.
7361         * common/ptid.c (ptid_build): Remove.
7362         * aix-thread.c: Update.
7363         * bsd-kvm.c: Update.
7364         * bsd-uthread.c: Update.
7365         * common/agent.c: Update.
7366         * common/ptid.c: Update.
7367         * common/ptid.h: Update.
7368         * corelow.c: Update.
7369         * darwin-nat.c: Update.
7370         * fbsd-nat.c: Update.
7371         * gnu-nat.c: Update.
7372         * linux-fork.c: Update.
7373         * linux-nat.c: Update.
7374         * linux-thread-db.c: Update.
7375         * nat/linux-osdata.c: Update.
7376         * nat/linux-procfs.c: Update.
7377         * nto-procfs.c: Update.
7378         * obsd-nat.c: Update.
7379         * proc-service.c: Update.
7380         * procfs.c: Update.
7381         * ravenscar-thread.c: Update.
7382         * remote-sim.c: Update.
7383         * remote.c: Update.
7384         * sol-thread.c: Update.
7385         * target.c: Update.
7386         * windows-nat.c: Update.
7387
7388 2018-07-03  Tom Tromey  <tom@tromey.com>
7389
7390         * infrun.c (follow_exec): Use exit_inferior_silent.
7391         * inferior.c (exit_inferior_num_silent): Remove.
7392         * inferior.h (exit_inferior_num_silent): Don't declare.
7393
7394 2018-07-03  Tom Tromey  <tom@tromey.com>
7395
7396         PR cli/23340:
7397         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7398         inferior_ptid on error.
7399
7400 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7401             Simon Marchi  <simon.marchi@polymtl.ca>
7402
7403         PR tdep/8282
7404         * disasm.h (gdb_disassembler): Add
7405         `m_disassembler_options_holder'. member
7406         * disasm.c (get_all_disassembler_options): New function.
7407         (gdb_disassembler::gdb_disassembler): Use it.
7408         (gdb_buffered_insn_length_init_dis): Likewise.
7409         (gdb_buffered_insn_length): Adjust accordingly.
7410         (set_disassembler_options): Handle options with arguments.
7411         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7412         line if showing options with descriptions.
7413         (disassembler_options_completer): Adapt to using the
7414         `disasm_options_and_args_t' structure.
7415         * mips-tdep.c (mips_disassembler_options): New variable.
7416         (mips_disassembler_options_o32): Likewise.
7417         (mips_disassembler_options_n32): Likewise.
7418         (mips_disassembler_options_n64): Likewise.
7419         (gdb_print_insn_mips): Don't set `disassembler_options'.
7420         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7421         functions.
7422         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7423         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7424         `gdbarch_disassembler_options_implicit' and
7425         `gdbarch_valid_disassembler_options'.
7426         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7427         `disasm_options_and_args_t' structure.
7428         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7429         method.
7430         (valid_disassembler_options): Switch from `disasm_options_t' to
7431         the `disasm_options_and_args_t' structure.
7432         * NEWS: Document `set disassembler-options' support for the MIPS
7433         target.
7434         * gdbarch.h: Regenerate.
7435         * gdbarch.c: Regenerate.
7436
7437 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7438
7439         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7440
7441 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7442
7443         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7444         parameter in call to amd64_target_description.
7445         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7446         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7447         (amd64fbsd_init_abi): Likewise.
7448         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7449         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7450         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7451         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7452
7453 2018-06-29  Pedro Alves  <palves@redhat.com>
7454
7455         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7456         "segments" parameter.
7457         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7458         (_initialize_amd64_tdep): Update call to
7459         amd64_create_target_description.
7460         (amd64_target_description): Add "segments" parameter.  Adjust
7461         the implementation to use it.
7462         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7463         call to amd64_create_target_description.
7464         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7465         * gdb/arch/amd64.h (amd64_create_target_description): Add
7466         "segments" register.
7467         * gdb/arch/amd64.c (amd64_create_target_description): Add
7468         "segments" parameter.  Call create_feature_i386_64bit_segments
7469         only if SEGMENTS is true.
7470         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7471         call to amd64_create_target_description.
7472
7473 2018-06-29  Pedro Alves  <palves@redhat.com>
7474
7475         * thread.c (thread_target_id_str): New, factored out from ...
7476         (print_thread_info_1): ... here.  Use it to compute the max
7477         "Target Id" column width.
7478
7479 2018-06-29  Pedro Alves  <palves@redhat.com>
7480
7481         * remote.c (remote_target::extra_thread_info): Delete
7482         'display_buf' and 'n' locals.  from the cache, regardless of
7483         packet mechanims is in use.  Use cache for qThreadExtra and qP
7484         methods too.
7485
7486 2018-06-29  Pedro Alves  <palves@redhat.com>
7487
7488         * blockframe.c (find_pc_sect_containing_function): New function.
7489         * breakpoint.c (print_breakpoint_location): Don't call
7490         find_pc_sect_function.
7491         * linespec.c (create_sals_line_offset): Record the location's
7492         symbol in the sal.
7493         * linespec.c (convert_address_location_to_sals): Fill in sal's
7494         symbol with find_pc_sect_containing_function.
7495         * symtab.c (find_function_start_sal): Rename to ...
7496         (find_function_start_sal_1): ... this.
7497         (find_function_start_sal): Reimplement as wrapper around
7498         find_function_start_sal_1, and use
7499         find_pc_sect_containing_function to fill in the sal's symbol.
7500         (find_function_start_sal(symbol*, bool)): Adjust.
7501         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7502         comments.
7503         (find_pc_sect_containing_function): Declare.
7504
7505 2018-06-29  Pedro Alves  <palves@redhat.com>
7506
7507         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7508         true if the the location has no symbol.
7509
7510 2018-06-28  Tom Tromey  <tom@tromey.com>
7511
7512         * NEWS: Mention --enable-codesign.
7513         * silent-rules.mk (ECHO_SIGN): New variable.
7514         * configure.ac: Add --enable-codesign.
7515         * configure: Rebuild.
7516         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7517         (gdb$(EXEEXT)): Optionally invoke codesign.
7518
7519 2018-06-28  Pedro Alves  <palves@redhat.com>
7520
7521         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7522         comments.
7523         (switch_to_thread_no_regs): Adjust comment.
7524         * infcmd.c (stop_pc): Delete.
7525         (post_create_inferior, info_program_command): Replace references
7526         to stop_pc with references to thread_info->suspend.stop_pc.
7527         * inferior.h (stop_pc): Delete declaration.
7528         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7529         (handle_inferior_event_1, handle_signal_stop)
7530         (process_event_stop_test, keep_going_stepped_thread)
7531         (handle_step_into_function, handle_step_into_function_backward)
7532         (print_stop_location): Replace references to stop_pc with
7533         references to thread_info->suspend.stop_pc.
7534         (struct infcall_suspend_state) <stop_pc>: Delete field.
7535         (save_infcall_suspend_state, restore_infcall_suspend_state):
7536         Remove references to inf_stat->stop_pc.
7537         * linux-fork.c (fork_load_infrun_state): Likewise.
7538         * record-btrace.c (record_btrace_set_replay): Likewise.
7539         * record-full.c (record_full_goto_entry): Likewise.
7540         * remote.c (print_one_stopped_thread): Likewise.
7541         * target.c (target_resume): Extend comment.
7542         * thread.c (set_executing_thread): New.
7543         (set_executing): Use it.
7544         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7545         Remove references to stop_pc.
7546
7547 2018-06-28  Pedro Alves  <palves@redhat.com>
7548
7549         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7550         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7551
7552 2018-06-28  Tom Tromey  <tom@tromey.com>
7553
7554         * coffread.c (coff_symfile_finish): Update.
7555         * xcoffread.c (xcoff_symfile_finish): Update.
7556         * elfread.c (elf_symfile_finish): Update.
7557         * symfile.h (dwarf2_free_objfile): Don't declare.
7558         * dwarf2read.c (_initialize_dwarf2_read): Use
7559         register_objfile_data_with_cleanup.
7560         (dwarf2_free_objfile): Now static.  Change signature.
7561
7562 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7563
7564         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7565         option "-o" to add-symbol-file-load to add an offset to each
7566         section's load address.
7567         * symfile.c (set_objfile_default_section_offset): New function.
7568
7569 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7570
7571         * symfile.c (add_symbol_file_command): Make sure that sections
7572         with the same name are sorted in the same order.
7573
7574 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7575
7576         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7577         require the second argument.  If omitted, load sections at the
7578         addresses specified in the file.
7579
7580 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7581
7582         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7583         (_initialize_symfile): Add option "-o" to symbol-file to add an
7584         offset to each section of the symbol file.
7585
7586 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7587
7588         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7589
7590 2018-06-27  Tom Tromey  <tom@tromey.com>
7591
7592         * stack.c (_initialize_stack): Update "func" help text.
7593
7594 2018-06-27  Tom Tromey  <tom@tromey.com>
7595
7596         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7597         std::vector.
7598         (unwind_infopy_str, pyuw_create_unwind_info)
7599         (unwind_infopy_add_saved_register, pyuw_sniffer)
7600         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7601         Update.
7602         (struct saved_reg): Add constructor.
7603         <value>: Now a gdbpy_ref<>.
7604
7605 2018-06-27  Tom Tromey  <tom@tromey.com>
7606
7607         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7608
7609 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7610
7611         * gdb-gdb.py.in: Format using autopep8.
7612
7613 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7614
7615         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7616         (type_lookup_function): Recognize CORE_ADDR values.
7617
7618 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7619
7620         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7621         print tag_name.
7622
7623 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7624
7625         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7626         <__lt__>: Add.
7627
7628 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7629
7630         * gdb-gdb.py: Move to...
7631         * gdb-gdb.py.in: ... here.
7632         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7633         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7634         dependencies.
7635         (distclean): Remove gdb-gdb.py when cleaning.
7636         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7637         * configure: Re-generate.
7638
7639 2018-06-27  Pedro Alves  <palves@redhat.com>
7640
7641         * proc-service.c (get_ps_regcache): New.
7642         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7643         (ps_lsetfpregs): Use it.
7644
7645 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7646
7647         PR gdb/21695
7648         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7649         declaration.
7650         (dwarf_decode_lines_1): Adjust.
7651
7652 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7653
7654         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7655         override.
7656         <info_proc>: Likewise.
7657
7658 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7659
7660         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7661         to windows_fetch_one_register, and only handle the case of
7662         fetching one register.  Move the code that reloads the context
7663         and iterates over all registers if R is negative to...
7664         (windows_nat_target::fetch_registers): ... here.
7665         (do_windows_store_inferior_registers): Rename to
7666         windows_store_one_register, and only handle the case of storing
7667         one register.  Move the code that handles the case where r is
7668         negative to...
7669         (windows_nat_target::store_registers) ... here.
7670
7671 2018-06-26  Tom Tromey  <tom@tromey.com>
7672
7673         PR rust/22574:
7674         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7675         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7676         Update.
7677         (rust_internal_print_type): Add podata parameter.
7678         (rust_print_type): Update.
7679
7680 2018-06-26  Tom Tromey  <tom@tromey.com>
7681
7682         * typeprint.h (struct print_offset_data) <update, finish,
7683         maybe_print_hole>: New methods.
7684         <indentation>: New constant.
7685         * typeprint.c (print_offset_data::indentation): Define.
7686         (print_offset_data::maybe_print_hole, print_offset_data::update)
7687         (print_offset_data::finish): Move from c-typeprint.c and rename.
7688         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7689         (print_spaces_filtered_with_print_options): Update.
7690         (c_print_type_union_field_offset, maybe_print_hole)
7691         (c_print_type_struct_field_offset): Move to typeprint.c and
7692         rename.
7693         (c_type_print_base_struct_union): Update.
7694
7695 2018-06-25  Pedro Alves  <palves@redhat.com>
7696
7697         * gdbthread.h (thread_info_ref, delete_thread)
7698         (delete_thread_silent, first_thread_of_inferior)
7699         (any_thread_of_inferior, switch_to_thread)
7700         (enable_thread_stack_temporaries)
7701         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7702         (get_last_thread_stack_temporary)
7703         (value_in_thread_stack_temporaries, can_access_registers_thread):
7704         Spell out "struct thread_info" instead of just "thread_info".
7705         * inferior.h (notice_new_inferior): Likewise.
7706
7707 2018-06-25  Pedro Alves  <palves@redhat.com>
7708
7709         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7710         pass thread_info pointer to delete_thread.
7711         (windows_nat_target::detach): Pass inferior pointer to
7712         detach_inferior.
7713         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7714         delete_thread.
7715         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7716         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7717         and pass a thread_info pointer to delete_thread.
7718         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7719         pass thread_info pointer to delete_thread.
7720         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7721         delete_thread_silent call.
7722         * procfs.c (procfs_target::detach): Pass inferior pointer to
7723         detach_inferior.
7724         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7725         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7726         delete_thread_silent call.
7727         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7728         pass thread_info pointer to delete_thread.
7729         (windows_nat_target::detach): Pass inferior pointer to
7730         delete_inferior.
7731
7732 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7733
7734         * regcache.c (readable_regcache::read_part): Fix asserts.
7735         (reg_buffer::raw_collect_part): New function.
7736         (regcache::write_part): Fix asserts.
7737         (reg_buffer::raw_supply_part): New function.
7738         (regcache::transfer_regset_register): New helper function.
7739         (regcache::transfer_regset): Call new functions.
7740         (regcache_supply_regset): Use gdb_byte*.
7741         (regcache::supply_regset): Likewise.
7742         (regcache_collect_regset): Likewise.
7743         (regcache::collect_regset): Likewise.
7744         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7745         (reg_buffer::raw_supply_part): Likewise.
7746         (regcache::transfer_regset_register): Likewise.
7747         (regcache::transfer_regset): Use gdb_byte*.
7748
7749 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7750
7751         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7752
7753 2018-06-21  Pedro Alves  <palves@redhat.com>
7754
7755         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7756         instead of a ptid_t.  All callers adjusted.
7757         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7758         adjusted.
7759         (print_ada_task_info, display_current_task_id, task_command_1):
7760         Adjust.
7761         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7762         inferior_thread.
7763         (breakpoint_kind): Adjust.
7764         (remove_breakpoints_pid): Rename to ...
7765         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7766         pointer.  All callers adjusted.
7767         (bpstat_clear_actions): Use inferior_thread.
7768         (get_bpstat_thread): New.
7769         (bpstat_do_actions): Use it.
7770         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7771         to take a thread_info pointer.  All callers adjusted.
7772         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7773         (breakpoint_re_set_thread): Use inferior_thread.
7774         * breakpoint.h (struct inferior): Forward declare.
7775         (bpstat_stop_status): Update.
7776         (remove_breakpoints_pid): Delete.
7777         (remove_breakpoints_inf): New.
7778         * bsd-uthread.c (bsd_uthread_target::wait)
7779         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7780         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7781         (maint_btrace_packet_history_cmd)
7782         (maint_btrace_clear_packet_history_cmd): Adjust.
7783         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7784         inferior_thread.
7785         * cli/cli-interp.c: Include "inferior.h".
7786         * common/refcounted-object.h (struct
7787         refcounted_object_ref_policy): New.
7788         * compile/compile-object-load.c: Include gdbthread.h.
7789         (store_regs): Use inferior_thread.
7790         * corelow.c (core_target::close): Use current_inferior.
7791         (core_target_open): Adjust to use first_thread_of_inferior and use
7792         the current inferior.
7793         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7794         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7795         <thread>: ... this new field.  All references adjusted.
7796         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7797         Take a thread_info pointer instead of a ptid_t.
7798         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7799         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7800         thread_info pointer instead of a ptid_t.
7801         * elfread.c: Include "inferior.h".
7802         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7803         Use inferior_thread.
7804         * eval.c (evaluate_subexp): Likewise.
7805         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7806         inferior_thread.
7807         * gdb_proc_service.h (struct thread_info): Forward declare.
7808         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7809         <thread>: ... this new field.  All references adjusted.
7810         * gdbarch.h, gdbarch.c: Regenerate.
7811         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7812         'thread' parameter.  All implementations and callers adjusted.
7813         * gdbthread.h (thread_info) <set_running>: New method.
7814         (delete_thread, delete_thread_silent): Take a thread_info pointer
7815         instead of a ptid.
7816         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7817         (first_thread_of_process): Delete, replaced by ...
7818         (first_thread_of_inferior): ... this new function.  All callers
7819         adjusted.
7820         (any_live_thread_of_process): Delete, replaced by ...
7821         (any_live_thread_of_inferior): ... this new function.  All callers
7822         adjusted.
7823         (switch_to_thread, switch_to_no_thread): Declare.
7824         (is_executing): Delete.
7825         (enable_thread_stack_temporaries): Update comment.
7826         <enable_thread_stack_temporaries>: Take a thread_info pointer
7827         instead of a ptid_t.  Incref the thread.
7828         <~enable_thread_stack_temporaries>: Decref the thread.
7829         <m_ptid>: Delete
7830         <m_thr>: New.
7831         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7832         (get_last_thread_stack_temporary)
7833         (value_in_thread_stack_temporaries, can_access_registers_thread):
7834         Take a thread_info pointer instead of a ptid_t.  All callers
7835         adjusted.
7836         * infcall.c (get_call_return_value): Use inferior_thread.
7837         (run_inferior_call): Work with thread pointers instead of ptid_t.
7838         (call_function_by_hand_dummy): Work with thread pointers instead
7839         of ptid_t.  Use thread_info_ref.
7840         * infcmd.c (proceed_thread_callback): Access thread's state
7841         directly.
7842         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7843         access thread's state directly.
7844         (continue_command): Use inferior_thread.
7845         (info_program_command): Use find_thread_ptid and access thread
7846         state directly.
7847         (proceed_after_attach_callback): Use thread state directly.
7848         (notice_new_inferior): Take a thread_info pointer instead of a
7849         ptid_t.  All callers adjusted.
7850         (exit_inferior): Take an inferior pointer instead of a pid.  All
7851         callers adjusted.
7852         (exit_inferior_silent): New.
7853         (detach_inferior): Delete.
7854         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7855         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7856         (detach_inferior_command, kill_inferior_command): Use
7857         find_inferior_id instead of valid_gdb_inferior_id and
7858         gdb_inferior_id_to_pid.
7859         (inferior_command): Use inferior and thread pointers.
7860         * inferior.h (struct thread_info): Forward declare.
7861         (notice_new_inferior): Take a thread_info pointer instead of a
7862         ptid_t.  All callers adjusted.
7863         (detach_inferior): Delete declaration.
7864         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7865         instead of a pid.  All callers adjusted.
7866         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7867         (valid_gdb_inferior_id): Delete.
7868         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7869         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7870         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7871         ...
7872         <inf>: ... this new field.
7873         <step_ptid>: Delete, replaced by ...
7874         <step_thread>: ... this new field.
7875         (get_displaced_stepping_state): Take an inferior pointer instead
7876         of a pid.  All callers adjusted.
7877         (displaced_step_in_progress_any_inferior): Adjust.
7878         (displaced_step_in_progress_thread): Take a thread pointer instead
7879         of a ptid_t.  All callers adjusted.
7880         (displaced_step_in_progress, add_displaced_stepping_state): Take
7881         an inferior pointer instead of a pid.  All callers adjusted.
7882         (get_displaced_step_closure_by_addr): Adjust.
7883         (remove_displaced_stepping_state): Take an inferior pointer
7884         instead of a pid.  All callers adjusted.
7885         (displaced_step_prepare_throw, displaced_step_prepare)
7886         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7887         All callers adjusted.
7888         (start_step_over): Adjust.
7889         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7890         displaced step queue.
7891         (do_target_resume): Adjust.
7892         (fetch_inferior_event): Use inferior_thread.
7893         (context_switch, get_inferior_stop_soon): Take an
7894         execution_control_state pointer instead of a ptid_t.  All callers
7895         adjusted.
7896         (switch_to_thread_cleanup): Delete.
7897         (stop_all_threads): Use scoped_restore_current_thread.
7898         * inline-frame.c: Include "gdbthread.h".
7899         (inline_state) <inline_state>: Take a thread pointer instead of a
7900         ptid_t.  All callers adjusted.
7901         <ptid>: Delete, replaced by ...
7902         <thread>: ... this new field.
7903         (find_inline_frame_state): Take a thread pointer instead of a
7904         ptid_t.  All callers adjusted.
7905         (skip_inline_frames, step_into_inline_frame)
7906         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7907         pointer instead of a ptid_t.  All callers adjusted.
7908         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7909         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7910         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7911         pointers directly.
7912         * linux-nat.c (get_detach_signal): Likewise.
7913         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7914         (thread_db_notice_clone): Adjust.
7915         (thread_db_find_new_threads_silently)
7916         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7917         a thread pointer instead of a ptid_t.  All callers adjusted.
7918         * mi/mi-cmd-var.c: Include "inferior.h".
7919         (mi_cmd_var_update_iter): Update to use thread pointers.
7920         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7921         inferior directly.
7922         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7923         out to ...
7924         (mi_output_running): ... this new function.
7925         (mi_on_resume_1): Adjust to use it.
7926         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7927         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7928         directly.
7929         (interrupt_thread_callback): : Adjust to use thread and inferior
7930         pointers.
7931         * proc-service.c: Include "gdbthread.h".
7932         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7933         * progspace-and-thread.c: Include "inferior.h".
7934         * progspace.c: Include "inferior.h".
7935         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7936         hold a reference to an inferior_object.
7937         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7938         inferior_thread.
7939         * python/py-inferior.c (struct inferior_object): Give the type a
7940         tag name instead of a typedef.
7941         (python_on_normal_stop): No need to check if the current thread is
7942         listed.
7943         (inferior_to_inferior_object): Change return type to
7944         inferior_object.  All callers adjusted.
7945         (find_thread_object): Delete, bits factored out to ...
7946         (thread_to_thread_object): ... this new function.
7947         * python/py-infthread.c (create_thread_object): Use
7948         inferior_to_inferior_object.
7949         (thpy_is_stopped): Use thread pointer directly.
7950         (gdbpy_selected_thread): Use inferior_thread.
7951         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7952         field, replaced with ...
7953         <thread>: ... this new field.  All users adjusted.
7954         (btpy_insn_or_gap_new): Drop const.
7955         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7956         callers adjusted.
7957         * python/py-record.c: Include "gdbthread.h".
7958         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7959         a ptid_t.  All callers adjusted.
7960         (gdbpy_current_recording): Use inferior_thread.
7961         * python/py-record.h (recpy_record_object) <ptid>: Delete
7962         field, replaced with ...
7963         <thread>: ... this new field.  All users adjusted.
7964         (recpy_element_object) <ptid>: Delete
7965         field, replaced with ...
7966         <thread>: ... this new field.  All users adjusted.
7967         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7968         a ptid_t.  All callers adjusted.
7969         * python/py-threadevent.c: Include "gdbthread.h".
7970         (get_event_thread): Use thread_to_thread_object.
7971         * python/python-internal.h (struct inferior_object): Forward
7972         declare.
7973         (find_thread_object, find_inferior_object): Delete declarations.
7974         (thread_to_thread_object, inferior_to_inferior_object): New
7975         declarations.
7976         * record-btrace.c: Include "inferior.h".
7977         (require_btrace_thread): Use inferior_thread.
7978         (record_btrace_frame_sniffer)
7979         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7980         (get_thread_current_frame): Use scoped_restore_current_thread and
7981         switch_to_thread.
7982         (get_thread_current_frame): Use thread pointer directly.
7983         (record_btrace_replay_at_breakpoint): Use thread's inferior
7984         pointer directly.
7985         * record-full.c: Include "inferior.h".
7986         * regcache.c: Include "gdbthread.h".
7987         (get_thread_arch_regcache): Use the inferior's address space
7988         directly.
7989         (get_thread_regcache, registers_changed_thread): New.
7990         * regcache.h (get_thread_regcache(thread_info *thread)): New
7991         overload.
7992         (registers_changed_thread): New.
7993         (remote_target) <remote_detach_1>: Swap order of parameters.
7994         (remote_add_thread): <remote_add_thread>: Return the new thread.
7995         (get_remote_thread_info(ptid_t)): New overload.
7996         (remote_target::remote_notice_new_inferior): Use thread pointers
7997         directly.
7998         (remote_target::process_initial_stop_replies): Use
7999         thread_info::set_running.
8000         (remote_target::remote_detach_1, remote_target::detach)
8001         (extended_remote_target::detach): Adjust.
8002         * stack.c (frame_show_address): Use inferior_thread.
8003         * target-debug.h (target_debug_print_thread_info_pp): New.
8004         * target-delegates.c: Regenerate.
8005         * target.c (default_thread_address_space): Delete.
8006         (memory_xfer_partial_1): Use current_inferior.
8007         (target_detach): Use current_inferior.
8008         (target_thread_address_space): Delete.
8009         (generic_mourn_inferior): Use current_inferior.
8010         * target.h (struct target_ops) <thread_address_space>: Delete.
8011         (target_thread_address_space): Delete.
8012         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
8013         pointers directly.
8014         (delete_thread_1, delete_thread, delete_thread_silent): Take a
8015         thread pointer instead of a ptid_t.  Adjust all callers.
8016         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8017         (first_thread_of_process): Delete, replaced by ...
8018         (first_thread_of_inferior): ... this new function.  All callers
8019         adjusted.
8020         (any_thread_of_process): Rename to ...
8021         (any_thread_of_inferior): ... this, and take an inferior pointer.
8022         (any_live_thread_of_process): Rename to ...
8023         (any_live_thread_of_inferior): ... this, and take an inferior
8024         pointer.
8025         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8026         (value_in_thread_stack_temporaries)
8027         (get_last_thread_stack_temporary): Take a thread pointer instead
8028         of a ptid_t.  Adjust all callers.
8029         (thread_info::set_running): New.
8030         (validate_registers_access): Use inferior_thread.
8031         (can_access_registers_ptid): Rename to ...
8032         (can_access_registers_thread): ... this, and take a thread
8033         pointer.
8034         (print_thread_info_1): Adjust to compare thread pointers instead
8035         of ptids.
8036         (switch_to_no_thread, switch_to_thread): Make extern.
8037         (scoped_restore_current_thread::~scoped_restore_current_thread):
8038         Use m_thread pointer directly.
8039         (scoped_restore_current_thread::scoped_restore_current_thread):
8040         Use inferior_thread.
8041         (thread_command): Use thread pointer directly.
8042         (thread_num_make_value_helper): Use inferior_thread.
8043         * top.c (execute_command): Use inferior_thread.
8044         * tui/tui-interp.c: Include "inferior.h".
8045         * varobj.c (varobj_create): Use inferior_thread.
8046         (value_of_root_1): Use find_thread_global_id instead of
8047         global_thread_id_to_ptid.
8048
8049 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
8050
8051         * regcache.c (readable_regcache::read_part): Avoid memcpy when
8052         possible.
8053         (regcache::write_part): Likewise.
8054         (readable_regcache::cooked_read_part): Update comment.
8055         (readable_regcache::cooked_write_part): Likewise.
8056         * regcache.h: (readable_regcache::read_part): Likewise.
8057         (regcache::write_part): Likewise.
8058
8059 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
8060             Dirk Schubert  <dirk.schubert@arm.com>
8061
8062         * aarch64-linux-nat.c (post_attach): New.
8063         (aarch64_linux_nat_target::post_attach): Override post_attach to
8064         record the number of hardware debug registers.
8065
8066 2018-06-20  Tom Tromey  <tom@tromey.com>
8067
8068         * python/py-param.c (add_setshow_generic): Make parameters const.
8069         (parmpy_init): Update.
8070
8071 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8072
8073         * regcache.h (regcache_cooked_read_ftype): Rename to...
8074         (register_read_ftype): ...this, change type to function_view.
8075         (class reg_buffer) <save>: Remove src parameter.
8076         (readonly_detached_regcache) <readonly_detached_regcache>: Make
8077         parameter non-const in first overload.  Remove src parameter in
8078         second overload.
8079         * regcache.c (do_cooked_read): Remove.
8080         (readonly_detached_regcache::readonly_detached_regcache): Make
8081         parameter non-const, adjust call to other constructor.
8082         (reg_buffer::save): Remove src parameter.
8083         * frame.c (do_frame_register_read): Remove.
8084         (frame_save_as_regcache): Use lambda function.
8085         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8086         parameter to ppu2spu_data *.
8087         (ppu2spu_sniffer): Use lambda function.
8088
8089 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8090
8091         * record-full.c (record_full_target::insert_breakpoint): Remove
8092         "struct" keyword, add const.
8093
8094 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
8095
8096         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8097         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8098         * configure.ac: Remove AC_PREREQ, add missing quoting.
8099         * gnulib/configure.ac: Modernize usage of
8100         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
8101         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8102         (AUTOMAKE_VERSION): Bump to 1.15.1.
8103         * configure: Re-generate.
8104         * config.in: Re-generate.
8105         * aclocal.m4: Re-generate.
8106         * gnulib/aclocal.m4: Re-generate.
8107         * gnulib/config.in: Re-generate.
8108         * gnulib/configure: Re-generate.
8109         * gnulib/import/Makefile.in: Re-generate.
8110
8111 2018-06-19  Pedro Alves  <palves@redhat.com>
8112
8113         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8114         (lookup_minimal_symbol_by_pc_section): ... here with
8115         gdb_assert_not_reached added.
8116
8117 2018-06-19  Pedro Alves  <palves@redhat.com>
8118
8119         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8120         parameter with a block parameter.  Compare location's block symbol
8121         with the frame's block instead of addresses.
8122         (skip_inline_frames): Pass the current block instead of the
8123         frame's address.  Break out as soon as we determine the frame
8124         should not be skipped.
8125
8126 2018-06-18  Tom Tromey  <tom@tromey.com>
8127
8128         * solib-aix.c (solib_aix_get_section_offsets): Return
8129         unique_xmalloc_ptr.
8130         (solib_aix_solib_create_inferior_hook): Update.
8131
8132 2018-06-18  Tom Tromey  <tom@tromey.com>
8133
8134         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8135
8136 2018-06-18  Tom Tromey  <tom@tromey.com>
8137
8138         * solib-frv.c (frv_relocate_main_executable): Use
8139         unique_xmalloc_ptr.
8140         * solib-dsbt.c (dsbt_relocate_main_executable): Use
8141         unique_xmalloc_ptr.
8142
8143 2018-06-18  Tom Tromey  <tom@tromey.com>
8144
8145         * objfiles.h (inhibit_section_map_updates): Update.
8146         (resume_section_map_updates, resume_section_map_updates_cleanup):
8147         Remove.
8148         * solib-svr4.c (svr4_handle_solib_event): Update.
8149         * objfiles.c (inhibit_section_map_updates): Return
8150         scoped_restore_tmpl<int>.
8151         (resume_section_map_updates, resume_section_map_updates_cleanup):
8152         Remove.
8153
8154 2018-06-18  Tom Tromey  <tom@tromey.com>
8155
8156         * valprint.h (read_string): Update.
8157         * valprint.c (read_string): Change type of "buffer".
8158         (val_print_string): Update.
8159         * python/py-value.c (valpy_string): Update.
8160         * language.h (struct language_defn) <la_get_string>: Change
8161         type of "buffer".
8162         (default_get_string, c_get_string): Update.
8163         * language.c (default_get_string): Change type of "buffer".
8164         * guile/scm-value.c (gdbscm_value_to_string): Update.
8165         * c-lang.c (c_get_string): Change type of "buffer".
8166
8167 2018-06-18  Tom Tromey  <tom@tromey.com>
8168
8169         * ser-mingw.c (struct pipe_state_destroyer): New.
8170         (pipe_state_up): New typedef.
8171         (cleanup_pipe_state): Remove.
8172         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
8173
8174 2018-06-18  Tom Tromey  <tom@tromey.com>
8175
8176         * rust-lang.h (rust_yyerror): Don't declare.
8177         * rust-lang.c (rust_language_defn): Update.
8178         * rust-exp.y (yyerror): Now static.
8179         * parse.c (parse_exp_in_context_1): Update.
8180         * p-lang.h (p_yyerror): Don't declare.
8181         * p-lang.c (p_language_defn): Update.
8182         * p-exp.y (yyerror): Now static.
8183         * opencl-lang.c (opencl_language_defn): Update.
8184         * objc-lang.c (objc_language_defn): Update.
8185         * m2-lang.h (m2_yyerror): Don't declare.
8186         * m2-lang.c (m2_language_defn): Update.
8187         * m2-exp.y (yyerror): Now static.
8188         * language.h (struct language_defn) <la_error>: Remove.
8189         * language.c (unk_lang_error): Remove.
8190         (unknown_language_defn, auto_language_defn): Remove.
8191         * go-lang.h (go_yyerror): Don't declare.
8192         * go-lang.c (go_language_defn): Update.
8193         * go-exp.y (yyerror): Now static.
8194         * f-lang.h (f_yyerror): Don't declare.
8195         * f-lang.c (f_language_defn): Update.
8196         * f-exp.y (yyerror): Now static.
8197         * d-lang.h (d_yyerror): Don't declare.
8198         * d-lang.c (d_language_defn): Update.
8199         * d-exp.y (yyerror): Now static.
8200         * c-lang.h (c_yyerror): Don't declare.
8201         * c-lang.c (c_language_defn, cplus_language_defn)
8202         (asm_language_defn, minimal_language_defn): Update.
8203         * c-exp.y (yyerror): Now static.
8204         * ada-lang.h (ada_yyerror): Don't declare.
8205         * ada-lang.c (ada_language_defn): Update.
8206         * ada-exp.y (yyerror): Now static.
8207
8208 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8209
8210         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8211         (store_sveregs_to_thread): Likewise.
8212         (aarch64_linux_fetch_inferior_registers): Check for SVE.
8213         (aarch64_linux_store_inferior_registers): Likewise.
8214         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8215         function.
8216         (aarch64_sve_regs_copy_to_regcache): Likewise.
8217         (aarch64_sve_regs_copy_from_regcache): Likewise.
8218         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8219         declaration.
8220         (aarch64_sve_regs_copy_to_regcache): Likewise.
8221         (aarch64_sve_regs_copy_from_regcache): Likewise.
8222         (sve_context): Structure from Linux headers.
8223         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8224         (SVE_SIG_ZREG_SIZE): Likewise.
8225         (SVE_SIG_PREG_SIZE): Likewise.
8226         (SVE_SIG_FFR_SIZE): Likewise.
8227         (SVE_SIG_REGS_OFFSET): Likewise.
8228         (SVE_SIG_ZREGS_OFFSET): Likewise.
8229         (SVE_SIG_ZREG_OFFSET): Likewise.
8230         (SVE_SIG_ZREGS_SIZE): Likewise.
8231         (SVE_SIG_PREGS_OFFSET): Likewise.
8232         (SVE_SIG_PREG_OFFSET): Likewise.
8233         (SVE_SIG_PREGS_SIZE): Likewise.
8234         (SVE_SIG_FFR_OFFSET): Likewise.
8235         (SVE_SIG_REGS_SIZE): Likewise.
8236         (SVE_SIG_CONTEXT_SIZE): Likewise.
8237         (SVE_PT_REGS_MASK): Likewise.
8238         (SVE_PT_REGS_FPSIMD): Likewise.
8239         (SVE_PT_REGS_SVE): Likewise.
8240         (SVE_PT_VL_INHERIT): Likewise.
8241         (SVE_PT_VL_ONEXEC): Likewise.
8242         (SVE_PT_REGS_OFFSET): Likewise.
8243         (SVE_PT_FPSIMD_OFFSET): Likewise.
8244         (SVE_PT_FPSIMD_SIZE): Likewise.
8245         (SVE_PT_SVE_ZREG_SIZE): Likewise.
8246         (SVE_PT_SVE_PREG_SIZE): Likewise.
8247         (SVE_PT_SVE_FFR_SIZE): Likewise.
8248         (SVE_PT_SVE_FPSR_SIZE): Likewise.
8249         (SVE_PT_SVE_FPCR_SIZE): Likewise.
8250         (__SVE_SIG_TO_PT): Likewise.
8251         (SVE_PT_SVE_OFFSET): Likewise.
8252         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8253         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8254         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8255         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8256         (SVE_PT_SVE_PREG_OFFSET): Likewise.
8257         (SVE_PT_SVE_PREGS_SIZE): Likewise.
8258         (SVE_PT_SVE_FFR_OFFSET): Likewise.
8259         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8260         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8261         (SVE_PT_SVE_SIZE): Likewise.
8262         (SVE_PT_SIZE): Likewise.
8263         (HAS_SVE_STATE): New define.
8264
8265 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8266
8267         * nat/aarch64-sve-linux-sigcontext.h: New file.
8268         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8269         new files.
8270         (SVE_VQ_MIN): Likewise.
8271         (SVE_VQ_MAX): Likewise.
8272         (SVE_VL_MIN): Likewise.
8273         (SVE_VL_MAX): Likewise.
8274         (SVE_NUM_ZREGS): Likewise.
8275         (SVE_NUM_PREGS): Likewise.
8276         (sve_vl_valid): Likewise.
8277         (struct user_sve_header): Likewise.
8278
8279 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
8280             Richard Bunt <Richard.Bunt@arm.com>
8281
8282         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8283         was requested by GDB.
8284
8285 2018-06-15  Tom de Vries  <tdevries@suse.de>
8286
8287         * MAINTAINERS (Write After Approval): Add Tom de Vries.
8288
8289 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
8290
8291         * gnulib/update-gnulib.sh: Print expected versions of
8292         autoconf/aclocal.
8293
8294 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
8295
8296         * arch-utils.c (default_type_align): Use type_length_units.
8297         * gdbtypes.c (type_align): Use type_length_units.
8298
8299 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8300
8301         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8302         of 'define' command.
8303
8304 2018-06-14  Tom de Vries  <tdevries@suse.de>
8305
8306         PR cli/22573
8307         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8308         get_no_prettyformat_print_options.
8309
8310 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8311
8312         * sparc-nat.h: Include target.h.
8313         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8314         <fetch_registers>: Remove this argument in function call.
8315         <store_registers>: Remove this argument in function call, remove
8316         extra semicolon.
8317         <low_forget_process>: Call sparc64_forget_process instead of
8318         sparc_forget_process.
8319
8320 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8321
8322         * procfs.c (_initialize_procfs): Use add_inf_child_target.
8323         (procfs_target::make_corefile_notes): Adjust to new
8324         target_read_alloc return type.
8325
8326 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8327             Stephen Roberts  <stephen.roberts@arm.com>
8328
8329         PR gdb/22882
8330         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8331         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8332         Move should_notify_stop local into more inner scope.
8333
8334 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8335             Stephen Roberts  <stephen.roberts@arm.com>
8336
8337         PR gdb/22882
8338         * infrun.c (resume_1): Add call to mark_async_event_handler.
8339
8340 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8341
8342         * infrun.c (do_target_wait): Change old version of $pc printed.
8343
8344 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8345
8346         * dwarf2read.c (read_index_from_section): Rename to...
8347         (read_gdb_index_from_section): ... this, update all callers.
8348         (dwarf2_read_index): Rename to...
8349         (dwarf2_read_gdb_index): ... this, update all callers.
8350
8351 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
8352
8353         * hppa-linux-nat.c
8354         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8355         hppa_linux_nat_target::fetch_registers.
8356
8357 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8358
8359         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8360         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8361         (AARCH64_DWARF_SVE_FFR): Likewise.
8362         (AARCH64_DWARF_SVE_P0): Likewise.
8363         (AARCH64_DWARF_SVE_Z0): Likewise.
8364
8365 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8366
8367         * common/common-regcache.h (raw_compare): New function.
8368         * regcache.c (regcache::raw_compare): Likewise.
8369         * regcache.h (regcache::raw_compare): New declaration.
8370
8371 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8372
8373         * common/common-regcache.h (reg_buffer_common): New structure.
8374         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8375         (reg_buffer::raw_supply): Likewise.
8376         (reg_buffer::raw_supply_integer): Likewise.
8377         (reg_buffer::raw_supply_zeroed): Likewise.
8378         (reg_buffer::raw_collect): Likewise.
8379         (reg_buffer::raw_collect_integer): Likewise.
8380         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8381         (reg_buffer::raw_supply): Likewise.
8382         (reg_buffer::raw_supply_integer): Likewise.
8383         (reg_buffer::raw_supply_zeroed): Likewise.
8384         (reg_buffer::raw_collect): Likewise.
8385         (reg_buffer::raw_collect_integer): Likewise.
8386
8387 2018-06-10  Tom Tromey  <tom@tromey.com>
8388
8389         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8390         (class remote_state) <stop_reply_queue>: Now std::vector.
8391         (remote_state::~remote_state)
8392         (remote_target::stop_reply_queue_length): Update.
8393         (struct queue_iter_param, remove_child_of_pending_fork)
8394         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8395         (check_pending_event_prevents_wildcard_vcont_callback)
8396         (remove_stop_reply_for_inferior)
8397         (remove_stop_reply_of_remote_state)
8398         (remote_notif_remove_once_on_match)
8399         (stop_reply_match_ptid_and_ws)
8400         (remote_kill_child_of_pending_fork): Remove.
8401         (remote_target::remove_new_fork_children)
8402         (remote_target::check_pending_events_prevent_wildcard_vcont)
8403         (remote_target::discard_pending_stop_replies)
8404         (remote_target::discard_pending_stop_replies_in_queue)
8405         (remote_target::remote_notif_remove_queued_reply)
8406         (remote_target::queued_stop_reply)
8407         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8408         (remote_target::wait, remote_target::kill_new_fork_children)
8409         (remote_target::async): Update.
8410
8411 2018-06-10  Tom Tromey  <tom@tromey.com>
8412
8413         * record-full.c (record_full_arch_list_cleanups): Remove.
8414         (record_full_message): Use try/catch.
8415         (record_full_wait_cleanups): Remove.
8416         (record_full_wait_1): Use try/catch.
8417         (record_full_restore): Likewise.
8418
8419 2018-06-10  Tom Tromey  <tom@tromey.com>
8420
8421         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8422         declare VEC.  Add constructor.
8423         <in_target_beneath>: Now bool.
8424         (record_full_breakpoints): Now a std::vector, static.
8425         (record_full_sync_record_breakpoints)
8426         (record_full_init_record_breakpoints)
8427         (record_full_target::insert_breakpoint)
8428         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8429
8430 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8431
8432         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8433         * serial.c (serial_interface_lookup): Remove struct keyword.
8434
8435 2018-06-10  Tom Tromey  <tom@tromey.com>
8436
8437         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8438         method.
8439         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8440         a method.
8441         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8442         method.
8443         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8444         "beneath" as a method.
8445         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8446         Use "beneath" as a method.
8447
8448 2018-06-10  Tom Tromey  <tom@tromey.com>
8449
8450         * tracefile.c (struct trace_file_writer_deleter): New.
8451         <operator()>: Rename from trace_file_writer_xfree.
8452         (trace_file_writer_up): New typedef.
8453         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8454
8455 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8456
8457         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8458         <m_registers, m_register_status>: Change type to
8459         std::unique_ptr.
8460         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8461         XCNEWVEC.
8462
8463 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8464
8465         * common/common-regcache.h (enum register_status): Add
8466         underlying type "signed char".
8467         * regcache.h (reg_buffer) <m_register_status>: Change type to
8468         register_status *.
8469         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8470         register_status instead of signed char.
8471         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8472         (reg_buffer::get_register_status): Remove cast.
8473         (readable_regcache::raw_read): Remove cast.
8474         (readable_regcache::cooked_read): Remove cast.
8475
8476 2018-06-09  Tom Tromey  <tom@tromey.com>
8477
8478         * source.c (reverse_search_command, forward_search_command): Use
8479         scoped_fd.
8480
8481 2018-06-09  Tom Tromey  <tom@tromey.com>
8482
8483         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8484         (serial_ops_list): Now static, std::vector.
8485         (serial_interface_lookup, serial_add_interface): Update.
8486
8487 2018-06-09  Tom Tromey  <tom@tromey.com>
8488
8489         * dwarf2read.c (process_cu_includes): Update.
8490         (process_full_comp_unit): Update.
8491         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8492         std::vector.
8493
8494 2018-06-08  Paul Koning  <paul_koning@dell.com>
8495
8496         PR gdb/23252
8497
8498         * python/python.c (do_start_initialization):
8499         Avoid call to internal Python API.
8500         (init__gdb_module): New function.
8501
8502 2018-06-08  Gary Benson <gbenson@redhat.com>
8503
8504         * linux-thread-db.c (valprint.h): New include.
8505         (struct check_thread_db_info): New structure.
8506         (check_thread_db_on_load, tdb_testinfo): New static globals.
8507         (check_thread_db, check_thread_db_callback): New functions.
8508         (try_thread_db_load_1): Run integrity checks if requested.
8509         (maintenance_check_libthread_db): New function.
8510         (_initialize_thread_db): Register "maint check libthread-db"
8511         and "maint set/show check-libthread-db".
8512         * NEWS: Mention the above new commands.
8513
8514 2018-06-08  Tom Tromey  <tom@tromey.com>
8515
8516         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8517         now a method.
8518
8519 2018-06-08  Tom Tromey  <tom@tromey.com>
8520
8521         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8522
8523 2018-06-08  Tom Tromey  <tom@tromey.com>
8524
8525         * common/btrace-common.h (struct btrace_data): Add constructor,
8526         destructor, move assignment operator.
8527         <empty, clear, fini>: New methods.
8528         <format>: Initialize.
8529         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8530         (btrace_data_empty): Don't declare.
8531         * common/btrace-common.c (btrace_data_init): Remove.
8532         (btrace_data::fini): Rename from btrace_data_fini.
8533         (btrace_data::empty): Rename from btrace_data_empty.
8534         (btrace_data::clear): Rename from btrace_data_clear.  Return
8535         bool.
8536         * btrace.h (make_cleanup_btrace_data): Don't declare.
8537         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8538         (parse_xml_btrace): Update.
8539         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8540         (maint_btrace_clear_packet_history_cmd): Update.
8541
8542 2018-06-07  Pedro Alves  <palves@redhat.com>
8543
8544         * target.h (target_ops) <beneath>: Now a method.  All references
8545         updated.
8546         (class target_stack): New.
8547         * target.c (g_target_stack): New.
8548         (g_current_top_target): Delete.
8549         (current_top_target): Get the top target out of g_target_stack.
8550         (target_stack::push, target_stack::unpush): New.
8551         (push_target, unpush_target): Reimplement.
8552         (target_is_pushed): Reimplement in terms of g_target_stack.
8553         (target_ops::beneath, target_stack::find_beneath): New.
8554
8555 2018-06-07  Pedro Alves  <palves@redhat.com>
8556
8557         * target.h (find_target_beneath): Delete declaration.
8558         * target.c (find_target_beneath): Delete definition.
8559         * aix-thread.c: All callers of find_target_beneath adjusted to
8560         call target_ops::beneath instead.
8561         * bsd-uthread.c: Likewise.
8562         * linux-thread-db.c: Likewise.
8563         * ravenscar-thread.c: Likewise.
8564         * sol-thread.c: Likewise.
8565         * spu-multiarch.c: Likewise.
8566
8567 2018-06-07  Pedro Alves  <palves@redhat.com>
8568
8569         * target.h (target_ops) <beneath>: Now a method.  All references
8570         updated.
8571         (target_ops) <m_beneath>: New.
8572         * target.c (target_ops::beneath): New.
8573         * corelow.c: Adjust all references to target_ops::beneath.
8574         * linux-thread-db.c: Likewise.
8575         * make-target-delegates: Likewise.
8576         * record-btrace.c: Likewise.
8577         * record-full.c: Likewise.
8578         * remote.c: Likewise.
8579         * target.c: Likewise.
8580         * target-delegates.c: Regenerate.
8581
8582 2018-06-07  Pedro Alves  <palves@redhat.com>
8583
8584         * target.h (target_stack): Delete.
8585         (current_top_target): Declare function.
8586         * target.c (target_stack): Delete.
8587         (g_current_top_target): New.
8588         (current_top_target): New function.
8589         * auxv.c: Use current_top_target instead of target_stack
8590         throughout.
8591         * avr-tdep.c: Likewise.
8592         * breakpoint.c: Likewise.
8593         * corefile.c: Likewise.
8594         * elfread.c: Likewise.
8595         * eval.c: Likewise.
8596         * exceptions.c: Likewise.
8597         * frame.c: Likewise.
8598         * gdbarch-selftests.c: Likewise.
8599         * gnu-v3-abi.c: Likewise.
8600         * ia64-tdep.c: Likewise.
8601         * ia64-vms-tdep.c: Likewise.
8602         * infcall.c: Likewise.
8603         * infcmd.c: Likewise.
8604         * infrun.c: Likewise.
8605         * linespec.c: Likewise.
8606         * linux-tdep.c: Likewise.
8607         * minsyms.c: Likewise.
8608         * ppc-linux-nat.c: Likewise.
8609         * ppc-linux-tdep.c: Likewise.
8610         * procfs.c: Likewise.
8611         * regcache.c: Likewise.
8612         * remote.c: Likewise.
8613         * rs6000-tdep.c: Likewise.
8614         * s390-linux-nat.c: Likewise.
8615         * s390-tdep.c: Likewise.
8616         * solib-aix.c: Likewise.
8617         * solib-darwin.c: Likewise.
8618         * solib-dsbt.c: Likewise.
8619         * solib-spu.c: Likewise.
8620         * solib-svr4.c: Likewise.
8621         * solib-target.c: Likewise.
8622         * sparc-tdep.c: Likewise.
8623         * sparc64-tdep.c: Likewise.
8624         * spu-tdep.c: Likewise.
8625         * symfile.c: Likewise.
8626         * symtab.c: Likewise.
8627         * target-descriptions.c: Likewise.
8628         * target-memory.c: Likewise.
8629         * target.c: Likewise.
8630         * target.h: Likewise.
8631         * tracefile-tfile.c: Likewise.
8632         * tracepoint.c: Likewise.
8633         * valops.c: Likewise.
8634         * valprint.c: Likewise.
8635         * value.c: Likewise.
8636         * windows-tdep.c: Likewise.
8637         * mi/mi-main.c: Likewise.
8638
8639 2018-06-07  Tom Tromey  <tom@tromey.com>
8640
8641         * valprint.h (build_address_symbolic): Declare.
8642         * printcmd.c (print_address_symbolic): Update.
8643         (build_address_symbolic): Change "name" and "filename" to
8644         std::string.
8645         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8646         Update.
8647         * defs.h (build_address_symbolic): Remove declaration.
8648
8649 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8650
8651         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8652         (aarch64_vnv_type): Add function.
8653         (aarch64_pseudo_register_name): Add V regs for SVE.
8654         (aarch64_pseudo_register_type): Likewise.
8655         (aarch64_pseudo_register_reggroup_p): Likewise.
8656         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8657         (aarch64_pseudo_read_value): Add V regs for SVE.
8658         (aarch64_pseudo_write_2): Use V0 offset for SVE
8659         (aarch64_pseudo_write): Add V regs for SVE.
8660         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8661
8662 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8663
8664         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8665         (sve_vl_from_vq): Likewise.
8666
8667 2018-06-05  Tom Tromey  <tom@tromey.com>
8668
8669         * cli/cli-cmds.c (show_version): Update.
8670         * top.c (print_gdb_version): Add "interactive" parameter.
8671         Update.
8672         * main.c (captured_main_1): Update.
8673         * top.h (print_gdb_version): Add "interactive" parameter and a
8674         comment.
8675
8676 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8677
8678         * common/enum-flags.h: Add trailing semicolon to example in
8679         comment.
8680
8681 2018-06-05  Tom Tromey  <tom@tromey.com>
8682
8683         PR cli/12326:
8684         * NEWS: Add entry about pager.
8685         * utils.c (pagination_disabled_for_command): New global.
8686         (prompt_for_continue): Allow "c" response to prompt.
8687         (reinitialize_more_filter): Clear
8688         pagination_disabled_for_command.
8689         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8690
8691 2018-06-04  Tom Tromey  <tom@tromey.com>
8692
8693         * ada-lang.h (ada_lookup_symbol_list): Update.
8694         * ada-lang.c (resolve_subexp): Update.
8695         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8696         parameter.
8697         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8698         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8699         results parameter to std::vector.
8700         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8701         Update.
8702         * ada-exp.y (block_lookup): Update.
8703         (select_possible_type_sym): Change type of syms.  Remove nsyms
8704         parameter.
8705         (write_var_or_type, write_name_assoc): Update.
8706
8707 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8708
8709         * windows-nat.c (windows_nat_target::xfer_partial): Return
8710         TARGET_XFER_E_IO if we need to delegate to the target beneath
8711         but BENEATH is NULL.
8712
8713 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8714
8715         * Makefile.in (config.status): Add configure.nat as a
8716         dependency.
8717
8718 2018-06-04  Tom Tromey  <tom@tromey.com>
8719
8720         * cp-name-parser.y (cpname_state): Add method declarations.
8721         (HANDLE_QUAL): Update.
8722         (cpname_state::d_grab, cpname_state::fill_comp)
8723         (cpname_state::make_operator, cpname_state::make_dtor)
8724         (cpname_state::make_builtin_type, cpname_state::make_name)
8725         (cpname_state::d_qualify, cpname_state::d_int_type)
8726         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8727         (%union): Move earlier.
8728
8729 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8730
8731         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8732
8733 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8734
8735         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8736         (aarch64_pseudo_write_1): Likewise.
8737         (aarch64_pseudo_read_value): Use helper.
8738         (aarch64_pseudo_write): Likewise.
8739
8740 2018-06-04  Pedro Alves  <palves@redhat.com>
8741
8742         * darwin-nat.c (darwin_ops): Delete.
8743         (darwin_attach_pid): Use get_native_target.
8744
8745 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8746
8747         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8748         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8749
8750 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8751
8752         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8753         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8754         (aarch64_gdbarch_init): Check for SVE.
8755         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8756
8757 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8758
8759         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8760         * aarch64-tdep.h (aarch64_read_description): Likewise.
8761         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8762         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8763         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8764         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8765         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8766
8767 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8768
8769         * value.c (value_fetch_lazy_bitfield): New.
8770         (value_fetch_lazy_memory): New.
8771         (value_fetch_lazy_register): New.
8772         (value_fetch_lazy): Factor out to smaller functions.
8773
8774 2018-06-01  Tom Tromey  <tom@tromey.com>
8775
8776         * cp-name-parser.y (backslashable, represented): Now const.
8777
8778 2018-06-01  Tom Tromey  <tom@tromey.com>
8779
8780         * cp-name-parser.y: Include parser-defs.h.
8781         (parser_fprintf): Remove declaration.
8782
8783 2018-06-01  Tom Tromey  <tom@tromey.com>
8784
8785         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8786         %parse-param.
8787         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8788         (global_result): Remove globals.
8789         (struct cpname_state): New.
8790         (yyparse): Don't declare.
8791         (yylex, yyerror): Move declarations after %union.
8792         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8793         (make_name): Add state parameter.
8794         Update all callers.
8795         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8796         parameter.
8797         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8798         Update.
8799         (yylex): Add lvalp, state parameters.
8800         (yyerror): Add state parameter.
8801         (cp_demangled_name_to_comp): Update.
8802
8803 2018-06-01  Tom Tromey  <tom@tromey.com>
8804
8805         * cp-name-parser.y (parser_fprintf): Declare.
8806         (GDB_YY_REMAP_PREFIX): Define.
8807         Include yy-remap.h.  Don't redefine yy* identifiers.
8808
8809 2018-06-01  Tom Tromey  <tom@tromey.com>
8810
8811         * python/py-type.c (typy_legacy_template_argument): Update.
8812         * cp-support.h (cp_demangled_name_to_comp): Update.
8813         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8814         parameter to be a "std::string *".
8815         (main): Update.
8816
8817 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8818
8819         * ada-lex.l: Include "diagnostics.h" instead of
8820         "common/diagnostics.h".
8821         * unittests/environ-selftests.c: Likewise.
8822         * common/diagnostics.h: Moved to ../include.
8823
8824 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8825
8826         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8827         to language_mode_manual while calling breakpoint_re_set_one.
8828
8829 2018-06-01  Tom Tromey  <tom@tromey.com>
8830
8831         * valops.c (value_cast_structs, destructor_name_p): Update.
8832         * symtab.c (gdb_mangle_name): Update.
8833         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8834         Update.
8835         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8836         (pascal_object_print_value_fields, pascal_object_print_value):
8837         Update.
8838         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8839         * linespec.c (find_methods): Update.
8840         * gdbtypes.h (type_name_no_tag): Remove.
8841         (type_name_or_error): Rename from type_name_no_tag_or_error.
8842         * gdbtypes.c (type_name_no_tag): Remove.
8843         (type_name_or_error): Rename from type_name_no_tag_or_error.
8844         (lookup_struct_elt_type, check_typedef): Update.
8845         * expprint.c (print_subexp_standard): Update.
8846         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8847         * d-namespace.c (d_lookup_nested_symbol): Update.
8848         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8849         (cp_print_class_member): Update.
8850         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8851         * completer.c (add_struct_fields): Update.
8852         * c-typeprint.c (cp_type_print_derivation_info)
8853         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8854         Update.
8855         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8856         (ada_prefer_type, ada_is_exception_sym): Update.
8857
8858 2018-06-01  Tom Tromey  <tom@tromey.com>
8859
8860         * valops.c (enum_constant_from_type, value_namespace_elt)
8861         (value_maybe_namespace_elt): Update.
8862         * valarith.c (find_size_for_pointer_math): Update.
8863         * target-descriptions.c (make_gdb_type): Update.
8864         * symmisc.c (print_symbol): Update.
8865         * stabsread.c (define_symbol, read_type)
8866         (complain_about_struct_wipeout, add_undefined_type)
8867         (cleanup_undefined_types_1): Update.
8868         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8869         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8870         (rust_internal_print_type, rust_composite_type)
8871         (rust_evaluate_funcall, rust_evaluate_subexp)
8872         (rust_inclusive_range_type_p): Update.
8873         * python/py-type.c (typy_get_tag): Update.
8874         * p-typeprint.c (pascal_type_print_base): Update.
8875         * mdebugread.c (parse_symbol, parse_type): Update.
8876         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8877         Update.
8878         * guile/scm-type.c (gdbscm_type_tag): Update.
8879         * go-lang.c (sixg_string_p): Update.
8880         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8881         Update.
8882         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8883         (TYPE_TAG_NAME): Remove.
8884         * gdbtypes.c (type_name_no_tag): Simplify.
8885         (check_typedef, check_types_equal, recursive_dump_type)
8886         (copy_type_recursive, arch_composite_type): Update.
8887         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8888         in summary mode when needed.
8889         * eval.c (evaluate_funcall): Update.
8890         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8891         (process_structure_scope, read_enumeration_type)
8892         (read_namespace_type, read_module_type, determine_prefix): Update.
8893         * cp-support.c (inspect_type): Update.
8894         * coffread.c (process_coff_symbol, decode_base_type): Update.
8895         * c-varobj.c (c_is_path_expr_parent): Update.
8896         * c-typeprint.c (c_type_print_base_struct_union): Update.
8897         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8898         summary when using C language.
8899         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8900         (gen_maybe_namespace_elt): Update.
8901         * ada-lang.c (ada_type_name): Simplify.
8902         (empty_record, ada_template_to_fixed_record_type_1)
8903         (template_to_static_fixed_type)
8904         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8905
8906 2018-06-01  Tom Tromey  <tom@tromey.com>
8907
8908         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8909         c_print_type.
8910         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8911         (c_print_type): Update.
8912         (c_print_type): New overload.
8913         (c_type_print_varspec_prefix, c_type_print_args)
8914         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8915         (c_type_print_base_struct_union, c_type_print_base_1)
8916         (cp_type_print_method_args): Add "language" parameter.
8917         (c_type_print_base): Update.
8918         * c-lang.h (c_print_type): Add new overload.
8919
8920 2018-06-01  Tom Tromey  <tom@tromey.com>
8921
8922         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8923         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8924
8925 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8926
8927         * aarch64-tdep.c (aarch64_sve_register_names): New const
8928         var.
8929         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8930         (AARCH64_SVE_Z_REGS_NUM): New define.
8931         (AARCH64_SVE_P_REGS_NUM): Likewise.
8932         (AARCH64_SVE_NUM_REGS): Likewise.
8933
8934 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8935
8936         * nat/linux-ptrace.h [__alpha__]
8937         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8938         definitions.
8939
8940 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8941
8942         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8943         the endianness selected.
8944         * NEWS: Document `set endian auto' mode operation update.
8945
8946 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8947
8948         * Makefile.in: Add new header.
8949         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8950         (sve_vl_from_vg): Likewise.
8951         (sve_vq_from_vl): Likewise.
8952         (sve_vl_from_vq): Likewise.
8953         (sve_vq_from_vg): Likewise.
8954         (sve_vg_from_vq): Likewise.
8955         * configure.nat: Add new c file.
8956         * nat/aarch64-sve-linux-ptrace.c: New file.
8957         * nat/aarch64-sve-linux-ptrace.h: New file.
8958
8959 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8960
8961         * aarch64-linux-nat.c (aarch64_linux_read_description):
8962         Add parmeter zero.
8963         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8964         Likewise.
8965         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8966         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8967         (aarch64_gdbarch_init): Add parmeter zero.
8968         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8969         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8970         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8971         parmeter.
8972         * doc/gdb.texinfo: Describe SVE feature
8973         * features/aarch64-sve.c: New file.
8974
8975 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8976
8977         PR gdb/23210
8978         * gdbarch.sh (significant_addr_bit): Default to zero when
8979         not set by target architecture.
8980         * gdbarch.c: Re-generated.
8981         * utils.c (address_significant): Update.
8982
8983 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8984
8985         * stack.c (func_command): Remove trailing newline in call to error.
8986
8987 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8988
8989         * regcache.h (regcache_raw_collect): Remove, update callers to
8990         use regcache::raw_collect.
8991         * regcache.c (regcache_raw_collect): Remove.
8992
8993 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8994
8995         * regcache.h (regcache_raw_supply): Remove, update callers to
8996         use detached_regcache::raw_supply.
8997         * regcache.c (regcache_raw_supply): Remove.
8998
8999 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9000
9001         * regcache.h (regcache_cooked_write_part): Remove, update
9002         callers to use regcache::cooked_write_part.
9003         * regcache.c (regcache_cooked_write_part): Remove.
9004
9005 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9006
9007         * regcache.h (regcache_cooked_read_part): Remove, update callers
9008         to use readable_regcache::cooked_read_part.
9009         * regcache.c (regcache_cooked_read_part): Remove.
9010
9011 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9012
9013         * regcache.h (regcache_cooked_read_value): Remove, update
9014         callers to use readable_regcache::cooked_read_value.
9015         * regcache.c (regcache_cooked_read_value): Remove.
9016
9017 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9018
9019         * regcache.h (regcache_cooked_write): Remove, update callers to
9020         use regcache::cooked_write.
9021         * regcache.c (regcache_cooked_write): Remove.
9022
9023 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9024
9025         * regcache.h (regcache_invalidate): Remove, update callers to
9026         use detached_regcache::invalidate instead.
9027         * regcache.c (regcache_invalidate): Remove.
9028
9029 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9030
9031         * regcache.h (regcache_raw_write_part): Remove, update callers
9032         to use regcache::raw_write_part instead.
9033         * regcache.c (regcache_raw_write_part): Remove.
9034
9035 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9036
9037         * regcache.h (regcache_raw_read_part): Remove, update callers to
9038         use readable_regcache::raw_read_part instead.
9039         * regcache.c (regcache_raw_read_part): Remove.
9040
9041 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9042
9043         * regcache.h (regcache_cooked_read): Remove, update callers to
9044         use readable_regcache::cooked_read instead.
9045         * regcache.c (regcache_cooked_read): Remove.
9046
9047 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9048
9049         * regcache.h (regcache_raw_write): Remove, update callers to use
9050         regcache::raw_write instead.
9051         * regcache.c (regcache_raw_write): Remove.
9052
9053 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9054
9055         * regcache.h (regcache_raw_read): Remove, update callers to use
9056         readable_regcache::raw_read instead.
9057         * regcache.c (regcache_raw_read): Remove.
9058
9059 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9060
9061         * regcache.h (regcache_raw_update): Remove, update callers to
9062         use readable_regcache::raw_update instead.
9063         * regcache.c (regcache_raw_update): Remove.
9064
9065 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9066
9067         * regcache.h (regcache_register_status): Remove, update callers
9068         to use reg_buffer::get_register_status directly instead.
9069         * regcache.c (regcache_register_status): Remove.
9070
9071 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9072
9073         * regcache.h (regcache_get_ptid): Remove, update all callers to
9074         call regcache::ptid instead.
9075         * regcache.c (regcache_get_ptid): Remove.
9076
9077 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9078
9079         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9080
9081 2018-05-30  Pedro Alves  <palves@redhat.com>
9082
9083         * common/common-exceptions.h (exception_rethrow): Use
9084         ATTRIBUTE_NORETURN.
9085
9086 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
9087
9088         * breakpoint.c (print_solib_event, check_status_catch_solib):
9089         Remove struct keyword in range-based for loops.
9090         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9091         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9092         Likewise.
9093         * linespec.c (find_superclass_methods, search_minsyms_for_name):
9094         Likewise.
9095         * symfile.c (addr_info_make_relative): Likewise.
9096         * thread.c (value_in_thread_stack_temporaries): Likewise.
9097
9098 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
9099
9100         PR gdb/16841
9101         * valops.c (value_struct_elt_for_reference): Call check_typedef on
9102         aggregate type to get its real type before accessing it.
9103
9104 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
9105
9106         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9107         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9108         * coff-pe-read.c (add_pe_forwarded_sym): Replace
9109         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9110         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9111         * jit.c (jit_breakpoint_re_set_internal): Likewise.
9112         * printcmd.c (info_address_command): Likewise.
9113
9114 2018-05-29  Tom Tromey  <tom@tromey.com>
9115
9116         * windows-nat.c (handle_exception): Update fall-through comment.
9117
9118 2018-05-29  Tom Tromey  <tom@tromey.com>
9119
9120         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
9121         (struct program_space) <added_solibs>: Now a std::vector.
9122         * breakpoint.c (print_solib_event): Update.
9123         (check_status_catch_solib): Update.
9124         * progspace.c (clear_program_space_solib_cache): Update.
9125         * solib.c (update_solib_list): Update.
9126
9127 2018-05-29  Tom Tromey  <tom@tromey.com>
9128
9129         * python/py-type.c (typy_richcompare): Update.
9130         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9131         * gdbtypes.h (types_deeply_equal): Return bool.
9132         (types_equal): Likewise.
9133         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
9134         declare VEC.
9135         (check_types_equal): Change worklist to std::vector.  Return
9136         bool.
9137         (struct type_equality_entry): Add constructor.
9138         (compare_maybe_null_strings): Return bool.
9139         (check_types_worklist): Return bool.  Change worklist to
9140         std::vector.
9141         (types_deeply_equal): Use std::vector.
9142         (types_equal): Return bool.
9143         (compare_maybe_null_strings): Simplify.
9144
9145 2018-05-29  Tom Tromey  <tom@tromey.com>
9146
9147         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
9148
9149 2018-05-29  Tom Tromey  <tom@tromey.com>
9150
9151         * objc-lang.h: Don't include cp-support.h.
9152         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
9153         declare VEC.
9154
9155 2018-05-27  Tom Tromey  <tom@tromey.com>
9156
9157         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9158
9159 2018-05-25  Tom Tromey  <tom@tromey.com>
9160
9161         * value.c (value::location): Initialize.
9162
9163 2018-05-25  Tom Tromey  <tom@tromey.com>
9164
9165         * dbxread.c (init_bincl_list): Remove.
9166         (bincl_list): Now a std::vector.
9167         (bincls_allocated, next_bincl): Remove.
9168         (free_bincl_list, do_free_bincl_list_cleanup)
9169         (make_cleanup_free_bincl_list): Remove.
9170         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9171         unique_xmalloc_ptr.
9172         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9173         (struct header_file_location): Add constructor.
9174         (add_bincl_to_list): Remove.
9175
9176 2018-05-25  Tom Tromey  <tom@tromey.com>
9177
9178         * tui/tui.c (tui_enable): Update.
9179         * mi/mi-interp.c (mi_interp::init): Update.
9180         * interps.h (class interp) <name>: New method.
9181         <m_name>: Rename from name.
9182         (~scoped_restore_interp): Update.
9183         * interps.c (interp::interp): Update.
9184         (interp_add, interp_set, interp_lookup_existing)
9185         (current_interp_named_p): Update.
9186
9187 2018-05-25  Tom Tromey  <tom@tromey.com>
9188
9189         * interps.c (interp_name): Remove.
9190         * mi/mi-interp.c (mi_interp::init): Update.
9191         * interps.h (interp_name): Remove.
9192         (~scoped_restore_interp): Update.
9193         * tui/tui.c (tui_enable): Update.
9194
9195 2018-05-25  Tom Tromey  <tom@tromey.com>
9196
9197         * utils.c (fputs_maybe_filtered): Update.
9198         * linespec.c (decode_line_full): Update.
9199         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9200         (mi_print_breakpoint_for_event, mi_solib_loaded)
9201         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9202         (mi_user_selected_context_changed): Update.
9203         * mi/mi-main.c (mi_execute_command): Update.
9204         * cli/cli-script.c (execute_control_command): Update.
9205         * python/python.c (execute_gdb_command): Update.
9206         * solib.c (info_sharedlibrary_command): Update.
9207         * interps.c (interp_ui_out): Remove.
9208         * interps.h (interp_ui_out): Remove.
9209
9210 2018-05-25  Tom Tromey  <tom@tromey.com>
9211
9212         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9213         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9214         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9215
9216 2018-05-25  Tom Tromey  <tom@tromey.com>
9217
9218         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9219         * interps.c (interp_exec): Use scoped_restore.
9220
9221 2018-05-25  Tom Tromey  <tom@tromey.com>
9222
9223         * remote.c (remote_target::remote_file_get): Use
9224         gdb::byte_vector.
9225         (remote_target::remote_file_put): Likewise.
9226
9227 2018-05-25  Tom Tromey  <tom@tromey.com>
9228
9229         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9230         a std::string.
9231         (get_pe_section_index, add_pe_exported_sym): Update.
9232         (read_pe_exported_syms): Use gdb::def_vector.
9233
9234 2018-05-25  Tom Tromey  <tom@tromey.com>
9235
9236         * frame.c (remove_prev_frame): Remove.
9237         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9238
9239 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
9240
9241         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9242         Remove prototypes.
9243         * mips-linux-nat.c (supply_fpregset): Always call
9244         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9245         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9246         `mips_fill_fpregset'.
9247         * mips-linux-tdep.c (mips_supply_fpregset)
9248         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9249         (mips_fill_fpregset_wrapper): Remove functions.
9250         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9251         (mips_linux_fpregset): Remove variable.
9252         (mips_linux_iterate_over_regset_sections): Use
9253         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9254         (mips_linux_o32_sigframe_init): Remove comment.
9255
9256 2018-05-25  Pedro Alves  <palves@redhat.com>
9257
9258         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9259         (struct readahead_cache, struct packet_reg, struct
9260         remote_arch_state, class remote_state): Move higher up in the
9261         file.
9262         (remote_target::m_remote_state): Now an object instead of a pointer.
9263         (remote_target::get_remote_state): Adjust.
9264
9265 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9266
9267         * stack.c (select_and_print_frame): Delete.
9268         (struct function_bounds): Move struct within function.
9269         (func_command): Most content moved into new function
9270         find_frame_for_function, use new function, print result, add
9271         function comment.
9272         (find_frame_for_function): New function, now returns a result.
9273
9274 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9275
9276         * stack.c (iterate_over_block_arg_vars): Fix comment.
9277         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9278
9279 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9280
9281         PR gdb/23203
9282         * frame.c
9283         (scoped_restore_selected_frame::scoped_restore_selected_frame):
9284         Define.
9285         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9286         Define.
9287         * frame.h (class scoped_restore_selected_frame): New class.
9288         * stack.c (print_frame_local_vars): Remove catching and rethrowing
9289         of any exception, use scoped_restore_selected_frame to restore the
9290         frame instead.
9291
9292 2018-05-24  Pedro Alves  <palves@redhat.com>
9293
9294         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9295         override.
9296
9297 2018-05-23  Tom Tromey  <tom@tromey.com>
9298
9299         * complaints.c (struct complaints): Remove.
9300         (symfile_complaint_book): Remove.
9301         (series): New global.
9302         (complaint_internal): Update.
9303         (clear_complaints): Update.
9304
9305 2018-05-23  Tom Tromey  <tom@tromey.com>
9306
9307         * complaints.c (counters): New global.
9308         (struct complain): Remove.
9309         (struct complaints) <root>: Remove.
9310         (complaint_sentinel): Remove.
9311         (symfile_complaint_book): Update.
9312         (find_complaint) Remove.
9313         (complaint_internal, clear_complaints): Update.
9314
9315 2018-05-23  Tom Tromey  <tom@tromey.com>
9316
9317         * complaints.c (struct complain) <file, line>: Remove.
9318         (find_complaint): Remove file, line parameters.
9319         (complaint_internal): Update.
9320
9321 2018-05-23  Tom Tromey  <tom@tromey.com>
9322
9323         * complaints.c (vcomplaint): Remove.
9324         (complaint_internal) Merge in contents of vcomplaint.
9325
9326 2018-05-23  Tom Tromey  <tom@tromey.com>
9327
9328         * complaints.c (struct complaints) <explanation>: Remove.
9329         (symfile_explanations): Remove.
9330         (symfile_complaint_book): Update.
9331         (vcomplaint): Update.
9332         (struct explanation): Remove.
9333
9334 2018-05-23  Tom Tromey  <tom@tromey.com>
9335
9336         * complaints.c (symfile_complaints): Remove.
9337         (complaint_internal): Remove "complaints" parameter.
9338         (clear_complaints, vcomplaint): Remove "c" parameter.
9339         (get_complaints): Remove.
9340         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9341         (dwarf2_debug_line_missing_file_complaint)
9342         (dwarf2_debug_line_missing_end_sequence_complaint)
9343         (dwarf2_complex_location_expr_complaint)
9344         (dwarf2_const_value_length_mismatch_complaint)
9345         (dwarf2_section_buffer_overflow_complaint)
9346         (dwarf2_macro_malformed_definition_complaint)
9347         (dwarf2_invalid_attrib_class_complaint)
9348         (create_addrmap_from_index, dw2_symtab_iter_next)
9349         (dw2_expand_marked_cus)
9350         (dw2_debug_names_iterator::find_vec_in_debug_names)
9351         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9352         (create_debug_type_hash_table, init_cutu_and_read_dies)
9353         (partial_die_parent_scope, add_partial_enumeration)
9354         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9355         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9356         (read_import_statement, read_file_scope, create_dwo_cu_reader)
9357         (create_cus_hash_table, create_dwp_hash_table)
9358         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9359         (dwarf2_rnglists_process, dwarf2_ranges_process)
9360         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9361         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9362         (handle_struct_member_die, process_structure_scope)
9363         (read_array_type, read_common_block, read_module_type)
9364         (read_tag_pointer_type, read_typedef, read_base_type)
9365         (read_subrange_type, load_partial_dies, partial_die_info::read)
9366         (partial_die_info::read, partial_die_info::read)
9367         (partial_die_info::read, read_checked_initial_length_and_offset)
9368         (dwarf2_string_attr, read_formatted_entries)
9369         (dwarf_decode_line_header)
9370         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9371         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9372         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9373         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9374         (get_signatured_type, get_DW_AT_signature_type)
9375         (decode_locdesc, file_file_name, consume_improper_spaces)
9376         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9377         (dwarf_decode_macro_bytes, dwarf_decode_macros)
9378         (dwarf2_symbol_mark_computed, set_die_type)
9379         (read_attribute_value): Update.
9380         * stap-probe.c (handle_stap_probe, get_stap_base_address):
9381         Update.
9382         * dbxread.c (unknown_symtype_complaint)
9383         (lbrac_mismatch_complaint, repeated_header_complaint)
9384         (set_namestring, function_outside_compilation_unit_complaint)
9385         (read_dbx_symtab, process_one_symbol): Update.
9386         * gdbtypes.c (stub_noname_complaint): Update.
9387         * windows-nat.c (handle_unload_dll): Update.
9388         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9389         (decode_base_type): Update.
9390         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9391         (eb_complaint, record_include_begin, record_include_end)
9392         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9393         (process_xcoff_symbol, read_symbol)
9394         (function_outside_compilation_unit_complaint)
9395         (scan_xcoff_symtab): Update.
9396         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9397         * buildsym.c (finish_block_internal, make_blockvector)
9398         (end_symtab_get_static_block, augment_type_symtab): Update.
9399         * dtrace-probe.c (dtrace_process_dof)
9400         (dtrace_static_probe_ops::get_probes): Update.
9401         * complaints.h (struct complaint): Don't declare.
9402         (symfile_complaints): Remove.
9403         (complaint_internal): Remove "complaints" parameter.
9404         (complaint): Likewise.
9405         (clear_complaints): Likewise.
9406         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9407         (reread_symbols): Update.
9408         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9409         (dwarf2_frame_cache, decode_frame_entry): Update.
9410         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9411         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9412         (info_selectors_command): Update.
9413         * macrotab.c (macro_include, check_for_redefinition)
9414         (macro_undef): Update.
9415         * objfiles.c (filter_overlapping_sections): Update.
9416         * stabsread.c (invalid_cpp_abbrev_complaint)
9417         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9418         (define_symbol, error_type, read_type, rs6000_builtin_type)
9419         (stabs_method_name_from_physname, read_member_functions)
9420         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9421         (attach_fields_to_type, complain_about_struct_wipeout)
9422         (read_range_type, read_args, common_block_start)
9423         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9424         Update.
9425         * mdebugread.c (index_complaint, unknown_ext_complaint)
9426         (basic_type_complaint, bad_tag_guess_complaint)
9427         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9428         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9429         (parse_procedure, parse_lines)
9430         (function_outside_compilation_unit_complaint)
9431         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9432         (bad_tag_guess_complaint, reg_value_complaint): Update.
9433         * cp-support.c (demangled_name_complaint): Update.
9434         * macroscope.c (sal_macro_scope): Update.
9435         * dwarf-index-write.c (class debug_names): Update.
9436
9437 2018-05-23  Tom Tromey  <tom@tromey.com>
9438
9439         * complaints.c (clear_complaints): Remove "noisy" parameter.
9440         * complaints.h (clear_complaints): Update.
9441         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9442         (reread_symbols): Update.
9443
9444 2018-05-23  Tom Tromey  <tom@tromey.com>
9445
9446         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9447         SUBSEQUENT_MESSAGE.
9448         (vcomplaint, clear_complaints): Update.
9449         (symfile_explanations): Remove some messages.
9450
9451 2018-05-23  Tom Tromey  <tom@tromey.com>
9452
9453         * complaints.c (internal_complaint): Remove.
9454         * complaints.h (internal_complaint): Remove.
9455
9456 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9457
9458         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9459
9460 2018-05-22  Pedro Alves  <palves@redhat.com>
9461
9462         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9463         (remote_fileio_badfd, remote_fileio_return_errno)
9464         (remote_fileio_return_success, remote_fileio_func_open)
9465         (remote_fileio_func_open, remote_fileio_func_close)
9466         (remote_fileio_func_read, remote_fileio_func_write)
9467         (remote_fileio_func_lseek, remote_fileio_func_rename)
9468         (remote_fileio_func_unlink, remote_fileio_func_stat)
9469         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9470         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9471         remote_target parameter.
9472         (remote_fio_func_map) <func>: Add remote_target parameter.
9473         (do_remote_fileio_request, remote_fileio_request):
9474         * remote-fileio.h (remote_fileio_request):
9475         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9476         remote_target parameter.
9477         (remote_notif_process, handle_notification): Adjust to pass down
9478         the remote.
9479         (remote_notif_state_allocate): Add remote_target parameter.  Save
9480         it.
9481         * remote-notif.h (struct remote_target): Forward declare.
9482         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9483         remote_target parameter.
9484         (struct remote_notif_state) <remote>: New field.
9485         (remote_notif_ack, remote_notif_parse): Add remote_target
9486         parameter.
9487         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9488         remote_target parameter.
9489         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9490         (threads_listing_context, rmt_thread_action, protocol_feature)
9491         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9492         (packet_result, struct threads_listing_context, remote_state):
9493         Move definitions and declarations higher up.
9494         (remote_target) <~remote_target>: Declare.
9495         (remote_download_command_source, remote_file_put, remote_file_get)
9496         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9497         (remote_hostio_pread_vFile, remote_hostio_send_command)
9498         (remote_hostio_set_filesystem, remote_hostio_open)
9499         (remote_hostio_close, remote_hostio_unlink, remote_state)
9500         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9501         (get_memory_write_packet_size, get_memory_read_packet_size)
9502         (append_pending_thread_resumptions, remote_detach_1)
9503         (append_resumption, remote_resume_with_vcont)
9504         (add_current_inferior_and_thread, wait_ns, wait_as)
9505         (process_stop_reply, remote_notice_new_inferior)
9506         (process_initial_stop_replies, remote_add_thread)
9507         (btrace_sync_conf, remote_btrace_maybe_reopen)
9508         (remove_new_fork_children, kill_new_fork_children)
9509         (discard_pending_stop_replies, stop_reply_queue_length)
9510         (check_pending_events_prevent_wildcard_vcont)
9511         (discard_pending_stop_replies_in_queue, stop_reply)
9512         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9513         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9514         (remote_interrupt_as, remote_interrupt_ns)
9515         (remote_get_noisy_reply, remote_query_attached)
9516         (remote_add_inferior, remote_current_thread, get_current_thread)
9517         (set_thread, set_general_thread, set_continue_thread)
9518         (set_general_process, write_ptid)
9519         (remote_unpack_thread_info_response, remote_get_threadinfo)
9520         (parse_threadlist_response, remote_get_threadlist)
9521         (remote_threadlist_iterator, remote_get_threads_with_ql)
9522         (remote_get_threads_with_qxfer)
9523         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9524         (get_offsets, remote_check_symbols, remote_supported_packet)
9525         (remote_query_supported, remote_packet_size)
9526         (remote_serial_quit_handler, remote_detach_pid)
9527         (remote_vcont_probe, remote_resume_with_hc)
9528         (send_interrupt_sequence, interrupt_query)
9529         (remote_notif_get_pending_events, fetch_register_using_p)
9530         (send_g_packet, process_g_packet, fetch_registers_using_g)
9531         (store_register_using_P, store_registers_using_G)
9532         (set_remote_traceframe, check_binary_download)
9533         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9534         (remote_xfer_live_readonly_partial, remote_read_bytes)
9535         (remote_send_printf, remote_flash_write, readchar)
9536         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9537         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9538         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9539         (extended_remote_disable_randomization, extended_remote_run)
9540         (send_environment_packet, extended_remote_environment_support)
9541         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9542         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9543         (packet_command): Now methods of ...
9544         (remote_target): ... this class.
9545         (m_remote_state) <remote_target>: New field.
9546         (struct remote_state) <stop_reply_queue,
9547         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9548         fields.
9549         (remote_state::remote_state): Allocate stop_reply_queue.
9550         (remote_state): Delete global.
9551         (get_remote_state_raw): Delete.
9552         (remote_target::get_remote_state): Allocate m_remote_state on
9553         demand.
9554         (get_current_remote_target): New.
9555         (remote_ops, extended_remote_ops): Delete.
9556         (wait_forever_enabled_p, remote_async_inferior_event_token):
9557         Delete, moved to struct remote_state.
9558         (remote_target::close): Delete self.  Destruction bits split to
9559         ...
9560         (remote_target::~remote_target): ... this.
9561         (show_memory_packet_size): Adjust to use
9562         get_current_remote_target.
9563         (struct protocol_feature) <func>: Add remote_target parameter.
9564         All callers adjusted.
9565         (curr_quit_handler_target): New.
9566         (remote_serial_quit_handler): Reimplement.
9567         (remote_target::open_1): Adjust to use get_current_remote_target.
9568         Heap-allocate remote_target/extended_remote_target instances.
9569         (vcont_builder::vcont_builder): Add remote_target parameter, and
9570         save it in m_remote.  All callers adjusted.
9571         (vcont_builder::m_remote): New field.
9572         (vcont_builder::restart, vcont_builder::flush)
9573         (vcont_builder::push_action): Use it.
9574         (remote_target::commit_resume): Use it.
9575         (struct queue_iter_param) <remote>: New field.
9576         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9577         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9578         (check_pending_event_prevents_wildcard_vcont_callback)
9579         (remote_target::check_pending_events_prevent_wildcard_vcont)
9580         (remote_target::discard_pending_stop_replies)
9581         (remote_target::discard_pending_stop_replies_in_queue)
9582         (remote_target::remote_notif_remove_queued_reply): Fill in
9583         'remote' field.
9584         (remote_notif_get_pending_events): New.
9585         (remote_target::readchar, remote_target::remote_serial_write):
9586         Save/restore curr_quit_handler_target.
9587         (putpkt): New.
9588         (kill_new_fork_children): Fill in 'remote' field.
9589         (packet_command): Use get_current_remote_target, defer to
9590         remote_target method of same name.
9591         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9592         parameter, and save it in m_remote.  All callers adjusted.
9593         (scoped_remote_fd::release): Use m_remote.
9594         (scoped_remote_fd::m_remote): New field.
9595         (remote_file_put, remote_file_get, remote_file_delete): Use
9596         get_current_remote_target, defer to remote_target method of same
9597         name.
9598         (remote_btrace_reset): Add remote_state paremeter.  Update all
9599         callers.
9600         (remote_async_inferior_event_handler). Pass down 'data'.
9601         (remote_new_objfile): Use get_current_remote_target.
9602         (remote_target::vcont_r_supported): New.
9603         (set_range_stepping): Use get_current_remote_target and
9604         remote_target::vcont_r_supported.
9605         (_initialize_remote): Don't allocate 'remote_state' and
9606         'stop_reply_queue' globals.
9607         * remote.h (struct remote_target): Forward declare.
9608         (getpkt, putpkt, remote_notif_get_pending_events): Add
9609         'remote_target' parameter.
9610
9611 2018-05-22  Pedro Alves  <palves@redhat.com>
9612
9613         * remote.c (vcont_builder): Now a class.  Make all data members
9614         private.
9615         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9616         Declare methods.
9617         (vcont_builder_restart): Rename to ...
9618         (vcont_builder::restart): ... this.
9619         (vcont_builder_flush): Rename to ...
9620         (vcont_builder::flush): ... this.
9621         (vcont_builder_push_action): Rename to ...
9622         (vcont_builder::push_action): ... this.
9623         (remote_target::commit_resume): Adjust.
9624
9625 2018-05-22  Pedro Alves  <palves@redhat.com>
9626
9627         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9628         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9629         (get_fixed_memory_packet_size): New.
9630         (get_memory_packet_size): Use it.
9631         (set_memory_packet_size): Don't override the config size with
9632         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9633         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9634         Don't refer to get_memory_packet_size if not connected to a remote
9635         target.  Show "(default)" if configured size is 0.
9636
9637 2018-05-22  Pedro Alves  <palves@redhat.com>
9638
9639         * remote.c (remote_target::mourn_inferior): Move
9640         discard_pending_stop_replies call here from ...
9641         (_initialize_remote): ... here.
9642
9643 2018-05-22  Pedro Alves  <palves@redhat.com>
9644
9645         * remote.c (compare_section_command): Remove set_general_process
9646         call.
9647
9648 2018-05-22  Pedro Alves  <palves@redhat.com>
9649
9650         * remote.c (struct packet_reg, struct remote_arch_state):
9651         Move higher up in the file.
9652         (remote_state) <m_arch_states>: Store remote_arch_state values
9653         instead of remote_arch_state pointers.
9654         (remote_state::get_remote_arch_state): Adjust.
9655
9656 2018-05-22  Pedro Alves  <palves@redhat.com>
9657
9658         * remote.c: Include <unordered_map>.
9659         (remote_state): Now a class.
9660         (remote_state) <get_remote_arch_state>: Declare method.
9661         <get_remote_arch_state>: New field.
9662         (remote_arch_state) <remote_arch_state>: Declare ctor.
9663         <regs>: Now a unique_ptr.
9664         (remote_gdbarch_data_handle): Delete.
9665         (get_remote_arch_state): Delete.
9666         (remote_state::get_remote_arch_state): New.
9667         (get_remote_state): Adjust to call remote_state's
9668         get_remote_arch_state method.
9669         (init_remote_state): Delete, bits factored out to ...
9670         (remote_arch_state::remote_arch_state): ... this new method.
9671         (get_remote_packet_size, get_memory_packet_size)
9672         (process_g_packet, remote_target::fetch_registers)
9673         (remote_target::prepare_to_store, store_registers_using_G)
9674         (remote_target::store_registers, remote_target::get_trace_status):
9675         Adjust to call remote_state's method.
9676         (_initialize_remote): Remove reference to
9677         remote_gdbarch_data_handle.
9678
9679 2018-05-22  Pedro Alves  <palves@redhat.com>
9680
9681         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9682         pread>: New method declarations.
9683         (remote_target::open_1): Adjust.
9684         (readahead_cache_invalidate): Rename to ...
9685         (readahead_cache::invalidate): ... this, and adjust to be a class
9686         method.
9687         (readahead_cache_invalidate_fd): Rename to ...
9688         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9689         class method.
9690         (remote_hostio_pwrite): Adjust.
9691         (remote_hostio_pread_from_cache): Rename to ...
9692         (readahead_cache::pread): ... this, and adjust to be a class
9693         method.
9694         (remote_hostio_close): Adjust.
9695
9696 2018-05-22  Pedro Alves  <palves@redhat.com>
9697
9698         * remote.c (remote_hostio_close_cleanup): Delete.
9699         (class scoped_remote_fd): New.
9700         (remote_file_put, remote_file_get): Use it.
9701
9702 2018-05-22  Pedro Alves  <palves@redhat.com>
9703
9704         (struct vCont_action_support): Use bool and initialize all fields.
9705         (struct readahead_cache): Initialize all fields.
9706         (remote_state): Use bool and initialize all fields.
9707         (remote_state::remote_state, remote_state::~remote_state): New.
9708         (new_remote_state): Delete.
9709         (_initialize_remote): Use new to allocate remote_state.
9710
9711 2018-05-22  Pedro Alves  <palves@redhat.com>
9712             張俊芝  <zjz@zjz.name>
9713
9714         PR gdb/22973
9715         * c-exp.y: Include "c-support.h".
9716         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9717         of tolower.  Use c_ident_is_alpha to scan names.
9718         * c-lang.c: Include "c-support.h".
9719         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9720         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9721         * c-support.h: New file, with bits factored out from ...
9722         * cp-name-parser.y: ... this file.
9723         Include "c-support.h".
9724         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9725         c-support.h and renamed.
9726         (symbol_end, yylex): Adjust.
9727
9728 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9729
9730         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9731         parameter type to CORE_ADDR.
9732         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9733         parameter type in declaration to CORE_ADDR.
9734         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9735         target_auxv_search to get AT_HWCAP and use the result to get the
9736         target description.
9737         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9738         to CORE_ADDR. Remove the cast of the return value to unsigned
9739         long. Fix error predicate of target_auxv_search.
9740         (ppc_linux_nat_target::read_description): Change the type of the
9741         hwcap variable to CORE_ADDR.
9742
9743 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9744
9745         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9746         if the size of fpscr is larger than 32 bits.
9747
9748 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9749
9750         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9751         (ppc32_linux_vsxregmap): New global.
9752         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9753         regcache_supply_regset, and regcache_collect_regset.
9754         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9755         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9756         (fetch_vsx_register, store_vsx_register): Remove.
9757         (fetch_vsx_registers): Add regno parameter. Get regset using
9758         ppc_linux_vsxregset. Use regset to supply registers.
9759         (store_vsx_registers): Add regno parameter. Get regset using
9760         ppc_linux_vsxregset. Use regset to collect registers.
9761         (fetch_register): Call fetch_vsx_registers instead of
9762         fetch_vsx_register.
9763         (store_register): Call store_vsx_registers instead of
9764         store_vsx_register.
9765         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9766         new regno parameter.
9767         (store_ppc_registers): Call store_vsx_registers with -1 for the
9768         new regno parameter.
9769         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9770         (ppc_collect_vsxregset): Remove.
9771
9772 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9773
9774         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9775         offset fields.
9776         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9777         for vector register offset fields.
9778         (ppc64_fbsd_reg_offsets): Likewise.
9779         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9780         to vector register offset fields.
9781         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9782         to vector register offset fields.
9783         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9784         vector register offset fields.
9785         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9786         initializers for vector register offset fields.
9787         (rs6000_aix64_reg_offsets): Likewise.
9788         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9789         (ppc_supply_vrregset): Remove.
9790         (ppc_collect_vrregset): Remove.
9791         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9792         (ppc_linux_vrregset) : New function.
9793         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9794         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9795         (ppc32_linux_vrregset): Remove.
9796         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9797         and use result instead of ppc32_linux_vrregset.
9798         (ppc32_linux_reg_offsets): Remove initializers for vector register
9799         offset fields.
9800         (ppc64_linux_reg_offsets): Likewise.
9801         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9802         * ppc-linux-nat.c: Include regset.h.
9803         (gdb_vrregset_t): Adjust comment to account for little-endian
9804         mode.
9805         (supply_vrregset, fill_vrregset): Remove.
9806         (fetch_altivec_register, store_altivec_register): Remove.
9807         (fetch_altivec_registers): Add regno parameter. Get regset using
9808         ppc_linux_vrregset. Use regset to supply registers.
9809         (store_altivec_registers): Add regno parameter. Get regset using
9810         ppc_linux_vrregset. Use regset to collect registers.
9811         (fetch_register): Call fetch_altivec_registers instead of
9812         fetch_altivec_register.
9813         (store_register): Call store_altivec_registers instead of
9814         store_altivec_register.
9815         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9816         the new regno parameter.
9817         (store_ppc_registers): Call store_altivec_registers with -1 for
9818         the new regno parameter.
9819
9820 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9821
9822         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9823         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9824         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9825         (gdb_vrregset_t): Change array type size to
9826         PPC_LINUX_SIZEOF_VRREGSET.
9827         (gdb_vsxregset_t): Change array type size to
9828         PPC_LINUX_SIZEOF_VSXREGSET.
9829         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9830         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9831         PPC_LINUX_SIZEOF_VSXREGSET.
9832
9833 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9834
9835         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9836         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9837         nat/ppc-linux.c.
9838         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9839         ppc_linux_target_wordsize with tid.
9840         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9841         wordsize with tid.
9842         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9843         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9844         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9845         tid parameter. Remove static specifier.
9846         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9847         (ppc_linux_target_wordsize): New declaration.
9848
9849 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9850
9851         * arch/ppc-linux-common.c: New file.
9852         * arch/ppc-linux-common.h: New file.
9853         * arch/ppc-linux-tdesc.h: New file.
9854         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9855         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9856         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9857         arch/ppc-linux-tdesc.h.
9858         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9859         arch/ppc-linux-tdesc.h.
9860         (ppc_linux_nat_target::read_description): Remove target
9861         description matching code. Fill a ppc_linux_features struct and
9862         call ppc_linux_match_description with it. Move comment about ISA
9863         2.05 to ppc-linux-common.c.
9864         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9865         arch/ppc-linux-tdesc.h.
9866         (ppc_linux_core_read_description): Remove target description
9867         matching code. Fill a ppc_linux_features struct and call
9868         ppc_linux_match_description with it.
9869         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9870         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9871         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9872         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9873         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9874         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9875         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9876         (tdesc_powerpc_e500l): Remove.
9877
9878 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9879
9880         * ada-lang.c (catch_assert_command): Pass empty string instead
9881         of NULL for excep_string argument.
9882
9883 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9884
9885         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9886         the width of the requested register exceeds the width of the
9887         `ptrace' data type.
9888
9889 2018-05-21  Tom Tromey  <tom@tromey.com>
9890
9891         * printcmd.c (output_command): Remove.
9892         (output_command_const): Rename to output_command.
9893         * valprint.h (output_command): Rename from output_command_const.
9894         * tracepoint.c (trace_dump_actions): Call output_command.
9895
9896 2018-05-21  Tom Tromey  <tom@tromey.com>
9897
9898         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9899         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9900         * ada-lang.h (create_ada_exception_catchpoint): Update.
9901         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9902         std::string.
9903         (create_excep_cond_exprs, ~ada_catchpoint)
9904         (should_stop_exception, print_one_exception)
9905         (print_mention_exception, print_recreate_exception): Update.
9906         (ada_get_next_arg): Remove.
9907         (catch_ada_exception_command_split): Use std::string.  Change type
9908         of "excep_string", "cond_string".
9909         (catch_ada_exception_command): Update.
9910         (create_ada_exception_catchpoint): Change type of excep_string.
9911         (ada_exception_sal): Remove excep_string parameter.
9912         (~ada_catchpoint): Remove.
9913
9914 2018-05-21  Tom Tromey  <tom@tromey.com>
9915
9916         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9917         cleanup.
9918
9919 2018-05-21  Tom Tromey  <tom@tromey.com>
9920
9921         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9922         Return unique_xmalloc_ptr.
9923         (print_it_exception): Update.
9924
9925 2018-05-21  Tom Tromey  <tom@tromey.com>
9926
9927         * tracepoint.c (trace_dump_actions): Use std::string.
9928
9929 2018-05-21  Tom Tromey  <tom@tromey.com>
9930
9931         * symfile.c (reread_symbols): Use std::string for original_name.
9932
9933 2018-05-21  Tom Tromey  <tom@tromey.com>
9934
9935         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9936         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9937         constructor.
9938
9939 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9940
9941         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9942         instance to...
9943         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9944         * objfiles.c (get_objfile_bfd_data): Allocate
9945         objfile_per_bfd_storage with obstack_new when allocating on
9946         obstack.
9947
9948 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9949
9950         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9951         OBSTACK_ZALLOC.
9952         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9953         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9954         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9955         (add_pending): Likewise.
9956         (parse_symbol): Likewise.
9957         (parse_partial_symbols): Likewise.
9958         (psymtab_to_symtab_1): Likewise.
9959         (new_psymtab): Likewise.
9960         (elfmdebug_build_psymtabs): Likewise.
9961         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9962         * objfiles.c (get_objfile_bfd_data): Likewise.
9963         (objfile_register_static_link): Likewise.
9964         * psymtab.c (allocate_psymtab): Likewise.
9965         * stabsread.c (read_member_functions): Likewise.
9966         * xcoffread.c (xcoff_end_psymtab): Likewise.
9967
9968 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9969
9970         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9971         compiler supports std::is_trivially_constructible.
9972         * common/poison.h: Include obstack.h.
9973         (IsMallocable): Define to is_trivially_constructible if the
9974         compiler supports it, define to true_type otherwise.
9975         (xobnew): New.
9976         (XOBNEW): Redefine.
9977         (xobnewvec): New.
9978         (XOBNEWVEC): Redefine.
9979         * gdb_obstack.h (obstack_zalloc): New.
9980         (OBSTACK_ZALLOC): Redefine.
9981         (obstack_calloc): New.
9982         (OBSTACK_CALLOC): Redefine.
9983         (obstack_new): New.
9984         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9985         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9986         gdbarch.c.
9987         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9988         obstack_calloc/obstack_zalloc.
9989         (gdbarch_obstack_zalloc): Remove.
9990         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9991
9992 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9993
9994         * stack.c (backtrace_command_1): Remove useless variable int i.
9995
9996 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9997
9998         * stack.c (print_frame_info): Fix comment.
9999
10000 2018-05-18  Tom Tromey  <tom@tromey.com>
10001
10002         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
10003         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
10004         (~dwarf2_per_objfile): Update
10005         (dwarf2_get_dwz_file): Use new.
10006         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10007         unique_ptr.
10008
10009 2018-05-18  Tom Tromey  <tom@tromey.com>
10010
10011         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10012         unique_ptr.
10013         * dwarf2read.c (struct dwp_file): Add constructor and
10014         initializers.
10015         (open_and_init_dwp_file): Return a unique_ptr.
10016         (dwarf2_per_objfile, create_dwp_hash_table)
10017         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10018         (lookup_dwo_unit_in_dwp): Update.
10019         (open_and_init_dwp_file, get_dwp_file): Update.
10020
10021 2018-05-18  Tom Tromey  <tom@tromey.com>
10022
10023         * dwarf2read.c (dwarf2_per_objfile): Update.
10024         (struct mapped_index): Add initializers.
10025         (dwarf2_read_index): Use new.
10026         (dw2_symtab_iter_init): Update.
10027         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10028         unique_ptr.
10029
10030 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10031
10032         * dwarf2read.c (mapped_index) <total_size>: Remove.
10033
10034 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10035
10036         * unittests/format_pieces-selftests.c (test_format_specifier):
10037         Add ARI comments.
10038
10039 2018-05-18  Tom Tromey  <tom@tromey.com>
10040
10041         * c-typeprint.c (maybe_print_hole): New function.
10042         (c_print_type_struct_field_offset): Update.
10043         (c_type_print_base_struct_union): Call maybe_print_hole.
10044
10045 2018-05-17  Keith Seitz  <keiths@redhat.com>
10046
10047         * breakpoint.c (build_bpstat_chain): New function, moved from
10048         bpstat_stop_status.
10049         (bpstat_stop_status): Add optional parameter, `stop_chain'.
10050         If no stop chain is passed, call build_bpstat_chain to build it.
10051         * breakpoint.h (build_bpstat_chain): Declare.
10052         (bpstat_stop_status): Move documentation here from breakpoint.c.
10053         * infrun.c (handle_signal_stop): Before eliding inlined frames,
10054         build the stop chain and pass it to skip_inline_frames.
10055         Pass this stop chain to bpstat_stop_status.
10056         * inline-frame.c: Include breakpoint.h.
10057         (stopped_by_user_bp_inline_frame): New function.
10058         (skip_inline_frames): Add parameter `stop_chain'.
10059         Move documention to inline-frame.h.
10060         If non-NULL, use stopped_by_user_bp_inline_frame to determine
10061         whether the frame should be elided.
10062         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10063         Add moved documentation and update for new parameter.
10064
10065 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10066
10067         PR cli/14975
10068         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10069         unittests/format_pieces-selftests.c.
10070         * common/format.h (format_piece) <operator==>: New.
10071         (format_pieces) <operator[]>: Remove.
10072         * common/format.c (format_pieces::format_pieces): Handle \e.
10073         * unittests/format_pieces-selftests.c: New.
10074
10075 2018-05-17  Tom Tromey  <tom@tromey.com>
10076
10077         PR symtab/23010:
10078         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10079         (dw2_instantiate_symtab): Add skip_partial parameter.
10080         (dw2_find_last_source_symtab, dw2_map_expand_apply)
10081         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10082         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10083         (dw2_expand_symtabs_matching_one)
10084         (dw2_find_pc_sect_compunit_symtab)
10085         (dw2_debug_names_lookup_symbol)
10086         (dw2_debug_names_expand_symtabs_for_function): Update.
10087         (init_cutu_and_read_dies): Add skip_partial parameter.
10088         (process_psymtab_comp_unit, build_type_psymtabs_1)
10089         (process_skeletonless_type_unit, load_partial_comp_unit)
10090         (psymtab_to_symtab_1): Update.
10091         (load_full_comp_unit): Add skip_partial parameter.
10092         (process_imported_unit_die, dwarf2_read_addr_index)
10093         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10094         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10095         (read_signatured_type): Update.
10096
10097 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10098
10099         * value.c (release_value): Remove unused variable.
10100         (record_latest_value): Likewise.
10101         (access_value_history): Likewise.
10102         (preserve_values): Likewise.
10103
10104 2018-05-17  Tom Tromey  <tom@tromey.com>
10105
10106         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10107         Initialize.
10108
10109 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
10110
10111         PR gdb/22286
10112         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10113         Also handle registers whose width is not a multiple of
10114         PTRACE_TYPE_RET.
10115         (linux_nat_trad_target::store_register): Likewise.
10116
10117 2018-05-16  Tom Tromey  <tom@tromey.com>
10118
10119         * gdbcore.h (core_bfd): Redefine.
10120         * corelow.c (core_target::close): Update.
10121         (core_target_open): Update.
10122         * progspace.h (struct program_space) <cbfd>: Now a
10123         gdb_bfd_ref_ptr.
10124
10125 2018-05-16  Tom Tromey  <tom@tromey.com>
10126
10127         PR cli/19551:
10128         * symfile-add-flags.h (enum symfile_add_flags)
10129         <SYMFILE_NOT_FILENAME>: New constant.
10130         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
10131         objfile name from BFD.
10132         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10133         * minidebug.c (find_separate_debug_file_in_section): Put
10134         ".gnu_debugdata" into BFD's file name.
10135
10136 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
10137
10138         * regcache.c (regcache_read_ftype, regcache_write_ftype):
10139         Remove.
10140
10141 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
10142
10143         PR binutils/21446
10144         * aarch64-tdep.c (aarch64_analyze_prologue,
10145         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10146         Indicate not interested in errors.
10147
10148 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10149
10150         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10151         Supply the MIPS_ZERO_REGNUM register.
10152
10153 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10154
10155         * mips-tdep.c (mask_address_var): Make variable static.
10156
10157 2018-05-14  Tom Tromey  <tom@tromey.com>
10158
10159         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10160
10161 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
10162
10163         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10164         FXSAVE_ADDR for the mxcsr register.
10165
10166 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
10167
10168         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10169
10170 2018-05-11  Pedro Alves  <palves@redhat.com>
10171
10172         * corelow.c (core_target) <core_target>: No longer inline.
10173         Initialize m_core_gdbarch, m_core_vec and build the section table
10174         here.
10175         <~core_target>: New.
10176         <core_gdbarch, get_core_register_section>: New methods.
10177         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10178         factored out from ...
10179         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10180         (core_ops): Delete.
10181         (sniff_core_bfd): Add gdbarch parameter.
10182         (core_close): Delete, merged into ...
10183         (core_target::close): ... here.  Delete self.
10184         (core_close_cleanup): Delete.
10185         (core_target_open): Allocate a core_target on the heap.  Use a
10186         unique_ptr instead of a cleanup.  Bits moved into the core_target
10187         ctor.  Adjust to use core_target methods instead of globals.
10188         (get_core_register_section): Rename to ...
10189         (core_target::get_core_register_section): ... this and adjust.
10190         (struct get_core_registers_cb_data): New.
10191         (get_core_registers_cb): Use it.  Use bool.
10192         (core_target::fetch_registers, core_target::files_info)
10193         (core_target::xfer_partial, core_target::read_description)
10194         (core_target::pid_to, core_target::thread_name): Adjust to
10195         reference class fields instead of globals.
10196         * target.h (struct target_ops_deleter, target_ops_up): New.
10197
10198 2018-05-11  Pedro Alves  <palves@redhat.com>
10199
10200         * corefile.c (core_file_command): Move to corelow.c.
10201         * corelow.c (the_core_target): Delete.
10202         (core_file_command): Moved from corefile.c.  Check exec_bfd
10203         instead of the_core_target.  Use target_detach instead of calling
10204         into the_core_target directly.
10205         (maybe_say_no_core_file_now): New.
10206         (core_target::detach): Use it.
10207         (_initialize_corelow): Remove references to the_core_target.
10208         * gdbcore.h (the_core_target): Delete.
10209
10210 2018-05-11  Tom Tromey  <tromey@redhat.com>
10211             Pedro Alves  <palves@redhat.com>
10212
10213         * corefile.c (core_bfd): Remove.
10214         * gdbcore.h (core_bfd): Now a macro.
10215         * progspace.h (struct program_space) <cbfd>: New field.
10216
10217 2018-05-11  Tom Tromey  <tom@tromey.com>
10218
10219         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10220         gdb::def_vector.
10221
10222 2018-05-10  Tom Tromey  <tom@tromey.com>
10223
10224         * configure: Rebuild.
10225         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10226
10227 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
10228
10229         PR server/23158:
10230         * regformats/regdat.sh: Adjust script, following the addition
10231         of the new expedite_regs parameter to init_target_desc.
10232
10233 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
10234     
10235         PR gdb/23127
10236         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10237         set_gdbarch_significant_addr_bit.
10238         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10239         set_gdbarch_significant_addr_bit.
10240         * utils.c (address_significant): Update to sign extend addr.
10241
10242 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
10243
10244         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10245         (xtensa_linux_init_abi): Limit tdep->num_regs by
10246         tdep->num_nopriv_regs.
10247         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10248         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10249         not initialized.
10250
10251 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
10252
10253         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10254
10255 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
10256
10257         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10258         (I387_MXCSR_INIT_VAL): New constant.
10259         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10260         buffer if it was supplied by the inferior.
10261         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10262         (i387_xsave_get_clear_bv): New function.
10263         (i387_supply_xsave): Only read x87 control registers from the
10264         xsave buffer if the feature is enabled, and the state will have
10265         been written, otherwise, provide a suitable default.
10266         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10267         including x87 control registers.  Update control registers if they
10268         have changed from the default value, and mark features as enabled
10269         as required.
10270         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10271
10272 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10273
10274         * spu-tdep.c (info_spu_event_command): Fix output formatting.
10275
10276 2018-05-07  Tom Tromey  <tom@tromey.com>
10277
10278         * configure: Rebuild.
10279         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10280
10281 2018-05-07  Tom Tromey  <tom@tromey.com>
10282
10283         PR tdep/20362:
10284         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10285         bit.  Use correct value for VDIV.
10286
10287 2018-05-04  Tom Tromey  <tom@tromey.com>
10288
10289         * configure: Rebuild.
10290         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10291
10292 2018-05-04  Tom Tromey  <tom@tromey.com>
10293
10294         * linux-record.c (record_linux_system_call) <case
10295         RECORD_SYS_RECVFROM>: Add "break".
10296
10297 2018-05-04  Tom Tromey  <tom@tromey.com>
10298
10299         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10300         Add missing "break".
10301         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10302         Add missing "break".
10303
10304 2018-05-04  Tom Tromey  <tom@tromey.com>
10305
10306         * rs6000-tdep.c (ppc_process_record_op4)
10307         (ppc_process_record_op63): Add fall-through comment.
10308
10309 2018-05-04  Tom Tromey  <tom@tromey.com>
10310
10311         * i386-tdep.c (i386_process_record): Add fall-through comment.
10312
10313 2018-05-04  Tom Tromey  <tom@tromey.com>
10314
10315         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10316         comment.
10317
10318 2018-05-04  Tom Tromey  <tom@tromey.com>
10319
10320         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10321         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10322         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10323         comment.
10324         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10325         comment.
10326         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10327         comment.
10328
10329 2018-05-04  Tom Tromey  <tom@tromey.com>
10330
10331         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10332
10333 2018-05-04  Tom Tromey  <tom@tromey.com>
10334
10335         * s390-tdep.c (s390_process_record): Fix fall-through comments.
10336         * xcoffread.c (scan_xcoff_symtab): Move comment later.
10337         * symfile.c (section_is_mapped): Fix fall-through comment.
10338         * stabsread.c (define_symbol, read_member_functions): Fix
10339         fall-through comment.
10340         * s390-linux-tdep.c (s390_process_record): Fix fall-through
10341         comment.
10342         * remote.c (remote_wait_as): Fix fall-through comment.
10343         * p-exp.y (yylex): Fix fall-through comment.
10344         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10345         comment.
10346         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10347         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10348         * jv-exp.y (yylex): Fix fall-through comment.
10349         * go-exp.y (lex_one_token): Fix fall-through comment.
10350         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10351         fall-through comment.
10352         * f-exp.y (yylex): Fix fall-through comment.
10353         * dwarf2read.c (process_die): Fix fall-through comments.
10354         * dbxread.c (process_one_symbol): Fix fall-through comment.
10355         * d-exp.y (lex_one_token): Fix fall-through comment.
10356         * cp-name-parser.y (yylex): Fix fall-through comment.
10357         * coffread.c (coff_symtab_read): Fix fall-through comment.
10358         * c-exp.y (lex_one_token): Fix fall-through comment.
10359         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10360         comment.
10361         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10362         comment.
10363
10364 2018-05-04  Tom Tromey  <tom@tromey.com>
10365
10366         PR python/22730:
10367         * NEWS: Mention gdb.execute change.
10368         * gdbcmd.h (execute_control_command): Don't declare.
10369         * python/python.c (execute_gdb_command): Use read_command_lines_1,
10370         execute_control_commands, execute_control_commands_to_string.
10371         * cli/cli-script.h (execute_control_commands)
10372         (execute_control_commands_to_string): Declare.
10373         (execute_control_command): Add from_tty parameter.
10374         * cli/cli-script.c (execute_control_commands)
10375         (execute_control_commands_to_string): New functions.
10376         (execute_user_command): Use execute_control_commands.
10377         (execute_control_command_1): Add "from_tty" parameter.  Update.
10378         (execute_control_command): Likewise.
10379
10380 2018-05-04  Tom Tromey  <tom@tromey.com>
10381
10382         PR python/22731:
10383         * NEWS: Mention that breakpoint commands are writable.
10384         * python/py-breakpoint.c (bppy_set_commands): New function.
10385         (breakpoint_object_getset) <"commands">: Use it.
10386
10387 2018-05-04  Tom Tromey  <tom@tromey.com>
10388
10389         * tracepoint.c (actions_command): Update.
10390         * mi/mi-cmd-break.c (mi_command_line_array)
10391         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10392         (mi_read_next_line): Remove.
10393         (mi_cmd_break_commands): Update.
10394         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10395         function_view.
10396         * cli/cli-script.c (get_command_line): Update.
10397         (process_next_line): Use function_view.  Constify.
10398         (recurse_read_control_structure, read_command_lines)
10399         (read_command_lines_1): Change argument types to function_view.
10400         (do_define_command, document_command): Update.
10401         * breakpoint.h (check_tracepoint_command): Don't declare.
10402         * breakpoint.c (check_tracepoint_command): Remove.
10403         (commands_command_1, create_tracepoint_from_upload): Update.
10404
10405 2018-05-04  Tom Tromey  <tom@tromey.com>
10406
10407         PR gdb/11750:
10408         * cli/cli-script.h (enum command_control_type) <define_control>:
10409         New constant.
10410         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10411         (build_command_line, execute_control_command_1)
10412         (process_next_line): Likewise.
10413         (do_define_command): New function, extracted from define_command.
10414         (define_command): Use it.
10415
10416 2018-05-04  Tom Tromey  <tom@tromey.com>
10417
10418         * tracepoint.c (actions_command): Update.
10419         * cli/cli-script.h (read_command_lines): Update.
10420         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10421         (MAX_TMPBUF): Remove define.
10422         (define_command): Use string_printf.
10423         (document_command): Likewise.
10424         * breakpoint.c (commands_command_1): Update.
10425
10426 2018-05-04  Tom Tromey  <tom@tromey.com>
10427
10428         * top.c (execute_command): Update.
10429         * cli/cli-script.h (print_command_lines): Now varargs.
10430         * cli/cli-script.c (print_command_lines): Now varargs.
10431         (execute_control_command_1) <case while_control, case if_control>:
10432         Update.
10433
10434 2018-05-04  Tom Tromey  <tom@tromey.com>
10435
10436         * tracepoint.c (all_tracepoint_actions): Rename from
10437         all_tracepoint_actions_and_cleanup.  Change return type.
10438         (actions_command, encode_actions_1, encode_actions)
10439         (trace_dump_actions, tdump_command): Update.
10440         * remote.c (remote_download_command_source): Update.
10441         * python/python.c (gdbpy_eval_from_control_command)
10442         (python_command, python_interactive_command): Update.
10443         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10444         * guile/guile.c (guile_command)
10445         (gdbscm_eval_from_control_command, guile_command): Update.
10446         * compile/compile.c (compile_code_command)
10447         (compile_print_command, compile_to_object): Update.
10448         * cli/cli-script.h (struct command_lines_deleter): New.
10449         (counted_command_line): New typedef.
10450         (struct command_line): Add constructor, destructor.
10451         <body_list>: Remove.
10452         <body_list_0, body_list_1>: New members.
10453         (command_line_up): Remove typedef.
10454         (read_command_lines, read_command_lines_1, get_command_line):
10455         Update.
10456         (copy_command_lines): Don't declare.
10457         * cli/cli-script.c (build_command_line): Use "new".
10458         (get_command_line): Return counted_command_line.
10459         (print_command_lines, execute_user_command)
10460         (execute_control_command_1, while_command, if_command): Update.
10461         (realloc_body_list): Remove.
10462         (process_next_line, recurse_read_control_structure): Update.
10463         (read_command_lines, read_command_lines_1): Return counted_command_line.
10464         (free_command_lines): Use "delete".
10465         (copy_command_lines): Remove.
10466         (define_command, document_command, show_user_1): Update.
10467         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10468         a counted_command_line.
10469         * breakpoint.h (counted_command_line): Remove typedef.
10470         (breakpoint_set_commands): Update.
10471         * breakpoint.c (check_no_tracepoint_commands)
10472         (validate_commands_for_breakpoint): Update.
10473         (breakpoint_set_commands): Change commands to be a
10474         counted_command_line.
10475         (commands_command_1, update_dprintf_command_list)
10476         (create_tracepoint_from_upload): Update.
10477
10478 2018-05-04  Tom Tromey  <tom@tromey.com>
10479
10480         * cli/cli-decode.h (cmd_list_element): New constructor.
10481         (~cmd_list_element): New destructor.
10482         (struct cmd_list_element): Add initializers.
10483         * cli/cli-decode.c (do_add_cmd): Use "new".
10484         (delete_cmd): Use "delete".
10485
10486 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10487             Pedro Alves <palves@redhat.com>
10488
10489         PR breakpoints/19806 and support for PR external/20207.
10490         * NEWS: Mention Aarch64 watchpoint improvements.
10491         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10492         watchpoints and PR external/20207 watchpoints.
10493         * nat/aarch64-linux-hw-point.c
10494         (kernel_supports_any_contiguous_range): New.
10495         (aarch64_watchpoint_offset): New.
10496         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10497         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10498         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10499         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10500         next_addr_orig_p.  Support PR external/20207 watchpoints.
10501         (aarch64_downgrade_regs): New.
10502         (aarch64_dr_state_insert_one_point): New parameters offset and
10503         addr_orig.
10504         (aarch64_dr_state_remove_one_point): Likewise.
10505         (aarch64_handle_breakpoint): Update caller.
10506         (aarch64_handle_aligned_watchpoint): Likewise.
10507         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10508         aligned_offset.
10509         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10510         aarch64_downgrade_regs.
10511         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10512         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10513         (DR_CONTROL_MASK): ... this.
10514         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10515         (unsigned int aarch64_watchpoint_offset): New prototype.
10516         (aarch64_linux_set_debug_regs): Remove const from state.
10517         * utils.c (align_up, align_down): Move to ...
10518         * common/common-utils.c (align_up, align_down): ... here.
10519         * utils.h (align_up, align_down): Move to ...
10520         * common/common-utils.h (align_up, align_down): ... here.
10521
10522 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10523
10524         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10525         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10526         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10527         Re-implement to match the ABI as summarized in GCC's
10528         gcc/config/sparc/sparc.c.  All callers updated.
10529         (sparc32_store_arguments): Remove assertion.
10530
10531 2018-05-04  Tom Tromey  <tom@tromey.com>
10532
10533         * printcmd.c: Don't include tui.h.
10534         (decode_format): Use skip_spaces.
10535
10536 2018-05-04  Tom Tromey  <tom@tromey.com>
10537
10538         PR gdb/22619:
10539         * printcmd.c (last_count): New global.
10540         (x_command): Use saved count when repeating.
10541
10542 2018-05-04  Tom Tromey  <tom@tromey.com>
10543
10544         * nto-procfs.c (do_closedir_cleanup): Remove.
10545         (procfs_pidlist): Use gdb_dir_up.
10546         * procfs.c (do_closedir_cleanup): Remove.
10547         (proc_update_threads): Use gdb_dir_up.
10548         * common/filestuff.h (struct gdb_dir_deleter): New.
10549         (gdb_dir_up): New typedef.
10550
10551 2018-05-04  Tom Tromey  <tom@tromey.com>
10552
10553         * ada-lang.c (print_mention_exception): Use std::string.
10554
10555 2018-05-04  Tom Tromey  <tom@tromey.com>
10556
10557         * ada-lang.c (create_excep_cond_exprs): Update.
10558         (ada_exception_catchpoint_cond_string): Use std::string.
10559
10560 2018-05-04  Tom Tromey  <tom@tromey.com>
10561
10562         * ada-lang.c (xget_renaming_scope): Return std::string.
10563         (old_renaming_is_invisible): Update.
10564
10565 2018-05-04  Tom Tromey  <tom@tromey.com>
10566
10567         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10568         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10569
10570 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10571
10572         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10573
10574 2018-05-04  Tom Tromey  <tom@tromey.com>
10575
10576         * remote.c (remote_query_supported_append): Change type.
10577         (remote_check_symbols): Update.
10578
10579 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10580
10581         PR gdb/11420
10582         * configure.ac: Prepend libpython.
10583         * python/python-config.py: Likewise.
10584         * configure: Regenerate.
10585
10586 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10587
10588         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10589
10590 2018-05-03  Pedro Alves  <palves@redhat.com>
10591
10592         * s390-linux-nat.c
10593         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10594         override.  Write 'true' instead of '1'.
10595         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10596         declaration.
10597
10598 2018-05-02  Pedro Alves  <palves@redhat.com>
10599
10600         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10601         add_inf_child_target.
10602         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10603         add_inf_child_target.
10604         * aix-thread.c (aix_thread_target_info): New.
10605         (aix_thread_target) <shortname, longname, doc>: Delete.
10606         <info>: New.
10607         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10608         add_inf_child_target.
10609         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10610         add_inf_child_target.
10611         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10612         add_inf_child_target.
10613         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10614         add_inf_child_target.
10615         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10616         add_inf_child_target.
10617         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10618         add_inf_child_target.
10619         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10620         add_inf_child_target.
10621         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10622         add_inf_child_target.
10623         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10624         add_inf_child_target.
10625         * bfd-target.c (target_bfd_target_info): New.
10626         (target_bfd) <shortname, longname, doc>: Delete.
10627         <info>: New.
10628         * bsd-kvm.c (bsd_kvm_target_info): New.
10629         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10630         <info>: New.
10631         (bsd_kvm_target::open): Rename to ...
10632         (bsd_kvm_target_open): ... this.  Adjust.
10633         * bsd-uthread.c (bsd_uthread_target_info): New.
10634         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10635         <info>: New.
10636         * corefile.c (core_file_command): Adjust.
10637         * corelow.c (core_target_info): New.
10638         (core_target) <shortname, longname, doc>: Delete.
10639         <info>: New.
10640         (core_target::open): Rename to ...
10641         (core_target_open): ... this.  Adjust.
10642         * ctf.c (ctf_target_info): New.
10643         (ctf_target) <shortname, longname, doc>: Delete.
10644         <info>: New.
10645         (ctf_target::open): Rename to ...
10646         (ctf_target_open): ... this.
10647         (_initialize_ctf): Adjust.
10648         * exec.c (exec_target_info): New.
10649         (exec_target) <shortname, longname, doc>: Delete.
10650         <info>: New.
10651         (exec_target::open): Rename to ...
10652         (exec_target_open): ... this.
10653         * gdbcore.h (core_target_open): Declare.
10654         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10655         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10656         add_inf_child_target.
10657         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10658         add_inf_child_target.
10659         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10660         add_inf_child_target.
10661         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10662         add_inf_child_target.
10663         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10664         add_inf_child_target.
10665         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10666         add_inf_child_target.
10667         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10668         add_inf_child_target.
10669         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10670         add_inf_child_target.
10671         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10672         add_inf_child_target.
10673         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10674         add_inf_child_target.
10675         * inf-child.c (inf_child_target_info): New.
10676         (inf_child_target::info): New.
10677         (inf_child_open_target): Remove 'target' parameter.  Use
10678         get_native_target instead.
10679         (inf_child_target::open): Delete.
10680         (add_inf_child_target): New.
10681         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10682         Delete.
10683         <info>: New.
10684         (add_inf_child_target): Declare.
10685         (inf_child_open_target): Declare.
10686         * linux-thread-db.c (thread_db_target_info): New.
10687         (thread_db_target) <shortname, longname, doc>: Delete.
10688         <info>: New.
10689         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10690         add_inf_child_target.
10691         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10692         add_inf_child_target.
10693         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10694         add_inf_child_target.
10695         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10696         add_inf_child_target.
10697         * make-target-delegates (print_class): Adjust.
10698         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10699         add_inf_child_target.
10700         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10701         add_inf_child_target.
10702         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10703         add_inf_child_target.
10704         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10705         add_inf_child_target.
10706         * nto-procfs.c (nto_native_target_info): New.
10707         (nto_procfs_target_native) <shortname, longname, doc>:
10708         Delete.
10709         <info>: New.
10710         (nto_procfs_target_info): New.
10711         (nto_procfs_target_procfs) <shortname, longname, doc>:
10712         Delete.
10713         <info>: New.
10714         (init_procfs_targets): Adjust.
10715         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10716         add_inf_child_target.
10717         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10718         add_inf_child_target.
10719         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10720         add_inf_child_target.
10721         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10722         add_inf_child_target.
10723         * ravenscar-thread.c (ravenscar_target_info): New.
10724         (ravenscar_thread_target) <shortname, longname, doc>:
10725         Delete.
10726         <info>: New.
10727         * record-btrace.c (record_btrace_target_info):
10728         (record_btrace_target) <shortname, longname, doc>: Delete.
10729         <info>: New.
10730         (record_btrace_target::open): Rename to ...
10731         (record_btrace_target_open): ... this.  Adjust.
10732         * record-full.c (record_longname, record_doc): New.
10733         (record_full_base_target) <shortname, longname, doc>: Delete.
10734         <info>: New.
10735         (record_full_target_info): New.
10736         (record_full_target): <shortname>: Delete.
10737         <info>: New.
10738         (record_full_core_open_1, record_full_open_1): Update comments.
10739         (record_full_base_target::open): Rename to ...
10740         (record_full_open): ... this.
10741         (cmd_record_full_restore): Update.
10742         (_initialize_record_full): Update.
10743         * remote-sim.c (remote_sim_target_info): New.
10744         (gdbsim_target) <shortname, longname, doc>: Delete.
10745         <info>: New.
10746         (gdbsim_target::open): Rename to ...
10747         (gdbsim_target_open): ... this.
10748         (_initialize_remote_sim): Adjust.
10749         * remote.c (remote_doc): New.
10750         (remote_target_info): New.
10751         (remote_target) <shortname, longname, doc>: Delete.
10752         <info>: New.
10753         (extended_remote_target_info): New.
10754         (extended_remote_target) <shortname, longname, doc>: Delete.
10755         <info>: New.
10756         (remote_target::open_1): Make static.  Adjust.
10757         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10758         * s390-linux-nat.c (_initialize_s390_nat): Use
10759         add_inf_child_target.
10760         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10761         add_inf_child_target.
10762         * sol-thread.c (thread_db_target_info): New.
10763         (sol_thread_target) <shortname, longname, doc>: Delete.
10764         <info>: New.
10765         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10766         add_inf_child_target.
10767         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10768         add_inf_child_target.
10769         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10770         add_inf_child_target.
10771         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10772         add_inf_child_target.
10773         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10774         add_inf_child_target.
10775         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10776         add_inf_child_target.
10777         * spu-linux-nat.c (_initialize_spu_nat): Use
10778         add_inf_child_target.
10779         * spu-multiarch.c (spu_multiarch_target_info): New.
10780         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10781         <info>: New.
10782         * target-delegates.c: Regenerate.
10783         * target.c: Include <unordered_map>.
10784         (target_ops_p): Delete.
10785         (DEF_VEC_P(target_ops_p)): Delete.
10786         (target_factories): New.
10787         (test_target_info): New.
10788         (test_target_ops::info): New.
10789         (open_target): Adjust to use target_factories.
10790         (add_target_with_completer): Rename to ...
10791         (add_target): ... this.  Change prototype.  Register target_info
10792         and open callback in target_factories.  Register target_info in
10793         command context instead of target_ops.
10794         (add_target): Delete old implementation.
10795         (add_deprecated_target_alias): Change prototype.  Adjust.
10796         (the_native_target): New.
10797         (set_native_target, get_native_target): New.
10798         (find_default_run_target): Use the_native_target.
10799         (find_attach_target, find_run_target): Simplify.
10800         (target_ops::open): Delete.
10801         (dummy_target_info): New.
10802         (dummy_target::shortname, dummy_target::longname)
10803         (dummy_target::doc): Delete.
10804         (dummy_target::info): New.
10805         (debug_target::shortname, debug_target::longname)
10806         (debug_target::doc): Delete.
10807         (debug_target::info): New.
10808         * target.h (struct target_info): New.
10809         (target_ops::~target_ops): Add comment.
10810         (target_ops::info): New.
10811         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10812         longer virtual.  Implement in terms of target_info.
10813         (set_native_target, get_native_target): Declare.
10814         (target_open_ftype): New.
10815         (add_target, add_target_with_completer)
10816         (add_deprecated_target_alias): Change prototype.
10817         (test_target) <shortname, longname, doc>: Delete.
10818         <info>: New.
10819         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10820         add_inf_child_target.
10821         * tracefile-tfile.c (tfile_target_info): New.
10822         (tfile_target) <shortname, longname, doc>: Delete.
10823         <info>: New.
10824         (tfile_target::open): Rename to ...
10825         (tfile_target_open): ... this.
10826         (_initialize_tracefile_tfile): Adjust.
10827         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10828         add_inf_child_target.
10829         * windows-nat.c (_initialize_windows_nat): Use
10830         add_inf_child_target.
10831         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10832         add_inf_child_target.
10833
10834 2018-05-02  Pedro Alves  <palves@redhat.com>
10835
10836         * linux-nat.h (linux_nat_target) <low_new_thread,
10837         low_delete_thread, low_new_fork, low_forget_process,
10838         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10839         New virtual methods.
10840         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10841         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10842         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10843         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10844         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10845         Delete.
10846         * linux-fork.c (delete_fork): Adjust to call low method.
10847         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10848         (linux_nat_new_fork, linux_nat_forget_process_hook)
10849         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10850         (linux_nat_status_is_event):
10851         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10852         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10853         to call low method.
10854         (sigtrap_is_event): Rename to ...
10855         (linux_nat_target::low_status_is_event): ... this.
10856         (linux_nat_set_status_is_event): Delete.
10857         (save_stop_reason, linux_nat_wait_1)
10858         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10859         low methods.
10860         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10861         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10862         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10863         (linux_nat_set_prepare_to_resume): Delete.
10864         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10865         low virtual methods.
10866         * amd64-linux-nat.c: Likewise.
10867         * arm-linux-nat.c: Likewise.
10868         * i386-linux-nat.c: Likewise.
10869         * ia64-linux-nat.c: Likewise.
10870         * mips-linux-nat.c: Likewise.
10871         * ppc-linux-nat.c: Likewise.
10872         * s390-linux-nat.c: Likewise.
10873         * sparc64-linux-nat.c: Likewise.
10874         * x86-linux-nat.c: Likewise.
10875         * x86-linux-nat.h: Include "nat/x86-linux.h".
10876         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10877         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10878         Override methods.
10879
10880 2018-05-02  Pedro Alves  <palves@redhat.com>
10881
10882         * target.h (target_ops)
10883         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10884         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10885         stopped_by_watchpoint, have_continuable_watchpoint,
10886         stopped_data_address, watchpoint_addr_within_range,
10887         can_accel_watchpoint_condition, can_run, thread_alive,
10888         has_all_memory, has_memory, has_stack, has_registers,
10889         has_execution, can_async_p, is_async_p, supports_non_stop,
10890         always_non_stop_p, can_execute_reverse, supports_multi_process,
10891         supports_enable_disable_tracepoint,
10892         supports_disable_randomization, supports_string_tracing,
10893         supports_evaluation_of_breakpoint_conditions,
10894         can_run_breakpoint_commands, filesystem_is_local,
10895         can_download_tracepoint, get_trace_state_variable_value,
10896         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10897         record_is_replaying, record_will_replay,
10898         augmented_libraries_svr4_read>: Adjust to return bool.
10899         * aarch64-linux-nat.c: All implementations adjusted.
10900         * aix-thread.c: All implementations adjusted.
10901         * arm-linux-nat.c: All implementations adjusted.
10902         * breakpoint.c: All implementations adjusted.
10903         * bsd-kvm.c: All implementations adjusted.
10904         * bsd-uthread.c: All implementations adjusted.
10905         * corelow.c: All implementations adjusted.
10906         * ctf.c: All implementations adjusted.
10907         * darwin-nat.c: All implementations adjusted.
10908         * darwin-nat.h: All implementations adjusted.
10909         * exec.c: All implementations adjusted.
10910         * fbsd-nat.c: All implementations adjusted.
10911         * fbsd-nat.h: All implementations adjusted.
10912         * gnu-nat.c: All implementations adjusted.
10913         * gnu-nat.h: All implementations adjusted.
10914         * go32-nat.c: All implementations adjusted.
10915         * ia64-linux-nat.c: All implementations adjusted.
10916         * inf-child.c: All implementations adjusted.
10917         * inf-child.h: All implementations adjusted.
10918         * inf-ptrace.c: All implementations adjusted.
10919         * inf-ptrace.h: All implementations adjusted.
10920         * linux-nat.c: All implementations adjusted.
10921         * linux-nat.h: All implementations adjusted.
10922         * mips-linux-nat.c: All implementations adjusted.
10923         * nto-procfs.c: All implementations adjusted.
10924         * ppc-linux-nat.c: All implementations adjusted.
10925         * procfs.c: All implementations adjusted.
10926         * ravenscar-thread.c: All implementations adjusted.
10927         * record-btrace.c: All implementations adjusted.
10928         * record-full.c: All implementations adjusted.
10929         * remote-sim.c: All implementations adjusted.
10930         * remote.c: All implementations adjusted.
10931         * s390-linux-nat.c: All implementations adjusted.
10932         * sol-thread.c: All implementations adjusted.
10933         * spu-multiarch.c: All implementations adjusted.
10934         * target-delegates.c: All implementations adjusted.
10935         * target.c: All implementations adjusted.
10936         * target.h: All implementations adjusted.
10937         * tracefile-tfile.c: All implementations adjusted.
10938         * tracefile.c: All implementations adjusted.
10939         * tracefile.h: All implementations adjusted.
10940         * windows-nat.c: All implementations adjusted.
10941         * x86-linux-nat.h: All implementations adjusted.
10942         * x86-nat.h: All implementations adjusted.
10943
10944 2018-05-02  Pedro Alves  <palves@redhat.com>
10945
10946         * make-target-delegates (scan_target_h): Don't trim lines here.
10947         Replace sequences of tabs and/or whitespace with a single
10948         whitespace.
10949         (top level, parsing methods): Trim each line before processing it
10950         here.
10951
10952 2018-05-02  Pedro Alves  <palves@redhat.com>
10953             John Baldwin  <jhb@freebsd.org>
10954
10955         * target.h (enum strata) <debug_stratum>: New.
10956         (struct target_ops) <all delegation methods>: Replace by C++
10957         virtual methods, and drop "to_" prefix.  All references updated
10958         throughout.
10959         <to_shortname, to_longname, to_doc, to_data,
10960         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10961         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10962         virtual methods.  All references updated throughout.
10963         <can_attach, supports_terminal_ours, can_create_inferior,
10964         get_thread_control_capabilities, attach_no_wait>: New
10965         virtual methods.
10966         <insert_breakpoint, remove_breakpoint>: Now
10967         TARGET_DEFAULT_NORETURN methods.
10968         <info_proc>: Now returns bool.
10969         <to_magic>: Delete.
10970         (OPS_MAGIC): Delete.
10971         (current_target): Delete.  All references replaced by references
10972         to ...
10973         (target_stack): ... this.  New.
10974         (target_shortname, target_longname): Adjust.
10975         (target_can_run): Now a function declaration.
10976         (default_child_has_all_memory, default_child_has_memory)
10977         (default_child_has_stack, default_child_has_registers)
10978         (default_child_has_execution): Remove target_ops parameter.
10979         (complete_target_initialization): Delete.
10980         (memory_breakpoint_target): New template class.
10981         (test_target_ops): Refactor as a C++ class with virtual methods.
10982         * make-target-delegates (NAME_PART): Tighten.
10983         (POINTER_PART, CP_SYMBOL): New.
10984         (SIMPLE_RETURN_PART): Reimplement.
10985         (VEC_RETURN_PART): Expect less.
10986         (RETURN_PART, VIRTUAL_PART): New.
10987         (METHOD): Adjust to C++ virtual methods.
10988         (scan_target_h): Remove reference to C99.
10989         (dname): Output "target_ops::" prefix.
10990         (write_function_header): Adjust to output a C++ class method.
10991         (write_declaration): New.
10992         (write_delegator): Adjust to output a C++ class method.
10993         (tdname): Output "dummy_target::" prefix.
10994         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10995         method.
10996         (tdefault_names, debug_names): Delete.
10997         (return_types, tdefaults, styles, argtypes_array): New.
10998         (top level): All methods are delegators.
10999         (print_class): New.
11000         (top level): Print dummy_target and debug_target classes.
11001         * target-delegates.c: Regenerate.
11002         * target-debug.h (target_debug_print_enum_info_proc_what)
11003         (target_debug_print_thread_control_capabilities)
11004         (target_debug_print_thread_info_p): New.
11005         * target.c (dummy_target): Delete.
11006         (the_dummy_target, the_debug_target): New.
11007         (target_stack): Now extern.
11008         (set_targetdebug): Push/unpush debug target.
11009         (default_child_has_all_memory, default_child_has_memory)
11010         (default_child_has_stack, default_child_has_registers)
11011         (default_child_has_execution): Remove target_ops parameter.
11012         (complete_target_initialization): Delete.
11013         (add_target_with_completer): No longer call
11014         complete_target_initialization.
11015         (target_supports_terminal_ours): Use regular delegation.
11016         (update_current_target): Delete.
11017         (push_target): No longer check magic number.  Don't call
11018         update_current_target.
11019         (unpush_target): Don't call update_current_target.
11020         (target_is_pushed): No longer check magic number.
11021         (target_require_runnable): Skip for all stratums over
11022         process_stratum.
11023         (target_ops::info_proc): New.
11024         (target_info_proc): Use find_target_at and
11025         find_default_run_target.
11026         (target_supports_disable_randomization): Use regular delegation.
11027         (target_get_osdata): Use find_target_at.
11028         (target_ops::open, target_ops::close, target_ops::can_attach)
11029         (target_ops::attach, target_ops::can_create_inferior)
11030         (target_ops::create_inferior, target_ops::can_run)
11031         (target_can_run): New.
11032         (default_fileio_target): Use regular delegation.
11033         (target_ops::fileio_open, target_ops::fileio_pwrite)
11034         (target_ops::fileio_pread, target_ops::fileio_fstat)
11035         (target_ops::fileio_close, target_ops::fileio_unlink)
11036         (target_ops::fileio_readlink): New.
11037         (target_fileio_open_1, target_fileio_unlink)
11038         (target_fileio_readlink): Always call the target method.  Handle
11039         FILEIO_ENOSYS.
11040         (return_zero, return_zero_has_execution): Delete.
11041         (init_dummy_target): Delete.
11042         (dummy_target::dummy_target, dummy_target::shortname)
11043         (dummy_target::longname, dummy_target::doc)
11044         (debug_target::debug_target, debug_target::shortname)
11045         (debug_target::longname, debug_target::doc): New.
11046         (target_supports_delete_record): Use regular delegation.
11047         (setup_target_debug): Delete.
11048         (maintenance_print_target_stack): Skip debug_stratum.
11049         (initialize_targets): Instantiate the_dummy_target and
11050         the_debug_target.
11051         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
11052         use target_stack.
11053         (target_auxv_search, fprint_target_auxv): Adjust.
11054         (info_auxv_command): Adjust to use target_stack.
11055         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11056         * exceptions.c (print_flush): Handle a NULL target_stack.
11057         * regcache.c (target_ops_no_register): Refactor as class with
11058         virtual methods.
11059
11060         * exec.c (exec_target): New class.
11061         (exec_ops): Now an exec_target.
11062         (exec_open, exec_close_1, exec_get_section_table)
11063         (exec_xfer_partial, exec_files_info, exec_has_memory)
11064         (exec_make_note_section): Refactor as exec_target methods.
11065         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11066         Delete.
11067         (exec_target::find_memory_regions): New.
11068         (_initialize_exec): Don't call init_exec_ops.
11069         * gdbcore.h (exec_file_clear): Delete.
11070
11071         * corefile.c (core_target): Delete.
11072         (core_file_command): Adjust.
11073         * corelow.c (core_target): New class.
11074         (the_core_target): New.
11075         (core_close): Remove target_ops parameter.
11076         (core_close_cleanup): Adjust.
11077         (core_target::close): New.
11078         (core_open, core_detach, get_core_registers, core_files_info)
11079         (core_xfer_partial, core_thread_alive, core_read_description)
11080         (core_pid_to_str, core_thread_name, core_has_memory)
11081         (core_has_stack, core_has_registers, core_info_proc): Rework as
11082         core_target methods.
11083         (ignore, core_remove_breakpoint, init_core_ops): Delete.
11084         (_initialize_corelow): Initialize the_core_target.
11085         * gdbcore.h (core_target): Delete.
11086         (the_core_target): New.
11087
11088         * ctf.c: (ctf_target): New class.
11089         (ctf_ops): Now a ctf_target.
11090         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11091         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11092         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11093         methods.
11094         (init_ctf_ops): Delete.
11095         (_initialize_ctf): Don't call it.
11096         * tracefile-tfile.c (tfile_target): New class.
11097         (tfile_ops): Now a tfile_target.
11098         (tfile_open, tfile_close, tfile_files_info)
11099         (tfile_get_tracepoint_status, tfile_trace_find)
11100         (tfile_fetch_registers, tfile_xfer_partial)
11101         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11102         Refactor as tfile_target methods.
11103         (tfile_xfer_partial_features): Remove target_ops parameter.
11104         (init_tfile_ops): Delete.
11105         (_initialize_tracefile_tfile): Don't call it.
11106         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11107         (tracefile_has_stack, tracefile_has_registers)
11108         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11109         tracefile_target methods.
11110         (init_tracefile_ops): Delete.
11111         (tracefile_target::tracefile_target): New.
11112         * tracefile.h: Include "target.h".
11113         (tracefile_target): New class.
11114         (init_tracefile_ops): Delete.
11115
11116         * spu-multiarch.c (spu_multiarch_target): New class.
11117         (spu_ops): Now a spu_multiarch_target.
11118         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11119         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11120         (spu_search_memory, spu_mourn_inferior): Refactor as
11121         spu_multiarch_target methods.
11122         (init_spu_ops): Delete.
11123         (_initialize_spu_multiarch): Remove references to init_spu_ops,
11124         complete_target_initialization.
11125
11126         * ravenscar-thread.c (ravenscar_thread_target): New class.
11127         (ravenscar_ops): Now a ravenscar_thread_target.
11128         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11129         (ravenscar_thread_alive, ravenscar_pid_to_str)
11130         (ravenscar_fetch_registers, ravenscar_store_registers)
11131         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11132         (ravenscar_stopped_by_hw_breakpoint)
11133         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11134         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11135         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11136         methods.
11137         (init_ravenscar_thread_ops): Delete.
11138         (_initialize_ravenscar): Remove references to
11139         init_ravenscar_thread_ops and complete_target_initialization.
11140
11141         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11142         (bsd_uthread_target): New class.
11143         (bsd_uthread_ops): Now a bsd_uthread_target.
11144         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11145         (bsd_uthread_close, bsd_uthread_mourn_inferior)
11146         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11147         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11148         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11149         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11150         (bsd_uthread_target): Delete function.
11151         (_initialize_bsd_uthread): Remove reference to
11152         complete_target_initialization.
11153
11154         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
11155         (target_bfd): ... this new class.
11156         (target_bfd_xfer_partial, target_bfd_get_section_table)
11157         (target_bfd_close): Refactor as target_bfd methods.
11158         (target_bfd::~target_bfd): New.
11159         (target_bfd_reopen): Adjust.
11160         (target_bfd::close): New.
11161
11162         * record-btrace.c (record_btrace_target): New class.
11163         (record_btrace_ops): Now a record_btrace_target.
11164         (record_btrace_open, record_btrace_stop_recording)
11165         (record_btrace_disconnect, record_btrace_close)
11166         (record_btrace_async, record_btrace_info)
11167         (record_btrace_insn_history, record_btrace_insn_history_range)
11168         (record_btrace_insn_history_from, record_btrace_call_history)
11169         (record_btrace_call_history_range)
11170         (record_btrace_call_history_from, record_btrace_record_method)
11171         (record_btrace_is_replaying, record_btrace_will_replay)
11172         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11173         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11174         (record_btrace_store_registers, record_btrace_prepare_to_store)
11175         (record_btrace_to_get_unwinder)
11176         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11177         (record_btrace_commit_resume, record_btrace_wait)
11178         (record_btrace_stop, record_btrace_can_execute_reverse)
11179         (record_btrace_stopped_by_sw_breakpoint)
11180         (record_btrace_supports_stopped_by_sw_breakpoint)
11181         (record_btrace_stopped_by_hw_breakpoint)
11182         (record_btrace_supports_stopped_by_hw_breakpoint)
11183         (record_btrace_update_thread_list, record_btrace_thread_alive)
11184         (record_btrace_goto_begin, record_btrace_goto_end)
11185         (record_btrace_goto, record_btrace_stop_replaying_all)
11186         (record_btrace_execution_direction)
11187         (record_btrace_prepare_to_generate_core)
11188         (record_btrace_done_generating_core): Refactor as
11189         record_btrace_target methods.
11190         (init_record_btrace_ops): Delete.
11191         (_initialize_record_btrace): Remove reference to
11192         init_record_btrace_ops.
11193         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11194         the execution_direction global.
11195         (record_full_base_target, record_full_target)
11196         (record_full_core_target): New classes.
11197         (record_full_ops): Now a record_full_target.
11198         (record_full_core_ops): Now a record_full_core_target.
11199         (record_full_target::detach, record_full_target::disconnect)
11200         (record_full_core_target::disconnect)
11201         (record_full_target::mourn_inferior, record_full_target::kill):
11202         New.
11203         (record_full_open, record_full_close, record_full_async): Refactor
11204         as methods of the record_full_base_target class.
11205         (record_full_resume, record_full_commit_resume): Refactor
11206         as methods of the record_full_target class.
11207         (record_full_wait, record_full_stopped_by_watchpoint)
11208         (record_full_stopped_data_address)
11209         (record_full_stopped_by_sw_breakpoint)
11210         (record_full_supports_stopped_by_sw_breakpoint)
11211         (record_full_stopped_by_hw_breakpoint)
11212         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11213         methods of the record_full_base_target class.
11214         (record_full_store_registers, record_full_xfer_partial)
11215         (record_full_insert_breakpoint, record_full_remove_breakpoint):
11216         Refactor as methods of the record_full_target class.
11217         (record_full_can_execute_reverse, record_full_get_bookmark)
11218         (record_full_goto_bookmark, record_full_execution_direction)
11219         (record_full_record_method, record_full_info, record_full_delete)
11220         (record_full_is_replaying, record_full_will_replay)
11221         (record_full_goto_begin, record_full_goto_end, record_full_goto)
11222         (record_full_stop_replaying): Refactor as methods of the
11223         record_full_base_target class.
11224         (record_full_core_resume, record_full_core_kill)
11225         (record_full_core_fetch_registers)
11226         (record_full_core_prepare_to_store)
11227         (record_full_core_store_registers, record_full_core_xfer_partial)
11228         (record_full_core_insert_breakpoint)
11229         (record_full_core_remove_breakpoint)
11230         (record_full_core_has_execution): Refactor
11231         as methods of the record_full_core_target class.
11232         (record_full_base_target::supports_delete_record): New.
11233         (init_record_full_ops): Delete.
11234         (init_record_full_core_ops): Delete.
11235         (record_full_save): Refactor as method of the
11236         record_full_base_target class.
11237         (_initialize_record_full): Remove references to
11238         init_record_full_ops and init_record_full_core_ops.
11239
11240         * remote.c (remote_target, extended_remote_target): New classes.
11241         (remote_ops): Now a remote_target.
11242         (extended_remote_ops): Now an extended_remote_target.
11243         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11244         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11245         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11246         (remote_pass_signals, remote_set_syscall_catchpoint)
11247         (remote_program_signals, )
11248         (remote_thread_always_alive): Remove target_ops parameter.
11249         (remote_thread_alive, remote_thread_name)
11250         (remote_update_thread_list, remote_threads_extra_info)
11251         (remote_static_tracepoint_marker_at)
11252         (remote_static_tracepoint_markers_by_strid)
11253         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11254         (remote_open): Refactor as methods of remote_target.
11255         (extended_remote_open, extended_remote_detach)
11256         (extended_remote_attach, extended_remote_post_attach):
11257         (extended_remote_supports_disable_randomization)
11258         (extended_remote_create_inferior): : Refactor as method of
11259         extended_remote_target.
11260         (remote_set_permissions, remote_open_1, remote_detach)
11261         (remote_follow_fork, remote_follow_exec, remote_disconnect)
11262         (remote_resume, remote_commit_resume, remote_stop)
11263         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11264         (remote_terminal_ours, remote_wait, remote_fetch_registers)
11265         (remote_prepare_to_store, remote_store_registers)
11266         (remote_flash_erase, remote_flash_done, remote_files_info)
11267         (remote_kill, remote_mourn, remote_insert_breakpoint)
11268         (remote_remove_breakpoint, remote_insert_watchpoint)
11269         (remote_watchpoint_addr_within_range)
11270         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11271         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11272         (remote_supports_stopped_by_sw_breakpoint)
11273         (remote_stopped_by_hw_breakpoint)
11274         (remote_supports_stopped_by_hw_breakpoint)
11275         (remote_stopped_by_watchpoint, remote_stopped_data_address)
11276         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11277         (remote_verify_memory): Refactor as methods of remote_target.
11278         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11279         parameter.
11280         (remote_xfer_partial, remote_get_memory_xfer_limit)
11281         (remote_search_memory, remote_rcmd, remote_memory_map)
11282         (remote_pid_to_str, remote_get_thread_local_address)
11283         (remote_get_tib_address, remote_read_description): Refactor as
11284         methods of remote_target.
11285         (remote_target::fileio_open, remote_target::fileio_pwrite)
11286         (remote_target::fileio_pread, remote_target::fileio_close): New.
11287         (remote_hostio_readlink, remote_hostio_fstat)
11288         (remote_filesystem_is_local, remote_can_execute_reverse)
11289         (remote_supports_non_stop, remote_supports_disable_randomization)
11290         (remote_supports_multi_process, remote_supports_cond_breakpoints)
11291         (remote_supports_enable_disable_tracepoint)
11292         (remote_supports_string_tracing)
11293         (remote_can_run_breakpoint_commands, remote_trace_init)
11294         (remote_download_tracepoint, remote_can_download_tracepoint)
11295         (remote_download_trace_state_variable, remote_enable_tracepoint)
11296         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11297         (remote_trace_start, remote_get_trace_status)
11298         (remote_get_tracepoint_status, remote_trace_stop)
11299         (remote_trace_find, remote_get_trace_state_variable_value)
11300         (remote_save_trace_data, remote_get_raw_trace_data)
11301         (remote_set_disconnected_tracing, remote_core_of_thread)
11302         (remote_set_circular_trace_buffer, remote_traceframe_info)
11303         (remote_get_min_fast_tracepoint_insn_len)
11304         (remote_set_trace_buffer_size, remote_set_trace_notes)
11305         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11306         (remote_disable_btrace, remote_teardown_btrace)
11307         (remote_read_btrace, remote_btrace_conf)
11308         (remote_augmented_libraries_svr4_read, remote_load)
11309         (remote_pid_to_exec_file, remote_can_do_single_step)
11310         (remote_execution_direction, remote_thread_handle_to_thread_info):
11311         Refactor as methods of remote_target.
11312         (init_remote_ops, init_extended_remote_ops): Delete.
11313         (remote_can_async_p, remote_is_async_p, remote_async)
11314         (remote_thread_events, remote_upload_tracepoints)
11315         (remote_upload_trace_state_variables): Refactor as methods of
11316         remote_target.
11317         (_initialize_remote): Remove references to init_remote_ops and
11318         init_extended_remote_ops.
11319
11320         * remote-sim.c (gdbsim_target): New class.
11321         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11322         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11323         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11324         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11325         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11326         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11327         Refactor as methods of gdbsim_target.
11328         (gdbsim_ops): Now a gdbsim_target.
11329         (init_gdbsim_ops): Delete.
11330         (gdbsim_cntrl_c): Adjust.
11331         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11332
11333         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11334         (the_amd64_linux_nat_target): New.
11335         (amd64_linux_fetch_inferior_registers)
11336         (amd64_linux_store_inferior_registers): Refactor as methods of
11337         amd64_linux_nat_target.
11338         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
11339         * i386-linux-nat.c: Don't include "linux-nat.h".
11340         (i386_linux_nat_target): New class.
11341         (the_i386_linux_nat_target): New.
11342         (i386_linux_fetch_inferior_registers)
11343         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11344         as methods of i386_linux_nat_target.
11345         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
11346         * inf-child.c (inf_child_ops): Delete.
11347         (inf_child_fetch_inferior_registers)
11348         (inf_child_store_inferior_registers): Delete.
11349         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11350         methods of inf_child_target.
11351         (inf_child_target::supports_terminal_ours)
11352         (inf_child_target::terminal_init)
11353         (inf_child_target::terminal_inferior)
11354         (inf_child_target::terminal_ours_for_output)
11355         (inf_child_target::terminal_ours, inf_child_target::interrupt)
11356         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11357         New.
11358         (inf_child_open, inf_child_disconnect, inf_child_close)
11359         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11360         (inf_child_post_startup_inferior, inf_child_can_run)
11361         (inf_child_pid_to_exec_file): Refactor as methods of
11362         inf_child_target.
11363         (inf_child_follow_fork): Delete.
11364         (inf_child_target::can_create_inferior)
11365         (inf_child_target::can_attach): New.
11366         (inf_child_target::has_all_memory, inf_child_target::has_memory)
11367         (inf_child_target::has_stack, inf_child_target::has_registers)
11368         (inf_child_target::has_execution): New.
11369         (inf_child_fileio_open, inf_child_fileio_pwrite)
11370         (inf_child_fileio_pread, inf_child_fileio_fstat)
11371         (inf_child_fileio_close, inf_child_fileio_unlink)
11372         (inf_child_fileio_readlink, inf_child_use_agent)
11373         (inf_child_can_use_agent): Refactor as methods of
11374         inf_child_target.
11375         (return_zero, inf_child_target): Delete.
11376         (inf_child_target::inf_child_target): New.
11377         * inf-child.h: Include "target.h".
11378         (inf_child_target): Delete function prototype.
11379         (inf_child_target): New class.
11380         (inf_child_open_target, inf_child_mourn_inferior)
11381         (inf_child_maybe_unpush_target): Delete.
11382         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11383         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11384         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11385         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11386         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11387         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11388         (inf_ptrace_wait, inf_ptrace_xfer_partial)
11389         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11390         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11391         methods of inf_ptrace_target.
11392         (inf_ptrace_target): Delete function.
11393         * inf-ptrace.h: Include "inf-child.h".
11394         (inf_ptrace_target): Delete function declaration.
11395         (inf_ptrace_target): New class.
11396         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11397         * linux-nat.c (linux_target): New.
11398         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11399         (linux_nat_target::~linux_nat_target): New.
11400         (linux_child_post_attach, linux_child_post_startup_inferior)
11401         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11402         (linux_child_remove_fork_catchpoint)
11403         (linux_child_insert_vfork_catchpoint)
11404         (linux_child_remove_vfork_catchpoint)
11405         (linux_child_insert_exec_catchpoint)
11406         (linux_child_remove_exec_catchpoint)
11407         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11408         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11409         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11410         (linux_nat_stopped_data_address)
11411         (linux_nat_stopped_by_sw_breakpoint)
11412         (linux_nat_supports_stopped_by_sw_breakpoint)
11413         (linux_nat_stopped_by_hw_breakpoint)
11414         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11415         (linux_nat_kill, linux_nat_mourn_inferior)
11416         (linux_nat_xfer_partial, linux_nat_thread_alive)
11417         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11418         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11419         (linux_child_static_tracepoint_markers_by_strid)
11420         (linux_nat_is_async_p, linux_nat_can_async_p)
11421         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11422         (linux_nat_supports_multi_process)
11423         (linux_nat_supports_disable_randomization, linux_nat_async)
11424         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11425         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11426         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11427         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11428         methods of linux_nat_target.
11429         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11430         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11431         parameter.
11432         (check_stopped_by_watchpoint): Adjust.
11433         (linux_xfer_partial): Delete.
11434         (linux_target_install_ops, linux_target, linux_nat_add_target):
11435         Delete.
11436         (linux_nat_target::linux_nat_target): New.
11437         * linux-nat.h: Include "inf-ptrace.h".
11438         (linux_nat_target): New.
11439         (linux_target, linux_target_install_ops, linux_nat_add_target):
11440         Delete function declarations.
11441         (linux_target): Declare global.
11442         * linux-thread-db.c (thread_db_target): New.
11443         (thread_db_target::thread_db_target): New.
11444         (thread_db_ops): Delete.
11445         (the_thread_db_target): New.
11446         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11447         (thread_db_update_thread_list, thread_db_pid_to_str)
11448         (thread_db_extra_thread_info)
11449         (thread_db_thread_handle_to_thread_info)
11450         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11451         (thread_db_resume): Refactor as methods of thread_db_target.
11452         (init_thread_db_ops): Delete.
11453         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11454         * x86-linux-nat.c: Don't include "linux-nat.h".
11455         (super_post_startup_inferior): Delete.
11456         (x86_linux_nat_target::~x86_linux_nat_target): New.
11457         (x86_linux_child_post_startup_inferior)
11458         (x86_linux_read_description, x86_linux_enable_btrace)
11459         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11460         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11461         methods of x86_linux_nat_target.
11462         (x86_linux_create_target): Delete.  Bits folded ...
11463         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11464         pointer.
11465         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11466         (x86_linux_nat_target): New class.
11467         (x86_linux_create_target): Delete.
11468         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11469         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11470         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11471         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11472         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11473         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11474         make extern.
11475         (x86_use_watchpoints): Delete.
11476         * x86-nat.h: Include "breakpoint.h" and "target.h".
11477         (x86_use_watchpoints): Delete.
11478         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11479         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11480         (x86_insert_watchpoint, x86_remove_watchpoint)
11481         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11482         (x86_stopped_by_hw_breakpoint): New declarations.
11483         (x86_nat_target): New template class.
11484
11485         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11486         (the_ppc_linux_nat_target): New.
11487         (ppc_linux_fetch_inferior_registers)
11488         (ppc_linux_can_use_hw_breakpoint)
11489         (ppc_linux_region_ok_for_hw_watchpoint)
11490         (ppc_linux_ranged_break_num_registers)
11491         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11492         (ppc_linux_insert_mask_watchpoint)
11493         (ppc_linux_remove_mask_watchpoint)
11494         (ppc_linux_can_accel_watchpoint_condition)
11495         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11496         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11497         (ppc_linux_watchpoint_addr_within_range)
11498         (ppc_linux_masked_watch_num_registers)
11499         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11500         (ppc_linux_read_description): Refactor as methods of
11501         ppc_linux_nat_target.
11502         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11503
11504         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11505         (procfs_target): New class.
11506         (the_procfs_target): New.
11507         (procfs_target): Delete function.
11508         (procfs_auxv_parse, procfs_attach, procfs_detach)
11509         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11510         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11511         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11512         (procfs_create_inferior, procfs_update_thread_list)
11513         (procfs_thread_alive, procfs_pid_to_str)
11514         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11515         (procfs_stopped_data_address, procfs_insert_watchpoint)
11516         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11517         (proc_find_memory_regions, procfs_info_proc)
11518         (procfs_make_note_section): Refactor as methods of procfs_target.
11519         (_initialize_procfs): Adjust.
11520         * sol-thread.c (sol_thread_target): New class.
11521         (sol_thread_ops): Now a sol_thread_target.
11522         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11523         (sol_thread_fetch_registers, sol_thread_store_registers)
11524         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11525         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11526         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11527         (init_sol_thread_ops): Delete.
11528         (_initialize_sol_thread): Adjust.  Remove references to
11529         init_sol_thread_ops and complete_target_initialization.
11530
11531         * windows-nat.c (windows_nat_target): New class.
11532         (windows_fetch_inferior_registers)
11533         (windows_store_inferior_registers, windows_resume, windows_wait)
11534         (windows_attach, windows_detach, windows_pid_to_exec_file)
11535         (windows_files_info, windows_create_inferior)
11536         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11537         (windows_close, windows_pid_to_str, windows_xfer_partial)
11538         (windows_get_tib_address, windows_get_ada_task_ptid)
11539         (windows_thread_name, windows_thread_alive): Refactor as
11540         windows_nat_target methods.
11541         (do_initial_windows_stuff): Adjust.
11542         (windows_target): Delete function.
11543         (_initialize_windows_nat): Adjust.
11544
11545         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11546         (darwin_mourn_inferior, darwin_kill_inferior)
11547         (darwin_create_inferior, darwin_attach, darwin_detach)
11548         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11549         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11550         (darwin_supports_multi_process): Refactor as darwin_nat_target
11551         methods.
11552         (darwin_resume_to, darwin_files_info): Delete.
11553         (_initialize_darwin_inferior): Rename to ...
11554         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11555         * darwin-nat.h: Include "inf-child.h".
11556         (darwin_nat_target): New class.
11557         (darwin_complete_target): Delete.
11558         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11559         (darwin_target): New.
11560         (i386_darwin_fetch_inferior_registers)
11561         (i386_darwin_store_inferior_registers): Refactor as methods of
11562         darwin_nat_target.
11563         (darwin_complete_target): Delete, with ...
11564         (_initialize_i386_darwin_nat): ... bits factored out here.
11565
11566         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11567         (the_alpha_linux_nat_target): New.
11568         (alpha_linux_register_u_offset): Refactor as
11569         alpha_linux_nat_target method.
11570         (_initialize_alpha_linux_nat): Adjust.
11571         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11572         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11573         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11574         methods of linux_nat_trad_target.
11575         (linux_trad_target): Delete.
11576         * linux-nat-trad.h (linux_trad_target): Delete function.
11577         (linux_nat_trad_target): New class.
11578         * mips-linux-nat.c (mips_linux_nat_target): New class.
11579         (super_fetch_registers, super_store_registers, super_close):
11580         Delete.
11581         (the_mips_linux_nat_target): New.
11582         (mips64_linux_regsets_fetch_registers)
11583         (mips64_linux_regsets_store_registers)
11584         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11585         (mips_linux_register_u_offset, mips_linux_read_description)
11586         (mips_linux_can_use_hw_breakpoint)
11587         (mips_linux_stopped_by_watchpoint)
11588         (mips_linux_stopped_data_address)
11589         (mips_linux_region_ok_for_hw_watchpoint)
11590         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11591         (mips_linux_close): Refactor as methods of mips_linux_nat.
11592         (_initialize_mips_linux_nat): Adjust to C++ification.
11593
11594         * aix-thread.c (aix_thread_target): New class.
11595         (aix_thread_ops): Now an aix_thread_target.
11596         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11597         (aix_thread_fetch_registers, aix_thread_store_registers)
11598         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11599         (aix_thread_thread_alive, aix_thread_pid_to_str)
11600         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11601         Refactor as methods of aix_thread_target.
11602         (init_aix_thread_ops): Delete.
11603         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11604         and complete_target_initialization.
11605         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11606         (rs6000_nat_target): New class.
11607         (the_rs6000_nat_target): New.
11608         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11609         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11610         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11611         (super_create_inferior): Delete.
11612         (_initialize_rs6000_nat): Adjust to C++ification.
11613
11614         * arm-linux-nat.c (arm_linux_nat_target): New class.
11615         (the_arm_linux_nat_target): New.
11616         (arm_linux_fetch_inferior_registers)
11617         (arm_linux_store_inferior_registers, arm_linux_read_description)
11618         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11619         (arm_linux_remove_hw_breakpoint)
11620         (arm_linux_region_ok_for_hw_watchpoint)
11621         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11622         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11623         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11624         arm_linux_nat_target.
11625         (_initialize_arm_linux_nat): Adjust to C++ification.
11626
11627         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11628         (the_aarch64_linux_nat_target): New.
11629         (aarch64_linux_fetch_inferior_registers)
11630         (aarch64_linux_store_inferior_registers)
11631         (aarch64_linux_child_post_startup_inferior)
11632         (aarch64_linux_read_description)
11633         (aarch64_linux_can_use_hw_breakpoint)
11634         (aarch64_linux_insert_hw_breakpoint)
11635         (aarch64_linux_remove_hw_breakpoint)
11636         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11637         (aarch64_linux_region_ok_for_hw_watchpoint)
11638         (aarch64_linux_stopped_data_address)
11639         (aarch64_linux_stopped_by_watchpoint)
11640         (aarch64_linux_watchpoint_addr_within_range)
11641         (aarch64_linux_can_do_single_step): Refactor as methods of
11642         aarch64_linux_nat_target.
11643         (super_post_startup_inferior): Delete.
11644         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11645
11646         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11647         (the_hppa_linux_nat_target): New.
11648         (hppa_linux_fetch_inferior_registers)
11649         (hppa_linux_store_inferior_registers): Refactor as methods of
11650         hppa_linux_nat_target.
11651         (_initialize_hppa_linux_nat): Adjust to C++ification.
11652
11653         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11654         (the_ia64_linux_nat_target): New.
11655         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11656         (ia64_linux_stopped_data_address)
11657         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11658         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11659         ia64_linux_nat_target methods.
11660         (super_xfer_partial): Delete.
11661         (_initialize_ia64_linux_nat): Adjust to C++ification.
11662
11663         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11664         (the_m32r_linux_nat_target): New.
11665         (m32r_linux_fetch_inferior_registers)
11666         (m32r_linux_store_inferior_registers): Refactor as
11667         m32r_linux_nat_target methods.
11668         (_initialize_m32r_linux_nat): Adjust to C++ification.
11669
11670         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11671         (the_m68k_linux_nat_target): New.
11672         (m68k_linux_fetch_inferior_registers)
11673         (m68k_linux_store_inferior_registers): Refactor as
11674         m68k_linux_nat_target methods.
11675         (_initialize_m68k_linux_nat): Adjust to C++ification.
11676
11677         * s390-linux-nat.c (s390_linux_nat_target): New class.
11678         (the_s390_linux_nat_target): New.
11679         (s390_linux_fetch_inferior_registers)
11680         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11681         (s390_insert_watchpoint, s390_remove_watchpoint)
11682         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11683         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11684         (s390_auxv_parse, s390_read_description): Refactor as methods of
11685         s390_linux_nat_target.
11686         (_initialize_s390_nat): Adjust to C++ification.
11687
11688         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11689         (the_sparc_linux_nat_target): New.
11690         (_initialize_sparc_linux_nat): Adjust to C++ification.
11691         * sparc-nat.c (sparc_fetch_inferior_registers)
11692         (sparc_store_inferior_registers): Remove target_ops parameter.
11693         * sparc-nat.h (sparc_fetch_inferior_registers)
11694         (sparc_store_inferior_registers): Remove target_ops parameter.
11695         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11696         (the_sparc64_linux_nat_target): New.
11697         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11698
11699         * spu-linux-nat.c (spu_linux_nat_target): New class.
11700         (the_spu_linux_nat_target): New.
11701         (spu_child_post_startup_inferior, spu_child_post_attach)
11702         (spu_child_wait, spu_fetch_inferior_registers)
11703         (spu_store_inferior_registers, spu_xfer_partial)
11704         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11705         methods.
11706         (_initialize_spu_nat): Adjust to C++ification.
11707
11708         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11709         (the_tilegx_linux_nat_target): New.
11710         (fetch_inferior_registers, store_inferior_registers):
11711         Refactor as methods.
11712         (_initialize_tile_linux_nat): Adjust to C++ification.
11713
11714         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11715         (the_xtensa_linux_nat_target): New.
11716         (xtensa_linux_fetch_inferior_registers)
11717         (xtensa_linux_store_inferior_registers): Refactor as
11718         xtensa_linux_nat_target methods.
11719         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11720
11721         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11722         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11723         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11724         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11725         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11726         (fbsd_stopped_by_sw_breakpoint)
11727         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11728         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11729         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11730         (fbsd_post_startup_inferior, fbsd_post_attach)
11731         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11732         (fbsd_set_syscall_catchpoint)
11733         (super_xfer_partial, super_resume, super_wait)
11734         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11735         (fbsd_handle_debug_trap): Remove target_ops parameter.
11736         (fbsd_nat_add_target): Delete.
11737         * fbsd-nat.h: Include "inf-ptrace.h".
11738         (fbsd_nat_add_target): Delete.
11739         (USE_SIGTRAP_SIGINFO): Define.
11740         (fbsd_nat_target): New class.
11741
11742         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11743         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11744         (amd64bsd_target): Delete.
11745         * amd64-bsd-nat.h: New file.
11746         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11747         "x86-bsd-nat.h".
11748         (amd64_fbsd_nat_target): New class.
11749         (the_amd64_fbsd_nat_target): New.
11750         (amd64fbsd_read_description): Refactor as method of
11751         amd64_fbsd_nat_target.
11752         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11753         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11754         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11755         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11756         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11757         (i386bsd_target): Delete.
11758         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11759         (i386bsd_fetch_inferior_registers)
11760         (i386bsd_store_inferior_registers): Declare.
11761         (i386_bsd_nat_target): New class.
11762         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11763         (the_i386_fbsd_nat_target): New.
11764         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11765         i386_fbsd_nat_target methods.
11766         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11767         (_initialize_i386fbsd_nat): Adjust to C++ification.
11768         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11769         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11770         (_initialize_x86_bsd_nat): Adjust to C++ification.
11771         * x86-bsd-nat.h: Include "x86-nat.h".
11772         (x86bsd_target): Delete declaration.
11773         (x86bsd_nat_target): New class.
11774
11775         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11776         (the_aarch64_fbsd_nat_target): New.
11777         (aarch64_fbsd_fetch_inferior_registers)
11778         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11779         aarch64_fbsd_nat_target.
11780         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11781         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11782         (the_alpha_bsd_nat_target): New.
11783         (alphabsd_fetch_inferior_registers)
11784         (alphabsd_store_inferior_registers): Refactor as
11785         alpha_bsd_nat_target methods.
11786         (_initialize_alphabsd_nat): Refactor as methods of
11787         alpha_bsd_nat_target.
11788         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11789         (the_amd64_nbsd_nat_target): New.
11790         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11791         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11792         (the_amd64_obsd_nat_target): New.
11793         (_initialize_amd64obsd_nat): Adjust to C++ification.
11794         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11795         (the_arm_fbsd_nat_target): New.
11796         (arm_fbsd_fetch_inferior_registers)
11797         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11798         (_initialize_arm_fbsd_nat): Refactor as methods of
11799         arm_fbsd_nat_target.
11800         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11801         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11802         (the_arm_netbsd_nat_target): New.
11803         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11804         arm_netbsd_nat_target.
11805         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11806         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11807         (the_hppa_nbsd_nat_target): New.
11808         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11809         hppa_nbsd_nat_target methods.
11810         (_initialize_hppanbsd_nat): Adjust to C++ification.
11811         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11812         (the_hppa_obsd_nat_target): New.
11813         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11814         methods of hppa_obsd_nat_target.
11815         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11816         add_target.
11817         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11818         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11819         add_target.
11820         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11821         (_initialize_i386obsd_nat): Use add_target.
11822         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11823         (the_m68k_bsd_nat_target): New.
11824         (m68kbsd_fetch_inferior_registers)
11825         (m68kbsd_store_inferior_registers): Refactor as methods of
11826         m68k_bsd_nat_target.
11827         (_initialize_m68kbsd_nat): Adjust to C++ification.
11828         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11829         (the_mips_fbsd_nat_target): New.
11830         (mips_fbsd_fetch_inferior_registers)
11831         (mips_fbsd_store_inferior_registers): Refactor as methods of
11832         mips_fbsd_nat_target.
11833         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11834         add_target.
11835         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11836         (the_mips_nbsd_nat_target): New.
11837         (mipsnbsd_fetch_inferior_registers)
11838         (mipsnbsd_store_inferior_registers): Refactor as methods of
11839         mips_nbsd_nat_target.
11840         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11841         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11842         (the_mips64_obsd_nat_target): New.
11843         (mips64obsd_fetch_inferior_registers)
11844         (mips64obsd_store_inferior_registers): Refactor as methods of
11845         mips64_obsd_nat_target.
11846         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11847         add_target.
11848         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11849         nbsd_nat_target.
11850         * nbsd-nat.h: Include "inf-ptrace.h".
11851         (nbsd_nat_target): New class.
11852         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11853         (obsd_wait): Refactor as methods of obsd_nat_target.
11854         (obsd_add_target): Delete.
11855         * obsd-nat.h: Include "inf-ptrace.h".
11856         (obsd_nat_target): New class.
11857         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11858         (the_ppc_fbsd_nat_target): New.
11859         (ppcfbsd_fetch_inferior_registers)
11860         (ppcfbsd_store_inferior_registers): Refactor as methods of
11861         ppc_fbsd_nat_target.
11862         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11863         add_target.
11864         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11865         (the_ppc_nbsd_nat_target): New.
11866         (ppcnbsd_fetch_inferior_registers)
11867         (ppcnbsd_store_inferior_registers): Refactor as methods of
11868         ppc_nbsd_nat_target.
11869         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11870         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11871         (the_ppc_obsd_nat_target): New.
11872         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11873         methods of ppc_obsd_nat_target.
11874         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11875         add_target.
11876         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11877         (the_sh_nbsd_nat_target): New.
11878         (shnbsd_fetch_inferior_registers)
11879         (shnbsd_store_inferior_registers): Refactor as methods of
11880         sh_nbsd_nat_target.
11881         (_initialize_shnbsd_nat): Adjust to C++ification.
11882         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11883         (inf_ptrace_xfer_partial): Delete.
11884         (sparc_xfer_partial, sparc_target): Delete.
11885         * sparc-nat.h (sparc_fetch_inferior_registers)
11886         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11887         (sparc_target): Delete function declaration.
11888         (sparc_target): New template class.
11889         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11890         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11891         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11892         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11893         add_target.
11894         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11895         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11896         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11897         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11898         add_target.
11899         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11900         (the_vax_bsd_nat_target): New.
11901         (vaxbsd_fetch_inferior_registers)
11902         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11903         methods.
11904         (_initialize_vaxbsd_nat): Adjust to C++ification.
11905
11906         * bsd-kvm.c (bsd_kvm_target): New class.
11907         (bsd_kvm_ops): Now a bsd_kvm_target.
11908         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11909         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11910         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11911         bsd_kvm_target.
11912         (bsd_kvm_return_one): Delete.
11913         (bsd_kvm_add_target): Adjust to C++ification.
11914
11915         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11916         (nto_procfs_target_procfs): New classes.
11917         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11918         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11919         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11920         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11921         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11922         (procfs_remove_hw_breakpoint, procfs_resume)
11923         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11924         (procfs_kill_inferior, procfs_store_registers)
11925         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11926         as methods of nto_procfs_target.
11927         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11928         (nto_native_ops): Delete.
11929         (procfs_open, procfs_native_open): Delete.
11930         (nto_native_ops): Now an nto_procfs_target_native.
11931         (init_procfs_targets): Adjust to C++ification.
11932         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11933         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11934         Refactor as methods of nto_procfs_target.
11935
11936         * go32-nat.c (go32_nat_target): New class.
11937         (the_go32_nat_target): New.
11938         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11939         (go32_store_registers, go32_xfer_partial, go32_files_info)
11940         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11941         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11942         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11943         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11944         (go32_target): Delete.
11945         (_initialize_go32_nat): Adjust to C++ification.
11946
11947         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11948         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11949         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11950         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11951         gnu_nat_target.
11952         (gnu_target): Delete.
11953         * gnu-nat.h (gnu_target): Delete.
11954         (gnu_nat_target): New class.
11955         * i386-gnu-nat.c (gnu_base_target): New.
11956         (i386_gnu_nat_target): New class.
11957         (the_i386_gnu_nat_target): New.
11958         (_initialize_i386gnu_nat): Adjust to C++ification.
11959
11960 2018-05-02  Pedro Alves  <palves@redhat.com>
11961
11962         * bfd-target.c (target_bfd_xclose): Rename to ...
11963         (target_bfd_close): ... this.
11964         (target_bfd_reopen): Adjust.
11965         * target.c (target_close): Remove references to to_xclose.
11966         * target.h (target_ops::to_xclose): Delete.
11967         (target_ops::to_close): Update comments.
11968
11969 2018-05-02  Pedro Alves  <palves@redhat.com>
11970
11971         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11972         "linux-nat.h".
11973         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11974         * inf-ptrace.c (inf_ptrace_register_u_offset)
11975         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11976         (inf_ptrace_store_register, inf_ptrace_store_registers)
11977         (inf_ptrace_trad_target): Move to ...
11978         * linux-nat-trad.c: ... this new file.
11979         * linux-nat-trad.h: New file.
11980         * linux-nat.c (linux_target_install_ops): Make extern.
11981         (linux_trad_target): Delete.
11982         * linux-nat.h (linux_trad_target): Delete declaration.
11983         (linux_target_install_ops): Declare.
11984         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11985         "linux-nat.h".
11986
11987 2018-05-02  Pedro Alves  <palves@redhat.com>
11988
11989         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11990         procfs_target/add_target here.
11991         * procfs.c (procfs_target): Make static.
11992         (_initialize_procfs): Call add_target here.
11993         * procfs.h (struct target_ops): Remove forward declaration.
11994         (procfs_target): Remove declaration.
11995         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11996
11997 2018-05-02  Pedro Alves  <palves@redhat.com>
11998
11999         * procfs.c (procfs_stopped_by_watchpoint)
12000         (procfs_insert_watchpoint, procfs_remove_watchpoint)
12001         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
12002         Forward declare.
12003         (procfs_use_watchpoints): Delete, move contents...
12004         (procfs_target): ... here.
12005         * procfs.h (procfs_use_watchpoints): Delete declaration.
12006         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12007         procfs_use_watchpoints.
12008         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12009         procfs_use_watchpoints.
12010
12011 2018-05-02  Tom Tromey  <tom@tromey.com>
12012
12013         PR python/20084:
12014         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12015         and var_zuinteger_unlimited.
12016         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12017         and PARAM_ZUINTEGER_UNLIMITED.
12018         (set_parameter_value): Handle var_zuinteger and
12019         var_zuinteger_unlimited.
12020         (add_setshow_generic): Likewise.
12021         (parmpy_init): Likewise.
12022
12023 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
12024
12025         PR rust/23124
12026         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
12027         pointer is not null before dereferencing it.
12028
12029 2018-04-30  Tom Tromey  <tom@tromey.com>
12030
12031         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12032         is_mi_like_p.
12033
12034 2018-04-30  Tom Tromey  <tom@tromey.com>
12035
12036         * breakpoint.c (mention): Remove use of is_mi_like_p.
12037         (print_mention_ranged_breakpoint): Likewise.
12038         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12039         of is_mi_like_p.
12040
12041 2018-04-30  Tom Tromey  <tom@tromey.com>
12042
12043         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12044
12045 2018-04-30  Tom Tromey  <tom@tromey.com>
12046
12047         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12048         (info_spu_event_command): Remove some uses of is_mi_like_p.
12049
12050 2018-04-30  Tom Tromey  <tom@tromey.com>
12051
12052         * python/py-framefilter.c (py_print_single_arg)
12053         (enumerate_locals, py_print_args, py_print_frame): Remove some
12054         uses of is_mi_like_p.
12055
12056 2018-04-30  Tom Tromey  <tom@tromey.com>
12057
12058         * ui-out.c: Update.
12059         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12060         * ui-out.h (ui_out::is_mi_like_p): Now const.
12061         (ui_out::do_is_mi_like_p): Now const.
12062         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12063
12064 2018-04-30  Tom Tromey  <tom@tromey.com>
12065
12066         * varobj.c (varobj_set_visualizer): Use new_reference.
12067         * python/python.c (gdbpy_decode_line): Use new_reference.
12068         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12069         new_reference.
12070
12071 2018-04-30  Tom Tromey  <tom@tromey.com>
12072
12073         * varobj.c (install_new_value): Use new_reference.
12074         * value.h (value_incref): Return void.  Swap intro comment with
12075         value_decref.
12076         * value.c (set_value_parent): Use new_reference.
12077         (value_incref): Return void.  Update intro comment.
12078         (release_value): Use new_reference.
12079         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12080
12081 2018-04-30  Tom Tromey  <tom@tromey.com>
12082
12083         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12084         * gdb_bfd.h (new_bfd_ref): Remove.
12085         (gdb_bfd_open): Update comment.
12086         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12087         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12088         (gdb_bfd_fdopenr): Use new_reference.
12089         * exec.c (exec_file_attach): Use new_reference.
12090
12091 2018-04-30  Tom Tromey  <tom@tromey.com>
12092
12093         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12094         method.
12095
12096 2018-04-30  Tom Tromey  <tom@tromey.com>
12097
12098         * jit.c (jit_read_code_entry): Use type_align.
12099         * i386-tdep.c (i386_gdbarch_init): Don't call
12100         set_gdbarch_long_long_align_bit.
12101         * gdbarch.sh: Remove long_long_align_bit.
12102         * gdbarch.c, gdbarch.h: Rebuild.
12103         * arc-tdep.c (arc_type_align): New function.
12104         (arc_gdbarch_init): Use arc_type_align.  Don't call
12105         set_gdbarch_long_long_align_bit.
12106
12107 2018-04-30  Tom Tromey  <tom@tromey.com>
12108
12109         * rust-lang.c (rust_type_alignment): Remove.
12110         (rust_composite_type): Use type_align.
12111
12112 2018-04-30  Tom Tromey  <tom@tromey.com>
12113
12114         * NEWS: Mention Type.align.
12115         * python/py-type.c (typy_get_alignof): New function.
12116         (type_object_getset): Add "alignof".
12117
12118 2018-04-30  Tom Tromey  <tom@tromey.com>
12119
12120         PR exp/17095:
12121         * NEWS: Update.
12122         * std-operator.def (UNOP_ALIGNOF): New operator.
12123         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12124         New.
12125         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12126         * c-lang.c (c_op_print_tab): Add alignof.
12127         * c-exp.y (ALIGNOF): New token.
12128         (exp): Add "ALIGNOF" production.
12129         (ident_tokens): Add _Alignof and alignof.
12130
12131 2018-04-30  Tom Tromey  <tom@tromey.com>
12132
12133         * i386-tdep.c (i386_type_align): New function.
12134         (i386_gdbarch_init): Update.
12135         * gdbarch.sh (type_align): New method.
12136         * gdbarch.c, gdbarch.h: Rebuild.
12137         * arch-utils.h (default_type_align): Declare.
12138         * arch-utils.c (default_type_align): New function.
12139         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12140         (struct type) <align_log2>: New field.
12141         <instance_flags>: Now a bitfield.
12142         (TYPE_RAW_ALIGN): New macro.
12143         (type_align, type_raw_align, set_type_align): Declare.
12144         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12145         functions.
12146         * dwarf2read.c (quirk_rust_enum): Set type alignment.
12147         (get_alignment, maybe_set_alignment): New functions.
12148         (read_structure_type, read_enumeration_type, read_array_type)
12149         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12150         (read_subrange_type, read_base_type): Set type alignment.
12151
12152 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
12153
12154         * dwarf2read.c (read_index_from_section): Use bool.
12155
12156 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
12157
12158         PR gdb/22950
12159         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12160         with #ifdef.
12161
12162 2018-04-29  John Reiser  <jreiser@BitWagon.com>
12163
12164         PR build/22873
12165         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12166         last step, and do it atomically.
12167
12168 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
12169
12170         * compile/compile-c-types.c (convert_int, convert_float):
12171         Update for C FE v1.
12172
12173 2018-04-27  Tom Tromey  <tom@tromey.com>
12174
12175         PR rust/22545:
12176         * rust-lang.c (rust_inclusive_range_type_p): New function.
12177         (rust_range): Handle inclusive ranges.
12178         (rust_compute_range): Likewise.
12179         * rust-exp.y (struct rust_op) <inclusive>: New field.
12180         (DOTDOTEQ): New constant.
12181         (range_expr): Add "..=" productions.
12182         (operator_tokens): Add "..=" token.
12183         (ast_range): Add "inclusive" parameter.
12184         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12185         ranges.
12186         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12187         bounds values.
12188         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12189         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12190         Update comments.
12191         * expprint.c (print_subexp_standard): Handle new bounds values.
12192         (dump_subexp_body_standard): Likewise.
12193
12194 2018-04-27  Tom Tromey  <tom@tromey.com>
12195
12196         * configure: Rebuild.
12197         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12198         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12199         "OVERRIDE".
12200         (class symbol_needs_eval_context): Likewise.
12201         * dwarf2read.c (mock_mapped_index::symbol_name_count)
12202         (mock_mapped_index::symbol_name_at): Use "override".  Remove
12203         "virtual".
12204         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12205         "override".
12206         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12207         * aarch64-tdep.c (instruction_reader::read): Use "override".
12208         (instruction_reader_test::read): Likewise.
12209         * arm-tdep.c (instruction_reader::read): Use "override".
12210         (instruction_reader_thumb::read): Likewise.
12211
12212 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
12213
12214         PR remote/9665
12215         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12216         instead of remote_send.
12217         (remote_send): Remove.
12218
12219 2018-04-26  Pedro Alves  <palves@redhat.com>
12220
12221         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12222         find_function_start_sal instead of find_pc_line.
12223
12224 2018-04-26  Pedro Alves  <palves@redhat.com>
12225
12226         * breakpoint.c (set_breakpoint_location_function): Handle
12227         mst_data_gnu_ifunc.
12228         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12229         * elfread.c (elf_symtab_read): Give data symbols with
12230         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12231         (elf_rel_plt_read): Update comment.
12232         * linespec.c (convert_linespec_to_sals): Handle
12233         mst_data_gnu_ifunc.
12234         (minsym_found): Handle mst_data_gnu_ifunc.
12235         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12236         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12237         * parse.c (find_minsym_type_and_address): Handle
12238         mst_data_gnu_ifunc.
12239         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12240         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12241         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12242         comment.
12243         <mst_data_gnu_ifunc>: New enumerator.
12244
12245 2018-04-26  Pedro Alves  <palves@redhat.com>
12246
12247         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12248         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
12249         'want_trampoline' parameter by a lookup_msym_prefer parameter.
12250         Handle it.
12251         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12252         (lookup_minimal_symbol_by_pc): Adjust.
12253         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12254         (lookup_solib_trampoline_symbol_by_pc): Adjust.
12255         * minsyms.h (lookup_msym_prefer): New enum.
12256         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12257         parameter by a lookup_msym_prefer parameter.
12258
12259 2018-04-26  Pedro Alves  <palves@redhat.com>
12260
12261         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12262         ends in "@plt" instead of looking at the symbol's section.
12263
12264 2018-04-26  Pedro Alves  <palves@redhat.com>
12265
12266         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
12267         all references.
12268         (find_pc_partial_function_gnu_ifunc): Rename to ...
12269         (find_pc_partial_function): ... this, and remove references to
12270         'is_gnu_ifunc_p'.
12271         (find_pc_partial_function): Delete old implementation.
12272         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12273
12274 2018-04-26  Pedro Alves  <palves@redhat.com>
12275
12276         * linespec.c (struct bound_minimal_symbol_search_key): New.
12277         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
12278         skip first line if we found a GNU ifunc minimal symbol by name.
12279         (compare_msymbols): Change parameters to work with a destructured
12280         lhs minsym.
12281         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12282         functions.
12283
12284 2018-04-26  Pedro Alves  <palves@redhat.com>
12285
12286         * breakpoint.c (set_breakpoint_location_function): Don't resolve
12287         ifunc targets here.  Instead, if we have an ifunc minsym, use its
12288         address/name.
12289         (add_location_to_breakpoint): Store the minsym and the objfile in
12290         the breakpoint location.
12291         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12292         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12293         Record the minsym in the sal.
12294         * symtab.h (symtab_and_line) <msymbol>: New field.
12295
12296 2018-04-26  Pedro Alves  <palves@redhat.com>
12297
12298         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12299         unless we actually resolved the ifunc.
12300
12301 2018-04-26  Pedro Alves  <palves@redhat.com>
12302
12303         * c-exp.y (variable production): Prefer ifunc minsyms over
12304         regular function symbols.
12305         * symtab.c (find_gnu_ifunc): New function.
12306         * minsyms.h (lookup_msym_prefer): New enum.
12307         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12308         parameter by a lookup_msym_prefer parameter.
12309         * symtab.h (find_gnu_ifunc): New declaration.
12310
12311 2018-04-26  Pedro Alves  <palves@redhat.com>
12312
12313         * blockframe.c (find_gnu_ifunc_target_type): New function.
12314         (find_function_type): New.
12315         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12316         return a value with a memory address.
12317         (eval_call): For calls to GNU ifunc functions, try to find the
12318         type of the target function from the type that the resolver
12319         returns.
12320         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12321         symbols.
12322         * infcall.c (find_function_return_type): Delete.
12323         (find_function_addr): Add 'function_type' parameter.  For calls to
12324         GNU ifunc functions, try to find the type of the target function
12325         from the type that the resolver returns, and return it via
12326         FUNCTION_TYPE.
12327         (call_function_by_hand_dummy): Adjust to use the function type
12328         returned by find_function_addr.
12329         (find_function_addr): Add 'function_type' parameter and move
12330         description here.
12331         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12332         declarations.
12333
12334 2018-04-26  Pedro Alves  <palves@redhat.com>
12335
12336         * c-exp.y (variable production): Skip finding an alias for ifunc
12337         symbols.
12338
12339 2018-04-26  Pedro Alves  <palves@redhat.com>
12340
12341         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12342
12343 2018-04-25  Pedro Alves  <palves@redhat.com>
12344
12345         * infcmd.c (kill_command): Print the pid as string, not the whole
12346         thread's ptid.  Add comment.  s/has been killed/killed/ in output
12347         message.
12348         * remote.c (remote_detach_1): Print the pid as string, not the
12349         whole thread's ptid.
12350
12351 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
12352             Sergio Durigan Junior  <sergiodj@redhat.com>
12353             Pedro Alves  <palves@redhat.com>
12354
12355         * infcmd.c (kill_command): Print message when inferior has
12356         been killed.
12357         * inferior.c (print_inferior_events): Remove 'static'.  Set as
12358         '1'.
12359         (add_inferior): Improve message printed when
12360         'print_inferior_events' is on.
12361         (exit_inferior): Remove message printed when
12362         'print_inferior_events' is on.
12363         (detach_inferior): Improve message printed when
12364         'print_inferior_events' is on.
12365         (initialize_inferiors): Use 'add_inferior_silent' to set
12366         'current_inferior_'.
12367         * inferior.h (print_inferior_events): Declare here as
12368         'extern'.
12369         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12370         '[Detaching...]' messages when 'print_inferior_events' is on.
12371         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
12372         as prefix/suffix for messages.  Remove periods.  Fix erroneous
12373         'Detaching after fork from child...', replace it by '... from
12374         parent...'.
12375         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12376         prefix/suffix when printing 'Detaching...' messages.  Print
12377         them when 'print_inferior_events' is on.
12378         * remote.c (remote_detach_1): Print message when detaching
12379         from inferior and '!is_fork_parent'.
12380
12381 2018-04-24  Tom Tromey  <tom@tromey.com>
12382
12383         * cli-out.h: Reindent.
12384
12385 2018-04-24  Tom Tromey  <tom@tromey.com>
12386
12387         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12388         (cli_ui_out::do_field_string): Use fputs_filtered.
12389         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12390
12391 2018-04-23  Tom Tromey  <tom@tromey.com>
12392
12393         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12394         gdb::unique_xmalloc_ptr.
12395
12396 2018-04-23  Tom Tromey  <tom@tromey.com>
12397
12398         * configure: Rebuild.
12399
12400 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12401
12402         PR gdb/23095
12403         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12404         prepare_for_testing.  Set normal_bp to r_debug_state if target
12405         is bsd.
12406
12407 2018-04-21  Pedro Alves  <palves@redhat.com>
12408             Rajendra SY  <rajendra.sy@gmail.com>
12409
12410         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12411         * remote.c (extended_remote_attach): In all-stop mode, mark the
12412         thread as executing.
12413
12414 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12415
12416         * thread.c (thread_apply_all_command): Fix comment.
12417         (thread_command): Fix comment.
12418
12419 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12420
12421         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12422         parameter.
12423         * features/aarch64-core.c (create_feature_aarch64_core):
12424         Regenerate.
12425         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12426         Likewise.
12427         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12428         Likewise.
12429         * features/i386/32bit-avx512.c
12430         (create_feature_i386_32bit_avx512): Likewise.
12431         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12432         Likewise.
12433         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12434         Likewise.
12435         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12436         Likewise.
12437         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12438         Likewise.
12439         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12440         Likewise.
12441         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12442         Likewise.
12443         * features/i386/64bit-avx512.c
12444         (create_feature_i386_64bit_avx512): Likewise.
12445         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12446         Likewise.
12447         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12448         Likewise.
12449         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12450         Likewise.
12451         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12452         Likewise.
12453         * features/i386/64bit-segments.c
12454         (create_feature_i386_64bit_segments): Likewise.
12455         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12456         Likewise.
12457         * features/i386/x32-core.c
12458         (create_feature_i386_x32_core): Likewise.
12459         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12460         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12461         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12462         * target-descriptions.c: In generated code, don't pass xml
12463         filename.
12464
12465 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12466
12467         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12468         (print_xml_feature::visit_post): Likewise.
12469         (print_xml_feature::visit): Likewise.
12470         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12471         (print_xml_feature): Add new class.
12472         * regformats/regdat.sh: Null xmltarget on feature targets.
12473         * target-descriptions.c (struct target_desc): Add xmltarget.
12474         (maintenance_check_tdesc_xml_convert): Add unittest function.
12475         (tdesc_get_features_xml): Add function to get xml.
12476         (maintenance_check_xml_descriptions): Test xml generation.
12477         * xml-tdesc.c (string_read_description_xml): Add function.
12478         * xml-tdesc.h (string_read_description_xml): Add declaration.
12479
12480 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12481
12482         * features/Makefile: Add feature marker to targets with new style
12483         target descriptions.
12484         * regformats/aarch64.dat: Regenerate.
12485         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12486         * regformats/i386/amd64-avx-linux.dat: Likewise.
12487         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12488         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12489         * regformats/i386/amd64-linux.dat: Likewise.
12490         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12491         * regformats/i386/amd64.dat: Likewise.
12492         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12493         * regformats/i386/i386-avx-linux.dat: Likewise.
12494         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12495         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12496         * regformats/i386/i386-linux.dat: Likewise.
12497         * regformats/i386/i386-mmx-linux.dat: Likewise.
12498         * regformats/i386/i386-mpx-linux.dat: Likewise.
12499         * regformats/i386/i386.dat: Likewise.
12500         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12501         * regformats/i386/x32-avx-linux.dat: Likewise.
12502         * regformats/i386/x32-linux.dat: Likewise.
12503         * regformats/tic6x-c62x-linux.dat: Likewise.
12504         * regformats/tic6x-c64x-linux.dat: Likewise.
12505         * regformats/tic6x-c64xp-linux.dat: Likewise.
12506         * regformats/regdat.sh: Parse feature marker.
12507
12508 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12509
12510         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12511         (tdesc_osabi_name): Likewise.
12512         * target-descriptions.c (tdesc_architecture_name): Add new
12513         function.
12514         (tdesc_osabi_name): Likewise.
12515
12516 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12517
12518         * common/tdesc.c (tdesc_predefined_type): Move to here.
12519         (tdesc_named_type): Likewise.
12520         (tdesc_create_vector): Likewise.
12521         (tdesc_create_struct): Likewise.
12522         (tdesc_set_struct_size): Likewise.
12523         (tdesc_create_union): Likewise.
12524         (tdesc_create_flags): Likewise.
12525         (tdesc_create_enum): Likewise.
12526         (tdesc_add_field): Likewise.
12527         (tdesc_add_typed_bitfield): Likewise.
12528         (tdesc_add_bitfield): Likewise.
12529         (tdesc_add_flag): Likewise.
12530         (tdesc_add_enum_value): Likewise.
12531         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12532         (struct tdesc_type_vector): Likewise.
12533         (struct tdesc_type_field): Likewise.
12534         (struct tdesc_type_with_fields): Likewise.
12535         (tdesc_create_enum): Add declaration.
12536         (tdesc_add_typed_bitfield): Likewise.
12537         (tdesc_add_enum_value): Likewise.
12538         * target-descriptions.c (tdesc_type_field): Move from here.
12539         (tdesc_type_builtin): Likewise.
12540         (tdesc_type_vector): Likewise.
12541         (tdesc_type_with_fields): Likewise.
12542         (tdesc_predefined_types): Likewise.
12543         (tdesc_named_type): Likewise.
12544         (tdesc_create_vector): Likewise.
12545         (tdesc_create_struct): Likewise.
12546         (tdesc_set_struct_size): Likewise.
12547         (tdesc_create_union): Likewise.
12548         (tdesc_create_flags): Likewise.
12549         (tdesc_create_enum): Likewise.
12550         (tdesc_add_field): Likewise.
12551         (tdesc_add_typed_bitfield): Likewise.
12552         (tdesc_add_bitfield): Likewise.
12553         (tdesc_add_flag): Likewise.
12554         (tdesc_add_enum_value): Likewise.
12555         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12556         (tdesc_add_typed_bitfield): Likewise.
12557         (tdesc_add_enum_value): Likewise.
12558
12559 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12560
12561         * common/tdesc.c (tdesc_feature::accept): Move to here.
12562         (tdesc_feature::operator==): Likewise.
12563         (tdesc_create_reg): Likewise.
12564         * common/tdesc.h (tdesc_type_kind): Likewise.
12565         (struct tdesc_type): Likewise.
12566         (struct tdesc_feature): Likewise.
12567         * regformats/regdat.sh: Create a feature.
12568         * target-descriptions.c (tdesc_type_kind): Move from here.
12569         (tdesc_type): Likewise.
12570         (tdesc_type_up): Likewise.
12571         (tdesc_feature): Likewise.
12572         (tdesc_create_reg): Likewise.
12573
12574 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12575
12576         * Makefile.in: Add arch/tdesc.c
12577         * common/tdesc.c: New file.
12578         * common/tdesc.h (tdesc_element_visitor): Move to here.
12579         (tdesc_element): Likewise.
12580         (tdesc_reg): Likewise.
12581         (tdesc_reg_up): Likewise.
12582         * regformats/regdef.h (reg): Add offset to constructors.
12583         * target-descriptions.c (tdesc_element_visitor): Move from here.
12584         (tdesc_element): Likewise.
12585         (tdesc_reg): Likewise.
12586         (tdesc_reg_up): Likewise.
12587
12588 2018-04-17  Tom Tromey  <tom@tromey.com>
12589
12590         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12591         discriminant field.
12592
12593 2018-04-17  Tom Tromey  <tom@tromey.com>
12594
12595         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12596
12597 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12598
12599         * symtab.c (print_symbol_info): Skip printing filename and line
12600         number when `last' is NULL.
12601         (symtab_symbol_info): Use empty string instead of NULL for first
12602         invocation of print_symbol_info.
12603         (rbreak_command): Pass NULL to `last' parameter of
12604         print_symbol_info.
12605
12606 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12607
12608         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12609         instead of nullptr.
12610
12611 2018-04-16  Pedro Alves  <palves@redhat.com>
12612
12613         * MAINTAINERS (sh): Remove.
12614         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12615         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12616         (ALLDEPFILES): Remove sh64-tdep.c.
12617         * NEWS: Mentions that support for SH-5/SH64 is removed.
12618         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12619         (sh*-*-openbsd*): Ditto.
12620         (sh64-*-elf*): Remove.
12621         (sh*): Remove.
12622         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12623         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12624         * sh-tdep.c: No longer include "sh64-tdep.h".
12625         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12626         * sh64-tdep.c, sh64-tdep.h: Remove files.
12627
12628 2018-04-16  Pedro Alves  <palves@redhat.com>
12629
12630         * MAINTAINERS: Remove m88k.
12631         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12632         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12633         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12634         * NEWS: Mention that support for m88k was removed.
12635         * configure.host (m88*-*-*): Remove support.
12636         * configure.nat (m88k-*-*): Remove support.
12637         * configure.tgt (m88*-*-openbsd*): Remove.
12638         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12639
12640 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12641
12642         * configure.tgt (x86_tobjs): New variable.
12643         (amd64_tobjs, i386_tobjs): Use it.
12644
12645 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12646
12647         * symtab.c (print_symbol_info): Precede the symbol definition by
12648         the line number when available.
12649         * NEWS: Advertise this enhancement.
12650
12651 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12652
12653         * NEWS (New options): announce set/show record btrace cpu.
12654         * btrace.c: Include record-btrace.h.
12655         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12656         the vendor is unknown.
12657         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12658         Maybe overwrite the btrace configuration's cpu.
12659         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12660         (btrace_fetch): Add cpu parameter.  Update callers.
12661         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12662         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12663         errata workarounds if the vendor is unknown.
12664         * python/py-record-btrace.c: Include record-btrace.h.
12665         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12666         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12667         * record-btrace.c (record_btrace_cpu_state_kind): New.
12668         (record_btrace_cpu): New.
12669         (set_record_btrace_cpu_cmdlist): New.
12670         (record_btrace_get_cpu): New.
12671         (require_btrace_thread, record_btrace_info)
12672         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12673         (cmd_set_record_btrace_cpu_none): New.
12674         (cmd_set_record_btrace_cpu_auto): New.
12675         (cmd_set_record_btrace_cpu): New.
12676         (cmd_show_record_btrace_cpu): New.
12677         (_initialize_record_btrace): Initialize set/show record btrace cpu
12678         commands.
12679         * record-btrace.h (record_btrace_get_cpu): New.
12680
12681 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12682
12683         * record.c (set_record_command): Fix typo in message.
12684
12685 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12686
12687         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12688
12689 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12690
12691         * infrun.c (process_event_stop_test): Call
12692         gdbarch_in_indirect_branch_thunk.
12693         * gdbarch.sh (in_indirect_branch_thunk): New.
12694         * gdbarch.c: Regenerated.
12695         * gdbarch.h: Regenerated.
12696         * x86-tdep.h: New.
12697         * x86-tdep.c: New.
12698         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12699         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12700         (ALLDEPFILES): Add x86-tdep.c.
12701         * arch-utils.h (default_in_indirect_branch_thunk): New.
12702         * arch-utils.c (default_in_indirect_branch_thunk): New.
12703         * i386-tdep: Include x86-tdep.h.
12704         (i386_in_indirect_branch_thunk): New.
12705         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12706         function.
12707         * amd64-tdep: Include x86-tdep.h.
12708         (amd64_in_indirect_branch_thunk): New.
12709         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12710
12711 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12712
12713         PR gdb/23053
12714         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12715         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12716         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12717         regression.
12718
12719 2018-04-12  Tom Tromey  <tom@tromey.com>
12720
12721         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12722         (rust_evaluate_subexp): Likewise.
12723
12724 2018-04-12  Pedro Alves  <palves@redhat.com>
12725
12726         * procfs.c (procfs_detach): Make forward declaration's prototype
12727         match definition's protototype.
12728         (proc_get_LDT_entry): Remove stale do_cleanups call.
12729
12730 2018-04-12  Pedro Alves  <palves@redhat.com>
12731
12732         * target.h (target_ops::to_has_exited): Delete.
12733         (target_has_exited): Delete.
12734         * target-delegates.c: Regenerate.
12735
12736 2018-04-11  Pedro Alves  <palves@redhat.com>
12737
12738         * target.c (fileio_fh_t::t): Add comment.
12739         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12740         (target_fileio_close): Handle a NULL target.
12741         (invalidate_fileio_fh): New.
12742         (target_close): Call it.
12743         * remote.c (remote_hostio_send_command): No longer check whether
12744         remote_desc is open.
12745
12746 2018-04-11  Pedro Alves  <palves@redhat.com>
12747
12748         * target.c (fileio_fh_t): Make it a named struct instead of a
12749         typedef.
12750         (fileio_fh_t::is_closed): New method.
12751         (DEF_VEC_O (fileio_fh_t)): Remove.
12752         (fileio_fhandles): Now a std::vector.
12753         (is_closed_fileio_fh): Delete.
12754         (acquire_fileio_fd): Adjust.  Rename parameters.
12755         (release_fileio_fd): Adjust.
12756         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12757         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12758         (target_fileio_close): Adjust.
12759
12760 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12761
12762         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12763         index.
12764
12765 2018-04-10  Pedro Alves  <palves@redhat.com>
12766
12767         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12768         (scoped_finish_thread_state): New class.
12769         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12770         cleanup.
12771         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12772         (fetch_inferior_event, normal_stop): Likewise.
12773         * thread.c (finish_thread_state_cleanup): Delete.
12774
12775 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12776             Pedro Alves  <palves@redhat.com>
12777
12778         * value.c: Include "selftest.h" and "common/array-view.h".
12779         (struct range) <operator ==>: New.
12780         (test_ranges_contain): New.
12781         (check_ranges_vector): New.
12782         (test_insert_into_bit_range_vector): New.
12783         (_initialize_values): Register selftests.
12784         * common/array-view.h (operator==, operator!=): New.
12785
12786 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12787
12788         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12789         an iterator.
12790         * inline-frame.c: Include <algorithm>.
12791         (struct inline_state): Add constructor.
12792         (inline_state_s): Remove.
12793         (DEF_VEC_O(inline_state_s)): Remove.
12794         (inline_states): Change type to std::vector.
12795         (find_inline_frame_state): Adjust to std::vector.
12796         (allocate_inline_frame_state): Remove.
12797         (clear_inline_frame_state): Adjust to std::vector.
12798         (skip_inline_frames): Adjust to std::vector.
12799
12800 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12801
12802         * tracepoint.h (struct trace_state_variable): Add constructor.
12803         <name>: Change type to std::string.
12804         * tracepoint.c (tsv_s): Remove.
12805         (DEF_VEC_O(tsv_s)): Remove.
12806         (tvariables): Change to std::vector.
12807         (create_trace_state_variable): Adjust to std::vector.
12808         (find_trace_state_variable): Likewise.
12809         (find_trace_state_variable_by_number): Likewise.
12810         (delete_trace_state_variable): Likewise.
12811         (trace_variable_command): Adjust to std::string.
12812         (delete_trace_variable_command): Likewise.
12813         (tvariables_info_1): Adjust to std::vector.
12814         (save_trace_state_variables): Likewise.
12815         (start_tracing): Likewise.
12816         (merge_uploaded_trace_state_variables): Adjust to std::vector
12817         and std::string.
12818         * target.h (struct target_ops)
12819         <to_download_trace_state_variable>: Pass reference to
12820         trace_state_variable.
12821         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12822         * target-delegates.c: Re-generate.
12823         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12824         (mi_tsv_deleted): Likewise.
12825         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12826         * remote.c (remote_download_trace_state_variable): Change
12827         pointer to reference and adjust.
12828         * make-target-delegates (parse_argtypes): Handle references.
12829         (write_function_header): Likewise.
12830         (munge_type): Likewise.
12831
12832 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12833
12834         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12835         string_view-selftests.c.
12836         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12837         testsuite.
12838         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12839         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12840         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12841         * unittests/basic_string_view/element_access/char/1.cc:
12842         Likewise.
12843         * unittests/basic_string_view/element_access/char/empty.cc:
12844         Likewise.
12845         * unittests/basic_string_view/element_access/char/front_back.cc:
12846         Likewise.
12847         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12848         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12849         Likewise.
12850         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12851         Likewise.
12852         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12853         Likewise.
12854         * unittests/basic_string_view/operations/compare/char/1.cc:
12855         Likewise.
12856         * unittests/basic_string_view/operations/compare/char/13650.cc:
12857         Likewise.
12858         * unittests/basic_string_view/operations/copy/char/1.cc:
12859         Likewise.
12860         * unittests/basic_string_view/operations/data/char/1.cc:
12861         Likewise.
12862         * unittests/basic_string_view/operations/find/char/1.cc:
12863         Likewise.
12864         * unittests/basic_string_view/operations/find/char/2.cc:
12865         Likewise.
12866         * unittests/basic_string_view/operations/find/char/3.cc:
12867         Likewise.
12868         * unittests/basic_string_view/operations/find/char/4.cc:
12869         Likewise.
12870         * unittests/basic_string_view/operations/rfind/char/1.cc:
12871         Likewise.
12872         * unittests/basic_string_view/operations/rfind/char/2.cc:
12873         Likewise.
12874         * unittests/basic_string_view/operations/rfind/char/3.cc:
12875         Likewise.
12876         * unittests/basic_string_view/operations/substr/char/1.cc:
12877         Likewise.
12878         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12879         * unittests/string_view-selftests.c: New file.
12880
12881 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12882
12883         * unittests/basic_string_view/capacity/1.cc: New file.
12884         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12885         * unittests/basic_string_view/cons/char/1.cc: New file.
12886         * unittests/basic_string_view/cons/char/2.cc: New file.
12887         * unittests/basic_string_view/cons/char/3.cc: New file.
12888         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12889         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12890         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12891         * unittests/basic_string_view/element_access/char/1.cc: New file.
12892         * unittests/basic_string_view/element_access/char/2.cc: New file.
12893         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12894         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12895         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12896         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12897         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12898         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12899         * unittests/basic_string_view/include.cc: New file.
12900         * unittests/basic_string_view/inserters/char/1.cc: New file.
12901         * unittests/basic_string_view/inserters/char/2.cc: New file.
12902         * unittests/basic_string_view/inserters/char/3.cc: New file.
12903         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12904         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12905         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12906         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12907         * unittests/basic_string_view/literals/types.cc: New file.
12908         * unittests/basic_string_view/literals/values.cc: New file.
12909         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12910         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12911         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12912         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12913         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12914         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12915         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12916         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12917         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12918         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12919         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12920         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12921         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12922         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12923         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12924         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12925         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12926         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12927         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12928         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12929         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12930         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12931         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12932         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12933         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12934         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12935         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12936         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12937         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12938         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12939         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12940         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12941         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12942         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12943         * unittests/basic_string_view/operators/char/2.cc: New file.
12944         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12945         * unittests/basic_string_view/range_access/char/1.cc: New file.
12946         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12947         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12948         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12949         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12950         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12951         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12952         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12953         * unittests/basic_string_view/typedefs.cc: New file.
12954         * unittests/basic_string_view/types/1.cc: New file.
12955
12956 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12957
12958         * common/gdb_string_view.h: Remove libstdc++ implementation
12959         details, adjust to gdb reality.
12960         * common/gdb_string_view.tcc: Likewise.
12961         * cli/cli-script.c (struct string_view): Remove.
12962         (user_args) <m_args>: Change element type to gdb::string_view.
12963         (user_args::insert_args): Adjust.
12964
12965 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12966
12967         * common/gdb_string_view.h: New file.
12968         * common/gdb_string_view.tcc: New file.
12969
12970 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12971
12972         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12973         * configure: Re-generate.
12974
12975 2018-04-09  Pedro Alves  <palves@redhat.com>
12976
12977         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12978         (set_target_gdbarch): Call
12979         gdb::observers::architecture_changed.notify instead of
12980         observer_notify_architecture_changed.
12981
12982 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12983
12984         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12985         (do_restore_current_traceframe_cleanup): Remove.
12986         (restore_current_traceframe_cleanup_dtor): Remove.
12987         (make_cleanup_restore_current_traceframe): Remove.
12988         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12989         New.
12990         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12991         * infrun.c (fetch_inferior_event): Use
12992         scoped_restore_current_traceframe.
12993
12994 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12995
12996         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12997         Remove.
12998         <n_allocated_type_units>: Remove.
12999         <all_type_units>: Change to std::vector.
13000         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13001         to std::vector change.
13002         (dwarf2_per_objfile::get_cutu): Likewise.
13003         (dwarf2_per_objfile::get_tu): Likewise.
13004         (create_signatured_type_table_from_index): Likewise.
13005         (create_signatured_type_table_from_debug_names): Likewise.
13006         (dw2_symtab_iter_next): Likewise.
13007         (dw2_print_stats): Likewise.
13008         (dw2_expand_all_symtabs): Likewise.
13009         (dw2_expand_marked_cus): Likewise.
13010         (dw2_debug_names_iterator::next): Likewise.
13011         (dwarf2_initialize_objfile): Likewise.
13012         (add_signatured_type_cu_to_table): Likewise.
13013         (create_all_type_units): Likewise.
13014         (add_type_unit): Likewise.
13015         (struct tu_abbrev_offset): Add constructor.
13016         (build_type_psymtabs_1): Adjust to std::vector change.
13017         (print_tu_stats): Likewise.
13018         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13019         (write_debug_names): Likewise.
13020
13021 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13022
13023         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13024         Make an std::vector.
13025         <n_comp_units>: Remove.
13026         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13027         to std::vector change.
13028         (dwarf2_per_objfile::get_cutu): Likewise.
13029         (dwarf2_per_objfile::get_cu): Likewise.
13030         (create_cus_from_index): Likewise.
13031         (create_addrmap_from_index): Likewise.
13032         (create_addrmap_from_aranges): Likewise.
13033         (dwarf2_read_index): Likewise.
13034         (dw2_find_last_source_symtab): Likewise.
13035         (dw2_map_symtabs_matching_filename): Likewise.
13036         (dw2_symtab_iter_next): Likewise.
13037         (dw2_print_stats): Likewise.
13038         (dw2_expand_all_symtabs): Likewise.
13039         (dw2_expand_symtabs_with_fullname): Likewise.
13040         (dw2_expand_marked_cus): Likewise.
13041         (dw2_map_symbol_filenames): Likewise.
13042         (create_cus_from_debug_names): Likewise.
13043         (dwarf2_read_debug_names): Likewise.
13044         (dw2_debug_names_iterator::next): Likewise.
13045         (dwarf2_initialize_objfile): Likewise.
13046         (set_partial_user): Likewise.
13047         (dwarf2_build_psymtabs_hard): Likewise.
13048         (read_comp_units_from_section): Remove arguments, adjust to
13049         std::vector change.
13050         (create_all_comp_units): Adjust to std::vector and
13051         read_comp_units_from_section changes.
13052         (dwarf2_find_containing_comp_unit): Adjust to std::vector
13053         change.
13054         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13055         (psyms_seen_size): Likewise.
13056         (write_gdbindex): Likewise.
13057         (write_debug_names): Likewise.
13058
13059 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13060
13061         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13062         with dwarf2_per_objfile.
13063         (create_cus_from_index): Likewise.
13064         (create_signatured_type_table_from_index): Likewise.
13065         (dwarf2_read_index): Likewise.
13066         (dwarf2_initialize_objfile): Likewise.
13067         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
13068         per_cu rather than get_dwarf2_per_objfile.
13069
13070 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13071
13072         * dwarf2read.h (struct signatured_type): Forward declare.
13073         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13074         New methods.
13075         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13076         (dw2_get_cutu): ...this.
13077         (dwarf2_per_objfile::get_cu): Rename from...
13078         (dw2_get_cu): ...this.
13079         (dwarf2_per_objfile::get_tu): New.
13080         (create_addrmap_from_index): Adjust.
13081         (create_addrmap_from_aranges): Adjust.
13082         (dw2_find_last_source_symtab): Adjust.
13083         (dw2_map_symtabs_matching_filename): Adjust.
13084         (dw2_symtab_iter_next): Adjust.
13085         (dw2_print_stats): Adjust.
13086         (dw2_expand_all_symtabs): Adjust.
13087         (dw2_expand_symtabs_with_fullname): Adjust.
13088         (dw2_expand_marked_cus): Adjust.
13089         (dw_expand_symtabs_matching_file_matcher): Adjust.
13090         (dw2_map_symbol_filenames): Adjust.
13091         (dw2_debug_names_iterator::next): Adjust.
13092         (dwarf2_initialize_objfile): Adjust.
13093         (set_partial_user): Adjust.
13094         (dwarf2_build_psymtabs_hard): Adjust.
13095
13096 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13097
13098         * dwarf2read.c (create_signatured_type_table_from_debug_names):
13099         Remove unused variables.
13100         (dw2_map_symtabs_matching_filename): Likewise.
13101         (dwarf2_record_block_ranges): Likewise.
13102         (dwarf2_read_addr_index): Likewise.
13103         (follow_die_offset): Likewise.
13104
13105 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13106
13107         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13108         to symbol_file_add_main.
13109
13110 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13111
13112         PR mi/22299
13113         * mi/mi-console.c (do_fputc_async_safe): New.
13114         (mi_console_file::write_async_safe): New.
13115         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13116         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13117         New.
13118         * ui-file.c (ui_file::putstrn): Adjust call to
13119         fputstrn_unfiltered.
13120         * utils.c (printchar): Replace do_fputs and do_fprintf
13121         parameters by do_fputc.
13122         (fputstr_filtered): Adjust call to printchar.
13123         (fputstr_unfiltered): Likewise.
13124         (fputstrn_filtered): Likewise.
13125         (fputstrn_unfiltered): Add do_fputc parameter, pass to
13126         printchar.
13127         * utils.h (do_fputc_ftype): New typedef.
13128         (fputstrn_unfiltered): Add do_fputc parameter.
13129
13130 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13131
13132         * regformats/i386/i386-avx.dat: Remove.
13133
13134 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13135
13136         PR gdb/22979
13137         * amd64-tdep.c (amd64_none_init_abi): New function.
13138         (amd64_x32_none_init_abi): New function.
13139         (_initialize_amd64_tdep): Register handlers for x86-64 and
13140         x64_32 with GDB_OSABI_NONE.
13141         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13142         GDB_OSABI_NONE osabi.
13143
13144 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13145
13146         PR gdb/22980
13147         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13148         GDB_OSABI_NONE.
13149         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13150         * osabi.c (gdb_osabi_names): Add "unknown" entry.
13151
13152 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13153
13154         * common/byte-vector.h (char_vector): New type.
13155         * target.h (target_read_alloc): Return
13156         gdb::optional<byte_vector>.
13157         (target_read_stralloc): Return gdb::optional<char_vector>.
13158         (target_get_osdata): Return gdb::optional<char_vector>.
13159         * target.c (target_read_alloc_1): Templatize.  Replacement
13160         manual memory management with vector.
13161         (target_read_alloc): Change return type, adjust.
13162         (target_read_stralloc): Change return type, adjust.
13163         (target_get_osdata): Change return type, adjust.
13164         * auxv.c (struct auxv_info) <length>: Remove.
13165         <data>: Change type to gdb::optional<byte_vector>.
13166         (auxv_inferior_data_cleanup): Free auxv_info with delete.
13167         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13168         (target_auxv_search): Adjust.
13169         (fprint_target_auxv): Adjust.
13170         * avr-tdep.c (avr_io_reg_read_command): Adjust.
13171         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13172         (linux_make_corefile_notes): Adjust.
13173         * osdata.c (get_osdata): Adjust.
13174         * remote.c (remote_get_threads_with_qxfer): Adjust.
13175         (remote_memory_map): Adjust.
13176         (remote_traceframe_info): Adjust.
13177         (btrace_read_config): Adjust.
13178         (remote_read_btrace): Adjust.
13179         (remote_pid_to_exec_file): Adjust.
13180         * solib-aix.c (solib_aix_get_library_list): Adjust.
13181         * solib-dsbt.c (decode_loadmap): Don't free buf.
13182         (dsbt_get_initial_loadmaps): Adjust.
13183         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13184         * solib-target.c (solib_target_current_sos): Adjust.
13185         * tracepoint.c (sdata_make_value): Adjust.
13186         * xml-support.c (xinclude_start_include): Adjust.
13187         (xml_fetch_content_from_file): Adjust.
13188         * xml-support.h (xml_fetch_another): Change return type.
13189         (xml_fetch_content_from_file): Change return type.
13190         * xml-syscall.c (xml_init_syscalls_info): Adjust.
13191         * xml-tdesc.c (file_read_description_xml): Adjust.
13192         (fetch_available_features_from_target): Change return type.
13193         (target_fetch_description_xml): Adjust.
13194         (target_read_description_xml): Adjust.
13195
13196 2018-04-06  Tom Tromey  <tom@tromey.com>
13197
13198         * value.c (~value): Update.
13199         (struct value) <contents>: Now unique_xmalloc_ptr.
13200         (value_contents_bits_eq, allocate_value_contents)
13201         (value_contents_raw, value_contents_all_raw)
13202         (value_contents_for_printing, value_contents_for_printing_const)
13203         (set_value_enclosing_type): Update.
13204
13205 2018-04-06  Tom Tromey  <tom@tromey.com>
13206
13207         * value.c (range_s): Remove typedef, VEC.
13208         (struct range): Add operator<.
13209         (range_lessthan): Remove.
13210         (ranges_contain): Change type.
13211         (~value): Update.
13212         (struct value) <unavailable, optimized_out>: Now std::vector.
13213         (value_entirely_available)
13214         (value_entirely_covered_by_range_vector)
13215         (value_entirely_unavailable, value_entirely_optimized_out):
13216         Update.
13217         (insert_into_bit_range_vector): Change argument type.
13218         (find_first_range_overlap): Likewise.
13219         (struct ranges_and_idx, value_contents_bits_eq)
13220         (require_not_optimized_out, require_available): Update.
13221         (ranges_copy_adjusted): Change argument types.
13222         (value_optimized_out, value_copy, value_fetch_lazy): Update.
13223
13224 2018-04-06  Tom Tromey  <tom@tromey.com>
13225
13226         * value.c (~value): Update.
13227         (struct value) <parent>: Now a value_ref_ptr.
13228         (value_parent, set_value_parent, value_address, value_copy):
13229         Update.
13230
13231 2018-04-06  Tom Tromey  <tom@tromey.com>
13232
13233         * value.c (struct value): Add constructor, destructor, and member
13234         initializers.
13235         (allocate_value_lazy, value_decref): Update.
13236
13237 2018-04-06  Tom Tromey  <tom@tromey.com>
13238
13239         * value.c (struct value) <released, next>: Remove.
13240         (all_values): Now a std::vector.
13241         (allocate_value_lazy): Update.
13242         (value_next): Remove.
13243         (value_mark, value_free_to_mark, release_value)
13244         (value_release_to_mark): Update.
13245
13246 2018-04-06  Tom Tromey  <tom@tromey.com>
13247
13248         * value.h (fetch_subexp_value, value_release_to_mark): Update.
13249         (free_value_chain): Remove.
13250         * value.c (free_value_chain): Remove.
13251         (value_release_to_mark): Return a std::vector.
13252         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13253         std::vector.
13254         (check_condition): Update.
13255         * eval.c (fetch_subexp_value): Change "val_chain" to a
13256         std::vector.
13257         * breakpoint.c (update_watchpoint): Update.
13258         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13259
13260 2018-04-06  Tom Tromey  <tom@tromey.com>
13261
13262         * value.h (free_all_values): Remove.
13263         * value.c (free_all_values): Remove.
13264
13265 2018-04-06  Tom Tromey  <tom@tromey.com>
13266
13267         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13268         (value_history_chain, value_history_count): Remove.
13269         (value_history): New global.
13270         (record_latest_value, access_value_history, show_values)
13271         (preserve_values): Update.
13272
13273 2018-04-06  Tom Tromey  <tom@tromey.com>
13274
13275         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13276         * varobj.c (varobj_set_display_format, varobj_set_value)
13277         (install_default_visualizer, construct_visualizer)
13278         (install_new_value, ~varobj, varobj_get_value_type)
13279         (my_value_of_variable, varobj_editable_p): Update.
13280         * c-varobj.c (c_describe_child, c_value_of_variable)
13281         (cplus_number_of_children, cplus_describe_child): Update.
13282         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13283         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13284         (ada_value_of_variable, ada_value_is_changeable_p): Update.
13285
13286 2018-04-06  Tom Tromey  <tom@tromey.com>
13287
13288         * printcmd.c (last_examine_address): Change type to
13289         value_ref_ptr.
13290         (do_examine, x_command): Update.
13291
13292 2018-04-06  Tom Tromey  <tom@tromey.com>
13293
13294         * value.c (release_value): Update.
13295         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13296         (struct bpstats) <val>: Now a value_ref_ptr.
13297         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13298         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13299         (~watchpoint, print_it_watchpoint, watch_command_1)
13300         (invalidate_bp_value_on_memory_change): Update.
13301
13302 2018-04-06  Tom Tromey  <tom@tromey.com>
13303
13304         * varobj.c (varobj_clear_saved_item)
13305         (update_dynamic_varobj_children, install_new_value, ~varobj):
13306         Update.
13307         * value.h (value_incref): Move declaration earlier.
13308         (value_decref): Rename from value_free.
13309         (struct value_ref_policy): New.
13310         (value_ref_ptr): New typedef.
13311         (struct value_deleter): Remove.
13312         (gdb_value_up): Remove typedef.
13313         (release_value): Change return type.
13314         (release_value_or_incref): Remove.
13315         * value.c (set_value_parent): Update.
13316         (value_incref): Change return type.
13317         (value_decref): Rename from value_free.
13318         (value_free_to_mark, free_all_values, free_value_chain): Update.
13319         (release_value): Return value_ref_ptr.
13320         (release_value_or_incref): Remove.
13321         (record_latest_value, set_internalvar, clear_internalvar):
13322         Update.
13323         * stack.c (info_frame_command): Don't call value_free.
13324         * python/py-value.c (valpy_dealloc, valpy_new)
13325         (value_to_value_object): Update.
13326         * printcmd.c (do_examine): Update.
13327         * opencl-lang.c (lval_func_free_closure): Update.
13328         * mi/mi-main.c (register_changed_p): Don't call value_free.
13329         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13330         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13331         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13332         value_free.
13333         * guile/scm-value.c (vlscm_free_value_smob)
13334         (vlscm_scm_from_value): Update.
13335         * frame.c (frame_register_unwind, frame_unwind_register_signed)
13336         (frame_unwind_register_unsigned, get_frame_register_bytes)
13337         (put_frame_register_bytes): Don't call value_free.
13338         * findvar.c (address_from_register): Don't call value_free.
13339         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13340         * dwarf2loc.c (entry_data_value_free_closure)
13341         (value_of_dwarf_reg_entry, free_pieced_value_closure)
13342         (dwarf2_evaluate_loc_desc_full): Update.
13343         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13344         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13345         (~watchpoint, watch_command_1)
13346         (invalidate_bp_value_on_memory_change): Update.
13347         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13348
13349 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
13350
13351         PR gdb/23022
13352         * warning.m4: Add -Wno-error=deprecated-register.
13353         * configure: Re-generate.
13354
13355 2018-04-05  Tom Tromey  <tom@tromey.com>
13356
13357         * linespec.h: Remove include of "vec.h".
13358
13359 2018-04-05  Tom Tromey  <tom@tromey.com>
13360
13361         * linespec.c (typep): Remove typedef.
13362         (find_methods, find_superclass_methods): Take a std::vector.
13363         (find_method): Use std::vector.
13364
13365 2018-04-05  Tom Tromey  <tom@tromey.com>
13366
13367         * utils.c (compare_strings): Remove.
13368         * utils.h (compare_strings): Remove.
13369         * objc-lang.h (find_imps): Update.
13370         * objc-lang.c (find_methods): Take a std::vector.
13371         (uniquify_strings, find_imps): Likewise.
13372         * linespec.c (find_methods): Take a std::vector.
13373         (decode_objc): Use std::vector.
13374         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13375         a std::vector.
13376         (find_method, find_function_symbols): Use std::vector.
13377
13378 2018-04-05  Tom Tromey  <tom@tromey.com>
13379
13380         * completer.c (completion_tracker::completion_tracker): Remove
13381         cast.
13382         (completion_tracker::discard_completions): Likewise.
13383         * breakpoint.c (ambiguous_names_p): Remove cast.
13384         * ada-lang.c (_initialize_ada_language): Remove cast.
13385         * utils.h (streq): Update.
13386         (streq_hash): Add new declaration.
13387         * utils.c (streq): Return bool.
13388         (streq_hash): New function.
13389
13390 2018-04-05  Tom Tromey  <tom@tromey.com>
13391
13392         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13393         Remove a string copy.
13394
13395 2018-04-05  Tom Tromey  <tom@tromey.com>
13396
13397         * linespec.c (filter_results): Use std::vector.
13398         (decode_line_2, decode_line_full): Update.
13399
13400 2018-04-05  Tom Tromey  <tom@tromey.com>
13401
13402         * linespec.c (canonical_to_fullform): Return std::string.
13403         (filter_results): Update.
13404         (struct decode_line_2_item): Add constructor.
13405         <fullform, displayform>: Now std::string.
13406         (decode_line_2_compare_items): Now a std::sort comparator.
13407         (decode_line_2): Update.
13408
13409 2018-04-05  Tom Tromey  <tom@tromey.com>
13410
13411         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13412         (unexpected_linespec_error): Update.
13413         (linespec_parse_basic, parse_linespec): Update.
13414
13415 2018-04-05  Tom Tromey  <tom@tromey.com>
13416
13417         * linespec.c (linespec_parse_basic): Reindent.
13418
13419 2018-04-05  Tom Tromey  <tom@tromey.com>
13420
13421         * minsyms.h (iterate_over_minimal_symbols): Update.
13422         * minsyms.c (iterate_over_minimal_symbols): Take a
13423         gdb::function_view.
13424         * linespec.c (struct collect_minsyms): Remove.
13425         (compare_msyms): Now a std::sort comparator.
13426         (add_minsym): Add parameters.
13427         (search_minsyms_for_name): Update.  Use std::vector.
13428
13429 2018-04-03  Tom Tromey  <tom@tromey.com>
13430
13431         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13432         gdb::byte_vector.
13433
13434 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13435
13436         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13437
13438 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13439
13440         PR gdb/16959
13441         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13442         printing static type.
13443
13444 2018-04-01  Tom Tromey  <tom@tromey.com>
13445
13446         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13447         (rs6000_xfer_shared_libraries): Update.
13448
13449 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13450
13451         * common/gdb_vecs.h (char_ptr): Remove.
13452         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13453
13454 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13455
13456         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13457         with std::vector.
13458         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13459
13460 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13461
13462         * tracepoint.h (struct uploaded_tp): Initialize fields.
13463         <actions, step_actions, cmd_strings>: Change type to
13464         std::vector<char *>.
13465         * tracepoint.c (get_uploaded_tp): Allocate with new.
13466         (free_uploaded_tps): Free with delete.
13467         (parse_tracepoint_definition): Adjust to std::vector change.
13468         * breakpoint.c (read_uploaded_action): Likewise.
13469         (create_tracepoint_from_upload): Likewise.
13470         * ctf.c (ctf_write_uploaded_tp): Likewise.
13471         (SET_ARRAY_FIELD): Likewise.
13472         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13473
13474 2018-03-30  Tom Tromey  <tom@tromey.com>
13475
13476         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13477         std::unique_ptr.
13478         (svr4_keep_data_in_core): Update.
13479         (svr4_read_so_list): Update.
13480
13481 2018-03-30  Tom Tromey  <tom@tromey.com>
13482
13483         * windows-nat.c (handle_output_debug_string, handle_exception):
13484         Update.
13485         * target.h (target_read_string): Update.
13486         * target.c (target_read_string): Change "string" to
13487         unique_xmalloc_ptr.
13488         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13489         Update.
13490         * solib-frv.c (frv_current_sos): Update.
13491         * solib-dsbt.c (dsbt_current_sos): Update.
13492         * solib-darwin.c (darwin_current_sos): Update.
13493         * linux-thread-db.c (inferior_has_bug): Update.
13494         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13495         Update.  Remove alloca.
13496         * ada-lang.c (ada_main_name): Update.
13497
13498 2018-03-30  Tom Tromey  <tom@tromey.com>
13499
13500         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13501         (struct dwo_file_deleter): New.
13502         (dwo_file_up): New typedef.
13503         (open_and_init_dwo_file): Use dwo_file_up.
13504         (free_dwo_file_cleanup): Remove.
13505
13506 2018-03-30  Tom Tromey  <tom@tromey.com>
13507
13508         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13509         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13510
13511 2018-03-30  Tom Tromey  <tom@tromey.com>
13512
13513         * dwarf2read.c (class free_cached_comp_units): New class.
13514         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13515         (free_cached_comp_units): Remove function.
13516
13517 2018-03-30  Tom Tromey  <tom@tromey.com>
13518
13519         * utils.h (make_cleanup_unpush_target): Remove.
13520         * inf-ptrace.c (struct target_unpusher): New.
13521         (target_unpush_up) New typedef.
13522         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13523         target_unpush_up.
13524         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13525
13526 2018-03-27  Tom Tromey  <tom@tromey.com>
13527
13528         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13529
13530 2018-03-27  Pedro Alves  <palves@redhat.com>
13531             Tom Tromey  <tom@tromey.com>
13532
13533         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13534         destructor.  Now a class.
13535         (gdb_readline_wrapper_cleanup): Remove function.
13536         (gdb_readline_wrapper): Remove cleanups.
13537
13538 2018-03-27  Tom Tromey  <tom@tromey.com>
13539
13540         * typeprint.h (struct type_print_options) <local_typedefs,
13541         global_typedefs>: Remove "struct" keyword.
13542         (class typedef_hash_table): New class.
13543         (recursively_update_typedef_hash, add_template_parameters)
13544         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13545         (find_typedef_in_hash): Don't declare.
13546         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13547         (typedef_hash_table::recursively_update): Rename from
13548         recursively_update_typedef_hash.  Now a member.
13549         (typedef_hash_table::add_template_parameters): Rename from
13550         add_template_parameters.  Now a member.
13551         (typedef_hash_table::typedef_hash_table): Now a constructor;
13552         rename from create_typedef_hash.
13553         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13554         rename from free_typedef_hash.
13555         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13556         (do_free_global_table): Remove.
13557         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13558         from copy_type_recursive.
13559         (create_global_typedef_table): Remove.
13560         (typedef_hash_table::find_global_typedef): Now a member of
13561         typedef_hash_table.
13562         (typedef_hash_table::find_typedef): Rename from
13563         find_typedef_in_hash; now a member.
13564         (whatis_exp): Update.
13565         * extension.h (struct ext_lang_type_printers): Add constructor and
13566         destructor.
13567         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13568         declare.
13569         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13570         Now a constructor; rename from start_ext_lang_type_printers.
13571         (ext_lang_type_printers): Now a destructor; rename from
13572         free_ext_lang_type_printers.
13573         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13574         Update.
13575         (c_type_print_base_struct_union): Update.  Remove cleanups.
13576
13577 2018-03-27  Tom Tromey  <tom@tromey.com>
13578
13579         * dwarf-index-write.c: Include <cmath>.
13580
13581 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13582
13583         * NEWS: Add entry describing new "set|show varsize-limit" command.
13584         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13585         command.
13586         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13587         "set variable".
13588
13589 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13590
13591         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13592         dwarf-index-write.c
13593         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13594         * dwarf-index-common.c: New file.
13595         * dwarf-index-common.h: New file.
13596         * dwarf-index-write.c: New file.
13597         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13598         (struct dwarf2_section_info): Move from here.
13599         (dwarf2_section_info_def): Likewise.
13600         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13601         (offset_type): Likewise.
13602         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13603         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13604         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13605         (byte_swap): Likewise.
13606         (MAYBE_SWAP): Likewise.
13607         (dwarf2_per_cu_ptr): Likewise.
13608         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13609         (struct tu_stats): Likewise.
13610         (struct dwarf2_per_objfile): Likewise.
13611         (struct dwarf2_per_cu_data): Likewise.
13612         (struct signatured_type): Likewise.
13613         (sig_type_ptr): Likewise.
13614         (DEF_VEC_P (sig_type_ptr)): Likewise.
13615         (INDEX4_SUFFIX): Likewise.
13616         (INDEX5_SUFFIX): Likewise.
13617         (DEBUG_STR_SUFFIX): Likewise.
13618         (dwarf2_read_section): Make non-static.
13619         (mapped_index_string_hash): Move from here.
13620         (dwarf5_djb_hash): Likewise.
13621         (file_write): Likewise.
13622         (class data_buf): Likewise.
13623         (struct symtab_index_entry): Likewise.
13624         (struct mapped_symtab): Likewise.
13625         (find_slot): Likewise.
13626         (hash_expand): Likewise.
13627         (add_index_entry): Likewise.
13628         (uniquify_cu_indices): Likewise.
13629         (class c_str_view): Likewise.
13630         (class c_str_view_hasher): Likewise.
13631         (class vector_hasher): Likewise.
13632         (write_hash_table): Likewise.
13633         (psym_index_map): Likewise.
13634         (struct addrmap_index_data): Likewise.
13635         (add_address_entry): Likewise.
13636         (add_address_entry_worker): Likewise.
13637         (write_address_map): Likewise.
13638         (symbol_kind): Likewise.
13639         (write_psymbols): Likewise.
13640         (struct signatured_type_index_data): Likewise.
13641         (write_one_signatured_type): Likewise.
13642         (recursively_count_psymbols): Likewise.
13643         (recursively_write_psymbols): Likewise.
13644         (class debug_names): Likewise.
13645         (check_dwarf64_offsets): Likewise.
13646         (psyms_seen_size): Likewise.
13647         (write_gdbindex): Likewise.
13648         (write_debug_names): Likewise.
13649         (assert_file_size): Likewise.
13650         (write_psymtabs_to_index): Likewise.
13651         (save_gdb_index_command): Likewise.
13652         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13653         command.
13654         * dwarf2read.h: New file.
13655
13656 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13657
13658         PR gdb/22670
13659         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13660         symbol name if the CU's language stores symbol names in linkage
13661         format.
13662         * language.h (struct language_defn)
13663         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13664         all instances of this struct.
13665
13666 2018-03-26  Tom Tromey  <tom@tromey.com>
13667
13668         * stack.c (backtrace_command_1): Remove verbose code.
13669
13670 2018-03-26  Tom Tromey  <tom@tromey.com>
13671
13672         * python/py-framefilter.c (py_print_type): Don't catch
13673         exceptions.  Return void.
13674         (py_print_value): Likewise.
13675         (py_print_single_arg): Likewise.
13676         (enumerate_args): Don't catch exceptions.
13677         (py_print_args): Likewise.
13678         (py_print_frame): Likewise.
13679         (gdbpy_apply_frame_filter): Catch exceptions here.
13680
13681 2018-03-26  Tom Tromey  <tom@tromey.com>
13682
13683         * stack.c (_initialize_stack): Remove trailing newlines from help
13684         text.  Add "Usage" line to "backtrace" help.
13685
13686 2018-03-26  Tom Tromey  <tom@tromey.com>
13687
13688         PR python/16486:
13689         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13690
13691 2018-03-26  Tom Tromey  <tom@tromey.com>
13692
13693         * python/py-framefilter.c (py_print_single_arg): Return
13694         EXT_LANG_BT_ERROR from catch.
13695
13696 2018-03-26  Tom Tromey  <tom@tromey.com>
13697
13698         PR backtrace/15584:
13699         * stack.c (backtrace_command_1): Move some code into no-filters
13700         "if".
13701
13702 2018-03-26  Tom Tromey  <tom@tromey.com>
13703
13704         * python/py-framefilter.c (throw_quit_or_print_exception): New
13705         function.
13706         (gdbpy_apply_frame_filter): Use it.
13707
13708 2018-03-26  Tom Tromey  <tom@tromey.com>
13709
13710         PR cli/17716:
13711         * python/py-framefilter.c (py_print_type, py_print_value)
13712         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13713         RETURN_MASK_ERROR.
13714
13715 2018-03-26  Tom Tromey  <tom@tromey.com>
13716
13717         * python/py-framefilter.c (enumerate_args): Use
13718         gdb::unique_xmalloc_ptr.
13719
13720 2018-03-26  Tom Tromey  <tom@tromey.com>
13721
13722         * python/py-framefilter.c (py_print_frame): Return
13723         EXT_LANG_BT_OK.
13724         (gdbpy_apply_frame_filter): Update comment.
13725         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13726         Remove.
13727         <EXT_LANG_BT_NO_FILTERS>: Change value.
13728
13729 2018-03-26  Tom Tromey  <tom@tromey.com>
13730
13731         PR backtrace/15582:
13732         * stack.c (backtrace_command): Parse "hide" argument.
13733         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13734         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13735         constant.
13736
13737 2018-03-26  Tom Tromey  <tom@tromey.com>
13738
13739         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13740         add "flags".
13741         (backtrace_command): Remove "fulltrace", add "flags".
13742
13743 2018-03-26  Tom Tromey  <tom@tromey.com>
13744
13745         * stack.c (backtrace_command): Rewrite command line parsing.
13746
13747 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13748
13749         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13750
13751 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13752
13753         * filename-seen-cache.h: Add include guard.
13754
13755 2018-03-26  Keith Seitz  <keiths@redhat.com>
13756
13757         * symfile.c (place_section): Remove "struct" from section_addr_info
13758         in comment.
13759         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13760         "struct" keyword from section_addr_info.
13761
13762 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13763
13764         * regformats/regdef.h (reg): Add constructors.
13765
13766 2018-03-25  Pedro Alves  <palves@redhat.com>
13767
13768         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13769         if then/else bodies in var_func_name extraction.
13770
13771 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13772
13773         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13774         lookup_minimal_symbol() to find symbol entry.
13775         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13776
13777 2018-03-23  Keith Seitz  <keiths@redhat.com>
13778
13779         PR c++/22968
13780         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13781         nested type definitions for C++, too.
13782
13783 2018-03-23  Tom Tromey  <tom@tromey.com>
13784
13785         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13786         a typedef.
13787         (macho_register_oso): Remove.
13788         (macho_symtab_read): Take a std::vector.
13789         (oso_el_compare_name): Now a std::sort comparator.
13790         (macho_symfile_read_all_oso): Take a std::vector.
13791         (macho_symfile_read): Use std::vector.  Remove cleanups.
13792
13793 2018-03-22  Tom Tromey  <tom@tromey.com>
13794
13795         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13796         (record_full_goto_bookmark): Use std::string.
13797
13798 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13799
13800         PR tdep/18295
13801         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13802         a single mask.
13803
13804 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13805
13806         * rs6000-tdep.c (store_insn_p): New function.
13807         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13808         and cr_reg to their unshifted values. Use store_insn_p to
13809         match LR saves using either R1 or fdata->alloca_reg. Use
13810         store_insn_p to match CR saves. Set alloca_reg_offset
13811         when alloca_reg and framep are set. Remove lr_reg shift
13812         when assigning to fdata->lr_register.
13813
13814 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13815
13816         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13817         command line args instead of emitting a warning.
13818
13819 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13820
13821         * tracepoint.h (struct static_tracepoint_marker): Initialize
13822         fields, define default constructor, move constructor and move
13823         assignment, disable the rest.
13824         <str_id, extra>: Make std::string.
13825         (release_static_tracepoint_marker): Remove.
13826         (free_current_marker): Remove.
13827         * tracepoint.c (free_current_marker): Remove.
13828         (parse_static_tracepoint_marker_definition): Adjust to
13829         std::string, use new hex2str overload.
13830         (release_static_tracepoint_marker): Remove.
13831         (print_one_static_tracepoint_marker): Get marker by reference
13832         and adjust to std::string.
13833         (info_static_tracepoint_markers_command): Adjust to std::vector
13834         changes
13835         * target.h (static_tracepoint_marker_p): Remove typedef.
13836         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13837         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13838         bool.
13839         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13840         * target-debug.h
13841         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13842         (target_debug_print_std_vector_static_tracepoint_marker): New.
13843         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13844         to...
13845         (target_debug_print_static_tracepoint_marker_p): ... this.
13846         * target-delegates.c: Re-generate.
13847         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13848         Make std::string.
13849         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13850         (decode_static_tracepoint_spec): Adjust to std::vector.
13851         (tracepoint_print_one_detail): Adjust to std::string.
13852         (strace_marker_decode_location): Adjust to std::string.
13853         (update_static_tracepoint): Adjust to std::string, remove call
13854         to release_static_tracepoint_marker.
13855         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13856         Adjust to std::vector.
13857         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13858         (remote_static_tracepoint_markers_by_strid): Adjust to
13859         std::vector.
13860         * common/rsp-low.h (hex2str): New overload with explicit count
13861         of bytes.
13862         * common/rsp-low.c (hex2str): New overload with explicit count
13863         of bytes.
13864         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13865         (_initialize_rsp_low_selftests): Add test_hex2str test.
13866         * unittests/tracepoint-selftests.c
13867         (test_parse_static_tracepoint_marker_definition): Adjust to
13868         std::string.
13869
13870 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13871
13872         * tracepoint.c (parse_static_tracepoint_marker_definition):
13873         Consider case where the definition is followed by more
13874         definitions.
13875         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13876         tracepoint-selftests.c.
13877         * unittests/tracepoint-selftests.c: New.
13878
13879 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13880
13881         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13882         Carvalho.
13883
13884 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13885
13886         * symtab.c (find_pc_sect_line): fixed indentation.
13887
13888 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13889
13890         * symtab.c (find_pc_sect_line): now uses binary search.
13891
13892 2018-03-19  Tom Tromey  <tom@tromey.com>
13893
13894         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13895         "IDENT" production.
13896
13897 2018-03-19  Pedro Alves  <palves@redhat.com>
13898             Tom Tromey  <tom@tromey.com>
13899
13900         * unittests/observable-selftests.c: New file.
13901         * common/observable.h: New file.
13902         * observable.h: New file.
13903         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13904         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13905         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13906         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13907         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13908         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13909         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13910         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13911         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13912         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13913         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13914         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13915         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13916         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13917         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13918         tui/tui-interp.c, valops.c: Update all users.
13919         * tui/tui-hooks.c (tui_bp_created_observer)
13920         (tui_bp_deleted_observer, tui_bp_modified_observer)
13921         (tui_inferior_exit_observer, tui_before_prompt_observer)
13922         (tui_normal_stop_observer, tui_register_changed_observer):
13923         Remove.
13924         (tui_observers_token): New global.
13925         (attach_or_detach, tui_attach_detach_observers): New functions.
13926         (tui_install_hooks, tui_remove_hooks): Use
13927         tui_attach_detach_observers.
13928         * record-btrace.c (record_btrace_thread_observer): Remove.
13929         (record_btrace_thread_observer_token): New global.
13930         * observer.sh: Remove.
13931         * observer.c: Rename to observable.c.
13932         * observable.c (namespace gdb_observers): Define new objects.
13933         (observer_debug): Move into gdb_observers namespace.
13934         (struct observer, struct observer_list, xalloc_observer_list_node)
13935         (xfree_observer_list_node, generic_observer_attach)
13936         (generic_observer_detach, generic_observer_notify): Remove.
13937         (_initialize_observer): Update.
13938         Don't include observer.inc.
13939         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13940         (clean mostlyclean): Likewise.
13941         (observer.h, observer.inc): Remove targets.
13942         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13943         (COMMON_SFILES): Use observable.c, not observer.c.
13944         * .gitignore: Remove observer.h.
13945
13946 2018-03-18  Tom Tromey  <tom@tromey.com>
13947
13948         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13949         gdb::def_vector.
13950         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13951
13952 2018-03-17  Tom Tromey  <tom@tromey.com>
13953
13954         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13955
13956 2018-03-17  Tom Tromey  <tom@tromey.com>
13957
13958         * target.c (class scoped_target_fd): New.
13959         (target_fileio_close_cleanup): Remove.
13960         (target_fileio_read_alloc_1): Use scoped_target_fd.
13961
13962 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13963
13964         * silent-rules.mk: New.
13965         * Makefile.in: Include silent-rules.mk
13966         (srcdir, VPATH, top_srcdir): Move up.
13967         (COMPILE): Add ECHO_CXX.
13968         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13969         (init.c): Add ECHO_INIT_C.
13970         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13971         (version.c): Add ECHO_GEN.
13972         (printcmd.o): Add ECHO_CXX.
13973         (target-float.o): Add ECHO_CXX.
13974         (ada-exp.o): Add ECHO_CXX.
13975         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13976         (insight$(EXEEXT)): Add ECHO_CXXLD.
13977         * gnulib/configure.ac: Add AM_SILENT_RULES.
13978         * gnulib/aclocal.m4: Re-generate.
13979         * gnulib/configure: Re-generate.
13980         * gnulib/import/Makefile.in: Re-generate.
13981
13982 2018-03-16  Tom Tromey  <tom@tromey.com>
13983
13984         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13985         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13986         * utils.c (do_free_section_addr_info)
13987         (make_cleanup_free_section_addr_info): Remove.
13988         * symfile.h (struct other_sections): Add constructor.
13989         (struct section_addr_info): Remove.
13990         (section_addr_info): New typedef.
13991         (struct sym_fns) <sym_offsets>: Change type of parameter.
13992         (build_section_addr_info_from_objfile)
13993         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13994         (default_symfile_offsets, symbol_file_add)
13995         (symbol_file_add_from_bfd)
13996         (build_section_addr_info_from_section_table): Update.
13997         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13998         * symfile.c (alloc_section_addr_info): Remove.
13999         (build_section_addr_info_from_section_table): Change return type.
14000         Update.
14001         (build_section_addr_info_from_bfd)
14002         (build_section_addr_info_from_objfile): Likewise.
14003         (free_section_addr_info): Remove.
14004         (relative_addr_info_to_section_offsets): Change type of "addrs".
14005         (addrs_section_compar): Now a std::sort comparator.
14006         (addrs_section_sort): Change return type.
14007         (addr_info_make_relative): Change type of "addrs".  Update.
14008         (default_symfile_offsets, syms_from_objfile_1)
14009         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14010         (symbol_file_add_separate): Update.
14011         (symbol_file_add): Change type of "addrs".  Update.
14012         (add_symbol_file_command): Update.  Remove cleanups.
14013         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
14014         cleanups.
14015         * symfile-debug.c (debug_sym_offsets): Change type of "info".
14016         * solib.c (solib_read_symbols): Update.
14017         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
14018         * machoread.c (macho_symfile_offsets): Update.
14019         * jit.c (jit_bfd_try_read_symtab): Update.
14020
14021 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
14022
14023         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14024         unittests/utils-selftests.c.
14025         * unittests/utils-selftests.c: New file.
14026
14027 2018-03-14  Tom Tromey  <tom@tromey.com>
14028
14029         PR cli/14977:
14030         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14031         for NULL.
14032
14033 2018-03-14  Tom Tromey  <tom@tromey.com>
14034
14035         PR cli/19918:
14036         * printcmd.c (printf_pointer): Allow "-" in format.
14037
14038 2018-03-14  Tom Tromey  <tom@tromey.com>
14039
14040         * printcmd.c (_initialize_printcmd): Add usage to printf.
14041
14042 2018-03-14  Yao Qi  <qiyao@sourceware.org>
14043
14044         * MAINTAINERS: Update my email address.
14045
14046 2018-03-13  Tom Tromey  <tom@tromey.com>
14047
14048         * machoread.c (macho_check_dsym): Change filenamep to a
14049         std::string*.
14050         (macho_symfile_read): Update.
14051         * symfile.c (load_command): Use std::string.
14052
14053 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14054
14055         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14056         to error message string.
14057         (riscv_register_name): Use xsnprintf instead of sprintf.
14058         (riscv_insn::fetch_instruction): Use gdb_assert instead of
14059         internal_error.
14060         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14061         error.
14062         (riscv_push_dummy_call): Likewise.
14063
14064 2018-03-12  Tom Tromey  <tom@tromey.com>
14065
14066         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14067         Use gdb::byte_vector.
14068         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14069
14070 2018-03-12  Yao Qi  <yao.qi@linaro.org>
14071
14072         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14073         parameter type to readable_regcache.
14074         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14075         the declaration.
14076
14077 2018-03-11  Tom Tromey  <tom@tromey.com>
14078
14079         * dwarf2read.c (struct nextfield): Add initializers.
14080         (struct nextfnfield): Remove.
14081         (struct fnfieldlist): Add initializers.  Remove "length" and
14082         "head", use std::vector.
14083         (struct decl_field_list): Remove.
14084         (struct field_info): Add initializers.
14085         <fields, baseclasses>: Now std::vector.
14086         <nbaseclasses, nfnfields, typedef_field_list_count,
14087         nested_types_list_count>: Remove.
14088         (dwarf2_add_field, dwarf2_add_type_defn)
14089         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14090         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14091         (process_structure_scope): Update.
14092
14093 2018-03-11  Tom Tromey  <tom@tromey.com>
14094
14095         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14096         for use by std::sort.
14097         (build_type_psymtabs_1): Use std::vector.
14098
14099 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
14100
14101         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14102         and LIBMPFR in the printed configuration.
14103
14104 2018-03-08  Tom Tromey  <tom@tromey.com>
14105
14106         * source.c (get_filename_and_charpos): Use scoped_fd.
14107         * nto-procfs.c (procfs_open_1): Use scoped_fd.
14108         (procfs_pidlist): Likewise.
14109         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14110         (iterate_over_mappings): Likewise.
14111
14112 2018-03-08  Tom Tromey  <tom@tromey.com>
14113
14114         * infcall.c (struct call_return_meta_info)
14115         <stack_temporaries_enabled>: Remove.
14116         (get_call_return_value, call_function_by_hand_dummy): Update.
14117         * thread.c (disable_thread_stack_temporaries): Remove.
14118         (enable_thread_stack_temporaries): Remove.
14119         (thread_stack_temporaries_enabled_p): Return bool.
14120         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14121         (get_last_thread_stack_temporary): Update.
14122         * eval.c (evaluate_subexp): Update.
14123         * gdbthread.h (class enable_thread_stack_temporaries): Now a
14124         class, not a function.
14125         (value_ptr, value_vec): Remove typedefs.
14126         (class thread_info) <stack_temporaries_enabled>: Now bool.
14127         <stack_temporaries>: Now a std::vector.
14128         (thread_stack_temporaries_enabled_p)
14129         (value_in_thread_stack_temporaries): Return bool.
14130
14131 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
14132
14133         * remote.c (putpkt_binary): Fix omitted bytes reporting.
14134         (getpkt_or_notif_sane_1): Likewise.
14135
14136 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14137
14138         * build-id.c (build_id_to_debug_bfd): Use std::string.
14139
14140 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14141
14142         * build-id.c (find_separate_debug_file_by_buildid): Return
14143         std::string.
14144         * build-id.h (find_separate_debug_file_by_buildid): Return
14145         std::string.
14146         * coffread.c (coff_symfile_read): Adjust to std::string.
14147         * elfread.c (elf_symfile_read): Adjust to std::string.
14148         * symfile.c (separate_debug_file_exists): Change parameter to
14149         std::string.
14150         (find_separate_debug_file): Return std::string.
14151         (find_separate_debug_file_by_debuglink): Return std::string.
14152         * symfile.h (find_separate_debug_file_by_debuglink): Return
14153         std::string.
14154
14155 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14156
14157         * common/xml-utils.c (xml_escape_text): Move code to...
14158         (xml_escape_text_append): ... this new function.
14159         * common/xml-utils.h (xml_escape_text_append): New declaration.
14160         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14161         New function.
14162         (_initialize_xml_utils): register test_xml_escape_text_append as
14163         a selftest.
14164
14165 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
14166
14167         * defs.h: Remove MAX_REGISTER_SIZE.
14168         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14169         asserts.
14170         * python/py-unwind.c (pyuw_sniffer): Likewise.
14171
14172 2018-03-07  Tom Tromey  <tom@tromey.com>
14173
14174         * linux-tdep.c (linux_info_proc): Update.
14175         * target.h (struct target_ops) <to_fileio_readlink>: Return
14176         optional<string>.
14177         (target_fileio_readlink): Return optional<string>.
14178         * remote.c (remote_hostio_readlink): Return optional<string>.
14179         * inf-child.c (inf_child_fileio_readlink): Return
14180         optional<string>.
14181         * target.c (target_fileio_readlink): Return optional<string>.
14182
14183 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
14184
14185         * regcache.c (cooked_read_test): Add riscv to the list of
14186         architectures that have a save_reggroup.
14187
14188 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14189
14190         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14191         value is not a dynamic class object.
14192
14193 2018-03-06  Tom Tromey  <tom@tromey.com>
14194
14195         * rust-exp.y: Formatting fixes.
14196
14197 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14198
14199         * riscv-tdep.c (riscv_register_name): Remove target description
14200         support.
14201         (riscv_gdbarch_init): Remove target description check.
14202
14203 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14204
14205         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14206         comment.
14207         * riscv-tdep.h: Likewise.
14208
14209 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14210
14211         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14212         (riscv_pseudo_register_write): Delete.
14213         (riscv_gdbarch_init): Remove all use of pseudo registers.
14214
14215 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14216
14217         * record-btrace.c (btrace_print_lines): Replace cleanup
14218         parameter with RAII equivalents.
14219         (btrace_insn_history): Replace cleanup with RAII equivalents.
14220         * ui-out.h (make_cleanup_ui_out_list_begin_end,
14221         make_cleanup_ui_out_tuple_begin_end): Remove.
14222         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14223         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14224         make_cleanup_ui_out_list_begin_end): Remove.
14225
14226 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14227
14228         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14229         parameter types to std::vector.  Use bool.
14230         (record_btrace_wait): Replace VEC(tp_t) with
14231         std::vector<thread_info *>.
14232         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14233
14234 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14235
14236         * record-btrace.c (record_btrace_disable_callback): Remove.
14237         (struct scoped_btrace_disable): New.
14238         (record_btrace_open): Use scoped_btrace_disable.
14239
14240 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14241
14242         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14243         reading values from registers.
14244
14245 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14246
14247         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14248         where appropriate.
14249
14250 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14251
14252         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14253         change parameter type.  Use GDB's print functions, and use
14254         core_addr_to_string where appropriate.
14255         (riscv_push_dummy_call): Use core_addr_to_string where
14256         appropriate, update call to riscv_print_arg_location, and reindent
14257         a few lines.
14258         (riscv_return_value): Update call to riscv_print_arg_location.
14259
14260 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14261             Tim Newsome <tim@sifive.com>
14262             Albert Ou <a0u@eecs.berkeley.edu>
14263             Darius Rad <darius@bluespec.com>
14264
14265         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14266         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14267         (ALLDEPFILES): Add riscv-tdep.c
14268         * configure.tgt: Add riscv support.
14269         * riscv-tdep.c: New file.
14270         * riscv-tdep.h: New file.
14271         * NEWS: Mention new target.
14272         * MAINTAINERS: Add entry for riscv.
14273
14274 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14275
14276         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14277         fields within aggregates.
14278
14279 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
14280
14281         * record-btrace.c (btrace_print_lines): Change type of flags to
14282         gdb_disassembly_flags.
14283
14284 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14285
14286         * fbsd-nat.c: Include "inf-ptrace.h".
14287         (USE_SIGTRAP_SIGINFO): Conditionally define.
14288         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14289         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14290         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14291         function.
14292         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14293         Likewise.
14294         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14295         Likewise.
14296         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14297         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14298         "supports_stopped_by_hw_breakpoint" target methods.
14299
14300 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14301
14302         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14303         * fbsd-nat.c (debug_fbsd_nat): New variable.
14304         (show_fbsd_nat_debug): New function.
14305         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14306         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14307
14308 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14309
14310         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14311         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14312         prototype.
14313         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14314         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14315         method.
14316
14317 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14318
14319         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14320         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14321
14322 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14323
14324         * charset.c (struct charset_vector): New.
14325         (charsets): Change type to charset_vector.
14326         (find_charset_names): Adjust.
14327         (add_one): Adjust.
14328         (_initialize_charset): Adjust.
14329
14330 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14331
14332         * progspace.h (struct program_space) <deleted_solibs>: Change
14333         type to std::vector<std::string>.
14334         * progspace.c (clear_program_space_solib_cache): Adjust.
14335         * breakpoint.c (print_solib_event): Adjust.
14336         (check_status_catch_solib): Adjust.
14337         * solib.c (update_solib_list): Adjust.
14338         * ui-out.h (class ui_out) <field_string>: New overload.
14339         * ui-out.c (ui_out::field_string): New overload.
14340
14341 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14342
14343         * progspace.h (struct program_space): Add constructor and
14344         destructor, initialize fields.
14345         (add_program_space): Remove.
14346         * progspace.c (add_program_space): Rename to...
14347         (program_space::program_space): ... this.
14348         (release_program_space): Rename to...
14349         (program_space::~program_space): ... this.
14350         (delete_program_space): Use delete to delete program_space.
14351         (initialize_progspace): Use new to allocate program_space.
14352         * inferior.c (add_inferior_with_spaces): Likewise.
14353         (clone_inferior_command): Likewise.
14354         * infrun.c (follow_fork_inferior): Likewise.
14355         (handle_vfork_child_exec_or_exit): Likewise.
14356
14357 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14358
14359         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14360         (delim_string_to_char_ptr_vec): Return std::vector of
14361         gdb::unique_xmalloc_ptr.
14362         (dirnames_to_char_ptr_vec_append): Take std::vector of
14363         gdb::unique_xmalloc_ptr.
14364         (dirnames_to_char_ptr_vec): Return std::vector of
14365         gdb::unique_xmalloc_ptr.
14366         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14367         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14368         (delim_string_to_char_ptr_vec): Return an std::vector of
14369         gdb::unique_xmalloc_ptr, adjust the code.
14370         (dirnames_to_char_ptr_vec_append): Take an std::vector of
14371         gdb::unique_xmalloc_ptr, adjust the code.
14372         (dirnames_to_char_ptr_vec): Return an std::vector of
14373         gdb::unique_xmalloc_ptr, adjust the code.
14374         * auto-load.c (auto_load_safe_path_vec): Change type to
14375         std::vector of gdb::unique_xmalloc_ptr.
14376         (auto_load_expand_dir_vars): Return an std::vector of
14377         gdb::unique_xmalloc_ptr, adjust the code.
14378         (auto_load_safe_path_vec_update): Adjust.
14379         (filename_is_in_auto_load_safe_path_vec): Adjust.
14380         (auto_load_objfile_script_1): Adjust.
14381         * build-id.c (build_id_to_debug_bfd): Adjust.
14382         * linux-thread-db.c (thread_db_load_search): Adjust.
14383         * source.c (add_path): Adjust.
14384         (openp): Adjust.
14385         * symfile.c (find_separate_debug_file): Adjust.
14386         * utils.c (do_free_char_ptr_vec): Remove.
14387         (make_cleanup_free_char_ptr_vec): Remove.
14388
14389 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14390
14391         PR gdb/22907
14392         * common/pathstuff.c: Conditionally include "<windows.h>".
14393
14394 2018-03-01  Georg Sauthoff  <mail@georg.so>
14395
14396         PR gdb/22888
14397         * gcore.in: Quote variables and switch interpreter to bash.
14398
14399 2018-03-01  Tom Tromey  <tom@tromey.com>
14400
14401         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14402         assertion.  Add assertion for discriminant_index.
14403         (quirk_rust_enum): Use correct base type name in univariant case.
14404
14405 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14406
14407         * record.c (get_call_history_modifiers): Return a
14408         record_print_flags.
14409         (cmd_record_call_history): Adjust.
14410         * record-btrace.c (record_btrace_call_history): Adjust.
14411         (record_btrace_call_history_range): Adjust.
14412         (record_btrace_call_history_from): Adjust.
14413         * target-debug.h (target_debug_print_record_print_flags): New.
14414         * target-delegates.c: Re-generate.
14415         * target.c (target_call_history): Change flags type.
14416         (target_call_history_from): Likewise.
14417         (target_call_history_range): Likewise.
14418         * target.h (struct target_ops) <target_call_history>: Likewise.
14419         (target_call_history_from): Likewise.
14420         (target_call_history_range): Likewise.
14421
14422 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14423             Simon Marchi  <simon.marchi@polymtl.ca>
14424
14425         * common/common-utils.c: Include "sys/stat.h".
14426         (is_regular_file): Move here from "source.c"; change return
14427         type to "bool".
14428         * common/common-utils.h (is_regular_file): New prototype.
14429         * common/pathstuff.c (contains_dir_separator): New function.
14430         * common/pathstuff.h (contains_dir_separator): New prototype.
14431         * source.c: Don't include "sys/stat.h".
14432         (is_regular_file): Move to "common/common-utils.c".
14433
14434 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14435
14436         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14437         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14438         * auto-load.c: Include "common/pathstuff.h".
14439         * common/common-def.h (current_directory): Move here.
14440         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14441         function.
14442         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14443         prototype.
14444         * common/pathstuff.c: New file.
14445         * common/pathstuff.h: New file.
14446         * compile/compile.c: Include "common/pathstuff.h".
14447         * defs.h (current_directory): Move to "common/common-defs.h".
14448         * dwarf2read.c: Include "common/pathstuff.h".
14449         * exec.c: Likewise.
14450         * guile/scm-safe-call.c: Likewise.
14451         * linux-thread-db.c: Likewise.
14452         * main.c: Likewise.
14453         * nto-tdep.c: Likewise.
14454         * objfiles.c: Likewise.
14455         * source.c: Likewise.
14456         * symtab.c: Likewise.
14457         * utils.c: Include "common/pathstuff.h".
14458         (gdb_realpath): Move to "common/pathstuff.c".
14459         (gdb_realpath_keepfile): Likewise.
14460         (gdb_abspath): Likewise.
14461         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14462         (gdb_realpath_keepfile): Likewise.
14463         (gdb_abspath): Likewise.
14464
14465 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14466
14467         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14468         wildcard process pid for super_resume for kernels with a
14469         specific bug.
14470
14471 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14472
14473         * compile/compile.c (get_args): Add additional comments
14474         explaining function.
14475
14476 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14477             Tom Tromey  <tom@tromey.com>
14478
14479         * target.h (memory_write_request_s): Remove typedef.  Don't define
14480         VEC.
14481         (target_write_memory_blocks): Change argument to std::vector.
14482         (struct memory_write_request): Add constructor.
14483         * target-memory.c (compare_block_starting_address): Return bool.
14484         Change argument types.
14485         (claim_memory): Change arguments to use std::vector.
14486         (split_regular_and_flash_blocks, blocks_to_erase)
14487         (compute_garbled_blocks): Likewise.
14488         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14489         (target_write_memory_blocks): Change argument to std::vector.
14490         * symfile.c (struct load_section_data): Add constructor and
14491         destructor.  Use std::vector for "requests".
14492         (struct load_progress_data): Add initializers.
14493         (load_section_callback): Update.  Use "new".
14494         (clear_memory_write_data): Remove.
14495         (generic_load): Update.
14496
14497 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14498
14499         * arch/aarch64.h: Use common/tdesc.h.
14500
14501 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14502
14503         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14504         architecture with a 64-bit ABI.
14505
14506 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14507
14508         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14509         ahead of target description loading.
14510
14511 2018-02-26  Tom Tromey  <tom@tromey.com>
14512
14513         * stack.c (backtrace_command_1): Update.
14514         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14515         of "flags".
14516         * python/py-framefilter.c (py_print_frame)
14517         (gdbpy_apply_frame_filter): Change type of "flags".
14518         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14519         of "flags".
14520         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14521         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14522         * extension.h (enum frame_filter_flag): Rename from
14523         frame_filter_flags.
14524         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14525         (apply_ext_lang_frame_filter): Change type of "flags".
14526         * extension.c (apply_ext_lang_frame_filter): Change type of
14527         "flags".
14528         * extension-priv.h (struct extension_language_ops)
14529         <apply_frame_filter>: Change type of "flags".
14530
14531 2018-02-26  Tom Tromey  <tom@tromey.com>
14532
14533         PR python/16497:
14534         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14535         off-by-one in py_end computation.
14536         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14537         PRINT_MORE_FRAMES.
14538         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14539         constant.
14540
14541 2018-02-26  Tom Tromey  <tom@tromey.com>
14542
14543         * dwarf2read.c (struct variant_field): New.
14544         (struct nextfield) <variant>: New field.
14545         (dwarf2_add_field): Handle DW_TAG_variant_part.
14546         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14547         discriminated union.
14548         (read_structure_type): Handle DW_TAG_variant_part.
14549         (handle_struct_member_die): New function, extracted from
14550         process_structure_scope.  Handle DW_TAG_variant.
14551         (process_structure_scope): Handle discriminated unions.  Call
14552         handle_struct_member_die.
14553
14554 2018-02-26  Tom Tromey  <tom@tromey.com>
14555
14556         * rust-lang.h (rust_last_path_segment): Declare.
14557         * rust-lang.c (rust_last_path_segment): Now public.  Change
14558         contract.
14559         (struct disr_info): Remove.
14560         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14561         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14562         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14563         (rust_enum_p, rust_enum_variant): New function.
14564         (rust_underscore_fields): Remove "offset" parameter.
14565         (rust_print_enum): New function.
14566         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14567         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14568         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14569         enums.
14570         (rust_internal_print_type): New function, from rust_print_type.
14571         Remove enum code.
14572         (rust_print_type): Call rust_internal_print_type.
14573         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14574         Update enum handling.
14575         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14576         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14577         (rust_union_quirks): New functions.
14578         (process_full_comp_unit, process_full_type_unit): Call
14579         rust_union_quirks.
14580         (process_structure_scope): Update rust_unions if necessary.
14581
14582 2018-02-26  Tom Tromey  <tom@tromey.com>
14583
14584         * value.h (value_union_variant): Declare.
14585         * valops.c (value_union_variant): New function.
14586         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14587         (struct discriminant_info): New.
14588         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14589         enumerator.
14590         (struct main_type) <flag_discriminated_union>: New field.
14591
14592 2018-02-26  Tom Tromey  <tom@tromey.com>
14593
14594         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14595         unittests/unpack-selftests.c.
14596         * unittests/unpack-selftests.c: New file.
14597         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14598
14599 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14600
14601         * dwarf2read.c (struct partial_die_info) <read>: New method.
14602         (read_partial_die): Remove the declaration.
14603         (load_partial_dies): Update.
14604         (partial_die_info::partial_die_info):
14605         (read_partial_die): Change it to partial_die_info::read.
14606
14607 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14608
14609         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14610         (fixup_partial_die): Remove declaration.
14611         (scan_partial_symbols): Update.
14612         (partial_die_parent_scope): Likewise.
14613         (partial_die_full_name): Likewise.
14614         (fixup_partial_die): Change it to partial_die_info::fixup.
14615
14616 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14617
14618         * dwarf2read.c (read_partial_die): Update the declaration.
14619         (load_partial_dies): Caller update.
14620         (read_partial_die): Remove one argument abbrev_len.
14621
14622 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14623
14624         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14625         assignment operator.
14626         (load_partial_dies): Use ctor and copy ctor.
14627         (read_partial_die): Update.
14628         (dwarf2_cu::find_partial_die): Use ctor.
14629
14630 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14631
14632         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14633         (find_partial_die_in_comp_unit): Change it to
14634         dwarf2_cu::find_partial_die.
14635         (find_partial_die): Update.
14636
14637 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14638
14639         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14640         is NULL.
14641
14642 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14643
14644         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14645
14646 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14647
14648         * arch/amd64.h: Use common/tdesc.h.
14649         * arch/i386.c: Likewise.
14650         * arch/i386.h: Likewise.
14651         * arch/tic6x.c: Likewise.
14652         * arch/tdesc.h: Move file from here...
14653         * common/tdesc.h: ...to here.
14654         * features/aarch64-core.c: Regenerate.
14655         * features/aarch64-fpu.c: Regenerate.
14656         * features/i386/32bit-avx.c: Regenerate.
14657         * features/i386/32bit-avx512.c: Regenerate.
14658         * features/i386/32bit-core.c: Regenerate.
14659         * features/i386/32bit-linux.c: Regenerate.
14660         * features/i386/32bit-mpx.c: Regenerate.
14661         * features/i386/32bit-pkeys.c: Regenerate.
14662         * features/i386/32bit-sse.c: Regenerate.
14663         * features/i386/64bit-avx.c: Regenerate.
14664         * features/i386/64bit-avx512.c: Regenerate.
14665         * features/i386/64bit-core.c: Regenerate.
14666         * features/i386/64bit-linux.c: Regenerate.
14667         * features/i386/64bit-mpx.c: Regenerate.
14668         * features/i386/64bit-pkeys.c: Regenerate.
14669         * features/i386/64bit-segments.c: Regenerate.
14670         * features/i386/64bit-sse.c: Regenerate.
14671         * features/i386/x32-core.c: Regenerate.
14672         * features/tic6x-c6xp.c: Regenerate.
14673         * features/tic6x-core.c: Regenerate.
14674         * features/tic6x-gp.c: Regenerate.
14675         * target-descriptions.c: Use common/tdesc.h.
14676         * target-descriptions.h: Likewise.
14677
14678 2018-02-24  Tom Tromey  <tom@tromey.com>
14679
14680         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14681         (try_thread_db_load_from_dir, thread_db_load_search): Use
14682         std::string.
14683         (info_auto_load_libthread_db_compare): Return bool.  Change
14684         argument types.
14685         (info_auto_load_libthread_db): Use std::vector, std::string.
14686         Remove cleanups.
14687
14688 2018-02-24  Tom Tromey  <tom@tromey.com>
14689
14690         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14691         std::string.
14692         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14693         std::string*.
14694         * gdbarch.c: Rebuild.
14695         * gdbarch.h: Rebuild.
14696         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14697         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14698         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14699         std::string*.
14700
14701 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14702
14703         * gdbtypes.h (sect_offset): Change type to uint64_t.
14704         (sect_offset_str): New function.
14705         * dwarf2read.c (create_addrmap_from_aranges): Use
14706         sect_offset_str.
14707         (error_check_comp_unit_head): Likewise.
14708         (create_debug_type_hash_table): Likewise.
14709         (read_cutu_die_from_dwo): Likewise.
14710         (init_cutu_and_read_dies): Likewise.
14711         (init_cutu_and_read_dies_no_follow): Likewise.
14712         (process_psymtab_comp_unit_reader): Likewise.
14713         (partial_die_parent_scope): Likewise.
14714         (peek_die_abbrev): Likewise.
14715         (process_queue): Likewise.
14716         (dwarf2_physname): Likewise.
14717         (read_namespace_alias): Likewise.
14718         (read_import_statement): Likewise.
14719         (create_dwo_cu_reader): Likewise.
14720         (create_cus_hash_table): Likewise.
14721         (lookup_dwo_cutu): Likewise.
14722         (inherit_abstract_dies): Likewise.
14723         (read_func_scope): Likewise.
14724         (read_call_site_scope): Likewise.
14725         (dwarf2_add_member_fn): Likewise.
14726         (read_common_block): Likewise.
14727         (read_module_type): Likewise.
14728         (read_typedef): Likewise.
14729         (read_subrange_type): Likewise.
14730         (load_partial_dies): Likewise.
14731         (read_partial_die): Likewise.
14732         (find_partial_die): Likewise.
14733         (read_str_index): Likewise.
14734         (dwarf2_string_attr): Likewise.
14735         (build_error_marker_type): Likewise.
14736         (lookup_die_type): Likewise.
14737         (dump_die_shallow): Likewise.
14738         (follow_die_ref): Likewise.
14739         (dwarf2_fetch_die_loc_sect_off): Likewise.
14740         (dwarf2_fetch_constant_bytes): Likewise.
14741         (follow_die_sig): Likewise.
14742         (get_signatured_type): Likewise.
14743         (get_DW_AT_signature_type): Likewise.
14744         (dwarf2_find_containing_comp_unit): Likewise.
14745         (set_die_type): Likewise.
14746
14747 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14748
14749         * arch/aarch64.c: Include "common-defs.h".
14750         * arch/amd64.c: Likewise.
14751         * arch/i386.c: Likewise.
14752
14753 2018-02-21  Tom Tromey  <tom@tromey.com>
14754
14755         * value.h: (extract_field_op): Update.
14756         * eval.c (extract_field_op): Return a const char *.
14757         * expression.h (parse_expression_for_completion): Update.
14758         * completer.c (complete_expression): Update.
14759         (add_struct_fields): Make fieldname const.
14760         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14761         (mark_completion_tag, parse_exp_in_context_1): Update.
14762         (parse_expression_for_completion): Change "name" to
14763         unique_xmalloc_ptr*.
14764
14765 2018-02-21  Tom Tromey  <tom@tromey.com>
14766
14767         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14768
14769 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14770
14771         * avr-tdep.c (avr_read_pc): Change parameter type to
14772         readable_regcache.
14773         * gdbarch.sh (read_pc): Likewise.
14774         * gdbarch.c: Re-generated.
14775         * gdbarch.h: Re-generated.
14776         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14777         readable_regcache.
14778         * ia64-tdep.c (ia64_read_pc): Likewise.
14779         * mips-tdep.c (mips_read_pc): Likewise.
14780         * spu-tdep.c (spu_read_pc): Likewise.
14781
14782 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14783
14784         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14785         * regcache-dump.c: New file.
14786         * regcache.c: Move register_dump to regcache-dump.c.
14787         (maintenance_print_registers): Likewise.
14788         (maintenance_print_raw_registers): Likewise.
14789         (maintenance_print_cooked_registers): Likewise.
14790         (maintenance_print_register_groups): Likewise.
14791         (maintenance_print_remote_registers): Likewise.
14792         (_initialize_regcache): Likewise.
14793         * regcache.h (register_dump): Moved from regcache.c.
14794
14795 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14796
14797         * regcache.c (regcache::regcache): Update.
14798         (regcache::invalidate): Move it to detached_regcache::invalidate.
14799         (get_thread_arch_aspace_regcache): Update.
14800         (regcache::raw_update): Update.
14801         (regcache::cooked_read): Remove some code.
14802         (regcache::cooked_read_value): Likewise.
14803         (regcache::raw_write): Remove assert on m_readonly_p.
14804         (regcache::raw_supply_integer): Move it to
14805         detached_regcache::raw_supply_integer.
14806         (regcache::raw_supply_zeroed): Likewise.
14807         * regcache.h (detached_regcache) <raw_supply_integer>: New
14808         declaration.
14809         <raw_supply_zeroed, invalidate>: Likewise.
14810         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14811         <invalidate>: Likewise.
14812         <m_readonly_p>: Removed.
14813
14814 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14815
14816         * infcmd.c (get_return_value): Let stop_regs point to
14817         get_current_regcache.
14818         * regcache.c (regcache::regcache): Remove.
14819         (register_dump_reg_buffer): New class.
14820         (regcache_print): Adjust.
14821         * regcache.h (regcache): Remove constructors.
14822
14823 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14824
14825         * regcache.c (class register_dump): New class.
14826         (register_dump_regcache, register_dump_none): New class.
14827         (register_dump_remote, register_dump_groups): New class.
14828         (regcache_print): Update.
14829         * regcache.h (regcache_dump_what): Move it to regcache.c.
14830         (regcache) <dump>: Remove.
14831
14832 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14833
14834         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14835          reg_buffer_rw *.
14836         (jit_unwind_reg_set_impl): Call raw_supply.
14837         (jit_frame_sniffer): Use reg_buffer_rw.
14838         * record-full.c (record_full_core_regbuf): Change its type.
14839         (record_full_core_open_1): Use reg_buffer_rw.
14840         (record_full_close): Likewise.
14841         (record_full_core_fetch_registers): Use regcache->raw_supply.
14842         (record_full_core_store_registers): Likewise.
14843         * regcache.c (regcache::get_register_status): Move it to
14844         reg_buffer.
14845         (regcache_raw_set_cached_value): Remove.
14846         (regcache::raw_set_cached_value): Remove.
14847         (regcache::raw_write): Call raw_supply.
14848         (regcache::raw_supply): Move it to reg_buffer_rw.
14849         * regcache.h (regcache_raw_set_cached_value): Remove.
14850         (reg_buffer_rw): New class.
14851
14852 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14853
14854         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14855         readonly_detached_regcache.
14856         (dummy_frame_prev_register): Use regcache->cooked_read.
14857         * frame.c (frame_save_as_regcache): Change return type.
14858         (frame_pop): Update.
14859         * frame.h (frame_save_as_regcache): Update declaration.
14860         * inferior.h (get_infcall_suspend_state_regcache): Update
14861         declaration.
14862         * infrun.c (infcall_suspend_state) <registers>: use
14863         readonly_detached_regcache.
14864         (save_infcall_suspend_state): Don't use regcache_dup.
14865         (get_infcall_suspend_state_regcache): Change return type.
14866         * linux-fork.c (struct fork_info) <savedregs>: Change to
14867         readonly_detached_regcache.
14868         <pc>: New field.
14869         (fork_save_infrun_state): Don't use regcache_dup.
14870         (info_checkpoints_command): Adjust.
14871         * mi/mi-main.c (register_changed_p): Update declaration.
14872         (mi_cmd_data_list_changed_registers): Use
14873         readonly_detached_regcache.
14874         (register_changed_p): Change parameter type to
14875         readonly_detached_regcache.
14876         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14877         readonly_detached_regcache.
14878         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14879         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14880         New.
14881         (regcache::save): Move it to reg_buffer.
14882         (regcache::restore): Change parameter type.
14883         (regcache_dup): Remove.
14884         * regcache.h (reg_buffer) <save>: New method.
14885         (readonly_detached_regcache): New class.
14886         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14887         readonly_detached_regcache.
14888         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14889
14890 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14891
14892         * frame.c (frame_save_as_regcache): Use regcache method save.
14893         (frame_pop): Use regcache method restore.
14894         * infrun.c (restore_infcall_suspend_state): Likewise.
14895         * linux-fork.c (fork_load_infrun_state): Likewise.
14896         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14897         save.
14898         * regcache.c (regcache_save): Remove.
14899         (regcache::restore): More asserts.
14900         (regcache_cpy): Remove.
14901         * regcache.h (regcache_save): Remove the declaration.
14902         (regcache::restore): Move from private to public.
14903         Remove the friend declaration of regcache_cpy.
14904         (regcache_cpy): Remove declaration.
14905
14906 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14907
14908         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14909         parameter type to 'readable_regcache *'.
14910         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14911         * arm-tdep.c (arm_neon_quad_read): Likewise.
14912         (arm_pseudo_read): Likewise.
14913         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14914         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14915         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14916         * gdbarch.c: Re-generated.
14917         * gdbarch.h: Re-generated.
14918         * gdbarch.sh (pseudo_register_read): Change parameter type to
14919         'readable_regcache *'.
14920         (pseudo_register_read_value): Likewise.
14921         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14922         (h8300_pseudo_register_read): Likewise.
14923         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14924         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14925         (i386_pseudo_register_read_into_value): Likewise.
14926         (i386_pseudo_register_read_value): Likewise.
14927         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14928         declaration.
14929         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14930         * m32c-tdep.c (m32c_raw_read): Likewise.
14931         (m32c_read_flg): Likewise.
14932         (m32c_banked_register): Likewise.
14933         (m32c_banked_read): Likewise.
14934         (m32c_sb_read): Likewise.
14935         (m32c_part_read): Likewise.
14936         (m32c_cat_read): Likewise.
14937         (m32c_r3r2r1r0_read): Likewise.
14938         (m32c_pseudo_register_read): Likewise.
14939         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14940         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14941         (mep_pseudo_cr64_read): Likewise.
14942         (mep_pseudo_register_read): Likewise.
14943         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14944         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14945         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14946         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14947         (regcache::cooked_read): Likewise.
14948         (regcache::cooked_read_value): Likewise.
14949         (regcache_cooked_read_signed):
14950         (regcache::cooked_read): Likewise.
14951         * regcache.h (readable_regcache): New class.
14952         (regcache): Inherit readable_regcache.  Move some methods to
14953         readable_regcache.
14954         * rl78-tdep.c (rl78_pseudo_register_read): Change
14955         parameter type to 'readable_regcache *'.
14956         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14957         (e500_pseudo_register_read): Change parameter type to
14958         'readable_regcache *'.
14959         (dfp_pseudo_register_read): Likewise.
14960         (vsx_pseudo_register_read): Likewise.
14961         (efpr_pseudo_register_read): Likewise.
14962         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14963         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14964         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14965         (sh64_pseudo_register_read): Likewise.
14966         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14967         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14968         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14969         (spu_pseudo_register_read): Likewise.
14970         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14971         (xtensa_pseudo_register_read): Likewise.
14972
14973 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14974
14975         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14976         (regcache::arch): Move it to reg_buffer::arch.
14977         (regcache::register_buffer): Likewise.
14978         (regcache::assert_regnum): Likewise.
14979         (regcache::num_raw_registers): Likewise.
14980         * regcache.h (reg_buffer): New class.
14981         (regcache): Inherit reg_buffer.
14982
14983 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14984
14985         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14986         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14987
14988 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14989
14990         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14991
14992 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14993
14994         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14995         (SFILES): Remove common/*.c files.
14996         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14997         * common/common.host: Add common reference.
14998         * configure.ac: Likewise.
14999         * configure: Regenerate.
15000
15001 2018-02-16  Yao Qi  <yao.qi@linaro.org>
15002
15003         * block.c (block_namespace_info): Inherit allocate_on_obstack.
15004         (block_initialize_namespace): Use new.
15005         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15006         (dwarf2_free_objfile): Use delete.
15007         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15008         (copy_type_recursive): Use new.
15009         * gdb_obstack.h (allocate_on_obstack): New.
15010
15011 2018-02-15  Yao Qi  <yao.qi@linaro.org>
15012
15013         PR gdb/22849
15014         * inferior.c (exit_inferior_1): Reset inf->control.
15015
15016 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
15017
15018         * ada-lang.c (ada_to_fixed_value_create): Delete advance
15019         declaration.
15020
15021 2018-02-14  Pedro Alves  <palves@redhat.com>
15022
15023         * frame-unwind.c (frame_unwind_try_unwinder): Always call
15024         frame_cleanup_after_sniffer on exception.
15025
15026 2018-02-14  Tom Tromey  <tom@tromey.com>
15027
15028         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15029         const.
15030         (solib_bfd_open): Make pathname const.
15031         * solib.c (solib_bfd_open): Make pathname const.
15032         * solib-spu.c (spu_bfd_fopen): Make name const.
15033         (spu_bfd_open): Make pathname const.
15034         * solib-darwin.c (darwin_bfd_open): Make pathname const.
15035         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15036
15037 2018-02-14  Tom Tromey  <tom@tromey.com>
15038
15039         * symfile.c (symfile_bfd_open): Update.
15040         * source.h (openp, source_full_path_of, find_and_open_source):
15041         Change argument type to unique_xmalloc_ptr.
15042         * source.c (openp): Take a unique_xmalloc_ptr.
15043         (source_full_path_of, find_and_open_source): Likewise.
15044         (open_source_file, symtab_to_fullname): Update.
15045         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15046         unique_xmalloc_ptr.
15047         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15048         (exec_file_find): Update.
15049         * psymtab.c (psymtab_to_fullname): Update.
15050         * nto-tdep.h (nto_find_and_open_solib): Update.
15051         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15052         unique_xmalloc_ptr.
15053         * exec.c (exec_file_attach): Update.
15054         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15055         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15056
15057 2018-02-14  Tom Tromey  <tom@tromey.com>
15058
15059         * solib.c: Include source.h.
15060         * nto-tdep.c: Include source.h.
15061         * mi/mi-cmd-env.c: Include source.h.
15062         * infcmd.c: Include source.h.
15063         * exec.c: Include source.h.
15064         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15065         (add_path, directory_switch, source_path, init_source_path): Move
15066         declarations...
15067         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15068         (add_path, directory_switch, source_path, init_source_path):
15069         ...here.
15070
15071 2018-02-14  Tom Tromey  <tom@tromey.com>
15072
15073         * solist.h (exec_file_find, solib_find): Return
15074         unique_xmalloc_ptr.
15075         (solib_bfd_fopen): Take a const char *.
15076         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15077         (exec_file_find, solib_find): Likewise.
15078         (solib_bfd_fopen): Do not take ownership of "pathname".
15079         (solib_bfd_open): Use unique_xmalloc_ptr.
15080         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15081         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15082         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15083         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15084
15085 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
15086
15087         * ada-lang.c (name_match_type_from_name): Remove reference to
15088         ada_name_for_lookup in function's documentation.
15089         * ada-lang.h (ada_name_for_lookup): Delete declaration.
15090
15091 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15092
15093         * defs.h (enum openp_flags): New enum.
15094         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15095         Move to enum openp_flags.
15096         (openp_flags): New enum flags.
15097         (openp): Change parameter type to openp_flags.
15098         * source.c (openp): Change parameter type to openp_flags.
15099         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15100         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15101
15102 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15103
15104         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15105         per-command.
15106
15107 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
15108
15109         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15110         into...
15111         (class dwarf2_queue_guard): ...the destructor of this new class.
15112         (dw2_do_instantiate_symtab): Create instance of the new class
15113         dwarf2_queue_guard, remove cleanup.
15114
15115 2018-02-09  Tom Tromey  <tom@tromey.com>
15116
15117         * source.c (find_source_lines): Don't reference past the end of
15118         the vector.
15119
15120 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15121
15122         * remote.c (remote_btrace_maybe_reopen): Change error message.
15123         * btrace.c (btrace_enable): Likewise.
15124         (parse_xml_btrace): Likewise.
15125         (parse_xml_btrace_conf): Likewise.
15126
15127 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15128
15129         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15130         (linux_enable_pt, linux_enable_bts): Call
15131         diagnose_perf_event_open_fail.
15132
15133 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15134
15135         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15136         Remove parameter and change return type.  Update callers.  Move it.
15137         (linux_enable_bts, linux_enable_pt): Improve error message.
15138         (linux_enable_pt): Remove zero buffer size check.
15139         (linux_enable_btrace): Improve error messages.  Remove NULL return
15140         check.
15141
15142 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15143
15144         * btrace.c (btrace_enable): Remove target_supports_btrace call.
15145         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15146         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15147         (linux_supports_pt, linux_supports_btrace): Remove.
15148         (linux_enable_bts): Call cpu_supports_bts.
15149         * nat/linux-btrace.h (linux_supports_btrace): Remove.
15150         * remote.c (remote_supports_btrace): Remove.
15151         (init_remote_ops): Remove remote_supports_btrace.
15152         * target-delegates.c: Regenerated.
15153         * target.c (target_supports_btrace): Remove.
15154         * target.h (target_ops) <to_supports_btrace>: Remove
15155         (target_supports_btrace): Remove.
15156         * x86-linux-nat.c (x86_linux_create_target): Remove
15157         linux_supports_btrace.
15158
15159 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15160
15161         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15162         btrace failed.
15163         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15164         exception and use message in own exception.
15165
15166 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15167
15168         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15169         (perf_event_pt_event_type): Use gdb_file_up.
15170         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15171         scoped_fd, and scoped_mmap.
15172
15173 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15174
15175         * common/scoped_mmap.h: New.
15176         * unittests/scoped_mmap-selftest.c: New.
15177         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15178         unittests/scoped_mmap-selftest.c.
15179
15180 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15181
15182         * common/scoped_fd.h: New.
15183         * unittests/scoped_fd-selftest.c: New.
15184         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15185         unittests/scoped_fd-selftest.c.
15186
15187 2018-02-09  Tom Tromey  <tom@tromey.com>
15188
15189         * auto-load.c (auto_load_section_scripts): Use
15190         gdb::unique_xmalloc_ptr.
15191
15192 2018-02-09  Tom Tromey  <tom@tromey.com>
15193
15194         * auto-load.c (execute_script_contents): Use std::string.
15195
15196 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
15197
15198         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15199         Python function, rather than a new command.
15200
15201 2018-02-08  Tom Tromey  <tom@tromey.com>
15202
15203         * solib.c (solib_find_1): Use std::string.
15204         (solib_bfd_fopen): Use unique_xmalloc_ptr.
15205
15206 2018-02-08  Tom Tromey  <tom@tromey.com>
15207
15208         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15209
15210 2018-02-08  Tom Tromey  <tom@tromey.com>
15211
15212         * source.c (find_source_lines): Use gdb::def_vector.
15213
15214 2018-02-08  Tom Tromey  <tom@tromey.com>
15215
15216         * macrocmd.c (struct temporary_macro_definition): New.
15217         (macro_define_command): Use temporary_macro_definition.  Remove
15218         cleanups.
15219         (free_macro_definition_ptr): Remove.
15220
15221 2018-02-08  Tom Tromey  <tom@tromey.com>
15222
15223         * macroexp.c (maybe_expand): Use std::string.
15224
15225 2018-02-08  Tom Tromey  <tom@tromey.com>
15226
15227         * macroexp.c (struct macro_buffer): Add initializers for some
15228         members.
15229         (init_buffer, init_shared_buffer, free_buffer)
15230         (free_buffer_return_text): Remove.
15231         (macro_buffer): New constructors.
15232         (~macro_buffer): New destructor.
15233         (macro_buffer::set_shared): New method.
15234         (macro_buffer::resize_buffer, macro_buffer::appendc)
15235         (macro_buffer::appendmem): Now methods, not free functions.
15236         (set_token, append_tokens_without_splicing, stringify)
15237         (macro_stringify): Update.
15238         (gather_arguments): Change return type.  Remove argc_p argument,
15239         add args_ptr argument.  Use std::vector.
15240         (substitute_args): Remove argc argument.  Accept std::vector.
15241         (expand): Update.  Use std::vector.
15242         (scan, macro_expand, macro_expand_next): Update.
15243
15244 2018-02-08  Tom Tromey  <tom@tromey.com>
15245
15246         * symtab.c (default_collect_symbol_completion_matches_break_on):
15247         Use unique_xmalloc_ptr.
15248         * macroscope.h: (sal_macro_scope, user_macro_scope)
15249         (default_macro_scope): Return unique_xmalloc_ptr.
15250         * macroscope.c (sal_macro_scope, user_macro_scope)
15251         (default_macro_scope): Return unique_xmalloc_ptr.
15252         * macroexp.h (macro_expand, macro_expand_once): Return
15253         unique_xmalloc_ptr.
15254         * macroexp.c (macro_expand, macro_expand_once): Return
15255         unique_xmalloc_ptr.
15256         * macrocmd.c (macro_expand_command, macro_expand_once_command)
15257         (info_macro_command, info_macros_command): Use
15258         unique_xmalloc_ptr.
15259         * compile/compile-c-support.c (write_macro_definitions): Use
15260         unique_xmalloc_ptr.
15261         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15262
15263 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
15264
15265         * value.c (value_static_field): Assign field type instead of
15266         containing type when returning an optimized out value.
15267
15268 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15269
15270         * ft32-tdep.c (ft32_read_pc): Remove.
15271         (ft32_write_pc): Remove.
15272         (ft32_gdbarch_init): Update.
15273         * m32r-tdep.c (m32r_read_pc): Remove.
15274         (m32r_gdbarch_init): Update.
15275         * mep-tdep.c (mep_read_pc): Remove.
15276         (mep_gdbarch_init): Update.
15277         * microblaze-tdep.c (microblaze_write_pc): Remove.
15278         (microblaze_gdbarch_init): Update.
15279         * mn10300-tdep.c (mn10300_read_pc): Remove.
15280         (mn10300_write_pc): Remove.
15281         (mn10300_gdbarch_init): Update.
15282         * moxie-tdep.c (moxie_read_pc): Remove.
15283         (moxie_write_pc): Remove.
15284         (moxie_gdbarch_init): Update.
15285
15286 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15287
15288         * expprint.c (print_subexp_standard): Handle
15289         OP_F77_UNDETERMINED_ARGLIST.
15290         (dump_subexp_body_standard): Likewise.
15291
15292 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
15293
15294         * target-descriptions.c (tdesc_element_visitor) Add empty
15295         implementations.
15296         (tdesc_type): Move make_gdb_type from here.
15297         (tdesc_type_builtin): Likewise.
15298         (tdesc_type_vector): Likewise.
15299         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15300         (make_gdb_type_struct): Move from tdesc_type_with_fields.
15301         (make_gdb_type_union): Likewise.
15302         (make_gdb_type_flags): Likewise.
15303         (make_gdb_type_enum): Likewise.
15304         (make_gdb_type): New function.
15305         (tdesc_register_type): Use static make_gdb_type.
15306
15307 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
15308
15309         * infcmd.c (default_print_one_register_info): Align natural-format
15310         column values consistently one under another.
15311         (pad_to_column): New function.
15312
15313 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
15314
15315         * dwarf2read.c (dwarf2_physname): Move commment.
15316
15317 2018-02-01  Leszek Swirski  <leszeks@google.com>
15318
15319         * varobj.c (varobj_formatted_print_options): Allow recursive
15320         pretty printing if pretty printing is enabled.
15321
15322 2018-02-01  Leszek Swirski  <leszeks@google.com>
15323
15324         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15325         names after a structop as a filename.
15326
15327 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15328
15329         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15330         (arm_record_coproc_data_proc): Likewise.
15331
15332 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15333
15334         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15335
15336 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
15337
15338         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15339         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15340
15341 2018-01-31  Pedro Alves  <palves@redhat.com>
15342
15343         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15344         * inflow.c (child_terminal_save_inferior): Wrap reference to
15345         tcgetpgrp in HAVE_TERMIOS_H.
15346         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15347         _WIN32.
15348         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15349         always iterate over all inferiors.
15350         (gdbsim_cntrl_c): Adjust.
15351         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15352
15353 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15354
15355         * gdbtypes.c (lookup_array_range_type): Make sure the array's
15356         index type is objfile-owned if the element type is as well.
15357
15358 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15359
15360         GDB 8.1 released.
15361
15362 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15363
15364         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15365         "features/s390x-linux64.c".
15366         (_initialize_s390_linux_tdep): Remove initialization of tdescs
15367         s390_linux32 and s390x_linux64.
15368         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15369         default tdesc.
15370         * s390-tdep.c: Include "features/s390-linux32.c" and
15371         "features/s390x-linux64.c".
15372         (s390_tdesc_valid): Add check for tdesc_has_registers.
15373         (s390_gdbarch_init): Make sure there is always a valid tdesc.
15374         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15375         tdesc_s390x_linux64.
15376         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15377         tdesc_s390x_linux64 to...
15378         * s390-tdep.h: ...here.
15379
15380 2018-01-30  Pedro Alves  <palves@redhat.com>
15381
15382         PR gdb/13211
15383         * config.in, configure: Regenerate.
15384         * configure.ac: Check for getpgid.
15385         * go32-nat.c (go32_pass_ctrlc): New.
15386         (go32_target): Install it.
15387         * inf-child.c (inf_child_target): Install
15388         child_terminal_save_inferior, child_pass_ctrlc and
15389         child_interrupt.
15390         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15391         (inf_ptrace_target): No longer install it.
15392         * infcmd.c (interrupt_target_1): Adjust.
15393         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15394         (child_interrupt): Declare.
15395         (inferior::terminal_state): New.
15396         * inflow.c (struct terminal_info): Update comments.
15397         (inferior_process_group): Delete.
15398         (terminal_is_ours): Delete.
15399         (gdb_tty_state): New.
15400         (child_terminal_init): Adjust.
15401         (is_gdb_terminal, sharing_input_terminal_1)
15402         (sharing_input_terminal): New functions.
15403         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15404         Set the process's actual process group in the foreground if
15405         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15406         mark terminal as the inferior's if not sharing GDB's terminal.
15407         Don't check attach_flag.
15408         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15409         pass down a target_terminal_state.
15410         (child_terminal_save_inferior): New, factored out from ...
15411         (child_terminal_ours_1): ... this.  Handle
15412         target_terminal_state::is_ours_for_output.
15413         (child_interrupt, child_pass_ctrlc): New.
15414         (inflow_inferior_exit): Clear the inferior's terminal_state.
15415         (copy_terminal_info): Copy the inferior's terminal state.
15416         (_initialize_inflow): Remove reference to terminal_is_ours.
15417         * inflow.h (inferior_process_group): Delete.
15418         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15419         * procfs.c (procfs_target): Don't install procfs_interrupt.
15420         (procfs_interrupt): Delete.
15421         * remote.c (remote_serial_quit_handler): Adjust.
15422         (remote_interrupt): Remove ptid parameter.  Adjust.
15423         * target-delegates.c: Regenerate.
15424         * target.c: Include "terminal.h".
15425         (target_terminal::terminal_state): Rename to ...
15426         (target_terminal::m_terminal_state): ... this.
15427         (target_terminal::init): Adjust.
15428         (target_terminal::inferior): Adjust to per-inferior
15429         terminal_state.
15430         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15431         (target_terminal::ours, target_terminal::ours_for_output): Use
15432         target_terminal_is_ours_kind.
15433         (target_interrupt): Remove ptid parameter.  Adjust.
15434         (default_target_pass_ctrlc): Adjust.
15435         * target.h (target_ops::to_terminal_save_inferior): New field.
15436         (target_ops::to_interrupt): Remove ptid_t parameter.
15437         (target_interrupt): Remove ptid_t parameter.  Update comment.
15438         (target_pass_ctrlc): Update comment.
15439         * target/target.h (target_terminal_state): New scoped enum,
15440         factored out of ...
15441         (target_terminal::terminal_state): ... here.
15442         (target_terminal::inferior): Update comments.
15443         (target_terminal::restore_inferior): New.
15444         (target_terminal::is_inferior, target_terminal::is_ours)
15445         (target_terminal::is_ours_for_output): Adjust.
15446         (target_terminal::scoped_restore_terminal_state): Adjust to
15447         rename, and call restore_inferior() instead of inferior().
15448         (target_terminal::scoped_restore_terminal_state::m_state): Change
15449         type.
15450         (target_terminal::terminal_state): Rename to ...
15451         (target_terminal::m_terminal_state): ... this and change type.
15452
15453 2018-01-30  Pedro Alves  <palves@redhat.com>
15454
15455         * linux-nat.c (wait_for_signal): New function.
15456         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15457         directly.
15458         (async_terminal_is_ours)
15459         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15460         (linux_nat_add_target): Don't override
15461         to_terminal_inferior/to_terminal_ours.
15462
15463 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15464
15465         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15466
15467 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15468
15469         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15470         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15471         dwarf2_per_objfile_free here.
15472         (dwarf2_per_objfile_free): Remove.
15473         (_initialize_dwarf2_read): Don't register
15474         dwarf2_per_objfile_free as a registry cleanup.
15475
15476 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15477
15478         Avoid compilation errors in MinGW native builds
15479
15480         The error is triggered by including python-internal.h, and the
15481         error message is:
15482
15483              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15484                       from build-gnulib/import/math.h:27,
15485                       from d:/usr/Python26/include/pyport.h:235,
15486                       from d:/usr/Python26/include/Python.h:58,
15487                       from python/python-internal.h:94,
15488                       from python/py-arch.c:24:
15489              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15490         using ::hypot;
15491                 ^~~~~
15492
15493         This happens because Python headers define 'hypot' to expand t
15494         '_hypot' in the Windows builds.
15495         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15496         'hypoth'.  This avoids a compilation error.
15497
15498 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15499
15500         * MAINTAINERS (Write After Approval): Fix ordering.
15501
15502 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15503
15504         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15505
15506 2018-01-26  Alan Modra  <amodra@gmail.com>
15507
15508         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15509         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15510         Remove nop.  Make const.  Comment.
15511         (powerpc32_plt_stub_so_2): New.
15512         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15513         Correct count.  Update uses.
15514         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15515         Move common code reading PLT entry word.  Correct
15516         powerpc32_plt_stub PLT address calculation.
15517         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15518         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15519         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15520         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15521         (ppc64_standard_linkage8): Likewise.
15522         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15523         Correct insns description.
15524         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15525
15526 2018-01-24  Pedro Alves  <palves@redhat.com>
15527
15528         GCC PR libstdc++/83906
15529         * gdbtypes.c (operator==(const dynamic_prop &,
15530         const dynamic_prop &)): New.
15531         (operator==(const range_bounds &, const range_bounds &)): New.
15532         (check_types_equal): Use them instead of memcmp.
15533         * gdbtypes.h (operator==(const dynamic_prop &,
15534         const dynamic_prop &)): Declare.
15535         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15536         (operator==(const range_bounds &, const range_bounds &)): Declare.
15537         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15538
15539 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15540
15541         * s390-linux-tdep.c (s390_record_address_mask)
15542         (s390_record_calc_disp_common, s390_record_calc_disp)
15543         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15544         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15545         (s390_process_record): Move to s390-tdep.c.
15546         (s390_linux_init_abi_any): Adjust.
15547         * s390-tdep.c (s390_record_address_mask)
15548         (s390_record_calc_disp_common, s390_record_calc_disp)
15549         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15550         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15551         (s390_process_record): Moved from s390-linux-tdep.c
15552         (s390_gdbarch_init): Adjust.
15553
15554 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15555
15556         * s390-linux-nat.c (s390-tdep.h): New include.
15557         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15558         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15559         (ALLDEPFILES): Add s390-tdep.c.
15560         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15561         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15562         * s390-tdep.h: ...this.  New file.
15563         * s390-linux-tdep.c (s390-tdep.h): New include.
15564         (_initialize_s390_tdep): Rename to...
15565         (_initialize_s390_linux_tdep): ...this and adjust.
15566         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15567         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15568         s390-tdep.h.
15569         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15570         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15571         (s390_is_partial_instruction, s390_software_single_step)
15572         (is_non_branch_ril, s390_displaced_step_copy_insn)
15573         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15574         (s390_prologue_data, s390_addr, s390_store, s390_load)
15575         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15576         (s390_register_call_saved, s390_guess_tracepoint_registers)
15577         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15578         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15579         (s390_pseudo_register_name, s390_pseudo_register_type)
15580         (s390_pseudo_register_read, s390_pseudo_register_write)
15581         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15582         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15583         (s390_addr_bits_remove, s390_address_class_type_flags)
15584         (s390_address_class_type_flags_to_name)
15585         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15586         (s390_function_arg_float, s390_function_arg_vector)
15587         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15588         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15589         (s390_frame_align, s390_register_return_value, s390_return_value)
15590         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15591         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15592         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15593         (s390_trad_frame_prev_register, s390_unwind_cache)
15594         (s390_prologue_frame_unwind_cache)
15595         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15596         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15597         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15598         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15599         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15600         (s390_frame_base_address, s390_local_base_address)
15601         (s390_frame_base, s390_gcc_target_options)
15602         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15603         (s390_validate_reg_range, s390_tdesc_valid)
15604         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15605         * s390-tdep.c: ...this.  New file.
15606
15607 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15608
15609         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15610         (s390_process_record, s390_gdbarch_tdep_alloc)
15611         (s390_linux_init_abi_any): Use/set new hook.
15612
15613 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15614
15615         * s390-linux-tdep.c (osabi.h): New include.
15616         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15617         (s390_linux_init_abi_any): New functions.
15618         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15619
15620 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15621
15622         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15623         tdesc_has_registers check
15624
15625 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15626
15627         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15628         (s390_validate_reg_range): New macro.
15629         (s390_gdbarch_init): Adjust.
15630
15631 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15632
15633         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15634         (s390_gdbarch_tdep_alloc): Adjust.
15635         (s390_gdbarch_init): Adjust.
15636
15637 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15638
15639         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15640         <have_tdb>: Change type to bool.
15641         (s390_gdbarch_tdep_alloc): Adjust.
15642         (s390_gdbarch_init): Adjust.
15643
15644 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15645
15646         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15647         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15648         (s390_gdbarch_tdep_alloc): New function.
15649         (s390_gdbarch_init): Allocate tdep at start and use its fields
15650         instead of separate variables.
15651
15652 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15653
15654         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15655         when looking for cached gdbarch and add comment for remaining.
15656
15657 2018-01-22  Pedro Alves  <palves@redhat.com>
15658             Sergio Durigan Junior  <sergiodj@redhat.com>
15659
15660         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15661         case.
15662
15663 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15664
15665         * MAINTAINERS: Update my company e-mail address.
15666
15667 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15668
15669         * regcache.c (cooked_write_test): New function.
15670         (_initialize_regcache): Register the test.
15671
15672 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15673
15674         * ia64-tdep.c (ia64_pseudo_register_read): Call
15675         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15676         * m32c-tdep.c (m32c_cat_read): Likewise.
15677         (m32c_r3r2r1r0_read): Likewise.
15678         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15679         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15680
15681 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15682
15683         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15684         method raw_read instead of regcache_raw_read.
15685         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15686         * arm-tdep.c (arm_neon_quad_read): Likewise.
15687         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15688         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15689         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15690         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15691         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15692         (i386_pseudo_register_read_into_value): Likewise.
15693         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15694         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15695         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15696         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15697         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15698         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15699         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15700         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15701         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15702
15703 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15704
15705         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15706         * configure.tgt: Remove target mt.
15707         * mt-tdep.c: Remove.
15708         * regcache.c (cooked_read_test): Remove the check for mt.
15709
15710 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15711
15712         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15713         instead of gdbarch_pseudo_register_read_value.
15714
15715 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15716
15717         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15718         language is Ada.
15719
15720 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15721
15722         * linespec.c (create_sals_line_offset): Remove code that preserved
15723         the symtab_and_line's line number.
15724
15725 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15726
15727         * varobj.c (varobj_create): Don't set valid_block when creating a
15728         floating varobj.
15729
15730 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15731
15732         * varobj.c (varobj_create): Remove out of date comment.
15733
15734 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15735
15736         PR mi/20395
15737         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15738         updating innermost block.
15739         * parse.c (innermost_block_tracker::update): Take extra type
15740         parameter, and check types match before updating innermost block.
15741         (write_dollar_variable): Update innermost block for registers.
15742         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15743         (innermost_block_tracker::innermost_block_tracker): Initialise
15744         m_types member.
15745         (innermost_block_tracker::reset): Take type parameter.
15746         (innermost_block_tracker::update): Take type parameter, and pass
15747         type through as needed.
15748         (innermost_block_tracker::m_types): New member.
15749         * varobj.c (varobj_create): Pass type when reseting innermost
15750         block.
15751
15752 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15753
15754         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15755         * ada-lang.c (resolve_subexp): Likewise.
15756         * breakpoint.c (set_breakpoint_condition) Likewise.
15757         (watch_command_1) Likewise.
15758         * c-exp.y (variable): Likewise.
15759         * d-exp.y (PrimaryExpression): Likewise.
15760         * f-exp.y (variable): Likewise.
15761         * go-exp.y (variable): Likewise.
15762         * m2-exp.y (variable): Likewise.
15763         * objfiles.c (objfile::~objfile): Likewise.
15764         * p-exp.y (variable): Likewise.
15765         * parse.c (innermost_block): Change type.
15766         * parser-defs.h (class innermost_block_tracker): New.
15767         (innermost_block): Change to innermost_block_tracker.
15768         * printcmd.c (display_command): Switch to innermost_block API.
15769         (do_one_display): Likewise.
15770         * rust-exp.y (do_one_display): Likewise.
15771         * symfile.c (clear_symtab_users): Likewise.
15772         * varobj.c (varobj_create): Switch to innermost_block API, replace
15773         use of innermost_block with block stored on varobj object.
15774
15775 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15776
15777         * expression.h (innermost_block): Remove declaration.
15778         * varobj.c: Add 'parser-defs.h' include.
15779
15780 2018-01-19  Tom Tromey  <tom@tromey.com>
15781
15782         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15783         symbols in the static and global blocks.
15784
15785 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15786
15787         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15788         gdb_ptrace.h, and move including gdb_wait.h ...
15789         * nat/linux-ptrace.h: ... to here.
15790
15791 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15792
15793         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15794         inf_ptrace_detach_success.
15795         (inf_ptrace_detach_success): Add inferior parameter, use it
15796         instead of inferior_ptid, pass it to detach_inferior.
15797         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15798         parameter.
15799         * inferior.c (detach_inferior): Add overload that takes an
15800         inferior object.
15801         * inferior.h (detach_inferior): Likewise.
15802         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15803         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15804         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15805
15806 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15807
15808         * target.h (struct target_ops) <to_detach>: Add inferior
15809         parameter.
15810         (target_detach): Likewise.
15811         * target.c (dispose_inferior): Pass inferior down.
15812         (target_detach): Pass inferior down.  Assert that it is equal to
15813         the current inferior.
15814         * aix-thread.c (aix_thread_detach): Pass inferior down.
15815         * corefile.c (core_file_command): Pass current_inferior() down.
15816         * corelow.c (core_detach): Add inferior parameter.
15817         * darwin-nat.c (darwin_detach): Likewise.
15818         * gnu-nat.c (gnu_detach): Likewise.
15819         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15820         * infcmd.c (detach_command): Pass current_inferior() down to
15821         target_detach.
15822         * infrun.c (follow_fork_inferior): Pass parent_inf to
15823         target_detach.
15824         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15825         target_detach.
15826         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15827         * linux-thread-db.c (thread_db_detach): Likewise.
15828         * nto-procfs.c (procfs_detach): Likewise.
15829         * procfs.c (procfs_detach): Likewise.
15830         * record.c (record_detach): Likewise.
15831         * record.h (struct inferior): Forward-declare.
15832         (record_detach): Add inferior parameter.
15833         * remote-sim.c (gdbsim_detach): Likewise.
15834         * remote.c (remote_detach_1): Likewise.
15835         (remote_detach): Likewise.
15836         (extended_remote_detach): Likewise.
15837         * sol-thread.c (sol_thread_detach): Likewise.
15838         * target-debug.h (target_debug_print_inferior_p): New macro.
15839         * target-delegates.c: Re-generate.
15840         * top.c (kill_or_detach): Pass inferior down to target_detach.
15841         * windows-nat.c (windows_detach): Add inferior parameter.
15842
15843 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15844
15845         * target.h (struct target_ops) <to_detach>: Remove args
15846         parameter.
15847         (target_detach): Likewise.
15848         * target.c (dispose_inferior): Adjust.
15849         (target_detach): Remove args parameter, adjust.
15850         * aix-thread.c (aix_thread_detach): Adjust.
15851         * corefile.c (core_file_command): Adjust.
15852         * corelow.c (core_detach): Adjust.
15853         * darwin-nat.c (darwin_detach): Adjust.
15854         * gnu-nat.c (gnu_detach): Adjust.
15855         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15856         * infcmd.c (detach_command): Adjust
15857         * infrun.c (follow_fork_inferior): Adjust.
15858         (handle_vfork_child_exec_or_exit): Adjust.
15859         * linux-fork.c (linux_fork_detach): Remove args parameter.
15860         * linux-fork.h (linux_fork_detach): Likewise.
15861         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15862         * linux-thread-db.c (thread_db_detach): Likewise.
15863         * nto-procfs.c (procfs_detach): Likewise.
15864         * procfs.c (procfs_detach): Likewise.
15865         (do_detach): Remove signo parameter.
15866         * record.c (record_detach): Remove args parameter.
15867         * record.h (record_detach): Likewise.
15868         * remote-sim.c (gdbsim_detach): Likewise.
15869         * remote.c (remote_detach_1): Likewise.
15870         (remote_detach): Likewise.
15871         (extended_remote_detach): Likewise.
15872         * sol-thread.c (sol_thread_detach): Likewise.
15873         * target-delegates.c: Re-generate.
15874         * top.c (struct qt_args) <args>: Remove field.
15875         (kill_or_detach): Don't pass args.
15876         (quit_force): Don't set args.
15877         * windows-nat.c (windows_detach): Remove args parameter.
15878
15879 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15880
15881         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15882         (arm_linux_init_abi): Install it.
15883
15884 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15885
15886         * osabi.c (gdb_osabi_names): Extend the regexp for
15887         arm-linux-gnueabihf.
15888
15889 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15890
15891         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15892         m_abbrevs.
15893         (abbrev_table::add_abbrev): Update.
15894         (abbrev_table::lookup_abbrev): Update.
15895
15896 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15897
15898         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15899
15900 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15901
15902         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15903         to "std::string".
15904
15905 2018-01-17  Tom Tromey  <tom@tromey.com>
15906
15907         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15908
15909 2018-01-17  Tom Tromey  <tom@tromey.com>
15910
15911         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15912         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15913         (create_array_type_with_stride): Update.
15914         * dwarf2read.c (set_die_type): Update.
15915
15916 2018-01-17  Tom Tromey  <tom@tromey.com>
15917
15918         * dwarf2read.c (delayed_method_info): Remove typedef.
15919         (dwarf2_cu::method_info): Now a std::vector.
15920         (add_to_method_list): Update.
15921         (free_delayed_list): Remove.
15922         (compute_delayed_physnames): Update.
15923         (process_full_comp_unit, process_full_type_unit): Clear the method
15924         list.  Remove cleanups.
15925         (psymtab_include_file_name): Add name_holder parameter.  Use
15926         unique_xmalloc_ptr.
15927         (dwarf_decode_lines): Update.
15928
15929 2018-01-17  Tom Tromey  <tom@tromey.com>
15930             Simon Marchi  <simon.marchi@ericsson.com>
15931
15932         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15933         (dwarf2_per_objfile::free_cached_comp_units)
15934         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15935         (init_cutu_and_read_dies_no_follow): Update.
15936         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15937         (dwarf2_cu::~dwarf2_cu): New.
15938         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15939         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15940
15941 2018-01-17  Tom Tromey  <tom@tromey.com>
15942             Simon Marchi  <simon.marchi@ericsson.com>
15943
15944         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15945         (struct die_reader_specs) <abbrev_table>: New member.
15946         (struct abbrev_table): Add constructor.
15947         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15948         <abbrev_obstack>: Now an auto_obstack.
15949         (abbrev_table_up): New typedef.
15950         (init_cu_die_reader): Add abbrev_table parameter.
15951         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15952         Add result_dwo_abbrev_table.
15953         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15954         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15955         Update.
15956         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15957         parameter.
15958         (skip_children): Update.
15959         (abbrev_table::alloc_abbrev): Rename from
15960         abbrev_table_alloc_abbrev.
15961         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15962         (abbrev_table::lookup_abbrev): Rename from
15963         abbrev_table_lookup_abbrev.
15964         (abbrev_table_read_table): Return abbrev_table_up.
15965         (abbrev_table_free, abbrev_table_free_cleanup)
15966         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15967         (load_partial_dies): Update.
15968
15969 2018-01-17  Tom Tromey  <tom@tromey.com>
15970
15971         * dwarf2read.c (dwarf2_compute_name): Update comment.
15972         (read_func_scope, read_variable): Update.
15973         (new_symbol): Remove.
15974         (new_symbol_full): Rename to new_symbol.
15975
15976 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15977
15978         PR gdb/16577
15979         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15980         a warning instead of throwing an error, set section size to 0 and return
15981         NULL.
15982         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15983
15984 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15985
15986         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15987         std::string.
15988         (linux_ptrace_attach_fail_reason_string): Likewise.
15989         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15990         Likewise.
15991         (linux_ptrace_attach_fail_reason_string): Likewise.
15992         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15993
15994 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15995
15996         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15997
15998 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15999
16000         PR gdb/21559
16001         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
16002         checking for fs_base/gs_base fields in struct user_regs_struct.
16003         * configure: Regenerate.
16004
16005 2018-01-17  Yao Qi  <yao.qi@linaro.org>
16006
16007         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16008         function.
16009         (aarch64_linux_init_abi): Install it to gdbarch hook
16010         gcc_target_options.
16011
16012 2018-01-15  Pedro Alves  <palves@redhat.com>
16013
16014         * common/signals-state-save-restore.c
16015         (save_original_signals_state): Fix typos.
16016
16017 2017-01-12  Tom Tromey  <tom@tromey.com>
16018             Sergio Durigan Junior  <sergiodj@redhat.com>
16019
16020         * Makefile.in (install-only): Install gdb-add-index.
16021
16022 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
16023
16024         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16025
16026 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16027
16028         * infrun.c (keep_going_pass_signal): Clear step-over info when
16029         insert_breakpoints fails.
16030
16031 2018-01-11  Pedro Alves  <palves@redhat.com>
16032
16033         PR gdb/22583
16034         * infrun.c (resume): Rename to ...
16035         (resume_1): ... this.
16036         (resume): Reimplement as wrapper around resume_1.
16037
16038 2018-01-11  Pedro Alves  <palves@redhat.com>
16039
16040         PR remote/22597
16041         * remote.c (remote_parse_stop_reply): Default to the last-set
16042         general thread instead of to 'magic_null_ptid'.
16043
16044 2018-01-10  Pedro Alves  <palves@redhat.com>
16045
16046         * language.h (language_get_symbol_name_matcher): Rename ...
16047         (get_symbol_name_matcher): ... this.
16048         * language.c (language_get_symbol_name_matcher): Ditto.
16049         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16050         callers adjusted.
16051
16052 2018-01-10  Pedro Alves  <palves@redhat.com>
16053
16054         PR gdb/22670
16055         * dwarf2read.c
16056         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16057         Adjust to use language_get_symbol_name_matcher instead of
16058         language_defn::la_get_symbol_name_matcher.
16059         * language.c (language_get_symbol_name_matcher): If in Ada mode
16060         and the lookup name is a verbatim match, return Ada's matcher.
16061         * language.h (language_get_symbol_name_matcher): Adjust comment.
16062         (ada_lookup_name_info::verbatim_p):: New method.
16063
16064 2018-01-10  Pedro Alves  <palves@redhat.com>
16065
16066         PR gdb/22670
16067         * ada-lang.c (ada_collect_symbol_completion_matches): If the
16068         minsym's language is language_auto or language_cplus, pass down
16069         language_ada instead.
16070         * symtab.c (compare_symbol_name): Don't frob symbol language here.
16071
16072 2018-01-10  Pedro Alves  <palves@redhat.com>
16073
16074         PR gdb/22670
16075         * minsyms.c (linkage_name_str): New function.
16076         (iterate_over_minimal_symbols): Use it.
16077
16078 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16079
16080         * NEWS: Document that 'info proc' now works on FreeBSD.
16081
16082 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16083
16084         * configure.ac: Check for kinfo_getfile in libutil.
16085         * configure: Regenerate.
16086         * config.in: Regenerate.
16087         * fbsd-nat.c: Include "fbsd-tdep.h".
16088         (fbsd_fetch_cmdline): New.
16089         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16090         rather than calling error.
16091         (fbsd_info_proc): New.
16092         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16093         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16094         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16095
16096 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16097
16098         * fbsd-nat.c (struct free_deleter): Remove.
16099         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16100
16101 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16102
16103         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16104         NULL for an empty pathname.
16105
16106 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16107
16108         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16109         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16110         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16111         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16112         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16113         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16114         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16115         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16116         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16117         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16118         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16119         (fbsd_core_fetch_timeval, fbsd_print_sigset)
16120         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16121         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
16122         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16123
16124 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
16125
16126         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16127         (gnu_xfer_auxv): New function.
16128         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16129         TARGET_OBJECT_AUXV.
16130
16131 2018-01-08  Yao Qi  <yao.qi@linaro.org>
16132             Simon Marchi  <simon.marchi@ericsson.com>
16133
16134         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16135         common/selftest.c.
16136         (COMMON_OBS): Remove selftest.o.
16137         * configure.ac: Append selftest-arch.c and common/selftest.c to
16138         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
16139         * configure: Re-generated.
16140         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16141         GDB_SELF_TEST.
16142         (maintenance_info_selftests): Likewise.
16143
16144 2018-01-08  Xavier Roirand  <roirand@adacore.com>
16145
16146         * ada-valprint.c (val_print_packed_array_elements): Use
16147         proper number of elements when printing an array indexed
16148         by an enumeration type.
16149
16150 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16151
16152         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16153         (dw2_get_file_names_reader): Adjust.
16154         (lookup_dwo_signatured_type): Adjust.
16155         (lookup_dwp_signatured_type): Adjust.
16156         (lookup_signatured_type): Adjust.
16157         (create_type_unit_group): Adjust.
16158         (get_type_unit_group): Adjust.
16159         (process_psymtab_comp_unit_reader): Adjust.
16160         (build_type_psymtabs_reader): Adjust.
16161         (scan_partial_symbols): Adjust.
16162         (add_partial_symbol): Adjust.
16163         (add_partial_subprogram): Adjust.
16164         (peek_die_abbrev): Adjust.
16165         (fixup_go_packaging): Adjust.
16166         (process_imported_unit_die): Adjust.
16167         (dwarf2_compute_name): Adjust.
16168         (dwarf2_physname): Adjust.
16169         (read_import_statement): Adjust.
16170         (handle_DW_AT_stmt_list): Adjust.
16171         (read_file_scope): Adjust.
16172         (read_func_scope): Adjust.
16173         (read_lexical_block_scope): Adjust.
16174         (read_call_site_scope): Adjust.
16175         (read_variable): Adjust.
16176         (dwarf2_rnglists_process): Adjust.
16177         (dwarf2_ranges_process): Adjust.
16178         (dwarf2_ranges_read): Adjust.
16179         (dwarf2_get_pc_bounds): Adjust.
16180         (dwarf2_record_block_ranges): Adjust.
16181         (dwarf2_add_field): Adjust.
16182         (dwarf2_add_member_fn): Adjust.
16183         (read_structure_type): Adjust.
16184         (process_structure_scope): Adjust.
16185         (read_enumeration_type): Adjust.
16186         (read_array_type): Adjust.
16187         (mark_common_block_symbol_computed): Adjust.
16188         (read_common_block): Adjust.
16189         (read_namespace_type): Adjust.
16190         (read_namespace): Adjust.
16191         (read_module_type): Adjust.
16192         (read_tag_pointer_type): Adjust.
16193         (read_tag_ptr_to_member_type): Adjust.
16194         (read_tag_string_type): Adjust.
16195         (read_subroutine_type): Adjust.
16196         (read_typedef): Adjust.
16197         (read_base_type): Adjust.
16198         (attr_to_dynamic_prop): Adjust.
16199         (read_subrange_type): Adjust.
16200         (read_unspecified_type): Adjust.
16201         (dwarf2_read_abbrevs): Adjust.
16202         (load_partial_dies): Adjust.
16203         (read_partial_die): Adjust.
16204         (find_partial_die): Adjust.
16205         (guess_partial_die_structure_name): Adjust.
16206         (fixup_partial_die): Adjust.
16207         (read_attribute_value): Adjust.
16208         (read_addr_index): Adjust.
16209         (read_addr_index_from_leb128): Adjust.
16210         (read_str_index): Adjust.
16211         (dwarf2_string_attr): Adjust.
16212         (get_debug_line_section): Adjust.
16213         (dwarf_decode_line_header): Adjust.
16214         (lnp_state_machine::check_line_address): Adjust.
16215         (dwarf_decode_lines_1): Adjust.
16216         (dwarf_decode_lines): Adjust.
16217         (dwarf2_start_symtab): Adjust.
16218         (var_decode_location): Adjust.
16219         (new_symbol_full): Adjust.
16220         (dwarf2_const_value_data): Adjust.
16221         (dwarf2_const_value_attr): Adjust.
16222         (dwarf2_const_value): Adjust.
16223         (die_type): Adjust.
16224         (die_containing_type): Adjust.
16225         (build_error_marker_type): Adjust.
16226         (lookup_die_type): Adjust.
16227         (guess_full_die_structure_name): Adjust.
16228         (anonymous_struct_prefix): Adjust.
16229         (determine_prefix): Adjust.
16230         (dwarf2_name): Adjust.
16231         (follow_die_ref_or_sig): Adjust.
16232         (follow_die_offset): Adjust.
16233         (follow_die_ref): Adjust.
16234         (follow_die_sig_1): Adjust.
16235         (follow_die_sig): Adjust.
16236         (get_signatured_type): Adjust.
16237         (get_DW_AT_signature_type): Adjust.
16238         (decode_locdesc): Adjust.
16239         (dwarf_decode_macros): Adjust.
16240         (cu_debug_loc_section): Adjust.
16241         (fill_in_loclist_baton): Adjust.
16242         (dwarf2_symbol_mark_computed): Adjust.
16243         (init_one_comp_unit): Don't assign
16244         dwarf2_cu::dwarf2_per_objfile.
16245         (set_die_type): Adjust.
16246
16247 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16248
16249         * dwarf2read.c (struct mapped_debug_names): Add constructor.
16250         <dwarf2_per_objfile>: New field.
16251         (dwarf2_per_objfile): Remove global.
16252         (get_dwarf2_per_objfile): New function.
16253         (set_dwarf2_per_objfile): New function.
16254         (dwarf2_build_psymtabs_hard): Change objfile parameter to
16255         dwarf2_per_objfile.
16256         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16257         (read_abbrev_offset): Likewise.
16258         (read_indirect_string): Likewise.
16259         (read_indirect_line_string): Likewise.
16260         (read_indirect_string_at_offset): Likewise.
16261         (read_indirect_string_from_dwz): Likewise.
16262         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16263         dwarf2_per_objfile.
16264         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16265         (create_all_comp_units): Change objfile parameter to
16266         dwarf2_per_objfile.
16267         (create_all_type_units): Likewise.
16268         (process_queue): Add dwarf2_per_objfile parameter.
16269         (read_and_check_comp_unit_head): Likewise.
16270         (lookup_dwo_unit_in_dwp): Likewise.
16271         (get_dwp_file): Likewise.
16272         (process_cu_includes): Likewise.
16273         (struct free_dwo_file_cleanup_data): New struct.
16274         (dwarf2_has_info): Use get_dwarf2_per_objfile and
16275         set_dwarf2_per_objfile.
16276         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16277         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16278         context, adjust calls.
16279         (dw2_instantiate_symtab): Likewise.
16280         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16281         (dw2_get_cu): Likewise.
16282         (create_cu_from_index_list): Change objfile parameter to
16283         dwarf2_per_objfile.
16284         (create_cus_from_index_list): Get dwarf2_per_objfile from
16285         context, adjust calls.
16286         (create_cus_from_index): Likewise.
16287         (create_signatured_type_table_from_index): Change objfile
16288         parameter to dwarf2_per_objfile.
16289         (create_signatured_type_table_from_debug_names): Change objfile
16290         parameter to dwarf2_per_objfile.
16291         (create_addrmap_from_index): Likewise.
16292         (create_addrmap_from_aranges): Likewise.
16293         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16294         (dw2_setup): Remove.
16295         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16296         context.
16297         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16298         get_dwarf2_per_objfile.
16299         (dw2_forget_cached_source_info): Likewise.
16300         (dw2_map_symtabs_matching_filename): Likewise.
16301         (struct dw2_symtab_iterator) <index>: Remove.
16302         <dwarf2_per_objfile>: New field.
16303         (dw2_symtab_iter_init): Replace index parameter with
16304         dwarf2_per_objfile.
16305         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16306         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16307         (dw2_print_stats): Likewise.
16308         (dw2_dump): Likewise.
16309         (dw2_expand_symtabs_for_function): Likewise.
16310         (dw2_expand_all_symtabs): Likewise.
16311         (dw2_expand_symtabs_with_fullname): Likewise.
16312         (dw2_expand_marked_cus): Replace index and objfile parameters
16313         with dwarf2_per_objfile.
16314         (dw_expand_symtabs_matching_file_matcher): Add
16315         dwarf2_per_objfile parameter and adjust calls.
16316         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16317         adjust calls.
16318         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16319         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16320         adjust calls.
16321         (create_cus_from_debug_names_list): Replace objfile parameter
16322         with dwarf2_per_objfile and adjust calls.
16323         (create_cus_from_debug_names): Likewise.
16324         (dwarf2_read_debug_names): Likewise.
16325         (mapped_debug_names::namei_to_name): Adjust call.
16326         (dw2_debug_names_iterator::next): Likewise.
16327         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16328         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16329         (dw2_debug_names_dump): Likewise.
16330         (dw2_debug_names_expand_symtabs_for_function): Likewise.
16331         (dw2_debug_names_expand_symtabs_matching): Likewise.
16332         (dwarf2_initialize_objfile): Likewise.
16333         (dwarf2_build_psymtabs): Likewise.
16334         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16335         this_cu.
16336         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16337         (read_and_check_comp_unit_head): Likewise.
16338         (read_abbrev_offset): Likewise.
16339         (create_debug_type_hash_table): Likewise.
16340         (create_debug_types_hash_table): Likewise.
16341         (create_all_type_units): Replace objfile parameter with
16342         dwarf2_per_objfile.
16343         (add_type_unit): Add dwarf2_per_objfile parameter.
16344         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16345         with dwarf2_per_objfile.
16346         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16347         (lookup_dwp_signatured_type): Likewise.
16348         (lookup_signatured_type): Likewise.
16349         (read_cutu_die_from_dwo): Likewise.
16350         (init_tu_and_read_dwo_dies): Likewise.
16351         (init_cutu_and_read_dies): Likewise.
16352         (init_cutu_and_read_dies_no_follow): Likewise.
16353         (allocate_type_unit_groups_table): Add objfile parameter.
16354         (create_type_unit_group): Use dwarf2_per_objfile from cu.
16355         (get_type_unit_group): Likewise.
16356         (process_psymtab_comp_unit): Update call.
16357         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16358         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16359         (print_tu_stats): Likewise.
16360         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16361         in void* parameter.
16362         (build_type_psymtabs): Change objfile parameter to
16363         dwarf2_per_objfile.
16364         (process_skeletonless_type_unit): Use dwarf2_per_objfile
16365         passed in void* parameter.
16366         (process_skeletonless_type_units): Change objfile parameter to
16367         dwarf2_per_objfile.
16368         (set_partial_user): Likewise.
16369         (dwarf2_build_psymtabs_hard): Likewise.
16370         (read_comp_units_from_section): Likewise.
16371         (create_all_comp_units): Likewise.
16372         (scan_partial_symbols): Update calls.
16373         (add_partial_symbol): Likewise.
16374         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16375         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16376         (process_queue): Add dwarf2_per_objfile parameter.
16377         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16378         (compute_compunit_symtab_includes): Likewise.
16379         (process_cu_includes): Add dwarf2_per_objfile parameter.
16380         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16381         (process_full_type_unit): Likewise.
16382         (process_imported_unit_die): Update call.
16383         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16384         (read_file_scope): Likewise.
16385         (allocate_dwo_file_hash_table): Add objfile parameter.
16386         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16387         (create_cus_hash_table): Likewise.
16388         (create_dwp_hash_table): Likewise.
16389         (create_dwo_unit_in_dwp_v1): Likewise.
16390         (create_dwp_v2_section): Likewise.
16391         (create_dwo_unit_in_dwp_v2): Likewise.
16392         (lookup_dwo_unit_in_dwp): Likewise.
16393         (try_open_dwop_file): Likewise.
16394         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16395         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16396         cleanup to include a reference to dwarf2_per_objfile.
16397         (open_dwp_file): Add dwarf2_per_objfile parameter.
16398         (open_and_init_dwp_file): Likewise.
16399         (get_dwp_file): Likewise.
16400         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16401         (queue_and_load_all_dwo_tus): Update call.
16402         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16403         data.
16404         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16405         (dwarf2_ranges_process): Likewise.
16406         (dwarf2_get_pc_bounds): Likewise.
16407         (mark_common_block_symbol_computed): Likewise.
16408         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16409         (dwarf2_read_abbrevs): Update call.
16410         (read_partial_die): Use dwarf2_per_objfile from cu.
16411         (find_partial_die): Likewise.
16412         (fixup_partial_die): Likewise.
16413         (read_attribute_value): Likewise.
16414         (read_indirect_string_at_offset_from): Add objfile parameter.
16415         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16416         parameter.
16417         (read_indirect_string_from_dwz): Add objfile parameter.
16418         (read_indirect_string): Add objfile parameter.
16419         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16420         (read_addr_index): Use dwarf2_per_objfile from cu.
16421         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16422         call dw2_setup.
16423         (read_str_index): Use dwarf2_per_objfile from cu.
16424         (get_debug_line_section): Likewise.
16425         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16426         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16427         (new_symbol_full): Use dwarf2_per_objfile from cu.
16428         (build_error_marker_type): Likewise.
16429         (lookup_die_type): Likewise.
16430         (determine_prefix): Likewise.
16431         (follow_die_offset): Likewise.
16432         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16433         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16434         (dwarf2_fetch_die_type_sect_off): Likewise.
16435         (dwarf2_get_die_type): Likewise.
16436         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16437         (get_signatured_type): Likewise.
16438         (get_DW_AT_signature_type): Likewise.
16439         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16440         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16441         (cu_debug_loc_section): Likewise.
16442         (fill_in_loclist_baton): Likewise.
16443         (dwarf2_symbol_mark_computed): Likewise.
16444         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16445         dwarf2_per_objfile.
16446         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16447         parameter.
16448         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16449         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16450         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16451         (set_die_type): Use dwarf2_free_objfile from cu.
16452         (get_die_type_at_offset): Likewise.
16453         (dwarf2_per_objfile_free): Don't assign global variable.
16454         (debug_names) <constructor>: Add dwarf2_per_objfile
16455         parameter, update m_debugstrlookup construction.
16456         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16457         parameter.
16458         <m_dwarf2_per_objfile>: New field.
16459         <lookup>: Use m_dwarf2_per_objfile.
16460         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16461         (psyms_seen_size): Likewise.
16462         (write_gdbindex): Replace objfile parameter with
16463         dwarf2_per_objfile.
16464         (write_debug_names): Likewise.
16465         (write_psymtabs_to_index): Likewise.
16466         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16467         calls.
16468
16469 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16470
16471         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16472         <dwarf2_per_objfile>: New field.
16473         (struct dwarf2_per_cu_data) <objfile>: Remove.
16474         <dwarf2_per_objfile>: New field.
16475         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16476         of objfile.
16477         (create_signatured_type_table_from_index): Likewise.
16478         (create_debug_type_hash_table): Likewise.
16479         (fill_in_sig_entry_from_dwo_entry): Likewise.
16480         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16481         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16482         objfile.
16483         (create_partial_symtab): Access objfile through
16484         dwarf2_per_objfile.
16485         (process_psymtab_comp_unit_reader): Likewise.
16486         (read_comp_units_from_section): Likewise.
16487         (scan_partial_symbols): Likewise.
16488         (add_partial_symbol): Likewise.
16489         (add_partial_subprogram): Likewise.
16490         (peek_die_abbrev): Likewise.
16491         (fixup_go_packaging): Likewise.
16492         (process_full_comp_unit): Likewise.
16493         (process_full_type_unit): Likewise.
16494         (process_imported_unit_die): Likewise.
16495         (dwarf2_compute_name): Likewise.
16496         (dwarf2_physname): Likewise.
16497         (read_import_statement): Likewise.
16498         (create_cus_hash_table): Assign dwarf2_physname instead of
16499         objfile.
16500         (read_func_scope): Access objfile through dwarf2_per_objfile.
16501         (read_lexical_block_scope): Likewise.
16502         (read_call_site_scope): Likewise.
16503         (read_variable): Likewise.
16504         (dwarf2_rnglists_process): Likewise.
16505         (dwarf2_ranges_process): Likewise.
16506         (dwarf2_ranges_read): Likewise.
16507         (dwarf2_record_block_ranges): Likewise.
16508         (dwarf2_add_field): Likewise.
16509         (dwarf2_add_member_fn): Likewise.
16510         (read_structure_type): Likewise.
16511         (process_structure_scope): Likewise.
16512         (read_enumeration_type): Likewise.
16513         (read_array_type): Likewise.
16514         (read_common_block): Likewise.
16515         (read_namespace_type): Likewise.
16516         (read_namespace): Likewise.
16517         (read_module_type): Likewise.
16518         (read_tag_pointer_type): Likewise.
16519         (read_tag_ptr_to_member_type): Likewise.
16520         (read_tag_string_type): Likewise.
16521         (read_subroutine_type): Likewise.
16522         (read_typedef): Likewise.
16523         (read_base_type): Likewise.
16524         (attr_to_dynamic_prop): Likewise.
16525         (read_subrange_type): Likewise.
16526         (read_unspecified_type): Likewise.
16527         (load_partial_dies): Likewise.
16528         (read_partial_die): Likewise.
16529         (find_partial_die): Likewise.
16530         (guess_partial_die_structure_name): Likewise.
16531         (fixup_partial_die): Likewise.
16532         (read_attribute_value): Likewise.
16533         (read_addr_index_from_leb128): Likewise.
16534         (dwarf2_read_addr_index): Likewise.
16535         (dwarf2_string_attr): Likewise.
16536         (lnp_state_machine::check_line_address): Likewise.
16537         (dwarf_decode_lines_1): Likewise.
16538         (dwarf_decode_lines): Likewise.
16539         (dwarf2_start_symtab): Likewise.
16540         (var_decode_location): Likewise.
16541         (new_symbol_full): Likewise.
16542         (dwarf2_const_value_data): Likewise.
16543         (dwarf2_const_value_attr): Likewise.
16544         (dwarf2_const_value): Likewise.
16545         (die_type): Likewise.
16546         (die_containing_type): Likewise.
16547         (lookup_die_type): Likewise.
16548         (guess_full_die_structure_name): Likewise.
16549         (anonymous_struct_prefix): Likewise.
16550         (dwarf2_name): Likewise.
16551         (follow_die_ref_or_sig): Likewise.
16552         (follow_die_offset): Likewise.
16553         (follow_die_ref): Likewise.
16554         (dwarf2_fetch_die_loc_sect_off): Likewise.
16555         (dwarf2_fetch_constant_bytes): Likewise.
16556         (dwarf2_fetch_die_type_sect_off): Likewise.
16557         (dwarf2_get_die_type): Likewise.
16558         (follow_die_sig): Likewise.
16559         (decode_locdesc): Likewise.
16560         (dwarf2_per_cu_objfile): Likewise.
16561         (dwarf2_per_cu_text_offset): Likewise.
16562         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16563         objfile.
16564         (set_die_type): Access objfile through
16565         dwarf2_per_objfile.
16566
16567 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16568
16569         * valprint.c (converted_character_d): Remove typedef.
16570         (DEF_VEC_O (converted_character_d)): Remove.
16571         (count_next_character): Use std::vector.
16572         (print_converted_chars_to_obstack): Likewise.
16573         (generic_printstr): Likewise.
16574
16575 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16576
16577         * xml-support.h (struct gdb_xml_value): Add constructor.
16578         <value>: Change type to unique_xmalloc_ptr.
16579         (gdb_xml_value_s): Remove typedef.
16580         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16581         (gdb_xml_element_start_handler): Change parameter type to
16582         std::vector.
16583         (xml_find_attribute): Likewise.
16584         * xml-support.c (xml_find_attribute): Change parameter type to
16585         std::vector and adjust.
16586         (gdb_xml_values_cleanup): Remove.
16587         (gdb_xml_parser::start_element): Adjust to std::vector.
16588         (xinclude_start_include): Change paraeter type to std::vector
16589         and adjust.
16590         * btrace.c (check_xml_btrace_version): Likewise.
16591         (parse_xml_btrace_block): Likewise.
16592         (parse_xml_btrace_pt_config_cpu): Likewise.
16593         (parse_xml_btrace_pt): Likewise.
16594         (parse_xml_btrace_conf_bts): Likewise.
16595         (parse_xml_btrace_conf_pt): Likewise.
16596         * memory-map.c (memory_map_start_memory): Likewise.
16597         (memory_map_start_property): Likewise.
16598         * osdata.c (osdata_start_osdata): Likewise.
16599         (osdata_start_item): Likewise.
16600         (osdata_start_column): Likewise.
16601         * remote.c (start_thread): Likewise.
16602         * solib-aix.c (library_list_start_library): Likewise.
16603         (library_list_start_list): Likewise.
16604         * solib-svr4.c (library_list_start_library): Likewise.
16605         (svr4_library_list_start_list): Likewise.
16606         * solib-target.c (library_list_start_segment): Likewise.
16607         (library_list_start_section): Likewise.
16608         (library_list_start_library): Likewise.
16609         (library_list_start_list): Likewise.
16610         * tracepoint.c (traceframe_info_start_memory): Likewise.
16611         (traceframe_info_start_tvar): Likewise.
16612         * xml-syscall.c (syscall_start_syscall): Likewise.
16613         * xml-tdesc.c (tdesc_start_target): Likewise.
16614         (tdesc_start_feature): Likewise.
16615         (tdesc_start_reg): Likewise.
16616         (tdesc_start_union): Likewise.
16617         (tdesc_start_struct): Likewise.
16618         (tdesc_start_flags): Likewise.
16619         (tdesc_start_enum): Likewise.
16620         (tdesc_start_field): Likewise.
16621         (tdesc_start_enum_value): Likewise.
16622         (tdesc_start_vector): Likewise.
16623
16624 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16625
16626         * extension.h (struct xmethod_worker) <clone>: Remove.
16627         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16628         Remove.
16629         (python_xmethod_worker::clone): Remove.
16630         * valops.c (find_overload_match): Use std::move instead of
16631         clone.
16632
16633 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16634
16635         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16636         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16637         <free_xmethod_worker_data>: Remove.
16638         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16639         <get_xmethod_arg_types>: Remove.
16640         <get_xmethod_result_type>: Remove.
16641         <invoke_xmethod>: Remove.
16642         * extension.c (new_xmethod_worker): Remove.
16643         (clone_xmethod_worker): Remove.
16644         (get_matching_xmethod_workers): Return void, pass std::vector by
16645         pointer.
16646         (get_xmethod_arg_types): Rename to...
16647         (xmethod_worker::get_arg_types): ... this, and adjust.
16648         (get_xmethod_result_type): Rename to...
16649         (xmethod_worker::get_result_type): ... this, and adjust.
16650         (invoke_xmethod): Remove.
16651         (free_xmethod_worker): Remove.
16652         (free_xmethod_worker_vec): Remove.
16653         * extension.h (enum ext_lang_rc): Move here from
16654         extension-priv.h.
16655         (struct xmethod_worker): Add constructor and destructor.
16656         <data>: Remove.
16657         <value>: Remove.
16658         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16659         virtual pure methods.
16660         <get_arg_types, get_result_type>: New methods.
16661         (xmethod_worker_ptr): Remove typedef.
16662         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16663         (xmethod_worker_vec): Remove typedef.
16664         (xmethod_worker_up): New typedef.
16665         (invoke_xmethod): Remove.
16666         (clone_xmethod_worker): Remove.
16667         (free_xmethod_worker): Remove.
16668         (free_xmethod_worker_vec): Remove.
16669         (get_xmethod_arg_types): Remove.
16670         (get_xmethod_result_type): Remove.
16671         * valops.c (find_method_list): Use std::vector, don't use
16672         intermediate vector.
16673         (value_find_oload_method_list): Use std::vector.
16674         (find_overload_match): Use std::vector.
16675         (find_oload_champ): Use std::vector.
16676         * value.c (value_free): Use operator delete.
16677         (value_of_xmethod): Rename to...
16678         (value_from_xmethod): ... this.  Don't assign
16679         xmethod_worker::value, take rvalue-reference.
16680         (result_type_of_xmethod): Adjust.
16681         (call_xmethod): Adjust.
16682         * value.h: Include extension.h.
16683         (struct xmethod_worker): Don't forward-declare.
16684         (value_of_xmethod): Rename to...
16685         (value_from_xmethod): ... this, take rvalue-reference.
16686         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16687         (struct python_xmethod_worker): ... this, add constructor and
16688         destructor.
16689         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16690         (gdbpy_free_xmethod_worker_data): Rename to...
16691         (python_xmethod_worker::~python_xmethod_worker): ... this and
16692         adjust.
16693         (gdbpy_clone_xmethod_worker_data): Rename to...
16694         (python_xmethod_worker::clone): ... this and adjust.
16695         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16696         temporary vector.
16697         (gdbpy_get_xmethod_arg_types): Rename to...
16698         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16699         (gdbpy_get_xmethod_result_type): Rename to...
16700         (python_xmethod_worker::do_get_result_type): ... this and
16701         adjust.
16702         (gdbpy_invoke_xmethod): Rename to...
16703         (python_xmethod_worker::invoke): ... this and adjust.
16704         (new_python_xmethod_worker): Rename to...
16705         (python_xmethod_worker::python_xmethod_worker): ... this and
16706         adjust.
16707         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16708         Remove.
16709         (gdbpy_free_xmethod_worker_data): Remove.
16710         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16711         (gdbpy_get_xmethod_arg_types): Remove.
16712         (gdbpy_get_xmethod_result_type): Remove.
16713         (gdbpy_invoke_xmethod): Remove.
16714         * python/python.c (python_extension_ops): Remove obsolete
16715         callbacks.
16716
16717 2018-01-05  Pedro Alves  <palves@redhat.com>
16718
16719         PR gdb/18653
16720         * common/signals-state-save-restore.c
16721         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16722         find a custom handler preinstalled, instead of internal erroring.
16723         But only warn if !quiet.
16724         * common/signals-state-save-restore.h
16725         (save_original_signals_state): New parameter 'quiet'.
16726         * main.c (captured_main_1): Move save_original_signals_state call
16727         after option handling, and pass QUIET.
16728
16729 2018-01-05  Pedro Alves  <palves@redhat.com>
16730
16731         * spu-tdep.c (spu_catch_start): Pass
16732         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16733
16734 2018-01-05  Pedro Alves  <palves@redhat.com>
16735
16736         PR gdb/22670
16737         * ada-lang.c (literal_symbol_name_matcher): New function.
16738         (ada_get_symbol_name_matcher): Use it for
16739         symbol_name_match_type::SEARCH_NAME.
16740         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16741         it down instead of assuming symbol_name_match_type::FULL.
16742         * block.h (block_lookup_symbol): New parameter 'match_type'.
16743         * c-valprint.c (print_unpacked_pointer): Use
16744         lookup_symbol_search_name instead of lookup_symbol.
16745         * compile/compile-object-load.c (get_out_value_type): Pass down
16746         symbol_name_match_type::SEARCH_NAME.
16747         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16748         symbol_name_match_type::FULL.
16749         * cp-support.c (cp_get_symbol_name_matcher): Handle
16750         symbol_name_match_type::SEARCH_NAME.
16751         * infrun.c (insert_exception_resume_breakpoint): Use
16752         lookup_symbol_search_name.
16753         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16754         * psymtab.c (maintenance_check_psymtabs): Use
16755         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16756         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16757         SYMBOL_SEARCH_NAME.
16758         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16759         if symbol_name_match_type::SEARCH_NAME.
16760         (lookup_symbol_in_language): Pass down
16761         symbol_name_match_type::FULL.
16762         (lookup_symbol_search_name): New.
16763         (lookup_language_this): Pass down
16764         symbol_name_match_type::SEARCH_NAME.
16765         (lookup_symbol_aux, lookup_local_symbol): New parameter
16766         'match_type'.  Pass it down.
16767         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16768         (lookup_symbol_search_name): New declaration.
16769         (lookup_symbol_in_block): New 'match_type' parameter.
16770
16771 2018-01-05  Pedro Alves  <palves@redhat.com>
16772
16773         PR gdb/22670
16774         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16775         ada_lookup_symbol.
16776         (ada_lookup_symbol): Reimplement in terms of
16777         ada_lookup_symbol_list, bits factored out from
16778         ada_lookup_encoded_symbol.
16779
16780 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16781
16782         * ada-exp.y (write_object_renaming): When subscripting an array
16783         using a symbol as the index, pass the block in call to
16784         ada_lookup_encoded_symbol when looking that symbol up.
16785
16786 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16787
16788         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16789         TYPE_INDEX_TYPE.
16790
16791 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16792
16793         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16794         the case where VALUE_LVAL (val0) is not lval_memory.
16795
16796 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16797
16798         * ada-valprint.c (print_optional_low_bound): Handle
16799         character-indexed array printing like boolean-indexed array
16800         printing.
16801
16802 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16803
16804         * NEWS: Create a new section for the next release branch.
16805         Rename the section of the current branch, now that it has
16806         been cut.
16807
16808 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16809
16810         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16811         * version.in: Bump version to 8.1.50.DATE-git.
16812
16813 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16814
16815         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16816         Add field.
16817         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16818         Add field.
16819         (default_exception_support_info) <catch_handlers_sym>: Add field.
16820         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16821         (ada_exception_name_addr_1): Add "catch handlers" handling.
16822         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16823         Update all callers.
16824         (create_excep_cond_exprs) <ex>: Add parameter.
16825         (re_set_exception): Update create_excep_cond_exprs call.
16826         (print_it_exception, print_one_exception, print_mention_exception)
16827         (print_recreate_exception): Add "catch handler" handling.
16828         (allocate_location_catch_handlers, re_set_catch_handlers)
16829         (check_status_catch_handlers, print_it_catch_handlers)
16830         (print_one_catch_handlers, print_mention_catch_handlers)
16831         (print_recreate_catch_handlers): New function.
16832         (catch_handlers_breakpoint_ops): New variable.
16833         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16834         Add parameter.  Add "catch handler" handling.
16835         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16836         Add "catch handler" handling.
16837         (ada_exception_catchpoint_cond_string): Add "catch handler"
16838         handling.
16839         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16840         call.
16841         (catch_ada_handlers_command): New function.
16842         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16843         operations structure.
16844         (_initialize_ada_language): Add "catch handlers" command entry.
16845         * NEWS: Document "catch handlers" feature.
16846
16847 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16848
16849         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16850         account when creating the array type of the slice.
16851         (ada_value_slice): Likewise.
16852
16853 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16854
16855         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16856         New enum value.
16857         (create_array_type_with_stride): Add byte_stride_prop parameter.
16858         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16859         New parameter.  Update all callers in this file.
16860         (array_type_has_dynamic_stride): New function.
16861         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16862         of arrays with dynamic byte strides.
16863         * dwarf2read.c (read_array_type): Add support for dynamic
16864         DW_AT_byte_stride attributes.
16865
16866 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16867
16868         * dwarf2read.c (read_unspecified_type): Treat
16869         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16870
16871 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16872
16873         Update copyright year range in all GDB files.
16874
16875 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16876
16877         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16878         and gdb/testsuite/gdb.base/step-line.c.
16879
16880 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16881
16882         * copyright.py (main): Dump the contents of
16883         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16884         even if BY_HAND is empty.
16885
16886 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16887
16888         * top.c (print_gdb_version): Update Copyright year in version
16889         message.
16890
16891 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16892
16893         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16894
16895 For older changes see ChangeLog-2017.
16896 \f
16897 Local Variables:
16898 mode: change-log
16899 left-margin: 8
16900 fill-column: 74
16901 version-control: never
16902 coding: utf-8
16903 End: