target.c: Remove struct keyword in range-based for
[external/binutils.git] / gdb / ChangeLog
1 2018-12-26  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * target.c (target_terminal::restore_inferior): Remove struct keyword.
4
5 2018-12-26  Simon Marchi  <simon.marchi@ericsson.com>
6
7         * build-id.c (build_id_to_debug_bfd): Enhance debug output.
8         * symfile.c (separate_debug_file_exists): Likewise.
9
10 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
11
12         * c-exp.y (field_name): Allow DOUBLE_KEYWORD, INT_KEYWORD, LONG,
13         SHORT, SIGNED_KEYWORD, and UNSIGNED tokens to act as a field
14         names.
15         (typename_stoken): New function.
16
17 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
18
19         * c-exp.y (field_name): New %token, and new rule.
20         (exp): Replace uses of 'name' with 'field_name' where appropriate.
21
22 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
23
24         PR gdb/13368
25         * c-exp.y (typebase): Extend the comment.
26         (ident_tokens): Likewise.
27
28 2018-12-18  Tom Tromey  <tom@tromey.com>
29
30         * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
31         address of sect_off.
32
33 2018-12-23  Joel Brobecker  <brobecker@adacore.com>
34
35         GDB 8.2.1 released.
36
37 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
38
39         * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
40         assigning locations.
41         (riscv_return_value): Take more care not to read/write outside of
42         argument buffer.  Cast return value between the declared type and
43         the abi type.
44
45 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
46
47         * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
48         fflags, and frm registers.
49
50 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
51
52         * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
53         (riscv_gdbarch_init): Register new function with gdbarch.
54         * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
55
56 2018-12-21  Simon Marchi  <simon.marchi@ericsson.com>
57
58         * minsyms.c (mst_str): New.
59         (minimal_symbol_reader::record_full): Add debug output.
60
61 2018-12-21  John Baldwin  <jhb@FreeBSD.org>
62
63         * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
64         equal PL_FLAG_SI.
65         (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
66
67 2018-12-21  Paul Marechal  <paul.marechal@ericsson.com>
68
69         PR gdb/23974
70         * target.c (target_read_stralloc): Check for empty vector.
71
72 2018-12-21  Дилян Палаузов  <dilyan.palauzov@aegee.org>
73
74         * top.c (print_gdb_configuration): Print "--without-python"
75         if GDB was configured without Python.
76
77 2018-12-21  Andrew Burgess  <andrew.burgess@embecosm.com>
78
79         * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
80         a signed offset as a string.
81
82 2018-12-21  Dave Murphy  <davem@devkitpro.org>
83
84         * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
85         initialise.
86         * probe.c (any_static_probe_ops): Ditto.
87         * record-btrace.c (record_btrace_thread_observer_token): Ditto.
88         * stap-probe.c (stap_static_probe_ops): Ditto.
89         * tui/tui-hooks.c (tui_observers_token): Ditto.
90         * unittests/observable-selftests.c (token1, token2, token3): Ditto.
91
92 2018-12-19  Andrew Burgess  <andrew.burgess@embecosm.com>
93
94         * gdb/dummy-frame.c (default_dummy_id): Defined new function.
95         * gdb/dummy-frame.h (default_dummy_id): Declare new function.
96         * gdb/frame-unwind.c (default_unwind_pc): Define new function.
97         (default_unwind_sp): Define new function.
98         * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
99         (default_unwind_sp): Declare new function.
100         * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
101         available.
102         (get_frame_sp): Assume that gdbarch_unwind_sp is available.
103         * gdb/gdbarch.c: Regenerate.
104         * gdb/gdbarch.h: Regenerate.
105         * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
106         unwind_sp.  Add additional header files to be included in
107         generated file.
108
109 2018-12-19  Dimitar Dimitrov  <dimitar@dinux.eu>
110
111         * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
112         sp clobbers.
113
114 2018-12-17  Andrew Burgess  <andrew.burgess@embecosm.com>
115
116         * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
117         'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
118         'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
119         'processing_has_namespace_info' from unsigned int to bool.  Update
120         comments.
121         (producer_is_icc_lt_14): Update return type.
122         (producer_is_gcc_lt_4_3): Likewise.
123         (producer_is_gxx_lt_4_6): Likewise.
124         (process_die): Write true instead of 1 into predicate fields.
125         (dwarf2_start_symtab): Likewise.
126         (var_decode_location): Likewise.
127         (dwarf2_mark_helper): Likewise.
128         (dwarf2_mark): Likewise.
129         (dwarf2_clear_marks): Write false instead of 0 into predicate
130         field.
131         (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
132         0.
133
134 2018-12-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
135
136         * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
137         asm/sigcontext.h.
138
139 2018-12-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
140
141         * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
142         warning trailing new line.
143
144 2018-12-16  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
145
146         * nat/linux-ptrace.c (kill_child): New function.
147         (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
148         Add a call to kill_child in case of early return after fork.
149         (linux_check_ptrace_features): Use kill_child instead of local code.
150         (linux_test_for_tracefork): Likewise.
151
152 2018-12-14  Tom Tromey  <tom@tromey.com>
153
154         * Makefile.in: Remove "alloca" comment.
155         (INFOFILES): Remove.
156         (local-maintainer-clean): Don't use INFOFILES.
157
158 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
159
160         * syscalls/update-freebsd.sh: New file.
161         * syscalls/freebsd.xml: Regenerate.
162
163 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
164
165         * NEWS: Add entry documenting system call aliases.
166         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
167         to get_syscalls_by_name.
168         * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
169         * gdbarch.h: Regenerate.
170         * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
171         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
172         from get_syscall_by_name.  Now accepts a pointer to a vector of
173         integers and returns a bool.
174         [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
175         (syscall_create_syscall_desc): Add alias parameter and pass it to
176         syscall_desc constructor.
177         (syscall_start_syscall): Handle alias attribute.
178         (syscall_attr): Add alias attribute.
179         (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
180         Now accepts a pointer to a vector of integers and returns a
181         bool.  Add syscalls whose alias or name matches the requested
182         name.
183         (get_syscalls_by_name): Rename from get_syscall_by_name.  Now
184         accepts a pointer to a vector of integers and returns a bool.
185         * xml-syscall.h (get_syscalls_by_name): Likewise.
186
187 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
188
189         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
190         to get_syscalls_by_group.
191         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
192         false.
193         [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
194         numbers to an existing vector of integers and return a bool.
195         (get_syscalls_by_group): Accept pointer to vector of integers
196         and change return type to bool.
197         * xml-syscall.h (get_syscalls_by_group): Likewise.
198
199 2018-12-13  Jim Wilson  <jimw@sifive.com>
200
201         * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
202         comment for SD field, and correct xlen calculation.  For MISA, add
203         comment for MXL field, add call to register_size, and correct base
204         calculation.
205
206 2018-12-13  Stafford Horne  <shorne@gmail.com>
207
208         * NEWS(New targets): Add or1k*-*-linux*.
209
210 2018-12-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
211
212         * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
213         declare on one line to fix ARI warning.
214
215 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
216
217         * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
218         (infcall_suspend_state::registers): New.
219         (infcall_suspend_state::restore): New.
220         (infcall_suspend_state::thread_suspend): Rename to...
221         (infcall_suspend_state::m_thread_suspend): ...this.
222         (infcall_suspend_state::registers): Rename to...
223         (infcall_suspend_state::m_registers): ...this.
224         (infcall_suspend_state::siginfo_gdbarch): Rename to...
225         (infcall_suspend_state::m_siginfo_gdbarch): ...this.
226         (infcall_suspend_state::siginfo_data): Rename to...
227         (infcall_suspend_state::m_siginfo_data): ...this.
228         (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
229         constructor.
230         (restore_infcall_suspend_state): Rewrite to use
231         infcall_suspend_state::restore method.
232         (get_infcall_suspend_state_regcache): Use
233         infcall_suspend_state::registers method.
234
235 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
236
237         * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
238         arguments are passed in integer registers.
239         (riscv_call_arg_complex_float): Likewise.
240
241 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
242
243         * nat/linux-osdata.c (common_getter): New function.
244         (struct osdata_type): Change getter to take_snapshot.
245         Add LONGEST len_avail and struct buffer buffer.
246         Change all elements in the initializer.
247         Add an element for the list of types.
248         (linux_xfer_osdata_info_os_types): New function.
249         (linux_common_xfer_osdata): Use common_getter for the list of types.
250         Replace getter call by common_getter.
251         (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
252         Add arg BUFFER.  Only keep the code that adds data in BUFFER.
253         (linux_xfer_osdata_fds): Likewise.
254         (linux_xfer_osdata_modules): Likewise.
255         (linux_xfer_osdata_msg): Likewise.
256         (linux_xfer_osdata_processes): Likewise.
257         (linux_xfer_osdata_processgroups): Likewise.
258         (linux_xfer_osdata_sem): Likewise.
259         (linux_xfer_osdata_shm): Likewise.
260         (linux_xfer_osdata_isockets): Likewise.
261         (linux_xfer_osdata_threads): Likewise.
262
263 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
264
265         * nat/linux-osdata.c: Removed various trailing spaces.
266
267 2018-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
268
269         * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
270         leading whitespace before #include line.
271
272 2018-12-08  Simon Marchi  <simon.marchi@ericsson.com>
273             Дилян Палаузов  <dilyan.palauzov@aegee.org>
274
275         PR gdb/23950
276         * configure.ac: Search for tgetent in libtinfow.
277         * configure: Re-generate.
278
279 2018-12-08  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
280
281         * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
282         (thread_db_err_str): Forward declare.
283         (delete_thread_db_info): Call td_ta_delete_p if available.
284         (try_thread_db_load_1): Acquire td_ta_delete address.
285         * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
286
287 2018-12-08  Pedro Alves  <palves@redhat.com>
288
289         * source.c (forward_search_command): Rename to ...
290         (search_command_helper): ... this.  Add 'forward' parameter.
291         Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
292         buffer.  Handle backward searches too.
293         (forward_search_command, reverse_search_command): Reimplement by
294         calling search_command_helper.
295
296 2018-12-07  Andrew Burgess  <andrew.burgess@embecosm.com>
297
298         * .dir-locals.el: Copy most of the settings from c-mode over to
299         c++-mode.
300
301 2018-12-08  Stafford Horne  <shorne@gmail.com>
302
303         * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
304         * configure.tgt: Add or1k*-*-linux*.
305         * or1k-linux-tdep.c: New file.
306         * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
307
308 2018-12-07  Pedro Alves  <palves@redhat.com>
309
310         * dwarf2read.c (get_gdb_index_contents_from_section): Use
311         gdb::make_array_view.
312
313 2018-12-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
314
315         * language.c (_initialize_language): Fix leak by assigning
316         a static string to language.  Same for range and case_sensitive,
317         even if no leak is detected for these variables.
318
319 2018-12-05  John Baldwin  <jhb@FreeBSD.org>
320
321         * configure: Re-generate.
322         * configure.ac: Use separate sed expressions to escape variables
323         in auto-load directories.
324
325 2018-12-05  Andrew Burgess  <andrew.burgess@embecosm.com>
326
327         * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
328         (riscv_find_default_target_description): Use new function to
329         extract feature from gdbarch_info.
330         (riscv_gdbarch_init): Add error checks for xlen and flen between
331         target description and bfd headers.  Be smarter about when we
332         think the hardware floating point abi should be used.
333
334 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
335
336         * nat/aarch64-linux-hw-point.c
337         (aarch64_linux_any_set_debug_regs_state): New function.
338         * nat/aarch64-linux-hw-point.h
339         (aarch64_linux_any_set_debug_regs_state): New declaration.
340         * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
341         BPs or WPs are set.
342
343 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
344
345         * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
346         (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
347
348 2018-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
349             Simon Marchi  <simon.marchi@ericsson.com>
350
351         * linespec.c (symtab_vector_up): Remove.
352         (symtabs_from_filename): Change return type to std::vector.
353         (collect_symtabs_from_filename): Likewise.
354         (create_sals_line_offset): Assign return value of
355         collect_symtabs_from_filename to *ls->file_symtabs.
356         (convert_explicit_location_to_linespec): Remove call to release.
357         (parse_linespec): Likewise.
358         (symtab_collector) <symtab_collector>: Remove initialization of
359         m_symtabs.
360         <release_symtabs>: Change return type to std::vector<symtab *>.
361         <operator ()>: Adjust.
362
363 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
364
365         * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
366         defined.
367         (union sigval32, struct siginfo32, fbsd_siginfo_size)
368         (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
369         of KERN_PROC_AUXV and PT_LWPINFO.
370         (fbsd_nat_target::xfer_partial): Define method unconditionally.
371         Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
372         Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
373         Make TARGET_OBJECT_FREEBSD_VMMAP and
374         TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
375         and KERN_PROC_PS_STRINGS.
376         * fbsd-nat.h: Include <sys/proc.h>.
377         (fbsd_nat_target::xfer_partial): Declare method unconditionally.
378
379 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
380
381         * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
382         header files.
383         (riscv_linux_nat_target::read_description): New method.
384
385 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
386
387         * arch/riscv.h (riscv_gdbarch_features::hash): New method.
388         * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
389         (riscv_tdesc_cache): New global.
390         (riscv_create_target_description): Look in the cache before
391         creating a new target description.
392
393 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
394
395         * arch/riscv.h (riscv_gdb_features::operator==): New.
396         (riscv_gdb_features::operator!=): New.
397         * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
398         operator.
399
400 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
401
402         * arch/riscv.h (riscv_create_target_description): Make return type
403         const.
404         * arch/riscv.c (riscv_create_target_description): Likewise.
405         * riscv-tdep.c (riscv_find_default_target_description): Likewise.
406
407 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
408             Keith Seitz  <keiths@redhat.com>
409             Tom Tromey  <tom@tromey.com>
410             Sergio Durigan Junior  <sergiodj@redhat.com>
411
412         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
413         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
414         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
415         inside the CU.
416
417 2018-11-30  Pedro Alves  <palves@redhat.com>
418
419         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
420         <stratum>: New override.
421         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
422         <stratum>: New override.
423         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
424         <stratum>: New override.
425         * exec.c (exec_target) <exec_target>: Delete.
426         <stratum>: New override.
427         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
428         stratum method instead of the to_stratum field.
429         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
430         <stratum>: New override.
431         (thread_db_target::thread_db_target): Delete.
432         * make-target-delegates (print_class): Don't print a ctor
433         declaration.  Print a stratum method override declaration.
434         * process-stratum-target.h (process_stratum_target)
435         <process_stratum_target>: Delete.
436         <stratum>: New override.
437         * ravenscar-thread.c (ravenscar_thread_target)
438         <ravenscar_thread_target>: Delete.
439         <stratum>: New override.
440         * record-btrace.c (record_btrace_target)
441         <record_btrace_target>: Delete.
442         <stratum>: New override.
443         * record-full.c (record_full_base_target)
444         <record_full_base_target>: Delete.
445         <stratum>: New override.
446         * record.c (record_disconnect, record_detach)
447         (record_mourn_inferior, record_kill): Adjust to use the stratum
448         method instead of the to_stratum field.
449         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
450         * sol-thread.c (sol_thread_target)
451         <sol_thread_target>: Delete.
452         <stratum>: New override.
453         * spu-multiarch.c (spu_multiarch_target)
454         <spu_multiarch_target>: Delete.
455         <stratum>: New override.
456         * target-delegates.c: Regenerate.
457         * target.c (target_stack::push, target_stack::unpush)
458         (pop_all_targets_above, pop_all_targets_at_and_above)
459         (info_target_command, target_require_runnable)
460         (target_stack::find_beneath): Adjust to use the stratum method
461         instead of the to_stratum field.
462         (dummy_target::dummy_target): Delete.
463         (dummy_target::stratum): New.
464         (debug_target::debug_target): Delete.
465         (debug_target::stratum): New.
466         (maintenance_print_target_stack): Adjust to use the stratum method
467         instead of the to_stratum field.
468         * target.h (struct target_ops) <stratum>: New method.
469         <to_stratum>: Delete.
470         <is_pushed>: Adjust to use the stratum method
471         instead of the to_stratum field.
472
473 2018-11-30  Pedro Alves  <palves@redhat.com>
474
475         * corelow.c (core_target) <has_all_memory, has_execution>: New
476         overrides.
477         * inf-child.c (inf_child_target::has_all_memory)
478         (inf_child_target::has_memory, inf_child_target::has_stack)
479         (inf_child_target::has_registers)
480         (inf_child_target::has_execution): Delete.
481         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
482         has_stack, has_registers, has_execution>: Delete.
483         * process-stratum-target.c
484         (process_stratum_target::has_all_memory)
485         (process_stratum_target::has_memory)
486         (process_stratum_target::has_stack)
487         (process_stratum_target::has_registers)
488         (process_stratum_target::has_execution): New.
489         * process-stratum-target.h (process_stratum_target)
490         <has_all_memory, has_memory, has_stack, has_registers,
491         has_execution>: New method overrides.
492         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
493         has_memory, has_stack, has_registers, has_execution>: Delete.
494         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
495         has_execution>: Delete.
496         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
497         has_registers, has_execution>: Delete.
498         * target.c (default_child_has_all_memory)
499         (default_child_has_memory, default_child_has_stack)
500         (default_child_has_registers, default_child_has_execution):
501         Delete.
502         * target.h (default_child_has_all_memory)
503         (default_child_has_memory, default_child_has_stack)
504         (default_child_has_registers, default_child_has_execution):
505         Delete.
506         * tracefile.h (tracefile_target) <has_execution>: New override.
507
508 2018-11-30  Pedro Alves  <palves@redhat.com>
509
510         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
511         * bsd-kvm.c: Include "process-stratum-target.h".
512         (bsd_kvm_target): Now inherits from process_stratum_target.
513         (bsd_kvm_target::bsd_kvm_target): Default it.
514         * corelow.c: Include "process-stratum-target.h".
515         (core_target): Now inherits from process_stratum_target.
516         (core_target::core_target): Don't set to_stratum here.
517         * inf-child.c (inf_child_target::inf_child_target): Delete.
518         * inf-child.h: Include "process-stratum-target.h".
519         (inf_child_target): Inherit from process_stratum_target.
520         (inf_child_target) <inf_child_target>: Default it.
521         <can_async_p, supports_non_stop, supports_disable_randomization>:
522         Delete overrides.
523         * process-stratum-target.c: New file.
524         * process-stratum-target.h: New file.
525         * remote-sim.c: Include "process-stratum-target.h".
526         (gdbsim_target): Inherit from process_stratum_target.
527         <gdbsim_target>: Default it.
528         * remote.c: Include "process-stratum-target.h".
529         (remote_target): Inherit from process_stratum_target.
530         <remote_target>: Default it.
531         * target.c (default_thread_address_space)
532         (default_thread_architecture): Delete.
533         * target.h (target_ops) <thread_architecture>: Now returns NULL by
534         default.
535         <thread_address_space>: Ditto.
536         * test-target.h: Include "process-stratum-target.h" instead of
537         "target.h".
538         (test_target_ops): Inherit from process_stratum_target.
539         <test_target_ops>: Default it.
540         * tracefile.c (tracefile_target::tracefile_target): Delete.
541         * tracefile.h: Include "process-stratum-target.h".
542         (tracefile_target): Inherit from process_stratum_target.
543         <tracefile_target>: Default it.
544         * target-delegates.c: Regenerate.
545
546 2018-11-30  Pedro Alves  <palves@redhat.com>
547
548         * Makefile.in (COMMON_SFILES): Add test-target.c.
549         * gdbarch-selftests.c: Include "test-target.h".
550         * regcache.c: Include "test-target.h".
551         * target.c (test_target_info, test_target_ops::info): Move to ...
552         * test-target.c: ... this new file.
553         * target.h (test_target_ops): Move to ...
554         * test-target.h: ... this new file.
555
556 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
557
558         * source.c (forward_search_command): Fix leak by using
559         xrealloc even for the first allocation in the loop, as buf
560         is static.
561
562 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
563
564         PR gdb/23093
565         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
566         (fbsd_gdb_signal_to_target): New.
567         (fbsd_init_abi): Install gdbarch "signal_from_target" and
568         "signal_to_target" methods.
569
570 2018-11-29  Tom Tromey  <tom@tromey.com>
571
572         * valarith.c (value_x_unop): Don't set argvec[3].
573
574 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
575
576         PR gdb/23917
577         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
578         semicolon.
579
580 2018-11-26  Pedro Alves  <palves@redhat.com>
581
582         * procfs.c (procfs_notice_thread): Replace uses of
583         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
584         * sol-thread.c (sol_thread_target::wait)
585         (sol_update_thread_list_callback): Likewise.
586
587 2018-11-25  Tom Tromey  <tom@tromey.com>
588
589         * ui-out.c (ui_out::field_fmt): Remove comment.
590         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
591         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
592
593 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
594
595         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
596         leak in open_source_file' has been partially undone by '2179fbc36d23
597         Return scoped_fd from open_source_file'. Re-add the transfer of
598         current s->fullname to the unique_xmalloc_ptr fullname given
599         to find_and_open_source.
600
601 2018-11-23  Pedro Alves  <palves@redhat.com>
602
603         * gdbthread.h (enum thread_state): Move comments here.
604         (is_running, is_stopped, is_exited): Remove declarations.
605
606 2018-11-22  Pedro Alves  <palves@redhat.com>
607
608         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
609         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
610         ALL_NON_EXITED_THREADS with all_non_exited_threads.
611         (print_one_breakpoint_location): Replace ALL_INFERIORS with
612         all_inferiors.
613         * bsd-kvm.c: Include inferior.h.
614         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
615         with all_non_exited_threads.
616         * common/filtered-iterator.h: New.
617         * common/safe-iterator.h: New.
618         * corelow.c (core_target_open): Don't call init_thread_list here.
619         * darwin-nat.c (thread_info_from_private_thread_info): Replace
620         ALL_THREADS with all_threads.
621         * fbsd-nat.c (fbsd_nat_target::resume): Replace
622         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
623         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
624         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
625         * fork-child.c (postfork_hook): Don't call init_thread_list here.
626         * gdbarch-selftests.c (register_to_value_test): Adjust.
627         * gdbthread.h: Don't include "inferior.h" here.
628         (struct inferior): Forward declare.
629         (enum step_over_calls_kind): Moved here from inferior.h.
630         (thread_info::deletable): Definition moved to thread.c.
631         (find_thread_ptid (inferior *, ptid_t)): Declare.
632         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
633         Include "thread-iter.h".
634         (all_threads, all_non_exited_threads, all_threads_safe): New.
635         (any_thread_p): Declare.
636         (thread_list): Delete.
637         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
638         all_non_exited_threads.
639         (proceed_after_attach_callback): Delete.
640         (proceed_after_attach): Take an inferior pointer instead of an
641         integer PID.  Adjust to use range-for.
642         (attach_post_wait): Pass down inferior pointer instead of pid.
643         Use range-for instead of ALL_NON_EXITED_THREADS.
644         (detach_command): Remove init_thread_list call.
645         * inferior-iter.h: New.
646         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
647         (delete_thread_of_inferior): Delete.
648         (delete_inferior, exit_inferior_1): Use range-for with
649         inf->threads_safe() instead of iterate_over_threads.
650         (inferior_appeared): Call init_thread_list here.
651         (discard_all_inferiors): Use all_non_exited_inferiors.
652         (find_inferior_id, find_inferior_pid): Use all_inferiors.
653         (iterate_over_inferiors): Use all_inferiors_safe.
654         (have_inferiors, number_of_live_inferiors): Use
655         all_non_exited_inferiors.
656         (number_of_inferiors): Use all_inferiors and std::distance.
657         (print_inferior): Use all_inferiors.
658         * inferior.h: Include gdbthread.h.
659         (enum step_over_calls_kind): Moved to gdbthread.h.
660         (struct inferior) <thread_list>: New field.
661         <threads, non_exited_threads, threads_safe>: New methods.
662         (ALL_INFERIORS): Delete.
663         Include "inferior-iter.h".
664         (ALL_NON_EXITED_INFERIORS): Delete.
665         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
666         functions.
667         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
668         ALL_NON_EXITED_THREADS with all_non_exited_threads.
669         * infrun.c (follow_exec): Use all_threads_safe.
670         (clear_proceed_status, proceed): Use all_non_exited_threads.
671         (init_wait_for_inferior): Don't clear inline frame state here.
672         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
673         all_threads instead of ALL_NON_EXITED_THREADS.
674         (random_pending_event_thread): Use all_non_exited_threads instead
675         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
676         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
677         instead of ALL_NON_EXITED_THREADS.
678         (handle_no_resumed): Use all_non_exited_threads instead of
679         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
680         ALL_INFERIORS.
681         (restart_threads, switch_back_to_stepped_thread): Use
682         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
683         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
684         all_inferiors.
685         (kill_unfollowed_fork_children): Use inf->non_exited_threads
686         instead of ALL_NON_EXITED_THREADS.
687         * linux-tdep.c (linux_make_corefile_notes): Use
688         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
689         * linux-thread-db.c (thread_db_target::update_thread_list):
690         Replace ALL_INFERIORS with all_inferiors.
691         (thread_db_target::thread_handle_to_thread_info): Use
692         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
693         * mi/mi-interp.c (multiple_inferiors_p): New.
694         (mi_on_resume_1): Simplify using all_non_exited_threads and
695         multiple_inferiors_p.
696         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
697         instead of ALL_NON_EXITED_THREADS.
698         * nto-procfs.c (nto_procfs_target::open): Don't call
699         init_thread_list here.
700         * record-btrace.c (record_btrace_target_open)
701         (record_btrace_target::stop_recording)
702         (record_btrace_target::close)
703         (record_btrace_target::record_is_replaying)
704         (record_btrace_target::resume, record_btrace_target::wait)
705         (record_btrace_target::record_stop_replaying): Use
706         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
707         * record-full.c (record_full_wait_1): Use all_non_exited_threads
708         instead of ALL_NON_EXITED_THREADS.
709         * regcache.c (cooked_read_test): Remove reference to global
710         thread_list.
711         * remote-sim.c (gdbsim_target::create_inferior): Don't call
712         init_thread_list here.
713         * remote.c (remote_target::update_thread_list): Use
714         all_threads_safe instead of ALL_NON_EXITED_THREADS.
715         (remote_target::process_initial_stop_replies): Replace
716         ALL_INFERIORS with all_non_exited_inferiors and use
717         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
718         (remote_target::open_1): Don't call init_thread_list here.
719         (remote_target::append_pending_thread_resumptions)
720         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
721         instead of ALL_NON_EXITED_THREADS.
722         (remote_target::commit_resume)
723         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
724         with all_non_exited_inferiors and use all_non_exited_threads
725         instead of ALL_NON_EXITED_THREADS.
726         (remote_target::kill_new_fork_children): Use
727         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
728         init_thread_list and init_wait_for_inferior calls.
729         (remote_target::remote_btrace_maybe_reopen)
730         (remote_target::thread_handle_to_thread_info): Use
731         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
732         * target.c (target_terminal::restore_inferior)
733         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
734         all_non_exited_inferiors.
735         * thread-iter.c: New file.
736         * thread-iter.h: New file.
737         * thread.c: Include "inline-frame.h".
738         (thread_list): Delete.
739         (clear_thread_inferior_resources): Call clear_inline_frame_state.
740         (init_thread_list): Use all_threads_safe instead of
741         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
742         (new_thread): Adjust to per-inferior thread lists.
743         (add_thread_silent): Pass inferior to find_thread_ptid.
744         (thread_info::deletable): New, moved from the header.
745         (delete_thread_1): Adjust to per-inferior thread lists.
746         (find_thread_global_id): Use inf->threads().
747         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
748         find_thread_ptid.
749         (find_thread_ptid(inferior*, ptid_t)): New overload.
750         (iterate_over_threads): Use all_threads_safe.
751         (any_thread_p): New.
752         (thread_count): Use all_threads and std::distance.
753         (live_threads_count): Use all_non_exited_threads and
754         std::distance.
755         (valid_global_thread_id): Use all_threads.
756         (in_thread_list): Use find_thread_ptid.
757         (first_thread_of_inferior): Adjust to per-inferior thread lists.
758         (any_thread_of_inferior, any_live_thread_of_inferior): Use
759         inf->non_exited_threads().
760         (prune_threads, delete_exited_threads): Use all_threads_safe.
761         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
762         (set_resumed, set_running): Use all_non_exited_threads.
763         (is_thread_state, is_stopped, is_exited, is_running)
764         (is_executing): Delete.
765         (set_executing, set_stop_requested, finish_thread_state): Use
766         all_non_exited_threads.
767         (print_thread_info_1): Use all_inferiors and all_threads.
768         (thread_apply_all_command): Use all_non_exited_threads.
769         (thread_find_command): Use all_threads.
770         (update_threads_executing): Use all_non_exited_threads.
771         * tid-parse.c (parse_thread_id): Use inf->threads.
772         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
773
774 2018-11-22  Pedro Alves  <palves@redhat.com>
775
776         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
777         switch to it before calling into try_open_exec_file.
778
779 2018-11-22  Pedro Alves  <palves@redhat.com>
780
781         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
782         inferior_thread instead of find_thread_ptid, and only when
783         inferior_ptid is not null_ptid.
784         * inferior.c (add_inferior): Don't include target_pid_to_str
785         output when the inferior is not started.
786         * python/py-inferior.c (python_on_normal_stop): Don't use
787         find_thread_ptid.
788         (tui_on_user_selected_context_changed): Use inferior_thread
789         instead of find_thread_ptid, and only when inferior_ptid is not
790         null_ptid.
791
792 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
793
794         PR python/23714
795         * gdb/python/python.c (execute_gdb_command): Call
796         prevent_dont_repeat earlier to avoid affecting dont_repeat.
797
798 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
799
800         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
801         (HFILES_NO_SRCDIR): Add arch/riscv.h.
802         * arch/riscv.c: New file.
803         * arch/riscv.h: New file.
804         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
805         this list, and add arch/riscv.o.
806         * features/Makefile: Add riscv features.
807         * features/riscv/32bit-cpu.c: New file.
808         * features/riscv/32bit-cpu.xml: New file.
809         * features/riscv/32bit-csr.c: New file.
810         * features/riscv/32bit-csr.xml: New file.
811         * features/riscv/32bit-fpu.c: New file.
812         * features/riscv/32bit-fpu.xml: New file.
813         * features/riscv/64bit-cpu.c: New file.
814         * features/riscv/64bit-cpu.xml: New file.
815         * features/riscv/64bit-csr.c: New file.
816         * features/riscv/64bit-csr.xml: New file.
817         * features/riscv/64bit-fpu.c: New file.
818         * features/riscv/64bit-fpu.xml: New file.
819         * features/riscv/rebuild-csr-xml.sh: New file.
820         * riscv-tdep.c: Add 'arch/riscv.h' include.
821         (riscv_gdb_reg_names): Delete.
822         (csr_reggroup): New global.
823         (struct riscv_register_alias): Delete.
824         (struct riscv_register_feature): New structure.
825         (riscv_register_aliases): Delete.
826         (riscv_xreg_feature): New global.
827         (riscv_freg_feature): New global.
828         (riscv_virtual_feature): New global.
829         (riscv_csr_feature): New global.
830         (riscv_create_csr_aliases): New function.
831         (riscv_read_misa_reg): Delete.
832         (riscv_has_feature): Delete.
833         (riscv_isa_xlen): Simplify, just return cached xlen.
834         (riscv_isa_flen): Simplify, just return cached flen.
835         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
836         (riscv_register_name): Update to make use of tdesc_register_name.
837         Look up xreg and freg names in the new globals riscv_xreg_feature
838         and riscv_freg_feature.  Don't supply csr aliases here.
839         (riscv_fpreg_q_type): Delete.
840         (riscv_register_type): Use tdesc_register_type in almost all
841         cases, override the returned type in a few specific cases only.
842         (riscv_print_one_register_info): Handle errors reading registers.
843         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
844         registers that are otherwise unknown to GDB.  Also check the
845         csr_reggroup.
846         (riscv_print_registers_info): Remove assert about upper register
847         number, and use gdbarch_register_reggroup_p instead of
848         short-cutting.
849         (riscv_find_default_target_description): New function.
850         (riscv_check_tdesc_feature): New function.
851         (riscv_add_reggroups): New function.
852         (riscv_setup_register_aliases): New function.
853         (riscv_init_reggroups): New function.
854         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
855         setup register groups.  Register new riscv debug variable.
856         * riscv-tdep.h: Add 'arch/riscv.h' include.
857         (struct gdbarch_tdep): Remove abi union, and add
858         riscv_gdbarch_features field.  Remove cached quad floating point
859         type, and provide initialisation for double type field.
860         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
861         the list of targets using the feature based target descriptions.
862         * NEWS: Mention target description support.
863
864 2018-11-21  Pedro Alves  <palves@redhat.com>
865
866         * valops.c (find_method_list, value_find_oload_method_list)
867         (find_overload_match, find_oload_champ): Rename parameters and
868         locals.
869
870 2018-11-21  Pedro Alves  <palves@redhat.com>
871
872         * valops.c (find_method_list): Replace pointer and length
873         parameters with an gdb::array_view.  Adjust.
874         (value_find_oload_method_list): Likewise.
875         (find_overload_match): Use gdb::array_view for methods list.
876         Adjust to find_oload_champ interface change.
877         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
878         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
879
880 2018-11-21  Pedro Alves  <palves@redhat.com>
881
882         * gdbtypes.c (compare_badness): Change type of parameters to const
883         reference.  Adjust to badness_vector being a std::vector now.
884         (rank_function): Adjust to badness_vector being a std::vector now.
885         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
886         (LENGTH_MATCH): Delete.
887         (compare_badness): Change type of parameters to const reference.
888         (rank_function): Return a badness_vector by value now.
889         (find_overload_match): Adjust to badness_vector being a
890         std::vector now.  Remove cleanups.
891         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
892         badness_vector pointer.
893         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
894         a badness_vector pointer.  Adjust to badness_vector being a
895         std::vector now.  Remove cleanups.
896         (find_oload_champ): 'oload_champ_bv' parameter now
897         a badness_vector pointer.  Adjust to badness_vector being a
898         std::vector now.  Remove cleanups.
899
900 2018-11-21  Pedro Alves  <palves@redhat.com>
901
902         * cp-support.c (sym_return_val_size, sym_return_val_index)
903         (sym_return_val): Delete.
904         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
905         add to the vector.
906         (make_symbol_overload_list): Adjust to return a std::vector
907         instead of maintaining a global open coded vector.
908         (make_symbol_overload_list_block): Add std::vector parameter.
909         (make_symbol_overload_list_block): Rename to ...
910         (add_symbol_overload_list_block): ... this and add std::vector
911         parameter.
912         (make_symbol_overload_list_namespace): Rename to ...
913         (add_symbol_overload_list_namespace): ... this and add std::vector
914         parameter.
915         (make_symbol_overload_list_adl_namespace): Rename to ...
916         (add_symbol_overload_list_adl_namespace): ... this and add
917         std::vector parameter.
918         (make_symbol_overload_list_adl): Delete.
919         (add_symbol_overload_list_adl): New.
920         (make_symbol_overload_list_using): Rename to ...
921         (add_symbol_overload_list_using): ... this and add std::vector
922         parameter.
923         (make_symbol_overload_list_qualified): Rename to ...
924         (add_symbol_overload_list_qualified): ... this and add std::vector
925         parameter.
926         * cp-support.h: Include "common/array-view.h" and <vector>.
927         (make_symbol_overload_list): Change return type to std::vector.
928         (make_symbol_overload_list_adl): Delete declaration.
929         (add_symbol_overload_list_adl): New declaration.
930         * valops.c (find_overload_match): Local 'oload_syms' now a
931         std::vector.
932         (find_oload_champ_namespace): 'oload_syms' parameter now a
933         std::vector pointer.
934         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
935         std::vector pointer.  Adjust to new make_symbol_overload_list
936         interface.
937
938 2018-11-21  Pedro Alves  <palves@redhat.com>
939
940         * common/array-view.h (array_view::splice(size_type, size_t)): New.
941         (array_view::splice(size_type)): New.
942         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
943         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
944         std::vector.
945         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
946         * extension.h: Include "common/array-view.h".
947         (xmethod_worker::invoke): Adjust to use gdb::array_view.
948         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
949         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
950         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
951         (xmethod_worker::do_get_result_type): Adjust to use
952         gdb::array_view.
953         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
954         * gdbtypes.h: Include "common/array-view.h".
955         (rank_function): Adjust to use gdb::array_view.
956         * python/py-xmethods.c (python_xmethod_worker::invoke)
957         (python_xmethod_worker::do_get_arg_types)
958         (python_xmethod_worker::do_get_result_type)
959         (python_xmethod_worker::invoke): Adjust to new interfaces.
960         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
961         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
962         * valops.c (find_overload_match, find_oload_champ_namespace)
963         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
964         gdb:array_view and the new xmethod_worker interfaces.
965         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
966         gdb::array_view.
967         * value.h (find_overload_match, result_type_of_xmethod)
968         (call_xmethod): Adjust to use gdb::array_view.
969         * unittests/array-view-selftests.c: Add slicing tests.
970
971 2018-11-21  Pedro Alves  <palves@redhat.com>
972
973         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
974         * common/array-view.h (make_array_view): New.
975         * compile/compile-object-run.c (compile_object_run): Adjust to
976         pass an array_view.
977         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
978         * eval.c (eval_call): Adjust to pass an array_view.
979         (evaluate_subexp_standard): Adjust to pass an array_view.
980         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
981         * guile/scm-value.c (gdbscm_value_call): Likewise.
982         * infcall.c (push_dummy_code): Replace pointer + size parameters
983         with an array_view parameter.
984         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
985         adjust.
986         * infcall.h: Include "common/array-view.h".
987         (call_function_by_hand, call_function_by_hand_dummy): Replace
988         pointer + size parameters with an array_view parameter.
989         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
990         * linux-tdep.c (linux_infcall_mmap): Likewise.
991         * objc-lang.c (lookup_objc_class, lookup_child_selector)
992         (value_nsstring, print_object_command): Likewise.
993         * python/py-value.c (valpy_call): Likewise.
994         * rust-lang.c (rust_evaluate_funcall): Likewise.
995         * spu-tdep.c (flush_ea_cache): Likewise.
996         * valarith.c (value_x_binop, value_x_unop): Likewise.
997         * valops.c (value_allocate_space_in_inferior): Likewise.
998         * unittests/array-view-selftests.c (run_tests): Add
999         gdb::make_array_view test.
1000
1001 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
1002
1003         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
1004         than a fixed size buffer.
1005
1006 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
1007
1008         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
1009         and remove insertion of extra spaces in GDB's output.
1010         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
1011         Layout field into a temporary buffer, and then output it as a
1012         string field.
1013
1014 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1015
1016         * NEWS: Document the language choice done by
1017         'info [types|functions|variables]|rbreak'.
1018
1019 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1020
1021         * symtab.c (treg_matches_sym_type_name): Use
1022         scoped_switch_to_sym_language_if_auto instead of local logic.
1023         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1024         to switch to SYM language when language mode is auto.
1025
1026 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1027
1028         * language.h (scoped_switch_to_sym_language_if_auto): New class.
1029
1030 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1031
1032         * symtab.c (search_symbols): Properly check absence of type regexp
1033         before entering the loop scanning the minimal symbols.
1034
1035 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
1036
1037         * s12z-tdep.c (s12z_extract_return_value): New function.
1038         (inv_reg_perm) New array.
1039         (s12z_return_value): Populate readbuf if non-null.
1040
1041 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
1042
1043         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1044         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1045         to MinGW fixed by Gnulib.
1046         (O_NOINHERIT): Define if not defined.
1047
1048 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
1049
1050         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1051
1052 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1053
1054         * infrun.c (displaced_step_inferior_state) <next>: Remove.
1055
1056 2018-11-19  Tom Tromey  <tom@tromey.com>
1057
1058         * source.c (get_filename_and_charpos): Return void.
1059
1060 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1061
1062         * skip.c (_initialize_step_skip): Fix "info skip" help.
1063
1064 2018-11-16  Tom Tromey  <tom@tromey.com>
1065
1066         PR rust/23625:
1067         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1068
1069 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1070
1071         * infrun.c (displaced_step_inferior_states): Change type to
1072         std::forward_list.
1073         (get_displaced_stepping_state): Adjust.
1074         (displaced_step_in_progress_any_inferior): Adjust.
1075         (add_displaced_stepping_state): Adjust.
1076         (remove_displaced_stepping_state): Adjust.
1077
1078 2018-11-18  Tom Tromey  <tom@tromey.com>
1079
1080         PR build/23814:
1081         * target-delegates.c: Rebuild.
1082         * ia64-linux-nat.c (class ia64_linux_nat_target)
1083         <have_steppable_watchpoint>: Use override.  Return true, not 1.
1084         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
1085         "self" argument.
1086         (ia64_linux_nat_target::low_new_thread): Rename.
1087         (class ia64_linux_nat_target) <read_description>: Don't declare.
1088         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1089         bool.
1090
1091 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1092
1093         PR gdb/22736:
1094         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1095         lang_struct_return code.
1096
1097 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1098
1099         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1100         return_method.
1101         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1102         * amd64-tdep.c (amd64_push_arguments): Likewise.
1103         (amd64_push_dummy_call): Likewise.
1104         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1105         * arc-tdep.c (arc_push_dummy_call): Likewise.
1106         * arm-tdep.c (arm_push_dummy_call): Likewise.
1107         * avr-tdep.c (avr_push_dummy_call): Likewise.
1108         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1109         * cris-tdep.c (cris_push_dummy_call): Likewise.
1110         * csky-tdep.c (csky_push_dummy_call): Likewise.
1111         * frv-tdep.c (frv_push_dummy_call): Likewise.
1112         * gdbarch.c: Regenerate.
1113         * gdbarch.h: Regenerate.
1114         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1115         return_method.
1116         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1117         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1118         (hppa64_push_dummy_call): Likewise.
1119         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1120         * i386-tdep.c (i386_push_dummy_call): Likewise.
1121         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1122         * infcall.c (call_function_by_hand_dummy): Likewise.
1123         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1124         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1125         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1126         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1127         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1128         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1129         * mep-tdep.c (mep_push_dummy_call): Likewise.
1130         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1131         (mips_n32n64_push_dummy_call): Likewise.
1132         (mips_o32_push_dummy_call): Likewise.
1133         (mips_o64_push_dummy_call): Likewise.
1134         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1135         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1136         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1137         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1138         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1139         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1140         (ppc64_sysv_abi_push_dummy_call): Likewise.
1141         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1142         (ppc64_sysv_abi_push_dummy_call): Likewise.
1143         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1144         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1145         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1146         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1147         * rx-tdep.c (rx_push_dummy_call): Likewise.
1148         * s390-tdep.c (s390_push_dummy_call): Likewise.
1149         * score-tdep.c (score_push_dummy_call): Likewise.
1150         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1151         (sh_push_dummy_call_nofpu): Likewise.
1152         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1153         (sparc32_push_dummy_call): Likewise.
1154         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1155         (sparc64_push_dummy_call): Likewise.
1156         * spu-tdep.c (spu_push_dummy_call): Likewise.
1157         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1158         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1159         * v850-tdep.c (v850_push_dummy_call): Likewise.
1160         * vax-tdep.c (vax_push_dummy_call): Likewise.
1161         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1162         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1163
1164 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1165
1166         * gdbarch.sh (enum function_call_return_method): Add enum.
1167         * gdbarch.h: Regenerate.
1168         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1169
1170 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
1171
1172         * unittests/copy_bitwise-selftests.c: New file.
1173         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1174         (selftests::copy_bitwise_tests): Delete, moving this code to
1175         unittests/copy_bitwise-selftests.c instead.
1176         (_initialize_utils): Do not register copy_bitwise tests.
1177         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1178         unittests/copy_bitwise-selftests.c.
1179
1180 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
1181
1182         * ada-lang.c (move_bits): Delete. Update all callers to use
1183         copy_bitwise instead.
1184         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1185         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1186         Move from here to utils.c.
1187         (_initialize_dwarf2loc): Remove call to register copy_bitwise
1188         selftests.
1189         * utils.h (copy_bitwise): Add declaration.
1190         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1191         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1192         Moved here from dwarf2loc.c.
1193         (_initialize_utils): Register copy_bitwise selftests.
1194
1195 2018-11-14  Jim Wilson  <jimw@sifive.com>
1196
1197         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1198         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1199         then increment next_regnum if odd.
1200         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
1201         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
1202         function type.  Pass new arg to riscv_arg_location based on function
1203         type.
1204         (riscv_return_value): Pass new arg to riscv_arg_location.
1205
1206         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1207         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1208         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1209
1210         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1211         setting len.  New local align, set to max of arg align and xlen,
1212         and pass to first riscv_assign_stack_location call.
1213
1214 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
1215
1216         * skip.c (complete_skip_number): New function.
1217         (_initialize_step_skip): Add completers to some skip commands.
1218
1219 2018-11-09  Tom Tromey  <tom@tromey.com>
1220
1221         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1222         (struct remote_g_packet_data): Derive from allocate_on_obstack.
1223         <guesses>: Now a std::vector.
1224         (remote_g_packet_data_init, register_remote_g_packet_guess):
1225         Update.
1226         (remote_read_description_p): Update.  Return bool.
1227         (remote_target::read_description): Update.
1228         (struct remote_g_packet_guess): Add constructor.
1229
1230 2018-11-09  Tom Tromey  <tom@tromey.com>
1231
1232         * common/scoped_fd.h (class scoped_fd): Add move constructor and
1233         move assignment operator.
1234         * psymtab.c (psymtab_to_fullname): Update.
1235         * source.h (open_source_file): Return scoped_fd.
1236         (find_and_open_source): Likewise.
1237         * source.c (open_source_file): Return scoped_fd.
1238         (get_filename_and_charpos): Update.
1239         (print_source_lines_base): Update.  Use scoped_fd::to_file.
1240         (forward_search_command): Likewise.
1241         (reverse_search_command): Likewise.
1242         (find_and_open_source): Return scoped_fd.
1243         * tui/tui-source.c (tui_set_source_content): Update.  Use
1244         gdb_file_up.
1245
1246 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
1247
1248         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1249         overflow.
1250
1251 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1252
1253         * configure: Regenerate.
1254
1255 2018-11-09  Tom de Vries  <tdevries@suse.de>
1256
1257         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1258         unconditionally, to set the language of the symbol.  Manage freeing
1259         returned pointer using gdb::unique_xmalloc_ptr.
1260
1261 2018-11-08  Tom Tromey  <tom@tromey.com>
1262
1263         * record.c (require_record_target): Upper-case "<TAB>".
1264
1265 2018-11-08  Tom Tromey  <tom@tromey.com>
1266
1267         * python/lib/gdb/command/pretty_printers.py
1268         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1269
1270 2018-11-08  Tom Tromey  <tom@tromey.com>
1271
1272         PR gdb/23555:
1273         PR gdb/23838:
1274         * target.h (target_supports_terminal_ours): Return bool.
1275         * target.c (target_supports_terminal_ours): Handle case where
1276         current_top_target returns nullptr.  Return bool.
1277
1278 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
1279
1280         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1281         return the correct count for potential HFAs.
1282
1283 2018-11-08  Jan Beulich  <jbeulich@suse.com>
1284
1285         * i387-tdep.c (i387_supply_xsave): Split handling of
1286         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1287         (i387_collect_xsave): Likewise.
1288
1289 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1290
1291         * riscv-tdep.c (riscv_insn::decode): Update header comment.
1292         (riscv_frame_this_id): Catch errors thrown while building the
1293         frame cache, leave the frame id as the default, which is the outer
1294         frame id.
1295
1296 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1297
1298         * ada-lang.c (read_atcb): Only set task_info->called_task if
1299         task_info->state == Entry_Caller_Sleep.
1300         (print_ada_task_info): Do not check task_info->state before
1301         checking task_info->called_task.
1302         (info_task): Likewise.
1303
1304 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1305
1306         * ada-tasks.c (read_atcb): Clear task_info before computing
1307         the value of each of its fields.
1308
1309 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1310
1311         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1312         NULL before dereferencing it.
1313
1314 2018-11-06  Tom de Vries  <tdevries@suse.de>
1315
1316         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1317         program headers.
1318
1319 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
1320
1321         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1322         so that it applies to uclinux as well.
1323
1324 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
1325
1326         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1327         when on AAPCS.
1328
1329 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
1330
1331         * riscv-fbsd-nat.c (getregs_supplies): Return true for
1332         RISCV_CSR_SSTATUS_REGNUM.
1333
1334 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1335
1336         * source.c (open_source_file): Fix leak by transferring the
1337         current s->fullname to the unique_xmalloc_ptr fullname given
1338         to find_and_open_source.
1339
1340 2018-11-04  Tom Tromey  <tom@tromey.com>
1341
1342         * varobj.c (install_default_visualizer): Update.
1343         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1344         Return gdbpy_ref.
1345         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1346         (find_pretty_printer_from_progspace)
1347         (find_pretty_printer_from_gdb, find_pretty_printer)
1348         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1349         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1350         Update.
1351
1352 2018-11-04  Tom Tromey  <tom@tromey.com>
1353
1354         * python/python.c (gdbpy_parameter_value): Update.
1355         * python/python-internal.h (python_string_to_unicode)
1356         (python_string_to_target_python_string)
1357         (host_string_to_python_string): Return gdbpy_ref.
1358         * python/py-utils.c (python_string_to_unicode)
1359         (unicode_to_encoded_python_string)
1360         (unicode_to_target_python_string)
1361         (python_string_to_target_string)
1362         (python_string_to_target_python_string): Return gdbpy_ref.
1363         (python_string_to_host_string): Update.
1364         (host_string_to_python_string): Return gdbpy_ref.
1365         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1366         (stpy_fullname): Update.
1367         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1368         Update.
1369         * python/py-prettyprint.c (print_string_repr): Update.
1370         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1371         (objfpy_get_build_id): Update.
1372         * python/py-breakpoint.c (bppy_get_location)
1373         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1374         Update.
1375
1376 2018-11-04  Tom Tromey  <tom@tromey.com>
1377
1378         * python/python-internal.h (gdb_py_object_from_longest)
1379         (gdb_py_object_from_ulongest): Return gdbpy_ref.
1380         * python/py-value.c (valpy_int): Update.
1381         * python/py-utils.c (gdb_py_object_from_longest): Return
1382         gdbpy_ref.
1383         (gdb_py_object_from_ulongest): Likewise.
1384         * python/py-type.c (typy_get_alignof): Update.
1385         * python/py-linetable.c (ltpy_get_all_source_lines)
1386         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1387         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1388
1389 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1390
1391         * ada-lang.c (_initialize_ada_language): Fix typo.
1392
1393 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1394
1395         * language.c (type): Remove.
1396         (_initialize_language): Remove assignment to type.
1397
1398 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
1399
1400         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1401         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1402         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1403         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1404         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1405         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1406         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1407         and aarch64-ravenscar-thread.o.
1408         * NEWS: Add entry documenting Ravenscar tasking support
1409         on AArch64 ELF.
1410
1411 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1412
1413         * symtab.c (info_functions_command): Initialize quiet flag.
1414         * stack.c (info_args_command): Likewise.
1415
1416 2018-11-01  Jim Wilson  <jimw@sifive.com>
1417
1418         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1419         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1420         debugging messages.
1421
1422 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1423
1424         * ada-lang.c (ada_watch_location_expression): New function.
1425         (ada_language_defn): Set la_watch_location_expression to
1426         ada_watch_location_expression.
1427
1428 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1429
1430         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1431
1432 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1433
1434         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1435         shifting.
1436
1437 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1438             Joel Brobecker  <brobecker@adacore.com>
1439
1440         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1441         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1442         * arm-pikeos-tdep.c: New file.
1443         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1444         embedded system.
1445         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1446
1447 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1448
1449         * common/pathstuff.c (get_standard_temp_dir): New.
1450         * common/pathstuff.h (get_standard_temp_dir): New.
1451         * config.in: Re-generate.
1452         * configure: Re-generate.
1453         * configure.ac: Don't check for mkdtemp.
1454         * gnulib/aclocal-m4-deps.mk: Re-generate.
1455         * gnulib/aclocal.m4: Re-generate.
1456         * gnulib/config.in: Re-generate.
1457         * gnulib/configure: Re-generate.
1458         * gnulib/import/Makefile.am: Re-generate.
1459         * gnulib/import/Makefile.in: Re-generate.
1460         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1461         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1462         * gnulib/import/m4/mkdtemp.m4: New file.
1463         * gnulib/import/mkdtemp.c: New file.
1464         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1465         Add mkdtemp module.
1466         * unittests/mkdir-recursive-selftests.c (test): Use
1467         get_standard_temp_dir.
1468         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1469         ifdef.
1470         * compile/compile.c (get_compile_file_tempdir): Likewise.
1471
1472 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1473
1474         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1475         (SIG_FRAME_LR_OFFSET64): New define.
1476         (SIG_FRAME_FP_OFFSET64): New define.
1477         (aix_sighandle_frame_cache): New Function.
1478         (aix_sighandle_frame_this_id): New Function.
1479         (aix_sighandle_frame_prev_register): New Function.
1480         (aix_sighandle_frame_sniffer): New Function.
1481         (aix_sighandle_frame_unwind): New global variable.
1482         (rs6000_aix_init_osabi): Install new frame unwinder.
1483
1484 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1485
1486         PR gdb/23835
1487         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1488         already defined.
1489
1490 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1491
1492         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1493
1494 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1495
1496         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1497         (producer_is_icc): New function.
1498         (check_producer): Set producer_is_icc field on dwarf2_cu.
1499         (dwarf2_init_integer_type): New function.
1500         (read_base_type): Call dwarf2_init_integer_type instead of
1501         init_integer_type in all cases.
1502         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1503         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1504         LEN is greater than 0.
1505
1506 2018-10-30  Tom Tromey  <tom@tromey.com>
1507
1508         * main.c (captured_main_1): Check return value of bfd_init.
1509
1510 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1511
1512         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1513         Adjust comments.
1514
1515 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1516
1517         * procfs.c: Include common/pathstuff.h.
1518
1519 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1520
1521         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1522         Add missing braces.  No functional change.
1523
1524 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1525
1526         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1527         to report a bad option and fix indentation.
1528         * demangle.c (demangle_command): Use report_unrecognized_option_error
1529         to report a bad option and correctly report the bad option.
1530
1531 2018-10-27  Tom Tromey  <tom@tromey.com>
1532
1533         PR cli/23364:
1534         * darwin-nat.c (copied_shell): New global.
1535         (may_have_sip): Rename from should_disable_startup_with_shell.
1536         (copy_shell_to_cache, maybe_cache_shell): New functions.
1537         (darwin_nat_target::create_inferior): Update.  Use
1538         copied_shell.
1539
1540 2018-10-27  Tom Tromey  <tom@tromey.com>
1541
1542         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1543         (run_tests): Call test_to_file.
1544         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1545         temporary files.
1546         * common/scoped_fd.h (scoped_fd::to_file): New method.
1547
1548 2018-10-27  Tom Tromey  <tom@tromey.com>
1549
1550         * unittests/scoped_mmap-selftests.c (test_normal): Use
1551         gdb_mkostemp_cloexec.
1552         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1553         Use gdb_mkostemp_cloexec.
1554         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1555         gnulib/config.in, gnulib/configure,
1556         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1557         gnulib/import/m4/gnulib-cache.m4,
1558         gnulib/import/m4/gnulib-comp.m4: Update.
1559         * gnulib/import/m4/mkostemp.m4: New file.
1560         * gnulib/import/m4/mkstemp.m4: Remove.
1561         * gnulib/import/mkostemp.c: New file.
1562         * gnulib/import/mkstemp.m4: Remove.
1563         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1564         mkstemp, add mkostemp.  Apply new patch.
1565         * gnulib/import/stdlib.in.h: Apply patch.
1566         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1567         New file.
1568         * dwarf-index-write.c (write_psymtabs_to_index): Use
1569         gdb_mkostemp_cloexec.
1570         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1571
1572 2018-10-27  Tom Tromey  <tom@tromey.com>
1573
1574         * unittests/mkdir-recursive-selftests.c: New file.
1575         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1576         unittests/mkdir-recursive-selftests.c.
1577         * dwarf-index-cache.c (mkdir_recursive): Move to
1578         common/filestuff.c.
1579         (index_cache::store): Check return value of mkdir_recursive.
1580         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1581         (_initialize_index_cache): Don't register test.
1582         * common/filestuff.h (mkdir_recursive): Declare.
1583         * common/filestuff.c (mkdir_recursive): Move from
1584         dwarf-index-cache.c.  Return bool.
1585
1586 2018-10-27  Tom Tromey  <tom@tromey.com>
1587
1588         * dwarf-index-write.c (write_psymtabs_to_index): Move
1589         make_temp_filename to common/pathstuff.c.
1590         * common/pathstuff.h (make_temp_filename): Declare.
1591         * common/pathstuff.c (make_temp_filename): New function, moved
1592         from dwarf-index-write.c.
1593
1594 2018-10-27  Tom Tromey  <tom@tromey.com>
1595
1596         * procfs.c (procfs_target::create_inferior): Use get_shell.
1597         * cli/cli-cmds.c (shell_escape): Use get_shell.
1598         * windows-nat.c (windows_nat_target::create_inferior): Use
1599         get_shell.
1600         * common/pathstuff.c (get_shell): New function.
1601         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1602         (fork_inferior): Use get_shell.
1603         * common/pathstuff.h (get_shell): Declare.
1604
1605 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1606
1607         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1608
1609 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1610
1611         * stack.c (print_variable_and_value_data): Add preg and treg.
1612         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1613         and update callers.
1614         (print_frame_arg_vars): Likewise.
1615         (prepare_reg): New function.
1616         (info_locals_command): Extract info print args and use them.
1617         (info_args_command): Likewise.
1618         (_initialize_stack): Modify on-line help.
1619         * symtab.c (treg_matches_sym_type_name): New function.
1620         (search_symbols): New arg t_regexp.
1621         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1622         (info_variables_command): Extract info print args and use them.
1623         (info_functions_command): Likewise.
1624         (info_types_command): Update call to symtab_symbol_info.
1625         (_initialize_symtab): Modify on-line help.
1626         * symtab.h (treg_matches_sym_type_name): New function.
1627         (search_symbols): New t_regexp arg.
1628
1629 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1630
1631         * cli-utils.c (extract_arg_maybe_quoted): New function.
1632         (extract_info_print_args): New function.
1633         (info_print_args_help): New function.
1634         (report_unrecognized_option_error): New function.
1635         * cli-utils.h (extract_arg_maybe_quoted): New function.
1636         (extract_info_print_args): New function.
1637         (info_print_args_help): New function.
1638         (report_unrecognized_option_error): New function.
1639
1640 2018-10-26  Tom Tromey  <tom@tromey.com>
1641
1642         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1643         (compute_compunit_symtab_includes): Update.
1644         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1645         (compunit_symtab_ptr): Likewise.
1646
1647 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1648
1649         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1650         default_print_auxv_entry for specific tag values.
1651
1652 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1653
1654         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1655
1656 2018-10-26  Jim Wilson  <jimw@sifive.com>
1657
1658         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1659         (riscv_linux_sigframe_init): Declare.
1660         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1661         (riscv_linux_sigframe): New.
1662         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1663         (riscv_linux_sigframe_init): Define.
1664         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1665
1666         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1667         (riscv_isa_flen): Likewise.  Drop static.
1668         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1669         (riscv_isa_flen): Likewise.  Declare.
1670
1671 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1672             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1673
1674         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1675         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1676         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1677         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1678         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1679         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1680         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1681         Define.
1682         (struct ppc_linux_features) <htm>: New field.
1683         (ppc_linux_no_features): Add initializer for htm field.
1684         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1685         new tdescs.
1686         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1687         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1688         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1689         Define if not already defined.
1690         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1691         and rs6000/powerpc-isa207-htm-vsx64l.
1692         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1693         rs6000/powerpc-isa207-htm-vsx64l.xml.
1694         * features/rs6000/power-htm-spr.xml: New file.
1695         * features/rs6000/power-htm-core.xml: New file.
1696         * features/rs6000/power64-htm-core.xml: New file.
1697         * features/rs6000/power-htm-fpu.xml: New file.
1698         * features/rs6000/power-htm-altivec.xml: New file.
1699         * features/rs6000/power-htm-vsx.xml: New file.
1700         * features/rs6000/power-htm-ppr.xml: New file.
1701         * features/rs6000/power-htm-dscr.xml: New file.
1702         * features/rs6000/power-htm-tar.xml: New file.
1703         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1704         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1705         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1706         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1707         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1708         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1709         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1710         fetch_regset with HTM regsets.
1711         (store_register, store_ppc_registers): Call store_regset with HTM
1712         regsets.
1713         (ppc_linux_nat_target::read_description): Set htm field in the
1714         features struct if needed.
1715         * ppc-linux-tdep.c: Include
1716         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1717         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1718         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1719         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1720         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1721         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1722         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1723         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1724         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1725         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1726         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1727         (ppc32_linux_ctarregset): New globals.
1728         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1729         (ppc_linux_collect_core_cpgrregset): New function.
1730         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1731         regsets.
1732         (ppc_linux_core_read_description): Check if the tm spr section is
1733         present and set htm in the features struct.
1734         (_initialize_ppc_linux_tdep): Call
1735         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1736         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1737         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1738         Declare.
1739         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1740         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1741         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1742         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1743         New fields.
1744         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1745         Likewise.
1746         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1747         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1748         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1749         New enum fields.
1750         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1751         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1752         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1753         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1754         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1755         <PPC_CTAR_REGNUM>: Likewise.
1756         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1757         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1758         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1759         (IS_CEFP_PSEUDOREG): Define.
1760         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1761         registers.  Return names for the checkpointed DFP, VSX, and EFP
1762         pseudo registers.
1763         (rs6000_pseudo_register_type): Remove initial assert and raise an
1764         internal error in the else clause instead.  Return types for the
1765         checkpointed DFP, VSX, and EFP pseudo registers.
1766         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1767         checkpointed DFP pseudo registers.
1768         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1769         checkpointed VSX pseudo registers.
1770         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1771         from efpr_pseudo_register_read and
1772         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1773         registers.
1774         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1775         Handle checkpointed DFP, VSX, and EFP registers.
1776         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1777         (efp_ax_pseudo_register_collect): New functions.
1778         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1779         register logic to new functions.  Handle checkpointed DFP, VSX,
1780         and EFP pseudo registers.
1781         (rs6000_gdbarch_init): Look for and validate the htm features.
1782         Include checkpointed DFP, VSX and EFP pseudo-registers.
1783         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1784         HTM registers.
1785
1786 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1787
1788         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1789         without altivec or fpu.
1790
1791 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1792             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1793
1794         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1795         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1796         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1797         Define if not already defined.
1798         * features/rs6000/power-ebb.xml: New file.
1799         * features/rs6000/power-linux-pmu.xml: New file.
1800         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1801         features.
1802         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1803         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1804         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1805         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1806         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1807         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1808         fetch_regset with ebb and pmu regsets.
1809         (store_register, store_ppc_registers): Call store_regset with ebb
1810         and pmu regsets.
1811         (ppc_linux_nat_target::read_description): Set isa207 field in the
1812         features struct if ebb and pmu are avaiable.
1813         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1814         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1815         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1816         and pmu regsets.
1817         (ppc_linux_core_read_description): Check if the pmu section is
1818         present and set isa207 in the features struct.
1819         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1820         (ppc32_linux_pmuregset): Declare.
1821         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1822         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1823         <ppc_sier_regnum>: New field.
1824         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1825         New enum values.
1826         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1827         values.
1828         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1829         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1830         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1831         ebb and pmu features.
1832
1833 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1834             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1835
1836         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1837         (tdesc_powerpc_isa207_vsx64l): Declare.
1838         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1839         (struct ppc_linux_features) <isa207>: New field.
1840         (ppc_linux_no_features): Add initializer for isa207 field.
1841         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1842         new tdescs.
1843         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1844         (NT_PPC_TAR): Define if not already defined.
1845         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1846         rs6000/powerpc-isa207-vsx64l.
1847         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1848         rs6000/powerpc-isa207-vsx64l.xml.
1849         * features/rs6000/power-tar.xml: New file.
1850         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1851         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1852         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1853         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1854         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1855         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1856         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1857         fetch_regset with the TAR regset.
1858         (store_register, store_ppc_registers): Call store_regset with the
1859         TAR regset.
1860         (ppc_linux_nat_target::read_description): Set isa207 field in the
1861         features struct if needed.
1862         * ppc-linux-tdep.c: Include
1863         features/rs6000/powerpc-isa207-vsx32l.c and
1864         features/rs6000/powerpc-isa207-vsx64l.c.
1865         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1866         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1867         regset.
1868         (ppc_linux_core_read_description): Check if the tar section is
1869         present and set isa207 in the features struct.
1870         (_initialize_ppc_linux_tdep): Call
1871         initialize_tdesc_powerpc_isa207_vsx32l and
1872         initialize_tdesc_powerpc_isa207_vsx64l.
1873         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1874         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1875         (enum) <PPC_TAR_REGNUM>: New enum value.
1876         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1877         feature.
1878         (ppc_process_record_op31): Record changes to TAR.
1879
1880 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1881             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1882
1883         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1884         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1885         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1886         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1887         (struct ppc_linux_features) <ppr_dscr>: New field.
1888         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1889         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1890         new tdescs.
1891         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1892         Define if not already defined.
1893         * features/Makefile (WHICH): Add
1894         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1895         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1896         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1897         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1898         * features/rs6000/power-dscr.xml: New file.
1899         * features/rs6000/power-ppr.xml: New file.
1900         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1901         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1902         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1903         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1904         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1905         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1906         * ppc-linux-nat.c: Include <sys/uio.h>.
1907         (fetch_regset, store_regset, check_regset): New functions.
1908         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1909         DSCR and PPR regsets.
1910         (store_register, store_ppc_registers): Call store_regset with
1911         DSCR and PPR regsets.
1912         (ppc_linux_get_hwcap2): New function.
1913         (ppc_linux_nat_target::read_description): Call
1914         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1915         features struct if needed.
1916         * ppc-linux-tdep.c: Include
1917         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1918         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1919         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1920         (ppc32_linux_dscrregset): New globals.
1921         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1922         and dscr regsets.
1923         (ppc_linux_core_read_description): Check if the ppr and dscr
1924         sections are present and set ppr_dscr in the features struct.
1925         (_initialize_ppc_linux_tdep): Call
1926         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1927         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1928         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1929         (ppc32_linux_dscrregset): Declare.
1930         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1931         <ppc_dscr_regnum>: New field.
1932         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1933         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1934         and dscr features.
1935         (ppc_process_record_op31): Record changes to PPR and DSCR.
1936
1937 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1938
1939         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1940         second initializer line for the have_* variables.  Initialize
1941         have_fpu to 0 instead of 1.
1942
1943 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1944
1945         * arch/ppc-linux-common.c (ppc_linux_match_description):
1946         Parenthesize tdesc assignements and indent them properly.
1947
1948 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1949
1950         * ppc-linux-nat.c (fetch_register): Change if statement to else
1951         if.
1952         (store_register): Likewise.
1953
1954 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1955
1956         * rs6000-tdep.c: Remove reggroups.h include.
1957         (rs6000_pseudo_register_reggroup_p): Remove.
1958         (rs6000_gdbarch_init): Remove call to
1959         set_tdesc_pseudo_register_reggroup_p.
1960
1961 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1962
1963         * reggroups.c (default_register_reggroup_p): Return true for
1964         decfloat registers and float_reggroup.
1965
1966 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1967
1968         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1969         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1970         ppc_linux_collect_vrregset by regcache_collect_regset.
1971
1972 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1973
1974         * linux-tdep.c (linux_collect_regset_section_cb): Use
1975         std::vector<gdb_byte> instead of char * and malloc for buf.
1976         Remove xfree.
1977
1978 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1979
1980         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1981         symtab_start instead of always using language_unknown.
1982
1983 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1984
1985         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1986         READ_P parameter, catch and ignore register access errors from
1987         either the old or new MISA location.
1988         (riscv_has_feature): Update call to riscv_read_misa_reg.
1989
1990 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1991
1992         * python/py-function.c (convert_values_to_python): Return
1993         gdbpy_ref<>.  Add header comment.
1994         (fnpy_call): Adjust.
1995
1996 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1997
1998         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1999         (cmdpy_completer_handle_brkchars): Adjust.
2000         (cmdpy_completer): Adjust.
2001
2002 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2003
2004         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
2005         Pass correct regnum to raw_supply_zeroed.
2006
2007 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2008
2009         * regcache.c (cooked_read_test): Add CSKY to the list of
2010         architectures with a save_reggroup
2011
2012 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
2013
2014         PR gdb/23368
2015         * infrun.c (follow_exec): In the follow_exec_mode_new case,
2016         transfer terminal state from old new new inferior.
2017         * terminal.h (swap_terminal_info): New function.
2018         * inflow.c (swap_terminal_info): New function.
2019
2020 2018-10-23  Tom Tromey  <tom@tromey.com>
2021
2022         * record-btrace.c (get_thread_current_frame_id): Rename from
2023         get_thread_current_frame.  Return a frame_id.
2024         (record_btrace_start_replaying): Update.
2025
2026 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2027
2028         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2029         for CSRs.
2030
2031 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
2032
2033         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2034         have_nonsteppable_watchpoint attribute to 1.
2035
2036 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2037
2038         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2039         register names.
2040         (struct register_alias): Rename to...
2041         (struct riscv_register_alias): ...this, and update comment.
2042         (riscv_register_aliases): Update type, and alias names.  Remove
2043         CSR names from this list.
2044         (riscv_register_name): Use riscv_gdb_reg_names for int and float
2045         register names.  Add an extra assertion.
2046         (riscv_is_regnum_a_named_csr): New function.
2047         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2048
2049 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
2050
2051         * configure.tgt: Add configuration for s12z.
2052         * s12z-tdep.c:  New file.
2053         * NEWS: Mention new target.
2054
2055 2018-10-22  Jim Wilson  <jimw@sifive.com>
2056
2057         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2058         FP reg smaller than FP reg size, and fill with -1 instead of 0.
2059
2060         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2061         (riscv_register_type): Use them.
2062         (riscv_print_one_register_info): Handle union of floats same as float.
2063         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2064         riscv_fpreg_q_type fields.
2065
2066 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2067
2068         * gdbarch.sh (gdbarch_num_cooked_regs): New.
2069         * gdbarch.h: Re-generate.
2070         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2071         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2072         * eval.c (evaluate_subexp_standard): Likewise.
2073         * findvar.c (value_of_register): Likewise.
2074         (value_of_register_lazy): Likewise.
2075         (address_from_register): Likewise.
2076         * frame.c (get_frame_register_bytes): Likewise.
2077         * gdbarch-selftests.c (register_to_value_test): Likewise.
2078         * h8300-tdep.c (h8300_register_type): Likewise.
2079         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2080         (i386_svr4_reg_to_regnum): Likewise.
2081         * infcmd.c (default_print_registers_info): Likewise.
2082         (registers_info): Likewise.
2083         (print_vector_info): Likewise.
2084         (default_print_float_info): Likewise.
2085         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2086         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2087         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2088         (mi_cmd_data_list_changed_registers): Likewise.
2089         (mi_cmd_data_list_register_values): Likewise.
2090         (mi_cmd_data_write_register_values): Likewise.
2091         (mi_cmd_trace_frame_collected): Likewise.
2092         * mips-tdep.c (print_gp_register_row): Likewise.
2093         (mips_print_registers_info): Likewise.
2094         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2095         * regcache.c (init_regcache_descr): Likewise.
2096         (register_size): Likewise.
2097         (register_dump::dump): Likewise.
2098         (cooked_read_test): Likewise.
2099         (cooked_write_test): Likewise.
2100         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2101         (rs6000_gdbarch_init): Likewise.
2102         * stabsread.c (stab_reg_to_regnum): Likewise.
2103         * stack.c (info_frame_command): Likewise.
2104         * target-descriptions.c (tdesc_register_name): Likewise.
2105         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2106         * tui/tui-regs.c (tui_show_register_group): Likewise.
2107         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2108         (user_reg_map_regnum_to_name): Likewise.
2109         (value_of_user_reg): Likewise.
2110         (maintenance_print_user_registers): Likewise.
2111         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2112         (xtensa_register_name): Likewise.
2113         (xtensa_register_type): Likewise.
2114         (xtensa_reg_to_regnum): Likewise.
2115         (xtensa_pseudo_register_read): Likewise.
2116         (xtensa_pseudo_register_write): Likewise.
2117
2118 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2119
2120         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2121         correctly-sized buffer with raw_read.
2122         (amd64_pseudo_register_write): Use correctly-sized buffer for
2123         raw_read/raw_write.
2124
2125 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2126
2127         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2128         in add_prefix_cmd of set print type.
2129
2130 2018-10-19  Tom Tromey  <tom@tromey.com>
2131
2132         PR tui/18388:
2133         * NEWS: Mention tabset deprecation.
2134         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2135         (update_tab_width): New function.
2136         (tui_set_tab_width, tui_show_tab_width): New functions.
2137         (tui_set_tab_width_command): Use update_tab_width.
2138         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
2139         Add new "set tui tab-width" command.
2140         * tui/tui-source.c (tui_set_source_content): Update.
2141         * tui/tui-disasm.c (tui_set_disassem_content): Update.
2142         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2143         Don't declare.
2144         (tui_tab_width): Declare.
2145         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2146         (tui_set_default_tab_len): Remove.
2147
2148 2018-10-19  Tom Tromey  <tom@tromey.com>
2149
2150         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2151         (key_is_backspace, tui_getc): Don't declare.
2152         * tui/tui-io.c (key_is_start_sequence): Now static.
2153         (key_is_end_sequence, key_is_backspace): Remove.
2154         (tui_getc): Now static.
2155
2156 2018-10-19  Tom Tromey  <tom@tromey.com>
2157
2158         * symfile.c (reread_symbols): Clear "static_links".
2159
2160 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
2161
2162         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2163         define.
2164         (aarch64_linux_sigframe_init): Extra boundary checks.
2165
2166 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
2167
2168         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2169         the possibly non-existent tdesc type 'vec128', but the type of raw
2170         register v16 instead.
2171
2172 2018-10-19  Gary Benson <gbenson@redhat.com>
2173
2174         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2175
2176 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
2177
2178         PR cli/23785
2179         * cli/cli-dump.c (restore_binary_file): Check if "file" is
2180         NULL.
2181
2182 2018-10-17  Paul Koning  <paul_koning@dell.com>
2183
2184         * charset.c (convert_between_encodings): Fix unsigned overflow.
2185
2186 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
2187
2188         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2189         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2190         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2191         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2192         New functions.
2193         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2194         and fbsd_info_proc_mappings_header.
2195         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2196         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2197         New.
2198
2199 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
2200
2201         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2202         Solaris Maintainer.
2203
2204 2018-10-15  Tom Tromey  <tom@tromey.com>
2205
2206         * tui/tui.c (strcat_to_buf): Remove casts.
2207         * tui/tui-winsource.c (tui_show_source_line)
2208         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2209         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2210         * tui/tui-windata.c (tui_first_data_item_displayed)
2211         (tui_delete_data_content_windows, tui_erase_data_content)
2212         (tui_display_all_data, tui_display_data_from)
2213         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2214         * tui/tui-win.c (tui_set_win_height)
2215         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2216         casts.
2217         * tui/tui-win.c (tui_resize_all): Remove casts.
2218         (tui_scroll_backward_command, tui_set_focus)
2219         (tui_set_tab_width_command): Likewise.
2220         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2221         * tui/tui-regs.c (tui_show_register_group): Remove cast.
2222         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2223         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2224         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2225         Remove casts.
2226
2227 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2228
2229         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2230         AArch64/ARM maintainer.
2231
2232 2018-10-11  Gary Benson <gbenson@redhat.com>
2233
2234         * interps.h (interp::m_name): Make private and mutable.
2235         * interps.c (interp::~interp): Free m_name.
2236
2237 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2238             Simon Marchi <simark@simark.ca>
2239
2240         * README (`configure' options): Add documentation for new
2241         "--enable-unit-tests" option.
2242         * acinclude.m4: Include "selftest.m4".
2243         * configure: Regenerate.
2244         * configure.ac: Use "GDB_AC_SELFTEST".
2245         * maint.c (maintenance_selftest): Update message informing
2246         that selftests have been disabled.
2247         (maintenance_info_selftests): Likewise.
2248         * selftest.m4: New file.
2249
2250 2018-10-10  Gary Benson <gbenson@redhat.com>
2251
2252         * remote.c (remote_target::remote_send_printf): Add
2253         missing va_end found by Coverity.
2254
2255 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
2256
2257         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2258
2259 2018-10-09  Tom Tromey  <tom@tromey.com>
2260
2261         * configure: Rebuild.
2262         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2263         * NEWS: Update --enable-ubsan documentation.
2264
2265 2018-10-09  Gary Benson <gbenson@redhat.com>
2266
2267         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2268         found by Coverity.
2269
2270 2018-10-08  Tom Tromey  <tom@tromey.com>
2271
2272         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2273         variable.
2274         (riscv_fbsd_init_abi): Likewise.
2275
2276 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2277         * valops.c (value_struct_elt_for_reference): Rename local variable
2278         to work around the shadowing a previous local warning.
2279
2280 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2281
2282         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2283         * NEWS: Mention new FreeBSD/riscv native configuration.
2284         * configure.host: Add riscv*-*-freebsd*.
2285         * configure.nat: Likewise.
2286         * riscv-fbsd-nat.c: New file.
2287
2288 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2289
2290         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2291         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2292         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2293         * NEWS: Mention new FreeBSD/riscv target.
2294         * configure.tgt: Add riscv*-*-freebsd*.
2295         * riscv-fbsd-tdep.c: New file.
2296         * riscv-fbsd-tdep.h: New file.
2297
2298 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2299
2300         * regcache.h (struct regcache_map_entry): Note that this type can
2301         be used with traditional frame caches.
2302         * trad-frame.c (trad_frame_set_reg_regmap): New.
2303         * trad-frame.h (trad_frame_set_reg_regmap): New.
2304
2305 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2306
2307         PR c++/16841
2308         * valops.c (get_virtual_base_offset): New function.
2309         (value_struct_elt_for_reference): Use it to get virtual base offset
2310         and add it in calculating class member address.
2311
2312 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
2313
2314         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2315         (check_producer): Check if the producer is codewarrior.
2316         (producer_is_codewarrior): New function.
2317         (lnp_state_machine::record_line): Ignore is_stmt flag for records
2318         produced by codewarrior.
2319         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2320
2321 2018-10-06  Tom Tromey  <tom@tromey.com>
2322
2323         PR python/19399:
2324         * python/py-inferior.c: Add "architecture" entry.
2325         (infpy_architecture): New function.
2326
2327 2018-10-06  Tom Tromey  <tom@tromey.com>
2328
2329         PR python/21765:
2330         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2331         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2332         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
2333         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2334
2335 2018-10-06  Tom Tromey  <tom@tromey.com>
2336
2337         PR build/17077:
2338         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2339         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2340         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2341         #include.
2342
2343 2018-10-06  Tom Tromey  <tom@tromey.com>
2344
2345         * python/py-breakpoint.c (bppy_get_location): Handle a
2346         bp_breakpoint without a location.
2347
2348 2018-10-06  Tom Tromey  <tom@tromey.com>
2349
2350         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2351         (_RegEx): Reformat help text.
2352         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2353         (AnyCallerIs, AnyCallerMatches): Reformat help text.
2354         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2355         text.
2356         * python/lib/gdb/command/xmethods.py (InfoXMethod)
2357         (EnableXMethod, DisableXMethod): Remove help indentation.
2358         Capitalize meta-syntactic variables.
2359         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2360         (EnableUnwinder, DisableUnwinder): Remove help indentation.
2361         Capitalize meta-syntactic variables.
2362         * python/lib/gdb/command/explore.py (ExploreCommand)
2363         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2364         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2365         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2366         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2367         Remove help indentation.
2368         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2369         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2370         (DisableFrameFilter, SetFrameFilterPriority)
2371         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2372
2373 2018-10-06  Tom Tromey  <tom@tromey.com>
2374
2375         PR tui/28819:
2376         * tui/tui-io.c (gdb_wgetch): New function.
2377         (tui_mld_getc, tui_getc): Use it.
2378
2379 2018-10-05  Tom Tromey  <tom@tromey.com>
2380
2381         * sol-thread.c (sol_thread_target::wait): Rename inner
2382         "save_ptid".
2383
2384 2018-10-04  Tom Tromey  <tom@tromey.com>
2385
2386         * configure: Rebuild.
2387         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2388
2389 2018-10-04  Tom Tromey  <tom@tromey.com>
2390
2391         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2392         declaration of "block".
2393
2394 2018-10-04  Tom Tromey  <tom@tromey.com>
2395
2396         * common/filestuff.c (fdwalk): Remove inner declaration of
2397         "result".
2398
2399 2018-10-04  Tom Tromey  <tom@tromey.com>
2400
2401         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2402         "structs_addr" and hoist declaration.
2403
2404 2018-10-04  Tom Tromey  <tom@tromey.com>
2405
2406         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2407         variable "size".
2408
2409 2018-10-04  Tom Tromey  <tom@tromey.com>
2410
2411         * mdebugread.c (parse_partial_symbols): Use std::string.
2412
2413 2018-10-04  Tom Tromey  <tom@tromey.com>
2414
2415         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2416         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2417         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2418         header.
2419         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2420         more inner scope.
2421         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2422         * varobj.c (varobj_update): Rename inner "newobj",
2423         "type_changed".
2424         * valprint.c (generic_emit_char): Rename inner "buf".
2425         * valops.c (find_overload_match): Rename inner "temp".
2426         (value_struct_elt_for_reference): Declare "v" in more inner
2427         scope.
2428         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2429         * unittests/array-view-selftests.c (run_tests): Rename inner
2430         "vec".
2431         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2432         header.
2433         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2434         "tsv" in more inner scope.
2435         (print_one_static_tracepoint_marker): Rename inner
2436         "tuple_emitter".
2437         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2438         (tic6x_push_dummy_call): Don't redeclare "addr".
2439         * target-float.c: Declare "dto" lower.
2440         * symtab.c (lookup_local_symbol): Rename inner "sym".
2441         (find_pc_sect_line): Rename inner "pc".
2442         * stack.c (print_frame): Don't redeclare "gdbarch".
2443         (return_command): Rename inner "gdbarch".
2444         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2445         "sp".
2446         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2447         header.
2448         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2449         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2450         scope.
2451         * remote.c (remote_target::update_thread_list): Don't redeclare
2452         "tp".
2453         (remote_target::process_initial_stop_replies): Rename inner
2454         "thread".
2455         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2456         (remote_target::wait_as): Don't redeclare "stop_reply".
2457         (remote_target::get_thread_local_address): Rename inner
2458         "result".
2459         (remote_target::get_tib_address): Likewise.
2460
2461         * regcache.c (cooked_read_test): Rename "regnum".
2462         * record-btrace.c (cmd_record_btrace_start): Rename inner
2463         "exception".
2464         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2465         loop header.
2466         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2467         header.
2468         (ppu2spu_sniffer): Rename inner "buf".
2469         * parse.c (operator_check_standard): Rename inner "type",
2470         "objfile".
2471         * p-valprint.c (pascal_val_print): Introduce new scope for
2472         "low_bound", "high_bound".
2473         * p-exp.y (yylex): Declare "i" in loop header.
2474         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2475         Lower declaration of "s".
2476         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2477         header.
2478         (nios2_push_dummy_call): Rename "len".
2479         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2480         "buf".
2481         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2482         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2483         (linux_xfer_osdata_modules): Likewise.
2484         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2485         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2486         (mips_o64_push_dummy_call): Likewise.
2487         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2488         "op".
2489         * mi/mi-main.c (list_available_thread_groups): Rename inner
2490         "tuple_emitter".
2491         (mi_cmd_data_read_memory): Rename inner "opts".
2492         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2493         "tuple_emitter".
2494         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2495         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2496         more inner scope.
2497         (parse_partial_symbols): Rename inner "pst", "p", "name"
2498         * main.c (captured_main_1): Rename inner "i"s.
2499         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2500         "oso2".
2501         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2502         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2503         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2504         (handle_signal_stop): Rename inner "gdbarch".
2505         (handle_command): Declare "signum" in loop header.
2506         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2507         "status".
2508         (examine_prologue): Rename inner "sol" and "sof".
2509         (ia64_extract_return_value): Rename inner "val".  Declare another
2510         "val" in a more inner scope.
2511         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2512         inner scope.
2513         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2514         "except".
2515         * findvar.c (default_read_var_value): Don't redeclare "addr".
2516         * f-exp.y (yylex): Declare "i" in loop header.
2517         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2518         Rename inner "type", "expect_type".
2519         (evaluate_subexp_for_sizeof): Rename inner "pc".
2520         * elfread.c (elf_symfile_read): Rename inner "abfd".
2521         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2522         "bytes_read".
2523         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2524         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2525         (dwarf_decode_line_header): Rename inner "lh".
2526         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2527         "offset".  Declare "i" in loop header.
2528         (disassemble_dwarf_expression): Rename inner "addr_size".
2529         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2530         inner "result".
2531         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2532         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2533         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2534         "inner_list_emitter".
2535         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2536         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2537         declaration in a block.
2538         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2539         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2540         "obstack_final_size".
2541         * cp-support.c (inspect_type): Declare "i" in loop header.
2542         * compile/compile.c (compile_instance::insert_symbol_error):
2543         Rename inner "e".
2544         * common/agent.c (agent_run_command): Remove inner "ret"
2545         declaration.
2546         * coffread.c (coff_symfile_read): Rename inner "name".
2547         (coff_symfile_read): Rename inner "abfd".
2548         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2549         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2550         "high".
2551         * c-exp.y (lex_one_token): Move "len" declaration lower.
2552         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2553         "gdbarch".
2554         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2555         "b".
2556         (watch_command_1): Declare "mark" later.
2557         (clear_command): Don't shadow "a" or "b".
2558         (delete_command): Rename inner "b".
2559         (delete_trace_command): Likewise.
2560         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2561         "op".
2562         (arm_gdbarch_init): Remove inner "e_flags".
2563         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2564         "offset" in inner blocks.
2565
2566 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2567
2568         * dwarf-index-write.c (file_write): Don't write if the vector is
2569         empty.
2570
2571 2018-10-05  Tom de Vries  <tdevries@suse.de>
2572
2573         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2574         PyArg_ParseTuple call.
2575
2576 2018-10-05  Tom de Vries  <tdevries@suse.de>
2577
2578         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2579         PyArg_ParseTuple call.
2580
2581 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2582
2583         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2584         to avoid exceeding 80 characters per line limit.
2585
2586 2018-10-04  Tom Tromey  <tom@tromey.com>
2587
2588         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2589         (reread_symbols): Update.
2590         * complaints.h (clear_complaints): Remove argument.
2591         * complaints.c (enum complaint_series): Remove.
2592         (series): Remove global.
2593         (complaint_internal): Update.
2594         (clear_complaints): Remove argument.
2595
2596 2018-10-04  Tom Tromey  <tom@tromey.com>
2597
2598         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2599         debugging symbols" message if there is a separate debug objfile.
2600
2601 2018-10-04  Tom Tromey  <tom@tromey.com>
2602
2603         PR cli/19551:
2604         * symfile.c (symbol_file_add_with_addrs): Update output.
2605         * psymtab.c (require_partial_symbols): Update output.
2606
2607 2018-10-04  Tom Tromey  <tom@tromey.com>
2608
2609         PR cli/22234:
2610         * complaints.c: Emit \n.
2611
2612 2018-10-04  Tom Tromey  <tom@tromey.com>
2613
2614         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2615         (separate_debug_file_exists, find_separate_debug_file)
2616         (add_symbol_file_command, reread_symbols, allocate_symtab)
2617         (allocate_compunit_symtab): Use filtered printing, not
2618         unfiltered.
2619         * psymtab.c (require_partial_symbols, dump_psymtab)
2620         (allocate_psymtab): Use filtered printing, not unfiltered.
2621
2622 2018-10-04  Tom Tromey  <tom@tromey.com>
2623
2624         * complaints.c (complaint_internal): Correctly check complaint
2625         count.
2626
2627 2018-10-04  Tom Tromey  <tom@tromey.com>
2628
2629         * complaints.h (struct complaints): Remove declaration.
2630         * complaints.c (clear_complaints): Remove an unused variable.
2631
2632 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2633
2634         * MAINTAINERS (Write After Approval): Add self.
2635
2636 2018-10-03  Tom Tromey  <tom@tromey.com>
2637
2638         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2639         "buffer_contents".
2640         * coffread.c (coff_symtab_read): Initialize "newobj".
2641
2642 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2643
2644         * dwarf2read.c (read_func_scope): Remove struct keyword in
2645         range-based for.
2646
2647 2018-10-03  Tom Tromey  <tom@tromey.com>
2648
2649         * README: Mention --enable-ubsan.
2650         * NEWS: Mention --enable-ubsan.
2651         * acinclude.m4: Include sanitize.m4.
2652         * configure: Rebuild.
2653         * configure.ac: Call AM_GDB_UBSAN.
2654         * sanitize.m4: New file.
2655
2656 2018-10-03  Tom Tromey  <tom@tromey.com>
2657
2658         * expression.h (enum exp_opcode): Use uint8_t as base type.
2659         * expprint.c (op_name): Handle invalid opcodes.
2660
2661 2018-10-03  Tom Tromey  <tom@tromey.com>
2662
2663         * parse.c (prefixify_expression): Add assert.
2664         (parse_exp_in_context_1): Throw exception if the expression is
2665         empty.
2666
2667 2018-10-03  Tom Tromey  <tom@tromey.com>
2668
2669         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2670
2671 2018-10-03  Tom Tromey  <tom@tromey.com>
2672
2673         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2674
2675 2018-10-03  Tom Tromey  <tom@tromey.com>
2676
2677         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2678         unsigned.
2679
2680 2018-10-03  Tom Tromey  <tom@tromey.com>
2681
2682         * findvar.c (extract_integer): Do work in an unsigned type.
2683
2684 2018-10-03  Tom Tromey  <tom@tromey.com>
2685
2686         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2687         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2688         base type.
2689         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2690         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2691         type.
2692         * c-lang.h (enum c_string_type_values): Use unsigned as base
2693         type.
2694         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2695
2696 2018-10-03  Tom Tromey  <tom@tromey.com>
2697
2698         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2699         <~dwarf2_frame_state_reg_info>: Update.
2700         <dwarf2_frame_state_reg_info>: Update.
2701         <alloc_regs>: Add assertion.  Update.
2702         <reg>: Now a std::vector.
2703         <num_regs>: Remove.
2704         <swap>: Update.
2705         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2706         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2707
2708 2018-10-03  Tom Tromey  <tom@tromey.com>
2709
2710         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2711
2712 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2713
2714         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2715
2716 2018-10-02  Tom Tromey  <tom@tromey.com>
2717
2718         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2719
2720 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2721
2722         * NEWS: Mention changed commands.
2723         * ser-uds.c: New file.
2724         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2725         * configure: Regenerate.
2726         * Makefile.in: Add new file.
2727         * serial.c (serial_open): Check if filename is a socket
2728         and lookup the appropriate interface accordingly.
2729
2730 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2731
2732         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2733         define.
2734         (AARCH64_EXTRA_MAGIC): Likewise.
2735         (AARCH64_FPSIMD_MAGIC): Likewise.
2736         (AARCH64_SVE_MAGIC): Likewise.
2737         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2738         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2739         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2740         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2741         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2742         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2743         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2744         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2745         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2746         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2747         (read_aarch64_ctx): Add function.
2748         (aarch64_linux_sigframe_init): Detect FP registers.
2749
2750 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2751
2752         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2753         (AARCH64_D0_REGNUM): Likewise.
2754         (AARCH64_S0_REGNUM): Likewise.
2755         (AARCH64_H0_REGNUM): Likewise.
2756         (AARCH64_B0_REGNUM): Likewise.
2757         (AARCH64_SVE_V0_REGNUM): Likewise.
2758         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2759         (AARCH64_D0_REGNUM): Likewise.
2760         (AARCH64_S0_REGNUM): Likewise.
2761         (AARCH64_H0_REGNUM): Likewise.
2762         (AARCH64_B0_REGNUM): Likewise.
2763         (AARCH64_SVE_V0_REGNUM): Likewise.
2764
2765 2018-10-01  Gary Benson <gbenson@redhat.com>
2766
2767         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2768         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2769         prfpregset_t instead of gdb_prfpregset_t.
2770         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2771         * configure, config.in: Rebuild.
2772
2773 2018-10-01  Gary Benson <gbenson@redhat.com>
2774
2775         * common/gdb_proc_service.h: New file, factored out from...
2776         * gdb_proc_service.h: Moved common code to the above file.
2777         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2778
2779 2018-10-01  Gary Benson <gbenson@redhat.com>
2780
2781         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2782         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2783
2784 2018-10-01  Gary Benson <gbenson@redhat.com>
2785
2786         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2787         (AC_CHECK_HEADERS): Check for linux/elf.h.
2788         * configure, config.in: Rebuild.
2789         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2790         doesn't define elf_fpregset_t.
2791
2792 2018-10-01  Gary Benson <gbenson@redhat.com>
2793
2794         * gdb_proc_service.h: Whitespace change.
2795
2796 2018-10-01  Tom Tromey  <tom@tromey.com>
2797
2798         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2799         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2800         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2801
2802 2018-10-01  Tom Tromey  <tom@tromey.com>
2803
2804         * README: Minor change.
2805
2806 2018-09-30  Pedro Alves  <palves@redhat.com>
2807
2808         * darwin-nat-info.c (darwin_debug_regions_recurse)
2809         (info_mach_exceptions_command): Remove unused local variables.
2810         * darwin-nat.c (darwin_decode_notify_message)
2811         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2812         (darwin_stop_inferior, darwin_setup_exceptions)
2813         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2814         (darwin_nat_target::attach, darwin_nat_target::detach)
2815         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2816         local variables.
2817         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2818         variables.
2819
2820 2018-09-29  Tom Tromey  <tom@tromey.com>
2821
2822         * README: Remove some leftover text.
2823
2824 2018-09-29  Tom Tromey  <tom@tromey.com>
2825
2826         * PROBLEMS: Rewrite.
2827         * README: Update.
2828
2829 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2830
2831         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2832         case with explicit breakpoint kind.
2833         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2834         'additional_info' and related logic.
2835         (riscv_debug_breakpoints): New variable.
2836         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2837         instruction to determine the breakpoint kind.
2838         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2839         flag.  Update description of 'set/show riscv
2840         use-compressed-breakpoints' flag.
2841
2842 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2843
2844         (NEWS): Mention changes to frame related commands.
2845         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2846         (add_prefix_cmd_suppress_notification): New function.
2847         (add_com_suppress_notification): Call
2848         add_cmd_suppress_notification.
2849         * command.h (add_cmd_suppress_notification): Declare.
2850         (add_prefix_cmd_suppress_notification): Declare.
2851         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2852         (parse_frame_specification): Moved from stack.c, with
2853         simplification to handle a single argument.
2854         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2855         switch to the selected frame.  Add a header comment.
2856         * stack.c: Remove 'safe-ctype.h' include.
2857         (find_frame_for_function): Add declaration.
2858         (find_frame_for_address): New function.
2859         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2860         (frame_selection_by_function_completer): New function.
2861         (info_frame_command): Rename to...
2862         (info_frame_command_core): ...this, and update parameter types.
2863         (select_frame_command): Rename to...
2864         (select_frame_command_core): ...this, and update parameter types.
2865         (frame_command): Rename to...
2866         (frame_command_core): ...this, and update parameter types.
2867         (class frame_command_helper): New class to wrap implementations of
2868         frame related sub-commands.
2869         (frame_apply_cmd_list): New static global.
2870         (frame_cmd_list): Make static.
2871         (select_frame_cmd_list): New global for sub-commands.
2872         (info_frame_cmd_list): New global for sub-commands.
2873         (_initialize_stack): Register sub-commands for 'frame',
2874         'select-frame', and 'info frame'.  Update 'frame apply' commands
2875         to use frame_apply_cmd_list.  Move function local static
2876         frame_apply_list to file static frame_apply_cmd_list for
2877         consistency.
2878         * stack.h (select_frame_command): Delete declarationn.
2879         (select_frame_for_mi): Declare new function.
2880
2881 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2882
2883         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2884         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2885         and NOP.
2886
2887 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2888
2889         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2890
2891 2018-09-26  Tom Tromey  <tom@tromey.com>
2892
2893         * valops.c (auto_abandon): Remove dead code.
2894
2895 2018-09-26  Tom Tromey  <tom@tromey.com>
2896
2897         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2898
2899 2018-09-24  Tom Tromey  <tom@tromey.com>
2900
2901         * common/pathstuff.c (get_standard_cache_dir): Make
2902         "xdg_cache_home" and "home" const.
2903         * top.c (init_history): Make "tmpenv" const.
2904         * main.c (get_init_files): Make "homedir" const.
2905
2906 2018-09-23  Tom Tromey  <tom@tromey.com>
2907
2908         PR python/18852:
2909         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2910
2911 2018-09-23  Tom Tromey  <tom@tromey.com>
2912
2913         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2914         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2915         * python/python-internal.h (gdbpy_handle_exception): Declare.
2916         * python/py-utils.c (gdbpy_handle_exception): New function.
2917
2918 2018-09-23  Tom Tromey  <tom@tromey.com>
2919
2920         PR python/17284:
2921         * python/py-type.c (typy_template_argument): Check for negative
2922         argument number.
2923
2924 2018-09-23  Tom Tromey  <tom@tromey.com>
2925
2926         PR python/14062:
2927         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2928
2929 2018-09-23  Tom Tromey  <tom@tromey.com>
2930
2931         PR python/18170:
2932         * python/py-value.c (valpy_int): Allow conversion from pointer
2933         type.
2934
2935 2018-09-23  Tom Tromey  <tom@tromey.com>
2936
2937         PR python/20126:
2938         * python/py-value.c (valpy_int): Respect type sign.
2939
2940 2018-09-23  Tom Tromey  <tom@tromey.com>
2941
2942         PR python/18352;
2943         * python/py-value.c (valpy_float): Allow conversions from int or
2944         char.
2945         (valpy_int, valpy_long): Allow conversions from float.
2946
2947 2018-09-23  Tom Tromey  <tom@tromey.com>
2948
2949         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2950         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2951
2952 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2953
2954         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2955         __sighndlr.
2956         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2957
2958 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2959
2960         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2961         target_terminal::ours().
2962
2963 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2964
2965         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2966         of vl to ULONGEST.
2967
2968 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2969
2970         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2971         redundant condition.
2972
2973 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2974
2975         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2976
2977         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2978         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2979         * sol-thread.c (ps_pdmodel): Don't guard definition.
2980
2981         * procfs.c: Fix formatting.
2982
2983         * procfs.c (sysset_t_alloc): Remove.
2984         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2985         (procfs_debug_inferior): Likewise.
2986         (procfs_set_exec_trap): Likewise.
2987         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2988         (proc_set_traced_sysexit): Likewise.
2989
2990         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2991         (dead_procinfo): Likewise.
2992         (proc_warn): Likewise.
2993         (proc_error): Likewise.
2994         (proc_get_LDT_entry): Likewise.
2995         (do_attach): Likewise.
2996         (procfs_target::pid_to_str): Likewise.
2997         (iterate_over_mappings): Likewise.
2998
2999         * procfs.c (create_procinfo): Fix ARI warning.
3000         (proc_get_status): Likewise.
3001         (proc_stop_process): Likewise.
3002         (proc_run_process): Likewise.
3003         (proc_kill): Likewise.
3004         (proc_get_LDT_entry): Likewise.
3005         (procfs_find_LDT_entry): Likewise.
3006         (proc_update_threads): Likewise.
3007         (proc_iterate_over_threads): Likewise.
3008         (do_attach): Likewise.
3009         (procfs_xfer_memory): Likewise.
3010         (invalidate_cache): Likewise.
3011         (procfs_target::resume): Likewise.
3012         (procfs_init_inferior): Likewise.
3013         (procfs_set_exec_trap): Likewise.
3014         (procfs_target::thread_alive): Likewise.
3015         (procfs_target::pid_to_exec_file): Likewise.
3016         (iterate_over_mappings): Likewise.
3017         (procfs_target::make_corefile_notes): Likewise.
3018         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
3019
3020         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3021         (procfs_find_LDT_entry): Likewise.
3022         * sol-thread.c (ps_lgetLDT): Likewise.
3023
3024 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3025
3026         PR tdep/17903
3027         * procfs.c (procfs_target): Declare pid_to_exec_file.
3028         (procfs_target::pid_to_exec_file): New.
3029
3030 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3031
3032         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3033         renaming.
3034         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3035         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3036
3037 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3038
3039         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3040         (supply_fpregset, fill_fpregset): Move ...
3041         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3042         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3043         Remove references to ioctl-based procfs.
3044         Include <sys/reg.h>.
3045         Remove PR_MODEL_NATIVE guards.
3046         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3047         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3048
3049 2018-09-19  Xavier Roirand  <roirand@adacore.com>
3050
3051         PR gdb/20981:
3052         * solib-darwin.c (darwin_get_dyld_bfd): New function.
3053         (darwin_solib_get_all_image_info_addr_at_init): Update call.
3054         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3055
3056 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
3057
3058         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3059         (fbsd_print_sockaddr_in6): Likewise.
3060
3061 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
3062             Chris January  <chris.january@arm.com>
3063
3064         * eval.c (skip_undetermined_arglist): Skip argument list helper.
3065         (evaluate_subexp_standard): Return a dummy type when
3066         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3067         OP_F77_UNDETERMINED_ARGLIST case.
3068         * expression.h (enum noside): Update comment.
3069
3070 2018-09-19  George Vasick <george.vasick@oracle.com>
3071
3072         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3073
3074 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
3075             April Chin <april.chin@oracle.com>
3076             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3077
3078         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3079         uint_t lwpid_t.
3080         (create_procinfo): Print pids in /proc without leading zeros.
3081
3082 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
3083
3084         * nios2-tdep.c (nios2_gcc_target_options): New.
3085         (nios2_gdb_arch_init): Install new hook.
3086
3087 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3088
3089         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3090         New file.
3091         * update-gnulib.sh: Apply patch.
3092         * configure: Re-generate.
3093
3094 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3095
3096         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3097         description.  Make "info proc" command descriptions more
3098         consistent.
3099
3100 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3101
3102         * NEWS: Mention 'info proc files' command.
3103
3104 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3105
3106         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3107         descriptors for IP_FILES and IP_ALL.
3108
3109 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3110
3111         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3112         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3113         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3114         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3115         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3116         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3117         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3118         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3119         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3120         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3121         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3122         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3123         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3124         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3125         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3126         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3127         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3128         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3129         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3130         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3131         (struct fbsd_sockaddr_un): New types.
3132         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3133         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3134         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3135         (fbsd_core_info_proc_files): New functions.
3136         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3137         IP_ALL.
3138         * fbsd-tdep.h (fbsd_info_proc_files_header)
3139         (fbsd_info_proc_files_entry): New.
3140
3141 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3142
3143         * defs.h (enum info_proc_what) [IP_FILES]: New value.
3144         * infcmd.c (info_proc_cmd_files): New function.
3145         (_initialize_infcmd): Register 'info proc files' command.
3146
3147 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3148
3149         * gnulib/aclocal-m4-deps.mk: Re-generate.
3150         * gnulib/aclocal.m4: Re-generate.
3151         * gnulib/config.in: Re-generate.
3152         * gnulib/configure: Re-generate.
3153         * gnulib/import/Makefile.am: Re-generate.
3154         * gnulib/import/Makefile.in: Re-generate.
3155         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3156         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3157         * gnulib/import/arpa_inet.in.h: New file.
3158         * gnulib/import/inet_ntop.c: New file.
3159         * gnulib/import/m4/arpa_inet_h.m4: New file.
3160         * gnulib/import/m4/inet_ntop.m4: New file.
3161         * gnulib/import/m4/netinet_in_h.m4: New file.
3162         * gnulib/import/m4/socklen.m4: New file.
3163         * gnulib/import/m4/sockpfaf.m4: New file.
3164         * gnulib/import/m4/stdalign.m4: New file.
3165         * gnulib/import/m4/sys_uio_h.m4: New file.
3166         * gnulib/import/netinet_in.in.h: New file.
3167         * gnulib/import/stdalign.in.h: New file.
3168         * gnulib/import/sys_socket.c: New file.
3169         * gnulib/import/sys_socket.in.h: New file.
3170         * gnulib/import/sys_uio.in.h: New file.
3171         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3172         module.
3173
3174 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3175
3176         * gnulib/aclocal-m4-deps.mk: New file.
3177         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3178         deterministically.
3179
3180 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3181
3182         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3183         KVE_PATH.
3184
3185 2018-09-18  Tom Tromey  <tom@tromey.com>
3186
3187         * compile/compile-object-load.c (struct
3188         link_hash_table_cleanup_data): Add constructor and destructor.
3189         Use DISABLE_COPY_AND_ASSIGN.
3190         (~link_hash_table_cleanup_data): Rename from
3191         link_hash_table_free.  Now a destructor.
3192         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
3193
3194 2018-09-18  Tom Tromey  <tom@tromey.com>
3195
3196         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3197         * compile/compile-object-load.c (struct munmap_list): Move to
3198         header file.
3199         (munmap_list::add): Rename from munmap_list_add; rewrite.
3200         (munmap_list::~munmap_list): Rename from munmap_list_free.
3201         (munmap_listp_free_cleanup): Remove.
3202         (compile_object_load): Update.
3203         * compile/compile-object-load.h (struct munmap_list): Move from
3204         compile-object-load.c.  Rewrite.
3205
3206 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
3207
3208         * aarch64-tdep.c (pass_in_v): Use register size.
3209         (aarch64_extract_return_value): Likewise.
3210         (aarch64_store_return_value): Likewise.
3211
3212 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3213
3214         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3215         rlim_t.
3216
3217 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3218
3219         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3220         Fix short help line.
3221
3222 2018-09-17  Tom Tromey  <tom@tromey.com>
3223
3224         PR python/20445:
3225         * configure: Rebuild.
3226         * configure.ac: Conditionally use -DNDEBUG for Python.
3227
3228 2018-09-17  Tom Tromey  <tom@tromey.com>
3229
3230         * configure: Rebuild.
3231         * configure.ac: Use gmp as a library dependency when checking for
3232         mpfr.
3233
3234 2018-09-17  Pedro Alves  <palves@redhat.com>
3235
3236         * python/py-inferior.c (find_inferior_object): Delete.
3237
3238 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
3239
3240         * compile/compile-cplus-types.c
3241         (compile_cplus_instance::enter_scope): Don't use new_scope after
3242         std::move.
3243
3244 2018-09-17  Tom Tromey  <tom@tromey.com>
3245
3246         * common/pathstuff.c (get_standard_cache_dir): Use
3247         ~/Library/Caches on macOS.
3248         * common/pathstuff.h (get_standard_cache_dir): Update comment.
3249
3250 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
3251
3252         PR python/23669
3253         * breakpoint.c (commands_cmd_element): New.
3254         (_initialize_breakpoint): Assign commands_cmd_element.
3255         * breakpoint.h (commands_cmd_element): New.
3256         * cli/cli-script.c (while_cmd_element, if_command,
3257         define_cmd_element): New.
3258         (command_name_equals): Remove.
3259         (process_next_line): Compare commands by pointer, not by name.
3260         (_initialize_cli_script): Assign the various cmd_list_element
3261         variables.
3262         * compile/compile.c (compile_cmd_element): New.
3263         (_initialize_compile): Assign compile_cmd_element.
3264         * compile/compile.h (compile_cmd_element): New.
3265         * guile/guile.c (guile_cmd_element): New.
3266         (install_gdb_commands): Assign guile_cmd_element.
3267         * guile/guile.h (guile_cmd_element): New.
3268         * python/python.c (python_cmd_element): New.
3269         (_initialize_python): Assign python_cmd_element.
3270         * python/python.h (python_cmd_element): New.
3271         * tracepoint.c (while_stepping_cmd_element): New.
3272         (_initialize_tracepoint): Assign while_stepping_cmd_element.
3273         * tracepoint.h (while_stepping_cmd_element): New.
3274
3275 2018-09-17  Tom Tromey  <tom@tromey.com>
3276
3277         * infrun.c (save_infcall_suspend_state): Return
3278         infcall_suspend_state_up.
3279         (save_infcall_control_state): Return infcall_control_state_up.
3280         * inferior.h (save_infcall_suspend_state)
3281         (save_infcall_control_state): Declare later.  Return unique
3282         pointers.
3283
3284 2018-09-17  Tom Tromey  <tom@tromey.com>
3285
3286         * infrun.c (struct stop_context): Declare constructor,
3287         destructor, "changed" method.
3288         (stop_context::stop_context): Rename from save_stop_context.
3289         (stop_context::~stop_context): Rename from
3290         release_stop_context_cleanup.
3291         (normal_stop): Update.
3292         (stop_context::changed): Rename from stop_context_changed.  Return
3293         bool.
3294
3295 2018-09-17  Tom Tromey  <tom@tromey.com>
3296
3297         * inferior.h (struct infcall_suspend_state_deleter): New.
3298         (infcall_suspend_state_up): New typedef.
3299         (struct infcall_control_state_deleter): New.
3300         (infcall_control_state_up): New typedef.
3301         (make_cleanup_restore_infcall_suspend_state)
3302         (make_cleanup_restore_infcall_control_state): Don't declare.
3303         * infcall.c (call_function_by_hand_dummy): Update.
3304         * infrun.c (do_restore_infcall_suspend_state_cleanup)
3305         (make_cleanup_restore_infcall_suspend_state): Remove.
3306         (do_restore_infcall_control_state_cleanup)
3307         (make_cleanup_restore_infcall_control_state): Remove.
3308
3309 2018-09-17  Tom Tromey  <tom@tromey.com>
3310
3311         * gdbthread.h (struct thread_control_state): Add initializer.
3312         (class thread_info) <control>: Remove initializer.
3313         * inferior.h (struct inferior_control_state): Add initializer.
3314         (class inferior) <control>: Remove initializer.
3315         (exit_inferior_1): Update.
3316         * infrun.c (struct infcall_control_state): Add constructors.
3317         (save_infcall_control_state): Use new.
3318         (restore_infcall_control_state, discard_infcall_control_state):
3319         Use delete.
3320
3321 2018-09-17  Tom Tromey  <tom@tromey.com>
3322
3323         * infrun.c (struct infcall_suspend_state) <registers>: Now a
3324         unique_ptr.
3325         <siginfo_data>: Now a unique_xmalloc_ptr.
3326         (save_infcall_suspend_state, restore_infcall_suspend_state)
3327         (discard_infcall_suspend_state)
3328         (get_infcall_suspend_state_regcache): Update.
3329
3330 2018-09-17  Tom Tromey  <tom@tromey.com>
3331
3332         * gdbthread.h (struct thread_suspend_state): Add initializers.
3333         (class thread_info) <suspend>: Remove initializer.
3334         * infrun.c (struct infcall_suspend_state): Add initializers.
3335         (save_infcall_suspend_state): Use new.
3336         (discard_infcall_suspend_state): Use delete.
3337
3338 2018-09-16  Tom Tromey  <tom@tromey.com>
3339
3340         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3341         Remove.
3342         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3343         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3344         (py_varobj_iter_new): Likewise.
3345         (py_varobj_get_iterator): Use gdbpy_ref.
3346
3347 2018-09-16  Tom Tromey  <tom@tromey.com>
3348
3349         * python/py-threadevent.c (py_get_event_thread): Simplify.
3350         * python/py-inferior.c (infpy_thread_from_thread_handle):
3351         Return immediately after calling thread_to_thread_object.  Use
3352         Py_RETURN_NONE.
3353         (thread_to_thread_object): Set the exception on a NULL return.
3354
3355 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
3356
3357         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3358
3359 2018-09-16  Tom Tromey  <tom@tromey.com>
3360
3361         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3362         Remove.
3363
3364 2018-09-16  Tom Tromey  <tom@tromey.com>
3365
3366         * python/python-internal.h (thread_to_thread_object): Change
3367         return type.
3368         * python/py-inferior.c (thread_to_thread_object): Return a new
3369         reference.
3370         (infpy_thread_from_thread_handle): Update.
3371         * python/py-infthread.c (gdbpy_selected_thread): Update.
3372         * python/py-stopevent.c (create_stop_event_object): Update.
3373         * python/py-threadevent.c (py_get_event_thread): Return a new
3374         reference.
3375         (py_get_event_thread): Update.
3376         * python/py-event.h (py_get_event_thread): Change return type.
3377         * python/py-continueevent.c (create_continue_event_object):
3378         Update.
3379
3380 2018-09-16  Tom Tromey  <tom@tromey.com>
3381
3382         * python/py-progspace.c (pspy_get_objfiles): Update.
3383         * python/python-internal.h (objfile_to_objfile_object): Change
3384         return type.
3385         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3386         Update.
3387         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3388         Update.
3389         * python/python.c (gdbpy_get_current_objfile): Update.
3390         (gdbpy_objfiles): Update.
3391         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3392         Update.
3393         (objfile_to_objfile_object): Return a new reference.
3394         * python/py-symtab.c (stpy_get_objfile): Update.
3395         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3396         Update.
3397
3398 2018-09-16  Tom Tromey  <tom@tromey.com>
3399
3400         * python/py-inferior.c (infpy_get_progspace): Update.
3401         * python/python-internal.h (pspace_to_pspace_object): Change
3402         return type.
3403         * python/py-newobjfileevent.c
3404         (create_clear_objfiles_event_object): Update.
3405         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3406         Update.
3407         * python/python.c (gdbpy_get_current_progspace): Update.
3408         (gdbpy_progspaces): Update.
3409         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3410         reference.
3411         * python/py-objfile.c (objfpy_get_progspace): Update.
3412         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3413         Update.
3414
3415 2018-09-16  Tom Tromey  <tom@tromey.com>
3416
3417         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3418         (solib_name, block_for_pc, find_pc_line): New functions.
3419         (execute_unwinders): Update.
3420         * python/py-block.c (gdbpy_block_for_pc): Remove.
3421         * python/py-inferior.c (infpy_get_progspace): New function.
3422         (inferior_object_getset) <progspace>: Add.
3423         * python/py-progspace.c (pspy_objfiles): Rewrite.
3424         (pspy_solib_name, pspy_block_for_pc)
3425         (pspy_find_pc_line, pspy_is_valid): New functions.
3426         (progspace_object_methods): Add entries for solib_name,
3427         block_for_pc, find_pc_line, is_valid.
3428         * python/python-internal.h (gdbpy_block_for_pc)
3429         (build_objfiles_list): Don't declare.
3430         * python/python.c: Don't include solib.h.
3431         (gdbpy_solib_name, gdbpy_find_pc_line)
3432         (gdbpy_get_current_progspace, build_objfiles_list)
3433         (gdbpy_objfiles): Remove.
3434         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3435         solib_name, find_pc_line>: Remove entries.
3436
3437 2018-09-16  Tom Tromey  <tom@tromey.com>
3438
3439         * top.c (new_ui_command): Use GNU style for metasyntactic
3440         variables.
3441         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3442         variables.
3443         * maint.c (maintenance_translate_address): Remove "<>" around
3444         text.
3445         * interps.c (interpreter_exec_cmd): Use GNU style for
3446         metasyntactic variables.
3447         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3448         metasyntactic variables.
3449         * tracepoint.c (tfind_range_command): Use GNU style for
3450         metasyntactic variables.
3451         (tfind_outside_command): Likewise.
3452         (_initialize_tracepoint): Likewise.
3453         * remote.c (extended_remote_target::create_inferior): Use GNU
3454         style for metasyntactic variables.
3455         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3456         metasyntactic variables.
3457         (adi_assign_command): Likewise.
3458
3459 2018-09-16  Tom Tromey  <tom@tromey.com>
3460
3461         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3462         metasyntactic variables.  Print message if no disassembler options
3463         are available.
3464
3465 2018-09-15  Tom Tromey  <tom@tromey.com>
3466
3467         * infcmd.c (get_inferior_args): Return const char *.
3468         * inferior.h (get_inferior_args): Return type now const.
3469         * linux-tdep.c (linux_fill_prpsinfo): Update.
3470         * procfs.c (procfs_target::make_corefile_notes): Update.
3471
3472 2018-09-07  Tom Tromey  <tom@tromey.com>
3473
3474         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3475         inside the TRY.
3476
3477 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3478
3479         * nios2-tdep.c (nios2_type_align): New.
3480         (nios2_gdb_arch_init): Install type_align hook.
3481
3482 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3483
3484         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3485         type that is neither object file owned, nor gdbarch owned.
3486         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3487         gdbarch is non-NULL.
3488         (alloc_type_instance): Allocate non-objfile owned types on the
3489         gdbarch obstack.
3490         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3491         using TYPE_ALLOC to ensure memory is allocated on the correct
3492         obstack.
3493         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3494         obstack, or the gdbarch obstack.
3495         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3496
3497 2018-09-14  Tom Tromey  <tom@tromey.com>
3498
3499         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3500         block.
3501
3502 2018-09-14  Tom Tromey  <tom@tromey.com>
3503
3504         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3505
3506 2018-09-13  Tom Tromey  <tom@tromey.com>
3507
3508         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3509         static.
3510
3511 2018-09-13  Tom Tromey  <tom@tromey.com>
3512
3513         * exec.c (try_open_exec_file): Use std::string.
3514
3515 2018-09-13  Tom Tromey  <tom@tromey.com>
3516
3517         * utils.h (gdb_bfd_errmsg): Return std::string.
3518         * exec.c (exec_file_attach): Update.
3519         * compile/compile-object-load.c (compile_object_load): Update.
3520         * utils.c (gdb_bfd_errmsg): Return std::string.
3521
3522 2018-09-13  Tom Tromey  <tom@tromey.com>
3523
3524         * procfs.c (struct procinfo_deleter): New.
3525         (procinfo_up): New typedef.
3526         (do_destroy_procinfo_cleanup): Remove.
3527         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3528
3529 2018-09-13  Tom Tromey  <tom@tromey.com>
3530
3531         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3532
3533 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3534 2018-09-13  Tom Tromey  <tom@tromey.com>
3535
3536         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3537         (pspy_get_objfiles): New function.
3538         (progspace_object_methods): New.
3539         (pspace_object_type): Add tp_methods callback.
3540         * python/python-internal.h (build_objfiles_list): New
3541         declaration.
3542         * python/python.c (build_objfiles_list): New function.
3543         (gdbpy_objfiles): Implement using build_objfiles_list.
3544         * NEWS: Mention the Progspace.objfiles method.
3545
3546 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3547
3548         * python/py-inferior.c (infpy_get_progspace): New function.
3549         (inferior_object_getset): Add progspace property.
3550         * NEWS: Mention the new property.
3551
3552 2018-09-13  Tom Tromey  <tom@tromey.com>
3553
3554         PR rust/23650:
3555         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3556
3557 2018-09-13  Tom Tromey  <tom@tromey.com>
3558
3559         PR rust/23626:
3560         * rust-lang.c (rust_enum_variant): Now static.
3561         (rust_empty_enum_p): New function.
3562         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3563         Handle empty enum.
3564
3565 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3566
3567         * python/py-inferior.c (infpy_repr): New.
3568         (inferior_object_type): Register infpy_repr.
3569         * python/py-objfile.c (objfpy_repr): New.
3570         (objfile_object_type): Register objfpy_repr.
3571
3572 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3573
3574         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3575
3576 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3577
3578         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3579         typo.
3580
3581 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3582
3583         * common/common-utils.c: Don't include '<sys/stat.h>'.
3584         (is_regular_file): Move to...
3585         * common/filestuff.c (is_regular_file): ... here.
3586         * common/common-utils.h (is_regular_file): Move to...
3587         * common/filestuff.h (is_regular_file): ... here.
3588
3589 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3590
3591         * skip.c (debug_skip): New variable.
3592         (skiplist_entry::do_skip_file_p): Add debug output.
3593         (skiplist_entry::do_skip_gfile_p): Likewise.
3594         (skiplist_entry::skip_function_p): Likewise.
3595         (_initialize_step_skip): Create debug command.
3596         * NEWS: Mention set/show debug skip.
3597
3598 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3599
3600         * darwin-nat.c (should_disable_startup_with_shell):
3601         New function.
3602         (darwin_nat_target::create_inferior): Add call.
3603
3604 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3605
3606         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3607         inf_port, msg_state>: Initialize.
3608         (struct darwin_thread_info) <signaled, single_step>: Change
3609         type and initialize.
3610         (struct darwin_thread_info) <event>: Initialize.
3611
3612 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3613
3614         PR gdb/23555
3615         PR gdb/23558
3616         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3617         guesses.
3618
3619 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3620
3621         Revert:
3622         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3623
3624         PR gdb/23555
3625         PR gdb/23558
3626         * gnulib/aclocal.m4: Regenerate.
3627         * gnulib/config.in: Regenerate.
3628         * gnulib/configure: Regenerate.
3629         * gnulib/import/Makefile.am: Update.
3630         * gnulib/import/Makefile.in: Update.
3631         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3632         * gnulib/import/_Noreturn.h: ... this.
3633         * gnulib/import/alloca.in.h: Update.
3634         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3635         * gnulib/import/arg-nonnull.h: ... this.
3636         * gnulib/import/assure.h: Update.
3637         * gnulib/import/at-func.c: Update.
3638         * gnulib/import/basename-lgpl.c: Update.
3639         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3640         * gnulib/import/c++defs.h: ... this.
3641         * gnulib/import/canonicalize-lgpl.c: Update.
3642         * gnulib/import/cdefs.h: Update.
3643         * gnulib/import/chdir-long.c: Update.
3644         * gnulib/import/chdir-long.h: Update.
3645         * gnulib/import/cloexec.c: Update.
3646         * gnulib/import/cloexec.h: Update.
3647         * gnulib/import/close.c: Update.
3648         * gnulib/import/closedir.c: Update.
3649         * gnulib/import/config.charset: Update.
3650         * gnulib/import/dirent-private.h: Update.
3651         * gnulib/import/dirent.in.h: Update.
3652         * gnulib/import/dirfd.c: Update.
3653         * gnulib/import/dirname-lgpl.c: Update.
3654         * gnulib/import/dirname.h: Update.
3655         * gnulib/import/dosname.h: Update.
3656         * gnulib/import/dup-safer-flag.c: Update.
3657         * gnulib/import/dup-safer.c: Update.
3658         * gnulib/import/dup.c: Update.
3659         * gnulib/import/dup2.c: Update.
3660         * gnulib/import/errno.in.h: Update.
3661         * gnulib/import/error.c: Update.
3662         * gnulib/import/error.h: Update.
3663         * gnulib/import/exitfail.c: Update.
3664         * gnulib/import/exitfail.h: Update.
3665         * gnulib/import/extra/update-copyright: Update.
3666         * gnulib/import/fchdir.c: Update.
3667         * gnulib/import/fcntl.c: Update.
3668         * gnulib/import/fcntl.in.h: Update.
3669         * gnulib/import/fd-hook.c: Update.
3670         * gnulib/import/fd-hook.h: Update.
3671         * gnulib/import/fd-safer-flag.c: Update.
3672         * gnulib/import/fd-safer.c: Update.
3673         * gnulib/import/fdopendir.c: Update.
3674         * gnulib/import/filename.h: Update.
3675         * gnulib/import/filenamecat-lgpl.c: Update.
3676         * gnulib/import/filenamecat.h: Update.
3677         * gnulib/import/flexmember.h: Update.
3678         * gnulib/import/float+.h: Update.
3679         * gnulib/import/float.c: Update.
3680         * gnulib/import/float.in.h: Update.
3681         * gnulib/import/fnmatch.c: Update.
3682         * gnulib/import/fnmatch.in.h: Update.
3683         * gnulib/import/fnmatch_loop.c: Update.
3684         * gnulib/import/fpucw.h: Update.
3685         * gnulib/import/frexp.c: Update.
3686         * gnulib/import/frexpl.c: Update.
3687         * gnulib/import/fstat.c: Update.
3688         * gnulib/import/fstatat.c: Update.
3689         * gnulib/import/getcwd-lgpl.c: Update.
3690         * gnulib/import/getcwd.c: Update.
3691         * gnulib/import/getdtablesize.c: Update.
3692         * gnulib/import/getlogin_r.c: Update.
3693         * gnulib/import/getprogname.c: Update.
3694         * gnulib/import/getprogname.h: Update.
3695         * gnulib/import/gettext.h: Update.
3696         * gnulib/import/gettimeofday.c: Update.
3697         * gnulib/import/glob-libc.h: Update.
3698         * gnulib/import/glob.c: Update.
3699         * gnulib/import/glob.in.h: Update.
3700         * gnulib/import/glob_internal.h: Update.
3701         * gnulib/import/glob_pattern_p.c: Update.
3702         * gnulib/import/globfree.c: Update.
3703         * gnulib/import/hard-locale.c: Update.
3704         * gnulib/import/hard-locale.h: Update.
3705         * gnulib/import/intprops.h: Update.
3706         * gnulib/import/inttypes.in.h: Update.
3707         * gnulib/import/isnan.c: Update.
3708         * gnulib/import/isnand-nolibm.h: Update.
3709         * gnulib/import/isnand.c: Update.
3710         * gnulib/import/isnanl-nolibm.h: Update.
3711         * gnulib/import/isnanl.c: Update.
3712         * gnulib/import/itold.c: Update.
3713         * gnulib/import/libc-config.h: Update.
3714         * gnulib/import/limits.in.h: Update.
3715         * gnulib/import/localcharset.c: Update.
3716         * gnulib/import/localcharset.h: Update.
3717         * gnulib/import/localtime-buffer.c: Update.
3718         * gnulib/import/localtime-buffer.h: Update.
3719         * gnulib/import/lstat.c: Update.
3720         * gnulib/import/m4/00gnulib.m4: Update.
3721         * gnulib/import/m4/__inline.m4: Update.
3722         * gnulib/import/m4/absolute-header.m4: Update.
3723         * gnulib/import/m4/alloca.m4: Update.
3724         * gnulib/import/m4/builtin-expect.m4: Update.
3725         * gnulib/import/m4/canonicalize.m4: Update.
3726         * gnulib/import/m4/chdir-long.m4: Update.
3727         * gnulib/import/m4/close.m4: Update.
3728         * gnulib/import/m4/closedir.m4: Update.
3729         * gnulib/import/m4/configmake.m4: Update.
3730         * gnulib/import/m4/d-ino.m4: Update.
3731         * gnulib/import/m4/d-type.m4: Update.
3732         * gnulib/import/m4/dirent_h.m4: Update.
3733         * gnulib/import/m4/dirfd.m4: Update.
3734         * gnulib/import/m4/dirname.m4: Update.
3735         * gnulib/import/m4/double-slash-root.m4: Update.
3736         * gnulib/import/m4/dup.m4: Update.
3737         * gnulib/import/m4/dup2.m4: Update.
3738         * gnulib/import/m4/eealloc.m4: Update.
3739         * gnulib/import/m4/environ.m4: Update.
3740         * gnulib/import/m4/errno_h.m4: Update.
3741         * gnulib/import/m4/error.m4: Update.
3742         * gnulib/import/m4/exponentd.m4: Update.
3743         * gnulib/import/m4/exponentl.m4: Update.
3744         * gnulib/import/m4/extensions.m4: Update.
3745         * gnulib/import/m4/extern-inline.m4: Update.
3746         * gnulib/import/m4/fchdir.m4: Update.
3747         * gnulib/import/m4/fcntl-o.m4: Update.
3748         * gnulib/import/m4/fcntl.m4: Update.
3749         * gnulib/import/m4/fcntl_h.m4: Update.
3750         * gnulib/import/m4/fdopendir.m4: Update.
3751         * gnulib/import/m4/filenamecat.m4: Update.
3752         * gnulib/import/m4/flexmember.m4: Update.
3753         * gnulib/import/m4/float_h.m4: Update.
3754         * gnulib/import/m4/fnmatch.m4: Update.
3755         * gnulib/import/m4/fnmatch_h.m4: Update.
3756         * gnulib/import/m4/fpieee.m4: Update.
3757         * gnulib/import/m4/frexp.m4: Update.
3758         * gnulib/import/m4/frexpl.m4: Update.
3759         * gnulib/import/m4/fstat.m4: Update.
3760         * gnulib/import/m4/fstatat.m4: Update.
3761         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3762         * gnulib/import/m4/getcwd-path-max.m4: Update.
3763         * gnulib/import/m4/getcwd.m4: Update.
3764         * gnulib/import/m4/getdtablesize.m4: Update.
3765         * gnulib/import/m4/getlogin.m4: Update.
3766         * gnulib/import/m4/getlogin_r.m4: Update.
3767         * gnulib/import/m4/getpagesize.m4: Update.
3768         * gnulib/import/m4/getprogname.m4: Update.
3769         * gnulib/import/m4/gettimeofday.m4: Update.
3770         * gnulib/import/m4/glibc21.m4: Update.
3771         * gnulib/import/m4/glob.m4: Update.
3772         * gnulib/import/m4/glob_h.m4: Update.
3773         * gnulib/import/m4/gnulib-cache.m4: Update.
3774         * gnulib/import/m4/gnulib-common.m4: Update.
3775         * gnulib/import/m4/gnulib-comp.m4: Update.
3776         * gnulib/import/m4/gnulib-tool.m4: Update.
3777         * gnulib/import/m4/hard-locale.m4: Update.
3778         * gnulib/import/m4/include_next.m4: Update.
3779         * gnulib/import/m4/inttypes-pri.m4: Update.
3780         * gnulib/import/m4/inttypes.m4: Update.
3781         * gnulib/import/m4/isnand.m4: Update.
3782         * gnulib/import/m4/isnanl.m4: Update.
3783         * gnulib/import/m4/largefile.m4: Update.
3784         * gnulib/import/m4/limits-h.m4: Update.
3785         * gnulib/import/m4/localcharset.m4: Update.
3786         * gnulib/import/m4/locale-fr.m4: Update.
3787         * gnulib/import/m4/locale-ja.m4: Update.
3788         * gnulib/import/m4/locale-zh.m4: Update.
3789         * gnulib/import/m4/localtime-buffer.m4: Update.
3790         * gnulib/import/m4/longlong.m4: Update.
3791         * gnulib/import/m4/lstat.m4: Update.
3792         * gnulib/import/m4/malloc.m4: Update.
3793         * gnulib/import/m4/malloca.m4: Update.
3794         * gnulib/import/m4/math_h.m4: Update.
3795         * gnulib/import/m4/mbrtowc.m4: Update.
3796         * gnulib/import/m4/mbsinit.m4: Update.
3797         * gnulib/import/m4/mbsrtowcs.m4: Update.
3798         * gnulib/import/m4/mbstate_t.m4: Update.
3799         * gnulib/import/m4/memchr.m4: Update.
3800         * gnulib/import/m4/memmem.m4: Update.
3801         * gnulib/import/m4/mempcpy.m4: Update.
3802         * gnulib/import/m4/memrchr.m4: Update.
3803         * gnulib/import/m4/mkdir.m4: Update.
3804         * gnulib/import/m4/mkstemp.m4: Update.
3805         * gnulib/import/m4/mmap-anon.m4: Update.
3806         * gnulib/import/m4/mode_t.m4: Update.
3807         * gnulib/import/m4/msvc-inval.m4: Update.
3808         * gnulib/import/m4/msvc-nothrow.m4: Update.
3809         * gnulib/import/m4/multiarch.m4: Update.
3810         * gnulib/import/m4/nocrash.m4: Update.
3811         * gnulib/import/m4/off_t.m4: Update.
3812         * gnulib/import/m4/onceonly.m4: Update.
3813         * gnulib/import/m4/open-cloexec.m4: Update.
3814         * gnulib/import/m4/open.m4: Update.
3815         * gnulib/import/m4/openat.m4: Update.
3816         * gnulib/import/m4/opendir.m4: Update.
3817         * gnulib/import/m4/pathmax.m4: Update.
3818         * gnulib/import/m4/rawmemchr.m4: Update.
3819         * gnulib/import/m4/readdir.m4: Update.
3820         * gnulib/import/m4/readlink.m4: Update.
3821         * gnulib/import/m4/realloc.m4: Update.
3822         * gnulib/import/m4/rename.m4: Update.
3823         * gnulib/import/m4/rewinddir.m4: Update.
3824         * gnulib/import/m4/rmdir.m4: Update.
3825         * gnulib/import/m4/save-cwd.m4: Update.
3826         * gnulib/import/m4/secure_getenv.m4: Update.
3827         * gnulib/import/m4/setenv.m4: Update.
3828         * gnulib/import/m4/signal_h.m4: Update.
3829         * gnulib/import/m4/ssize_t.m4: Update.
3830         * gnulib/import/m4/stat-time.m4: Update.
3831         * gnulib/import/m4/stat.m4: Update.
3832         * gnulib/import/m4/std-gnu11.m4: Update.
3833         * gnulib/import/m4/stdbool.m4: Update.
3834         * gnulib/import/m4/stddef_h.m4: Update.
3835         * gnulib/import/m4/stdint.m4: Update.
3836         * gnulib/import/m4/stdio_h.m4: Update.
3837         * gnulib/import/m4/stdlib_h.m4: Update.
3838         * gnulib/import/m4/strchrnul.m4: Update.
3839         * gnulib/import/m4/strdup.m4: Update.
3840         * gnulib/import/m4/strerror.m4: Update.
3841         * gnulib/import/m4/string_h.m4: Update.
3842         * gnulib/import/m4/strstr.m4: Update.
3843         * gnulib/import/m4/strtok_r.m4: Update.
3844         * gnulib/import/m4/sys_socket_h.m4: Update.
3845         * gnulib/import/m4/sys_stat_h.m4: Update.
3846         * gnulib/import/m4/sys_time_h.m4: Update.
3847         * gnulib/import/m4/sys_types_h.m4: Update.
3848         * gnulib/import/m4/tempname.m4: Update.
3849         * gnulib/import/m4/time_h.m4: Update.
3850         * gnulib/import/m4/unistd-safer.m4: Update.
3851         * gnulib/import/m4/unistd_h.m4: Update.
3852         * gnulib/import/m4/warn-on-use.m4: Update.
3853         * gnulib/import/m4/wchar_h.m4: Update.
3854         * gnulib/import/m4/wchar_t.m4: Update.
3855         * gnulib/import/m4/wctype_h.m4: Update.
3856         * gnulib/import/m4/wint_t.m4: Update.
3857         * gnulib/import/malloc.c: Update.
3858         * gnulib/import/malloc/scratch_buffer.h: Update.
3859         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3860         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3861         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3862         * gnulib/import/malloca.c: Update.
3863         * gnulib/import/malloca.h: Update.
3864         * gnulib/import/malloca.valgrind: Update.
3865         * gnulib/import/math.in.h: Update.
3866         * gnulib/import/mbrtowc.c: Update.
3867         * gnulib/import/mbsinit.c: Update.
3868         * gnulib/import/mbsrtowcs-impl.h: Update.
3869         * gnulib/import/mbsrtowcs-state.c: Update.
3870         * gnulib/import/mbsrtowcs.c: Update.
3871         * gnulib/import/memchr.c: Update.
3872         * gnulib/import/memmem.c: Update.
3873         * gnulib/import/mempcpy.c: Update.
3874         * gnulib/import/memrchr.c: Update.
3875         * gnulib/import/mkdir.c: Update.
3876         * gnulib/import/mkstemp.c: Update.
3877         * gnulib/import/msvc-inval.c: Update.
3878         * gnulib/import/msvc-inval.h: Update.
3879         * gnulib/import/msvc-nothrow.c: Update.
3880         * gnulib/import/msvc-nothrow.h: Update.
3881         * gnulib/import/open.c: Update.
3882         * gnulib/import/openat-die.c: Update.
3883         * gnulib/import/openat-priv.h: Update.
3884         * gnulib/import/openat-proc.c: Update.
3885         * gnulib/import/openat.c: Update.
3886         * gnulib/import/openat.h: Update.
3887         * gnulib/import/opendir.c: Update.
3888         * gnulib/import/pathmax.h: Update.
3889         * gnulib/import/pipe-safer.c: Update.
3890         * gnulib/import/rawmemchr.c: Update.
3891         * gnulib/import/readdir.c: Update.
3892         * gnulib/import/readlink.c: Update.
3893         * gnulib/import/realloc.c: Update.
3894         * gnulib/import/ref-add.sin: Update.
3895         * gnulib/import/ref-del.sin: Update.
3896         * gnulib/import/rename.c: Update.
3897         * gnulib/import/rewinddir.c: Update.
3898         * gnulib/import/rmdir.c: Update.
3899         * gnulib/import/same-inode.h: Update.
3900         * gnulib/import/save-cwd.c: Update.
3901         * gnulib/import/save-cwd.h: Update.
3902         * gnulib/import/scratch_buffer.h: Update.
3903         * gnulib/import/secure_getenv.c: Update.
3904         * gnulib/import/setenv.c: Update.
3905         * gnulib/import/signal.in.h: Update.
3906         * gnulib/import/stat-time.c: Update.
3907         * gnulib/import/stat-time.h: Update.
3908         * gnulib/import/stat-w32.c: Update.
3909         * gnulib/import/stat-w32.h: Update.
3910         * gnulib/import/stat.c: Update.
3911         * gnulib/import/stdbool.in.h: Update.
3912         * gnulib/import/stddef.in.h: Update.
3913         * gnulib/import/stdint.in.h: Update.
3914         * gnulib/import/stdio.in.h: Update.
3915         * gnulib/import/stdlib.in.h: Update.
3916         * gnulib/import/str-two-way.h: Update.
3917         * gnulib/import/strchrnul.c: Update.
3918         * gnulib/import/strdup.c: Update.
3919         * gnulib/import/streq.h: Update.
3920         * gnulib/import/strerror-override.c: Update.
3921         * gnulib/import/strerror-override.h: Update.
3922         * gnulib/import/strerror.c: Update.
3923         * gnulib/import/string.in.h: Update.
3924         * gnulib/import/stripslash.c: Update.
3925         * gnulib/import/strnlen1.c: Update.
3926         * gnulib/import/strnlen1.h: Update.
3927         * gnulib/import/strstr.c: Update.
3928         * gnulib/import/strtok_r.c: Update.
3929         * gnulib/import/sys_stat.in.h: Update.
3930         * gnulib/import/sys_time.in.h: Update.
3931         * gnulib/import/sys_types.in.h: Update.
3932         * gnulib/import/tempname.c: Update.
3933         * gnulib/import/tempname.h: Update.
3934         * gnulib/import/time.in.h: Update.
3935         * gnulib/import/unistd--.h: Update.
3936         * gnulib/import/unistd-safer.h: Update.
3937         * gnulib/import/unistd.in.h: Update.
3938         * gnulib/import/unsetenv.c: Update.
3939         * gnulib/import/verify.h: Update.
3940         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3941         * gnulib/import/wchar.in.h: Update.
3942         * gnulib/import/wctype.in.h: Update.
3943         * gnulib/import/xalloc-oversized.h: Update.
3944         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3945         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3946
3947 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3948
3949         * record-btrace.c (get_thread_current_frame): Remove
3950         old_inferior_ptid.
3951
3952 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3953
3954         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3955         with check_tag to 1 if and only if the type is tagged and the
3956         component being searched cannot been found in the current
3957         view. Otherwise, always call ada_to_fixed_type with
3958         check_tag to 0.
3959
3960 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3961
3962         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3963         declaration.
3964         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3965         * ada-varobj.c (ada_varobj_get_number_of_children,
3966         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3967
3968 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3969
3970         * ada-valprint.c (ada_value_print): Use type instead of
3971         enclosing type.
3972
3973 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3974
3975         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3976         an array of access to unconstrained array.
3977
3978 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3979
3980         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3981         (ada_check_typedef): Use it.
3982
3983 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3984
3985         * ada-varobj.c (ada_varobj_describe_struct_child)
3986         (ada_varobj_describe_child): Handle union case like struct one.
3987
3988 2018-09-10  Tom Tromey  <tom@tromey.com>
3989
3990         PR python/18380:
3991         * python/python.c (_initialize_python): Make example in "python"
3992         help work in Python 3.
3993
3994 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3995
3996         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3997         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3998         $(EXEEXT) to the script, as it is not a program.
3999
4000 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4001
4002         * python/py-prettyprint.c (pretty_print_one_value): Return
4003         gdbpy_ref<>.
4004         (print_string_repr): Adjust.
4005         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
4006         * python/python-internal.h (apply_varobj_pretty_printer): Return
4007         gdbpy_ref<>.
4008         * varobj.c (varobj_value_get_print_value): Adjust.
4009
4010 2018-09-08  Tom Tromey  <tom@tromey.com>
4011
4012         PR python/16047:
4013         * python/py-prettyprint.c (pretty_print_one_value): Check for
4014         to_string method.
4015
4016 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4017
4018         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4019         replace_operator_with_call.
4020
4021 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4022
4023         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4024
4025 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4026
4027         * ada-typeprint.c (print_range): Print the bounds using TYPE
4028         rather than its TYPE_TARGET_TYPE.
4029
4030 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4031
4032         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4033         call to ada_to_fixed_value_create.
4034
4035 2018-09-08  Jerome Guitton  <guitton@adacore.com>
4036
4037         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4038
4039 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4040
4041         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4042         by calls to error.
4043
4044 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4045
4046         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4047         Move update of loop variable "fi".
4048
4049 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4050
4051         * ada-lang.c (value_assign_to_component): In the case of
4052         big-endian targets, extract the bits of the given VAL
4053         using an src_offset of zero if container is not a scalar.
4054
4055 2018-09-06  Simon Ser  <contact@emersion.fr>
4056
4057         PR gdb/23105
4058         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4059         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4060         * fbsd-tdep.c (fbsd_make_note_desc): New.
4061         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4062         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4063         * target.h (enum target_object) Add FreeBSD-specific
4064         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4065
4066 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4067
4068         * compile/compile-c.h (generate_c_for_variable_locations):
4069         Change reference to pointer.
4070         * compile/compile-c-support.c (compile_program) <compute>:
4071         Likewise.
4072         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4073         (generate_c_for_for_one_variable): Likewise
4074         (generate_c_for_variable_locations): Likewise
4075         * compile/compile-c-types.c (compile_c_instance::convert_type):
4076         Likewise
4077         * compile/compile-cplus-symbols.c (convert_one_symbol):
4078         std::move the scope passed to enter_scope.
4079         * compile/compile-cplus-types.c
4080         (compile_cplus_instance::enter_scope): Make parameter
4081         rvalue-reference.
4082         (compile_cplus_instance::new_scope): Change reference to
4083         pointer.
4084         (compile_cplus_instance::convert_type): Likewise
4085         (compile_cplus_convert_typedef): std::move the scope passed to
4086         enter_scope.
4087         (compile_cplus_convert_struct_or_union): Likewise.
4088         (compile_cplus_convert_enum): Likewise.
4089         (compile_cplus_convert_namespace): Likewise.
4090         * compile/compile-cplus.h (compile_cplus_instance)
4091         <enter_scope>: Make parameter rvalue-reference.
4092         * compile/compile-internal.h (compile_instance)
4093         <get_cached_type>: Likewise
4094         * compile/compile-loc2c.c (push): Likewise
4095         (pushf): Likewise
4096         (unary): Likewise
4097         (binary): Likewise
4098         (print_label): Likewise
4099         (pushf_register_address): Likewise
4100         (pushf_register): Likewise
4101         (do_compile_dwarf_expr_to_c): Likewise
4102         (compile_dwarf_expr_to_c): Likewise
4103         (compile_dwarf_bounds_to_c): Likewise
4104         * compile/compile.c (compile_instance::get_cached_type):
4105         Likewise
4106         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4107         (compile_dwarf_bounds_to_c): Likewise
4108         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4109         (dwarf2_compile_property_to_c): Likewise
4110         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4111         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4112         Likewise
4113
4114 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4115
4116         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4117         * tui/tui-data.c (init_content_element): Don't initialize it.
4118
4119 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4120
4121         * tui/tui-data.h (struct tui_win_info)
4122         <detail::opaque>: Remove.
4123         * tui/tui-data.c (init_win_info): Remove assignment.
4124
4125 2018-09-05  Tom Tromey  <tom@tromey.com>
4126
4127         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4128         -Wformat-nonliteral.
4129         * target-float.c (host_float_ops<T>::to_string)
4130         (host_float_ops<T>::from_string): Use
4131         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4132         * configure: Rebuild.
4133
4134 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4135
4136         * printcmd.c (printf_c_string): Use
4137         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4138         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4139
4140 2018-09-05  Tom Tromey  <tom@tromey.com>
4141
4142         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4143
4144 2018-09-05  Tom de Vries  <tdevries@suse.de>
4145
4146         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4147         with resolve_abstract_p == true.
4148         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4149         defaulting to false. Propagate resolve_abstract_p to
4150         dwarf2_fetch_die_loc_sect_off.
4151         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4152         parameter, defaulting to false.
4153         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4154         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4155         parameter.
4156         * dwarf2read.h (struct die_info): Forward-declare.
4157         (die_info_ptr): New typedef.
4158         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4159
4160 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
4161
4162         GDB 8.2 released.
4163
4164 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4165             Pedro Alves  <palves@redhat.com>
4166
4167         * gnulib/Makefile.in (aclocal_m4_deps): Move to
4168         "aclocal-m4-deps.mk".  Include file here.
4169         $(srcdir)/aclocal.m4: Add "configure.ac".
4170         * gnulib/aclocal-m4-deps.mk: New file.
4171         * gnulib/update-gnulib.sh: Automatically update
4172         "aclocal-m4-deps.mk".
4173
4174 2018-09-04  Tom Tromey  <tom@tromey.com>
4175
4176         * configure: Rebuild.
4177         * configure.ac: Remove multi-ice code.
4178
4179 2018-09-04  Tom Tromey  <tom@tromey.com>
4180
4181         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4182         (ada-exp.o): Update.
4183
4184 2018-09-04  Tom Tromey  <tom@tromey.com>
4185
4186         * Makefile.in (printcmd.o, target-float.o): Remove.
4187         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4188
4189 2018-09-04  Tom Tromey  <tom@tromey.com>
4190
4191         * gnulib/Makefile.in: Remove obsolete comment.
4192         * Makefile.in: Remove obsolete comment.
4193
4194 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
4195
4196         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4197         line with '+'.
4198
4199 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4200
4201         * riscv-tdep.c: Add 'prologue-value.h' include.
4202         (struct riscv_unwind_cache): New struct.
4203         (riscv_debug_unwinder): New global.
4204         (riscv_scan_prologue): Update arguments, capture register details
4205         from prologue scan.
4206         (riscv_skip_prologue): Reformat arguments line, move end of
4207         prologue calculation into riscv_scan_prologue.
4208         (riscv_frame_cache): Update return type, create
4209         riscv_unwind_cache, scan the prologue, and fill in remaining cache
4210         details.
4211         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4212         (riscv_frame_prev_register): Use the trad_frame within the
4213         riscv_unwind_cache.
4214         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4215         flag.
4216
4217 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4218
4219         * trad-frame.h (trad_frame_set_realreg): Declare.
4220         (trad_frame_set_addr): Declare.
4221         * trad-frame.c (trad_frame_set_realreg): Define new function.
4222         (trad_frame_set_addr): Define new function.
4223         (trad_frame_set_reg_realreg): Use new function.
4224         (trad_frame_set_reg_addr): Use new function.
4225
4226 2018-09-01  Keith Seitz  <keiths@redhat.com>
4227
4228         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4229         pulongest instead of "%lld".
4230         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4231         ATTRIBUTE_UNUSED.
4232
4233 2018-08-31  Tom Tromey  <tom@tromey.com>
4234
4235         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4236         variant part type.
4237
4238 2018-08-31  Pedro Alves  <palves@redhat.com>
4239
4240         * gdbarch.h: Regenerate.
4241
4242 2018-08-31  Pedro Alves  <palves@redhat.com>
4243
4244         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4245         * target.h (Hardware watchpoint interfaces): Describe
4246         continuable/steppable/non-steppable watchpoints.
4247         * gdbarch.h, gdbarch.c: Regenerate.
4248
4249 2018-08-31  Pedro Alves  <palves@redhat.com>
4250
4251         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4252         Delete.
4253         * s390-linux-nat.c
4254         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4255         * target.h (target_ops::have_continuable_watchpoint): Delete.
4256         (target_have_continuable_watchpoint): Delete.
4257         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4258         * target-delegates.c: Regenerate.
4259
4260 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4261
4262         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4263         the files present in "gnulib/import/m4/".
4264
4265 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4266
4267         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4268         c.sw, c.swsp, and c.sdsp.
4269
4270 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4271
4272         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4273         (riscv_read_misa_reg): Don't cache value read into inferior data.
4274         (riscv_new_inferior_data): Delete.
4275         (riscv_inferior_data_cleanup): Delete.
4276         (riscv_inferior_data): Delete.
4277         (riscv_invalidate_inferior_data): Delete.
4278         (_initialize_riscv_tdep): Remove initialisation of inferior data.
4279
4280 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
4281
4282         * compile/compile-cplus-types.c
4283         (compile_cplus_instance::leave_scope): Take the address of scope
4284         object.
4285         (compile_cplus_instance::convert_qualified_base): Compare quals
4286         to 0.
4287
4288 2018-08-30  Keith Seitz  <keiths@redhat.com>
4289
4290         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4291         Use "%s" and host_address_to_string instead of "%p" in printf.
4292
4293 2018-08-29  Keith Seitz  <keiths@redhat.com>
4294
4295         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4296         and compile-cplus-types.c.
4297         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4298         * c-lang.c (cplus_language_defn): Set C++ compile functions.
4299         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4300         Declare.
4301         * compile/compile-c-support.c: Include compile-cplus.h.
4302         (load_libcompile): Templatize.
4303         (get_compile_context): "New" function.
4304         (c_get_compile_context): Use get_compile_context.
4305         (cplus_get_compile_context): New function.
4306         (cplus_push_user_expression, cplus_pop_user_expression)
4307         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4308         (cplus_compute_program): Define new structs/functions.
4309         * compile/compile-cplus-symmbols.c: New file.
4310         * compile/compile-cplus-types.c: New file.
4311         * compile/compile-cplus.h: New file.
4312         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4313         Declare.
4314         * compile/compile-object-load.c (get_out_value_type): Use
4315         strncmp_iw when comparing symbol names.
4316         (compile_object_load): Add mst_bss and mst_data.
4317         * compile/compile.c (_initialize_compile): Remove
4318         -Wno-implicit-function-declaration from `compile_args'.
4319         * compile/gcc-cp-plugin.h: New file.
4320         * NEWS: Mention C++ compile support and new debug options.
4321
4322 2018-08-29  Keith Seitz  <keiths@redhat.com>
4323
4324         * linespec.c (collect_info::add_symbol): Make virtual.
4325         (struct symbol_searcher_collect_info): New struct.
4326         (symbol_searcher::find_all_symbols): New method.
4327         * symtab.h (class symbol_searcher): New class.
4328
4329 2018-08-29  Keith Seitz  <keiths@redhat.com>
4330
4331         * linespec.c (struct linespec) <function_symbols, label_symbols>:
4332         Change to vector of block_symbol.  Update all users.
4333         (struct collect_info) <symbols>: Likewise.
4334         (collect_info::add_symbol): Take block_symbol as argument.
4335         Update all callers.
4336         (decode_compound_collector) <m_symbols>: Change type to vector
4337         of block_symbol.  Update all users.
4338         (decode_compound_collector::operator ()): Change parameter type
4339         to block_symbol.
4340         (find_method, find_function_symbols, find_linespec_symbols)
4341         (find_label_symbols_in_block, find_label_symbols): Change symbol
4342         vectors to block_symbol vectors.
4343         * symtab.h (symbol_found_callback_ftype): Change parameter type to
4344         block_symbol.
4345
4346 2018-08-29  Keith Seitz  <keiths@redhat.com>
4347
4348         * linespec.c (symbolp): Remove typedef and VEC definitions.
4349         (bound_minimal_symbol_d): Likewise.
4350
4351 2018-08-29  Keith Seitz  <keiths@redhat.com>
4352
4353         * linespec.c (decode_compound_collector::decode_compound_collector):
4354         Remove initialization for `m_symtabs'.
4355         (decode_compound_collector::release_symbols): Change return type
4356         to std::vector.  Update all callers.
4357         (class decode_compound_collector) <m_symbols>: Change type to
4358         std::vector.
4359         (lookup_prefix_sym): Change return type to std::vector.  Update all
4360         callers.
4361         (compare_symbols): Remove.
4362         (std_compare_symbols): Rename to `compare_symbols'.
4363         (find_method): Change `sym_classes' parameter to std::vector.
4364         Update all callers.  Use std::sort to sort sym_classes.
4365         (find_linespec_symbols): Remove cleanup.
4366
4367 2018-08-29  Keith Seitz  <keiths@redhat.com>
4368
4369         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4370         std::vector.  Update all users.
4371         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4372         (struct collect_info) <minimal_symbols>: Likewise.
4373         (compare_msymbols): Return bool.  Change parameters to const
4374         bound_minimal_symbol references.
4375         (find_method, find_function_symbols, find_linespec_symbols): Change
4376         `minsyms' parameter to std::vector.  Update all callers.
4377
4378 2018-08-29  Keith Seitz  <keiths@redhat.com>
4379
4380         * linespec.c (struct linespec) <label_symbols>: Change type to
4381         std::vector.  Update all users.
4382         (find_label_symbols_in_block): Change `result' parameter to
4383         std::vector.  Update all callers.
4384         (find_label_symbols): Return std::vector.  Update all callers.
4385
4386 2018-08-29  Keith Seitz  <keiths@redhat.com>
4387
4388         * linespec.c (struct linespec) <function_symbols>: Change type to
4389         std::vector.  Update all users.
4390         (struct collect_info) <function_symbols>: Likewise.
4391         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4392         (std_compare_symbols): New function.
4393         (find_method, find_function_symbols, find_linespec_symbols)
4394         (find_label_symbols_in_block): Change `symbols' parameter to
4395         std::vector.  Update all callers.
4396         (find_label_symbols): Likewise for `function_symbols' and
4397         `label_funcs_ret'.
4398
4399 2018-08-29  Keith Seitz  <keiths@redhat.com>
4400
4401         * linespec.c (symtab_vector_up): Define.
4402         (struct linespec) <file_symtabs>: Change type to std::vector *.
4403         Update all uses.
4404         (struct collect_info) <file_symtabs>: Likewise.
4405         (collect_symtabs_from_filename): Return symtab_vector_up.
4406         Update all callers.
4407         (decode_objc): Remove cleanup.
4408         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4409         (symtab_collector::release_symtabs): Return symtab_vector_up.
4410         Update all callers.
4411         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4412         Update all users.
4413         (collect_symtabs_from_filename, symtabs_from_filename): Return
4414         symtab_vector_up.  Update all callers.
4415
4416 2018-08-29  Tom Tromey  <tom@tromey.com>
4417
4418         * csky-tdep.c (csky_analyze_prologue): Use
4419         core_addr_to_string_nz.
4420
4421 2018-08-29  Tom Tromey  <tom@tromey.com>
4422
4423         * windows-nat.c (struct xlate_exception) <them>: Change type to
4424         DWORD.
4425         (xlate): Fix formatting.  Remove last entry.
4426         (struct xlate_exception, xlate): Comment out.
4427         (windows_nat_target::resume): Use ranged for.
4428
4429 2018-08-29  Jim Wilson  <jimw@sifive.com>
4430
4431         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4432         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4433         of NT_PRFPREG.
4434         (riscv_linux_nat_target::store_registers): Likewise.
4435
4436 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4437
4438         PR gdb/23555
4439         PR gdb/23558
4440         * gnulib/aclocal.m4: Regenerate.
4441         * gnulib/config.in: Regenerate.
4442         * gnulib/configure: Regenerate.
4443         * gnulib/import/Makefile.am: Update.
4444         * gnulib/import/Makefile.in: Update.
4445         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4446         * gnulib/import/_Noreturn.h: ... this.
4447         * gnulib/import/alloca.in.h: Update.
4448         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4449         * gnulib/import/arg-nonnull.h: ... this.
4450         * gnulib/import/assure.h: Update.
4451         * gnulib/import/at-func.c: Update.
4452         * gnulib/import/basename-lgpl.c: Update.
4453         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4454         * gnulib/import/c++defs.h: ... this.
4455         * gnulib/import/canonicalize-lgpl.c: Update.
4456         * gnulib/import/cdefs.h: Update.
4457         * gnulib/import/chdir-long.c: Update.
4458         * gnulib/import/chdir-long.h: Update.
4459         * gnulib/import/cloexec.c: Update.
4460         * gnulib/import/cloexec.h: Update.
4461         * gnulib/import/close.c: Update.
4462         * gnulib/import/closedir.c: Update.
4463         * gnulib/import/config.charset: Update.
4464         * gnulib/import/dirent-private.h: Update.
4465         * gnulib/import/dirent.in.h: Update.
4466         * gnulib/import/dirfd.c: Update.
4467         * gnulib/import/dirname-lgpl.c: Update.
4468         * gnulib/import/dirname.h: Update.
4469         * gnulib/import/dosname.h: Update.
4470         * gnulib/import/dup-safer-flag.c: Update.
4471         * gnulib/import/dup-safer.c: Update.
4472         * gnulib/import/dup.c: Update.
4473         * gnulib/import/dup2.c: Update.
4474         * gnulib/import/errno.in.h: Update.
4475         * gnulib/import/error.c: Update.
4476         * gnulib/import/error.h: Update.
4477         * gnulib/import/exitfail.c: Update.
4478         * gnulib/import/exitfail.h: Update.
4479         * gnulib/import/extra/update-copyright: Update.
4480         * gnulib/import/fchdir.c: Update.
4481         * gnulib/import/fcntl.c: Update.
4482         * gnulib/import/fcntl.in.h: Update.
4483         * gnulib/import/fd-hook.c: Update.
4484         * gnulib/import/fd-hook.h: Update.
4485         * gnulib/import/fd-safer-flag.c: Update.
4486         * gnulib/import/fd-safer.c: Update.
4487         * gnulib/import/fdopendir.c: Update.
4488         * gnulib/import/filename.h: Update.
4489         * gnulib/import/filenamecat-lgpl.c: Update.
4490         * gnulib/import/filenamecat.h: Update.
4491         * gnulib/import/flexmember.h: Update.
4492         * gnulib/import/float+.h: Update.
4493         * gnulib/import/float.c: Update.
4494         * gnulib/import/float.in.h: Update.
4495         * gnulib/import/fnmatch.c: Update.
4496         * gnulib/import/fnmatch.in.h: Update.
4497         * gnulib/import/fnmatch_loop.c: Update.
4498         * gnulib/import/fpucw.h: Update.
4499         * gnulib/import/frexp.c: Update.
4500         * gnulib/import/frexpl.c: Update.
4501         * gnulib/import/fstat.c: Update.
4502         * gnulib/import/fstatat.c: Update.
4503         * gnulib/import/getcwd-lgpl.c: Update.
4504         * gnulib/import/getcwd.c: Update.
4505         * gnulib/import/getdtablesize.c: Update.
4506         * gnulib/import/getlogin_r.c: Update.
4507         * gnulib/import/getprogname.c: Update.
4508         * gnulib/import/getprogname.h: Update.
4509         * gnulib/import/gettext.h: Update.
4510         * gnulib/import/gettimeofday.c: Update.
4511         * gnulib/import/glob-libc.h: Update.
4512         * gnulib/import/glob.c: Update.
4513         * gnulib/import/glob.in.h: Update.
4514         * gnulib/import/glob_internal.h: Update.
4515         * gnulib/import/glob_pattern_p.c: Update.
4516         * gnulib/import/globfree.c: Update.
4517         * gnulib/import/hard-locale.c: Update.
4518         * gnulib/import/hard-locale.h: Update.
4519         * gnulib/import/intprops.h: Update.
4520         * gnulib/import/inttypes.in.h: Update.
4521         * gnulib/import/isnan.c: Update.
4522         * gnulib/import/isnand-nolibm.h: Update.
4523         * gnulib/import/isnand.c: Update.
4524         * gnulib/import/isnanl-nolibm.h: Update.
4525         * gnulib/import/isnanl.c: Update.
4526         * gnulib/import/itold.c: Update.
4527         * gnulib/import/libc-config.h: Update.
4528         * gnulib/import/limits.in.h: Update.
4529         * gnulib/import/localcharset.c: Update.
4530         * gnulib/import/localcharset.h: Update.
4531         * gnulib/import/localtime-buffer.c: Update.
4532         * gnulib/import/localtime-buffer.h: Update.
4533         * gnulib/import/lstat.c: Update.
4534         * gnulib/import/m4/00gnulib.m4: Update.
4535         * gnulib/import/m4/__inline.m4: Update.
4536         * gnulib/import/m4/absolute-header.m4: Update.
4537         * gnulib/import/m4/alloca.m4: Update.
4538         * gnulib/import/m4/builtin-expect.m4: Update.
4539         * gnulib/import/m4/canonicalize.m4: Update.
4540         * gnulib/import/m4/chdir-long.m4: Update.
4541         * gnulib/import/m4/close.m4: Update.
4542         * gnulib/import/m4/closedir.m4: Update.
4543         * gnulib/import/m4/configmake.m4: Update.
4544         * gnulib/import/m4/d-ino.m4: Update.
4545         * gnulib/import/m4/d-type.m4: Update.
4546         * gnulib/import/m4/dirent_h.m4: Update.
4547         * gnulib/import/m4/dirfd.m4: Update.
4548         * gnulib/import/m4/dirname.m4: Update.
4549         * gnulib/import/m4/double-slash-root.m4: Update.
4550         * gnulib/import/m4/dup.m4: Update.
4551         * gnulib/import/m4/dup2.m4: Update.
4552         * gnulib/import/m4/eealloc.m4: Update.
4553         * gnulib/import/m4/environ.m4: Update.
4554         * gnulib/import/m4/errno_h.m4: Update.
4555         * gnulib/import/m4/error.m4: Update.
4556         * gnulib/import/m4/exponentd.m4: Update.
4557         * gnulib/import/m4/exponentl.m4: Update.
4558         * gnulib/import/m4/extensions.m4: Update.
4559         * gnulib/import/m4/extern-inline.m4: Update.
4560         * gnulib/import/m4/fchdir.m4: Update.
4561         * gnulib/import/m4/fcntl-o.m4: Update.
4562         * gnulib/import/m4/fcntl.m4: Update.
4563         * gnulib/import/m4/fcntl_h.m4: Update.
4564         * gnulib/import/m4/fdopendir.m4: Update.
4565         * gnulib/import/m4/filenamecat.m4: Update.
4566         * gnulib/import/m4/flexmember.m4: Update.
4567         * gnulib/import/m4/float_h.m4: Update.
4568         * gnulib/import/m4/fnmatch.m4: Update.
4569         * gnulib/import/m4/fnmatch_h.m4: Update.
4570         * gnulib/import/m4/fpieee.m4: Update.
4571         * gnulib/import/m4/frexp.m4: Update.
4572         * gnulib/import/m4/frexpl.m4: Update.
4573         * gnulib/import/m4/fstat.m4: Update.
4574         * gnulib/import/m4/fstatat.m4: Update.
4575         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4576         * gnulib/import/m4/getcwd-path-max.m4: Update.
4577         * gnulib/import/m4/getcwd.m4: Update.
4578         * gnulib/import/m4/getdtablesize.m4: Update.
4579         * gnulib/import/m4/getlogin.m4: Update.
4580         * gnulib/import/m4/getlogin_r.m4: Update.
4581         * gnulib/import/m4/getpagesize.m4: Update.
4582         * gnulib/import/m4/getprogname.m4: Update.
4583         * gnulib/import/m4/gettimeofday.m4: Update.
4584         * gnulib/import/m4/glibc21.m4: Update.
4585         * gnulib/import/m4/glob.m4: Update.
4586         * gnulib/import/m4/glob_h.m4: Update.
4587         * gnulib/import/m4/gnulib-cache.m4: Update.
4588         * gnulib/import/m4/gnulib-common.m4: Update.
4589         * gnulib/import/m4/gnulib-comp.m4: Update.
4590         * gnulib/import/m4/gnulib-tool.m4: Update.
4591         * gnulib/import/m4/hard-locale.m4: Update.
4592         * gnulib/import/m4/include_next.m4: Update.
4593         * gnulib/import/m4/inttypes-pri.m4: Update.
4594         * gnulib/import/m4/inttypes.m4: Update.
4595         * gnulib/import/m4/isnand.m4: Update.
4596         * gnulib/import/m4/isnanl.m4: Update.
4597         * gnulib/import/m4/largefile.m4: Update.
4598         * gnulib/import/m4/limits-h.m4: Update.
4599         * gnulib/import/m4/localcharset.m4: Update.
4600         * gnulib/import/m4/locale-fr.m4: Update.
4601         * gnulib/import/m4/locale-ja.m4: Update.
4602         * gnulib/import/m4/locale-zh.m4: Update.
4603         * gnulib/import/m4/localtime-buffer.m4: Update.
4604         * gnulib/import/m4/longlong.m4: Update.
4605         * gnulib/import/m4/lstat.m4: Update.
4606         * gnulib/import/m4/malloc.m4: Update.
4607         * gnulib/import/m4/malloca.m4: Update.
4608         * gnulib/import/m4/math_h.m4: Update.
4609         * gnulib/import/m4/mbrtowc.m4: Update.
4610         * gnulib/import/m4/mbsinit.m4: Update.
4611         * gnulib/import/m4/mbsrtowcs.m4: Update.
4612         * gnulib/import/m4/mbstate_t.m4: Update.
4613         * gnulib/import/m4/memchr.m4: Update.
4614         * gnulib/import/m4/memmem.m4: Update.
4615         * gnulib/import/m4/mempcpy.m4: Update.
4616         * gnulib/import/m4/memrchr.m4: Update.
4617         * gnulib/import/m4/mkdir.m4: Update.
4618         * gnulib/import/m4/mkstemp.m4: Update.
4619         * gnulib/import/m4/mmap-anon.m4: Update.
4620         * gnulib/import/m4/mode_t.m4: Update.
4621         * gnulib/import/m4/msvc-inval.m4: Update.
4622         * gnulib/import/m4/msvc-nothrow.m4: Update.
4623         * gnulib/import/m4/multiarch.m4: Update.
4624         * gnulib/import/m4/nocrash.m4: Update.
4625         * gnulib/import/m4/off_t.m4: Update.
4626         * gnulib/import/m4/onceonly.m4: Update.
4627         * gnulib/import/m4/open-cloexec.m4: Update.
4628         * gnulib/import/m4/open.m4: Update.
4629         * gnulib/import/m4/openat.m4: Update.
4630         * gnulib/import/m4/opendir.m4: Update.
4631         * gnulib/import/m4/pathmax.m4: Update.
4632         * gnulib/import/m4/rawmemchr.m4: Update.
4633         * gnulib/import/m4/readdir.m4: Update.
4634         * gnulib/import/m4/readlink.m4: Update.
4635         * gnulib/import/m4/realloc.m4: Update.
4636         * gnulib/import/m4/rename.m4: Update.
4637         * gnulib/import/m4/rewinddir.m4: Update.
4638         * gnulib/import/m4/rmdir.m4: Update.
4639         * gnulib/import/m4/save-cwd.m4: Update.
4640         * gnulib/import/m4/secure_getenv.m4: Update.
4641         * gnulib/import/m4/setenv.m4: Update.
4642         * gnulib/import/m4/signal_h.m4: Update.
4643         * gnulib/import/m4/ssize_t.m4: Update.
4644         * gnulib/import/m4/stat-time.m4: Update.
4645         * gnulib/import/m4/stat.m4: Update.
4646         * gnulib/import/m4/std-gnu11.m4: Update.
4647         * gnulib/import/m4/stdbool.m4: Update.
4648         * gnulib/import/m4/stddef_h.m4: Update.
4649         * gnulib/import/m4/stdint.m4: Update.
4650         * gnulib/import/m4/stdio_h.m4: Update.
4651         * gnulib/import/m4/stdlib_h.m4: Update.
4652         * gnulib/import/m4/strchrnul.m4: Update.
4653         * gnulib/import/m4/strdup.m4: Update.
4654         * gnulib/import/m4/strerror.m4: Update.
4655         * gnulib/import/m4/string_h.m4: Update.
4656         * gnulib/import/m4/strstr.m4: Update.
4657         * gnulib/import/m4/strtok_r.m4: Update.
4658         * gnulib/import/m4/sys_socket_h.m4: Update.
4659         * gnulib/import/m4/sys_stat_h.m4: Update.
4660         * gnulib/import/m4/sys_time_h.m4: Update.
4661         * gnulib/import/m4/sys_types_h.m4: Update.
4662         * gnulib/import/m4/tempname.m4: Update.
4663         * gnulib/import/m4/time_h.m4: Update.
4664         * gnulib/import/m4/unistd-safer.m4: Update.
4665         * gnulib/import/m4/unistd_h.m4: Update.
4666         * gnulib/import/m4/warn-on-use.m4: Update.
4667         * gnulib/import/m4/wchar_h.m4: Update.
4668         * gnulib/import/m4/wchar_t.m4: Update.
4669         * gnulib/import/m4/wctype_h.m4: Update.
4670         * gnulib/import/m4/wint_t.m4: Update.
4671         * gnulib/import/malloc.c: Update.
4672         * gnulib/import/malloc/scratch_buffer.h: Update.
4673         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4674         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4675         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4676         * gnulib/import/malloca.c: Update.
4677         * gnulib/import/malloca.h: Update.
4678         * gnulib/import/malloca.valgrind: Update.
4679         * gnulib/import/math.in.h: Update.
4680         * gnulib/import/mbrtowc.c: Update.
4681         * gnulib/import/mbsinit.c: Update.
4682         * gnulib/import/mbsrtowcs-impl.h: Update.
4683         * gnulib/import/mbsrtowcs-state.c: Update.
4684         * gnulib/import/mbsrtowcs.c: Update.
4685         * gnulib/import/memchr.c: Update.
4686         * gnulib/import/memmem.c: Update.
4687         * gnulib/import/mempcpy.c: Update.
4688         * gnulib/import/memrchr.c: Update.
4689         * gnulib/import/mkdir.c: Update.
4690         * gnulib/import/mkstemp.c: Update.
4691         * gnulib/import/msvc-inval.c: Update.
4692         * gnulib/import/msvc-inval.h: Update.
4693         * gnulib/import/msvc-nothrow.c: Update.
4694         * gnulib/import/msvc-nothrow.h: Update.
4695         * gnulib/import/open.c: Update.
4696         * gnulib/import/openat-die.c: Update.
4697         * gnulib/import/openat-priv.h: Update.
4698         * gnulib/import/openat-proc.c: Update.
4699         * gnulib/import/openat.c: Update.
4700         * gnulib/import/openat.h: Update.
4701         * gnulib/import/opendir.c: Update.
4702         * gnulib/import/pathmax.h: Update.
4703         * gnulib/import/pipe-safer.c: Update.
4704         * gnulib/import/rawmemchr.c: Update.
4705         * gnulib/import/readdir.c: Update.
4706         * gnulib/import/readlink.c: Update.
4707         * gnulib/import/realloc.c: Update.
4708         * gnulib/import/ref-add.sin: Update.
4709         * gnulib/import/ref-del.sin: Update.
4710         * gnulib/import/rename.c: Update.
4711         * gnulib/import/rewinddir.c: Update.
4712         * gnulib/import/rmdir.c: Update.
4713         * gnulib/import/same-inode.h: Update.
4714         * gnulib/import/save-cwd.c: Update.
4715         * gnulib/import/save-cwd.h: Update.
4716         * gnulib/import/scratch_buffer.h: Update.
4717         * gnulib/import/secure_getenv.c: Update.
4718         * gnulib/import/setenv.c: Update.
4719         * gnulib/import/signal.in.h: Update.
4720         * gnulib/import/stat-time.c: Update.
4721         * gnulib/import/stat-time.h: Update.
4722         * gnulib/import/stat-w32.c: Update.
4723         * gnulib/import/stat-w32.h: Update.
4724         * gnulib/import/stat.c: Update.
4725         * gnulib/import/stdbool.in.h: Update.
4726         * gnulib/import/stddef.in.h: Update.
4727         * gnulib/import/stdint.in.h: Update.
4728         * gnulib/import/stdio.in.h: Update.
4729         * gnulib/import/stdlib.in.h: Update.
4730         * gnulib/import/str-two-way.h: Update.
4731         * gnulib/import/strchrnul.c: Update.
4732         * gnulib/import/strdup.c: Update.
4733         * gnulib/import/streq.h: Update.
4734         * gnulib/import/strerror-override.c: Update.
4735         * gnulib/import/strerror-override.h: Update.
4736         * gnulib/import/strerror.c: Update.
4737         * gnulib/import/string.in.h: Update.
4738         * gnulib/import/stripslash.c: Update.
4739         * gnulib/import/strnlen1.c: Update.
4740         * gnulib/import/strnlen1.h: Update.
4741         * gnulib/import/strstr.c: Update.
4742         * gnulib/import/strtok_r.c: Update.
4743         * gnulib/import/sys_stat.in.h: Update.
4744         * gnulib/import/sys_time.in.h: Update.
4745         * gnulib/import/sys_types.in.h: Update.
4746         * gnulib/import/tempname.c: Update.
4747         * gnulib/import/tempname.h: Update.
4748         * gnulib/import/time.in.h: Update.
4749         * gnulib/import/unistd--.h: Update.
4750         * gnulib/import/unistd-safer.h: Update.
4751         * gnulib/import/unistd.in.h: Update.
4752         * gnulib/import/unsetenv.c: Update.
4753         * gnulib/import/verify.h: Update.
4754         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4755         * gnulib/import/wchar.in.h: Update.
4756         * gnulib/import/wctype.in.h: Update.
4757         * gnulib/import/xalloc-oversized.h: Update.
4758         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4759         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4760
4761 2018-08-16  Gary Benson <gbenson@redhat.com>
4762
4763         PR gdb/13000:
4764         * gdb/main.c (captured_main_1): Exit with nonzero status
4765         in batch mode if the last command to be executed failed.
4766         * NEWS: Mention the above.
4767
4768 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4769
4770         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4771         end of warning message.
4772
4773 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4774
4775         PR gdb/22943:
4776         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4777         (aarch64_extract_return_value): Use
4778         aapcs_is_vfp_call_or_return_candidate.
4779         (aarch64_return_in_memory): Likewise.
4780         (aarch64_store_return_value): Likewise.
4781
4782 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4783
4784         * aarch64-tdep.c
4785         (aapcs_is_vfp_call_or_return_candidate): Make static
4786         (pass_in_v_or_stack): Remove function.
4787         (pass_in_v_vfp_candidate): New function.
4788         (aarch64_push_dummy_call): Check for float register candidates.
4789
4790 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4791
4792         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4793         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4794         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4795
4796 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4797
4798         PR build/23399
4799         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4800         (struct ipa_sym_addresses): Rename to...
4801         (struct ipa_sym_addresses_common): ... this.
4802         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4803
4804 2018-08-28  Tom Tromey  <tom@tromey.com>
4805
4806         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4807         (token_fifo): Now a std::vector.
4808         (yylex, c_parse): Update.
4809         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4810         (token_fifo): Now a std::vector.
4811         (yylex, d_parse): Update.
4812         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4813         (token_fifo): Now a std::vector.
4814         (yylex, go_parse): Update.
4815
4816 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4817
4818         * parser-defs.h (struct type_stack) <elements>: Change type to
4819         std::vector<union type_stack_elt>.
4820         <depth, size>: Remove.
4821         * parse.c (parse_exp_in_context_1): Adjust.
4822         (type_stack_reserve): Remove.
4823         (check_type_stack_depth): Remove.
4824         (insert_into_type_stack): Adjust to std::vector.
4825         (insert_type): Likewise.
4826         (push_type): Likewise.
4827         (push_type_int): Likewise.
4828         (insert_type_address_space): Likewise.
4829         (pop_type): Likewise.
4830         (pop_type_int): Likewise.
4831         (pop_typelist): Likewise.
4832         (pop_type_stack): Likewise.
4833         (append_type_stack): Likewise.
4834         (push_type_stack): Likewise.
4835         (get_type_stack): Likewise.
4836         (type_stack_cleanup): Likewise.
4837         (push_typelist): Likewise.
4838         (follow_types): Likewise.
4839         (_initialize_parse): Likewise.
4840
4841 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4842
4843         * NEWS: Mention csky target.
4844
4845 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4846             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4847             Don Breazeal  <donb@codesourcery.com>
4848
4849         * csky-linux-tdep.c: New file.
4850         * csky-tdep.c: Likewise.
4851         * csky-tdep.h: Likewise.
4852         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4853         csky-tdep.o.
4854         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4855         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4856         * configure.tgt: Add csky support.
4857
4858 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4859
4860         * python/py-framefilter.c (py_print_frame): Print frame architecture
4861         when printing on an MI output.
4862
4863 2018-08-27  Tom Tromey  <tom@tromey.com>
4864
4865         PR build/23087:
4866         * configure: Rebuild.
4867         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4868
4869 2018-08-27  Tom Tromey  <tom@tromey.com>
4870
4871         * aarch64-linux-tdep.c
4872         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4873         casts to int.
4874
4875 2018-08-27  Tom Tromey  <tom@tromey.com>
4876
4877         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4878         unsigned.
4879         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4880         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4881         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4882         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4883         unsigned.
4884
4885 2018-08-27  Tom Tromey  <tom@tromey.com>
4886
4887         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4888         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4889
4890 2018-08-27  Tom Tromey  <tom@tromey.com>
4891
4892         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4893         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4894         ULONGEST_MAX.
4895         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4896         ULONGEST_MAX.
4897         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4898         ULONGEST_MAX.
4899         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4900         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4901         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4902         ULONGEST_MAX.
4903         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4904         (ppc64_linux_sigaction_tramp_frame)
4905         (ppc32_linux_sighandler_tramp_frame)
4906         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4907         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4908         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4909         * mn10300-linux-tdep.c (am33_linux_sigframe)
4910         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4911         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4912         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4913         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4914         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4915         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4916         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4917         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4918         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4919         * microblaze-linux-tdep.c
4920         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4921         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4922         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4923         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4924         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4925         * common/common-types.h (ULONGEST_MAX): New define.
4926         (CORE_ADDR_MAX): Fix formatting.
4927         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4928         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4929         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4930         (arm_linux_rt_sigreturn_tramp_frame)
4931         (arm_eabi_linux_sigreturn_tramp_frame)
4932         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4933         (thumb2_eabi_linux_sigreturn_tramp_frame)
4934         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4935         (arm_linux_restart_syscall_tramp_frame)
4936         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4937         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4938         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4939         ULONGEST_MAX.
4940         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4941
4942 2018-08-27  Tom Tromey  <tom@tromey.com>
4943
4944         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4945         CORE_ADDR_MAX.
4946         * mips-tdep.c (mips_deal_with_atomic_sequence)
4947         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4948         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4949         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4950         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4951         CORE_ADDR_MAX.
4952         * aarch64-tdep.c (aarch64_software_single_step): Use
4953         CORE_ADDR_MAX.
4954
4955 2018-08-27  Tom Tromey  <tom@tromey.com>
4956
4957         * linespec.c (complete_linespec_component): Add cast to "char".
4958         * completer.c (completion_tracker::build_completion_result): Add
4959         cast to "char".
4960
4961 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4962
4963         * solist.h (struct solist, struct target_so_ops): Fix
4964         indentation.
4965
4966 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4967
4968         * ada-tasks.c (ada_task_info_s): Remove typedef.
4969         (DEF_VEC_O(ada_task_info_s)): Remove.
4970         (struct ada_tasks_inferior_data): Initialize fields.
4971         <task_list>: Make an std::vector.
4972         (get_ada_tasks_inferior_data): Allocate with new.
4973         (ada_get_task_number): Adjust.
4974         (get_task_number_from_id): Likewise.
4975         (valid_task_id): Likewise.
4976         (ada_get_task_info_from_ptid): Likewise.
4977         (iterate_over_live_ada_tasks): Likewise.
4978         (add_ada_task): Likewise.
4979         (read_known_tasks): Likewise.
4980         (ada_build_task_list): Likewise.
4981         (print_ada_task_info): Likewise.
4982         (info_task): Likewise.
4983         (task_command_1): Likewise.
4984
4985 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4986
4987         * ada-lang.c (add_angle_brackets): Return std::string.
4988
4989 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4990
4991         * python/py-threadevent.c (py_get_event_thread): Initialize
4992         pythread.
4993
4994 2018-08-24  Pedro Alves  <palves@redhat.com>
4995
4996         * python/py-bpevent.c (create_breakpoint_event_object): Use
4997         copy-initialization.
4998         * python/py-continueevent.c (emit_continue_event): Use
4999         copy-initialization.
5000         * python/py-exitedevent.c (create_exited_event_object): Return a
5001         gdbpy_ref<>.
5002         (emit_exited_event): Use copy-initialization.
5003         * python/py-inferior.c (python_new_inferior)
5004         (python_inferior_deleted, add_thread_object): Use
5005         copy-initialization.
5006         * python/py-infevents.c (create_inferior_call_event_object)
5007         (create_register_changed_event_object)
5008         (create_memory_changed_event_object): Return a gdbpy_ref<>.
5009         (emit_inferior_call_event, emit_memory_changed_event)
5010         (emit_register_changed_event): Use copy-initialization.
5011         * python/py-newobjfileevent.c (create_new_objfile_event_object):
5012         Return a gdbpy_ref<>.
5013         (emit_new_objfile_event): Use copy-initialization.
5014         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
5015         (emit_clear_objfiles_event): Use copy-initialization.
5016         * python/py-signalevent.c (create_signal_event_object): Use
5017         copy-initialization.
5018         * python/py-threadevent.c (create_thread_event_object): Use
5019         copy-initialization.
5020
5021 2018-08-24  Pedro Alves  <palves@redhat.com>
5022             Simon Marchi  <simon.marchi@ericsson.com>
5023
5024         PR gdb/23379
5025         * python/py-continueevent.c: Include "gdbthread.h".
5026         (create_continue_event_object): Add intro comment.  Add 'ptid'
5027         parameter.  Use it to find thread to pass to
5028         create_thread_event_object.
5029         (emit_continue_event): Pass PTID down to
5030         create_continue_event_object.
5031         * python/py-event.h (py_get_event_thread): Declare.
5032         (create_thread_event_object): Remove default from 'thread'
5033         parameter.
5034         * python/py-stopevent.c (create_stop_event_object): Use
5035         py_get_event_thread.
5036         * python/py-threadevent.c (get_event_thread): Rename to ...
5037         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5038         and use it to find the thread.
5039         (create_thread_event_object): Assert that THREAD isn't null.
5040         Don't find the event thread here.
5041
5042 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
5043
5044         * block.h (blockrange, blockranges): New struct declarations.
5045         (struct block): Add new field named `ranges'.
5046         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5047         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5048         macros for accessing ranges in struct block.
5049         (make_blockranges): New declaration.
5050         block.c (make_blockranges): New function.
5051         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5052         for block.
5053         * symtab.h (find_pc_partial_function): Add new parameter `block'.
5054         * blockframe.c (cache_pc_function_block): New static global.
5055         (clear_pc_function_cache): Clear cache_pc_function_block.
5056         (find_pc_partial_function): Move comment to symtab.h.  Add
5057         support for non-contiguous blocks.
5058         * cli/cli-cmds.c (block.h): Include.
5059         (print_disassembly): Handle printing of non-contiguous blocks.
5060         (disassemble_current_function): Likewise.
5061         (disassemble_command): Likewise.
5062
5063         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5064         BLOCK_START.
5065         * blockframe.c (get_pc_function_start): Likewise.
5066         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5067         (gcc_symbol_address): Likewise.
5068         * compile/compile-object-run.c (compile_object_run): Likewise.
5069         * compile/compile.c (get_expr_block_and_pc): Likewise.
5070         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5071         (func_addr_to_tail_call_list): Likewise.
5072         * findvar.c (default_read_var_value): Likewise.
5073         * inline-frame.c (inline_frame_this_id): Likewise.
5074         (skip-inline_frames): Likewise.
5075         * infcmd.c (until_next_command): Likewise.
5076         * linespec.c (convert_linespec_to_sals): Likewise.
5077         * parse.c (parse_exp_in_context_1): Likewise.
5078         * printcmd.c (build_address_symbolic): likewise.
5079         (info_address_command): Likewise.
5080         symtab.c (find_function_start_sal): Likewise.
5081         (skip_prologue_sal): Likewise.
5082         (find_function_alias_target): Likewise.
5083         (find_gnu_ifunc): Likewise.
5084         * stack.c (find_frame_funname): Likewise.
5085         * symtab.c (fixup_symbol_section): Likewise.
5086         (find_function_start_sal): Likewise.
5087         (skip_prologue_sal): Likewsie.
5088         (find_function_alias_target): Likewise.
5089         (find_gnu_ifunc): Likewise.
5090         * tracepoint.c (info_scope_command): Likewise.
5091         * value.c (value_fn_field): Likewise.
5092
5093         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5094         in place of find_pc_partial_function.
5095         * blockframe.c (find_function_entry_range_from_pc): New function.
5096         * symtab.h (find_function_entry_range_from_pc): Declare and document.
5097         * objfiles.c (objfile_relocate1): Relocate start and end addresses
5098         for each range in a block.
5099
5100
5101 2018-08-23  Xavier Roirand  <roirand@adacore.com>
5102
5103         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5104         incrementation.
5105
5106 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5107
5108         * solib-svr4.c (read_program_headers_from_bfd): Return
5109         gdb::optional<gdb::byte_vector>.
5110         (svr4_exec_displacement): Adjust.
5111
5112 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5113
5114         * solib-svr4.c (read_program_header): Return
5115         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5116         (find_program_interpreter): Return
5117         gdb::optional<gdb::byte_vector>.
5118         (scan_dyntag_auxv): Adjust.
5119         (enable_break): Adjust.
5120         (svr4_exec_displacement): Adjust.
5121
5122 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5123
5124         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5125         * inf-child.c (inf_child_target::terminal_save_inferior): New.
5126
5127 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5128
5129         * guile/scm-string.c (gdbscm_scm_from_printf): Use
5130         string_vprintf.
5131         * guile/scm-utils.c (gdbscm_printf): Likewise.
5132         * serial.c (serial_printf): Likewise.
5133         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5134
5135 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
5136
5137         * stack.c (print_frame): Print frame architecture when printing on
5138         an MI output.
5139         * NEWS: Mention new "arch" attribute in frame output.
5140
5141 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5142
5143         * arch/aarch64.h (aarch64_regnum): Update comment.
5144
5145 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5146
5147         * NEWS: Add SVE to 8.2 section.
5148
5149 2018-08-21  Pedro Alves  <palves@redhat.com>
5150
5151         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5152         out from gdbscm_parse_function_args.
5153         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5154         gdbscm_parse_function_args_1.
5155
5156 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
5157
5158         PR gdb/17816
5159         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5160         operator.
5161
5162 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
5163
5164         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5165
5166 2018-08-19  Michael Spang  <spang@google.com>
5167
5168         PR gdb/11786
5169         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5170         for PT_TLS segments.
5171
5172 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
5173
5174         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5175         dwarf_variable_value.
5176         * dwarf2-frame.c (class dwarf_expr_executor):
5177         Add override for dwarf_variable_value.
5178         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5179         (class symbol_needs_eval_context): Likewise.
5180         (indirect_synthetic_pointer): Add forward declaration.
5181         (sect_variable_value): New function.
5182         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5183         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5184         for DW_OP_GNU_variable_value.
5185
5186 2018-08-16  Tom Tromey  <tom@tromey.com>
5187
5188         * top.c (read_command_file): Update.
5189         (command_line_input): Remove "repeat" argument.
5190         * ada-lang.c (get_selections): Update.
5191         * linespec.c (decode_line_2): Update.
5192         * defs.h (command_line_input): Remove argument.
5193         * cli/cli-script.c (read_next_line): Update.
5194         * python/py-gdb-readline.c: Update.
5195
5196 2018-08-17  Tom Tromey  <tom@tromey.com>
5197
5198         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5199         command_line_input.
5200
5201 2018-08-15  Tom Tromey  <tom@tromey.com>
5202
5203         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5204
5205 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
5206
5207         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5208         If used, use find_pc_partial_function to find address range
5209         to disassemble.
5210         * mi/mi-main.c (mi_cmd_list_features): Report
5211         "data-disassemble-a-option" feature.
5212         * NEWS: Mention new -data-disassemble option -a.
5213
5214 2018-08-13  Tom Tromey  <tom@tromey.com>
5215
5216         * common/common-defs.h (_FORTIFY_SOURCE): Define.
5217
5218 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5219
5220         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5221         (aarch64_linux_collect_sve_regset): Likewise.
5222         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5223         * regcache.h (regcache_map_entry_size): New function.
5224
5225 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5226
5227         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5228         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5229         (SVE_HEADER_VL_LENGTH): Likewise.
5230         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5231         (SVE_HEADER_FLAGS_LENGTH): Likewise.
5232         (SVE_HEADER_RESERVED_LENGTH): Likewise.
5233         (SVE_HEADER_SIZE_OFFSET): Likewise.
5234         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5235         (SVE_HEADER_VL_OFFSET): Likewise.
5236         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5237         (SVE_HEADER_FLAGS_OFFSET): Likewise.
5238         (SVE_HEADER_RESERVED_OFFSET): Likewise.
5239         (SVE_HEADER_SIZE): Likewise.
5240         (aarch64_linux_core_read_vq): Add function.
5241         (aarch64_linux_core_read_description): Check for SVE section.
5242
5243 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5244
5245         * aarch64-fbsd-tdep.c
5246         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5247         collect_size.
5248         * aarch64-linux-tdep.c
5249         (aarch64_linux_iterate_over_regset_sections): Likewise.
5250         * alpha-linux-tdep.c
5251         (alpha_linux_iterate_over_regset_sections):
5252         * alpha-nbsd-tdep.c
5253         (alphanbsd_iterate_over_regset_sections): Likewise.
5254         * amd64-fbsd-tdep.c
5255         (amd64fbsd_iterate_over_regset_sections): Likewise.
5256         * amd64-linux-tdep.c
5257         (amd64_linux_iterate_over_regset_sections): Likewise.
5258         * arm-bsd-tdep.c
5259         (armbsd_iterate_over_regset_sections): Likewise.
5260         * arm-fbsd-tdep.c
5261         (arm_fbsd_iterate_over_regset_sections): Likewise.
5262         * arm-linux-tdep.c
5263         (arm_linux_iterate_over_regset_sections): Likewise.
5264         * corelow.c (get_core_registers_cb): Likewise.
5265         (core_target::fetch_registers): Likewise.
5266         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5267         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5268         * gdbarch.h (void): Regenerate.
5269         * gdbarch.sh: Add supply_size and collect_size.
5270         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5271         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5272         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5273         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5274         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5275         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5276         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5277         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5278         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5279         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5280         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5281         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5282         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5283         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5284         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5285         Likewise.
5286         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5287         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5288         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5289         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5290         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5291         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5292         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5293         Likewise.
5294         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5295         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5296         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5297         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5298         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5299         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5300         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5301         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5302
5303 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
5304
5305         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5306         with string_printf.
5307
5308 2018-08-10  Keith Seitz  <keiths@redhat.com>
5309
5310         * compile/compile-c-support.c (add_code_header, add_code_footer):
5311         Move into policy class.
5312         (c_push_user_expression, pop_user_expression_nop)
5313         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5314         (compile_program): New host class.
5315         (c_compile_program): New typedef.
5316         (c_compute_porgram): Use c_compile_program.
5317
5318 2018-08-10  Keith Seitz  <keiths@redhat.com>
5319
5320         * compile/compile-internal.h (compile_instance::~compile_instance):
5321         Remove calls to htab_delete.
5322         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5323         * compile.c (compile_instance::compile_instance): Initialize
5324         htab unique pointers.
5325         (compile_instance::get_cached_type, compile_instance::insert_type)
5326         (compile_instance::error_symbol_once): Update for unique_ptr.
5327
5328 2018-08-10  Keith Seitz  <keiths@redhat.com>
5329
5330         * compile/compile-c-symbols.c (struct symbol_error)
5331         (hash_symbol_error, eq_symbol_error, del_symbol_error)
5332         (compile_instance::insert_symbol_error)
5333         (compile_instance::error_symbol_once): Move to ...
5334         * compile/compile.c: ... here.
5335
5336 2018-08-10  Keith Seitz  <keiths@redhat.com>
5337
5338         * compile/compile-c-support.c (c_get_compile_context): Use `new'
5339         instead of `new_compile_instance'.
5340         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5341         Update description.
5342         If the symbol error map is not initialized, create it.
5343         (generate_c_for_for_one_symbol): Do not check/initialize
5344         the symbol error map.
5345         * compile/compile-c-types.c (compile_c_instance): Make a class.
5346         Update all callers.
5347         (compile_instance::compile_instance): Initialize the type cache.
5348         (get_cached_type): New function.
5349         (insert_type): Update description.
5350         (compile_c_instance::m_default_cflags): Define.
5351         (convert_type): Update description.  Use get_cached_type.
5352         (delete_instance): Moved to destructor.
5353         (new_compile_instance): Moved to constructor.
5354         * compile/compile-c.h (compile_c_instance): Make class inheriting
5355         from compile_instance.
5356         <base>: Remove field.
5357         <type_map, symbol_err_map>: Move to base class.
5358         <c_plugin>: Rename to `m_plugin' and remove pointer type.
5359         * compile/compile-internal.h (compile_instance): Make class.
5360         <type_map_t, symbol_err_map_t>: Define.
5361         <fe>: Rename to `m_gcc_fe'.
5362         <scope, block, gcc_target_options>: Add `m_' prefix.
5363         <m_type_map, m_symbol_err_map>: New fields, moved from
5364         compile_c_instance.
5365         <destroy>: Remove.
5366         (convert_type, new_compile_instance): Remove.
5367         * compile/compile.c (cleanup_compile_instance): Remove.
5368         (compile_to_object): Use unique_ptr to eliminate cleanups.
5369         (compile_instance::set_print_callback, compile_instance::version)
5370         (compile_instance::set_verbose)
5371         (compile_instance::set_driver_filename)
5372         (compile_instance::set_triplet_regexp)
5373         (compile_instance::set_arguments)
5374         (compile_instance::set_source_file)
5375         (compile_instance::compile): Define.
5376
5377 2018-08-10  Keith Seitz  <keiths@redhat.com>
5378
5379         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5380         * compile/compile-c-types.c: Define GCC_METHODN macros and include
5381         gcc-c-fe.def to define C plugin.
5382         (delete_instance): Delete `c_plugin'.
5383         (new_compile_instance): Initialize `c_plugin'.
5384         * compile/compile-c.h: Include gcc_c_plugin.h.
5385         (struct compile_c_instance) <c_plugin>: New member.
5386         * gcc-c-plugin.h: New file.
5387         Update all callers with API change.
5388
5389 2018-08-10  Keith Seitz  <keiths@redhat.com>
5390
5391         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5392         (HFILES_NO_SRCDIR): ... to here.
5393         Add compile-internal.h and compile-c.h.
5394         * compile/compile-c-support.c: Include compile-c.h.
5395         * compile/compile-c-symbols.c: Include compile-c.h.
5396         (generate_c_for_variable_locations): Update comment.
5397         * compile/compile-c-types.c: Include compile-c.h.
5398         * compile/compile-c.h: New file -- moved C language declarations
5399         from other files here.
5400         * compile/compile-internal.h: Do not include hashtab.h or
5401         common/enum-flags.h.
5402         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5403         (gcc_convert_symbol, gcc_symbol_address)
5404         (generate_c_for_variable_locations, c_get_mode_for_size)
5405         (c_get_range_decl_name): Definitions moved to compile-c.h.
5406         * compile/compile-loc2c.c: Include compile-c.h.
5407
5408 2018-08-10  Keith Seitz  <keiths@redhat.com>
5409
5410         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5411         (c_symbol_substitution_name): ... this.
5412         Update all callers.
5413
5414 2018-08-10  Keith Seitz  <keiths@redhat.com>
5415
5416         * compile/compile-c-support.c (c_compute_program): Use
5417         unique_xmalloc_ptr to eliminate cleanup.
5418         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5419         Return a unique_xmalloc_ptr and eliminate cleanup.
5420         * compile/compile-internal.h (generate_c_for_variable_locations):
5421         Return unique_xmalloc_ptr and update description.
5422
5423 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5424
5425         * corelow.c (core_target::get_core_register_section): Rename
5426         min_size to section_min_size.
5427
5428 2018-08-09  Jim Wilson  <jimw@sifive.com>
5429
5430         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5431         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5432         * NEWS: Mention new GNU/Linux RISC-V target.
5433         * configure.host: Add riscv*-*-linux*.
5434         * configure.nat: Add riscv*.
5435         * configure.tgt: Add riscv*-*-linux*.
5436         * riscv-linux-nat.c: New file.
5437         * riscv-linux-tdep.c: New file.
5438
5439 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5440
5441         * infrun.c (resume): Make static, add forward declaration.
5442         (proceed): Update header comment.
5443         * infrun.h (resume): Delete declaration.
5444
5445 2018-08-09  Tom Tromey  <tom@tromey.com>
5446
5447         * riscv-tdep.h: Minor formatting fixes.
5448
5449 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5450
5451         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5452         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5453         (test_mkdir_recursive): Likewise.
5454         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5455
5456 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5457
5458         * valarith.c (value_subscripted_rvalue): If an array is not in
5459         memory, and we don't know the upper bound, then we can't know that
5460         the requested element exists or not.
5461
5462 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5463
5464         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5465         (target_options_to_string): Add comment.
5466
5467 2018-08-08  Tom Tromey  <tom@tromey.com>
5468
5469         * unittests/scoped_mmap-selftests.c: Check result of "write".
5470
5471 2018-08-08  Jim Wilson  <jimw@sifive.com>
5472
5473         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5474         (decode_register_index_short): New.
5475         (decode_j_type_insn, decode_cj_type_insn): New.
5476         (decode_b_type_insn, decode_cb_type_insn): New.
5477         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5478         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5479         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5480         is_c_sw_insn instead of is_sw_insn.
5481         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5482         (riscv_software_single_step): New.
5483         * riscv-tdep.h (riscv_software_single_step): Declare.
5484
5485         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5486         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5487
5488 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5489
5490         PR gdb/18050:
5491         * target.c (dispose_inferior): Don't dispose of inferiors that are
5492         already killed.
5493
5494 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5495
5496         * remote.c (remote_target::download_tracepoint): Change char* to
5497         const char*.
5498
5499 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5500
5501         * target.h (target_options_to_string): Return an std::string.
5502         * target.c (str_comma_list_concat_elem): Return void, use
5503         std::string.
5504         (do_option): Likewise.
5505         (target_options_to_string): Return an std::string.
5506         * linux-nat.c (linux_nat_target::wait): Adjust.
5507         * target-debug.h (target_debug_print_options): Adjust.
5508
5509 2018-08-07  Tom Tromey  <tom@tromey.com>
5510
5511         * Makefile.in (CPPFLAGS): New variable.
5512         (INTERNAL_CPPFLAGS): Use it.
5513
5514 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5515
5516         * NEWS: Mention the index cache.
5517
5518 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5519
5520         * common/pathstuff.h (get_standard_cache_dir): New.
5521         * common/pathstuff.c (get_standard_cache_dir): New.
5522         * build-id.h (build_id_to_string): New.
5523         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5524         DEBUG_STR_SUFFIX): Move to here.
5525         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5526         DEBUG_STR_SUFFIX): Move from there.
5527         (write_psymtabs_to_index): Make non-static, add basename
5528         parameter.  Write to temporary files, rename when done.
5529         (save_gdb_index_command): Adjust call to
5530         write_psymtabs_to_index.
5531         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5532         field.
5533         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5534         (get_gdb_index_contents_from_cache): New.
5535         (get_gdb_index_contents_from_cache_dwz): New.
5536         (dwarf2_initialize_objfile): Read index from cache.
5537         (dwarf2_build_psymtabs): Save to index.
5538         * dwarf-index-cache.h: New file.
5539         * dwarf-index-cache.c: New file.
5540         * dwarf-index-write.h: New file.
5541
5542 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5543
5544         * gnulib/aclocal.m4: Re-generate.
5545         * gnulib/config.in: Re-generate.
5546         * gnulib/configure: Re-generate.
5547         * gnulib/import/Makefile.am: Re-generate.
5548         * gnulib/import/Makefile.in: Re-generate.
5549         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5550         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5551         * gnulib/import/m4/mkdir.m4: New file.
5552         * gnulib/import/mkdir.c: New file.
5553         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5554         module.
5555
5556 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5557
5558         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5559         * common/scoped_mmap.c: New file.
5560         * common/scoped_mmap.h (destroy): New method.
5561         (~scoped_mmap, reset): Use destroy.
5562         (scoped_mmap): New move constructor.
5563         (mmap_file): New declaration.
5564         * unittests/scoped_mmap-selftests.c (test_normal,
5565         test_invalid_filename, run_tests): New functions.
5566         (_initialize_scoped_mmap_selftests): Register selftest.
5567
5568 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5569
5570         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5571         (read_gdb_index_from_buffer): ... this.  Remove section
5572         parameter, add buffer parameter.
5573         (get_gdb_index_contents_ftype,
5574         get_gdb_index_contents_dwz_ftype): New typedefs.
5575         (dwarf2_read_gdb_index): Add callback parameters to get the
5576         index contents.
5577         (get_gdb_index_contents_from_section): New.
5578         (dwarf2_initialize_objfile): Update call to
5579         dwarf2_read_gdb_index.
5580
5581 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5582
5583         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5584         (gdb_open_cloexec): Likewise.
5585         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5586         (commandline_from_pid): Likewise.
5587         (linux_xfer_osdata_threads): Likewise.
5588         (linux_xfer_osdata_fds): Likewise.
5589         * ada-lang.c (is_package_name): Likewise.
5590         * auxv.c (procfs_xfer_auxv): Likewise.
5591         * breakpoint.c (print_one_breakpoint_location): Use
5592         uiout::field_fmt.
5593         (print_one_catch_solib): Use string_printf.
5594         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5595         (add_pe_forwarded_sym): Likewise.
5596         * dwarf2read.c (create_type_unit_group): Likewise.
5597         (build_error_marker_type): Likewise.
5598         * infcall.c (get_function_name): Likewise.
5599         * valprint.c (print_converted_chars_to_obstack): Likewise.
5600         * xtensa-tdep.c (xtensa_register_type): Likewise.
5601
5602 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5603
5604         * remote.c (remote_target::download_tracepoint): Fix format
5605         string errors.
5606
5607 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5608
5609         * tracefile.c: Include common/byte-vector.h.
5610         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5611         with trace_regblock_size if needed.  Update uses of buf.
5612
5613 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5614
5615         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5616         std::vector<unsigned char>.
5617         * tracepoint.c (collection_list::collection_list): Remove
5618         m_regs_mask initializer from initializer list.  Resize
5619         m_regs_mask using the largest remote register number.
5620         (collection_list::add_remote_register): Remove size check on
5621         m_regs_mask.  Use at to access element.
5622         (collection_list::stringify): Change type of temp_buf to
5623         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5624         stringify the register mask.  Use pack_hex_byte for the register
5625         mask.
5626
5627 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5628
5629         * tracepoint.h (class collection_list) <add_register>: Remove.
5630         <add_remote_register, add_ax_registers, add_local_register>:
5631         Declare.
5632         <add_memrange>: Add scope parameter.
5633         * tracepoint.c (encode_actions_1): Likewise.
5634         (collection_list::add_register): Rename to ...
5635         (collection_list::add_remote_register): ... this.  Update
5636         comment.
5637         (collection_list::add_ax_registers, add_local_register): New
5638         methods.
5639         (collection_list::add_memrange): Add scope parameter.  Call
5640         add_local_register instead of add_register.
5641         (finalize_tracepoint_aexpr): New function.
5642         (collection_list::collect_symbol): Update calls to add_memrange.
5643         Call add_local_register instead of add_register.  Call
5644         add_ax_registers.  Call finalize_tracepoint_aexpr.
5645         (encode_actions_1): Get remote regnos for $reg action.  Call
5646         add_remote_register, add_ax_registers, and add_local_register.
5647         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5648         (validate_actionline): Call finalize_tracepoint_aexpr.
5649
5650 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5651
5652         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5653         Replace array buf with gdb::char_vector buf, of size
5654         get_remote_packet_size ().  Replace references to buf and
5655         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5656         and xsnprintf with snprintf.  Raise errors if the buffer is too
5657         small.
5658
5659 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5660
5661         * remote.c (remote_target::download_tracepoint): Fix the has_more
5662         predicate in the QTDP action list iteration.
5663
5664 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5665
5666         * remote.c (remote_target::download_tracepoint): Fix indentation
5667         in for block.
5668
5669 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5670
5671         * proc-api.c (_initialize_proc_api): Remove c, unused.
5672         * procfs.c (procfs_init_inferior): Remove signals, unused.
5673         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5674         unused.
5675
5676 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5677             Andrew Burgess  <andrew.burgess@embecosm.com>
5678
5679         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5680         'W_STOPCODE (0)' as this could be ambiguous.
5681
5682 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5683
5684         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5685         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5686         "ai_socktype").
5687
5688 2018-08-02  Tom Tromey  <tom@tromey.com>
5689
5690         PR symtab/16842.
5691         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5692         symbols.
5693         (process_structure_scope): Likewise.
5694
5695 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5696
5697         PR gdb/22629:
5698         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5699         kill inferior.
5700
5701 2018-08-02  Tom Tromey  <tom@tromey.com>
5702
5703         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5704         (darwin_suspend_inferior, darwin_resume_inferior)
5705         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5706         (darwin_check_new_threads): Check result of get_darwin_inferior.
5707
5708 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5709
5710         GDB 8.1.1 released.
5711
5712 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5713
5714         * varobj.c (varobj_get_path_expr_parent): Report an error if
5715         parent is a dynamic varobj.
5716
5717 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5718
5719         * gnulib/aclocal.m4: Re-generate.
5720         * gnulib/config.in: Re-generate.
5721         * gnulib/configure: Re-generate.
5722         * gnulib/import/Makefile.in: Re-generate.
5723         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5724         * gnulib/import/m4/onceonly.m4: Re-generate.
5725
5726 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5727
5728         * target-descriptions.c (struct xml_test_tdesc): New.
5729         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5730         (record_xml_tdesc): Update.
5731         (maintenance_check_xml_descriptions): Update.
5732         * target-descriptions.h (record_xml_tdesc): Update comment.
5733
5734 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5735
5736         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5737         checking array bounds are defined.
5738
5739 2018-07-30  Tom Tromey  <tom@tromey.com>
5740
5741         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5742         irreflexivity violation.
5743
5744 2018-07-30  Tom Tromey  <tom@tromey.com>
5745
5746         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5747         * value.c (unpack_long): Remove lint code.
5748         * valops.c (value_ind): Remove lint code.
5749         * valarith.c (value_x_binop, value_x_unop, value_equal)
5750         (value_pos): Remove lint code.
5751
5752 2018-07-28  Tom de Vries  <tdevries@suse.de>
5753
5754         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5755         with undefined upper bound as <optimized out>.
5756
5757 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5758
5759         * gcore.in: Rename variable "name" to "prefix".  Expand
5760         "usage" text.
5761
5762 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5763
5764         * windows-nat.c (windows_nat_target::create_inferior): Update to
5765         call close() in global namespace.
5766
5767 2018-07-26  Tom Tromey  <tom@tromey.com>
5768
5769         * dwarf-index-write.c (add_address_entry): Don't add objfile
5770         offsets.
5771         * dbxread.c (find_stab_function): Rename from
5772         find_stab_function_addr.  Return a bound_minimal_symbol.
5773         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5774         Don't add objfile offsets.
5775         (end_psymtab): Use raw_text_low, raw_text_high,
5776         MSYMBOL_VALUE_RAW_ADDRESS.
5777         (read_ofile_symtab): Update.
5778         (process_one_symbol): Update.
5779         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5780         offsets.
5781         (dw2_relocate): Remove.
5782         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5783         searching addrmap.
5784         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5785         Update.
5786         (process_psymtab_comp_unit_reader, add_partial_symbol)
5787         (add_partial_subprogram, dwarf2_ranges_read): Update.
5788         (load_partial_dies): Update.
5789         (add_address_entry): Don't add objfile offsets.
5790         (dwarf2_build_include_psymtabs): Update.
5791         (create_addrmap_from_aranges): Don't add objfile offsets.
5792         (dw2_find_pc_sect_compunit_symtab): Update.
5793         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5794         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5795         Update.
5796         (parse_partial_symbols): Don't add objfile offsets.  Use
5797         raw_text_low, raw_text_high.  Update.
5798         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5799         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5800         or call 'relocate' quick function.  Clear psymbol_map.
5801         * psympriv.h (struct partial_symbol) <address>: Add section
5802         offset.
5803         <set_unrelocated_address>: Rename from set_address.
5804         <raw_text_low, raw_text_high>: New methods.
5805         <text_low, text_high>: Add objfile parameter.
5806         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5807         set_unrelocated_address.
5808         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5809         (find_pc_psymbol): Update.
5810         (fixup_psymbol_section, relocate_psymtabs): Remove.
5811         (dump_psymtab, psym_functions): Update.
5812         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5813         parameter.
5814         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5815         (start_psymtab_common): Update.
5816         * symfile-debug.c (debug_qf_relocate): Remove.
5817         (debug_sym_quick_functions): Update.
5818         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5819         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5820         Update.
5821
5822 2018-07-26  Tom Tromey  <tromey@redhat.com>
5823
5824         * dbxread.c (end_psymtab): Use text_high_valid and
5825         text_low_valid.
5826         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5827         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5828         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5829         Update comment.
5830         <text_low_valid, text_high_valid>: New fields.
5831         <set_text_low, set_text_high>: Update.
5832         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5833
5834 2018-07-26  Tom Tromey  <tom@tromey.com>
5835
5836         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5837         Update.
5838         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5839         textlow and texthigh fields.
5840         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5841         Update.
5842         * mdebugread.c (parse_lines, parse_partial_symbols)
5843         (psymtab_to_symtab_1): Update.
5844         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5845         Rename fields.  Update comment.  Now private.
5846         <text_low, text_high, set_text_low, set_text_high>: New methods.
5847         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5848         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5849         (start_psymtab_common, maintenance_info_psymtabs)
5850         (maintenance_check_psymtabs): Update.
5851         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5852         texthigh fields.
5853         (scan_xcoff_symtab): Update.
5854
5855 2018-07-26  Tom Tromey  <tromey@redhat.com>
5856
5857         * psympriv.h (struct partial_symbol) <unrelocated_address,
5858         address, set_address>: New methods.
5859         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5860         (fixup_psymbol_section, relocate_psymtabs): Update.
5861         (print_partial_symbols): Add 'objfile' parameter.  Update.
5862         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5863         Update.
5864
5865 2018-07-26  Tom Tromey  <tom@tromey.com>
5866
5867         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5868         (debug_names::write_psymbols): Update.
5869         * psympriv.h (struct partial_symbol): Derive from
5870         general_symbol_info.
5871         <obj_section>: New method.
5872         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5873         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5874         (find_pc_sect_psymbol, fixup_psymbol_section)
5875         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5876         (print_partial_symbols, recursively_search_psymtabs)
5877         (compare_psymbols, psymbol_hash, psymbol_compare)
5878         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5879         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5880
5881 2018-07-26  Tom Tromey  <tromey@redhat.com>
5882
5883         * dbxread.c (end_psymtab): Remove dead code.
5884
5885 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5886
5887         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5888         DWARF unwinders are disabled.
5889         * dwarf2-frame.c: Add dwarf2read.h include.
5890         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5891         disabled.
5892         (dwarf2_frame_unwinders_enabled_p): Define.
5893         (show_dwarf_unwinders_enabled_p): New function.
5894         (_initialize_dwarf2_frame): Register switch to control DWARF
5895         unwinder use.
5896         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5897         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5898         (show_dwarf_cmdlist): Remove static keyword.
5899         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5900         (show_dwarf_cmdlist): Declare.
5901         * NEWS: Document new feature.
5902
5903 2018-07-26  Tom de Vries  <tdevries@suse.de>
5904
5905         PR breakpoints/23366
5906         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5907
5908 2018-07-26  Tom de Vries  <tdevries@suse.de>
5909
5910         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5911         DW_AT_count can't be translated to a dynamic prop.
5912
5913 2018-07-25  Tom de Vries  <tdevries@suse.de>
5914
5915         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5916         try/catch.
5917
5918 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5919
5920         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5921
5922 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5923
5924         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5925
5926 2018-07-24  Keith Seitz  <keiths@redhat.comt
5927
5928         PR symtab/23010
5929         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5930         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5931         instead of add_symbol_to_list.
5932         (read_file_scope): Call prepare_one_comp_unit before reading
5933         any other DIEs.
5934
5935 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5936
5937         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5938
5939 2018-07-24  Tom Tromey  <tom@tromey.com>
5940
5941         * utils.c (malloc, realloc, free): Don't declare.
5942         * configure, config.in: Rebuild.
5943         * configure.ac: Don't check for declarations of free, malloc, or
5944         realloc.
5945
5946 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5947
5948         * aarch64-linux-nat.c
5949         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5950         variable.
5951         * arm-linux-nat.c (fetch_regs): Likewise.
5952         (store_regs): Likewise.
5953         (fetch_vfp_regs): Likewise.
5954         (store_vfp_regs): Likewise.
5955         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5956         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5957         (arm_linux_nat_target::insert_watchpoint): Likewise.
5958         (arm_linux_nat_target::remove_watchpoint): Likewise.
5959         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5960         Likewise.
5961         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5962         Likewise.
5963         * ppc-linux-nat.c (fetch_register): Likewise.
5964         (fetch_all_gp_regs): Likewise.
5965         (fetch_ppc_registers): Likewise.
5966         (store_all_gp_regs): Likewise.
5967         (store_ppc_registers): Likewise.
5968         (hwdebug_insert_point): Likewise.
5969         (can_use_watchpoint_cond_accel): Likewise.
5970         * remote-sim.c (gdb_os_write_stdout): Likewise.
5971
5972 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5973             Tom Tromey  <tom@tromey.com>
5974
5975         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5976         test for it.
5977         * configure: Rebuild.
5978
5979 2018-07-22  Tom Tromey  <tom@tromey.com>
5980
5981         * regformats/regdat.sh: Define xmltarget_${name} inside
5982         #ifndef IN_PROCESS_AGENT.
5983
5984 2018-07-22  Tom Tromey  <tom@tromey.com>
5985
5986         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5987
5988 2018-07-22  Tom Tromey  <tom@tromey.com>
5989
5990         * symfile.c (reread_symbols): Notify iter, not objfile.
5991
5992 2018-07-22  Tom Tromey  <tom@tromey.com>
5993
5994         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5995         Use arch_ops.
5996         (ravenscar_thread_target::prepare_to_store): Likewise.
5997
5998 2018-07-22  Tom Tromey  <tom@tromey.com>
5999
6000         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
6001         unused variable.  Call value_fetch_lazy when needed.
6002         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
6003         Remove unused variable.  Call value_fetch_lazy when needed.
6004
6005 2018-07-22  Tom Tromey  <tom@tromey.com>
6006
6007         * m32c-tdep.c (mark_dma): Return void.
6008         (make_regs): Remove unused declarations.
6009
6010 2018-07-22  Tom Tromey  <tom@tromey.com>
6011
6012         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
6013         cmdscm_get_valid_command_smob_arg_unsafe for effect.
6014         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
6015         bkscm_get_valid_block_smob_arg_unsafe for effect.
6016
6017 2018-07-22  Tom Tromey  <tom@tromey.com>
6018
6019         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
6020         value_type.
6021
6022 2018-07-22  Tom Tromey  <tom@tromey.com>
6023
6024         * windows-nat.c (saved_context): Conditionally define.
6025         * remote.c (remote_target::remote_btrace_maybe_reopen):
6026         Conditionally declare "warned".
6027         * inflow.c (sigquit_ours): Conditionally define.
6028         (new_tty): Move "tty" declaration inside #if.
6029         * guile/guile.c (guile_datadir): Conditionally define.
6030         * charset.c (set_be_le_names): Move some declarations inside #if.
6031         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6032         #if.
6033         (parse_xml_btrace_conf): Likewise.
6034
6035 2018-07-22  Tom Tromey  <tom@tromey.com>
6036
6037         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6038
6039 2018-07-22  Tom Tromey  <tom@tromey.com>
6040
6041         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6042         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6043         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6044         * buildsym-legacy.c (get_macro_table): Remove unused variable.
6045         * stack.c (frame_apply_level_command): Remove unused variable.
6046         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6047         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6048         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6049         unused variable.
6050         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6051         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6052         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6053         variable.
6054         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6055         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6056         variable.
6057         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6058         Remove unused variable.
6059         * cli/cli-script.c (recurse_read_control_structure): Remove unused
6060         variable.
6061         * common/tdesc.c (print_xml_feature::visit): Remove unused
6062         variable.
6063         * compile/compile-object-load.c (store_regs): Remove unused
6064         variables.
6065         * complaints.c (clear_complaints): Remove unused variable.
6066         * corelow.c (core_target_open): Remove unused variable.
6067         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6068         variable.
6069         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6070         variable.
6071         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6072         variable.
6073         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6074         variable.
6075         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6076         variable.
6077         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6078         variable.
6079         * ia64-tdep.c (examine_prologue): Remove unused variable.
6080         * infcall.c (run_inferior_call): Remove unused variable.
6081         * inferior.c (exit_inferior): Remove unused variable.
6082         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6083         * linespec.c (decode_line_2): Remove unused variable.
6084         * linux-nat.c (super_close): Remove.
6085         * linux-tdep.c (linux_info_proc): Remove unused variable.
6086         * mi/mi-main.c (mi_execute_command): Remove unused variable.
6087         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6088         Remove unused variable.
6089         * parse.c (find_minsym_type_and_address): Remove unused variable.
6090         * printcmd.c (info_symbol_command, printf_floating): Remove unused
6091         variable.
6092         * python/py-breakpoint.c (bppy_set_commands): Remove unused
6093         variable.
6094         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6095         variables.
6096         * record-btrace.c (record_btrace_target::store_registers): Remove
6097         unused variable.
6098         (cmd_show_record_btrace_cpu): Remove unused variable.
6099         * riscv-tdep.c (riscv_register_reggroup_p)
6100         (riscv_push_dummy_call, riscv_return_value): Remove unused
6101         variable.
6102         * rust-exp.y (literal): Remove unused variable.
6103         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6104         unused variable.
6105         <STRUCTOP_ANONYMOUS>: Likewise.
6106         * s390-linux-tdep.c (s390_linux_init_abi_31)
6107         (s390_linux_init_abi_64): Remove unused variable.
6108         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6109         (file_select_thread, net_windows_open, _initialize_ser_windows):
6110         Remove unused variables.
6111         * symtab.c (find_pc_sect_line): Remove unused variable.
6112         * target-memory.c (compute_garbled_blocks): Remove unused
6113         variable.
6114         (target_write_memory_blocks): Remove unused variable.
6115         * target.c (target_stack::unpush): Remove unused variables.
6116         * tracepoint.c (start_tracing, all_tracepoint_actions)
6117         (merge_uploaded_trace_state_variables)
6118         (print_one_static_tracepoint_marker): Remove unused variable.
6119         * unittests/basic_string_view/element_access/char/1.cc (test01):
6120         Remove unused variable.
6121         * windows-nat.c (windows_continue, windows_add_all_dlls)
6122         (do_initial_windows_stuff, windows_nat_target::create_inferior):
6123         Remove unused variables.
6124
6125 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
6126
6127         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6128         attr_profile in HAVE_ELF.
6129         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6130         HAVE_ELF.
6131
6132 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
6133
6134         * frame.c (frame_register_unwind): Change parameter name.
6135         (frame_unwind_register): Likewise.
6136         (frame_unwind_register_value): Likewise.
6137         (frame_unwind_register_signed): Likewise.
6138         (frame_unwind_register_unsigned): Likewise.
6139         * frame.h (frame_register_unwind): Likewise.
6140         (frame_unwind_register): Likewise.
6141         (frame_unwind_register_value): Likewise.
6142         (frame_unwind_register_signed): Likewise.
6143         (frame_unwind_register_unsigned): Likewise.
6144         (frame_unwind_arch): Likewise.
6145
6146 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6147
6148         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6149         ISA maintenance.
6150
6151 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6152
6153         * mips-linux-nat.c (mips_linux_nat_target::read_description):
6154         Call `get_ptrace_pid' rather than extracting the ptrace PID by
6155         hand.
6156
6157 2018-07-20  Keith Seitz  <keiths@redhat.com>
6158
6159         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6160         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6161         m_compunit_symtab, m_language>: Add "m_" prefix.
6162         Update all uses.
6163         * buildsym.c: Update all uses.
6164
6165 2018-07-20  Tom Tromey  <tom@tromey.com>
6166
6167         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6168         * buildsym.h (record_line_ftype): Remove typedef.
6169
6170 2018-07-20  Tom Tromey  <tom@tromey.com>
6171
6172         * buildsym-legacy.h (augment_type_symtab): Don't declare.
6173         (end_expandable_symtab): Likewise.
6174         (end_symtab_get_static_block): Likewise.
6175         (end_symtab_from_static_block): Likewise.
6176         * buildsym-legacy.c (augment_type_symtab): Remove.
6177         (end_expandable_symtab): Remove.
6178         (end_symtab_get_static_block): Remove.
6179         (end_symtab_from_static_block): Remove.
6180
6181 2018-07-20  Tom Tromey  <tom@tromey.com>
6182
6183         * dwarf2read.c: Include buildsym.h.
6184         (struct dwarf2_cu) <builder>: New method.
6185         (fixup_go_packaging): Update.
6186         (process_full_comp_unit, process_full_type_unit): Update.  Don't
6187         use scoped_free_pendings.
6188         (using_directives): Add "cu" parameter, remove "language".
6189         (read_import_statement, setup_type_unit_groups, )
6190         (read_func_scope, read_lexical_block_scope)
6191         (dwarf2_record_block_ranges, read_namespace): Update.
6192         (lnp_state_machine::lnp_state_machine): Add cu parameter.
6193         (lnp_state_machine::handle_end_sequence): Update.
6194         (class lnp_state_machine) <m_cu>: New member.
6195         <m_record_line_callback>: Remove.
6196         <m_currently_recording_lines>: New member.
6197         (lnp_state_machine::handle_set_file): Update.
6198         (noop_record_line): Remove.
6199         (dwarf_record_line_p): Add cu parameter.
6200         (dwarf_record_line_1, dwarf_finish_line): Likewise.
6201         (lnp_state_machine::record_line)
6202         (lnp_state_machine::lnp_state_machine)
6203         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6204         (dwarf_decode_lines): Update.
6205         (dwarf2_start_subfile): Add cu parameter.
6206         (dwarf2_start_symtab, new_symbol): Update.
6207         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6208         Remove dwarf2_per_objfile parameter.
6209         (dwarf_decode_macros): Update.
6210
6211 2018-07-20  Tom Tromey  <tom@tromey.com>
6212
6213         * stabsread.c (define_symbol): Update.
6214         * buildsym-legacy.h (get_buildsym_compunit): Declare.
6215         * dwarf2read.c (new_symbol): Update.
6216         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6217         * cp-namespace.c: Include buildsym.h.
6218         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6219         * buildsym-legacy.c (get_buildsym_compunit): New function.
6220
6221 2018-07-20  Tom Tromey  <tom@tromey.com>
6222
6223         * xcoffread.c: Include buildsym-legacy.h.
6224         * windows-nat.c: Include buildsym-legacy.h.
6225         * stabsread.c: Include buildsym-legacy.h.
6226         * mdebugread.c: Include buildsym-legacy.h.
6227         * buildsym-legacy.h: New file.
6228         * buildsym-legacy.c: New file, from buildsym.c.
6229         * go32-nat.c: Include buildsym-legacy.h.
6230         * dwarf2read.c: Include buildsym-legacy.h.
6231         * dbxread.c: Include buildsym-legacy.h.
6232         * cp-namespace.c: Include buildsym-legacy.h.
6233         * coffread.c: Include buildsym-legacy.h.
6234         * buildsym.h: Move some contents to buildsym-legacy.h.
6235         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
6236         buildsym-legacy.c.
6237         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6238
6239 2018-07-20  Tom Tromey  <tom@tromey.com>
6240
6241         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6242         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6243         (buildsym_compunit::buildsym_compunit)
6244         (buildsym_compunit::~buildsym_compunit)
6245         (buildsym_compunit::get_macro_table): Define.
6246
6247 2018-07-20  Tom Tromey  <tom@tromey.com>
6248
6249         * buildsym.c (reset_symtab_globals): Remove.
6250         (buildsym_compunit::end_symtab_from_static_block): Update.
6251         (buildsym_compunit::augment_type_symtab): Update.
6252         (end_symtab_from_static_block): Call free_buildsym_compunit.
6253         (augment_type_symtab, end_symtab, end_expandable_symtab):
6254         Likewise.
6255
6256 2018-07-20  Tom Tromey  <tom@tromey.com>
6257
6258         * arch-utils.c: Do not include buildsym.h.
6259         * mipsread.c: Do not include buildsym.h.
6260         * machoread.c: Do not include buildsym.h.
6261         * elfread.c: Do not include buildsym.h.
6262
6263 2018-07-20  Tom Tromey  <tom@tromey.com>
6264
6265         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6266         initialization.
6267         (buildsym_compunit): Add new constructor.
6268         (struct buildsym_compunit) <get_last_source_file, finish_block,
6269         record_block_range, start_subfile, patch_subfile_names,
6270         push_subfile, pop_subfile, record_line, get_compunit_symtab,
6271         set_last_source_start_addr, get_last_source_start_addr,
6272         get_local_using_directives, set_local_using_directives,
6273         get_global_using_directives, outermost_context_p,
6274         get_current_context_stack, get_context_stack_depth,
6275         get_current_subfile, get_local_symbols, get_file_symbols,
6276         get_global_symbols, record_debugformat, record_producer,
6277         push_context, pop_context, end_symtab_get_static_block,
6278         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6279         New public methods.
6280         <record_pending_block, finish_block_internal, make_blockvector,
6281         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6282         private methods.
6283         Update all users.
6284
6285 2018-05-22  Tom Tromey  <tom@tromey.com>
6286
6287         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6288         parameter.
6289         (finish_block_internal): Update.
6290
6291 2018-07-20  Tom Tromey  <tom@tromey.com>
6292
6293         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6294         parameter.
6295         (finish_block_internal): Update.
6296
6297 2018-07-20  Tom Tromey  <tom@tromey.com>
6298
6299         * buildsym.h (EXTERN): Don't define or undef.
6300         * buildsym.c (EXTERN): Don't define.
6301
6302 2018-07-20  Tom Tromey  <tom@tromey.com>
6303
6304         * buildsym.c: Remove TODO comment.
6305
6306 2018-07-20  Tom Tromey  <tom@tromey.com>
6307
6308         * coffread.c (coff_symtab_read): Update.
6309         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6310         (xcoff_new_init): Update.
6311         * mipsread.c (mipscoff_new_init): Update.
6312         * mdebugread.c (mdebug_build_psymtabs): Update.
6313         * elfread.c (elf_new_init): Update.
6314         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6315         Update.
6316         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6317         (coffstab_build_psymtabs, elfstab_build_psymtabs)
6318         (stabsect_build_psymtabs): Update.
6319         * buildsym.h (buildsym_init): Don't declare.
6320         * buildsym.c: Update comment.
6321         (prepare_for_building): Remove.
6322         (start_symtab, restart_symtab): Update.
6323         (reset_symtab_globals): Update comment.
6324         (buildsym_init): Remove.
6325
6326 2018-07-20  Tom Tromey  <tom@tromey.com>
6327
6328         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6329         * stabsread.c (patch_block_stabs, define_symbol, read_type)
6330         (read_enum_type, common_block_start, common_block_end)
6331         (cleanup_undefined_types_1, finish_global_stabs): Update.
6332         * mdebugread.c (psymtab_to_symtab_1): Update.
6333         * dwarf2read.c (fixup_go_packaging, read_func_scope)
6334         (read_lexical_block_scope, new_symbol): Update.
6335         * dbxread.c (process_one_symbol): Update.
6336         * coffread.c (coff_symtab_read, process_coff_symbol)
6337         (coff_read_enum_type): Update.
6338         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6339         declare.
6340         (get_local_symbols, get_file_symbols, get_global_symbols): New
6341         functions.
6342         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6343         m_global_symbols.
6344         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6345         (~scoped_free_pendings): Update.
6346         (finish_block, prepare_for_building, reset_symtab_globals)
6347         (end_symtab_get_static_block, end_symtab_with_blockvector)
6348         (augment_type_symtab, push_context): Update.
6349         (get_local_symbols, get_file_symbols, get_global_symbols): New
6350         functions.
6351         (buildsym_init): Update.
6352
6353 2018-07-20  Tom Tromey  <tom@tromey.com>
6354
6355         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6356         (process_full_type_unit): Likewise.
6357         (dwarf2_start_symtab): Set list_in_scope.
6358
6359 2018-07-20  Tom Tromey  <tom@tromey.com>
6360
6361         * dwarf2read.c (process_psymtab_comp_unit_reader)
6362         (build_type_psymtabs_reader): Do not set list_in_scope.
6363
6364 2018-07-20  Tom Tromey  <tom@tromey.com>
6365
6366         * buildsym.c (free_pendings): Remove.
6367         (add_symbol_to_list, scoped_free_pendings)
6368         (finish_block_internal, buildsym_init): Update.
6369
6370 2018-07-20  Tom Tromey  <tom@tromey.com>
6371
6372         * xcoffread.c (read_xcoff_symtab): Update.
6373         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6374         Update.
6375         * dbxread.c (process_one_symbol): Update.
6376         * coffread.c (coff_symtab_read): Update.
6377         * buildsym.h (finish_block): Update.
6378         * buildsym.c (finish_block): Remove "listhead" argument.
6379         (end_symtab_get_static_block): Update.
6380
6381 2018-07-20  Tom Tromey  <tom@tromey.com>
6382
6383         * buildsym.h (class scoped_free_pendings): Remove constructor.
6384         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6385         method.
6386         <m_pending_block_obstack, m_pending_blocks>: New members.
6387         (pending_block_obstack, pending_blocks): Remove.
6388         (scoped_free_pendings::scoped_free_pendings): Default.
6389         (~scoped_free_pendings): Update.
6390         (free_pending_blocks): Remove.
6391         (finish_block_internal, record_pending_block, make_blockvector)
6392         (end_symtab_get_static_block, augment_type_symtab, push_context)
6393         (buildsym_init): Update.
6394
6395 2018-07-20  Tom Tromey  <tom@tromey.com>
6396
6397         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6398         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6399         members.
6400         (pending_addrmap, pending_addrmap_obstack)
6401         (pending_addrmap_interesting): Remove.
6402         (scoped_free_pendings, record_block_range, make_blockvector)
6403         (prepare_for_building, reset_symtab_globals, buildsym_init):
6404         Update.
6405
6406 2018-07-20  Tom Tromey  <tom@tromey.com>
6407
6408         * xcoffread.c (process_linenos): Update.
6409         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6410         * mdebugread.c (psymtab_to_symtab_1): Update.
6411         * dwarf2read.c (setup_type_unit_groups)
6412         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6413         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6414         * dbxread.c (process_one_symbol): Update.
6415         * coffread.c (coff_symtab_read, enter_linenos)
6416         (process_coff_symbol): Update.
6417         * buildsym.h (current_subfile): Don't declare.
6418         (get_current_subfile): Declare.
6419         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6420         member.
6421         (start_subfile, free_buildsym_compunit, push_subfile)
6422         (prepare_for_building, start_symtab): Update.
6423         (get_current_subfile): New function.
6424
6425 2018-07-20  Tom Tromey  <tom@tromey.com>
6426
6427         * coffread.c (coff_symtab_read): Update.
6428         * xcoffread.c (read_xcoff_symtab): Update.
6429         * dwarf2read.c (new_symbol): Update.
6430         (read_func_scope, read_lexical_block_scope): Update.
6431         * dbxread.c (process_one_symbol): Update.
6432         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6433         (outermost_context_p): Remove macro.
6434         (outermost_context_p, get_current_context_stack)
6435         (get_context_stack_depth): Declare.
6436         (pop_context): Return struct context_stack.
6437         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6438         member.
6439         (context_stack_size): Remove.
6440         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6441         (prepare_for_building, end_symtab_get_static_block)
6442         (augment_type_symtab, push_context): Update.
6443         (pop_context): Return struct context_stack.
6444         (outermost_context_p, get_current_context_stack)
6445         (get_context_stack_depth): New functions.
6446         (buildsym_init): Update.
6447
6448 2018-07-20  Tom Tromey  <tom@tromey.com>
6449
6450         * rust-exp.y: Now a pure parser.  Update all rules.
6451         (%union): Move earlier.
6452         (current_parser, work_obstack): Remove globals.
6453         (rust_parser, ~rust_parser): Update.
6454         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6455         lex_character, lex_number, lex_string, lex_identifier,
6456         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6457         convert_name, convert_params_to_expression,
6458         convert_ast_to_expression, ast_basic_type, ast_operation,
6459         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6460         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6461         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6462         ast_array_type, ast_slice_type, ast_reference_type,
6463         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6464         (rust_parse): Update.
6465         (rustyyerror, rustyylex): Add parser parameter.
6466         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6467         (rust_lex_stringish_test, rust_lex_test_sequence)
6468         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6469         (rust_lex_test_push_back, rust_lex_tests): Update.
6470
6471 2018-07-19  Pedro Alves  <palves@redhat.com>
6472
6473         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6474         gdb::unique_xmalloc_ptr.
6475         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6476         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6477         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6478         copy-initialization.
6479         * guile/scm-pretty-print.c (ppscm_print_children): Use
6480         gdb::unique_xmalloc_ptr instead of cleanups.
6481         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6482         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6483         gdb::unique_xmalloc_ptr.
6484         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6485         Adjust to use gdb::unique_xmalloc_ptr.
6486         * guile/scm-utils.c (extract_arg): Adjust.
6487         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6488         gdb::unique_xmalloc_ptr instead of a cleanup.
6489
6490 2018-07-19  Tom Tromey  <tom@tromey.com>
6491
6492         * utils.c (do_value_free_to_mark)
6493         (make_cleanup_value_free_to_mark): Remove.
6494         * utils.h (make_cleanup_value_free_to_mark): Remove.
6495
6496 2018-07-19  Pedro Alves  <palves@redhat.com>
6497
6498         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6499         forwarding reference.
6500
6501 2018-07-18  Pedro Alves  <palves@redhat.com>
6502
6503         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6504         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6505         cleanup.
6506
6507 2018-07-18  Pedro Alves  <palves@redhat.com>
6508
6509         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6510         exceptions.
6511         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6512         (gdbscm_wrap): New.
6513         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6514         directly instead of a cleanup.
6515         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6516         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6517         (vlscm_binop_gdbthrow): New, factored out from ...
6518         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6519         (vlscm_rich_compare): Use gdbscm_wrap.
6520         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6521         instead of a cleanup.
6522         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6523         cleanup.
6524         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6525         Use xfree directly instead of a cleanup.
6526         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6527         Adjust to use gdbscm_wrap and scoped_value_mark.
6528         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6529         (gdbscm_value_address, gdbscm_value_dereference)
6530         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6531         scoped_value_mark.
6532         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6533         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6534         scoped_value_mark.
6535         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6536         gdbscm_wrap and scoped_value_mark.
6537         (gdbscm_value_to_string): Use xfree directly instead of a
6538         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6539         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6540         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6541         scoped_value_mark.
6542         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6543         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6544         scoped_value_mark.
6545         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6546         gdbscm_wrap.
6547
6548 2018-07-18  Tom de Vries  <tdevries@suse.de>
6549
6550         * findvar.c (default_read_var_value): Also resolve dynamic type for
6551         LOC_OPTIMIZED_OUT vars.
6552
6553 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6554
6555         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6556         decoding.
6557
6558 2018-07-17  Tom Tromey  <tom@tromey.com>
6559
6560         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6561         (compute_enum_list, pascm_set_param_value_x)
6562         (gdbscm_parameter_value): Update.
6563         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6564         (gdbscm_scm_to_host_string): Update.
6565         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6566         Update.
6567         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6568         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6569         * guile/scm-string.c (gdbscm_scm_to_string): Return
6570         unique_xmalloc_ptr.
6571         (gdbscm_scm_to_host_string): Likewise.
6572
6573 2018-07-17  Tom Tromey  <tom@tromey.com>
6574
6575         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6576         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6577         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6578         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6579         unique_xmalloc_ptr.
6580
6581 2018-07-17  Tom Tromey  <tom@tromey.com>
6582
6583         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6584         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6585         Update.
6586         * guile/scm-cmd.c (cmdscm_function): Update.
6587         * guile/scm-pretty-print.c
6588         (ppscm_print_exception_unless_memory_error): Update.
6589         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6590         Return unique_xmalloc_ptr.
6591
6592 2018-07-17  Tom Tromey  <tom@tromey.com>
6593
6594         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6595         Use string_printf.
6596
6597 2018-07-17  Jim Wilson  <jimw@sifive.com>
6598
6599         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6600         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6601         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6602         unecessary braces after EF_RISCV_RVC test.  Delete call to
6603         set_gdbarch_decr_pc_after_break.
6604
6605         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6606         RISCV_LAST_FP_REGNUM + 1.
6607         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6608
6609 2018-07-17  Tom Tromey  <tom@tromey.com>
6610
6611         * configure.ac: Remove --disable-gdbcli.
6612         * configure: Rebuild.
6613         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6614         (SUBDIR_CLI_CFLAGS): Remove.
6615         (SFILES): Use SUBDIR_CLI_SRCS.
6616         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6617
6618 2018-07-17  Tom Tromey  <tom@tromey.com>
6619
6620         PR gdb/18624:
6621         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6622
6623 2018-07-16  Jim Wilson  <jimw@sifive.com>
6624
6625         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6626
6627 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6628
6629         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6630         variable.
6631         (libunwind_frame_sniffer): Likewise.
6632         (libunwind_frame_prev_register): Likewise.
6633         (libunwind_sigtramp_frame_sniffer): Likewise.
6634         * ia64-tdep.c (ia64_access_reg): Likewise.
6635         (ia64_access_rse_reg): Likewise.
6636         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6637         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6638
6639 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6640
6641         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6642
6643 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6644
6645         * remote-sim.c (gdbsim_target::close,
6646         gdbsim_target::mourn_inferior): Remove unused variables.
6647
6648 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6649
6650         * ia64-tdep.c (ktab_buf): New global.
6651         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6652         (get_kernel_table): Adjust.
6653
6654 2018-07-16  Tom Tromey  <tom@tromey.com>
6655
6656         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6657         * dwarf2read.c (using_directives, new_symbol): Use
6658         outermost_context_p.
6659         * dbxread.c (process_one_symbol): Use outermost_context_p.
6660         * coffread.c (coff_symtab_read): Use outermost_context_p.
6661
6662 2018-07-16  Tom Tromey  <tom@tromey.com>
6663
6664         * dwarf2read.c (using_directives, read_func_scope)
6665         (read_lexical_block_scope): Update.
6666         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6667         * buildsym.h (local_using_directives, global_using_directives):
6668         Don't declare.
6669         (get_local_using_directives, set_local_using_directives)
6670         (get_global_using_directives): Declare.
6671         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6672         m_global_using_directives>: New members.
6673         (finish_block_internal, prepare_for_building)
6674         (reset_symtab_globals, end_symtab_get_static_block)
6675         (push_context): Update.
6676         (get_local_using_directives, set_local_using_directives)
6677         (get_global_using_directives): New functions.
6678         (buildsym_init): Update.
6679
6680 2018-07-16  Tom Tromey  <tom@tromey.com>
6681
6682         * xcoffread.c (xcoff_initial_scan): Don't call
6683         free_pending_blocks.
6684         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6685         * buildsym.h (class scoped_free_pendings): Add constructor.
6686         (free_pending_blocks): Don't declare.
6687         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6688         (free_pending_blocks): Now static.
6689
6690 2018-07-16  Tom Tromey  <tom@tromey.com>
6691
6692         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6693         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6694         member.
6695         (struct subfile_stack): Remove.
6696         (subfile_stack): Remove.
6697         (push_subfile, pop_subfile, buildsym_init): Update.
6698
6699 2018-07-16  Tom Tromey  <tom@tromey.com>
6700
6701         * buildsym.c (push_subfile): Use gdb_assert.
6702         (pop_subfile): Use gdb_assert.
6703
6704 2018-07-16  Tom Tromey  <tom@tromey.com>
6705
6706         * buildsym.h (merge_symbol_lists): Remove.
6707         * buildsym.c (merge_symbol_lists): Remove.
6708
6709 2018-07-16  Tom Tromey  <tom@tromey.com>
6710
6711         * stabsread.c (scan_file_globals): Update comment.
6712         * stabsread.h (scan_file_globals): Move from buildsym.h.
6713         * buildsym.h (scan_file_globals): Move to stabsread.h.
6714
6715 2018-07-16  Tom Tromey  <tom@tromey.com>
6716
6717         * xcoffread.c (xcoff_new_init): Update.
6718         * mipsread.c (mipscoff_new_init): Update.
6719         * mdebugread.c (mdebug_build_psymtabs): Update.
6720         * elfread.c (elf_new_init): Update.
6721         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6722         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6723         * buildsym.h (buildsym_new_init): Don't declare.
6724         * buildsym.c (buildsym_new_init): Remove.
6725
6726 2018-07-16  Tom Tromey  <tom@tromey.com>
6727
6728         * stabsread.h (within_function): Move from buildsym.h.
6729         * stabsread.c (start_stabs): Clear within_function.
6730         * coffread.c (coff_start_symtab): Clear within_function.
6731         * buildsym.h (within_function): Move to stabsread.h.
6732         * buildsym.c (prepare_for_building): Update.
6733
6734 2018-07-16  Tom Tromey  <tom@tromey.com>
6735
6736         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6737         * dwarf2read.c (dwarf2_start_symtab): Don't set
6738         processing_gcc_compilation.
6739         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6740
6741 2018-07-16  Tom Tromey  <tom@tromey.com>
6742
6743         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6744         (next_symbol_text_func): Move from buildsym.h.
6745         * stabsread.c (hashname): Move from buildsym.c.
6746         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6747         (next_symbol_text_func, hashname): Move to stabsread.h.
6748         * buildsym.c: Don't include bcache.h
6749         (hashname): Move to stasbread.c.
6750
6751 2018-07-16  Tom Tromey  <tom@tromey.com>
6752
6753         * buildsym.h (context_stack_size): Don't declare.
6754         * buildsym.c (context_stack_size): New global.
6755
6756 2018-07-16  Tom Tromey  <tom@tromey.com>
6757
6758         * dbxread.c (processing_acc_compilation): New global.
6759         * buildsym.h (processing_acc_compilation): Don't declare.
6760
6761 2018-07-16  Tom Tromey  <tom@tromey.com>
6762
6763         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6764         * dbxread.c (read_ofile_symtab): Update.
6765         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6766         * buildsym.h (last_source_start_addr): Remove.
6767         (set_last_source_start_addr, get_last_source_start_addr):
6768         Declare.
6769         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6770         parameter.
6771         (struct buildsym_compunit) <m_last_source_start_addr>: New
6772         member.
6773         (prepare_for_building): Remove start_addr parameter.
6774         (start_symtab, restart_symtab, end_symtab_get_static_block)
6775         (end_symtab_with_blockvector): Update.
6776         (set_last_source_start_addr, get_last_source_start_addr): New
6777         functions.
6778
6779 2018-07-16  Tom Tromey  <tom@tromey.com>
6780
6781         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6782         member.
6783         (have_line_numbers): Remove.
6784         (record_line, prepare_for_building, end_symtab_get_static_block)
6785         (augment_type_symtab): Update.
6786
6787 2018-07-16  Tom Tromey  <tom@tromey.com>
6788
6789         * buildsym.c (~buildsym_compunit): Free the macro table.
6790         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6791         methods.
6792         <m_pending_macros>: New member.
6793         (pending_macros): Remove.
6794         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6795         (reset_symtab_globals, end_symtab_get_static_block)
6796         (end_symtab_with_blockvector, augment_type_symtab)
6797         (buildsym_init): Update.
6798
6799 2018-07-16  Tom Tromey  <tom@tromey.com>
6800
6801         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6802         parameter.
6803         (buildsym_compunit::set_last_source_file): New method.
6804         <m_last_source_file>: New member.
6805         (prepare_for_building): Remove "name" parameter.
6806         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6807         (last_source_file): Remove.
6808         (set_last_source_file, get_last_source_file): Update.
6809
6810 2018-07-16  Tom Tromey  <tom@tromey.com>
6811
6812         * buildsym.c (prepare_for_building): Add assert.
6813
6814 2018-07-16  Tom Tromey  <tom@tromey.com>
6815
6816         * buildsym.c (~buildsym_compunit): Update.
6817         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6818         (start_subfile, patch_subfile_names)
6819         (end_symtab_with_blockvector): Update.
6820
6821 2018-07-16  Tom Tromey  <tom@tromey.com>
6822
6823         * buildsym.c (struct buildsym_compunit): Add constructor,
6824         destructor, initializers.
6825         (start_buildsym_compunit): Remove.
6826         (free_buildsym_compunit): Use "delete".
6827         (start_symtab, restart_symtab): Use "new".
6828
6829 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6830
6831         * symfile.c (set_objfile_default_section_offset): Remove struct
6832         keyword.
6833
6834 2018-07-14  Stafford Horne  <shorne@gmail.com>
6835
6836         * (Responsible Maintainers): Add myself as or1k maintainer.
6837
6838 2018-07-13  Tom Tromey  <tom@tromey.com>
6839
6840         * symfile.c (set_objfile_default_section_offset): Use extra braces
6841         around initializer.
6842
6843 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6844
6845         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6846         non-branching basr.
6847
6848 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6849
6850         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6851         unittests/cli-utils-selftests.c
6852         * unittests/cli-utils-selftests.c: New file.
6853
6854 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6855
6856         * NEWS: Mention new commands. Mention change to 'thread apply'.
6857
6858 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6859
6860         * thread.c (thr_try_catch_cmd): New function.
6861         (thread_apply_all_command): Handle qcs flags.
6862         (thread_apply_command): Handle qcs flags.
6863         (taas_command): New function.
6864         (tfaas_command): New function.
6865         (_initialize_thread): Update to setup the new commands 'taas
6866         and 'tfaas'. Change doc string for 'thread apply'.
6867
6868 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6869
6870         * stack.c: (trailing_outermost_frame): New function, mostly
6871         extracted from backtrace_command_1.
6872         (leading_innermost_frame): New function.
6873         (backtrace_command_1): Update to call trailing_outermost_frame.
6874         (frame_apply_command_count): New function.
6875         (frame_apply_level_command): New function.
6876         (frame_apply_all_command): New function.
6877         (frame_apply_command): New function.
6878         (faas_command): New function.
6879         (frame_cmd_list): New variable.
6880         (_initialize_stack): Update to setup the new commands 'frame apply'
6881         and 'faas'.
6882
6883 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6884
6885         * cli-utils.c (number_or_range_parser::get_number): Only handle
6886         numbers or convenience var as numbers.
6887         (parse_flags): New function.
6888         (parse_flags_qcs): New function.
6889         (number_or_range_parser::finished): Ensure parsing end is detected
6890         before end of string.
6891         * cli-utils.h (parse_flags): New function.
6892         (parse_flags_qcs): New function.
6893         (number_or_range_parser): Remove m_finished bool.
6894         (number_or_range_parser::skip_range): Set m_in_range to false.
6895
6896 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6897
6898         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6899         on Windows.
6900
6901 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6902             Jan Kratochvil  <jan.kratochvil@redhat.com>
6903             Paul Fertser  <fercerpav@gmail.com>
6904             Tsutomu Seki  <sekiriki@gmail.com>
6905             Pedro Alves  <palves@redhat.com>
6906
6907         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6908         'unittests/parse-connection-spec-selftests.c'.
6909         (COMMON_SFILES): Add 'common/netstuff.c'.
6910         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6911         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6912         * common/netstuff.c: New file.
6913         * common/netstuff.h: New file.
6914         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6915         (wait_for_connect): Update comment.  New parameter
6916         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6917         Use 'sock' directly instead of 'scb->fd'.
6918         (try_connect): New function, with code from 'net_open'.
6919         (net_open): Rewrite main loop to deal with multiple
6920         sockets/addresses.  Handle IPv6-style hostnames; implement
6921         support for IPv6 connections.
6922         * unittests/parse-connection-spec-selftests.c: New file.
6923
6924 2018-07-11  Pedro Alves  <palves@redhat.com>
6925
6926         PR gdb/23377
6927         * remote.c (remote_target::remote_detach_pid): Call
6928         set_current_process.
6929
6930 2018-07-11  Pedro Alves  <palves@redhat.com>
6931
6932         * h8300-tdep.c (h8300_gdbarch_init): Remove
6933         set_gdbarch_ecoff_reg_to_regnum calls.
6934
6935 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6936
6937         PR c++/23373
6938         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6939         offsets/sizes for static members of a class/struct.
6940
6941 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6942
6943         * target-descriptions.c (tdesc_register_bitsize): Rename.
6944         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6945         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6946         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6947
6948 2018-07-10  Tom Tromey  <tom@tromey.com>
6949
6950         * breakpoint.c (moribund_locations): Now static and a
6951         std::vector.
6952         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6953         (build_bpstat_chain, update_global_location_list)
6954         (breakpoint_retire_moribund): Update.
6955         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6956         VEC.
6957
6958 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6959
6960         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6961         (riscv_register_reggroup_p): Use new function, remove unneeded
6962         parenthesis.
6963         (riscv_push_dummy_call): Extend assert to compare against xlen or
6964         flen based on register type.
6965
6966 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6967
6968         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6969
6970 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6971
6972         * remote.c (show_hardware_watchpoint_limit): New function.
6973         (show_hardware_watchpoint_length_limit): New function.
6974         (show_hardware_breakpoint_limit): New function.
6975         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6976         where appropriate, update help text.
6977
6978 2018-07-09  Tom Tromey  <tom@tromey.com>
6979
6980         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6981         (CLIBS): Don't mention NAT_CLIBS.
6982
6983 2018-07-09  Tom Tromey  <tom@tromey.com>
6984
6985         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6986         (LIBGDB_OBS, clean mostlyclean): Update.
6987         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6988
6989 2018-07-09  Tom Tromey  <tom@tromey.com>
6990
6991         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6992         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6993         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6994
6995 2018-07-09  Tom Tromey  <tom@tromey.com>
6996
6997         * Makefile.in (ALLDEPFILES): Remove exec.c.
6998         (COMMON_OBS): Remove exec.o.
6999         (COMMON_SFILES): Add exec.c.
7000
7001 2018-07-09  Tom Tromey  <tom@tromey.com>
7002
7003         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
7004
7005 2018-07-09  Tom Tromey  <tom@tromey.com>
7006
7007         * Makefile.in (clean mostlyclean): Remove stamp-version.
7008         (version.c): Depend on stamp-version.
7009         (stamp-version): New rule, from version.c rule.
7010
7011 2018-07-09  Tom Tromey  <tom@tromey.com>
7012
7013         * Makefile.in (init.c): Depend on stamp-init.
7014         (stamp-init): New rule, from init.c rule.
7015         (clean mostlyclean): Remove stamp-init.
7016
7017 2018-07-09  Tom Tromey  <tom@tromey.com>
7018
7019         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
7020         SUBDIR_GCC_COMPILE_SRCS.
7021
7022 2018-07-09  Tom Tromey  <tom@tromey.com>
7023
7024         * Makefile.in (init.c): Remove some unused sed rules.
7025
7026 2018-07-09  Tom Tromey  <tom@tromey.com>
7027
7028         * Makefile.in (TSOBS): Remove.
7029         (INIT_FILES): Update.
7030         (LIBGDB_OBS): Update.
7031         (COMMON_SFILES): Add inflow.c.
7032         (SFILES): Remove inflow.c.
7033
7034 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7035
7036         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7037
7038 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
7039
7040         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7041         get_saveloc_name, is_signal_frame_name, step_name,
7042         init_remote_name, create_addr_space_name,
7043         destroy_addr_space_name, search_unwind_table_name,
7044         find_dyn_list_name): Constify.
7045
7046 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
7047
7048         * darwin-nat.c (darwin_pthread_kill): New function.
7049         (darwin_resume_thread): Use darwin_pthread_kill.
7050
7051 2018-07-05  Tom de Vries  <tdevries@suse.de>
7052
7053         * macroexp.c (macro_buffer) <operator=>: New member function.
7054
7055 2018-07-04  Tom Tromey  <tom@tromey.com>
7056
7057         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7058
7059 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
7060
7061         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7062         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7063         * maint.c: Likewise.
7064         * top.c: Likewise.
7065
7066 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7067
7068         * NEWS: Create a new section for the next release branch.
7069         Rename the section of the current branch, now that it has
7070         been cut.
7071
7072 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7073
7074         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7075         * version.in: Bump version to 8.2.50.DATE-git.
7076
7077 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
7078             Pedro Alves  <palves@redhat.com>
7079
7080         * linux-nat.c (linux_init_ptrace): Rename to ...
7081         (linux_init_ptrace_procfs): ... this.  Call
7082         linux_proc_init_warnings.
7083         (linux_nat_target::post_attach)
7084         (linux_nat_target::post_startup_inferior): Adjust.
7085         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7086         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7087
7088 2018-07-04  Tom de Vries  <tdevries@suse.de>
7089
7090         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7091         check ...
7092         (read_comp_unit_head): ... here.
7093
7094 2018-07-03  Tom Tromey  <tom@tromey.com>
7095
7096         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7097         (stop_tracing, tstatus_command)
7098         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7099         (print_one_static_tracepoint_marker): Update.
7100         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7101         std::vector.
7102         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
7103         VEC.
7104         (all_tracepoints, static_tracepoints_here): Return std::vector.
7105
7106 2018-07-03  Tom Tromey  <tom@tromey.com>
7107
7108         * common/ptid.c (ptid_equal): Remove.
7109         * common/ptid.h (ptid_equal): Don't declare.
7110         * ada-tasks.c: Update.
7111         * breakpoint.c: Update.
7112         * common/agent.c: Update.
7113         * corelow.c: Update.
7114         * darwin-nat-info.c: Update.
7115         * darwin-nat.c: Update.
7116         * dcache.c: Update.
7117         * dtrace-probe.c: Update.
7118         * dummy-frame.c: Update.
7119         * fbsd-nat.c: Update.
7120         * frame.c: Update.
7121         * gdbthread.h: Update.
7122         * gnu-nat.c: Update.
7123         * go32-nat.c: Update.
7124         * inf-loop.c: Update.
7125         * inf-ptrace.c: Update.
7126         * infcall.c: Update.
7127         * infcmd.c: Update.
7128         * inflow.c: Update.
7129         * infrun.c: Update.
7130         * linux-fork.c: Update.
7131         * linux-nat.c: Update.
7132         * linux-thread-db.c: Update.
7133         * mi/mi-cmd-var.c: Update.
7134         * mi/mi-interp.c: Update.
7135         * mi/mi-main.c: Update.
7136         * nto-procfs.c: Update.
7137         * ppc-linux-tdep.c: Update.
7138         * procfs.c: Update.
7139         * python/py-inferior.c: Update.
7140         * python/py-record-btrace.c: Update.
7141         * python/py-record.c: Update.
7142         * ravenscar-thread.c: Update.
7143         * regcache.c: Update.
7144         * remote-sim.c: Update.
7145         * remote.c: Update.
7146         * sol-thread.c: Update.
7147         * solib.c: Update.
7148         * target.c: Update.
7149         * tui/tui-stack.c: Update.
7150         * varobj.c: Update.
7151         * windows-nat.c: Update.
7152         * windows-tdep.c: Update.
7153
7154 2018-07-03  Tom Tromey  <tom@tromey.com>
7155
7156         * common/ptid.c (ptid_match): Remove.
7157         * common/ptid.h (ptid_match): Don't declare.
7158         * fbsd-nat.c: Update.
7159         * infcmd.c: Update.
7160         * infrun.c: Update.
7161         * linux-nat.c: Update.
7162         * record-btrace.c: Update.
7163         * regcache.c: Update.
7164         * remote.c: Update.
7165
7166 2018-07-03  Tom Tromey  <tom@tromey.com>
7167
7168         * common/ptid.c (ptid_tid_p): Remove.
7169         * common/ptid.h (ptid_tid_p): Don't declare.
7170         * sol-thread.c: Update.
7171
7172 2018-07-03  Tom Tromey  <tom@tromey.com>
7173
7174         * common/ptid.c (ptid_lwp_p): Remove.
7175         * common/ptid.h (ptid_lwp_p): Don't declare.
7176         * fbsd-nat.c: Update.
7177         * linux-nat.c: Update.
7178         * nat/linux-procfs.c: Update.
7179         * nat/x86-linux-dregs.c: Update.
7180         * sol-thread.c: Update.
7181
7182 2018-07-03  Tom Tromey  <tom@tromey.com>
7183
7184         * common/ptid.c (ptid_is_pid): Remove.
7185         * common/ptid.h (ptid_is_pid): Don't declare.
7186         * infrun.c: Update.
7187         * linux-nat.c: Update.
7188         * mi/mi-interp.c: Update.
7189         * remote.c: Update.
7190         * thread.c: Update.
7191
7192 2018-07-03  Tom Tromey  <tom@tromey.com>
7193
7194         * common/ptid.c (ptid_get_tid): Remove.
7195         * common/ptid.h (ptid_get_tid): Don't declare.
7196         * ada-tasks.c: Update.
7197         * aix-thread.c: Update.
7198         * bsd-uthread.c: Update.
7199         * darwin-nat.c: Update.
7200         * fbsd-nat.c: Update.
7201         * i386-darwin-nat.c: Update.
7202         * infrun.c: Update.
7203         * linux-tdep.c: Update.
7204         * nto-procfs.c: Update.
7205         * ppc-ravenscar-thread.c: Update.
7206         * python/py-infthread.c: Update.
7207         * ravenscar-thread.c: Update.
7208         * sol-thread.c: Update.
7209         * sparc-ravenscar-thread.c: Update.
7210         * windows-nat.c: Update.
7211
7212 2018-07-03  Tom Tromey  <tom@tromey.com>
7213
7214         * common/ptid.c (ptid_get_lwp): Remove.
7215         * common/ptid.h (ptid_get_lwp): Don't declare.
7216         * aarch64-linux-nat.c: Update.
7217         * ada-tasks.c: Update.
7218         * aix-thread.c: Update.
7219         * amd64-linux-nat.c: Update.
7220         * arm-linux-nat.c: Update.
7221         * corelow.c: Update.
7222         * fbsd-nat.c: Update.
7223         * fbsd-tdep.c: Update.
7224         * gnu-nat.c: Update.
7225         * i386-cygwin-tdep.c: Update.
7226         * i386-gnu-nat.c: Update.
7227         * i386-linux-nat.c: Update.
7228         * ia64-linux-nat.c: Update.
7229         * inf-ptrace.c: Update.
7230         * infrun.c: Update.
7231         * linux-fork.c: Update.
7232         * linux-nat.c: Update.
7233         * linux-tdep.c: Update.
7234         * linux-thread-db.c: Update.
7235         * mips-linux-nat.c: Update.
7236         * nat/aarch64-linux-hw-point.c: Update.
7237         * nat/aarch64-linux.c: Update.
7238         * nat/linux-btrace.c: Update.
7239         * nat/linux-osdata.c: Update.
7240         * nat/linux-procfs.c: Update.
7241         * nat/x86-linux-dregs.c: Update.
7242         * obsd-nat.c: Update.
7243         * ppc-fbsd-nat.c: Update.
7244         * ppc-linux-nat.c: Update.
7245         * procfs.c: Update.
7246         * python/py-infthread.c: Update.
7247         * ravenscar-thread.c: Update.
7248         * remote.c: Update.
7249         * s390-linux-nat.c: Update.
7250         * sol-thread.c: Update.
7251         * sol2-tdep.c: Update.
7252         * spu-linux-nat.c: Update.
7253         * x86-linux-nat.c: Update.
7254         * xtensa-linux-nat.c: Update.
7255
7256 2018-07-03  Tom Tromey  <tom@tromey.com>
7257
7258         * common/ptid.c (ptid_get_pid): Remove.
7259         * common/ptid.h (ptid_get_pid): Don't declare.
7260         * aarch64-linux-nat.c: Update.
7261         * ada-lang.c: Update.
7262         * aix-thread.c: Update.
7263         * alpha-bsd-nat.c: Update.
7264         * amd64-fbsd-nat.c: Update.
7265         * amd64-linux-nat.c: Update.
7266         * arm-linux-nat.c: Update.
7267         * arm-nbsd-nat.c: Update.
7268         * auxv.c: Update.
7269         * break-catch-syscall.c: Update.
7270         * breakpoint.c: Update.
7271         * bsd-uthread.c: Update.
7272         * corelow.c: Update.
7273         * ctf.c: Update.
7274         * darwin-nat.c: Update.
7275         * fbsd-nat.c: Update.
7276         * fbsd-tdep.c: Update.
7277         * gcore.c: Update.
7278         * gnu-nat.c: Update.
7279         * hppa-nbsd-nat.c: Update.
7280         * hppa-obsd-nat.c: Update.
7281         * i386-fbsd-nat.c: Update.
7282         * ia64-linux-nat.c: Update.
7283         * inf-ptrace.c: Update.
7284         * infcmd.c: Update.
7285         * inferior.c: Update.
7286         * inferior.h: Update.
7287         * inflow.c: Update.
7288         * infrun.c: Update.
7289         * linux-fork.c: Update.
7290         * linux-nat.c: Update.
7291         * linux-tdep.c: Update.
7292         * linux-thread-db.c: Update.
7293         * m68k-bsd-nat.c: Update.
7294         * mi/mi-interp.c: Update.
7295         * mi/mi-main.c: Update.
7296         * mips-linux-nat.c: Update.
7297         * mips-nbsd-nat.c: Update.
7298         * mips64-obsd-nat.c: Update.
7299         * nat/aarch64-linux-hw-point.c: Update.
7300         * nat/aarch64-linux.c: Update.
7301         * nat/linux-btrace.c: Update.
7302         * nat/linux-osdata.c: Update.
7303         * nat/linux-procfs.c: Update.
7304         * nat/x86-linux-dregs.c: Update.
7305         * nto-procfs.c: Update.
7306         * obsd-nat.c: Update.
7307         * ppc-linux-nat.c: Update.
7308         * ppc-nbsd-nat.c: Update.
7309         * ppc-obsd-nat.c: Update.
7310         * proc-service.c: Update.
7311         * procfs.c: Update.
7312         * python/py-inferior.c: Update.
7313         * python/py-infthread.c: Update.
7314         * ravenscar-thread.c: Update.
7315         * record.c: Update.
7316         * remote-sim.c: Update.
7317         * remote.c: Update.
7318         * rs6000-nat.c: Update.
7319         * s390-linux-nat.c: Update.
7320         * sh-nbsd-nat.c: Update.
7321         * sol-thread.c: Update.
7322         * sparc-nat.c: Update.
7323         * sparc64-tdep.c: Update.
7324         * spu-linux-nat.c: Update.
7325         * spu-tdep.c: Update.
7326         * target-debug.h: Update.
7327         * target.c: Update.
7328         * thread.c: Update.
7329         * tid-parse.c: Update.
7330         * tracefile-tfile.c: Update.
7331         * vax-bsd-nat.c: Update.
7332         * windows-nat.c: Update.
7333         * x86-linux-nat.c: Update.
7334         * x86-nat.c: Update.
7335
7336 2018-07-03  Tom Tromey  <tom@tromey.com>
7337
7338         * common/ptid.c (pid_to_ptid): Remove.
7339         * common/ptid.h (pid_to_ptid): Don't declare.
7340         * aix-thread.c: Update.
7341         * arm-linux-nat.c: Update.
7342         * common/ptid.c: Update.
7343         * common/ptid.h: Update.
7344         * corelow.c: Update.
7345         * ctf.c: Update.
7346         * darwin-nat.c: Update.
7347         * fbsd-nat.c: Update.
7348         * fork-child.c: Update.
7349         * gnu-nat.c: Update.
7350         * go32-nat.c: Update.
7351         * inf-ptrace.c: Update.
7352         * infcmd.c: Update.
7353         * inferior.c: Update.
7354         * infrun.c: Update.
7355         * linux-fork.c: Update.
7356         * linux-nat.c: Update.
7357         * nat/aarch64-linux-hw-point.c: Update.
7358         * nat/fork-inferior.c: Update.
7359         * nat/x86-linux-dregs.c: Update.
7360         * nto-procfs.c: Update.
7361         * obsd-nat.c: Update.
7362         * procfs.c: Update.
7363         * progspace.c: Update.
7364         * remote.c: Update.
7365         * rs6000-nat.c: Update.
7366         * s390-linux-nat.c: Update.
7367         * sol-thread.c: Update.
7368         * spu-linux-nat.c: Update.
7369         * target.c: Update.
7370         * top.c: Update.
7371         * tracefile-tfile.c: Update.
7372         * windows-nat.c: Update.
7373
7374 2018-07-03  Tom Tromey  <tom@tromey.com>
7375
7376         * common/ptid.h (ptid_build): Don't declare.
7377         * common/ptid.c (ptid_build): Remove.
7378         * aix-thread.c: Update.
7379         * bsd-kvm.c: Update.
7380         * bsd-uthread.c: Update.
7381         * common/agent.c: Update.
7382         * common/ptid.c: Update.
7383         * common/ptid.h: Update.
7384         * corelow.c: Update.
7385         * darwin-nat.c: Update.
7386         * fbsd-nat.c: Update.
7387         * gnu-nat.c: Update.
7388         * linux-fork.c: Update.
7389         * linux-nat.c: Update.
7390         * linux-thread-db.c: Update.
7391         * nat/linux-osdata.c: Update.
7392         * nat/linux-procfs.c: Update.
7393         * nto-procfs.c: Update.
7394         * obsd-nat.c: Update.
7395         * proc-service.c: Update.
7396         * procfs.c: Update.
7397         * ravenscar-thread.c: Update.
7398         * remote-sim.c: Update.
7399         * remote.c: Update.
7400         * sol-thread.c: Update.
7401         * target.c: Update.
7402         * windows-nat.c: Update.
7403
7404 2018-07-03  Tom Tromey  <tom@tromey.com>
7405
7406         * infrun.c (follow_exec): Use exit_inferior_silent.
7407         * inferior.c (exit_inferior_num_silent): Remove.
7408         * inferior.h (exit_inferior_num_silent): Don't declare.
7409
7410 2018-07-03  Tom Tromey  <tom@tromey.com>
7411
7412         PR cli/23340:
7413         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7414         inferior_ptid on error.
7415
7416 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7417             Simon Marchi  <simon.marchi@polymtl.ca>
7418
7419         PR tdep/8282
7420         * disasm.h (gdb_disassembler): Add
7421         `m_disassembler_options_holder'. member
7422         * disasm.c (get_all_disassembler_options): New function.
7423         (gdb_disassembler::gdb_disassembler): Use it.
7424         (gdb_buffered_insn_length_init_dis): Likewise.
7425         (gdb_buffered_insn_length): Adjust accordingly.
7426         (set_disassembler_options): Handle options with arguments.
7427         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7428         line if showing options with descriptions.
7429         (disassembler_options_completer): Adapt to using the
7430         `disasm_options_and_args_t' structure.
7431         * mips-tdep.c (mips_disassembler_options): New variable.
7432         (mips_disassembler_options_o32): Likewise.
7433         (mips_disassembler_options_n32): Likewise.
7434         (mips_disassembler_options_n64): Likewise.
7435         (gdb_print_insn_mips): Don't set `disassembler_options'.
7436         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7437         functions.
7438         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7439         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7440         `gdbarch_disassembler_options_implicit' and
7441         `gdbarch_valid_disassembler_options'.
7442         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7443         `disasm_options_and_args_t' structure.
7444         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7445         method.
7446         (valid_disassembler_options): Switch from `disasm_options_t' to
7447         the `disasm_options_and_args_t' structure.
7448         * NEWS: Document `set disassembler-options' support for the MIPS
7449         target.
7450         * gdbarch.h: Regenerate.
7451         * gdbarch.c: Regenerate.
7452
7453 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7454
7455         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7456
7457 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7458
7459         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7460         parameter in call to amd64_target_description.
7461         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7462         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7463         (amd64fbsd_init_abi): Likewise.
7464         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7465         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7466         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7467         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7468
7469 2018-06-29  Pedro Alves  <palves@redhat.com>
7470
7471         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7472         "segments" parameter.
7473         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7474         (_initialize_amd64_tdep): Update call to
7475         amd64_create_target_description.
7476         (amd64_target_description): Add "segments" parameter.  Adjust
7477         the implementation to use it.
7478         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7479         call to amd64_create_target_description.
7480         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7481         * gdb/arch/amd64.h (amd64_create_target_description): Add
7482         "segments" register.
7483         * gdb/arch/amd64.c (amd64_create_target_description): Add
7484         "segments" parameter.  Call create_feature_i386_64bit_segments
7485         only if SEGMENTS is true.
7486         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7487         call to amd64_create_target_description.
7488
7489 2018-06-29  Pedro Alves  <palves@redhat.com>
7490
7491         * thread.c (thread_target_id_str): New, factored out from ...
7492         (print_thread_info_1): ... here.  Use it to compute the max
7493         "Target Id" column width.
7494
7495 2018-06-29  Pedro Alves  <palves@redhat.com>
7496
7497         * remote.c (remote_target::extra_thread_info): Delete
7498         'display_buf' and 'n' locals.  from the cache, regardless of
7499         packet mechanims is in use.  Use cache for qThreadExtra and qP
7500         methods too.
7501
7502 2018-06-29  Pedro Alves  <palves@redhat.com>
7503
7504         * blockframe.c (find_pc_sect_containing_function): New function.
7505         * breakpoint.c (print_breakpoint_location): Don't call
7506         find_pc_sect_function.
7507         * linespec.c (create_sals_line_offset): Record the location's
7508         symbol in the sal.
7509         * linespec.c (convert_address_location_to_sals): Fill in sal's
7510         symbol with find_pc_sect_containing_function.
7511         * symtab.c (find_function_start_sal): Rename to ...
7512         (find_function_start_sal_1): ... this.
7513         (find_function_start_sal): Reimplement as wrapper around
7514         find_function_start_sal_1, and use
7515         find_pc_sect_containing_function to fill in the sal's symbol.
7516         (find_function_start_sal(symbol*, bool)): Adjust.
7517         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7518         comments.
7519         (find_pc_sect_containing_function): Declare.
7520
7521 2018-06-29  Pedro Alves  <palves@redhat.com>
7522
7523         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7524         true if the the location has no symbol.
7525
7526 2018-06-28  Tom Tromey  <tom@tromey.com>
7527
7528         * NEWS: Mention --enable-codesign.
7529         * silent-rules.mk (ECHO_SIGN): New variable.
7530         * configure.ac: Add --enable-codesign.
7531         * configure: Rebuild.
7532         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7533         (gdb$(EXEEXT)): Optionally invoke codesign.
7534
7535 2018-06-28  Pedro Alves  <palves@redhat.com>
7536
7537         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7538         comments.
7539         (switch_to_thread_no_regs): Adjust comment.
7540         * infcmd.c (stop_pc): Delete.
7541         (post_create_inferior, info_program_command): Replace references
7542         to stop_pc with references to thread_info->suspend.stop_pc.
7543         * inferior.h (stop_pc): Delete declaration.
7544         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7545         (handle_inferior_event_1, handle_signal_stop)
7546         (process_event_stop_test, keep_going_stepped_thread)
7547         (handle_step_into_function, handle_step_into_function_backward)
7548         (print_stop_location): Replace references to stop_pc with
7549         references to thread_info->suspend.stop_pc.
7550         (struct infcall_suspend_state) <stop_pc>: Delete field.
7551         (save_infcall_suspend_state, restore_infcall_suspend_state):
7552         Remove references to inf_stat->stop_pc.
7553         * linux-fork.c (fork_load_infrun_state): Likewise.
7554         * record-btrace.c (record_btrace_set_replay): Likewise.
7555         * record-full.c (record_full_goto_entry): Likewise.
7556         * remote.c (print_one_stopped_thread): Likewise.
7557         * target.c (target_resume): Extend comment.
7558         * thread.c (set_executing_thread): New.
7559         (set_executing): Use it.
7560         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7561         Remove references to stop_pc.
7562
7563 2018-06-28  Pedro Alves  <palves@redhat.com>
7564
7565         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7566         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7567
7568 2018-06-28  Tom Tromey  <tom@tromey.com>
7569
7570         * coffread.c (coff_symfile_finish): Update.
7571         * xcoffread.c (xcoff_symfile_finish): Update.
7572         * elfread.c (elf_symfile_finish): Update.
7573         * symfile.h (dwarf2_free_objfile): Don't declare.
7574         * dwarf2read.c (_initialize_dwarf2_read): Use
7575         register_objfile_data_with_cleanup.
7576         (dwarf2_free_objfile): Now static.  Change signature.
7577
7578 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7579
7580         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7581         option "-o" to add-symbol-file-load to add an offset to each
7582         section's load address.
7583         * symfile.c (set_objfile_default_section_offset): New function.
7584
7585 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7586
7587         * symfile.c (add_symbol_file_command): Make sure that sections
7588         with the same name are sorted in the same order.
7589
7590 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7591
7592         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7593         require the second argument.  If omitted, load sections at the
7594         addresses specified in the file.
7595
7596 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7597
7598         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7599         (_initialize_symfile): Add option "-o" to symbol-file to add an
7600         offset to each section of the symbol file.
7601
7602 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7603
7604         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7605
7606 2018-06-27  Tom Tromey  <tom@tromey.com>
7607
7608         * stack.c (_initialize_stack): Update "func" help text.
7609
7610 2018-06-27  Tom Tromey  <tom@tromey.com>
7611
7612         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7613         std::vector.
7614         (unwind_infopy_str, pyuw_create_unwind_info)
7615         (unwind_infopy_add_saved_register, pyuw_sniffer)
7616         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7617         Update.
7618         (struct saved_reg): Add constructor.
7619         <value>: Now a gdbpy_ref<>.
7620
7621 2018-06-27  Tom Tromey  <tom@tromey.com>
7622
7623         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7624
7625 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7626
7627         * gdb-gdb.py.in: Format using autopep8.
7628
7629 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7630
7631         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7632         (type_lookup_function): Recognize CORE_ADDR values.
7633
7634 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7635
7636         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7637         print tag_name.
7638
7639 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7640
7641         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7642         <__lt__>: Add.
7643
7644 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7645
7646         * gdb-gdb.py: Move to...
7647         * gdb-gdb.py.in: ... here.
7648         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7649         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7650         dependencies.
7651         (distclean): Remove gdb-gdb.py when cleaning.
7652         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7653         * configure: Re-generate.
7654
7655 2018-06-27  Pedro Alves  <palves@redhat.com>
7656
7657         * proc-service.c (get_ps_regcache): New.
7658         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7659         (ps_lsetfpregs): Use it.
7660
7661 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7662
7663         PR gdb/21695
7664         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7665         declaration.
7666         (dwarf_decode_lines_1): Adjust.
7667
7668 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7669
7670         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7671         override.
7672         <info_proc>: Likewise.
7673
7674 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7675
7676         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7677         to windows_fetch_one_register, and only handle the case of
7678         fetching one register.  Move the code that reloads the context
7679         and iterates over all registers if R is negative to...
7680         (windows_nat_target::fetch_registers): ... here.
7681         (do_windows_store_inferior_registers): Rename to
7682         windows_store_one_register, and only handle the case of storing
7683         one register.  Move the code that handles the case where r is
7684         negative to...
7685         (windows_nat_target::store_registers) ... here.
7686
7687 2018-06-26  Tom Tromey  <tom@tromey.com>
7688
7689         PR rust/22574:
7690         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7691         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7692         Update.
7693         (rust_internal_print_type): Add podata parameter.
7694         (rust_print_type): Update.
7695
7696 2018-06-26  Tom Tromey  <tom@tromey.com>
7697
7698         * typeprint.h (struct print_offset_data) <update, finish,
7699         maybe_print_hole>: New methods.
7700         <indentation>: New constant.
7701         * typeprint.c (print_offset_data::indentation): Define.
7702         (print_offset_data::maybe_print_hole, print_offset_data::update)
7703         (print_offset_data::finish): Move from c-typeprint.c and rename.
7704         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7705         (print_spaces_filtered_with_print_options): Update.
7706         (c_print_type_union_field_offset, maybe_print_hole)
7707         (c_print_type_struct_field_offset): Move to typeprint.c and
7708         rename.
7709         (c_type_print_base_struct_union): Update.
7710
7711 2018-06-25  Pedro Alves  <palves@redhat.com>
7712
7713         * gdbthread.h (thread_info_ref, delete_thread)
7714         (delete_thread_silent, first_thread_of_inferior)
7715         (any_thread_of_inferior, switch_to_thread)
7716         (enable_thread_stack_temporaries)
7717         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7718         (get_last_thread_stack_temporary)
7719         (value_in_thread_stack_temporaries, can_access_registers_thread):
7720         Spell out "struct thread_info" instead of just "thread_info".
7721         * inferior.h (notice_new_inferior): Likewise.
7722
7723 2018-06-25  Pedro Alves  <palves@redhat.com>
7724
7725         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7726         pass thread_info pointer to delete_thread.
7727         (windows_nat_target::detach): Pass inferior pointer to
7728         detach_inferior.
7729         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7730         delete_thread.
7731         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7732         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7733         and pass a thread_info pointer to delete_thread.
7734         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7735         pass thread_info pointer to delete_thread.
7736         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7737         delete_thread_silent call.
7738         * procfs.c (procfs_target::detach): Pass inferior pointer to
7739         detach_inferior.
7740         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7741         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7742         delete_thread_silent call.
7743         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7744         pass thread_info pointer to delete_thread.
7745         (windows_nat_target::detach): Pass inferior pointer to
7746         delete_inferior.
7747
7748 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7749
7750         * regcache.c (readable_regcache::read_part): Fix asserts.
7751         (reg_buffer::raw_collect_part): New function.
7752         (regcache::write_part): Fix asserts.
7753         (reg_buffer::raw_supply_part): New function.
7754         (regcache::transfer_regset_register): New helper function.
7755         (regcache::transfer_regset): Call new functions.
7756         (regcache_supply_regset): Use gdb_byte*.
7757         (regcache::supply_regset): Likewise.
7758         (regcache_collect_regset): Likewise.
7759         (regcache::collect_regset): Likewise.
7760         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7761         (reg_buffer::raw_supply_part): Likewise.
7762         (regcache::transfer_regset_register): Likewise.
7763         (regcache::transfer_regset): Use gdb_byte*.
7764
7765 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7766
7767         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7768
7769 2018-06-21  Pedro Alves  <palves@redhat.com>
7770
7771         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7772         instead of a ptid_t.  All callers adjusted.
7773         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7774         adjusted.
7775         (print_ada_task_info, display_current_task_id, task_command_1):
7776         Adjust.
7777         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7778         inferior_thread.
7779         (breakpoint_kind): Adjust.
7780         (remove_breakpoints_pid): Rename to ...
7781         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7782         pointer.  All callers adjusted.
7783         (bpstat_clear_actions): Use inferior_thread.
7784         (get_bpstat_thread): New.
7785         (bpstat_do_actions): Use it.
7786         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7787         to take a thread_info pointer.  All callers adjusted.
7788         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7789         (breakpoint_re_set_thread): Use inferior_thread.
7790         * breakpoint.h (struct inferior): Forward declare.
7791         (bpstat_stop_status): Update.
7792         (remove_breakpoints_pid): Delete.
7793         (remove_breakpoints_inf): New.
7794         * bsd-uthread.c (bsd_uthread_target::wait)
7795         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7796         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7797         (maint_btrace_packet_history_cmd)
7798         (maint_btrace_clear_packet_history_cmd): Adjust.
7799         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7800         inferior_thread.
7801         * cli/cli-interp.c: Include "inferior.h".
7802         * common/refcounted-object.h (struct
7803         refcounted_object_ref_policy): New.
7804         * compile/compile-object-load.c: Include gdbthread.h.
7805         (store_regs): Use inferior_thread.
7806         * corelow.c (core_target::close): Use current_inferior.
7807         (core_target_open): Adjust to use first_thread_of_inferior and use
7808         the current inferior.
7809         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7810         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7811         <thread>: ... this new field.  All references adjusted.
7812         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7813         Take a thread_info pointer instead of a ptid_t.
7814         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7815         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7816         thread_info pointer instead of a ptid_t.
7817         * elfread.c: Include "inferior.h".
7818         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7819         Use inferior_thread.
7820         * eval.c (evaluate_subexp): Likewise.
7821         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7822         inferior_thread.
7823         * gdb_proc_service.h (struct thread_info): Forward declare.
7824         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7825         <thread>: ... this new field.  All references adjusted.
7826         * gdbarch.h, gdbarch.c: Regenerate.
7827         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7828         'thread' parameter.  All implementations and callers adjusted.
7829         * gdbthread.h (thread_info) <set_running>: New method.
7830         (delete_thread, delete_thread_silent): Take a thread_info pointer
7831         instead of a ptid.
7832         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7833         (first_thread_of_process): Delete, replaced by ...
7834         (first_thread_of_inferior): ... this new function.  All callers
7835         adjusted.
7836         (any_live_thread_of_process): Delete, replaced by ...
7837         (any_live_thread_of_inferior): ... this new function.  All callers
7838         adjusted.
7839         (switch_to_thread, switch_to_no_thread): Declare.
7840         (is_executing): Delete.
7841         (enable_thread_stack_temporaries): Update comment.
7842         <enable_thread_stack_temporaries>: Take a thread_info pointer
7843         instead of a ptid_t.  Incref the thread.
7844         <~enable_thread_stack_temporaries>: Decref the thread.
7845         <m_ptid>: Delete
7846         <m_thr>: New.
7847         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7848         (get_last_thread_stack_temporary)
7849         (value_in_thread_stack_temporaries, can_access_registers_thread):
7850         Take a thread_info pointer instead of a ptid_t.  All callers
7851         adjusted.
7852         * infcall.c (get_call_return_value): Use inferior_thread.
7853         (run_inferior_call): Work with thread pointers instead of ptid_t.
7854         (call_function_by_hand_dummy): Work with thread pointers instead
7855         of ptid_t.  Use thread_info_ref.
7856         * infcmd.c (proceed_thread_callback): Access thread's state
7857         directly.
7858         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7859         access thread's state directly.
7860         (continue_command): Use inferior_thread.
7861         (info_program_command): Use find_thread_ptid and access thread
7862         state directly.
7863         (proceed_after_attach_callback): Use thread state directly.
7864         (notice_new_inferior): Take a thread_info pointer instead of a
7865         ptid_t.  All callers adjusted.
7866         (exit_inferior): Take an inferior pointer instead of a pid.  All
7867         callers adjusted.
7868         (exit_inferior_silent): New.
7869         (detach_inferior): Delete.
7870         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7871         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7872         (detach_inferior_command, kill_inferior_command): Use
7873         find_inferior_id instead of valid_gdb_inferior_id and
7874         gdb_inferior_id_to_pid.
7875         (inferior_command): Use inferior and thread pointers.
7876         * inferior.h (struct thread_info): Forward declare.
7877         (notice_new_inferior): Take a thread_info pointer instead of a
7878         ptid_t.  All callers adjusted.
7879         (detach_inferior): Delete declaration.
7880         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7881         instead of a pid.  All callers adjusted.
7882         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7883         (valid_gdb_inferior_id): Delete.
7884         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7885         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7886         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7887         ...
7888         <inf>: ... this new field.
7889         <step_ptid>: Delete, replaced by ...
7890         <step_thread>: ... this new field.
7891         (get_displaced_stepping_state): Take an inferior pointer instead
7892         of a pid.  All callers adjusted.
7893         (displaced_step_in_progress_any_inferior): Adjust.
7894         (displaced_step_in_progress_thread): Take a thread pointer instead
7895         of a ptid_t.  All callers adjusted.
7896         (displaced_step_in_progress, add_displaced_stepping_state): Take
7897         an inferior pointer instead of a pid.  All callers adjusted.
7898         (get_displaced_step_closure_by_addr): Adjust.
7899         (remove_displaced_stepping_state): Take an inferior pointer
7900         instead of a pid.  All callers adjusted.
7901         (displaced_step_prepare_throw, displaced_step_prepare)
7902         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7903         All callers adjusted.
7904         (start_step_over): Adjust.
7905         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7906         displaced step queue.
7907         (do_target_resume): Adjust.
7908         (fetch_inferior_event): Use inferior_thread.
7909         (context_switch, get_inferior_stop_soon): Take an
7910         execution_control_state pointer instead of a ptid_t.  All callers
7911         adjusted.
7912         (switch_to_thread_cleanup): Delete.
7913         (stop_all_threads): Use scoped_restore_current_thread.
7914         * inline-frame.c: Include "gdbthread.h".
7915         (inline_state) <inline_state>: Take a thread pointer instead of a
7916         ptid_t.  All callers adjusted.
7917         <ptid>: Delete, replaced by ...
7918         <thread>: ... this new field.
7919         (find_inline_frame_state): Take a thread pointer instead of a
7920         ptid_t.  All callers adjusted.
7921         (skip_inline_frames, step_into_inline_frame)
7922         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7923         pointer instead of a ptid_t.  All callers adjusted.
7924         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7925         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7926         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7927         pointers directly.
7928         * linux-nat.c (get_detach_signal): Likewise.
7929         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7930         (thread_db_notice_clone): Adjust.
7931         (thread_db_find_new_threads_silently)
7932         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7933         a thread pointer instead of a ptid_t.  All callers adjusted.
7934         * mi/mi-cmd-var.c: Include "inferior.h".
7935         (mi_cmd_var_update_iter): Update to use thread pointers.
7936         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7937         inferior directly.
7938         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7939         out to ...
7940         (mi_output_running): ... this new function.
7941         (mi_on_resume_1): Adjust to use it.
7942         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7943         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7944         directly.
7945         (interrupt_thread_callback): : Adjust to use thread and inferior
7946         pointers.
7947         * proc-service.c: Include "gdbthread.h".
7948         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7949         * progspace-and-thread.c: Include "inferior.h".
7950         * progspace.c: Include "inferior.h".
7951         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7952         hold a reference to an inferior_object.
7953         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7954         inferior_thread.
7955         * python/py-inferior.c (struct inferior_object): Give the type a
7956         tag name instead of a typedef.
7957         (python_on_normal_stop): No need to check if the current thread is
7958         listed.
7959         (inferior_to_inferior_object): Change return type to
7960         inferior_object.  All callers adjusted.
7961         (find_thread_object): Delete, bits factored out to ...
7962         (thread_to_thread_object): ... this new function.
7963         * python/py-infthread.c (create_thread_object): Use
7964         inferior_to_inferior_object.
7965         (thpy_is_stopped): Use thread pointer directly.
7966         (gdbpy_selected_thread): Use inferior_thread.
7967         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7968         field, replaced with ...
7969         <thread>: ... this new field.  All users adjusted.
7970         (btpy_insn_or_gap_new): Drop const.
7971         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7972         callers adjusted.
7973         * python/py-record.c: Include "gdbthread.h".
7974         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7975         a ptid_t.  All callers adjusted.
7976         (gdbpy_current_recording): Use inferior_thread.
7977         * python/py-record.h (recpy_record_object) <ptid>: Delete
7978         field, replaced with ...
7979         <thread>: ... this new field.  All users adjusted.
7980         (recpy_element_object) <ptid>: Delete
7981         field, replaced with ...
7982         <thread>: ... this new field.  All users adjusted.
7983         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7984         a ptid_t.  All callers adjusted.
7985         * python/py-threadevent.c: Include "gdbthread.h".
7986         (get_event_thread): Use thread_to_thread_object.
7987         * python/python-internal.h (struct inferior_object): Forward
7988         declare.
7989         (find_thread_object, find_inferior_object): Delete declarations.
7990         (thread_to_thread_object, inferior_to_inferior_object): New
7991         declarations.
7992         * record-btrace.c: Include "inferior.h".
7993         (require_btrace_thread): Use inferior_thread.
7994         (record_btrace_frame_sniffer)
7995         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7996         (get_thread_current_frame): Use scoped_restore_current_thread and
7997         switch_to_thread.
7998         (get_thread_current_frame): Use thread pointer directly.
7999         (record_btrace_replay_at_breakpoint): Use thread's inferior
8000         pointer directly.
8001         * record-full.c: Include "inferior.h".
8002         * regcache.c: Include "gdbthread.h".
8003         (get_thread_arch_regcache): Use the inferior's address space
8004         directly.
8005         (get_thread_regcache, registers_changed_thread): New.
8006         * regcache.h (get_thread_regcache(thread_info *thread)): New
8007         overload.
8008         (registers_changed_thread): New.
8009         (remote_target) <remote_detach_1>: Swap order of parameters.
8010         (remote_add_thread): <remote_add_thread>: Return the new thread.
8011         (get_remote_thread_info(ptid_t)): New overload.
8012         (remote_target::remote_notice_new_inferior): Use thread pointers
8013         directly.
8014         (remote_target::process_initial_stop_replies): Use
8015         thread_info::set_running.
8016         (remote_target::remote_detach_1, remote_target::detach)
8017         (extended_remote_target::detach): Adjust.
8018         * stack.c (frame_show_address): Use inferior_thread.
8019         * target-debug.h (target_debug_print_thread_info_pp): New.
8020         * target-delegates.c: Regenerate.
8021         * target.c (default_thread_address_space): Delete.
8022         (memory_xfer_partial_1): Use current_inferior.
8023         (target_detach): Use current_inferior.
8024         (target_thread_address_space): Delete.
8025         (generic_mourn_inferior): Use current_inferior.
8026         * target.h (struct target_ops) <thread_address_space>: Delete.
8027         (target_thread_address_space): Delete.
8028         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
8029         pointers directly.
8030         (delete_thread_1, delete_thread, delete_thread_silent): Take a
8031         thread pointer instead of a ptid_t.  Adjust all callers.
8032         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8033         (first_thread_of_process): Delete, replaced by ...
8034         (first_thread_of_inferior): ... this new function.  All callers
8035         adjusted.
8036         (any_thread_of_process): Rename to ...
8037         (any_thread_of_inferior): ... this, and take an inferior pointer.
8038         (any_live_thread_of_process): Rename to ...
8039         (any_live_thread_of_inferior): ... this, and take an inferior
8040         pointer.
8041         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8042         (value_in_thread_stack_temporaries)
8043         (get_last_thread_stack_temporary): Take a thread pointer instead
8044         of a ptid_t.  Adjust all callers.
8045         (thread_info::set_running): New.
8046         (validate_registers_access): Use inferior_thread.
8047         (can_access_registers_ptid): Rename to ...
8048         (can_access_registers_thread): ... this, and take a thread
8049         pointer.
8050         (print_thread_info_1): Adjust to compare thread pointers instead
8051         of ptids.
8052         (switch_to_no_thread, switch_to_thread): Make extern.
8053         (scoped_restore_current_thread::~scoped_restore_current_thread):
8054         Use m_thread pointer directly.
8055         (scoped_restore_current_thread::scoped_restore_current_thread):
8056         Use inferior_thread.
8057         (thread_command): Use thread pointer directly.
8058         (thread_num_make_value_helper): Use inferior_thread.
8059         * top.c (execute_command): Use inferior_thread.
8060         * tui/tui-interp.c: Include "inferior.h".
8061         * varobj.c (varobj_create): Use inferior_thread.
8062         (value_of_root_1): Use find_thread_global_id instead of
8063         global_thread_id_to_ptid.
8064
8065 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
8066
8067         * regcache.c (readable_regcache::read_part): Avoid memcpy when
8068         possible.
8069         (regcache::write_part): Likewise.
8070         (readable_regcache::cooked_read_part): Update comment.
8071         (readable_regcache::cooked_write_part): Likewise.
8072         * regcache.h: (readable_regcache::read_part): Likewise.
8073         (regcache::write_part): Likewise.
8074
8075 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
8076             Dirk Schubert  <dirk.schubert@arm.com>
8077
8078         * aarch64-linux-nat.c (post_attach): New.
8079         (aarch64_linux_nat_target::post_attach): Override post_attach to
8080         record the number of hardware debug registers.
8081
8082 2018-06-20  Tom Tromey  <tom@tromey.com>
8083
8084         * python/py-param.c (add_setshow_generic): Make parameters const.
8085         (parmpy_init): Update.
8086
8087 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8088
8089         * regcache.h (regcache_cooked_read_ftype): Rename to...
8090         (register_read_ftype): ...this, change type to function_view.
8091         (class reg_buffer) <save>: Remove src parameter.
8092         (readonly_detached_regcache) <readonly_detached_regcache>: Make
8093         parameter non-const in first overload.  Remove src parameter in
8094         second overload.
8095         * regcache.c (do_cooked_read): Remove.
8096         (readonly_detached_regcache::readonly_detached_regcache): Make
8097         parameter non-const, adjust call to other constructor.
8098         (reg_buffer::save): Remove src parameter.
8099         * frame.c (do_frame_register_read): Remove.
8100         (frame_save_as_regcache): Use lambda function.
8101         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8102         parameter to ppu2spu_data *.
8103         (ppu2spu_sniffer): Use lambda function.
8104
8105 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8106
8107         * record-full.c (record_full_target::insert_breakpoint): Remove
8108         "struct" keyword, add const.
8109
8110 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
8111
8112         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8113         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8114         * configure.ac: Remove AC_PREREQ, add missing quoting.
8115         * gnulib/configure.ac: Modernize usage of
8116         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
8117         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8118         (AUTOMAKE_VERSION): Bump to 1.15.1.
8119         * configure: Re-generate.
8120         * config.in: Re-generate.
8121         * aclocal.m4: Re-generate.
8122         * gnulib/aclocal.m4: Re-generate.
8123         * gnulib/config.in: Re-generate.
8124         * gnulib/configure: Re-generate.
8125         * gnulib/import/Makefile.in: Re-generate.
8126
8127 2018-06-19  Pedro Alves  <palves@redhat.com>
8128
8129         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8130         (lookup_minimal_symbol_by_pc_section): ... here with
8131         gdb_assert_not_reached added.
8132
8133 2018-06-19  Pedro Alves  <palves@redhat.com>
8134
8135         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8136         parameter with a block parameter.  Compare location's block symbol
8137         with the frame's block instead of addresses.
8138         (skip_inline_frames): Pass the current block instead of the
8139         frame's address.  Break out as soon as we determine the frame
8140         should not be skipped.
8141
8142 2018-06-18  Tom Tromey  <tom@tromey.com>
8143
8144         * solib-aix.c (solib_aix_get_section_offsets): Return
8145         unique_xmalloc_ptr.
8146         (solib_aix_solib_create_inferior_hook): Update.
8147
8148 2018-06-18  Tom Tromey  <tom@tromey.com>
8149
8150         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8151
8152 2018-06-18  Tom Tromey  <tom@tromey.com>
8153
8154         * solib-frv.c (frv_relocate_main_executable): Use
8155         unique_xmalloc_ptr.
8156         * solib-dsbt.c (dsbt_relocate_main_executable): Use
8157         unique_xmalloc_ptr.
8158
8159 2018-06-18  Tom Tromey  <tom@tromey.com>
8160
8161         * objfiles.h (inhibit_section_map_updates): Update.
8162         (resume_section_map_updates, resume_section_map_updates_cleanup):
8163         Remove.
8164         * solib-svr4.c (svr4_handle_solib_event): Update.
8165         * objfiles.c (inhibit_section_map_updates): Return
8166         scoped_restore_tmpl<int>.
8167         (resume_section_map_updates, resume_section_map_updates_cleanup):
8168         Remove.
8169
8170 2018-06-18  Tom Tromey  <tom@tromey.com>
8171
8172         * valprint.h (read_string): Update.
8173         * valprint.c (read_string): Change type of "buffer".
8174         (val_print_string): Update.
8175         * python/py-value.c (valpy_string): Update.
8176         * language.h (struct language_defn) <la_get_string>: Change
8177         type of "buffer".
8178         (default_get_string, c_get_string): Update.
8179         * language.c (default_get_string): Change type of "buffer".
8180         * guile/scm-value.c (gdbscm_value_to_string): Update.
8181         * c-lang.c (c_get_string): Change type of "buffer".
8182
8183 2018-06-18  Tom Tromey  <tom@tromey.com>
8184
8185         * ser-mingw.c (struct pipe_state_destroyer): New.
8186         (pipe_state_up): New typedef.
8187         (cleanup_pipe_state): Remove.
8188         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
8189
8190 2018-06-18  Tom Tromey  <tom@tromey.com>
8191
8192         * rust-lang.h (rust_yyerror): Don't declare.
8193         * rust-lang.c (rust_language_defn): Update.
8194         * rust-exp.y (yyerror): Now static.
8195         * parse.c (parse_exp_in_context_1): Update.
8196         * p-lang.h (p_yyerror): Don't declare.
8197         * p-lang.c (p_language_defn): Update.
8198         * p-exp.y (yyerror): Now static.
8199         * opencl-lang.c (opencl_language_defn): Update.
8200         * objc-lang.c (objc_language_defn): Update.
8201         * m2-lang.h (m2_yyerror): Don't declare.
8202         * m2-lang.c (m2_language_defn): Update.
8203         * m2-exp.y (yyerror): Now static.
8204         * language.h (struct language_defn) <la_error>: Remove.
8205         * language.c (unk_lang_error): Remove.
8206         (unknown_language_defn, auto_language_defn): Remove.
8207         * go-lang.h (go_yyerror): Don't declare.
8208         * go-lang.c (go_language_defn): Update.
8209         * go-exp.y (yyerror): Now static.
8210         * f-lang.h (f_yyerror): Don't declare.
8211         * f-lang.c (f_language_defn): Update.
8212         * f-exp.y (yyerror): Now static.
8213         * d-lang.h (d_yyerror): Don't declare.
8214         * d-lang.c (d_language_defn): Update.
8215         * d-exp.y (yyerror): Now static.
8216         * c-lang.h (c_yyerror): Don't declare.
8217         * c-lang.c (c_language_defn, cplus_language_defn)
8218         (asm_language_defn, minimal_language_defn): Update.
8219         * c-exp.y (yyerror): Now static.
8220         * ada-lang.h (ada_yyerror): Don't declare.
8221         * ada-lang.c (ada_language_defn): Update.
8222         * ada-exp.y (yyerror): Now static.
8223
8224 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8225
8226         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8227         (store_sveregs_to_thread): Likewise.
8228         (aarch64_linux_fetch_inferior_registers): Check for SVE.
8229         (aarch64_linux_store_inferior_registers): Likewise.
8230         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8231         function.
8232         (aarch64_sve_regs_copy_to_regcache): Likewise.
8233         (aarch64_sve_regs_copy_from_regcache): Likewise.
8234         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8235         declaration.
8236         (aarch64_sve_regs_copy_to_regcache): Likewise.
8237         (aarch64_sve_regs_copy_from_regcache): Likewise.
8238         (sve_context): Structure from Linux headers.
8239         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8240         (SVE_SIG_ZREG_SIZE): Likewise.
8241         (SVE_SIG_PREG_SIZE): Likewise.
8242         (SVE_SIG_FFR_SIZE): Likewise.
8243         (SVE_SIG_REGS_OFFSET): Likewise.
8244         (SVE_SIG_ZREGS_OFFSET): Likewise.
8245         (SVE_SIG_ZREG_OFFSET): Likewise.
8246         (SVE_SIG_ZREGS_SIZE): Likewise.
8247         (SVE_SIG_PREGS_OFFSET): Likewise.
8248         (SVE_SIG_PREG_OFFSET): Likewise.
8249         (SVE_SIG_PREGS_SIZE): Likewise.
8250         (SVE_SIG_FFR_OFFSET): Likewise.
8251         (SVE_SIG_REGS_SIZE): Likewise.
8252         (SVE_SIG_CONTEXT_SIZE): Likewise.
8253         (SVE_PT_REGS_MASK): Likewise.
8254         (SVE_PT_REGS_FPSIMD): Likewise.
8255         (SVE_PT_REGS_SVE): Likewise.
8256         (SVE_PT_VL_INHERIT): Likewise.
8257         (SVE_PT_VL_ONEXEC): Likewise.
8258         (SVE_PT_REGS_OFFSET): Likewise.
8259         (SVE_PT_FPSIMD_OFFSET): Likewise.
8260         (SVE_PT_FPSIMD_SIZE): Likewise.
8261         (SVE_PT_SVE_ZREG_SIZE): Likewise.
8262         (SVE_PT_SVE_PREG_SIZE): Likewise.
8263         (SVE_PT_SVE_FFR_SIZE): Likewise.
8264         (SVE_PT_SVE_FPSR_SIZE): Likewise.
8265         (SVE_PT_SVE_FPCR_SIZE): Likewise.
8266         (__SVE_SIG_TO_PT): Likewise.
8267         (SVE_PT_SVE_OFFSET): Likewise.
8268         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8269         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8270         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8271         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8272         (SVE_PT_SVE_PREG_OFFSET): Likewise.
8273         (SVE_PT_SVE_PREGS_SIZE): Likewise.
8274         (SVE_PT_SVE_FFR_OFFSET): Likewise.
8275         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8276         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8277         (SVE_PT_SVE_SIZE): Likewise.
8278         (SVE_PT_SIZE): Likewise.
8279         (HAS_SVE_STATE): New define.
8280
8281 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8282
8283         * nat/aarch64-sve-linux-sigcontext.h: New file.
8284         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8285         new files.
8286         (SVE_VQ_MIN): Likewise.
8287         (SVE_VQ_MAX): Likewise.
8288         (SVE_VL_MIN): Likewise.
8289         (SVE_VL_MAX): Likewise.
8290         (SVE_NUM_ZREGS): Likewise.
8291         (SVE_NUM_PREGS): Likewise.
8292         (sve_vl_valid): Likewise.
8293         (struct user_sve_header): Likewise.
8294
8295 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
8296             Richard Bunt <Richard.Bunt@arm.com>
8297
8298         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8299         was requested by GDB.
8300
8301 2018-06-15  Tom de Vries  <tdevries@suse.de>
8302
8303         * MAINTAINERS (Write After Approval): Add Tom de Vries.
8304
8305 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
8306
8307         * gnulib/update-gnulib.sh: Print expected versions of
8308         autoconf/aclocal.
8309
8310 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
8311
8312         * arch-utils.c (default_type_align): Use type_length_units.
8313         * gdbtypes.c (type_align): Use type_length_units.
8314
8315 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8316
8317         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8318         of 'define' command.
8319
8320 2018-06-14  Tom de Vries  <tdevries@suse.de>
8321
8322         PR cli/22573
8323         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8324         get_no_prettyformat_print_options.
8325
8326 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8327
8328         * sparc-nat.h: Include target.h.
8329         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8330         <fetch_registers>: Remove this argument in function call.
8331         <store_registers>: Remove this argument in function call, remove
8332         extra semicolon.
8333         <low_forget_process>: Call sparc64_forget_process instead of
8334         sparc_forget_process.
8335
8336 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8337
8338         * procfs.c (_initialize_procfs): Use add_inf_child_target.
8339         (procfs_target::make_corefile_notes): Adjust to new
8340         target_read_alloc return type.
8341
8342 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8343             Stephen Roberts  <stephen.roberts@arm.com>
8344
8345         PR gdb/22882
8346         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8347         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8348         Move should_notify_stop local into more inner scope.
8349
8350 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8351             Stephen Roberts  <stephen.roberts@arm.com>
8352
8353         PR gdb/22882
8354         * infrun.c (resume_1): Add call to mark_async_event_handler.
8355
8356 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8357
8358         * infrun.c (do_target_wait): Change old version of $pc printed.
8359
8360 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8361
8362         * dwarf2read.c (read_index_from_section): Rename to...
8363         (read_gdb_index_from_section): ... this, update all callers.
8364         (dwarf2_read_index): Rename to...
8365         (dwarf2_read_gdb_index): ... this, update all callers.
8366
8367 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
8368
8369         * hppa-linux-nat.c
8370         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8371         hppa_linux_nat_target::fetch_registers.
8372
8373 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8374
8375         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8376         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8377         (AARCH64_DWARF_SVE_FFR): Likewise.
8378         (AARCH64_DWARF_SVE_P0): Likewise.
8379         (AARCH64_DWARF_SVE_Z0): Likewise.
8380
8381 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8382
8383         * common/common-regcache.h (raw_compare): New function.
8384         * regcache.c (regcache::raw_compare): Likewise.
8385         * regcache.h (regcache::raw_compare): New declaration.
8386
8387 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8388
8389         * common/common-regcache.h (reg_buffer_common): New structure.
8390         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8391         (reg_buffer::raw_supply): Likewise.
8392         (reg_buffer::raw_supply_integer): Likewise.
8393         (reg_buffer::raw_supply_zeroed): Likewise.
8394         (reg_buffer::raw_collect): Likewise.
8395         (reg_buffer::raw_collect_integer): Likewise.
8396         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8397         (reg_buffer::raw_supply): Likewise.
8398         (reg_buffer::raw_supply_integer): Likewise.
8399         (reg_buffer::raw_supply_zeroed): Likewise.
8400         (reg_buffer::raw_collect): Likewise.
8401         (reg_buffer::raw_collect_integer): Likewise.
8402
8403 2018-06-10  Tom Tromey  <tom@tromey.com>
8404
8405         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8406         (class remote_state) <stop_reply_queue>: Now std::vector.
8407         (remote_state::~remote_state)
8408         (remote_target::stop_reply_queue_length): Update.
8409         (struct queue_iter_param, remove_child_of_pending_fork)
8410         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8411         (check_pending_event_prevents_wildcard_vcont_callback)
8412         (remove_stop_reply_for_inferior)
8413         (remove_stop_reply_of_remote_state)
8414         (remote_notif_remove_once_on_match)
8415         (stop_reply_match_ptid_and_ws)
8416         (remote_kill_child_of_pending_fork): Remove.
8417         (remote_target::remove_new_fork_children)
8418         (remote_target::check_pending_events_prevent_wildcard_vcont)
8419         (remote_target::discard_pending_stop_replies)
8420         (remote_target::discard_pending_stop_replies_in_queue)
8421         (remote_target::remote_notif_remove_queued_reply)
8422         (remote_target::queued_stop_reply)
8423         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8424         (remote_target::wait, remote_target::kill_new_fork_children)
8425         (remote_target::async): Update.
8426
8427 2018-06-10  Tom Tromey  <tom@tromey.com>
8428
8429         * record-full.c (record_full_arch_list_cleanups): Remove.
8430         (record_full_message): Use try/catch.
8431         (record_full_wait_cleanups): Remove.
8432         (record_full_wait_1): Use try/catch.
8433         (record_full_restore): Likewise.
8434
8435 2018-06-10  Tom Tromey  <tom@tromey.com>
8436
8437         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8438         declare VEC.  Add constructor.
8439         <in_target_beneath>: Now bool.
8440         (record_full_breakpoints): Now a std::vector, static.
8441         (record_full_sync_record_breakpoints)
8442         (record_full_init_record_breakpoints)
8443         (record_full_target::insert_breakpoint)
8444         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8445
8446 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8447
8448         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8449         * serial.c (serial_interface_lookup): Remove struct keyword.
8450
8451 2018-06-10  Tom Tromey  <tom@tromey.com>
8452
8453         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8454         method.
8455         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8456         a method.
8457         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8458         method.
8459         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8460         "beneath" as a method.
8461         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8462         Use "beneath" as a method.
8463
8464 2018-06-10  Tom Tromey  <tom@tromey.com>
8465
8466         * tracefile.c (struct trace_file_writer_deleter): New.
8467         <operator()>: Rename from trace_file_writer_xfree.
8468         (trace_file_writer_up): New typedef.
8469         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8470
8471 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8472
8473         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8474         <m_registers, m_register_status>: Change type to
8475         std::unique_ptr.
8476         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8477         XCNEWVEC.
8478
8479 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8480
8481         * common/common-regcache.h (enum register_status): Add
8482         underlying type "signed char".
8483         * regcache.h (reg_buffer) <m_register_status>: Change type to
8484         register_status *.
8485         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8486         register_status instead of signed char.
8487         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8488         (reg_buffer::get_register_status): Remove cast.
8489         (readable_regcache::raw_read): Remove cast.
8490         (readable_regcache::cooked_read): Remove cast.
8491
8492 2018-06-09  Tom Tromey  <tom@tromey.com>
8493
8494         * source.c (reverse_search_command, forward_search_command): Use
8495         scoped_fd.
8496
8497 2018-06-09  Tom Tromey  <tom@tromey.com>
8498
8499         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8500         (serial_ops_list): Now static, std::vector.
8501         (serial_interface_lookup, serial_add_interface): Update.
8502
8503 2018-06-09  Tom Tromey  <tom@tromey.com>
8504
8505         * dwarf2read.c (process_cu_includes): Update.
8506         (process_full_comp_unit): Update.
8507         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8508         std::vector.
8509
8510 2018-06-08  Paul Koning  <paul_koning@dell.com>
8511
8512         PR gdb/23252
8513
8514         * python/python.c (do_start_initialization):
8515         Avoid call to internal Python API.
8516         (init__gdb_module): New function.
8517
8518 2018-06-08  Gary Benson <gbenson@redhat.com>
8519
8520         * linux-thread-db.c (valprint.h): New include.
8521         (struct check_thread_db_info): New structure.
8522         (check_thread_db_on_load, tdb_testinfo): New static globals.
8523         (check_thread_db, check_thread_db_callback): New functions.
8524         (try_thread_db_load_1): Run integrity checks if requested.
8525         (maintenance_check_libthread_db): New function.
8526         (_initialize_thread_db): Register "maint check libthread-db"
8527         and "maint set/show check-libthread-db".
8528         * NEWS: Mention the above new commands.
8529
8530 2018-06-08  Tom Tromey  <tom@tromey.com>
8531
8532         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8533         now a method.
8534
8535 2018-06-08  Tom Tromey  <tom@tromey.com>
8536
8537         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8538
8539 2018-06-08  Tom Tromey  <tom@tromey.com>
8540
8541         * common/btrace-common.h (struct btrace_data): Add constructor,
8542         destructor, move assignment operator.
8543         <empty, clear, fini>: New methods.
8544         <format>: Initialize.
8545         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8546         (btrace_data_empty): Don't declare.
8547         * common/btrace-common.c (btrace_data_init): Remove.
8548         (btrace_data::fini): Rename from btrace_data_fini.
8549         (btrace_data::empty): Rename from btrace_data_empty.
8550         (btrace_data::clear): Rename from btrace_data_clear.  Return
8551         bool.
8552         * btrace.h (make_cleanup_btrace_data): Don't declare.
8553         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8554         (parse_xml_btrace): Update.
8555         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8556         (maint_btrace_clear_packet_history_cmd): Update.
8557
8558 2018-06-07  Pedro Alves  <palves@redhat.com>
8559
8560         * target.h (target_ops) <beneath>: Now a method.  All references
8561         updated.
8562         (class target_stack): New.
8563         * target.c (g_target_stack): New.
8564         (g_current_top_target): Delete.
8565         (current_top_target): Get the top target out of g_target_stack.
8566         (target_stack::push, target_stack::unpush): New.
8567         (push_target, unpush_target): Reimplement.
8568         (target_is_pushed): Reimplement in terms of g_target_stack.
8569         (target_ops::beneath, target_stack::find_beneath): New.
8570
8571 2018-06-07  Pedro Alves  <palves@redhat.com>
8572
8573         * target.h (find_target_beneath): Delete declaration.
8574         * target.c (find_target_beneath): Delete definition.
8575         * aix-thread.c: All callers of find_target_beneath adjusted to
8576         call target_ops::beneath instead.
8577         * bsd-uthread.c: Likewise.
8578         * linux-thread-db.c: Likewise.
8579         * ravenscar-thread.c: Likewise.
8580         * sol-thread.c: Likewise.
8581         * spu-multiarch.c: Likewise.
8582
8583 2018-06-07  Pedro Alves  <palves@redhat.com>
8584
8585         * target.h (target_ops) <beneath>: Now a method.  All references
8586         updated.
8587         (target_ops) <m_beneath>: New.
8588         * target.c (target_ops::beneath): New.
8589         * corelow.c: Adjust all references to target_ops::beneath.
8590         * linux-thread-db.c: Likewise.
8591         * make-target-delegates: Likewise.
8592         * record-btrace.c: Likewise.
8593         * record-full.c: Likewise.
8594         * remote.c: Likewise.
8595         * target.c: Likewise.
8596         * target-delegates.c: Regenerate.
8597
8598 2018-06-07  Pedro Alves  <palves@redhat.com>
8599
8600         * target.h (target_stack): Delete.
8601         (current_top_target): Declare function.
8602         * target.c (target_stack): Delete.
8603         (g_current_top_target): New.
8604         (current_top_target): New function.
8605         * auxv.c: Use current_top_target instead of target_stack
8606         throughout.
8607         * avr-tdep.c: Likewise.
8608         * breakpoint.c: Likewise.
8609         * corefile.c: Likewise.
8610         * elfread.c: Likewise.
8611         * eval.c: Likewise.
8612         * exceptions.c: Likewise.
8613         * frame.c: Likewise.
8614         * gdbarch-selftests.c: Likewise.
8615         * gnu-v3-abi.c: Likewise.
8616         * ia64-tdep.c: Likewise.
8617         * ia64-vms-tdep.c: Likewise.
8618         * infcall.c: Likewise.
8619         * infcmd.c: Likewise.
8620         * infrun.c: Likewise.
8621         * linespec.c: Likewise.
8622         * linux-tdep.c: Likewise.
8623         * minsyms.c: Likewise.
8624         * ppc-linux-nat.c: Likewise.
8625         * ppc-linux-tdep.c: Likewise.
8626         * procfs.c: Likewise.
8627         * regcache.c: Likewise.
8628         * remote.c: Likewise.
8629         * rs6000-tdep.c: Likewise.
8630         * s390-linux-nat.c: Likewise.
8631         * s390-tdep.c: Likewise.
8632         * solib-aix.c: Likewise.
8633         * solib-darwin.c: Likewise.
8634         * solib-dsbt.c: Likewise.
8635         * solib-spu.c: Likewise.
8636         * solib-svr4.c: Likewise.
8637         * solib-target.c: Likewise.
8638         * sparc-tdep.c: Likewise.
8639         * sparc64-tdep.c: Likewise.
8640         * spu-tdep.c: Likewise.
8641         * symfile.c: Likewise.
8642         * symtab.c: Likewise.
8643         * target-descriptions.c: Likewise.
8644         * target-memory.c: Likewise.
8645         * target.c: Likewise.
8646         * target.h: Likewise.
8647         * tracefile-tfile.c: Likewise.
8648         * tracepoint.c: Likewise.
8649         * valops.c: Likewise.
8650         * valprint.c: Likewise.
8651         * value.c: Likewise.
8652         * windows-tdep.c: Likewise.
8653         * mi/mi-main.c: Likewise.
8654
8655 2018-06-07  Tom Tromey  <tom@tromey.com>
8656
8657         * valprint.h (build_address_symbolic): Declare.
8658         * printcmd.c (print_address_symbolic): Update.
8659         (build_address_symbolic): Change "name" and "filename" to
8660         std::string.
8661         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8662         Update.
8663         * defs.h (build_address_symbolic): Remove declaration.
8664
8665 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8666
8667         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8668         (aarch64_vnv_type): Add function.
8669         (aarch64_pseudo_register_name): Add V regs for SVE.
8670         (aarch64_pseudo_register_type): Likewise.
8671         (aarch64_pseudo_register_reggroup_p): Likewise.
8672         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8673         (aarch64_pseudo_read_value): Add V regs for SVE.
8674         (aarch64_pseudo_write_2): Use V0 offset for SVE
8675         (aarch64_pseudo_write): Add V regs for SVE.
8676         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8677
8678 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8679
8680         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8681         (sve_vl_from_vq): Likewise.
8682
8683 2018-06-05  Tom Tromey  <tom@tromey.com>
8684
8685         * cli/cli-cmds.c (show_version): Update.
8686         * top.c (print_gdb_version): Add "interactive" parameter.
8687         Update.
8688         * main.c (captured_main_1): Update.
8689         * top.h (print_gdb_version): Add "interactive" parameter and a
8690         comment.
8691
8692 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8693
8694         * common/enum-flags.h: Add trailing semicolon to example in
8695         comment.
8696
8697 2018-06-05  Tom Tromey  <tom@tromey.com>
8698
8699         PR cli/12326:
8700         * NEWS: Add entry about pager.
8701         * utils.c (pagination_disabled_for_command): New global.
8702         (prompt_for_continue): Allow "c" response to prompt.
8703         (reinitialize_more_filter): Clear
8704         pagination_disabled_for_command.
8705         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8706
8707 2018-06-04  Tom Tromey  <tom@tromey.com>
8708
8709         * ada-lang.h (ada_lookup_symbol_list): Update.
8710         * ada-lang.c (resolve_subexp): Update.
8711         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8712         parameter.
8713         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8714         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8715         results parameter to std::vector.
8716         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8717         Update.
8718         * ada-exp.y (block_lookup): Update.
8719         (select_possible_type_sym): Change type of syms.  Remove nsyms
8720         parameter.
8721         (write_var_or_type, write_name_assoc): Update.
8722
8723 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8724
8725         * windows-nat.c (windows_nat_target::xfer_partial): Return
8726         TARGET_XFER_E_IO if we need to delegate to the target beneath
8727         but BENEATH is NULL.
8728
8729 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8730
8731         * Makefile.in (config.status): Add configure.nat as a
8732         dependency.
8733
8734 2018-06-04  Tom Tromey  <tom@tromey.com>
8735
8736         * cp-name-parser.y (cpname_state): Add method declarations.
8737         (HANDLE_QUAL): Update.
8738         (cpname_state::d_grab, cpname_state::fill_comp)
8739         (cpname_state::make_operator, cpname_state::make_dtor)
8740         (cpname_state::make_builtin_type, cpname_state::make_name)
8741         (cpname_state::d_qualify, cpname_state::d_int_type)
8742         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8743         (%union): Move earlier.
8744
8745 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8746
8747         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8748
8749 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8750
8751         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8752         (aarch64_pseudo_write_1): Likewise.
8753         (aarch64_pseudo_read_value): Use helper.
8754         (aarch64_pseudo_write): Likewise.
8755
8756 2018-06-04  Pedro Alves  <palves@redhat.com>
8757
8758         * darwin-nat.c (darwin_ops): Delete.
8759         (darwin_attach_pid): Use get_native_target.
8760
8761 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8762
8763         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8764         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8765
8766 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8767
8768         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8769         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8770         (aarch64_gdbarch_init): Check for SVE.
8771         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8772
8773 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8774
8775         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8776         * aarch64-tdep.h (aarch64_read_description): Likewise.
8777         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8778         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8779         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8780         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8781         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8782
8783 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8784
8785         * value.c (value_fetch_lazy_bitfield): New.
8786         (value_fetch_lazy_memory): New.
8787         (value_fetch_lazy_register): New.
8788         (value_fetch_lazy): Factor out to smaller functions.
8789
8790 2018-06-01  Tom Tromey  <tom@tromey.com>
8791
8792         * cp-name-parser.y (backslashable, represented): Now const.
8793
8794 2018-06-01  Tom Tromey  <tom@tromey.com>
8795
8796         * cp-name-parser.y: Include parser-defs.h.
8797         (parser_fprintf): Remove declaration.
8798
8799 2018-06-01  Tom Tromey  <tom@tromey.com>
8800
8801         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8802         %parse-param.
8803         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8804         (global_result): Remove globals.
8805         (struct cpname_state): New.
8806         (yyparse): Don't declare.
8807         (yylex, yyerror): Move declarations after %union.
8808         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8809         (make_name): Add state parameter.
8810         Update all callers.
8811         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8812         parameter.
8813         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8814         Update.
8815         (yylex): Add lvalp, state parameters.
8816         (yyerror): Add state parameter.
8817         (cp_demangled_name_to_comp): Update.
8818
8819 2018-06-01  Tom Tromey  <tom@tromey.com>
8820
8821         * cp-name-parser.y (parser_fprintf): Declare.
8822         (GDB_YY_REMAP_PREFIX): Define.
8823         Include yy-remap.h.  Don't redefine yy* identifiers.
8824
8825 2018-06-01  Tom Tromey  <tom@tromey.com>
8826
8827         * python/py-type.c (typy_legacy_template_argument): Update.
8828         * cp-support.h (cp_demangled_name_to_comp): Update.
8829         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8830         parameter to be a "std::string *".
8831         (main): Update.
8832
8833 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8834
8835         * ada-lex.l: Include "diagnostics.h" instead of
8836         "common/diagnostics.h".
8837         * unittests/environ-selftests.c: Likewise.
8838         * common/diagnostics.h: Moved to ../include.
8839
8840 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8841
8842         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8843         to language_mode_manual while calling breakpoint_re_set_one.
8844
8845 2018-06-01  Tom Tromey  <tom@tromey.com>
8846
8847         * valops.c (value_cast_structs, destructor_name_p): Update.
8848         * symtab.c (gdb_mangle_name): Update.
8849         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8850         Update.
8851         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8852         (pascal_object_print_value_fields, pascal_object_print_value):
8853         Update.
8854         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8855         * linespec.c (find_methods): Update.
8856         * gdbtypes.h (type_name_no_tag): Remove.
8857         (type_name_or_error): Rename from type_name_no_tag_or_error.
8858         * gdbtypes.c (type_name_no_tag): Remove.
8859         (type_name_or_error): Rename from type_name_no_tag_or_error.
8860         (lookup_struct_elt_type, check_typedef): Update.
8861         * expprint.c (print_subexp_standard): Update.
8862         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8863         * d-namespace.c (d_lookup_nested_symbol): Update.
8864         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8865         (cp_print_class_member): Update.
8866         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8867         * completer.c (add_struct_fields): Update.
8868         * c-typeprint.c (cp_type_print_derivation_info)
8869         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8870         Update.
8871         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8872         (ada_prefer_type, ada_is_exception_sym): Update.
8873
8874 2018-06-01  Tom Tromey  <tom@tromey.com>
8875
8876         * valops.c (enum_constant_from_type, value_namespace_elt)
8877         (value_maybe_namespace_elt): Update.
8878         * valarith.c (find_size_for_pointer_math): Update.
8879         * target-descriptions.c (make_gdb_type): Update.
8880         * symmisc.c (print_symbol): Update.
8881         * stabsread.c (define_symbol, read_type)
8882         (complain_about_struct_wipeout, add_undefined_type)
8883         (cleanup_undefined_types_1): Update.
8884         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8885         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8886         (rust_internal_print_type, rust_composite_type)
8887         (rust_evaluate_funcall, rust_evaluate_subexp)
8888         (rust_inclusive_range_type_p): Update.
8889         * python/py-type.c (typy_get_tag): Update.
8890         * p-typeprint.c (pascal_type_print_base): Update.
8891         * mdebugread.c (parse_symbol, parse_type): Update.
8892         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8893         Update.
8894         * guile/scm-type.c (gdbscm_type_tag): Update.
8895         * go-lang.c (sixg_string_p): Update.
8896         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8897         Update.
8898         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8899         (TYPE_TAG_NAME): Remove.
8900         * gdbtypes.c (type_name_no_tag): Simplify.
8901         (check_typedef, check_types_equal, recursive_dump_type)
8902         (copy_type_recursive, arch_composite_type): Update.
8903         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8904         in summary mode when needed.
8905         * eval.c (evaluate_funcall): Update.
8906         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8907         (process_structure_scope, read_enumeration_type)
8908         (read_namespace_type, read_module_type, determine_prefix): Update.
8909         * cp-support.c (inspect_type): Update.
8910         * coffread.c (process_coff_symbol, decode_base_type): Update.
8911         * c-varobj.c (c_is_path_expr_parent): Update.
8912         * c-typeprint.c (c_type_print_base_struct_union): Update.
8913         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8914         summary when using C language.
8915         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8916         (gen_maybe_namespace_elt): Update.
8917         * ada-lang.c (ada_type_name): Simplify.
8918         (empty_record, ada_template_to_fixed_record_type_1)
8919         (template_to_static_fixed_type)
8920         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8921
8922 2018-06-01  Tom Tromey  <tom@tromey.com>
8923
8924         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8925         c_print_type.
8926         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8927         (c_print_type): Update.
8928         (c_print_type): New overload.
8929         (c_type_print_varspec_prefix, c_type_print_args)
8930         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8931         (c_type_print_base_struct_union, c_type_print_base_1)
8932         (cp_type_print_method_args): Add "language" parameter.
8933         (c_type_print_base): Update.
8934         * c-lang.h (c_print_type): Add new overload.
8935
8936 2018-06-01  Tom Tromey  <tom@tromey.com>
8937
8938         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8939         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8940
8941 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8942
8943         * aarch64-tdep.c (aarch64_sve_register_names): New const
8944         var.
8945         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8946         (AARCH64_SVE_Z_REGS_NUM): New define.
8947         (AARCH64_SVE_P_REGS_NUM): Likewise.
8948         (AARCH64_SVE_NUM_REGS): Likewise.
8949
8950 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8951
8952         * nat/linux-ptrace.h [__alpha__]
8953         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8954         definitions.
8955
8956 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8957
8958         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8959         the endianness selected.
8960         * NEWS: Document `set endian auto' mode operation update.
8961
8962 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8963
8964         * Makefile.in: Add new header.
8965         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8966         (sve_vl_from_vg): Likewise.
8967         (sve_vq_from_vl): Likewise.
8968         (sve_vl_from_vq): Likewise.
8969         (sve_vq_from_vg): Likewise.
8970         (sve_vg_from_vq): Likewise.
8971         * configure.nat: Add new c file.
8972         * nat/aarch64-sve-linux-ptrace.c: New file.
8973         * nat/aarch64-sve-linux-ptrace.h: New file.
8974
8975 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8976
8977         * aarch64-linux-nat.c (aarch64_linux_read_description):
8978         Add parmeter zero.
8979         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8980         Likewise.
8981         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8982         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8983         (aarch64_gdbarch_init): Add parmeter zero.
8984         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8985         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8986         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8987         parmeter.
8988         * doc/gdb.texinfo: Describe SVE feature
8989         * features/aarch64-sve.c: New file.
8990
8991 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8992
8993         PR gdb/23210
8994         * gdbarch.sh (significant_addr_bit): Default to zero when
8995         not set by target architecture.
8996         * gdbarch.c: Re-generated.
8997         * utils.c (address_significant): Update.
8998
8999 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
9000
9001         * stack.c (func_command): Remove trailing newline in call to error.
9002
9003 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9004
9005         * regcache.h (regcache_raw_collect): Remove, update callers to
9006         use regcache::raw_collect.
9007         * regcache.c (regcache_raw_collect): Remove.
9008
9009 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9010
9011         * regcache.h (regcache_raw_supply): Remove, update callers to
9012         use detached_regcache::raw_supply.
9013         * regcache.c (regcache_raw_supply): Remove.
9014
9015 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9016
9017         * regcache.h (regcache_cooked_write_part): Remove, update
9018         callers to use regcache::cooked_write_part.
9019         * regcache.c (regcache_cooked_write_part): Remove.
9020
9021 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9022
9023         * regcache.h (regcache_cooked_read_part): Remove, update callers
9024         to use readable_regcache::cooked_read_part.
9025         * regcache.c (regcache_cooked_read_part): Remove.
9026
9027 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9028
9029         * regcache.h (regcache_cooked_read_value): Remove, update
9030         callers to use readable_regcache::cooked_read_value.
9031         * regcache.c (regcache_cooked_read_value): Remove.
9032
9033 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9034
9035         * regcache.h (regcache_cooked_write): Remove, update callers to
9036         use regcache::cooked_write.
9037         * regcache.c (regcache_cooked_write): Remove.
9038
9039 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9040
9041         * regcache.h (regcache_invalidate): Remove, update callers to
9042         use detached_regcache::invalidate instead.
9043         * regcache.c (regcache_invalidate): Remove.
9044
9045 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9046
9047         * regcache.h (regcache_raw_write_part): Remove, update callers
9048         to use regcache::raw_write_part instead.
9049         * regcache.c (regcache_raw_write_part): Remove.
9050
9051 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9052
9053         * regcache.h (regcache_raw_read_part): Remove, update callers to
9054         use readable_regcache::raw_read_part instead.
9055         * regcache.c (regcache_raw_read_part): Remove.
9056
9057 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9058
9059         * regcache.h (regcache_cooked_read): Remove, update callers to
9060         use readable_regcache::cooked_read instead.
9061         * regcache.c (regcache_cooked_read): Remove.
9062
9063 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9064
9065         * regcache.h (regcache_raw_write): Remove, update callers to use
9066         regcache::raw_write instead.
9067         * regcache.c (regcache_raw_write): Remove.
9068
9069 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9070
9071         * regcache.h (regcache_raw_read): Remove, update callers to use
9072         readable_regcache::raw_read instead.
9073         * regcache.c (regcache_raw_read): Remove.
9074
9075 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9076
9077         * regcache.h (regcache_raw_update): Remove, update callers to
9078         use readable_regcache::raw_update instead.
9079         * regcache.c (regcache_raw_update): Remove.
9080
9081 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9082
9083         * regcache.h (regcache_register_status): Remove, update callers
9084         to use reg_buffer::get_register_status directly instead.
9085         * regcache.c (regcache_register_status): Remove.
9086
9087 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9088
9089         * regcache.h (regcache_get_ptid): Remove, update all callers to
9090         call regcache::ptid instead.
9091         * regcache.c (regcache_get_ptid): Remove.
9092
9093 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9094
9095         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9096
9097 2018-05-30  Pedro Alves  <palves@redhat.com>
9098
9099         * common/common-exceptions.h (exception_rethrow): Use
9100         ATTRIBUTE_NORETURN.
9101
9102 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
9103
9104         * breakpoint.c (print_solib_event, check_status_catch_solib):
9105         Remove struct keyword in range-based for loops.
9106         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9107         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9108         Likewise.
9109         * linespec.c (find_superclass_methods, search_minsyms_for_name):
9110         Likewise.
9111         * symfile.c (addr_info_make_relative): Likewise.
9112         * thread.c (value_in_thread_stack_temporaries): Likewise.
9113
9114 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
9115
9116         PR gdb/16841
9117         * valops.c (value_struct_elt_for_reference): Call check_typedef on
9118         aggregate type to get its real type before accessing it.
9119
9120 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
9121
9122         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9123         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9124         * coff-pe-read.c (add_pe_forwarded_sym): Replace
9125         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9126         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9127         * jit.c (jit_breakpoint_re_set_internal): Likewise.
9128         * printcmd.c (info_address_command): Likewise.
9129
9130 2018-05-29  Tom Tromey  <tom@tromey.com>
9131
9132         * windows-nat.c (handle_exception): Update fall-through comment.
9133
9134 2018-05-29  Tom Tromey  <tom@tromey.com>
9135
9136         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
9137         (struct program_space) <added_solibs>: Now a std::vector.
9138         * breakpoint.c (print_solib_event): Update.
9139         (check_status_catch_solib): Update.
9140         * progspace.c (clear_program_space_solib_cache): Update.
9141         * solib.c (update_solib_list): Update.
9142
9143 2018-05-29  Tom Tromey  <tom@tromey.com>
9144
9145         * python/py-type.c (typy_richcompare): Update.
9146         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9147         * gdbtypes.h (types_deeply_equal): Return bool.
9148         (types_equal): Likewise.
9149         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
9150         declare VEC.
9151         (check_types_equal): Change worklist to std::vector.  Return
9152         bool.
9153         (struct type_equality_entry): Add constructor.
9154         (compare_maybe_null_strings): Return bool.
9155         (check_types_worklist): Return bool.  Change worklist to
9156         std::vector.
9157         (types_deeply_equal): Use std::vector.
9158         (types_equal): Return bool.
9159         (compare_maybe_null_strings): Simplify.
9160
9161 2018-05-29  Tom Tromey  <tom@tromey.com>
9162
9163         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
9164
9165 2018-05-29  Tom Tromey  <tom@tromey.com>
9166
9167         * objc-lang.h: Don't include cp-support.h.
9168         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
9169         declare VEC.
9170
9171 2018-05-27  Tom Tromey  <tom@tromey.com>
9172
9173         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9174
9175 2018-05-25  Tom Tromey  <tom@tromey.com>
9176
9177         * value.c (value::location): Initialize.
9178
9179 2018-05-25  Tom Tromey  <tom@tromey.com>
9180
9181         * dbxread.c (init_bincl_list): Remove.
9182         (bincl_list): Now a std::vector.
9183         (bincls_allocated, next_bincl): Remove.
9184         (free_bincl_list, do_free_bincl_list_cleanup)
9185         (make_cleanup_free_bincl_list): Remove.
9186         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9187         unique_xmalloc_ptr.
9188         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9189         (struct header_file_location): Add constructor.
9190         (add_bincl_to_list): Remove.
9191
9192 2018-05-25  Tom Tromey  <tom@tromey.com>
9193
9194         * tui/tui.c (tui_enable): Update.
9195         * mi/mi-interp.c (mi_interp::init): Update.
9196         * interps.h (class interp) <name>: New method.
9197         <m_name>: Rename from name.
9198         (~scoped_restore_interp): Update.
9199         * interps.c (interp::interp): Update.
9200         (interp_add, interp_set, interp_lookup_existing)
9201         (current_interp_named_p): Update.
9202
9203 2018-05-25  Tom Tromey  <tom@tromey.com>
9204
9205         * interps.c (interp_name): Remove.
9206         * mi/mi-interp.c (mi_interp::init): Update.
9207         * interps.h (interp_name): Remove.
9208         (~scoped_restore_interp): Update.
9209         * tui/tui.c (tui_enable): Update.
9210
9211 2018-05-25  Tom Tromey  <tom@tromey.com>
9212
9213         * utils.c (fputs_maybe_filtered): Update.
9214         * linespec.c (decode_line_full): Update.
9215         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9216         (mi_print_breakpoint_for_event, mi_solib_loaded)
9217         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9218         (mi_user_selected_context_changed): Update.
9219         * mi/mi-main.c (mi_execute_command): Update.
9220         * cli/cli-script.c (execute_control_command): Update.
9221         * python/python.c (execute_gdb_command): Update.
9222         * solib.c (info_sharedlibrary_command): Update.
9223         * interps.c (interp_ui_out): Remove.
9224         * interps.h (interp_ui_out): Remove.
9225
9226 2018-05-25  Tom Tromey  <tom@tromey.com>
9227
9228         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9229         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9230         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9231
9232 2018-05-25  Tom Tromey  <tom@tromey.com>
9233
9234         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9235         * interps.c (interp_exec): Use scoped_restore.
9236
9237 2018-05-25  Tom Tromey  <tom@tromey.com>
9238
9239         * remote.c (remote_target::remote_file_get): Use
9240         gdb::byte_vector.
9241         (remote_target::remote_file_put): Likewise.
9242
9243 2018-05-25  Tom Tromey  <tom@tromey.com>
9244
9245         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9246         a std::string.
9247         (get_pe_section_index, add_pe_exported_sym): Update.
9248         (read_pe_exported_syms): Use gdb::def_vector.
9249
9250 2018-05-25  Tom Tromey  <tom@tromey.com>
9251
9252         * frame.c (remove_prev_frame): Remove.
9253         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9254
9255 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
9256
9257         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9258         Remove prototypes.
9259         * mips-linux-nat.c (supply_fpregset): Always call
9260         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9261         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9262         `mips_fill_fpregset'.
9263         * mips-linux-tdep.c (mips_supply_fpregset)
9264         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9265         (mips_fill_fpregset_wrapper): Remove functions.
9266         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9267         (mips_linux_fpregset): Remove variable.
9268         (mips_linux_iterate_over_regset_sections): Use
9269         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9270         (mips_linux_o32_sigframe_init): Remove comment.
9271
9272 2018-05-25  Pedro Alves  <palves@redhat.com>
9273
9274         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9275         (struct readahead_cache, struct packet_reg, struct
9276         remote_arch_state, class remote_state): Move higher up in the
9277         file.
9278         (remote_target::m_remote_state): Now an object instead of a pointer.
9279         (remote_target::get_remote_state): Adjust.
9280
9281 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9282
9283         * stack.c (select_and_print_frame): Delete.
9284         (struct function_bounds): Move struct within function.
9285         (func_command): Most content moved into new function
9286         find_frame_for_function, use new function, print result, add
9287         function comment.
9288         (find_frame_for_function): New function, now returns a result.
9289
9290 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9291
9292         * stack.c (iterate_over_block_arg_vars): Fix comment.
9293         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9294
9295 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9296
9297         PR gdb/23203
9298         * frame.c
9299         (scoped_restore_selected_frame::scoped_restore_selected_frame):
9300         Define.
9301         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9302         Define.
9303         * frame.h (class scoped_restore_selected_frame): New class.
9304         * stack.c (print_frame_local_vars): Remove catching and rethrowing
9305         of any exception, use scoped_restore_selected_frame to restore the
9306         frame instead.
9307
9308 2018-05-24  Pedro Alves  <palves@redhat.com>
9309
9310         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9311         override.
9312
9313 2018-05-23  Tom Tromey  <tom@tromey.com>
9314
9315         * complaints.c (struct complaints): Remove.
9316         (symfile_complaint_book): Remove.
9317         (series): New global.
9318         (complaint_internal): Update.
9319         (clear_complaints): Update.
9320
9321 2018-05-23  Tom Tromey  <tom@tromey.com>
9322
9323         * complaints.c (counters): New global.
9324         (struct complain): Remove.
9325         (struct complaints) <root>: Remove.
9326         (complaint_sentinel): Remove.
9327         (symfile_complaint_book): Update.
9328         (find_complaint) Remove.
9329         (complaint_internal, clear_complaints): Update.
9330
9331 2018-05-23  Tom Tromey  <tom@tromey.com>
9332
9333         * complaints.c (struct complain) <file, line>: Remove.
9334         (find_complaint): Remove file, line parameters.
9335         (complaint_internal): Update.
9336
9337 2018-05-23  Tom Tromey  <tom@tromey.com>
9338
9339         * complaints.c (vcomplaint): Remove.
9340         (complaint_internal) Merge in contents of vcomplaint.
9341
9342 2018-05-23  Tom Tromey  <tom@tromey.com>
9343
9344         * complaints.c (struct complaints) <explanation>: Remove.
9345         (symfile_explanations): Remove.
9346         (symfile_complaint_book): Update.
9347         (vcomplaint): Update.
9348         (struct explanation): Remove.
9349
9350 2018-05-23  Tom Tromey  <tom@tromey.com>
9351
9352         * complaints.c (symfile_complaints): Remove.
9353         (complaint_internal): Remove "complaints" parameter.
9354         (clear_complaints, vcomplaint): Remove "c" parameter.
9355         (get_complaints): Remove.
9356         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9357         (dwarf2_debug_line_missing_file_complaint)
9358         (dwarf2_debug_line_missing_end_sequence_complaint)
9359         (dwarf2_complex_location_expr_complaint)
9360         (dwarf2_const_value_length_mismatch_complaint)
9361         (dwarf2_section_buffer_overflow_complaint)
9362         (dwarf2_macro_malformed_definition_complaint)
9363         (dwarf2_invalid_attrib_class_complaint)
9364         (create_addrmap_from_index, dw2_symtab_iter_next)
9365         (dw2_expand_marked_cus)
9366         (dw2_debug_names_iterator::find_vec_in_debug_names)
9367         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9368         (create_debug_type_hash_table, init_cutu_and_read_dies)
9369         (partial_die_parent_scope, add_partial_enumeration)
9370         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9371         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9372         (read_import_statement, read_file_scope, create_dwo_cu_reader)
9373         (create_cus_hash_table, create_dwp_hash_table)
9374         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9375         (dwarf2_rnglists_process, dwarf2_ranges_process)
9376         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9377         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9378         (handle_struct_member_die, process_structure_scope)
9379         (read_array_type, read_common_block, read_module_type)
9380         (read_tag_pointer_type, read_typedef, read_base_type)
9381         (read_subrange_type, load_partial_dies, partial_die_info::read)
9382         (partial_die_info::read, partial_die_info::read)
9383         (partial_die_info::read, read_checked_initial_length_and_offset)
9384         (dwarf2_string_attr, read_formatted_entries)
9385         (dwarf_decode_line_header)
9386         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9387         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9388         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9389         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9390         (get_signatured_type, get_DW_AT_signature_type)
9391         (decode_locdesc, file_file_name, consume_improper_spaces)
9392         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9393         (dwarf_decode_macro_bytes, dwarf_decode_macros)
9394         (dwarf2_symbol_mark_computed, set_die_type)
9395         (read_attribute_value): Update.
9396         * stap-probe.c (handle_stap_probe, get_stap_base_address):
9397         Update.
9398         * dbxread.c (unknown_symtype_complaint)
9399         (lbrac_mismatch_complaint, repeated_header_complaint)
9400         (set_namestring, function_outside_compilation_unit_complaint)
9401         (read_dbx_symtab, process_one_symbol): Update.
9402         * gdbtypes.c (stub_noname_complaint): Update.
9403         * windows-nat.c (handle_unload_dll): Update.
9404         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9405         (decode_base_type): Update.
9406         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9407         (eb_complaint, record_include_begin, record_include_end)
9408         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9409         (process_xcoff_symbol, read_symbol)
9410         (function_outside_compilation_unit_complaint)
9411         (scan_xcoff_symtab): Update.
9412         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9413         * buildsym.c (finish_block_internal, make_blockvector)
9414         (end_symtab_get_static_block, augment_type_symtab): Update.
9415         * dtrace-probe.c (dtrace_process_dof)
9416         (dtrace_static_probe_ops::get_probes): Update.
9417         * complaints.h (struct complaint): Don't declare.
9418         (symfile_complaints): Remove.
9419         (complaint_internal): Remove "complaints" parameter.
9420         (complaint): Likewise.
9421         (clear_complaints): Likewise.
9422         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9423         (reread_symbols): Update.
9424         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9425         (dwarf2_frame_cache, decode_frame_entry): Update.
9426         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9427         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9428         (info_selectors_command): Update.
9429         * macrotab.c (macro_include, check_for_redefinition)
9430         (macro_undef): Update.
9431         * objfiles.c (filter_overlapping_sections): Update.
9432         * stabsread.c (invalid_cpp_abbrev_complaint)
9433         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9434         (define_symbol, error_type, read_type, rs6000_builtin_type)
9435         (stabs_method_name_from_physname, read_member_functions)
9436         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9437         (attach_fields_to_type, complain_about_struct_wipeout)
9438         (read_range_type, read_args, common_block_start)
9439         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9440         Update.
9441         * mdebugread.c (index_complaint, unknown_ext_complaint)
9442         (basic_type_complaint, bad_tag_guess_complaint)
9443         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9444         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9445         (parse_procedure, parse_lines)
9446         (function_outside_compilation_unit_complaint)
9447         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9448         (bad_tag_guess_complaint, reg_value_complaint): Update.
9449         * cp-support.c (demangled_name_complaint): Update.
9450         * macroscope.c (sal_macro_scope): Update.
9451         * dwarf-index-write.c (class debug_names): Update.
9452
9453 2018-05-23  Tom Tromey  <tom@tromey.com>
9454
9455         * complaints.c (clear_complaints): Remove "noisy" parameter.
9456         * complaints.h (clear_complaints): Update.
9457         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9458         (reread_symbols): Update.
9459
9460 2018-05-23  Tom Tromey  <tom@tromey.com>
9461
9462         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9463         SUBSEQUENT_MESSAGE.
9464         (vcomplaint, clear_complaints): Update.
9465         (symfile_explanations): Remove some messages.
9466
9467 2018-05-23  Tom Tromey  <tom@tromey.com>
9468
9469         * complaints.c (internal_complaint): Remove.
9470         * complaints.h (internal_complaint): Remove.
9471
9472 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9473
9474         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9475
9476 2018-05-22  Pedro Alves  <palves@redhat.com>
9477
9478         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9479         (remote_fileio_badfd, remote_fileio_return_errno)
9480         (remote_fileio_return_success, remote_fileio_func_open)
9481         (remote_fileio_func_open, remote_fileio_func_close)
9482         (remote_fileio_func_read, remote_fileio_func_write)
9483         (remote_fileio_func_lseek, remote_fileio_func_rename)
9484         (remote_fileio_func_unlink, remote_fileio_func_stat)
9485         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9486         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9487         remote_target parameter.
9488         (remote_fio_func_map) <func>: Add remote_target parameter.
9489         (do_remote_fileio_request, remote_fileio_request):
9490         * remote-fileio.h (remote_fileio_request):
9491         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9492         remote_target parameter.
9493         (remote_notif_process, handle_notification): Adjust to pass down
9494         the remote.
9495         (remote_notif_state_allocate): Add remote_target parameter.  Save
9496         it.
9497         * remote-notif.h (struct remote_target): Forward declare.
9498         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9499         remote_target parameter.
9500         (struct remote_notif_state) <remote>: New field.
9501         (remote_notif_ack, remote_notif_parse): Add remote_target
9502         parameter.
9503         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9504         remote_target parameter.
9505         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9506         (threads_listing_context, rmt_thread_action, protocol_feature)
9507         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9508         (packet_result, struct threads_listing_context, remote_state):
9509         Move definitions and declarations higher up.
9510         (remote_target) <~remote_target>: Declare.
9511         (remote_download_command_source, remote_file_put, remote_file_get)
9512         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9513         (remote_hostio_pread_vFile, remote_hostio_send_command)
9514         (remote_hostio_set_filesystem, remote_hostio_open)
9515         (remote_hostio_close, remote_hostio_unlink, remote_state)
9516         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9517         (get_memory_write_packet_size, get_memory_read_packet_size)
9518         (append_pending_thread_resumptions, remote_detach_1)
9519         (append_resumption, remote_resume_with_vcont)
9520         (add_current_inferior_and_thread, wait_ns, wait_as)
9521         (process_stop_reply, remote_notice_new_inferior)
9522         (process_initial_stop_replies, remote_add_thread)
9523         (btrace_sync_conf, remote_btrace_maybe_reopen)
9524         (remove_new_fork_children, kill_new_fork_children)
9525         (discard_pending_stop_replies, stop_reply_queue_length)
9526         (check_pending_events_prevent_wildcard_vcont)
9527         (discard_pending_stop_replies_in_queue, stop_reply)
9528         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9529         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9530         (remote_interrupt_as, remote_interrupt_ns)
9531         (remote_get_noisy_reply, remote_query_attached)
9532         (remote_add_inferior, remote_current_thread, get_current_thread)
9533         (set_thread, set_general_thread, set_continue_thread)
9534         (set_general_process, write_ptid)
9535         (remote_unpack_thread_info_response, remote_get_threadinfo)
9536         (parse_threadlist_response, remote_get_threadlist)
9537         (remote_threadlist_iterator, remote_get_threads_with_ql)
9538         (remote_get_threads_with_qxfer)
9539         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9540         (get_offsets, remote_check_symbols, remote_supported_packet)
9541         (remote_query_supported, remote_packet_size)
9542         (remote_serial_quit_handler, remote_detach_pid)
9543         (remote_vcont_probe, remote_resume_with_hc)
9544         (send_interrupt_sequence, interrupt_query)
9545         (remote_notif_get_pending_events, fetch_register_using_p)
9546         (send_g_packet, process_g_packet, fetch_registers_using_g)
9547         (store_register_using_P, store_registers_using_G)
9548         (set_remote_traceframe, check_binary_download)
9549         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9550         (remote_xfer_live_readonly_partial, remote_read_bytes)
9551         (remote_send_printf, remote_flash_write, readchar)
9552         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9553         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9554         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9555         (extended_remote_disable_randomization, extended_remote_run)
9556         (send_environment_packet, extended_remote_environment_support)
9557         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9558         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9559         (packet_command): Now methods of ...
9560         (remote_target): ... this class.
9561         (m_remote_state) <remote_target>: New field.
9562         (struct remote_state) <stop_reply_queue,
9563         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9564         fields.
9565         (remote_state::remote_state): Allocate stop_reply_queue.
9566         (remote_state): Delete global.
9567         (get_remote_state_raw): Delete.
9568         (remote_target::get_remote_state): Allocate m_remote_state on
9569         demand.
9570         (get_current_remote_target): New.
9571         (remote_ops, extended_remote_ops): Delete.
9572         (wait_forever_enabled_p, remote_async_inferior_event_token):
9573         Delete, moved to struct remote_state.
9574         (remote_target::close): Delete self.  Destruction bits split to
9575         ...
9576         (remote_target::~remote_target): ... this.
9577         (show_memory_packet_size): Adjust to use
9578         get_current_remote_target.
9579         (struct protocol_feature) <func>: Add remote_target parameter.
9580         All callers adjusted.
9581         (curr_quit_handler_target): New.
9582         (remote_serial_quit_handler): Reimplement.
9583         (remote_target::open_1): Adjust to use get_current_remote_target.
9584         Heap-allocate remote_target/extended_remote_target instances.
9585         (vcont_builder::vcont_builder): Add remote_target parameter, and
9586         save it in m_remote.  All callers adjusted.
9587         (vcont_builder::m_remote): New field.
9588         (vcont_builder::restart, vcont_builder::flush)
9589         (vcont_builder::push_action): Use it.
9590         (remote_target::commit_resume): Use it.
9591         (struct queue_iter_param) <remote>: New field.
9592         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9593         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9594         (check_pending_event_prevents_wildcard_vcont_callback)
9595         (remote_target::check_pending_events_prevent_wildcard_vcont)
9596         (remote_target::discard_pending_stop_replies)
9597         (remote_target::discard_pending_stop_replies_in_queue)
9598         (remote_target::remote_notif_remove_queued_reply): Fill in
9599         'remote' field.
9600         (remote_notif_get_pending_events): New.
9601         (remote_target::readchar, remote_target::remote_serial_write):
9602         Save/restore curr_quit_handler_target.
9603         (putpkt): New.
9604         (kill_new_fork_children): Fill in 'remote' field.
9605         (packet_command): Use get_current_remote_target, defer to
9606         remote_target method of same name.
9607         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9608         parameter, and save it in m_remote.  All callers adjusted.
9609         (scoped_remote_fd::release): Use m_remote.
9610         (scoped_remote_fd::m_remote): New field.
9611         (remote_file_put, remote_file_get, remote_file_delete): Use
9612         get_current_remote_target, defer to remote_target method of same
9613         name.
9614         (remote_btrace_reset): Add remote_state paremeter.  Update all
9615         callers.
9616         (remote_async_inferior_event_handler). Pass down 'data'.
9617         (remote_new_objfile): Use get_current_remote_target.
9618         (remote_target::vcont_r_supported): New.
9619         (set_range_stepping): Use get_current_remote_target and
9620         remote_target::vcont_r_supported.
9621         (_initialize_remote): Don't allocate 'remote_state' and
9622         'stop_reply_queue' globals.
9623         * remote.h (struct remote_target): Forward declare.
9624         (getpkt, putpkt, remote_notif_get_pending_events): Add
9625         'remote_target' parameter.
9626
9627 2018-05-22  Pedro Alves  <palves@redhat.com>
9628
9629         * remote.c (vcont_builder): Now a class.  Make all data members
9630         private.
9631         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9632         Declare methods.
9633         (vcont_builder_restart): Rename to ...
9634         (vcont_builder::restart): ... this.
9635         (vcont_builder_flush): Rename to ...
9636         (vcont_builder::flush): ... this.
9637         (vcont_builder_push_action): Rename to ...
9638         (vcont_builder::push_action): ... this.
9639         (remote_target::commit_resume): Adjust.
9640
9641 2018-05-22  Pedro Alves  <palves@redhat.com>
9642
9643         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9644         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9645         (get_fixed_memory_packet_size): New.
9646         (get_memory_packet_size): Use it.
9647         (set_memory_packet_size): Don't override the config size with
9648         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9649         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9650         Don't refer to get_memory_packet_size if not connected to a remote
9651         target.  Show "(default)" if configured size is 0.
9652
9653 2018-05-22  Pedro Alves  <palves@redhat.com>
9654
9655         * remote.c (remote_target::mourn_inferior): Move
9656         discard_pending_stop_replies call here from ...
9657         (_initialize_remote): ... here.
9658
9659 2018-05-22  Pedro Alves  <palves@redhat.com>
9660
9661         * remote.c (compare_section_command): Remove set_general_process
9662         call.
9663
9664 2018-05-22  Pedro Alves  <palves@redhat.com>
9665
9666         * remote.c (struct packet_reg, struct remote_arch_state):
9667         Move higher up in the file.
9668         (remote_state) <m_arch_states>: Store remote_arch_state values
9669         instead of remote_arch_state pointers.
9670         (remote_state::get_remote_arch_state): Adjust.
9671
9672 2018-05-22  Pedro Alves  <palves@redhat.com>
9673
9674         * remote.c: Include <unordered_map>.
9675         (remote_state): Now a class.
9676         (remote_state) <get_remote_arch_state>: Declare method.
9677         <get_remote_arch_state>: New field.
9678         (remote_arch_state) <remote_arch_state>: Declare ctor.
9679         <regs>: Now a unique_ptr.
9680         (remote_gdbarch_data_handle): Delete.
9681         (get_remote_arch_state): Delete.
9682         (remote_state::get_remote_arch_state): New.
9683         (get_remote_state): Adjust to call remote_state's
9684         get_remote_arch_state method.
9685         (init_remote_state): Delete, bits factored out to ...
9686         (remote_arch_state::remote_arch_state): ... this new method.
9687         (get_remote_packet_size, get_memory_packet_size)
9688         (process_g_packet, remote_target::fetch_registers)
9689         (remote_target::prepare_to_store, store_registers_using_G)
9690         (remote_target::store_registers, remote_target::get_trace_status):
9691         Adjust to call remote_state's method.
9692         (_initialize_remote): Remove reference to
9693         remote_gdbarch_data_handle.
9694
9695 2018-05-22  Pedro Alves  <palves@redhat.com>
9696
9697         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9698         pread>: New method declarations.
9699         (remote_target::open_1): Adjust.
9700         (readahead_cache_invalidate): Rename to ...
9701         (readahead_cache::invalidate): ... this, and adjust to be a class
9702         method.
9703         (readahead_cache_invalidate_fd): Rename to ...
9704         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9705         class method.
9706         (remote_hostio_pwrite): Adjust.
9707         (remote_hostio_pread_from_cache): Rename to ...
9708         (readahead_cache::pread): ... this, and adjust to be a class
9709         method.
9710         (remote_hostio_close): Adjust.
9711
9712 2018-05-22  Pedro Alves  <palves@redhat.com>
9713
9714         * remote.c (remote_hostio_close_cleanup): Delete.
9715         (class scoped_remote_fd): New.
9716         (remote_file_put, remote_file_get): Use it.
9717
9718 2018-05-22  Pedro Alves  <palves@redhat.com>
9719
9720         (struct vCont_action_support): Use bool and initialize all fields.
9721         (struct readahead_cache): Initialize all fields.
9722         (remote_state): Use bool and initialize all fields.
9723         (remote_state::remote_state, remote_state::~remote_state): New.
9724         (new_remote_state): Delete.
9725         (_initialize_remote): Use new to allocate remote_state.
9726
9727 2018-05-22  Pedro Alves  <palves@redhat.com>
9728             張俊芝  <zjz@zjz.name>
9729
9730         PR gdb/22973
9731         * c-exp.y: Include "c-support.h".
9732         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9733         of tolower.  Use c_ident_is_alpha to scan names.
9734         * c-lang.c: Include "c-support.h".
9735         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9736         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9737         * c-support.h: New file, with bits factored out from ...
9738         * cp-name-parser.y: ... this file.
9739         Include "c-support.h".
9740         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9741         c-support.h and renamed.
9742         (symbol_end, yylex): Adjust.
9743
9744 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9745
9746         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9747         parameter type to CORE_ADDR.
9748         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9749         parameter type in declaration to CORE_ADDR.
9750         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9751         target_auxv_search to get AT_HWCAP and use the result to get the
9752         target description.
9753         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9754         to CORE_ADDR. Remove the cast of the return value to unsigned
9755         long. Fix error predicate of target_auxv_search.
9756         (ppc_linux_nat_target::read_description): Change the type of the
9757         hwcap variable to CORE_ADDR.
9758
9759 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9760
9761         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9762         if the size of fpscr is larger than 32 bits.
9763
9764 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9765
9766         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9767         (ppc32_linux_vsxregmap): New global.
9768         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9769         regcache_supply_regset, and regcache_collect_regset.
9770         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9771         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9772         (fetch_vsx_register, store_vsx_register): Remove.
9773         (fetch_vsx_registers): Add regno parameter. Get regset using
9774         ppc_linux_vsxregset. Use regset to supply registers.
9775         (store_vsx_registers): Add regno parameter. Get regset using
9776         ppc_linux_vsxregset. Use regset to collect registers.
9777         (fetch_register): Call fetch_vsx_registers instead of
9778         fetch_vsx_register.
9779         (store_register): Call store_vsx_registers instead of
9780         store_vsx_register.
9781         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9782         new regno parameter.
9783         (store_ppc_registers): Call store_vsx_registers with -1 for the
9784         new regno parameter.
9785         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9786         (ppc_collect_vsxregset): Remove.
9787
9788 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9789
9790         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9791         offset fields.
9792         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9793         for vector register offset fields.
9794         (ppc64_fbsd_reg_offsets): Likewise.
9795         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9796         to vector register offset fields.
9797         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9798         to vector register offset fields.
9799         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9800         vector register offset fields.
9801         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9802         initializers for vector register offset fields.
9803         (rs6000_aix64_reg_offsets): Likewise.
9804         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9805         (ppc_supply_vrregset): Remove.
9806         (ppc_collect_vrregset): Remove.
9807         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9808         (ppc_linux_vrregset) : New function.
9809         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9810         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9811         (ppc32_linux_vrregset): Remove.
9812         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9813         and use result instead of ppc32_linux_vrregset.
9814         (ppc32_linux_reg_offsets): Remove initializers for vector register
9815         offset fields.
9816         (ppc64_linux_reg_offsets): Likewise.
9817         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9818         * ppc-linux-nat.c: Include regset.h.
9819         (gdb_vrregset_t): Adjust comment to account for little-endian
9820         mode.
9821         (supply_vrregset, fill_vrregset): Remove.
9822         (fetch_altivec_register, store_altivec_register): Remove.
9823         (fetch_altivec_registers): Add regno parameter. Get regset using
9824         ppc_linux_vrregset. Use regset to supply registers.
9825         (store_altivec_registers): Add regno parameter. Get regset using
9826         ppc_linux_vrregset. Use regset to collect registers.
9827         (fetch_register): Call fetch_altivec_registers instead of
9828         fetch_altivec_register.
9829         (store_register): Call store_altivec_registers instead of
9830         store_altivec_register.
9831         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9832         the new regno parameter.
9833         (store_ppc_registers): Call store_altivec_registers with -1 for
9834         the new regno parameter.
9835
9836 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9837
9838         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9839         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9840         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9841         (gdb_vrregset_t): Change array type size to
9842         PPC_LINUX_SIZEOF_VRREGSET.
9843         (gdb_vsxregset_t): Change array type size to
9844         PPC_LINUX_SIZEOF_VSXREGSET.
9845         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9846         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9847         PPC_LINUX_SIZEOF_VSXREGSET.
9848
9849 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9850
9851         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9852         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9853         nat/ppc-linux.c.
9854         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9855         ppc_linux_target_wordsize with tid.
9856         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9857         wordsize with tid.
9858         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9859         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9860         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9861         tid parameter. Remove static specifier.
9862         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9863         (ppc_linux_target_wordsize): New declaration.
9864
9865 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9866
9867         * arch/ppc-linux-common.c: New file.
9868         * arch/ppc-linux-common.h: New file.
9869         * arch/ppc-linux-tdesc.h: New file.
9870         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9871         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9872         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9873         arch/ppc-linux-tdesc.h.
9874         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9875         arch/ppc-linux-tdesc.h.
9876         (ppc_linux_nat_target::read_description): Remove target
9877         description matching code. Fill a ppc_linux_features struct and
9878         call ppc_linux_match_description with it. Move comment about ISA
9879         2.05 to ppc-linux-common.c.
9880         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9881         arch/ppc-linux-tdesc.h.
9882         (ppc_linux_core_read_description): Remove target description
9883         matching code. Fill a ppc_linux_features struct and call
9884         ppc_linux_match_description with it.
9885         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9886         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9887         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9888         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9889         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9890         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9891         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9892         (tdesc_powerpc_e500l): Remove.
9893
9894 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9895
9896         * ada-lang.c (catch_assert_command): Pass empty string instead
9897         of NULL for excep_string argument.
9898
9899 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9900
9901         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9902         the width of the requested register exceeds the width of the
9903         `ptrace' data type.
9904
9905 2018-05-21  Tom Tromey  <tom@tromey.com>
9906
9907         * printcmd.c (output_command): Remove.
9908         (output_command_const): Rename to output_command.
9909         * valprint.h (output_command): Rename from output_command_const.
9910         * tracepoint.c (trace_dump_actions): Call output_command.
9911
9912 2018-05-21  Tom Tromey  <tom@tromey.com>
9913
9914         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9915         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9916         * ada-lang.h (create_ada_exception_catchpoint): Update.
9917         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9918         std::string.
9919         (create_excep_cond_exprs, ~ada_catchpoint)
9920         (should_stop_exception, print_one_exception)
9921         (print_mention_exception, print_recreate_exception): Update.
9922         (ada_get_next_arg): Remove.
9923         (catch_ada_exception_command_split): Use std::string.  Change type
9924         of "excep_string", "cond_string".
9925         (catch_ada_exception_command): Update.
9926         (create_ada_exception_catchpoint): Change type of excep_string.
9927         (ada_exception_sal): Remove excep_string parameter.
9928         (~ada_catchpoint): Remove.
9929
9930 2018-05-21  Tom Tromey  <tom@tromey.com>
9931
9932         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9933         cleanup.
9934
9935 2018-05-21  Tom Tromey  <tom@tromey.com>
9936
9937         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9938         Return unique_xmalloc_ptr.
9939         (print_it_exception): Update.
9940
9941 2018-05-21  Tom Tromey  <tom@tromey.com>
9942
9943         * tracepoint.c (trace_dump_actions): Use std::string.
9944
9945 2018-05-21  Tom Tromey  <tom@tromey.com>
9946
9947         * symfile.c (reread_symbols): Use std::string for original_name.
9948
9949 2018-05-21  Tom Tromey  <tom@tromey.com>
9950
9951         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9952         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9953         constructor.
9954
9955 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9956
9957         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9958         instance to...
9959         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9960         * objfiles.c (get_objfile_bfd_data): Allocate
9961         objfile_per_bfd_storage with obstack_new when allocating on
9962         obstack.
9963
9964 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9965
9966         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9967         OBSTACK_ZALLOC.
9968         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9969         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9970         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9971         (add_pending): Likewise.
9972         (parse_symbol): Likewise.
9973         (parse_partial_symbols): Likewise.
9974         (psymtab_to_symtab_1): Likewise.
9975         (new_psymtab): Likewise.
9976         (elfmdebug_build_psymtabs): Likewise.
9977         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9978         * objfiles.c (get_objfile_bfd_data): Likewise.
9979         (objfile_register_static_link): Likewise.
9980         * psymtab.c (allocate_psymtab): Likewise.
9981         * stabsread.c (read_member_functions): Likewise.
9982         * xcoffread.c (xcoff_end_psymtab): Likewise.
9983
9984 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9985
9986         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9987         compiler supports std::is_trivially_constructible.
9988         * common/poison.h: Include obstack.h.
9989         (IsMallocable): Define to is_trivially_constructible if the
9990         compiler supports it, define to true_type otherwise.
9991         (xobnew): New.
9992         (XOBNEW): Redefine.
9993         (xobnewvec): New.
9994         (XOBNEWVEC): Redefine.
9995         * gdb_obstack.h (obstack_zalloc): New.
9996         (OBSTACK_ZALLOC): Redefine.
9997         (obstack_calloc): New.
9998         (OBSTACK_CALLOC): Redefine.
9999         (obstack_new): New.
10000         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
10001         (gdbarch_obstack): New declaration in gdbarch.h, definition in
10002         gdbarch.c.
10003         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
10004         obstack_calloc/obstack_zalloc.
10005         (gdbarch_obstack_zalloc): Remove.
10006         * target-descriptions.c (tdesc_data_init): Use obstack_new.
10007
10008 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10009
10010         * stack.c (backtrace_command_1): Remove useless variable int i.
10011
10012 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10013
10014         * stack.c (print_frame_info): Fix comment.
10015
10016 2018-05-18  Tom Tromey  <tom@tromey.com>
10017
10018         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
10019         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
10020         (~dwarf2_per_objfile): Update
10021         (dwarf2_get_dwz_file): Use new.
10022         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10023         unique_ptr.
10024
10025 2018-05-18  Tom Tromey  <tom@tromey.com>
10026
10027         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10028         unique_ptr.
10029         * dwarf2read.c (struct dwp_file): Add constructor and
10030         initializers.
10031         (open_and_init_dwp_file): Return a unique_ptr.
10032         (dwarf2_per_objfile, create_dwp_hash_table)
10033         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10034         (lookup_dwo_unit_in_dwp): Update.
10035         (open_and_init_dwp_file, get_dwp_file): Update.
10036
10037 2018-05-18  Tom Tromey  <tom@tromey.com>
10038
10039         * dwarf2read.c (dwarf2_per_objfile): Update.
10040         (struct mapped_index): Add initializers.
10041         (dwarf2_read_index): Use new.
10042         (dw2_symtab_iter_init): Update.
10043         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10044         unique_ptr.
10045
10046 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10047
10048         * dwarf2read.c (mapped_index) <total_size>: Remove.
10049
10050 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10051
10052         * unittests/format_pieces-selftests.c (test_format_specifier):
10053         Add ARI comments.
10054
10055 2018-05-18  Tom Tromey  <tom@tromey.com>
10056
10057         * c-typeprint.c (maybe_print_hole): New function.
10058         (c_print_type_struct_field_offset): Update.
10059         (c_type_print_base_struct_union): Call maybe_print_hole.
10060
10061 2018-05-17  Keith Seitz  <keiths@redhat.com>
10062
10063         * breakpoint.c (build_bpstat_chain): New function, moved from
10064         bpstat_stop_status.
10065         (bpstat_stop_status): Add optional parameter, `stop_chain'.
10066         If no stop chain is passed, call build_bpstat_chain to build it.
10067         * breakpoint.h (build_bpstat_chain): Declare.
10068         (bpstat_stop_status): Move documentation here from breakpoint.c.
10069         * infrun.c (handle_signal_stop): Before eliding inlined frames,
10070         build the stop chain and pass it to skip_inline_frames.
10071         Pass this stop chain to bpstat_stop_status.
10072         * inline-frame.c: Include breakpoint.h.
10073         (stopped_by_user_bp_inline_frame): New function.
10074         (skip_inline_frames): Add parameter `stop_chain'.
10075         Move documention to inline-frame.h.
10076         If non-NULL, use stopped_by_user_bp_inline_frame to determine
10077         whether the frame should be elided.
10078         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10079         Add moved documentation and update for new parameter.
10080
10081 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10082
10083         PR cli/14975
10084         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10085         unittests/format_pieces-selftests.c.
10086         * common/format.h (format_piece) <operator==>: New.
10087         (format_pieces) <operator[]>: Remove.
10088         * common/format.c (format_pieces::format_pieces): Handle \e.
10089         * unittests/format_pieces-selftests.c: New.
10090
10091 2018-05-17  Tom Tromey  <tom@tromey.com>
10092
10093         PR symtab/23010:
10094         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10095         (dw2_instantiate_symtab): Add skip_partial parameter.
10096         (dw2_find_last_source_symtab, dw2_map_expand_apply)
10097         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10098         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10099         (dw2_expand_symtabs_matching_one)
10100         (dw2_find_pc_sect_compunit_symtab)
10101         (dw2_debug_names_lookup_symbol)
10102         (dw2_debug_names_expand_symtabs_for_function): Update.
10103         (init_cutu_and_read_dies): Add skip_partial parameter.
10104         (process_psymtab_comp_unit, build_type_psymtabs_1)
10105         (process_skeletonless_type_unit, load_partial_comp_unit)
10106         (psymtab_to_symtab_1): Update.
10107         (load_full_comp_unit): Add skip_partial parameter.
10108         (process_imported_unit_die, dwarf2_read_addr_index)
10109         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10110         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10111         (read_signatured_type): Update.
10112
10113 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10114
10115         * value.c (release_value): Remove unused variable.
10116         (record_latest_value): Likewise.
10117         (access_value_history): Likewise.
10118         (preserve_values): Likewise.
10119
10120 2018-05-17  Tom Tromey  <tom@tromey.com>
10121
10122         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10123         Initialize.
10124
10125 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
10126
10127         PR gdb/22286
10128         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10129         Also handle registers whose width is not a multiple of
10130         PTRACE_TYPE_RET.
10131         (linux_nat_trad_target::store_register): Likewise.
10132
10133 2018-05-16  Tom Tromey  <tom@tromey.com>
10134
10135         * gdbcore.h (core_bfd): Redefine.
10136         * corelow.c (core_target::close): Update.
10137         (core_target_open): Update.
10138         * progspace.h (struct program_space) <cbfd>: Now a
10139         gdb_bfd_ref_ptr.
10140
10141 2018-05-16  Tom Tromey  <tom@tromey.com>
10142
10143         PR cli/19551:
10144         * symfile-add-flags.h (enum symfile_add_flags)
10145         <SYMFILE_NOT_FILENAME>: New constant.
10146         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
10147         objfile name from BFD.
10148         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10149         * minidebug.c (find_separate_debug_file_in_section): Put
10150         ".gnu_debugdata" into BFD's file name.
10151
10152 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
10153
10154         * regcache.c (regcache_read_ftype, regcache_write_ftype):
10155         Remove.
10156
10157 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
10158
10159         PR binutils/21446
10160         * aarch64-tdep.c (aarch64_analyze_prologue,
10161         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10162         Indicate not interested in errors.
10163
10164 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10165
10166         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10167         Supply the MIPS_ZERO_REGNUM register.
10168
10169 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10170
10171         * mips-tdep.c (mask_address_var): Make variable static.
10172
10173 2018-05-14  Tom Tromey  <tom@tromey.com>
10174
10175         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10176
10177 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
10178
10179         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10180         FXSAVE_ADDR for the mxcsr register.
10181
10182 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
10183
10184         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10185
10186 2018-05-11  Pedro Alves  <palves@redhat.com>
10187
10188         * corelow.c (core_target) <core_target>: No longer inline.
10189         Initialize m_core_gdbarch, m_core_vec and build the section table
10190         here.
10191         <~core_target>: New.
10192         <core_gdbarch, get_core_register_section>: New methods.
10193         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10194         factored out from ...
10195         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10196         (core_ops): Delete.
10197         (sniff_core_bfd): Add gdbarch parameter.
10198         (core_close): Delete, merged into ...
10199         (core_target::close): ... here.  Delete self.
10200         (core_close_cleanup): Delete.
10201         (core_target_open): Allocate a core_target on the heap.  Use a
10202         unique_ptr instead of a cleanup.  Bits moved into the core_target
10203         ctor.  Adjust to use core_target methods instead of globals.
10204         (get_core_register_section): Rename to ...
10205         (core_target::get_core_register_section): ... this and adjust.
10206         (struct get_core_registers_cb_data): New.
10207         (get_core_registers_cb): Use it.  Use bool.
10208         (core_target::fetch_registers, core_target::files_info)
10209         (core_target::xfer_partial, core_target::read_description)
10210         (core_target::pid_to, core_target::thread_name): Adjust to
10211         reference class fields instead of globals.
10212         * target.h (struct target_ops_deleter, target_ops_up): New.
10213
10214 2018-05-11  Pedro Alves  <palves@redhat.com>
10215
10216         * corefile.c (core_file_command): Move to corelow.c.
10217         * corelow.c (the_core_target): Delete.
10218         (core_file_command): Moved from corefile.c.  Check exec_bfd
10219         instead of the_core_target.  Use target_detach instead of calling
10220         into the_core_target directly.
10221         (maybe_say_no_core_file_now): New.
10222         (core_target::detach): Use it.
10223         (_initialize_corelow): Remove references to the_core_target.
10224         * gdbcore.h (the_core_target): Delete.
10225
10226 2018-05-11  Tom Tromey  <tromey@redhat.com>
10227             Pedro Alves  <palves@redhat.com>
10228
10229         * corefile.c (core_bfd): Remove.
10230         * gdbcore.h (core_bfd): Now a macro.
10231         * progspace.h (struct program_space) <cbfd>: New field.
10232
10233 2018-05-11  Tom Tromey  <tom@tromey.com>
10234
10235         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10236         gdb::def_vector.
10237
10238 2018-05-10  Tom Tromey  <tom@tromey.com>
10239
10240         * configure: Rebuild.
10241         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10242
10243 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
10244
10245         PR server/23158:
10246         * regformats/regdat.sh: Adjust script, following the addition
10247         of the new expedite_regs parameter to init_target_desc.
10248
10249 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
10250     
10251         PR gdb/23127
10252         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10253         set_gdbarch_significant_addr_bit.
10254         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10255         set_gdbarch_significant_addr_bit.
10256         * utils.c (address_significant): Update to sign extend addr.
10257
10258 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
10259
10260         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10261         (xtensa_linux_init_abi): Limit tdep->num_regs by
10262         tdep->num_nopriv_regs.
10263         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10264         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10265         not initialized.
10266
10267 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
10268
10269         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10270
10271 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
10272
10273         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10274         (I387_MXCSR_INIT_VAL): New constant.
10275         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10276         buffer if it was supplied by the inferior.
10277         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10278         (i387_xsave_get_clear_bv): New function.
10279         (i387_supply_xsave): Only read x87 control registers from the
10280         xsave buffer if the feature is enabled, and the state will have
10281         been written, otherwise, provide a suitable default.
10282         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10283         including x87 control registers.  Update control registers if they
10284         have changed from the default value, and mark features as enabled
10285         as required.
10286         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10287
10288 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10289
10290         * spu-tdep.c (info_spu_event_command): Fix output formatting.
10291
10292 2018-05-07  Tom Tromey  <tom@tromey.com>
10293
10294         * configure: Rebuild.
10295         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10296
10297 2018-05-07  Tom Tromey  <tom@tromey.com>
10298
10299         PR tdep/20362:
10300         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10301         bit.  Use correct value for VDIV.
10302
10303 2018-05-04  Tom Tromey  <tom@tromey.com>
10304
10305         * configure: Rebuild.
10306         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10307
10308 2018-05-04  Tom Tromey  <tom@tromey.com>
10309
10310         * linux-record.c (record_linux_system_call) <case
10311         RECORD_SYS_RECVFROM>: Add "break".
10312
10313 2018-05-04  Tom Tromey  <tom@tromey.com>
10314
10315         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10316         Add missing "break".
10317         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10318         Add missing "break".
10319
10320 2018-05-04  Tom Tromey  <tom@tromey.com>
10321
10322         * rs6000-tdep.c (ppc_process_record_op4)
10323         (ppc_process_record_op63): Add fall-through comment.
10324
10325 2018-05-04  Tom Tromey  <tom@tromey.com>
10326
10327         * i386-tdep.c (i386_process_record): Add fall-through comment.
10328
10329 2018-05-04  Tom Tromey  <tom@tromey.com>
10330
10331         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10332         comment.
10333
10334 2018-05-04  Tom Tromey  <tom@tromey.com>
10335
10336         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10337         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10338         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10339         comment.
10340         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10341         comment.
10342         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10343         comment.
10344
10345 2018-05-04  Tom Tromey  <tom@tromey.com>
10346
10347         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10348
10349 2018-05-04  Tom Tromey  <tom@tromey.com>
10350
10351         * s390-tdep.c (s390_process_record): Fix fall-through comments.
10352         * xcoffread.c (scan_xcoff_symtab): Move comment later.
10353         * symfile.c (section_is_mapped): Fix fall-through comment.
10354         * stabsread.c (define_symbol, read_member_functions): Fix
10355         fall-through comment.
10356         * s390-linux-tdep.c (s390_process_record): Fix fall-through
10357         comment.
10358         * remote.c (remote_wait_as): Fix fall-through comment.
10359         * p-exp.y (yylex): Fix fall-through comment.
10360         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10361         comment.
10362         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10363         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10364         * jv-exp.y (yylex): Fix fall-through comment.
10365         * go-exp.y (lex_one_token): Fix fall-through comment.
10366         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10367         fall-through comment.
10368         * f-exp.y (yylex): Fix fall-through comment.
10369         * dwarf2read.c (process_die): Fix fall-through comments.
10370         * dbxread.c (process_one_symbol): Fix fall-through comment.
10371         * d-exp.y (lex_one_token): Fix fall-through comment.
10372         * cp-name-parser.y (yylex): Fix fall-through comment.
10373         * coffread.c (coff_symtab_read): Fix fall-through comment.
10374         * c-exp.y (lex_one_token): Fix fall-through comment.
10375         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10376         comment.
10377         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10378         comment.
10379
10380 2018-05-04  Tom Tromey  <tom@tromey.com>
10381
10382         PR python/22730:
10383         * NEWS: Mention gdb.execute change.
10384         * gdbcmd.h (execute_control_command): Don't declare.
10385         * python/python.c (execute_gdb_command): Use read_command_lines_1,
10386         execute_control_commands, execute_control_commands_to_string.
10387         * cli/cli-script.h (execute_control_commands)
10388         (execute_control_commands_to_string): Declare.
10389         (execute_control_command): Add from_tty parameter.
10390         * cli/cli-script.c (execute_control_commands)
10391         (execute_control_commands_to_string): New functions.
10392         (execute_user_command): Use execute_control_commands.
10393         (execute_control_command_1): Add "from_tty" parameter.  Update.
10394         (execute_control_command): Likewise.
10395
10396 2018-05-04  Tom Tromey  <tom@tromey.com>
10397
10398         PR python/22731:
10399         * NEWS: Mention that breakpoint commands are writable.
10400         * python/py-breakpoint.c (bppy_set_commands): New function.
10401         (breakpoint_object_getset) <"commands">: Use it.
10402
10403 2018-05-04  Tom Tromey  <tom@tromey.com>
10404
10405         * tracepoint.c (actions_command): Update.
10406         * mi/mi-cmd-break.c (mi_command_line_array)
10407         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10408         (mi_read_next_line): Remove.
10409         (mi_cmd_break_commands): Update.
10410         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10411         function_view.
10412         * cli/cli-script.c (get_command_line): Update.
10413         (process_next_line): Use function_view.  Constify.
10414         (recurse_read_control_structure, read_command_lines)
10415         (read_command_lines_1): Change argument types to function_view.
10416         (do_define_command, document_command): Update.
10417         * breakpoint.h (check_tracepoint_command): Don't declare.
10418         * breakpoint.c (check_tracepoint_command): Remove.
10419         (commands_command_1, create_tracepoint_from_upload): Update.
10420
10421 2018-05-04  Tom Tromey  <tom@tromey.com>
10422
10423         PR gdb/11750:
10424         * cli/cli-script.h (enum command_control_type) <define_control>:
10425         New constant.
10426         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10427         (build_command_line, execute_control_command_1)
10428         (process_next_line): Likewise.
10429         (do_define_command): New function, extracted from define_command.
10430         (define_command): Use it.
10431
10432 2018-05-04  Tom Tromey  <tom@tromey.com>
10433
10434         * tracepoint.c (actions_command): Update.
10435         * cli/cli-script.h (read_command_lines): Update.
10436         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10437         (MAX_TMPBUF): Remove define.
10438         (define_command): Use string_printf.
10439         (document_command): Likewise.
10440         * breakpoint.c (commands_command_1): Update.
10441
10442 2018-05-04  Tom Tromey  <tom@tromey.com>
10443
10444         * top.c (execute_command): Update.
10445         * cli/cli-script.h (print_command_lines): Now varargs.
10446         * cli/cli-script.c (print_command_lines): Now varargs.
10447         (execute_control_command_1) <case while_control, case if_control>:
10448         Update.
10449
10450 2018-05-04  Tom Tromey  <tom@tromey.com>
10451
10452         * tracepoint.c (all_tracepoint_actions): Rename from
10453         all_tracepoint_actions_and_cleanup.  Change return type.
10454         (actions_command, encode_actions_1, encode_actions)
10455         (trace_dump_actions, tdump_command): Update.
10456         * remote.c (remote_download_command_source): Update.
10457         * python/python.c (gdbpy_eval_from_control_command)
10458         (python_command, python_interactive_command): Update.
10459         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10460         * guile/guile.c (guile_command)
10461         (gdbscm_eval_from_control_command, guile_command): Update.
10462         * compile/compile.c (compile_code_command)
10463         (compile_print_command, compile_to_object): Update.
10464         * cli/cli-script.h (struct command_lines_deleter): New.
10465         (counted_command_line): New typedef.
10466         (struct command_line): Add constructor, destructor.
10467         <body_list>: Remove.
10468         <body_list_0, body_list_1>: New members.
10469         (command_line_up): Remove typedef.
10470         (read_command_lines, read_command_lines_1, get_command_line):
10471         Update.
10472         (copy_command_lines): Don't declare.
10473         * cli/cli-script.c (build_command_line): Use "new".
10474         (get_command_line): Return counted_command_line.
10475         (print_command_lines, execute_user_command)
10476         (execute_control_command_1, while_command, if_command): Update.
10477         (realloc_body_list): Remove.
10478         (process_next_line, recurse_read_control_structure): Update.
10479         (read_command_lines, read_command_lines_1): Return counted_command_line.
10480         (free_command_lines): Use "delete".
10481         (copy_command_lines): Remove.
10482         (define_command, document_command, show_user_1): Update.
10483         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10484         a counted_command_line.
10485         * breakpoint.h (counted_command_line): Remove typedef.
10486         (breakpoint_set_commands): Update.
10487         * breakpoint.c (check_no_tracepoint_commands)
10488         (validate_commands_for_breakpoint): Update.
10489         (breakpoint_set_commands): Change commands to be a
10490         counted_command_line.
10491         (commands_command_1, update_dprintf_command_list)
10492         (create_tracepoint_from_upload): Update.
10493
10494 2018-05-04  Tom Tromey  <tom@tromey.com>
10495
10496         * cli/cli-decode.h (cmd_list_element): New constructor.
10497         (~cmd_list_element): New destructor.
10498         (struct cmd_list_element): Add initializers.
10499         * cli/cli-decode.c (do_add_cmd): Use "new".
10500         (delete_cmd): Use "delete".
10501
10502 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10503             Pedro Alves <palves@redhat.com>
10504
10505         PR breakpoints/19806 and support for PR external/20207.
10506         * NEWS: Mention Aarch64 watchpoint improvements.
10507         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10508         watchpoints and PR external/20207 watchpoints.
10509         * nat/aarch64-linux-hw-point.c
10510         (kernel_supports_any_contiguous_range): New.
10511         (aarch64_watchpoint_offset): New.
10512         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10513         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10514         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10515         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10516         next_addr_orig_p.  Support PR external/20207 watchpoints.
10517         (aarch64_downgrade_regs): New.
10518         (aarch64_dr_state_insert_one_point): New parameters offset and
10519         addr_orig.
10520         (aarch64_dr_state_remove_one_point): Likewise.
10521         (aarch64_handle_breakpoint): Update caller.
10522         (aarch64_handle_aligned_watchpoint): Likewise.
10523         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10524         aligned_offset.
10525         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10526         aarch64_downgrade_regs.
10527         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10528         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10529         (DR_CONTROL_MASK): ... this.
10530         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10531         (unsigned int aarch64_watchpoint_offset): New prototype.
10532         (aarch64_linux_set_debug_regs): Remove const from state.
10533         * utils.c (align_up, align_down): Move to ...
10534         * common/common-utils.c (align_up, align_down): ... here.
10535         * utils.h (align_up, align_down): Move to ...
10536         * common/common-utils.h (align_up, align_down): ... here.
10537
10538 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10539
10540         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10541         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10542         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10543         Re-implement to match the ABI as summarized in GCC's
10544         gcc/config/sparc/sparc.c.  All callers updated.
10545         (sparc32_store_arguments): Remove assertion.
10546
10547 2018-05-04  Tom Tromey  <tom@tromey.com>
10548
10549         * printcmd.c: Don't include tui.h.
10550         (decode_format): Use skip_spaces.
10551
10552 2018-05-04  Tom Tromey  <tom@tromey.com>
10553
10554         PR gdb/22619:
10555         * printcmd.c (last_count): New global.
10556         (x_command): Use saved count when repeating.
10557
10558 2018-05-04  Tom Tromey  <tom@tromey.com>
10559
10560         * nto-procfs.c (do_closedir_cleanup): Remove.
10561         (procfs_pidlist): Use gdb_dir_up.
10562         * procfs.c (do_closedir_cleanup): Remove.
10563         (proc_update_threads): Use gdb_dir_up.
10564         * common/filestuff.h (struct gdb_dir_deleter): New.
10565         (gdb_dir_up): New typedef.
10566
10567 2018-05-04  Tom Tromey  <tom@tromey.com>
10568
10569         * ada-lang.c (print_mention_exception): Use std::string.
10570
10571 2018-05-04  Tom Tromey  <tom@tromey.com>
10572
10573         * ada-lang.c (create_excep_cond_exprs): Update.
10574         (ada_exception_catchpoint_cond_string): Use std::string.
10575
10576 2018-05-04  Tom Tromey  <tom@tromey.com>
10577
10578         * ada-lang.c (xget_renaming_scope): Return std::string.
10579         (old_renaming_is_invisible): Update.
10580
10581 2018-05-04  Tom Tromey  <tom@tromey.com>
10582
10583         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10584         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10585
10586 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10587
10588         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10589
10590 2018-05-04  Tom Tromey  <tom@tromey.com>
10591
10592         * remote.c (remote_query_supported_append): Change type.
10593         (remote_check_symbols): Update.
10594
10595 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10596
10597         PR gdb/11420
10598         * configure.ac: Prepend libpython.
10599         * python/python-config.py: Likewise.
10600         * configure: Regenerate.
10601
10602 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10603
10604         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10605
10606 2018-05-03  Pedro Alves  <palves@redhat.com>
10607
10608         * s390-linux-nat.c
10609         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10610         override.  Write 'true' instead of '1'.
10611         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10612         declaration.
10613
10614 2018-05-02  Pedro Alves  <palves@redhat.com>
10615
10616         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10617         add_inf_child_target.
10618         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10619         add_inf_child_target.
10620         * aix-thread.c (aix_thread_target_info): New.
10621         (aix_thread_target) <shortname, longname, doc>: Delete.
10622         <info>: New.
10623         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10624         add_inf_child_target.
10625         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10626         add_inf_child_target.
10627         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10628         add_inf_child_target.
10629         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10630         add_inf_child_target.
10631         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10632         add_inf_child_target.
10633         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10634         add_inf_child_target.
10635         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10636         add_inf_child_target.
10637         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10638         add_inf_child_target.
10639         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10640         add_inf_child_target.
10641         * bfd-target.c (target_bfd_target_info): New.
10642         (target_bfd) <shortname, longname, doc>: Delete.
10643         <info>: New.
10644         * bsd-kvm.c (bsd_kvm_target_info): New.
10645         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10646         <info>: New.
10647         (bsd_kvm_target::open): Rename to ...
10648         (bsd_kvm_target_open): ... this.  Adjust.
10649         * bsd-uthread.c (bsd_uthread_target_info): New.
10650         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10651         <info>: New.
10652         * corefile.c (core_file_command): Adjust.
10653         * corelow.c (core_target_info): New.
10654         (core_target) <shortname, longname, doc>: Delete.
10655         <info>: New.
10656         (core_target::open): Rename to ...
10657         (core_target_open): ... this.  Adjust.
10658         * ctf.c (ctf_target_info): New.
10659         (ctf_target) <shortname, longname, doc>: Delete.
10660         <info>: New.
10661         (ctf_target::open): Rename to ...
10662         (ctf_target_open): ... this.
10663         (_initialize_ctf): Adjust.
10664         * exec.c (exec_target_info): New.
10665         (exec_target) <shortname, longname, doc>: Delete.
10666         <info>: New.
10667         (exec_target::open): Rename to ...
10668         (exec_target_open): ... this.
10669         * gdbcore.h (core_target_open): Declare.
10670         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10671         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10672         add_inf_child_target.
10673         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10674         add_inf_child_target.
10675         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10676         add_inf_child_target.
10677         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10678         add_inf_child_target.
10679         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10680         add_inf_child_target.
10681         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10682         add_inf_child_target.
10683         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10684         add_inf_child_target.
10685         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10686         add_inf_child_target.
10687         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10688         add_inf_child_target.
10689         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10690         add_inf_child_target.
10691         * inf-child.c (inf_child_target_info): New.
10692         (inf_child_target::info): New.
10693         (inf_child_open_target): Remove 'target' parameter.  Use
10694         get_native_target instead.
10695         (inf_child_target::open): Delete.
10696         (add_inf_child_target): New.
10697         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10698         Delete.
10699         <info>: New.
10700         (add_inf_child_target): Declare.
10701         (inf_child_open_target): Declare.
10702         * linux-thread-db.c (thread_db_target_info): New.
10703         (thread_db_target) <shortname, longname, doc>: Delete.
10704         <info>: New.
10705         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10706         add_inf_child_target.
10707         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10708         add_inf_child_target.
10709         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10710         add_inf_child_target.
10711         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10712         add_inf_child_target.
10713         * make-target-delegates (print_class): Adjust.
10714         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10715         add_inf_child_target.
10716         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10717         add_inf_child_target.
10718         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10719         add_inf_child_target.
10720         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10721         add_inf_child_target.
10722         * nto-procfs.c (nto_native_target_info): New.
10723         (nto_procfs_target_native) <shortname, longname, doc>:
10724         Delete.
10725         <info>: New.
10726         (nto_procfs_target_info): New.
10727         (nto_procfs_target_procfs) <shortname, longname, doc>:
10728         Delete.
10729         <info>: New.
10730         (init_procfs_targets): Adjust.
10731         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10732         add_inf_child_target.
10733         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10734         add_inf_child_target.
10735         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10736         add_inf_child_target.
10737         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10738         add_inf_child_target.
10739         * ravenscar-thread.c (ravenscar_target_info): New.
10740         (ravenscar_thread_target) <shortname, longname, doc>:
10741         Delete.
10742         <info>: New.
10743         * record-btrace.c (record_btrace_target_info):
10744         (record_btrace_target) <shortname, longname, doc>: Delete.
10745         <info>: New.
10746         (record_btrace_target::open): Rename to ...
10747         (record_btrace_target_open): ... this.  Adjust.
10748         * record-full.c (record_longname, record_doc): New.
10749         (record_full_base_target) <shortname, longname, doc>: Delete.
10750         <info>: New.
10751         (record_full_target_info): New.
10752         (record_full_target): <shortname>: Delete.
10753         <info>: New.
10754         (record_full_core_open_1, record_full_open_1): Update comments.
10755         (record_full_base_target::open): Rename to ...
10756         (record_full_open): ... this.
10757         (cmd_record_full_restore): Update.
10758         (_initialize_record_full): Update.
10759         * remote-sim.c (remote_sim_target_info): New.
10760         (gdbsim_target) <shortname, longname, doc>: Delete.
10761         <info>: New.
10762         (gdbsim_target::open): Rename to ...
10763         (gdbsim_target_open): ... this.
10764         (_initialize_remote_sim): Adjust.
10765         * remote.c (remote_doc): New.
10766         (remote_target_info): New.
10767         (remote_target) <shortname, longname, doc>: Delete.
10768         <info>: New.
10769         (extended_remote_target_info): New.
10770         (extended_remote_target) <shortname, longname, doc>: Delete.
10771         <info>: New.
10772         (remote_target::open_1): Make static.  Adjust.
10773         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10774         * s390-linux-nat.c (_initialize_s390_nat): Use
10775         add_inf_child_target.
10776         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10777         add_inf_child_target.
10778         * sol-thread.c (thread_db_target_info): New.
10779         (sol_thread_target) <shortname, longname, doc>: Delete.
10780         <info>: New.
10781         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10782         add_inf_child_target.
10783         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10784         add_inf_child_target.
10785         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10786         add_inf_child_target.
10787         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10788         add_inf_child_target.
10789         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10790         add_inf_child_target.
10791         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10792         add_inf_child_target.
10793         * spu-linux-nat.c (_initialize_spu_nat): Use
10794         add_inf_child_target.
10795         * spu-multiarch.c (spu_multiarch_target_info): New.
10796         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10797         <info>: New.
10798         * target-delegates.c: Regenerate.
10799         * target.c: Include <unordered_map>.
10800         (target_ops_p): Delete.
10801         (DEF_VEC_P(target_ops_p)): Delete.
10802         (target_factories): New.
10803         (test_target_info): New.
10804         (test_target_ops::info): New.
10805         (open_target): Adjust to use target_factories.
10806         (add_target_with_completer): Rename to ...
10807         (add_target): ... this.  Change prototype.  Register target_info
10808         and open callback in target_factories.  Register target_info in
10809         command context instead of target_ops.
10810         (add_target): Delete old implementation.
10811         (add_deprecated_target_alias): Change prototype.  Adjust.
10812         (the_native_target): New.
10813         (set_native_target, get_native_target): New.
10814         (find_default_run_target): Use the_native_target.
10815         (find_attach_target, find_run_target): Simplify.
10816         (target_ops::open): Delete.
10817         (dummy_target_info): New.
10818         (dummy_target::shortname, dummy_target::longname)
10819         (dummy_target::doc): Delete.
10820         (dummy_target::info): New.
10821         (debug_target::shortname, debug_target::longname)
10822         (debug_target::doc): Delete.
10823         (debug_target::info): New.
10824         * target.h (struct target_info): New.
10825         (target_ops::~target_ops): Add comment.
10826         (target_ops::info): New.
10827         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10828         longer virtual.  Implement in terms of target_info.
10829         (set_native_target, get_native_target): Declare.
10830         (target_open_ftype): New.
10831         (add_target, add_target_with_completer)
10832         (add_deprecated_target_alias): Change prototype.
10833         (test_target) <shortname, longname, doc>: Delete.
10834         <info>: New.
10835         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10836         add_inf_child_target.
10837         * tracefile-tfile.c (tfile_target_info): New.
10838         (tfile_target) <shortname, longname, doc>: Delete.
10839         <info>: New.
10840         (tfile_target::open): Rename to ...
10841         (tfile_target_open): ... this.
10842         (_initialize_tracefile_tfile): Adjust.
10843         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10844         add_inf_child_target.
10845         * windows-nat.c (_initialize_windows_nat): Use
10846         add_inf_child_target.
10847         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10848         add_inf_child_target.
10849
10850 2018-05-02  Pedro Alves  <palves@redhat.com>
10851
10852         * linux-nat.h (linux_nat_target) <low_new_thread,
10853         low_delete_thread, low_new_fork, low_forget_process,
10854         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10855         New virtual methods.
10856         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10857         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10858         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10859         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10860         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10861         Delete.
10862         * linux-fork.c (delete_fork): Adjust to call low method.
10863         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10864         (linux_nat_new_fork, linux_nat_forget_process_hook)
10865         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10866         (linux_nat_status_is_event):
10867         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10868         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10869         to call low method.
10870         (sigtrap_is_event): Rename to ...
10871         (linux_nat_target::low_status_is_event): ... this.
10872         (linux_nat_set_status_is_event): Delete.
10873         (save_stop_reason, linux_nat_wait_1)
10874         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10875         low methods.
10876         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10877         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10878         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10879         (linux_nat_set_prepare_to_resume): Delete.
10880         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10881         low virtual methods.
10882         * amd64-linux-nat.c: Likewise.
10883         * arm-linux-nat.c: Likewise.
10884         * i386-linux-nat.c: Likewise.
10885         * ia64-linux-nat.c: Likewise.
10886         * mips-linux-nat.c: Likewise.
10887         * ppc-linux-nat.c: Likewise.
10888         * s390-linux-nat.c: Likewise.
10889         * sparc64-linux-nat.c: Likewise.
10890         * x86-linux-nat.c: Likewise.
10891         * x86-linux-nat.h: Include "nat/x86-linux.h".
10892         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10893         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10894         Override methods.
10895
10896 2018-05-02  Pedro Alves  <palves@redhat.com>
10897
10898         * target.h (target_ops)
10899         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10900         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10901         stopped_by_watchpoint, have_continuable_watchpoint,
10902         stopped_data_address, watchpoint_addr_within_range,
10903         can_accel_watchpoint_condition, can_run, thread_alive,
10904         has_all_memory, has_memory, has_stack, has_registers,
10905         has_execution, can_async_p, is_async_p, supports_non_stop,
10906         always_non_stop_p, can_execute_reverse, supports_multi_process,
10907         supports_enable_disable_tracepoint,
10908         supports_disable_randomization, supports_string_tracing,
10909         supports_evaluation_of_breakpoint_conditions,
10910         can_run_breakpoint_commands, filesystem_is_local,
10911         can_download_tracepoint, get_trace_state_variable_value,
10912         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10913         record_is_replaying, record_will_replay,
10914         augmented_libraries_svr4_read>: Adjust to return bool.
10915         * aarch64-linux-nat.c: All implementations adjusted.
10916         * aix-thread.c: All implementations adjusted.
10917         * arm-linux-nat.c: All implementations adjusted.
10918         * breakpoint.c: All implementations adjusted.
10919         * bsd-kvm.c: All implementations adjusted.
10920         * bsd-uthread.c: All implementations adjusted.
10921         * corelow.c: All implementations adjusted.
10922         * ctf.c: All implementations adjusted.
10923         * darwin-nat.c: All implementations adjusted.
10924         * darwin-nat.h: All implementations adjusted.
10925         * exec.c: All implementations adjusted.
10926         * fbsd-nat.c: All implementations adjusted.
10927         * fbsd-nat.h: All implementations adjusted.
10928         * gnu-nat.c: All implementations adjusted.
10929         * gnu-nat.h: All implementations adjusted.
10930         * go32-nat.c: All implementations adjusted.
10931         * ia64-linux-nat.c: All implementations adjusted.
10932         * inf-child.c: All implementations adjusted.
10933         * inf-child.h: All implementations adjusted.
10934         * inf-ptrace.c: All implementations adjusted.
10935         * inf-ptrace.h: All implementations adjusted.
10936         * linux-nat.c: All implementations adjusted.
10937         * linux-nat.h: All implementations adjusted.
10938         * mips-linux-nat.c: All implementations adjusted.
10939         * nto-procfs.c: All implementations adjusted.
10940         * ppc-linux-nat.c: All implementations adjusted.
10941         * procfs.c: All implementations adjusted.
10942         * ravenscar-thread.c: All implementations adjusted.
10943         * record-btrace.c: All implementations adjusted.
10944         * record-full.c: All implementations adjusted.
10945         * remote-sim.c: All implementations adjusted.
10946         * remote.c: All implementations adjusted.
10947         * s390-linux-nat.c: All implementations adjusted.
10948         * sol-thread.c: All implementations adjusted.
10949         * spu-multiarch.c: All implementations adjusted.
10950         * target-delegates.c: All implementations adjusted.
10951         * target.c: All implementations adjusted.
10952         * target.h: All implementations adjusted.
10953         * tracefile-tfile.c: All implementations adjusted.
10954         * tracefile.c: All implementations adjusted.
10955         * tracefile.h: All implementations adjusted.
10956         * windows-nat.c: All implementations adjusted.
10957         * x86-linux-nat.h: All implementations adjusted.
10958         * x86-nat.h: All implementations adjusted.
10959
10960 2018-05-02  Pedro Alves  <palves@redhat.com>
10961
10962         * make-target-delegates (scan_target_h): Don't trim lines here.
10963         Replace sequences of tabs and/or whitespace with a single
10964         whitespace.
10965         (top level, parsing methods): Trim each line before processing it
10966         here.
10967
10968 2018-05-02  Pedro Alves  <palves@redhat.com>
10969             John Baldwin  <jhb@freebsd.org>
10970
10971         * target.h (enum strata) <debug_stratum>: New.
10972         (struct target_ops) <all delegation methods>: Replace by C++
10973         virtual methods, and drop "to_" prefix.  All references updated
10974         throughout.
10975         <to_shortname, to_longname, to_doc, to_data,
10976         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10977         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10978         virtual methods.  All references updated throughout.
10979         <can_attach, supports_terminal_ours, can_create_inferior,
10980         get_thread_control_capabilities, attach_no_wait>: New
10981         virtual methods.
10982         <insert_breakpoint, remove_breakpoint>: Now
10983         TARGET_DEFAULT_NORETURN methods.
10984         <info_proc>: Now returns bool.
10985         <to_magic>: Delete.
10986         (OPS_MAGIC): Delete.
10987         (current_target): Delete.  All references replaced by references
10988         to ...
10989         (target_stack): ... this.  New.
10990         (target_shortname, target_longname): Adjust.
10991         (target_can_run): Now a function declaration.
10992         (default_child_has_all_memory, default_child_has_memory)
10993         (default_child_has_stack, default_child_has_registers)
10994         (default_child_has_execution): Remove target_ops parameter.
10995         (complete_target_initialization): Delete.
10996         (memory_breakpoint_target): New template class.
10997         (test_target_ops): Refactor as a C++ class with virtual methods.
10998         * make-target-delegates (NAME_PART): Tighten.
10999         (POINTER_PART, CP_SYMBOL): New.
11000         (SIMPLE_RETURN_PART): Reimplement.
11001         (VEC_RETURN_PART): Expect less.
11002         (RETURN_PART, VIRTUAL_PART): New.
11003         (METHOD): Adjust to C++ virtual methods.
11004         (scan_target_h): Remove reference to C99.
11005         (dname): Output "target_ops::" prefix.
11006         (write_function_header): Adjust to output a C++ class method.
11007         (write_declaration): New.
11008         (write_delegator): Adjust to output a C++ class method.
11009         (tdname): Output "dummy_target::" prefix.
11010         (write_tdefault, write_debugmethod): Adjust to output a C++ class
11011         method.
11012         (tdefault_names, debug_names): Delete.
11013         (return_types, tdefaults, styles, argtypes_array): New.
11014         (top level): All methods are delegators.
11015         (print_class): New.
11016         (top level): Print dummy_target and debug_target classes.
11017         * target-delegates.c: Regenerate.
11018         * target-debug.h (target_debug_print_enum_info_proc_what)
11019         (target_debug_print_thread_control_capabilities)
11020         (target_debug_print_thread_info_p): New.
11021         * target.c (dummy_target): Delete.
11022         (the_dummy_target, the_debug_target): New.
11023         (target_stack): Now extern.
11024         (set_targetdebug): Push/unpush debug target.
11025         (default_child_has_all_memory, default_child_has_memory)
11026         (default_child_has_stack, default_child_has_registers)
11027         (default_child_has_execution): Remove target_ops parameter.
11028         (complete_target_initialization): Delete.
11029         (add_target_with_completer): No longer call
11030         complete_target_initialization.
11031         (target_supports_terminal_ours): Use regular delegation.
11032         (update_current_target): Delete.
11033         (push_target): No longer check magic number.  Don't call
11034         update_current_target.
11035         (unpush_target): Don't call update_current_target.
11036         (target_is_pushed): No longer check magic number.
11037         (target_require_runnable): Skip for all stratums over
11038         process_stratum.
11039         (target_ops::info_proc): New.
11040         (target_info_proc): Use find_target_at and
11041         find_default_run_target.
11042         (target_supports_disable_randomization): Use regular delegation.
11043         (target_get_osdata): Use find_target_at.
11044         (target_ops::open, target_ops::close, target_ops::can_attach)
11045         (target_ops::attach, target_ops::can_create_inferior)
11046         (target_ops::create_inferior, target_ops::can_run)
11047         (target_can_run): New.
11048         (default_fileio_target): Use regular delegation.
11049         (target_ops::fileio_open, target_ops::fileio_pwrite)
11050         (target_ops::fileio_pread, target_ops::fileio_fstat)
11051         (target_ops::fileio_close, target_ops::fileio_unlink)
11052         (target_ops::fileio_readlink): New.
11053         (target_fileio_open_1, target_fileio_unlink)
11054         (target_fileio_readlink): Always call the target method.  Handle
11055         FILEIO_ENOSYS.
11056         (return_zero, return_zero_has_execution): Delete.
11057         (init_dummy_target): Delete.
11058         (dummy_target::dummy_target, dummy_target::shortname)
11059         (dummy_target::longname, dummy_target::doc)
11060         (debug_target::debug_target, debug_target::shortname)
11061         (debug_target::longname, debug_target::doc): New.
11062         (target_supports_delete_record): Use regular delegation.
11063         (setup_target_debug): Delete.
11064         (maintenance_print_target_stack): Skip debug_stratum.
11065         (initialize_targets): Instantiate the_dummy_target and
11066         the_debug_target.
11067         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
11068         use target_stack.
11069         (target_auxv_search, fprint_target_auxv): Adjust.
11070         (info_auxv_command): Adjust to use target_stack.
11071         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11072         * exceptions.c (print_flush): Handle a NULL target_stack.
11073         * regcache.c (target_ops_no_register): Refactor as class with
11074         virtual methods.
11075
11076         * exec.c (exec_target): New class.
11077         (exec_ops): Now an exec_target.
11078         (exec_open, exec_close_1, exec_get_section_table)
11079         (exec_xfer_partial, exec_files_info, exec_has_memory)
11080         (exec_make_note_section): Refactor as exec_target methods.
11081         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11082         Delete.
11083         (exec_target::find_memory_regions): New.
11084         (_initialize_exec): Don't call init_exec_ops.
11085         * gdbcore.h (exec_file_clear): Delete.
11086
11087         * corefile.c (core_target): Delete.
11088         (core_file_command): Adjust.
11089         * corelow.c (core_target): New class.
11090         (the_core_target): New.
11091         (core_close): Remove target_ops parameter.
11092         (core_close_cleanup): Adjust.
11093         (core_target::close): New.
11094         (core_open, core_detach, get_core_registers, core_files_info)
11095         (core_xfer_partial, core_thread_alive, core_read_description)
11096         (core_pid_to_str, core_thread_name, core_has_memory)
11097         (core_has_stack, core_has_registers, core_info_proc): Rework as
11098         core_target methods.
11099         (ignore, core_remove_breakpoint, init_core_ops): Delete.
11100         (_initialize_corelow): Initialize the_core_target.
11101         * gdbcore.h (core_target): Delete.
11102         (the_core_target): New.
11103
11104         * ctf.c: (ctf_target): New class.
11105         (ctf_ops): Now a ctf_target.
11106         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11107         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11108         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11109         methods.
11110         (init_ctf_ops): Delete.
11111         (_initialize_ctf): Don't call it.
11112         * tracefile-tfile.c (tfile_target): New class.
11113         (tfile_ops): Now a tfile_target.
11114         (tfile_open, tfile_close, tfile_files_info)
11115         (tfile_get_tracepoint_status, tfile_trace_find)
11116         (tfile_fetch_registers, tfile_xfer_partial)
11117         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11118         Refactor as tfile_target methods.
11119         (tfile_xfer_partial_features): Remove target_ops parameter.
11120         (init_tfile_ops): Delete.
11121         (_initialize_tracefile_tfile): Don't call it.
11122         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11123         (tracefile_has_stack, tracefile_has_registers)
11124         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11125         tracefile_target methods.
11126         (init_tracefile_ops): Delete.
11127         (tracefile_target::tracefile_target): New.
11128         * tracefile.h: Include "target.h".
11129         (tracefile_target): New class.
11130         (init_tracefile_ops): Delete.
11131
11132         * spu-multiarch.c (spu_multiarch_target): New class.
11133         (spu_ops): Now a spu_multiarch_target.
11134         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11135         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11136         (spu_search_memory, spu_mourn_inferior): Refactor as
11137         spu_multiarch_target methods.
11138         (init_spu_ops): Delete.
11139         (_initialize_spu_multiarch): Remove references to init_spu_ops,
11140         complete_target_initialization.
11141
11142         * ravenscar-thread.c (ravenscar_thread_target): New class.
11143         (ravenscar_ops): Now a ravenscar_thread_target.
11144         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11145         (ravenscar_thread_alive, ravenscar_pid_to_str)
11146         (ravenscar_fetch_registers, ravenscar_store_registers)
11147         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11148         (ravenscar_stopped_by_hw_breakpoint)
11149         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11150         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11151         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11152         methods.
11153         (init_ravenscar_thread_ops): Delete.
11154         (_initialize_ravenscar): Remove references to
11155         init_ravenscar_thread_ops and complete_target_initialization.
11156
11157         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11158         (bsd_uthread_target): New class.
11159         (bsd_uthread_ops): Now a bsd_uthread_target.
11160         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11161         (bsd_uthread_close, bsd_uthread_mourn_inferior)
11162         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11163         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11164         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11165         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11166         (bsd_uthread_target): Delete function.
11167         (_initialize_bsd_uthread): Remove reference to
11168         complete_target_initialization.
11169
11170         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
11171         (target_bfd): ... this new class.
11172         (target_bfd_xfer_partial, target_bfd_get_section_table)
11173         (target_bfd_close): Refactor as target_bfd methods.
11174         (target_bfd::~target_bfd): New.
11175         (target_bfd_reopen): Adjust.
11176         (target_bfd::close): New.
11177
11178         * record-btrace.c (record_btrace_target): New class.
11179         (record_btrace_ops): Now a record_btrace_target.
11180         (record_btrace_open, record_btrace_stop_recording)
11181         (record_btrace_disconnect, record_btrace_close)
11182         (record_btrace_async, record_btrace_info)
11183         (record_btrace_insn_history, record_btrace_insn_history_range)
11184         (record_btrace_insn_history_from, record_btrace_call_history)
11185         (record_btrace_call_history_range)
11186         (record_btrace_call_history_from, record_btrace_record_method)
11187         (record_btrace_is_replaying, record_btrace_will_replay)
11188         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11189         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11190         (record_btrace_store_registers, record_btrace_prepare_to_store)
11191         (record_btrace_to_get_unwinder)
11192         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11193         (record_btrace_commit_resume, record_btrace_wait)
11194         (record_btrace_stop, record_btrace_can_execute_reverse)
11195         (record_btrace_stopped_by_sw_breakpoint)
11196         (record_btrace_supports_stopped_by_sw_breakpoint)
11197         (record_btrace_stopped_by_hw_breakpoint)
11198         (record_btrace_supports_stopped_by_hw_breakpoint)
11199         (record_btrace_update_thread_list, record_btrace_thread_alive)
11200         (record_btrace_goto_begin, record_btrace_goto_end)
11201         (record_btrace_goto, record_btrace_stop_replaying_all)
11202         (record_btrace_execution_direction)
11203         (record_btrace_prepare_to_generate_core)
11204         (record_btrace_done_generating_core): Refactor as
11205         record_btrace_target methods.
11206         (init_record_btrace_ops): Delete.
11207         (_initialize_record_btrace): Remove reference to
11208         init_record_btrace_ops.
11209         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11210         the execution_direction global.
11211         (record_full_base_target, record_full_target)
11212         (record_full_core_target): New classes.
11213         (record_full_ops): Now a record_full_target.
11214         (record_full_core_ops): Now a record_full_core_target.
11215         (record_full_target::detach, record_full_target::disconnect)
11216         (record_full_core_target::disconnect)
11217         (record_full_target::mourn_inferior, record_full_target::kill):
11218         New.
11219         (record_full_open, record_full_close, record_full_async): Refactor
11220         as methods of the record_full_base_target class.
11221         (record_full_resume, record_full_commit_resume): Refactor
11222         as methods of the record_full_target class.
11223         (record_full_wait, record_full_stopped_by_watchpoint)
11224         (record_full_stopped_data_address)
11225         (record_full_stopped_by_sw_breakpoint)
11226         (record_full_supports_stopped_by_sw_breakpoint)
11227         (record_full_stopped_by_hw_breakpoint)
11228         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11229         methods of the record_full_base_target class.
11230         (record_full_store_registers, record_full_xfer_partial)
11231         (record_full_insert_breakpoint, record_full_remove_breakpoint):
11232         Refactor as methods of the record_full_target class.
11233         (record_full_can_execute_reverse, record_full_get_bookmark)
11234         (record_full_goto_bookmark, record_full_execution_direction)
11235         (record_full_record_method, record_full_info, record_full_delete)
11236         (record_full_is_replaying, record_full_will_replay)
11237         (record_full_goto_begin, record_full_goto_end, record_full_goto)
11238         (record_full_stop_replaying): Refactor as methods of the
11239         record_full_base_target class.
11240         (record_full_core_resume, record_full_core_kill)
11241         (record_full_core_fetch_registers)
11242         (record_full_core_prepare_to_store)
11243         (record_full_core_store_registers, record_full_core_xfer_partial)
11244         (record_full_core_insert_breakpoint)
11245         (record_full_core_remove_breakpoint)
11246         (record_full_core_has_execution): Refactor
11247         as methods of the record_full_core_target class.
11248         (record_full_base_target::supports_delete_record): New.
11249         (init_record_full_ops): Delete.
11250         (init_record_full_core_ops): Delete.
11251         (record_full_save): Refactor as method of the
11252         record_full_base_target class.
11253         (_initialize_record_full): Remove references to
11254         init_record_full_ops and init_record_full_core_ops.
11255
11256         * remote.c (remote_target, extended_remote_target): New classes.
11257         (remote_ops): Now a remote_target.
11258         (extended_remote_ops): Now an extended_remote_target.
11259         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11260         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11261         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11262         (remote_pass_signals, remote_set_syscall_catchpoint)
11263         (remote_program_signals, )
11264         (remote_thread_always_alive): Remove target_ops parameter.
11265         (remote_thread_alive, remote_thread_name)
11266         (remote_update_thread_list, remote_threads_extra_info)
11267         (remote_static_tracepoint_marker_at)
11268         (remote_static_tracepoint_markers_by_strid)
11269         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11270         (remote_open): Refactor as methods of remote_target.
11271         (extended_remote_open, extended_remote_detach)
11272         (extended_remote_attach, extended_remote_post_attach):
11273         (extended_remote_supports_disable_randomization)
11274         (extended_remote_create_inferior): : Refactor as method of
11275         extended_remote_target.
11276         (remote_set_permissions, remote_open_1, remote_detach)
11277         (remote_follow_fork, remote_follow_exec, remote_disconnect)
11278         (remote_resume, remote_commit_resume, remote_stop)
11279         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11280         (remote_terminal_ours, remote_wait, remote_fetch_registers)
11281         (remote_prepare_to_store, remote_store_registers)
11282         (remote_flash_erase, remote_flash_done, remote_files_info)
11283         (remote_kill, remote_mourn, remote_insert_breakpoint)
11284         (remote_remove_breakpoint, remote_insert_watchpoint)
11285         (remote_watchpoint_addr_within_range)
11286         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11287         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11288         (remote_supports_stopped_by_sw_breakpoint)
11289         (remote_stopped_by_hw_breakpoint)
11290         (remote_supports_stopped_by_hw_breakpoint)
11291         (remote_stopped_by_watchpoint, remote_stopped_data_address)
11292         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11293         (remote_verify_memory): Refactor as methods of remote_target.
11294         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11295         parameter.
11296         (remote_xfer_partial, remote_get_memory_xfer_limit)
11297         (remote_search_memory, remote_rcmd, remote_memory_map)
11298         (remote_pid_to_str, remote_get_thread_local_address)
11299         (remote_get_tib_address, remote_read_description): Refactor as
11300         methods of remote_target.
11301         (remote_target::fileio_open, remote_target::fileio_pwrite)
11302         (remote_target::fileio_pread, remote_target::fileio_close): New.
11303         (remote_hostio_readlink, remote_hostio_fstat)
11304         (remote_filesystem_is_local, remote_can_execute_reverse)
11305         (remote_supports_non_stop, remote_supports_disable_randomization)
11306         (remote_supports_multi_process, remote_supports_cond_breakpoints)
11307         (remote_supports_enable_disable_tracepoint)
11308         (remote_supports_string_tracing)
11309         (remote_can_run_breakpoint_commands, remote_trace_init)
11310         (remote_download_tracepoint, remote_can_download_tracepoint)
11311         (remote_download_trace_state_variable, remote_enable_tracepoint)
11312         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11313         (remote_trace_start, remote_get_trace_status)
11314         (remote_get_tracepoint_status, remote_trace_stop)
11315         (remote_trace_find, remote_get_trace_state_variable_value)
11316         (remote_save_trace_data, remote_get_raw_trace_data)
11317         (remote_set_disconnected_tracing, remote_core_of_thread)
11318         (remote_set_circular_trace_buffer, remote_traceframe_info)
11319         (remote_get_min_fast_tracepoint_insn_len)
11320         (remote_set_trace_buffer_size, remote_set_trace_notes)
11321         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11322         (remote_disable_btrace, remote_teardown_btrace)
11323         (remote_read_btrace, remote_btrace_conf)
11324         (remote_augmented_libraries_svr4_read, remote_load)
11325         (remote_pid_to_exec_file, remote_can_do_single_step)
11326         (remote_execution_direction, remote_thread_handle_to_thread_info):
11327         Refactor as methods of remote_target.
11328         (init_remote_ops, init_extended_remote_ops): Delete.
11329         (remote_can_async_p, remote_is_async_p, remote_async)
11330         (remote_thread_events, remote_upload_tracepoints)
11331         (remote_upload_trace_state_variables): Refactor as methods of
11332         remote_target.
11333         (_initialize_remote): Remove references to init_remote_ops and
11334         init_extended_remote_ops.
11335
11336         * remote-sim.c (gdbsim_target): New class.
11337         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11338         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11339         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11340         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11341         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11342         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11343         Refactor as methods of gdbsim_target.
11344         (gdbsim_ops): Now a gdbsim_target.
11345         (init_gdbsim_ops): Delete.
11346         (gdbsim_cntrl_c): Adjust.
11347         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11348
11349         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11350         (the_amd64_linux_nat_target): New.
11351         (amd64_linux_fetch_inferior_registers)
11352         (amd64_linux_store_inferior_registers): Refactor as methods of
11353         amd64_linux_nat_target.
11354         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
11355         * i386-linux-nat.c: Don't include "linux-nat.h".
11356         (i386_linux_nat_target): New class.
11357         (the_i386_linux_nat_target): New.
11358         (i386_linux_fetch_inferior_registers)
11359         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11360         as methods of i386_linux_nat_target.
11361         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
11362         * inf-child.c (inf_child_ops): Delete.
11363         (inf_child_fetch_inferior_registers)
11364         (inf_child_store_inferior_registers): Delete.
11365         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11366         methods of inf_child_target.
11367         (inf_child_target::supports_terminal_ours)
11368         (inf_child_target::terminal_init)
11369         (inf_child_target::terminal_inferior)
11370         (inf_child_target::terminal_ours_for_output)
11371         (inf_child_target::terminal_ours, inf_child_target::interrupt)
11372         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11373         New.
11374         (inf_child_open, inf_child_disconnect, inf_child_close)
11375         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11376         (inf_child_post_startup_inferior, inf_child_can_run)
11377         (inf_child_pid_to_exec_file): Refactor as methods of
11378         inf_child_target.
11379         (inf_child_follow_fork): Delete.
11380         (inf_child_target::can_create_inferior)
11381         (inf_child_target::can_attach): New.
11382         (inf_child_target::has_all_memory, inf_child_target::has_memory)
11383         (inf_child_target::has_stack, inf_child_target::has_registers)
11384         (inf_child_target::has_execution): New.
11385         (inf_child_fileio_open, inf_child_fileio_pwrite)
11386         (inf_child_fileio_pread, inf_child_fileio_fstat)
11387         (inf_child_fileio_close, inf_child_fileio_unlink)
11388         (inf_child_fileio_readlink, inf_child_use_agent)
11389         (inf_child_can_use_agent): Refactor as methods of
11390         inf_child_target.
11391         (return_zero, inf_child_target): Delete.
11392         (inf_child_target::inf_child_target): New.
11393         * inf-child.h: Include "target.h".
11394         (inf_child_target): Delete function prototype.
11395         (inf_child_target): New class.
11396         (inf_child_open_target, inf_child_mourn_inferior)
11397         (inf_child_maybe_unpush_target): Delete.
11398         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11399         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11400         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11401         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11402         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11403         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11404         (inf_ptrace_wait, inf_ptrace_xfer_partial)
11405         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11406         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11407         methods of inf_ptrace_target.
11408         (inf_ptrace_target): Delete function.
11409         * inf-ptrace.h: Include "inf-child.h".
11410         (inf_ptrace_target): Delete function declaration.
11411         (inf_ptrace_target): New class.
11412         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11413         * linux-nat.c (linux_target): New.
11414         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11415         (linux_nat_target::~linux_nat_target): New.
11416         (linux_child_post_attach, linux_child_post_startup_inferior)
11417         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11418         (linux_child_remove_fork_catchpoint)
11419         (linux_child_insert_vfork_catchpoint)
11420         (linux_child_remove_vfork_catchpoint)
11421         (linux_child_insert_exec_catchpoint)
11422         (linux_child_remove_exec_catchpoint)
11423         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11424         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11425         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11426         (linux_nat_stopped_data_address)
11427         (linux_nat_stopped_by_sw_breakpoint)
11428         (linux_nat_supports_stopped_by_sw_breakpoint)
11429         (linux_nat_stopped_by_hw_breakpoint)
11430         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11431         (linux_nat_kill, linux_nat_mourn_inferior)
11432         (linux_nat_xfer_partial, linux_nat_thread_alive)
11433         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11434         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11435         (linux_child_static_tracepoint_markers_by_strid)
11436         (linux_nat_is_async_p, linux_nat_can_async_p)
11437         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11438         (linux_nat_supports_multi_process)
11439         (linux_nat_supports_disable_randomization, linux_nat_async)
11440         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11441         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11442         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11443         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11444         methods of linux_nat_target.
11445         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11446         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11447         parameter.
11448         (check_stopped_by_watchpoint): Adjust.
11449         (linux_xfer_partial): Delete.
11450         (linux_target_install_ops, linux_target, linux_nat_add_target):
11451         Delete.
11452         (linux_nat_target::linux_nat_target): New.
11453         * linux-nat.h: Include "inf-ptrace.h".
11454         (linux_nat_target): New.
11455         (linux_target, linux_target_install_ops, linux_nat_add_target):
11456         Delete function declarations.
11457         (linux_target): Declare global.
11458         * linux-thread-db.c (thread_db_target): New.
11459         (thread_db_target::thread_db_target): New.
11460         (thread_db_ops): Delete.
11461         (the_thread_db_target): New.
11462         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11463         (thread_db_update_thread_list, thread_db_pid_to_str)
11464         (thread_db_extra_thread_info)
11465         (thread_db_thread_handle_to_thread_info)
11466         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11467         (thread_db_resume): Refactor as methods of thread_db_target.
11468         (init_thread_db_ops): Delete.
11469         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11470         * x86-linux-nat.c: Don't include "linux-nat.h".
11471         (super_post_startup_inferior): Delete.
11472         (x86_linux_nat_target::~x86_linux_nat_target): New.
11473         (x86_linux_child_post_startup_inferior)
11474         (x86_linux_read_description, x86_linux_enable_btrace)
11475         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11476         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11477         methods of x86_linux_nat_target.
11478         (x86_linux_create_target): Delete.  Bits folded ...
11479         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11480         pointer.
11481         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11482         (x86_linux_nat_target): New class.
11483         (x86_linux_create_target): Delete.
11484         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11485         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11486         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11487         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11488         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11489         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11490         make extern.
11491         (x86_use_watchpoints): Delete.
11492         * x86-nat.h: Include "breakpoint.h" and "target.h".
11493         (x86_use_watchpoints): Delete.
11494         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11495         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11496         (x86_insert_watchpoint, x86_remove_watchpoint)
11497         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11498         (x86_stopped_by_hw_breakpoint): New declarations.
11499         (x86_nat_target): New template class.
11500
11501         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11502         (the_ppc_linux_nat_target): New.
11503         (ppc_linux_fetch_inferior_registers)
11504         (ppc_linux_can_use_hw_breakpoint)
11505         (ppc_linux_region_ok_for_hw_watchpoint)
11506         (ppc_linux_ranged_break_num_registers)
11507         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11508         (ppc_linux_insert_mask_watchpoint)
11509         (ppc_linux_remove_mask_watchpoint)
11510         (ppc_linux_can_accel_watchpoint_condition)
11511         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11512         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11513         (ppc_linux_watchpoint_addr_within_range)
11514         (ppc_linux_masked_watch_num_registers)
11515         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11516         (ppc_linux_read_description): Refactor as methods of
11517         ppc_linux_nat_target.
11518         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11519
11520         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11521         (procfs_target): New class.
11522         (the_procfs_target): New.
11523         (procfs_target): Delete function.
11524         (procfs_auxv_parse, procfs_attach, procfs_detach)
11525         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11526         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11527         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11528         (procfs_create_inferior, procfs_update_thread_list)
11529         (procfs_thread_alive, procfs_pid_to_str)
11530         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11531         (procfs_stopped_data_address, procfs_insert_watchpoint)
11532         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11533         (proc_find_memory_regions, procfs_info_proc)
11534         (procfs_make_note_section): Refactor as methods of procfs_target.
11535         (_initialize_procfs): Adjust.
11536         * sol-thread.c (sol_thread_target): New class.
11537         (sol_thread_ops): Now a sol_thread_target.
11538         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11539         (sol_thread_fetch_registers, sol_thread_store_registers)
11540         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11541         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11542         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11543         (init_sol_thread_ops): Delete.
11544         (_initialize_sol_thread): Adjust.  Remove references to
11545         init_sol_thread_ops and complete_target_initialization.
11546
11547         * windows-nat.c (windows_nat_target): New class.
11548         (windows_fetch_inferior_registers)
11549         (windows_store_inferior_registers, windows_resume, windows_wait)
11550         (windows_attach, windows_detach, windows_pid_to_exec_file)
11551         (windows_files_info, windows_create_inferior)
11552         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11553         (windows_close, windows_pid_to_str, windows_xfer_partial)
11554         (windows_get_tib_address, windows_get_ada_task_ptid)
11555         (windows_thread_name, windows_thread_alive): Refactor as
11556         windows_nat_target methods.
11557         (do_initial_windows_stuff): Adjust.
11558         (windows_target): Delete function.
11559         (_initialize_windows_nat): Adjust.
11560
11561         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11562         (darwin_mourn_inferior, darwin_kill_inferior)
11563         (darwin_create_inferior, darwin_attach, darwin_detach)
11564         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11565         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11566         (darwin_supports_multi_process): Refactor as darwin_nat_target
11567         methods.
11568         (darwin_resume_to, darwin_files_info): Delete.
11569         (_initialize_darwin_inferior): Rename to ...
11570         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11571         * darwin-nat.h: Include "inf-child.h".
11572         (darwin_nat_target): New class.
11573         (darwin_complete_target): Delete.
11574         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11575         (darwin_target): New.
11576         (i386_darwin_fetch_inferior_registers)
11577         (i386_darwin_store_inferior_registers): Refactor as methods of
11578         darwin_nat_target.
11579         (darwin_complete_target): Delete, with ...
11580         (_initialize_i386_darwin_nat): ... bits factored out here.
11581
11582         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11583         (the_alpha_linux_nat_target): New.
11584         (alpha_linux_register_u_offset): Refactor as
11585         alpha_linux_nat_target method.
11586         (_initialize_alpha_linux_nat): Adjust.
11587         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11588         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11589         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11590         methods of linux_nat_trad_target.
11591         (linux_trad_target): Delete.
11592         * linux-nat-trad.h (linux_trad_target): Delete function.
11593         (linux_nat_trad_target): New class.
11594         * mips-linux-nat.c (mips_linux_nat_target): New class.
11595         (super_fetch_registers, super_store_registers, super_close):
11596         Delete.
11597         (the_mips_linux_nat_target): New.
11598         (mips64_linux_regsets_fetch_registers)
11599         (mips64_linux_regsets_store_registers)
11600         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11601         (mips_linux_register_u_offset, mips_linux_read_description)
11602         (mips_linux_can_use_hw_breakpoint)
11603         (mips_linux_stopped_by_watchpoint)
11604         (mips_linux_stopped_data_address)
11605         (mips_linux_region_ok_for_hw_watchpoint)
11606         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11607         (mips_linux_close): Refactor as methods of mips_linux_nat.
11608         (_initialize_mips_linux_nat): Adjust to C++ification.
11609
11610         * aix-thread.c (aix_thread_target): New class.
11611         (aix_thread_ops): Now an aix_thread_target.
11612         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11613         (aix_thread_fetch_registers, aix_thread_store_registers)
11614         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11615         (aix_thread_thread_alive, aix_thread_pid_to_str)
11616         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11617         Refactor as methods of aix_thread_target.
11618         (init_aix_thread_ops): Delete.
11619         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11620         and complete_target_initialization.
11621         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11622         (rs6000_nat_target): New class.
11623         (the_rs6000_nat_target): New.
11624         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11625         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11626         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11627         (super_create_inferior): Delete.
11628         (_initialize_rs6000_nat): Adjust to C++ification.
11629
11630         * arm-linux-nat.c (arm_linux_nat_target): New class.
11631         (the_arm_linux_nat_target): New.
11632         (arm_linux_fetch_inferior_registers)
11633         (arm_linux_store_inferior_registers, arm_linux_read_description)
11634         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11635         (arm_linux_remove_hw_breakpoint)
11636         (arm_linux_region_ok_for_hw_watchpoint)
11637         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11638         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11639         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11640         arm_linux_nat_target.
11641         (_initialize_arm_linux_nat): Adjust to C++ification.
11642
11643         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11644         (the_aarch64_linux_nat_target): New.
11645         (aarch64_linux_fetch_inferior_registers)
11646         (aarch64_linux_store_inferior_registers)
11647         (aarch64_linux_child_post_startup_inferior)
11648         (aarch64_linux_read_description)
11649         (aarch64_linux_can_use_hw_breakpoint)
11650         (aarch64_linux_insert_hw_breakpoint)
11651         (aarch64_linux_remove_hw_breakpoint)
11652         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11653         (aarch64_linux_region_ok_for_hw_watchpoint)
11654         (aarch64_linux_stopped_data_address)
11655         (aarch64_linux_stopped_by_watchpoint)
11656         (aarch64_linux_watchpoint_addr_within_range)
11657         (aarch64_linux_can_do_single_step): Refactor as methods of
11658         aarch64_linux_nat_target.
11659         (super_post_startup_inferior): Delete.
11660         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11661
11662         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11663         (the_hppa_linux_nat_target): New.
11664         (hppa_linux_fetch_inferior_registers)
11665         (hppa_linux_store_inferior_registers): Refactor as methods of
11666         hppa_linux_nat_target.
11667         (_initialize_hppa_linux_nat): Adjust to C++ification.
11668
11669         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11670         (the_ia64_linux_nat_target): New.
11671         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11672         (ia64_linux_stopped_data_address)
11673         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11674         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11675         ia64_linux_nat_target methods.
11676         (super_xfer_partial): Delete.
11677         (_initialize_ia64_linux_nat): Adjust to C++ification.
11678
11679         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11680         (the_m32r_linux_nat_target): New.
11681         (m32r_linux_fetch_inferior_registers)
11682         (m32r_linux_store_inferior_registers): Refactor as
11683         m32r_linux_nat_target methods.
11684         (_initialize_m32r_linux_nat): Adjust to C++ification.
11685
11686         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11687         (the_m68k_linux_nat_target): New.
11688         (m68k_linux_fetch_inferior_registers)
11689         (m68k_linux_store_inferior_registers): Refactor as
11690         m68k_linux_nat_target methods.
11691         (_initialize_m68k_linux_nat): Adjust to C++ification.
11692
11693         * s390-linux-nat.c (s390_linux_nat_target): New class.
11694         (the_s390_linux_nat_target): New.
11695         (s390_linux_fetch_inferior_registers)
11696         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11697         (s390_insert_watchpoint, s390_remove_watchpoint)
11698         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11699         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11700         (s390_auxv_parse, s390_read_description): Refactor as methods of
11701         s390_linux_nat_target.
11702         (_initialize_s390_nat): Adjust to C++ification.
11703
11704         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11705         (the_sparc_linux_nat_target): New.
11706         (_initialize_sparc_linux_nat): Adjust to C++ification.
11707         * sparc-nat.c (sparc_fetch_inferior_registers)
11708         (sparc_store_inferior_registers): Remove target_ops parameter.
11709         * sparc-nat.h (sparc_fetch_inferior_registers)
11710         (sparc_store_inferior_registers): Remove target_ops parameter.
11711         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11712         (the_sparc64_linux_nat_target): New.
11713         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11714
11715         * spu-linux-nat.c (spu_linux_nat_target): New class.
11716         (the_spu_linux_nat_target): New.
11717         (spu_child_post_startup_inferior, spu_child_post_attach)
11718         (spu_child_wait, spu_fetch_inferior_registers)
11719         (spu_store_inferior_registers, spu_xfer_partial)
11720         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11721         methods.
11722         (_initialize_spu_nat): Adjust to C++ification.
11723
11724         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11725         (the_tilegx_linux_nat_target): New.
11726         (fetch_inferior_registers, store_inferior_registers):
11727         Refactor as methods.
11728         (_initialize_tile_linux_nat): Adjust to C++ification.
11729
11730         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11731         (the_xtensa_linux_nat_target): New.
11732         (xtensa_linux_fetch_inferior_registers)
11733         (xtensa_linux_store_inferior_registers): Refactor as
11734         xtensa_linux_nat_target methods.
11735         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11736
11737         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11738         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11739         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11740         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11741         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11742         (fbsd_stopped_by_sw_breakpoint)
11743         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11744         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11745         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11746         (fbsd_post_startup_inferior, fbsd_post_attach)
11747         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11748         (fbsd_set_syscall_catchpoint)
11749         (super_xfer_partial, super_resume, super_wait)
11750         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11751         (fbsd_handle_debug_trap): Remove target_ops parameter.
11752         (fbsd_nat_add_target): Delete.
11753         * fbsd-nat.h: Include "inf-ptrace.h".
11754         (fbsd_nat_add_target): Delete.
11755         (USE_SIGTRAP_SIGINFO): Define.
11756         (fbsd_nat_target): New class.
11757
11758         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11759         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11760         (amd64bsd_target): Delete.
11761         * amd64-bsd-nat.h: New file.
11762         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11763         "x86-bsd-nat.h".
11764         (amd64_fbsd_nat_target): New class.
11765         (the_amd64_fbsd_nat_target): New.
11766         (amd64fbsd_read_description): Refactor as method of
11767         amd64_fbsd_nat_target.
11768         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11769         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11770         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11771         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11772         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11773         (i386bsd_target): Delete.
11774         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11775         (i386bsd_fetch_inferior_registers)
11776         (i386bsd_store_inferior_registers): Declare.
11777         (i386_bsd_nat_target): New class.
11778         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11779         (the_i386_fbsd_nat_target): New.
11780         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11781         i386_fbsd_nat_target methods.
11782         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11783         (_initialize_i386fbsd_nat): Adjust to C++ification.
11784         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11785         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11786         (_initialize_x86_bsd_nat): Adjust to C++ification.
11787         * x86-bsd-nat.h: Include "x86-nat.h".
11788         (x86bsd_target): Delete declaration.
11789         (x86bsd_nat_target): New class.
11790
11791         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11792         (the_aarch64_fbsd_nat_target): New.
11793         (aarch64_fbsd_fetch_inferior_registers)
11794         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11795         aarch64_fbsd_nat_target.
11796         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11797         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11798         (the_alpha_bsd_nat_target): New.
11799         (alphabsd_fetch_inferior_registers)
11800         (alphabsd_store_inferior_registers): Refactor as
11801         alpha_bsd_nat_target methods.
11802         (_initialize_alphabsd_nat): Refactor as methods of
11803         alpha_bsd_nat_target.
11804         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11805         (the_amd64_nbsd_nat_target): New.
11806         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11807         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11808         (the_amd64_obsd_nat_target): New.
11809         (_initialize_amd64obsd_nat): Adjust to C++ification.
11810         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11811         (the_arm_fbsd_nat_target): New.
11812         (arm_fbsd_fetch_inferior_registers)
11813         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11814         (_initialize_arm_fbsd_nat): Refactor as methods of
11815         arm_fbsd_nat_target.
11816         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11817         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11818         (the_arm_netbsd_nat_target): New.
11819         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11820         arm_netbsd_nat_target.
11821         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11822         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11823         (the_hppa_nbsd_nat_target): New.
11824         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11825         hppa_nbsd_nat_target methods.
11826         (_initialize_hppanbsd_nat): Adjust to C++ification.
11827         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11828         (the_hppa_obsd_nat_target): New.
11829         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11830         methods of hppa_obsd_nat_target.
11831         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11832         add_target.
11833         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11834         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11835         add_target.
11836         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11837         (_initialize_i386obsd_nat): Use add_target.
11838         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11839         (the_m68k_bsd_nat_target): New.
11840         (m68kbsd_fetch_inferior_registers)
11841         (m68kbsd_store_inferior_registers): Refactor as methods of
11842         m68k_bsd_nat_target.
11843         (_initialize_m68kbsd_nat): Adjust to C++ification.
11844         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11845         (the_mips_fbsd_nat_target): New.
11846         (mips_fbsd_fetch_inferior_registers)
11847         (mips_fbsd_store_inferior_registers): Refactor as methods of
11848         mips_fbsd_nat_target.
11849         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11850         add_target.
11851         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11852         (the_mips_nbsd_nat_target): New.
11853         (mipsnbsd_fetch_inferior_registers)
11854         (mipsnbsd_store_inferior_registers): Refactor as methods of
11855         mips_nbsd_nat_target.
11856         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11857         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11858         (the_mips64_obsd_nat_target): New.
11859         (mips64obsd_fetch_inferior_registers)
11860         (mips64obsd_store_inferior_registers): Refactor as methods of
11861         mips64_obsd_nat_target.
11862         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11863         add_target.
11864         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11865         nbsd_nat_target.
11866         * nbsd-nat.h: Include "inf-ptrace.h".
11867         (nbsd_nat_target): New class.
11868         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11869         (obsd_wait): Refactor as methods of obsd_nat_target.
11870         (obsd_add_target): Delete.
11871         * obsd-nat.h: Include "inf-ptrace.h".
11872         (obsd_nat_target): New class.
11873         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11874         (the_ppc_fbsd_nat_target): New.
11875         (ppcfbsd_fetch_inferior_registers)
11876         (ppcfbsd_store_inferior_registers): Refactor as methods of
11877         ppc_fbsd_nat_target.
11878         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11879         add_target.
11880         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11881         (the_ppc_nbsd_nat_target): New.
11882         (ppcnbsd_fetch_inferior_registers)
11883         (ppcnbsd_store_inferior_registers): Refactor as methods of
11884         ppc_nbsd_nat_target.
11885         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11886         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11887         (the_ppc_obsd_nat_target): New.
11888         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11889         methods of ppc_obsd_nat_target.
11890         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11891         add_target.
11892         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11893         (the_sh_nbsd_nat_target): New.
11894         (shnbsd_fetch_inferior_registers)
11895         (shnbsd_store_inferior_registers): Refactor as methods of
11896         sh_nbsd_nat_target.
11897         (_initialize_shnbsd_nat): Adjust to C++ification.
11898         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11899         (inf_ptrace_xfer_partial): Delete.
11900         (sparc_xfer_partial, sparc_target): Delete.
11901         * sparc-nat.h (sparc_fetch_inferior_registers)
11902         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11903         (sparc_target): Delete function declaration.
11904         (sparc_target): New template class.
11905         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11906         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11907         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11908         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11909         add_target.
11910         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11911         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11912         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11913         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11914         add_target.
11915         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11916         (the_vax_bsd_nat_target): New.
11917         (vaxbsd_fetch_inferior_registers)
11918         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11919         methods.
11920         (_initialize_vaxbsd_nat): Adjust to C++ification.
11921
11922         * bsd-kvm.c (bsd_kvm_target): New class.
11923         (bsd_kvm_ops): Now a bsd_kvm_target.
11924         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11925         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11926         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11927         bsd_kvm_target.
11928         (bsd_kvm_return_one): Delete.
11929         (bsd_kvm_add_target): Adjust to C++ification.
11930
11931         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11932         (nto_procfs_target_procfs): New classes.
11933         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11934         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11935         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11936         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11937         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11938         (procfs_remove_hw_breakpoint, procfs_resume)
11939         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11940         (procfs_kill_inferior, procfs_store_registers)
11941         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11942         as methods of nto_procfs_target.
11943         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11944         (nto_native_ops): Delete.
11945         (procfs_open, procfs_native_open): Delete.
11946         (nto_native_ops): Now an nto_procfs_target_native.
11947         (init_procfs_targets): Adjust to C++ification.
11948         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11949         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11950         Refactor as methods of nto_procfs_target.
11951
11952         * go32-nat.c (go32_nat_target): New class.
11953         (the_go32_nat_target): New.
11954         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11955         (go32_store_registers, go32_xfer_partial, go32_files_info)
11956         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11957         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11958         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11959         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11960         (go32_target): Delete.
11961         (_initialize_go32_nat): Adjust to C++ification.
11962
11963         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11964         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11965         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11966         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11967         gnu_nat_target.
11968         (gnu_target): Delete.
11969         * gnu-nat.h (gnu_target): Delete.
11970         (gnu_nat_target): New class.
11971         * i386-gnu-nat.c (gnu_base_target): New.
11972         (i386_gnu_nat_target): New class.
11973         (the_i386_gnu_nat_target): New.
11974         (_initialize_i386gnu_nat): Adjust to C++ification.
11975
11976 2018-05-02  Pedro Alves  <palves@redhat.com>
11977
11978         * bfd-target.c (target_bfd_xclose): Rename to ...
11979         (target_bfd_close): ... this.
11980         (target_bfd_reopen): Adjust.
11981         * target.c (target_close): Remove references to to_xclose.
11982         * target.h (target_ops::to_xclose): Delete.
11983         (target_ops::to_close): Update comments.
11984
11985 2018-05-02  Pedro Alves  <palves@redhat.com>
11986
11987         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11988         "linux-nat.h".
11989         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11990         * inf-ptrace.c (inf_ptrace_register_u_offset)
11991         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11992         (inf_ptrace_store_register, inf_ptrace_store_registers)
11993         (inf_ptrace_trad_target): Move to ...
11994         * linux-nat-trad.c: ... this new file.
11995         * linux-nat-trad.h: New file.
11996         * linux-nat.c (linux_target_install_ops): Make extern.
11997         (linux_trad_target): Delete.
11998         * linux-nat.h (linux_trad_target): Delete declaration.
11999         (linux_target_install_ops): Declare.
12000         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
12001         "linux-nat.h".
12002
12003 2018-05-02  Pedro Alves  <palves@redhat.com>
12004
12005         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12006         procfs_target/add_target here.
12007         * procfs.c (procfs_target): Make static.
12008         (_initialize_procfs): Call add_target here.
12009         * procfs.h (struct target_ops): Remove forward declaration.
12010         (procfs_target): Remove declaration.
12011         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
12012
12013 2018-05-02  Pedro Alves  <palves@redhat.com>
12014
12015         * procfs.c (procfs_stopped_by_watchpoint)
12016         (procfs_insert_watchpoint, procfs_remove_watchpoint)
12017         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
12018         Forward declare.
12019         (procfs_use_watchpoints): Delete, move contents...
12020         (procfs_target): ... here.
12021         * procfs.h (procfs_use_watchpoints): Delete declaration.
12022         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12023         procfs_use_watchpoints.
12024         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12025         procfs_use_watchpoints.
12026
12027 2018-05-02  Tom Tromey  <tom@tromey.com>
12028
12029         PR python/20084:
12030         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12031         and var_zuinteger_unlimited.
12032         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12033         and PARAM_ZUINTEGER_UNLIMITED.
12034         (set_parameter_value): Handle var_zuinteger and
12035         var_zuinteger_unlimited.
12036         (add_setshow_generic): Likewise.
12037         (parmpy_init): Likewise.
12038
12039 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
12040
12041         PR rust/23124
12042         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
12043         pointer is not null before dereferencing it.
12044
12045 2018-04-30  Tom Tromey  <tom@tromey.com>
12046
12047         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12048         is_mi_like_p.
12049
12050 2018-04-30  Tom Tromey  <tom@tromey.com>
12051
12052         * breakpoint.c (mention): Remove use of is_mi_like_p.
12053         (print_mention_ranged_breakpoint): Likewise.
12054         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12055         of is_mi_like_p.
12056
12057 2018-04-30  Tom Tromey  <tom@tromey.com>
12058
12059         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12060
12061 2018-04-30  Tom Tromey  <tom@tromey.com>
12062
12063         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12064         (info_spu_event_command): Remove some uses of is_mi_like_p.
12065
12066 2018-04-30  Tom Tromey  <tom@tromey.com>
12067
12068         * python/py-framefilter.c (py_print_single_arg)
12069         (enumerate_locals, py_print_args, py_print_frame): Remove some
12070         uses of is_mi_like_p.
12071
12072 2018-04-30  Tom Tromey  <tom@tromey.com>
12073
12074         * ui-out.c: Update.
12075         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12076         * ui-out.h (ui_out::is_mi_like_p): Now const.
12077         (ui_out::do_is_mi_like_p): Now const.
12078         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12079
12080 2018-04-30  Tom Tromey  <tom@tromey.com>
12081
12082         * varobj.c (varobj_set_visualizer): Use new_reference.
12083         * python/python.c (gdbpy_decode_line): Use new_reference.
12084         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12085         new_reference.
12086
12087 2018-04-30  Tom Tromey  <tom@tromey.com>
12088
12089         * varobj.c (install_new_value): Use new_reference.
12090         * value.h (value_incref): Return void.  Swap intro comment with
12091         value_decref.
12092         * value.c (set_value_parent): Use new_reference.
12093         (value_incref): Return void.  Update intro comment.
12094         (release_value): Use new_reference.
12095         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12096
12097 2018-04-30  Tom Tromey  <tom@tromey.com>
12098
12099         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12100         * gdb_bfd.h (new_bfd_ref): Remove.
12101         (gdb_bfd_open): Update comment.
12102         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12103         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12104         (gdb_bfd_fdopenr): Use new_reference.
12105         * exec.c (exec_file_attach): Use new_reference.
12106
12107 2018-04-30  Tom Tromey  <tom@tromey.com>
12108
12109         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12110         method.
12111
12112 2018-04-30  Tom Tromey  <tom@tromey.com>
12113
12114         * jit.c (jit_read_code_entry): Use type_align.
12115         * i386-tdep.c (i386_gdbarch_init): Don't call
12116         set_gdbarch_long_long_align_bit.
12117         * gdbarch.sh: Remove long_long_align_bit.
12118         * gdbarch.c, gdbarch.h: Rebuild.
12119         * arc-tdep.c (arc_type_align): New function.
12120         (arc_gdbarch_init): Use arc_type_align.  Don't call
12121         set_gdbarch_long_long_align_bit.
12122
12123 2018-04-30  Tom Tromey  <tom@tromey.com>
12124
12125         * rust-lang.c (rust_type_alignment): Remove.
12126         (rust_composite_type): Use type_align.
12127
12128 2018-04-30  Tom Tromey  <tom@tromey.com>
12129
12130         * NEWS: Mention Type.align.
12131         * python/py-type.c (typy_get_alignof): New function.
12132         (type_object_getset): Add "alignof".
12133
12134 2018-04-30  Tom Tromey  <tom@tromey.com>
12135
12136         PR exp/17095:
12137         * NEWS: Update.
12138         * std-operator.def (UNOP_ALIGNOF): New operator.
12139         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12140         New.
12141         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12142         * c-lang.c (c_op_print_tab): Add alignof.
12143         * c-exp.y (ALIGNOF): New token.
12144         (exp): Add "ALIGNOF" production.
12145         (ident_tokens): Add _Alignof and alignof.
12146
12147 2018-04-30  Tom Tromey  <tom@tromey.com>
12148
12149         * i386-tdep.c (i386_type_align): New function.
12150         (i386_gdbarch_init): Update.
12151         * gdbarch.sh (type_align): New method.
12152         * gdbarch.c, gdbarch.h: Rebuild.
12153         * arch-utils.h (default_type_align): Declare.
12154         * arch-utils.c (default_type_align): New function.
12155         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12156         (struct type) <align_log2>: New field.
12157         <instance_flags>: Now a bitfield.
12158         (TYPE_RAW_ALIGN): New macro.
12159         (type_align, type_raw_align, set_type_align): Declare.
12160         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12161         functions.
12162         * dwarf2read.c (quirk_rust_enum): Set type alignment.
12163         (get_alignment, maybe_set_alignment): New functions.
12164         (read_structure_type, read_enumeration_type, read_array_type)
12165         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12166         (read_subrange_type, read_base_type): Set type alignment.
12167
12168 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
12169
12170         * dwarf2read.c (read_index_from_section): Use bool.
12171
12172 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
12173
12174         PR gdb/22950
12175         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12176         with #ifdef.
12177
12178 2018-04-29  John Reiser  <jreiser@BitWagon.com>
12179
12180         PR build/22873
12181         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12182         last step, and do it atomically.
12183
12184 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
12185
12186         * compile/compile-c-types.c (convert_int, convert_float):
12187         Update for C FE v1.
12188
12189 2018-04-27  Tom Tromey  <tom@tromey.com>
12190
12191         PR rust/22545:
12192         * rust-lang.c (rust_inclusive_range_type_p): New function.
12193         (rust_range): Handle inclusive ranges.
12194         (rust_compute_range): Likewise.
12195         * rust-exp.y (struct rust_op) <inclusive>: New field.
12196         (DOTDOTEQ): New constant.
12197         (range_expr): Add "..=" productions.
12198         (operator_tokens): Add "..=" token.
12199         (ast_range): Add "inclusive" parameter.
12200         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12201         ranges.
12202         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12203         bounds values.
12204         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12205         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12206         Update comments.
12207         * expprint.c (print_subexp_standard): Handle new bounds values.
12208         (dump_subexp_body_standard): Likewise.
12209
12210 2018-04-27  Tom Tromey  <tom@tromey.com>
12211
12212         * configure: Rebuild.
12213         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12214         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12215         "OVERRIDE".
12216         (class symbol_needs_eval_context): Likewise.
12217         * dwarf2read.c (mock_mapped_index::symbol_name_count)
12218         (mock_mapped_index::symbol_name_at): Use "override".  Remove
12219         "virtual".
12220         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12221         "override".
12222         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12223         * aarch64-tdep.c (instruction_reader::read): Use "override".
12224         (instruction_reader_test::read): Likewise.
12225         * arm-tdep.c (instruction_reader::read): Use "override".
12226         (instruction_reader_thumb::read): Likewise.
12227
12228 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
12229
12230         PR remote/9665
12231         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12232         instead of remote_send.
12233         (remote_send): Remove.
12234
12235 2018-04-26  Pedro Alves  <palves@redhat.com>
12236
12237         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12238         find_function_start_sal instead of find_pc_line.
12239
12240 2018-04-26  Pedro Alves  <palves@redhat.com>
12241
12242         * breakpoint.c (set_breakpoint_location_function): Handle
12243         mst_data_gnu_ifunc.
12244         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12245         * elfread.c (elf_symtab_read): Give data symbols with
12246         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12247         (elf_rel_plt_read): Update comment.
12248         * linespec.c (convert_linespec_to_sals): Handle
12249         mst_data_gnu_ifunc.
12250         (minsym_found): Handle mst_data_gnu_ifunc.
12251         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12252         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12253         * parse.c (find_minsym_type_and_address): Handle
12254         mst_data_gnu_ifunc.
12255         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12256         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12257         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12258         comment.
12259         <mst_data_gnu_ifunc>: New enumerator.
12260
12261 2018-04-26  Pedro Alves  <palves@redhat.com>
12262
12263         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12264         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
12265         'want_trampoline' parameter by a lookup_msym_prefer parameter.
12266         Handle it.
12267         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12268         (lookup_minimal_symbol_by_pc): Adjust.
12269         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12270         (lookup_solib_trampoline_symbol_by_pc): Adjust.
12271         * minsyms.h (lookup_msym_prefer): New enum.
12272         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12273         parameter by a lookup_msym_prefer parameter.
12274
12275 2018-04-26  Pedro Alves  <palves@redhat.com>
12276
12277         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12278         ends in "@plt" instead of looking at the symbol's section.
12279
12280 2018-04-26  Pedro Alves  <palves@redhat.com>
12281
12282         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
12283         all references.
12284         (find_pc_partial_function_gnu_ifunc): Rename to ...
12285         (find_pc_partial_function): ... this, and remove references to
12286         'is_gnu_ifunc_p'.
12287         (find_pc_partial_function): Delete old implementation.
12288         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12289
12290 2018-04-26  Pedro Alves  <palves@redhat.com>
12291
12292         * linespec.c (struct bound_minimal_symbol_search_key): New.
12293         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
12294         skip first line if we found a GNU ifunc minimal symbol by name.
12295         (compare_msymbols): Change parameters to work with a destructured
12296         lhs minsym.
12297         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12298         functions.
12299
12300 2018-04-26  Pedro Alves  <palves@redhat.com>
12301
12302         * breakpoint.c (set_breakpoint_location_function): Don't resolve
12303         ifunc targets here.  Instead, if we have an ifunc minsym, use its
12304         address/name.
12305         (add_location_to_breakpoint): Store the minsym and the objfile in
12306         the breakpoint location.
12307         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12308         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12309         Record the minsym in the sal.
12310         * symtab.h (symtab_and_line) <msymbol>: New field.
12311
12312 2018-04-26  Pedro Alves  <palves@redhat.com>
12313
12314         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12315         unless we actually resolved the ifunc.
12316
12317 2018-04-26  Pedro Alves  <palves@redhat.com>
12318
12319         * c-exp.y (variable production): Prefer ifunc minsyms over
12320         regular function symbols.
12321         * symtab.c (find_gnu_ifunc): New function.
12322         * minsyms.h (lookup_msym_prefer): New enum.
12323         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12324         parameter by a lookup_msym_prefer parameter.
12325         * symtab.h (find_gnu_ifunc): New declaration.
12326
12327 2018-04-26  Pedro Alves  <palves@redhat.com>
12328
12329         * blockframe.c (find_gnu_ifunc_target_type): New function.
12330         (find_function_type): New.
12331         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12332         return a value with a memory address.
12333         (eval_call): For calls to GNU ifunc functions, try to find the
12334         type of the target function from the type that the resolver
12335         returns.
12336         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12337         symbols.
12338         * infcall.c (find_function_return_type): Delete.
12339         (find_function_addr): Add 'function_type' parameter.  For calls to
12340         GNU ifunc functions, try to find the type of the target function
12341         from the type that the resolver returns, and return it via
12342         FUNCTION_TYPE.
12343         (call_function_by_hand_dummy): Adjust to use the function type
12344         returned by find_function_addr.
12345         (find_function_addr): Add 'function_type' parameter and move
12346         description here.
12347         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12348         declarations.
12349
12350 2018-04-26  Pedro Alves  <palves@redhat.com>
12351
12352         * c-exp.y (variable production): Skip finding an alias for ifunc
12353         symbols.
12354
12355 2018-04-26  Pedro Alves  <palves@redhat.com>
12356
12357         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12358
12359 2018-04-25  Pedro Alves  <palves@redhat.com>
12360
12361         * infcmd.c (kill_command): Print the pid as string, not the whole
12362         thread's ptid.  Add comment.  s/has been killed/killed/ in output
12363         message.
12364         * remote.c (remote_detach_1): Print the pid as string, not the
12365         whole thread's ptid.
12366
12367 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
12368             Sergio Durigan Junior  <sergiodj@redhat.com>
12369             Pedro Alves  <palves@redhat.com>
12370
12371         * infcmd.c (kill_command): Print message when inferior has
12372         been killed.
12373         * inferior.c (print_inferior_events): Remove 'static'.  Set as
12374         '1'.
12375         (add_inferior): Improve message printed when
12376         'print_inferior_events' is on.
12377         (exit_inferior): Remove message printed when
12378         'print_inferior_events' is on.
12379         (detach_inferior): Improve message printed when
12380         'print_inferior_events' is on.
12381         (initialize_inferiors): Use 'add_inferior_silent' to set
12382         'current_inferior_'.
12383         * inferior.h (print_inferior_events): Declare here as
12384         'extern'.
12385         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12386         '[Detaching...]' messages when 'print_inferior_events' is on.
12387         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
12388         as prefix/suffix for messages.  Remove periods.  Fix erroneous
12389         'Detaching after fork from child...', replace it by '... from
12390         parent...'.
12391         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12392         prefix/suffix when printing 'Detaching...' messages.  Print
12393         them when 'print_inferior_events' is on.
12394         * remote.c (remote_detach_1): Print message when detaching
12395         from inferior and '!is_fork_parent'.
12396
12397 2018-04-24  Tom Tromey  <tom@tromey.com>
12398
12399         * cli-out.h: Reindent.
12400
12401 2018-04-24  Tom Tromey  <tom@tromey.com>
12402
12403         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12404         (cli_ui_out::do_field_string): Use fputs_filtered.
12405         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12406
12407 2018-04-23  Tom Tromey  <tom@tromey.com>
12408
12409         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12410         gdb::unique_xmalloc_ptr.
12411
12412 2018-04-23  Tom Tromey  <tom@tromey.com>
12413
12414         * configure: Rebuild.
12415
12416 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12417
12418         PR gdb/23095
12419         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12420         prepare_for_testing.  Set normal_bp to r_debug_state if target
12421         is bsd.
12422
12423 2018-04-21  Pedro Alves  <palves@redhat.com>
12424             Rajendra SY  <rajendra.sy@gmail.com>
12425
12426         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12427         * remote.c (extended_remote_attach): In all-stop mode, mark the
12428         thread as executing.
12429
12430 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12431
12432         * thread.c (thread_apply_all_command): Fix comment.
12433         (thread_command): Fix comment.
12434
12435 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12436
12437         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12438         parameter.
12439         * features/aarch64-core.c (create_feature_aarch64_core):
12440         Regenerate.
12441         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12442         Likewise.
12443         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12444         Likewise.
12445         * features/i386/32bit-avx512.c
12446         (create_feature_i386_32bit_avx512): Likewise.
12447         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12448         Likewise.
12449         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12450         Likewise.
12451         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12452         Likewise.
12453         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12454         Likewise.
12455         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12456         Likewise.
12457         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12458         Likewise.
12459         * features/i386/64bit-avx512.c
12460         (create_feature_i386_64bit_avx512): Likewise.
12461         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12462         Likewise.
12463         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12464         Likewise.
12465         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12466         Likewise.
12467         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12468         Likewise.
12469         * features/i386/64bit-segments.c
12470         (create_feature_i386_64bit_segments): Likewise.
12471         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12472         Likewise.
12473         * features/i386/x32-core.c
12474         (create_feature_i386_x32_core): Likewise.
12475         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12476         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12477         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12478         * target-descriptions.c: In generated code, don't pass xml
12479         filename.
12480
12481 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12482
12483         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12484         (print_xml_feature::visit_post): Likewise.
12485         (print_xml_feature::visit): Likewise.
12486         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12487         (print_xml_feature): Add new class.
12488         * regformats/regdat.sh: Null xmltarget on feature targets.
12489         * target-descriptions.c (struct target_desc): Add xmltarget.
12490         (maintenance_check_tdesc_xml_convert): Add unittest function.
12491         (tdesc_get_features_xml): Add function to get xml.
12492         (maintenance_check_xml_descriptions): Test xml generation.
12493         * xml-tdesc.c (string_read_description_xml): Add function.
12494         * xml-tdesc.h (string_read_description_xml): Add declaration.
12495
12496 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12497
12498         * features/Makefile: Add feature marker to targets with new style
12499         target descriptions.
12500         * regformats/aarch64.dat: Regenerate.
12501         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12502         * regformats/i386/amd64-avx-linux.dat: Likewise.
12503         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12504         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12505         * regformats/i386/amd64-linux.dat: Likewise.
12506         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12507         * regformats/i386/amd64.dat: Likewise.
12508         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12509         * regformats/i386/i386-avx-linux.dat: Likewise.
12510         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12511         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12512         * regformats/i386/i386-linux.dat: Likewise.
12513         * regformats/i386/i386-mmx-linux.dat: Likewise.
12514         * regformats/i386/i386-mpx-linux.dat: Likewise.
12515         * regformats/i386/i386.dat: Likewise.
12516         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12517         * regformats/i386/x32-avx-linux.dat: Likewise.
12518         * regformats/i386/x32-linux.dat: Likewise.
12519         * regformats/tic6x-c62x-linux.dat: Likewise.
12520         * regformats/tic6x-c64x-linux.dat: Likewise.
12521         * regformats/tic6x-c64xp-linux.dat: Likewise.
12522         * regformats/regdat.sh: Parse feature marker.
12523
12524 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12525
12526         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12527         (tdesc_osabi_name): Likewise.
12528         * target-descriptions.c (tdesc_architecture_name): Add new
12529         function.
12530         (tdesc_osabi_name): Likewise.
12531
12532 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12533
12534         * common/tdesc.c (tdesc_predefined_type): Move to here.
12535         (tdesc_named_type): Likewise.
12536         (tdesc_create_vector): Likewise.
12537         (tdesc_create_struct): Likewise.
12538         (tdesc_set_struct_size): Likewise.
12539         (tdesc_create_union): Likewise.
12540         (tdesc_create_flags): Likewise.
12541         (tdesc_create_enum): Likewise.
12542         (tdesc_add_field): Likewise.
12543         (tdesc_add_typed_bitfield): Likewise.
12544         (tdesc_add_bitfield): Likewise.
12545         (tdesc_add_flag): Likewise.
12546         (tdesc_add_enum_value): Likewise.
12547         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12548         (struct tdesc_type_vector): Likewise.
12549         (struct tdesc_type_field): Likewise.
12550         (struct tdesc_type_with_fields): Likewise.
12551         (tdesc_create_enum): Add declaration.
12552         (tdesc_add_typed_bitfield): Likewise.
12553         (tdesc_add_enum_value): Likewise.
12554         * target-descriptions.c (tdesc_type_field): Move from here.
12555         (tdesc_type_builtin): Likewise.
12556         (tdesc_type_vector): Likewise.
12557         (tdesc_type_with_fields): Likewise.
12558         (tdesc_predefined_types): Likewise.
12559         (tdesc_named_type): Likewise.
12560         (tdesc_create_vector): Likewise.
12561         (tdesc_create_struct): Likewise.
12562         (tdesc_set_struct_size): Likewise.
12563         (tdesc_create_union): Likewise.
12564         (tdesc_create_flags): Likewise.
12565         (tdesc_create_enum): Likewise.
12566         (tdesc_add_field): Likewise.
12567         (tdesc_add_typed_bitfield): Likewise.
12568         (tdesc_add_bitfield): Likewise.
12569         (tdesc_add_flag): Likewise.
12570         (tdesc_add_enum_value): Likewise.
12571         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12572         (tdesc_add_typed_bitfield): Likewise.
12573         (tdesc_add_enum_value): Likewise.
12574
12575 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12576
12577         * common/tdesc.c (tdesc_feature::accept): Move to here.
12578         (tdesc_feature::operator==): Likewise.
12579         (tdesc_create_reg): Likewise.
12580         * common/tdesc.h (tdesc_type_kind): Likewise.
12581         (struct tdesc_type): Likewise.
12582         (struct tdesc_feature): Likewise.
12583         * regformats/regdat.sh: Create a feature.
12584         * target-descriptions.c (tdesc_type_kind): Move from here.
12585         (tdesc_type): Likewise.
12586         (tdesc_type_up): Likewise.
12587         (tdesc_feature): Likewise.
12588         (tdesc_create_reg): Likewise.
12589
12590 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12591
12592         * Makefile.in: Add arch/tdesc.c
12593         * common/tdesc.c: New file.
12594         * common/tdesc.h (tdesc_element_visitor): Move to here.
12595         (tdesc_element): Likewise.
12596         (tdesc_reg): Likewise.
12597         (tdesc_reg_up): Likewise.
12598         * regformats/regdef.h (reg): Add offset to constructors.
12599         * target-descriptions.c (tdesc_element_visitor): Move from here.
12600         (tdesc_element): Likewise.
12601         (tdesc_reg): Likewise.
12602         (tdesc_reg_up): Likewise.
12603
12604 2018-04-17  Tom Tromey  <tom@tromey.com>
12605
12606         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12607         discriminant field.
12608
12609 2018-04-17  Tom Tromey  <tom@tromey.com>
12610
12611         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12612
12613 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12614
12615         * symtab.c (print_symbol_info): Skip printing filename and line
12616         number when `last' is NULL.
12617         (symtab_symbol_info): Use empty string instead of NULL for first
12618         invocation of print_symbol_info.
12619         (rbreak_command): Pass NULL to `last' parameter of
12620         print_symbol_info.
12621
12622 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12623
12624         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12625         instead of nullptr.
12626
12627 2018-04-16  Pedro Alves  <palves@redhat.com>
12628
12629         * MAINTAINERS (sh): Remove.
12630         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12631         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12632         (ALLDEPFILES): Remove sh64-tdep.c.
12633         * NEWS: Mentions that support for SH-5/SH64 is removed.
12634         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12635         (sh*-*-openbsd*): Ditto.
12636         (sh64-*-elf*): Remove.
12637         (sh*): Remove.
12638         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12639         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12640         * sh-tdep.c: No longer include "sh64-tdep.h".
12641         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12642         * sh64-tdep.c, sh64-tdep.h: Remove files.
12643
12644 2018-04-16  Pedro Alves  <palves@redhat.com>
12645
12646         * MAINTAINERS: Remove m88k.
12647         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12648         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12649         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12650         * NEWS: Mention that support for m88k was removed.
12651         * configure.host (m88*-*-*): Remove support.
12652         * configure.nat (m88k-*-*): Remove support.
12653         * configure.tgt (m88*-*-openbsd*): Remove.
12654         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12655
12656 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12657
12658         * configure.tgt (x86_tobjs): New variable.
12659         (amd64_tobjs, i386_tobjs): Use it.
12660
12661 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12662
12663         * symtab.c (print_symbol_info): Precede the symbol definition by
12664         the line number when available.
12665         * NEWS: Advertise this enhancement.
12666
12667 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12668
12669         * NEWS (New options): announce set/show record btrace cpu.
12670         * btrace.c: Include record-btrace.h.
12671         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12672         the vendor is unknown.
12673         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12674         Maybe overwrite the btrace configuration's cpu.
12675         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12676         (btrace_fetch): Add cpu parameter.  Update callers.
12677         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12678         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12679         errata workarounds if the vendor is unknown.
12680         * python/py-record-btrace.c: Include record-btrace.h.
12681         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12682         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12683         * record-btrace.c (record_btrace_cpu_state_kind): New.
12684         (record_btrace_cpu): New.
12685         (set_record_btrace_cpu_cmdlist): New.
12686         (record_btrace_get_cpu): New.
12687         (require_btrace_thread, record_btrace_info)
12688         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12689         (cmd_set_record_btrace_cpu_none): New.
12690         (cmd_set_record_btrace_cpu_auto): New.
12691         (cmd_set_record_btrace_cpu): New.
12692         (cmd_show_record_btrace_cpu): New.
12693         (_initialize_record_btrace): Initialize set/show record btrace cpu
12694         commands.
12695         * record-btrace.h (record_btrace_get_cpu): New.
12696
12697 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12698
12699         * record.c (set_record_command): Fix typo in message.
12700
12701 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12702
12703         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12704
12705 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12706
12707         * infrun.c (process_event_stop_test): Call
12708         gdbarch_in_indirect_branch_thunk.
12709         * gdbarch.sh (in_indirect_branch_thunk): New.
12710         * gdbarch.c: Regenerated.
12711         * gdbarch.h: Regenerated.
12712         * x86-tdep.h: New.
12713         * x86-tdep.c: New.
12714         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12715         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12716         (ALLDEPFILES): Add x86-tdep.c.
12717         * arch-utils.h (default_in_indirect_branch_thunk): New.
12718         * arch-utils.c (default_in_indirect_branch_thunk): New.
12719         * i386-tdep: Include x86-tdep.h.
12720         (i386_in_indirect_branch_thunk): New.
12721         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12722         function.
12723         * amd64-tdep: Include x86-tdep.h.
12724         (amd64_in_indirect_branch_thunk): New.
12725         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12726
12727 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12728
12729         PR gdb/23053
12730         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12731         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12732         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12733         regression.
12734
12735 2018-04-12  Tom Tromey  <tom@tromey.com>
12736
12737         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12738         (rust_evaluate_subexp): Likewise.
12739
12740 2018-04-12  Pedro Alves  <palves@redhat.com>
12741
12742         * procfs.c (procfs_detach): Make forward declaration's prototype
12743         match definition's protototype.
12744         (proc_get_LDT_entry): Remove stale do_cleanups call.
12745
12746 2018-04-12  Pedro Alves  <palves@redhat.com>
12747
12748         * target.h (target_ops::to_has_exited): Delete.
12749         (target_has_exited): Delete.
12750         * target-delegates.c: Regenerate.
12751
12752 2018-04-11  Pedro Alves  <palves@redhat.com>
12753
12754         * target.c (fileio_fh_t::t): Add comment.
12755         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12756         (target_fileio_close): Handle a NULL target.
12757         (invalidate_fileio_fh): New.
12758         (target_close): Call it.
12759         * remote.c (remote_hostio_send_command): No longer check whether
12760         remote_desc is open.
12761
12762 2018-04-11  Pedro Alves  <palves@redhat.com>
12763
12764         * target.c (fileio_fh_t): Make it a named struct instead of a
12765         typedef.
12766         (fileio_fh_t::is_closed): New method.
12767         (DEF_VEC_O (fileio_fh_t)): Remove.
12768         (fileio_fhandles): Now a std::vector.
12769         (is_closed_fileio_fh): Delete.
12770         (acquire_fileio_fd): Adjust.  Rename parameters.
12771         (release_fileio_fd): Adjust.
12772         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12773         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12774         (target_fileio_close): Adjust.
12775
12776 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12777
12778         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12779         index.
12780
12781 2018-04-10  Pedro Alves  <palves@redhat.com>
12782
12783         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12784         (scoped_finish_thread_state): New class.
12785         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12786         cleanup.
12787         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12788         (fetch_inferior_event, normal_stop): Likewise.
12789         * thread.c (finish_thread_state_cleanup): Delete.
12790
12791 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12792             Pedro Alves  <palves@redhat.com>
12793
12794         * value.c: Include "selftest.h" and "common/array-view.h".
12795         (struct range) <operator ==>: New.
12796         (test_ranges_contain): New.
12797         (check_ranges_vector): New.
12798         (test_insert_into_bit_range_vector): New.
12799         (_initialize_values): Register selftests.
12800         * common/array-view.h (operator==, operator!=): New.
12801
12802 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12803
12804         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12805         an iterator.
12806         * inline-frame.c: Include <algorithm>.
12807         (struct inline_state): Add constructor.
12808         (inline_state_s): Remove.
12809         (DEF_VEC_O(inline_state_s)): Remove.
12810         (inline_states): Change type to std::vector.
12811         (find_inline_frame_state): Adjust to std::vector.
12812         (allocate_inline_frame_state): Remove.
12813         (clear_inline_frame_state): Adjust to std::vector.
12814         (skip_inline_frames): Adjust to std::vector.
12815
12816 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12817
12818         * tracepoint.h (struct trace_state_variable): Add constructor.
12819         <name>: Change type to std::string.
12820         * tracepoint.c (tsv_s): Remove.
12821         (DEF_VEC_O(tsv_s)): Remove.
12822         (tvariables): Change to std::vector.
12823         (create_trace_state_variable): Adjust to std::vector.
12824         (find_trace_state_variable): Likewise.
12825         (find_trace_state_variable_by_number): Likewise.
12826         (delete_trace_state_variable): Likewise.
12827         (trace_variable_command): Adjust to std::string.
12828         (delete_trace_variable_command): Likewise.
12829         (tvariables_info_1): Adjust to std::vector.
12830         (save_trace_state_variables): Likewise.
12831         (start_tracing): Likewise.
12832         (merge_uploaded_trace_state_variables): Adjust to std::vector
12833         and std::string.
12834         * target.h (struct target_ops)
12835         <to_download_trace_state_variable>: Pass reference to
12836         trace_state_variable.
12837         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12838         * target-delegates.c: Re-generate.
12839         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12840         (mi_tsv_deleted): Likewise.
12841         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12842         * remote.c (remote_download_trace_state_variable): Change
12843         pointer to reference and adjust.
12844         * make-target-delegates (parse_argtypes): Handle references.
12845         (write_function_header): Likewise.
12846         (munge_type): Likewise.
12847
12848 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12849
12850         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12851         string_view-selftests.c.
12852         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12853         testsuite.
12854         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12855         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12856         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12857         * unittests/basic_string_view/element_access/char/1.cc:
12858         Likewise.
12859         * unittests/basic_string_view/element_access/char/empty.cc:
12860         Likewise.
12861         * unittests/basic_string_view/element_access/char/front_back.cc:
12862         Likewise.
12863         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12864         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12865         Likewise.
12866         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12867         Likewise.
12868         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12869         Likewise.
12870         * unittests/basic_string_view/operations/compare/char/1.cc:
12871         Likewise.
12872         * unittests/basic_string_view/operations/compare/char/13650.cc:
12873         Likewise.
12874         * unittests/basic_string_view/operations/copy/char/1.cc:
12875         Likewise.
12876         * unittests/basic_string_view/operations/data/char/1.cc:
12877         Likewise.
12878         * unittests/basic_string_view/operations/find/char/1.cc:
12879         Likewise.
12880         * unittests/basic_string_view/operations/find/char/2.cc:
12881         Likewise.
12882         * unittests/basic_string_view/operations/find/char/3.cc:
12883         Likewise.
12884         * unittests/basic_string_view/operations/find/char/4.cc:
12885         Likewise.
12886         * unittests/basic_string_view/operations/rfind/char/1.cc:
12887         Likewise.
12888         * unittests/basic_string_view/operations/rfind/char/2.cc:
12889         Likewise.
12890         * unittests/basic_string_view/operations/rfind/char/3.cc:
12891         Likewise.
12892         * unittests/basic_string_view/operations/substr/char/1.cc:
12893         Likewise.
12894         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12895         * unittests/string_view-selftests.c: New file.
12896
12897 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12898
12899         * unittests/basic_string_view/capacity/1.cc: New file.
12900         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12901         * unittests/basic_string_view/cons/char/1.cc: New file.
12902         * unittests/basic_string_view/cons/char/2.cc: New file.
12903         * unittests/basic_string_view/cons/char/3.cc: New file.
12904         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12905         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12906         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12907         * unittests/basic_string_view/element_access/char/1.cc: New file.
12908         * unittests/basic_string_view/element_access/char/2.cc: New file.
12909         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12910         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12911         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12912         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12913         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12914         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12915         * unittests/basic_string_view/include.cc: New file.
12916         * unittests/basic_string_view/inserters/char/1.cc: New file.
12917         * unittests/basic_string_view/inserters/char/2.cc: New file.
12918         * unittests/basic_string_view/inserters/char/3.cc: New file.
12919         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12920         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12921         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12922         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12923         * unittests/basic_string_view/literals/types.cc: New file.
12924         * unittests/basic_string_view/literals/values.cc: New file.
12925         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12926         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12927         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12928         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12929         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12930         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12931         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12932         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12933         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12934         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12935         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12936         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12937         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12938         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12939         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12940         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12941         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12942         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12943         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12944         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12945         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12946         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12947         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12948         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12949         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12950         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12951         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12952         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12953         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12954         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12955         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12956         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12957         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12958         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12959         * unittests/basic_string_view/operators/char/2.cc: New file.
12960         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12961         * unittests/basic_string_view/range_access/char/1.cc: New file.
12962         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12963         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12964         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12965         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12966         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12967         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12968         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12969         * unittests/basic_string_view/typedefs.cc: New file.
12970         * unittests/basic_string_view/types/1.cc: New file.
12971
12972 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12973
12974         * common/gdb_string_view.h: Remove libstdc++ implementation
12975         details, adjust to gdb reality.
12976         * common/gdb_string_view.tcc: Likewise.
12977         * cli/cli-script.c (struct string_view): Remove.
12978         (user_args) <m_args>: Change element type to gdb::string_view.
12979         (user_args::insert_args): Adjust.
12980
12981 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12982
12983         * common/gdb_string_view.h: New file.
12984         * common/gdb_string_view.tcc: New file.
12985
12986 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12987
12988         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12989         * configure: Re-generate.
12990
12991 2018-04-09  Pedro Alves  <palves@redhat.com>
12992
12993         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12994         (set_target_gdbarch): Call
12995         gdb::observers::architecture_changed.notify instead of
12996         observer_notify_architecture_changed.
12997
12998 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12999
13000         * tracepoint.c (struct current_traceframe_cleanup): Remove.
13001         (do_restore_current_traceframe_cleanup): Remove.
13002         (restore_current_traceframe_cleanup_dtor): Remove.
13003         (make_cleanup_restore_current_traceframe): Remove.
13004         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
13005         New.
13006         * tracepoint.h (struct scoped_restore_current_traceframe): New.
13007         * infrun.c (fetch_inferior_event): Use
13008         scoped_restore_current_traceframe.
13009
13010 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13011
13012         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
13013         Remove.
13014         <n_allocated_type_units>: Remove.
13015         <all_type_units>: Change to std::vector.
13016         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13017         to std::vector change.
13018         (dwarf2_per_objfile::get_cutu): Likewise.
13019         (dwarf2_per_objfile::get_tu): Likewise.
13020         (create_signatured_type_table_from_index): Likewise.
13021         (create_signatured_type_table_from_debug_names): Likewise.
13022         (dw2_symtab_iter_next): Likewise.
13023         (dw2_print_stats): Likewise.
13024         (dw2_expand_all_symtabs): Likewise.
13025         (dw2_expand_marked_cus): Likewise.
13026         (dw2_debug_names_iterator::next): Likewise.
13027         (dwarf2_initialize_objfile): Likewise.
13028         (add_signatured_type_cu_to_table): Likewise.
13029         (create_all_type_units): Likewise.
13030         (add_type_unit): Likewise.
13031         (struct tu_abbrev_offset): Add constructor.
13032         (build_type_psymtabs_1): Adjust to std::vector change.
13033         (print_tu_stats): Likewise.
13034         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13035         (write_debug_names): Likewise.
13036
13037 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13038
13039         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13040         Make an std::vector.
13041         <n_comp_units>: Remove.
13042         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13043         to std::vector change.
13044         (dwarf2_per_objfile::get_cutu): Likewise.
13045         (dwarf2_per_objfile::get_cu): Likewise.
13046         (create_cus_from_index): Likewise.
13047         (create_addrmap_from_index): Likewise.
13048         (create_addrmap_from_aranges): Likewise.
13049         (dwarf2_read_index): Likewise.
13050         (dw2_find_last_source_symtab): Likewise.
13051         (dw2_map_symtabs_matching_filename): Likewise.
13052         (dw2_symtab_iter_next): Likewise.
13053         (dw2_print_stats): Likewise.
13054         (dw2_expand_all_symtabs): Likewise.
13055         (dw2_expand_symtabs_with_fullname): Likewise.
13056         (dw2_expand_marked_cus): Likewise.
13057         (dw2_map_symbol_filenames): Likewise.
13058         (create_cus_from_debug_names): Likewise.
13059         (dwarf2_read_debug_names): Likewise.
13060         (dw2_debug_names_iterator::next): Likewise.
13061         (dwarf2_initialize_objfile): Likewise.
13062         (set_partial_user): Likewise.
13063         (dwarf2_build_psymtabs_hard): Likewise.
13064         (read_comp_units_from_section): Remove arguments, adjust to
13065         std::vector change.
13066         (create_all_comp_units): Adjust to std::vector and
13067         read_comp_units_from_section changes.
13068         (dwarf2_find_containing_comp_unit): Adjust to std::vector
13069         change.
13070         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13071         (psyms_seen_size): Likewise.
13072         (write_gdbindex): Likewise.
13073         (write_debug_names): Likewise.
13074
13075 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13076
13077         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13078         with dwarf2_per_objfile.
13079         (create_cus_from_index): Likewise.
13080         (create_signatured_type_table_from_index): Likewise.
13081         (dwarf2_read_index): Likewise.
13082         (dwarf2_initialize_objfile): Likewise.
13083         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
13084         per_cu rather than get_dwarf2_per_objfile.
13085
13086 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13087
13088         * dwarf2read.h (struct signatured_type): Forward declare.
13089         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13090         New methods.
13091         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13092         (dw2_get_cutu): ...this.
13093         (dwarf2_per_objfile::get_cu): Rename from...
13094         (dw2_get_cu): ...this.
13095         (dwarf2_per_objfile::get_tu): New.
13096         (create_addrmap_from_index): Adjust.
13097         (create_addrmap_from_aranges): Adjust.
13098         (dw2_find_last_source_symtab): Adjust.
13099         (dw2_map_symtabs_matching_filename): Adjust.
13100         (dw2_symtab_iter_next): Adjust.
13101         (dw2_print_stats): Adjust.
13102         (dw2_expand_all_symtabs): Adjust.
13103         (dw2_expand_symtabs_with_fullname): Adjust.
13104         (dw2_expand_marked_cus): Adjust.
13105         (dw_expand_symtabs_matching_file_matcher): Adjust.
13106         (dw2_map_symbol_filenames): Adjust.
13107         (dw2_debug_names_iterator::next): Adjust.
13108         (dwarf2_initialize_objfile): Adjust.
13109         (set_partial_user): Adjust.
13110         (dwarf2_build_psymtabs_hard): Adjust.
13111
13112 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13113
13114         * dwarf2read.c (create_signatured_type_table_from_debug_names):
13115         Remove unused variables.
13116         (dw2_map_symtabs_matching_filename): Likewise.
13117         (dwarf2_record_block_ranges): Likewise.
13118         (dwarf2_read_addr_index): Likewise.
13119         (follow_die_offset): Likewise.
13120
13121 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13122
13123         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13124         to symbol_file_add_main.
13125
13126 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13127
13128         PR mi/22299
13129         * mi/mi-console.c (do_fputc_async_safe): New.
13130         (mi_console_file::write_async_safe): New.
13131         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13132         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13133         New.
13134         * ui-file.c (ui_file::putstrn): Adjust call to
13135         fputstrn_unfiltered.
13136         * utils.c (printchar): Replace do_fputs and do_fprintf
13137         parameters by do_fputc.
13138         (fputstr_filtered): Adjust call to printchar.
13139         (fputstr_unfiltered): Likewise.
13140         (fputstrn_filtered): Likewise.
13141         (fputstrn_unfiltered): Add do_fputc parameter, pass to
13142         printchar.
13143         * utils.h (do_fputc_ftype): New typedef.
13144         (fputstrn_unfiltered): Add do_fputc parameter.
13145
13146 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13147
13148         * regformats/i386/i386-avx.dat: Remove.
13149
13150 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13151
13152         PR gdb/22979
13153         * amd64-tdep.c (amd64_none_init_abi): New function.
13154         (amd64_x32_none_init_abi): New function.
13155         (_initialize_amd64_tdep): Register handlers for x86-64 and
13156         x64_32 with GDB_OSABI_NONE.
13157         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13158         GDB_OSABI_NONE osabi.
13159
13160 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13161
13162         PR gdb/22980
13163         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13164         GDB_OSABI_NONE.
13165         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13166         * osabi.c (gdb_osabi_names): Add "unknown" entry.
13167
13168 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13169
13170         * common/byte-vector.h (char_vector): New type.
13171         * target.h (target_read_alloc): Return
13172         gdb::optional<byte_vector>.
13173         (target_read_stralloc): Return gdb::optional<char_vector>.
13174         (target_get_osdata): Return gdb::optional<char_vector>.
13175         * target.c (target_read_alloc_1): Templatize.  Replacement
13176         manual memory management with vector.
13177         (target_read_alloc): Change return type, adjust.
13178         (target_read_stralloc): Change return type, adjust.
13179         (target_get_osdata): Change return type, adjust.
13180         * auxv.c (struct auxv_info) <length>: Remove.
13181         <data>: Change type to gdb::optional<byte_vector>.
13182         (auxv_inferior_data_cleanup): Free auxv_info with delete.
13183         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13184         (target_auxv_search): Adjust.
13185         (fprint_target_auxv): Adjust.
13186         * avr-tdep.c (avr_io_reg_read_command): Adjust.
13187         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13188         (linux_make_corefile_notes): Adjust.
13189         * osdata.c (get_osdata): Adjust.
13190         * remote.c (remote_get_threads_with_qxfer): Adjust.
13191         (remote_memory_map): Adjust.
13192         (remote_traceframe_info): Adjust.
13193         (btrace_read_config): Adjust.
13194         (remote_read_btrace): Adjust.
13195         (remote_pid_to_exec_file): Adjust.
13196         * solib-aix.c (solib_aix_get_library_list): Adjust.
13197         * solib-dsbt.c (decode_loadmap): Don't free buf.
13198         (dsbt_get_initial_loadmaps): Adjust.
13199         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13200         * solib-target.c (solib_target_current_sos): Adjust.
13201         * tracepoint.c (sdata_make_value): Adjust.
13202         * xml-support.c (xinclude_start_include): Adjust.
13203         (xml_fetch_content_from_file): Adjust.
13204         * xml-support.h (xml_fetch_another): Change return type.
13205         (xml_fetch_content_from_file): Change return type.
13206         * xml-syscall.c (xml_init_syscalls_info): Adjust.
13207         * xml-tdesc.c (file_read_description_xml): Adjust.
13208         (fetch_available_features_from_target): Change return type.
13209         (target_fetch_description_xml): Adjust.
13210         (target_read_description_xml): Adjust.
13211
13212 2018-04-06  Tom Tromey  <tom@tromey.com>
13213
13214         * value.c (~value): Update.
13215         (struct value) <contents>: Now unique_xmalloc_ptr.
13216         (value_contents_bits_eq, allocate_value_contents)
13217         (value_contents_raw, value_contents_all_raw)
13218         (value_contents_for_printing, value_contents_for_printing_const)
13219         (set_value_enclosing_type): Update.
13220
13221 2018-04-06  Tom Tromey  <tom@tromey.com>
13222
13223         * value.c (range_s): Remove typedef, VEC.
13224         (struct range): Add operator<.
13225         (range_lessthan): Remove.
13226         (ranges_contain): Change type.
13227         (~value): Update.
13228         (struct value) <unavailable, optimized_out>: Now std::vector.
13229         (value_entirely_available)
13230         (value_entirely_covered_by_range_vector)
13231         (value_entirely_unavailable, value_entirely_optimized_out):
13232         Update.
13233         (insert_into_bit_range_vector): Change argument type.
13234         (find_first_range_overlap): Likewise.
13235         (struct ranges_and_idx, value_contents_bits_eq)
13236         (require_not_optimized_out, require_available): Update.
13237         (ranges_copy_adjusted): Change argument types.
13238         (value_optimized_out, value_copy, value_fetch_lazy): Update.
13239
13240 2018-04-06  Tom Tromey  <tom@tromey.com>
13241
13242         * value.c (~value): Update.
13243         (struct value) <parent>: Now a value_ref_ptr.
13244         (value_parent, set_value_parent, value_address, value_copy):
13245         Update.
13246
13247 2018-04-06  Tom Tromey  <tom@tromey.com>
13248
13249         * value.c (struct value): Add constructor, destructor, and member
13250         initializers.
13251         (allocate_value_lazy, value_decref): Update.
13252
13253 2018-04-06  Tom Tromey  <tom@tromey.com>
13254
13255         * value.c (struct value) <released, next>: Remove.
13256         (all_values): Now a std::vector.
13257         (allocate_value_lazy): Update.
13258         (value_next): Remove.
13259         (value_mark, value_free_to_mark, release_value)
13260         (value_release_to_mark): Update.
13261
13262 2018-04-06  Tom Tromey  <tom@tromey.com>
13263
13264         * value.h (fetch_subexp_value, value_release_to_mark): Update.
13265         (free_value_chain): Remove.
13266         * value.c (free_value_chain): Remove.
13267         (value_release_to_mark): Return a std::vector.
13268         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13269         std::vector.
13270         (check_condition): Update.
13271         * eval.c (fetch_subexp_value): Change "val_chain" to a
13272         std::vector.
13273         * breakpoint.c (update_watchpoint): Update.
13274         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13275
13276 2018-04-06  Tom Tromey  <tom@tromey.com>
13277
13278         * value.h (free_all_values): Remove.
13279         * value.c (free_all_values): Remove.
13280
13281 2018-04-06  Tom Tromey  <tom@tromey.com>
13282
13283         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13284         (value_history_chain, value_history_count): Remove.
13285         (value_history): New global.
13286         (record_latest_value, access_value_history, show_values)
13287         (preserve_values): Update.
13288
13289 2018-04-06  Tom Tromey  <tom@tromey.com>
13290
13291         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13292         * varobj.c (varobj_set_display_format, varobj_set_value)
13293         (install_default_visualizer, construct_visualizer)
13294         (install_new_value, ~varobj, varobj_get_value_type)
13295         (my_value_of_variable, varobj_editable_p): Update.
13296         * c-varobj.c (c_describe_child, c_value_of_variable)
13297         (cplus_number_of_children, cplus_describe_child): Update.
13298         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13299         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13300         (ada_value_of_variable, ada_value_is_changeable_p): Update.
13301
13302 2018-04-06  Tom Tromey  <tom@tromey.com>
13303
13304         * printcmd.c (last_examine_address): Change type to
13305         value_ref_ptr.
13306         (do_examine, x_command): Update.
13307
13308 2018-04-06  Tom Tromey  <tom@tromey.com>
13309
13310         * value.c (release_value): Update.
13311         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13312         (struct bpstats) <val>: Now a value_ref_ptr.
13313         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13314         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13315         (~watchpoint, print_it_watchpoint, watch_command_1)
13316         (invalidate_bp_value_on_memory_change): Update.
13317
13318 2018-04-06  Tom Tromey  <tom@tromey.com>
13319
13320         * varobj.c (varobj_clear_saved_item)
13321         (update_dynamic_varobj_children, install_new_value, ~varobj):
13322         Update.
13323         * value.h (value_incref): Move declaration earlier.
13324         (value_decref): Rename from value_free.
13325         (struct value_ref_policy): New.
13326         (value_ref_ptr): New typedef.
13327         (struct value_deleter): Remove.
13328         (gdb_value_up): Remove typedef.
13329         (release_value): Change return type.
13330         (release_value_or_incref): Remove.
13331         * value.c (set_value_parent): Update.
13332         (value_incref): Change return type.
13333         (value_decref): Rename from value_free.
13334         (value_free_to_mark, free_all_values, free_value_chain): Update.
13335         (release_value): Return value_ref_ptr.
13336         (release_value_or_incref): Remove.
13337         (record_latest_value, set_internalvar, clear_internalvar):
13338         Update.
13339         * stack.c (info_frame_command): Don't call value_free.
13340         * python/py-value.c (valpy_dealloc, valpy_new)
13341         (value_to_value_object): Update.
13342         * printcmd.c (do_examine): Update.
13343         * opencl-lang.c (lval_func_free_closure): Update.
13344         * mi/mi-main.c (register_changed_p): Don't call value_free.
13345         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13346         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13347         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13348         value_free.
13349         * guile/scm-value.c (vlscm_free_value_smob)
13350         (vlscm_scm_from_value): Update.
13351         * frame.c (frame_register_unwind, frame_unwind_register_signed)
13352         (frame_unwind_register_unsigned, get_frame_register_bytes)
13353         (put_frame_register_bytes): Don't call value_free.
13354         * findvar.c (address_from_register): Don't call value_free.
13355         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13356         * dwarf2loc.c (entry_data_value_free_closure)
13357         (value_of_dwarf_reg_entry, free_pieced_value_closure)
13358         (dwarf2_evaluate_loc_desc_full): Update.
13359         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13360         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13361         (~watchpoint, watch_command_1)
13362         (invalidate_bp_value_on_memory_change): Update.
13363         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13364
13365 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
13366
13367         PR gdb/23022
13368         * warning.m4: Add -Wno-error=deprecated-register.
13369         * configure: Re-generate.
13370
13371 2018-04-05  Tom Tromey  <tom@tromey.com>
13372
13373         * linespec.h: Remove include of "vec.h".
13374
13375 2018-04-05  Tom Tromey  <tom@tromey.com>
13376
13377         * linespec.c (typep): Remove typedef.
13378         (find_methods, find_superclass_methods): Take a std::vector.
13379         (find_method): Use std::vector.
13380
13381 2018-04-05  Tom Tromey  <tom@tromey.com>
13382
13383         * utils.c (compare_strings): Remove.
13384         * utils.h (compare_strings): Remove.
13385         * objc-lang.h (find_imps): Update.
13386         * objc-lang.c (find_methods): Take a std::vector.
13387         (uniquify_strings, find_imps): Likewise.
13388         * linespec.c (find_methods): Take a std::vector.
13389         (decode_objc): Use std::vector.
13390         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13391         a std::vector.
13392         (find_method, find_function_symbols): Use std::vector.
13393
13394 2018-04-05  Tom Tromey  <tom@tromey.com>
13395
13396         * completer.c (completion_tracker::completion_tracker): Remove
13397         cast.
13398         (completion_tracker::discard_completions): Likewise.
13399         * breakpoint.c (ambiguous_names_p): Remove cast.
13400         * ada-lang.c (_initialize_ada_language): Remove cast.
13401         * utils.h (streq): Update.
13402         (streq_hash): Add new declaration.
13403         * utils.c (streq): Return bool.
13404         (streq_hash): New function.
13405
13406 2018-04-05  Tom Tromey  <tom@tromey.com>
13407
13408         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13409         Remove a string copy.
13410
13411 2018-04-05  Tom Tromey  <tom@tromey.com>
13412
13413         * linespec.c (filter_results): Use std::vector.
13414         (decode_line_2, decode_line_full): Update.
13415
13416 2018-04-05  Tom Tromey  <tom@tromey.com>
13417
13418         * linespec.c (canonical_to_fullform): Return std::string.
13419         (filter_results): Update.
13420         (struct decode_line_2_item): Add constructor.
13421         <fullform, displayform>: Now std::string.
13422         (decode_line_2_compare_items): Now a std::sort comparator.
13423         (decode_line_2): Update.
13424
13425 2018-04-05  Tom Tromey  <tom@tromey.com>
13426
13427         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13428         (unexpected_linespec_error): Update.
13429         (linespec_parse_basic, parse_linespec): Update.
13430
13431 2018-04-05  Tom Tromey  <tom@tromey.com>
13432
13433         * linespec.c (linespec_parse_basic): Reindent.
13434
13435 2018-04-05  Tom Tromey  <tom@tromey.com>
13436
13437         * minsyms.h (iterate_over_minimal_symbols): Update.
13438         * minsyms.c (iterate_over_minimal_symbols): Take a
13439         gdb::function_view.
13440         * linespec.c (struct collect_minsyms): Remove.
13441         (compare_msyms): Now a std::sort comparator.
13442         (add_minsym): Add parameters.
13443         (search_minsyms_for_name): Update.  Use std::vector.
13444
13445 2018-04-03  Tom Tromey  <tom@tromey.com>
13446
13447         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13448         gdb::byte_vector.
13449
13450 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13451
13452         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13453
13454 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13455
13456         PR gdb/16959
13457         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13458         printing static type.
13459
13460 2018-04-01  Tom Tromey  <tom@tromey.com>
13461
13462         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13463         (rs6000_xfer_shared_libraries): Update.
13464
13465 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13466
13467         * common/gdb_vecs.h (char_ptr): Remove.
13468         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13469
13470 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13471
13472         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13473         with std::vector.
13474         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13475
13476 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13477
13478         * tracepoint.h (struct uploaded_tp): Initialize fields.
13479         <actions, step_actions, cmd_strings>: Change type to
13480         std::vector<char *>.
13481         * tracepoint.c (get_uploaded_tp): Allocate with new.
13482         (free_uploaded_tps): Free with delete.
13483         (parse_tracepoint_definition): Adjust to std::vector change.
13484         * breakpoint.c (read_uploaded_action): Likewise.
13485         (create_tracepoint_from_upload): Likewise.
13486         * ctf.c (ctf_write_uploaded_tp): Likewise.
13487         (SET_ARRAY_FIELD): Likewise.
13488         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13489
13490 2018-03-30  Tom Tromey  <tom@tromey.com>
13491
13492         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13493         std::unique_ptr.
13494         (svr4_keep_data_in_core): Update.
13495         (svr4_read_so_list): Update.
13496
13497 2018-03-30  Tom Tromey  <tom@tromey.com>
13498
13499         * windows-nat.c (handle_output_debug_string, handle_exception):
13500         Update.
13501         * target.h (target_read_string): Update.
13502         * target.c (target_read_string): Change "string" to
13503         unique_xmalloc_ptr.
13504         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13505         Update.
13506         * solib-frv.c (frv_current_sos): Update.
13507         * solib-dsbt.c (dsbt_current_sos): Update.
13508         * solib-darwin.c (darwin_current_sos): Update.
13509         * linux-thread-db.c (inferior_has_bug): Update.
13510         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13511         Update.  Remove alloca.
13512         * ada-lang.c (ada_main_name): Update.
13513
13514 2018-03-30  Tom Tromey  <tom@tromey.com>
13515
13516         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13517         (struct dwo_file_deleter): New.
13518         (dwo_file_up): New typedef.
13519         (open_and_init_dwo_file): Use dwo_file_up.
13520         (free_dwo_file_cleanup): Remove.
13521
13522 2018-03-30  Tom Tromey  <tom@tromey.com>
13523
13524         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13525         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13526
13527 2018-03-30  Tom Tromey  <tom@tromey.com>
13528
13529         * dwarf2read.c (class free_cached_comp_units): New class.
13530         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13531         (free_cached_comp_units): Remove function.
13532
13533 2018-03-30  Tom Tromey  <tom@tromey.com>
13534
13535         * utils.h (make_cleanup_unpush_target): Remove.
13536         * inf-ptrace.c (struct target_unpusher): New.
13537         (target_unpush_up) New typedef.
13538         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13539         target_unpush_up.
13540         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13541
13542 2018-03-27  Tom Tromey  <tom@tromey.com>
13543
13544         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13545
13546 2018-03-27  Pedro Alves  <palves@redhat.com>
13547             Tom Tromey  <tom@tromey.com>
13548
13549         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13550         destructor.  Now a class.
13551         (gdb_readline_wrapper_cleanup): Remove function.
13552         (gdb_readline_wrapper): Remove cleanups.
13553
13554 2018-03-27  Tom Tromey  <tom@tromey.com>
13555
13556         * typeprint.h (struct type_print_options) <local_typedefs,
13557         global_typedefs>: Remove "struct" keyword.
13558         (class typedef_hash_table): New class.
13559         (recursively_update_typedef_hash, add_template_parameters)
13560         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13561         (find_typedef_in_hash): Don't declare.
13562         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13563         (typedef_hash_table::recursively_update): Rename from
13564         recursively_update_typedef_hash.  Now a member.
13565         (typedef_hash_table::add_template_parameters): Rename from
13566         add_template_parameters.  Now a member.
13567         (typedef_hash_table::typedef_hash_table): Now a constructor;
13568         rename from create_typedef_hash.
13569         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13570         rename from free_typedef_hash.
13571         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13572         (do_free_global_table): Remove.
13573         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13574         from copy_type_recursive.
13575         (create_global_typedef_table): Remove.
13576         (typedef_hash_table::find_global_typedef): Now a member of
13577         typedef_hash_table.
13578         (typedef_hash_table::find_typedef): Rename from
13579         find_typedef_in_hash; now a member.
13580         (whatis_exp): Update.
13581         * extension.h (struct ext_lang_type_printers): Add constructor and
13582         destructor.
13583         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13584         declare.
13585         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13586         Now a constructor; rename from start_ext_lang_type_printers.
13587         (ext_lang_type_printers): Now a destructor; rename from
13588         free_ext_lang_type_printers.
13589         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13590         Update.
13591         (c_type_print_base_struct_union): Update.  Remove cleanups.
13592
13593 2018-03-27  Tom Tromey  <tom@tromey.com>
13594
13595         * dwarf-index-write.c: Include <cmath>.
13596
13597 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13598
13599         * NEWS: Add entry describing new "set|show varsize-limit" command.
13600         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13601         command.
13602         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13603         "set variable".
13604
13605 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13606
13607         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13608         dwarf-index-write.c
13609         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13610         * dwarf-index-common.c: New file.
13611         * dwarf-index-common.h: New file.
13612         * dwarf-index-write.c: New file.
13613         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13614         (struct dwarf2_section_info): Move from here.
13615         (dwarf2_section_info_def): Likewise.
13616         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13617         (offset_type): Likewise.
13618         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13619         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13620         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13621         (byte_swap): Likewise.
13622         (MAYBE_SWAP): Likewise.
13623         (dwarf2_per_cu_ptr): Likewise.
13624         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13625         (struct tu_stats): Likewise.
13626         (struct dwarf2_per_objfile): Likewise.
13627         (struct dwarf2_per_cu_data): Likewise.
13628         (struct signatured_type): Likewise.
13629         (sig_type_ptr): Likewise.
13630         (DEF_VEC_P (sig_type_ptr)): Likewise.
13631         (INDEX4_SUFFIX): Likewise.
13632         (INDEX5_SUFFIX): Likewise.
13633         (DEBUG_STR_SUFFIX): Likewise.
13634         (dwarf2_read_section): Make non-static.
13635         (mapped_index_string_hash): Move from here.
13636         (dwarf5_djb_hash): Likewise.
13637         (file_write): Likewise.
13638         (class data_buf): Likewise.
13639         (struct symtab_index_entry): Likewise.
13640         (struct mapped_symtab): Likewise.
13641         (find_slot): Likewise.
13642         (hash_expand): Likewise.
13643         (add_index_entry): Likewise.
13644         (uniquify_cu_indices): Likewise.
13645         (class c_str_view): Likewise.
13646         (class c_str_view_hasher): Likewise.
13647         (class vector_hasher): Likewise.
13648         (write_hash_table): Likewise.
13649         (psym_index_map): Likewise.
13650         (struct addrmap_index_data): Likewise.
13651         (add_address_entry): Likewise.
13652         (add_address_entry_worker): Likewise.
13653         (write_address_map): Likewise.
13654         (symbol_kind): Likewise.
13655         (write_psymbols): Likewise.
13656         (struct signatured_type_index_data): Likewise.
13657         (write_one_signatured_type): Likewise.
13658         (recursively_count_psymbols): Likewise.
13659         (recursively_write_psymbols): Likewise.
13660         (class debug_names): Likewise.
13661         (check_dwarf64_offsets): Likewise.
13662         (psyms_seen_size): Likewise.
13663         (write_gdbindex): Likewise.
13664         (write_debug_names): Likewise.
13665         (assert_file_size): Likewise.
13666         (write_psymtabs_to_index): Likewise.
13667         (save_gdb_index_command): Likewise.
13668         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13669         command.
13670         * dwarf2read.h: New file.
13671
13672 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13673
13674         PR gdb/22670
13675         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13676         symbol name if the CU's language stores symbol names in linkage
13677         format.
13678         * language.h (struct language_defn)
13679         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13680         all instances of this struct.
13681
13682 2018-03-26  Tom Tromey  <tom@tromey.com>
13683
13684         * stack.c (backtrace_command_1): Remove verbose code.
13685
13686 2018-03-26  Tom Tromey  <tom@tromey.com>
13687
13688         * python/py-framefilter.c (py_print_type): Don't catch
13689         exceptions.  Return void.
13690         (py_print_value): Likewise.
13691         (py_print_single_arg): Likewise.
13692         (enumerate_args): Don't catch exceptions.
13693         (py_print_args): Likewise.
13694         (py_print_frame): Likewise.
13695         (gdbpy_apply_frame_filter): Catch exceptions here.
13696
13697 2018-03-26  Tom Tromey  <tom@tromey.com>
13698
13699         * stack.c (_initialize_stack): Remove trailing newlines from help
13700         text.  Add "Usage" line to "backtrace" help.
13701
13702 2018-03-26  Tom Tromey  <tom@tromey.com>
13703
13704         PR python/16486:
13705         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13706
13707 2018-03-26  Tom Tromey  <tom@tromey.com>
13708
13709         * python/py-framefilter.c (py_print_single_arg): Return
13710         EXT_LANG_BT_ERROR from catch.
13711
13712 2018-03-26  Tom Tromey  <tom@tromey.com>
13713
13714         PR backtrace/15584:
13715         * stack.c (backtrace_command_1): Move some code into no-filters
13716         "if".
13717
13718 2018-03-26  Tom Tromey  <tom@tromey.com>
13719
13720         * python/py-framefilter.c (throw_quit_or_print_exception): New
13721         function.
13722         (gdbpy_apply_frame_filter): Use it.
13723
13724 2018-03-26  Tom Tromey  <tom@tromey.com>
13725
13726         PR cli/17716:
13727         * python/py-framefilter.c (py_print_type, py_print_value)
13728         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13729         RETURN_MASK_ERROR.
13730
13731 2018-03-26  Tom Tromey  <tom@tromey.com>
13732
13733         * python/py-framefilter.c (enumerate_args): Use
13734         gdb::unique_xmalloc_ptr.
13735
13736 2018-03-26  Tom Tromey  <tom@tromey.com>
13737
13738         * python/py-framefilter.c (py_print_frame): Return
13739         EXT_LANG_BT_OK.
13740         (gdbpy_apply_frame_filter): Update comment.
13741         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13742         Remove.
13743         <EXT_LANG_BT_NO_FILTERS>: Change value.
13744
13745 2018-03-26  Tom Tromey  <tom@tromey.com>
13746
13747         PR backtrace/15582:
13748         * stack.c (backtrace_command): Parse "hide" argument.
13749         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13750         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13751         constant.
13752
13753 2018-03-26  Tom Tromey  <tom@tromey.com>
13754
13755         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13756         add "flags".
13757         (backtrace_command): Remove "fulltrace", add "flags".
13758
13759 2018-03-26  Tom Tromey  <tom@tromey.com>
13760
13761         * stack.c (backtrace_command): Rewrite command line parsing.
13762
13763 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13764
13765         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13766
13767 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13768
13769         * filename-seen-cache.h: Add include guard.
13770
13771 2018-03-26  Keith Seitz  <keiths@redhat.com>
13772
13773         * symfile.c (place_section): Remove "struct" from section_addr_info
13774         in comment.
13775         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13776         "struct" keyword from section_addr_info.
13777
13778 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13779
13780         * regformats/regdef.h (reg): Add constructors.
13781
13782 2018-03-25  Pedro Alves  <palves@redhat.com>
13783
13784         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13785         if then/else bodies in var_func_name extraction.
13786
13787 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13788
13789         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13790         lookup_minimal_symbol() to find symbol entry.
13791         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13792
13793 2018-03-23  Keith Seitz  <keiths@redhat.com>
13794
13795         PR c++/22968
13796         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13797         nested type definitions for C++, too.
13798
13799 2018-03-23  Tom Tromey  <tom@tromey.com>
13800
13801         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13802         a typedef.
13803         (macho_register_oso): Remove.
13804         (macho_symtab_read): Take a std::vector.
13805         (oso_el_compare_name): Now a std::sort comparator.
13806         (macho_symfile_read_all_oso): Take a std::vector.
13807         (macho_symfile_read): Use std::vector.  Remove cleanups.
13808
13809 2018-03-22  Tom Tromey  <tom@tromey.com>
13810
13811         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13812         (record_full_goto_bookmark): Use std::string.
13813
13814 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13815
13816         PR tdep/18295
13817         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13818         a single mask.
13819
13820 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13821
13822         * rs6000-tdep.c (store_insn_p): New function.
13823         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13824         and cr_reg to their unshifted values. Use store_insn_p to
13825         match LR saves using either R1 or fdata->alloca_reg. Use
13826         store_insn_p to match CR saves. Set alloca_reg_offset
13827         when alloca_reg and framep are set. Remove lr_reg shift
13828         when assigning to fdata->lr_register.
13829
13830 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13831
13832         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13833         command line args instead of emitting a warning.
13834
13835 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13836
13837         * tracepoint.h (struct static_tracepoint_marker): Initialize
13838         fields, define default constructor, move constructor and move
13839         assignment, disable the rest.
13840         <str_id, extra>: Make std::string.
13841         (release_static_tracepoint_marker): Remove.
13842         (free_current_marker): Remove.
13843         * tracepoint.c (free_current_marker): Remove.
13844         (parse_static_tracepoint_marker_definition): Adjust to
13845         std::string, use new hex2str overload.
13846         (release_static_tracepoint_marker): Remove.
13847         (print_one_static_tracepoint_marker): Get marker by reference
13848         and adjust to std::string.
13849         (info_static_tracepoint_markers_command): Adjust to std::vector
13850         changes
13851         * target.h (static_tracepoint_marker_p): Remove typedef.
13852         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13853         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13854         bool.
13855         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13856         * target-debug.h
13857         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13858         (target_debug_print_std_vector_static_tracepoint_marker): New.
13859         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13860         to...
13861         (target_debug_print_static_tracepoint_marker_p): ... this.
13862         * target-delegates.c: Re-generate.
13863         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13864         Make std::string.
13865         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13866         (decode_static_tracepoint_spec): Adjust to std::vector.
13867         (tracepoint_print_one_detail): Adjust to std::string.
13868         (strace_marker_decode_location): Adjust to std::string.
13869         (update_static_tracepoint): Adjust to std::string, remove call
13870         to release_static_tracepoint_marker.
13871         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13872         Adjust to std::vector.
13873         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13874         (remote_static_tracepoint_markers_by_strid): Adjust to
13875         std::vector.
13876         * common/rsp-low.h (hex2str): New overload with explicit count
13877         of bytes.
13878         * common/rsp-low.c (hex2str): New overload with explicit count
13879         of bytes.
13880         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13881         (_initialize_rsp_low_selftests): Add test_hex2str test.
13882         * unittests/tracepoint-selftests.c
13883         (test_parse_static_tracepoint_marker_definition): Adjust to
13884         std::string.
13885
13886 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13887
13888         * tracepoint.c (parse_static_tracepoint_marker_definition):
13889         Consider case where the definition is followed by more
13890         definitions.
13891         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13892         tracepoint-selftests.c.
13893         * unittests/tracepoint-selftests.c: New.
13894
13895 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13896
13897         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13898         Carvalho.
13899
13900 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13901
13902         * symtab.c (find_pc_sect_line): fixed indentation.
13903
13904 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13905
13906         * symtab.c (find_pc_sect_line): now uses binary search.
13907
13908 2018-03-19  Tom Tromey  <tom@tromey.com>
13909
13910         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13911         "IDENT" production.
13912
13913 2018-03-19  Pedro Alves  <palves@redhat.com>
13914             Tom Tromey  <tom@tromey.com>
13915
13916         * unittests/observable-selftests.c: New file.
13917         * common/observable.h: New file.
13918         * observable.h: New file.
13919         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13920         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13921         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13922         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13923         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13924         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13925         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13926         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13927         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13928         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13929         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13930         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13931         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13932         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13933         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13934         tui/tui-interp.c, valops.c: Update all users.
13935         * tui/tui-hooks.c (tui_bp_created_observer)
13936         (tui_bp_deleted_observer, tui_bp_modified_observer)
13937         (tui_inferior_exit_observer, tui_before_prompt_observer)
13938         (tui_normal_stop_observer, tui_register_changed_observer):
13939         Remove.
13940         (tui_observers_token): New global.
13941         (attach_or_detach, tui_attach_detach_observers): New functions.
13942         (tui_install_hooks, tui_remove_hooks): Use
13943         tui_attach_detach_observers.
13944         * record-btrace.c (record_btrace_thread_observer): Remove.
13945         (record_btrace_thread_observer_token): New global.
13946         * observer.sh: Remove.
13947         * observer.c: Rename to observable.c.
13948         * observable.c (namespace gdb_observers): Define new objects.
13949         (observer_debug): Move into gdb_observers namespace.
13950         (struct observer, struct observer_list, xalloc_observer_list_node)
13951         (xfree_observer_list_node, generic_observer_attach)
13952         (generic_observer_detach, generic_observer_notify): Remove.
13953         (_initialize_observer): Update.
13954         Don't include observer.inc.
13955         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13956         (clean mostlyclean): Likewise.
13957         (observer.h, observer.inc): Remove targets.
13958         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13959         (COMMON_SFILES): Use observable.c, not observer.c.
13960         * .gitignore: Remove observer.h.
13961
13962 2018-03-18  Tom Tromey  <tom@tromey.com>
13963
13964         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13965         gdb::def_vector.
13966         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13967
13968 2018-03-17  Tom Tromey  <tom@tromey.com>
13969
13970         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13971
13972 2018-03-17  Tom Tromey  <tom@tromey.com>
13973
13974         * target.c (class scoped_target_fd): New.
13975         (target_fileio_close_cleanup): Remove.
13976         (target_fileio_read_alloc_1): Use scoped_target_fd.
13977
13978 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13979
13980         * silent-rules.mk: New.
13981         * Makefile.in: Include silent-rules.mk
13982         (srcdir, VPATH, top_srcdir): Move up.
13983         (COMPILE): Add ECHO_CXX.
13984         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13985         (init.c): Add ECHO_INIT_C.
13986         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13987         (version.c): Add ECHO_GEN.
13988         (printcmd.o): Add ECHO_CXX.
13989         (target-float.o): Add ECHO_CXX.
13990         (ada-exp.o): Add ECHO_CXX.
13991         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13992         (insight$(EXEEXT)): Add ECHO_CXXLD.
13993         * gnulib/configure.ac: Add AM_SILENT_RULES.
13994         * gnulib/aclocal.m4: Re-generate.
13995         * gnulib/configure: Re-generate.
13996         * gnulib/import/Makefile.in: Re-generate.
13997
13998 2018-03-16  Tom Tromey  <tom@tromey.com>
13999
14000         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
14001         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
14002         * utils.c (do_free_section_addr_info)
14003         (make_cleanup_free_section_addr_info): Remove.
14004         * symfile.h (struct other_sections): Add constructor.
14005         (struct section_addr_info): Remove.
14006         (section_addr_info): New typedef.
14007         (struct sym_fns) <sym_offsets>: Change type of parameter.
14008         (build_section_addr_info_from_objfile)
14009         (relative_addr_info_to_section_offsets, addr_info_make_relative)
14010         (default_symfile_offsets, symbol_file_add)
14011         (symbol_file_add_from_bfd)
14012         (build_section_addr_info_from_section_table): Update.
14013         (alloc_section_addr_info, free_section_addr_info): Don't declare.
14014         * symfile.c (alloc_section_addr_info): Remove.
14015         (build_section_addr_info_from_section_table): Change return type.
14016         Update.
14017         (build_section_addr_info_from_bfd)
14018         (build_section_addr_info_from_objfile): Likewise.
14019         (free_section_addr_info): Remove.
14020         (relative_addr_info_to_section_offsets): Change type of "addrs".
14021         (addrs_section_compar): Now a std::sort comparator.
14022         (addrs_section_sort): Change return type.
14023         (addr_info_make_relative): Change type of "addrs".  Update.
14024         (default_symfile_offsets, syms_from_objfile_1)
14025         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14026         (symbol_file_add_separate): Update.
14027         (symbol_file_add): Change type of "addrs".  Update.
14028         (add_symbol_file_command): Update.  Remove cleanups.
14029         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
14030         cleanups.
14031         * symfile-debug.c (debug_sym_offsets): Change type of "info".
14032         * solib.c (solib_read_symbols): Update.
14033         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
14034         * machoread.c (macho_symfile_offsets): Update.
14035         * jit.c (jit_bfd_try_read_symtab): Update.
14036
14037 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
14038
14039         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14040         unittests/utils-selftests.c.
14041         * unittests/utils-selftests.c: New file.
14042
14043 2018-03-14  Tom Tromey  <tom@tromey.com>
14044
14045         PR cli/14977:
14046         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14047         for NULL.
14048
14049 2018-03-14  Tom Tromey  <tom@tromey.com>
14050
14051         PR cli/19918:
14052         * printcmd.c (printf_pointer): Allow "-" in format.
14053
14054 2018-03-14  Tom Tromey  <tom@tromey.com>
14055
14056         * printcmd.c (_initialize_printcmd): Add usage to printf.
14057
14058 2018-03-14  Yao Qi  <qiyao@sourceware.org>
14059
14060         * MAINTAINERS: Update my email address.
14061
14062 2018-03-13  Tom Tromey  <tom@tromey.com>
14063
14064         * machoread.c (macho_check_dsym): Change filenamep to a
14065         std::string*.
14066         (macho_symfile_read): Update.
14067         * symfile.c (load_command): Use std::string.
14068
14069 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14070
14071         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14072         to error message string.
14073         (riscv_register_name): Use xsnprintf instead of sprintf.
14074         (riscv_insn::fetch_instruction): Use gdb_assert instead of
14075         internal_error.
14076         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14077         error.
14078         (riscv_push_dummy_call): Likewise.
14079
14080 2018-03-12  Tom Tromey  <tom@tromey.com>
14081
14082         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14083         Use gdb::byte_vector.
14084         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14085
14086 2018-03-12  Yao Qi  <yao.qi@linaro.org>
14087
14088         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14089         parameter type to readable_regcache.
14090         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14091         the declaration.
14092
14093 2018-03-11  Tom Tromey  <tom@tromey.com>
14094
14095         * dwarf2read.c (struct nextfield): Add initializers.
14096         (struct nextfnfield): Remove.
14097         (struct fnfieldlist): Add initializers.  Remove "length" and
14098         "head", use std::vector.
14099         (struct decl_field_list): Remove.
14100         (struct field_info): Add initializers.
14101         <fields, baseclasses>: Now std::vector.
14102         <nbaseclasses, nfnfields, typedef_field_list_count,
14103         nested_types_list_count>: Remove.
14104         (dwarf2_add_field, dwarf2_add_type_defn)
14105         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14106         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14107         (process_structure_scope): Update.
14108
14109 2018-03-11  Tom Tromey  <tom@tromey.com>
14110
14111         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14112         for use by std::sort.
14113         (build_type_psymtabs_1): Use std::vector.
14114
14115 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
14116
14117         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14118         and LIBMPFR in the printed configuration.
14119
14120 2018-03-08  Tom Tromey  <tom@tromey.com>
14121
14122         * source.c (get_filename_and_charpos): Use scoped_fd.
14123         * nto-procfs.c (procfs_open_1): Use scoped_fd.
14124         (procfs_pidlist): Likewise.
14125         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14126         (iterate_over_mappings): Likewise.
14127
14128 2018-03-08  Tom Tromey  <tom@tromey.com>
14129
14130         * infcall.c (struct call_return_meta_info)
14131         <stack_temporaries_enabled>: Remove.
14132         (get_call_return_value, call_function_by_hand_dummy): Update.
14133         * thread.c (disable_thread_stack_temporaries): Remove.
14134         (enable_thread_stack_temporaries): Remove.
14135         (thread_stack_temporaries_enabled_p): Return bool.
14136         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14137         (get_last_thread_stack_temporary): Update.
14138         * eval.c (evaluate_subexp): Update.
14139         * gdbthread.h (class enable_thread_stack_temporaries): Now a
14140         class, not a function.
14141         (value_ptr, value_vec): Remove typedefs.
14142         (class thread_info) <stack_temporaries_enabled>: Now bool.
14143         <stack_temporaries>: Now a std::vector.
14144         (thread_stack_temporaries_enabled_p)
14145         (value_in_thread_stack_temporaries): Return bool.
14146
14147 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
14148
14149         * remote.c (putpkt_binary): Fix omitted bytes reporting.
14150         (getpkt_or_notif_sane_1): Likewise.
14151
14152 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14153
14154         * build-id.c (build_id_to_debug_bfd): Use std::string.
14155
14156 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14157
14158         * build-id.c (find_separate_debug_file_by_buildid): Return
14159         std::string.
14160         * build-id.h (find_separate_debug_file_by_buildid): Return
14161         std::string.
14162         * coffread.c (coff_symfile_read): Adjust to std::string.
14163         * elfread.c (elf_symfile_read): Adjust to std::string.
14164         * symfile.c (separate_debug_file_exists): Change parameter to
14165         std::string.
14166         (find_separate_debug_file): Return std::string.
14167         (find_separate_debug_file_by_debuglink): Return std::string.
14168         * symfile.h (find_separate_debug_file_by_debuglink): Return
14169         std::string.
14170
14171 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14172
14173         * common/xml-utils.c (xml_escape_text): Move code to...
14174         (xml_escape_text_append): ... this new function.
14175         * common/xml-utils.h (xml_escape_text_append): New declaration.
14176         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14177         New function.
14178         (_initialize_xml_utils): register test_xml_escape_text_append as
14179         a selftest.
14180
14181 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
14182
14183         * defs.h: Remove MAX_REGISTER_SIZE.
14184         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14185         asserts.
14186         * python/py-unwind.c (pyuw_sniffer): Likewise.
14187
14188 2018-03-07  Tom Tromey  <tom@tromey.com>
14189
14190         * linux-tdep.c (linux_info_proc): Update.
14191         * target.h (struct target_ops) <to_fileio_readlink>: Return
14192         optional<string>.
14193         (target_fileio_readlink): Return optional<string>.
14194         * remote.c (remote_hostio_readlink): Return optional<string>.
14195         * inf-child.c (inf_child_fileio_readlink): Return
14196         optional<string>.
14197         * target.c (target_fileio_readlink): Return optional<string>.
14198
14199 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
14200
14201         * regcache.c (cooked_read_test): Add riscv to the list of
14202         architectures that have a save_reggroup.
14203
14204 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14205
14206         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14207         value is not a dynamic class object.
14208
14209 2018-03-06  Tom Tromey  <tom@tromey.com>
14210
14211         * rust-exp.y: Formatting fixes.
14212
14213 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14214
14215         * riscv-tdep.c (riscv_register_name): Remove target description
14216         support.
14217         (riscv_gdbarch_init): Remove target description check.
14218
14219 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14220
14221         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14222         comment.
14223         * riscv-tdep.h: Likewise.
14224
14225 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14226
14227         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14228         (riscv_pseudo_register_write): Delete.
14229         (riscv_gdbarch_init): Remove all use of pseudo registers.
14230
14231 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14232
14233         * record-btrace.c (btrace_print_lines): Replace cleanup
14234         parameter with RAII equivalents.
14235         (btrace_insn_history): Replace cleanup with RAII equivalents.
14236         * ui-out.h (make_cleanup_ui_out_list_begin_end,
14237         make_cleanup_ui_out_tuple_begin_end): Remove.
14238         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14239         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14240         make_cleanup_ui_out_list_begin_end): Remove.
14241
14242 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14243
14244         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14245         parameter types to std::vector.  Use bool.
14246         (record_btrace_wait): Replace VEC(tp_t) with
14247         std::vector<thread_info *>.
14248         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14249
14250 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14251
14252         * record-btrace.c (record_btrace_disable_callback): Remove.
14253         (struct scoped_btrace_disable): New.
14254         (record_btrace_open): Use scoped_btrace_disable.
14255
14256 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14257
14258         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14259         reading values from registers.
14260
14261 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14262
14263         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14264         where appropriate.
14265
14266 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14267
14268         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14269         change parameter type.  Use GDB's print functions, and use
14270         core_addr_to_string where appropriate.
14271         (riscv_push_dummy_call): Use core_addr_to_string where
14272         appropriate, update call to riscv_print_arg_location, and reindent
14273         a few lines.
14274         (riscv_return_value): Update call to riscv_print_arg_location.
14275
14276 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14277             Tim Newsome <tim@sifive.com>
14278             Albert Ou <a0u@eecs.berkeley.edu>
14279             Darius Rad <darius@bluespec.com>
14280
14281         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14282         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14283         (ALLDEPFILES): Add riscv-tdep.c
14284         * configure.tgt: Add riscv support.
14285         * riscv-tdep.c: New file.
14286         * riscv-tdep.h: New file.
14287         * NEWS: Mention new target.
14288         * MAINTAINERS: Add entry for riscv.
14289
14290 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14291
14292         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14293         fields within aggregates.
14294
14295 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
14296
14297         * record-btrace.c (btrace_print_lines): Change type of flags to
14298         gdb_disassembly_flags.
14299
14300 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14301
14302         * fbsd-nat.c: Include "inf-ptrace.h".
14303         (USE_SIGTRAP_SIGINFO): Conditionally define.
14304         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14305         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14306         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14307         function.
14308         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14309         Likewise.
14310         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14311         Likewise.
14312         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14313         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14314         "supports_stopped_by_hw_breakpoint" target methods.
14315
14316 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14317
14318         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14319         * fbsd-nat.c (debug_fbsd_nat): New variable.
14320         (show_fbsd_nat_debug): New function.
14321         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14322         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14323
14324 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14325
14326         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14327         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14328         prototype.
14329         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14330         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14331         method.
14332
14333 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14334
14335         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14336         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14337
14338 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14339
14340         * charset.c (struct charset_vector): New.
14341         (charsets): Change type to charset_vector.
14342         (find_charset_names): Adjust.
14343         (add_one): Adjust.
14344         (_initialize_charset): Adjust.
14345
14346 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14347
14348         * progspace.h (struct program_space) <deleted_solibs>: Change
14349         type to std::vector<std::string>.
14350         * progspace.c (clear_program_space_solib_cache): Adjust.
14351         * breakpoint.c (print_solib_event): Adjust.
14352         (check_status_catch_solib): Adjust.
14353         * solib.c (update_solib_list): Adjust.
14354         * ui-out.h (class ui_out) <field_string>: New overload.
14355         * ui-out.c (ui_out::field_string): New overload.
14356
14357 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14358
14359         * progspace.h (struct program_space): Add constructor and
14360         destructor, initialize fields.
14361         (add_program_space): Remove.
14362         * progspace.c (add_program_space): Rename to...
14363         (program_space::program_space): ... this.
14364         (release_program_space): Rename to...
14365         (program_space::~program_space): ... this.
14366         (delete_program_space): Use delete to delete program_space.
14367         (initialize_progspace): Use new to allocate program_space.
14368         * inferior.c (add_inferior_with_spaces): Likewise.
14369         (clone_inferior_command): Likewise.
14370         * infrun.c (follow_fork_inferior): Likewise.
14371         (handle_vfork_child_exec_or_exit): Likewise.
14372
14373 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14374
14375         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14376         (delim_string_to_char_ptr_vec): Return std::vector of
14377         gdb::unique_xmalloc_ptr.
14378         (dirnames_to_char_ptr_vec_append): Take std::vector of
14379         gdb::unique_xmalloc_ptr.
14380         (dirnames_to_char_ptr_vec): Return std::vector of
14381         gdb::unique_xmalloc_ptr.
14382         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14383         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14384         (delim_string_to_char_ptr_vec): Return an std::vector of
14385         gdb::unique_xmalloc_ptr, adjust the code.
14386         (dirnames_to_char_ptr_vec_append): Take an std::vector of
14387         gdb::unique_xmalloc_ptr, adjust the code.
14388         (dirnames_to_char_ptr_vec): Return an std::vector of
14389         gdb::unique_xmalloc_ptr, adjust the code.
14390         * auto-load.c (auto_load_safe_path_vec): Change type to
14391         std::vector of gdb::unique_xmalloc_ptr.
14392         (auto_load_expand_dir_vars): Return an std::vector of
14393         gdb::unique_xmalloc_ptr, adjust the code.
14394         (auto_load_safe_path_vec_update): Adjust.
14395         (filename_is_in_auto_load_safe_path_vec): Adjust.
14396         (auto_load_objfile_script_1): Adjust.
14397         * build-id.c (build_id_to_debug_bfd): Adjust.
14398         * linux-thread-db.c (thread_db_load_search): Adjust.
14399         * source.c (add_path): Adjust.
14400         (openp): Adjust.
14401         * symfile.c (find_separate_debug_file): Adjust.
14402         * utils.c (do_free_char_ptr_vec): Remove.
14403         (make_cleanup_free_char_ptr_vec): Remove.
14404
14405 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14406
14407         PR gdb/22907
14408         * common/pathstuff.c: Conditionally include "<windows.h>".
14409
14410 2018-03-01  Georg Sauthoff  <mail@georg.so>
14411
14412         PR gdb/22888
14413         * gcore.in: Quote variables and switch interpreter to bash.
14414
14415 2018-03-01  Tom Tromey  <tom@tromey.com>
14416
14417         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14418         assertion.  Add assertion for discriminant_index.
14419         (quirk_rust_enum): Use correct base type name in univariant case.
14420
14421 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14422
14423         * record.c (get_call_history_modifiers): Return a
14424         record_print_flags.
14425         (cmd_record_call_history): Adjust.
14426         * record-btrace.c (record_btrace_call_history): Adjust.
14427         (record_btrace_call_history_range): Adjust.
14428         (record_btrace_call_history_from): Adjust.
14429         * target-debug.h (target_debug_print_record_print_flags): New.
14430         * target-delegates.c: Re-generate.
14431         * target.c (target_call_history): Change flags type.
14432         (target_call_history_from): Likewise.
14433         (target_call_history_range): Likewise.
14434         * target.h (struct target_ops) <target_call_history>: Likewise.
14435         (target_call_history_from): Likewise.
14436         (target_call_history_range): Likewise.
14437
14438 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14439             Simon Marchi  <simon.marchi@polymtl.ca>
14440
14441         * common/common-utils.c: Include "sys/stat.h".
14442         (is_regular_file): Move here from "source.c"; change return
14443         type to "bool".
14444         * common/common-utils.h (is_regular_file): New prototype.
14445         * common/pathstuff.c (contains_dir_separator): New function.
14446         * common/pathstuff.h (contains_dir_separator): New prototype.
14447         * source.c: Don't include "sys/stat.h".
14448         (is_regular_file): Move to "common/common-utils.c".
14449
14450 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14451
14452         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14453         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14454         * auto-load.c: Include "common/pathstuff.h".
14455         * common/common-def.h (current_directory): Move here.
14456         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14457         function.
14458         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14459         prototype.
14460         * common/pathstuff.c: New file.
14461         * common/pathstuff.h: New file.
14462         * compile/compile.c: Include "common/pathstuff.h".
14463         * defs.h (current_directory): Move to "common/common-defs.h".
14464         * dwarf2read.c: Include "common/pathstuff.h".
14465         * exec.c: Likewise.
14466         * guile/scm-safe-call.c: Likewise.
14467         * linux-thread-db.c: Likewise.
14468         * main.c: Likewise.
14469         * nto-tdep.c: Likewise.
14470         * objfiles.c: Likewise.
14471         * source.c: Likewise.
14472         * symtab.c: Likewise.
14473         * utils.c: Include "common/pathstuff.h".
14474         (gdb_realpath): Move to "common/pathstuff.c".
14475         (gdb_realpath_keepfile): Likewise.
14476         (gdb_abspath): Likewise.
14477         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14478         (gdb_realpath_keepfile): Likewise.
14479         (gdb_abspath): Likewise.
14480
14481 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14482
14483         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14484         wildcard process pid for super_resume for kernels with a
14485         specific bug.
14486
14487 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14488
14489         * compile/compile.c (get_args): Add additional comments
14490         explaining function.
14491
14492 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14493             Tom Tromey  <tom@tromey.com>
14494
14495         * target.h (memory_write_request_s): Remove typedef.  Don't define
14496         VEC.
14497         (target_write_memory_blocks): Change argument to std::vector.
14498         (struct memory_write_request): Add constructor.
14499         * target-memory.c (compare_block_starting_address): Return bool.
14500         Change argument types.
14501         (claim_memory): Change arguments to use std::vector.
14502         (split_regular_and_flash_blocks, blocks_to_erase)
14503         (compute_garbled_blocks): Likewise.
14504         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14505         (target_write_memory_blocks): Change argument to std::vector.
14506         * symfile.c (struct load_section_data): Add constructor and
14507         destructor.  Use std::vector for "requests".
14508         (struct load_progress_data): Add initializers.
14509         (load_section_callback): Update.  Use "new".
14510         (clear_memory_write_data): Remove.
14511         (generic_load): Update.
14512
14513 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14514
14515         * arch/aarch64.h: Use common/tdesc.h.
14516
14517 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14518
14519         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14520         architecture with a 64-bit ABI.
14521
14522 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14523
14524         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14525         ahead of target description loading.
14526
14527 2018-02-26  Tom Tromey  <tom@tromey.com>
14528
14529         * stack.c (backtrace_command_1): Update.
14530         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14531         of "flags".
14532         * python/py-framefilter.c (py_print_frame)
14533         (gdbpy_apply_frame_filter): Change type of "flags".
14534         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14535         of "flags".
14536         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14537         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14538         * extension.h (enum frame_filter_flag): Rename from
14539         frame_filter_flags.
14540         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14541         (apply_ext_lang_frame_filter): Change type of "flags".
14542         * extension.c (apply_ext_lang_frame_filter): Change type of
14543         "flags".
14544         * extension-priv.h (struct extension_language_ops)
14545         <apply_frame_filter>: Change type of "flags".
14546
14547 2018-02-26  Tom Tromey  <tom@tromey.com>
14548
14549         PR python/16497:
14550         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14551         off-by-one in py_end computation.
14552         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14553         PRINT_MORE_FRAMES.
14554         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14555         constant.
14556
14557 2018-02-26  Tom Tromey  <tom@tromey.com>
14558
14559         * dwarf2read.c (struct variant_field): New.
14560         (struct nextfield) <variant>: New field.
14561         (dwarf2_add_field): Handle DW_TAG_variant_part.
14562         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14563         discriminated union.
14564         (read_structure_type): Handle DW_TAG_variant_part.
14565         (handle_struct_member_die): New function, extracted from
14566         process_structure_scope.  Handle DW_TAG_variant.
14567         (process_structure_scope): Handle discriminated unions.  Call
14568         handle_struct_member_die.
14569
14570 2018-02-26  Tom Tromey  <tom@tromey.com>
14571
14572         * rust-lang.h (rust_last_path_segment): Declare.
14573         * rust-lang.c (rust_last_path_segment): Now public.  Change
14574         contract.
14575         (struct disr_info): Remove.
14576         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14577         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14578         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14579         (rust_enum_p, rust_enum_variant): New function.
14580         (rust_underscore_fields): Remove "offset" parameter.
14581         (rust_print_enum): New function.
14582         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14583         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14584         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14585         enums.
14586         (rust_internal_print_type): New function, from rust_print_type.
14587         Remove enum code.
14588         (rust_print_type): Call rust_internal_print_type.
14589         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14590         Update enum handling.
14591         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14592         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14593         (rust_union_quirks): New functions.
14594         (process_full_comp_unit, process_full_type_unit): Call
14595         rust_union_quirks.
14596         (process_structure_scope): Update rust_unions if necessary.
14597
14598 2018-02-26  Tom Tromey  <tom@tromey.com>
14599
14600         * value.h (value_union_variant): Declare.
14601         * valops.c (value_union_variant): New function.
14602         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14603         (struct discriminant_info): New.
14604         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14605         enumerator.
14606         (struct main_type) <flag_discriminated_union>: New field.
14607
14608 2018-02-26  Tom Tromey  <tom@tromey.com>
14609
14610         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14611         unittests/unpack-selftests.c.
14612         * unittests/unpack-selftests.c: New file.
14613         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14614
14615 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14616
14617         * dwarf2read.c (struct partial_die_info) <read>: New method.
14618         (read_partial_die): Remove the declaration.
14619         (load_partial_dies): Update.
14620         (partial_die_info::partial_die_info):
14621         (read_partial_die): Change it to partial_die_info::read.
14622
14623 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14624
14625         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14626         (fixup_partial_die): Remove declaration.
14627         (scan_partial_symbols): Update.
14628         (partial_die_parent_scope): Likewise.
14629         (partial_die_full_name): Likewise.
14630         (fixup_partial_die): Change it to partial_die_info::fixup.
14631
14632 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14633
14634         * dwarf2read.c (read_partial_die): Update the declaration.
14635         (load_partial_dies): Caller update.
14636         (read_partial_die): Remove one argument abbrev_len.
14637
14638 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14639
14640         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14641         assignment operator.
14642         (load_partial_dies): Use ctor and copy ctor.
14643         (read_partial_die): Update.
14644         (dwarf2_cu::find_partial_die): Use ctor.
14645
14646 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14647
14648         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14649         (find_partial_die_in_comp_unit): Change it to
14650         dwarf2_cu::find_partial_die.
14651         (find_partial_die): Update.
14652
14653 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14654
14655         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14656         is NULL.
14657
14658 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14659
14660         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14661
14662 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14663
14664         * arch/amd64.h: Use common/tdesc.h.
14665         * arch/i386.c: Likewise.
14666         * arch/i386.h: Likewise.
14667         * arch/tic6x.c: Likewise.
14668         * arch/tdesc.h: Move file from here...
14669         * common/tdesc.h: ...to here.
14670         * features/aarch64-core.c: Regenerate.
14671         * features/aarch64-fpu.c: Regenerate.
14672         * features/i386/32bit-avx.c: Regenerate.
14673         * features/i386/32bit-avx512.c: Regenerate.
14674         * features/i386/32bit-core.c: Regenerate.
14675         * features/i386/32bit-linux.c: Regenerate.
14676         * features/i386/32bit-mpx.c: Regenerate.
14677         * features/i386/32bit-pkeys.c: Regenerate.
14678         * features/i386/32bit-sse.c: Regenerate.
14679         * features/i386/64bit-avx.c: Regenerate.
14680         * features/i386/64bit-avx512.c: Regenerate.
14681         * features/i386/64bit-core.c: Regenerate.
14682         * features/i386/64bit-linux.c: Regenerate.
14683         * features/i386/64bit-mpx.c: Regenerate.
14684         * features/i386/64bit-pkeys.c: Regenerate.
14685         * features/i386/64bit-segments.c: Regenerate.
14686         * features/i386/64bit-sse.c: Regenerate.
14687         * features/i386/x32-core.c: Regenerate.
14688         * features/tic6x-c6xp.c: Regenerate.
14689         * features/tic6x-core.c: Regenerate.
14690         * features/tic6x-gp.c: Regenerate.
14691         * target-descriptions.c: Use common/tdesc.h.
14692         * target-descriptions.h: Likewise.
14693
14694 2018-02-24  Tom Tromey  <tom@tromey.com>
14695
14696         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14697         (try_thread_db_load_from_dir, thread_db_load_search): Use
14698         std::string.
14699         (info_auto_load_libthread_db_compare): Return bool.  Change
14700         argument types.
14701         (info_auto_load_libthread_db): Use std::vector, std::string.
14702         Remove cleanups.
14703
14704 2018-02-24  Tom Tromey  <tom@tromey.com>
14705
14706         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14707         std::string.
14708         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14709         std::string*.
14710         * gdbarch.c: Rebuild.
14711         * gdbarch.h: Rebuild.
14712         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14713         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14714         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14715         std::string*.
14716
14717 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14718
14719         * gdbtypes.h (sect_offset): Change type to uint64_t.
14720         (sect_offset_str): New function.
14721         * dwarf2read.c (create_addrmap_from_aranges): Use
14722         sect_offset_str.
14723         (error_check_comp_unit_head): Likewise.
14724         (create_debug_type_hash_table): Likewise.
14725         (read_cutu_die_from_dwo): Likewise.
14726         (init_cutu_and_read_dies): Likewise.
14727         (init_cutu_and_read_dies_no_follow): Likewise.
14728         (process_psymtab_comp_unit_reader): Likewise.
14729         (partial_die_parent_scope): Likewise.
14730         (peek_die_abbrev): Likewise.
14731         (process_queue): Likewise.
14732         (dwarf2_physname): Likewise.
14733         (read_namespace_alias): Likewise.
14734         (read_import_statement): Likewise.
14735         (create_dwo_cu_reader): Likewise.
14736         (create_cus_hash_table): Likewise.
14737         (lookup_dwo_cutu): Likewise.
14738         (inherit_abstract_dies): Likewise.
14739         (read_func_scope): Likewise.
14740         (read_call_site_scope): Likewise.
14741         (dwarf2_add_member_fn): Likewise.
14742         (read_common_block): Likewise.
14743         (read_module_type): Likewise.
14744         (read_typedef): Likewise.
14745         (read_subrange_type): Likewise.
14746         (load_partial_dies): Likewise.
14747         (read_partial_die): Likewise.
14748         (find_partial_die): Likewise.
14749         (read_str_index): Likewise.
14750         (dwarf2_string_attr): Likewise.
14751         (build_error_marker_type): Likewise.
14752         (lookup_die_type): Likewise.
14753         (dump_die_shallow): Likewise.
14754         (follow_die_ref): Likewise.
14755         (dwarf2_fetch_die_loc_sect_off): Likewise.
14756         (dwarf2_fetch_constant_bytes): Likewise.
14757         (follow_die_sig): Likewise.
14758         (get_signatured_type): Likewise.
14759         (get_DW_AT_signature_type): Likewise.
14760         (dwarf2_find_containing_comp_unit): Likewise.
14761         (set_die_type): Likewise.
14762
14763 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14764
14765         * arch/aarch64.c: Include "common-defs.h".
14766         * arch/amd64.c: Likewise.
14767         * arch/i386.c: Likewise.
14768
14769 2018-02-21  Tom Tromey  <tom@tromey.com>
14770
14771         * value.h: (extract_field_op): Update.
14772         * eval.c (extract_field_op): Return a const char *.
14773         * expression.h (parse_expression_for_completion): Update.
14774         * completer.c (complete_expression): Update.
14775         (add_struct_fields): Make fieldname const.
14776         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14777         (mark_completion_tag, parse_exp_in_context_1): Update.
14778         (parse_expression_for_completion): Change "name" to
14779         unique_xmalloc_ptr*.
14780
14781 2018-02-21  Tom Tromey  <tom@tromey.com>
14782
14783         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14784
14785 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14786
14787         * avr-tdep.c (avr_read_pc): Change parameter type to
14788         readable_regcache.
14789         * gdbarch.sh (read_pc): Likewise.
14790         * gdbarch.c: Re-generated.
14791         * gdbarch.h: Re-generated.
14792         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14793         readable_regcache.
14794         * ia64-tdep.c (ia64_read_pc): Likewise.
14795         * mips-tdep.c (mips_read_pc): Likewise.
14796         * spu-tdep.c (spu_read_pc): Likewise.
14797
14798 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14799
14800         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14801         * regcache-dump.c: New file.
14802         * regcache.c: Move register_dump to regcache-dump.c.
14803         (maintenance_print_registers): Likewise.
14804         (maintenance_print_raw_registers): Likewise.
14805         (maintenance_print_cooked_registers): Likewise.
14806         (maintenance_print_register_groups): Likewise.
14807         (maintenance_print_remote_registers): Likewise.
14808         (_initialize_regcache): Likewise.
14809         * regcache.h (register_dump): Moved from regcache.c.
14810
14811 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14812
14813         * regcache.c (regcache::regcache): Update.
14814         (regcache::invalidate): Move it to detached_regcache::invalidate.
14815         (get_thread_arch_aspace_regcache): Update.
14816         (regcache::raw_update): Update.
14817         (regcache::cooked_read): Remove some code.
14818         (regcache::cooked_read_value): Likewise.
14819         (regcache::raw_write): Remove assert on m_readonly_p.
14820         (regcache::raw_supply_integer): Move it to
14821         detached_regcache::raw_supply_integer.
14822         (regcache::raw_supply_zeroed): Likewise.
14823         * regcache.h (detached_regcache) <raw_supply_integer>: New
14824         declaration.
14825         <raw_supply_zeroed, invalidate>: Likewise.
14826         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14827         <invalidate>: Likewise.
14828         <m_readonly_p>: Removed.
14829
14830 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14831
14832         * infcmd.c (get_return_value): Let stop_regs point to
14833         get_current_regcache.
14834         * regcache.c (regcache::regcache): Remove.
14835         (register_dump_reg_buffer): New class.
14836         (regcache_print): Adjust.
14837         * regcache.h (regcache): Remove constructors.
14838
14839 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14840
14841         * regcache.c (class register_dump): New class.
14842         (register_dump_regcache, register_dump_none): New class.
14843         (register_dump_remote, register_dump_groups): New class.
14844         (regcache_print): Update.
14845         * regcache.h (regcache_dump_what): Move it to regcache.c.
14846         (regcache) <dump>: Remove.
14847
14848 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14849
14850         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14851          reg_buffer_rw *.
14852         (jit_unwind_reg_set_impl): Call raw_supply.
14853         (jit_frame_sniffer): Use reg_buffer_rw.
14854         * record-full.c (record_full_core_regbuf): Change its type.
14855         (record_full_core_open_1): Use reg_buffer_rw.
14856         (record_full_close): Likewise.
14857         (record_full_core_fetch_registers): Use regcache->raw_supply.
14858         (record_full_core_store_registers): Likewise.
14859         * regcache.c (regcache::get_register_status): Move it to
14860         reg_buffer.
14861         (regcache_raw_set_cached_value): Remove.
14862         (regcache::raw_set_cached_value): Remove.
14863         (regcache::raw_write): Call raw_supply.
14864         (regcache::raw_supply): Move it to reg_buffer_rw.
14865         * regcache.h (regcache_raw_set_cached_value): Remove.
14866         (reg_buffer_rw): New class.
14867
14868 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14869
14870         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14871         readonly_detached_regcache.
14872         (dummy_frame_prev_register): Use regcache->cooked_read.
14873         * frame.c (frame_save_as_regcache): Change return type.
14874         (frame_pop): Update.
14875         * frame.h (frame_save_as_regcache): Update declaration.
14876         * inferior.h (get_infcall_suspend_state_regcache): Update
14877         declaration.
14878         * infrun.c (infcall_suspend_state) <registers>: use
14879         readonly_detached_regcache.
14880         (save_infcall_suspend_state): Don't use regcache_dup.
14881         (get_infcall_suspend_state_regcache): Change return type.
14882         * linux-fork.c (struct fork_info) <savedregs>: Change to
14883         readonly_detached_regcache.
14884         <pc>: New field.
14885         (fork_save_infrun_state): Don't use regcache_dup.
14886         (info_checkpoints_command): Adjust.
14887         * mi/mi-main.c (register_changed_p): Update declaration.
14888         (mi_cmd_data_list_changed_registers): Use
14889         readonly_detached_regcache.
14890         (register_changed_p): Change parameter type to
14891         readonly_detached_regcache.
14892         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14893         readonly_detached_regcache.
14894         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14895         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14896         New.
14897         (regcache::save): Move it to reg_buffer.
14898         (regcache::restore): Change parameter type.
14899         (regcache_dup): Remove.
14900         * regcache.h (reg_buffer) <save>: New method.
14901         (readonly_detached_regcache): New class.
14902         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14903         readonly_detached_regcache.
14904         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14905
14906 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14907
14908         * frame.c (frame_save_as_regcache): Use regcache method save.
14909         (frame_pop): Use regcache method restore.
14910         * infrun.c (restore_infcall_suspend_state): Likewise.
14911         * linux-fork.c (fork_load_infrun_state): Likewise.
14912         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14913         save.
14914         * regcache.c (regcache_save): Remove.
14915         (regcache::restore): More asserts.
14916         (regcache_cpy): Remove.
14917         * regcache.h (regcache_save): Remove the declaration.
14918         (regcache::restore): Move from private to public.
14919         Remove the friend declaration of regcache_cpy.
14920         (regcache_cpy): Remove declaration.
14921
14922 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14923
14924         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14925         parameter type to 'readable_regcache *'.
14926         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14927         * arm-tdep.c (arm_neon_quad_read): Likewise.
14928         (arm_pseudo_read): Likewise.
14929         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14930         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14931         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14932         * gdbarch.c: Re-generated.
14933         * gdbarch.h: Re-generated.
14934         * gdbarch.sh (pseudo_register_read): Change parameter type to
14935         'readable_regcache *'.
14936         (pseudo_register_read_value): Likewise.
14937         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14938         (h8300_pseudo_register_read): Likewise.
14939         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14940         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14941         (i386_pseudo_register_read_into_value): Likewise.
14942         (i386_pseudo_register_read_value): Likewise.
14943         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14944         declaration.
14945         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14946         * m32c-tdep.c (m32c_raw_read): Likewise.
14947         (m32c_read_flg): Likewise.
14948         (m32c_banked_register): Likewise.
14949         (m32c_banked_read): Likewise.
14950         (m32c_sb_read): Likewise.
14951         (m32c_part_read): Likewise.
14952         (m32c_cat_read): Likewise.
14953         (m32c_r3r2r1r0_read): Likewise.
14954         (m32c_pseudo_register_read): Likewise.
14955         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14956         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14957         (mep_pseudo_cr64_read): Likewise.
14958         (mep_pseudo_register_read): Likewise.
14959         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14960         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14961         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14962         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14963         (regcache::cooked_read): Likewise.
14964         (regcache::cooked_read_value): Likewise.
14965         (regcache_cooked_read_signed):
14966         (regcache::cooked_read): Likewise.
14967         * regcache.h (readable_regcache): New class.
14968         (regcache): Inherit readable_regcache.  Move some methods to
14969         readable_regcache.
14970         * rl78-tdep.c (rl78_pseudo_register_read): Change
14971         parameter type to 'readable_regcache *'.
14972         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14973         (e500_pseudo_register_read): Change parameter type to
14974         'readable_regcache *'.
14975         (dfp_pseudo_register_read): Likewise.
14976         (vsx_pseudo_register_read): Likewise.
14977         (efpr_pseudo_register_read): Likewise.
14978         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14979         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14980         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14981         (sh64_pseudo_register_read): Likewise.
14982         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14983         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14984         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14985         (spu_pseudo_register_read): Likewise.
14986         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14987         (xtensa_pseudo_register_read): Likewise.
14988
14989 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14990
14991         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14992         (regcache::arch): Move it to reg_buffer::arch.
14993         (regcache::register_buffer): Likewise.
14994         (regcache::assert_regnum): Likewise.
14995         (regcache::num_raw_registers): Likewise.
14996         * regcache.h (reg_buffer): New class.
14997         (regcache): Inherit reg_buffer.
14998
14999 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
15000
15001         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
15002         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
15003
15004 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
15005
15006         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
15007
15008 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
15009
15010         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
15011         (SFILES): Remove common/*.c files.
15012         (COMMON_OBS): Remove some *.o files built from common/*.c files.
15013         * common/common.host: Add common reference.
15014         * configure.ac: Likewise.
15015         * configure: Regenerate.
15016
15017 2018-02-16  Yao Qi  <yao.qi@linaro.org>
15018
15019         * block.c (block_namespace_info): Inherit allocate_on_obstack.
15020         (block_initialize_namespace): Use new.
15021         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15022         (dwarf2_free_objfile): Use delete.
15023         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15024         (copy_type_recursive): Use new.
15025         * gdb_obstack.h (allocate_on_obstack): New.
15026
15027 2018-02-15  Yao Qi  <yao.qi@linaro.org>
15028
15029         PR gdb/22849
15030         * inferior.c (exit_inferior_1): Reset inf->control.
15031
15032 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
15033
15034         * ada-lang.c (ada_to_fixed_value_create): Delete advance
15035         declaration.
15036
15037 2018-02-14  Pedro Alves  <palves@redhat.com>
15038
15039         * frame-unwind.c (frame_unwind_try_unwinder): Always call
15040         frame_cleanup_after_sniffer on exception.
15041
15042 2018-02-14  Tom Tromey  <tom@tromey.com>
15043
15044         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15045         const.
15046         (solib_bfd_open): Make pathname const.
15047         * solib.c (solib_bfd_open): Make pathname const.
15048         * solib-spu.c (spu_bfd_fopen): Make name const.
15049         (spu_bfd_open): Make pathname const.
15050         * solib-darwin.c (darwin_bfd_open): Make pathname const.
15051         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15052
15053 2018-02-14  Tom Tromey  <tom@tromey.com>
15054
15055         * symfile.c (symfile_bfd_open): Update.
15056         * source.h (openp, source_full_path_of, find_and_open_source):
15057         Change argument type to unique_xmalloc_ptr.
15058         * source.c (openp): Take a unique_xmalloc_ptr.
15059         (source_full_path_of, find_and_open_source): Likewise.
15060         (open_source_file, symtab_to_fullname): Update.
15061         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15062         unique_xmalloc_ptr.
15063         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15064         (exec_file_find): Update.
15065         * psymtab.c (psymtab_to_fullname): Update.
15066         * nto-tdep.h (nto_find_and_open_solib): Update.
15067         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15068         unique_xmalloc_ptr.
15069         * exec.c (exec_file_attach): Update.
15070         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15071         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15072
15073 2018-02-14  Tom Tromey  <tom@tromey.com>
15074
15075         * solib.c: Include source.h.
15076         * nto-tdep.c: Include source.h.
15077         * mi/mi-cmd-env.c: Include source.h.
15078         * infcmd.c: Include source.h.
15079         * exec.c: Include source.h.
15080         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15081         (add_path, directory_switch, source_path, init_source_path): Move
15082         declarations...
15083         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15084         (add_path, directory_switch, source_path, init_source_path):
15085         ...here.
15086
15087 2018-02-14  Tom Tromey  <tom@tromey.com>
15088
15089         * solist.h (exec_file_find, solib_find): Return
15090         unique_xmalloc_ptr.
15091         (solib_bfd_fopen): Take a const char *.
15092         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15093         (exec_file_find, solib_find): Likewise.
15094         (solib_bfd_fopen): Do not take ownership of "pathname".
15095         (solib_bfd_open): Use unique_xmalloc_ptr.
15096         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15097         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15098         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15099         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15100
15101 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
15102
15103         * ada-lang.c (name_match_type_from_name): Remove reference to
15104         ada_name_for_lookup in function's documentation.
15105         * ada-lang.h (ada_name_for_lookup): Delete declaration.
15106
15107 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15108
15109         * defs.h (enum openp_flags): New enum.
15110         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15111         Move to enum openp_flags.
15112         (openp_flags): New enum flags.
15113         (openp): Change parameter type to openp_flags.
15114         * source.c (openp): Change parameter type to openp_flags.
15115         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15116         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15117
15118 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15119
15120         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15121         per-command.
15122
15123 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
15124
15125         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15126         into...
15127         (class dwarf2_queue_guard): ...the destructor of this new class.
15128         (dw2_do_instantiate_symtab): Create instance of the new class
15129         dwarf2_queue_guard, remove cleanup.
15130
15131 2018-02-09  Tom Tromey  <tom@tromey.com>
15132
15133         * source.c (find_source_lines): Don't reference past the end of
15134         the vector.
15135
15136 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15137
15138         * remote.c (remote_btrace_maybe_reopen): Change error message.
15139         * btrace.c (btrace_enable): Likewise.
15140         (parse_xml_btrace): Likewise.
15141         (parse_xml_btrace_conf): Likewise.
15142
15143 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15144
15145         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15146         (linux_enable_pt, linux_enable_bts): Call
15147         diagnose_perf_event_open_fail.
15148
15149 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15150
15151         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15152         Remove parameter and change return type.  Update callers.  Move it.
15153         (linux_enable_bts, linux_enable_pt): Improve error message.
15154         (linux_enable_pt): Remove zero buffer size check.
15155         (linux_enable_btrace): Improve error messages.  Remove NULL return
15156         check.
15157
15158 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15159
15160         * btrace.c (btrace_enable): Remove target_supports_btrace call.
15161         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15162         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15163         (linux_supports_pt, linux_supports_btrace): Remove.
15164         (linux_enable_bts): Call cpu_supports_bts.
15165         * nat/linux-btrace.h (linux_supports_btrace): Remove.
15166         * remote.c (remote_supports_btrace): Remove.
15167         (init_remote_ops): Remove remote_supports_btrace.
15168         * target-delegates.c: Regenerated.
15169         * target.c (target_supports_btrace): Remove.
15170         * target.h (target_ops) <to_supports_btrace>: Remove
15171         (target_supports_btrace): Remove.
15172         * x86-linux-nat.c (x86_linux_create_target): Remove
15173         linux_supports_btrace.
15174
15175 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15176
15177         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15178         btrace failed.
15179         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15180         exception and use message in own exception.
15181
15182 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15183
15184         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15185         (perf_event_pt_event_type): Use gdb_file_up.
15186         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15187         scoped_fd, and scoped_mmap.
15188
15189 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15190
15191         * common/scoped_mmap.h: New.
15192         * unittests/scoped_mmap-selftest.c: New.
15193         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15194         unittests/scoped_mmap-selftest.c.
15195
15196 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15197
15198         * common/scoped_fd.h: New.
15199         * unittests/scoped_fd-selftest.c: New.
15200         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15201         unittests/scoped_fd-selftest.c.
15202
15203 2018-02-09  Tom Tromey  <tom@tromey.com>
15204
15205         * auto-load.c (auto_load_section_scripts): Use
15206         gdb::unique_xmalloc_ptr.
15207
15208 2018-02-09  Tom Tromey  <tom@tromey.com>
15209
15210         * auto-load.c (execute_script_contents): Use std::string.
15211
15212 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
15213
15214         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15215         Python function, rather than a new command.
15216
15217 2018-02-08  Tom Tromey  <tom@tromey.com>
15218
15219         * solib.c (solib_find_1): Use std::string.
15220         (solib_bfd_fopen): Use unique_xmalloc_ptr.
15221
15222 2018-02-08  Tom Tromey  <tom@tromey.com>
15223
15224         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15225
15226 2018-02-08  Tom Tromey  <tom@tromey.com>
15227
15228         * source.c (find_source_lines): Use gdb::def_vector.
15229
15230 2018-02-08  Tom Tromey  <tom@tromey.com>
15231
15232         * macrocmd.c (struct temporary_macro_definition): New.
15233         (macro_define_command): Use temporary_macro_definition.  Remove
15234         cleanups.
15235         (free_macro_definition_ptr): Remove.
15236
15237 2018-02-08  Tom Tromey  <tom@tromey.com>
15238
15239         * macroexp.c (maybe_expand): Use std::string.
15240
15241 2018-02-08  Tom Tromey  <tom@tromey.com>
15242
15243         * macroexp.c (struct macro_buffer): Add initializers for some
15244         members.
15245         (init_buffer, init_shared_buffer, free_buffer)
15246         (free_buffer_return_text): Remove.
15247         (macro_buffer): New constructors.
15248         (~macro_buffer): New destructor.
15249         (macro_buffer::set_shared): New method.
15250         (macro_buffer::resize_buffer, macro_buffer::appendc)
15251         (macro_buffer::appendmem): Now methods, not free functions.
15252         (set_token, append_tokens_without_splicing, stringify)
15253         (macro_stringify): Update.
15254         (gather_arguments): Change return type.  Remove argc_p argument,
15255         add args_ptr argument.  Use std::vector.
15256         (substitute_args): Remove argc argument.  Accept std::vector.
15257         (expand): Update.  Use std::vector.
15258         (scan, macro_expand, macro_expand_next): Update.
15259
15260 2018-02-08  Tom Tromey  <tom@tromey.com>
15261
15262         * symtab.c (default_collect_symbol_completion_matches_break_on):
15263         Use unique_xmalloc_ptr.
15264         * macroscope.h: (sal_macro_scope, user_macro_scope)
15265         (default_macro_scope): Return unique_xmalloc_ptr.
15266         * macroscope.c (sal_macro_scope, user_macro_scope)
15267         (default_macro_scope): Return unique_xmalloc_ptr.
15268         * macroexp.h (macro_expand, macro_expand_once): Return
15269         unique_xmalloc_ptr.
15270         * macroexp.c (macro_expand, macro_expand_once): Return
15271         unique_xmalloc_ptr.
15272         * macrocmd.c (macro_expand_command, macro_expand_once_command)
15273         (info_macro_command, info_macros_command): Use
15274         unique_xmalloc_ptr.
15275         * compile/compile-c-support.c (write_macro_definitions): Use
15276         unique_xmalloc_ptr.
15277         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15278
15279 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
15280
15281         * value.c (value_static_field): Assign field type instead of
15282         containing type when returning an optimized out value.
15283
15284 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15285
15286         * ft32-tdep.c (ft32_read_pc): Remove.
15287         (ft32_write_pc): Remove.
15288         (ft32_gdbarch_init): Update.
15289         * m32r-tdep.c (m32r_read_pc): Remove.
15290         (m32r_gdbarch_init): Update.
15291         * mep-tdep.c (mep_read_pc): Remove.
15292         (mep_gdbarch_init): Update.
15293         * microblaze-tdep.c (microblaze_write_pc): Remove.
15294         (microblaze_gdbarch_init): Update.
15295         * mn10300-tdep.c (mn10300_read_pc): Remove.
15296         (mn10300_write_pc): Remove.
15297         (mn10300_gdbarch_init): Update.
15298         * moxie-tdep.c (moxie_read_pc): Remove.
15299         (moxie_write_pc): Remove.
15300         (moxie_gdbarch_init): Update.
15301
15302 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15303
15304         * expprint.c (print_subexp_standard): Handle
15305         OP_F77_UNDETERMINED_ARGLIST.
15306         (dump_subexp_body_standard): Likewise.
15307
15308 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
15309
15310         * target-descriptions.c (tdesc_element_visitor) Add empty
15311         implementations.
15312         (tdesc_type): Move make_gdb_type from here.
15313         (tdesc_type_builtin): Likewise.
15314         (tdesc_type_vector): Likewise.
15315         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15316         (make_gdb_type_struct): Move from tdesc_type_with_fields.
15317         (make_gdb_type_union): Likewise.
15318         (make_gdb_type_flags): Likewise.
15319         (make_gdb_type_enum): Likewise.
15320         (make_gdb_type): New function.
15321         (tdesc_register_type): Use static make_gdb_type.
15322
15323 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
15324
15325         * infcmd.c (default_print_one_register_info): Align natural-format
15326         column values consistently one under another.
15327         (pad_to_column): New function.
15328
15329 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
15330
15331         * dwarf2read.c (dwarf2_physname): Move commment.
15332
15333 2018-02-01  Leszek Swirski  <leszeks@google.com>
15334
15335         * varobj.c (varobj_formatted_print_options): Allow recursive
15336         pretty printing if pretty printing is enabled.
15337
15338 2018-02-01  Leszek Swirski  <leszeks@google.com>
15339
15340         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15341         names after a structop as a filename.
15342
15343 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15344
15345         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15346         (arm_record_coproc_data_proc): Likewise.
15347
15348 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15349
15350         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15351
15352 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
15353
15354         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15355         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15356
15357 2018-01-31  Pedro Alves  <palves@redhat.com>
15358
15359         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15360         * inflow.c (child_terminal_save_inferior): Wrap reference to
15361         tcgetpgrp in HAVE_TERMIOS_H.
15362         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15363         _WIN32.
15364         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15365         always iterate over all inferiors.
15366         (gdbsim_cntrl_c): Adjust.
15367         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15368
15369 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15370
15371         * gdbtypes.c (lookup_array_range_type): Make sure the array's
15372         index type is objfile-owned if the element type is as well.
15373
15374 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15375
15376         GDB 8.1 released.
15377
15378 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15379
15380         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15381         "features/s390x-linux64.c".
15382         (_initialize_s390_linux_tdep): Remove initialization of tdescs
15383         s390_linux32 and s390x_linux64.
15384         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15385         default tdesc.
15386         * s390-tdep.c: Include "features/s390-linux32.c" and
15387         "features/s390x-linux64.c".
15388         (s390_tdesc_valid): Add check for tdesc_has_registers.
15389         (s390_gdbarch_init): Make sure there is always a valid tdesc.
15390         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15391         tdesc_s390x_linux64.
15392         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15393         tdesc_s390x_linux64 to...
15394         * s390-tdep.h: ...here.
15395
15396 2018-01-30  Pedro Alves  <palves@redhat.com>
15397
15398         PR gdb/13211
15399         * config.in, configure: Regenerate.
15400         * configure.ac: Check for getpgid.
15401         * go32-nat.c (go32_pass_ctrlc): New.
15402         (go32_target): Install it.
15403         * inf-child.c (inf_child_target): Install
15404         child_terminal_save_inferior, child_pass_ctrlc and
15405         child_interrupt.
15406         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15407         (inf_ptrace_target): No longer install it.
15408         * infcmd.c (interrupt_target_1): Adjust.
15409         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15410         (child_interrupt): Declare.
15411         (inferior::terminal_state): New.
15412         * inflow.c (struct terminal_info): Update comments.
15413         (inferior_process_group): Delete.
15414         (terminal_is_ours): Delete.
15415         (gdb_tty_state): New.
15416         (child_terminal_init): Adjust.
15417         (is_gdb_terminal, sharing_input_terminal_1)
15418         (sharing_input_terminal): New functions.
15419         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15420         Set the process's actual process group in the foreground if
15421         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15422         mark terminal as the inferior's if not sharing GDB's terminal.
15423         Don't check attach_flag.
15424         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15425         pass down a target_terminal_state.
15426         (child_terminal_save_inferior): New, factored out from ...
15427         (child_terminal_ours_1): ... this.  Handle
15428         target_terminal_state::is_ours_for_output.
15429         (child_interrupt, child_pass_ctrlc): New.
15430         (inflow_inferior_exit): Clear the inferior's terminal_state.
15431         (copy_terminal_info): Copy the inferior's terminal state.
15432         (_initialize_inflow): Remove reference to terminal_is_ours.
15433         * inflow.h (inferior_process_group): Delete.
15434         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15435         * procfs.c (procfs_target): Don't install procfs_interrupt.
15436         (procfs_interrupt): Delete.
15437         * remote.c (remote_serial_quit_handler): Adjust.
15438         (remote_interrupt): Remove ptid parameter.  Adjust.
15439         * target-delegates.c: Regenerate.
15440         * target.c: Include "terminal.h".
15441         (target_terminal::terminal_state): Rename to ...
15442         (target_terminal::m_terminal_state): ... this.
15443         (target_terminal::init): Adjust.
15444         (target_terminal::inferior): Adjust to per-inferior
15445         terminal_state.
15446         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15447         (target_terminal::ours, target_terminal::ours_for_output): Use
15448         target_terminal_is_ours_kind.
15449         (target_interrupt): Remove ptid parameter.  Adjust.
15450         (default_target_pass_ctrlc): Adjust.
15451         * target.h (target_ops::to_terminal_save_inferior): New field.
15452         (target_ops::to_interrupt): Remove ptid_t parameter.
15453         (target_interrupt): Remove ptid_t parameter.  Update comment.
15454         (target_pass_ctrlc): Update comment.
15455         * target/target.h (target_terminal_state): New scoped enum,
15456         factored out of ...
15457         (target_terminal::terminal_state): ... here.
15458         (target_terminal::inferior): Update comments.
15459         (target_terminal::restore_inferior): New.
15460         (target_terminal::is_inferior, target_terminal::is_ours)
15461         (target_terminal::is_ours_for_output): Adjust.
15462         (target_terminal::scoped_restore_terminal_state): Adjust to
15463         rename, and call restore_inferior() instead of inferior().
15464         (target_terminal::scoped_restore_terminal_state::m_state): Change
15465         type.
15466         (target_terminal::terminal_state): Rename to ...
15467         (target_terminal::m_terminal_state): ... this and change type.
15468
15469 2018-01-30  Pedro Alves  <palves@redhat.com>
15470
15471         * linux-nat.c (wait_for_signal): New function.
15472         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15473         directly.
15474         (async_terminal_is_ours)
15475         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15476         (linux_nat_add_target): Don't override
15477         to_terminal_inferior/to_terminal_ours.
15478
15479 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15480
15481         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15482
15483 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15484
15485         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15486         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15487         dwarf2_per_objfile_free here.
15488         (dwarf2_per_objfile_free): Remove.
15489         (_initialize_dwarf2_read): Don't register
15490         dwarf2_per_objfile_free as a registry cleanup.
15491
15492 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15493
15494         Avoid compilation errors in MinGW native builds
15495
15496         The error is triggered by including python-internal.h, and the
15497         error message is:
15498
15499              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15500                       from build-gnulib/import/math.h:27,
15501                       from d:/usr/Python26/include/pyport.h:235,
15502                       from d:/usr/Python26/include/Python.h:58,
15503                       from python/python-internal.h:94,
15504                       from python/py-arch.c:24:
15505              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15506         using ::hypot;
15507                 ^~~~~
15508
15509         This happens because Python headers define 'hypot' to expand t
15510         '_hypot' in the Windows builds.
15511         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15512         'hypoth'.  This avoids a compilation error.
15513
15514 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15515
15516         * MAINTAINERS (Write After Approval): Fix ordering.
15517
15518 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15519
15520         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15521
15522 2018-01-26  Alan Modra  <amodra@gmail.com>
15523
15524         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15525         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15526         Remove nop.  Make const.  Comment.
15527         (powerpc32_plt_stub_so_2): New.
15528         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15529         Correct count.  Update uses.
15530         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15531         Move common code reading PLT entry word.  Correct
15532         powerpc32_plt_stub PLT address calculation.
15533         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15534         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15535         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15536         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15537         (ppc64_standard_linkage8): Likewise.
15538         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15539         Correct insns description.
15540         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15541
15542 2018-01-24  Pedro Alves  <palves@redhat.com>
15543
15544         GCC PR libstdc++/83906
15545         * gdbtypes.c (operator==(const dynamic_prop &,
15546         const dynamic_prop &)): New.
15547         (operator==(const range_bounds &, const range_bounds &)): New.
15548         (check_types_equal): Use them instead of memcmp.
15549         * gdbtypes.h (operator==(const dynamic_prop &,
15550         const dynamic_prop &)): Declare.
15551         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15552         (operator==(const range_bounds &, const range_bounds &)): Declare.
15553         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15554
15555 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15556
15557         * s390-linux-tdep.c (s390_record_address_mask)
15558         (s390_record_calc_disp_common, s390_record_calc_disp)
15559         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15560         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15561         (s390_process_record): Move to s390-tdep.c.
15562         (s390_linux_init_abi_any): Adjust.
15563         * s390-tdep.c (s390_record_address_mask)
15564         (s390_record_calc_disp_common, s390_record_calc_disp)
15565         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15566         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15567         (s390_process_record): Moved from s390-linux-tdep.c
15568         (s390_gdbarch_init): Adjust.
15569
15570 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15571
15572         * s390-linux-nat.c (s390-tdep.h): New include.
15573         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15574         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15575         (ALLDEPFILES): Add s390-tdep.c.
15576         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15577         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15578         * s390-tdep.h: ...this.  New file.
15579         * s390-linux-tdep.c (s390-tdep.h): New include.
15580         (_initialize_s390_tdep): Rename to...
15581         (_initialize_s390_linux_tdep): ...this and adjust.
15582         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15583         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15584         s390-tdep.h.
15585         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15586         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15587         (s390_is_partial_instruction, s390_software_single_step)
15588         (is_non_branch_ril, s390_displaced_step_copy_insn)
15589         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15590         (s390_prologue_data, s390_addr, s390_store, s390_load)
15591         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15592         (s390_register_call_saved, s390_guess_tracepoint_registers)
15593         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15594         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15595         (s390_pseudo_register_name, s390_pseudo_register_type)
15596         (s390_pseudo_register_read, s390_pseudo_register_write)
15597         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15598         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15599         (s390_addr_bits_remove, s390_address_class_type_flags)
15600         (s390_address_class_type_flags_to_name)
15601         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15602         (s390_function_arg_float, s390_function_arg_vector)
15603         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15604         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15605         (s390_frame_align, s390_register_return_value, s390_return_value)
15606         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15607         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15608         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15609         (s390_trad_frame_prev_register, s390_unwind_cache)
15610         (s390_prologue_frame_unwind_cache)
15611         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15612         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15613         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15614         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15615         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15616         (s390_frame_base_address, s390_local_base_address)
15617         (s390_frame_base, s390_gcc_target_options)
15618         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15619         (s390_validate_reg_range, s390_tdesc_valid)
15620         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15621         * s390-tdep.c: ...this.  New file.
15622
15623 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15624
15625         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15626         (s390_process_record, s390_gdbarch_tdep_alloc)
15627         (s390_linux_init_abi_any): Use/set new hook.
15628
15629 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15630
15631         * s390-linux-tdep.c (osabi.h): New include.
15632         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15633         (s390_linux_init_abi_any): New functions.
15634         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15635
15636 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15637
15638         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15639         tdesc_has_registers check
15640
15641 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15642
15643         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15644         (s390_validate_reg_range): New macro.
15645         (s390_gdbarch_init): Adjust.
15646
15647 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15648
15649         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15650         (s390_gdbarch_tdep_alloc): Adjust.
15651         (s390_gdbarch_init): Adjust.
15652
15653 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15654
15655         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15656         <have_tdb>: Change type to bool.
15657         (s390_gdbarch_tdep_alloc): Adjust.
15658         (s390_gdbarch_init): Adjust.
15659
15660 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15661
15662         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15663         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15664         (s390_gdbarch_tdep_alloc): New function.
15665         (s390_gdbarch_init): Allocate tdep at start and use its fields
15666         instead of separate variables.
15667
15668 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15669
15670         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15671         when looking for cached gdbarch and add comment for remaining.
15672
15673 2018-01-22  Pedro Alves  <palves@redhat.com>
15674             Sergio Durigan Junior  <sergiodj@redhat.com>
15675
15676         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15677         case.
15678
15679 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15680
15681         * MAINTAINERS: Update my company e-mail address.
15682
15683 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15684
15685         * regcache.c (cooked_write_test): New function.
15686         (_initialize_regcache): Register the test.
15687
15688 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15689
15690         * ia64-tdep.c (ia64_pseudo_register_read): Call
15691         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15692         * m32c-tdep.c (m32c_cat_read): Likewise.
15693         (m32c_r3r2r1r0_read): Likewise.
15694         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15695         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15696
15697 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15698
15699         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15700         method raw_read instead of regcache_raw_read.
15701         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15702         * arm-tdep.c (arm_neon_quad_read): Likewise.
15703         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15704         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15705         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15706         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15707         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15708         (i386_pseudo_register_read_into_value): Likewise.
15709         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15710         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15711         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15712         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15713         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15714         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15715         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15716         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15717         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15718
15719 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15720
15721         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15722         * configure.tgt: Remove target mt.
15723         * mt-tdep.c: Remove.
15724         * regcache.c (cooked_read_test): Remove the check for mt.
15725
15726 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15727
15728         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15729         instead of gdbarch_pseudo_register_read_value.
15730
15731 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15732
15733         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15734         language is Ada.
15735
15736 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15737
15738         * linespec.c (create_sals_line_offset): Remove code that preserved
15739         the symtab_and_line's line number.
15740
15741 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15742
15743         * varobj.c (varobj_create): Don't set valid_block when creating a
15744         floating varobj.
15745
15746 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15747
15748         * varobj.c (varobj_create): Remove out of date comment.
15749
15750 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15751
15752         PR mi/20395
15753         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15754         updating innermost block.
15755         * parse.c (innermost_block_tracker::update): Take extra type
15756         parameter, and check types match before updating innermost block.
15757         (write_dollar_variable): Update innermost block for registers.
15758         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15759         (innermost_block_tracker::innermost_block_tracker): Initialise
15760         m_types member.
15761         (innermost_block_tracker::reset): Take type parameter.
15762         (innermost_block_tracker::update): Take type parameter, and pass
15763         type through as needed.
15764         (innermost_block_tracker::m_types): New member.
15765         * varobj.c (varobj_create): Pass type when reseting innermost
15766         block.
15767
15768 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15769
15770         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15771         * ada-lang.c (resolve_subexp): Likewise.
15772         * breakpoint.c (set_breakpoint_condition) Likewise.
15773         (watch_command_1) Likewise.
15774         * c-exp.y (variable): Likewise.
15775         * d-exp.y (PrimaryExpression): Likewise.
15776         * f-exp.y (variable): Likewise.
15777         * go-exp.y (variable): Likewise.
15778         * m2-exp.y (variable): Likewise.
15779         * objfiles.c (objfile::~objfile): Likewise.
15780         * p-exp.y (variable): Likewise.
15781         * parse.c (innermost_block): Change type.
15782         * parser-defs.h (class innermost_block_tracker): New.
15783         (innermost_block): Change to innermost_block_tracker.
15784         * printcmd.c (display_command): Switch to innermost_block API.
15785         (do_one_display): Likewise.
15786         * rust-exp.y (do_one_display): Likewise.
15787         * symfile.c (clear_symtab_users): Likewise.
15788         * varobj.c (varobj_create): Switch to innermost_block API, replace
15789         use of innermost_block with block stored on varobj object.
15790
15791 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15792
15793         * expression.h (innermost_block): Remove declaration.
15794         * varobj.c: Add 'parser-defs.h' include.
15795
15796 2018-01-19  Tom Tromey  <tom@tromey.com>
15797
15798         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15799         symbols in the static and global blocks.
15800
15801 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15802
15803         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15804         gdb_ptrace.h, and move including gdb_wait.h ...
15805         * nat/linux-ptrace.h: ... to here.
15806
15807 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15808
15809         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15810         inf_ptrace_detach_success.
15811         (inf_ptrace_detach_success): Add inferior parameter, use it
15812         instead of inferior_ptid, pass it to detach_inferior.
15813         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15814         parameter.
15815         * inferior.c (detach_inferior): Add overload that takes an
15816         inferior object.
15817         * inferior.h (detach_inferior): Likewise.
15818         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15819         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15820         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15821
15822 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15823
15824         * target.h (struct target_ops) <to_detach>: Add inferior
15825         parameter.
15826         (target_detach): Likewise.
15827         * target.c (dispose_inferior): Pass inferior down.
15828         (target_detach): Pass inferior down.  Assert that it is equal to
15829         the current inferior.
15830         * aix-thread.c (aix_thread_detach): Pass inferior down.
15831         * corefile.c (core_file_command): Pass current_inferior() down.
15832         * corelow.c (core_detach): Add inferior parameter.
15833         * darwin-nat.c (darwin_detach): Likewise.
15834         * gnu-nat.c (gnu_detach): Likewise.
15835         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15836         * infcmd.c (detach_command): Pass current_inferior() down to
15837         target_detach.
15838         * infrun.c (follow_fork_inferior): Pass parent_inf to
15839         target_detach.
15840         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15841         target_detach.
15842         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15843         * linux-thread-db.c (thread_db_detach): Likewise.
15844         * nto-procfs.c (procfs_detach): Likewise.
15845         * procfs.c (procfs_detach): Likewise.
15846         * record.c (record_detach): Likewise.
15847         * record.h (struct inferior): Forward-declare.
15848         (record_detach): Add inferior parameter.
15849         * remote-sim.c (gdbsim_detach): Likewise.
15850         * remote.c (remote_detach_1): Likewise.
15851         (remote_detach): Likewise.
15852         (extended_remote_detach): Likewise.
15853         * sol-thread.c (sol_thread_detach): Likewise.
15854         * target-debug.h (target_debug_print_inferior_p): New macro.
15855         * target-delegates.c: Re-generate.
15856         * top.c (kill_or_detach): Pass inferior down to target_detach.
15857         * windows-nat.c (windows_detach): Add inferior parameter.
15858
15859 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15860
15861         * target.h (struct target_ops) <to_detach>: Remove args
15862         parameter.
15863         (target_detach): Likewise.
15864         * target.c (dispose_inferior): Adjust.
15865         (target_detach): Remove args parameter, adjust.
15866         * aix-thread.c (aix_thread_detach): Adjust.
15867         * corefile.c (core_file_command): Adjust.
15868         * corelow.c (core_detach): Adjust.
15869         * darwin-nat.c (darwin_detach): Adjust.
15870         * gnu-nat.c (gnu_detach): Adjust.
15871         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15872         * infcmd.c (detach_command): Adjust
15873         * infrun.c (follow_fork_inferior): Adjust.
15874         (handle_vfork_child_exec_or_exit): Adjust.
15875         * linux-fork.c (linux_fork_detach): Remove args parameter.
15876         * linux-fork.h (linux_fork_detach): Likewise.
15877         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15878         * linux-thread-db.c (thread_db_detach): Likewise.
15879         * nto-procfs.c (procfs_detach): Likewise.
15880         * procfs.c (procfs_detach): Likewise.
15881         (do_detach): Remove signo parameter.
15882         * record.c (record_detach): Remove args parameter.
15883         * record.h (record_detach): Likewise.
15884         * remote-sim.c (gdbsim_detach): Likewise.
15885         * remote.c (remote_detach_1): Likewise.
15886         (remote_detach): Likewise.
15887         (extended_remote_detach): Likewise.
15888         * sol-thread.c (sol_thread_detach): Likewise.
15889         * target-delegates.c: Re-generate.
15890         * top.c (struct qt_args) <args>: Remove field.
15891         (kill_or_detach): Don't pass args.
15892         (quit_force): Don't set args.
15893         * windows-nat.c (windows_detach): Remove args parameter.
15894
15895 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15896
15897         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15898         (arm_linux_init_abi): Install it.
15899
15900 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15901
15902         * osabi.c (gdb_osabi_names): Extend the regexp for
15903         arm-linux-gnueabihf.
15904
15905 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15906
15907         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15908         m_abbrevs.
15909         (abbrev_table::add_abbrev): Update.
15910         (abbrev_table::lookup_abbrev): Update.
15911
15912 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15913
15914         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15915
15916 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15917
15918         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15919         to "std::string".
15920
15921 2018-01-17  Tom Tromey  <tom@tromey.com>
15922
15923         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15924
15925 2018-01-17  Tom Tromey  <tom@tromey.com>
15926
15927         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15928         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15929         (create_array_type_with_stride): Update.
15930         * dwarf2read.c (set_die_type): Update.
15931
15932 2018-01-17  Tom Tromey  <tom@tromey.com>
15933
15934         * dwarf2read.c (delayed_method_info): Remove typedef.
15935         (dwarf2_cu::method_info): Now a std::vector.
15936         (add_to_method_list): Update.
15937         (free_delayed_list): Remove.
15938         (compute_delayed_physnames): Update.
15939         (process_full_comp_unit, process_full_type_unit): Clear the method
15940         list.  Remove cleanups.
15941         (psymtab_include_file_name): Add name_holder parameter.  Use
15942         unique_xmalloc_ptr.
15943         (dwarf_decode_lines): Update.
15944
15945 2018-01-17  Tom Tromey  <tom@tromey.com>
15946             Simon Marchi  <simon.marchi@ericsson.com>
15947
15948         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15949         (dwarf2_per_objfile::free_cached_comp_units)
15950         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15951         (init_cutu_and_read_dies_no_follow): Update.
15952         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15953         (dwarf2_cu::~dwarf2_cu): New.
15954         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15955         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15956
15957 2018-01-17  Tom Tromey  <tom@tromey.com>
15958             Simon Marchi  <simon.marchi@ericsson.com>
15959
15960         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15961         (struct die_reader_specs) <abbrev_table>: New member.
15962         (struct abbrev_table): Add constructor.
15963         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15964         <abbrev_obstack>: Now an auto_obstack.
15965         (abbrev_table_up): New typedef.
15966         (init_cu_die_reader): Add abbrev_table parameter.
15967         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15968         Add result_dwo_abbrev_table.
15969         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15970         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15971         Update.
15972         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15973         parameter.
15974         (skip_children): Update.
15975         (abbrev_table::alloc_abbrev): Rename from
15976         abbrev_table_alloc_abbrev.
15977         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15978         (abbrev_table::lookup_abbrev): Rename from
15979         abbrev_table_lookup_abbrev.
15980         (abbrev_table_read_table): Return abbrev_table_up.
15981         (abbrev_table_free, abbrev_table_free_cleanup)
15982         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15983         (load_partial_dies): Update.
15984
15985 2018-01-17  Tom Tromey  <tom@tromey.com>
15986
15987         * dwarf2read.c (dwarf2_compute_name): Update comment.
15988         (read_func_scope, read_variable): Update.
15989         (new_symbol): Remove.
15990         (new_symbol_full): Rename to new_symbol.
15991
15992 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15993
15994         PR gdb/16577
15995         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15996         a warning instead of throwing an error, set section size to 0 and return
15997         NULL.
15998         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15999
16000 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
16001
16002         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
16003         std::string.
16004         (linux_ptrace_attach_fail_reason_string): Likewise.
16005         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
16006         Likewise.
16007         (linux_ptrace_attach_fail_reason_string): Likewise.
16008         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
16009
16010 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
16011
16012         * linux-nat.c (linux_nat_attach): Remove xstrdup.
16013
16014 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
16015
16016         PR gdb/21559
16017         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
16018         checking for fs_base/gs_base fields in struct user_regs_struct.
16019         * configure: Regenerate.
16020
16021 2018-01-17  Yao Qi  <yao.qi@linaro.org>
16022
16023         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16024         function.
16025         (aarch64_linux_init_abi): Install it to gdbarch hook
16026         gcc_target_options.
16027
16028 2018-01-15  Pedro Alves  <palves@redhat.com>
16029
16030         * common/signals-state-save-restore.c
16031         (save_original_signals_state): Fix typos.
16032
16033 2017-01-12  Tom Tromey  <tom@tromey.com>
16034             Sergio Durigan Junior  <sergiodj@redhat.com>
16035
16036         * Makefile.in (install-only): Install gdb-add-index.
16037
16038 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
16039
16040         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16041
16042 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16043
16044         * infrun.c (keep_going_pass_signal): Clear step-over info when
16045         insert_breakpoints fails.
16046
16047 2018-01-11  Pedro Alves  <palves@redhat.com>
16048
16049         PR gdb/22583
16050         * infrun.c (resume): Rename to ...
16051         (resume_1): ... this.
16052         (resume): Reimplement as wrapper around resume_1.
16053
16054 2018-01-11  Pedro Alves  <palves@redhat.com>
16055
16056         PR remote/22597
16057         * remote.c (remote_parse_stop_reply): Default to the last-set
16058         general thread instead of to 'magic_null_ptid'.
16059
16060 2018-01-10  Pedro Alves  <palves@redhat.com>
16061
16062         * language.h (language_get_symbol_name_matcher): Rename ...
16063         (get_symbol_name_matcher): ... this.
16064         * language.c (language_get_symbol_name_matcher): Ditto.
16065         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16066         callers adjusted.
16067
16068 2018-01-10  Pedro Alves  <palves@redhat.com>
16069
16070         PR gdb/22670
16071         * dwarf2read.c
16072         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16073         Adjust to use language_get_symbol_name_matcher instead of
16074         language_defn::la_get_symbol_name_matcher.
16075         * language.c (language_get_symbol_name_matcher): If in Ada mode
16076         and the lookup name is a verbatim match, return Ada's matcher.
16077         * language.h (language_get_symbol_name_matcher): Adjust comment.
16078         (ada_lookup_name_info::verbatim_p):: New method.
16079
16080 2018-01-10  Pedro Alves  <palves@redhat.com>
16081
16082         PR gdb/22670
16083         * ada-lang.c (ada_collect_symbol_completion_matches): If the
16084         minsym's language is language_auto or language_cplus, pass down
16085         language_ada instead.
16086         * symtab.c (compare_symbol_name): Don't frob symbol language here.
16087
16088 2018-01-10  Pedro Alves  <palves@redhat.com>
16089
16090         PR gdb/22670
16091         * minsyms.c (linkage_name_str): New function.
16092         (iterate_over_minimal_symbols): Use it.
16093
16094 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16095
16096         * NEWS: Document that 'info proc' now works on FreeBSD.
16097
16098 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16099
16100         * configure.ac: Check for kinfo_getfile in libutil.
16101         * configure: Regenerate.
16102         * config.in: Regenerate.
16103         * fbsd-nat.c: Include "fbsd-tdep.h".
16104         (fbsd_fetch_cmdline): New.
16105         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16106         rather than calling error.
16107         (fbsd_info_proc): New.
16108         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16109         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16110         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16111
16112 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16113
16114         * fbsd-nat.c (struct free_deleter): Remove.
16115         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16116
16117 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16118
16119         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16120         NULL for an empty pathname.
16121
16122 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16123
16124         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16125         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16126         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16127         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16128         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16129         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16130         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16131         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16132         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16133         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16134         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16135         (fbsd_core_fetch_timeval, fbsd_print_sigset)
16136         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16137         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
16138         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16139
16140 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
16141
16142         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16143         (gnu_xfer_auxv): New function.
16144         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16145         TARGET_OBJECT_AUXV.
16146
16147 2018-01-08  Yao Qi  <yao.qi@linaro.org>
16148             Simon Marchi  <simon.marchi@ericsson.com>
16149
16150         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16151         common/selftest.c.
16152         (COMMON_OBS): Remove selftest.o.
16153         * configure.ac: Append selftest-arch.c and common/selftest.c to
16154         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
16155         * configure: Re-generated.
16156         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16157         GDB_SELF_TEST.
16158         (maintenance_info_selftests): Likewise.
16159
16160 2018-01-08  Xavier Roirand  <roirand@adacore.com>
16161
16162         * ada-valprint.c (val_print_packed_array_elements): Use
16163         proper number of elements when printing an array indexed
16164         by an enumeration type.
16165
16166 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16167
16168         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16169         (dw2_get_file_names_reader): Adjust.
16170         (lookup_dwo_signatured_type): Adjust.
16171         (lookup_dwp_signatured_type): Adjust.
16172         (lookup_signatured_type): Adjust.
16173         (create_type_unit_group): Adjust.
16174         (get_type_unit_group): Adjust.
16175         (process_psymtab_comp_unit_reader): Adjust.
16176         (build_type_psymtabs_reader): Adjust.
16177         (scan_partial_symbols): Adjust.
16178         (add_partial_symbol): Adjust.
16179         (add_partial_subprogram): Adjust.
16180         (peek_die_abbrev): Adjust.
16181         (fixup_go_packaging): Adjust.
16182         (process_imported_unit_die): Adjust.
16183         (dwarf2_compute_name): Adjust.
16184         (dwarf2_physname): Adjust.
16185         (read_import_statement): Adjust.
16186         (handle_DW_AT_stmt_list): Adjust.
16187         (read_file_scope): Adjust.
16188         (read_func_scope): Adjust.
16189         (read_lexical_block_scope): Adjust.
16190         (read_call_site_scope): Adjust.
16191         (read_variable): Adjust.
16192         (dwarf2_rnglists_process): Adjust.
16193         (dwarf2_ranges_process): Adjust.
16194         (dwarf2_ranges_read): Adjust.
16195         (dwarf2_get_pc_bounds): Adjust.
16196         (dwarf2_record_block_ranges): Adjust.
16197         (dwarf2_add_field): Adjust.
16198         (dwarf2_add_member_fn): Adjust.
16199         (read_structure_type): Adjust.
16200         (process_structure_scope): Adjust.
16201         (read_enumeration_type): Adjust.
16202         (read_array_type): Adjust.
16203         (mark_common_block_symbol_computed): Adjust.
16204         (read_common_block): Adjust.
16205         (read_namespace_type): Adjust.
16206         (read_namespace): Adjust.
16207         (read_module_type): Adjust.
16208         (read_tag_pointer_type): Adjust.
16209         (read_tag_ptr_to_member_type): Adjust.
16210         (read_tag_string_type): Adjust.
16211         (read_subroutine_type): Adjust.
16212         (read_typedef): Adjust.
16213         (read_base_type): Adjust.
16214         (attr_to_dynamic_prop): Adjust.
16215         (read_subrange_type): Adjust.
16216         (read_unspecified_type): Adjust.
16217         (dwarf2_read_abbrevs): Adjust.
16218         (load_partial_dies): Adjust.
16219         (read_partial_die): Adjust.
16220         (find_partial_die): Adjust.
16221         (guess_partial_die_structure_name): Adjust.
16222         (fixup_partial_die): Adjust.
16223         (read_attribute_value): Adjust.
16224         (read_addr_index): Adjust.
16225         (read_addr_index_from_leb128): Adjust.
16226         (read_str_index): Adjust.
16227         (dwarf2_string_attr): Adjust.
16228         (get_debug_line_section): Adjust.
16229         (dwarf_decode_line_header): Adjust.
16230         (lnp_state_machine::check_line_address): Adjust.
16231         (dwarf_decode_lines_1): Adjust.
16232         (dwarf_decode_lines): Adjust.
16233         (dwarf2_start_symtab): Adjust.
16234         (var_decode_location): Adjust.
16235         (new_symbol_full): Adjust.
16236         (dwarf2_const_value_data): Adjust.
16237         (dwarf2_const_value_attr): Adjust.
16238         (dwarf2_const_value): Adjust.
16239         (die_type): Adjust.
16240         (die_containing_type): Adjust.
16241         (build_error_marker_type): Adjust.
16242         (lookup_die_type): Adjust.
16243         (guess_full_die_structure_name): Adjust.
16244         (anonymous_struct_prefix): Adjust.
16245         (determine_prefix): Adjust.
16246         (dwarf2_name): Adjust.
16247         (follow_die_ref_or_sig): Adjust.
16248         (follow_die_offset): Adjust.
16249         (follow_die_ref): Adjust.
16250         (follow_die_sig_1): Adjust.
16251         (follow_die_sig): Adjust.
16252         (get_signatured_type): Adjust.
16253         (get_DW_AT_signature_type): Adjust.
16254         (decode_locdesc): Adjust.
16255         (dwarf_decode_macros): Adjust.
16256         (cu_debug_loc_section): Adjust.
16257         (fill_in_loclist_baton): Adjust.
16258         (dwarf2_symbol_mark_computed): Adjust.
16259         (init_one_comp_unit): Don't assign
16260         dwarf2_cu::dwarf2_per_objfile.
16261         (set_die_type): Adjust.
16262
16263 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16264
16265         * dwarf2read.c (struct mapped_debug_names): Add constructor.
16266         <dwarf2_per_objfile>: New field.
16267         (dwarf2_per_objfile): Remove global.
16268         (get_dwarf2_per_objfile): New function.
16269         (set_dwarf2_per_objfile): New function.
16270         (dwarf2_build_psymtabs_hard): Change objfile parameter to
16271         dwarf2_per_objfile.
16272         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16273         (read_abbrev_offset): Likewise.
16274         (read_indirect_string): Likewise.
16275         (read_indirect_line_string): Likewise.
16276         (read_indirect_string_at_offset): Likewise.
16277         (read_indirect_string_from_dwz): Likewise.
16278         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16279         dwarf2_per_objfile.
16280         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16281         (create_all_comp_units): Change objfile parameter to
16282         dwarf2_per_objfile.
16283         (create_all_type_units): Likewise.
16284         (process_queue): Add dwarf2_per_objfile parameter.
16285         (read_and_check_comp_unit_head): Likewise.
16286         (lookup_dwo_unit_in_dwp): Likewise.
16287         (get_dwp_file): Likewise.
16288         (process_cu_includes): Likewise.
16289         (struct free_dwo_file_cleanup_data): New struct.
16290         (dwarf2_has_info): Use get_dwarf2_per_objfile and
16291         set_dwarf2_per_objfile.
16292         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16293         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16294         context, adjust calls.
16295         (dw2_instantiate_symtab): Likewise.
16296         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16297         (dw2_get_cu): Likewise.
16298         (create_cu_from_index_list): Change objfile parameter to
16299         dwarf2_per_objfile.
16300         (create_cus_from_index_list): Get dwarf2_per_objfile from
16301         context, adjust calls.
16302         (create_cus_from_index): Likewise.
16303         (create_signatured_type_table_from_index): Change objfile
16304         parameter to dwarf2_per_objfile.
16305         (create_signatured_type_table_from_debug_names): Change objfile
16306         parameter to dwarf2_per_objfile.
16307         (create_addrmap_from_index): Likewise.
16308         (create_addrmap_from_aranges): Likewise.
16309         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16310         (dw2_setup): Remove.
16311         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16312         context.
16313         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16314         get_dwarf2_per_objfile.
16315         (dw2_forget_cached_source_info): Likewise.
16316         (dw2_map_symtabs_matching_filename): Likewise.
16317         (struct dw2_symtab_iterator) <index>: Remove.
16318         <dwarf2_per_objfile>: New field.
16319         (dw2_symtab_iter_init): Replace index parameter with
16320         dwarf2_per_objfile.
16321         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16322         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16323         (dw2_print_stats): Likewise.
16324         (dw2_dump): Likewise.
16325         (dw2_expand_symtabs_for_function): Likewise.
16326         (dw2_expand_all_symtabs): Likewise.
16327         (dw2_expand_symtabs_with_fullname): Likewise.
16328         (dw2_expand_marked_cus): Replace index and objfile parameters
16329         with dwarf2_per_objfile.
16330         (dw_expand_symtabs_matching_file_matcher): Add
16331         dwarf2_per_objfile parameter and adjust calls.
16332         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16333         adjust calls.
16334         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16335         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16336         adjust calls.
16337         (create_cus_from_debug_names_list): Replace objfile parameter
16338         with dwarf2_per_objfile and adjust calls.
16339         (create_cus_from_debug_names): Likewise.
16340         (dwarf2_read_debug_names): Likewise.
16341         (mapped_debug_names::namei_to_name): Adjust call.
16342         (dw2_debug_names_iterator::next): Likewise.
16343         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16344         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16345         (dw2_debug_names_dump): Likewise.
16346         (dw2_debug_names_expand_symtabs_for_function): Likewise.
16347         (dw2_debug_names_expand_symtabs_matching): Likewise.
16348         (dwarf2_initialize_objfile): Likewise.
16349         (dwarf2_build_psymtabs): Likewise.
16350         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16351         this_cu.
16352         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16353         (read_and_check_comp_unit_head): Likewise.
16354         (read_abbrev_offset): Likewise.
16355         (create_debug_type_hash_table): Likewise.
16356         (create_debug_types_hash_table): Likewise.
16357         (create_all_type_units): Replace objfile parameter with
16358         dwarf2_per_objfile.
16359         (add_type_unit): Add dwarf2_per_objfile parameter.
16360         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16361         with dwarf2_per_objfile.
16362         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16363         (lookup_dwp_signatured_type): Likewise.
16364         (lookup_signatured_type): Likewise.
16365         (read_cutu_die_from_dwo): Likewise.
16366         (init_tu_and_read_dwo_dies): Likewise.
16367         (init_cutu_and_read_dies): Likewise.
16368         (init_cutu_and_read_dies_no_follow): Likewise.
16369         (allocate_type_unit_groups_table): Add objfile parameter.
16370         (create_type_unit_group): Use dwarf2_per_objfile from cu.
16371         (get_type_unit_group): Likewise.
16372         (process_psymtab_comp_unit): Update call.
16373         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16374         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16375         (print_tu_stats): Likewise.
16376         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16377         in void* parameter.
16378         (build_type_psymtabs): Change objfile parameter to
16379         dwarf2_per_objfile.
16380         (process_skeletonless_type_unit): Use dwarf2_per_objfile
16381         passed in void* parameter.
16382         (process_skeletonless_type_units): Change objfile parameter to
16383         dwarf2_per_objfile.
16384         (set_partial_user): Likewise.
16385         (dwarf2_build_psymtabs_hard): Likewise.
16386         (read_comp_units_from_section): Likewise.
16387         (create_all_comp_units): Likewise.
16388         (scan_partial_symbols): Update calls.
16389         (add_partial_symbol): Likewise.
16390         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16391         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16392         (process_queue): Add dwarf2_per_objfile parameter.
16393         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16394         (compute_compunit_symtab_includes): Likewise.
16395         (process_cu_includes): Add dwarf2_per_objfile parameter.
16396         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16397         (process_full_type_unit): Likewise.
16398         (process_imported_unit_die): Update call.
16399         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16400         (read_file_scope): Likewise.
16401         (allocate_dwo_file_hash_table): Add objfile parameter.
16402         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16403         (create_cus_hash_table): Likewise.
16404         (create_dwp_hash_table): Likewise.
16405         (create_dwo_unit_in_dwp_v1): Likewise.
16406         (create_dwp_v2_section): Likewise.
16407         (create_dwo_unit_in_dwp_v2): Likewise.
16408         (lookup_dwo_unit_in_dwp): Likewise.
16409         (try_open_dwop_file): Likewise.
16410         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16411         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16412         cleanup to include a reference to dwarf2_per_objfile.
16413         (open_dwp_file): Add dwarf2_per_objfile parameter.
16414         (open_and_init_dwp_file): Likewise.
16415         (get_dwp_file): Likewise.
16416         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16417         (queue_and_load_all_dwo_tus): Update call.
16418         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16419         data.
16420         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16421         (dwarf2_ranges_process): Likewise.
16422         (dwarf2_get_pc_bounds): Likewise.
16423         (mark_common_block_symbol_computed): Likewise.
16424         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16425         (dwarf2_read_abbrevs): Update call.
16426         (read_partial_die): Use dwarf2_per_objfile from cu.
16427         (find_partial_die): Likewise.
16428         (fixup_partial_die): Likewise.
16429         (read_attribute_value): Likewise.
16430         (read_indirect_string_at_offset_from): Add objfile parameter.
16431         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16432         parameter.
16433         (read_indirect_string_from_dwz): Add objfile parameter.
16434         (read_indirect_string): Add objfile parameter.
16435         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16436         (read_addr_index): Use dwarf2_per_objfile from cu.
16437         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16438         call dw2_setup.
16439         (read_str_index): Use dwarf2_per_objfile from cu.
16440         (get_debug_line_section): Likewise.
16441         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16442         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16443         (new_symbol_full): Use dwarf2_per_objfile from cu.
16444         (build_error_marker_type): Likewise.
16445         (lookup_die_type): Likewise.
16446         (determine_prefix): Likewise.
16447         (follow_die_offset): Likewise.
16448         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16449         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16450         (dwarf2_fetch_die_type_sect_off): Likewise.
16451         (dwarf2_get_die_type): Likewise.
16452         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16453         (get_signatured_type): Likewise.
16454         (get_DW_AT_signature_type): Likewise.
16455         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16456         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16457         (cu_debug_loc_section): Likewise.
16458         (fill_in_loclist_baton): Likewise.
16459         (dwarf2_symbol_mark_computed): Likewise.
16460         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16461         dwarf2_per_objfile.
16462         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16463         parameter.
16464         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16465         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16466         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16467         (set_die_type): Use dwarf2_free_objfile from cu.
16468         (get_die_type_at_offset): Likewise.
16469         (dwarf2_per_objfile_free): Don't assign global variable.
16470         (debug_names) <constructor>: Add dwarf2_per_objfile
16471         parameter, update m_debugstrlookup construction.
16472         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16473         parameter.
16474         <m_dwarf2_per_objfile>: New field.
16475         <lookup>: Use m_dwarf2_per_objfile.
16476         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16477         (psyms_seen_size): Likewise.
16478         (write_gdbindex): Replace objfile parameter with
16479         dwarf2_per_objfile.
16480         (write_debug_names): Likewise.
16481         (write_psymtabs_to_index): Likewise.
16482         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16483         calls.
16484
16485 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16486
16487         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16488         <dwarf2_per_objfile>: New field.
16489         (struct dwarf2_per_cu_data) <objfile>: Remove.
16490         <dwarf2_per_objfile>: New field.
16491         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16492         of objfile.
16493         (create_signatured_type_table_from_index): Likewise.
16494         (create_debug_type_hash_table): Likewise.
16495         (fill_in_sig_entry_from_dwo_entry): Likewise.
16496         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16497         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16498         objfile.
16499         (create_partial_symtab): Access objfile through
16500         dwarf2_per_objfile.
16501         (process_psymtab_comp_unit_reader): Likewise.
16502         (read_comp_units_from_section): Likewise.
16503         (scan_partial_symbols): Likewise.
16504         (add_partial_symbol): Likewise.
16505         (add_partial_subprogram): Likewise.
16506         (peek_die_abbrev): Likewise.
16507         (fixup_go_packaging): Likewise.
16508         (process_full_comp_unit): Likewise.
16509         (process_full_type_unit): Likewise.
16510         (process_imported_unit_die): Likewise.
16511         (dwarf2_compute_name): Likewise.
16512         (dwarf2_physname): Likewise.
16513         (read_import_statement): Likewise.
16514         (create_cus_hash_table): Assign dwarf2_physname instead of
16515         objfile.
16516         (read_func_scope): Access objfile through dwarf2_per_objfile.
16517         (read_lexical_block_scope): Likewise.
16518         (read_call_site_scope): Likewise.
16519         (read_variable): Likewise.
16520         (dwarf2_rnglists_process): Likewise.
16521         (dwarf2_ranges_process): Likewise.
16522         (dwarf2_ranges_read): Likewise.
16523         (dwarf2_record_block_ranges): Likewise.
16524         (dwarf2_add_field): Likewise.
16525         (dwarf2_add_member_fn): Likewise.
16526         (read_structure_type): Likewise.
16527         (process_structure_scope): Likewise.
16528         (read_enumeration_type): Likewise.
16529         (read_array_type): Likewise.
16530         (read_common_block): Likewise.
16531         (read_namespace_type): Likewise.
16532         (read_namespace): Likewise.
16533         (read_module_type): Likewise.
16534         (read_tag_pointer_type): Likewise.
16535         (read_tag_ptr_to_member_type): Likewise.
16536         (read_tag_string_type): Likewise.
16537         (read_subroutine_type): Likewise.
16538         (read_typedef): Likewise.
16539         (read_base_type): Likewise.
16540         (attr_to_dynamic_prop): Likewise.
16541         (read_subrange_type): Likewise.
16542         (read_unspecified_type): Likewise.
16543         (load_partial_dies): Likewise.
16544         (read_partial_die): Likewise.
16545         (find_partial_die): Likewise.
16546         (guess_partial_die_structure_name): Likewise.
16547         (fixup_partial_die): Likewise.
16548         (read_attribute_value): Likewise.
16549         (read_addr_index_from_leb128): Likewise.
16550         (dwarf2_read_addr_index): Likewise.
16551         (dwarf2_string_attr): Likewise.
16552         (lnp_state_machine::check_line_address): Likewise.
16553         (dwarf_decode_lines_1): Likewise.
16554         (dwarf_decode_lines): Likewise.
16555         (dwarf2_start_symtab): Likewise.
16556         (var_decode_location): Likewise.
16557         (new_symbol_full): Likewise.
16558         (dwarf2_const_value_data): Likewise.
16559         (dwarf2_const_value_attr): Likewise.
16560         (dwarf2_const_value): Likewise.
16561         (die_type): Likewise.
16562         (die_containing_type): Likewise.
16563         (lookup_die_type): Likewise.
16564         (guess_full_die_structure_name): Likewise.
16565         (anonymous_struct_prefix): Likewise.
16566         (dwarf2_name): Likewise.
16567         (follow_die_ref_or_sig): Likewise.
16568         (follow_die_offset): Likewise.
16569         (follow_die_ref): Likewise.
16570         (dwarf2_fetch_die_loc_sect_off): Likewise.
16571         (dwarf2_fetch_constant_bytes): Likewise.
16572         (dwarf2_fetch_die_type_sect_off): Likewise.
16573         (dwarf2_get_die_type): Likewise.
16574         (follow_die_sig): Likewise.
16575         (decode_locdesc): Likewise.
16576         (dwarf2_per_cu_objfile): Likewise.
16577         (dwarf2_per_cu_text_offset): Likewise.
16578         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16579         objfile.
16580         (set_die_type): Access objfile through
16581         dwarf2_per_objfile.
16582
16583 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16584
16585         * valprint.c (converted_character_d): Remove typedef.
16586         (DEF_VEC_O (converted_character_d)): Remove.
16587         (count_next_character): Use std::vector.
16588         (print_converted_chars_to_obstack): Likewise.
16589         (generic_printstr): Likewise.
16590
16591 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16592
16593         * xml-support.h (struct gdb_xml_value): Add constructor.
16594         <value>: Change type to unique_xmalloc_ptr.
16595         (gdb_xml_value_s): Remove typedef.
16596         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16597         (gdb_xml_element_start_handler): Change parameter type to
16598         std::vector.
16599         (xml_find_attribute): Likewise.
16600         * xml-support.c (xml_find_attribute): Change parameter type to
16601         std::vector and adjust.
16602         (gdb_xml_values_cleanup): Remove.
16603         (gdb_xml_parser::start_element): Adjust to std::vector.
16604         (xinclude_start_include): Change paraeter type to std::vector
16605         and adjust.
16606         * btrace.c (check_xml_btrace_version): Likewise.
16607         (parse_xml_btrace_block): Likewise.
16608         (parse_xml_btrace_pt_config_cpu): Likewise.
16609         (parse_xml_btrace_pt): Likewise.
16610         (parse_xml_btrace_conf_bts): Likewise.
16611         (parse_xml_btrace_conf_pt): Likewise.
16612         * memory-map.c (memory_map_start_memory): Likewise.
16613         (memory_map_start_property): Likewise.
16614         * osdata.c (osdata_start_osdata): Likewise.
16615         (osdata_start_item): Likewise.
16616         (osdata_start_column): Likewise.
16617         * remote.c (start_thread): Likewise.
16618         * solib-aix.c (library_list_start_library): Likewise.
16619         (library_list_start_list): Likewise.
16620         * solib-svr4.c (library_list_start_library): Likewise.
16621         (svr4_library_list_start_list): Likewise.
16622         * solib-target.c (library_list_start_segment): Likewise.
16623         (library_list_start_section): Likewise.
16624         (library_list_start_library): Likewise.
16625         (library_list_start_list): Likewise.
16626         * tracepoint.c (traceframe_info_start_memory): Likewise.
16627         (traceframe_info_start_tvar): Likewise.
16628         * xml-syscall.c (syscall_start_syscall): Likewise.
16629         * xml-tdesc.c (tdesc_start_target): Likewise.
16630         (tdesc_start_feature): Likewise.
16631         (tdesc_start_reg): Likewise.
16632         (tdesc_start_union): Likewise.
16633         (tdesc_start_struct): Likewise.
16634         (tdesc_start_flags): Likewise.
16635         (tdesc_start_enum): Likewise.
16636         (tdesc_start_field): Likewise.
16637         (tdesc_start_enum_value): Likewise.
16638         (tdesc_start_vector): Likewise.
16639
16640 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16641
16642         * extension.h (struct xmethod_worker) <clone>: Remove.
16643         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16644         Remove.
16645         (python_xmethod_worker::clone): Remove.
16646         * valops.c (find_overload_match): Use std::move instead of
16647         clone.
16648
16649 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16650
16651         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16652         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16653         <free_xmethod_worker_data>: Remove.
16654         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16655         <get_xmethod_arg_types>: Remove.
16656         <get_xmethod_result_type>: Remove.
16657         <invoke_xmethod>: Remove.
16658         * extension.c (new_xmethod_worker): Remove.
16659         (clone_xmethod_worker): Remove.
16660         (get_matching_xmethod_workers): Return void, pass std::vector by
16661         pointer.
16662         (get_xmethod_arg_types): Rename to...
16663         (xmethod_worker::get_arg_types): ... this, and adjust.
16664         (get_xmethod_result_type): Rename to...
16665         (xmethod_worker::get_result_type): ... this, and adjust.
16666         (invoke_xmethod): Remove.
16667         (free_xmethod_worker): Remove.
16668         (free_xmethod_worker_vec): Remove.
16669         * extension.h (enum ext_lang_rc): Move here from
16670         extension-priv.h.
16671         (struct xmethod_worker): Add constructor and destructor.
16672         <data>: Remove.
16673         <value>: Remove.
16674         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16675         virtual pure methods.
16676         <get_arg_types, get_result_type>: New methods.
16677         (xmethod_worker_ptr): Remove typedef.
16678         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16679         (xmethod_worker_vec): Remove typedef.
16680         (xmethod_worker_up): New typedef.
16681         (invoke_xmethod): Remove.
16682         (clone_xmethod_worker): Remove.
16683         (free_xmethod_worker): Remove.
16684         (free_xmethod_worker_vec): Remove.
16685         (get_xmethod_arg_types): Remove.
16686         (get_xmethod_result_type): Remove.
16687         * valops.c (find_method_list): Use std::vector, don't use
16688         intermediate vector.
16689         (value_find_oload_method_list): Use std::vector.
16690         (find_overload_match): Use std::vector.
16691         (find_oload_champ): Use std::vector.
16692         * value.c (value_free): Use operator delete.
16693         (value_of_xmethod): Rename to...
16694         (value_from_xmethod): ... this.  Don't assign
16695         xmethod_worker::value, take rvalue-reference.
16696         (result_type_of_xmethod): Adjust.
16697         (call_xmethod): Adjust.
16698         * value.h: Include extension.h.
16699         (struct xmethod_worker): Don't forward-declare.
16700         (value_of_xmethod): Rename to...
16701         (value_from_xmethod): ... this, take rvalue-reference.
16702         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16703         (struct python_xmethod_worker): ... this, add constructor and
16704         destructor.
16705         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16706         (gdbpy_free_xmethod_worker_data): Rename to...
16707         (python_xmethod_worker::~python_xmethod_worker): ... this and
16708         adjust.
16709         (gdbpy_clone_xmethod_worker_data): Rename to...
16710         (python_xmethod_worker::clone): ... this and adjust.
16711         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16712         temporary vector.
16713         (gdbpy_get_xmethod_arg_types): Rename to...
16714         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16715         (gdbpy_get_xmethod_result_type): Rename to...
16716         (python_xmethod_worker::do_get_result_type): ... this and
16717         adjust.
16718         (gdbpy_invoke_xmethod): Rename to...
16719         (python_xmethod_worker::invoke): ... this and adjust.
16720         (new_python_xmethod_worker): Rename to...
16721         (python_xmethod_worker::python_xmethod_worker): ... this and
16722         adjust.
16723         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16724         Remove.
16725         (gdbpy_free_xmethod_worker_data): Remove.
16726         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16727         (gdbpy_get_xmethod_arg_types): Remove.
16728         (gdbpy_get_xmethod_result_type): Remove.
16729         (gdbpy_invoke_xmethod): Remove.
16730         * python/python.c (python_extension_ops): Remove obsolete
16731         callbacks.
16732
16733 2018-01-05  Pedro Alves  <palves@redhat.com>
16734
16735         PR gdb/18653
16736         * common/signals-state-save-restore.c
16737         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16738         find a custom handler preinstalled, instead of internal erroring.
16739         But only warn if !quiet.
16740         * common/signals-state-save-restore.h
16741         (save_original_signals_state): New parameter 'quiet'.
16742         * main.c (captured_main_1): Move save_original_signals_state call
16743         after option handling, and pass QUIET.
16744
16745 2018-01-05  Pedro Alves  <palves@redhat.com>
16746
16747         * spu-tdep.c (spu_catch_start): Pass
16748         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16749
16750 2018-01-05  Pedro Alves  <palves@redhat.com>
16751
16752         PR gdb/22670
16753         * ada-lang.c (literal_symbol_name_matcher): New function.
16754         (ada_get_symbol_name_matcher): Use it for
16755         symbol_name_match_type::SEARCH_NAME.
16756         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16757         it down instead of assuming symbol_name_match_type::FULL.
16758         * block.h (block_lookup_symbol): New parameter 'match_type'.
16759         * c-valprint.c (print_unpacked_pointer): Use
16760         lookup_symbol_search_name instead of lookup_symbol.
16761         * compile/compile-object-load.c (get_out_value_type): Pass down
16762         symbol_name_match_type::SEARCH_NAME.
16763         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16764         symbol_name_match_type::FULL.
16765         * cp-support.c (cp_get_symbol_name_matcher): Handle
16766         symbol_name_match_type::SEARCH_NAME.
16767         * infrun.c (insert_exception_resume_breakpoint): Use
16768         lookup_symbol_search_name.
16769         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16770         * psymtab.c (maintenance_check_psymtabs): Use
16771         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16772         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16773         SYMBOL_SEARCH_NAME.
16774         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16775         if symbol_name_match_type::SEARCH_NAME.
16776         (lookup_symbol_in_language): Pass down
16777         symbol_name_match_type::FULL.
16778         (lookup_symbol_search_name): New.
16779         (lookup_language_this): Pass down
16780         symbol_name_match_type::SEARCH_NAME.
16781         (lookup_symbol_aux, lookup_local_symbol): New parameter
16782         'match_type'.  Pass it down.
16783         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16784         (lookup_symbol_search_name): New declaration.
16785         (lookup_symbol_in_block): New 'match_type' parameter.
16786
16787 2018-01-05  Pedro Alves  <palves@redhat.com>
16788
16789         PR gdb/22670
16790         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16791         ada_lookup_symbol.
16792         (ada_lookup_symbol): Reimplement in terms of
16793         ada_lookup_symbol_list, bits factored out from
16794         ada_lookup_encoded_symbol.
16795
16796 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16797
16798         * ada-exp.y (write_object_renaming): When subscripting an array
16799         using a symbol as the index, pass the block in call to
16800         ada_lookup_encoded_symbol when looking that symbol up.
16801
16802 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16803
16804         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16805         TYPE_INDEX_TYPE.
16806
16807 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16808
16809         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16810         the case where VALUE_LVAL (val0) is not lval_memory.
16811
16812 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16813
16814         * ada-valprint.c (print_optional_low_bound): Handle
16815         character-indexed array printing like boolean-indexed array
16816         printing.
16817
16818 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16819
16820         * NEWS: Create a new section for the next release branch.
16821         Rename the section of the current branch, now that it has
16822         been cut.
16823
16824 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16825
16826         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16827         * version.in: Bump version to 8.1.50.DATE-git.
16828
16829 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16830
16831         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16832         Add field.
16833         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16834         Add field.
16835         (default_exception_support_info) <catch_handlers_sym>: Add field.
16836         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16837         (ada_exception_name_addr_1): Add "catch handlers" handling.
16838         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16839         Update all callers.
16840         (create_excep_cond_exprs) <ex>: Add parameter.
16841         (re_set_exception): Update create_excep_cond_exprs call.
16842         (print_it_exception, print_one_exception, print_mention_exception)
16843         (print_recreate_exception): Add "catch handler" handling.
16844         (allocate_location_catch_handlers, re_set_catch_handlers)
16845         (check_status_catch_handlers, print_it_catch_handlers)
16846         (print_one_catch_handlers, print_mention_catch_handlers)
16847         (print_recreate_catch_handlers): New function.
16848         (catch_handlers_breakpoint_ops): New variable.
16849         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16850         Add parameter.  Add "catch handler" handling.
16851         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16852         Add "catch handler" handling.
16853         (ada_exception_catchpoint_cond_string): Add "catch handler"
16854         handling.
16855         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16856         call.
16857         (catch_ada_handlers_command): New function.
16858         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16859         operations structure.
16860         (_initialize_ada_language): Add "catch handlers" command entry.
16861         * NEWS: Document "catch handlers" feature.
16862
16863 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16864
16865         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16866         account when creating the array type of the slice.
16867         (ada_value_slice): Likewise.
16868
16869 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16870
16871         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16872         New enum value.
16873         (create_array_type_with_stride): Add byte_stride_prop parameter.
16874         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16875         New parameter.  Update all callers in this file.
16876         (array_type_has_dynamic_stride): New function.
16877         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16878         of arrays with dynamic byte strides.
16879         * dwarf2read.c (read_array_type): Add support for dynamic
16880         DW_AT_byte_stride attributes.
16881
16882 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16883
16884         * dwarf2read.c (read_unspecified_type): Treat
16885         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16886
16887 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16888
16889         Update copyright year range in all GDB files.
16890
16891 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16892
16893         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16894         and gdb/testsuite/gdb.base/step-line.c.
16895
16896 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16897
16898         * copyright.py (main): Dump the contents of
16899         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16900         even if BY_HAND is empty.
16901
16902 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16903
16904         * top.c (print_gdb_version): Update Copyright year in version
16905         message.
16906
16907 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16908
16909         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16910
16911 For older changes see ChangeLog-2017.
16912 \f
16913 Local Variables:
16914 mode: change-log
16915 left-margin: 8
16916 fill-column: 74
16917 version-control: never
16918 coding: utf-8
16919 End: