dc4dd30e5ea0793e405c502b6036a75e06c553a7
[external/binutils.git] / gdb / ChangeLog
1 2018-12-27  Tom Tromey  <tom@tromey.com>
2
3         * minsyms.h (class minimal_symbol_reader): Use
4         DISABLE_COPY_AND_ASSIGN.
5
6 2018-12-27  Tom Tromey  <tom@tromey.com>
7
8         * python/python.c (python_interactive_command): Use std::string.
9         (gdbpy_parameter): Likewise.
10         * python/py-utils.c (unicode_to_encoded_string): Update comment.
11         * python/py-symtab.c (salpy_str): Use PyString_FromFormat.
12         * python/py-record-btrace.c (recpy_bt_insn_data): Use
13         byte_vector.
14         * python/py-objfile.c (objfpy_get_build_id): Use
15         unique_xmalloc_ptr.
16         * python/py-inferior.c (infpy_read_memory): Use
17         unique_xmalloc_ptr.
18         * python/py-cmd.c (gdbpy_parse_command_name): Use std::string.
19
20 2018-12-26  Simon Marchi  <simon.marchi@polymtl.ca>
21
22         * target.c (target_terminal::restore_inferior): Remove struct keyword.
23
24 2018-12-26  Simon Marchi  <simon.marchi@ericsson.com>
25
26         * build-id.c (build_id_to_debug_bfd): Enhance debug output.
27         * symfile.c (separate_debug_file_exists): Likewise.
28
29 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
30
31         * c-exp.y (field_name): Allow DOUBLE_KEYWORD, INT_KEYWORD, LONG,
32         SHORT, SIGNED_KEYWORD, and UNSIGNED tokens to act as a field
33         names.
34         (typename_stoken): New function.
35
36 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
37
38         * c-exp.y (field_name): New %token, and new rule.
39         (exp): Replace uses of 'name' with 'field_name' where appropriate.
40
41 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
42
43         PR gdb/13368
44         * c-exp.y (typebase): Extend the comment.
45         (ident_tokens): Likewise.
46
47 2018-12-18  Tom Tromey  <tom@tromey.com>
48
49         * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
50         address of sect_off.
51
52 2018-12-23  Joel Brobecker  <brobecker@adacore.com>
53
54         GDB 8.2.1 released.
55
56 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
57
58         * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
59         assigning locations.
60         (riscv_return_value): Take more care not to read/write outside of
61         argument buffer.  Cast return value between the declared type and
62         the abi type.
63
64 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
65
66         * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
67         fflags, and frm registers.
68
69 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
70
71         * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
72         (riscv_gdbarch_init): Register new function with gdbarch.
73         * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
74
75 2018-12-21  Simon Marchi  <simon.marchi@ericsson.com>
76
77         * minsyms.c (mst_str): New.
78         (minimal_symbol_reader::record_full): Add debug output.
79
80 2018-12-21  John Baldwin  <jhb@FreeBSD.org>
81
82         * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
83         equal PL_FLAG_SI.
84         (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
85
86 2018-12-21  Paul Marechal  <paul.marechal@ericsson.com>
87
88         PR gdb/23974
89         * target.c (target_read_stralloc): Check for empty vector.
90
91 2018-12-21  Дилян Палаузов  <dilyan.palauzov@aegee.org>
92
93         * top.c (print_gdb_configuration): Print "--without-python"
94         if GDB was configured without Python.
95
96 2018-12-21  Andrew Burgess  <andrew.burgess@embecosm.com>
97
98         * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
99         a signed offset as a string.
100
101 2018-12-21  Dave Murphy  <davem@devkitpro.org>
102
103         * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
104         initialise.
105         * probe.c (any_static_probe_ops): Ditto.
106         * record-btrace.c (record_btrace_thread_observer_token): Ditto.
107         * stap-probe.c (stap_static_probe_ops): Ditto.
108         * tui/tui-hooks.c (tui_observers_token): Ditto.
109         * unittests/observable-selftests.c (token1, token2, token3): Ditto.
110
111 2018-12-19  Andrew Burgess  <andrew.burgess@embecosm.com>
112
113         * gdb/dummy-frame.c (default_dummy_id): Defined new function.
114         * gdb/dummy-frame.h (default_dummy_id): Declare new function.
115         * gdb/frame-unwind.c (default_unwind_pc): Define new function.
116         (default_unwind_sp): Define new function.
117         * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
118         (default_unwind_sp): Declare new function.
119         * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
120         available.
121         (get_frame_sp): Assume that gdbarch_unwind_sp is available.
122         * gdb/gdbarch.c: Regenerate.
123         * gdb/gdbarch.h: Regenerate.
124         * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
125         unwind_sp.  Add additional header files to be included in
126         generated file.
127
128 2018-12-19  Dimitar Dimitrov  <dimitar@dinux.eu>
129
130         * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
131         sp clobbers.
132
133 2018-12-17  Andrew Burgess  <andrew.burgess@embecosm.com>
134
135         * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
136         'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
137         'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
138         'processing_has_namespace_info' from unsigned int to bool.  Update
139         comments.
140         (producer_is_icc_lt_14): Update return type.
141         (producer_is_gcc_lt_4_3): Likewise.
142         (producer_is_gxx_lt_4_6): Likewise.
143         (process_die): Write true instead of 1 into predicate fields.
144         (dwarf2_start_symtab): Likewise.
145         (var_decode_location): Likewise.
146         (dwarf2_mark_helper): Likewise.
147         (dwarf2_mark): Likewise.
148         (dwarf2_clear_marks): Write false instead of 0 into predicate
149         field.
150         (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
151         0.
152
153 2018-12-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
154
155         * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
156         asm/sigcontext.h.
157
158 2018-12-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
159
160         * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
161         warning trailing new line.
162
163 2018-12-16  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
164
165         * nat/linux-ptrace.c (kill_child): New function.
166         (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
167         Add a call to kill_child in case of early return after fork.
168         (linux_check_ptrace_features): Use kill_child instead of local code.
169         (linux_test_for_tracefork): Likewise.
170
171 2018-12-14  Tom Tromey  <tom@tromey.com>
172
173         * Makefile.in: Remove "alloca" comment.
174         (INFOFILES): Remove.
175         (local-maintainer-clean): Don't use INFOFILES.
176
177 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
178
179         * syscalls/update-freebsd.sh: New file.
180         * syscalls/freebsd.xml: Regenerate.
181
182 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
183
184         * NEWS: Add entry documenting system call aliases.
185         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
186         to get_syscalls_by_name.
187         * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
188         * gdbarch.h: Regenerate.
189         * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
190         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
191         from get_syscall_by_name.  Now accepts a pointer to a vector of
192         integers and returns a bool.
193         [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
194         (syscall_create_syscall_desc): Add alias parameter and pass it to
195         syscall_desc constructor.
196         (syscall_start_syscall): Handle alias attribute.
197         (syscall_attr): Add alias attribute.
198         (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
199         Now accepts a pointer to a vector of integers and returns a
200         bool.  Add syscalls whose alias or name matches the requested
201         name.
202         (get_syscalls_by_name): Rename from get_syscall_by_name.  Now
203         accepts a pointer to a vector of integers and returns a bool.
204         * xml-syscall.h (get_syscalls_by_name): Likewise.
205
206 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
207
208         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
209         to get_syscalls_by_group.
210         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
211         false.
212         [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
213         numbers to an existing vector of integers and return a bool.
214         (get_syscalls_by_group): Accept pointer to vector of integers
215         and change return type to bool.
216         * xml-syscall.h (get_syscalls_by_group): Likewise.
217
218 2018-12-13  Jim Wilson  <jimw@sifive.com>
219
220         * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
221         comment for SD field, and correct xlen calculation.  For MISA, add
222         comment for MXL field, add call to register_size, and correct base
223         calculation.
224
225 2018-12-13  Stafford Horne  <shorne@gmail.com>
226
227         * NEWS(New targets): Add or1k*-*-linux*.
228
229 2018-12-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
230
231         * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
232         declare on one line to fix ARI warning.
233
234 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
235
236         * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
237         (infcall_suspend_state::registers): New.
238         (infcall_suspend_state::restore): New.
239         (infcall_suspend_state::thread_suspend): Rename to...
240         (infcall_suspend_state::m_thread_suspend): ...this.
241         (infcall_suspend_state::registers): Rename to...
242         (infcall_suspend_state::m_registers): ...this.
243         (infcall_suspend_state::siginfo_gdbarch): Rename to...
244         (infcall_suspend_state::m_siginfo_gdbarch): ...this.
245         (infcall_suspend_state::siginfo_data): Rename to...
246         (infcall_suspend_state::m_siginfo_data): ...this.
247         (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
248         constructor.
249         (restore_infcall_suspend_state): Rewrite to use
250         infcall_suspend_state::restore method.
251         (get_infcall_suspend_state_regcache): Use
252         infcall_suspend_state::registers method.
253
254 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
255
256         * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
257         arguments are passed in integer registers.
258         (riscv_call_arg_complex_float): Likewise.
259
260 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
261
262         * nat/linux-osdata.c (common_getter): New function.
263         (struct osdata_type): Change getter to take_snapshot.
264         Add LONGEST len_avail and struct buffer buffer.
265         Change all elements in the initializer.
266         Add an element for the list of types.
267         (linux_xfer_osdata_info_os_types): New function.
268         (linux_common_xfer_osdata): Use common_getter for the list of types.
269         Replace getter call by common_getter.
270         (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
271         Add arg BUFFER.  Only keep the code that adds data in BUFFER.
272         (linux_xfer_osdata_fds): Likewise.
273         (linux_xfer_osdata_modules): Likewise.
274         (linux_xfer_osdata_msg): Likewise.
275         (linux_xfer_osdata_processes): Likewise.
276         (linux_xfer_osdata_processgroups): Likewise.
277         (linux_xfer_osdata_sem): Likewise.
278         (linux_xfer_osdata_shm): Likewise.
279         (linux_xfer_osdata_isockets): Likewise.
280         (linux_xfer_osdata_threads): Likewise.
281
282 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
283
284         * nat/linux-osdata.c: Removed various trailing spaces.
285
286 2018-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
287
288         * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
289         leading whitespace before #include line.
290
291 2018-12-08  Simon Marchi  <simon.marchi@ericsson.com>
292             Дилян Палаузов  <dilyan.palauzov@aegee.org>
293
294         PR gdb/23950
295         * configure.ac: Search for tgetent in libtinfow.
296         * configure: Re-generate.
297
298 2018-12-08  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
299
300         * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
301         (thread_db_err_str): Forward declare.
302         (delete_thread_db_info): Call td_ta_delete_p if available.
303         (try_thread_db_load_1): Acquire td_ta_delete address.
304         * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
305
306 2018-12-08  Pedro Alves  <palves@redhat.com>
307
308         * source.c (forward_search_command): Rename to ...
309         (search_command_helper): ... this.  Add 'forward' parameter.
310         Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
311         buffer.  Handle backward searches too.
312         (forward_search_command, reverse_search_command): Reimplement by
313         calling search_command_helper.
314
315 2018-12-07  Andrew Burgess  <andrew.burgess@embecosm.com>
316
317         * .dir-locals.el: Copy most of the settings from c-mode over to
318         c++-mode.
319
320 2018-12-08  Stafford Horne  <shorne@gmail.com>
321
322         * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
323         * configure.tgt: Add or1k*-*-linux*.
324         * or1k-linux-tdep.c: New file.
325         * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
326
327 2018-12-07  Pedro Alves  <palves@redhat.com>
328
329         * dwarf2read.c (get_gdb_index_contents_from_section): Use
330         gdb::make_array_view.
331
332 2018-12-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
333
334         * language.c (_initialize_language): Fix leak by assigning
335         a static string to language.  Same for range and case_sensitive,
336         even if no leak is detected for these variables.
337
338 2018-12-05  John Baldwin  <jhb@FreeBSD.org>
339
340         * configure: Re-generate.
341         * configure.ac: Use separate sed expressions to escape variables
342         in auto-load directories.
343
344 2018-12-05  Andrew Burgess  <andrew.burgess@embecosm.com>
345
346         * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
347         (riscv_find_default_target_description): Use new function to
348         extract feature from gdbarch_info.
349         (riscv_gdbarch_init): Add error checks for xlen and flen between
350         target description and bfd headers.  Be smarter about when we
351         think the hardware floating point abi should be used.
352
353 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
354
355         * nat/aarch64-linux-hw-point.c
356         (aarch64_linux_any_set_debug_regs_state): New function.
357         * nat/aarch64-linux-hw-point.h
358         (aarch64_linux_any_set_debug_regs_state): New declaration.
359         * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
360         BPs or WPs are set.
361
362 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
363
364         * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
365         (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
366
367 2018-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
368             Simon Marchi  <simon.marchi@ericsson.com>
369
370         * linespec.c (symtab_vector_up): Remove.
371         (symtabs_from_filename): Change return type to std::vector.
372         (collect_symtabs_from_filename): Likewise.
373         (create_sals_line_offset): Assign return value of
374         collect_symtabs_from_filename to *ls->file_symtabs.
375         (convert_explicit_location_to_linespec): Remove call to release.
376         (parse_linespec): Likewise.
377         (symtab_collector) <symtab_collector>: Remove initialization of
378         m_symtabs.
379         <release_symtabs>: Change return type to std::vector<symtab *>.
380         <operator ()>: Adjust.
381
382 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
383
384         * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
385         defined.
386         (union sigval32, struct siginfo32, fbsd_siginfo_size)
387         (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
388         of KERN_PROC_AUXV and PT_LWPINFO.
389         (fbsd_nat_target::xfer_partial): Define method unconditionally.
390         Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
391         Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
392         Make TARGET_OBJECT_FREEBSD_VMMAP and
393         TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
394         and KERN_PROC_PS_STRINGS.
395         * fbsd-nat.h: Include <sys/proc.h>.
396         (fbsd_nat_target::xfer_partial): Declare method unconditionally.
397
398 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
399
400         * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
401         header files.
402         (riscv_linux_nat_target::read_description): New method.
403
404 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
405
406         * arch/riscv.h (riscv_gdbarch_features::hash): New method.
407         * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
408         (riscv_tdesc_cache): New global.
409         (riscv_create_target_description): Look in the cache before
410         creating a new target description.
411
412 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
413
414         * arch/riscv.h (riscv_gdb_features::operator==): New.
415         (riscv_gdb_features::operator!=): New.
416         * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
417         operator.
418
419 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
420
421         * arch/riscv.h (riscv_create_target_description): Make return type
422         const.
423         * arch/riscv.c (riscv_create_target_description): Likewise.
424         * riscv-tdep.c (riscv_find_default_target_description): Likewise.
425
426 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
427             Keith Seitz  <keiths@redhat.com>
428             Tom Tromey  <tom@tromey.com>
429             Sergio Durigan Junior  <sergiodj@redhat.com>
430
431         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
432         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
433         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
434         inside the CU.
435
436 2018-11-30  Pedro Alves  <palves@redhat.com>
437
438         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
439         <stratum>: New override.
440         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
441         <stratum>: New override.
442         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
443         <stratum>: New override.
444         * exec.c (exec_target) <exec_target>: Delete.
445         <stratum>: New override.
446         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
447         stratum method instead of the to_stratum field.
448         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
449         <stratum>: New override.
450         (thread_db_target::thread_db_target): Delete.
451         * make-target-delegates (print_class): Don't print a ctor
452         declaration.  Print a stratum method override declaration.
453         * process-stratum-target.h (process_stratum_target)
454         <process_stratum_target>: Delete.
455         <stratum>: New override.
456         * ravenscar-thread.c (ravenscar_thread_target)
457         <ravenscar_thread_target>: Delete.
458         <stratum>: New override.
459         * record-btrace.c (record_btrace_target)
460         <record_btrace_target>: Delete.
461         <stratum>: New override.
462         * record-full.c (record_full_base_target)
463         <record_full_base_target>: Delete.
464         <stratum>: New override.
465         * record.c (record_disconnect, record_detach)
466         (record_mourn_inferior, record_kill): Adjust to use the stratum
467         method instead of the to_stratum field.
468         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
469         * sol-thread.c (sol_thread_target)
470         <sol_thread_target>: Delete.
471         <stratum>: New override.
472         * spu-multiarch.c (spu_multiarch_target)
473         <spu_multiarch_target>: Delete.
474         <stratum>: New override.
475         * target-delegates.c: Regenerate.
476         * target.c (target_stack::push, target_stack::unpush)
477         (pop_all_targets_above, pop_all_targets_at_and_above)
478         (info_target_command, target_require_runnable)
479         (target_stack::find_beneath): Adjust to use the stratum method
480         instead of the to_stratum field.
481         (dummy_target::dummy_target): Delete.
482         (dummy_target::stratum): New.
483         (debug_target::debug_target): Delete.
484         (debug_target::stratum): New.
485         (maintenance_print_target_stack): Adjust to use the stratum method
486         instead of the to_stratum field.
487         * target.h (struct target_ops) <stratum>: New method.
488         <to_stratum>: Delete.
489         <is_pushed>: Adjust to use the stratum method
490         instead of the to_stratum field.
491
492 2018-11-30  Pedro Alves  <palves@redhat.com>
493
494         * corelow.c (core_target) <has_all_memory, has_execution>: New
495         overrides.
496         * inf-child.c (inf_child_target::has_all_memory)
497         (inf_child_target::has_memory, inf_child_target::has_stack)
498         (inf_child_target::has_registers)
499         (inf_child_target::has_execution): Delete.
500         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
501         has_stack, has_registers, has_execution>: Delete.
502         * process-stratum-target.c
503         (process_stratum_target::has_all_memory)
504         (process_stratum_target::has_memory)
505         (process_stratum_target::has_stack)
506         (process_stratum_target::has_registers)
507         (process_stratum_target::has_execution): New.
508         * process-stratum-target.h (process_stratum_target)
509         <has_all_memory, has_memory, has_stack, has_registers,
510         has_execution>: New method overrides.
511         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
512         has_memory, has_stack, has_registers, has_execution>: Delete.
513         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
514         has_execution>: Delete.
515         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
516         has_registers, has_execution>: Delete.
517         * target.c (default_child_has_all_memory)
518         (default_child_has_memory, default_child_has_stack)
519         (default_child_has_registers, default_child_has_execution):
520         Delete.
521         * target.h (default_child_has_all_memory)
522         (default_child_has_memory, default_child_has_stack)
523         (default_child_has_registers, default_child_has_execution):
524         Delete.
525         * tracefile.h (tracefile_target) <has_execution>: New override.
526
527 2018-11-30  Pedro Alves  <palves@redhat.com>
528
529         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
530         * bsd-kvm.c: Include "process-stratum-target.h".
531         (bsd_kvm_target): Now inherits from process_stratum_target.
532         (bsd_kvm_target::bsd_kvm_target): Default it.
533         * corelow.c: Include "process-stratum-target.h".
534         (core_target): Now inherits from process_stratum_target.
535         (core_target::core_target): Don't set to_stratum here.
536         * inf-child.c (inf_child_target::inf_child_target): Delete.
537         * inf-child.h: Include "process-stratum-target.h".
538         (inf_child_target): Inherit from process_stratum_target.
539         (inf_child_target) <inf_child_target>: Default it.
540         <can_async_p, supports_non_stop, supports_disable_randomization>:
541         Delete overrides.
542         * process-stratum-target.c: New file.
543         * process-stratum-target.h: New file.
544         * remote-sim.c: Include "process-stratum-target.h".
545         (gdbsim_target): Inherit from process_stratum_target.
546         <gdbsim_target>: Default it.
547         * remote.c: Include "process-stratum-target.h".
548         (remote_target): Inherit from process_stratum_target.
549         <remote_target>: Default it.
550         * target.c (default_thread_address_space)
551         (default_thread_architecture): Delete.
552         * target.h (target_ops) <thread_architecture>: Now returns NULL by
553         default.
554         <thread_address_space>: Ditto.
555         * test-target.h: Include "process-stratum-target.h" instead of
556         "target.h".
557         (test_target_ops): Inherit from process_stratum_target.
558         <test_target_ops>: Default it.
559         * tracefile.c (tracefile_target::tracefile_target): Delete.
560         * tracefile.h: Include "process-stratum-target.h".
561         (tracefile_target): Inherit from process_stratum_target.
562         <tracefile_target>: Default it.
563         * target-delegates.c: Regenerate.
564
565 2018-11-30  Pedro Alves  <palves@redhat.com>
566
567         * Makefile.in (COMMON_SFILES): Add test-target.c.
568         * gdbarch-selftests.c: Include "test-target.h".
569         * regcache.c: Include "test-target.h".
570         * target.c (test_target_info, test_target_ops::info): Move to ...
571         * test-target.c: ... this new file.
572         * target.h (test_target_ops): Move to ...
573         * test-target.h: ... this new file.
574
575 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
576
577         * source.c (forward_search_command): Fix leak by using
578         xrealloc even for the first allocation in the loop, as buf
579         is static.
580
581 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
582
583         PR gdb/23093
584         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
585         (fbsd_gdb_signal_to_target): New.
586         (fbsd_init_abi): Install gdbarch "signal_from_target" and
587         "signal_to_target" methods.
588
589 2018-11-29  Tom Tromey  <tom@tromey.com>
590
591         * valarith.c (value_x_unop): Don't set argvec[3].
592
593 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
594
595         PR gdb/23917
596         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
597         semicolon.
598
599 2018-11-26  Pedro Alves  <palves@redhat.com>
600
601         * procfs.c (procfs_notice_thread): Replace uses of
602         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
603         * sol-thread.c (sol_thread_target::wait)
604         (sol_update_thread_list_callback): Likewise.
605
606 2018-11-25  Tom Tromey  <tom@tromey.com>
607
608         * ui-out.c (ui_out::field_fmt): Remove comment.
609         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
610         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
611
612 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
613
614         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
615         leak in open_source_file' has been partially undone by '2179fbc36d23
616         Return scoped_fd from open_source_file'. Re-add the transfer of
617         current s->fullname to the unique_xmalloc_ptr fullname given
618         to find_and_open_source.
619
620 2018-11-23  Pedro Alves  <palves@redhat.com>
621
622         * gdbthread.h (enum thread_state): Move comments here.
623         (is_running, is_stopped, is_exited): Remove declarations.
624
625 2018-11-22  Pedro Alves  <palves@redhat.com>
626
627         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
628         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
629         ALL_NON_EXITED_THREADS with all_non_exited_threads.
630         (print_one_breakpoint_location): Replace ALL_INFERIORS with
631         all_inferiors.
632         * bsd-kvm.c: Include inferior.h.
633         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
634         with all_non_exited_threads.
635         * common/filtered-iterator.h: New.
636         * common/safe-iterator.h: New.
637         * corelow.c (core_target_open): Don't call init_thread_list here.
638         * darwin-nat.c (thread_info_from_private_thread_info): Replace
639         ALL_THREADS with all_threads.
640         * fbsd-nat.c (fbsd_nat_target::resume): Replace
641         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
642         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
643         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
644         * fork-child.c (postfork_hook): Don't call init_thread_list here.
645         * gdbarch-selftests.c (register_to_value_test): Adjust.
646         * gdbthread.h: Don't include "inferior.h" here.
647         (struct inferior): Forward declare.
648         (enum step_over_calls_kind): Moved here from inferior.h.
649         (thread_info::deletable): Definition moved to thread.c.
650         (find_thread_ptid (inferior *, ptid_t)): Declare.
651         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
652         Include "thread-iter.h".
653         (all_threads, all_non_exited_threads, all_threads_safe): New.
654         (any_thread_p): Declare.
655         (thread_list): Delete.
656         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
657         all_non_exited_threads.
658         (proceed_after_attach_callback): Delete.
659         (proceed_after_attach): Take an inferior pointer instead of an
660         integer PID.  Adjust to use range-for.
661         (attach_post_wait): Pass down inferior pointer instead of pid.
662         Use range-for instead of ALL_NON_EXITED_THREADS.
663         (detach_command): Remove init_thread_list call.
664         * inferior-iter.h: New.
665         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
666         (delete_thread_of_inferior): Delete.
667         (delete_inferior, exit_inferior_1): Use range-for with
668         inf->threads_safe() instead of iterate_over_threads.
669         (inferior_appeared): Call init_thread_list here.
670         (discard_all_inferiors): Use all_non_exited_inferiors.
671         (find_inferior_id, find_inferior_pid): Use all_inferiors.
672         (iterate_over_inferiors): Use all_inferiors_safe.
673         (have_inferiors, number_of_live_inferiors): Use
674         all_non_exited_inferiors.
675         (number_of_inferiors): Use all_inferiors and std::distance.
676         (print_inferior): Use all_inferiors.
677         * inferior.h: Include gdbthread.h.
678         (enum step_over_calls_kind): Moved to gdbthread.h.
679         (struct inferior) <thread_list>: New field.
680         <threads, non_exited_threads, threads_safe>: New methods.
681         (ALL_INFERIORS): Delete.
682         Include "inferior-iter.h".
683         (ALL_NON_EXITED_INFERIORS): Delete.
684         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
685         functions.
686         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
687         ALL_NON_EXITED_THREADS with all_non_exited_threads.
688         * infrun.c (follow_exec): Use all_threads_safe.
689         (clear_proceed_status, proceed): Use all_non_exited_threads.
690         (init_wait_for_inferior): Don't clear inline frame state here.
691         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
692         all_threads instead of ALL_NON_EXITED_THREADS.
693         (random_pending_event_thread): Use all_non_exited_threads instead
694         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
695         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
696         instead of ALL_NON_EXITED_THREADS.
697         (handle_no_resumed): Use all_non_exited_threads instead of
698         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
699         ALL_INFERIORS.
700         (restart_threads, switch_back_to_stepped_thread): Use
701         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
702         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
703         all_inferiors.
704         (kill_unfollowed_fork_children): Use inf->non_exited_threads
705         instead of ALL_NON_EXITED_THREADS.
706         * linux-tdep.c (linux_make_corefile_notes): Use
707         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
708         * linux-thread-db.c (thread_db_target::update_thread_list):
709         Replace ALL_INFERIORS with all_inferiors.
710         (thread_db_target::thread_handle_to_thread_info): Use
711         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
712         * mi/mi-interp.c (multiple_inferiors_p): New.
713         (mi_on_resume_1): Simplify using all_non_exited_threads and
714         multiple_inferiors_p.
715         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
716         instead of ALL_NON_EXITED_THREADS.
717         * nto-procfs.c (nto_procfs_target::open): Don't call
718         init_thread_list here.
719         * record-btrace.c (record_btrace_target_open)
720         (record_btrace_target::stop_recording)
721         (record_btrace_target::close)
722         (record_btrace_target::record_is_replaying)
723         (record_btrace_target::resume, record_btrace_target::wait)
724         (record_btrace_target::record_stop_replaying): Use
725         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
726         * record-full.c (record_full_wait_1): Use all_non_exited_threads
727         instead of ALL_NON_EXITED_THREADS.
728         * regcache.c (cooked_read_test): Remove reference to global
729         thread_list.
730         * remote-sim.c (gdbsim_target::create_inferior): Don't call
731         init_thread_list here.
732         * remote.c (remote_target::update_thread_list): Use
733         all_threads_safe instead of ALL_NON_EXITED_THREADS.
734         (remote_target::process_initial_stop_replies): Replace
735         ALL_INFERIORS with all_non_exited_inferiors and use
736         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
737         (remote_target::open_1): Don't call init_thread_list here.
738         (remote_target::append_pending_thread_resumptions)
739         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
740         instead of ALL_NON_EXITED_THREADS.
741         (remote_target::commit_resume)
742         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
743         with all_non_exited_inferiors and use all_non_exited_threads
744         instead of ALL_NON_EXITED_THREADS.
745         (remote_target::kill_new_fork_children): Use
746         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
747         init_thread_list and init_wait_for_inferior calls.
748         (remote_target::remote_btrace_maybe_reopen)
749         (remote_target::thread_handle_to_thread_info): Use
750         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
751         * target.c (target_terminal::restore_inferior)
752         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
753         all_non_exited_inferiors.
754         * thread-iter.c: New file.
755         * thread-iter.h: New file.
756         * thread.c: Include "inline-frame.h".
757         (thread_list): Delete.
758         (clear_thread_inferior_resources): Call clear_inline_frame_state.
759         (init_thread_list): Use all_threads_safe instead of
760         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
761         (new_thread): Adjust to per-inferior thread lists.
762         (add_thread_silent): Pass inferior to find_thread_ptid.
763         (thread_info::deletable): New, moved from the header.
764         (delete_thread_1): Adjust to per-inferior thread lists.
765         (find_thread_global_id): Use inf->threads().
766         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
767         find_thread_ptid.
768         (find_thread_ptid(inferior*, ptid_t)): New overload.
769         (iterate_over_threads): Use all_threads_safe.
770         (any_thread_p): New.
771         (thread_count): Use all_threads and std::distance.
772         (live_threads_count): Use all_non_exited_threads and
773         std::distance.
774         (valid_global_thread_id): Use all_threads.
775         (in_thread_list): Use find_thread_ptid.
776         (first_thread_of_inferior): Adjust to per-inferior thread lists.
777         (any_thread_of_inferior, any_live_thread_of_inferior): Use
778         inf->non_exited_threads().
779         (prune_threads, delete_exited_threads): Use all_threads_safe.
780         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
781         (set_resumed, set_running): Use all_non_exited_threads.
782         (is_thread_state, is_stopped, is_exited, is_running)
783         (is_executing): Delete.
784         (set_executing, set_stop_requested, finish_thread_state): Use
785         all_non_exited_threads.
786         (print_thread_info_1): Use all_inferiors and all_threads.
787         (thread_apply_all_command): Use all_non_exited_threads.
788         (thread_find_command): Use all_threads.
789         (update_threads_executing): Use all_non_exited_threads.
790         * tid-parse.c (parse_thread_id): Use inf->threads.
791         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
792
793 2018-11-22  Pedro Alves  <palves@redhat.com>
794
795         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
796         switch to it before calling into try_open_exec_file.
797
798 2018-11-22  Pedro Alves  <palves@redhat.com>
799
800         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
801         inferior_thread instead of find_thread_ptid, and only when
802         inferior_ptid is not null_ptid.
803         * inferior.c (add_inferior): Don't include target_pid_to_str
804         output when the inferior is not started.
805         * python/py-inferior.c (python_on_normal_stop): Don't use
806         find_thread_ptid.
807         (tui_on_user_selected_context_changed): Use inferior_thread
808         instead of find_thread_ptid, and only when inferior_ptid is not
809         null_ptid.
810
811 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
812
813         PR python/23714
814         * gdb/python/python.c (execute_gdb_command): Call
815         prevent_dont_repeat earlier to avoid affecting dont_repeat.
816
817 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
818
819         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
820         (HFILES_NO_SRCDIR): Add arch/riscv.h.
821         * arch/riscv.c: New file.
822         * arch/riscv.h: New file.
823         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
824         this list, and add arch/riscv.o.
825         * features/Makefile: Add riscv features.
826         * features/riscv/32bit-cpu.c: New file.
827         * features/riscv/32bit-cpu.xml: New file.
828         * features/riscv/32bit-csr.c: New file.
829         * features/riscv/32bit-csr.xml: New file.
830         * features/riscv/32bit-fpu.c: New file.
831         * features/riscv/32bit-fpu.xml: New file.
832         * features/riscv/64bit-cpu.c: New file.
833         * features/riscv/64bit-cpu.xml: New file.
834         * features/riscv/64bit-csr.c: New file.
835         * features/riscv/64bit-csr.xml: New file.
836         * features/riscv/64bit-fpu.c: New file.
837         * features/riscv/64bit-fpu.xml: New file.
838         * features/riscv/rebuild-csr-xml.sh: New file.
839         * riscv-tdep.c: Add 'arch/riscv.h' include.
840         (riscv_gdb_reg_names): Delete.
841         (csr_reggroup): New global.
842         (struct riscv_register_alias): Delete.
843         (struct riscv_register_feature): New structure.
844         (riscv_register_aliases): Delete.
845         (riscv_xreg_feature): New global.
846         (riscv_freg_feature): New global.
847         (riscv_virtual_feature): New global.
848         (riscv_csr_feature): New global.
849         (riscv_create_csr_aliases): New function.
850         (riscv_read_misa_reg): Delete.
851         (riscv_has_feature): Delete.
852         (riscv_isa_xlen): Simplify, just return cached xlen.
853         (riscv_isa_flen): Simplify, just return cached flen.
854         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
855         (riscv_register_name): Update to make use of tdesc_register_name.
856         Look up xreg and freg names in the new globals riscv_xreg_feature
857         and riscv_freg_feature.  Don't supply csr aliases here.
858         (riscv_fpreg_q_type): Delete.
859         (riscv_register_type): Use tdesc_register_type in almost all
860         cases, override the returned type in a few specific cases only.
861         (riscv_print_one_register_info): Handle errors reading registers.
862         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
863         registers that are otherwise unknown to GDB.  Also check the
864         csr_reggroup.
865         (riscv_print_registers_info): Remove assert about upper register
866         number, and use gdbarch_register_reggroup_p instead of
867         short-cutting.
868         (riscv_find_default_target_description): New function.
869         (riscv_check_tdesc_feature): New function.
870         (riscv_add_reggroups): New function.
871         (riscv_setup_register_aliases): New function.
872         (riscv_init_reggroups): New function.
873         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
874         setup register groups.  Register new riscv debug variable.
875         * riscv-tdep.h: Add 'arch/riscv.h' include.
876         (struct gdbarch_tdep): Remove abi union, and add
877         riscv_gdbarch_features field.  Remove cached quad floating point
878         type, and provide initialisation for double type field.
879         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
880         the list of targets using the feature based target descriptions.
881         * NEWS: Mention target description support.
882
883 2018-11-21  Pedro Alves  <palves@redhat.com>
884
885         * valops.c (find_method_list, value_find_oload_method_list)
886         (find_overload_match, find_oload_champ): Rename parameters and
887         locals.
888
889 2018-11-21  Pedro Alves  <palves@redhat.com>
890
891         * valops.c (find_method_list): Replace pointer and length
892         parameters with an gdb::array_view.  Adjust.
893         (value_find_oload_method_list): Likewise.
894         (find_overload_match): Use gdb::array_view for methods list.
895         Adjust to find_oload_champ interface change.
896         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
897         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
898
899 2018-11-21  Pedro Alves  <palves@redhat.com>
900
901         * gdbtypes.c (compare_badness): Change type of parameters to const
902         reference.  Adjust to badness_vector being a std::vector now.
903         (rank_function): Adjust to badness_vector being a std::vector now.
904         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
905         (LENGTH_MATCH): Delete.
906         (compare_badness): Change type of parameters to const reference.
907         (rank_function): Return a badness_vector by value now.
908         (find_overload_match): Adjust to badness_vector being a
909         std::vector now.  Remove cleanups.
910         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
911         badness_vector pointer.
912         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
913         a badness_vector pointer.  Adjust to badness_vector being a
914         std::vector now.  Remove cleanups.
915         (find_oload_champ): 'oload_champ_bv' parameter now
916         a badness_vector pointer.  Adjust to badness_vector being a
917         std::vector now.  Remove cleanups.
918
919 2018-11-21  Pedro Alves  <palves@redhat.com>
920
921         * cp-support.c (sym_return_val_size, sym_return_val_index)
922         (sym_return_val): Delete.
923         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
924         add to the vector.
925         (make_symbol_overload_list): Adjust to return a std::vector
926         instead of maintaining a global open coded vector.
927         (make_symbol_overload_list_block): Add std::vector parameter.
928         (make_symbol_overload_list_block): Rename to ...
929         (add_symbol_overload_list_block): ... this and add std::vector
930         parameter.
931         (make_symbol_overload_list_namespace): Rename to ...
932         (add_symbol_overload_list_namespace): ... this and add std::vector
933         parameter.
934         (make_symbol_overload_list_adl_namespace): Rename to ...
935         (add_symbol_overload_list_adl_namespace): ... this and add
936         std::vector parameter.
937         (make_symbol_overload_list_adl): Delete.
938         (add_symbol_overload_list_adl): New.
939         (make_symbol_overload_list_using): Rename to ...
940         (add_symbol_overload_list_using): ... this and add std::vector
941         parameter.
942         (make_symbol_overload_list_qualified): Rename to ...
943         (add_symbol_overload_list_qualified): ... this and add std::vector
944         parameter.
945         * cp-support.h: Include "common/array-view.h" and <vector>.
946         (make_symbol_overload_list): Change return type to std::vector.
947         (make_symbol_overload_list_adl): Delete declaration.
948         (add_symbol_overload_list_adl): New declaration.
949         * valops.c (find_overload_match): Local 'oload_syms' now a
950         std::vector.
951         (find_oload_champ_namespace): 'oload_syms' parameter now a
952         std::vector pointer.
953         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
954         std::vector pointer.  Adjust to new make_symbol_overload_list
955         interface.
956
957 2018-11-21  Pedro Alves  <palves@redhat.com>
958
959         * common/array-view.h (array_view::splice(size_type, size_t)): New.
960         (array_view::splice(size_type)): New.
961         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
962         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
963         std::vector.
964         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
965         * extension.h: Include "common/array-view.h".
966         (xmethod_worker::invoke): Adjust to use gdb::array_view.
967         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
968         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
969         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
970         (xmethod_worker::do_get_result_type): Adjust to use
971         gdb::array_view.
972         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
973         * gdbtypes.h: Include "common/array-view.h".
974         (rank_function): Adjust to use gdb::array_view.
975         * python/py-xmethods.c (python_xmethod_worker::invoke)
976         (python_xmethod_worker::do_get_arg_types)
977         (python_xmethod_worker::do_get_result_type)
978         (python_xmethod_worker::invoke): Adjust to new interfaces.
979         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
980         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
981         * valops.c (find_overload_match, find_oload_champ_namespace)
982         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
983         gdb:array_view and the new xmethod_worker interfaces.
984         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
985         gdb::array_view.
986         * value.h (find_overload_match, result_type_of_xmethod)
987         (call_xmethod): Adjust to use gdb::array_view.
988         * unittests/array-view-selftests.c: Add slicing tests.
989
990 2018-11-21  Pedro Alves  <palves@redhat.com>
991
992         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
993         * common/array-view.h (make_array_view): New.
994         * compile/compile-object-run.c (compile_object_run): Adjust to
995         pass an array_view.
996         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
997         * eval.c (eval_call): Adjust to pass an array_view.
998         (evaluate_subexp_standard): Adjust to pass an array_view.
999         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
1000         * guile/scm-value.c (gdbscm_value_call): Likewise.
1001         * infcall.c (push_dummy_code): Replace pointer + size parameters
1002         with an array_view parameter.
1003         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
1004         adjust.
1005         * infcall.h: Include "common/array-view.h".
1006         (call_function_by_hand, call_function_by_hand_dummy): Replace
1007         pointer + size parameters with an array_view parameter.
1008         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
1009         * linux-tdep.c (linux_infcall_mmap): Likewise.
1010         * objc-lang.c (lookup_objc_class, lookup_child_selector)
1011         (value_nsstring, print_object_command): Likewise.
1012         * python/py-value.c (valpy_call): Likewise.
1013         * rust-lang.c (rust_evaluate_funcall): Likewise.
1014         * spu-tdep.c (flush_ea_cache): Likewise.
1015         * valarith.c (value_x_binop, value_x_unop): Likewise.
1016         * valops.c (value_allocate_space_in_inferior): Likewise.
1017         * unittests/array-view-selftests.c (run_tests): Add
1018         gdb::make_array_view test.
1019
1020 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
1021
1022         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
1023         than a fixed size buffer.
1024
1025 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
1026
1027         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
1028         and remove insertion of extra spaces in GDB's output.
1029         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
1030         Layout field into a temporary buffer, and then output it as a
1031         string field.
1032
1033 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1034
1035         * NEWS: Document the language choice done by
1036         'info [types|functions|variables]|rbreak'.
1037
1038 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1039
1040         * symtab.c (treg_matches_sym_type_name): Use
1041         scoped_switch_to_sym_language_if_auto instead of local logic.
1042         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1043         to switch to SYM language when language mode is auto.
1044
1045 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1046
1047         * language.h (scoped_switch_to_sym_language_if_auto): New class.
1048
1049 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1050
1051         * symtab.c (search_symbols): Properly check absence of type regexp
1052         before entering the loop scanning the minimal symbols.
1053
1054 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
1055
1056         * s12z-tdep.c (s12z_extract_return_value): New function.
1057         (inv_reg_perm) New array.
1058         (s12z_return_value): Populate readbuf if non-null.
1059
1060 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
1061
1062         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1063         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1064         to MinGW fixed by Gnulib.
1065         (O_NOINHERIT): Define if not defined.
1066
1067 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
1068
1069         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1070
1071 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1072
1073         * infrun.c (displaced_step_inferior_state) <next>: Remove.
1074
1075 2018-11-19  Tom Tromey  <tom@tromey.com>
1076
1077         * source.c (get_filename_and_charpos): Return void.
1078
1079 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1080
1081         * skip.c (_initialize_step_skip): Fix "info skip" help.
1082
1083 2018-11-16  Tom Tromey  <tom@tromey.com>
1084
1085         PR rust/23625:
1086         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1087
1088 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1089
1090         * infrun.c (displaced_step_inferior_states): Change type to
1091         std::forward_list.
1092         (get_displaced_stepping_state): Adjust.
1093         (displaced_step_in_progress_any_inferior): Adjust.
1094         (add_displaced_stepping_state): Adjust.
1095         (remove_displaced_stepping_state): Adjust.
1096
1097 2018-11-18  Tom Tromey  <tom@tromey.com>
1098
1099         PR build/23814:
1100         * target-delegates.c: Rebuild.
1101         * ia64-linux-nat.c (class ia64_linux_nat_target)
1102         <have_steppable_watchpoint>: Use override.  Return true, not 1.
1103         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
1104         "self" argument.
1105         (ia64_linux_nat_target::low_new_thread): Rename.
1106         (class ia64_linux_nat_target) <read_description>: Don't declare.
1107         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1108         bool.
1109
1110 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1111
1112         PR gdb/22736:
1113         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1114         lang_struct_return code.
1115
1116 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1117
1118         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1119         return_method.
1120         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1121         * amd64-tdep.c (amd64_push_arguments): Likewise.
1122         (amd64_push_dummy_call): Likewise.
1123         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1124         * arc-tdep.c (arc_push_dummy_call): Likewise.
1125         * arm-tdep.c (arm_push_dummy_call): Likewise.
1126         * avr-tdep.c (avr_push_dummy_call): Likewise.
1127         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1128         * cris-tdep.c (cris_push_dummy_call): Likewise.
1129         * csky-tdep.c (csky_push_dummy_call): Likewise.
1130         * frv-tdep.c (frv_push_dummy_call): Likewise.
1131         * gdbarch.c: Regenerate.
1132         * gdbarch.h: Regenerate.
1133         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1134         return_method.
1135         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1136         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1137         (hppa64_push_dummy_call): Likewise.
1138         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1139         * i386-tdep.c (i386_push_dummy_call): Likewise.
1140         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1141         * infcall.c (call_function_by_hand_dummy): Likewise.
1142         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1143         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1144         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1145         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1146         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1147         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1148         * mep-tdep.c (mep_push_dummy_call): Likewise.
1149         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1150         (mips_n32n64_push_dummy_call): Likewise.
1151         (mips_o32_push_dummy_call): Likewise.
1152         (mips_o64_push_dummy_call): Likewise.
1153         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1154         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1155         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1156         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1157         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1158         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1159         (ppc64_sysv_abi_push_dummy_call): Likewise.
1160         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1161         (ppc64_sysv_abi_push_dummy_call): Likewise.
1162         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1163         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1164         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1165         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1166         * rx-tdep.c (rx_push_dummy_call): Likewise.
1167         * s390-tdep.c (s390_push_dummy_call): Likewise.
1168         * score-tdep.c (score_push_dummy_call): Likewise.
1169         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1170         (sh_push_dummy_call_nofpu): Likewise.
1171         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1172         (sparc32_push_dummy_call): Likewise.
1173         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1174         (sparc64_push_dummy_call): Likewise.
1175         * spu-tdep.c (spu_push_dummy_call): Likewise.
1176         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1177         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1178         * v850-tdep.c (v850_push_dummy_call): Likewise.
1179         * vax-tdep.c (vax_push_dummy_call): Likewise.
1180         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1181         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1182
1183 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1184
1185         * gdbarch.sh (enum function_call_return_method): Add enum.
1186         * gdbarch.h: Regenerate.
1187         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1188
1189 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
1190
1191         * unittests/copy_bitwise-selftests.c: New file.
1192         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1193         (selftests::copy_bitwise_tests): Delete, moving this code to
1194         unittests/copy_bitwise-selftests.c instead.
1195         (_initialize_utils): Do not register copy_bitwise tests.
1196         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1197         unittests/copy_bitwise-selftests.c.
1198
1199 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
1200
1201         * ada-lang.c (move_bits): Delete. Update all callers to use
1202         copy_bitwise instead.
1203         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1204         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1205         Move from here to utils.c.
1206         (_initialize_dwarf2loc): Remove call to register copy_bitwise
1207         selftests.
1208         * utils.h (copy_bitwise): Add declaration.
1209         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1210         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1211         Moved here from dwarf2loc.c.
1212         (_initialize_utils): Register copy_bitwise selftests.
1213
1214 2018-11-14  Jim Wilson  <jimw@sifive.com>
1215
1216         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1217         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1218         then increment next_regnum if odd.
1219         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
1220         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
1221         function type.  Pass new arg to riscv_arg_location based on function
1222         type.
1223         (riscv_return_value): Pass new arg to riscv_arg_location.
1224
1225         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1226         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1227         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1228
1229         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1230         setting len.  New local align, set to max of arg align and xlen,
1231         and pass to first riscv_assign_stack_location call.
1232
1233 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
1234
1235         * skip.c (complete_skip_number): New function.
1236         (_initialize_step_skip): Add completers to some skip commands.
1237
1238 2018-11-09  Tom Tromey  <tom@tromey.com>
1239
1240         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1241         (struct remote_g_packet_data): Derive from allocate_on_obstack.
1242         <guesses>: Now a std::vector.
1243         (remote_g_packet_data_init, register_remote_g_packet_guess):
1244         Update.
1245         (remote_read_description_p): Update.  Return bool.
1246         (remote_target::read_description): Update.
1247         (struct remote_g_packet_guess): Add constructor.
1248
1249 2018-11-09  Tom Tromey  <tom@tromey.com>
1250
1251         * common/scoped_fd.h (class scoped_fd): Add move constructor and
1252         move assignment operator.
1253         * psymtab.c (psymtab_to_fullname): Update.
1254         * source.h (open_source_file): Return scoped_fd.
1255         (find_and_open_source): Likewise.
1256         * source.c (open_source_file): Return scoped_fd.
1257         (get_filename_and_charpos): Update.
1258         (print_source_lines_base): Update.  Use scoped_fd::to_file.
1259         (forward_search_command): Likewise.
1260         (reverse_search_command): Likewise.
1261         (find_and_open_source): Return scoped_fd.
1262         * tui/tui-source.c (tui_set_source_content): Update.  Use
1263         gdb_file_up.
1264
1265 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
1266
1267         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1268         overflow.
1269
1270 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1271
1272         * configure: Regenerate.
1273
1274 2018-11-09  Tom de Vries  <tdevries@suse.de>
1275
1276         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1277         unconditionally, to set the language of the symbol.  Manage freeing
1278         returned pointer using gdb::unique_xmalloc_ptr.
1279
1280 2018-11-08  Tom Tromey  <tom@tromey.com>
1281
1282         * record.c (require_record_target): Upper-case "<TAB>".
1283
1284 2018-11-08  Tom Tromey  <tom@tromey.com>
1285
1286         * python/lib/gdb/command/pretty_printers.py
1287         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1288
1289 2018-11-08  Tom Tromey  <tom@tromey.com>
1290
1291         PR gdb/23555:
1292         PR gdb/23838:
1293         * target.h (target_supports_terminal_ours): Return bool.
1294         * target.c (target_supports_terminal_ours): Handle case where
1295         current_top_target returns nullptr.  Return bool.
1296
1297 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
1298
1299         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1300         return the correct count for potential HFAs.
1301
1302 2018-11-08  Jan Beulich  <jbeulich@suse.com>
1303
1304         * i387-tdep.c (i387_supply_xsave): Split handling of
1305         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1306         (i387_collect_xsave): Likewise.
1307
1308 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1309
1310         * riscv-tdep.c (riscv_insn::decode): Update header comment.
1311         (riscv_frame_this_id): Catch errors thrown while building the
1312         frame cache, leave the frame id as the default, which is the outer
1313         frame id.
1314
1315 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1316
1317         * ada-lang.c (read_atcb): Only set task_info->called_task if
1318         task_info->state == Entry_Caller_Sleep.
1319         (print_ada_task_info): Do not check task_info->state before
1320         checking task_info->called_task.
1321         (info_task): Likewise.
1322
1323 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1324
1325         * ada-tasks.c (read_atcb): Clear task_info before computing
1326         the value of each of its fields.
1327
1328 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1329
1330         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1331         NULL before dereferencing it.
1332
1333 2018-11-06  Tom de Vries  <tdevries@suse.de>
1334
1335         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1336         program headers.
1337
1338 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
1339
1340         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1341         so that it applies to uclinux as well.
1342
1343 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
1344
1345         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1346         when on AAPCS.
1347
1348 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
1349
1350         * riscv-fbsd-nat.c (getregs_supplies): Return true for
1351         RISCV_CSR_SSTATUS_REGNUM.
1352
1353 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1354
1355         * source.c (open_source_file): Fix leak by transferring the
1356         current s->fullname to the unique_xmalloc_ptr fullname given
1357         to find_and_open_source.
1358
1359 2018-11-04  Tom Tromey  <tom@tromey.com>
1360
1361         * varobj.c (install_default_visualizer): Update.
1362         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1363         Return gdbpy_ref.
1364         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1365         (find_pretty_printer_from_progspace)
1366         (find_pretty_printer_from_gdb, find_pretty_printer)
1367         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1368         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1369         Update.
1370
1371 2018-11-04  Tom Tromey  <tom@tromey.com>
1372
1373         * python/python.c (gdbpy_parameter_value): Update.
1374         * python/python-internal.h (python_string_to_unicode)
1375         (python_string_to_target_python_string)
1376         (host_string_to_python_string): Return gdbpy_ref.
1377         * python/py-utils.c (python_string_to_unicode)
1378         (unicode_to_encoded_python_string)
1379         (unicode_to_target_python_string)
1380         (python_string_to_target_string)
1381         (python_string_to_target_python_string): Return gdbpy_ref.
1382         (python_string_to_host_string): Update.
1383         (host_string_to_python_string): Return gdbpy_ref.
1384         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1385         (stpy_fullname): Update.
1386         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1387         Update.
1388         * python/py-prettyprint.c (print_string_repr): Update.
1389         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1390         (objfpy_get_build_id): Update.
1391         * python/py-breakpoint.c (bppy_get_location)
1392         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1393         Update.
1394
1395 2018-11-04  Tom Tromey  <tom@tromey.com>
1396
1397         * python/python-internal.h (gdb_py_object_from_longest)
1398         (gdb_py_object_from_ulongest): Return gdbpy_ref.
1399         * python/py-value.c (valpy_int): Update.
1400         * python/py-utils.c (gdb_py_object_from_longest): Return
1401         gdbpy_ref.
1402         (gdb_py_object_from_ulongest): Likewise.
1403         * python/py-type.c (typy_get_alignof): Update.
1404         * python/py-linetable.c (ltpy_get_all_source_lines)
1405         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1406         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1407
1408 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1409
1410         * ada-lang.c (_initialize_ada_language): Fix typo.
1411
1412 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1413
1414         * language.c (type): Remove.
1415         (_initialize_language): Remove assignment to type.
1416
1417 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
1418
1419         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1420         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1421         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1422         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1423         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1424         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1425         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1426         and aarch64-ravenscar-thread.o.
1427         * NEWS: Add entry documenting Ravenscar tasking support
1428         on AArch64 ELF.
1429
1430 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1431
1432         * symtab.c (info_functions_command): Initialize quiet flag.
1433         * stack.c (info_args_command): Likewise.
1434
1435 2018-11-01  Jim Wilson  <jimw@sifive.com>
1436
1437         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1438         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1439         debugging messages.
1440
1441 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1442
1443         * ada-lang.c (ada_watch_location_expression): New function.
1444         (ada_language_defn): Set la_watch_location_expression to
1445         ada_watch_location_expression.
1446
1447 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1448
1449         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1450
1451 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1452
1453         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1454         shifting.
1455
1456 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1457             Joel Brobecker  <brobecker@adacore.com>
1458
1459         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1460         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1461         * arm-pikeos-tdep.c: New file.
1462         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1463         embedded system.
1464         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1465
1466 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1467
1468         * common/pathstuff.c (get_standard_temp_dir): New.
1469         * common/pathstuff.h (get_standard_temp_dir): New.
1470         * config.in: Re-generate.
1471         * configure: Re-generate.
1472         * configure.ac: Don't check for mkdtemp.
1473         * gnulib/aclocal-m4-deps.mk: Re-generate.
1474         * gnulib/aclocal.m4: Re-generate.
1475         * gnulib/config.in: Re-generate.
1476         * gnulib/configure: Re-generate.
1477         * gnulib/import/Makefile.am: Re-generate.
1478         * gnulib/import/Makefile.in: Re-generate.
1479         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1480         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1481         * gnulib/import/m4/mkdtemp.m4: New file.
1482         * gnulib/import/mkdtemp.c: New file.
1483         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1484         Add mkdtemp module.
1485         * unittests/mkdir-recursive-selftests.c (test): Use
1486         get_standard_temp_dir.
1487         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1488         ifdef.
1489         * compile/compile.c (get_compile_file_tempdir): Likewise.
1490
1491 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1492
1493         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1494         (SIG_FRAME_LR_OFFSET64): New define.
1495         (SIG_FRAME_FP_OFFSET64): New define.
1496         (aix_sighandle_frame_cache): New Function.
1497         (aix_sighandle_frame_this_id): New Function.
1498         (aix_sighandle_frame_prev_register): New Function.
1499         (aix_sighandle_frame_sniffer): New Function.
1500         (aix_sighandle_frame_unwind): New global variable.
1501         (rs6000_aix_init_osabi): Install new frame unwinder.
1502
1503 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1504
1505         PR gdb/23835
1506         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1507         already defined.
1508
1509 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1510
1511         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1512
1513 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1514
1515         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1516         (producer_is_icc): New function.
1517         (check_producer): Set producer_is_icc field on dwarf2_cu.
1518         (dwarf2_init_integer_type): New function.
1519         (read_base_type): Call dwarf2_init_integer_type instead of
1520         init_integer_type in all cases.
1521         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1522         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1523         LEN is greater than 0.
1524
1525 2018-10-30  Tom Tromey  <tom@tromey.com>
1526
1527         * main.c (captured_main_1): Check return value of bfd_init.
1528
1529 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1530
1531         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1532         Adjust comments.
1533
1534 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1535
1536         * procfs.c: Include common/pathstuff.h.
1537
1538 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1539
1540         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1541         Add missing braces.  No functional change.
1542
1543 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1544
1545         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1546         to report a bad option and fix indentation.
1547         * demangle.c (demangle_command): Use report_unrecognized_option_error
1548         to report a bad option and correctly report the bad option.
1549
1550 2018-10-27  Tom Tromey  <tom@tromey.com>
1551
1552         PR cli/23364:
1553         * darwin-nat.c (copied_shell): New global.
1554         (may_have_sip): Rename from should_disable_startup_with_shell.
1555         (copy_shell_to_cache, maybe_cache_shell): New functions.
1556         (darwin_nat_target::create_inferior): Update.  Use
1557         copied_shell.
1558
1559 2018-10-27  Tom Tromey  <tom@tromey.com>
1560
1561         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1562         (run_tests): Call test_to_file.
1563         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1564         temporary files.
1565         * common/scoped_fd.h (scoped_fd::to_file): New method.
1566
1567 2018-10-27  Tom Tromey  <tom@tromey.com>
1568
1569         * unittests/scoped_mmap-selftests.c (test_normal): Use
1570         gdb_mkostemp_cloexec.
1571         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1572         Use gdb_mkostemp_cloexec.
1573         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1574         gnulib/config.in, gnulib/configure,
1575         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1576         gnulib/import/m4/gnulib-cache.m4,
1577         gnulib/import/m4/gnulib-comp.m4: Update.
1578         * gnulib/import/m4/mkostemp.m4: New file.
1579         * gnulib/import/m4/mkstemp.m4: Remove.
1580         * gnulib/import/mkostemp.c: New file.
1581         * gnulib/import/mkstemp.m4: Remove.
1582         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1583         mkstemp, add mkostemp.  Apply new patch.
1584         * gnulib/import/stdlib.in.h: Apply patch.
1585         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1586         New file.
1587         * dwarf-index-write.c (write_psymtabs_to_index): Use
1588         gdb_mkostemp_cloexec.
1589         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1590
1591 2018-10-27  Tom Tromey  <tom@tromey.com>
1592
1593         * unittests/mkdir-recursive-selftests.c: New file.
1594         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1595         unittests/mkdir-recursive-selftests.c.
1596         * dwarf-index-cache.c (mkdir_recursive): Move to
1597         common/filestuff.c.
1598         (index_cache::store): Check return value of mkdir_recursive.
1599         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1600         (_initialize_index_cache): Don't register test.
1601         * common/filestuff.h (mkdir_recursive): Declare.
1602         * common/filestuff.c (mkdir_recursive): Move from
1603         dwarf-index-cache.c.  Return bool.
1604
1605 2018-10-27  Tom Tromey  <tom@tromey.com>
1606
1607         * dwarf-index-write.c (write_psymtabs_to_index): Move
1608         make_temp_filename to common/pathstuff.c.
1609         * common/pathstuff.h (make_temp_filename): Declare.
1610         * common/pathstuff.c (make_temp_filename): New function, moved
1611         from dwarf-index-write.c.
1612
1613 2018-10-27  Tom Tromey  <tom@tromey.com>
1614
1615         * procfs.c (procfs_target::create_inferior): Use get_shell.
1616         * cli/cli-cmds.c (shell_escape): Use get_shell.
1617         * windows-nat.c (windows_nat_target::create_inferior): Use
1618         get_shell.
1619         * common/pathstuff.c (get_shell): New function.
1620         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1621         (fork_inferior): Use get_shell.
1622         * common/pathstuff.h (get_shell): Declare.
1623
1624 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1625
1626         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1627
1628 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1629
1630         * stack.c (print_variable_and_value_data): Add preg and treg.
1631         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1632         and update callers.
1633         (print_frame_arg_vars): Likewise.
1634         (prepare_reg): New function.
1635         (info_locals_command): Extract info print args and use them.
1636         (info_args_command): Likewise.
1637         (_initialize_stack): Modify on-line help.
1638         * symtab.c (treg_matches_sym_type_name): New function.
1639         (search_symbols): New arg t_regexp.
1640         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1641         (info_variables_command): Extract info print args and use them.
1642         (info_functions_command): Likewise.
1643         (info_types_command): Update call to symtab_symbol_info.
1644         (_initialize_symtab): Modify on-line help.
1645         * symtab.h (treg_matches_sym_type_name): New function.
1646         (search_symbols): New t_regexp arg.
1647
1648 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1649
1650         * cli-utils.c (extract_arg_maybe_quoted): New function.
1651         (extract_info_print_args): New function.
1652         (info_print_args_help): New function.
1653         (report_unrecognized_option_error): New function.
1654         * cli-utils.h (extract_arg_maybe_quoted): New function.
1655         (extract_info_print_args): New function.
1656         (info_print_args_help): New function.
1657         (report_unrecognized_option_error): New function.
1658
1659 2018-10-26  Tom Tromey  <tom@tromey.com>
1660
1661         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1662         (compute_compunit_symtab_includes): Update.
1663         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1664         (compunit_symtab_ptr): Likewise.
1665
1666 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1667
1668         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1669         default_print_auxv_entry for specific tag values.
1670
1671 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1672
1673         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1674
1675 2018-10-26  Jim Wilson  <jimw@sifive.com>
1676
1677         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1678         (riscv_linux_sigframe_init): Declare.
1679         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1680         (riscv_linux_sigframe): New.
1681         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1682         (riscv_linux_sigframe_init): Define.
1683         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1684
1685         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1686         (riscv_isa_flen): Likewise.  Drop static.
1687         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1688         (riscv_isa_flen): Likewise.  Declare.
1689
1690 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1691             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1692
1693         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1694         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1695         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1696         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1697         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1698         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1699         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1700         Define.
1701         (struct ppc_linux_features) <htm>: New field.
1702         (ppc_linux_no_features): Add initializer for htm field.
1703         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1704         new tdescs.
1705         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1706         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1707         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1708         Define if not already defined.
1709         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1710         and rs6000/powerpc-isa207-htm-vsx64l.
1711         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1712         rs6000/powerpc-isa207-htm-vsx64l.xml.
1713         * features/rs6000/power-htm-spr.xml: New file.
1714         * features/rs6000/power-htm-core.xml: New file.
1715         * features/rs6000/power64-htm-core.xml: New file.
1716         * features/rs6000/power-htm-fpu.xml: New file.
1717         * features/rs6000/power-htm-altivec.xml: New file.
1718         * features/rs6000/power-htm-vsx.xml: New file.
1719         * features/rs6000/power-htm-ppr.xml: New file.
1720         * features/rs6000/power-htm-dscr.xml: New file.
1721         * features/rs6000/power-htm-tar.xml: New file.
1722         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1723         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1724         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1725         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1726         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1727         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1728         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1729         fetch_regset with HTM regsets.
1730         (store_register, store_ppc_registers): Call store_regset with HTM
1731         regsets.
1732         (ppc_linux_nat_target::read_description): Set htm field in the
1733         features struct if needed.
1734         * ppc-linux-tdep.c: Include
1735         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1736         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1737         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1738         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1739         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1740         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1741         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1742         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1743         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1744         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1745         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1746         (ppc32_linux_ctarregset): New globals.
1747         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1748         (ppc_linux_collect_core_cpgrregset): New function.
1749         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1750         regsets.
1751         (ppc_linux_core_read_description): Check if the tm spr section is
1752         present and set htm in the features struct.
1753         (_initialize_ppc_linux_tdep): Call
1754         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1755         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1756         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1757         Declare.
1758         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1759         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1760         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1761         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1762         New fields.
1763         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1764         Likewise.
1765         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1766         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1767         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1768         New enum fields.
1769         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1770         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1771         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1772         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1773         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1774         <PPC_CTAR_REGNUM>: Likewise.
1775         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1776         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1777         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1778         (IS_CEFP_PSEUDOREG): Define.
1779         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1780         registers.  Return names for the checkpointed DFP, VSX, and EFP
1781         pseudo registers.
1782         (rs6000_pseudo_register_type): Remove initial assert and raise an
1783         internal error in the else clause instead.  Return types for the
1784         checkpointed DFP, VSX, and EFP pseudo registers.
1785         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1786         checkpointed DFP pseudo registers.
1787         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1788         checkpointed VSX pseudo registers.
1789         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1790         from efpr_pseudo_register_read and
1791         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1792         registers.
1793         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1794         Handle checkpointed DFP, VSX, and EFP registers.
1795         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1796         (efp_ax_pseudo_register_collect): New functions.
1797         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1798         register logic to new functions.  Handle checkpointed DFP, VSX,
1799         and EFP pseudo registers.
1800         (rs6000_gdbarch_init): Look for and validate the htm features.
1801         Include checkpointed DFP, VSX and EFP pseudo-registers.
1802         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1803         HTM registers.
1804
1805 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1806
1807         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1808         without altivec or fpu.
1809
1810 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1811             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1812
1813         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1814         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1815         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1816         Define if not already defined.
1817         * features/rs6000/power-ebb.xml: New file.
1818         * features/rs6000/power-linux-pmu.xml: New file.
1819         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1820         features.
1821         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1822         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1823         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1824         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1825         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1826         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1827         fetch_regset with ebb and pmu regsets.
1828         (store_register, store_ppc_registers): Call store_regset with ebb
1829         and pmu regsets.
1830         (ppc_linux_nat_target::read_description): Set isa207 field in the
1831         features struct if ebb and pmu are avaiable.
1832         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1833         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1834         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1835         and pmu regsets.
1836         (ppc_linux_core_read_description): Check if the pmu section is
1837         present and set isa207 in the features struct.
1838         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1839         (ppc32_linux_pmuregset): Declare.
1840         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1841         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1842         <ppc_sier_regnum>: New field.
1843         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1844         New enum values.
1845         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1846         values.
1847         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1848         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1849         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1850         ebb and pmu features.
1851
1852 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1853             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1854
1855         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1856         (tdesc_powerpc_isa207_vsx64l): Declare.
1857         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1858         (struct ppc_linux_features) <isa207>: New field.
1859         (ppc_linux_no_features): Add initializer for isa207 field.
1860         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1861         new tdescs.
1862         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1863         (NT_PPC_TAR): Define if not already defined.
1864         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1865         rs6000/powerpc-isa207-vsx64l.
1866         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1867         rs6000/powerpc-isa207-vsx64l.xml.
1868         * features/rs6000/power-tar.xml: New file.
1869         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1870         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1871         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1872         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1873         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1874         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1875         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1876         fetch_regset with the TAR regset.
1877         (store_register, store_ppc_registers): Call store_regset with the
1878         TAR regset.
1879         (ppc_linux_nat_target::read_description): Set isa207 field in the
1880         features struct if needed.
1881         * ppc-linux-tdep.c: Include
1882         features/rs6000/powerpc-isa207-vsx32l.c and
1883         features/rs6000/powerpc-isa207-vsx64l.c.
1884         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1885         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1886         regset.
1887         (ppc_linux_core_read_description): Check if the tar section is
1888         present and set isa207 in the features struct.
1889         (_initialize_ppc_linux_tdep): Call
1890         initialize_tdesc_powerpc_isa207_vsx32l and
1891         initialize_tdesc_powerpc_isa207_vsx64l.
1892         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1893         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1894         (enum) <PPC_TAR_REGNUM>: New enum value.
1895         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1896         feature.
1897         (ppc_process_record_op31): Record changes to TAR.
1898
1899 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1900             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1901
1902         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1903         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1904         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1905         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1906         (struct ppc_linux_features) <ppr_dscr>: New field.
1907         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1908         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1909         new tdescs.
1910         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1911         Define if not already defined.
1912         * features/Makefile (WHICH): Add
1913         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1914         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1915         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1916         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1917         * features/rs6000/power-dscr.xml: New file.
1918         * features/rs6000/power-ppr.xml: New file.
1919         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1920         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1921         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1922         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1923         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1924         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1925         * ppc-linux-nat.c: Include <sys/uio.h>.
1926         (fetch_regset, store_regset, check_regset): New functions.
1927         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1928         DSCR and PPR regsets.
1929         (store_register, store_ppc_registers): Call store_regset with
1930         DSCR and PPR regsets.
1931         (ppc_linux_get_hwcap2): New function.
1932         (ppc_linux_nat_target::read_description): Call
1933         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1934         features struct if needed.
1935         * ppc-linux-tdep.c: Include
1936         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1937         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1938         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1939         (ppc32_linux_dscrregset): New globals.
1940         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1941         and dscr regsets.
1942         (ppc_linux_core_read_description): Check if the ppr and dscr
1943         sections are present and set ppr_dscr in the features struct.
1944         (_initialize_ppc_linux_tdep): Call
1945         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1946         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1947         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1948         (ppc32_linux_dscrregset): Declare.
1949         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1950         <ppc_dscr_regnum>: New field.
1951         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1952         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1953         and dscr features.
1954         (ppc_process_record_op31): Record changes to PPR and DSCR.
1955
1956 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1957
1958         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1959         second initializer line for the have_* variables.  Initialize
1960         have_fpu to 0 instead of 1.
1961
1962 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1963
1964         * arch/ppc-linux-common.c (ppc_linux_match_description):
1965         Parenthesize tdesc assignements and indent them properly.
1966
1967 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1968
1969         * ppc-linux-nat.c (fetch_register): Change if statement to else
1970         if.
1971         (store_register): Likewise.
1972
1973 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1974
1975         * rs6000-tdep.c: Remove reggroups.h include.
1976         (rs6000_pseudo_register_reggroup_p): Remove.
1977         (rs6000_gdbarch_init): Remove call to
1978         set_tdesc_pseudo_register_reggroup_p.
1979
1980 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1981
1982         * reggroups.c (default_register_reggroup_p): Return true for
1983         decfloat registers and float_reggroup.
1984
1985 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1986
1987         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1988         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1989         ppc_linux_collect_vrregset by regcache_collect_regset.
1990
1991 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1992
1993         * linux-tdep.c (linux_collect_regset_section_cb): Use
1994         std::vector<gdb_byte> instead of char * and malloc for buf.
1995         Remove xfree.
1996
1997 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1998
1999         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
2000         symtab_start instead of always using language_unknown.
2001
2002 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2003
2004         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
2005         READ_P parameter, catch and ignore register access errors from
2006         either the old or new MISA location.
2007         (riscv_has_feature): Update call to riscv_read_misa_reg.
2008
2009 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2010
2011         * python/py-function.c (convert_values_to_python): Return
2012         gdbpy_ref<>.  Add header comment.
2013         (fnpy_call): Adjust.
2014
2015 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2016
2017         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
2018         (cmdpy_completer_handle_brkchars): Adjust.
2019         (cmdpy_completer): Adjust.
2020
2021 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2022
2023         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
2024         Pass correct regnum to raw_supply_zeroed.
2025
2026 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2027
2028         * regcache.c (cooked_read_test): Add CSKY to the list of
2029         architectures with a save_reggroup
2030
2031 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
2032
2033         PR gdb/23368
2034         * infrun.c (follow_exec): In the follow_exec_mode_new case,
2035         transfer terminal state from old new new inferior.
2036         * terminal.h (swap_terminal_info): New function.
2037         * inflow.c (swap_terminal_info): New function.
2038
2039 2018-10-23  Tom Tromey  <tom@tromey.com>
2040
2041         * record-btrace.c (get_thread_current_frame_id): Rename from
2042         get_thread_current_frame.  Return a frame_id.
2043         (record_btrace_start_replaying): Update.
2044
2045 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2046
2047         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2048         for CSRs.
2049
2050 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
2051
2052         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2053         have_nonsteppable_watchpoint attribute to 1.
2054
2055 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2056
2057         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2058         register names.
2059         (struct register_alias): Rename to...
2060         (struct riscv_register_alias): ...this, and update comment.
2061         (riscv_register_aliases): Update type, and alias names.  Remove
2062         CSR names from this list.
2063         (riscv_register_name): Use riscv_gdb_reg_names for int and float
2064         register names.  Add an extra assertion.
2065         (riscv_is_regnum_a_named_csr): New function.
2066         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2067
2068 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
2069
2070         * configure.tgt: Add configuration for s12z.
2071         * s12z-tdep.c:  New file.
2072         * NEWS: Mention new target.
2073
2074 2018-10-22  Jim Wilson  <jimw@sifive.com>
2075
2076         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2077         FP reg smaller than FP reg size, and fill with -1 instead of 0.
2078
2079         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2080         (riscv_register_type): Use them.
2081         (riscv_print_one_register_info): Handle union of floats same as float.
2082         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2083         riscv_fpreg_q_type fields.
2084
2085 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2086
2087         * gdbarch.sh (gdbarch_num_cooked_regs): New.
2088         * gdbarch.h: Re-generate.
2089         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2090         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2091         * eval.c (evaluate_subexp_standard): Likewise.
2092         * findvar.c (value_of_register): Likewise.
2093         (value_of_register_lazy): Likewise.
2094         (address_from_register): Likewise.
2095         * frame.c (get_frame_register_bytes): Likewise.
2096         * gdbarch-selftests.c (register_to_value_test): Likewise.
2097         * h8300-tdep.c (h8300_register_type): Likewise.
2098         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2099         (i386_svr4_reg_to_regnum): Likewise.
2100         * infcmd.c (default_print_registers_info): Likewise.
2101         (registers_info): Likewise.
2102         (print_vector_info): Likewise.
2103         (default_print_float_info): Likewise.
2104         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2105         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2106         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2107         (mi_cmd_data_list_changed_registers): Likewise.
2108         (mi_cmd_data_list_register_values): Likewise.
2109         (mi_cmd_data_write_register_values): Likewise.
2110         (mi_cmd_trace_frame_collected): Likewise.
2111         * mips-tdep.c (print_gp_register_row): Likewise.
2112         (mips_print_registers_info): Likewise.
2113         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2114         * regcache.c (init_regcache_descr): Likewise.
2115         (register_size): Likewise.
2116         (register_dump::dump): Likewise.
2117         (cooked_read_test): Likewise.
2118         (cooked_write_test): Likewise.
2119         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2120         (rs6000_gdbarch_init): Likewise.
2121         * stabsread.c (stab_reg_to_regnum): Likewise.
2122         * stack.c (info_frame_command): Likewise.
2123         * target-descriptions.c (tdesc_register_name): Likewise.
2124         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2125         * tui/tui-regs.c (tui_show_register_group): Likewise.
2126         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2127         (user_reg_map_regnum_to_name): Likewise.
2128         (value_of_user_reg): Likewise.
2129         (maintenance_print_user_registers): Likewise.
2130         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2131         (xtensa_register_name): Likewise.
2132         (xtensa_register_type): Likewise.
2133         (xtensa_reg_to_regnum): Likewise.
2134         (xtensa_pseudo_register_read): Likewise.
2135         (xtensa_pseudo_register_write): Likewise.
2136
2137 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2138
2139         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2140         correctly-sized buffer with raw_read.
2141         (amd64_pseudo_register_write): Use correctly-sized buffer for
2142         raw_read/raw_write.
2143
2144 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2145
2146         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2147         in add_prefix_cmd of set print type.
2148
2149 2018-10-19  Tom Tromey  <tom@tromey.com>
2150
2151         PR tui/18388:
2152         * NEWS: Mention tabset deprecation.
2153         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2154         (update_tab_width): New function.
2155         (tui_set_tab_width, tui_show_tab_width): New functions.
2156         (tui_set_tab_width_command): Use update_tab_width.
2157         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
2158         Add new "set tui tab-width" command.
2159         * tui/tui-source.c (tui_set_source_content): Update.
2160         * tui/tui-disasm.c (tui_set_disassem_content): Update.
2161         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2162         Don't declare.
2163         (tui_tab_width): Declare.
2164         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2165         (tui_set_default_tab_len): Remove.
2166
2167 2018-10-19  Tom Tromey  <tom@tromey.com>
2168
2169         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2170         (key_is_backspace, tui_getc): Don't declare.
2171         * tui/tui-io.c (key_is_start_sequence): Now static.
2172         (key_is_end_sequence, key_is_backspace): Remove.
2173         (tui_getc): Now static.
2174
2175 2018-10-19  Tom Tromey  <tom@tromey.com>
2176
2177         * symfile.c (reread_symbols): Clear "static_links".
2178
2179 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
2180
2181         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2182         define.
2183         (aarch64_linux_sigframe_init): Extra boundary checks.
2184
2185 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
2186
2187         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2188         the possibly non-existent tdesc type 'vec128', but the type of raw
2189         register v16 instead.
2190
2191 2018-10-19  Gary Benson <gbenson@redhat.com>
2192
2193         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2194
2195 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
2196
2197         PR cli/23785
2198         * cli/cli-dump.c (restore_binary_file): Check if "file" is
2199         NULL.
2200
2201 2018-10-17  Paul Koning  <paul_koning@dell.com>
2202
2203         * charset.c (convert_between_encodings): Fix unsigned overflow.
2204
2205 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
2206
2207         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2208         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2209         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2210         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2211         New functions.
2212         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2213         and fbsd_info_proc_mappings_header.
2214         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2215         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2216         New.
2217
2218 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
2219
2220         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2221         Solaris Maintainer.
2222
2223 2018-10-15  Tom Tromey  <tom@tromey.com>
2224
2225         * tui/tui.c (strcat_to_buf): Remove casts.
2226         * tui/tui-winsource.c (tui_show_source_line)
2227         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2228         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2229         * tui/tui-windata.c (tui_first_data_item_displayed)
2230         (tui_delete_data_content_windows, tui_erase_data_content)
2231         (tui_display_all_data, tui_display_data_from)
2232         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2233         * tui/tui-win.c (tui_set_win_height)
2234         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2235         casts.
2236         * tui/tui-win.c (tui_resize_all): Remove casts.
2237         (tui_scroll_backward_command, tui_set_focus)
2238         (tui_set_tab_width_command): Likewise.
2239         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2240         * tui/tui-regs.c (tui_show_register_group): Remove cast.
2241         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2242         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2243         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2244         Remove casts.
2245
2246 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2247
2248         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2249         AArch64/ARM maintainer.
2250
2251 2018-10-11  Gary Benson <gbenson@redhat.com>
2252
2253         * interps.h (interp::m_name): Make private and mutable.
2254         * interps.c (interp::~interp): Free m_name.
2255
2256 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2257             Simon Marchi <simark@simark.ca>
2258
2259         * README (`configure' options): Add documentation for new
2260         "--enable-unit-tests" option.
2261         * acinclude.m4: Include "selftest.m4".
2262         * configure: Regenerate.
2263         * configure.ac: Use "GDB_AC_SELFTEST".
2264         * maint.c (maintenance_selftest): Update message informing
2265         that selftests have been disabled.
2266         (maintenance_info_selftests): Likewise.
2267         * selftest.m4: New file.
2268
2269 2018-10-10  Gary Benson <gbenson@redhat.com>
2270
2271         * remote.c (remote_target::remote_send_printf): Add
2272         missing va_end found by Coverity.
2273
2274 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
2275
2276         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2277
2278 2018-10-09  Tom Tromey  <tom@tromey.com>
2279
2280         * configure: Rebuild.
2281         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2282         * NEWS: Update --enable-ubsan documentation.
2283
2284 2018-10-09  Gary Benson <gbenson@redhat.com>
2285
2286         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2287         found by Coverity.
2288
2289 2018-10-08  Tom Tromey  <tom@tromey.com>
2290
2291         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2292         variable.
2293         (riscv_fbsd_init_abi): Likewise.
2294
2295 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2296         * valops.c (value_struct_elt_for_reference): Rename local variable
2297         to work around the shadowing a previous local warning.
2298
2299 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2300
2301         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2302         * NEWS: Mention new FreeBSD/riscv native configuration.
2303         * configure.host: Add riscv*-*-freebsd*.
2304         * configure.nat: Likewise.
2305         * riscv-fbsd-nat.c: New file.
2306
2307 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2308
2309         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2310         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2311         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2312         * NEWS: Mention new FreeBSD/riscv target.
2313         * configure.tgt: Add riscv*-*-freebsd*.
2314         * riscv-fbsd-tdep.c: New file.
2315         * riscv-fbsd-tdep.h: New file.
2316
2317 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2318
2319         * regcache.h (struct regcache_map_entry): Note that this type can
2320         be used with traditional frame caches.
2321         * trad-frame.c (trad_frame_set_reg_regmap): New.
2322         * trad-frame.h (trad_frame_set_reg_regmap): New.
2323
2324 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2325
2326         PR c++/16841
2327         * valops.c (get_virtual_base_offset): New function.
2328         (value_struct_elt_for_reference): Use it to get virtual base offset
2329         and add it in calculating class member address.
2330
2331 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
2332
2333         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2334         (check_producer): Check if the producer is codewarrior.
2335         (producer_is_codewarrior): New function.
2336         (lnp_state_machine::record_line): Ignore is_stmt flag for records
2337         produced by codewarrior.
2338         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2339
2340 2018-10-06  Tom Tromey  <tom@tromey.com>
2341
2342         PR python/19399:
2343         * python/py-inferior.c: Add "architecture" entry.
2344         (infpy_architecture): New function.
2345
2346 2018-10-06  Tom Tromey  <tom@tromey.com>
2347
2348         PR python/21765:
2349         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2350         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2351         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
2352         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2353
2354 2018-10-06  Tom Tromey  <tom@tromey.com>
2355
2356         PR build/17077:
2357         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2358         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2359         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2360         #include.
2361
2362 2018-10-06  Tom Tromey  <tom@tromey.com>
2363
2364         * python/py-breakpoint.c (bppy_get_location): Handle a
2365         bp_breakpoint without a location.
2366
2367 2018-10-06  Tom Tromey  <tom@tromey.com>
2368
2369         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2370         (_RegEx): Reformat help text.
2371         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2372         (AnyCallerIs, AnyCallerMatches): Reformat help text.
2373         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2374         text.
2375         * python/lib/gdb/command/xmethods.py (InfoXMethod)
2376         (EnableXMethod, DisableXMethod): Remove help indentation.
2377         Capitalize meta-syntactic variables.
2378         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2379         (EnableUnwinder, DisableUnwinder): Remove help indentation.
2380         Capitalize meta-syntactic variables.
2381         * python/lib/gdb/command/explore.py (ExploreCommand)
2382         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2383         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2384         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2385         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2386         Remove help indentation.
2387         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2388         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2389         (DisableFrameFilter, SetFrameFilterPriority)
2390         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2391
2392 2018-10-06  Tom Tromey  <tom@tromey.com>
2393
2394         PR tui/28819:
2395         * tui/tui-io.c (gdb_wgetch): New function.
2396         (tui_mld_getc, tui_getc): Use it.
2397
2398 2018-10-05  Tom Tromey  <tom@tromey.com>
2399
2400         * sol-thread.c (sol_thread_target::wait): Rename inner
2401         "save_ptid".
2402
2403 2018-10-04  Tom Tromey  <tom@tromey.com>
2404
2405         * configure: Rebuild.
2406         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2407
2408 2018-10-04  Tom Tromey  <tom@tromey.com>
2409
2410         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2411         declaration of "block".
2412
2413 2018-10-04  Tom Tromey  <tom@tromey.com>
2414
2415         * common/filestuff.c (fdwalk): Remove inner declaration of
2416         "result".
2417
2418 2018-10-04  Tom Tromey  <tom@tromey.com>
2419
2420         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2421         "structs_addr" and hoist declaration.
2422
2423 2018-10-04  Tom Tromey  <tom@tromey.com>
2424
2425         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2426         variable "size".
2427
2428 2018-10-04  Tom Tromey  <tom@tromey.com>
2429
2430         * mdebugread.c (parse_partial_symbols): Use std::string.
2431
2432 2018-10-04  Tom Tromey  <tom@tromey.com>
2433
2434         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2435         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2436         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2437         header.
2438         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2439         more inner scope.
2440         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2441         * varobj.c (varobj_update): Rename inner "newobj",
2442         "type_changed".
2443         * valprint.c (generic_emit_char): Rename inner "buf".
2444         * valops.c (find_overload_match): Rename inner "temp".
2445         (value_struct_elt_for_reference): Declare "v" in more inner
2446         scope.
2447         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2448         * unittests/array-view-selftests.c (run_tests): Rename inner
2449         "vec".
2450         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2451         header.
2452         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2453         "tsv" in more inner scope.
2454         (print_one_static_tracepoint_marker): Rename inner
2455         "tuple_emitter".
2456         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2457         (tic6x_push_dummy_call): Don't redeclare "addr".
2458         * target-float.c: Declare "dto" lower.
2459         * symtab.c (lookup_local_symbol): Rename inner "sym".
2460         (find_pc_sect_line): Rename inner "pc".
2461         * stack.c (print_frame): Don't redeclare "gdbarch".
2462         (return_command): Rename inner "gdbarch".
2463         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2464         "sp".
2465         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2466         header.
2467         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2468         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2469         scope.
2470         * remote.c (remote_target::update_thread_list): Don't redeclare
2471         "tp".
2472         (remote_target::process_initial_stop_replies): Rename inner
2473         "thread".
2474         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2475         (remote_target::wait_as): Don't redeclare "stop_reply".
2476         (remote_target::get_thread_local_address): Rename inner
2477         "result".
2478         (remote_target::get_tib_address): Likewise.
2479
2480         * regcache.c (cooked_read_test): Rename "regnum".
2481         * record-btrace.c (cmd_record_btrace_start): Rename inner
2482         "exception".
2483         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2484         loop header.
2485         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2486         header.
2487         (ppu2spu_sniffer): Rename inner "buf".
2488         * parse.c (operator_check_standard): Rename inner "type",
2489         "objfile".
2490         * p-valprint.c (pascal_val_print): Introduce new scope for
2491         "low_bound", "high_bound".
2492         * p-exp.y (yylex): Declare "i" in loop header.
2493         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2494         Lower declaration of "s".
2495         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2496         header.
2497         (nios2_push_dummy_call): Rename "len".
2498         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2499         "buf".
2500         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2501         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2502         (linux_xfer_osdata_modules): Likewise.
2503         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2504         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2505         (mips_o64_push_dummy_call): Likewise.
2506         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2507         "op".
2508         * mi/mi-main.c (list_available_thread_groups): Rename inner
2509         "tuple_emitter".
2510         (mi_cmd_data_read_memory): Rename inner "opts".
2511         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2512         "tuple_emitter".
2513         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2514         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2515         more inner scope.
2516         (parse_partial_symbols): Rename inner "pst", "p", "name"
2517         * main.c (captured_main_1): Rename inner "i"s.
2518         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2519         "oso2".
2520         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2521         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2522         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2523         (handle_signal_stop): Rename inner "gdbarch".
2524         (handle_command): Declare "signum" in loop header.
2525         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2526         "status".
2527         (examine_prologue): Rename inner "sol" and "sof".
2528         (ia64_extract_return_value): Rename inner "val".  Declare another
2529         "val" in a more inner scope.
2530         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2531         inner scope.
2532         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2533         "except".
2534         * findvar.c (default_read_var_value): Don't redeclare "addr".
2535         * f-exp.y (yylex): Declare "i" in loop header.
2536         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2537         Rename inner "type", "expect_type".
2538         (evaluate_subexp_for_sizeof): Rename inner "pc".
2539         * elfread.c (elf_symfile_read): Rename inner "abfd".
2540         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2541         "bytes_read".
2542         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2543         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2544         (dwarf_decode_line_header): Rename inner "lh".
2545         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2546         "offset".  Declare "i" in loop header.
2547         (disassemble_dwarf_expression): Rename inner "addr_size".
2548         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2549         inner "result".
2550         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2551         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2552         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2553         "inner_list_emitter".
2554         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2555         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2556         declaration in a block.
2557         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2558         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2559         "obstack_final_size".
2560         * cp-support.c (inspect_type): Declare "i" in loop header.
2561         * compile/compile.c (compile_instance::insert_symbol_error):
2562         Rename inner "e".
2563         * common/agent.c (agent_run_command): Remove inner "ret"
2564         declaration.
2565         * coffread.c (coff_symfile_read): Rename inner "name".
2566         (coff_symfile_read): Rename inner "abfd".
2567         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2568         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2569         "high".
2570         * c-exp.y (lex_one_token): Move "len" declaration lower.
2571         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2572         "gdbarch".
2573         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2574         "b".
2575         (watch_command_1): Declare "mark" later.
2576         (clear_command): Don't shadow "a" or "b".
2577         (delete_command): Rename inner "b".
2578         (delete_trace_command): Likewise.
2579         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2580         "op".
2581         (arm_gdbarch_init): Remove inner "e_flags".
2582         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2583         "offset" in inner blocks.
2584
2585 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2586
2587         * dwarf-index-write.c (file_write): Don't write if the vector is
2588         empty.
2589
2590 2018-10-05  Tom de Vries  <tdevries@suse.de>
2591
2592         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2593         PyArg_ParseTuple call.
2594
2595 2018-10-05  Tom de Vries  <tdevries@suse.de>
2596
2597         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2598         PyArg_ParseTuple call.
2599
2600 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2601
2602         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2603         to avoid exceeding 80 characters per line limit.
2604
2605 2018-10-04  Tom Tromey  <tom@tromey.com>
2606
2607         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2608         (reread_symbols): Update.
2609         * complaints.h (clear_complaints): Remove argument.
2610         * complaints.c (enum complaint_series): Remove.
2611         (series): Remove global.
2612         (complaint_internal): Update.
2613         (clear_complaints): Remove argument.
2614
2615 2018-10-04  Tom Tromey  <tom@tromey.com>
2616
2617         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2618         debugging symbols" message if there is a separate debug objfile.
2619
2620 2018-10-04  Tom Tromey  <tom@tromey.com>
2621
2622         PR cli/19551:
2623         * symfile.c (symbol_file_add_with_addrs): Update output.
2624         * psymtab.c (require_partial_symbols): Update output.
2625
2626 2018-10-04  Tom Tromey  <tom@tromey.com>
2627
2628         PR cli/22234:
2629         * complaints.c: Emit \n.
2630
2631 2018-10-04  Tom Tromey  <tom@tromey.com>
2632
2633         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2634         (separate_debug_file_exists, find_separate_debug_file)
2635         (add_symbol_file_command, reread_symbols, allocate_symtab)
2636         (allocate_compunit_symtab): Use filtered printing, not
2637         unfiltered.
2638         * psymtab.c (require_partial_symbols, dump_psymtab)
2639         (allocate_psymtab): Use filtered printing, not unfiltered.
2640
2641 2018-10-04  Tom Tromey  <tom@tromey.com>
2642
2643         * complaints.c (complaint_internal): Correctly check complaint
2644         count.
2645
2646 2018-10-04  Tom Tromey  <tom@tromey.com>
2647
2648         * complaints.h (struct complaints): Remove declaration.
2649         * complaints.c (clear_complaints): Remove an unused variable.
2650
2651 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2652
2653         * MAINTAINERS (Write After Approval): Add self.
2654
2655 2018-10-03  Tom Tromey  <tom@tromey.com>
2656
2657         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2658         "buffer_contents".
2659         * coffread.c (coff_symtab_read): Initialize "newobj".
2660
2661 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2662
2663         * dwarf2read.c (read_func_scope): Remove struct keyword in
2664         range-based for.
2665
2666 2018-10-03  Tom Tromey  <tom@tromey.com>
2667
2668         * README: Mention --enable-ubsan.
2669         * NEWS: Mention --enable-ubsan.
2670         * acinclude.m4: Include sanitize.m4.
2671         * configure: Rebuild.
2672         * configure.ac: Call AM_GDB_UBSAN.
2673         * sanitize.m4: New file.
2674
2675 2018-10-03  Tom Tromey  <tom@tromey.com>
2676
2677         * expression.h (enum exp_opcode): Use uint8_t as base type.
2678         * expprint.c (op_name): Handle invalid opcodes.
2679
2680 2018-10-03  Tom Tromey  <tom@tromey.com>
2681
2682         * parse.c (prefixify_expression): Add assert.
2683         (parse_exp_in_context_1): Throw exception if the expression is
2684         empty.
2685
2686 2018-10-03  Tom Tromey  <tom@tromey.com>
2687
2688         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2689
2690 2018-10-03  Tom Tromey  <tom@tromey.com>
2691
2692         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2693
2694 2018-10-03  Tom Tromey  <tom@tromey.com>
2695
2696         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2697         unsigned.
2698
2699 2018-10-03  Tom Tromey  <tom@tromey.com>
2700
2701         * findvar.c (extract_integer): Do work in an unsigned type.
2702
2703 2018-10-03  Tom Tromey  <tom@tromey.com>
2704
2705         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2706         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2707         base type.
2708         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2709         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2710         type.
2711         * c-lang.h (enum c_string_type_values): Use unsigned as base
2712         type.
2713         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2714
2715 2018-10-03  Tom Tromey  <tom@tromey.com>
2716
2717         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2718         <~dwarf2_frame_state_reg_info>: Update.
2719         <dwarf2_frame_state_reg_info>: Update.
2720         <alloc_regs>: Add assertion.  Update.
2721         <reg>: Now a std::vector.
2722         <num_regs>: Remove.
2723         <swap>: Update.
2724         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2725         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2726
2727 2018-10-03  Tom Tromey  <tom@tromey.com>
2728
2729         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2730
2731 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2732
2733         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2734
2735 2018-10-02  Tom Tromey  <tom@tromey.com>
2736
2737         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2738
2739 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2740
2741         * NEWS: Mention changed commands.
2742         * ser-uds.c: New file.
2743         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2744         * configure: Regenerate.
2745         * Makefile.in: Add new file.
2746         * serial.c (serial_open): Check if filename is a socket
2747         and lookup the appropriate interface accordingly.
2748
2749 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2750
2751         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2752         define.
2753         (AARCH64_EXTRA_MAGIC): Likewise.
2754         (AARCH64_FPSIMD_MAGIC): Likewise.
2755         (AARCH64_SVE_MAGIC): Likewise.
2756         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2757         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2758         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2759         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2760         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2761         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2762         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2763         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2764         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2765         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2766         (read_aarch64_ctx): Add function.
2767         (aarch64_linux_sigframe_init): Detect FP registers.
2768
2769 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2770
2771         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2772         (AARCH64_D0_REGNUM): Likewise.
2773         (AARCH64_S0_REGNUM): Likewise.
2774         (AARCH64_H0_REGNUM): Likewise.
2775         (AARCH64_B0_REGNUM): Likewise.
2776         (AARCH64_SVE_V0_REGNUM): Likewise.
2777         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2778         (AARCH64_D0_REGNUM): Likewise.
2779         (AARCH64_S0_REGNUM): Likewise.
2780         (AARCH64_H0_REGNUM): Likewise.
2781         (AARCH64_B0_REGNUM): Likewise.
2782         (AARCH64_SVE_V0_REGNUM): Likewise.
2783
2784 2018-10-01  Gary Benson <gbenson@redhat.com>
2785
2786         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2787         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2788         prfpregset_t instead of gdb_prfpregset_t.
2789         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2790         * configure, config.in: Rebuild.
2791
2792 2018-10-01  Gary Benson <gbenson@redhat.com>
2793
2794         * common/gdb_proc_service.h: New file, factored out from...
2795         * gdb_proc_service.h: Moved common code to the above file.
2796         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2797
2798 2018-10-01  Gary Benson <gbenson@redhat.com>
2799
2800         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2801         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2802
2803 2018-10-01  Gary Benson <gbenson@redhat.com>
2804
2805         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2806         (AC_CHECK_HEADERS): Check for linux/elf.h.
2807         * configure, config.in: Rebuild.
2808         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2809         doesn't define elf_fpregset_t.
2810
2811 2018-10-01  Gary Benson <gbenson@redhat.com>
2812
2813         * gdb_proc_service.h: Whitespace change.
2814
2815 2018-10-01  Tom Tromey  <tom@tromey.com>
2816
2817         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2818         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2819         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2820
2821 2018-10-01  Tom Tromey  <tom@tromey.com>
2822
2823         * README: Minor change.
2824
2825 2018-09-30  Pedro Alves  <palves@redhat.com>
2826
2827         * darwin-nat-info.c (darwin_debug_regions_recurse)
2828         (info_mach_exceptions_command): Remove unused local variables.
2829         * darwin-nat.c (darwin_decode_notify_message)
2830         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2831         (darwin_stop_inferior, darwin_setup_exceptions)
2832         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2833         (darwin_nat_target::attach, darwin_nat_target::detach)
2834         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2835         local variables.
2836         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2837         variables.
2838
2839 2018-09-29  Tom Tromey  <tom@tromey.com>
2840
2841         * README: Remove some leftover text.
2842
2843 2018-09-29  Tom Tromey  <tom@tromey.com>
2844
2845         * PROBLEMS: Rewrite.
2846         * README: Update.
2847
2848 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2849
2850         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2851         case with explicit breakpoint kind.
2852         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2853         'additional_info' and related logic.
2854         (riscv_debug_breakpoints): New variable.
2855         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2856         instruction to determine the breakpoint kind.
2857         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2858         flag.  Update description of 'set/show riscv
2859         use-compressed-breakpoints' flag.
2860
2861 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2862
2863         (NEWS): Mention changes to frame related commands.
2864         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2865         (add_prefix_cmd_suppress_notification): New function.
2866         (add_com_suppress_notification): Call
2867         add_cmd_suppress_notification.
2868         * command.h (add_cmd_suppress_notification): Declare.
2869         (add_prefix_cmd_suppress_notification): Declare.
2870         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2871         (parse_frame_specification): Moved from stack.c, with
2872         simplification to handle a single argument.
2873         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2874         switch to the selected frame.  Add a header comment.
2875         * stack.c: Remove 'safe-ctype.h' include.
2876         (find_frame_for_function): Add declaration.
2877         (find_frame_for_address): New function.
2878         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2879         (frame_selection_by_function_completer): New function.
2880         (info_frame_command): Rename to...
2881         (info_frame_command_core): ...this, and update parameter types.
2882         (select_frame_command): Rename to...
2883         (select_frame_command_core): ...this, and update parameter types.
2884         (frame_command): Rename to...
2885         (frame_command_core): ...this, and update parameter types.
2886         (class frame_command_helper): New class to wrap implementations of
2887         frame related sub-commands.
2888         (frame_apply_cmd_list): New static global.
2889         (frame_cmd_list): Make static.
2890         (select_frame_cmd_list): New global for sub-commands.
2891         (info_frame_cmd_list): New global for sub-commands.
2892         (_initialize_stack): Register sub-commands for 'frame',
2893         'select-frame', and 'info frame'.  Update 'frame apply' commands
2894         to use frame_apply_cmd_list.  Move function local static
2895         frame_apply_list to file static frame_apply_cmd_list for
2896         consistency.
2897         * stack.h (select_frame_command): Delete declarationn.
2898         (select_frame_for_mi): Declare new function.
2899
2900 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2901
2902         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2903         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2904         and NOP.
2905
2906 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2907
2908         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2909
2910 2018-09-26  Tom Tromey  <tom@tromey.com>
2911
2912         * valops.c (auto_abandon): Remove dead code.
2913
2914 2018-09-26  Tom Tromey  <tom@tromey.com>
2915
2916         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2917
2918 2018-09-24  Tom Tromey  <tom@tromey.com>
2919
2920         * common/pathstuff.c (get_standard_cache_dir): Make
2921         "xdg_cache_home" and "home" const.
2922         * top.c (init_history): Make "tmpenv" const.
2923         * main.c (get_init_files): Make "homedir" const.
2924
2925 2018-09-23  Tom Tromey  <tom@tromey.com>
2926
2927         PR python/18852:
2928         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2929
2930 2018-09-23  Tom Tromey  <tom@tromey.com>
2931
2932         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2933         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2934         * python/python-internal.h (gdbpy_handle_exception): Declare.
2935         * python/py-utils.c (gdbpy_handle_exception): New function.
2936
2937 2018-09-23  Tom Tromey  <tom@tromey.com>
2938
2939         PR python/17284:
2940         * python/py-type.c (typy_template_argument): Check for negative
2941         argument number.
2942
2943 2018-09-23  Tom Tromey  <tom@tromey.com>
2944
2945         PR python/14062:
2946         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2947
2948 2018-09-23  Tom Tromey  <tom@tromey.com>
2949
2950         PR python/18170:
2951         * python/py-value.c (valpy_int): Allow conversion from pointer
2952         type.
2953
2954 2018-09-23  Tom Tromey  <tom@tromey.com>
2955
2956         PR python/20126:
2957         * python/py-value.c (valpy_int): Respect type sign.
2958
2959 2018-09-23  Tom Tromey  <tom@tromey.com>
2960
2961         PR python/18352;
2962         * python/py-value.c (valpy_float): Allow conversions from int or
2963         char.
2964         (valpy_int, valpy_long): Allow conversions from float.
2965
2966 2018-09-23  Tom Tromey  <tom@tromey.com>
2967
2968         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2969         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2970
2971 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2972
2973         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2974         __sighndlr.
2975         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2976
2977 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2978
2979         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2980         target_terminal::ours().
2981
2982 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2983
2984         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2985         of vl to ULONGEST.
2986
2987 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2988
2989         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2990         redundant condition.
2991
2992 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2993
2994         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2995
2996         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2997         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2998         * sol-thread.c (ps_pdmodel): Don't guard definition.
2999
3000         * procfs.c: Fix formatting.
3001
3002         * procfs.c (sysset_t_alloc): Remove.
3003         (create_procinfo): Use XNEW instead of sysset_t_alloc.
3004         (procfs_debug_inferior): Likewise.
3005         (procfs_set_exec_trap): Likewise.
3006         (proc_set_traced_sysentry): Don't allocate argp dynamically.
3007         (proc_set_traced_sysexit): Likewise.
3008
3009         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
3010         (dead_procinfo): Likewise.
3011         (proc_warn): Likewise.
3012         (proc_error): Likewise.
3013         (proc_get_LDT_entry): Likewise.
3014         (do_attach): Likewise.
3015         (procfs_target::pid_to_str): Likewise.
3016         (iterate_over_mappings): Likewise.
3017
3018         * procfs.c (create_procinfo): Fix ARI warning.
3019         (proc_get_status): Likewise.
3020         (proc_stop_process): Likewise.
3021         (proc_run_process): Likewise.
3022         (proc_kill): Likewise.
3023         (proc_get_LDT_entry): Likewise.
3024         (procfs_find_LDT_entry): Likewise.
3025         (proc_update_threads): Likewise.
3026         (proc_iterate_over_threads): Likewise.
3027         (do_attach): Likewise.
3028         (procfs_xfer_memory): Likewise.
3029         (invalidate_cache): Likewise.
3030         (procfs_target::resume): Likewise.
3031         (procfs_init_inferior): Likewise.
3032         (procfs_set_exec_trap): Likewise.
3033         (procfs_target::thread_alive): Likewise.
3034         (procfs_target::pid_to_exec_file): Likewise.
3035         (iterate_over_mappings): Likewise.
3036         (procfs_target::make_corefile_notes): Likewise.
3037         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
3038
3039         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3040         (procfs_find_LDT_entry): Likewise.
3041         * sol-thread.c (ps_lgetLDT): Likewise.
3042
3043 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3044
3045         PR tdep/17903
3046         * procfs.c (procfs_target): Declare pid_to_exec_file.
3047         (procfs_target::pid_to_exec_file): New.
3048
3049 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3050
3051         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3052         renaming.
3053         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3054         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3055
3056 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3057
3058         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3059         (supply_fpregset, fill_fpregset): Move ...
3060         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3061         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3062         Remove references to ioctl-based procfs.
3063         Include <sys/reg.h>.
3064         Remove PR_MODEL_NATIVE guards.
3065         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3066         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3067
3068 2018-09-19  Xavier Roirand  <roirand@adacore.com>
3069
3070         PR gdb/20981:
3071         * solib-darwin.c (darwin_get_dyld_bfd): New function.
3072         (darwin_solib_get_all_image_info_addr_at_init): Update call.
3073         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3074
3075 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
3076
3077         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3078         (fbsd_print_sockaddr_in6): Likewise.
3079
3080 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
3081             Chris January  <chris.january@arm.com>
3082
3083         * eval.c (skip_undetermined_arglist): Skip argument list helper.
3084         (evaluate_subexp_standard): Return a dummy type when
3085         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3086         OP_F77_UNDETERMINED_ARGLIST case.
3087         * expression.h (enum noside): Update comment.
3088
3089 2018-09-19  George Vasick <george.vasick@oracle.com>
3090
3091         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3092
3093 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
3094             April Chin <april.chin@oracle.com>
3095             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3096
3097         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3098         uint_t lwpid_t.
3099         (create_procinfo): Print pids in /proc without leading zeros.
3100
3101 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
3102
3103         * nios2-tdep.c (nios2_gcc_target_options): New.
3104         (nios2_gdb_arch_init): Install new hook.
3105
3106 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3107
3108         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3109         New file.
3110         * update-gnulib.sh: Apply patch.
3111         * configure: Re-generate.
3112
3113 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3114
3115         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3116         description.  Make "info proc" command descriptions more
3117         consistent.
3118
3119 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3120
3121         * NEWS: Mention 'info proc files' command.
3122
3123 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3124
3125         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3126         descriptors for IP_FILES and IP_ALL.
3127
3128 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3129
3130         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3131         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3132         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3133         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3134         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3135         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3136         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3137         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3138         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3139         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3140         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3141         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3142         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3143         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3144         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3145         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3146         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3147         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3148         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3149         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3150         (struct fbsd_sockaddr_un): New types.
3151         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3152         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3153         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3154         (fbsd_core_info_proc_files): New functions.
3155         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3156         IP_ALL.
3157         * fbsd-tdep.h (fbsd_info_proc_files_header)
3158         (fbsd_info_proc_files_entry): New.
3159
3160 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3161
3162         * defs.h (enum info_proc_what) [IP_FILES]: New value.
3163         * infcmd.c (info_proc_cmd_files): New function.
3164         (_initialize_infcmd): Register 'info proc files' command.
3165
3166 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3167
3168         * gnulib/aclocal-m4-deps.mk: Re-generate.
3169         * gnulib/aclocal.m4: Re-generate.
3170         * gnulib/config.in: Re-generate.
3171         * gnulib/configure: Re-generate.
3172         * gnulib/import/Makefile.am: Re-generate.
3173         * gnulib/import/Makefile.in: Re-generate.
3174         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3175         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3176         * gnulib/import/arpa_inet.in.h: New file.
3177         * gnulib/import/inet_ntop.c: New file.
3178         * gnulib/import/m4/arpa_inet_h.m4: New file.
3179         * gnulib/import/m4/inet_ntop.m4: New file.
3180         * gnulib/import/m4/netinet_in_h.m4: New file.
3181         * gnulib/import/m4/socklen.m4: New file.
3182         * gnulib/import/m4/sockpfaf.m4: New file.
3183         * gnulib/import/m4/stdalign.m4: New file.
3184         * gnulib/import/m4/sys_uio_h.m4: New file.
3185         * gnulib/import/netinet_in.in.h: New file.
3186         * gnulib/import/stdalign.in.h: New file.
3187         * gnulib/import/sys_socket.c: New file.
3188         * gnulib/import/sys_socket.in.h: New file.
3189         * gnulib/import/sys_uio.in.h: New file.
3190         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3191         module.
3192
3193 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3194
3195         * gnulib/aclocal-m4-deps.mk: New file.
3196         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3197         deterministically.
3198
3199 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3200
3201         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3202         KVE_PATH.
3203
3204 2018-09-18  Tom Tromey  <tom@tromey.com>
3205
3206         * compile/compile-object-load.c (struct
3207         link_hash_table_cleanup_data): Add constructor and destructor.
3208         Use DISABLE_COPY_AND_ASSIGN.
3209         (~link_hash_table_cleanup_data): Rename from
3210         link_hash_table_free.  Now a destructor.
3211         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
3212
3213 2018-09-18  Tom Tromey  <tom@tromey.com>
3214
3215         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3216         * compile/compile-object-load.c (struct munmap_list): Move to
3217         header file.
3218         (munmap_list::add): Rename from munmap_list_add; rewrite.
3219         (munmap_list::~munmap_list): Rename from munmap_list_free.
3220         (munmap_listp_free_cleanup): Remove.
3221         (compile_object_load): Update.
3222         * compile/compile-object-load.h (struct munmap_list): Move from
3223         compile-object-load.c.  Rewrite.
3224
3225 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
3226
3227         * aarch64-tdep.c (pass_in_v): Use register size.
3228         (aarch64_extract_return_value): Likewise.
3229         (aarch64_store_return_value): Likewise.
3230
3231 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3232
3233         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3234         rlim_t.
3235
3236 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3237
3238         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3239         Fix short help line.
3240
3241 2018-09-17  Tom Tromey  <tom@tromey.com>
3242
3243         PR python/20445:
3244         * configure: Rebuild.
3245         * configure.ac: Conditionally use -DNDEBUG for Python.
3246
3247 2018-09-17  Tom Tromey  <tom@tromey.com>
3248
3249         * configure: Rebuild.
3250         * configure.ac: Use gmp as a library dependency when checking for
3251         mpfr.
3252
3253 2018-09-17  Pedro Alves  <palves@redhat.com>
3254
3255         * python/py-inferior.c (find_inferior_object): Delete.
3256
3257 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
3258
3259         * compile/compile-cplus-types.c
3260         (compile_cplus_instance::enter_scope): Don't use new_scope after
3261         std::move.
3262
3263 2018-09-17  Tom Tromey  <tom@tromey.com>
3264
3265         * common/pathstuff.c (get_standard_cache_dir): Use
3266         ~/Library/Caches on macOS.
3267         * common/pathstuff.h (get_standard_cache_dir): Update comment.
3268
3269 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
3270
3271         PR python/23669
3272         * breakpoint.c (commands_cmd_element): New.
3273         (_initialize_breakpoint): Assign commands_cmd_element.
3274         * breakpoint.h (commands_cmd_element): New.
3275         * cli/cli-script.c (while_cmd_element, if_command,
3276         define_cmd_element): New.
3277         (command_name_equals): Remove.
3278         (process_next_line): Compare commands by pointer, not by name.
3279         (_initialize_cli_script): Assign the various cmd_list_element
3280         variables.
3281         * compile/compile.c (compile_cmd_element): New.
3282         (_initialize_compile): Assign compile_cmd_element.
3283         * compile/compile.h (compile_cmd_element): New.
3284         * guile/guile.c (guile_cmd_element): New.
3285         (install_gdb_commands): Assign guile_cmd_element.
3286         * guile/guile.h (guile_cmd_element): New.
3287         * python/python.c (python_cmd_element): New.
3288         (_initialize_python): Assign python_cmd_element.
3289         * python/python.h (python_cmd_element): New.
3290         * tracepoint.c (while_stepping_cmd_element): New.
3291         (_initialize_tracepoint): Assign while_stepping_cmd_element.
3292         * tracepoint.h (while_stepping_cmd_element): New.
3293
3294 2018-09-17  Tom Tromey  <tom@tromey.com>
3295
3296         * infrun.c (save_infcall_suspend_state): Return
3297         infcall_suspend_state_up.
3298         (save_infcall_control_state): Return infcall_control_state_up.
3299         * inferior.h (save_infcall_suspend_state)
3300         (save_infcall_control_state): Declare later.  Return unique
3301         pointers.
3302
3303 2018-09-17  Tom Tromey  <tom@tromey.com>
3304
3305         * infrun.c (struct stop_context): Declare constructor,
3306         destructor, "changed" method.
3307         (stop_context::stop_context): Rename from save_stop_context.
3308         (stop_context::~stop_context): Rename from
3309         release_stop_context_cleanup.
3310         (normal_stop): Update.
3311         (stop_context::changed): Rename from stop_context_changed.  Return
3312         bool.
3313
3314 2018-09-17  Tom Tromey  <tom@tromey.com>
3315
3316         * inferior.h (struct infcall_suspend_state_deleter): New.
3317         (infcall_suspend_state_up): New typedef.
3318         (struct infcall_control_state_deleter): New.
3319         (infcall_control_state_up): New typedef.
3320         (make_cleanup_restore_infcall_suspend_state)
3321         (make_cleanup_restore_infcall_control_state): Don't declare.
3322         * infcall.c (call_function_by_hand_dummy): Update.
3323         * infrun.c (do_restore_infcall_suspend_state_cleanup)
3324         (make_cleanup_restore_infcall_suspend_state): Remove.
3325         (do_restore_infcall_control_state_cleanup)
3326         (make_cleanup_restore_infcall_control_state): Remove.
3327
3328 2018-09-17  Tom Tromey  <tom@tromey.com>
3329
3330         * gdbthread.h (struct thread_control_state): Add initializer.
3331         (class thread_info) <control>: Remove initializer.
3332         * inferior.h (struct inferior_control_state): Add initializer.
3333         (class inferior) <control>: Remove initializer.
3334         (exit_inferior_1): Update.
3335         * infrun.c (struct infcall_control_state): Add constructors.
3336         (save_infcall_control_state): Use new.
3337         (restore_infcall_control_state, discard_infcall_control_state):
3338         Use delete.
3339
3340 2018-09-17  Tom Tromey  <tom@tromey.com>
3341
3342         * infrun.c (struct infcall_suspend_state) <registers>: Now a
3343         unique_ptr.
3344         <siginfo_data>: Now a unique_xmalloc_ptr.
3345         (save_infcall_suspend_state, restore_infcall_suspend_state)
3346         (discard_infcall_suspend_state)
3347         (get_infcall_suspend_state_regcache): Update.
3348
3349 2018-09-17  Tom Tromey  <tom@tromey.com>
3350
3351         * gdbthread.h (struct thread_suspend_state): Add initializers.
3352         (class thread_info) <suspend>: Remove initializer.
3353         * infrun.c (struct infcall_suspend_state): Add initializers.
3354         (save_infcall_suspend_state): Use new.
3355         (discard_infcall_suspend_state): Use delete.
3356
3357 2018-09-16  Tom Tromey  <tom@tromey.com>
3358
3359         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3360         Remove.
3361         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3362         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3363         (py_varobj_iter_new): Likewise.
3364         (py_varobj_get_iterator): Use gdbpy_ref.
3365
3366 2018-09-16  Tom Tromey  <tom@tromey.com>
3367
3368         * python/py-threadevent.c (py_get_event_thread): Simplify.
3369         * python/py-inferior.c (infpy_thread_from_thread_handle):
3370         Return immediately after calling thread_to_thread_object.  Use
3371         Py_RETURN_NONE.
3372         (thread_to_thread_object): Set the exception on a NULL return.
3373
3374 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
3375
3376         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3377
3378 2018-09-16  Tom Tromey  <tom@tromey.com>
3379
3380         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3381         Remove.
3382
3383 2018-09-16  Tom Tromey  <tom@tromey.com>
3384
3385         * python/python-internal.h (thread_to_thread_object): Change
3386         return type.
3387         * python/py-inferior.c (thread_to_thread_object): Return a new
3388         reference.
3389         (infpy_thread_from_thread_handle): Update.
3390         * python/py-infthread.c (gdbpy_selected_thread): Update.
3391         * python/py-stopevent.c (create_stop_event_object): Update.
3392         * python/py-threadevent.c (py_get_event_thread): Return a new
3393         reference.
3394         (py_get_event_thread): Update.
3395         * python/py-event.h (py_get_event_thread): Change return type.
3396         * python/py-continueevent.c (create_continue_event_object):
3397         Update.
3398
3399 2018-09-16  Tom Tromey  <tom@tromey.com>
3400
3401         * python/py-progspace.c (pspy_get_objfiles): Update.
3402         * python/python-internal.h (objfile_to_objfile_object): Change
3403         return type.
3404         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3405         Update.
3406         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3407         Update.
3408         * python/python.c (gdbpy_get_current_objfile): Update.
3409         (gdbpy_objfiles): Update.
3410         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3411         Update.
3412         (objfile_to_objfile_object): Return a new reference.
3413         * python/py-symtab.c (stpy_get_objfile): Update.
3414         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3415         Update.
3416
3417 2018-09-16  Tom Tromey  <tom@tromey.com>
3418
3419         * python/py-inferior.c (infpy_get_progspace): Update.
3420         * python/python-internal.h (pspace_to_pspace_object): Change
3421         return type.
3422         * python/py-newobjfileevent.c
3423         (create_clear_objfiles_event_object): Update.
3424         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3425         Update.
3426         * python/python.c (gdbpy_get_current_progspace): Update.
3427         (gdbpy_progspaces): Update.
3428         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3429         reference.
3430         * python/py-objfile.c (objfpy_get_progspace): Update.
3431         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3432         Update.
3433
3434 2018-09-16  Tom Tromey  <tom@tromey.com>
3435
3436         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3437         (solib_name, block_for_pc, find_pc_line): New functions.
3438         (execute_unwinders): Update.
3439         * python/py-block.c (gdbpy_block_for_pc): Remove.
3440         * python/py-inferior.c (infpy_get_progspace): New function.
3441         (inferior_object_getset) <progspace>: Add.
3442         * python/py-progspace.c (pspy_objfiles): Rewrite.
3443         (pspy_solib_name, pspy_block_for_pc)
3444         (pspy_find_pc_line, pspy_is_valid): New functions.
3445         (progspace_object_methods): Add entries for solib_name,
3446         block_for_pc, find_pc_line, is_valid.
3447         * python/python-internal.h (gdbpy_block_for_pc)
3448         (build_objfiles_list): Don't declare.
3449         * python/python.c: Don't include solib.h.
3450         (gdbpy_solib_name, gdbpy_find_pc_line)
3451         (gdbpy_get_current_progspace, build_objfiles_list)
3452         (gdbpy_objfiles): Remove.
3453         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3454         solib_name, find_pc_line>: Remove entries.
3455
3456 2018-09-16  Tom Tromey  <tom@tromey.com>
3457
3458         * top.c (new_ui_command): Use GNU style for metasyntactic
3459         variables.
3460         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3461         variables.
3462         * maint.c (maintenance_translate_address): Remove "<>" around
3463         text.
3464         * interps.c (interpreter_exec_cmd): Use GNU style for
3465         metasyntactic variables.
3466         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3467         metasyntactic variables.
3468         * tracepoint.c (tfind_range_command): Use GNU style for
3469         metasyntactic variables.
3470         (tfind_outside_command): Likewise.
3471         (_initialize_tracepoint): Likewise.
3472         * remote.c (extended_remote_target::create_inferior): Use GNU
3473         style for metasyntactic variables.
3474         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3475         metasyntactic variables.
3476         (adi_assign_command): Likewise.
3477
3478 2018-09-16  Tom Tromey  <tom@tromey.com>
3479
3480         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3481         metasyntactic variables.  Print message if no disassembler options
3482         are available.
3483
3484 2018-09-15  Tom Tromey  <tom@tromey.com>
3485
3486         * infcmd.c (get_inferior_args): Return const char *.
3487         * inferior.h (get_inferior_args): Return type now const.
3488         * linux-tdep.c (linux_fill_prpsinfo): Update.
3489         * procfs.c (procfs_target::make_corefile_notes): Update.
3490
3491 2018-09-07  Tom Tromey  <tom@tromey.com>
3492
3493         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3494         inside the TRY.
3495
3496 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3497
3498         * nios2-tdep.c (nios2_type_align): New.
3499         (nios2_gdb_arch_init): Install type_align hook.
3500
3501 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3502
3503         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3504         type that is neither object file owned, nor gdbarch owned.
3505         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3506         gdbarch is non-NULL.
3507         (alloc_type_instance): Allocate non-objfile owned types on the
3508         gdbarch obstack.
3509         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3510         using TYPE_ALLOC to ensure memory is allocated on the correct
3511         obstack.
3512         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3513         obstack, or the gdbarch obstack.
3514         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3515
3516 2018-09-14  Tom Tromey  <tom@tromey.com>
3517
3518         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3519         block.
3520
3521 2018-09-14  Tom Tromey  <tom@tromey.com>
3522
3523         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3524
3525 2018-09-13  Tom Tromey  <tom@tromey.com>
3526
3527         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3528         static.
3529
3530 2018-09-13  Tom Tromey  <tom@tromey.com>
3531
3532         * exec.c (try_open_exec_file): Use std::string.
3533
3534 2018-09-13  Tom Tromey  <tom@tromey.com>
3535
3536         * utils.h (gdb_bfd_errmsg): Return std::string.
3537         * exec.c (exec_file_attach): Update.
3538         * compile/compile-object-load.c (compile_object_load): Update.
3539         * utils.c (gdb_bfd_errmsg): Return std::string.
3540
3541 2018-09-13  Tom Tromey  <tom@tromey.com>
3542
3543         * procfs.c (struct procinfo_deleter): New.
3544         (procinfo_up): New typedef.
3545         (do_destroy_procinfo_cleanup): Remove.
3546         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3547
3548 2018-09-13  Tom Tromey  <tom@tromey.com>
3549
3550         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3551
3552 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3553 2018-09-13  Tom Tromey  <tom@tromey.com>
3554
3555         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3556         (pspy_get_objfiles): New function.
3557         (progspace_object_methods): New.
3558         (pspace_object_type): Add tp_methods callback.
3559         * python/python-internal.h (build_objfiles_list): New
3560         declaration.
3561         * python/python.c (build_objfiles_list): New function.
3562         (gdbpy_objfiles): Implement using build_objfiles_list.
3563         * NEWS: Mention the Progspace.objfiles method.
3564
3565 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3566
3567         * python/py-inferior.c (infpy_get_progspace): New function.
3568         (inferior_object_getset): Add progspace property.
3569         * NEWS: Mention the new property.
3570
3571 2018-09-13  Tom Tromey  <tom@tromey.com>
3572
3573         PR rust/23650:
3574         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3575
3576 2018-09-13  Tom Tromey  <tom@tromey.com>
3577
3578         PR rust/23626:
3579         * rust-lang.c (rust_enum_variant): Now static.
3580         (rust_empty_enum_p): New function.
3581         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3582         Handle empty enum.
3583
3584 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3585
3586         * python/py-inferior.c (infpy_repr): New.
3587         (inferior_object_type): Register infpy_repr.
3588         * python/py-objfile.c (objfpy_repr): New.
3589         (objfile_object_type): Register objfpy_repr.
3590
3591 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3592
3593         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3594
3595 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3596
3597         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3598         typo.
3599
3600 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3601
3602         * common/common-utils.c: Don't include '<sys/stat.h>'.
3603         (is_regular_file): Move to...
3604         * common/filestuff.c (is_regular_file): ... here.
3605         * common/common-utils.h (is_regular_file): Move to...
3606         * common/filestuff.h (is_regular_file): ... here.
3607
3608 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3609
3610         * skip.c (debug_skip): New variable.
3611         (skiplist_entry::do_skip_file_p): Add debug output.
3612         (skiplist_entry::do_skip_gfile_p): Likewise.
3613         (skiplist_entry::skip_function_p): Likewise.
3614         (_initialize_step_skip): Create debug command.
3615         * NEWS: Mention set/show debug skip.
3616
3617 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3618
3619         * darwin-nat.c (should_disable_startup_with_shell):
3620         New function.
3621         (darwin_nat_target::create_inferior): Add call.
3622
3623 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3624
3625         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3626         inf_port, msg_state>: Initialize.
3627         (struct darwin_thread_info) <signaled, single_step>: Change
3628         type and initialize.
3629         (struct darwin_thread_info) <event>: Initialize.
3630
3631 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3632
3633         PR gdb/23555
3634         PR gdb/23558
3635         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3636         guesses.
3637
3638 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3639
3640         Revert:
3641         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3642
3643         PR gdb/23555
3644         PR gdb/23558
3645         * gnulib/aclocal.m4: Regenerate.
3646         * gnulib/config.in: Regenerate.
3647         * gnulib/configure: Regenerate.
3648         * gnulib/import/Makefile.am: Update.
3649         * gnulib/import/Makefile.in: Update.
3650         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3651         * gnulib/import/_Noreturn.h: ... this.
3652         * gnulib/import/alloca.in.h: Update.
3653         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3654         * gnulib/import/arg-nonnull.h: ... this.
3655         * gnulib/import/assure.h: Update.
3656         * gnulib/import/at-func.c: Update.
3657         * gnulib/import/basename-lgpl.c: Update.
3658         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3659         * gnulib/import/c++defs.h: ... this.
3660         * gnulib/import/canonicalize-lgpl.c: Update.
3661         * gnulib/import/cdefs.h: Update.
3662         * gnulib/import/chdir-long.c: Update.
3663         * gnulib/import/chdir-long.h: Update.
3664         * gnulib/import/cloexec.c: Update.
3665         * gnulib/import/cloexec.h: Update.
3666         * gnulib/import/close.c: Update.
3667         * gnulib/import/closedir.c: Update.
3668         * gnulib/import/config.charset: Update.
3669         * gnulib/import/dirent-private.h: Update.
3670         * gnulib/import/dirent.in.h: Update.
3671         * gnulib/import/dirfd.c: Update.
3672         * gnulib/import/dirname-lgpl.c: Update.
3673         * gnulib/import/dirname.h: Update.
3674         * gnulib/import/dosname.h: Update.
3675         * gnulib/import/dup-safer-flag.c: Update.
3676         * gnulib/import/dup-safer.c: Update.
3677         * gnulib/import/dup.c: Update.
3678         * gnulib/import/dup2.c: Update.
3679         * gnulib/import/errno.in.h: Update.
3680         * gnulib/import/error.c: Update.
3681         * gnulib/import/error.h: Update.
3682         * gnulib/import/exitfail.c: Update.
3683         * gnulib/import/exitfail.h: Update.
3684         * gnulib/import/extra/update-copyright: Update.
3685         * gnulib/import/fchdir.c: Update.
3686         * gnulib/import/fcntl.c: Update.
3687         * gnulib/import/fcntl.in.h: Update.
3688         * gnulib/import/fd-hook.c: Update.
3689         * gnulib/import/fd-hook.h: Update.
3690         * gnulib/import/fd-safer-flag.c: Update.
3691         * gnulib/import/fd-safer.c: Update.
3692         * gnulib/import/fdopendir.c: Update.
3693         * gnulib/import/filename.h: Update.
3694         * gnulib/import/filenamecat-lgpl.c: Update.
3695         * gnulib/import/filenamecat.h: Update.
3696         * gnulib/import/flexmember.h: Update.
3697         * gnulib/import/float+.h: Update.
3698         * gnulib/import/float.c: Update.
3699         * gnulib/import/float.in.h: Update.
3700         * gnulib/import/fnmatch.c: Update.
3701         * gnulib/import/fnmatch.in.h: Update.
3702         * gnulib/import/fnmatch_loop.c: Update.
3703         * gnulib/import/fpucw.h: Update.
3704         * gnulib/import/frexp.c: Update.
3705         * gnulib/import/frexpl.c: Update.
3706         * gnulib/import/fstat.c: Update.
3707         * gnulib/import/fstatat.c: Update.
3708         * gnulib/import/getcwd-lgpl.c: Update.
3709         * gnulib/import/getcwd.c: Update.
3710         * gnulib/import/getdtablesize.c: Update.
3711         * gnulib/import/getlogin_r.c: Update.
3712         * gnulib/import/getprogname.c: Update.
3713         * gnulib/import/getprogname.h: Update.
3714         * gnulib/import/gettext.h: Update.
3715         * gnulib/import/gettimeofday.c: Update.
3716         * gnulib/import/glob-libc.h: Update.
3717         * gnulib/import/glob.c: Update.
3718         * gnulib/import/glob.in.h: Update.
3719         * gnulib/import/glob_internal.h: Update.
3720         * gnulib/import/glob_pattern_p.c: Update.
3721         * gnulib/import/globfree.c: Update.
3722         * gnulib/import/hard-locale.c: Update.
3723         * gnulib/import/hard-locale.h: Update.
3724         * gnulib/import/intprops.h: Update.
3725         * gnulib/import/inttypes.in.h: Update.
3726         * gnulib/import/isnan.c: Update.
3727         * gnulib/import/isnand-nolibm.h: Update.
3728         * gnulib/import/isnand.c: Update.
3729         * gnulib/import/isnanl-nolibm.h: Update.
3730         * gnulib/import/isnanl.c: Update.
3731         * gnulib/import/itold.c: Update.
3732         * gnulib/import/libc-config.h: Update.
3733         * gnulib/import/limits.in.h: Update.
3734         * gnulib/import/localcharset.c: Update.
3735         * gnulib/import/localcharset.h: Update.
3736         * gnulib/import/localtime-buffer.c: Update.
3737         * gnulib/import/localtime-buffer.h: Update.
3738         * gnulib/import/lstat.c: Update.
3739         * gnulib/import/m4/00gnulib.m4: Update.
3740         * gnulib/import/m4/__inline.m4: Update.
3741         * gnulib/import/m4/absolute-header.m4: Update.
3742         * gnulib/import/m4/alloca.m4: Update.
3743         * gnulib/import/m4/builtin-expect.m4: Update.
3744         * gnulib/import/m4/canonicalize.m4: Update.
3745         * gnulib/import/m4/chdir-long.m4: Update.
3746         * gnulib/import/m4/close.m4: Update.
3747         * gnulib/import/m4/closedir.m4: Update.
3748         * gnulib/import/m4/configmake.m4: Update.
3749         * gnulib/import/m4/d-ino.m4: Update.
3750         * gnulib/import/m4/d-type.m4: Update.
3751         * gnulib/import/m4/dirent_h.m4: Update.
3752         * gnulib/import/m4/dirfd.m4: Update.
3753         * gnulib/import/m4/dirname.m4: Update.
3754         * gnulib/import/m4/double-slash-root.m4: Update.
3755         * gnulib/import/m4/dup.m4: Update.
3756         * gnulib/import/m4/dup2.m4: Update.
3757         * gnulib/import/m4/eealloc.m4: Update.
3758         * gnulib/import/m4/environ.m4: Update.
3759         * gnulib/import/m4/errno_h.m4: Update.
3760         * gnulib/import/m4/error.m4: Update.
3761         * gnulib/import/m4/exponentd.m4: Update.
3762         * gnulib/import/m4/exponentl.m4: Update.
3763         * gnulib/import/m4/extensions.m4: Update.
3764         * gnulib/import/m4/extern-inline.m4: Update.
3765         * gnulib/import/m4/fchdir.m4: Update.
3766         * gnulib/import/m4/fcntl-o.m4: Update.
3767         * gnulib/import/m4/fcntl.m4: Update.
3768         * gnulib/import/m4/fcntl_h.m4: Update.
3769         * gnulib/import/m4/fdopendir.m4: Update.
3770         * gnulib/import/m4/filenamecat.m4: Update.
3771         * gnulib/import/m4/flexmember.m4: Update.
3772         * gnulib/import/m4/float_h.m4: Update.
3773         * gnulib/import/m4/fnmatch.m4: Update.
3774         * gnulib/import/m4/fnmatch_h.m4: Update.
3775         * gnulib/import/m4/fpieee.m4: Update.
3776         * gnulib/import/m4/frexp.m4: Update.
3777         * gnulib/import/m4/frexpl.m4: Update.
3778         * gnulib/import/m4/fstat.m4: Update.
3779         * gnulib/import/m4/fstatat.m4: Update.
3780         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3781         * gnulib/import/m4/getcwd-path-max.m4: Update.
3782         * gnulib/import/m4/getcwd.m4: Update.
3783         * gnulib/import/m4/getdtablesize.m4: Update.
3784         * gnulib/import/m4/getlogin.m4: Update.
3785         * gnulib/import/m4/getlogin_r.m4: Update.
3786         * gnulib/import/m4/getpagesize.m4: Update.
3787         * gnulib/import/m4/getprogname.m4: Update.
3788         * gnulib/import/m4/gettimeofday.m4: Update.
3789         * gnulib/import/m4/glibc21.m4: Update.
3790         * gnulib/import/m4/glob.m4: Update.
3791         * gnulib/import/m4/glob_h.m4: Update.
3792         * gnulib/import/m4/gnulib-cache.m4: Update.
3793         * gnulib/import/m4/gnulib-common.m4: Update.
3794         * gnulib/import/m4/gnulib-comp.m4: Update.
3795         * gnulib/import/m4/gnulib-tool.m4: Update.
3796         * gnulib/import/m4/hard-locale.m4: Update.
3797         * gnulib/import/m4/include_next.m4: Update.
3798         * gnulib/import/m4/inttypes-pri.m4: Update.
3799         * gnulib/import/m4/inttypes.m4: Update.
3800         * gnulib/import/m4/isnand.m4: Update.
3801         * gnulib/import/m4/isnanl.m4: Update.
3802         * gnulib/import/m4/largefile.m4: Update.
3803         * gnulib/import/m4/limits-h.m4: Update.
3804         * gnulib/import/m4/localcharset.m4: Update.
3805         * gnulib/import/m4/locale-fr.m4: Update.
3806         * gnulib/import/m4/locale-ja.m4: Update.
3807         * gnulib/import/m4/locale-zh.m4: Update.
3808         * gnulib/import/m4/localtime-buffer.m4: Update.
3809         * gnulib/import/m4/longlong.m4: Update.
3810         * gnulib/import/m4/lstat.m4: Update.
3811         * gnulib/import/m4/malloc.m4: Update.
3812         * gnulib/import/m4/malloca.m4: Update.
3813         * gnulib/import/m4/math_h.m4: Update.
3814         * gnulib/import/m4/mbrtowc.m4: Update.
3815         * gnulib/import/m4/mbsinit.m4: Update.
3816         * gnulib/import/m4/mbsrtowcs.m4: Update.
3817         * gnulib/import/m4/mbstate_t.m4: Update.
3818         * gnulib/import/m4/memchr.m4: Update.
3819         * gnulib/import/m4/memmem.m4: Update.
3820         * gnulib/import/m4/mempcpy.m4: Update.
3821         * gnulib/import/m4/memrchr.m4: Update.
3822         * gnulib/import/m4/mkdir.m4: Update.
3823         * gnulib/import/m4/mkstemp.m4: Update.
3824         * gnulib/import/m4/mmap-anon.m4: Update.
3825         * gnulib/import/m4/mode_t.m4: Update.
3826         * gnulib/import/m4/msvc-inval.m4: Update.
3827         * gnulib/import/m4/msvc-nothrow.m4: Update.
3828         * gnulib/import/m4/multiarch.m4: Update.
3829         * gnulib/import/m4/nocrash.m4: Update.
3830         * gnulib/import/m4/off_t.m4: Update.
3831         * gnulib/import/m4/onceonly.m4: Update.
3832         * gnulib/import/m4/open-cloexec.m4: Update.
3833         * gnulib/import/m4/open.m4: Update.
3834         * gnulib/import/m4/openat.m4: Update.
3835         * gnulib/import/m4/opendir.m4: Update.
3836         * gnulib/import/m4/pathmax.m4: Update.
3837         * gnulib/import/m4/rawmemchr.m4: Update.
3838         * gnulib/import/m4/readdir.m4: Update.
3839         * gnulib/import/m4/readlink.m4: Update.
3840         * gnulib/import/m4/realloc.m4: Update.
3841         * gnulib/import/m4/rename.m4: Update.
3842         * gnulib/import/m4/rewinddir.m4: Update.
3843         * gnulib/import/m4/rmdir.m4: Update.
3844         * gnulib/import/m4/save-cwd.m4: Update.
3845         * gnulib/import/m4/secure_getenv.m4: Update.
3846         * gnulib/import/m4/setenv.m4: Update.
3847         * gnulib/import/m4/signal_h.m4: Update.
3848         * gnulib/import/m4/ssize_t.m4: Update.
3849         * gnulib/import/m4/stat-time.m4: Update.
3850         * gnulib/import/m4/stat.m4: Update.
3851         * gnulib/import/m4/std-gnu11.m4: Update.
3852         * gnulib/import/m4/stdbool.m4: Update.
3853         * gnulib/import/m4/stddef_h.m4: Update.
3854         * gnulib/import/m4/stdint.m4: Update.
3855         * gnulib/import/m4/stdio_h.m4: Update.
3856         * gnulib/import/m4/stdlib_h.m4: Update.
3857         * gnulib/import/m4/strchrnul.m4: Update.
3858         * gnulib/import/m4/strdup.m4: Update.
3859         * gnulib/import/m4/strerror.m4: Update.
3860         * gnulib/import/m4/string_h.m4: Update.
3861         * gnulib/import/m4/strstr.m4: Update.
3862         * gnulib/import/m4/strtok_r.m4: Update.
3863         * gnulib/import/m4/sys_socket_h.m4: Update.
3864         * gnulib/import/m4/sys_stat_h.m4: Update.
3865         * gnulib/import/m4/sys_time_h.m4: Update.
3866         * gnulib/import/m4/sys_types_h.m4: Update.
3867         * gnulib/import/m4/tempname.m4: Update.
3868         * gnulib/import/m4/time_h.m4: Update.
3869         * gnulib/import/m4/unistd-safer.m4: Update.
3870         * gnulib/import/m4/unistd_h.m4: Update.
3871         * gnulib/import/m4/warn-on-use.m4: Update.
3872         * gnulib/import/m4/wchar_h.m4: Update.
3873         * gnulib/import/m4/wchar_t.m4: Update.
3874         * gnulib/import/m4/wctype_h.m4: Update.
3875         * gnulib/import/m4/wint_t.m4: Update.
3876         * gnulib/import/malloc.c: Update.
3877         * gnulib/import/malloc/scratch_buffer.h: Update.
3878         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3879         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3880         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3881         * gnulib/import/malloca.c: Update.
3882         * gnulib/import/malloca.h: Update.
3883         * gnulib/import/malloca.valgrind: Update.
3884         * gnulib/import/math.in.h: Update.
3885         * gnulib/import/mbrtowc.c: Update.
3886         * gnulib/import/mbsinit.c: Update.
3887         * gnulib/import/mbsrtowcs-impl.h: Update.
3888         * gnulib/import/mbsrtowcs-state.c: Update.
3889         * gnulib/import/mbsrtowcs.c: Update.
3890         * gnulib/import/memchr.c: Update.
3891         * gnulib/import/memmem.c: Update.
3892         * gnulib/import/mempcpy.c: Update.
3893         * gnulib/import/memrchr.c: Update.
3894         * gnulib/import/mkdir.c: Update.
3895         * gnulib/import/mkstemp.c: Update.
3896         * gnulib/import/msvc-inval.c: Update.
3897         * gnulib/import/msvc-inval.h: Update.
3898         * gnulib/import/msvc-nothrow.c: Update.
3899         * gnulib/import/msvc-nothrow.h: Update.
3900         * gnulib/import/open.c: Update.
3901         * gnulib/import/openat-die.c: Update.
3902         * gnulib/import/openat-priv.h: Update.
3903         * gnulib/import/openat-proc.c: Update.
3904         * gnulib/import/openat.c: Update.
3905         * gnulib/import/openat.h: Update.
3906         * gnulib/import/opendir.c: Update.
3907         * gnulib/import/pathmax.h: Update.
3908         * gnulib/import/pipe-safer.c: Update.
3909         * gnulib/import/rawmemchr.c: Update.
3910         * gnulib/import/readdir.c: Update.
3911         * gnulib/import/readlink.c: Update.
3912         * gnulib/import/realloc.c: Update.
3913         * gnulib/import/ref-add.sin: Update.
3914         * gnulib/import/ref-del.sin: Update.
3915         * gnulib/import/rename.c: Update.
3916         * gnulib/import/rewinddir.c: Update.
3917         * gnulib/import/rmdir.c: Update.
3918         * gnulib/import/same-inode.h: Update.
3919         * gnulib/import/save-cwd.c: Update.
3920         * gnulib/import/save-cwd.h: Update.
3921         * gnulib/import/scratch_buffer.h: Update.
3922         * gnulib/import/secure_getenv.c: Update.
3923         * gnulib/import/setenv.c: Update.
3924         * gnulib/import/signal.in.h: Update.
3925         * gnulib/import/stat-time.c: Update.
3926         * gnulib/import/stat-time.h: Update.
3927         * gnulib/import/stat-w32.c: Update.
3928         * gnulib/import/stat-w32.h: Update.
3929         * gnulib/import/stat.c: Update.
3930         * gnulib/import/stdbool.in.h: Update.
3931         * gnulib/import/stddef.in.h: Update.
3932         * gnulib/import/stdint.in.h: Update.
3933         * gnulib/import/stdio.in.h: Update.
3934         * gnulib/import/stdlib.in.h: Update.
3935         * gnulib/import/str-two-way.h: Update.
3936         * gnulib/import/strchrnul.c: Update.
3937         * gnulib/import/strdup.c: Update.
3938         * gnulib/import/streq.h: Update.
3939         * gnulib/import/strerror-override.c: Update.
3940         * gnulib/import/strerror-override.h: Update.
3941         * gnulib/import/strerror.c: Update.
3942         * gnulib/import/string.in.h: Update.
3943         * gnulib/import/stripslash.c: Update.
3944         * gnulib/import/strnlen1.c: Update.
3945         * gnulib/import/strnlen1.h: Update.
3946         * gnulib/import/strstr.c: Update.
3947         * gnulib/import/strtok_r.c: Update.
3948         * gnulib/import/sys_stat.in.h: Update.
3949         * gnulib/import/sys_time.in.h: Update.
3950         * gnulib/import/sys_types.in.h: Update.
3951         * gnulib/import/tempname.c: Update.
3952         * gnulib/import/tempname.h: Update.
3953         * gnulib/import/time.in.h: Update.
3954         * gnulib/import/unistd--.h: Update.
3955         * gnulib/import/unistd-safer.h: Update.
3956         * gnulib/import/unistd.in.h: Update.
3957         * gnulib/import/unsetenv.c: Update.
3958         * gnulib/import/verify.h: Update.
3959         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3960         * gnulib/import/wchar.in.h: Update.
3961         * gnulib/import/wctype.in.h: Update.
3962         * gnulib/import/xalloc-oversized.h: Update.
3963         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3964         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3965
3966 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3967
3968         * record-btrace.c (get_thread_current_frame): Remove
3969         old_inferior_ptid.
3970
3971 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3972
3973         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3974         with check_tag to 1 if and only if the type is tagged and the
3975         component being searched cannot been found in the current
3976         view. Otherwise, always call ada_to_fixed_type with
3977         check_tag to 0.
3978
3979 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3980
3981         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3982         declaration.
3983         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3984         * ada-varobj.c (ada_varobj_get_number_of_children,
3985         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3986
3987 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3988
3989         * ada-valprint.c (ada_value_print): Use type instead of
3990         enclosing type.
3991
3992 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3993
3994         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3995         an array of access to unconstrained array.
3996
3997 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3998
3999         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
4000         (ada_check_typedef): Use it.
4001
4002 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4003
4004         * ada-varobj.c (ada_varobj_describe_struct_child)
4005         (ada_varobj_describe_child): Handle union case like struct one.
4006
4007 2018-09-10  Tom Tromey  <tom@tromey.com>
4008
4009         PR python/18380:
4010         * python/python.c (_initialize_python): Make example in "python"
4011         help work in Python 3.
4012
4013 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
4014
4015         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
4016         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
4017         $(EXEEXT) to the script, as it is not a program.
4018
4019 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4020
4021         * python/py-prettyprint.c (pretty_print_one_value): Return
4022         gdbpy_ref<>.
4023         (print_string_repr): Adjust.
4024         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
4025         * python/python-internal.h (apply_varobj_pretty_printer): Return
4026         gdbpy_ref<>.
4027         * varobj.c (varobj_value_get_print_value): Adjust.
4028
4029 2018-09-08  Tom Tromey  <tom@tromey.com>
4030
4031         PR python/16047:
4032         * python/py-prettyprint.c (pretty_print_one_value): Check for
4033         to_string method.
4034
4035 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4036
4037         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4038         replace_operator_with_call.
4039
4040 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4041
4042         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4043
4044 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4045
4046         * ada-typeprint.c (print_range): Print the bounds using TYPE
4047         rather than its TYPE_TARGET_TYPE.
4048
4049 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4050
4051         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4052         call to ada_to_fixed_value_create.
4053
4054 2018-09-08  Jerome Guitton  <guitton@adacore.com>
4055
4056         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4057
4058 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4059
4060         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4061         by calls to error.
4062
4063 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4064
4065         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4066         Move update of loop variable "fi".
4067
4068 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4069
4070         * ada-lang.c (value_assign_to_component): In the case of
4071         big-endian targets, extract the bits of the given VAL
4072         using an src_offset of zero if container is not a scalar.
4073
4074 2018-09-06  Simon Ser  <contact@emersion.fr>
4075
4076         PR gdb/23105
4077         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4078         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4079         * fbsd-tdep.c (fbsd_make_note_desc): New.
4080         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4081         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4082         * target.h (enum target_object) Add FreeBSD-specific
4083         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4084
4085 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4086
4087         * compile/compile-c.h (generate_c_for_variable_locations):
4088         Change reference to pointer.
4089         * compile/compile-c-support.c (compile_program) <compute>:
4090         Likewise.
4091         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4092         (generate_c_for_for_one_variable): Likewise
4093         (generate_c_for_variable_locations): Likewise
4094         * compile/compile-c-types.c (compile_c_instance::convert_type):
4095         Likewise
4096         * compile/compile-cplus-symbols.c (convert_one_symbol):
4097         std::move the scope passed to enter_scope.
4098         * compile/compile-cplus-types.c
4099         (compile_cplus_instance::enter_scope): Make parameter
4100         rvalue-reference.
4101         (compile_cplus_instance::new_scope): Change reference to
4102         pointer.
4103         (compile_cplus_instance::convert_type): Likewise
4104         (compile_cplus_convert_typedef): std::move the scope passed to
4105         enter_scope.
4106         (compile_cplus_convert_struct_or_union): Likewise.
4107         (compile_cplus_convert_enum): Likewise.
4108         (compile_cplus_convert_namespace): Likewise.
4109         * compile/compile-cplus.h (compile_cplus_instance)
4110         <enter_scope>: Make parameter rvalue-reference.
4111         * compile/compile-internal.h (compile_instance)
4112         <get_cached_type>: Likewise
4113         * compile/compile-loc2c.c (push): Likewise
4114         (pushf): Likewise
4115         (unary): Likewise
4116         (binary): Likewise
4117         (print_label): Likewise
4118         (pushf_register_address): Likewise
4119         (pushf_register): Likewise
4120         (do_compile_dwarf_expr_to_c): Likewise
4121         (compile_dwarf_expr_to_c): Likewise
4122         (compile_dwarf_bounds_to_c): Likewise
4123         * compile/compile.c (compile_instance::get_cached_type):
4124         Likewise
4125         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4126         (compile_dwarf_bounds_to_c): Likewise
4127         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4128         (dwarf2_compile_property_to_c): Likewise
4129         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4130         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4131         Likewise
4132
4133 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4134
4135         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4136         * tui/tui-data.c (init_content_element): Don't initialize it.
4137
4138 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4139
4140         * tui/tui-data.h (struct tui_win_info)
4141         <detail::opaque>: Remove.
4142         * tui/tui-data.c (init_win_info): Remove assignment.
4143
4144 2018-09-05  Tom Tromey  <tom@tromey.com>
4145
4146         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4147         -Wformat-nonliteral.
4148         * target-float.c (host_float_ops<T>::to_string)
4149         (host_float_ops<T>::from_string): Use
4150         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4151         * configure: Rebuild.
4152
4153 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4154
4155         * printcmd.c (printf_c_string): Use
4156         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4157         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4158
4159 2018-09-05  Tom Tromey  <tom@tromey.com>
4160
4161         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4162
4163 2018-09-05  Tom de Vries  <tdevries@suse.de>
4164
4165         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4166         with resolve_abstract_p == true.
4167         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4168         defaulting to false. Propagate resolve_abstract_p to
4169         dwarf2_fetch_die_loc_sect_off.
4170         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4171         parameter, defaulting to false.
4172         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4173         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4174         parameter.
4175         * dwarf2read.h (struct die_info): Forward-declare.
4176         (die_info_ptr): New typedef.
4177         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4178
4179 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
4180
4181         GDB 8.2 released.
4182
4183 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4184             Pedro Alves  <palves@redhat.com>
4185
4186         * gnulib/Makefile.in (aclocal_m4_deps): Move to
4187         "aclocal-m4-deps.mk".  Include file here.
4188         $(srcdir)/aclocal.m4: Add "configure.ac".
4189         * gnulib/aclocal-m4-deps.mk: New file.
4190         * gnulib/update-gnulib.sh: Automatically update
4191         "aclocal-m4-deps.mk".
4192
4193 2018-09-04  Tom Tromey  <tom@tromey.com>
4194
4195         * configure: Rebuild.
4196         * configure.ac: Remove multi-ice code.
4197
4198 2018-09-04  Tom Tromey  <tom@tromey.com>
4199
4200         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4201         (ada-exp.o): Update.
4202
4203 2018-09-04  Tom Tromey  <tom@tromey.com>
4204
4205         * Makefile.in (printcmd.o, target-float.o): Remove.
4206         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4207
4208 2018-09-04  Tom Tromey  <tom@tromey.com>
4209
4210         * gnulib/Makefile.in: Remove obsolete comment.
4211         * Makefile.in: Remove obsolete comment.
4212
4213 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
4214
4215         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4216         line with '+'.
4217
4218 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4219
4220         * riscv-tdep.c: Add 'prologue-value.h' include.
4221         (struct riscv_unwind_cache): New struct.
4222         (riscv_debug_unwinder): New global.
4223         (riscv_scan_prologue): Update arguments, capture register details
4224         from prologue scan.
4225         (riscv_skip_prologue): Reformat arguments line, move end of
4226         prologue calculation into riscv_scan_prologue.
4227         (riscv_frame_cache): Update return type, create
4228         riscv_unwind_cache, scan the prologue, and fill in remaining cache
4229         details.
4230         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4231         (riscv_frame_prev_register): Use the trad_frame within the
4232         riscv_unwind_cache.
4233         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4234         flag.
4235
4236 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4237
4238         * trad-frame.h (trad_frame_set_realreg): Declare.
4239         (trad_frame_set_addr): Declare.
4240         * trad-frame.c (trad_frame_set_realreg): Define new function.
4241         (trad_frame_set_addr): Define new function.
4242         (trad_frame_set_reg_realreg): Use new function.
4243         (trad_frame_set_reg_addr): Use new function.
4244
4245 2018-09-01  Keith Seitz  <keiths@redhat.com>
4246
4247         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4248         pulongest instead of "%lld".
4249         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4250         ATTRIBUTE_UNUSED.
4251
4252 2018-08-31  Tom Tromey  <tom@tromey.com>
4253
4254         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4255         variant part type.
4256
4257 2018-08-31  Pedro Alves  <palves@redhat.com>
4258
4259         * gdbarch.h: Regenerate.
4260
4261 2018-08-31  Pedro Alves  <palves@redhat.com>
4262
4263         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4264         * target.h (Hardware watchpoint interfaces): Describe
4265         continuable/steppable/non-steppable watchpoints.
4266         * gdbarch.h, gdbarch.c: Regenerate.
4267
4268 2018-08-31  Pedro Alves  <palves@redhat.com>
4269
4270         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4271         Delete.
4272         * s390-linux-nat.c
4273         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4274         * target.h (target_ops::have_continuable_watchpoint): Delete.
4275         (target_have_continuable_watchpoint): Delete.
4276         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4277         * target-delegates.c: Regenerate.
4278
4279 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4280
4281         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4282         the files present in "gnulib/import/m4/".
4283
4284 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4285
4286         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4287         c.sw, c.swsp, and c.sdsp.
4288
4289 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4290
4291         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4292         (riscv_read_misa_reg): Don't cache value read into inferior data.
4293         (riscv_new_inferior_data): Delete.
4294         (riscv_inferior_data_cleanup): Delete.
4295         (riscv_inferior_data): Delete.
4296         (riscv_invalidate_inferior_data): Delete.
4297         (_initialize_riscv_tdep): Remove initialisation of inferior data.
4298
4299 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
4300
4301         * compile/compile-cplus-types.c
4302         (compile_cplus_instance::leave_scope): Take the address of scope
4303         object.
4304         (compile_cplus_instance::convert_qualified_base): Compare quals
4305         to 0.
4306
4307 2018-08-30  Keith Seitz  <keiths@redhat.com>
4308
4309         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4310         Use "%s" and host_address_to_string instead of "%p" in printf.
4311
4312 2018-08-29  Keith Seitz  <keiths@redhat.com>
4313
4314         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4315         and compile-cplus-types.c.
4316         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4317         * c-lang.c (cplus_language_defn): Set C++ compile functions.
4318         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4319         Declare.
4320         * compile/compile-c-support.c: Include compile-cplus.h.
4321         (load_libcompile): Templatize.
4322         (get_compile_context): "New" function.
4323         (c_get_compile_context): Use get_compile_context.
4324         (cplus_get_compile_context): New function.
4325         (cplus_push_user_expression, cplus_pop_user_expression)
4326         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4327         (cplus_compute_program): Define new structs/functions.
4328         * compile/compile-cplus-symmbols.c: New file.
4329         * compile/compile-cplus-types.c: New file.
4330         * compile/compile-cplus.h: New file.
4331         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4332         Declare.
4333         * compile/compile-object-load.c (get_out_value_type): Use
4334         strncmp_iw when comparing symbol names.
4335         (compile_object_load): Add mst_bss and mst_data.
4336         * compile/compile.c (_initialize_compile): Remove
4337         -Wno-implicit-function-declaration from `compile_args'.
4338         * compile/gcc-cp-plugin.h: New file.
4339         * NEWS: Mention C++ compile support and new debug options.
4340
4341 2018-08-29  Keith Seitz  <keiths@redhat.com>
4342
4343         * linespec.c (collect_info::add_symbol): Make virtual.
4344         (struct symbol_searcher_collect_info): New struct.
4345         (symbol_searcher::find_all_symbols): New method.
4346         * symtab.h (class symbol_searcher): New class.
4347
4348 2018-08-29  Keith Seitz  <keiths@redhat.com>
4349
4350         * linespec.c (struct linespec) <function_symbols, label_symbols>:
4351         Change to vector of block_symbol.  Update all users.
4352         (struct collect_info) <symbols>: Likewise.
4353         (collect_info::add_symbol): Take block_symbol as argument.
4354         Update all callers.
4355         (decode_compound_collector) <m_symbols>: Change type to vector
4356         of block_symbol.  Update all users.
4357         (decode_compound_collector::operator ()): Change parameter type
4358         to block_symbol.
4359         (find_method, find_function_symbols, find_linespec_symbols)
4360         (find_label_symbols_in_block, find_label_symbols): Change symbol
4361         vectors to block_symbol vectors.
4362         * symtab.h (symbol_found_callback_ftype): Change parameter type to
4363         block_symbol.
4364
4365 2018-08-29  Keith Seitz  <keiths@redhat.com>
4366
4367         * linespec.c (symbolp): Remove typedef and VEC definitions.
4368         (bound_minimal_symbol_d): Likewise.
4369
4370 2018-08-29  Keith Seitz  <keiths@redhat.com>
4371
4372         * linespec.c (decode_compound_collector::decode_compound_collector):
4373         Remove initialization for `m_symtabs'.
4374         (decode_compound_collector::release_symbols): Change return type
4375         to std::vector.  Update all callers.
4376         (class decode_compound_collector) <m_symbols>: Change type to
4377         std::vector.
4378         (lookup_prefix_sym): Change return type to std::vector.  Update all
4379         callers.
4380         (compare_symbols): Remove.
4381         (std_compare_symbols): Rename to `compare_symbols'.
4382         (find_method): Change `sym_classes' parameter to std::vector.
4383         Update all callers.  Use std::sort to sort sym_classes.
4384         (find_linespec_symbols): Remove cleanup.
4385
4386 2018-08-29  Keith Seitz  <keiths@redhat.com>
4387
4388         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4389         std::vector.  Update all users.
4390         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4391         (struct collect_info) <minimal_symbols>: Likewise.
4392         (compare_msymbols): Return bool.  Change parameters to const
4393         bound_minimal_symbol references.
4394         (find_method, find_function_symbols, find_linespec_symbols): Change
4395         `minsyms' parameter to std::vector.  Update all callers.
4396
4397 2018-08-29  Keith Seitz  <keiths@redhat.com>
4398
4399         * linespec.c (struct linespec) <label_symbols>: Change type to
4400         std::vector.  Update all users.
4401         (find_label_symbols_in_block): Change `result' parameter to
4402         std::vector.  Update all callers.
4403         (find_label_symbols): Return std::vector.  Update all callers.
4404
4405 2018-08-29  Keith Seitz  <keiths@redhat.com>
4406
4407         * linespec.c (struct linespec) <function_symbols>: Change type to
4408         std::vector.  Update all users.
4409         (struct collect_info) <function_symbols>: Likewise.
4410         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4411         (std_compare_symbols): New function.
4412         (find_method, find_function_symbols, find_linespec_symbols)
4413         (find_label_symbols_in_block): Change `symbols' parameter to
4414         std::vector.  Update all callers.
4415         (find_label_symbols): Likewise for `function_symbols' and
4416         `label_funcs_ret'.
4417
4418 2018-08-29  Keith Seitz  <keiths@redhat.com>
4419
4420         * linespec.c (symtab_vector_up): Define.
4421         (struct linespec) <file_symtabs>: Change type to std::vector *.
4422         Update all uses.
4423         (struct collect_info) <file_symtabs>: Likewise.
4424         (collect_symtabs_from_filename): Return symtab_vector_up.
4425         Update all callers.
4426         (decode_objc): Remove cleanup.
4427         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4428         (symtab_collector::release_symtabs): Return symtab_vector_up.
4429         Update all callers.
4430         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4431         Update all users.
4432         (collect_symtabs_from_filename, symtabs_from_filename): Return
4433         symtab_vector_up.  Update all callers.
4434
4435 2018-08-29  Tom Tromey  <tom@tromey.com>
4436
4437         * csky-tdep.c (csky_analyze_prologue): Use
4438         core_addr_to_string_nz.
4439
4440 2018-08-29  Tom Tromey  <tom@tromey.com>
4441
4442         * windows-nat.c (struct xlate_exception) <them>: Change type to
4443         DWORD.
4444         (xlate): Fix formatting.  Remove last entry.
4445         (struct xlate_exception, xlate): Comment out.
4446         (windows_nat_target::resume): Use ranged for.
4447
4448 2018-08-29  Jim Wilson  <jimw@sifive.com>
4449
4450         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4451         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4452         of NT_PRFPREG.
4453         (riscv_linux_nat_target::store_registers): Likewise.
4454
4455 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4456
4457         PR gdb/23555
4458         PR gdb/23558
4459         * gnulib/aclocal.m4: Regenerate.
4460         * gnulib/config.in: Regenerate.
4461         * gnulib/configure: Regenerate.
4462         * gnulib/import/Makefile.am: Update.
4463         * gnulib/import/Makefile.in: Update.
4464         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4465         * gnulib/import/_Noreturn.h: ... this.
4466         * gnulib/import/alloca.in.h: Update.
4467         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4468         * gnulib/import/arg-nonnull.h: ... this.
4469         * gnulib/import/assure.h: Update.
4470         * gnulib/import/at-func.c: Update.
4471         * gnulib/import/basename-lgpl.c: Update.
4472         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4473         * gnulib/import/c++defs.h: ... this.
4474         * gnulib/import/canonicalize-lgpl.c: Update.
4475         * gnulib/import/cdefs.h: Update.
4476         * gnulib/import/chdir-long.c: Update.
4477         * gnulib/import/chdir-long.h: Update.
4478         * gnulib/import/cloexec.c: Update.
4479         * gnulib/import/cloexec.h: Update.
4480         * gnulib/import/close.c: Update.
4481         * gnulib/import/closedir.c: Update.
4482         * gnulib/import/config.charset: Update.
4483         * gnulib/import/dirent-private.h: Update.
4484         * gnulib/import/dirent.in.h: Update.
4485         * gnulib/import/dirfd.c: Update.
4486         * gnulib/import/dirname-lgpl.c: Update.
4487         * gnulib/import/dirname.h: Update.
4488         * gnulib/import/dosname.h: Update.
4489         * gnulib/import/dup-safer-flag.c: Update.
4490         * gnulib/import/dup-safer.c: Update.
4491         * gnulib/import/dup.c: Update.
4492         * gnulib/import/dup2.c: Update.
4493         * gnulib/import/errno.in.h: Update.
4494         * gnulib/import/error.c: Update.
4495         * gnulib/import/error.h: Update.
4496         * gnulib/import/exitfail.c: Update.
4497         * gnulib/import/exitfail.h: Update.
4498         * gnulib/import/extra/update-copyright: Update.
4499         * gnulib/import/fchdir.c: Update.
4500         * gnulib/import/fcntl.c: Update.
4501         * gnulib/import/fcntl.in.h: Update.
4502         * gnulib/import/fd-hook.c: Update.
4503         * gnulib/import/fd-hook.h: Update.
4504         * gnulib/import/fd-safer-flag.c: Update.
4505         * gnulib/import/fd-safer.c: Update.
4506         * gnulib/import/fdopendir.c: Update.
4507         * gnulib/import/filename.h: Update.
4508         * gnulib/import/filenamecat-lgpl.c: Update.
4509         * gnulib/import/filenamecat.h: Update.
4510         * gnulib/import/flexmember.h: Update.
4511         * gnulib/import/float+.h: Update.
4512         * gnulib/import/float.c: Update.
4513         * gnulib/import/float.in.h: Update.
4514         * gnulib/import/fnmatch.c: Update.
4515         * gnulib/import/fnmatch.in.h: Update.
4516         * gnulib/import/fnmatch_loop.c: Update.
4517         * gnulib/import/fpucw.h: Update.
4518         * gnulib/import/frexp.c: Update.
4519         * gnulib/import/frexpl.c: Update.
4520         * gnulib/import/fstat.c: Update.
4521         * gnulib/import/fstatat.c: Update.
4522         * gnulib/import/getcwd-lgpl.c: Update.
4523         * gnulib/import/getcwd.c: Update.
4524         * gnulib/import/getdtablesize.c: Update.
4525         * gnulib/import/getlogin_r.c: Update.
4526         * gnulib/import/getprogname.c: Update.
4527         * gnulib/import/getprogname.h: Update.
4528         * gnulib/import/gettext.h: Update.
4529         * gnulib/import/gettimeofday.c: Update.
4530         * gnulib/import/glob-libc.h: Update.
4531         * gnulib/import/glob.c: Update.
4532         * gnulib/import/glob.in.h: Update.
4533         * gnulib/import/glob_internal.h: Update.
4534         * gnulib/import/glob_pattern_p.c: Update.
4535         * gnulib/import/globfree.c: Update.
4536         * gnulib/import/hard-locale.c: Update.
4537         * gnulib/import/hard-locale.h: Update.
4538         * gnulib/import/intprops.h: Update.
4539         * gnulib/import/inttypes.in.h: Update.
4540         * gnulib/import/isnan.c: Update.
4541         * gnulib/import/isnand-nolibm.h: Update.
4542         * gnulib/import/isnand.c: Update.
4543         * gnulib/import/isnanl-nolibm.h: Update.
4544         * gnulib/import/isnanl.c: Update.
4545         * gnulib/import/itold.c: Update.
4546         * gnulib/import/libc-config.h: Update.
4547         * gnulib/import/limits.in.h: Update.
4548         * gnulib/import/localcharset.c: Update.
4549         * gnulib/import/localcharset.h: Update.
4550         * gnulib/import/localtime-buffer.c: Update.
4551         * gnulib/import/localtime-buffer.h: Update.
4552         * gnulib/import/lstat.c: Update.
4553         * gnulib/import/m4/00gnulib.m4: Update.
4554         * gnulib/import/m4/__inline.m4: Update.
4555         * gnulib/import/m4/absolute-header.m4: Update.
4556         * gnulib/import/m4/alloca.m4: Update.
4557         * gnulib/import/m4/builtin-expect.m4: Update.
4558         * gnulib/import/m4/canonicalize.m4: Update.
4559         * gnulib/import/m4/chdir-long.m4: Update.
4560         * gnulib/import/m4/close.m4: Update.
4561         * gnulib/import/m4/closedir.m4: Update.
4562         * gnulib/import/m4/configmake.m4: Update.
4563         * gnulib/import/m4/d-ino.m4: Update.
4564         * gnulib/import/m4/d-type.m4: Update.
4565         * gnulib/import/m4/dirent_h.m4: Update.
4566         * gnulib/import/m4/dirfd.m4: Update.
4567         * gnulib/import/m4/dirname.m4: Update.
4568         * gnulib/import/m4/double-slash-root.m4: Update.
4569         * gnulib/import/m4/dup.m4: Update.
4570         * gnulib/import/m4/dup2.m4: Update.
4571         * gnulib/import/m4/eealloc.m4: Update.
4572         * gnulib/import/m4/environ.m4: Update.
4573         * gnulib/import/m4/errno_h.m4: Update.
4574         * gnulib/import/m4/error.m4: Update.
4575         * gnulib/import/m4/exponentd.m4: Update.
4576         * gnulib/import/m4/exponentl.m4: Update.
4577         * gnulib/import/m4/extensions.m4: Update.
4578         * gnulib/import/m4/extern-inline.m4: Update.
4579         * gnulib/import/m4/fchdir.m4: Update.
4580         * gnulib/import/m4/fcntl-o.m4: Update.
4581         * gnulib/import/m4/fcntl.m4: Update.
4582         * gnulib/import/m4/fcntl_h.m4: Update.
4583         * gnulib/import/m4/fdopendir.m4: Update.
4584         * gnulib/import/m4/filenamecat.m4: Update.
4585         * gnulib/import/m4/flexmember.m4: Update.
4586         * gnulib/import/m4/float_h.m4: Update.
4587         * gnulib/import/m4/fnmatch.m4: Update.
4588         * gnulib/import/m4/fnmatch_h.m4: Update.
4589         * gnulib/import/m4/fpieee.m4: Update.
4590         * gnulib/import/m4/frexp.m4: Update.
4591         * gnulib/import/m4/frexpl.m4: Update.
4592         * gnulib/import/m4/fstat.m4: Update.
4593         * gnulib/import/m4/fstatat.m4: Update.
4594         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4595         * gnulib/import/m4/getcwd-path-max.m4: Update.
4596         * gnulib/import/m4/getcwd.m4: Update.
4597         * gnulib/import/m4/getdtablesize.m4: Update.
4598         * gnulib/import/m4/getlogin.m4: Update.
4599         * gnulib/import/m4/getlogin_r.m4: Update.
4600         * gnulib/import/m4/getpagesize.m4: Update.
4601         * gnulib/import/m4/getprogname.m4: Update.
4602         * gnulib/import/m4/gettimeofday.m4: Update.
4603         * gnulib/import/m4/glibc21.m4: Update.
4604         * gnulib/import/m4/glob.m4: Update.
4605         * gnulib/import/m4/glob_h.m4: Update.
4606         * gnulib/import/m4/gnulib-cache.m4: Update.
4607         * gnulib/import/m4/gnulib-common.m4: Update.
4608         * gnulib/import/m4/gnulib-comp.m4: Update.
4609         * gnulib/import/m4/gnulib-tool.m4: Update.
4610         * gnulib/import/m4/hard-locale.m4: Update.
4611         * gnulib/import/m4/include_next.m4: Update.
4612         * gnulib/import/m4/inttypes-pri.m4: Update.
4613         * gnulib/import/m4/inttypes.m4: Update.
4614         * gnulib/import/m4/isnand.m4: Update.
4615         * gnulib/import/m4/isnanl.m4: Update.
4616         * gnulib/import/m4/largefile.m4: Update.
4617         * gnulib/import/m4/limits-h.m4: Update.
4618         * gnulib/import/m4/localcharset.m4: Update.
4619         * gnulib/import/m4/locale-fr.m4: Update.
4620         * gnulib/import/m4/locale-ja.m4: Update.
4621         * gnulib/import/m4/locale-zh.m4: Update.
4622         * gnulib/import/m4/localtime-buffer.m4: Update.
4623         * gnulib/import/m4/longlong.m4: Update.
4624         * gnulib/import/m4/lstat.m4: Update.
4625         * gnulib/import/m4/malloc.m4: Update.
4626         * gnulib/import/m4/malloca.m4: Update.
4627         * gnulib/import/m4/math_h.m4: Update.
4628         * gnulib/import/m4/mbrtowc.m4: Update.
4629         * gnulib/import/m4/mbsinit.m4: Update.
4630         * gnulib/import/m4/mbsrtowcs.m4: Update.
4631         * gnulib/import/m4/mbstate_t.m4: Update.
4632         * gnulib/import/m4/memchr.m4: Update.
4633         * gnulib/import/m4/memmem.m4: Update.
4634         * gnulib/import/m4/mempcpy.m4: Update.
4635         * gnulib/import/m4/memrchr.m4: Update.
4636         * gnulib/import/m4/mkdir.m4: Update.
4637         * gnulib/import/m4/mkstemp.m4: Update.
4638         * gnulib/import/m4/mmap-anon.m4: Update.
4639         * gnulib/import/m4/mode_t.m4: Update.
4640         * gnulib/import/m4/msvc-inval.m4: Update.
4641         * gnulib/import/m4/msvc-nothrow.m4: Update.
4642         * gnulib/import/m4/multiarch.m4: Update.
4643         * gnulib/import/m4/nocrash.m4: Update.
4644         * gnulib/import/m4/off_t.m4: Update.
4645         * gnulib/import/m4/onceonly.m4: Update.
4646         * gnulib/import/m4/open-cloexec.m4: Update.
4647         * gnulib/import/m4/open.m4: Update.
4648         * gnulib/import/m4/openat.m4: Update.
4649         * gnulib/import/m4/opendir.m4: Update.
4650         * gnulib/import/m4/pathmax.m4: Update.
4651         * gnulib/import/m4/rawmemchr.m4: Update.
4652         * gnulib/import/m4/readdir.m4: Update.
4653         * gnulib/import/m4/readlink.m4: Update.
4654         * gnulib/import/m4/realloc.m4: Update.
4655         * gnulib/import/m4/rename.m4: Update.
4656         * gnulib/import/m4/rewinddir.m4: Update.
4657         * gnulib/import/m4/rmdir.m4: Update.
4658         * gnulib/import/m4/save-cwd.m4: Update.
4659         * gnulib/import/m4/secure_getenv.m4: Update.
4660         * gnulib/import/m4/setenv.m4: Update.
4661         * gnulib/import/m4/signal_h.m4: Update.
4662         * gnulib/import/m4/ssize_t.m4: Update.
4663         * gnulib/import/m4/stat-time.m4: Update.
4664         * gnulib/import/m4/stat.m4: Update.
4665         * gnulib/import/m4/std-gnu11.m4: Update.
4666         * gnulib/import/m4/stdbool.m4: Update.
4667         * gnulib/import/m4/stddef_h.m4: Update.
4668         * gnulib/import/m4/stdint.m4: Update.
4669         * gnulib/import/m4/stdio_h.m4: Update.
4670         * gnulib/import/m4/stdlib_h.m4: Update.
4671         * gnulib/import/m4/strchrnul.m4: Update.
4672         * gnulib/import/m4/strdup.m4: Update.
4673         * gnulib/import/m4/strerror.m4: Update.
4674         * gnulib/import/m4/string_h.m4: Update.
4675         * gnulib/import/m4/strstr.m4: Update.
4676         * gnulib/import/m4/strtok_r.m4: Update.
4677         * gnulib/import/m4/sys_socket_h.m4: Update.
4678         * gnulib/import/m4/sys_stat_h.m4: Update.
4679         * gnulib/import/m4/sys_time_h.m4: Update.
4680         * gnulib/import/m4/sys_types_h.m4: Update.
4681         * gnulib/import/m4/tempname.m4: Update.
4682         * gnulib/import/m4/time_h.m4: Update.
4683         * gnulib/import/m4/unistd-safer.m4: Update.
4684         * gnulib/import/m4/unistd_h.m4: Update.
4685         * gnulib/import/m4/warn-on-use.m4: Update.
4686         * gnulib/import/m4/wchar_h.m4: Update.
4687         * gnulib/import/m4/wchar_t.m4: Update.
4688         * gnulib/import/m4/wctype_h.m4: Update.
4689         * gnulib/import/m4/wint_t.m4: Update.
4690         * gnulib/import/malloc.c: Update.
4691         * gnulib/import/malloc/scratch_buffer.h: Update.
4692         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4693         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4694         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4695         * gnulib/import/malloca.c: Update.
4696         * gnulib/import/malloca.h: Update.
4697         * gnulib/import/malloca.valgrind: Update.
4698         * gnulib/import/math.in.h: Update.
4699         * gnulib/import/mbrtowc.c: Update.
4700         * gnulib/import/mbsinit.c: Update.
4701         * gnulib/import/mbsrtowcs-impl.h: Update.
4702         * gnulib/import/mbsrtowcs-state.c: Update.
4703         * gnulib/import/mbsrtowcs.c: Update.
4704         * gnulib/import/memchr.c: Update.
4705         * gnulib/import/memmem.c: Update.
4706         * gnulib/import/mempcpy.c: Update.
4707         * gnulib/import/memrchr.c: Update.
4708         * gnulib/import/mkdir.c: Update.
4709         * gnulib/import/mkstemp.c: Update.
4710         * gnulib/import/msvc-inval.c: Update.
4711         * gnulib/import/msvc-inval.h: Update.
4712         * gnulib/import/msvc-nothrow.c: Update.
4713         * gnulib/import/msvc-nothrow.h: Update.
4714         * gnulib/import/open.c: Update.
4715         * gnulib/import/openat-die.c: Update.
4716         * gnulib/import/openat-priv.h: Update.
4717         * gnulib/import/openat-proc.c: Update.
4718         * gnulib/import/openat.c: Update.
4719         * gnulib/import/openat.h: Update.
4720         * gnulib/import/opendir.c: Update.
4721         * gnulib/import/pathmax.h: Update.
4722         * gnulib/import/pipe-safer.c: Update.
4723         * gnulib/import/rawmemchr.c: Update.
4724         * gnulib/import/readdir.c: Update.
4725         * gnulib/import/readlink.c: Update.
4726         * gnulib/import/realloc.c: Update.
4727         * gnulib/import/ref-add.sin: Update.
4728         * gnulib/import/ref-del.sin: Update.
4729         * gnulib/import/rename.c: Update.
4730         * gnulib/import/rewinddir.c: Update.
4731         * gnulib/import/rmdir.c: Update.
4732         * gnulib/import/same-inode.h: Update.
4733         * gnulib/import/save-cwd.c: Update.
4734         * gnulib/import/save-cwd.h: Update.
4735         * gnulib/import/scratch_buffer.h: Update.
4736         * gnulib/import/secure_getenv.c: Update.
4737         * gnulib/import/setenv.c: Update.
4738         * gnulib/import/signal.in.h: Update.
4739         * gnulib/import/stat-time.c: Update.
4740         * gnulib/import/stat-time.h: Update.
4741         * gnulib/import/stat-w32.c: Update.
4742         * gnulib/import/stat-w32.h: Update.
4743         * gnulib/import/stat.c: Update.
4744         * gnulib/import/stdbool.in.h: Update.
4745         * gnulib/import/stddef.in.h: Update.
4746         * gnulib/import/stdint.in.h: Update.
4747         * gnulib/import/stdio.in.h: Update.
4748         * gnulib/import/stdlib.in.h: Update.
4749         * gnulib/import/str-two-way.h: Update.
4750         * gnulib/import/strchrnul.c: Update.
4751         * gnulib/import/strdup.c: Update.
4752         * gnulib/import/streq.h: Update.
4753         * gnulib/import/strerror-override.c: Update.
4754         * gnulib/import/strerror-override.h: Update.
4755         * gnulib/import/strerror.c: Update.
4756         * gnulib/import/string.in.h: Update.
4757         * gnulib/import/stripslash.c: Update.
4758         * gnulib/import/strnlen1.c: Update.
4759         * gnulib/import/strnlen1.h: Update.
4760         * gnulib/import/strstr.c: Update.
4761         * gnulib/import/strtok_r.c: Update.
4762         * gnulib/import/sys_stat.in.h: Update.
4763         * gnulib/import/sys_time.in.h: Update.
4764         * gnulib/import/sys_types.in.h: Update.
4765         * gnulib/import/tempname.c: Update.
4766         * gnulib/import/tempname.h: Update.
4767         * gnulib/import/time.in.h: Update.
4768         * gnulib/import/unistd--.h: Update.
4769         * gnulib/import/unistd-safer.h: Update.
4770         * gnulib/import/unistd.in.h: Update.
4771         * gnulib/import/unsetenv.c: Update.
4772         * gnulib/import/verify.h: Update.
4773         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4774         * gnulib/import/wchar.in.h: Update.
4775         * gnulib/import/wctype.in.h: Update.
4776         * gnulib/import/xalloc-oversized.h: Update.
4777         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4778         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4779
4780 2018-08-16  Gary Benson <gbenson@redhat.com>
4781
4782         PR gdb/13000:
4783         * gdb/main.c (captured_main_1): Exit with nonzero status
4784         in batch mode if the last command to be executed failed.
4785         * NEWS: Mention the above.
4786
4787 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4788
4789         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4790         end of warning message.
4791
4792 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4793
4794         PR gdb/22943:
4795         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4796         (aarch64_extract_return_value): Use
4797         aapcs_is_vfp_call_or_return_candidate.
4798         (aarch64_return_in_memory): Likewise.
4799         (aarch64_store_return_value): Likewise.
4800
4801 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4802
4803         * aarch64-tdep.c
4804         (aapcs_is_vfp_call_or_return_candidate): Make static
4805         (pass_in_v_or_stack): Remove function.
4806         (pass_in_v_vfp_candidate): New function.
4807         (aarch64_push_dummy_call): Check for float register candidates.
4808
4809 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4810
4811         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4812         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4813         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4814
4815 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4816
4817         PR build/23399
4818         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4819         (struct ipa_sym_addresses): Rename to...
4820         (struct ipa_sym_addresses_common): ... this.
4821         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4822
4823 2018-08-28  Tom Tromey  <tom@tromey.com>
4824
4825         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4826         (token_fifo): Now a std::vector.
4827         (yylex, c_parse): Update.
4828         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4829         (token_fifo): Now a std::vector.
4830         (yylex, d_parse): Update.
4831         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4832         (token_fifo): Now a std::vector.
4833         (yylex, go_parse): Update.
4834
4835 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4836
4837         * parser-defs.h (struct type_stack) <elements>: Change type to
4838         std::vector<union type_stack_elt>.
4839         <depth, size>: Remove.
4840         * parse.c (parse_exp_in_context_1): Adjust.
4841         (type_stack_reserve): Remove.
4842         (check_type_stack_depth): Remove.
4843         (insert_into_type_stack): Adjust to std::vector.
4844         (insert_type): Likewise.
4845         (push_type): Likewise.
4846         (push_type_int): Likewise.
4847         (insert_type_address_space): Likewise.
4848         (pop_type): Likewise.
4849         (pop_type_int): Likewise.
4850         (pop_typelist): Likewise.
4851         (pop_type_stack): Likewise.
4852         (append_type_stack): Likewise.
4853         (push_type_stack): Likewise.
4854         (get_type_stack): Likewise.
4855         (type_stack_cleanup): Likewise.
4856         (push_typelist): Likewise.
4857         (follow_types): Likewise.
4858         (_initialize_parse): Likewise.
4859
4860 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4861
4862         * NEWS: Mention csky target.
4863
4864 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4865             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4866             Don Breazeal  <donb@codesourcery.com>
4867
4868         * csky-linux-tdep.c: New file.
4869         * csky-tdep.c: Likewise.
4870         * csky-tdep.h: Likewise.
4871         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4872         csky-tdep.o.
4873         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4874         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4875         * configure.tgt: Add csky support.
4876
4877 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4878
4879         * python/py-framefilter.c (py_print_frame): Print frame architecture
4880         when printing on an MI output.
4881
4882 2018-08-27  Tom Tromey  <tom@tromey.com>
4883
4884         PR build/23087:
4885         * configure: Rebuild.
4886         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4887
4888 2018-08-27  Tom Tromey  <tom@tromey.com>
4889
4890         * aarch64-linux-tdep.c
4891         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4892         casts to int.
4893
4894 2018-08-27  Tom Tromey  <tom@tromey.com>
4895
4896         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4897         unsigned.
4898         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4899         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4900         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4901         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4902         unsigned.
4903
4904 2018-08-27  Tom Tromey  <tom@tromey.com>
4905
4906         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4907         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4908
4909 2018-08-27  Tom Tromey  <tom@tromey.com>
4910
4911         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4912         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4913         ULONGEST_MAX.
4914         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4915         ULONGEST_MAX.
4916         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4917         ULONGEST_MAX.
4918         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4919         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4920         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4921         ULONGEST_MAX.
4922         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4923         (ppc64_linux_sigaction_tramp_frame)
4924         (ppc32_linux_sighandler_tramp_frame)
4925         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4926         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4927         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4928         * mn10300-linux-tdep.c (am33_linux_sigframe)
4929         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4930         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4931         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4932         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4933         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4934         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4935         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4936         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4937         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4938         * microblaze-linux-tdep.c
4939         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4940         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4941         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4942         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4943         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4944         * common/common-types.h (ULONGEST_MAX): New define.
4945         (CORE_ADDR_MAX): Fix formatting.
4946         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4947         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4948         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4949         (arm_linux_rt_sigreturn_tramp_frame)
4950         (arm_eabi_linux_sigreturn_tramp_frame)
4951         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4952         (thumb2_eabi_linux_sigreturn_tramp_frame)
4953         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4954         (arm_linux_restart_syscall_tramp_frame)
4955         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4956         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4957         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4958         ULONGEST_MAX.
4959         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4960
4961 2018-08-27  Tom Tromey  <tom@tromey.com>
4962
4963         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4964         CORE_ADDR_MAX.
4965         * mips-tdep.c (mips_deal_with_atomic_sequence)
4966         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4967         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4968         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4969         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4970         CORE_ADDR_MAX.
4971         * aarch64-tdep.c (aarch64_software_single_step): Use
4972         CORE_ADDR_MAX.
4973
4974 2018-08-27  Tom Tromey  <tom@tromey.com>
4975
4976         * linespec.c (complete_linespec_component): Add cast to "char".
4977         * completer.c (completion_tracker::build_completion_result): Add
4978         cast to "char".
4979
4980 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4981
4982         * solist.h (struct solist, struct target_so_ops): Fix
4983         indentation.
4984
4985 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4986
4987         * ada-tasks.c (ada_task_info_s): Remove typedef.
4988         (DEF_VEC_O(ada_task_info_s)): Remove.
4989         (struct ada_tasks_inferior_data): Initialize fields.
4990         <task_list>: Make an std::vector.
4991         (get_ada_tasks_inferior_data): Allocate with new.
4992         (ada_get_task_number): Adjust.
4993         (get_task_number_from_id): Likewise.
4994         (valid_task_id): Likewise.
4995         (ada_get_task_info_from_ptid): Likewise.
4996         (iterate_over_live_ada_tasks): Likewise.
4997         (add_ada_task): Likewise.
4998         (read_known_tasks): Likewise.
4999         (ada_build_task_list): Likewise.
5000         (print_ada_task_info): Likewise.
5001         (info_task): Likewise.
5002         (task_command_1): Likewise.
5003
5004 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
5005
5006         * ada-lang.c (add_angle_brackets): Return std::string.
5007
5008 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
5009
5010         * python/py-threadevent.c (py_get_event_thread): Initialize
5011         pythread.
5012
5013 2018-08-24  Pedro Alves  <palves@redhat.com>
5014
5015         * python/py-bpevent.c (create_breakpoint_event_object): Use
5016         copy-initialization.
5017         * python/py-continueevent.c (emit_continue_event): Use
5018         copy-initialization.
5019         * python/py-exitedevent.c (create_exited_event_object): Return a
5020         gdbpy_ref<>.
5021         (emit_exited_event): Use copy-initialization.
5022         * python/py-inferior.c (python_new_inferior)
5023         (python_inferior_deleted, add_thread_object): Use
5024         copy-initialization.
5025         * python/py-infevents.c (create_inferior_call_event_object)
5026         (create_register_changed_event_object)
5027         (create_memory_changed_event_object): Return a gdbpy_ref<>.
5028         (emit_inferior_call_event, emit_memory_changed_event)
5029         (emit_register_changed_event): Use copy-initialization.
5030         * python/py-newobjfileevent.c (create_new_objfile_event_object):
5031         Return a gdbpy_ref<>.
5032         (emit_new_objfile_event): Use copy-initialization.
5033         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
5034         (emit_clear_objfiles_event): Use copy-initialization.
5035         * python/py-signalevent.c (create_signal_event_object): Use
5036         copy-initialization.
5037         * python/py-threadevent.c (create_thread_event_object): Use
5038         copy-initialization.
5039
5040 2018-08-24  Pedro Alves  <palves@redhat.com>
5041             Simon Marchi  <simon.marchi@ericsson.com>
5042
5043         PR gdb/23379
5044         * python/py-continueevent.c: Include "gdbthread.h".
5045         (create_continue_event_object): Add intro comment.  Add 'ptid'
5046         parameter.  Use it to find thread to pass to
5047         create_thread_event_object.
5048         (emit_continue_event): Pass PTID down to
5049         create_continue_event_object.
5050         * python/py-event.h (py_get_event_thread): Declare.
5051         (create_thread_event_object): Remove default from 'thread'
5052         parameter.
5053         * python/py-stopevent.c (create_stop_event_object): Use
5054         py_get_event_thread.
5055         * python/py-threadevent.c (get_event_thread): Rename to ...
5056         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5057         and use it to find the thread.
5058         (create_thread_event_object): Assert that THREAD isn't null.
5059         Don't find the event thread here.
5060
5061 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
5062
5063         * block.h (blockrange, blockranges): New struct declarations.
5064         (struct block): Add new field named `ranges'.
5065         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5066         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5067         macros for accessing ranges in struct block.
5068         (make_blockranges): New declaration.
5069         block.c (make_blockranges): New function.
5070         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5071         for block.
5072         * symtab.h (find_pc_partial_function): Add new parameter `block'.
5073         * blockframe.c (cache_pc_function_block): New static global.
5074         (clear_pc_function_cache): Clear cache_pc_function_block.
5075         (find_pc_partial_function): Move comment to symtab.h.  Add
5076         support for non-contiguous blocks.
5077         * cli/cli-cmds.c (block.h): Include.
5078         (print_disassembly): Handle printing of non-contiguous blocks.
5079         (disassemble_current_function): Likewise.
5080         (disassemble_command): Likewise.
5081
5082         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5083         BLOCK_START.
5084         * blockframe.c (get_pc_function_start): Likewise.
5085         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5086         (gcc_symbol_address): Likewise.
5087         * compile/compile-object-run.c (compile_object_run): Likewise.
5088         * compile/compile.c (get_expr_block_and_pc): Likewise.
5089         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5090         (func_addr_to_tail_call_list): Likewise.
5091         * findvar.c (default_read_var_value): Likewise.
5092         * inline-frame.c (inline_frame_this_id): Likewise.
5093         (skip-inline_frames): Likewise.
5094         * infcmd.c (until_next_command): Likewise.
5095         * linespec.c (convert_linespec_to_sals): Likewise.
5096         * parse.c (parse_exp_in_context_1): Likewise.
5097         * printcmd.c (build_address_symbolic): likewise.
5098         (info_address_command): Likewise.
5099         symtab.c (find_function_start_sal): Likewise.
5100         (skip_prologue_sal): Likewise.
5101         (find_function_alias_target): Likewise.
5102         (find_gnu_ifunc): Likewise.
5103         * stack.c (find_frame_funname): Likewise.
5104         * symtab.c (fixup_symbol_section): Likewise.
5105         (find_function_start_sal): Likewise.
5106         (skip_prologue_sal): Likewsie.
5107         (find_function_alias_target): Likewise.
5108         (find_gnu_ifunc): Likewise.
5109         * tracepoint.c (info_scope_command): Likewise.
5110         * value.c (value_fn_field): Likewise.
5111
5112         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5113         in place of find_pc_partial_function.
5114         * blockframe.c (find_function_entry_range_from_pc): New function.
5115         * symtab.h (find_function_entry_range_from_pc): Declare and document.
5116         * objfiles.c (objfile_relocate1): Relocate start and end addresses
5117         for each range in a block.
5118
5119
5120 2018-08-23  Xavier Roirand  <roirand@adacore.com>
5121
5122         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5123         incrementation.
5124
5125 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5126
5127         * solib-svr4.c (read_program_headers_from_bfd): Return
5128         gdb::optional<gdb::byte_vector>.
5129         (svr4_exec_displacement): Adjust.
5130
5131 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5132
5133         * solib-svr4.c (read_program_header): Return
5134         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5135         (find_program_interpreter): Return
5136         gdb::optional<gdb::byte_vector>.
5137         (scan_dyntag_auxv): Adjust.
5138         (enable_break): Adjust.
5139         (svr4_exec_displacement): Adjust.
5140
5141 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5142
5143         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5144         * inf-child.c (inf_child_target::terminal_save_inferior): New.
5145
5146 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5147
5148         * guile/scm-string.c (gdbscm_scm_from_printf): Use
5149         string_vprintf.
5150         * guile/scm-utils.c (gdbscm_printf): Likewise.
5151         * serial.c (serial_printf): Likewise.
5152         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5153
5154 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
5155
5156         * stack.c (print_frame): Print frame architecture when printing on
5157         an MI output.
5158         * NEWS: Mention new "arch" attribute in frame output.
5159
5160 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5161
5162         * arch/aarch64.h (aarch64_regnum): Update comment.
5163
5164 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5165
5166         * NEWS: Add SVE to 8.2 section.
5167
5168 2018-08-21  Pedro Alves  <palves@redhat.com>
5169
5170         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5171         out from gdbscm_parse_function_args.
5172         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5173         gdbscm_parse_function_args_1.
5174
5175 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
5176
5177         PR gdb/17816
5178         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5179         operator.
5180
5181 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
5182
5183         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5184
5185 2018-08-19  Michael Spang  <spang@google.com>
5186
5187         PR gdb/11786
5188         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5189         for PT_TLS segments.
5190
5191 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
5192
5193         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5194         dwarf_variable_value.
5195         * dwarf2-frame.c (class dwarf_expr_executor):
5196         Add override for dwarf_variable_value.
5197         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5198         (class symbol_needs_eval_context): Likewise.
5199         (indirect_synthetic_pointer): Add forward declaration.
5200         (sect_variable_value): New function.
5201         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5202         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5203         for DW_OP_GNU_variable_value.
5204
5205 2018-08-16  Tom Tromey  <tom@tromey.com>
5206
5207         * top.c (read_command_file): Update.
5208         (command_line_input): Remove "repeat" argument.
5209         * ada-lang.c (get_selections): Update.
5210         * linespec.c (decode_line_2): Update.
5211         * defs.h (command_line_input): Remove argument.
5212         * cli/cli-script.c (read_next_line): Update.
5213         * python/py-gdb-readline.c: Update.
5214
5215 2018-08-17  Tom Tromey  <tom@tromey.com>
5216
5217         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5218         command_line_input.
5219
5220 2018-08-15  Tom Tromey  <tom@tromey.com>
5221
5222         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5223
5224 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
5225
5226         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5227         If used, use find_pc_partial_function to find address range
5228         to disassemble.
5229         * mi/mi-main.c (mi_cmd_list_features): Report
5230         "data-disassemble-a-option" feature.
5231         * NEWS: Mention new -data-disassemble option -a.
5232
5233 2018-08-13  Tom Tromey  <tom@tromey.com>
5234
5235         * common/common-defs.h (_FORTIFY_SOURCE): Define.
5236
5237 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5238
5239         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5240         (aarch64_linux_collect_sve_regset): Likewise.
5241         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5242         * regcache.h (regcache_map_entry_size): New function.
5243
5244 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5245
5246         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5247         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5248         (SVE_HEADER_VL_LENGTH): Likewise.
5249         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5250         (SVE_HEADER_FLAGS_LENGTH): Likewise.
5251         (SVE_HEADER_RESERVED_LENGTH): Likewise.
5252         (SVE_HEADER_SIZE_OFFSET): Likewise.
5253         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5254         (SVE_HEADER_VL_OFFSET): Likewise.
5255         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5256         (SVE_HEADER_FLAGS_OFFSET): Likewise.
5257         (SVE_HEADER_RESERVED_OFFSET): Likewise.
5258         (SVE_HEADER_SIZE): Likewise.
5259         (aarch64_linux_core_read_vq): Add function.
5260         (aarch64_linux_core_read_description): Check for SVE section.
5261
5262 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5263
5264         * aarch64-fbsd-tdep.c
5265         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5266         collect_size.
5267         * aarch64-linux-tdep.c
5268         (aarch64_linux_iterate_over_regset_sections): Likewise.
5269         * alpha-linux-tdep.c
5270         (alpha_linux_iterate_over_regset_sections):
5271         * alpha-nbsd-tdep.c
5272         (alphanbsd_iterate_over_regset_sections): Likewise.
5273         * amd64-fbsd-tdep.c
5274         (amd64fbsd_iterate_over_regset_sections): Likewise.
5275         * amd64-linux-tdep.c
5276         (amd64_linux_iterate_over_regset_sections): Likewise.
5277         * arm-bsd-tdep.c
5278         (armbsd_iterate_over_regset_sections): Likewise.
5279         * arm-fbsd-tdep.c
5280         (arm_fbsd_iterate_over_regset_sections): Likewise.
5281         * arm-linux-tdep.c
5282         (arm_linux_iterate_over_regset_sections): Likewise.
5283         * corelow.c (get_core_registers_cb): Likewise.
5284         (core_target::fetch_registers): Likewise.
5285         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5286         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5287         * gdbarch.h (void): Regenerate.
5288         * gdbarch.sh: Add supply_size and collect_size.
5289         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5290         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5291         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5292         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5293         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5294         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5295         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5296         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5297         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5298         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5299         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5300         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5301         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5302         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5303         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5304         Likewise.
5305         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5306         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5307         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5308         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5309         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5310         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5311         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5312         Likewise.
5313         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5314         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5315         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5316         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5317         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5318         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5319         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5320         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5321
5322 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
5323
5324         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5325         with string_printf.
5326
5327 2018-08-10  Keith Seitz  <keiths@redhat.com>
5328
5329         * compile/compile-c-support.c (add_code_header, add_code_footer):
5330         Move into policy class.
5331         (c_push_user_expression, pop_user_expression_nop)
5332         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5333         (compile_program): New host class.
5334         (c_compile_program): New typedef.
5335         (c_compute_porgram): Use c_compile_program.
5336
5337 2018-08-10  Keith Seitz  <keiths@redhat.com>
5338
5339         * compile/compile-internal.h (compile_instance::~compile_instance):
5340         Remove calls to htab_delete.
5341         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5342         * compile.c (compile_instance::compile_instance): Initialize
5343         htab unique pointers.
5344         (compile_instance::get_cached_type, compile_instance::insert_type)
5345         (compile_instance::error_symbol_once): Update for unique_ptr.
5346
5347 2018-08-10  Keith Seitz  <keiths@redhat.com>
5348
5349         * compile/compile-c-symbols.c (struct symbol_error)
5350         (hash_symbol_error, eq_symbol_error, del_symbol_error)
5351         (compile_instance::insert_symbol_error)
5352         (compile_instance::error_symbol_once): Move to ...
5353         * compile/compile.c: ... here.
5354
5355 2018-08-10  Keith Seitz  <keiths@redhat.com>
5356
5357         * compile/compile-c-support.c (c_get_compile_context): Use `new'
5358         instead of `new_compile_instance'.
5359         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5360         Update description.
5361         If the symbol error map is not initialized, create it.
5362         (generate_c_for_for_one_symbol): Do not check/initialize
5363         the symbol error map.
5364         * compile/compile-c-types.c (compile_c_instance): Make a class.
5365         Update all callers.
5366         (compile_instance::compile_instance): Initialize the type cache.
5367         (get_cached_type): New function.
5368         (insert_type): Update description.
5369         (compile_c_instance::m_default_cflags): Define.
5370         (convert_type): Update description.  Use get_cached_type.
5371         (delete_instance): Moved to destructor.
5372         (new_compile_instance): Moved to constructor.
5373         * compile/compile-c.h (compile_c_instance): Make class inheriting
5374         from compile_instance.
5375         <base>: Remove field.
5376         <type_map, symbol_err_map>: Move to base class.
5377         <c_plugin>: Rename to `m_plugin' and remove pointer type.
5378         * compile/compile-internal.h (compile_instance): Make class.
5379         <type_map_t, symbol_err_map_t>: Define.
5380         <fe>: Rename to `m_gcc_fe'.
5381         <scope, block, gcc_target_options>: Add `m_' prefix.
5382         <m_type_map, m_symbol_err_map>: New fields, moved from
5383         compile_c_instance.
5384         <destroy>: Remove.
5385         (convert_type, new_compile_instance): Remove.
5386         * compile/compile.c (cleanup_compile_instance): Remove.
5387         (compile_to_object): Use unique_ptr to eliminate cleanups.
5388         (compile_instance::set_print_callback, compile_instance::version)
5389         (compile_instance::set_verbose)
5390         (compile_instance::set_driver_filename)
5391         (compile_instance::set_triplet_regexp)
5392         (compile_instance::set_arguments)
5393         (compile_instance::set_source_file)
5394         (compile_instance::compile): Define.
5395
5396 2018-08-10  Keith Seitz  <keiths@redhat.com>
5397
5398         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5399         * compile/compile-c-types.c: Define GCC_METHODN macros and include
5400         gcc-c-fe.def to define C plugin.
5401         (delete_instance): Delete `c_plugin'.
5402         (new_compile_instance): Initialize `c_plugin'.
5403         * compile/compile-c.h: Include gcc_c_plugin.h.
5404         (struct compile_c_instance) <c_plugin>: New member.
5405         * gcc-c-plugin.h: New file.
5406         Update all callers with API change.
5407
5408 2018-08-10  Keith Seitz  <keiths@redhat.com>
5409
5410         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5411         (HFILES_NO_SRCDIR): ... to here.
5412         Add compile-internal.h and compile-c.h.
5413         * compile/compile-c-support.c: Include compile-c.h.
5414         * compile/compile-c-symbols.c: Include compile-c.h.
5415         (generate_c_for_variable_locations): Update comment.
5416         * compile/compile-c-types.c: Include compile-c.h.
5417         * compile/compile-c.h: New file -- moved C language declarations
5418         from other files here.
5419         * compile/compile-internal.h: Do not include hashtab.h or
5420         common/enum-flags.h.
5421         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5422         (gcc_convert_symbol, gcc_symbol_address)
5423         (generate_c_for_variable_locations, c_get_mode_for_size)
5424         (c_get_range_decl_name): Definitions moved to compile-c.h.
5425         * compile/compile-loc2c.c: Include compile-c.h.
5426
5427 2018-08-10  Keith Seitz  <keiths@redhat.com>
5428
5429         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5430         (c_symbol_substitution_name): ... this.
5431         Update all callers.
5432
5433 2018-08-10  Keith Seitz  <keiths@redhat.com>
5434
5435         * compile/compile-c-support.c (c_compute_program): Use
5436         unique_xmalloc_ptr to eliminate cleanup.
5437         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5438         Return a unique_xmalloc_ptr and eliminate cleanup.
5439         * compile/compile-internal.h (generate_c_for_variable_locations):
5440         Return unique_xmalloc_ptr and update description.
5441
5442 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5443
5444         * corelow.c (core_target::get_core_register_section): Rename
5445         min_size to section_min_size.
5446
5447 2018-08-09  Jim Wilson  <jimw@sifive.com>
5448
5449         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5450         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5451         * NEWS: Mention new GNU/Linux RISC-V target.
5452         * configure.host: Add riscv*-*-linux*.
5453         * configure.nat: Add riscv*.
5454         * configure.tgt: Add riscv*-*-linux*.
5455         * riscv-linux-nat.c: New file.
5456         * riscv-linux-tdep.c: New file.
5457
5458 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5459
5460         * infrun.c (resume): Make static, add forward declaration.
5461         (proceed): Update header comment.
5462         * infrun.h (resume): Delete declaration.
5463
5464 2018-08-09  Tom Tromey  <tom@tromey.com>
5465
5466         * riscv-tdep.h: Minor formatting fixes.
5467
5468 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5469
5470         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5471         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5472         (test_mkdir_recursive): Likewise.
5473         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5474
5475 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5476
5477         * valarith.c (value_subscripted_rvalue): If an array is not in
5478         memory, and we don't know the upper bound, then we can't know that
5479         the requested element exists or not.
5480
5481 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5482
5483         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5484         (target_options_to_string): Add comment.
5485
5486 2018-08-08  Tom Tromey  <tom@tromey.com>
5487
5488         * unittests/scoped_mmap-selftests.c: Check result of "write".
5489
5490 2018-08-08  Jim Wilson  <jimw@sifive.com>
5491
5492         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5493         (decode_register_index_short): New.
5494         (decode_j_type_insn, decode_cj_type_insn): New.
5495         (decode_b_type_insn, decode_cb_type_insn): New.
5496         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5497         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5498         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5499         is_c_sw_insn instead of is_sw_insn.
5500         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5501         (riscv_software_single_step): New.
5502         * riscv-tdep.h (riscv_software_single_step): Declare.
5503
5504         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5505         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5506
5507 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5508
5509         PR gdb/18050:
5510         * target.c (dispose_inferior): Don't dispose of inferiors that are
5511         already killed.
5512
5513 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5514
5515         * remote.c (remote_target::download_tracepoint): Change char* to
5516         const char*.
5517
5518 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5519
5520         * target.h (target_options_to_string): Return an std::string.
5521         * target.c (str_comma_list_concat_elem): Return void, use
5522         std::string.
5523         (do_option): Likewise.
5524         (target_options_to_string): Return an std::string.
5525         * linux-nat.c (linux_nat_target::wait): Adjust.
5526         * target-debug.h (target_debug_print_options): Adjust.
5527
5528 2018-08-07  Tom Tromey  <tom@tromey.com>
5529
5530         * Makefile.in (CPPFLAGS): New variable.
5531         (INTERNAL_CPPFLAGS): Use it.
5532
5533 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5534
5535         * NEWS: Mention the index cache.
5536
5537 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5538
5539         * common/pathstuff.h (get_standard_cache_dir): New.
5540         * common/pathstuff.c (get_standard_cache_dir): New.
5541         * build-id.h (build_id_to_string): New.
5542         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5543         DEBUG_STR_SUFFIX): Move to here.
5544         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5545         DEBUG_STR_SUFFIX): Move from there.
5546         (write_psymtabs_to_index): Make non-static, add basename
5547         parameter.  Write to temporary files, rename when done.
5548         (save_gdb_index_command): Adjust call to
5549         write_psymtabs_to_index.
5550         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5551         field.
5552         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5553         (get_gdb_index_contents_from_cache): New.
5554         (get_gdb_index_contents_from_cache_dwz): New.
5555         (dwarf2_initialize_objfile): Read index from cache.
5556         (dwarf2_build_psymtabs): Save to index.
5557         * dwarf-index-cache.h: New file.
5558         * dwarf-index-cache.c: New file.
5559         * dwarf-index-write.h: New file.
5560
5561 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5562
5563         * gnulib/aclocal.m4: Re-generate.
5564         * gnulib/config.in: Re-generate.
5565         * gnulib/configure: Re-generate.
5566         * gnulib/import/Makefile.am: Re-generate.
5567         * gnulib/import/Makefile.in: Re-generate.
5568         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5569         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5570         * gnulib/import/m4/mkdir.m4: New file.
5571         * gnulib/import/mkdir.c: New file.
5572         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5573         module.
5574
5575 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5576
5577         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5578         * common/scoped_mmap.c: New file.
5579         * common/scoped_mmap.h (destroy): New method.
5580         (~scoped_mmap, reset): Use destroy.
5581         (scoped_mmap): New move constructor.
5582         (mmap_file): New declaration.
5583         * unittests/scoped_mmap-selftests.c (test_normal,
5584         test_invalid_filename, run_tests): New functions.
5585         (_initialize_scoped_mmap_selftests): Register selftest.
5586
5587 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5588
5589         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5590         (read_gdb_index_from_buffer): ... this.  Remove section
5591         parameter, add buffer parameter.
5592         (get_gdb_index_contents_ftype,
5593         get_gdb_index_contents_dwz_ftype): New typedefs.
5594         (dwarf2_read_gdb_index): Add callback parameters to get the
5595         index contents.
5596         (get_gdb_index_contents_from_section): New.
5597         (dwarf2_initialize_objfile): Update call to
5598         dwarf2_read_gdb_index.
5599
5600 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5601
5602         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5603         (gdb_open_cloexec): Likewise.
5604         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5605         (commandline_from_pid): Likewise.
5606         (linux_xfer_osdata_threads): Likewise.
5607         (linux_xfer_osdata_fds): Likewise.
5608         * ada-lang.c (is_package_name): Likewise.
5609         * auxv.c (procfs_xfer_auxv): Likewise.
5610         * breakpoint.c (print_one_breakpoint_location): Use
5611         uiout::field_fmt.
5612         (print_one_catch_solib): Use string_printf.
5613         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5614         (add_pe_forwarded_sym): Likewise.
5615         * dwarf2read.c (create_type_unit_group): Likewise.
5616         (build_error_marker_type): Likewise.
5617         * infcall.c (get_function_name): Likewise.
5618         * valprint.c (print_converted_chars_to_obstack): Likewise.
5619         * xtensa-tdep.c (xtensa_register_type): Likewise.
5620
5621 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5622
5623         * remote.c (remote_target::download_tracepoint): Fix format
5624         string errors.
5625
5626 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5627
5628         * tracefile.c: Include common/byte-vector.h.
5629         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5630         with trace_regblock_size if needed.  Update uses of buf.
5631
5632 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5633
5634         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5635         std::vector<unsigned char>.
5636         * tracepoint.c (collection_list::collection_list): Remove
5637         m_regs_mask initializer from initializer list.  Resize
5638         m_regs_mask using the largest remote register number.
5639         (collection_list::add_remote_register): Remove size check on
5640         m_regs_mask.  Use at to access element.
5641         (collection_list::stringify): Change type of temp_buf to
5642         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5643         stringify the register mask.  Use pack_hex_byte for the register
5644         mask.
5645
5646 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5647
5648         * tracepoint.h (class collection_list) <add_register>: Remove.
5649         <add_remote_register, add_ax_registers, add_local_register>:
5650         Declare.
5651         <add_memrange>: Add scope parameter.
5652         * tracepoint.c (encode_actions_1): Likewise.
5653         (collection_list::add_register): Rename to ...
5654         (collection_list::add_remote_register): ... this.  Update
5655         comment.
5656         (collection_list::add_ax_registers, add_local_register): New
5657         methods.
5658         (collection_list::add_memrange): Add scope parameter.  Call
5659         add_local_register instead of add_register.
5660         (finalize_tracepoint_aexpr): New function.
5661         (collection_list::collect_symbol): Update calls to add_memrange.
5662         Call add_local_register instead of add_register.  Call
5663         add_ax_registers.  Call finalize_tracepoint_aexpr.
5664         (encode_actions_1): Get remote regnos for $reg action.  Call
5665         add_remote_register, add_ax_registers, and add_local_register.
5666         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5667         (validate_actionline): Call finalize_tracepoint_aexpr.
5668
5669 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5670
5671         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5672         Replace array buf with gdb::char_vector buf, of size
5673         get_remote_packet_size ().  Replace references to buf and
5674         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5675         and xsnprintf with snprintf.  Raise errors if the buffer is too
5676         small.
5677
5678 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5679
5680         * remote.c (remote_target::download_tracepoint): Fix the has_more
5681         predicate in the QTDP action list iteration.
5682
5683 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5684
5685         * remote.c (remote_target::download_tracepoint): Fix indentation
5686         in for block.
5687
5688 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5689
5690         * proc-api.c (_initialize_proc_api): Remove c, unused.
5691         * procfs.c (procfs_init_inferior): Remove signals, unused.
5692         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5693         unused.
5694
5695 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5696             Andrew Burgess  <andrew.burgess@embecosm.com>
5697
5698         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5699         'W_STOPCODE (0)' as this could be ambiguous.
5700
5701 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5702
5703         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5704         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5705         "ai_socktype").
5706
5707 2018-08-02  Tom Tromey  <tom@tromey.com>
5708
5709         PR symtab/16842.
5710         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5711         symbols.
5712         (process_structure_scope): Likewise.
5713
5714 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5715
5716         PR gdb/22629:
5717         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5718         kill inferior.
5719
5720 2018-08-02  Tom Tromey  <tom@tromey.com>
5721
5722         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5723         (darwin_suspend_inferior, darwin_resume_inferior)
5724         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5725         (darwin_check_new_threads): Check result of get_darwin_inferior.
5726
5727 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5728
5729         GDB 8.1.1 released.
5730
5731 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5732
5733         * varobj.c (varobj_get_path_expr_parent): Report an error if
5734         parent is a dynamic varobj.
5735
5736 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5737
5738         * gnulib/aclocal.m4: Re-generate.
5739         * gnulib/config.in: Re-generate.
5740         * gnulib/configure: Re-generate.
5741         * gnulib/import/Makefile.in: Re-generate.
5742         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5743         * gnulib/import/m4/onceonly.m4: Re-generate.
5744
5745 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5746
5747         * target-descriptions.c (struct xml_test_tdesc): New.
5748         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5749         (record_xml_tdesc): Update.
5750         (maintenance_check_xml_descriptions): Update.
5751         * target-descriptions.h (record_xml_tdesc): Update comment.
5752
5753 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5754
5755         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5756         checking array bounds are defined.
5757
5758 2018-07-30  Tom Tromey  <tom@tromey.com>
5759
5760         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5761         irreflexivity violation.
5762
5763 2018-07-30  Tom Tromey  <tom@tromey.com>
5764
5765         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5766         * value.c (unpack_long): Remove lint code.
5767         * valops.c (value_ind): Remove lint code.
5768         * valarith.c (value_x_binop, value_x_unop, value_equal)
5769         (value_pos): Remove lint code.
5770
5771 2018-07-28  Tom de Vries  <tdevries@suse.de>
5772
5773         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5774         with undefined upper bound as <optimized out>.
5775
5776 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5777
5778         * gcore.in: Rename variable "name" to "prefix".  Expand
5779         "usage" text.
5780
5781 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5782
5783         * windows-nat.c (windows_nat_target::create_inferior): Update to
5784         call close() in global namespace.
5785
5786 2018-07-26  Tom Tromey  <tom@tromey.com>
5787
5788         * dwarf-index-write.c (add_address_entry): Don't add objfile
5789         offsets.
5790         * dbxread.c (find_stab_function): Rename from
5791         find_stab_function_addr.  Return a bound_minimal_symbol.
5792         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5793         Don't add objfile offsets.
5794         (end_psymtab): Use raw_text_low, raw_text_high,
5795         MSYMBOL_VALUE_RAW_ADDRESS.
5796         (read_ofile_symtab): Update.
5797         (process_one_symbol): Update.
5798         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5799         offsets.
5800         (dw2_relocate): Remove.
5801         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5802         searching addrmap.
5803         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5804         Update.
5805         (process_psymtab_comp_unit_reader, add_partial_symbol)
5806         (add_partial_subprogram, dwarf2_ranges_read): Update.
5807         (load_partial_dies): Update.
5808         (add_address_entry): Don't add objfile offsets.
5809         (dwarf2_build_include_psymtabs): Update.
5810         (create_addrmap_from_aranges): Don't add objfile offsets.
5811         (dw2_find_pc_sect_compunit_symtab): Update.
5812         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5813         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5814         Update.
5815         (parse_partial_symbols): Don't add objfile offsets.  Use
5816         raw_text_low, raw_text_high.  Update.
5817         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5818         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5819         or call 'relocate' quick function.  Clear psymbol_map.
5820         * psympriv.h (struct partial_symbol) <address>: Add section
5821         offset.
5822         <set_unrelocated_address>: Rename from set_address.
5823         <raw_text_low, raw_text_high>: New methods.
5824         <text_low, text_high>: Add objfile parameter.
5825         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5826         set_unrelocated_address.
5827         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5828         (find_pc_psymbol): Update.
5829         (fixup_psymbol_section, relocate_psymtabs): Remove.
5830         (dump_psymtab, psym_functions): Update.
5831         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5832         parameter.
5833         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5834         (start_psymtab_common): Update.
5835         * symfile-debug.c (debug_qf_relocate): Remove.
5836         (debug_sym_quick_functions): Update.
5837         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5838         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5839         Update.
5840
5841 2018-07-26  Tom Tromey  <tromey@redhat.com>
5842
5843         * dbxread.c (end_psymtab): Use text_high_valid and
5844         text_low_valid.
5845         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5846         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5847         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5848         Update comment.
5849         <text_low_valid, text_high_valid>: New fields.
5850         <set_text_low, set_text_high>: Update.
5851         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5852
5853 2018-07-26  Tom Tromey  <tom@tromey.com>
5854
5855         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5856         Update.
5857         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5858         textlow and texthigh fields.
5859         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5860         Update.
5861         * mdebugread.c (parse_lines, parse_partial_symbols)
5862         (psymtab_to_symtab_1): Update.
5863         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5864         Rename fields.  Update comment.  Now private.
5865         <text_low, text_high, set_text_low, set_text_high>: New methods.
5866         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5867         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5868         (start_psymtab_common, maintenance_info_psymtabs)
5869         (maintenance_check_psymtabs): Update.
5870         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5871         texthigh fields.
5872         (scan_xcoff_symtab): Update.
5873
5874 2018-07-26  Tom Tromey  <tromey@redhat.com>
5875
5876         * psympriv.h (struct partial_symbol) <unrelocated_address,
5877         address, set_address>: New methods.
5878         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5879         (fixup_psymbol_section, relocate_psymtabs): Update.
5880         (print_partial_symbols): Add 'objfile' parameter.  Update.
5881         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5882         Update.
5883
5884 2018-07-26  Tom Tromey  <tom@tromey.com>
5885
5886         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5887         (debug_names::write_psymbols): Update.
5888         * psympriv.h (struct partial_symbol): Derive from
5889         general_symbol_info.
5890         <obj_section>: New method.
5891         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5892         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5893         (find_pc_sect_psymbol, fixup_psymbol_section)
5894         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5895         (print_partial_symbols, recursively_search_psymtabs)
5896         (compare_psymbols, psymbol_hash, psymbol_compare)
5897         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5898         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5899
5900 2018-07-26  Tom Tromey  <tromey@redhat.com>
5901
5902         * dbxread.c (end_psymtab): Remove dead code.
5903
5904 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5905
5906         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5907         DWARF unwinders are disabled.
5908         * dwarf2-frame.c: Add dwarf2read.h include.
5909         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5910         disabled.
5911         (dwarf2_frame_unwinders_enabled_p): Define.
5912         (show_dwarf_unwinders_enabled_p): New function.
5913         (_initialize_dwarf2_frame): Register switch to control DWARF
5914         unwinder use.
5915         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5916         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5917         (show_dwarf_cmdlist): Remove static keyword.
5918         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5919         (show_dwarf_cmdlist): Declare.
5920         * NEWS: Document new feature.
5921
5922 2018-07-26  Tom de Vries  <tdevries@suse.de>
5923
5924         PR breakpoints/23366
5925         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5926
5927 2018-07-26  Tom de Vries  <tdevries@suse.de>
5928
5929         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5930         DW_AT_count can't be translated to a dynamic prop.
5931
5932 2018-07-25  Tom de Vries  <tdevries@suse.de>
5933
5934         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5935         try/catch.
5936
5937 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5938
5939         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5940
5941 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5942
5943         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5944
5945 2018-07-24  Keith Seitz  <keiths@redhat.comt
5946
5947         PR symtab/23010
5948         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5949         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5950         instead of add_symbol_to_list.
5951         (read_file_scope): Call prepare_one_comp_unit before reading
5952         any other DIEs.
5953
5954 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5955
5956         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5957
5958 2018-07-24  Tom Tromey  <tom@tromey.com>
5959
5960         * utils.c (malloc, realloc, free): Don't declare.
5961         * configure, config.in: Rebuild.
5962         * configure.ac: Don't check for declarations of free, malloc, or
5963         realloc.
5964
5965 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5966
5967         * aarch64-linux-nat.c
5968         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5969         variable.
5970         * arm-linux-nat.c (fetch_regs): Likewise.
5971         (store_regs): Likewise.
5972         (fetch_vfp_regs): Likewise.
5973         (store_vfp_regs): Likewise.
5974         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5975         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5976         (arm_linux_nat_target::insert_watchpoint): Likewise.
5977         (arm_linux_nat_target::remove_watchpoint): Likewise.
5978         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5979         Likewise.
5980         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5981         Likewise.
5982         * ppc-linux-nat.c (fetch_register): Likewise.
5983         (fetch_all_gp_regs): Likewise.
5984         (fetch_ppc_registers): Likewise.
5985         (store_all_gp_regs): Likewise.
5986         (store_ppc_registers): Likewise.
5987         (hwdebug_insert_point): Likewise.
5988         (can_use_watchpoint_cond_accel): Likewise.
5989         * remote-sim.c (gdb_os_write_stdout): Likewise.
5990
5991 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5992             Tom Tromey  <tom@tromey.com>
5993
5994         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5995         test for it.
5996         * configure: Rebuild.
5997
5998 2018-07-22  Tom Tromey  <tom@tromey.com>
5999
6000         * regformats/regdat.sh: Define xmltarget_${name} inside
6001         #ifndef IN_PROCESS_AGENT.
6002
6003 2018-07-22  Tom Tromey  <tom@tromey.com>
6004
6005         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
6006
6007 2018-07-22  Tom Tromey  <tom@tromey.com>
6008
6009         * symfile.c (reread_symbols): Notify iter, not objfile.
6010
6011 2018-07-22  Tom Tromey  <tom@tromey.com>
6012
6013         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
6014         Use arch_ops.
6015         (ravenscar_thread_target::prepare_to_store): Likewise.
6016
6017 2018-07-22  Tom Tromey  <tom@tromey.com>
6018
6019         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
6020         unused variable.  Call value_fetch_lazy when needed.
6021         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
6022         Remove unused variable.  Call value_fetch_lazy when needed.
6023
6024 2018-07-22  Tom Tromey  <tom@tromey.com>
6025
6026         * m32c-tdep.c (mark_dma): Return void.
6027         (make_regs): Remove unused declarations.
6028
6029 2018-07-22  Tom Tromey  <tom@tromey.com>
6030
6031         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
6032         cmdscm_get_valid_command_smob_arg_unsafe for effect.
6033         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
6034         bkscm_get_valid_block_smob_arg_unsafe for effect.
6035
6036 2018-07-22  Tom Tromey  <tom@tromey.com>
6037
6038         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
6039         value_type.
6040
6041 2018-07-22  Tom Tromey  <tom@tromey.com>
6042
6043         * windows-nat.c (saved_context): Conditionally define.
6044         * remote.c (remote_target::remote_btrace_maybe_reopen):
6045         Conditionally declare "warned".
6046         * inflow.c (sigquit_ours): Conditionally define.
6047         (new_tty): Move "tty" declaration inside #if.
6048         * guile/guile.c (guile_datadir): Conditionally define.
6049         * charset.c (set_be_le_names): Move some declarations inside #if.
6050         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6051         #if.
6052         (parse_xml_btrace_conf): Likewise.
6053
6054 2018-07-22  Tom Tromey  <tom@tromey.com>
6055
6056         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6057
6058 2018-07-22  Tom Tromey  <tom@tromey.com>
6059
6060         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6061         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6062         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6063         * buildsym-legacy.c (get_macro_table): Remove unused variable.
6064         * stack.c (frame_apply_level_command): Remove unused variable.
6065         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6066         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6067         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6068         unused variable.
6069         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6070         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6071         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6072         variable.
6073         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6074         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6075         variable.
6076         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6077         Remove unused variable.
6078         * cli/cli-script.c (recurse_read_control_structure): Remove unused
6079         variable.
6080         * common/tdesc.c (print_xml_feature::visit): Remove unused
6081         variable.
6082         * compile/compile-object-load.c (store_regs): Remove unused
6083         variables.
6084         * complaints.c (clear_complaints): Remove unused variable.
6085         * corelow.c (core_target_open): Remove unused variable.
6086         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6087         variable.
6088         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6089         variable.
6090         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6091         variable.
6092         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6093         variable.
6094         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6095         variable.
6096         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6097         variable.
6098         * ia64-tdep.c (examine_prologue): Remove unused variable.
6099         * infcall.c (run_inferior_call): Remove unused variable.
6100         * inferior.c (exit_inferior): Remove unused variable.
6101         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6102         * linespec.c (decode_line_2): Remove unused variable.
6103         * linux-nat.c (super_close): Remove.
6104         * linux-tdep.c (linux_info_proc): Remove unused variable.
6105         * mi/mi-main.c (mi_execute_command): Remove unused variable.
6106         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6107         Remove unused variable.
6108         * parse.c (find_minsym_type_and_address): Remove unused variable.
6109         * printcmd.c (info_symbol_command, printf_floating): Remove unused
6110         variable.
6111         * python/py-breakpoint.c (bppy_set_commands): Remove unused
6112         variable.
6113         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6114         variables.
6115         * record-btrace.c (record_btrace_target::store_registers): Remove
6116         unused variable.
6117         (cmd_show_record_btrace_cpu): Remove unused variable.
6118         * riscv-tdep.c (riscv_register_reggroup_p)
6119         (riscv_push_dummy_call, riscv_return_value): Remove unused
6120         variable.
6121         * rust-exp.y (literal): Remove unused variable.
6122         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6123         unused variable.
6124         <STRUCTOP_ANONYMOUS>: Likewise.
6125         * s390-linux-tdep.c (s390_linux_init_abi_31)
6126         (s390_linux_init_abi_64): Remove unused variable.
6127         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6128         (file_select_thread, net_windows_open, _initialize_ser_windows):
6129         Remove unused variables.
6130         * symtab.c (find_pc_sect_line): Remove unused variable.
6131         * target-memory.c (compute_garbled_blocks): Remove unused
6132         variable.
6133         (target_write_memory_blocks): Remove unused variable.
6134         * target.c (target_stack::unpush): Remove unused variables.
6135         * tracepoint.c (start_tracing, all_tracepoint_actions)
6136         (merge_uploaded_trace_state_variables)
6137         (print_one_static_tracepoint_marker): Remove unused variable.
6138         * unittests/basic_string_view/element_access/char/1.cc (test01):
6139         Remove unused variable.
6140         * windows-nat.c (windows_continue, windows_add_all_dlls)
6141         (do_initial_windows_stuff, windows_nat_target::create_inferior):
6142         Remove unused variables.
6143
6144 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
6145
6146         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6147         attr_profile in HAVE_ELF.
6148         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6149         HAVE_ELF.
6150
6151 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
6152
6153         * frame.c (frame_register_unwind): Change parameter name.
6154         (frame_unwind_register): Likewise.
6155         (frame_unwind_register_value): Likewise.
6156         (frame_unwind_register_signed): Likewise.
6157         (frame_unwind_register_unsigned): Likewise.
6158         * frame.h (frame_register_unwind): Likewise.
6159         (frame_unwind_register): Likewise.
6160         (frame_unwind_register_value): Likewise.
6161         (frame_unwind_register_signed): Likewise.
6162         (frame_unwind_register_unsigned): Likewise.
6163         (frame_unwind_arch): Likewise.
6164
6165 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6166
6167         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6168         ISA maintenance.
6169
6170 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6171
6172         * mips-linux-nat.c (mips_linux_nat_target::read_description):
6173         Call `get_ptrace_pid' rather than extracting the ptrace PID by
6174         hand.
6175
6176 2018-07-20  Keith Seitz  <keiths@redhat.com>
6177
6178         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6179         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6180         m_compunit_symtab, m_language>: Add "m_" prefix.
6181         Update all uses.
6182         * buildsym.c: Update all uses.
6183
6184 2018-07-20  Tom Tromey  <tom@tromey.com>
6185
6186         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6187         * buildsym.h (record_line_ftype): Remove typedef.
6188
6189 2018-07-20  Tom Tromey  <tom@tromey.com>
6190
6191         * buildsym-legacy.h (augment_type_symtab): Don't declare.
6192         (end_expandable_symtab): Likewise.
6193         (end_symtab_get_static_block): Likewise.
6194         (end_symtab_from_static_block): Likewise.
6195         * buildsym-legacy.c (augment_type_symtab): Remove.
6196         (end_expandable_symtab): Remove.
6197         (end_symtab_get_static_block): Remove.
6198         (end_symtab_from_static_block): Remove.
6199
6200 2018-07-20  Tom Tromey  <tom@tromey.com>
6201
6202         * dwarf2read.c: Include buildsym.h.
6203         (struct dwarf2_cu) <builder>: New method.
6204         (fixup_go_packaging): Update.
6205         (process_full_comp_unit, process_full_type_unit): Update.  Don't
6206         use scoped_free_pendings.
6207         (using_directives): Add "cu" parameter, remove "language".
6208         (read_import_statement, setup_type_unit_groups, )
6209         (read_func_scope, read_lexical_block_scope)
6210         (dwarf2_record_block_ranges, read_namespace): Update.
6211         (lnp_state_machine::lnp_state_machine): Add cu parameter.
6212         (lnp_state_machine::handle_end_sequence): Update.
6213         (class lnp_state_machine) <m_cu>: New member.
6214         <m_record_line_callback>: Remove.
6215         <m_currently_recording_lines>: New member.
6216         (lnp_state_machine::handle_set_file): Update.
6217         (noop_record_line): Remove.
6218         (dwarf_record_line_p): Add cu parameter.
6219         (dwarf_record_line_1, dwarf_finish_line): Likewise.
6220         (lnp_state_machine::record_line)
6221         (lnp_state_machine::lnp_state_machine)
6222         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6223         (dwarf_decode_lines): Update.
6224         (dwarf2_start_subfile): Add cu parameter.
6225         (dwarf2_start_symtab, new_symbol): Update.
6226         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6227         Remove dwarf2_per_objfile parameter.
6228         (dwarf_decode_macros): Update.
6229
6230 2018-07-20  Tom Tromey  <tom@tromey.com>
6231
6232         * stabsread.c (define_symbol): Update.
6233         * buildsym-legacy.h (get_buildsym_compunit): Declare.
6234         * dwarf2read.c (new_symbol): Update.
6235         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6236         * cp-namespace.c: Include buildsym.h.
6237         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6238         * buildsym-legacy.c (get_buildsym_compunit): New function.
6239
6240 2018-07-20  Tom Tromey  <tom@tromey.com>
6241
6242         * xcoffread.c: Include buildsym-legacy.h.
6243         * windows-nat.c: Include buildsym-legacy.h.
6244         * stabsread.c: Include buildsym-legacy.h.
6245         * mdebugread.c: Include buildsym-legacy.h.
6246         * buildsym-legacy.h: New file.
6247         * buildsym-legacy.c: New file, from buildsym.c.
6248         * go32-nat.c: Include buildsym-legacy.h.
6249         * dwarf2read.c: Include buildsym-legacy.h.
6250         * dbxread.c: Include buildsym-legacy.h.
6251         * cp-namespace.c: Include buildsym-legacy.h.
6252         * coffread.c: Include buildsym-legacy.h.
6253         * buildsym.h: Move some contents to buildsym-legacy.h.
6254         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
6255         buildsym-legacy.c.
6256         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6257
6258 2018-07-20  Tom Tromey  <tom@tromey.com>
6259
6260         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6261         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6262         (buildsym_compunit::buildsym_compunit)
6263         (buildsym_compunit::~buildsym_compunit)
6264         (buildsym_compunit::get_macro_table): Define.
6265
6266 2018-07-20  Tom Tromey  <tom@tromey.com>
6267
6268         * buildsym.c (reset_symtab_globals): Remove.
6269         (buildsym_compunit::end_symtab_from_static_block): Update.
6270         (buildsym_compunit::augment_type_symtab): Update.
6271         (end_symtab_from_static_block): Call free_buildsym_compunit.
6272         (augment_type_symtab, end_symtab, end_expandable_symtab):
6273         Likewise.
6274
6275 2018-07-20  Tom Tromey  <tom@tromey.com>
6276
6277         * arch-utils.c: Do not include buildsym.h.
6278         * mipsread.c: Do not include buildsym.h.
6279         * machoread.c: Do not include buildsym.h.
6280         * elfread.c: Do not include buildsym.h.
6281
6282 2018-07-20  Tom Tromey  <tom@tromey.com>
6283
6284         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6285         initialization.
6286         (buildsym_compunit): Add new constructor.
6287         (struct buildsym_compunit) <get_last_source_file, finish_block,
6288         record_block_range, start_subfile, patch_subfile_names,
6289         push_subfile, pop_subfile, record_line, get_compunit_symtab,
6290         set_last_source_start_addr, get_last_source_start_addr,
6291         get_local_using_directives, set_local_using_directives,
6292         get_global_using_directives, outermost_context_p,
6293         get_current_context_stack, get_context_stack_depth,
6294         get_current_subfile, get_local_symbols, get_file_symbols,
6295         get_global_symbols, record_debugformat, record_producer,
6296         push_context, pop_context, end_symtab_get_static_block,
6297         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6298         New public methods.
6299         <record_pending_block, finish_block_internal, make_blockvector,
6300         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6301         private methods.
6302         Update all users.
6303
6304 2018-05-22  Tom Tromey  <tom@tromey.com>
6305
6306         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6307         parameter.
6308         (finish_block_internal): Update.
6309
6310 2018-07-20  Tom Tromey  <tom@tromey.com>
6311
6312         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6313         parameter.
6314         (finish_block_internal): Update.
6315
6316 2018-07-20  Tom Tromey  <tom@tromey.com>
6317
6318         * buildsym.h (EXTERN): Don't define or undef.
6319         * buildsym.c (EXTERN): Don't define.
6320
6321 2018-07-20  Tom Tromey  <tom@tromey.com>
6322
6323         * buildsym.c: Remove TODO comment.
6324
6325 2018-07-20  Tom Tromey  <tom@tromey.com>
6326
6327         * coffread.c (coff_symtab_read): Update.
6328         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6329         (xcoff_new_init): Update.
6330         * mipsread.c (mipscoff_new_init): Update.
6331         * mdebugread.c (mdebug_build_psymtabs): Update.
6332         * elfread.c (elf_new_init): Update.
6333         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6334         Update.
6335         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6336         (coffstab_build_psymtabs, elfstab_build_psymtabs)
6337         (stabsect_build_psymtabs): Update.
6338         * buildsym.h (buildsym_init): Don't declare.
6339         * buildsym.c: Update comment.
6340         (prepare_for_building): Remove.
6341         (start_symtab, restart_symtab): Update.
6342         (reset_symtab_globals): Update comment.
6343         (buildsym_init): Remove.
6344
6345 2018-07-20  Tom Tromey  <tom@tromey.com>
6346
6347         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6348         * stabsread.c (patch_block_stabs, define_symbol, read_type)
6349         (read_enum_type, common_block_start, common_block_end)
6350         (cleanup_undefined_types_1, finish_global_stabs): Update.
6351         * mdebugread.c (psymtab_to_symtab_1): Update.
6352         * dwarf2read.c (fixup_go_packaging, read_func_scope)
6353         (read_lexical_block_scope, new_symbol): Update.
6354         * dbxread.c (process_one_symbol): Update.
6355         * coffread.c (coff_symtab_read, process_coff_symbol)
6356         (coff_read_enum_type): Update.
6357         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6358         declare.
6359         (get_local_symbols, get_file_symbols, get_global_symbols): New
6360         functions.
6361         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6362         m_global_symbols.
6363         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6364         (~scoped_free_pendings): Update.
6365         (finish_block, prepare_for_building, reset_symtab_globals)
6366         (end_symtab_get_static_block, end_symtab_with_blockvector)
6367         (augment_type_symtab, push_context): Update.
6368         (get_local_symbols, get_file_symbols, get_global_symbols): New
6369         functions.
6370         (buildsym_init): Update.
6371
6372 2018-07-20  Tom Tromey  <tom@tromey.com>
6373
6374         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6375         (process_full_type_unit): Likewise.
6376         (dwarf2_start_symtab): Set list_in_scope.
6377
6378 2018-07-20  Tom Tromey  <tom@tromey.com>
6379
6380         * dwarf2read.c (process_psymtab_comp_unit_reader)
6381         (build_type_psymtabs_reader): Do not set list_in_scope.
6382
6383 2018-07-20  Tom Tromey  <tom@tromey.com>
6384
6385         * buildsym.c (free_pendings): Remove.
6386         (add_symbol_to_list, scoped_free_pendings)
6387         (finish_block_internal, buildsym_init): Update.
6388
6389 2018-07-20  Tom Tromey  <tom@tromey.com>
6390
6391         * xcoffread.c (read_xcoff_symtab): Update.
6392         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6393         Update.
6394         * dbxread.c (process_one_symbol): Update.
6395         * coffread.c (coff_symtab_read): Update.
6396         * buildsym.h (finish_block): Update.
6397         * buildsym.c (finish_block): Remove "listhead" argument.
6398         (end_symtab_get_static_block): Update.
6399
6400 2018-07-20  Tom Tromey  <tom@tromey.com>
6401
6402         * buildsym.h (class scoped_free_pendings): Remove constructor.
6403         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6404         method.
6405         <m_pending_block_obstack, m_pending_blocks>: New members.
6406         (pending_block_obstack, pending_blocks): Remove.
6407         (scoped_free_pendings::scoped_free_pendings): Default.
6408         (~scoped_free_pendings): Update.
6409         (free_pending_blocks): Remove.
6410         (finish_block_internal, record_pending_block, make_blockvector)
6411         (end_symtab_get_static_block, augment_type_symtab, push_context)
6412         (buildsym_init): Update.
6413
6414 2018-07-20  Tom Tromey  <tom@tromey.com>
6415
6416         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6417         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6418         members.
6419         (pending_addrmap, pending_addrmap_obstack)
6420         (pending_addrmap_interesting): Remove.
6421         (scoped_free_pendings, record_block_range, make_blockvector)
6422         (prepare_for_building, reset_symtab_globals, buildsym_init):
6423         Update.
6424
6425 2018-07-20  Tom Tromey  <tom@tromey.com>
6426
6427         * xcoffread.c (process_linenos): Update.
6428         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6429         * mdebugread.c (psymtab_to_symtab_1): Update.
6430         * dwarf2read.c (setup_type_unit_groups)
6431         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6432         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6433         * dbxread.c (process_one_symbol): Update.
6434         * coffread.c (coff_symtab_read, enter_linenos)
6435         (process_coff_symbol): Update.
6436         * buildsym.h (current_subfile): Don't declare.
6437         (get_current_subfile): Declare.
6438         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6439         member.
6440         (start_subfile, free_buildsym_compunit, push_subfile)
6441         (prepare_for_building, start_symtab): Update.
6442         (get_current_subfile): New function.
6443
6444 2018-07-20  Tom Tromey  <tom@tromey.com>
6445
6446         * coffread.c (coff_symtab_read): Update.
6447         * xcoffread.c (read_xcoff_symtab): Update.
6448         * dwarf2read.c (new_symbol): Update.
6449         (read_func_scope, read_lexical_block_scope): Update.
6450         * dbxread.c (process_one_symbol): Update.
6451         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6452         (outermost_context_p): Remove macro.
6453         (outermost_context_p, get_current_context_stack)
6454         (get_context_stack_depth): Declare.
6455         (pop_context): Return struct context_stack.
6456         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6457         member.
6458         (context_stack_size): Remove.
6459         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6460         (prepare_for_building, end_symtab_get_static_block)
6461         (augment_type_symtab, push_context): Update.
6462         (pop_context): Return struct context_stack.
6463         (outermost_context_p, get_current_context_stack)
6464         (get_context_stack_depth): New functions.
6465         (buildsym_init): Update.
6466
6467 2018-07-20  Tom Tromey  <tom@tromey.com>
6468
6469         * rust-exp.y: Now a pure parser.  Update all rules.
6470         (%union): Move earlier.
6471         (current_parser, work_obstack): Remove globals.
6472         (rust_parser, ~rust_parser): Update.
6473         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6474         lex_character, lex_number, lex_string, lex_identifier,
6475         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6476         convert_name, convert_params_to_expression,
6477         convert_ast_to_expression, ast_basic_type, ast_operation,
6478         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6479         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6480         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6481         ast_array_type, ast_slice_type, ast_reference_type,
6482         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6483         (rust_parse): Update.
6484         (rustyyerror, rustyylex): Add parser parameter.
6485         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6486         (rust_lex_stringish_test, rust_lex_test_sequence)
6487         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6488         (rust_lex_test_push_back, rust_lex_tests): Update.
6489
6490 2018-07-19  Pedro Alves  <palves@redhat.com>
6491
6492         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6493         gdb::unique_xmalloc_ptr.
6494         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6495         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6496         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6497         copy-initialization.
6498         * guile/scm-pretty-print.c (ppscm_print_children): Use
6499         gdb::unique_xmalloc_ptr instead of cleanups.
6500         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6501         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6502         gdb::unique_xmalloc_ptr.
6503         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6504         Adjust to use gdb::unique_xmalloc_ptr.
6505         * guile/scm-utils.c (extract_arg): Adjust.
6506         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6507         gdb::unique_xmalloc_ptr instead of a cleanup.
6508
6509 2018-07-19  Tom Tromey  <tom@tromey.com>
6510
6511         * utils.c (do_value_free_to_mark)
6512         (make_cleanup_value_free_to_mark): Remove.
6513         * utils.h (make_cleanup_value_free_to_mark): Remove.
6514
6515 2018-07-19  Pedro Alves  <palves@redhat.com>
6516
6517         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6518         forwarding reference.
6519
6520 2018-07-18  Pedro Alves  <palves@redhat.com>
6521
6522         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6523         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6524         cleanup.
6525
6526 2018-07-18  Pedro Alves  <palves@redhat.com>
6527
6528         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6529         exceptions.
6530         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6531         (gdbscm_wrap): New.
6532         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6533         directly instead of a cleanup.
6534         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6535         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6536         (vlscm_binop_gdbthrow): New, factored out from ...
6537         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6538         (vlscm_rich_compare): Use gdbscm_wrap.
6539         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6540         instead of a cleanup.
6541         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6542         cleanup.
6543         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6544         Use xfree directly instead of a cleanup.
6545         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6546         Adjust to use gdbscm_wrap and scoped_value_mark.
6547         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6548         (gdbscm_value_address, gdbscm_value_dereference)
6549         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6550         scoped_value_mark.
6551         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6552         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6553         scoped_value_mark.
6554         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6555         gdbscm_wrap and scoped_value_mark.
6556         (gdbscm_value_to_string): Use xfree directly instead of a
6557         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6558         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6559         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6560         scoped_value_mark.
6561         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6562         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6563         scoped_value_mark.
6564         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6565         gdbscm_wrap.
6566
6567 2018-07-18  Tom de Vries  <tdevries@suse.de>
6568
6569         * findvar.c (default_read_var_value): Also resolve dynamic type for
6570         LOC_OPTIMIZED_OUT vars.
6571
6572 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6573
6574         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6575         decoding.
6576
6577 2018-07-17  Tom Tromey  <tom@tromey.com>
6578
6579         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6580         (compute_enum_list, pascm_set_param_value_x)
6581         (gdbscm_parameter_value): Update.
6582         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6583         (gdbscm_scm_to_host_string): Update.
6584         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6585         Update.
6586         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6587         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6588         * guile/scm-string.c (gdbscm_scm_to_string): Return
6589         unique_xmalloc_ptr.
6590         (gdbscm_scm_to_host_string): Likewise.
6591
6592 2018-07-17  Tom Tromey  <tom@tromey.com>
6593
6594         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6595         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6596         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6597         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6598         unique_xmalloc_ptr.
6599
6600 2018-07-17  Tom Tromey  <tom@tromey.com>
6601
6602         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6603         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6604         Update.
6605         * guile/scm-cmd.c (cmdscm_function): Update.
6606         * guile/scm-pretty-print.c
6607         (ppscm_print_exception_unless_memory_error): Update.
6608         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6609         Return unique_xmalloc_ptr.
6610
6611 2018-07-17  Tom Tromey  <tom@tromey.com>
6612
6613         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6614         Use string_printf.
6615
6616 2018-07-17  Jim Wilson  <jimw@sifive.com>
6617
6618         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6619         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6620         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6621         unecessary braces after EF_RISCV_RVC test.  Delete call to
6622         set_gdbarch_decr_pc_after_break.
6623
6624         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6625         RISCV_LAST_FP_REGNUM + 1.
6626         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6627
6628 2018-07-17  Tom Tromey  <tom@tromey.com>
6629
6630         * configure.ac: Remove --disable-gdbcli.
6631         * configure: Rebuild.
6632         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6633         (SUBDIR_CLI_CFLAGS): Remove.
6634         (SFILES): Use SUBDIR_CLI_SRCS.
6635         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6636
6637 2018-07-17  Tom Tromey  <tom@tromey.com>
6638
6639         PR gdb/18624:
6640         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6641
6642 2018-07-16  Jim Wilson  <jimw@sifive.com>
6643
6644         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6645
6646 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6647
6648         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6649         variable.
6650         (libunwind_frame_sniffer): Likewise.
6651         (libunwind_frame_prev_register): Likewise.
6652         (libunwind_sigtramp_frame_sniffer): Likewise.
6653         * ia64-tdep.c (ia64_access_reg): Likewise.
6654         (ia64_access_rse_reg): Likewise.
6655         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6656         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6657
6658 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6659
6660         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6661
6662 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6663
6664         * remote-sim.c (gdbsim_target::close,
6665         gdbsim_target::mourn_inferior): Remove unused variables.
6666
6667 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6668
6669         * ia64-tdep.c (ktab_buf): New global.
6670         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6671         (get_kernel_table): Adjust.
6672
6673 2018-07-16  Tom Tromey  <tom@tromey.com>
6674
6675         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6676         * dwarf2read.c (using_directives, new_symbol): Use
6677         outermost_context_p.
6678         * dbxread.c (process_one_symbol): Use outermost_context_p.
6679         * coffread.c (coff_symtab_read): Use outermost_context_p.
6680
6681 2018-07-16  Tom Tromey  <tom@tromey.com>
6682
6683         * dwarf2read.c (using_directives, read_func_scope)
6684         (read_lexical_block_scope): Update.
6685         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6686         * buildsym.h (local_using_directives, global_using_directives):
6687         Don't declare.
6688         (get_local_using_directives, set_local_using_directives)
6689         (get_global_using_directives): Declare.
6690         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6691         m_global_using_directives>: New members.
6692         (finish_block_internal, prepare_for_building)
6693         (reset_symtab_globals, end_symtab_get_static_block)
6694         (push_context): Update.
6695         (get_local_using_directives, set_local_using_directives)
6696         (get_global_using_directives): New functions.
6697         (buildsym_init): Update.
6698
6699 2018-07-16  Tom Tromey  <tom@tromey.com>
6700
6701         * xcoffread.c (xcoff_initial_scan): Don't call
6702         free_pending_blocks.
6703         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6704         * buildsym.h (class scoped_free_pendings): Add constructor.
6705         (free_pending_blocks): Don't declare.
6706         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6707         (free_pending_blocks): Now static.
6708
6709 2018-07-16  Tom Tromey  <tom@tromey.com>
6710
6711         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6712         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6713         member.
6714         (struct subfile_stack): Remove.
6715         (subfile_stack): Remove.
6716         (push_subfile, pop_subfile, buildsym_init): Update.
6717
6718 2018-07-16  Tom Tromey  <tom@tromey.com>
6719
6720         * buildsym.c (push_subfile): Use gdb_assert.
6721         (pop_subfile): Use gdb_assert.
6722
6723 2018-07-16  Tom Tromey  <tom@tromey.com>
6724
6725         * buildsym.h (merge_symbol_lists): Remove.
6726         * buildsym.c (merge_symbol_lists): Remove.
6727
6728 2018-07-16  Tom Tromey  <tom@tromey.com>
6729
6730         * stabsread.c (scan_file_globals): Update comment.
6731         * stabsread.h (scan_file_globals): Move from buildsym.h.
6732         * buildsym.h (scan_file_globals): Move to stabsread.h.
6733
6734 2018-07-16  Tom Tromey  <tom@tromey.com>
6735
6736         * xcoffread.c (xcoff_new_init): Update.
6737         * mipsread.c (mipscoff_new_init): Update.
6738         * mdebugread.c (mdebug_build_psymtabs): Update.
6739         * elfread.c (elf_new_init): Update.
6740         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6741         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6742         * buildsym.h (buildsym_new_init): Don't declare.
6743         * buildsym.c (buildsym_new_init): Remove.
6744
6745 2018-07-16  Tom Tromey  <tom@tromey.com>
6746
6747         * stabsread.h (within_function): Move from buildsym.h.
6748         * stabsread.c (start_stabs): Clear within_function.
6749         * coffread.c (coff_start_symtab): Clear within_function.
6750         * buildsym.h (within_function): Move to stabsread.h.
6751         * buildsym.c (prepare_for_building): Update.
6752
6753 2018-07-16  Tom Tromey  <tom@tromey.com>
6754
6755         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6756         * dwarf2read.c (dwarf2_start_symtab): Don't set
6757         processing_gcc_compilation.
6758         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6759
6760 2018-07-16  Tom Tromey  <tom@tromey.com>
6761
6762         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6763         (next_symbol_text_func): Move from buildsym.h.
6764         * stabsread.c (hashname): Move from buildsym.c.
6765         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6766         (next_symbol_text_func, hashname): Move to stabsread.h.
6767         * buildsym.c: Don't include bcache.h
6768         (hashname): Move to stasbread.c.
6769
6770 2018-07-16  Tom Tromey  <tom@tromey.com>
6771
6772         * buildsym.h (context_stack_size): Don't declare.
6773         * buildsym.c (context_stack_size): New global.
6774
6775 2018-07-16  Tom Tromey  <tom@tromey.com>
6776
6777         * dbxread.c (processing_acc_compilation): New global.
6778         * buildsym.h (processing_acc_compilation): Don't declare.
6779
6780 2018-07-16  Tom Tromey  <tom@tromey.com>
6781
6782         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6783         * dbxread.c (read_ofile_symtab): Update.
6784         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6785         * buildsym.h (last_source_start_addr): Remove.
6786         (set_last_source_start_addr, get_last_source_start_addr):
6787         Declare.
6788         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6789         parameter.
6790         (struct buildsym_compunit) <m_last_source_start_addr>: New
6791         member.
6792         (prepare_for_building): Remove start_addr parameter.
6793         (start_symtab, restart_symtab, end_symtab_get_static_block)
6794         (end_symtab_with_blockvector): Update.
6795         (set_last_source_start_addr, get_last_source_start_addr): New
6796         functions.
6797
6798 2018-07-16  Tom Tromey  <tom@tromey.com>
6799
6800         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6801         member.
6802         (have_line_numbers): Remove.
6803         (record_line, prepare_for_building, end_symtab_get_static_block)
6804         (augment_type_symtab): Update.
6805
6806 2018-07-16  Tom Tromey  <tom@tromey.com>
6807
6808         * buildsym.c (~buildsym_compunit): Free the macro table.
6809         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6810         methods.
6811         <m_pending_macros>: New member.
6812         (pending_macros): Remove.
6813         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6814         (reset_symtab_globals, end_symtab_get_static_block)
6815         (end_symtab_with_blockvector, augment_type_symtab)
6816         (buildsym_init): Update.
6817
6818 2018-07-16  Tom Tromey  <tom@tromey.com>
6819
6820         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6821         parameter.
6822         (buildsym_compunit::set_last_source_file): New method.
6823         <m_last_source_file>: New member.
6824         (prepare_for_building): Remove "name" parameter.
6825         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6826         (last_source_file): Remove.
6827         (set_last_source_file, get_last_source_file): Update.
6828
6829 2018-07-16  Tom Tromey  <tom@tromey.com>
6830
6831         * buildsym.c (prepare_for_building): Add assert.
6832
6833 2018-07-16  Tom Tromey  <tom@tromey.com>
6834
6835         * buildsym.c (~buildsym_compunit): Update.
6836         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6837         (start_subfile, patch_subfile_names)
6838         (end_symtab_with_blockvector): Update.
6839
6840 2018-07-16  Tom Tromey  <tom@tromey.com>
6841
6842         * buildsym.c (struct buildsym_compunit): Add constructor,
6843         destructor, initializers.
6844         (start_buildsym_compunit): Remove.
6845         (free_buildsym_compunit): Use "delete".
6846         (start_symtab, restart_symtab): Use "new".
6847
6848 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6849
6850         * symfile.c (set_objfile_default_section_offset): Remove struct
6851         keyword.
6852
6853 2018-07-14  Stafford Horne  <shorne@gmail.com>
6854
6855         * (Responsible Maintainers): Add myself as or1k maintainer.
6856
6857 2018-07-13  Tom Tromey  <tom@tromey.com>
6858
6859         * symfile.c (set_objfile_default_section_offset): Use extra braces
6860         around initializer.
6861
6862 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6863
6864         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6865         non-branching basr.
6866
6867 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6868
6869         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6870         unittests/cli-utils-selftests.c
6871         * unittests/cli-utils-selftests.c: New file.
6872
6873 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6874
6875         * NEWS: Mention new commands. Mention change to 'thread apply'.
6876
6877 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6878
6879         * thread.c (thr_try_catch_cmd): New function.
6880         (thread_apply_all_command): Handle qcs flags.
6881         (thread_apply_command): Handle qcs flags.
6882         (taas_command): New function.
6883         (tfaas_command): New function.
6884         (_initialize_thread): Update to setup the new commands 'taas
6885         and 'tfaas'. Change doc string for 'thread apply'.
6886
6887 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6888
6889         * stack.c: (trailing_outermost_frame): New function, mostly
6890         extracted from backtrace_command_1.
6891         (leading_innermost_frame): New function.
6892         (backtrace_command_1): Update to call trailing_outermost_frame.
6893         (frame_apply_command_count): New function.
6894         (frame_apply_level_command): New function.
6895         (frame_apply_all_command): New function.
6896         (frame_apply_command): New function.
6897         (faas_command): New function.
6898         (frame_cmd_list): New variable.
6899         (_initialize_stack): Update to setup the new commands 'frame apply'
6900         and 'faas'.
6901
6902 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6903
6904         * cli-utils.c (number_or_range_parser::get_number): Only handle
6905         numbers or convenience var as numbers.
6906         (parse_flags): New function.
6907         (parse_flags_qcs): New function.
6908         (number_or_range_parser::finished): Ensure parsing end is detected
6909         before end of string.
6910         * cli-utils.h (parse_flags): New function.
6911         (parse_flags_qcs): New function.
6912         (number_or_range_parser): Remove m_finished bool.
6913         (number_or_range_parser::skip_range): Set m_in_range to false.
6914
6915 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6916
6917         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6918         on Windows.
6919
6920 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6921             Jan Kratochvil  <jan.kratochvil@redhat.com>
6922             Paul Fertser  <fercerpav@gmail.com>
6923             Tsutomu Seki  <sekiriki@gmail.com>
6924             Pedro Alves  <palves@redhat.com>
6925
6926         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6927         'unittests/parse-connection-spec-selftests.c'.
6928         (COMMON_SFILES): Add 'common/netstuff.c'.
6929         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6930         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6931         * common/netstuff.c: New file.
6932         * common/netstuff.h: New file.
6933         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6934         (wait_for_connect): Update comment.  New parameter
6935         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6936         Use 'sock' directly instead of 'scb->fd'.
6937         (try_connect): New function, with code from 'net_open'.
6938         (net_open): Rewrite main loop to deal with multiple
6939         sockets/addresses.  Handle IPv6-style hostnames; implement
6940         support for IPv6 connections.
6941         * unittests/parse-connection-spec-selftests.c: New file.
6942
6943 2018-07-11  Pedro Alves  <palves@redhat.com>
6944
6945         PR gdb/23377
6946         * remote.c (remote_target::remote_detach_pid): Call
6947         set_current_process.
6948
6949 2018-07-11  Pedro Alves  <palves@redhat.com>
6950
6951         * h8300-tdep.c (h8300_gdbarch_init): Remove
6952         set_gdbarch_ecoff_reg_to_regnum calls.
6953
6954 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6955
6956         PR c++/23373
6957         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6958         offsets/sizes for static members of a class/struct.
6959
6960 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6961
6962         * target-descriptions.c (tdesc_register_bitsize): Rename.
6963         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6964         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6965         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6966
6967 2018-07-10  Tom Tromey  <tom@tromey.com>
6968
6969         * breakpoint.c (moribund_locations): Now static and a
6970         std::vector.
6971         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6972         (build_bpstat_chain, update_global_location_list)
6973         (breakpoint_retire_moribund): Update.
6974         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6975         VEC.
6976
6977 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6978
6979         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6980         (riscv_register_reggroup_p): Use new function, remove unneeded
6981         parenthesis.
6982         (riscv_push_dummy_call): Extend assert to compare against xlen or
6983         flen based on register type.
6984
6985 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6986
6987         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6988
6989 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6990
6991         * remote.c (show_hardware_watchpoint_limit): New function.
6992         (show_hardware_watchpoint_length_limit): New function.
6993         (show_hardware_breakpoint_limit): New function.
6994         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6995         where appropriate, update help text.
6996
6997 2018-07-09  Tom Tromey  <tom@tromey.com>
6998
6999         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
7000         (CLIBS): Don't mention NAT_CLIBS.
7001
7002 2018-07-09  Tom Tromey  <tom@tromey.com>
7003
7004         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
7005         (LIBGDB_OBS, clean mostlyclean): Update.
7006         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
7007
7008 2018-07-09  Tom Tromey  <tom@tromey.com>
7009
7010         * Makefile.in (%.c: %.y): Use ECHO_YACC.
7011         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
7012         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
7013
7014 2018-07-09  Tom Tromey  <tom@tromey.com>
7015
7016         * Makefile.in (ALLDEPFILES): Remove exec.c.
7017         (COMMON_OBS): Remove exec.o.
7018         (COMMON_SFILES): Add exec.c.
7019
7020 2018-07-09  Tom Tromey  <tom@tromey.com>
7021
7022         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
7023
7024 2018-07-09  Tom Tromey  <tom@tromey.com>
7025
7026         * Makefile.in (clean mostlyclean): Remove stamp-version.
7027         (version.c): Depend on stamp-version.
7028         (stamp-version): New rule, from version.c rule.
7029
7030 2018-07-09  Tom Tromey  <tom@tromey.com>
7031
7032         * Makefile.in (init.c): Depend on stamp-init.
7033         (stamp-init): New rule, from init.c rule.
7034         (clean mostlyclean): Remove stamp-init.
7035
7036 2018-07-09  Tom Tromey  <tom@tromey.com>
7037
7038         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
7039         SUBDIR_GCC_COMPILE_SRCS.
7040
7041 2018-07-09  Tom Tromey  <tom@tromey.com>
7042
7043         * Makefile.in (init.c): Remove some unused sed rules.
7044
7045 2018-07-09  Tom Tromey  <tom@tromey.com>
7046
7047         * Makefile.in (TSOBS): Remove.
7048         (INIT_FILES): Update.
7049         (LIBGDB_OBS): Update.
7050         (COMMON_SFILES): Add inflow.c.
7051         (SFILES): Remove inflow.c.
7052
7053 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7054
7055         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7056
7057 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
7058
7059         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7060         get_saveloc_name, is_signal_frame_name, step_name,
7061         init_remote_name, create_addr_space_name,
7062         destroy_addr_space_name, search_unwind_table_name,
7063         find_dyn_list_name): Constify.
7064
7065 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
7066
7067         * darwin-nat.c (darwin_pthread_kill): New function.
7068         (darwin_resume_thread): Use darwin_pthread_kill.
7069
7070 2018-07-05  Tom de Vries  <tdevries@suse.de>
7071
7072         * macroexp.c (macro_buffer) <operator=>: New member function.
7073
7074 2018-07-04  Tom Tromey  <tom@tromey.com>
7075
7076         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7077
7078 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
7079
7080         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7081         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7082         * maint.c: Likewise.
7083         * top.c: Likewise.
7084
7085 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7086
7087         * NEWS: Create a new section for the next release branch.
7088         Rename the section of the current branch, now that it has
7089         been cut.
7090
7091 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7092
7093         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7094         * version.in: Bump version to 8.2.50.DATE-git.
7095
7096 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
7097             Pedro Alves  <palves@redhat.com>
7098
7099         * linux-nat.c (linux_init_ptrace): Rename to ...
7100         (linux_init_ptrace_procfs): ... this.  Call
7101         linux_proc_init_warnings.
7102         (linux_nat_target::post_attach)
7103         (linux_nat_target::post_startup_inferior): Adjust.
7104         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7105         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7106
7107 2018-07-04  Tom de Vries  <tdevries@suse.de>
7108
7109         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7110         check ...
7111         (read_comp_unit_head): ... here.
7112
7113 2018-07-03  Tom Tromey  <tom@tromey.com>
7114
7115         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7116         (stop_tracing, tstatus_command)
7117         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7118         (print_one_static_tracepoint_marker): Update.
7119         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7120         std::vector.
7121         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
7122         VEC.
7123         (all_tracepoints, static_tracepoints_here): Return std::vector.
7124
7125 2018-07-03  Tom Tromey  <tom@tromey.com>
7126
7127         * common/ptid.c (ptid_equal): Remove.
7128         * common/ptid.h (ptid_equal): Don't declare.
7129         * ada-tasks.c: Update.
7130         * breakpoint.c: Update.
7131         * common/agent.c: Update.
7132         * corelow.c: Update.
7133         * darwin-nat-info.c: Update.
7134         * darwin-nat.c: Update.
7135         * dcache.c: Update.
7136         * dtrace-probe.c: Update.
7137         * dummy-frame.c: Update.
7138         * fbsd-nat.c: Update.
7139         * frame.c: Update.
7140         * gdbthread.h: Update.
7141         * gnu-nat.c: Update.
7142         * go32-nat.c: Update.
7143         * inf-loop.c: Update.
7144         * inf-ptrace.c: Update.
7145         * infcall.c: Update.
7146         * infcmd.c: Update.
7147         * inflow.c: Update.
7148         * infrun.c: Update.
7149         * linux-fork.c: Update.
7150         * linux-nat.c: Update.
7151         * linux-thread-db.c: Update.
7152         * mi/mi-cmd-var.c: Update.
7153         * mi/mi-interp.c: Update.
7154         * mi/mi-main.c: Update.
7155         * nto-procfs.c: Update.
7156         * ppc-linux-tdep.c: Update.
7157         * procfs.c: Update.
7158         * python/py-inferior.c: Update.
7159         * python/py-record-btrace.c: Update.
7160         * python/py-record.c: Update.
7161         * ravenscar-thread.c: Update.
7162         * regcache.c: Update.
7163         * remote-sim.c: Update.
7164         * remote.c: Update.
7165         * sol-thread.c: Update.
7166         * solib.c: Update.
7167         * target.c: Update.
7168         * tui/tui-stack.c: Update.
7169         * varobj.c: Update.
7170         * windows-nat.c: Update.
7171         * windows-tdep.c: Update.
7172
7173 2018-07-03  Tom Tromey  <tom@tromey.com>
7174
7175         * common/ptid.c (ptid_match): Remove.
7176         * common/ptid.h (ptid_match): Don't declare.
7177         * fbsd-nat.c: Update.
7178         * infcmd.c: Update.
7179         * infrun.c: Update.
7180         * linux-nat.c: Update.
7181         * record-btrace.c: Update.
7182         * regcache.c: Update.
7183         * remote.c: Update.
7184
7185 2018-07-03  Tom Tromey  <tom@tromey.com>
7186
7187         * common/ptid.c (ptid_tid_p): Remove.
7188         * common/ptid.h (ptid_tid_p): Don't declare.
7189         * sol-thread.c: Update.
7190
7191 2018-07-03  Tom Tromey  <tom@tromey.com>
7192
7193         * common/ptid.c (ptid_lwp_p): Remove.
7194         * common/ptid.h (ptid_lwp_p): Don't declare.
7195         * fbsd-nat.c: Update.
7196         * linux-nat.c: Update.
7197         * nat/linux-procfs.c: Update.
7198         * nat/x86-linux-dregs.c: Update.
7199         * sol-thread.c: Update.
7200
7201 2018-07-03  Tom Tromey  <tom@tromey.com>
7202
7203         * common/ptid.c (ptid_is_pid): Remove.
7204         * common/ptid.h (ptid_is_pid): Don't declare.
7205         * infrun.c: Update.
7206         * linux-nat.c: Update.
7207         * mi/mi-interp.c: Update.
7208         * remote.c: Update.
7209         * thread.c: Update.
7210
7211 2018-07-03  Tom Tromey  <tom@tromey.com>
7212
7213         * common/ptid.c (ptid_get_tid): Remove.
7214         * common/ptid.h (ptid_get_tid): Don't declare.
7215         * ada-tasks.c: Update.
7216         * aix-thread.c: Update.
7217         * bsd-uthread.c: Update.
7218         * darwin-nat.c: Update.
7219         * fbsd-nat.c: Update.
7220         * i386-darwin-nat.c: Update.
7221         * infrun.c: Update.
7222         * linux-tdep.c: Update.
7223         * nto-procfs.c: Update.
7224         * ppc-ravenscar-thread.c: Update.
7225         * python/py-infthread.c: Update.
7226         * ravenscar-thread.c: Update.
7227         * sol-thread.c: Update.
7228         * sparc-ravenscar-thread.c: Update.
7229         * windows-nat.c: Update.
7230
7231 2018-07-03  Tom Tromey  <tom@tromey.com>
7232
7233         * common/ptid.c (ptid_get_lwp): Remove.
7234         * common/ptid.h (ptid_get_lwp): Don't declare.
7235         * aarch64-linux-nat.c: Update.
7236         * ada-tasks.c: Update.
7237         * aix-thread.c: Update.
7238         * amd64-linux-nat.c: Update.
7239         * arm-linux-nat.c: Update.
7240         * corelow.c: Update.
7241         * fbsd-nat.c: Update.
7242         * fbsd-tdep.c: Update.
7243         * gnu-nat.c: Update.
7244         * i386-cygwin-tdep.c: Update.
7245         * i386-gnu-nat.c: Update.
7246         * i386-linux-nat.c: Update.
7247         * ia64-linux-nat.c: Update.
7248         * inf-ptrace.c: Update.
7249         * infrun.c: Update.
7250         * linux-fork.c: Update.
7251         * linux-nat.c: Update.
7252         * linux-tdep.c: Update.
7253         * linux-thread-db.c: Update.
7254         * mips-linux-nat.c: Update.
7255         * nat/aarch64-linux-hw-point.c: Update.
7256         * nat/aarch64-linux.c: Update.
7257         * nat/linux-btrace.c: Update.
7258         * nat/linux-osdata.c: Update.
7259         * nat/linux-procfs.c: Update.
7260         * nat/x86-linux-dregs.c: Update.
7261         * obsd-nat.c: Update.
7262         * ppc-fbsd-nat.c: Update.
7263         * ppc-linux-nat.c: Update.
7264         * procfs.c: Update.
7265         * python/py-infthread.c: Update.
7266         * ravenscar-thread.c: Update.
7267         * remote.c: Update.
7268         * s390-linux-nat.c: Update.
7269         * sol-thread.c: Update.
7270         * sol2-tdep.c: Update.
7271         * spu-linux-nat.c: Update.
7272         * x86-linux-nat.c: Update.
7273         * xtensa-linux-nat.c: Update.
7274
7275 2018-07-03  Tom Tromey  <tom@tromey.com>
7276
7277         * common/ptid.c (ptid_get_pid): Remove.
7278         * common/ptid.h (ptid_get_pid): Don't declare.
7279         * aarch64-linux-nat.c: Update.
7280         * ada-lang.c: Update.
7281         * aix-thread.c: Update.
7282         * alpha-bsd-nat.c: Update.
7283         * amd64-fbsd-nat.c: Update.
7284         * amd64-linux-nat.c: Update.
7285         * arm-linux-nat.c: Update.
7286         * arm-nbsd-nat.c: Update.
7287         * auxv.c: Update.
7288         * break-catch-syscall.c: Update.
7289         * breakpoint.c: Update.
7290         * bsd-uthread.c: Update.
7291         * corelow.c: Update.
7292         * ctf.c: Update.
7293         * darwin-nat.c: Update.
7294         * fbsd-nat.c: Update.
7295         * fbsd-tdep.c: Update.
7296         * gcore.c: Update.
7297         * gnu-nat.c: Update.
7298         * hppa-nbsd-nat.c: Update.
7299         * hppa-obsd-nat.c: Update.
7300         * i386-fbsd-nat.c: Update.
7301         * ia64-linux-nat.c: Update.
7302         * inf-ptrace.c: Update.
7303         * infcmd.c: Update.
7304         * inferior.c: Update.
7305         * inferior.h: Update.
7306         * inflow.c: Update.
7307         * infrun.c: Update.
7308         * linux-fork.c: Update.
7309         * linux-nat.c: Update.
7310         * linux-tdep.c: Update.
7311         * linux-thread-db.c: Update.
7312         * m68k-bsd-nat.c: Update.
7313         * mi/mi-interp.c: Update.
7314         * mi/mi-main.c: Update.
7315         * mips-linux-nat.c: Update.
7316         * mips-nbsd-nat.c: Update.
7317         * mips64-obsd-nat.c: Update.
7318         * nat/aarch64-linux-hw-point.c: Update.
7319         * nat/aarch64-linux.c: Update.
7320         * nat/linux-btrace.c: Update.
7321         * nat/linux-osdata.c: Update.
7322         * nat/linux-procfs.c: Update.
7323         * nat/x86-linux-dregs.c: Update.
7324         * nto-procfs.c: Update.
7325         * obsd-nat.c: Update.
7326         * ppc-linux-nat.c: Update.
7327         * ppc-nbsd-nat.c: Update.
7328         * ppc-obsd-nat.c: Update.
7329         * proc-service.c: Update.
7330         * procfs.c: Update.
7331         * python/py-inferior.c: Update.
7332         * python/py-infthread.c: Update.
7333         * ravenscar-thread.c: Update.
7334         * record.c: Update.
7335         * remote-sim.c: Update.
7336         * remote.c: Update.
7337         * rs6000-nat.c: Update.
7338         * s390-linux-nat.c: Update.
7339         * sh-nbsd-nat.c: Update.
7340         * sol-thread.c: Update.
7341         * sparc-nat.c: Update.
7342         * sparc64-tdep.c: Update.
7343         * spu-linux-nat.c: Update.
7344         * spu-tdep.c: Update.
7345         * target-debug.h: Update.
7346         * target.c: Update.
7347         * thread.c: Update.
7348         * tid-parse.c: Update.
7349         * tracefile-tfile.c: Update.
7350         * vax-bsd-nat.c: Update.
7351         * windows-nat.c: Update.
7352         * x86-linux-nat.c: Update.
7353         * x86-nat.c: Update.
7354
7355 2018-07-03  Tom Tromey  <tom@tromey.com>
7356
7357         * common/ptid.c (pid_to_ptid): Remove.
7358         * common/ptid.h (pid_to_ptid): Don't declare.
7359         * aix-thread.c: Update.
7360         * arm-linux-nat.c: Update.
7361         * common/ptid.c: Update.
7362         * common/ptid.h: Update.
7363         * corelow.c: Update.
7364         * ctf.c: Update.
7365         * darwin-nat.c: Update.
7366         * fbsd-nat.c: Update.
7367         * fork-child.c: Update.
7368         * gnu-nat.c: Update.
7369         * go32-nat.c: Update.
7370         * inf-ptrace.c: Update.
7371         * infcmd.c: Update.
7372         * inferior.c: Update.
7373         * infrun.c: Update.
7374         * linux-fork.c: Update.
7375         * linux-nat.c: Update.
7376         * nat/aarch64-linux-hw-point.c: Update.
7377         * nat/fork-inferior.c: Update.
7378         * nat/x86-linux-dregs.c: Update.
7379         * nto-procfs.c: Update.
7380         * obsd-nat.c: Update.
7381         * procfs.c: Update.
7382         * progspace.c: Update.
7383         * remote.c: Update.
7384         * rs6000-nat.c: Update.
7385         * s390-linux-nat.c: Update.
7386         * sol-thread.c: Update.
7387         * spu-linux-nat.c: Update.
7388         * target.c: Update.
7389         * top.c: Update.
7390         * tracefile-tfile.c: Update.
7391         * windows-nat.c: Update.
7392
7393 2018-07-03  Tom Tromey  <tom@tromey.com>
7394
7395         * common/ptid.h (ptid_build): Don't declare.
7396         * common/ptid.c (ptid_build): Remove.
7397         * aix-thread.c: Update.
7398         * bsd-kvm.c: Update.
7399         * bsd-uthread.c: Update.
7400         * common/agent.c: Update.
7401         * common/ptid.c: Update.
7402         * common/ptid.h: Update.
7403         * corelow.c: Update.
7404         * darwin-nat.c: Update.
7405         * fbsd-nat.c: Update.
7406         * gnu-nat.c: Update.
7407         * linux-fork.c: Update.
7408         * linux-nat.c: Update.
7409         * linux-thread-db.c: Update.
7410         * nat/linux-osdata.c: Update.
7411         * nat/linux-procfs.c: Update.
7412         * nto-procfs.c: Update.
7413         * obsd-nat.c: Update.
7414         * proc-service.c: Update.
7415         * procfs.c: Update.
7416         * ravenscar-thread.c: Update.
7417         * remote-sim.c: Update.
7418         * remote.c: Update.
7419         * sol-thread.c: Update.
7420         * target.c: Update.
7421         * windows-nat.c: Update.
7422
7423 2018-07-03  Tom Tromey  <tom@tromey.com>
7424
7425         * infrun.c (follow_exec): Use exit_inferior_silent.
7426         * inferior.c (exit_inferior_num_silent): Remove.
7427         * inferior.h (exit_inferior_num_silent): Don't declare.
7428
7429 2018-07-03  Tom Tromey  <tom@tromey.com>
7430
7431         PR cli/23340:
7432         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7433         inferior_ptid on error.
7434
7435 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7436             Simon Marchi  <simon.marchi@polymtl.ca>
7437
7438         PR tdep/8282
7439         * disasm.h (gdb_disassembler): Add
7440         `m_disassembler_options_holder'. member
7441         * disasm.c (get_all_disassembler_options): New function.
7442         (gdb_disassembler::gdb_disassembler): Use it.
7443         (gdb_buffered_insn_length_init_dis): Likewise.
7444         (gdb_buffered_insn_length): Adjust accordingly.
7445         (set_disassembler_options): Handle options with arguments.
7446         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7447         line if showing options with descriptions.
7448         (disassembler_options_completer): Adapt to using the
7449         `disasm_options_and_args_t' structure.
7450         * mips-tdep.c (mips_disassembler_options): New variable.
7451         (mips_disassembler_options_o32): Likewise.
7452         (mips_disassembler_options_n32): Likewise.
7453         (mips_disassembler_options_n64): Likewise.
7454         (gdb_print_insn_mips): Don't set `disassembler_options'.
7455         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7456         functions.
7457         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7458         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7459         `gdbarch_disassembler_options_implicit' and
7460         `gdbarch_valid_disassembler_options'.
7461         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7462         `disasm_options_and_args_t' structure.
7463         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7464         method.
7465         (valid_disassembler_options): Switch from `disasm_options_t' to
7466         the `disasm_options_and_args_t' structure.
7467         * NEWS: Document `set disassembler-options' support for the MIPS
7468         target.
7469         * gdbarch.h: Regenerate.
7470         * gdbarch.c: Regenerate.
7471
7472 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7473
7474         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7475
7476 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7477
7478         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7479         parameter in call to amd64_target_description.
7480         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7481         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7482         (amd64fbsd_init_abi): Likewise.
7483         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7484         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7485         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7486         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7487
7488 2018-06-29  Pedro Alves  <palves@redhat.com>
7489
7490         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7491         "segments" parameter.
7492         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7493         (_initialize_amd64_tdep): Update call to
7494         amd64_create_target_description.
7495         (amd64_target_description): Add "segments" parameter.  Adjust
7496         the implementation to use it.
7497         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7498         call to amd64_create_target_description.
7499         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7500         * gdb/arch/amd64.h (amd64_create_target_description): Add
7501         "segments" register.
7502         * gdb/arch/amd64.c (amd64_create_target_description): Add
7503         "segments" parameter.  Call create_feature_i386_64bit_segments
7504         only if SEGMENTS is true.
7505         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7506         call to amd64_create_target_description.
7507
7508 2018-06-29  Pedro Alves  <palves@redhat.com>
7509
7510         * thread.c (thread_target_id_str): New, factored out from ...
7511         (print_thread_info_1): ... here.  Use it to compute the max
7512         "Target Id" column width.
7513
7514 2018-06-29  Pedro Alves  <palves@redhat.com>
7515
7516         * remote.c (remote_target::extra_thread_info): Delete
7517         'display_buf' and 'n' locals.  from the cache, regardless of
7518         packet mechanims is in use.  Use cache for qThreadExtra and qP
7519         methods too.
7520
7521 2018-06-29  Pedro Alves  <palves@redhat.com>
7522
7523         * blockframe.c (find_pc_sect_containing_function): New function.
7524         * breakpoint.c (print_breakpoint_location): Don't call
7525         find_pc_sect_function.
7526         * linespec.c (create_sals_line_offset): Record the location's
7527         symbol in the sal.
7528         * linespec.c (convert_address_location_to_sals): Fill in sal's
7529         symbol with find_pc_sect_containing_function.
7530         * symtab.c (find_function_start_sal): Rename to ...
7531         (find_function_start_sal_1): ... this.
7532         (find_function_start_sal): Reimplement as wrapper around
7533         find_function_start_sal_1, and use
7534         find_pc_sect_containing_function to fill in the sal's symbol.
7535         (find_function_start_sal(symbol*, bool)): Adjust.
7536         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7537         comments.
7538         (find_pc_sect_containing_function): Declare.
7539
7540 2018-06-29  Pedro Alves  <palves@redhat.com>
7541
7542         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7543         true if the the location has no symbol.
7544
7545 2018-06-28  Tom Tromey  <tom@tromey.com>
7546
7547         * NEWS: Mention --enable-codesign.
7548         * silent-rules.mk (ECHO_SIGN): New variable.
7549         * configure.ac: Add --enable-codesign.
7550         * configure: Rebuild.
7551         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7552         (gdb$(EXEEXT)): Optionally invoke codesign.
7553
7554 2018-06-28  Pedro Alves  <palves@redhat.com>
7555
7556         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7557         comments.
7558         (switch_to_thread_no_regs): Adjust comment.
7559         * infcmd.c (stop_pc): Delete.
7560         (post_create_inferior, info_program_command): Replace references
7561         to stop_pc with references to thread_info->suspend.stop_pc.
7562         * inferior.h (stop_pc): Delete declaration.
7563         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7564         (handle_inferior_event_1, handle_signal_stop)
7565         (process_event_stop_test, keep_going_stepped_thread)
7566         (handle_step_into_function, handle_step_into_function_backward)
7567         (print_stop_location): Replace references to stop_pc with
7568         references to thread_info->suspend.stop_pc.
7569         (struct infcall_suspend_state) <stop_pc>: Delete field.
7570         (save_infcall_suspend_state, restore_infcall_suspend_state):
7571         Remove references to inf_stat->stop_pc.
7572         * linux-fork.c (fork_load_infrun_state): Likewise.
7573         * record-btrace.c (record_btrace_set_replay): Likewise.
7574         * record-full.c (record_full_goto_entry): Likewise.
7575         * remote.c (print_one_stopped_thread): Likewise.
7576         * target.c (target_resume): Extend comment.
7577         * thread.c (set_executing_thread): New.
7578         (set_executing): Use it.
7579         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7580         Remove references to stop_pc.
7581
7582 2018-06-28  Pedro Alves  <palves@redhat.com>
7583
7584         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7585         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7586
7587 2018-06-28  Tom Tromey  <tom@tromey.com>
7588
7589         * coffread.c (coff_symfile_finish): Update.
7590         * xcoffread.c (xcoff_symfile_finish): Update.
7591         * elfread.c (elf_symfile_finish): Update.
7592         * symfile.h (dwarf2_free_objfile): Don't declare.
7593         * dwarf2read.c (_initialize_dwarf2_read): Use
7594         register_objfile_data_with_cleanup.
7595         (dwarf2_free_objfile): Now static.  Change signature.
7596
7597 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7598
7599         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7600         option "-o" to add-symbol-file-load to add an offset to each
7601         section's load address.
7602         * symfile.c (set_objfile_default_section_offset): New function.
7603
7604 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7605
7606         * symfile.c (add_symbol_file_command): Make sure that sections
7607         with the same name are sorted in the same order.
7608
7609 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7610
7611         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7612         require the second argument.  If omitted, load sections at the
7613         addresses specified in the file.
7614
7615 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7616
7617         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7618         (_initialize_symfile): Add option "-o" to symbol-file to add an
7619         offset to each section of the symbol file.
7620
7621 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7622
7623         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7624
7625 2018-06-27  Tom Tromey  <tom@tromey.com>
7626
7627         * stack.c (_initialize_stack): Update "func" help text.
7628
7629 2018-06-27  Tom Tromey  <tom@tromey.com>
7630
7631         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7632         std::vector.
7633         (unwind_infopy_str, pyuw_create_unwind_info)
7634         (unwind_infopy_add_saved_register, pyuw_sniffer)
7635         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7636         Update.
7637         (struct saved_reg): Add constructor.
7638         <value>: Now a gdbpy_ref<>.
7639
7640 2018-06-27  Tom Tromey  <tom@tromey.com>
7641
7642         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7643
7644 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7645
7646         * gdb-gdb.py.in: Format using autopep8.
7647
7648 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7649
7650         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7651         (type_lookup_function): Recognize CORE_ADDR values.
7652
7653 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7654
7655         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7656         print tag_name.
7657
7658 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7659
7660         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7661         <__lt__>: Add.
7662
7663 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7664
7665         * gdb-gdb.py: Move to...
7666         * gdb-gdb.py.in: ... here.
7667         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7668         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7669         dependencies.
7670         (distclean): Remove gdb-gdb.py when cleaning.
7671         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7672         * configure: Re-generate.
7673
7674 2018-06-27  Pedro Alves  <palves@redhat.com>
7675
7676         * proc-service.c (get_ps_regcache): New.
7677         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7678         (ps_lsetfpregs): Use it.
7679
7680 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7681
7682         PR gdb/21695
7683         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7684         declaration.
7685         (dwarf_decode_lines_1): Adjust.
7686
7687 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7688
7689         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7690         override.
7691         <info_proc>: Likewise.
7692
7693 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7694
7695         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7696         to windows_fetch_one_register, and only handle the case of
7697         fetching one register.  Move the code that reloads the context
7698         and iterates over all registers if R is negative to...
7699         (windows_nat_target::fetch_registers): ... here.
7700         (do_windows_store_inferior_registers): Rename to
7701         windows_store_one_register, and only handle the case of storing
7702         one register.  Move the code that handles the case where r is
7703         negative to...
7704         (windows_nat_target::store_registers) ... here.
7705
7706 2018-06-26  Tom Tromey  <tom@tromey.com>
7707
7708         PR rust/22574:
7709         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7710         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7711         Update.
7712         (rust_internal_print_type): Add podata parameter.
7713         (rust_print_type): Update.
7714
7715 2018-06-26  Tom Tromey  <tom@tromey.com>
7716
7717         * typeprint.h (struct print_offset_data) <update, finish,
7718         maybe_print_hole>: New methods.
7719         <indentation>: New constant.
7720         * typeprint.c (print_offset_data::indentation): Define.
7721         (print_offset_data::maybe_print_hole, print_offset_data::update)
7722         (print_offset_data::finish): Move from c-typeprint.c and rename.
7723         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7724         (print_spaces_filtered_with_print_options): Update.
7725         (c_print_type_union_field_offset, maybe_print_hole)
7726         (c_print_type_struct_field_offset): Move to typeprint.c and
7727         rename.
7728         (c_type_print_base_struct_union): Update.
7729
7730 2018-06-25  Pedro Alves  <palves@redhat.com>
7731
7732         * gdbthread.h (thread_info_ref, delete_thread)
7733         (delete_thread_silent, first_thread_of_inferior)
7734         (any_thread_of_inferior, switch_to_thread)
7735         (enable_thread_stack_temporaries)
7736         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7737         (get_last_thread_stack_temporary)
7738         (value_in_thread_stack_temporaries, can_access_registers_thread):
7739         Spell out "struct thread_info" instead of just "thread_info".
7740         * inferior.h (notice_new_inferior): Likewise.
7741
7742 2018-06-25  Pedro Alves  <palves@redhat.com>
7743
7744         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7745         pass thread_info pointer to delete_thread.
7746         (windows_nat_target::detach): Pass inferior pointer to
7747         detach_inferior.
7748         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7749         delete_thread.
7750         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7751         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7752         and pass a thread_info pointer to delete_thread.
7753         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7754         pass thread_info pointer to delete_thread.
7755         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7756         delete_thread_silent call.
7757         * procfs.c (procfs_target::detach): Pass inferior pointer to
7758         detach_inferior.
7759         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7760         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7761         delete_thread_silent call.
7762         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7763         pass thread_info pointer to delete_thread.
7764         (windows_nat_target::detach): Pass inferior pointer to
7765         delete_inferior.
7766
7767 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7768
7769         * regcache.c (readable_regcache::read_part): Fix asserts.
7770         (reg_buffer::raw_collect_part): New function.
7771         (regcache::write_part): Fix asserts.
7772         (reg_buffer::raw_supply_part): New function.
7773         (regcache::transfer_regset_register): New helper function.
7774         (regcache::transfer_regset): Call new functions.
7775         (regcache_supply_regset): Use gdb_byte*.
7776         (regcache::supply_regset): Likewise.
7777         (regcache_collect_regset): Likewise.
7778         (regcache::collect_regset): Likewise.
7779         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7780         (reg_buffer::raw_supply_part): Likewise.
7781         (regcache::transfer_regset_register): Likewise.
7782         (regcache::transfer_regset): Use gdb_byte*.
7783
7784 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7785
7786         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7787
7788 2018-06-21  Pedro Alves  <palves@redhat.com>
7789
7790         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7791         instead of a ptid_t.  All callers adjusted.
7792         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7793         adjusted.
7794         (print_ada_task_info, display_current_task_id, task_command_1):
7795         Adjust.
7796         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7797         inferior_thread.
7798         (breakpoint_kind): Adjust.
7799         (remove_breakpoints_pid): Rename to ...
7800         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7801         pointer.  All callers adjusted.
7802         (bpstat_clear_actions): Use inferior_thread.
7803         (get_bpstat_thread): New.
7804         (bpstat_do_actions): Use it.
7805         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7806         to take a thread_info pointer.  All callers adjusted.
7807         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7808         (breakpoint_re_set_thread): Use inferior_thread.
7809         * breakpoint.h (struct inferior): Forward declare.
7810         (bpstat_stop_status): Update.
7811         (remove_breakpoints_pid): Delete.
7812         (remove_breakpoints_inf): New.
7813         * bsd-uthread.c (bsd_uthread_target::wait)
7814         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7815         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7816         (maint_btrace_packet_history_cmd)
7817         (maint_btrace_clear_packet_history_cmd): Adjust.
7818         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7819         inferior_thread.
7820         * cli/cli-interp.c: Include "inferior.h".
7821         * common/refcounted-object.h (struct
7822         refcounted_object_ref_policy): New.
7823         * compile/compile-object-load.c: Include gdbthread.h.
7824         (store_regs): Use inferior_thread.
7825         * corelow.c (core_target::close): Use current_inferior.
7826         (core_target_open): Adjust to use first_thread_of_inferior and use
7827         the current inferior.
7828         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7829         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7830         <thread>: ... this new field.  All references adjusted.
7831         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7832         Take a thread_info pointer instead of a ptid_t.
7833         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7834         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7835         thread_info pointer instead of a ptid_t.
7836         * elfread.c: Include "inferior.h".
7837         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7838         Use inferior_thread.
7839         * eval.c (evaluate_subexp): Likewise.
7840         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7841         inferior_thread.
7842         * gdb_proc_service.h (struct thread_info): Forward declare.
7843         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7844         <thread>: ... this new field.  All references adjusted.
7845         * gdbarch.h, gdbarch.c: Regenerate.
7846         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7847         'thread' parameter.  All implementations and callers adjusted.
7848         * gdbthread.h (thread_info) <set_running>: New method.
7849         (delete_thread, delete_thread_silent): Take a thread_info pointer
7850         instead of a ptid.
7851         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7852         (first_thread_of_process): Delete, replaced by ...
7853         (first_thread_of_inferior): ... this new function.  All callers
7854         adjusted.
7855         (any_live_thread_of_process): Delete, replaced by ...
7856         (any_live_thread_of_inferior): ... this new function.  All callers
7857         adjusted.
7858         (switch_to_thread, switch_to_no_thread): Declare.
7859         (is_executing): Delete.
7860         (enable_thread_stack_temporaries): Update comment.
7861         <enable_thread_stack_temporaries>: Take a thread_info pointer
7862         instead of a ptid_t.  Incref the thread.
7863         <~enable_thread_stack_temporaries>: Decref the thread.
7864         <m_ptid>: Delete
7865         <m_thr>: New.
7866         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7867         (get_last_thread_stack_temporary)
7868         (value_in_thread_stack_temporaries, can_access_registers_thread):
7869         Take a thread_info pointer instead of a ptid_t.  All callers
7870         adjusted.
7871         * infcall.c (get_call_return_value): Use inferior_thread.
7872         (run_inferior_call): Work with thread pointers instead of ptid_t.
7873         (call_function_by_hand_dummy): Work with thread pointers instead
7874         of ptid_t.  Use thread_info_ref.
7875         * infcmd.c (proceed_thread_callback): Access thread's state
7876         directly.
7877         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7878         access thread's state directly.
7879         (continue_command): Use inferior_thread.
7880         (info_program_command): Use find_thread_ptid and access thread
7881         state directly.
7882         (proceed_after_attach_callback): Use thread state directly.
7883         (notice_new_inferior): Take a thread_info pointer instead of a
7884         ptid_t.  All callers adjusted.
7885         (exit_inferior): Take an inferior pointer instead of a pid.  All
7886         callers adjusted.
7887         (exit_inferior_silent): New.
7888         (detach_inferior): Delete.
7889         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7890         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7891         (detach_inferior_command, kill_inferior_command): Use
7892         find_inferior_id instead of valid_gdb_inferior_id and
7893         gdb_inferior_id_to_pid.
7894         (inferior_command): Use inferior and thread pointers.
7895         * inferior.h (struct thread_info): Forward declare.
7896         (notice_new_inferior): Take a thread_info pointer instead of a
7897         ptid_t.  All callers adjusted.
7898         (detach_inferior): Delete declaration.
7899         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7900         instead of a pid.  All callers adjusted.
7901         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7902         (valid_gdb_inferior_id): Delete.
7903         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7904         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7905         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7906         ...
7907         <inf>: ... this new field.
7908         <step_ptid>: Delete, replaced by ...
7909         <step_thread>: ... this new field.
7910         (get_displaced_stepping_state): Take an inferior pointer instead
7911         of a pid.  All callers adjusted.
7912         (displaced_step_in_progress_any_inferior): Adjust.
7913         (displaced_step_in_progress_thread): Take a thread pointer instead
7914         of a ptid_t.  All callers adjusted.
7915         (displaced_step_in_progress, add_displaced_stepping_state): Take
7916         an inferior pointer instead of a pid.  All callers adjusted.
7917         (get_displaced_step_closure_by_addr): Adjust.
7918         (remove_displaced_stepping_state): Take an inferior pointer
7919         instead of a pid.  All callers adjusted.
7920         (displaced_step_prepare_throw, displaced_step_prepare)
7921         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7922         All callers adjusted.
7923         (start_step_over): Adjust.
7924         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7925         displaced step queue.
7926         (do_target_resume): Adjust.
7927         (fetch_inferior_event): Use inferior_thread.
7928         (context_switch, get_inferior_stop_soon): Take an
7929         execution_control_state pointer instead of a ptid_t.  All callers
7930         adjusted.
7931         (switch_to_thread_cleanup): Delete.
7932         (stop_all_threads): Use scoped_restore_current_thread.
7933         * inline-frame.c: Include "gdbthread.h".
7934         (inline_state) <inline_state>: Take a thread pointer instead of a
7935         ptid_t.  All callers adjusted.
7936         <ptid>: Delete, replaced by ...
7937         <thread>: ... this new field.
7938         (find_inline_frame_state): Take a thread pointer instead of a
7939         ptid_t.  All callers adjusted.
7940         (skip_inline_frames, step_into_inline_frame)
7941         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7942         pointer instead of a ptid_t.  All callers adjusted.
7943         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7944         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7945         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7946         pointers directly.
7947         * linux-nat.c (get_detach_signal): Likewise.
7948         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7949         (thread_db_notice_clone): Adjust.
7950         (thread_db_find_new_threads_silently)
7951         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7952         a thread pointer instead of a ptid_t.  All callers adjusted.
7953         * mi/mi-cmd-var.c: Include "inferior.h".
7954         (mi_cmd_var_update_iter): Update to use thread pointers.
7955         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7956         inferior directly.
7957         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7958         out to ...
7959         (mi_output_running): ... this new function.
7960         (mi_on_resume_1): Adjust to use it.
7961         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7962         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7963         directly.
7964         (interrupt_thread_callback): : Adjust to use thread and inferior
7965         pointers.
7966         * proc-service.c: Include "gdbthread.h".
7967         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7968         * progspace-and-thread.c: Include "inferior.h".
7969         * progspace.c: Include "inferior.h".
7970         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7971         hold a reference to an inferior_object.
7972         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7973         inferior_thread.
7974         * python/py-inferior.c (struct inferior_object): Give the type a
7975         tag name instead of a typedef.
7976         (python_on_normal_stop): No need to check if the current thread is
7977         listed.
7978         (inferior_to_inferior_object): Change return type to
7979         inferior_object.  All callers adjusted.
7980         (find_thread_object): Delete, bits factored out to ...
7981         (thread_to_thread_object): ... this new function.
7982         * python/py-infthread.c (create_thread_object): Use
7983         inferior_to_inferior_object.
7984         (thpy_is_stopped): Use thread pointer directly.
7985         (gdbpy_selected_thread): Use inferior_thread.
7986         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7987         field, replaced with ...
7988         <thread>: ... this new field.  All users adjusted.
7989         (btpy_insn_or_gap_new): Drop const.
7990         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7991         callers adjusted.
7992         * python/py-record.c: Include "gdbthread.h".
7993         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7994         a ptid_t.  All callers adjusted.
7995         (gdbpy_current_recording): Use inferior_thread.
7996         * python/py-record.h (recpy_record_object) <ptid>: Delete
7997         field, replaced with ...
7998         <thread>: ... this new field.  All users adjusted.
7999         (recpy_element_object) <ptid>: Delete
8000         field, replaced with ...
8001         <thread>: ... this new field.  All users adjusted.
8002         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
8003         a ptid_t.  All callers adjusted.
8004         * python/py-threadevent.c: Include "gdbthread.h".
8005         (get_event_thread): Use thread_to_thread_object.
8006         * python/python-internal.h (struct inferior_object): Forward
8007         declare.
8008         (find_thread_object, find_inferior_object): Delete declarations.
8009         (thread_to_thread_object, inferior_to_inferior_object): New
8010         declarations.
8011         * record-btrace.c: Include "inferior.h".
8012         (require_btrace_thread): Use inferior_thread.
8013         (record_btrace_frame_sniffer)
8014         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
8015         (get_thread_current_frame): Use scoped_restore_current_thread and
8016         switch_to_thread.
8017         (get_thread_current_frame): Use thread pointer directly.
8018         (record_btrace_replay_at_breakpoint): Use thread's inferior
8019         pointer directly.
8020         * record-full.c: Include "inferior.h".
8021         * regcache.c: Include "gdbthread.h".
8022         (get_thread_arch_regcache): Use the inferior's address space
8023         directly.
8024         (get_thread_regcache, registers_changed_thread): New.
8025         * regcache.h (get_thread_regcache(thread_info *thread)): New
8026         overload.
8027         (registers_changed_thread): New.
8028         (remote_target) <remote_detach_1>: Swap order of parameters.
8029         (remote_add_thread): <remote_add_thread>: Return the new thread.
8030         (get_remote_thread_info(ptid_t)): New overload.
8031         (remote_target::remote_notice_new_inferior): Use thread pointers
8032         directly.
8033         (remote_target::process_initial_stop_replies): Use
8034         thread_info::set_running.
8035         (remote_target::remote_detach_1, remote_target::detach)
8036         (extended_remote_target::detach): Adjust.
8037         * stack.c (frame_show_address): Use inferior_thread.
8038         * target-debug.h (target_debug_print_thread_info_pp): New.
8039         * target-delegates.c: Regenerate.
8040         * target.c (default_thread_address_space): Delete.
8041         (memory_xfer_partial_1): Use current_inferior.
8042         (target_detach): Use current_inferior.
8043         (target_thread_address_space): Delete.
8044         (generic_mourn_inferior): Use current_inferior.
8045         * target.h (struct target_ops) <thread_address_space>: Delete.
8046         (target_thread_address_space): Delete.
8047         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
8048         pointers directly.
8049         (delete_thread_1, delete_thread, delete_thread_silent): Take a
8050         thread pointer instead of a ptid_t.  Adjust all callers.
8051         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8052         (first_thread_of_process): Delete, replaced by ...
8053         (first_thread_of_inferior): ... this new function.  All callers
8054         adjusted.
8055         (any_thread_of_process): Rename to ...
8056         (any_thread_of_inferior): ... this, and take an inferior pointer.
8057         (any_live_thread_of_process): Rename to ...
8058         (any_live_thread_of_inferior): ... this, and take an inferior
8059         pointer.
8060         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8061         (value_in_thread_stack_temporaries)
8062         (get_last_thread_stack_temporary): Take a thread pointer instead
8063         of a ptid_t.  Adjust all callers.
8064         (thread_info::set_running): New.
8065         (validate_registers_access): Use inferior_thread.
8066         (can_access_registers_ptid): Rename to ...
8067         (can_access_registers_thread): ... this, and take a thread
8068         pointer.
8069         (print_thread_info_1): Adjust to compare thread pointers instead
8070         of ptids.
8071         (switch_to_no_thread, switch_to_thread): Make extern.
8072         (scoped_restore_current_thread::~scoped_restore_current_thread):
8073         Use m_thread pointer directly.
8074         (scoped_restore_current_thread::scoped_restore_current_thread):
8075         Use inferior_thread.
8076         (thread_command): Use thread pointer directly.
8077         (thread_num_make_value_helper): Use inferior_thread.
8078         * top.c (execute_command): Use inferior_thread.
8079         * tui/tui-interp.c: Include "inferior.h".
8080         * varobj.c (varobj_create): Use inferior_thread.
8081         (value_of_root_1): Use find_thread_global_id instead of
8082         global_thread_id_to_ptid.
8083
8084 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
8085
8086         * regcache.c (readable_regcache::read_part): Avoid memcpy when
8087         possible.
8088         (regcache::write_part): Likewise.
8089         (readable_regcache::cooked_read_part): Update comment.
8090         (readable_regcache::cooked_write_part): Likewise.
8091         * regcache.h: (readable_regcache::read_part): Likewise.
8092         (regcache::write_part): Likewise.
8093
8094 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
8095             Dirk Schubert  <dirk.schubert@arm.com>
8096
8097         * aarch64-linux-nat.c (post_attach): New.
8098         (aarch64_linux_nat_target::post_attach): Override post_attach to
8099         record the number of hardware debug registers.
8100
8101 2018-06-20  Tom Tromey  <tom@tromey.com>
8102
8103         * python/py-param.c (add_setshow_generic): Make parameters const.
8104         (parmpy_init): Update.
8105
8106 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8107
8108         * regcache.h (regcache_cooked_read_ftype): Rename to...
8109         (register_read_ftype): ...this, change type to function_view.
8110         (class reg_buffer) <save>: Remove src parameter.
8111         (readonly_detached_regcache) <readonly_detached_regcache>: Make
8112         parameter non-const in first overload.  Remove src parameter in
8113         second overload.
8114         * regcache.c (do_cooked_read): Remove.
8115         (readonly_detached_regcache::readonly_detached_regcache): Make
8116         parameter non-const, adjust call to other constructor.
8117         (reg_buffer::save): Remove src parameter.
8118         * frame.c (do_frame_register_read): Remove.
8119         (frame_save_as_regcache): Use lambda function.
8120         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8121         parameter to ppu2spu_data *.
8122         (ppu2spu_sniffer): Use lambda function.
8123
8124 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8125
8126         * record-full.c (record_full_target::insert_breakpoint): Remove
8127         "struct" keyword, add const.
8128
8129 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
8130
8131         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8132         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8133         * configure.ac: Remove AC_PREREQ, add missing quoting.
8134         * gnulib/configure.ac: Modernize usage of
8135         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
8136         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8137         (AUTOMAKE_VERSION): Bump to 1.15.1.
8138         * configure: Re-generate.
8139         * config.in: Re-generate.
8140         * aclocal.m4: Re-generate.
8141         * gnulib/aclocal.m4: Re-generate.
8142         * gnulib/config.in: Re-generate.
8143         * gnulib/configure: Re-generate.
8144         * gnulib/import/Makefile.in: Re-generate.
8145
8146 2018-06-19  Pedro Alves  <palves@redhat.com>
8147
8148         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8149         (lookup_minimal_symbol_by_pc_section): ... here with
8150         gdb_assert_not_reached added.
8151
8152 2018-06-19  Pedro Alves  <palves@redhat.com>
8153
8154         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8155         parameter with a block parameter.  Compare location's block symbol
8156         with the frame's block instead of addresses.
8157         (skip_inline_frames): Pass the current block instead of the
8158         frame's address.  Break out as soon as we determine the frame
8159         should not be skipped.
8160
8161 2018-06-18  Tom Tromey  <tom@tromey.com>
8162
8163         * solib-aix.c (solib_aix_get_section_offsets): Return
8164         unique_xmalloc_ptr.
8165         (solib_aix_solib_create_inferior_hook): Update.
8166
8167 2018-06-18  Tom Tromey  <tom@tromey.com>
8168
8169         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8170
8171 2018-06-18  Tom Tromey  <tom@tromey.com>
8172
8173         * solib-frv.c (frv_relocate_main_executable): Use
8174         unique_xmalloc_ptr.
8175         * solib-dsbt.c (dsbt_relocate_main_executable): Use
8176         unique_xmalloc_ptr.
8177
8178 2018-06-18  Tom Tromey  <tom@tromey.com>
8179
8180         * objfiles.h (inhibit_section_map_updates): Update.
8181         (resume_section_map_updates, resume_section_map_updates_cleanup):
8182         Remove.
8183         * solib-svr4.c (svr4_handle_solib_event): Update.
8184         * objfiles.c (inhibit_section_map_updates): Return
8185         scoped_restore_tmpl<int>.
8186         (resume_section_map_updates, resume_section_map_updates_cleanup):
8187         Remove.
8188
8189 2018-06-18  Tom Tromey  <tom@tromey.com>
8190
8191         * valprint.h (read_string): Update.
8192         * valprint.c (read_string): Change type of "buffer".
8193         (val_print_string): Update.
8194         * python/py-value.c (valpy_string): Update.
8195         * language.h (struct language_defn) <la_get_string>: Change
8196         type of "buffer".
8197         (default_get_string, c_get_string): Update.
8198         * language.c (default_get_string): Change type of "buffer".
8199         * guile/scm-value.c (gdbscm_value_to_string): Update.
8200         * c-lang.c (c_get_string): Change type of "buffer".
8201
8202 2018-06-18  Tom Tromey  <tom@tromey.com>
8203
8204         * ser-mingw.c (struct pipe_state_destroyer): New.
8205         (pipe_state_up): New typedef.
8206         (cleanup_pipe_state): Remove.
8207         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
8208
8209 2018-06-18  Tom Tromey  <tom@tromey.com>
8210
8211         * rust-lang.h (rust_yyerror): Don't declare.
8212         * rust-lang.c (rust_language_defn): Update.
8213         * rust-exp.y (yyerror): Now static.
8214         * parse.c (parse_exp_in_context_1): Update.
8215         * p-lang.h (p_yyerror): Don't declare.
8216         * p-lang.c (p_language_defn): Update.
8217         * p-exp.y (yyerror): Now static.
8218         * opencl-lang.c (opencl_language_defn): Update.
8219         * objc-lang.c (objc_language_defn): Update.
8220         * m2-lang.h (m2_yyerror): Don't declare.
8221         * m2-lang.c (m2_language_defn): Update.
8222         * m2-exp.y (yyerror): Now static.
8223         * language.h (struct language_defn) <la_error>: Remove.
8224         * language.c (unk_lang_error): Remove.
8225         (unknown_language_defn, auto_language_defn): Remove.
8226         * go-lang.h (go_yyerror): Don't declare.
8227         * go-lang.c (go_language_defn): Update.
8228         * go-exp.y (yyerror): Now static.
8229         * f-lang.h (f_yyerror): Don't declare.
8230         * f-lang.c (f_language_defn): Update.
8231         * f-exp.y (yyerror): Now static.
8232         * d-lang.h (d_yyerror): Don't declare.
8233         * d-lang.c (d_language_defn): Update.
8234         * d-exp.y (yyerror): Now static.
8235         * c-lang.h (c_yyerror): Don't declare.
8236         * c-lang.c (c_language_defn, cplus_language_defn)
8237         (asm_language_defn, minimal_language_defn): Update.
8238         * c-exp.y (yyerror): Now static.
8239         * ada-lang.h (ada_yyerror): Don't declare.
8240         * ada-lang.c (ada_language_defn): Update.
8241         * ada-exp.y (yyerror): Now static.
8242
8243 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8244
8245         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8246         (store_sveregs_to_thread): Likewise.
8247         (aarch64_linux_fetch_inferior_registers): Check for SVE.
8248         (aarch64_linux_store_inferior_registers): Likewise.
8249         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8250         function.
8251         (aarch64_sve_regs_copy_to_regcache): Likewise.
8252         (aarch64_sve_regs_copy_from_regcache): Likewise.
8253         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8254         declaration.
8255         (aarch64_sve_regs_copy_to_regcache): Likewise.
8256         (aarch64_sve_regs_copy_from_regcache): Likewise.
8257         (sve_context): Structure from Linux headers.
8258         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8259         (SVE_SIG_ZREG_SIZE): Likewise.
8260         (SVE_SIG_PREG_SIZE): Likewise.
8261         (SVE_SIG_FFR_SIZE): Likewise.
8262         (SVE_SIG_REGS_OFFSET): Likewise.
8263         (SVE_SIG_ZREGS_OFFSET): Likewise.
8264         (SVE_SIG_ZREG_OFFSET): Likewise.
8265         (SVE_SIG_ZREGS_SIZE): Likewise.
8266         (SVE_SIG_PREGS_OFFSET): Likewise.
8267         (SVE_SIG_PREG_OFFSET): Likewise.
8268         (SVE_SIG_PREGS_SIZE): Likewise.
8269         (SVE_SIG_FFR_OFFSET): Likewise.
8270         (SVE_SIG_REGS_SIZE): Likewise.
8271         (SVE_SIG_CONTEXT_SIZE): Likewise.
8272         (SVE_PT_REGS_MASK): Likewise.
8273         (SVE_PT_REGS_FPSIMD): Likewise.
8274         (SVE_PT_REGS_SVE): Likewise.
8275         (SVE_PT_VL_INHERIT): Likewise.
8276         (SVE_PT_VL_ONEXEC): Likewise.
8277         (SVE_PT_REGS_OFFSET): Likewise.
8278         (SVE_PT_FPSIMD_OFFSET): Likewise.
8279         (SVE_PT_FPSIMD_SIZE): Likewise.
8280         (SVE_PT_SVE_ZREG_SIZE): Likewise.
8281         (SVE_PT_SVE_PREG_SIZE): Likewise.
8282         (SVE_PT_SVE_FFR_SIZE): Likewise.
8283         (SVE_PT_SVE_FPSR_SIZE): Likewise.
8284         (SVE_PT_SVE_FPCR_SIZE): Likewise.
8285         (__SVE_SIG_TO_PT): Likewise.
8286         (SVE_PT_SVE_OFFSET): Likewise.
8287         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8288         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8289         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8290         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8291         (SVE_PT_SVE_PREG_OFFSET): Likewise.
8292         (SVE_PT_SVE_PREGS_SIZE): Likewise.
8293         (SVE_PT_SVE_FFR_OFFSET): Likewise.
8294         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8295         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8296         (SVE_PT_SVE_SIZE): Likewise.
8297         (SVE_PT_SIZE): Likewise.
8298         (HAS_SVE_STATE): New define.
8299
8300 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8301
8302         * nat/aarch64-sve-linux-sigcontext.h: New file.
8303         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8304         new files.
8305         (SVE_VQ_MIN): Likewise.
8306         (SVE_VQ_MAX): Likewise.
8307         (SVE_VL_MIN): Likewise.
8308         (SVE_VL_MAX): Likewise.
8309         (SVE_NUM_ZREGS): Likewise.
8310         (SVE_NUM_PREGS): Likewise.
8311         (sve_vl_valid): Likewise.
8312         (struct user_sve_header): Likewise.
8313
8314 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
8315             Richard Bunt <Richard.Bunt@arm.com>
8316
8317         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8318         was requested by GDB.
8319
8320 2018-06-15  Tom de Vries  <tdevries@suse.de>
8321
8322         * MAINTAINERS (Write After Approval): Add Tom de Vries.
8323
8324 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
8325
8326         * gnulib/update-gnulib.sh: Print expected versions of
8327         autoconf/aclocal.
8328
8329 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
8330
8331         * arch-utils.c (default_type_align): Use type_length_units.
8332         * gdbtypes.c (type_align): Use type_length_units.
8333
8334 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8335
8336         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8337         of 'define' command.
8338
8339 2018-06-14  Tom de Vries  <tdevries@suse.de>
8340
8341         PR cli/22573
8342         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8343         get_no_prettyformat_print_options.
8344
8345 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8346
8347         * sparc-nat.h: Include target.h.
8348         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8349         <fetch_registers>: Remove this argument in function call.
8350         <store_registers>: Remove this argument in function call, remove
8351         extra semicolon.
8352         <low_forget_process>: Call sparc64_forget_process instead of
8353         sparc_forget_process.
8354
8355 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8356
8357         * procfs.c (_initialize_procfs): Use add_inf_child_target.
8358         (procfs_target::make_corefile_notes): Adjust to new
8359         target_read_alloc return type.
8360
8361 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8362             Stephen Roberts  <stephen.roberts@arm.com>
8363
8364         PR gdb/22882
8365         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8366         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8367         Move should_notify_stop local into more inner scope.
8368
8369 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8370             Stephen Roberts  <stephen.roberts@arm.com>
8371
8372         PR gdb/22882
8373         * infrun.c (resume_1): Add call to mark_async_event_handler.
8374
8375 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8376
8377         * infrun.c (do_target_wait): Change old version of $pc printed.
8378
8379 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8380
8381         * dwarf2read.c (read_index_from_section): Rename to...
8382         (read_gdb_index_from_section): ... this, update all callers.
8383         (dwarf2_read_index): Rename to...
8384         (dwarf2_read_gdb_index): ... this, update all callers.
8385
8386 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
8387
8388         * hppa-linux-nat.c
8389         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8390         hppa_linux_nat_target::fetch_registers.
8391
8392 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8393
8394         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8395         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8396         (AARCH64_DWARF_SVE_FFR): Likewise.
8397         (AARCH64_DWARF_SVE_P0): Likewise.
8398         (AARCH64_DWARF_SVE_Z0): Likewise.
8399
8400 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8401
8402         * common/common-regcache.h (raw_compare): New function.
8403         * regcache.c (regcache::raw_compare): Likewise.
8404         * regcache.h (regcache::raw_compare): New declaration.
8405
8406 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8407
8408         * common/common-regcache.h (reg_buffer_common): New structure.
8409         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8410         (reg_buffer::raw_supply): Likewise.
8411         (reg_buffer::raw_supply_integer): Likewise.
8412         (reg_buffer::raw_supply_zeroed): Likewise.
8413         (reg_buffer::raw_collect): Likewise.
8414         (reg_buffer::raw_collect_integer): Likewise.
8415         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8416         (reg_buffer::raw_supply): Likewise.
8417         (reg_buffer::raw_supply_integer): Likewise.
8418         (reg_buffer::raw_supply_zeroed): Likewise.
8419         (reg_buffer::raw_collect): Likewise.
8420         (reg_buffer::raw_collect_integer): Likewise.
8421
8422 2018-06-10  Tom Tromey  <tom@tromey.com>
8423
8424         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8425         (class remote_state) <stop_reply_queue>: Now std::vector.
8426         (remote_state::~remote_state)
8427         (remote_target::stop_reply_queue_length): Update.
8428         (struct queue_iter_param, remove_child_of_pending_fork)
8429         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8430         (check_pending_event_prevents_wildcard_vcont_callback)
8431         (remove_stop_reply_for_inferior)
8432         (remove_stop_reply_of_remote_state)
8433         (remote_notif_remove_once_on_match)
8434         (stop_reply_match_ptid_and_ws)
8435         (remote_kill_child_of_pending_fork): Remove.
8436         (remote_target::remove_new_fork_children)
8437         (remote_target::check_pending_events_prevent_wildcard_vcont)
8438         (remote_target::discard_pending_stop_replies)
8439         (remote_target::discard_pending_stop_replies_in_queue)
8440         (remote_target::remote_notif_remove_queued_reply)
8441         (remote_target::queued_stop_reply)
8442         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8443         (remote_target::wait, remote_target::kill_new_fork_children)
8444         (remote_target::async): Update.
8445
8446 2018-06-10  Tom Tromey  <tom@tromey.com>
8447
8448         * record-full.c (record_full_arch_list_cleanups): Remove.
8449         (record_full_message): Use try/catch.
8450         (record_full_wait_cleanups): Remove.
8451         (record_full_wait_1): Use try/catch.
8452         (record_full_restore): Likewise.
8453
8454 2018-06-10  Tom Tromey  <tom@tromey.com>
8455
8456         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8457         declare VEC.  Add constructor.
8458         <in_target_beneath>: Now bool.
8459         (record_full_breakpoints): Now a std::vector, static.
8460         (record_full_sync_record_breakpoints)
8461         (record_full_init_record_breakpoints)
8462         (record_full_target::insert_breakpoint)
8463         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8464
8465 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8466
8467         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8468         * serial.c (serial_interface_lookup): Remove struct keyword.
8469
8470 2018-06-10  Tom Tromey  <tom@tromey.com>
8471
8472         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8473         method.
8474         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8475         a method.
8476         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8477         method.
8478         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8479         "beneath" as a method.
8480         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8481         Use "beneath" as a method.
8482
8483 2018-06-10  Tom Tromey  <tom@tromey.com>
8484
8485         * tracefile.c (struct trace_file_writer_deleter): New.
8486         <operator()>: Rename from trace_file_writer_xfree.
8487         (trace_file_writer_up): New typedef.
8488         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8489
8490 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8491
8492         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8493         <m_registers, m_register_status>: Change type to
8494         std::unique_ptr.
8495         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8496         XCNEWVEC.
8497
8498 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8499
8500         * common/common-regcache.h (enum register_status): Add
8501         underlying type "signed char".
8502         * regcache.h (reg_buffer) <m_register_status>: Change type to
8503         register_status *.
8504         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8505         register_status instead of signed char.
8506         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8507         (reg_buffer::get_register_status): Remove cast.
8508         (readable_regcache::raw_read): Remove cast.
8509         (readable_regcache::cooked_read): Remove cast.
8510
8511 2018-06-09  Tom Tromey  <tom@tromey.com>
8512
8513         * source.c (reverse_search_command, forward_search_command): Use
8514         scoped_fd.
8515
8516 2018-06-09  Tom Tromey  <tom@tromey.com>
8517
8518         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8519         (serial_ops_list): Now static, std::vector.
8520         (serial_interface_lookup, serial_add_interface): Update.
8521
8522 2018-06-09  Tom Tromey  <tom@tromey.com>
8523
8524         * dwarf2read.c (process_cu_includes): Update.
8525         (process_full_comp_unit): Update.
8526         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8527         std::vector.
8528
8529 2018-06-08  Paul Koning  <paul_koning@dell.com>
8530
8531         PR gdb/23252
8532
8533         * python/python.c (do_start_initialization):
8534         Avoid call to internal Python API.
8535         (init__gdb_module): New function.
8536
8537 2018-06-08  Gary Benson <gbenson@redhat.com>
8538
8539         * linux-thread-db.c (valprint.h): New include.
8540         (struct check_thread_db_info): New structure.
8541         (check_thread_db_on_load, tdb_testinfo): New static globals.
8542         (check_thread_db, check_thread_db_callback): New functions.
8543         (try_thread_db_load_1): Run integrity checks if requested.
8544         (maintenance_check_libthread_db): New function.
8545         (_initialize_thread_db): Register "maint check libthread-db"
8546         and "maint set/show check-libthread-db".
8547         * NEWS: Mention the above new commands.
8548
8549 2018-06-08  Tom Tromey  <tom@tromey.com>
8550
8551         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8552         now a method.
8553
8554 2018-06-08  Tom Tromey  <tom@tromey.com>
8555
8556         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8557
8558 2018-06-08  Tom Tromey  <tom@tromey.com>
8559
8560         * common/btrace-common.h (struct btrace_data): Add constructor,
8561         destructor, move assignment operator.
8562         <empty, clear, fini>: New methods.
8563         <format>: Initialize.
8564         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8565         (btrace_data_empty): Don't declare.
8566         * common/btrace-common.c (btrace_data_init): Remove.
8567         (btrace_data::fini): Rename from btrace_data_fini.
8568         (btrace_data::empty): Rename from btrace_data_empty.
8569         (btrace_data::clear): Rename from btrace_data_clear.  Return
8570         bool.
8571         * btrace.h (make_cleanup_btrace_data): Don't declare.
8572         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8573         (parse_xml_btrace): Update.
8574         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8575         (maint_btrace_clear_packet_history_cmd): Update.
8576
8577 2018-06-07  Pedro Alves  <palves@redhat.com>
8578
8579         * target.h (target_ops) <beneath>: Now a method.  All references
8580         updated.
8581         (class target_stack): New.
8582         * target.c (g_target_stack): New.
8583         (g_current_top_target): Delete.
8584         (current_top_target): Get the top target out of g_target_stack.
8585         (target_stack::push, target_stack::unpush): New.
8586         (push_target, unpush_target): Reimplement.
8587         (target_is_pushed): Reimplement in terms of g_target_stack.
8588         (target_ops::beneath, target_stack::find_beneath): New.
8589
8590 2018-06-07  Pedro Alves  <palves@redhat.com>
8591
8592         * target.h (find_target_beneath): Delete declaration.
8593         * target.c (find_target_beneath): Delete definition.
8594         * aix-thread.c: All callers of find_target_beneath adjusted to
8595         call target_ops::beneath instead.
8596         * bsd-uthread.c: Likewise.
8597         * linux-thread-db.c: Likewise.
8598         * ravenscar-thread.c: Likewise.
8599         * sol-thread.c: Likewise.
8600         * spu-multiarch.c: Likewise.
8601
8602 2018-06-07  Pedro Alves  <palves@redhat.com>
8603
8604         * target.h (target_ops) <beneath>: Now a method.  All references
8605         updated.
8606         (target_ops) <m_beneath>: New.
8607         * target.c (target_ops::beneath): New.
8608         * corelow.c: Adjust all references to target_ops::beneath.
8609         * linux-thread-db.c: Likewise.
8610         * make-target-delegates: Likewise.
8611         * record-btrace.c: Likewise.
8612         * record-full.c: Likewise.
8613         * remote.c: Likewise.
8614         * target.c: Likewise.
8615         * target-delegates.c: Regenerate.
8616
8617 2018-06-07  Pedro Alves  <palves@redhat.com>
8618
8619         * target.h (target_stack): Delete.
8620         (current_top_target): Declare function.
8621         * target.c (target_stack): Delete.
8622         (g_current_top_target): New.
8623         (current_top_target): New function.
8624         * auxv.c: Use current_top_target instead of target_stack
8625         throughout.
8626         * avr-tdep.c: Likewise.
8627         * breakpoint.c: Likewise.
8628         * corefile.c: Likewise.
8629         * elfread.c: Likewise.
8630         * eval.c: Likewise.
8631         * exceptions.c: Likewise.
8632         * frame.c: Likewise.
8633         * gdbarch-selftests.c: Likewise.
8634         * gnu-v3-abi.c: Likewise.
8635         * ia64-tdep.c: Likewise.
8636         * ia64-vms-tdep.c: Likewise.
8637         * infcall.c: Likewise.
8638         * infcmd.c: Likewise.
8639         * infrun.c: Likewise.
8640         * linespec.c: Likewise.
8641         * linux-tdep.c: Likewise.
8642         * minsyms.c: Likewise.
8643         * ppc-linux-nat.c: Likewise.
8644         * ppc-linux-tdep.c: Likewise.
8645         * procfs.c: Likewise.
8646         * regcache.c: Likewise.
8647         * remote.c: Likewise.
8648         * rs6000-tdep.c: Likewise.
8649         * s390-linux-nat.c: Likewise.
8650         * s390-tdep.c: Likewise.
8651         * solib-aix.c: Likewise.
8652         * solib-darwin.c: Likewise.
8653         * solib-dsbt.c: Likewise.
8654         * solib-spu.c: Likewise.
8655         * solib-svr4.c: Likewise.
8656         * solib-target.c: Likewise.
8657         * sparc-tdep.c: Likewise.
8658         * sparc64-tdep.c: Likewise.
8659         * spu-tdep.c: Likewise.
8660         * symfile.c: Likewise.
8661         * symtab.c: Likewise.
8662         * target-descriptions.c: Likewise.
8663         * target-memory.c: Likewise.
8664         * target.c: Likewise.
8665         * target.h: Likewise.
8666         * tracefile-tfile.c: Likewise.
8667         * tracepoint.c: Likewise.
8668         * valops.c: Likewise.
8669         * valprint.c: Likewise.
8670         * value.c: Likewise.
8671         * windows-tdep.c: Likewise.
8672         * mi/mi-main.c: Likewise.
8673
8674 2018-06-07  Tom Tromey  <tom@tromey.com>
8675
8676         * valprint.h (build_address_symbolic): Declare.
8677         * printcmd.c (print_address_symbolic): Update.
8678         (build_address_symbolic): Change "name" and "filename" to
8679         std::string.
8680         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8681         Update.
8682         * defs.h (build_address_symbolic): Remove declaration.
8683
8684 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8685
8686         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8687         (aarch64_vnv_type): Add function.
8688         (aarch64_pseudo_register_name): Add V regs for SVE.
8689         (aarch64_pseudo_register_type): Likewise.
8690         (aarch64_pseudo_register_reggroup_p): Likewise.
8691         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8692         (aarch64_pseudo_read_value): Add V regs for SVE.
8693         (aarch64_pseudo_write_2): Use V0 offset for SVE
8694         (aarch64_pseudo_write): Add V regs for SVE.
8695         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8696
8697 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8698
8699         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8700         (sve_vl_from_vq): Likewise.
8701
8702 2018-06-05  Tom Tromey  <tom@tromey.com>
8703
8704         * cli/cli-cmds.c (show_version): Update.
8705         * top.c (print_gdb_version): Add "interactive" parameter.
8706         Update.
8707         * main.c (captured_main_1): Update.
8708         * top.h (print_gdb_version): Add "interactive" parameter and a
8709         comment.
8710
8711 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8712
8713         * common/enum-flags.h: Add trailing semicolon to example in
8714         comment.
8715
8716 2018-06-05  Tom Tromey  <tom@tromey.com>
8717
8718         PR cli/12326:
8719         * NEWS: Add entry about pager.
8720         * utils.c (pagination_disabled_for_command): New global.
8721         (prompt_for_continue): Allow "c" response to prompt.
8722         (reinitialize_more_filter): Clear
8723         pagination_disabled_for_command.
8724         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8725
8726 2018-06-04  Tom Tromey  <tom@tromey.com>
8727
8728         * ada-lang.h (ada_lookup_symbol_list): Update.
8729         * ada-lang.c (resolve_subexp): Update.
8730         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8731         parameter.
8732         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8733         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8734         results parameter to std::vector.
8735         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8736         Update.
8737         * ada-exp.y (block_lookup): Update.
8738         (select_possible_type_sym): Change type of syms.  Remove nsyms
8739         parameter.
8740         (write_var_or_type, write_name_assoc): Update.
8741
8742 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8743
8744         * windows-nat.c (windows_nat_target::xfer_partial): Return
8745         TARGET_XFER_E_IO if we need to delegate to the target beneath
8746         but BENEATH is NULL.
8747
8748 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8749
8750         * Makefile.in (config.status): Add configure.nat as a
8751         dependency.
8752
8753 2018-06-04  Tom Tromey  <tom@tromey.com>
8754
8755         * cp-name-parser.y (cpname_state): Add method declarations.
8756         (HANDLE_QUAL): Update.
8757         (cpname_state::d_grab, cpname_state::fill_comp)
8758         (cpname_state::make_operator, cpname_state::make_dtor)
8759         (cpname_state::make_builtin_type, cpname_state::make_name)
8760         (cpname_state::d_qualify, cpname_state::d_int_type)
8761         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8762         (%union): Move earlier.
8763
8764 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8765
8766         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8767
8768 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8769
8770         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8771         (aarch64_pseudo_write_1): Likewise.
8772         (aarch64_pseudo_read_value): Use helper.
8773         (aarch64_pseudo_write): Likewise.
8774
8775 2018-06-04  Pedro Alves  <palves@redhat.com>
8776
8777         * darwin-nat.c (darwin_ops): Delete.
8778         (darwin_attach_pid): Use get_native_target.
8779
8780 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8781
8782         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8783         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8784
8785 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8786
8787         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8788         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8789         (aarch64_gdbarch_init): Check for SVE.
8790         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8791
8792 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8793
8794         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8795         * aarch64-tdep.h (aarch64_read_description): Likewise.
8796         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8797         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8798         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8799         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8800         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8801
8802 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8803
8804         * value.c (value_fetch_lazy_bitfield): New.
8805         (value_fetch_lazy_memory): New.
8806         (value_fetch_lazy_register): New.
8807         (value_fetch_lazy): Factor out to smaller functions.
8808
8809 2018-06-01  Tom Tromey  <tom@tromey.com>
8810
8811         * cp-name-parser.y (backslashable, represented): Now const.
8812
8813 2018-06-01  Tom Tromey  <tom@tromey.com>
8814
8815         * cp-name-parser.y: Include parser-defs.h.
8816         (parser_fprintf): Remove declaration.
8817
8818 2018-06-01  Tom Tromey  <tom@tromey.com>
8819
8820         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8821         %parse-param.
8822         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8823         (global_result): Remove globals.
8824         (struct cpname_state): New.
8825         (yyparse): Don't declare.
8826         (yylex, yyerror): Move declarations after %union.
8827         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8828         (make_name): Add state parameter.
8829         Update all callers.
8830         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8831         parameter.
8832         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8833         Update.
8834         (yylex): Add lvalp, state parameters.
8835         (yyerror): Add state parameter.
8836         (cp_demangled_name_to_comp): Update.
8837
8838 2018-06-01  Tom Tromey  <tom@tromey.com>
8839
8840         * cp-name-parser.y (parser_fprintf): Declare.
8841         (GDB_YY_REMAP_PREFIX): Define.
8842         Include yy-remap.h.  Don't redefine yy* identifiers.
8843
8844 2018-06-01  Tom Tromey  <tom@tromey.com>
8845
8846         * python/py-type.c (typy_legacy_template_argument): Update.
8847         * cp-support.h (cp_demangled_name_to_comp): Update.
8848         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8849         parameter to be a "std::string *".
8850         (main): Update.
8851
8852 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8853
8854         * ada-lex.l: Include "diagnostics.h" instead of
8855         "common/diagnostics.h".
8856         * unittests/environ-selftests.c: Likewise.
8857         * common/diagnostics.h: Moved to ../include.
8858
8859 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8860
8861         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8862         to language_mode_manual while calling breakpoint_re_set_one.
8863
8864 2018-06-01  Tom Tromey  <tom@tromey.com>
8865
8866         * valops.c (value_cast_structs, destructor_name_p): Update.
8867         * symtab.c (gdb_mangle_name): Update.
8868         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8869         Update.
8870         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8871         (pascal_object_print_value_fields, pascal_object_print_value):
8872         Update.
8873         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8874         * linespec.c (find_methods): Update.
8875         * gdbtypes.h (type_name_no_tag): Remove.
8876         (type_name_or_error): Rename from type_name_no_tag_or_error.
8877         * gdbtypes.c (type_name_no_tag): Remove.
8878         (type_name_or_error): Rename from type_name_no_tag_or_error.
8879         (lookup_struct_elt_type, check_typedef): Update.
8880         * expprint.c (print_subexp_standard): Update.
8881         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8882         * d-namespace.c (d_lookup_nested_symbol): Update.
8883         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8884         (cp_print_class_member): Update.
8885         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8886         * completer.c (add_struct_fields): Update.
8887         * c-typeprint.c (cp_type_print_derivation_info)
8888         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8889         Update.
8890         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8891         (ada_prefer_type, ada_is_exception_sym): Update.
8892
8893 2018-06-01  Tom Tromey  <tom@tromey.com>
8894
8895         * valops.c (enum_constant_from_type, value_namespace_elt)
8896         (value_maybe_namespace_elt): Update.
8897         * valarith.c (find_size_for_pointer_math): Update.
8898         * target-descriptions.c (make_gdb_type): Update.
8899         * symmisc.c (print_symbol): Update.
8900         * stabsread.c (define_symbol, read_type)
8901         (complain_about_struct_wipeout, add_undefined_type)
8902         (cleanup_undefined_types_1): Update.
8903         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8904         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8905         (rust_internal_print_type, rust_composite_type)
8906         (rust_evaluate_funcall, rust_evaluate_subexp)
8907         (rust_inclusive_range_type_p): Update.
8908         * python/py-type.c (typy_get_tag): Update.
8909         * p-typeprint.c (pascal_type_print_base): Update.
8910         * mdebugread.c (parse_symbol, parse_type): Update.
8911         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8912         Update.
8913         * guile/scm-type.c (gdbscm_type_tag): Update.
8914         * go-lang.c (sixg_string_p): Update.
8915         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8916         Update.
8917         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8918         (TYPE_TAG_NAME): Remove.
8919         * gdbtypes.c (type_name_no_tag): Simplify.
8920         (check_typedef, check_types_equal, recursive_dump_type)
8921         (copy_type_recursive, arch_composite_type): Update.
8922         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8923         in summary mode when needed.
8924         * eval.c (evaluate_funcall): Update.
8925         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8926         (process_structure_scope, read_enumeration_type)
8927         (read_namespace_type, read_module_type, determine_prefix): Update.
8928         * cp-support.c (inspect_type): Update.
8929         * coffread.c (process_coff_symbol, decode_base_type): Update.
8930         * c-varobj.c (c_is_path_expr_parent): Update.
8931         * c-typeprint.c (c_type_print_base_struct_union): Update.
8932         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8933         summary when using C language.
8934         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8935         (gen_maybe_namespace_elt): Update.
8936         * ada-lang.c (ada_type_name): Simplify.
8937         (empty_record, ada_template_to_fixed_record_type_1)
8938         (template_to_static_fixed_type)
8939         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8940
8941 2018-06-01  Tom Tromey  <tom@tromey.com>
8942
8943         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8944         c_print_type.
8945         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8946         (c_print_type): Update.
8947         (c_print_type): New overload.
8948         (c_type_print_varspec_prefix, c_type_print_args)
8949         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8950         (c_type_print_base_struct_union, c_type_print_base_1)
8951         (cp_type_print_method_args): Add "language" parameter.
8952         (c_type_print_base): Update.
8953         * c-lang.h (c_print_type): Add new overload.
8954
8955 2018-06-01  Tom Tromey  <tom@tromey.com>
8956
8957         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8958         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8959
8960 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8961
8962         * aarch64-tdep.c (aarch64_sve_register_names): New const
8963         var.
8964         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8965         (AARCH64_SVE_Z_REGS_NUM): New define.
8966         (AARCH64_SVE_P_REGS_NUM): Likewise.
8967         (AARCH64_SVE_NUM_REGS): Likewise.
8968
8969 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8970
8971         * nat/linux-ptrace.h [__alpha__]
8972         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8973         definitions.
8974
8975 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8976
8977         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8978         the endianness selected.
8979         * NEWS: Document `set endian auto' mode operation update.
8980
8981 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8982
8983         * Makefile.in: Add new header.
8984         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8985         (sve_vl_from_vg): Likewise.
8986         (sve_vq_from_vl): Likewise.
8987         (sve_vl_from_vq): Likewise.
8988         (sve_vq_from_vg): Likewise.
8989         (sve_vg_from_vq): Likewise.
8990         * configure.nat: Add new c file.
8991         * nat/aarch64-sve-linux-ptrace.c: New file.
8992         * nat/aarch64-sve-linux-ptrace.h: New file.
8993
8994 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8995
8996         * aarch64-linux-nat.c (aarch64_linux_read_description):
8997         Add parmeter zero.
8998         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8999         Likewise.
9000         * aarch64-tdep.c (tdesc_aarch64_list): Add.
9001         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
9002         (aarch64_gdbarch_init): Add parmeter zero.
9003         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
9004         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
9005         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
9006         parmeter.
9007         * doc/gdb.texinfo: Describe SVE feature
9008         * features/aarch64-sve.c: New file.
9009
9010 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
9011
9012         PR gdb/23210
9013         * gdbarch.sh (significant_addr_bit): Default to zero when
9014         not set by target architecture.
9015         * gdbarch.c: Re-generated.
9016         * utils.c (address_significant): Update.
9017
9018 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
9019
9020         * stack.c (func_command): Remove trailing newline in call to error.
9021
9022 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9023
9024         * regcache.h (regcache_raw_collect): Remove, update callers to
9025         use regcache::raw_collect.
9026         * regcache.c (regcache_raw_collect): Remove.
9027
9028 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9029
9030         * regcache.h (regcache_raw_supply): Remove, update callers to
9031         use detached_regcache::raw_supply.
9032         * regcache.c (regcache_raw_supply): Remove.
9033
9034 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9035
9036         * regcache.h (regcache_cooked_write_part): Remove, update
9037         callers to use regcache::cooked_write_part.
9038         * regcache.c (regcache_cooked_write_part): Remove.
9039
9040 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9041
9042         * regcache.h (regcache_cooked_read_part): Remove, update callers
9043         to use readable_regcache::cooked_read_part.
9044         * regcache.c (regcache_cooked_read_part): Remove.
9045
9046 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9047
9048         * regcache.h (regcache_cooked_read_value): Remove, update
9049         callers to use readable_regcache::cooked_read_value.
9050         * regcache.c (regcache_cooked_read_value): Remove.
9051
9052 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9053
9054         * regcache.h (regcache_cooked_write): Remove, update callers to
9055         use regcache::cooked_write.
9056         * regcache.c (regcache_cooked_write): Remove.
9057
9058 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9059
9060         * regcache.h (regcache_invalidate): Remove, update callers to
9061         use detached_regcache::invalidate instead.
9062         * regcache.c (regcache_invalidate): Remove.
9063
9064 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9065
9066         * regcache.h (regcache_raw_write_part): Remove, update callers
9067         to use regcache::raw_write_part instead.
9068         * regcache.c (regcache_raw_write_part): Remove.
9069
9070 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9071
9072         * regcache.h (regcache_raw_read_part): Remove, update callers to
9073         use readable_regcache::raw_read_part instead.
9074         * regcache.c (regcache_raw_read_part): Remove.
9075
9076 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9077
9078         * regcache.h (regcache_cooked_read): Remove, update callers to
9079         use readable_regcache::cooked_read instead.
9080         * regcache.c (regcache_cooked_read): Remove.
9081
9082 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9083
9084         * regcache.h (regcache_raw_write): Remove, update callers to use
9085         regcache::raw_write instead.
9086         * regcache.c (regcache_raw_write): Remove.
9087
9088 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9089
9090         * regcache.h (regcache_raw_read): Remove, update callers to use
9091         readable_regcache::raw_read instead.
9092         * regcache.c (regcache_raw_read): Remove.
9093
9094 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9095
9096         * regcache.h (regcache_raw_update): Remove, update callers to
9097         use readable_regcache::raw_update instead.
9098         * regcache.c (regcache_raw_update): Remove.
9099
9100 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9101
9102         * regcache.h (regcache_register_status): Remove, update callers
9103         to use reg_buffer::get_register_status directly instead.
9104         * regcache.c (regcache_register_status): Remove.
9105
9106 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9107
9108         * regcache.h (regcache_get_ptid): Remove, update all callers to
9109         call regcache::ptid instead.
9110         * regcache.c (regcache_get_ptid): Remove.
9111
9112 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9113
9114         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9115
9116 2018-05-30  Pedro Alves  <palves@redhat.com>
9117
9118         * common/common-exceptions.h (exception_rethrow): Use
9119         ATTRIBUTE_NORETURN.
9120
9121 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
9122
9123         * breakpoint.c (print_solib_event, check_status_catch_solib):
9124         Remove struct keyword in range-based for loops.
9125         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9126         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9127         Likewise.
9128         * linespec.c (find_superclass_methods, search_minsyms_for_name):
9129         Likewise.
9130         * symfile.c (addr_info_make_relative): Likewise.
9131         * thread.c (value_in_thread_stack_temporaries): Likewise.
9132
9133 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
9134
9135         PR gdb/16841
9136         * valops.c (value_struct_elt_for_reference): Call check_typedef on
9137         aggregate type to get its real type before accessing it.
9138
9139 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
9140
9141         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9142         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9143         * coff-pe-read.c (add_pe_forwarded_sym): Replace
9144         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9145         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9146         * jit.c (jit_breakpoint_re_set_internal): Likewise.
9147         * printcmd.c (info_address_command): Likewise.
9148
9149 2018-05-29  Tom Tromey  <tom@tromey.com>
9150
9151         * windows-nat.c (handle_exception): Update fall-through comment.
9152
9153 2018-05-29  Tom Tromey  <tom@tromey.com>
9154
9155         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
9156         (struct program_space) <added_solibs>: Now a std::vector.
9157         * breakpoint.c (print_solib_event): Update.
9158         (check_status_catch_solib): Update.
9159         * progspace.c (clear_program_space_solib_cache): Update.
9160         * solib.c (update_solib_list): Update.
9161
9162 2018-05-29  Tom Tromey  <tom@tromey.com>
9163
9164         * python/py-type.c (typy_richcompare): Update.
9165         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9166         * gdbtypes.h (types_deeply_equal): Return bool.
9167         (types_equal): Likewise.
9168         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
9169         declare VEC.
9170         (check_types_equal): Change worklist to std::vector.  Return
9171         bool.
9172         (struct type_equality_entry): Add constructor.
9173         (compare_maybe_null_strings): Return bool.
9174         (check_types_worklist): Return bool.  Change worklist to
9175         std::vector.
9176         (types_deeply_equal): Use std::vector.
9177         (types_equal): Return bool.
9178         (compare_maybe_null_strings): Simplify.
9179
9180 2018-05-29  Tom Tromey  <tom@tromey.com>
9181
9182         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
9183
9184 2018-05-29  Tom Tromey  <tom@tromey.com>
9185
9186         * objc-lang.h: Don't include cp-support.h.
9187         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
9188         declare VEC.
9189
9190 2018-05-27  Tom Tromey  <tom@tromey.com>
9191
9192         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9193
9194 2018-05-25  Tom Tromey  <tom@tromey.com>
9195
9196         * value.c (value::location): Initialize.
9197
9198 2018-05-25  Tom Tromey  <tom@tromey.com>
9199
9200         * dbxread.c (init_bincl_list): Remove.
9201         (bincl_list): Now a std::vector.
9202         (bincls_allocated, next_bincl): Remove.
9203         (free_bincl_list, do_free_bincl_list_cleanup)
9204         (make_cleanup_free_bincl_list): Remove.
9205         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9206         unique_xmalloc_ptr.
9207         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9208         (struct header_file_location): Add constructor.
9209         (add_bincl_to_list): Remove.
9210
9211 2018-05-25  Tom Tromey  <tom@tromey.com>
9212
9213         * tui/tui.c (tui_enable): Update.
9214         * mi/mi-interp.c (mi_interp::init): Update.
9215         * interps.h (class interp) <name>: New method.
9216         <m_name>: Rename from name.
9217         (~scoped_restore_interp): Update.
9218         * interps.c (interp::interp): Update.
9219         (interp_add, interp_set, interp_lookup_existing)
9220         (current_interp_named_p): Update.
9221
9222 2018-05-25  Tom Tromey  <tom@tromey.com>
9223
9224         * interps.c (interp_name): Remove.
9225         * mi/mi-interp.c (mi_interp::init): Update.
9226         * interps.h (interp_name): Remove.
9227         (~scoped_restore_interp): Update.
9228         * tui/tui.c (tui_enable): Update.
9229
9230 2018-05-25  Tom Tromey  <tom@tromey.com>
9231
9232         * utils.c (fputs_maybe_filtered): Update.
9233         * linespec.c (decode_line_full): Update.
9234         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9235         (mi_print_breakpoint_for_event, mi_solib_loaded)
9236         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9237         (mi_user_selected_context_changed): Update.
9238         * mi/mi-main.c (mi_execute_command): Update.
9239         * cli/cli-script.c (execute_control_command): Update.
9240         * python/python.c (execute_gdb_command): Update.
9241         * solib.c (info_sharedlibrary_command): Update.
9242         * interps.c (interp_ui_out): Remove.
9243         * interps.h (interp_ui_out): Remove.
9244
9245 2018-05-25  Tom Tromey  <tom@tromey.com>
9246
9247         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9248         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9249         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9250
9251 2018-05-25  Tom Tromey  <tom@tromey.com>
9252
9253         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9254         * interps.c (interp_exec): Use scoped_restore.
9255
9256 2018-05-25  Tom Tromey  <tom@tromey.com>
9257
9258         * remote.c (remote_target::remote_file_get): Use
9259         gdb::byte_vector.
9260         (remote_target::remote_file_put): Likewise.
9261
9262 2018-05-25  Tom Tromey  <tom@tromey.com>
9263
9264         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9265         a std::string.
9266         (get_pe_section_index, add_pe_exported_sym): Update.
9267         (read_pe_exported_syms): Use gdb::def_vector.
9268
9269 2018-05-25  Tom Tromey  <tom@tromey.com>
9270
9271         * frame.c (remove_prev_frame): Remove.
9272         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9273
9274 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
9275
9276         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9277         Remove prototypes.
9278         * mips-linux-nat.c (supply_fpregset): Always call
9279         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9280         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9281         `mips_fill_fpregset'.
9282         * mips-linux-tdep.c (mips_supply_fpregset)
9283         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9284         (mips_fill_fpregset_wrapper): Remove functions.
9285         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9286         (mips_linux_fpregset): Remove variable.
9287         (mips_linux_iterate_over_regset_sections): Use
9288         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9289         (mips_linux_o32_sigframe_init): Remove comment.
9290
9291 2018-05-25  Pedro Alves  <palves@redhat.com>
9292
9293         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9294         (struct readahead_cache, struct packet_reg, struct
9295         remote_arch_state, class remote_state): Move higher up in the
9296         file.
9297         (remote_target::m_remote_state): Now an object instead of a pointer.
9298         (remote_target::get_remote_state): Adjust.
9299
9300 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9301
9302         * stack.c (select_and_print_frame): Delete.
9303         (struct function_bounds): Move struct within function.
9304         (func_command): Most content moved into new function
9305         find_frame_for_function, use new function, print result, add
9306         function comment.
9307         (find_frame_for_function): New function, now returns a result.
9308
9309 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9310
9311         * stack.c (iterate_over_block_arg_vars): Fix comment.
9312         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9313
9314 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9315
9316         PR gdb/23203
9317         * frame.c
9318         (scoped_restore_selected_frame::scoped_restore_selected_frame):
9319         Define.
9320         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9321         Define.
9322         * frame.h (class scoped_restore_selected_frame): New class.
9323         * stack.c (print_frame_local_vars): Remove catching and rethrowing
9324         of any exception, use scoped_restore_selected_frame to restore the
9325         frame instead.
9326
9327 2018-05-24  Pedro Alves  <palves@redhat.com>
9328
9329         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9330         override.
9331
9332 2018-05-23  Tom Tromey  <tom@tromey.com>
9333
9334         * complaints.c (struct complaints): Remove.
9335         (symfile_complaint_book): Remove.
9336         (series): New global.
9337         (complaint_internal): Update.
9338         (clear_complaints): Update.
9339
9340 2018-05-23  Tom Tromey  <tom@tromey.com>
9341
9342         * complaints.c (counters): New global.
9343         (struct complain): Remove.
9344         (struct complaints) <root>: Remove.
9345         (complaint_sentinel): Remove.
9346         (symfile_complaint_book): Update.
9347         (find_complaint) Remove.
9348         (complaint_internal, clear_complaints): Update.
9349
9350 2018-05-23  Tom Tromey  <tom@tromey.com>
9351
9352         * complaints.c (struct complain) <file, line>: Remove.
9353         (find_complaint): Remove file, line parameters.
9354         (complaint_internal): Update.
9355
9356 2018-05-23  Tom Tromey  <tom@tromey.com>
9357
9358         * complaints.c (vcomplaint): Remove.
9359         (complaint_internal) Merge in contents of vcomplaint.
9360
9361 2018-05-23  Tom Tromey  <tom@tromey.com>
9362
9363         * complaints.c (struct complaints) <explanation>: Remove.
9364         (symfile_explanations): Remove.
9365         (symfile_complaint_book): Update.
9366         (vcomplaint): Update.
9367         (struct explanation): Remove.
9368
9369 2018-05-23  Tom Tromey  <tom@tromey.com>
9370
9371         * complaints.c (symfile_complaints): Remove.
9372         (complaint_internal): Remove "complaints" parameter.
9373         (clear_complaints, vcomplaint): Remove "c" parameter.
9374         (get_complaints): Remove.
9375         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9376         (dwarf2_debug_line_missing_file_complaint)
9377         (dwarf2_debug_line_missing_end_sequence_complaint)
9378         (dwarf2_complex_location_expr_complaint)
9379         (dwarf2_const_value_length_mismatch_complaint)
9380         (dwarf2_section_buffer_overflow_complaint)
9381         (dwarf2_macro_malformed_definition_complaint)
9382         (dwarf2_invalid_attrib_class_complaint)
9383         (create_addrmap_from_index, dw2_symtab_iter_next)
9384         (dw2_expand_marked_cus)
9385         (dw2_debug_names_iterator::find_vec_in_debug_names)
9386         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9387         (create_debug_type_hash_table, init_cutu_and_read_dies)
9388         (partial_die_parent_scope, add_partial_enumeration)
9389         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9390         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9391         (read_import_statement, read_file_scope, create_dwo_cu_reader)
9392         (create_cus_hash_table, create_dwp_hash_table)
9393         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9394         (dwarf2_rnglists_process, dwarf2_ranges_process)
9395         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9396         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9397         (handle_struct_member_die, process_structure_scope)
9398         (read_array_type, read_common_block, read_module_type)
9399         (read_tag_pointer_type, read_typedef, read_base_type)
9400         (read_subrange_type, load_partial_dies, partial_die_info::read)
9401         (partial_die_info::read, partial_die_info::read)
9402         (partial_die_info::read, read_checked_initial_length_and_offset)
9403         (dwarf2_string_attr, read_formatted_entries)
9404         (dwarf_decode_line_header)
9405         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9406         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9407         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9408         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9409         (get_signatured_type, get_DW_AT_signature_type)
9410         (decode_locdesc, file_file_name, consume_improper_spaces)
9411         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9412         (dwarf_decode_macro_bytes, dwarf_decode_macros)
9413         (dwarf2_symbol_mark_computed, set_die_type)
9414         (read_attribute_value): Update.
9415         * stap-probe.c (handle_stap_probe, get_stap_base_address):
9416         Update.
9417         * dbxread.c (unknown_symtype_complaint)
9418         (lbrac_mismatch_complaint, repeated_header_complaint)
9419         (set_namestring, function_outside_compilation_unit_complaint)
9420         (read_dbx_symtab, process_one_symbol): Update.
9421         * gdbtypes.c (stub_noname_complaint): Update.
9422         * windows-nat.c (handle_unload_dll): Update.
9423         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9424         (decode_base_type): Update.
9425         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9426         (eb_complaint, record_include_begin, record_include_end)
9427         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9428         (process_xcoff_symbol, read_symbol)
9429         (function_outside_compilation_unit_complaint)
9430         (scan_xcoff_symtab): Update.
9431         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9432         * buildsym.c (finish_block_internal, make_blockvector)
9433         (end_symtab_get_static_block, augment_type_symtab): Update.
9434         * dtrace-probe.c (dtrace_process_dof)
9435         (dtrace_static_probe_ops::get_probes): Update.
9436         * complaints.h (struct complaint): Don't declare.
9437         (symfile_complaints): Remove.
9438         (complaint_internal): Remove "complaints" parameter.
9439         (complaint): Likewise.
9440         (clear_complaints): Likewise.
9441         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9442         (reread_symbols): Update.
9443         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9444         (dwarf2_frame_cache, decode_frame_entry): Update.
9445         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9446         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9447         (info_selectors_command): Update.
9448         * macrotab.c (macro_include, check_for_redefinition)
9449         (macro_undef): Update.
9450         * objfiles.c (filter_overlapping_sections): Update.
9451         * stabsread.c (invalid_cpp_abbrev_complaint)
9452         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9453         (define_symbol, error_type, read_type, rs6000_builtin_type)
9454         (stabs_method_name_from_physname, read_member_functions)
9455         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9456         (attach_fields_to_type, complain_about_struct_wipeout)
9457         (read_range_type, read_args, common_block_start)
9458         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9459         Update.
9460         * mdebugread.c (index_complaint, unknown_ext_complaint)
9461         (basic_type_complaint, bad_tag_guess_complaint)
9462         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9463         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9464         (parse_procedure, parse_lines)
9465         (function_outside_compilation_unit_complaint)
9466         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9467         (bad_tag_guess_complaint, reg_value_complaint): Update.
9468         * cp-support.c (demangled_name_complaint): Update.
9469         * macroscope.c (sal_macro_scope): Update.
9470         * dwarf-index-write.c (class debug_names): Update.
9471
9472 2018-05-23  Tom Tromey  <tom@tromey.com>
9473
9474         * complaints.c (clear_complaints): Remove "noisy" parameter.
9475         * complaints.h (clear_complaints): Update.
9476         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9477         (reread_symbols): Update.
9478
9479 2018-05-23  Tom Tromey  <tom@tromey.com>
9480
9481         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9482         SUBSEQUENT_MESSAGE.
9483         (vcomplaint, clear_complaints): Update.
9484         (symfile_explanations): Remove some messages.
9485
9486 2018-05-23  Tom Tromey  <tom@tromey.com>
9487
9488         * complaints.c (internal_complaint): Remove.
9489         * complaints.h (internal_complaint): Remove.
9490
9491 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9492
9493         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9494
9495 2018-05-22  Pedro Alves  <palves@redhat.com>
9496
9497         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9498         (remote_fileio_badfd, remote_fileio_return_errno)
9499         (remote_fileio_return_success, remote_fileio_func_open)
9500         (remote_fileio_func_open, remote_fileio_func_close)
9501         (remote_fileio_func_read, remote_fileio_func_write)
9502         (remote_fileio_func_lseek, remote_fileio_func_rename)
9503         (remote_fileio_func_unlink, remote_fileio_func_stat)
9504         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9505         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9506         remote_target parameter.
9507         (remote_fio_func_map) <func>: Add remote_target parameter.
9508         (do_remote_fileio_request, remote_fileio_request):
9509         * remote-fileio.h (remote_fileio_request):
9510         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9511         remote_target parameter.
9512         (remote_notif_process, handle_notification): Adjust to pass down
9513         the remote.
9514         (remote_notif_state_allocate): Add remote_target parameter.  Save
9515         it.
9516         * remote-notif.h (struct remote_target): Forward declare.
9517         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9518         remote_target parameter.
9519         (struct remote_notif_state) <remote>: New field.
9520         (remote_notif_ack, remote_notif_parse): Add remote_target
9521         parameter.
9522         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9523         remote_target parameter.
9524         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9525         (threads_listing_context, rmt_thread_action, protocol_feature)
9526         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9527         (packet_result, struct threads_listing_context, remote_state):
9528         Move definitions and declarations higher up.
9529         (remote_target) <~remote_target>: Declare.
9530         (remote_download_command_source, remote_file_put, remote_file_get)
9531         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9532         (remote_hostio_pread_vFile, remote_hostio_send_command)
9533         (remote_hostio_set_filesystem, remote_hostio_open)
9534         (remote_hostio_close, remote_hostio_unlink, remote_state)
9535         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9536         (get_memory_write_packet_size, get_memory_read_packet_size)
9537         (append_pending_thread_resumptions, remote_detach_1)
9538         (append_resumption, remote_resume_with_vcont)
9539         (add_current_inferior_and_thread, wait_ns, wait_as)
9540         (process_stop_reply, remote_notice_new_inferior)
9541         (process_initial_stop_replies, remote_add_thread)
9542         (btrace_sync_conf, remote_btrace_maybe_reopen)
9543         (remove_new_fork_children, kill_new_fork_children)
9544         (discard_pending_stop_replies, stop_reply_queue_length)
9545         (check_pending_events_prevent_wildcard_vcont)
9546         (discard_pending_stop_replies_in_queue, stop_reply)
9547         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9548         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9549         (remote_interrupt_as, remote_interrupt_ns)
9550         (remote_get_noisy_reply, remote_query_attached)
9551         (remote_add_inferior, remote_current_thread, get_current_thread)
9552         (set_thread, set_general_thread, set_continue_thread)
9553         (set_general_process, write_ptid)
9554         (remote_unpack_thread_info_response, remote_get_threadinfo)
9555         (parse_threadlist_response, remote_get_threadlist)
9556         (remote_threadlist_iterator, remote_get_threads_with_ql)
9557         (remote_get_threads_with_qxfer)
9558         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9559         (get_offsets, remote_check_symbols, remote_supported_packet)
9560         (remote_query_supported, remote_packet_size)
9561         (remote_serial_quit_handler, remote_detach_pid)
9562         (remote_vcont_probe, remote_resume_with_hc)
9563         (send_interrupt_sequence, interrupt_query)
9564         (remote_notif_get_pending_events, fetch_register_using_p)
9565         (send_g_packet, process_g_packet, fetch_registers_using_g)
9566         (store_register_using_P, store_registers_using_G)
9567         (set_remote_traceframe, check_binary_download)
9568         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9569         (remote_xfer_live_readonly_partial, remote_read_bytes)
9570         (remote_send_printf, remote_flash_write, readchar)
9571         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9572         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9573         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9574         (extended_remote_disable_randomization, extended_remote_run)
9575         (send_environment_packet, extended_remote_environment_support)
9576         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9577         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9578         (packet_command): Now methods of ...
9579         (remote_target): ... this class.
9580         (m_remote_state) <remote_target>: New field.
9581         (struct remote_state) <stop_reply_queue,
9582         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9583         fields.
9584         (remote_state::remote_state): Allocate stop_reply_queue.
9585         (remote_state): Delete global.
9586         (get_remote_state_raw): Delete.
9587         (remote_target::get_remote_state): Allocate m_remote_state on
9588         demand.
9589         (get_current_remote_target): New.
9590         (remote_ops, extended_remote_ops): Delete.
9591         (wait_forever_enabled_p, remote_async_inferior_event_token):
9592         Delete, moved to struct remote_state.
9593         (remote_target::close): Delete self.  Destruction bits split to
9594         ...
9595         (remote_target::~remote_target): ... this.
9596         (show_memory_packet_size): Adjust to use
9597         get_current_remote_target.
9598         (struct protocol_feature) <func>: Add remote_target parameter.
9599         All callers adjusted.
9600         (curr_quit_handler_target): New.
9601         (remote_serial_quit_handler): Reimplement.
9602         (remote_target::open_1): Adjust to use get_current_remote_target.
9603         Heap-allocate remote_target/extended_remote_target instances.
9604         (vcont_builder::vcont_builder): Add remote_target parameter, and
9605         save it in m_remote.  All callers adjusted.
9606         (vcont_builder::m_remote): New field.
9607         (vcont_builder::restart, vcont_builder::flush)
9608         (vcont_builder::push_action): Use it.
9609         (remote_target::commit_resume): Use it.
9610         (struct queue_iter_param) <remote>: New field.
9611         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9612         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9613         (check_pending_event_prevents_wildcard_vcont_callback)
9614         (remote_target::check_pending_events_prevent_wildcard_vcont)
9615         (remote_target::discard_pending_stop_replies)
9616         (remote_target::discard_pending_stop_replies_in_queue)
9617         (remote_target::remote_notif_remove_queued_reply): Fill in
9618         'remote' field.
9619         (remote_notif_get_pending_events): New.
9620         (remote_target::readchar, remote_target::remote_serial_write):
9621         Save/restore curr_quit_handler_target.
9622         (putpkt): New.
9623         (kill_new_fork_children): Fill in 'remote' field.
9624         (packet_command): Use get_current_remote_target, defer to
9625         remote_target method of same name.
9626         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9627         parameter, and save it in m_remote.  All callers adjusted.
9628         (scoped_remote_fd::release): Use m_remote.
9629         (scoped_remote_fd::m_remote): New field.
9630         (remote_file_put, remote_file_get, remote_file_delete): Use
9631         get_current_remote_target, defer to remote_target method of same
9632         name.
9633         (remote_btrace_reset): Add remote_state paremeter.  Update all
9634         callers.
9635         (remote_async_inferior_event_handler). Pass down 'data'.
9636         (remote_new_objfile): Use get_current_remote_target.
9637         (remote_target::vcont_r_supported): New.
9638         (set_range_stepping): Use get_current_remote_target and
9639         remote_target::vcont_r_supported.
9640         (_initialize_remote): Don't allocate 'remote_state' and
9641         'stop_reply_queue' globals.
9642         * remote.h (struct remote_target): Forward declare.
9643         (getpkt, putpkt, remote_notif_get_pending_events): Add
9644         'remote_target' parameter.
9645
9646 2018-05-22  Pedro Alves  <palves@redhat.com>
9647
9648         * remote.c (vcont_builder): Now a class.  Make all data members
9649         private.
9650         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9651         Declare methods.
9652         (vcont_builder_restart): Rename to ...
9653         (vcont_builder::restart): ... this.
9654         (vcont_builder_flush): Rename to ...
9655         (vcont_builder::flush): ... this.
9656         (vcont_builder_push_action): Rename to ...
9657         (vcont_builder::push_action): ... this.
9658         (remote_target::commit_resume): Adjust.
9659
9660 2018-05-22  Pedro Alves  <palves@redhat.com>
9661
9662         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9663         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9664         (get_fixed_memory_packet_size): New.
9665         (get_memory_packet_size): Use it.
9666         (set_memory_packet_size): Don't override the config size with
9667         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9668         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9669         Don't refer to get_memory_packet_size if not connected to a remote
9670         target.  Show "(default)" if configured size is 0.
9671
9672 2018-05-22  Pedro Alves  <palves@redhat.com>
9673
9674         * remote.c (remote_target::mourn_inferior): Move
9675         discard_pending_stop_replies call here from ...
9676         (_initialize_remote): ... here.
9677
9678 2018-05-22  Pedro Alves  <palves@redhat.com>
9679
9680         * remote.c (compare_section_command): Remove set_general_process
9681         call.
9682
9683 2018-05-22  Pedro Alves  <palves@redhat.com>
9684
9685         * remote.c (struct packet_reg, struct remote_arch_state):
9686         Move higher up in the file.
9687         (remote_state) <m_arch_states>: Store remote_arch_state values
9688         instead of remote_arch_state pointers.
9689         (remote_state::get_remote_arch_state): Adjust.
9690
9691 2018-05-22  Pedro Alves  <palves@redhat.com>
9692
9693         * remote.c: Include <unordered_map>.
9694         (remote_state): Now a class.
9695         (remote_state) <get_remote_arch_state>: Declare method.
9696         <get_remote_arch_state>: New field.
9697         (remote_arch_state) <remote_arch_state>: Declare ctor.
9698         <regs>: Now a unique_ptr.
9699         (remote_gdbarch_data_handle): Delete.
9700         (get_remote_arch_state): Delete.
9701         (remote_state::get_remote_arch_state): New.
9702         (get_remote_state): Adjust to call remote_state's
9703         get_remote_arch_state method.
9704         (init_remote_state): Delete, bits factored out to ...
9705         (remote_arch_state::remote_arch_state): ... this new method.
9706         (get_remote_packet_size, get_memory_packet_size)
9707         (process_g_packet, remote_target::fetch_registers)
9708         (remote_target::prepare_to_store, store_registers_using_G)
9709         (remote_target::store_registers, remote_target::get_trace_status):
9710         Adjust to call remote_state's method.
9711         (_initialize_remote): Remove reference to
9712         remote_gdbarch_data_handle.
9713
9714 2018-05-22  Pedro Alves  <palves@redhat.com>
9715
9716         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9717         pread>: New method declarations.
9718         (remote_target::open_1): Adjust.
9719         (readahead_cache_invalidate): Rename to ...
9720         (readahead_cache::invalidate): ... this, and adjust to be a class
9721         method.
9722         (readahead_cache_invalidate_fd): Rename to ...
9723         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9724         class method.
9725         (remote_hostio_pwrite): Adjust.
9726         (remote_hostio_pread_from_cache): Rename to ...
9727         (readahead_cache::pread): ... this, and adjust to be a class
9728         method.
9729         (remote_hostio_close): Adjust.
9730
9731 2018-05-22  Pedro Alves  <palves@redhat.com>
9732
9733         * remote.c (remote_hostio_close_cleanup): Delete.
9734         (class scoped_remote_fd): New.
9735         (remote_file_put, remote_file_get): Use it.
9736
9737 2018-05-22  Pedro Alves  <palves@redhat.com>
9738
9739         (struct vCont_action_support): Use bool and initialize all fields.
9740         (struct readahead_cache): Initialize all fields.
9741         (remote_state): Use bool and initialize all fields.
9742         (remote_state::remote_state, remote_state::~remote_state): New.
9743         (new_remote_state): Delete.
9744         (_initialize_remote): Use new to allocate remote_state.
9745
9746 2018-05-22  Pedro Alves  <palves@redhat.com>
9747             張俊芝  <zjz@zjz.name>
9748
9749         PR gdb/22973
9750         * c-exp.y: Include "c-support.h".
9751         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9752         of tolower.  Use c_ident_is_alpha to scan names.
9753         * c-lang.c: Include "c-support.h".
9754         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9755         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9756         * c-support.h: New file, with bits factored out from ...
9757         * cp-name-parser.y: ... this file.
9758         Include "c-support.h".
9759         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9760         c-support.h and renamed.
9761         (symbol_end, yylex): Adjust.
9762
9763 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9764
9765         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9766         parameter type to CORE_ADDR.
9767         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9768         parameter type in declaration to CORE_ADDR.
9769         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9770         target_auxv_search to get AT_HWCAP and use the result to get the
9771         target description.
9772         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9773         to CORE_ADDR. Remove the cast of the return value to unsigned
9774         long. Fix error predicate of target_auxv_search.
9775         (ppc_linux_nat_target::read_description): Change the type of the
9776         hwcap variable to CORE_ADDR.
9777
9778 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9779
9780         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9781         if the size of fpscr is larger than 32 bits.
9782
9783 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9784
9785         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9786         (ppc32_linux_vsxregmap): New global.
9787         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9788         regcache_supply_regset, and regcache_collect_regset.
9789         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9790         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9791         (fetch_vsx_register, store_vsx_register): Remove.
9792         (fetch_vsx_registers): Add regno parameter. Get regset using
9793         ppc_linux_vsxregset. Use regset to supply registers.
9794         (store_vsx_registers): Add regno parameter. Get regset using
9795         ppc_linux_vsxregset. Use regset to collect registers.
9796         (fetch_register): Call fetch_vsx_registers instead of
9797         fetch_vsx_register.
9798         (store_register): Call store_vsx_registers instead of
9799         store_vsx_register.
9800         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9801         new regno parameter.
9802         (store_ppc_registers): Call store_vsx_registers with -1 for the
9803         new regno parameter.
9804         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9805         (ppc_collect_vsxregset): Remove.
9806
9807 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9808
9809         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9810         offset fields.
9811         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9812         for vector register offset fields.
9813         (ppc64_fbsd_reg_offsets): Likewise.
9814         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9815         to vector register offset fields.
9816         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9817         to vector register offset fields.
9818         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9819         vector register offset fields.
9820         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9821         initializers for vector register offset fields.
9822         (rs6000_aix64_reg_offsets): Likewise.
9823         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9824         (ppc_supply_vrregset): Remove.
9825         (ppc_collect_vrregset): Remove.
9826         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9827         (ppc_linux_vrregset) : New function.
9828         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9829         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9830         (ppc32_linux_vrregset): Remove.
9831         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9832         and use result instead of ppc32_linux_vrregset.
9833         (ppc32_linux_reg_offsets): Remove initializers for vector register
9834         offset fields.
9835         (ppc64_linux_reg_offsets): Likewise.
9836         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9837         * ppc-linux-nat.c: Include regset.h.
9838         (gdb_vrregset_t): Adjust comment to account for little-endian
9839         mode.
9840         (supply_vrregset, fill_vrregset): Remove.
9841         (fetch_altivec_register, store_altivec_register): Remove.
9842         (fetch_altivec_registers): Add regno parameter. Get regset using
9843         ppc_linux_vrregset. Use regset to supply registers.
9844         (store_altivec_registers): Add regno parameter. Get regset using
9845         ppc_linux_vrregset. Use regset to collect registers.
9846         (fetch_register): Call fetch_altivec_registers instead of
9847         fetch_altivec_register.
9848         (store_register): Call store_altivec_registers instead of
9849         store_altivec_register.
9850         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9851         the new regno parameter.
9852         (store_ppc_registers): Call store_altivec_registers with -1 for
9853         the new regno parameter.
9854
9855 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9856
9857         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9858         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9859         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9860         (gdb_vrregset_t): Change array type size to
9861         PPC_LINUX_SIZEOF_VRREGSET.
9862         (gdb_vsxregset_t): Change array type size to
9863         PPC_LINUX_SIZEOF_VSXREGSET.
9864         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9865         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9866         PPC_LINUX_SIZEOF_VSXREGSET.
9867
9868 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9869
9870         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9871         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9872         nat/ppc-linux.c.
9873         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9874         ppc_linux_target_wordsize with tid.
9875         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9876         wordsize with tid.
9877         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9878         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9879         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9880         tid parameter. Remove static specifier.
9881         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9882         (ppc_linux_target_wordsize): New declaration.
9883
9884 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9885
9886         * arch/ppc-linux-common.c: New file.
9887         * arch/ppc-linux-common.h: New file.
9888         * arch/ppc-linux-tdesc.h: New file.
9889         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9890         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9891         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9892         arch/ppc-linux-tdesc.h.
9893         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9894         arch/ppc-linux-tdesc.h.
9895         (ppc_linux_nat_target::read_description): Remove target
9896         description matching code. Fill a ppc_linux_features struct and
9897         call ppc_linux_match_description with it. Move comment about ISA
9898         2.05 to ppc-linux-common.c.
9899         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9900         arch/ppc-linux-tdesc.h.
9901         (ppc_linux_core_read_description): Remove target description
9902         matching code. Fill a ppc_linux_features struct and call
9903         ppc_linux_match_description with it.
9904         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9905         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9906         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9907         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9908         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9909         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9910         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9911         (tdesc_powerpc_e500l): Remove.
9912
9913 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9914
9915         * ada-lang.c (catch_assert_command): Pass empty string instead
9916         of NULL for excep_string argument.
9917
9918 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9919
9920         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9921         the width of the requested register exceeds the width of the
9922         `ptrace' data type.
9923
9924 2018-05-21  Tom Tromey  <tom@tromey.com>
9925
9926         * printcmd.c (output_command): Remove.
9927         (output_command_const): Rename to output_command.
9928         * valprint.h (output_command): Rename from output_command_const.
9929         * tracepoint.c (trace_dump_actions): Call output_command.
9930
9931 2018-05-21  Tom Tromey  <tom@tromey.com>
9932
9933         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9934         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9935         * ada-lang.h (create_ada_exception_catchpoint): Update.
9936         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9937         std::string.
9938         (create_excep_cond_exprs, ~ada_catchpoint)
9939         (should_stop_exception, print_one_exception)
9940         (print_mention_exception, print_recreate_exception): Update.
9941         (ada_get_next_arg): Remove.
9942         (catch_ada_exception_command_split): Use std::string.  Change type
9943         of "excep_string", "cond_string".
9944         (catch_ada_exception_command): Update.
9945         (create_ada_exception_catchpoint): Change type of excep_string.
9946         (ada_exception_sal): Remove excep_string parameter.
9947         (~ada_catchpoint): Remove.
9948
9949 2018-05-21  Tom Tromey  <tom@tromey.com>
9950
9951         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9952         cleanup.
9953
9954 2018-05-21  Tom Tromey  <tom@tromey.com>
9955
9956         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9957         Return unique_xmalloc_ptr.
9958         (print_it_exception): Update.
9959
9960 2018-05-21  Tom Tromey  <tom@tromey.com>
9961
9962         * tracepoint.c (trace_dump_actions): Use std::string.
9963
9964 2018-05-21  Tom Tromey  <tom@tromey.com>
9965
9966         * symfile.c (reread_symbols): Use std::string for original_name.
9967
9968 2018-05-21  Tom Tromey  <tom@tromey.com>
9969
9970         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9971         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9972         constructor.
9973
9974 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9975
9976         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9977         instance to...
9978         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9979         * objfiles.c (get_objfile_bfd_data): Allocate
9980         objfile_per_bfd_storage with obstack_new when allocating on
9981         obstack.
9982
9983 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9984
9985         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9986         OBSTACK_ZALLOC.
9987         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9988         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9989         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9990         (add_pending): Likewise.
9991         (parse_symbol): Likewise.
9992         (parse_partial_symbols): Likewise.
9993         (psymtab_to_symtab_1): Likewise.
9994         (new_psymtab): Likewise.
9995         (elfmdebug_build_psymtabs): Likewise.
9996         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9997         * objfiles.c (get_objfile_bfd_data): Likewise.
9998         (objfile_register_static_link): Likewise.
9999         * psymtab.c (allocate_psymtab): Likewise.
10000         * stabsread.c (read_member_functions): Likewise.
10001         * xcoffread.c (xcoff_end_psymtab): Likewise.
10002
10003 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
10004
10005         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
10006         compiler supports std::is_trivially_constructible.
10007         * common/poison.h: Include obstack.h.
10008         (IsMallocable): Define to is_trivially_constructible if the
10009         compiler supports it, define to true_type otherwise.
10010         (xobnew): New.
10011         (XOBNEW): Redefine.
10012         (xobnewvec): New.
10013         (XOBNEWVEC): Redefine.
10014         * gdb_obstack.h (obstack_zalloc): New.
10015         (OBSTACK_ZALLOC): Redefine.
10016         (obstack_calloc): New.
10017         (OBSTACK_CALLOC): Redefine.
10018         (obstack_new): New.
10019         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
10020         (gdbarch_obstack): New declaration in gdbarch.h, definition in
10021         gdbarch.c.
10022         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
10023         obstack_calloc/obstack_zalloc.
10024         (gdbarch_obstack_zalloc): Remove.
10025         * target-descriptions.c (tdesc_data_init): Use obstack_new.
10026
10027 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10028
10029         * stack.c (backtrace_command_1): Remove useless variable int i.
10030
10031 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10032
10033         * stack.c (print_frame_info): Fix comment.
10034
10035 2018-05-18  Tom Tromey  <tom@tromey.com>
10036
10037         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
10038         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
10039         (~dwarf2_per_objfile): Update
10040         (dwarf2_get_dwz_file): Use new.
10041         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10042         unique_ptr.
10043
10044 2018-05-18  Tom Tromey  <tom@tromey.com>
10045
10046         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10047         unique_ptr.
10048         * dwarf2read.c (struct dwp_file): Add constructor and
10049         initializers.
10050         (open_and_init_dwp_file): Return a unique_ptr.
10051         (dwarf2_per_objfile, create_dwp_hash_table)
10052         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10053         (lookup_dwo_unit_in_dwp): Update.
10054         (open_and_init_dwp_file, get_dwp_file): Update.
10055
10056 2018-05-18  Tom Tromey  <tom@tromey.com>
10057
10058         * dwarf2read.c (dwarf2_per_objfile): Update.
10059         (struct mapped_index): Add initializers.
10060         (dwarf2_read_index): Use new.
10061         (dw2_symtab_iter_init): Update.
10062         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10063         unique_ptr.
10064
10065 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10066
10067         * dwarf2read.c (mapped_index) <total_size>: Remove.
10068
10069 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10070
10071         * unittests/format_pieces-selftests.c (test_format_specifier):
10072         Add ARI comments.
10073
10074 2018-05-18  Tom Tromey  <tom@tromey.com>
10075
10076         * c-typeprint.c (maybe_print_hole): New function.
10077         (c_print_type_struct_field_offset): Update.
10078         (c_type_print_base_struct_union): Call maybe_print_hole.
10079
10080 2018-05-17  Keith Seitz  <keiths@redhat.com>
10081
10082         * breakpoint.c (build_bpstat_chain): New function, moved from
10083         bpstat_stop_status.
10084         (bpstat_stop_status): Add optional parameter, `stop_chain'.
10085         If no stop chain is passed, call build_bpstat_chain to build it.
10086         * breakpoint.h (build_bpstat_chain): Declare.
10087         (bpstat_stop_status): Move documentation here from breakpoint.c.
10088         * infrun.c (handle_signal_stop): Before eliding inlined frames,
10089         build the stop chain and pass it to skip_inline_frames.
10090         Pass this stop chain to bpstat_stop_status.
10091         * inline-frame.c: Include breakpoint.h.
10092         (stopped_by_user_bp_inline_frame): New function.
10093         (skip_inline_frames): Add parameter `stop_chain'.
10094         Move documention to inline-frame.h.
10095         If non-NULL, use stopped_by_user_bp_inline_frame to determine
10096         whether the frame should be elided.
10097         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10098         Add moved documentation and update for new parameter.
10099
10100 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10101
10102         PR cli/14975
10103         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10104         unittests/format_pieces-selftests.c.
10105         * common/format.h (format_piece) <operator==>: New.
10106         (format_pieces) <operator[]>: Remove.
10107         * common/format.c (format_pieces::format_pieces): Handle \e.
10108         * unittests/format_pieces-selftests.c: New.
10109
10110 2018-05-17  Tom Tromey  <tom@tromey.com>
10111
10112         PR symtab/23010:
10113         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10114         (dw2_instantiate_symtab): Add skip_partial parameter.
10115         (dw2_find_last_source_symtab, dw2_map_expand_apply)
10116         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10117         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10118         (dw2_expand_symtabs_matching_one)
10119         (dw2_find_pc_sect_compunit_symtab)
10120         (dw2_debug_names_lookup_symbol)
10121         (dw2_debug_names_expand_symtabs_for_function): Update.
10122         (init_cutu_and_read_dies): Add skip_partial parameter.
10123         (process_psymtab_comp_unit, build_type_psymtabs_1)
10124         (process_skeletonless_type_unit, load_partial_comp_unit)
10125         (psymtab_to_symtab_1): Update.
10126         (load_full_comp_unit): Add skip_partial parameter.
10127         (process_imported_unit_die, dwarf2_read_addr_index)
10128         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10129         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10130         (read_signatured_type): Update.
10131
10132 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10133
10134         * value.c (release_value): Remove unused variable.
10135         (record_latest_value): Likewise.
10136         (access_value_history): Likewise.
10137         (preserve_values): Likewise.
10138
10139 2018-05-17  Tom Tromey  <tom@tromey.com>
10140
10141         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10142         Initialize.
10143
10144 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
10145
10146         PR gdb/22286
10147         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10148         Also handle registers whose width is not a multiple of
10149         PTRACE_TYPE_RET.
10150         (linux_nat_trad_target::store_register): Likewise.
10151
10152 2018-05-16  Tom Tromey  <tom@tromey.com>
10153
10154         * gdbcore.h (core_bfd): Redefine.
10155         * corelow.c (core_target::close): Update.
10156         (core_target_open): Update.
10157         * progspace.h (struct program_space) <cbfd>: Now a
10158         gdb_bfd_ref_ptr.
10159
10160 2018-05-16  Tom Tromey  <tom@tromey.com>
10161
10162         PR cli/19551:
10163         * symfile-add-flags.h (enum symfile_add_flags)
10164         <SYMFILE_NOT_FILENAME>: New constant.
10165         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
10166         objfile name from BFD.
10167         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10168         * minidebug.c (find_separate_debug_file_in_section): Put
10169         ".gnu_debugdata" into BFD's file name.
10170
10171 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
10172
10173         * regcache.c (regcache_read_ftype, regcache_write_ftype):
10174         Remove.
10175
10176 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
10177
10178         PR binutils/21446
10179         * aarch64-tdep.c (aarch64_analyze_prologue,
10180         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10181         Indicate not interested in errors.
10182
10183 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10184
10185         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10186         Supply the MIPS_ZERO_REGNUM register.
10187
10188 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10189
10190         * mips-tdep.c (mask_address_var): Make variable static.
10191
10192 2018-05-14  Tom Tromey  <tom@tromey.com>
10193
10194         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10195
10196 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
10197
10198         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10199         FXSAVE_ADDR for the mxcsr register.
10200
10201 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
10202
10203         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10204
10205 2018-05-11  Pedro Alves  <palves@redhat.com>
10206
10207         * corelow.c (core_target) <core_target>: No longer inline.
10208         Initialize m_core_gdbarch, m_core_vec and build the section table
10209         here.
10210         <~core_target>: New.
10211         <core_gdbarch, get_core_register_section>: New methods.
10212         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10213         factored out from ...
10214         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10215         (core_ops): Delete.
10216         (sniff_core_bfd): Add gdbarch parameter.
10217         (core_close): Delete, merged into ...
10218         (core_target::close): ... here.  Delete self.
10219         (core_close_cleanup): Delete.
10220         (core_target_open): Allocate a core_target on the heap.  Use a
10221         unique_ptr instead of a cleanup.  Bits moved into the core_target
10222         ctor.  Adjust to use core_target methods instead of globals.
10223         (get_core_register_section): Rename to ...
10224         (core_target::get_core_register_section): ... this and adjust.
10225         (struct get_core_registers_cb_data): New.
10226         (get_core_registers_cb): Use it.  Use bool.
10227         (core_target::fetch_registers, core_target::files_info)
10228         (core_target::xfer_partial, core_target::read_description)
10229         (core_target::pid_to, core_target::thread_name): Adjust to
10230         reference class fields instead of globals.
10231         * target.h (struct target_ops_deleter, target_ops_up): New.
10232
10233 2018-05-11  Pedro Alves  <palves@redhat.com>
10234
10235         * corefile.c (core_file_command): Move to corelow.c.
10236         * corelow.c (the_core_target): Delete.
10237         (core_file_command): Moved from corefile.c.  Check exec_bfd
10238         instead of the_core_target.  Use target_detach instead of calling
10239         into the_core_target directly.
10240         (maybe_say_no_core_file_now): New.
10241         (core_target::detach): Use it.
10242         (_initialize_corelow): Remove references to the_core_target.
10243         * gdbcore.h (the_core_target): Delete.
10244
10245 2018-05-11  Tom Tromey  <tromey@redhat.com>
10246             Pedro Alves  <palves@redhat.com>
10247
10248         * corefile.c (core_bfd): Remove.
10249         * gdbcore.h (core_bfd): Now a macro.
10250         * progspace.h (struct program_space) <cbfd>: New field.
10251
10252 2018-05-11  Tom Tromey  <tom@tromey.com>
10253
10254         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10255         gdb::def_vector.
10256
10257 2018-05-10  Tom Tromey  <tom@tromey.com>
10258
10259         * configure: Rebuild.
10260         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10261
10262 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
10263
10264         PR server/23158:
10265         * regformats/regdat.sh: Adjust script, following the addition
10266         of the new expedite_regs parameter to init_target_desc.
10267
10268 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
10269     
10270         PR gdb/23127
10271         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10272         set_gdbarch_significant_addr_bit.
10273         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10274         set_gdbarch_significant_addr_bit.
10275         * utils.c (address_significant): Update to sign extend addr.
10276
10277 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
10278
10279         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10280         (xtensa_linux_init_abi): Limit tdep->num_regs by
10281         tdep->num_nopriv_regs.
10282         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10283         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10284         not initialized.
10285
10286 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
10287
10288         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10289
10290 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
10291
10292         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10293         (I387_MXCSR_INIT_VAL): New constant.
10294         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10295         buffer if it was supplied by the inferior.
10296         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10297         (i387_xsave_get_clear_bv): New function.
10298         (i387_supply_xsave): Only read x87 control registers from the
10299         xsave buffer if the feature is enabled, and the state will have
10300         been written, otherwise, provide a suitable default.
10301         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10302         including x87 control registers.  Update control registers if they
10303         have changed from the default value, and mark features as enabled
10304         as required.
10305         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10306
10307 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10308
10309         * spu-tdep.c (info_spu_event_command): Fix output formatting.
10310
10311 2018-05-07  Tom Tromey  <tom@tromey.com>
10312
10313         * configure: Rebuild.
10314         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10315
10316 2018-05-07  Tom Tromey  <tom@tromey.com>
10317
10318         PR tdep/20362:
10319         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10320         bit.  Use correct value for VDIV.
10321
10322 2018-05-04  Tom Tromey  <tom@tromey.com>
10323
10324         * configure: Rebuild.
10325         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10326
10327 2018-05-04  Tom Tromey  <tom@tromey.com>
10328
10329         * linux-record.c (record_linux_system_call) <case
10330         RECORD_SYS_RECVFROM>: Add "break".
10331
10332 2018-05-04  Tom Tromey  <tom@tromey.com>
10333
10334         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10335         Add missing "break".
10336         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10337         Add missing "break".
10338
10339 2018-05-04  Tom Tromey  <tom@tromey.com>
10340
10341         * rs6000-tdep.c (ppc_process_record_op4)
10342         (ppc_process_record_op63): Add fall-through comment.
10343
10344 2018-05-04  Tom Tromey  <tom@tromey.com>
10345
10346         * i386-tdep.c (i386_process_record): Add fall-through comment.
10347
10348 2018-05-04  Tom Tromey  <tom@tromey.com>
10349
10350         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10351         comment.
10352
10353 2018-05-04  Tom Tromey  <tom@tromey.com>
10354
10355         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10356         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10357         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10358         comment.
10359         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10360         comment.
10361         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10362         comment.
10363
10364 2018-05-04  Tom Tromey  <tom@tromey.com>
10365
10366         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10367
10368 2018-05-04  Tom Tromey  <tom@tromey.com>
10369
10370         * s390-tdep.c (s390_process_record): Fix fall-through comments.
10371         * xcoffread.c (scan_xcoff_symtab): Move comment later.
10372         * symfile.c (section_is_mapped): Fix fall-through comment.
10373         * stabsread.c (define_symbol, read_member_functions): Fix
10374         fall-through comment.
10375         * s390-linux-tdep.c (s390_process_record): Fix fall-through
10376         comment.
10377         * remote.c (remote_wait_as): Fix fall-through comment.
10378         * p-exp.y (yylex): Fix fall-through comment.
10379         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10380         comment.
10381         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10382         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10383         * jv-exp.y (yylex): Fix fall-through comment.
10384         * go-exp.y (lex_one_token): Fix fall-through comment.
10385         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10386         fall-through comment.
10387         * f-exp.y (yylex): Fix fall-through comment.
10388         * dwarf2read.c (process_die): Fix fall-through comments.
10389         * dbxread.c (process_one_symbol): Fix fall-through comment.
10390         * d-exp.y (lex_one_token): Fix fall-through comment.
10391         * cp-name-parser.y (yylex): Fix fall-through comment.
10392         * coffread.c (coff_symtab_read): Fix fall-through comment.
10393         * c-exp.y (lex_one_token): Fix fall-through comment.
10394         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10395         comment.
10396         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10397         comment.
10398
10399 2018-05-04  Tom Tromey  <tom@tromey.com>
10400
10401         PR python/22730:
10402         * NEWS: Mention gdb.execute change.
10403         * gdbcmd.h (execute_control_command): Don't declare.
10404         * python/python.c (execute_gdb_command): Use read_command_lines_1,
10405         execute_control_commands, execute_control_commands_to_string.
10406         * cli/cli-script.h (execute_control_commands)
10407         (execute_control_commands_to_string): Declare.
10408         (execute_control_command): Add from_tty parameter.
10409         * cli/cli-script.c (execute_control_commands)
10410         (execute_control_commands_to_string): New functions.
10411         (execute_user_command): Use execute_control_commands.
10412         (execute_control_command_1): Add "from_tty" parameter.  Update.
10413         (execute_control_command): Likewise.
10414
10415 2018-05-04  Tom Tromey  <tom@tromey.com>
10416
10417         PR python/22731:
10418         * NEWS: Mention that breakpoint commands are writable.
10419         * python/py-breakpoint.c (bppy_set_commands): New function.
10420         (breakpoint_object_getset) <"commands">: Use it.
10421
10422 2018-05-04  Tom Tromey  <tom@tromey.com>
10423
10424         * tracepoint.c (actions_command): Update.
10425         * mi/mi-cmd-break.c (mi_command_line_array)
10426         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10427         (mi_read_next_line): Remove.
10428         (mi_cmd_break_commands): Update.
10429         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10430         function_view.
10431         * cli/cli-script.c (get_command_line): Update.
10432         (process_next_line): Use function_view.  Constify.
10433         (recurse_read_control_structure, read_command_lines)
10434         (read_command_lines_1): Change argument types to function_view.
10435         (do_define_command, document_command): Update.
10436         * breakpoint.h (check_tracepoint_command): Don't declare.
10437         * breakpoint.c (check_tracepoint_command): Remove.
10438         (commands_command_1, create_tracepoint_from_upload): Update.
10439
10440 2018-05-04  Tom Tromey  <tom@tromey.com>
10441
10442         PR gdb/11750:
10443         * cli/cli-script.h (enum command_control_type) <define_control>:
10444         New constant.
10445         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10446         (build_command_line, execute_control_command_1)
10447         (process_next_line): Likewise.
10448         (do_define_command): New function, extracted from define_command.
10449         (define_command): Use it.
10450
10451 2018-05-04  Tom Tromey  <tom@tromey.com>
10452
10453         * tracepoint.c (actions_command): Update.
10454         * cli/cli-script.h (read_command_lines): Update.
10455         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10456         (MAX_TMPBUF): Remove define.
10457         (define_command): Use string_printf.
10458         (document_command): Likewise.
10459         * breakpoint.c (commands_command_1): Update.
10460
10461 2018-05-04  Tom Tromey  <tom@tromey.com>
10462
10463         * top.c (execute_command): Update.
10464         * cli/cli-script.h (print_command_lines): Now varargs.
10465         * cli/cli-script.c (print_command_lines): Now varargs.
10466         (execute_control_command_1) <case while_control, case if_control>:
10467         Update.
10468
10469 2018-05-04  Tom Tromey  <tom@tromey.com>
10470
10471         * tracepoint.c (all_tracepoint_actions): Rename from
10472         all_tracepoint_actions_and_cleanup.  Change return type.
10473         (actions_command, encode_actions_1, encode_actions)
10474         (trace_dump_actions, tdump_command): Update.
10475         * remote.c (remote_download_command_source): Update.
10476         * python/python.c (gdbpy_eval_from_control_command)
10477         (python_command, python_interactive_command): Update.
10478         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10479         * guile/guile.c (guile_command)
10480         (gdbscm_eval_from_control_command, guile_command): Update.
10481         * compile/compile.c (compile_code_command)
10482         (compile_print_command, compile_to_object): Update.
10483         * cli/cli-script.h (struct command_lines_deleter): New.
10484         (counted_command_line): New typedef.
10485         (struct command_line): Add constructor, destructor.
10486         <body_list>: Remove.
10487         <body_list_0, body_list_1>: New members.
10488         (command_line_up): Remove typedef.
10489         (read_command_lines, read_command_lines_1, get_command_line):
10490         Update.
10491         (copy_command_lines): Don't declare.
10492         * cli/cli-script.c (build_command_line): Use "new".
10493         (get_command_line): Return counted_command_line.
10494         (print_command_lines, execute_user_command)
10495         (execute_control_command_1, while_command, if_command): Update.
10496         (realloc_body_list): Remove.
10497         (process_next_line, recurse_read_control_structure): Update.
10498         (read_command_lines, read_command_lines_1): Return counted_command_line.
10499         (free_command_lines): Use "delete".
10500         (copy_command_lines): Remove.
10501         (define_command, document_command, show_user_1): Update.
10502         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10503         a counted_command_line.
10504         * breakpoint.h (counted_command_line): Remove typedef.
10505         (breakpoint_set_commands): Update.
10506         * breakpoint.c (check_no_tracepoint_commands)
10507         (validate_commands_for_breakpoint): Update.
10508         (breakpoint_set_commands): Change commands to be a
10509         counted_command_line.
10510         (commands_command_1, update_dprintf_command_list)
10511         (create_tracepoint_from_upload): Update.
10512
10513 2018-05-04  Tom Tromey  <tom@tromey.com>
10514
10515         * cli/cli-decode.h (cmd_list_element): New constructor.
10516         (~cmd_list_element): New destructor.
10517         (struct cmd_list_element): Add initializers.
10518         * cli/cli-decode.c (do_add_cmd): Use "new".
10519         (delete_cmd): Use "delete".
10520
10521 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10522             Pedro Alves <palves@redhat.com>
10523
10524         PR breakpoints/19806 and support for PR external/20207.
10525         * NEWS: Mention Aarch64 watchpoint improvements.
10526         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10527         watchpoints and PR external/20207 watchpoints.
10528         * nat/aarch64-linux-hw-point.c
10529         (kernel_supports_any_contiguous_range): New.
10530         (aarch64_watchpoint_offset): New.
10531         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10532         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10533         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10534         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10535         next_addr_orig_p.  Support PR external/20207 watchpoints.
10536         (aarch64_downgrade_regs): New.
10537         (aarch64_dr_state_insert_one_point): New parameters offset and
10538         addr_orig.
10539         (aarch64_dr_state_remove_one_point): Likewise.
10540         (aarch64_handle_breakpoint): Update caller.
10541         (aarch64_handle_aligned_watchpoint): Likewise.
10542         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10543         aligned_offset.
10544         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10545         aarch64_downgrade_regs.
10546         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10547         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10548         (DR_CONTROL_MASK): ... this.
10549         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10550         (unsigned int aarch64_watchpoint_offset): New prototype.
10551         (aarch64_linux_set_debug_regs): Remove const from state.
10552         * utils.c (align_up, align_down): Move to ...
10553         * common/common-utils.c (align_up, align_down): ... here.
10554         * utils.h (align_up, align_down): Move to ...
10555         * common/common-utils.h (align_up, align_down): ... here.
10556
10557 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10558
10559         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10560         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10561         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10562         Re-implement to match the ABI as summarized in GCC's
10563         gcc/config/sparc/sparc.c.  All callers updated.
10564         (sparc32_store_arguments): Remove assertion.
10565
10566 2018-05-04  Tom Tromey  <tom@tromey.com>
10567
10568         * printcmd.c: Don't include tui.h.
10569         (decode_format): Use skip_spaces.
10570
10571 2018-05-04  Tom Tromey  <tom@tromey.com>
10572
10573         PR gdb/22619:
10574         * printcmd.c (last_count): New global.
10575         (x_command): Use saved count when repeating.
10576
10577 2018-05-04  Tom Tromey  <tom@tromey.com>
10578
10579         * nto-procfs.c (do_closedir_cleanup): Remove.
10580         (procfs_pidlist): Use gdb_dir_up.
10581         * procfs.c (do_closedir_cleanup): Remove.
10582         (proc_update_threads): Use gdb_dir_up.
10583         * common/filestuff.h (struct gdb_dir_deleter): New.
10584         (gdb_dir_up): New typedef.
10585
10586 2018-05-04  Tom Tromey  <tom@tromey.com>
10587
10588         * ada-lang.c (print_mention_exception): Use std::string.
10589
10590 2018-05-04  Tom Tromey  <tom@tromey.com>
10591
10592         * ada-lang.c (create_excep_cond_exprs): Update.
10593         (ada_exception_catchpoint_cond_string): Use std::string.
10594
10595 2018-05-04  Tom Tromey  <tom@tromey.com>
10596
10597         * ada-lang.c (xget_renaming_scope): Return std::string.
10598         (old_renaming_is_invisible): Update.
10599
10600 2018-05-04  Tom Tromey  <tom@tromey.com>
10601
10602         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10603         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10604
10605 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10606
10607         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10608
10609 2018-05-04  Tom Tromey  <tom@tromey.com>
10610
10611         * remote.c (remote_query_supported_append): Change type.
10612         (remote_check_symbols): Update.
10613
10614 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10615
10616         PR gdb/11420
10617         * configure.ac: Prepend libpython.
10618         * python/python-config.py: Likewise.
10619         * configure: Regenerate.
10620
10621 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10622
10623         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10624
10625 2018-05-03  Pedro Alves  <palves@redhat.com>
10626
10627         * s390-linux-nat.c
10628         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10629         override.  Write 'true' instead of '1'.
10630         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10631         declaration.
10632
10633 2018-05-02  Pedro Alves  <palves@redhat.com>
10634
10635         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10636         add_inf_child_target.
10637         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10638         add_inf_child_target.
10639         * aix-thread.c (aix_thread_target_info): New.
10640         (aix_thread_target) <shortname, longname, doc>: Delete.
10641         <info>: New.
10642         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10643         add_inf_child_target.
10644         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10645         add_inf_child_target.
10646         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10647         add_inf_child_target.
10648         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10649         add_inf_child_target.
10650         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10651         add_inf_child_target.
10652         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10653         add_inf_child_target.
10654         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10655         add_inf_child_target.
10656         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10657         add_inf_child_target.
10658         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10659         add_inf_child_target.
10660         * bfd-target.c (target_bfd_target_info): New.
10661         (target_bfd) <shortname, longname, doc>: Delete.
10662         <info>: New.
10663         * bsd-kvm.c (bsd_kvm_target_info): New.
10664         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10665         <info>: New.
10666         (bsd_kvm_target::open): Rename to ...
10667         (bsd_kvm_target_open): ... this.  Adjust.
10668         * bsd-uthread.c (bsd_uthread_target_info): New.
10669         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10670         <info>: New.
10671         * corefile.c (core_file_command): Adjust.
10672         * corelow.c (core_target_info): New.
10673         (core_target) <shortname, longname, doc>: Delete.
10674         <info>: New.
10675         (core_target::open): Rename to ...
10676         (core_target_open): ... this.  Adjust.
10677         * ctf.c (ctf_target_info): New.
10678         (ctf_target) <shortname, longname, doc>: Delete.
10679         <info>: New.
10680         (ctf_target::open): Rename to ...
10681         (ctf_target_open): ... this.
10682         (_initialize_ctf): Adjust.
10683         * exec.c (exec_target_info): New.
10684         (exec_target) <shortname, longname, doc>: Delete.
10685         <info>: New.
10686         (exec_target::open): Rename to ...
10687         (exec_target_open): ... this.
10688         * gdbcore.h (core_target_open): Declare.
10689         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10690         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10691         add_inf_child_target.
10692         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10693         add_inf_child_target.
10694         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10695         add_inf_child_target.
10696         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10697         add_inf_child_target.
10698         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10699         add_inf_child_target.
10700         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10701         add_inf_child_target.
10702         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10703         add_inf_child_target.
10704         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10705         add_inf_child_target.
10706         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10707         add_inf_child_target.
10708         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10709         add_inf_child_target.
10710         * inf-child.c (inf_child_target_info): New.
10711         (inf_child_target::info): New.
10712         (inf_child_open_target): Remove 'target' parameter.  Use
10713         get_native_target instead.
10714         (inf_child_target::open): Delete.
10715         (add_inf_child_target): New.
10716         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10717         Delete.
10718         <info>: New.
10719         (add_inf_child_target): Declare.
10720         (inf_child_open_target): Declare.
10721         * linux-thread-db.c (thread_db_target_info): New.
10722         (thread_db_target) <shortname, longname, doc>: Delete.
10723         <info>: New.
10724         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10725         add_inf_child_target.
10726         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10727         add_inf_child_target.
10728         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10729         add_inf_child_target.
10730         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10731         add_inf_child_target.
10732         * make-target-delegates (print_class): Adjust.
10733         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10734         add_inf_child_target.
10735         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10736         add_inf_child_target.
10737         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10738         add_inf_child_target.
10739         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10740         add_inf_child_target.
10741         * nto-procfs.c (nto_native_target_info): New.
10742         (nto_procfs_target_native) <shortname, longname, doc>:
10743         Delete.
10744         <info>: New.
10745         (nto_procfs_target_info): New.
10746         (nto_procfs_target_procfs) <shortname, longname, doc>:
10747         Delete.
10748         <info>: New.
10749         (init_procfs_targets): Adjust.
10750         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10751         add_inf_child_target.
10752         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10753         add_inf_child_target.
10754         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10755         add_inf_child_target.
10756         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10757         add_inf_child_target.
10758         * ravenscar-thread.c (ravenscar_target_info): New.
10759         (ravenscar_thread_target) <shortname, longname, doc>:
10760         Delete.
10761         <info>: New.
10762         * record-btrace.c (record_btrace_target_info):
10763         (record_btrace_target) <shortname, longname, doc>: Delete.
10764         <info>: New.
10765         (record_btrace_target::open): Rename to ...
10766         (record_btrace_target_open): ... this.  Adjust.
10767         * record-full.c (record_longname, record_doc): New.
10768         (record_full_base_target) <shortname, longname, doc>: Delete.
10769         <info>: New.
10770         (record_full_target_info): New.
10771         (record_full_target): <shortname>: Delete.
10772         <info>: New.
10773         (record_full_core_open_1, record_full_open_1): Update comments.
10774         (record_full_base_target::open): Rename to ...
10775         (record_full_open): ... this.
10776         (cmd_record_full_restore): Update.
10777         (_initialize_record_full): Update.
10778         * remote-sim.c (remote_sim_target_info): New.
10779         (gdbsim_target) <shortname, longname, doc>: Delete.
10780         <info>: New.
10781         (gdbsim_target::open): Rename to ...
10782         (gdbsim_target_open): ... this.
10783         (_initialize_remote_sim): Adjust.
10784         * remote.c (remote_doc): New.
10785         (remote_target_info): New.
10786         (remote_target) <shortname, longname, doc>: Delete.
10787         <info>: New.
10788         (extended_remote_target_info): New.
10789         (extended_remote_target) <shortname, longname, doc>: Delete.
10790         <info>: New.
10791         (remote_target::open_1): Make static.  Adjust.
10792         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10793         * s390-linux-nat.c (_initialize_s390_nat): Use
10794         add_inf_child_target.
10795         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10796         add_inf_child_target.
10797         * sol-thread.c (thread_db_target_info): New.
10798         (sol_thread_target) <shortname, longname, doc>: Delete.
10799         <info>: New.
10800         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10801         add_inf_child_target.
10802         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10803         add_inf_child_target.
10804         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10805         add_inf_child_target.
10806         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10807         add_inf_child_target.
10808         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10809         add_inf_child_target.
10810         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10811         add_inf_child_target.
10812         * spu-linux-nat.c (_initialize_spu_nat): Use
10813         add_inf_child_target.
10814         * spu-multiarch.c (spu_multiarch_target_info): New.
10815         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10816         <info>: New.
10817         * target-delegates.c: Regenerate.
10818         * target.c: Include <unordered_map>.
10819         (target_ops_p): Delete.
10820         (DEF_VEC_P(target_ops_p)): Delete.
10821         (target_factories): New.
10822         (test_target_info): New.
10823         (test_target_ops::info): New.
10824         (open_target): Adjust to use target_factories.
10825         (add_target_with_completer): Rename to ...
10826         (add_target): ... this.  Change prototype.  Register target_info
10827         and open callback in target_factories.  Register target_info in
10828         command context instead of target_ops.
10829         (add_target): Delete old implementation.
10830         (add_deprecated_target_alias): Change prototype.  Adjust.
10831         (the_native_target): New.
10832         (set_native_target, get_native_target): New.
10833         (find_default_run_target): Use the_native_target.
10834         (find_attach_target, find_run_target): Simplify.
10835         (target_ops::open): Delete.
10836         (dummy_target_info): New.
10837         (dummy_target::shortname, dummy_target::longname)
10838         (dummy_target::doc): Delete.
10839         (dummy_target::info): New.
10840         (debug_target::shortname, debug_target::longname)
10841         (debug_target::doc): Delete.
10842         (debug_target::info): New.
10843         * target.h (struct target_info): New.
10844         (target_ops::~target_ops): Add comment.
10845         (target_ops::info): New.
10846         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10847         longer virtual.  Implement in terms of target_info.
10848         (set_native_target, get_native_target): Declare.
10849         (target_open_ftype): New.
10850         (add_target, add_target_with_completer)
10851         (add_deprecated_target_alias): Change prototype.
10852         (test_target) <shortname, longname, doc>: Delete.
10853         <info>: New.
10854         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10855         add_inf_child_target.
10856         * tracefile-tfile.c (tfile_target_info): New.
10857         (tfile_target) <shortname, longname, doc>: Delete.
10858         <info>: New.
10859         (tfile_target::open): Rename to ...
10860         (tfile_target_open): ... this.
10861         (_initialize_tracefile_tfile): Adjust.
10862         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10863         add_inf_child_target.
10864         * windows-nat.c (_initialize_windows_nat): Use
10865         add_inf_child_target.
10866         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10867         add_inf_child_target.
10868
10869 2018-05-02  Pedro Alves  <palves@redhat.com>
10870
10871         * linux-nat.h (linux_nat_target) <low_new_thread,
10872         low_delete_thread, low_new_fork, low_forget_process,
10873         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10874         New virtual methods.
10875         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10876         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10877         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10878         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10879         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10880         Delete.
10881         * linux-fork.c (delete_fork): Adjust to call low method.
10882         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10883         (linux_nat_new_fork, linux_nat_forget_process_hook)
10884         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10885         (linux_nat_status_is_event):
10886         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10887         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10888         to call low method.
10889         (sigtrap_is_event): Rename to ...
10890         (linux_nat_target::low_status_is_event): ... this.
10891         (linux_nat_set_status_is_event): Delete.
10892         (save_stop_reason, linux_nat_wait_1)
10893         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10894         low methods.
10895         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10896         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10897         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10898         (linux_nat_set_prepare_to_resume): Delete.
10899         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10900         low virtual methods.
10901         * amd64-linux-nat.c: Likewise.
10902         * arm-linux-nat.c: Likewise.
10903         * i386-linux-nat.c: Likewise.
10904         * ia64-linux-nat.c: Likewise.
10905         * mips-linux-nat.c: Likewise.
10906         * ppc-linux-nat.c: Likewise.
10907         * s390-linux-nat.c: Likewise.
10908         * sparc64-linux-nat.c: Likewise.
10909         * x86-linux-nat.c: Likewise.
10910         * x86-linux-nat.h: Include "nat/x86-linux.h".
10911         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10912         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10913         Override methods.
10914
10915 2018-05-02  Pedro Alves  <palves@redhat.com>
10916
10917         * target.h (target_ops)
10918         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10919         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10920         stopped_by_watchpoint, have_continuable_watchpoint,
10921         stopped_data_address, watchpoint_addr_within_range,
10922         can_accel_watchpoint_condition, can_run, thread_alive,
10923         has_all_memory, has_memory, has_stack, has_registers,
10924         has_execution, can_async_p, is_async_p, supports_non_stop,
10925         always_non_stop_p, can_execute_reverse, supports_multi_process,
10926         supports_enable_disable_tracepoint,
10927         supports_disable_randomization, supports_string_tracing,
10928         supports_evaluation_of_breakpoint_conditions,
10929         can_run_breakpoint_commands, filesystem_is_local,
10930         can_download_tracepoint, get_trace_state_variable_value,
10931         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10932         record_is_replaying, record_will_replay,
10933         augmented_libraries_svr4_read>: Adjust to return bool.
10934         * aarch64-linux-nat.c: All implementations adjusted.
10935         * aix-thread.c: All implementations adjusted.
10936         * arm-linux-nat.c: All implementations adjusted.
10937         * breakpoint.c: All implementations adjusted.
10938         * bsd-kvm.c: All implementations adjusted.
10939         * bsd-uthread.c: All implementations adjusted.
10940         * corelow.c: All implementations adjusted.
10941         * ctf.c: All implementations adjusted.
10942         * darwin-nat.c: All implementations adjusted.
10943         * darwin-nat.h: All implementations adjusted.
10944         * exec.c: All implementations adjusted.
10945         * fbsd-nat.c: All implementations adjusted.
10946         * fbsd-nat.h: All implementations adjusted.
10947         * gnu-nat.c: All implementations adjusted.
10948         * gnu-nat.h: All implementations adjusted.
10949         * go32-nat.c: All implementations adjusted.
10950         * ia64-linux-nat.c: All implementations adjusted.
10951         * inf-child.c: All implementations adjusted.
10952         * inf-child.h: All implementations adjusted.
10953         * inf-ptrace.c: All implementations adjusted.
10954         * inf-ptrace.h: All implementations adjusted.
10955         * linux-nat.c: All implementations adjusted.
10956         * linux-nat.h: All implementations adjusted.
10957         * mips-linux-nat.c: All implementations adjusted.
10958         * nto-procfs.c: All implementations adjusted.
10959         * ppc-linux-nat.c: All implementations adjusted.
10960         * procfs.c: All implementations adjusted.
10961         * ravenscar-thread.c: All implementations adjusted.
10962         * record-btrace.c: All implementations adjusted.
10963         * record-full.c: All implementations adjusted.
10964         * remote-sim.c: All implementations adjusted.
10965         * remote.c: All implementations adjusted.
10966         * s390-linux-nat.c: All implementations adjusted.
10967         * sol-thread.c: All implementations adjusted.
10968         * spu-multiarch.c: All implementations adjusted.
10969         * target-delegates.c: All implementations adjusted.
10970         * target.c: All implementations adjusted.
10971         * target.h: All implementations adjusted.
10972         * tracefile-tfile.c: All implementations adjusted.
10973         * tracefile.c: All implementations adjusted.
10974         * tracefile.h: All implementations adjusted.
10975         * windows-nat.c: All implementations adjusted.
10976         * x86-linux-nat.h: All implementations adjusted.
10977         * x86-nat.h: All implementations adjusted.
10978
10979 2018-05-02  Pedro Alves  <palves@redhat.com>
10980
10981         * make-target-delegates (scan_target_h): Don't trim lines here.
10982         Replace sequences of tabs and/or whitespace with a single
10983         whitespace.
10984         (top level, parsing methods): Trim each line before processing it
10985         here.
10986
10987 2018-05-02  Pedro Alves  <palves@redhat.com>
10988             John Baldwin  <jhb@freebsd.org>
10989
10990         * target.h (enum strata) <debug_stratum>: New.
10991         (struct target_ops) <all delegation methods>: Replace by C++
10992         virtual methods, and drop "to_" prefix.  All references updated
10993         throughout.
10994         <to_shortname, to_longname, to_doc, to_data,
10995         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10996         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10997         virtual methods.  All references updated throughout.
10998         <can_attach, supports_terminal_ours, can_create_inferior,
10999         get_thread_control_capabilities, attach_no_wait>: New
11000         virtual methods.
11001         <insert_breakpoint, remove_breakpoint>: Now
11002         TARGET_DEFAULT_NORETURN methods.
11003         <info_proc>: Now returns bool.
11004         <to_magic>: Delete.
11005         (OPS_MAGIC): Delete.
11006         (current_target): Delete.  All references replaced by references
11007         to ...
11008         (target_stack): ... this.  New.
11009         (target_shortname, target_longname): Adjust.
11010         (target_can_run): Now a function declaration.
11011         (default_child_has_all_memory, default_child_has_memory)
11012         (default_child_has_stack, default_child_has_registers)
11013         (default_child_has_execution): Remove target_ops parameter.
11014         (complete_target_initialization): Delete.
11015         (memory_breakpoint_target): New template class.
11016         (test_target_ops): Refactor as a C++ class with virtual methods.
11017         * make-target-delegates (NAME_PART): Tighten.
11018         (POINTER_PART, CP_SYMBOL): New.
11019         (SIMPLE_RETURN_PART): Reimplement.
11020         (VEC_RETURN_PART): Expect less.
11021         (RETURN_PART, VIRTUAL_PART): New.
11022         (METHOD): Adjust to C++ virtual methods.
11023         (scan_target_h): Remove reference to C99.
11024         (dname): Output "target_ops::" prefix.
11025         (write_function_header): Adjust to output a C++ class method.
11026         (write_declaration): New.
11027         (write_delegator): Adjust to output a C++ class method.
11028         (tdname): Output "dummy_target::" prefix.
11029         (write_tdefault, write_debugmethod): Adjust to output a C++ class
11030         method.
11031         (tdefault_names, debug_names): Delete.
11032         (return_types, tdefaults, styles, argtypes_array): New.
11033         (top level): All methods are delegators.
11034         (print_class): New.
11035         (top level): Print dummy_target and debug_target classes.
11036         * target-delegates.c: Regenerate.
11037         * target-debug.h (target_debug_print_enum_info_proc_what)
11038         (target_debug_print_thread_control_capabilities)
11039         (target_debug_print_thread_info_p): New.
11040         * target.c (dummy_target): Delete.
11041         (the_dummy_target, the_debug_target): New.
11042         (target_stack): Now extern.
11043         (set_targetdebug): Push/unpush debug target.
11044         (default_child_has_all_memory, default_child_has_memory)
11045         (default_child_has_stack, default_child_has_registers)
11046         (default_child_has_execution): Remove target_ops parameter.
11047         (complete_target_initialization): Delete.
11048         (add_target_with_completer): No longer call
11049         complete_target_initialization.
11050         (target_supports_terminal_ours): Use regular delegation.
11051         (update_current_target): Delete.
11052         (push_target): No longer check magic number.  Don't call
11053         update_current_target.
11054         (unpush_target): Don't call update_current_target.
11055         (target_is_pushed): No longer check magic number.
11056         (target_require_runnable): Skip for all stratums over
11057         process_stratum.
11058         (target_ops::info_proc): New.
11059         (target_info_proc): Use find_target_at and
11060         find_default_run_target.
11061         (target_supports_disable_randomization): Use regular delegation.
11062         (target_get_osdata): Use find_target_at.
11063         (target_ops::open, target_ops::close, target_ops::can_attach)
11064         (target_ops::attach, target_ops::can_create_inferior)
11065         (target_ops::create_inferior, target_ops::can_run)
11066         (target_can_run): New.
11067         (default_fileio_target): Use regular delegation.
11068         (target_ops::fileio_open, target_ops::fileio_pwrite)
11069         (target_ops::fileio_pread, target_ops::fileio_fstat)
11070         (target_ops::fileio_close, target_ops::fileio_unlink)
11071         (target_ops::fileio_readlink): New.
11072         (target_fileio_open_1, target_fileio_unlink)
11073         (target_fileio_readlink): Always call the target method.  Handle
11074         FILEIO_ENOSYS.
11075         (return_zero, return_zero_has_execution): Delete.
11076         (init_dummy_target): Delete.
11077         (dummy_target::dummy_target, dummy_target::shortname)
11078         (dummy_target::longname, dummy_target::doc)
11079         (debug_target::debug_target, debug_target::shortname)
11080         (debug_target::longname, debug_target::doc): New.
11081         (target_supports_delete_record): Use regular delegation.
11082         (setup_target_debug): Delete.
11083         (maintenance_print_target_stack): Skip debug_stratum.
11084         (initialize_targets): Instantiate the_dummy_target and
11085         the_debug_target.
11086         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
11087         use target_stack.
11088         (target_auxv_search, fprint_target_auxv): Adjust.
11089         (info_auxv_command): Adjust to use target_stack.
11090         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11091         * exceptions.c (print_flush): Handle a NULL target_stack.
11092         * regcache.c (target_ops_no_register): Refactor as class with
11093         virtual methods.
11094
11095         * exec.c (exec_target): New class.
11096         (exec_ops): Now an exec_target.
11097         (exec_open, exec_close_1, exec_get_section_table)
11098         (exec_xfer_partial, exec_files_info, exec_has_memory)
11099         (exec_make_note_section): Refactor as exec_target methods.
11100         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11101         Delete.
11102         (exec_target::find_memory_regions): New.
11103         (_initialize_exec): Don't call init_exec_ops.
11104         * gdbcore.h (exec_file_clear): Delete.
11105
11106         * corefile.c (core_target): Delete.
11107         (core_file_command): Adjust.
11108         * corelow.c (core_target): New class.
11109         (the_core_target): New.
11110         (core_close): Remove target_ops parameter.
11111         (core_close_cleanup): Adjust.
11112         (core_target::close): New.
11113         (core_open, core_detach, get_core_registers, core_files_info)
11114         (core_xfer_partial, core_thread_alive, core_read_description)
11115         (core_pid_to_str, core_thread_name, core_has_memory)
11116         (core_has_stack, core_has_registers, core_info_proc): Rework as
11117         core_target methods.
11118         (ignore, core_remove_breakpoint, init_core_ops): Delete.
11119         (_initialize_corelow): Initialize the_core_target.
11120         * gdbcore.h (core_target): Delete.
11121         (the_core_target): New.
11122
11123         * ctf.c: (ctf_target): New class.
11124         (ctf_ops): Now a ctf_target.
11125         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11126         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11127         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11128         methods.
11129         (init_ctf_ops): Delete.
11130         (_initialize_ctf): Don't call it.
11131         * tracefile-tfile.c (tfile_target): New class.
11132         (tfile_ops): Now a tfile_target.
11133         (tfile_open, tfile_close, tfile_files_info)
11134         (tfile_get_tracepoint_status, tfile_trace_find)
11135         (tfile_fetch_registers, tfile_xfer_partial)
11136         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11137         Refactor as tfile_target methods.
11138         (tfile_xfer_partial_features): Remove target_ops parameter.
11139         (init_tfile_ops): Delete.
11140         (_initialize_tracefile_tfile): Don't call it.
11141         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11142         (tracefile_has_stack, tracefile_has_registers)
11143         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11144         tracefile_target methods.
11145         (init_tracefile_ops): Delete.
11146         (tracefile_target::tracefile_target): New.
11147         * tracefile.h: Include "target.h".
11148         (tracefile_target): New class.
11149         (init_tracefile_ops): Delete.
11150
11151         * spu-multiarch.c (spu_multiarch_target): New class.
11152         (spu_ops): Now a spu_multiarch_target.
11153         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11154         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11155         (spu_search_memory, spu_mourn_inferior): Refactor as
11156         spu_multiarch_target methods.
11157         (init_spu_ops): Delete.
11158         (_initialize_spu_multiarch): Remove references to init_spu_ops,
11159         complete_target_initialization.
11160
11161         * ravenscar-thread.c (ravenscar_thread_target): New class.
11162         (ravenscar_ops): Now a ravenscar_thread_target.
11163         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11164         (ravenscar_thread_alive, ravenscar_pid_to_str)
11165         (ravenscar_fetch_registers, ravenscar_store_registers)
11166         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11167         (ravenscar_stopped_by_hw_breakpoint)
11168         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11169         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11170         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11171         methods.
11172         (init_ravenscar_thread_ops): Delete.
11173         (_initialize_ravenscar): Remove references to
11174         init_ravenscar_thread_ops and complete_target_initialization.
11175
11176         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11177         (bsd_uthread_target): New class.
11178         (bsd_uthread_ops): Now a bsd_uthread_target.
11179         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11180         (bsd_uthread_close, bsd_uthread_mourn_inferior)
11181         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11182         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11183         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11184         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11185         (bsd_uthread_target): Delete function.
11186         (_initialize_bsd_uthread): Remove reference to
11187         complete_target_initialization.
11188
11189         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
11190         (target_bfd): ... this new class.
11191         (target_bfd_xfer_partial, target_bfd_get_section_table)
11192         (target_bfd_close): Refactor as target_bfd methods.
11193         (target_bfd::~target_bfd): New.
11194         (target_bfd_reopen): Adjust.
11195         (target_bfd::close): New.
11196
11197         * record-btrace.c (record_btrace_target): New class.
11198         (record_btrace_ops): Now a record_btrace_target.
11199         (record_btrace_open, record_btrace_stop_recording)
11200         (record_btrace_disconnect, record_btrace_close)
11201         (record_btrace_async, record_btrace_info)
11202         (record_btrace_insn_history, record_btrace_insn_history_range)
11203         (record_btrace_insn_history_from, record_btrace_call_history)
11204         (record_btrace_call_history_range)
11205         (record_btrace_call_history_from, record_btrace_record_method)
11206         (record_btrace_is_replaying, record_btrace_will_replay)
11207         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11208         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11209         (record_btrace_store_registers, record_btrace_prepare_to_store)
11210         (record_btrace_to_get_unwinder)
11211         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11212         (record_btrace_commit_resume, record_btrace_wait)
11213         (record_btrace_stop, record_btrace_can_execute_reverse)
11214         (record_btrace_stopped_by_sw_breakpoint)
11215         (record_btrace_supports_stopped_by_sw_breakpoint)
11216         (record_btrace_stopped_by_hw_breakpoint)
11217         (record_btrace_supports_stopped_by_hw_breakpoint)
11218         (record_btrace_update_thread_list, record_btrace_thread_alive)
11219         (record_btrace_goto_begin, record_btrace_goto_end)
11220         (record_btrace_goto, record_btrace_stop_replaying_all)
11221         (record_btrace_execution_direction)
11222         (record_btrace_prepare_to_generate_core)
11223         (record_btrace_done_generating_core): Refactor as
11224         record_btrace_target methods.
11225         (init_record_btrace_ops): Delete.
11226         (_initialize_record_btrace): Remove reference to
11227         init_record_btrace_ops.
11228         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11229         the execution_direction global.
11230         (record_full_base_target, record_full_target)
11231         (record_full_core_target): New classes.
11232         (record_full_ops): Now a record_full_target.
11233         (record_full_core_ops): Now a record_full_core_target.
11234         (record_full_target::detach, record_full_target::disconnect)
11235         (record_full_core_target::disconnect)
11236         (record_full_target::mourn_inferior, record_full_target::kill):
11237         New.
11238         (record_full_open, record_full_close, record_full_async): Refactor
11239         as methods of the record_full_base_target class.
11240         (record_full_resume, record_full_commit_resume): Refactor
11241         as methods of the record_full_target class.
11242         (record_full_wait, record_full_stopped_by_watchpoint)
11243         (record_full_stopped_data_address)
11244         (record_full_stopped_by_sw_breakpoint)
11245         (record_full_supports_stopped_by_sw_breakpoint)
11246         (record_full_stopped_by_hw_breakpoint)
11247         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11248         methods of the record_full_base_target class.
11249         (record_full_store_registers, record_full_xfer_partial)
11250         (record_full_insert_breakpoint, record_full_remove_breakpoint):
11251         Refactor as methods of the record_full_target class.
11252         (record_full_can_execute_reverse, record_full_get_bookmark)
11253         (record_full_goto_bookmark, record_full_execution_direction)
11254         (record_full_record_method, record_full_info, record_full_delete)
11255         (record_full_is_replaying, record_full_will_replay)
11256         (record_full_goto_begin, record_full_goto_end, record_full_goto)
11257         (record_full_stop_replaying): Refactor as methods of the
11258         record_full_base_target class.
11259         (record_full_core_resume, record_full_core_kill)
11260         (record_full_core_fetch_registers)
11261         (record_full_core_prepare_to_store)
11262         (record_full_core_store_registers, record_full_core_xfer_partial)
11263         (record_full_core_insert_breakpoint)
11264         (record_full_core_remove_breakpoint)
11265         (record_full_core_has_execution): Refactor
11266         as methods of the record_full_core_target class.
11267         (record_full_base_target::supports_delete_record): New.
11268         (init_record_full_ops): Delete.
11269         (init_record_full_core_ops): Delete.
11270         (record_full_save): Refactor as method of the
11271         record_full_base_target class.
11272         (_initialize_record_full): Remove references to
11273         init_record_full_ops and init_record_full_core_ops.
11274
11275         * remote.c (remote_target, extended_remote_target): New classes.
11276         (remote_ops): Now a remote_target.
11277         (extended_remote_ops): Now an extended_remote_target.
11278         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11279         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11280         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11281         (remote_pass_signals, remote_set_syscall_catchpoint)
11282         (remote_program_signals, )
11283         (remote_thread_always_alive): Remove target_ops parameter.
11284         (remote_thread_alive, remote_thread_name)
11285         (remote_update_thread_list, remote_threads_extra_info)
11286         (remote_static_tracepoint_marker_at)
11287         (remote_static_tracepoint_markers_by_strid)
11288         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11289         (remote_open): Refactor as methods of remote_target.
11290         (extended_remote_open, extended_remote_detach)
11291         (extended_remote_attach, extended_remote_post_attach):
11292         (extended_remote_supports_disable_randomization)
11293         (extended_remote_create_inferior): : Refactor as method of
11294         extended_remote_target.
11295         (remote_set_permissions, remote_open_1, remote_detach)
11296         (remote_follow_fork, remote_follow_exec, remote_disconnect)
11297         (remote_resume, remote_commit_resume, remote_stop)
11298         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11299         (remote_terminal_ours, remote_wait, remote_fetch_registers)
11300         (remote_prepare_to_store, remote_store_registers)
11301         (remote_flash_erase, remote_flash_done, remote_files_info)
11302         (remote_kill, remote_mourn, remote_insert_breakpoint)
11303         (remote_remove_breakpoint, remote_insert_watchpoint)
11304         (remote_watchpoint_addr_within_range)
11305         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11306         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11307         (remote_supports_stopped_by_sw_breakpoint)
11308         (remote_stopped_by_hw_breakpoint)
11309         (remote_supports_stopped_by_hw_breakpoint)
11310         (remote_stopped_by_watchpoint, remote_stopped_data_address)
11311         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11312         (remote_verify_memory): Refactor as methods of remote_target.
11313         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11314         parameter.
11315         (remote_xfer_partial, remote_get_memory_xfer_limit)
11316         (remote_search_memory, remote_rcmd, remote_memory_map)
11317         (remote_pid_to_str, remote_get_thread_local_address)
11318         (remote_get_tib_address, remote_read_description): Refactor as
11319         methods of remote_target.
11320         (remote_target::fileio_open, remote_target::fileio_pwrite)
11321         (remote_target::fileio_pread, remote_target::fileio_close): New.
11322         (remote_hostio_readlink, remote_hostio_fstat)
11323         (remote_filesystem_is_local, remote_can_execute_reverse)
11324         (remote_supports_non_stop, remote_supports_disable_randomization)
11325         (remote_supports_multi_process, remote_supports_cond_breakpoints)
11326         (remote_supports_enable_disable_tracepoint)
11327         (remote_supports_string_tracing)
11328         (remote_can_run_breakpoint_commands, remote_trace_init)
11329         (remote_download_tracepoint, remote_can_download_tracepoint)
11330         (remote_download_trace_state_variable, remote_enable_tracepoint)
11331         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11332         (remote_trace_start, remote_get_trace_status)
11333         (remote_get_tracepoint_status, remote_trace_stop)
11334         (remote_trace_find, remote_get_trace_state_variable_value)
11335         (remote_save_trace_data, remote_get_raw_trace_data)
11336         (remote_set_disconnected_tracing, remote_core_of_thread)
11337         (remote_set_circular_trace_buffer, remote_traceframe_info)
11338         (remote_get_min_fast_tracepoint_insn_len)
11339         (remote_set_trace_buffer_size, remote_set_trace_notes)
11340         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11341         (remote_disable_btrace, remote_teardown_btrace)
11342         (remote_read_btrace, remote_btrace_conf)
11343         (remote_augmented_libraries_svr4_read, remote_load)
11344         (remote_pid_to_exec_file, remote_can_do_single_step)
11345         (remote_execution_direction, remote_thread_handle_to_thread_info):
11346         Refactor as methods of remote_target.
11347         (init_remote_ops, init_extended_remote_ops): Delete.
11348         (remote_can_async_p, remote_is_async_p, remote_async)
11349         (remote_thread_events, remote_upload_tracepoints)
11350         (remote_upload_trace_state_variables): Refactor as methods of
11351         remote_target.
11352         (_initialize_remote): Remove references to init_remote_ops and
11353         init_extended_remote_ops.
11354
11355         * remote-sim.c (gdbsim_target): New class.
11356         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11357         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11358         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11359         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11360         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11361         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11362         Refactor as methods of gdbsim_target.
11363         (gdbsim_ops): Now a gdbsim_target.
11364         (init_gdbsim_ops): Delete.
11365         (gdbsim_cntrl_c): Adjust.
11366         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11367
11368         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11369         (the_amd64_linux_nat_target): New.
11370         (amd64_linux_fetch_inferior_registers)
11371         (amd64_linux_store_inferior_registers): Refactor as methods of
11372         amd64_linux_nat_target.
11373         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
11374         * i386-linux-nat.c: Don't include "linux-nat.h".
11375         (i386_linux_nat_target): New class.
11376         (the_i386_linux_nat_target): New.
11377         (i386_linux_fetch_inferior_registers)
11378         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11379         as methods of i386_linux_nat_target.
11380         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
11381         * inf-child.c (inf_child_ops): Delete.
11382         (inf_child_fetch_inferior_registers)
11383         (inf_child_store_inferior_registers): Delete.
11384         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11385         methods of inf_child_target.
11386         (inf_child_target::supports_terminal_ours)
11387         (inf_child_target::terminal_init)
11388         (inf_child_target::terminal_inferior)
11389         (inf_child_target::terminal_ours_for_output)
11390         (inf_child_target::terminal_ours, inf_child_target::interrupt)
11391         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11392         New.
11393         (inf_child_open, inf_child_disconnect, inf_child_close)
11394         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11395         (inf_child_post_startup_inferior, inf_child_can_run)
11396         (inf_child_pid_to_exec_file): Refactor as methods of
11397         inf_child_target.
11398         (inf_child_follow_fork): Delete.
11399         (inf_child_target::can_create_inferior)
11400         (inf_child_target::can_attach): New.
11401         (inf_child_target::has_all_memory, inf_child_target::has_memory)
11402         (inf_child_target::has_stack, inf_child_target::has_registers)
11403         (inf_child_target::has_execution): New.
11404         (inf_child_fileio_open, inf_child_fileio_pwrite)
11405         (inf_child_fileio_pread, inf_child_fileio_fstat)
11406         (inf_child_fileio_close, inf_child_fileio_unlink)
11407         (inf_child_fileio_readlink, inf_child_use_agent)
11408         (inf_child_can_use_agent): Refactor as methods of
11409         inf_child_target.
11410         (return_zero, inf_child_target): Delete.
11411         (inf_child_target::inf_child_target): New.
11412         * inf-child.h: Include "target.h".
11413         (inf_child_target): Delete function prototype.
11414         (inf_child_target): New class.
11415         (inf_child_open_target, inf_child_mourn_inferior)
11416         (inf_child_maybe_unpush_target): Delete.
11417         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11418         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11419         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11420         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11421         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11422         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11423         (inf_ptrace_wait, inf_ptrace_xfer_partial)
11424         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11425         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11426         methods of inf_ptrace_target.
11427         (inf_ptrace_target): Delete function.
11428         * inf-ptrace.h: Include "inf-child.h".
11429         (inf_ptrace_target): Delete function declaration.
11430         (inf_ptrace_target): New class.
11431         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11432         * linux-nat.c (linux_target): New.
11433         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11434         (linux_nat_target::~linux_nat_target): New.
11435         (linux_child_post_attach, linux_child_post_startup_inferior)
11436         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11437         (linux_child_remove_fork_catchpoint)
11438         (linux_child_insert_vfork_catchpoint)
11439         (linux_child_remove_vfork_catchpoint)
11440         (linux_child_insert_exec_catchpoint)
11441         (linux_child_remove_exec_catchpoint)
11442         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11443         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11444         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11445         (linux_nat_stopped_data_address)
11446         (linux_nat_stopped_by_sw_breakpoint)
11447         (linux_nat_supports_stopped_by_sw_breakpoint)
11448         (linux_nat_stopped_by_hw_breakpoint)
11449         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11450         (linux_nat_kill, linux_nat_mourn_inferior)
11451         (linux_nat_xfer_partial, linux_nat_thread_alive)
11452         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11453         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11454         (linux_child_static_tracepoint_markers_by_strid)
11455         (linux_nat_is_async_p, linux_nat_can_async_p)
11456         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11457         (linux_nat_supports_multi_process)
11458         (linux_nat_supports_disable_randomization, linux_nat_async)
11459         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11460         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11461         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11462         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11463         methods of linux_nat_target.
11464         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11465         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11466         parameter.
11467         (check_stopped_by_watchpoint): Adjust.
11468         (linux_xfer_partial): Delete.
11469         (linux_target_install_ops, linux_target, linux_nat_add_target):
11470         Delete.
11471         (linux_nat_target::linux_nat_target): New.
11472         * linux-nat.h: Include "inf-ptrace.h".
11473         (linux_nat_target): New.
11474         (linux_target, linux_target_install_ops, linux_nat_add_target):
11475         Delete function declarations.
11476         (linux_target): Declare global.
11477         * linux-thread-db.c (thread_db_target): New.
11478         (thread_db_target::thread_db_target): New.
11479         (thread_db_ops): Delete.
11480         (the_thread_db_target): New.
11481         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11482         (thread_db_update_thread_list, thread_db_pid_to_str)
11483         (thread_db_extra_thread_info)
11484         (thread_db_thread_handle_to_thread_info)
11485         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11486         (thread_db_resume): Refactor as methods of thread_db_target.
11487         (init_thread_db_ops): Delete.
11488         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11489         * x86-linux-nat.c: Don't include "linux-nat.h".
11490         (super_post_startup_inferior): Delete.
11491         (x86_linux_nat_target::~x86_linux_nat_target): New.
11492         (x86_linux_child_post_startup_inferior)
11493         (x86_linux_read_description, x86_linux_enable_btrace)
11494         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11495         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11496         methods of x86_linux_nat_target.
11497         (x86_linux_create_target): Delete.  Bits folded ...
11498         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11499         pointer.
11500         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11501         (x86_linux_nat_target): New class.
11502         (x86_linux_create_target): Delete.
11503         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11504         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11505         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11506         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11507         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11508         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11509         make extern.
11510         (x86_use_watchpoints): Delete.
11511         * x86-nat.h: Include "breakpoint.h" and "target.h".
11512         (x86_use_watchpoints): Delete.
11513         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11514         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11515         (x86_insert_watchpoint, x86_remove_watchpoint)
11516         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11517         (x86_stopped_by_hw_breakpoint): New declarations.
11518         (x86_nat_target): New template class.
11519
11520         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11521         (the_ppc_linux_nat_target): New.
11522         (ppc_linux_fetch_inferior_registers)
11523         (ppc_linux_can_use_hw_breakpoint)
11524         (ppc_linux_region_ok_for_hw_watchpoint)
11525         (ppc_linux_ranged_break_num_registers)
11526         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11527         (ppc_linux_insert_mask_watchpoint)
11528         (ppc_linux_remove_mask_watchpoint)
11529         (ppc_linux_can_accel_watchpoint_condition)
11530         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11531         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11532         (ppc_linux_watchpoint_addr_within_range)
11533         (ppc_linux_masked_watch_num_registers)
11534         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11535         (ppc_linux_read_description): Refactor as methods of
11536         ppc_linux_nat_target.
11537         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11538
11539         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11540         (procfs_target): New class.
11541         (the_procfs_target): New.
11542         (procfs_target): Delete function.
11543         (procfs_auxv_parse, procfs_attach, procfs_detach)
11544         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11545         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11546         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11547         (procfs_create_inferior, procfs_update_thread_list)
11548         (procfs_thread_alive, procfs_pid_to_str)
11549         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11550         (procfs_stopped_data_address, procfs_insert_watchpoint)
11551         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11552         (proc_find_memory_regions, procfs_info_proc)
11553         (procfs_make_note_section): Refactor as methods of procfs_target.
11554         (_initialize_procfs): Adjust.
11555         * sol-thread.c (sol_thread_target): New class.
11556         (sol_thread_ops): Now a sol_thread_target.
11557         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11558         (sol_thread_fetch_registers, sol_thread_store_registers)
11559         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11560         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11561         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11562         (init_sol_thread_ops): Delete.
11563         (_initialize_sol_thread): Adjust.  Remove references to
11564         init_sol_thread_ops and complete_target_initialization.
11565
11566         * windows-nat.c (windows_nat_target): New class.
11567         (windows_fetch_inferior_registers)
11568         (windows_store_inferior_registers, windows_resume, windows_wait)
11569         (windows_attach, windows_detach, windows_pid_to_exec_file)
11570         (windows_files_info, windows_create_inferior)
11571         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11572         (windows_close, windows_pid_to_str, windows_xfer_partial)
11573         (windows_get_tib_address, windows_get_ada_task_ptid)
11574         (windows_thread_name, windows_thread_alive): Refactor as
11575         windows_nat_target methods.
11576         (do_initial_windows_stuff): Adjust.
11577         (windows_target): Delete function.
11578         (_initialize_windows_nat): Adjust.
11579
11580         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11581         (darwin_mourn_inferior, darwin_kill_inferior)
11582         (darwin_create_inferior, darwin_attach, darwin_detach)
11583         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11584         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11585         (darwin_supports_multi_process): Refactor as darwin_nat_target
11586         methods.
11587         (darwin_resume_to, darwin_files_info): Delete.
11588         (_initialize_darwin_inferior): Rename to ...
11589         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11590         * darwin-nat.h: Include "inf-child.h".
11591         (darwin_nat_target): New class.
11592         (darwin_complete_target): Delete.
11593         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11594         (darwin_target): New.
11595         (i386_darwin_fetch_inferior_registers)
11596         (i386_darwin_store_inferior_registers): Refactor as methods of
11597         darwin_nat_target.
11598         (darwin_complete_target): Delete, with ...
11599         (_initialize_i386_darwin_nat): ... bits factored out here.
11600
11601         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11602         (the_alpha_linux_nat_target): New.
11603         (alpha_linux_register_u_offset): Refactor as
11604         alpha_linux_nat_target method.
11605         (_initialize_alpha_linux_nat): Adjust.
11606         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11607         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11608         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11609         methods of linux_nat_trad_target.
11610         (linux_trad_target): Delete.
11611         * linux-nat-trad.h (linux_trad_target): Delete function.
11612         (linux_nat_trad_target): New class.
11613         * mips-linux-nat.c (mips_linux_nat_target): New class.
11614         (super_fetch_registers, super_store_registers, super_close):
11615         Delete.
11616         (the_mips_linux_nat_target): New.
11617         (mips64_linux_regsets_fetch_registers)
11618         (mips64_linux_regsets_store_registers)
11619         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11620         (mips_linux_register_u_offset, mips_linux_read_description)
11621         (mips_linux_can_use_hw_breakpoint)
11622         (mips_linux_stopped_by_watchpoint)
11623         (mips_linux_stopped_data_address)
11624         (mips_linux_region_ok_for_hw_watchpoint)
11625         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11626         (mips_linux_close): Refactor as methods of mips_linux_nat.
11627         (_initialize_mips_linux_nat): Adjust to C++ification.
11628
11629         * aix-thread.c (aix_thread_target): New class.
11630         (aix_thread_ops): Now an aix_thread_target.
11631         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11632         (aix_thread_fetch_registers, aix_thread_store_registers)
11633         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11634         (aix_thread_thread_alive, aix_thread_pid_to_str)
11635         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11636         Refactor as methods of aix_thread_target.
11637         (init_aix_thread_ops): Delete.
11638         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11639         and complete_target_initialization.
11640         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11641         (rs6000_nat_target): New class.
11642         (the_rs6000_nat_target): New.
11643         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11644         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11645         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11646         (super_create_inferior): Delete.
11647         (_initialize_rs6000_nat): Adjust to C++ification.
11648
11649         * arm-linux-nat.c (arm_linux_nat_target): New class.
11650         (the_arm_linux_nat_target): New.
11651         (arm_linux_fetch_inferior_registers)
11652         (arm_linux_store_inferior_registers, arm_linux_read_description)
11653         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11654         (arm_linux_remove_hw_breakpoint)
11655         (arm_linux_region_ok_for_hw_watchpoint)
11656         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11657         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11658         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11659         arm_linux_nat_target.
11660         (_initialize_arm_linux_nat): Adjust to C++ification.
11661
11662         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11663         (the_aarch64_linux_nat_target): New.
11664         (aarch64_linux_fetch_inferior_registers)
11665         (aarch64_linux_store_inferior_registers)
11666         (aarch64_linux_child_post_startup_inferior)
11667         (aarch64_linux_read_description)
11668         (aarch64_linux_can_use_hw_breakpoint)
11669         (aarch64_linux_insert_hw_breakpoint)
11670         (aarch64_linux_remove_hw_breakpoint)
11671         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11672         (aarch64_linux_region_ok_for_hw_watchpoint)
11673         (aarch64_linux_stopped_data_address)
11674         (aarch64_linux_stopped_by_watchpoint)
11675         (aarch64_linux_watchpoint_addr_within_range)
11676         (aarch64_linux_can_do_single_step): Refactor as methods of
11677         aarch64_linux_nat_target.
11678         (super_post_startup_inferior): Delete.
11679         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11680
11681         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11682         (the_hppa_linux_nat_target): New.
11683         (hppa_linux_fetch_inferior_registers)
11684         (hppa_linux_store_inferior_registers): Refactor as methods of
11685         hppa_linux_nat_target.
11686         (_initialize_hppa_linux_nat): Adjust to C++ification.
11687
11688         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11689         (the_ia64_linux_nat_target): New.
11690         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11691         (ia64_linux_stopped_data_address)
11692         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11693         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11694         ia64_linux_nat_target methods.
11695         (super_xfer_partial): Delete.
11696         (_initialize_ia64_linux_nat): Adjust to C++ification.
11697
11698         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11699         (the_m32r_linux_nat_target): New.
11700         (m32r_linux_fetch_inferior_registers)
11701         (m32r_linux_store_inferior_registers): Refactor as
11702         m32r_linux_nat_target methods.
11703         (_initialize_m32r_linux_nat): Adjust to C++ification.
11704
11705         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11706         (the_m68k_linux_nat_target): New.
11707         (m68k_linux_fetch_inferior_registers)
11708         (m68k_linux_store_inferior_registers): Refactor as
11709         m68k_linux_nat_target methods.
11710         (_initialize_m68k_linux_nat): Adjust to C++ification.
11711
11712         * s390-linux-nat.c (s390_linux_nat_target): New class.
11713         (the_s390_linux_nat_target): New.
11714         (s390_linux_fetch_inferior_registers)
11715         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11716         (s390_insert_watchpoint, s390_remove_watchpoint)
11717         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11718         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11719         (s390_auxv_parse, s390_read_description): Refactor as methods of
11720         s390_linux_nat_target.
11721         (_initialize_s390_nat): Adjust to C++ification.
11722
11723         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11724         (the_sparc_linux_nat_target): New.
11725         (_initialize_sparc_linux_nat): Adjust to C++ification.
11726         * sparc-nat.c (sparc_fetch_inferior_registers)
11727         (sparc_store_inferior_registers): Remove target_ops parameter.
11728         * sparc-nat.h (sparc_fetch_inferior_registers)
11729         (sparc_store_inferior_registers): Remove target_ops parameter.
11730         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11731         (the_sparc64_linux_nat_target): New.
11732         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11733
11734         * spu-linux-nat.c (spu_linux_nat_target): New class.
11735         (the_spu_linux_nat_target): New.
11736         (spu_child_post_startup_inferior, spu_child_post_attach)
11737         (spu_child_wait, spu_fetch_inferior_registers)
11738         (spu_store_inferior_registers, spu_xfer_partial)
11739         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11740         methods.
11741         (_initialize_spu_nat): Adjust to C++ification.
11742
11743         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11744         (the_tilegx_linux_nat_target): New.
11745         (fetch_inferior_registers, store_inferior_registers):
11746         Refactor as methods.
11747         (_initialize_tile_linux_nat): Adjust to C++ification.
11748
11749         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11750         (the_xtensa_linux_nat_target): New.
11751         (xtensa_linux_fetch_inferior_registers)
11752         (xtensa_linux_store_inferior_registers): Refactor as
11753         xtensa_linux_nat_target methods.
11754         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11755
11756         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11757         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11758         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11759         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11760         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11761         (fbsd_stopped_by_sw_breakpoint)
11762         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11763         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11764         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11765         (fbsd_post_startup_inferior, fbsd_post_attach)
11766         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11767         (fbsd_set_syscall_catchpoint)
11768         (super_xfer_partial, super_resume, super_wait)
11769         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11770         (fbsd_handle_debug_trap): Remove target_ops parameter.
11771         (fbsd_nat_add_target): Delete.
11772         * fbsd-nat.h: Include "inf-ptrace.h".
11773         (fbsd_nat_add_target): Delete.
11774         (USE_SIGTRAP_SIGINFO): Define.
11775         (fbsd_nat_target): New class.
11776
11777         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11778         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11779         (amd64bsd_target): Delete.
11780         * amd64-bsd-nat.h: New file.
11781         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11782         "x86-bsd-nat.h".
11783         (amd64_fbsd_nat_target): New class.
11784         (the_amd64_fbsd_nat_target): New.
11785         (amd64fbsd_read_description): Refactor as method of
11786         amd64_fbsd_nat_target.
11787         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11788         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11789         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11790         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11791         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11792         (i386bsd_target): Delete.
11793         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11794         (i386bsd_fetch_inferior_registers)
11795         (i386bsd_store_inferior_registers): Declare.
11796         (i386_bsd_nat_target): New class.
11797         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11798         (the_i386_fbsd_nat_target): New.
11799         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11800         i386_fbsd_nat_target methods.
11801         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11802         (_initialize_i386fbsd_nat): Adjust to C++ification.
11803         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11804         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11805         (_initialize_x86_bsd_nat): Adjust to C++ification.
11806         * x86-bsd-nat.h: Include "x86-nat.h".
11807         (x86bsd_target): Delete declaration.
11808         (x86bsd_nat_target): New class.
11809
11810         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11811         (the_aarch64_fbsd_nat_target): New.
11812         (aarch64_fbsd_fetch_inferior_registers)
11813         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11814         aarch64_fbsd_nat_target.
11815         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11816         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11817         (the_alpha_bsd_nat_target): New.
11818         (alphabsd_fetch_inferior_registers)
11819         (alphabsd_store_inferior_registers): Refactor as
11820         alpha_bsd_nat_target methods.
11821         (_initialize_alphabsd_nat): Refactor as methods of
11822         alpha_bsd_nat_target.
11823         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11824         (the_amd64_nbsd_nat_target): New.
11825         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11826         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11827         (the_amd64_obsd_nat_target): New.
11828         (_initialize_amd64obsd_nat): Adjust to C++ification.
11829         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11830         (the_arm_fbsd_nat_target): New.
11831         (arm_fbsd_fetch_inferior_registers)
11832         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11833         (_initialize_arm_fbsd_nat): Refactor as methods of
11834         arm_fbsd_nat_target.
11835         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11836         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11837         (the_arm_netbsd_nat_target): New.
11838         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11839         arm_netbsd_nat_target.
11840         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11841         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11842         (the_hppa_nbsd_nat_target): New.
11843         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11844         hppa_nbsd_nat_target methods.
11845         (_initialize_hppanbsd_nat): Adjust to C++ification.
11846         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11847         (the_hppa_obsd_nat_target): New.
11848         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11849         methods of hppa_obsd_nat_target.
11850         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11851         add_target.
11852         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11853         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11854         add_target.
11855         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11856         (_initialize_i386obsd_nat): Use add_target.
11857         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11858         (the_m68k_bsd_nat_target): New.
11859         (m68kbsd_fetch_inferior_registers)
11860         (m68kbsd_store_inferior_registers): Refactor as methods of
11861         m68k_bsd_nat_target.
11862         (_initialize_m68kbsd_nat): Adjust to C++ification.
11863         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11864         (the_mips_fbsd_nat_target): New.
11865         (mips_fbsd_fetch_inferior_registers)
11866         (mips_fbsd_store_inferior_registers): Refactor as methods of
11867         mips_fbsd_nat_target.
11868         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11869         add_target.
11870         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11871         (the_mips_nbsd_nat_target): New.
11872         (mipsnbsd_fetch_inferior_registers)
11873         (mipsnbsd_store_inferior_registers): Refactor as methods of
11874         mips_nbsd_nat_target.
11875         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11876         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11877         (the_mips64_obsd_nat_target): New.
11878         (mips64obsd_fetch_inferior_registers)
11879         (mips64obsd_store_inferior_registers): Refactor as methods of
11880         mips64_obsd_nat_target.
11881         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11882         add_target.
11883         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11884         nbsd_nat_target.
11885         * nbsd-nat.h: Include "inf-ptrace.h".
11886         (nbsd_nat_target): New class.
11887         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11888         (obsd_wait): Refactor as methods of obsd_nat_target.
11889         (obsd_add_target): Delete.
11890         * obsd-nat.h: Include "inf-ptrace.h".
11891         (obsd_nat_target): New class.
11892         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11893         (the_ppc_fbsd_nat_target): New.
11894         (ppcfbsd_fetch_inferior_registers)
11895         (ppcfbsd_store_inferior_registers): Refactor as methods of
11896         ppc_fbsd_nat_target.
11897         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11898         add_target.
11899         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11900         (the_ppc_nbsd_nat_target): New.
11901         (ppcnbsd_fetch_inferior_registers)
11902         (ppcnbsd_store_inferior_registers): Refactor as methods of
11903         ppc_nbsd_nat_target.
11904         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11905         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11906         (the_ppc_obsd_nat_target): New.
11907         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11908         methods of ppc_obsd_nat_target.
11909         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11910         add_target.
11911         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11912         (the_sh_nbsd_nat_target): New.
11913         (shnbsd_fetch_inferior_registers)
11914         (shnbsd_store_inferior_registers): Refactor as methods of
11915         sh_nbsd_nat_target.
11916         (_initialize_shnbsd_nat): Adjust to C++ification.
11917         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11918         (inf_ptrace_xfer_partial): Delete.
11919         (sparc_xfer_partial, sparc_target): Delete.
11920         * sparc-nat.h (sparc_fetch_inferior_registers)
11921         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11922         (sparc_target): Delete function declaration.
11923         (sparc_target): New template class.
11924         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11925         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11926         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11927         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11928         add_target.
11929         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11930         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11931         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11932         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11933         add_target.
11934         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11935         (the_vax_bsd_nat_target): New.
11936         (vaxbsd_fetch_inferior_registers)
11937         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11938         methods.
11939         (_initialize_vaxbsd_nat): Adjust to C++ification.
11940
11941         * bsd-kvm.c (bsd_kvm_target): New class.
11942         (bsd_kvm_ops): Now a bsd_kvm_target.
11943         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11944         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11945         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11946         bsd_kvm_target.
11947         (bsd_kvm_return_one): Delete.
11948         (bsd_kvm_add_target): Adjust to C++ification.
11949
11950         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11951         (nto_procfs_target_procfs): New classes.
11952         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11953         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11954         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11955         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11956         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11957         (procfs_remove_hw_breakpoint, procfs_resume)
11958         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11959         (procfs_kill_inferior, procfs_store_registers)
11960         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11961         as methods of nto_procfs_target.
11962         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11963         (nto_native_ops): Delete.
11964         (procfs_open, procfs_native_open): Delete.
11965         (nto_native_ops): Now an nto_procfs_target_native.
11966         (init_procfs_targets): Adjust to C++ification.
11967         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11968         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11969         Refactor as methods of nto_procfs_target.
11970
11971         * go32-nat.c (go32_nat_target): New class.
11972         (the_go32_nat_target): New.
11973         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11974         (go32_store_registers, go32_xfer_partial, go32_files_info)
11975         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11976         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11977         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11978         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11979         (go32_target): Delete.
11980         (_initialize_go32_nat): Adjust to C++ification.
11981
11982         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11983         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11984         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11985         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11986         gnu_nat_target.
11987         (gnu_target): Delete.
11988         * gnu-nat.h (gnu_target): Delete.
11989         (gnu_nat_target): New class.
11990         * i386-gnu-nat.c (gnu_base_target): New.
11991         (i386_gnu_nat_target): New class.
11992         (the_i386_gnu_nat_target): New.
11993         (_initialize_i386gnu_nat): Adjust to C++ification.
11994
11995 2018-05-02  Pedro Alves  <palves@redhat.com>
11996
11997         * bfd-target.c (target_bfd_xclose): Rename to ...
11998         (target_bfd_close): ... this.
11999         (target_bfd_reopen): Adjust.
12000         * target.c (target_close): Remove references to to_xclose.
12001         * target.h (target_ops::to_xclose): Delete.
12002         (target_ops::to_close): Update comments.
12003
12004 2018-05-02  Pedro Alves  <palves@redhat.com>
12005
12006         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
12007         "linux-nat.h".
12008         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
12009         * inf-ptrace.c (inf_ptrace_register_u_offset)
12010         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
12011         (inf_ptrace_store_register, inf_ptrace_store_registers)
12012         (inf_ptrace_trad_target): Move to ...
12013         * linux-nat-trad.c: ... this new file.
12014         * linux-nat-trad.h: New file.
12015         * linux-nat.c (linux_target_install_ops): Make extern.
12016         (linux_trad_target): Delete.
12017         * linux-nat.h (linux_trad_target): Delete declaration.
12018         (linux_target_install_ops): Declare.
12019         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
12020         "linux-nat.h".
12021
12022 2018-05-02  Pedro Alves  <palves@redhat.com>
12023
12024         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12025         procfs_target/add_target here.
12026         * procfs.c (procfs_target): Make static.
12027         (_initialize_procfs): Call add_target here.
12028         * procfs.h (struct target_ops): Remove forward declaration.
12029         (procfs_target): Remove declaration.
12030         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
12031
12032 2018-05-02  Pedro Alves  <palves@redhat.com>
12033
12034         * procfs.c (procfs_stopped_by_watchpoint)
12035         (procfs_insert_watchpoint, procfs_remove_watchpoint)
12036         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
12037         Forward declare.
12038         (procfs_use_watchpoints): Delete, move contents...
12039         (procfs_target): ... here.
12040         * procfs.h (procfs_use_watchpoints): Delete declaration.
12041         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12042         procfs_use_watchpoints.
12043         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12044         procfs_use_watchpoints.
12045
12046 2018-05-02  Tom Tromey  <tom@tromey.com>
12047
12048         PR python/20084:
12049         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12050         and var_zuinteger_unlimited.
12051         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12052         and PARAM_ZUINTEGER_UNLIMITED.
12053         (set_parameter_value): Handle var_zuinteger and
12054         var_zuinteger_unlimited.
12055         (add_setshow_generic): Likewise.
12056         (parmpy_init): Likewise.
12057
12058 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
12059
12060         PR rust/23124
12061         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
12062         pointer is not null before dereferencing it.
12063
12064 2018-04-30  Tom Tromey  <tom@tromey.com>
12065
12066         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12067         is_mi_like_p.
12068
12069 2018-04-30  Tom Tromey  <tom@tromey.com>
12070
12071         * breakpoint.c (mention): Remove use of is_mi_like_p.
12072         (print_mention_ranged_breakpoint): Likewise.
12073         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12074         of is_mi_like_p.
12075
12076 2018-04-30  Tom Tromey  <tom@tromey.com>
12077
12078         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12079
12080 2018-04-30  Tom Tromey  <tom@tromey.com>
12081
12082         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12083         (info_spu_event_command): Remove some uses of is_mi_like_p.
12084
12085 2018-04-30  Tom Tromey  <tom@tromey.com>
12086
12087         * python/py-framefilter.c (py_print_single_arg)
12088         (enumerate_locals, py_print_args, py_print_frame): Remove some
12089         uses of is_mi_like_p.
12090
12091 2018-04-30  Tom Tromey  <tom@tromey.com>
12092
12093         * ui-out.c: Update.
12094         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12095         * ui-out.h (ui_out::is_mi_like_p): Now const.
12096         (ui_out::do_is_mi_like_p): Now const.
12097         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12098
12099 2018-04-30  Tom Tromey  <tom@tromey.com>
12100
12101         * varobj.c (varobj_set_visualizer): Use new_reference.
12102         * python/python.c (gdbpy_decode_line): Use new_reference.
12103         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12104         new_reference.
12105
12106 2018-04-30  Tom Tromey  <tom@tromey.com>
12107
12108         * varobj.c (install_new_value): Use new_reference.
12109         * value.h (value_incref): Return void.  Swap intro comment with
12110         value_decref.
12111         * value.c (set_value_parent): Use new_reference.
12112         (value_incref): Return void.  Update intro comment.
12113         (release_value): Use new_reference.
12114         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12115
12116 2018-04-30  Tom Tromey  <tom@tromey.com>
12117
12118         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12119         * gdb_bfd.h (new_bfd_ref): Remove.
12120         (gdb_bfd_open): Update comment.
12121         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12122         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12123         (gdb_bfd_fdopenr): Use new_reference.
12124         * exec.c (exec_file_attach): Use new_reference.
12125
12126 2018-04-30  Tom Tromey  <tom@tromey.com>
12127
12128         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12129         method.
12130
12131 2018-04-30  Tom Tromey  <tom@tromey.com>
12132
12133         * jit.c (jit_read_code_entry): Use type_align.
12134         * i386-tdep.c (i386_gdbarch_init): Don't call
12135         set_gdbarch_long_long_align_bit.
12136         * gdbarch.sh: Remove long_long_align_bit.
12137         * gdbarch.c, gdbarch.h: Rebuild.
12138         * arc-tdep.c (arc_type_align): New function.
12139         (arc_gdbarch_init): Use arc_type_align.  Don't call
12140         set_gdbarch_long_long_align_bit.
12141
12142 2018-04-30  Tom Tromey  <tom@tromey.com>
12143
12144         * rust-lang.c (rust_type_alignment): Remove.
12145         (rust_composite_type): Use type_align.
12146
12147 2018-04-30  Tom Tromey  <tom@tromey.com>
12148
12149         * NEWS: Mention Type.align.
12150         * python/py-type.c (typy_get_alignof): New function.
12151         (type_object_getset): Add "alignof".
12152
12153 2018-04-30  Tom Tromey  <tom@tromey.com>
12154
12155         PR exp/17095:
12156         * NEWS: Update.
12157         * std-operator.def (UNOP_ALIGNOF): New operator.
12158         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12159         New.
12160         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12161         * c-lang.c (c_op_print_tab): Add alignof.
12162         * c-exp.y (ALIGNOF): New token.
12163         (exp): Add "ALIGNOF" production.
12164         (ident_tokens): Add _Alignof and alignof.
12165
12166 2018-04-30  Tom Tromey  <tom@tromey.com>
12167
12168         * i386-tdep.c (i386_type_align): New function.
12169         (i386_gdbarch_init): Update.
12170         * gdbarch.sh (type_align): New method.
12171         * gdbarch.c, gdbarch.h: Rebuild.
12172         * arch-utils.h (default_type_align): Declare.
12173         * arch-utils.c (default_type_align): New function.
12174         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12175         (struct type) <align_log2>: New field.
12176         <instance_flags>: Now a bitfield.
12177         (TYPE_RAW_ALIGN): New macro.
12178         (type_align, type_raw_align, set_type_align): Declare.
12179         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12180         functions.
12181         * dwarf2read.c (quirk_rust_enum): Set type alignment.
12182         (get_alignment, maybe_set_alignment): New functions.
12183         (read_structure_type, read_enumeration_type, read_array_type)
12184         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12185         (read_subrange_type, read_base_type): Set type alignment.
12186
12187 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
12188
12189         * dwarf2read.c (read_index_from_section): Use bool.
12190
12191 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
12192
12193         PR gdb/22950
12194         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12195         with #ifdef.
12196
12197 2018-04-29  John Reiser  <jreiser@BitWagon.com>
12198
12199         PR build/22873
12200         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12201         last step, and do it atomically.
12202
12203 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
12204
12205         * compile/compile-c-types.c (convert_int, convert_float):
12206         Update for C FE v1.
12207
12208 2018-04-27  Tom Tromey  <tom@tromey.com>
12209
12210         PR rust/22545:
12211         * rust-lang.c (rust_inclusive_range_type_p): New function.
12212         (rust_range): Handle inclusive ranges.
12213         (rust_compute_range): Likewise.
12214         * rust-exp.y (struct rust_op) <inclusive>: New field.
12215         (DOTDOTEQ): New constant.
12216         (range_expr): Add "..=" productions.
12217         (operator_tokens): Add "..=" token.
12218         (ast_range): Add "inclusive" parameter.
12219         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12220         ranges.
12221         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12222         bounds values.
12223         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12224         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12225         Update comments.
12226         * expprint.c (print_subexp_standard): Handle new bounds values.
12227         (dump_subexp_body_standard): Likewise.
12228
12229 2018-04-27  Tom Tromey  <tom@tromey.com>
12230
12231         * configure: Rebuild.
12232         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12233         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12234         "OVERRIDE".
12235         (class symbol_needs_eval_context): Likewise.
12236         * dwarf2read.c (mock_mapped_index::symbol_name_count)
12237         (mock_mapped_index::symbol_name_at): Use "override".  Remove
12238         "virtual".
12239         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12240         "override".
12241         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12242         * aarch64-tdep.c (instruction_reader::read): Use "override".
12243         (instruction_reader_test::read): Likewise.
12244         * arm-tdep.c (instruction_reader::read): Use "override".
12245         (instruction_reader_thumb::read): Likewise.
12246
12247 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
12248
12249         PR remote/9665
12250         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12251         instead of remote_send.
12252         (remote_send): Remove.
12253
12254 2018-04-26  Pedro Alves  <palves@redhat.com>
12255
12256         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12257         find_function_start_sal instead of find_pc_line.
12258
12259 2018-04-26  Pedro Alves  <palves@redhat.com>
12260
12261         * breakpoint.c (set_breakpoint_location_function): Handle
12262         mst_data_gnu_ifunc.
12263         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12264         * elfread.c (elf_symtab_read): Give data symbols with
12265         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12266         (elf_rel_plt_read): Update comment.
12267         * linespec.c (convert_linespec_to_sals): Handle
12268         mst_data_gnu_ifunc.
12269         (minsym_found): Handle mst_data_gnu_ifunc.
12270         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12271         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12272         * parse.c (find_minsym_type_and_address): Handle
12273         mst_data_gnu_ifunc.
12274         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12275         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12276         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12277         comment.
12278         <mst_data_gnu_ifunc>: New enumerator.
12279
12280 2018-04-26  Pedro Alves  <palves@redhat.com>
12281
12282         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12283         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
12284         'want_trampoline' parameter by a lookup_msym_prefer parameter.
12285         Handle it.
12286         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12287         (lookup_minimal_symbol_by_pc): Adjust.
12288         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12289         (lookup_solib_trampoline_symbol_by_pc): Adjust.
12290         * minsyms.h (lookup_msym_prefer): New enum.
12291         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12292         parameter by a lookup_msym_prefer parameter.
12293
12294 2018-04-26  Pedro Alves  <palves@redhat.com>
12295
12296         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12297         ends in "@plt" instead of looking at the symbol's section.
12298
12299 2018-04-26  Pedro Alves  <palves@redhat.com>
12300
12301         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
12302         all references.
12303         (find_pc_partial_function_gnu_ifunc): Rename to ...
12304         (find_pc_partial_function): ... this, and remove references to
12305         'is_gnu_ifunc_p'.
12306         (find_pc_partial_function): Delete old implementation.
12307         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12308
12309 2018-04-26  Pedro Alves  <palves@redhat.com>
12310
12311         * linespec.c (struct bound_minimal_symbol_search_key): New.
12312         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
12313         skip first line if we found a GNU ifunc minimal symbol by name.
12314         (compare_msymbols): Change parameters to work with a destructured
12315         lhs minsym.
12316         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12317         functions.
12318
12319 2018-04-26  Pedro Alves  <palves@redhat.com>
12320
12321         * breakpoint.c (set_breakpoint_location_function): Don't resolve
12322         ifunc targets here.  Instead, if we have an ifunc minsym, use its
12323         address/name.
12324         (add_location_to_breakpoint): Store the minsym and the objfile in
12325         the breakpoint location.
12326         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12327         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12328         Record the minsym in the sal.
12329         * symtab.h (symtab_and_line) <msymbol>: New field.
12330
12331 2018-04-26  Pedro Alves  <palves@redhat.com>
12332
12333         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12334         unless we actually resolved the ifunc.
12335
12336 2018-04-26  Pedro Alves  <palves@redhat.com>
12337
12338         * c-exp.y (variable production): Prefer ifunc minsyms over
12339         regular function symbols.
12340         * symtab.c (find_gnu_ifunc): New function.
12341         * minsyms.h (lookup_msym_prefer): New enum.
12342         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12343         parameter by a lookup_msym_prefer parameter.
12344         * symtab.h (find_gnu_ifunc): New declaration.
12345
12346 2018-04-26  Pedro Alves  <palves@redhat.com>
12347
12348         * blockframe.c (find_gnu_ifunc_target_type): New function.
12349         (find_function_type): New.
12350         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12351         return a value with a memory address.
12352         (eval_call): For calls to GNU ifunc functions, try to find the
12353         type of the target function from the type that the resolver
12354         returns.
12355         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12356         symbols.
12357         * infcall.c (find_function_return_type): Delete.
12358         (find_function_addr): Add 'function_type' parameter.  For calls to
12359         GNU ifunc functions, try to find the type of the target function
12360         from the type that the resolver returns, and return it via
12361         FUNCTION_TYPE.
12362         (call_function_by_hand_dummy): Adjust to use the function type
12363         returned by find_function_addr.
12364         (find_function_addr): Add 'function_type' parameter and move
12365         description here.
12366         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12367         declarations.
12368
12369 2018-04-26  Pedro Alves  <palves@redhat.com>
12370
12371         * c-exp.y (variable production): Skip finding an alias for ifunc
12372         symbols.
12373
12374 2018-04-26  Pedro Alves  <palves@redhat.com>
12375
12376         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12377
12378 2018-04-25  Pedro Alves  <palves@redhat.com>
12379
12380         * infcmd.c (kill_command): Print the pid as string, not the whole
12381         thread's ptid.  Add comment.  s/has been killed/killed/ in output
12382         message.
12383         * remote.c (remote_detach_1): Print the pid as string, not the
12384         whole thread's ptid.
12385
12386 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
12387             Sergio Durigan Junior  <sergiodj@redhat.com>
12388             Pedro Alves  <palves@redhat.com>
12389
12390         * infcmd.c (kill_command): Print message when inferior has
12391         been killed.
12392         * inferior.c (print_inferior_events): Remove 'static'.  Set as
12393         '1'.
12394         (add_inferior): Improve message printed when
12395         'print_inferior_events' is on.
12396         (exit_inferior): Remove message printed when
12397         'print_inferior_events' is on.
12398         (detach_inferior): Improve message printed when
12399         'print_inferior_events' is on.
12400         (initialize_inferiors): Use 'add_inferior_silent' to set
12401         'current_inferior_'.
12402         * inferior.h (print_inferior_events): Declare here as
12403         'extern'.
12404         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12405         '[Detaching...]' messages when 'print_inferior_events' is on.
12406         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
12407         as prefix/suffix for messages.  Remove periods.  Fix erroneous
12408         'Detaching after fork from child...', replace it by '... from
12409         parent...'.
12410         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12411         prefix/suffix when printing 'Detaching...' messages.  Print
12412         them when 'print_inferior_events' is on.
12413         * remote.c (remote_detach_1): Print message when detaching
12414         from inferior and '!is_fork_parent'.
12415
12416 2018-04-24  Tom Tromey  <tom@tromey.com>
12417
12418         * cli-out.h: Reindent.
12419
12420 2018-04-24  Tom Tromey  <tom@tromey.com>
12421
12422         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12423         (cli_ui_out::do_field_string): Use fputs_filtered.
12424         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12425
12426 2018-04-23  Tom Tromey  <tom@tromey.com>
12427
12428         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12429         gdb::unique_xmalloc_ptr.
12430
12431 2018-04-23  Tom Tromey  <tom@tromey.com>
12432
12433         * configure: Rebuild.
12434
12435 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12436
12437         PR gdb/23095
12438         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12439         prepare_for_testing.  Set normal_bp to r_debug_state if target
12440         is bsd.
12441
12442 2018-04-21  Pedro Alves  <palves@redhat.com>
12443             Rajendra SY  <rajendra.sy@gmail.com>
12444
12445         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12446         * remote.c (extended_remote_attach): In all-stop mode, mark the
12447         thread as executing.
12448
12449 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12450
12451         * thread.c (thread_apply_all_command): Fix comment.
12452         (thread_command): Fix comment.
12453
12454 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12455
12456         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12457         parameter.
12458         * features/aarch64-core.c (create_feature_aarch64_core):
12459         Regenerate.
12460         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12461         Likewise.
12462         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12463         Likewise.
12464         * features/i386/32bit-avx512.c
12465         (create_feature_i386_32bit_avx512): Likewise.
12466         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12467         Likewise.
12468         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12469         Likewise.
12470         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12471         Likewise.
12472         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12473         Likewise.
12474         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12475         Likewise.
12476         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12477         Likewise.
12478         * features/i386/64bit-avx512.c
12479         (create_feature_i386_64bit_avx512): Likewise.
12480         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12481         Likewise.
12482         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12483         Likewise.
12484         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12485         Likewise.
12486         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12487         Likewise.
12488         * features/i386/64bit-segments.c
12489         (create_feature_i386_64bit_segments): Likewise.
12490         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12491         Likewise.
12492         * features/i386/x32-core.c
12493         (create_feature_i386_x32_core): Likewise.
12494         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12495         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12496         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12497         * target-descriptions.c: In generated code, don't pass xml
12498         filename.
12499
12500 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12501
12502         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12503         (print_xml_feature::visit_post): Likewise.
12504         (print_xml_feature::visit): Likewise.
12505         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12506         (print_xml_feature): Add new class.
12507         * regformats/regdat.sh: Null xmltarget on feature targets.
12508         * target-descriptions.c (struct target_desc): Add xmltarget.
12509         (maintenance_check_tdesc_xml_convert): Add unittest function.
12510         (tdesc_get_features_xml): Add function to get xml.
12511         (maintenance_check_xml_descriptions): Test xml generation.
12512         * xml-tdesc.c (string_read_description_xml): Add function.
12513         * xml-tdesc.h (string_read_description_xml): Add declaration.
12514
12515 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12516
12517         * features/Makefile: Add feature marker to targets with new style
12518         target descriptions.
12519         * regformats/aarch64.dat: Regenerate.
12520         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12521         * regformats/i386/amd64-avx-linux.dat: Likewise.
12522         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12523         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12524         * regformats/i386/amd64-linux.dat: Likewise.
12525         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12526         * regformats/i386/amd64.dat: Likewise.
12527         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12528         * regformats/i386/i386-avx-linux.dat: Likewise.
12529         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12530         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12531         * regformats/i386/i386-linux.dat: Likewise.
12532         * regformats/i386/i386-mmx-linux.dat: Likewise.
12533         * regformats/i386/i386-mpx-linux.dat: Likewise.
12534         * regformats/i386/i386.dat: Likewise.
12535         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12536         * regformats/i386/x32-avx-linux.dat: Likewise.
12537         * regformats/i386/x32-linux.dat: Likewise.
12538         * regformats/tic6x-c62x-linux.dat: Likewise.
12539         * regformats/tic6x-c64x-linux.dat: Likewise.
12540         * regformats/tic6x-c64xp-linux.dat: Likewise.
12541         * regformats/regdat.sh: Parse feature marker.
12542
12543 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12544
12545         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12546         (tdesc_osabi_name): Likewise.
12547         * target-descriptions.c (tdesc_architecture_name): Add new
12548         function.
12549         (tdesc_osabi_name): Likewise.
12550
12551 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12552
12553         * common/tdesc.c (tdesc_predefined_type): Move to here.
12554         (tdesc_named_type): Likewise.
12555         (tdesc_create_vector): Likewise.
12556         (tdesc_create_struct): Likewise.
12557         (tdesc_set_struct_size): Likewise.
12558         (tdesc_create_union): Likewise.
12559         (tdesc_create_flags): Likewise.
12560         (tdesc_create_enum): Likewise.
12561         (tdesc_add_field): Likewise.
12562         (tdesc_add_typed_bitfield): Likewise.
12563         (tdesc_add_bitfield): Likewise.
12564         (tdesc_add_flag): Likewise.
12565         (tdesc_add_enum_value): Likewise.
12566         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12567         (struct tdesc_type_vector): Likewise.
12568         (struct tdesc_type_field): Likewise.
12569         (struct tdesc_type_with_fields): Likewise.
12570         (tdesc_create_enum): Add declaration.
12571         (tdesc_add_typed_bitfield): Likewise.
12572         (tdesc_add_enum_value): Likewise.
12573         * target-descriptions.c (tdesc_type_field): Move from here.
12574         (tdesc_type_builtin): Likewise.
12575         (tdesc_type_vector): Likewise.
12576         (tdesc_type_with_fields): Likewise.
12577         (tdesc_predefined_types): Likewise.
12578         (tdesc_named_type): Likewise.
12579         (tdesc_create_vector): Likewise.
12580         (tdesc_create_struct): Likewise.
12581         (tdesc_set_struct_size): Likewise.
12582         (tdesc_create_union): Likewise.
12583         (tdesc_create_flags): Likewise.
12584         (tdesc_create_enum): Likewise.
12585         (tdesc_add_field): Likewise.
12586         (tdesc_add_typed_bitfield): Likewise.
12587         (tdesc_add_bitfield): Likewise.
12588         (tdesc_add_flag): Likewise.
12589         (tdesc_add_enum_value): Likewise.
12590         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12591         (tdesc_add_typed_bitfield): Likewise.
12592         (tdesc_add_enum_value): Likewise.
12593
12594 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12595
12596         * common/tdesc.c (tdesc_feature::accept): Move to here.
12597         (tdesc_feature::operator==): Likewise.
12598         (tdesc_create_reg): Likewise.
12599         * common/tdesc.h (tdesc_type_kind): Likewise.
12600         (struct tdesc_type): Likewise.
12601         (struct tdesc_feature): Likewise.
12602         * regformats/regdat.sh: Create a feature.
12603         * target-descriptions.c (tdesc_type_kind): Move from here.
12604         (tdesc_type): Likewise.
12605         (tdesc_type_up): Likewise.
12606         (tdesc_feature): Likewise.
12607         (tdesc_create_reg): Likewise.
12608
12609 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12610
12611         * Makefile.in: Add arch/tdesc.c
12612         * common/tdesc.c: New file.
12613         * common/tdesc.h (tdesc_element_visitor): Move to here.
12614         (tdesc_element): Likewise.
12615         (tdesc_reg): Likewise.
12616         (tdesc_reg_up): Likewise.
12617         * regformats/regdef.h (reg): Add offset to constructors.
12618         * target-descriptions.c (tdesc_element_visitor): Move from here.
12619         (tdesc_element): Likewise.
12620         (tdesc_reg): Likewise.
12621         (tdesc_reg_up): Likewise.
12622
12623 2018-04-17  Tom Tromey  <tom@tromey.com>
12624
12625         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12626         discriminant field.
12627
12628 2018-04-17  Tom Tromey  <tom@tromey.com>
12629
12630         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12631
12632 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12633
12634         * symtab.c (print_symbol_info): Skip printing filename and line
12635         number when `last' is NULL.
12636         (symtab_symbol_info): Use empty string instead of NULL for first
12637         invocation of print_symbol_info.
12638         (rbreak_command): Pass NULL to `last' parameter of
12639         print_symbol_info.
12640
12641 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12642
12643         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12644         instead of nullptr.
12645
12646 2018-04-16  Pedro Alves  <palves@redhat.com>
12647
12648         * MAINTAINERS (sh): Remove.
12649         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12650         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12651         (ALLDEPFILES): Remove sh64-tdep.c.
12652         * NEWS: Mentions that support for SH-5/SH64 is removed.
12653         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12654         (sh*-*-openbsd*): Ditto.
12655         (sh64-*-elf*): Remove.
12656         (sh*): Remove.
12657         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12658         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12659         * sh-tdep.c: No longer include "sh64-tdep.h".
12660         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12661         * sh64-tdep.c, sh64-tdep.h: Remove files.
12662
12663 2018-04-16  Pedro Alves  <palves@redhat.com>
12664
12665         * MAINTAINERS: Remove m88k.
12666         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12667         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12668         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12669         * NEWS: Mention that support for m88k was removed.
12670         * configure.host (m88*-*-*): Remove support.
12671         * configure.nat (m88k-*-*): Remove support.
12672         * configure.tgt (m88*-*-openbsd*): Remove.
12673         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12674
12675 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12676
12677         * configure.tgt (x86_tobjs): New variable.
12678         (amd64_tobjs, i386_tobjs): Use it.
12679
12680 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12681
12682         * symtab.c (print_symbol_info): Precede the symbol definition by
12683         the line number when available.
12684         * NEWS: Advertise this enhancement.
12685
12686 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12687
12688         * NEWS (New options): announce set/show record btrace cpu.
12689         * btrace.c: Include record-btrace.h.
12690         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12691         the vendor is unknown.
12692         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12693         Maybe overwrite the btrace configuration's cpu.
12694         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12695         (btrace_fetch): Add cpu parameter.  Update callers.
12696         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12697         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12698         errata workarounds if the vendor is unknown.
12699         * python/py-record-btrace.c: Include record-btrace.h.
12700         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12701         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12702         * record-btrace.c (record_btrace_cpu_state_kind): New.
12703         (record_btrace_cpu): New.
12704         (set_record_btrace_cpu_cmdlist): New.
12705         (record_btrace_get_cpu): New.
12706         (require_btrace_thread, record_btrace_info)
12707         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12708         (cmd_set_record_btrace_cpu_none): New.
12709         (cmd_set_record_btrace_cpu_auto): New.
12710         (cmd_set_record_btrace_cpu): New.
12711         (cmd_show_record_btrace_cpu): New.
12712         (_initialize_record_btrace): Initialize set/show record btrace cpu
12713         commands.
12714         * record-btrace.h (record_btrace_get_cpu): New.
12715
12716 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12717
12718         * record.c (set_record_command): Fix typo in message.
12719
12720 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12721
12722         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12723
12724 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12725
12726         * infrun.c (process_event_stop_test): Call
12727         gdbarch_in_indirect_branch_thunk.
12728         * gdbarch.sh (in_indirect_branch_thunk): New.
12729         * gdbarch.c: Regenerated.
12730         * gdbarch.h: Regenerated.
12731         * x86-tdep.h: New.
12732         * x86-tdep.c: New.
12733         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12734         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12735         (ALLDEPFILES): Add x86-tdep.c.
12736         * arch-utils.h (default_in_indirect_branch_thunk): New.
12737         * arch-utils.c (default_in_indirect_branch_thunk): New.
12738         * i386-tdep: Include x86-tdep.h.
12739         (i386_in_indirect_branch_thunk): New.
12740         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12741         function.
12742         * amd64-tdep: Include x86-tdep.h.
12743         (amd64_in_indirect_branch_thunk): New.
12744         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12745
12746 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12747
12748         PR gdb/23053
12749         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12750         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12751         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12752         regression.
12753
12754 2018-04-12  Tom Tromey  <tom@tromey.com>
12755
12756         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12757         (rust_evaluate_subexp): Likewise.
12758
12759 2018-04-12  Pedro Alves  <palves@redhat.com>
12760
12761         * procfs.c (procfs_detach): Make forward declaration's prototype
12762         match definition's protototype.
12763         (proc_get_LDT_entry): Remove stale do_cleanups call.
12764
12765 2018-04-12  Pedro Alves  <palves@redhat.com>
12766
12767         * target.h (target_ops::to_has_exited): Delete.
12768         (target_has_exited): Delete.
12769         * target-delegates.c: Regenerate.
12770
12771 2018-04-11  Pedro Alves  <palves@redhat.com>
12772
12773         * target.c (fileio_fh_t::t): Add comment.
12774         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12775         (target_fileio_close): Handle a NULL target.
12776         (invalidate_fileio_fh): New.
12777         (target_close): Call it.
12778         * remote.c (remote_hostio_send_command): No longer check whether
12779         remote_desc is open.
12780
12781 2018-04-11  Pedro Alves  <palves@redhat.com>
12782
12783         * target.c (fileio_fh_t): Make it a named struct instead of a
12784         typedef.
12785         (fileio_fh_t::is_closed): New method.
12786         (DEF_VEC_O (fileio_fh_t)): Remove.
12787         (fileio_fhandles): Now a std::vector.
12788         (is_closed_fileio_fh): Delete.
12789         (acquire_fileio_fd): Adjust.  Rename parameters.
12790         (release_fileio_fd): Adjust.
12791         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12792         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12793         (target_fileio_close): Adjust.
12794
12795 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12796
12797         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12798         index.
12799
12800 2018-04-10  Pedro Alves  <palves@redhat.com>
12801
12802         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12803         (scoped_finish_thread_state): New class.
12804         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12805         cleanup.
12806         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12807         (fetch_inferior_event, normal_stop): Likewise.
12808         * thread.c (finish_thread_state_cleanup): Delete.
12809
12810 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12811             Pedro Alves  <palves@redhat.com>
12812
12813         * value.c: Include "selftest.h" and "common/array-view.h".
12814         (struct range) <operator ==>: New.
12815         (test_ranges_contain): New.
12816         (check_ranges_vector): New.
12817         (test_insert_into_bit_range_vector): New.
12818         (_initialize_values): Register selftests.
12819         * common/array-view.h (operator==, operator!=): New.
12820
12821 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12822
12823         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12824         an iterator.
12825         * inline-frame.c: Include <algorithm>.
12826         (struct inline_state): Add constructor.
12827         (inline_state_s): Remove.
12828         (DEF_VEC_O(inline_state_s)): Remove.
12829         (inline_states): Change type to std::vector.
12830         (find_inline_frame_state): Adjust to std::vector.
12831         (allocate_inline_frame_state): Remove.
12832         (clear_inline_frame_state): Adjust to std::vector.
12833         (skip_inline_frames): Adjust to std::vector.
12834
12835 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12836
12837         * tracepoint.h (struct trace_state_variable): Add constructor.
12838         <name>: Change type to std::string.
12839         * tracepoint.c (tsv_s): Remove.
12840         (DEF_VEC_O(tsv_s)): Remove.
12841         (tvariables): Change to std::vector.
12842         (create_trace_state_variable): Adjust to std::vector.
12843         (find_trace_state_variable): Likewise.
12844         (find_trace_state_variable_by_number): Likewise.
12845         (delete_trace_state_variable): Likewise.
12846         (trace_variable_command): Adjust to std::string.
12847         (delete_trace_variable_command): Likewise.
12848         (tvariables_info_1): Adjust to std::vector.
12849         (save_trace_state_variables): Likewise.
12850         (start_tracing): Likewise.
12851         (merge_uploaded_trace_state_variables): Adjust to std::vector
12852         and std::string.
12853         * target.h (struct target_ops)
12854         <to_download_trace_state_variable>: Pass reference to
12855         trace_state_variable.
12856         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12857         * target-delegates.c: Re-generate.
12858         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12859         (mi_tsv_deleted): Likewise.
12860         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12861         * remote.c (remote_download_trace_state_variable): Change
12862         pointer to reference and adjust.
12863         * make-target-delegates (parse_argtypes): Handle references.
12864         (write_function_header): Likewise.
12865         (munge_type): Likewise.
12866
12867 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12868
12869         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12870         string_view-selftests.c.
12871         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12872         testsuite.
12873         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12874         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12875         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12876         * unittests/basic_string_view/element_access/char/1.cc:
12877         Likewise.
12878         * unittests/basic_string_view/element_access/char/empty.cc:
12879         Likewise.
12880         * unittests/basic_string_view/element_access/char/front_back.cc:
12881         Likewise.
12882         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12883         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12884         Likewise.
12885         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12886         Likewise.
12887         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12888         Likewise.
12889         * unittests/basic_string_view/operations/compare/char/1.cc:
12890         Likewise.
12891         * unittests/basic_string_view/operations/compare/char/13650.cc:
12892         Likewise.
12893         * unittests/basic_string_view/operations/copy/char/1.cc:
12894         Likewise.
12895         * unittests/basic_string_view/operations/data/char/1.cc:
12896         Likewise.
12897         * unittests/basic_string_view/operations/find/char/1.cc:
12898         Likewise.
12899         * unittests/basic_string_view/operations/find/char/2.cc:
12900         Likewise.
12901         * unittests/basic_string_view/operations/find/char/3.cc:
12902         Likewise.
12903         * unittests/basic_string_view/operations/find/char/4.cc:
12904         Likewise.
12905         * unittests/basic_string_view/operations/rfind/char/1.cc:
12906         Likewise.
12907         * unittests/basic_string_view/operations/rfind/char/2.cc:
12908         Likewise.
12909         * unittests/basic_string_view/operations/rfind/char/3.cc:
12910         Likewise.
12911         * unittests/basic_string_view/operations/substr/char/1.cc:
12912         Likewise.
12913         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12914         * unittests/string_view-selftests.c: New file.
12915
12916 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12917
12918         * unittests/basic_string_view/capacity/1.cc: New file.
12919         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12920         * unittests/basic_string_view/cons/char/1.cc: New file.
12921         * unittests/basic_string_view/cons/char/2.cc: New file.
12922         * unittests/basic_string_view/cons/char/3.cc: New file.
12923         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12924         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12925         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12926         * unittests/basic_string_view/element_access/char/1.cc: New file.
12927         * unittests/basic_string_view/element_access/char/2.cc: New file.
12928         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12929         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12930         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12931         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12932         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12933         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12934         * unittests/basic_string_view/include.cc: New file.
12935         * unittests/basic_string_view/inserters/char/1.cc: New file.
12936         * unittests/basic_string_view/inserters/char/2.cc: New file.
12937         * unittests/basic_string_view/inserters/char/3.cc: New file.
12938         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12939         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12940         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12941         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12942         * unittests/basic_string_view/literals/types.cc: New file.
12943         * unittests/basic_string_view/literals/values.cc: New file.
12944         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12945         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12946         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12947         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12948         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12949         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12950         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12951         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12952         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12953         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12954         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12955         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12956         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12957         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12958         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12959         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12960         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12961         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12962         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12963         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12964         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12965         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12966         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12967         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12968         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12969         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12970         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12971         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12972         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12973         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12974         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12975         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12976         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12977         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12978         * unittests/basic_string_view/operators/char/2.cc: New file.
12979         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12980         * unittests/basic_string_view/range_access/char/1.cc: New file.
12981         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12982         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12983         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12984         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12985         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12986         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12987         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12988         * unittests/basic_string_view/typedefs.cc: New file.
12989         * unittests/basic_string_view/types/1.cc: New file.
12990
12991 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12992
12993         * common/gdb_string_view.h: Remove libstdc++ implementation
12994         details, adjust to gdb reality.
12995         * common/gdb_string_view.tcc: Likewise.
12996         * cli/cli-script.c (struct string_view): Remove.
12997         (user_args) <m_args>: Change element type to gdb::string_view.
12998         (user_args::insert_args): Adjust.
12999
13000 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13001
13002         * common/gdb_string_view.h: New file.
13003         * common/gdb_string_view.tcc: New file.
13004
13005 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13006
13007         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
13008         * configure: Re-generate.
13009
13010 2018-04-09  Pedro Alves  <palves@redhat.com>
13011
13012         * gdbarch.sh: Include "observable.h" instead of "observer.h".
13013         (set_target_gdbarch): Call
13014         gdb::observers::architecture_changed.notify instead of
13015         observer_notify_architecture_changed.
13016
13017 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13018
13019         * tracepoint.c (struct current_traceframe_cleanup): Remove.
13020         (do_restore_current_traceframe_cleanup): Remove.
13021         (restore_current_traceframe_cleanup_dtor): Remove.
13022         (make_cleanup_restore_current_traceframe): Remove.
13023         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
13024         New.
13025         * tracepoint.h (struct scoped_restore_current_traceframe): New.
13026         * infrun.c (fetch_inferior_event): Use
13027         scoped_restore_current_traceframe.
13028
13029 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13030
13031         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
13032         Remove.
13033         <n_allocated_type_units>: Remove.
13034         <all_type_units>: Change to std::vector.
13035         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13036         to std::vector change.
13037         (dwarf2_per_objfile::get_cutu): Likewise.
13038         (dwarf2_per_objfile::get_tu): Likewise.
13039         (create_signatured_type_table_from_index): Likewise.
13040         (create_signatured_type_table_from_debug_names): Likewise.
13041         (dw2_symtab_iter_next): Likewise.
13042         (dw2_print_stats): Likewise.
13043         (dw2_expand_all_symtabs): Likewise.
13044         (dw2_expand_marked_cus): Likewise.
13045         (dw2_debug_names_iterator::next): Likewise.
13046         (dwarf2_initialize_objfile): Likewise.
13047         (add_signatured_type_cu_to_table): Likewise.
13048         (create_all_type_units): Likewise.
13049         (add_type_unit): Likewise.
13050         (struct tu_abbrev_offset): Add constructor.
13051         (build_type_psymtabs_1): Adjust to std::vector change.
13052         (print_tu_stats): Likewise.
13053         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13054         (write_debug_names): Likewise.
13055
13056 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13057
13058         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13059         Make an std::vector.
13060         <n_comp_units>: Remove.
13061         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13062         to std::vector change.
13063         (dwarf2_per_objfile::get_cutu): Likewise.
13064         (dwarf2_per_objfile::get_cu): Likewise.
13065         (create_cus_from_index): Likewise.
13066         (create_addrmap_from_index): Likewise.
13067         (create_addrmap_from_aranges): Likewise.
13068         (dwarf2_read_index): Likewise.
13069         (dw2_find_last_source_symtab): Likewise.
13070         (dw2_map_symtabs_matching_filename): Likewise.
13071         (dw2_symtab_iter_next): Likewise.
13072         (dw2_print_stats): Likewise.
13073         (dw2_expand_all_symtabs): Likewise.
13074         (dw2_expand_symtabs_with_fullname): Likewise.
13075         (dw2_expand_marked_cus): Likewise.
13076         (dw2_map_symbol_filenames): Likewise.
13077         (create_cus_from_debug_names): Likewise.
13078         (dwarf2_read_debug_names): Likewise.
13079         (dw2_debug_names_iterator::next): Likewise.
13080         (dwarf2_initialize_objfile): Likewise.
13081         (set_partial_user): Likewise.
13082         (dwarf2_build_psymtabs_hard): Likewise.
13083         (read_comp_units_from_section): Remove arguments, adjust to
13084         std::vector change.
13085         (create_all_comp_units): Adjust to std::vector and
13086         read_comp_units_from_section changes.
13087         (dwarf2_find_containing_comp_unit): Adjust to std::vector
13088         change.
13089         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13090         (psyms_seen_size): Likewise.
13091         (write_gdbindex): Likewise.
13092         (write_debug_names): Likewise.
13093
13094 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13095
13096         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13097         with dwarf2_per_objfile.
13098         (create_cus_from_index): Likewise.
13099         (create_signatured_type_table_from_index): Likewise.
13100         (dwarf2_read_index): Likewise.
13101         (dwarf2_initialize_objfile): Likewise.
13102         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
13103         per_cu rather than get_dwarf2_per_objfile.
13104
13105 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13106
13107         * dwarf2read.h (struct signatured_type): Forward declare.
13108         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13109         New methods.
13110         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13111         (dw2_get_cutu): ...this.
13112         (dwarf2_per_objfile::get_cu): Rename from...
13113         (dw2_get_cu): ...this.
13114         (dwarf2_per_objfile::get_tu): New.
13115         (create_addrmap_from_index): Adjust.
13116         (create_addrmap_from_aranges): Adjust.
13117         (dw2_find_last_source_symtab): Adjust.
13118         (dw2_map_symtabs_matching_filename): Adjust.
13119         (dw2_symtab_iter_next): Adjust.
13120         (dw2_print_stats): Adjust.
13121         (dw2_expand_all_symtabs): Adjust.
13122         (dw2_expand_symtabs_with_fullname): Adjust.
13123         (dw2_expand_marked_cus): Adjust.
13124         (dw_expand_symtabs_matching_file_matcher): Adjust.
13125         (dw2_map_symbol_filenames): Adjust.
13126         (dw2_debug_names_iterator::next): Adjust.
13127         (dwarf2_initialize_objfile): Adjust.
13128         (set_partial_user): Adjust.
13129         (dwarf2_build_psymtabs_hard): Adjust.
13130
13131 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13132
13133         * dwarf2read.c (create_signatured_type_table_from_debug_names):
13134         Remove unused variables.
13135         (dw2_map_symtabs_matching_filename): Likewise.
13136         (dwarf2_record_block_ranges): Likewise.
13137         (dwarf2_read_addr_index): Likewise.
13138         (follow_die_offset): Likewise.
13139
13140 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13141
13142         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13143         to symbol_file_add_main.
13144
13145 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13146
13147         PR mi/22299
13148         * mi/mi-console.c (do_fputc_async_safe): New.
13149         (mi_console_file::write_async_safe): New.
13150         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13151         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13152         New.
13153         * ui-file.c (ui_file::putstrn): Adjust call to
13154         fputstrn_unfiltered.
13155         * utils.c (printchar): Replace do_fputs and do_fprintf
13156         parameters by do_fputc.
13157         (fputstr_filtered): Adjust call to printchar.
13158         (fputstr_unfiltered): Likewise.
13159         (fputstrn_filtered): Likewise.
13160         (fputstrn_unfiltered): Add do_fputc parameter, pass to
13161         printchar.
13162         * utils.h (do_fputc_ftype): New typedef.
13163         (fputstrn_unfiltered): Add do_fputc parameter.
13164
13165 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13166
13167         * regformats/i386/i386-avx.dat: Remove.
13168
13169 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13170
13171         PR gdb/22979
13172         * amd64-tdep.c (amd64_none_init_abi): New function.
13173         (amd64_x32_none_init_abi): New function.
13174         (_initialize_amd64_tdep): Register handlers for x86-64 and
13175         x64_32 with GDB_OSABI_NONE.
13176         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13177         GDB_OSABI_NONE osabi.
13178
13179 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13180
13181         PR gdb/22980
13182         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13183         GDB_OSABI_NONE.
13184         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13185         * osabi.c (gdb_osabi_names): Add "unknown" entry.
13186
13187 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13188
13189         * common/byte-vector.h (char_vector): New type.
13190         * target.h (target_read_alloc): Return
13191         gdb::optional<byte_vector>.
13192         (target_read_stralloc): Return gdb::optional<char_vector>.
13193         (target_get_osdata): Return gdb::optional<char_vector>.
13194         * target.c (target_read_alloc_1): Templatize.  Replacement
13195         manual memory management with vector.
13196         (target_read_alloc): Change return type, adjust.
13197         (target_read_stralloc): Change return type, adjust.
13198         (target_get_osdata): Change return type, adjust.
13199         * auxv.c (struct auxv_info) <length>: Remove.
13200         <data>: Change type to gdb::optional<byte_vector>.
13201         (auxv_inferior_data_cleanup): Free auxv_info with delete.
13202         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13203         (target_auxv_search): Adjust.
13204         (fprint_target_auxv): Adjust.
13205         * avr-tdep.c (avr_io_reg_read_command): Adjust.
13206         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13207         (linux_make_corefile_notes): Adjust.
13208         * osdata.c (get_osdata): Adjust.
13209         * remote.c (remote_get_threads_with_qxfer): Adjust.
13210         (remote_memory_map): Adjust.
13211         (remote_traceframe_info): Adjust.
13212         (btrace_read_config): Adjust.
13213         (remote_read_btrace): Adjust.
13214         (remote_pid_to_exec_file): Adjust.
13215         * solib-aix.c (solib_aix_get_library_list): Adjust.
13216         * solib-dsbt.c (decode_loadmap): Don't free buf.
13217         (dsbt_get_initial_loadmaps): Adjust.
13218         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13219         * solib-target.c (solib_target_current_sos): Adjust.
13220         * tracepoint.c (sdata_make_value): Adjust.
13221         * xml-support.c (xinclude_start_include): Adjust.
13222         (xml_fetch_content_from_file): Adjust.
13223         * xml-support.h (xml_fetch_another): Change return type.
13224         (xml_fetch_content_from_file): Change return type.
13225         * xml-syscall.c (xml_init_syscalls_info): Adjust.
13226         * xml-tdesc.c (file_read_description_xml): Adjust.
13227         (fetch_available_features_from_target): Change return type.
13228         (target_fetch_description_xml): Adjust.
13229         (target_read_description_xml): Adjust.
13230
13231 2018-04-06  Tom Tromey  <tom@tromey.com>
13232
13233         * value.c (~value): Update.
13234         (struct value) <contents>: Now unique_xmalloc_ptr.
13235         (value_contents_bits_eq, allocate_value_contents)
13236         (value_contents_raw, value_contents_all_raw)
13237         (value_contents_for_printing, value_contents_for_printing_const)
13238         (set_value_enclosing_type): Update.
13239
13240 2018-04-06  Tom Tromey  <tom@tromey.com>
13241
13242         * value.c (range_s): Remove typedef, VEC.
13243         (struct range): Add operator<.
13244         (range_lessthan): Remove.
13245         (ranges_contain): Change type.
13246         (~value): Update.
13247         (struct value) <unavailable, optimized_out>: Now std::vector.
13248         (value_entirely_available)
13249         (value_entirely_covered_by_range_vector)
13250         (value_entirely_unavailable, value_entirely_optimized_out):
13251         Update.
13252         (insert_into_bit_range_vector): Change argument type.
13253         (find_first_range_overlap): Likewise.
13254         (struct ranges_and_idx, value_contents_bits_eq)
13255         (require_not_optimized_out, require_available): Update.
13256         (ranges_copy_adjusted): Change argument types.
13257         (value_optimized_out, value_copy, value_fetch_lazy): Update.
13258
13259 2018-04-06  Tom Tromey  <tom@tromey.com>
13260
13261         * value.c (~value): Update.
13262         (struct value) <parent>: Now a value_ref_ptr.
13263         (value_parent, set_value_parent, value_address, value_copy):
13264         Update.
13265
13266 2018-04-06  Tom Tromey  <tom@tromey.com>
13267
13268         * value.c (struct value): Add constructor, destructor, and member
13269         initializers.
13270         (allocate_value_lazy, value_decref): Update.
13271
13272 2018-04-06  Tom Tromey  <tom@tromey.com>
13273
13274         * value.c (struct value) <released, next>: Remove.
13275         (all_values): Now a std::vector.
13276         (allocate_value_lazy): Update.
13277         (value_next): Remove.
13278         (value_mark, value_free_to_mark, release_value)
13279         (value_release_to_mark): Update.
13280
13281 2018-04-06  Tom Tromey  <tom@tromey.com>
13282
13283         * value.h (fetch_subexp_value, value_release_to_mark): Update.
13284         (free_value_chain): Remove.
13285         * value.c (free_value_chain): Remove.
13286         (value_release_to_mark): Return a std::vector.
13287         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13288         std::vector.
13289         (check_condition): Update.
13290         * eval.c (fetch_subexp_value): Change "val_chain" to a
13291         std::vector.
13292         * breakpoint.c (update_watchpoint): Update.
13293         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13294
13295 2018-04-06  Tom Tromey  <tom@tromey.com>
13296
13297         * value.h (free_all_values): Remove.
13298         * value.c (free_all_values): Remove.
13299
13300 2018-04-06  Tom Tromey  <tom@tromey.com>
13301
13302         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13303         (value_history_chain, value_history_count): Remove.
13304         (value_history): New global.
13305         (record_latest_value, access_value_history, show_values)
13306         (preserve_values): Update.
13307
13308 2018-04-06  Tom Tromey  <tom@tromey.com>
13309
13310         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13311         * varobj.c (varobj_set_display_format, varobj_set_value)
13312         (install_default_visualizer, construct_visualizer)
13313         (install_new_value, ~varobj, varobj_get_value_type)
13314         (my_value_of_variable, varobj_editable_p): Update.
13315         * c-varobj.c (c_describe_child, c_value_of_variable)
13316         (cplus_number_of_children, cplus_describe_child): Update.
13317         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13318         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13319         (ada_value_of_variable, ada_value_is_changeable_p): Update.
13320
13321 2018-04-06  Tom Tromey  <tom@tromey.com>
13322
13323         * printcmd.c (last_examine_address): Change type to
13324         value_ref_ptr.
13325         (do_examine, x_command): Update.
13326
13327 2018-04-06  Tom Tromey  <tom@tromey.com>
13328
13329         * value.c (release_value): Update.
13330         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13331         (struct bpstats) <val>: Now a value_ref_ptr.
13332         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13333         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13334         (~watchpoint, print_it_watchpoint, watch_command_1)
13335         (invalidate_bp_value_on_memory_change): Update.
13336
13337 2018-04-06  Tom Tromey  <tom@tromey.com>
13338
13339         * varobj.c (varobj_clear_saved_item)
13340         (update_dynamic_varobj_children, install_new_value, ~varobj):
13341         Update.
13342         * value.h (value_incref): Move declaration earlier.
13343         (value_decref): Rename from value_free.
13344         (struct value_ref_policy): New.
13345         (value_ref_ptr): New typedef.
13346         (struct value_deleter): Remove.
13347         (gdb_value_up): Remove typedef.
13348         (release_value): Change return type.
13349         (release_value_or_incref): Remove.
13350         * value.c (set_value_parent): Update.
13351         (value_incref): Change return type.
13352         (value_decref): Rename from value_free.
13353         (value_free_to_mark, free_all_values, free_value_chain): Update.
13354         (release_value): Return value_ref_ptr.
13355         (release_value_or_incref): Remove.
13356         (record_latest_value, set_internalvar, clear_internalvar):
13357         Update.
13358         * stack.c (info_frame_command): Don't call value_free.
13359         * python/py-value.c (valpy_dealloc, valpy_new)
13360         (value_to_value_object): Update.
13361         * printcmd.c (do_examine): Update.
13362         * opencl-lang.c (lval_func_free_closure): Update.
13363         * mi/mi-main.c (register_changed_p): Don't call value_free.
13364         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13365         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13366         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13367         value_free.
13368         * guile/scm-value.c (vlscm_free_value_smob)
13369         (vlscm_scm_from_value): Update.
13370         * frame.c (frame_register_unwind, frame_unwind_register_signed)
13371         (frame_unwind_register_unsigned, get_frame_register_bytes)
13372         (put_frame_register_bytes): Don't call value_free.
13373         * findvar.c (address_from_register): Don't call value_free.
13374         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13375         * dwarf2loc.c (entry_data_value_free_closure)
13376         (value_of_dwarf_reg_entry, free_pieced_value_closure)
13377         (dwarf2_evaluate_loc_desc_full): Update.
13378         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13379         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13380         (~watchpoint, watch_command_1)
13381         (invalidate_bp_value_on_memory_change): Update.
13382         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13383
13384 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
13385
13386         PR gdb/23022
13387         * warning.m4: Add -Wno-error=deprecated-register.
13388         * configure: Re-generate.
13389
13390 2018-04-05  Tom Tromey  <tom@tromey.com>
13391
13392         * linespec.h: Remove include of "vec.h".
13393
13394 2018-04-05  Tom Tromey  <tom@tromey.com>
13395
13396         * linespec.c (typep): Remove typedef.
13397         (find_methods, find_superclass_methods): Take a std::vector.
13398         (find_method): Use std::vector.
13399
13400 2018-04-05  Tom Tromey  <tom@tromey.com>
13401
13402         * utils.c (compare_strings): Remove.
13403         * utils.h (compare_strings): Remove.
13404         * objc-lang.h (find_imps): Update.
13405         * objc-lang.c (find_methods): Take a std::vector.
13406         (uniquify_strings, find_imps): Likewise.
13407         * linespec.c (find_methods): Take a std::vector.
13408         (decode_objc): Use std::vector.
13409         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13410         a std::vector.
13411         (find_method, find_function_symbols): Use std::vector.
13412
13413 2018-04-05  Tom Tromey  <tom@tromey.com>
13414
13415         * completer.c (completion_tracker::completion_tracker): Remove
13416         cast.
13417         (completion_tracker::discard_completions): Likewise.
13418         * breakpoint.c (ambiguous_names_p): Remove cast.
13419         * ada-lang.c (_initialize_ada_language): Remove cast.
13420         * utils.h (streq): Update.
13421         (streq_hash): Add new declaration.
13422         * utils.c (streq): Return bool.
13423         (streq_hash): New function.
13424
13425 2018-04-05  Tom Tromey  <tom@tromey.com>
13426
13427         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13428         Remove a string copy.
13429
13430 2018-04-05  Tom Tromey  <tom@tromey.com>
13431
13432         * linespec.c (filter_results): Use std::vector.
13433         (decode_line_2, decode_line_full): Update.
13434
13435 2018-04-05  Tom Tromey  <tom@tromey.com>
13436
13437         * linespec.c (canonical_to_fullform): Return std::string.
13438         (filter_results): Update.
13439         (struct decode_line_2_item): Add constructor.
13440         <fullform, displayform>: Now std::string.
13441         (decode_line_2_compare_items): Now a std::sort comparator.
13442         (decode_line_2): Update.
13443
13444 2018-04-05  Tom Tromey  <tom@tromey.com>
13445
13446         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13447         (unexpected_linespec_error): Update.
13448         (linespec_parse_basic, parse_linespec): Update.
13449
13450 2018-04-05  Tom Tromey  <tom@tromey.com>
13451
13452         * linespec.c (linespec_parse_basic): Reindent.
13453
13454 2018-04-05  Tom Tromey  <tom@tromey.com>
13455
13456         * minsyms.h (iterate_over_minimal_symbols): Update.
13457         * minsyms.c (iterate_over_minimal_symbols): Take a
13458         gdb::function_view.
13459         * linespec.c (struct collect_minsyms): Remove.
13460         (compare_msyms): Now a std::sort comparator.
13461         (add_minsym): Add parameters.
13462         (search_minsyms_for_name): Update.  Use std::vector.
13463
13464 2018-04-03  Tom Tromey  <tom@tromey.com>
13465
13466         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13467         gdb::byte_vector.
13468
13469 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13470
13471         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13472
13473 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13474
13475         PR gdb/16959
13476         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13477         printing static type.
13478
13479 2018-04-01  Tom Tromey  <tom@tromey.com>
13480
13481         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13482         (rs6000_xfer_shared_libraries): Update.
13483
13484 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13485
13486         * common/gdb_vecs.h (char_ptr): Remove.
13487         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13488
13489 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13490
13491         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13492         with std::vector.
13493         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13494
13495 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13496
13497         * tracepoint.h (struct uploaded_tp): Initialize fields.
13498         <actions, step_actions, cmd_strings>: Change type to
13499         std::vector<char *>.
13500         * tracepoint.c (get_uploaded_tp): Allocate with new.
13501         (free_uploaded_tps): Free with delete.
13502         (parse_tracepoint_definition): Adjust to std::vector change.
13503         * breakpoint.c (read_uploaded_action): Likewise.
13504         (create_tracepoint_from_upload): Likewise.
13505         * ctf.c (ctf_write_uploaded_tp): Likewise.
13506         (SET_ARRAY_FIELD): Likewise.
13507         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13508
13509 2018-03-30  Tom Tromey  <tom@tromey.com>
13510
13511         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13512         std::unique_ptr.
13513         (svr4_keep_data_in_core): Update.
13514         (svr4_read_so_list): Update.
13515
13516 2018-03-30  Tom Tromey  <tom@tromey.com>
13517
13518         * windows-nat.c (handle_output_debug_string, handle_exception):
13519         Update.
13520         * target.h (target_read_string): Update.
13521         * target.c (target_read_string): Change "string" to
13522         unique_xmalloc_ptr.
13523         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13524         Update.
13525         * solib-frv.c (frv_current_sos): Update.
13526         * solib-dsbt.c (dsbt_current_sos): Update.
13527         * solib-darwin.c (darwin_current_sos): Update.
13528         * linux-thread-db.c (inferior_has_bug): Update.
13529         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13530         Update.  Remove alloca.
13531         * ada-lang.c (ada_main_name): Update.
13532
13533 2018-03-30  Tom Tromey  <tom@tromey.com>
13534
13535         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13536         (struct dwo_file_deleter): New.
13537         (dwo_file_up): New typedef.
13538         (open_and_init_dwo_file): Use dwo_file_up.
13539         (free_dwo_file_cleanup): Remove.
13540
13541 2018-03-30  Tom Tromey  <tom@tromey.com>
13542
13543         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13544         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13545
13546 2018-03-30  Tom Tromey  <tom@tromey.com>
13547
13548         * dwarf2read.c (class free_cached_comp_units): New class.
13549         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13550         (free_cached_comp_units): Remove function.
13551
13552 2018-03-30  Tom Tromey  <tom@tromey.com>
13553
13554         * utils.h (make_cleanup_unpush_target): Remove.
13555         * inf-ptrace.c (struct target_unpusher): New.
13556         (target_unpush_up) New typedef.
13557         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13558         target_unpush_up.
13559         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13560
13561 2018-03-27  Tom Tromey  <tom@tromey.com>
13562
13563         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13564
13565 2018-03-27  Pedro Alves  <palves@redhat.com>
13566             Tom Tromey  <tom@tromey.com>
13567
13568         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13569         destructor.  Now a class.
13570         (gdb_readline_wrapper_cleanup): Remove function.
13571         (gdb_readline_wrapper): Remove cleanups.
13572
13573 2018-03-27  Tom Tromey  <tom@tromey.com>
13574
13575         * typeprint.h (struct type_print_options) <local_typedefs,
13576         global_typedefs>: Remove "struct" keyword.
13577         (class typedef_hash_table): New class.
13578         (recursively_update_typedef_hash, add_template_parameters)
13579         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13580         (find_typedef_in_hash): Don't declare.
13581         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13582         (typedef_hash_table::recursively_update): Rename from
13583         recursively_update_typedef_hash.  Now a member.
13584         (typedef_hash_table::add_template_parameters): Rename from
13585         add_template_parameters.  Now a member.
13586         (typedef_hash_table::typedef_hash_table): Now a constructor;
13587         rename from create_typedef_hash.
13588         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13589         rename from free_typedef_hash.
13590         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13591         (do_free_global_table): Remove.
13592         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13593         from copy_type_recursive.
13594         (create_global_typedef_table): Remove.
13595         (typedef_hash_table::find_global_typedef): Now a member of
13596         typedef_hash_table.
13597         (typedef_hash_table::find_typedef): Rename from
13598         find_typedef_in_hash; now a member.
13599         (whatis_exp): Update.
13600         * extension.h (struct ext_lang_type_printers): Add constructor and
13601         destructor.
13602         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13603         declare.
13604         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13605         Now a constructor; rename from start_ext_lang_type_printers.
13606         (ext_lang_type_printers): Now a destructor; rename from
13607         free_ext_lang_type_printers.
13608         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13609         Update.
13610         (c_type_print_base_struct_union): Update.  Remove cleanups.
13611
13612 2018-03-27  Tom Tromey  <tom@tromey.com>
13613
13614         * dwarf-index-write.c: Include <cmath>.
13615
13616 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13617
13618         * NEWS: Add entry describing new "set|show varsize-limit" command.
13619         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13620         command.
13621         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13622         "set variable".
13623
13624 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13625
13626         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13627         dwarf-index-write.c
13628         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13629         * dwarf-index-common.c: New file.
13630         * dwarf-index-common.h: New file.
13631         * dwarf-index-write.c: New file.
13632         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13633         (struct dwarf2_section_info): Move from here.
13634         (dwarf2_section_info_def): Likewise.
13635         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13636         (offset_type): Likewise.
13637         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13638         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13639         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13640         (byte_swap): Likewise.
13641         (MAYBE_SWAP): Likewise.
13642         (dwarf2_per_cu_ptr): Likewise.
13643         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13644         (struct tu_stats): Likewise.
13645         (struct dwarf2_per_objfile): Likewise.
13646         (struct dwarf2_per_cu_data): Likewise.
13647         (struct signatured_type): Likewise.
13648         (sig_type_ptr): Likewise.
13649         (DEF_VEC_P (sig_type_ptr)): Likewise.
13650         (INDEX4_SUFFIX): Likewise.
13651         (INDEX5_SUFFIX): Likewise.
13652         (DEBUG_STR_SUFFIX): Likewise.
13653         (dwarf2_read_section): Make non-static.
13654         (mapped_index_string_hash): Move from here.
13655         (dwarf5_djb_hash): Likewise.
13656         (file_write): Likewise.
13657         (class data_buf): Likewise.
13658         (struct symtab_index_entry): Likewise.
13659         (struct mapped_symtab): Likewise.
13660         (find_slot): Likewise.
13661         (hash_expand): Likewise.
13662         (add_index_entry): Likewise.
13663         (uniquify_cu_indices): Likewise.
13664         (class c_str_view): Likewise.
13665         (class c_str_view_hasher): Likewise.
13666         (class vector_hasher): Likewise.
13667         (write_hash_table): Likewise.
13668         (psym_index_map): Likewise.
13669         (struct addrmap_index_data): Likewise.
13670         (add_address_entry): Likewise.
13671         (add_address_entry_worker): Likewise.
13672         (write_address_map): Likewise.
13673         (symbol_kind): Likewise.
13674         (write_psymbols): Likewise.
13675         (struct signatured_type_index_data): Likewise.
13676         (write_one_signatured_type): Likewise.
13677         (recursively_count_psymbols): Likewise.
13678         (recursively_write_psymbols): Likewise.
13679         (class debug_names): Likewise.
13680         (check_dwarf64_offsets): Likewise.
13681         (psyms_seen_size): Likewise.
13682         (write_gdbindex): Likewise.
13683         (write_debug_names): Likewise.
13684         (assert_file_size): Likewise.
13685         (write_psymtabs_to_index): Likewise.
13686         (save_gdb_index_command): Likewise.
13687         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13688         command.
13689         * dwarf2read.h: New file.
13690
13691 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13692
13693         PR gdb/22670
13694         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13695         symbol name if the CU's language stores symbol names in linkage
13696         format.
13697         * language.h (struct language_defn)
13698         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13699         all instances of this struct.
13700
13701 2018-03-26  Tom Tromey  <tom@tromey.com>
13702
13703         * stack.c (backtrace_command_1): Remove verbose code.
13704
13705 2018-03-26  Tom Tromey  <tom@tromey.com>
13706
13707         * python/py-framefilter.c (py_print_type): Don't catch
13708         exceptions.  Return void.
13709         (py_print_value): Likewise.
13710         (py_print_single_arg): Likewise.
13711         (enumerate_args): Don't catch exceptions.
13712         (py_print_args): Likewise.
13713         (py_print_frame): Likewise.
13714         (gdbpy_apply_frame_filter): Catch exceptions here.
13715
13716 2018-03-26  Tom Tromey  <tom@tromey.com>
13717
13718         * stack.c (_initialize_stack): Remove trailing newlines from help
13719         text.  Add "Usage" line to "backtrace" help.
13720
13721 2018-03-26  Tom Tromey  <tom@tromey.com>
13722
13723         PR python/16486:
13724         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13725
13726 2018-03-26  Tom Tromey  <tom@tromey.com>
13727
13728         * python/py-framefilter.c (py_print_single_arg): Return
13729         EXT_LANG_BT_ERROR from catch.
13730
13731 2018-03-26  Tom Tromey  <tom@tromey.com>
13732
13733         PR backtrace/15584:
13734         * stack.c (backtrace_command_1): Move some code into no-filters
13735         "if".
13736
13737 2018-03-26  Tom Tromey  <tom@tromey.com>
13738
13739         * python/py-framefilter.c (throw_quit_or_print_exception): New
13740         function.
13741         (gdbpy_apply_frame_filter): Use it.
13742
13743 2018-03-26  Tom Tromey  <tom@tromey.com>
13744
13745         PR cli/17716:
13746         * python/py-framefilter.c (py_print_type, py_print_value)
13747         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13748         RETURN_MASK_ERROR.
13749
13750 2018-03-26  Tom Tromey  <tom@tromey.com>
13751
13752         * python/py-framefilter.c (enumerate_args): Use
13753         gdb::unique_xmalloc_ptr.
13754
13755 2018-03-26  Tom Tromey  <tom@tromey.com>
13756
13757         * python/py-framefilter.c (py_print_frame): Return
13758         EXT_LANG_BT_OK.
13759         (gdbpy_apply_frame_filter): Update comment.
13760         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13761         Remove.
13762         <EXT_LANG_BT_NO_FILTERS>: Change value.
13763
13764 2018-03-26  Tom Tromey  <tom@tromey.com>
13765
13766         PR backtrace/15582:
13767         * stack.c (backtrace_command): Parse "hide" argument.
13768         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13769         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13770         constant.
13771
13772 2018-03-26  Tom Tromey  <tom@tromey.com>
13773
13774         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13775         add "flags".
13776         (backtrace_command): Remove "fulltrace", add "flags".
13777
13778 2018-03-26  Tom Tromey  <tom@tromey.com>
13779
13780         * stack.c (backtrace_command): Rewrite command line parsing.
13781
13782 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13783
13784         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13785
13786 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13787
13788         * filename-seen-cache.h: Add include guard.
13789
13790 2018-03-26  Keith Seitz  <keiths@redhat.com>
13791
13792         * symfile.c (place_section): Remove "struct" from section_addr_info
13793         in comment.
13794         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13795         "struct" keyword from section_addr_info.
13796
13797 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13798
13799         * regformats/regdef.h (reg): Add constructors.
13800
13801 2018-03-25  Pedro Alves  <palves@redhat.com>
13802
13803         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13804         if then/else bodies in var_func_name extraction.
13805
13806 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13807
13808         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13809         lookup_minimal_symbol() to find symbol entry.
13810         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13811
13812 2018-03-23  Keith Seitz  <keiths@redhat.com>
13813
13814         PR c++/22968
13815         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13816         nested type definitions for C++, too.
13817
13818 2018-03-23  Tom Tromey  <tom@tromey.com>
13819
13820         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13821         a typedef.
13822         (macho_register_oso): Remove.
13823         (macho_symtab_read): Take a std::vector.
13824         (oso_el_compare_name): Now a std::sort comparator.
13825         (macho_symfile_read_all_oso): Take a std::vector.
13826         (macho_symfile_read): Use std::vector.  Remove cleanups.
13827
13828 2018-03-22  Tom Tromey  <tom@tromey.com>
13829
13830         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13831         (record_full_goto_bookmark): Use std::string.
13832
13833 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13834
13835         PR tdep/18295
13836         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13837         a single mask.
13838
13839 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13840
13841         * rs6000-tdep.c (store_insn_p): New function.
13842         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13843         and cr_reg to their unshifted values. Use store_insn_p to
13844         match LR saves using either R1 or fdata->alloca_reg. Use
13845         store_insn_p to match CR saves. Set alloca_reg_offset
13846         when alloca_reg and framep are set. Remove lr_reg shift
13847         when assigning to fdata->lr_register.
13848
13849 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13850
13851         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13852         command line args instead of emitting a warning.
13853
13854 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13855
13856         * tracepoint.h (struct static_tracepoint_marker): Initialize
13857         fields, define default constructor, move constructor and move
13858         assignment, disable the rest.
13859         <str_id, extra>: Make std::string.
13860         (release_static_tracepoint_marker): Remove.
13861         (free_current_marker): Remove.
13862         * tracepoint.c (free_current_marker): Remove.
13863         (parse_static_tracepoint_marker_definition): Adjust to
13864         std::string, use new hex2str overload.
13865         (release_static_tracepoint_marker): Remove.
13866         (print_one_static_tracepoint_marker): Get marker by reference
13867         and adjust to std::string.
13868         (info_static_tracepoint_markers_command): Adjust to std::vector
13869         changes
13870         * target.h (static_tracepoint_marker_p): Remove typedef.
13871         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13872         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13873         bool.
13874         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13875         * target-debug.h
13876         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13877         (target_debug_print_std_vector_static_tracepoint_marker): New.
13878         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13879         to...
13880         (target_debug_print_static_tracepoint_marker_p): ... this.
13881         * target-delegates.c: Re-generate.
13882         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13883         Make std::string.
13884         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13885         (decode_static_tracepoint_spec): Adjust to std::vector.
13886         (tracepoint_print_one_detail): Adjust to std::string.
13887         (strace_marker_decode_location): Adjust to std::string.
13888         (update_static_tracepoint): Adjust to std::string, remove call
13889         to release_static_tracepoint_marker.
13890         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13891         Adjust to std::vector.
13892         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13893         (remote_static_tracepoint_markers_by_strid): Adjust to
13894         std::vector.
13895         * common/rsp-low.h (hex2str): New overload with explicit count
13896         of bytes.
13897         * common/rsp-low.c (hex2str): New overload with explicit count
13898         of bytes.
13899         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13900         (_initialize_rsp_low_selftests): Add test_hex2str test.
13901         * unittests/tracepoint-selftests.c
13902         (test_parse_static_tracepoint_marker_definition): Adjust to
13903         std::string.
13904
13905 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13906
13907         * tracepoint.c (parse_static_tracepoint_marker_definition):
13908         Consider case where the definition is followed by more
13909         definitions.
13910         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13911         tracepoint-selftests.c.
13912         * unittests/tracepoint-selftests.c: New.
13913
13914 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13915
13916         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13917         Carvalho.
13918
13919 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13920
13921         * symtab.c (find_pc_sect_line): fixed indentation.
13922
13923 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13924
13925         * symtab.c (find_pc_sect_line): now uses binary search.
13926
13927 2018-03-19  Tom Tromey  <tom@tromey.com>
13928
13929         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13930         "IDENT" production.
13931
13932 2018-03-19  Pedro Alves  <palves@redhat.com>
13933             Tom Tromey  <tom@tromey.com>
13934
13935         * unittests/observable-selftests.c: New file.
13936         * common/observable.h: New file.
13937         * observable.h: New file.
13938         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13939         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13940         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13941         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13942         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13943         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13944         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13945         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13946         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13947         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13948         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13949         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13950         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13951         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13952         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13953         tui/tui-interp.c, valops.c: Update all users.
13954         * tui/tui-hooks.c (tui_bp_created_observer)
13955         (tui_bp_deleted_observer, tui_bp_modified_observer)
13956         (tui_inferior_exit_observer, tui_before_prompt_observer)
13957         (tui_normal_stop_observer, tui_register_changed_observer):
13958         Remove.
13959         (tui_observers_token): New global.
13960         (attach_or_detach, tui_attach_detach_observers): New functions.
13961         (tui_install_hooks, tui_remove_hooks): Use
13962         tui_attach_detach_observers.
13963         * record-btrace.c (record_btrace_thread_observer): Remove.
13964         (record_btrace_thread_observer_token): New global.
13965         * observer.sh: Remove.
13966         * observer.c: Rename to observable.c.
13967         * observable.c (namespace gdb_observers): Define new objects.
13968         (observer_debug): Move into gdb_observers namespace.
13969         (struct observer, struct observer_list, xalloc_observer_list_node)
13970         (xfree_observer_list_node, generic_observer_attach)
13971         (generic_observer_detach, generic_observer_notify): Remove.
13972         (_initialize_observer): Update.
13973         Don't include observer.inc.
13974         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13975         (clean mostlyclean): Likewise.
13976         (observer.h, observer.inc): Remove targets.
13977         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13978         (COMMON_SFILES): Use observable.c, not observer.c.
13979         * .gitignore: Remove observer.h.
13980
13981 2018-03-18  Tom Tromey  <tom@tromey.com>
13982
13983         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13984         gdb::def_vector.
13985         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13986
13987 2018-03-17  Tom Tromey  <tom@tromey.com>
13988
13989         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13990
13991 2018-03-17  Tom Tromey  <tom@tromey.com>
13992
13993         * target.c (class scoped_target_fd): New.
13994         (target_fileio_close_cleanup): Remove.
13995         (target_fileio_read_alloc_1): Use scoped_target_fd.
13996
13997 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13998
13999         * silent-rules.mk: New.
14000         * Makefile.in: Include silent-rules.mk
14001         (srcdir, VPATH, top_srcdir): Move up.
14002         (COMPILE): Add ECHO_CXX.
14003         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
14004         (init.c): Add ECHO_INIT_C.
14005         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
14006         (version.c): Add ECHO_GEN.
14007         (printcmd.o): Add ECHO_CXX.
14008         (target-float.o): Add ECHO_CXX.
14009         (ada-exp.o): Add ECHO_CXX.
14010         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
14011         (insight$(EXEEXT)): Add ECHO_CXXLD.
14012         * gnulib/configure.ac: Add AM_SILENT_RULES.
14013         * gnulib/aclocal.m4: Re-generate.
14014         * gnulib/configure: Re-generate.
14015         * gnulib/import/Makefile.in: Re-generate.
14016
14017 2018-03-16  Tom Tromey  <tom@tromey.com>
14018
14019         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
14020         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
14021         * utils.c (do_free_section_addr_info)
14022         (make_cleanup_free_section_addr_info): Remove.
14023         * symfile.h (struct other_sections): Add constructor.
14024         (struct section_addr_info): Remove.
14025         (section_addr_info): New typedef.
14026         (struct sym_fns) <sym_offsets>: Change type of parameter.
14027         (build_section_addr_info_from_objfile)
14028         (relative_addr_info_to_section_offsets, addr_info_make_relative)
14029         (default_symfile_offsets, symbol_file_add)
14030         (symbol_file_add_from_bfd)
14031         (build_section_addr_info_from_section_table): Update.
14032         (alloc_section_addr_info, free_section_addr_info): Don't declare.
14033         * symfile.c (alloc_section_addr_info): Remove.
14034         (build_section_addr_info_from_section_table): Change return type.
14035         Update.
14036         (build_section_addr_info_from_bfd)
14037         (build_section_addr_info_from_objfile): Likewise.
14038         (free_section_addr_info): Remove.
14039         (relative_addr_info_to_section_offsets): Change type of "addrs".
14040         (addrs_section_compar): Now a std::sort comparator.
14041         (addrs_section_sort): Change return type.
14042         (addr_info_make_relative): Change type of "addrs".  Update.
14043         (default_symfile_offsets, syms_from_objfile_1)
14044         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14045         (symbol_file_add_separate): Update.
14046         (symbol_file_add): Change type of "addrs".  Update.
14047         (add_symbol_file_command): Update.  Remove cleanups.
14048         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
14049         cleanups.
14050         * symfile-debug.c (debug_sym_offsets): Change type of "info".
14051         * solib.c (solib_read_symbols): Update.
14052         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
14053         * machoread.c (macho_symfile_offsets): Update.
14054         * jit.c (jit_bfd_try_read_symtab): Update.
14055
14056 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
14057
14058         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14059         unittests/utils-selftests.c.
14060         * unittests/utils-selftests.c: New file.
14061
14062 2018-03-14  Tom Tromey  <tom@tromey.com>
14063
14064         PR cli/14977:
14065         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14066         for NULL.
14067
14068 2018-03-14  Tom Tromey  <tom@tromey.com>
14069
14070         PR cli/19918:
14071         * printcmd.c (printf_pointer): Allow "-" in format.
14072
14073 2018-03-14  Tom Tromey  <tom@tromey.com>
14074
14075         * printcmd.c (_initialize_printcmd): Add usage to printf.
14076
14077 2018-03-14  Yao Qi  <qiyao@sourceware.org>
14078
14079         * MAINTAINERS: Update my email address.
14080
14081 2018-03-13  Tom Tromey  <tom@tromey.com>
14082
14083         * machoread.c (macho_check_dsym): Change filenamep to a
14084         std::string*.
14085         (macho_symfile_read): Update.
14086         * symfile.c (load_command): Use std::string.
14087
14088 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14089
14090         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14091         to error message string.
14092         (riscv_register_name): Use xsnprintf instead of sprintf.
14093         (riscv_insn::fetch_instruction): Use gdb_assert instead of
14094         internal_error.
14095         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14096         error.
14097         (riscv_push_dummy_call): Likewise.
14098
14099 2018-03-12  Tom Tromey  <tom@tromey.com>
14100
14101         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14102         Use gdb::byte_vector.
14103         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14104
14105 2018-03-12  Yao Qi  <yao.qi@linaro.org>
14106
14107         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14108         parameter type to readable_regcache.
14109         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14110         the declaration.
14111
14112 2018-03-11  Tom Tromey  <tom@tromey.com>
14113
14114         * dwarf2read.c (struct nextfield): Add initializers.
14115         (struct nextfnfield): Remove.
14116         (struct fnfieldlist): Add initializers.  Remove "length" and
14117         "head", use std::vector.
14118         (struct decl_field_list): Remove.
14119         (struct field_info): Add initializers.
14120         <fields, baseclasses>: Now std::vector.
14121         <nbaseclasses, nfnfields, typedef_field_list_count,
14122         nested_types_list_count>: Remove.
14123         (dwarf2_add_field, dwarf2_add_type_defn)
14124         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14125         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14126         (process_structure_scope): Update.
14127
14128 2018-03-11  Tom Tromey  <tom@tromey.com>
14129
14130         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14131         for use by std::sort.
14132         (build_type_psymtabs_1): Use std::vector.
14133
14134 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
14135
14136         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14137         and LIBMPFR in the printed configuration.
14138
14139 2018-03-08  Tom Tromey  <tom@tromey.com>
14140
14141         * source.c (get_filename_and_charpos): Use scoped_fd.
14142         * nto-procfs.c (procfs_open_1): Use scoped_fd.
14143         (procfs_pidlist): Likewise.
14144         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14145         (iterate_over_mappings): Likewise.
14146
14147 2018-03-08  Tom Tromey  <tom@tromey.com>
14148
14149         * infcall.c (struct call_return_meta_info)
14150         <stack_temporaries_enabled>: Remove.
14151         (get_call_return_value, call_function_by_hand_dummy): Update.
14152         * thread.c (disable_thread_stack_temporaries): Remove.
14153         (enable_thread_stack_temporaries): Remove.
14154         (thread_stack_temporaries_enabled_p): Return bool.
14155         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14156         (get_last_thread_stack_temporary): Update.
14157         * eval.c (evaluate_subexp): Update.
14158         * gdbthread.h (class enable_thread_stack_temporaries): Now a
14159         class, not a function.
14160         (value_ptr, value_vec): Remove typedefs.
14161         (class thread_info) <stack_temporaries_enabled>: Now bool.
14162         <stack_temporaries>: Now a std::vector.
14163         (thread_stack_temporaries_enabled_p)
14164         (value_in_thread_stack_temporaries): Return bool.
14165
14166 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
14167
14168         * remote.c (putpkt_binary): Fix omitted bytes reporting.
14169         (getpkt_or_notif_sane_1): Likewise.
14170
14171 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14172
14173         * build-id.c (build_id_to_debug_bfd): Use std::string.
14174
14175 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14176
14177         * build-id.c (find_separate_debug_file_by_buildid): Return
14178         std::string.
14179         * build-id.h (find_separate_debug_file_by_buildid): Return
14180         std::string.
14181         * coffread.c (coff_symfile_read): Adjust to std::string.
14182         * elfread.c (elf_symfile_read): Adjust to std::string.
14183         * symfile.c (separate_debug_file_exists): Change parameter to
14184         std::string.
14185         (find_separate_debug_file): Return std::string.
14186         (find_separate_debug_file_by_debuglink): Return std::string.
14187         * symfile.h (find_separate_debug_file_by_debuglink): Return
14188         std::string.
14189
14190 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14191
14192         * common/xml-utils.c (xml_escape_text): Move code to...
14193         (xml_escape_text_append): ... this new function.
14194         * common/xml-utils.h (xml_escape_text_append): New declaration.
14195         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14196         New function.
14197         (_initialize_xml_utils): register test_xml_escape_text_append as
14198         a selftest.
14199
14200 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
14201
14202         * defs.h: Remove MAX_REGISTER_SIZE.
14203         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14204         asserts.
14205         * python/py-unwind.c (pyuw_sniffer): Likewise.
14206
14207 2018-03-07  Tom Tromey  <tom@tromey.com>
14208
14209         * linux-tdep.c (linux_info_proc): Update.
14210         * target.h (struct target_ops) <to_fileio_readlink>: Return
14211         optional<string>.
14212         (target_fileio_readlink): Return optional<string>.
14213         * remote.c (remote_hostio_readlink): Return optional<string>.
14214         * inf-child.c (inf_child_fileio_readlink): Return
14215         optional<string>.
14216         * target.c (target_fileio_readlink): Return optional<string>.
14217
14218 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
14219
14220         * regcache.c (cooked_read_test): Add riscv to the list of
14221         architectures that have a save_reggroup.
14222
14223 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14224
14225         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14226         value is not a dynamic class object.
14227
14228 2018-03-06  Tom Tromey  <tom@tromey.com>
14229
14230         * rust-exp.y: Formatting fixes.
14231
14232 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14233
14234         * riscv-tdep.c (riscv_register_name): Remove target description
14235         support.
14236         (riscv_gdbarch_init): Remove target description check.
14237
14238 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14239
14240         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14241         comment.
14242         * riscv-tdep.h: Likewise.
14243
14244 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14245
14246         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14247         (riscv_pseudo_register_write): Delete.
14248         (riscv_gdbarch_init): Remove all use of pseudo registers.
14249
14250 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14251
14252         * record-btrace.c (btrace_print_lines): Replace cleanup
14253         parameter with RAII equivalents.
14254         (btrace_insn_history): Replace cleanup with RAII equivalents.
14255         * ui-out.h (make_cleanup_ui_out_list_begin_end,
14256         make_cleanup_ui_out_tuple_begin_end): Remove.
14257         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14258         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14259         make_cleanup_ui_out_list_begin_end): Remove.
14260
14261 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14262
14263         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14264         parameter types to std::vector.  Use bool.
14265         (record_btrace_wait): Replace VEC(tp_t) with
14266         std::vector<thread_info *>.
14267         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14268
14269 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14270
14271         * record-btrace.c (record_btrace_disable_callback): Remove.
14272         (struct scoped_btrace_disable): New.
14273         (record_btrace_open): Use scoped_btrace_disable.
14274
14275 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14276
14277         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14278         reading values from registers.
14279
14280 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14281
14282         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14283         where appropriate.
14284
14285 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14286
14287         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14288         change parameter type.  Use GDB's print functions, and use
14289         core_addr_to_string where appropriate.
14290         (riscv_push_dummy_call): Use core_addr_to_string where
14291         appropriate, update call to riscv_print_arg_location, and reindent
14292         a few lines.
14293         (riscv_return_value): Update call to riscv_print_arg_location.
14294
14295 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14296             Tim Newsome <tim@sifive.com>
14297             Albert Ou <a0u@eecs.berkeley.edu>
14298             Darius Rad <darius@bluespec.com>
14299
14300         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14301         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14302         (ALLDEPFILES): Add riscv-tdep.c
14303         * configure.tgt: Add riscv support.
14304         * riscv-tdep.c: New file.
14305         * riscv-tdep.h: New file.
14306         * NEWS: Mention new target.
14307         * MAINTAINERS: Add entry for riscv.
14308
14309 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14310
14311         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14312         fields within aggregates.
14313
14314 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
14315
14316         * record-btrace.c (btrace_print_lines): Change type of flags to
14317         gdb_disassembly_flags.
14318
14319 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14320
14321         * fbsd-nat.c: Include "inf-ptrace.h".
14322         (USE_SIGTRAP_SIGINFO): Conditionally define.
14323         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14324         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14325         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14326         function.
14327         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14328         Likewise.
14329         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14330         Likewise.
14331         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14332         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14333         "supports_stopped_by_hw_breakpoint" target methods.
14334
14335 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14336
14337         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14338         * fbsd-nat.c (debug_fbsd_nat): New variable.
14339         (show_fbsd_nat_debug): New function.
14340         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14341         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14342
14343 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14344
14345         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14346         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14347         prototype.
14348         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14349         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14350         method.
14351
14352 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14353
14354         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14355         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14356
14357 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14358
14359         * charset.c (struct charset_vector): New.
14360         (charsets): Change type to charset_vector.
14361         (find_charset_names): Adjust.
14362         (add_one): Adjust.
14363         (_initialize_charset): Adjust.
14364
14365 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14366
14367         * progspace.h (struct program_space) <deleted_solibs>: Change
14368         type to std::vector<std::string>.
14369         * progspace.c (clear_program_space_solib_cache): Adjust.
14370         * breakpoint.c (print_solib_event): Adjust.
14371         (check_status_catch_solib): Adjust.
14372         * solib.c (update_solib_list): Adjust.
14373         * ui-out.h (class ui_out) <field_string>: New overload.
14374         * ui-out.c (ui_out::field_string): New overload.
14375
14376 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14377
14378         * progspace.h (struct program_space): Add constructor and
14379         destructor, initialize fields.
14380         (add_program_space): Remove.
14381         * progspace.c (add_program_space): Rename to...
14382         (program_space::program_space): ... this.
14383         (release_program_space): Rename to...
14384         (program_space::~program_space): ... this.
14385         (delete_program_space): Use delete to delete program_space.
14386         (initialize_progspace): Use new to allocate program_space.
14387         * inferior.c (add_inferior_with_spaces): Likewise.
14388         (clone_inferior_command): Likewise.
14389         * infrun.c (follow_fork_inferior): Likewise.
14390         (handle_vfork_child_exec_or_exit): Likewise.
14391
14392 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14393
14394         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14395         (delim_string_to_char_ptr_vec): Return std::vector of
14396         gdb::unique_xmalloc_ptr.
14397         (dirnames_to_char_ptr_vec_append): Take std::vector of
14398         gdb::unique_xmalloc_ptr.
14399         (dirnames_to_char_ptr_vec): Return std::vector of
14400         gdb::unique_xmalloc_ptr.
14401         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14402         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14403         (delim_string_to_char_ptr_vec): Return an std::vector of
14404         gdb::unique_xmalloc_ptr, adjust the code.
14405         (dirnames_to_char_ptr_vec_append): Take an std::vector of
14406         gdb::unique_xmalloc_ptr, adjust the code.
14407         (dirnames_to_char_ptr_vec): Return an std::vector of
14408         gdb::unique_xmalloc_ptr, adjust the code.
14409         * auto-load.c (auto_load_safe_path_vec): Change type to
14410         std::vector of gdb::unique_xmalloc_ptr.
14411         (auto_load_expand_dir_vars): Return an std::vector of
14412         gdb::unique_xmalloc_ptr, adjust the code.
14413         (auto_load_safe_path_vec_update): Adjust.
14414         (filename_is_in_auto_load_safe_path_vec): Adjust.
14415         (auto_load_objfile_script_1): Adjust.
14416         * build-id.c (build_id_to_debug_bfd): Adjust.
14417         * linux-thread-db.c (thread_db_load_search): Adjust.
14418         * source.c (add_path): Adjust.
14419         (openp): Adjust.
14420         * symfile.c (find_separate_debug_file): Adjust.
14421         * utils.c (do_free_char_ptr_vec): Remove.
14422         (make_cleanup_free_char_ptr_vec): Remove.
14423
14424 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14425
14426         PR gdb/22907
14427         * common/pathstuff.c: Conditionally include "<windows.h>".
14428
14429 2018-03-01  Georg Sauthoff  <mail@georg.so>
14430
14431         PR gdb/22888
14432         * gcore.in: Quote variables and switch interpreter to bash.
14433
14434 2018-03-01  Tom Tromey  <tom@tromey.com>
14435
14436         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14437         assertion.  Add assertion for discriminant_index.
14438         (quirk_rust_enum): Use correct base type name in univariant case.
14439
14440 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14441
14442         * record.c (get_call_history_modifiers): Return a
14443         record_print_flags.
14444         (cmd_record_call_history): Adjust.
14445         * record-btrace.c (record_btrace_call_history): Adjust.
14446         (record_btrace_call_history_range): Adjust.
14447         (record_btrace_call_history_from): Adjust.
14448         * target-debug.h (target_debug_print_record_print_flags): New.
14449         * target-delegates.c: Re-generate.
14450         * target.c (target_call_history): Change flags type.
14451         (target_call_history_from): Likewise.
14452         (target_call_history_range): Likewise.
14453         * target.h (struct target_ops) <target_call_history>: Likewise.
14454         (target_call_history_from): Likewise.
14455         (target_call_history_range): Likewise.
14456
14457 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14458             Simon Marchi  <simon.marchi@polymtl.ca>
14459
14460         * common/common-utils.c: Include "sys/stat.h".
14461         (is_regular_file): Move here from "source.c"; change return
14462         type to "bool".
14463         * common/common-utils.h (is_regular_file): New prototype.
14464         * common/pathstuff.c (contains_dir_separator): New function.
14465         * common/pathstuff.h (contains_dir_separator): New prototype.
14466         * source.c: Don't include "sys/stat.h".
14467         (is_regular_file): Move to "common/common-utils.c".
14468
14469 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14470
14471         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14472         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14473         * auto-load.c: Include "common/pathstuff.h".
14474         * common/common-def.h (current_directory): Move here.
14475         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14476         function.
14477         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14478         prototype.
14479         * common/pathstuff.c: New file.
14480         * common/pathstuff.h: New file.
14481         * compile/compile.c: Include "common/pathstuff.h".
14482         * defs.h (current_directory): Move to "common/common-defs.h".
14483         * dwarf2read.c: Include "common/pathstuff.h".
14484         * exec.c: Likewise.
14485         * guile/scm-safe-call.c: Likewise.
14486         * linux-thread-db.c: Likewise.
14487         * main.c: Likewise.
14488         * nto-tdep.c: Likewise.
14489         * objfiles.c: Likewise.
14490         * source.c: Likewise.
14491         * symtab.c: Likewise.
14492         * utils.c: Include "common/pathstuff.h".
14493         (gdb_realpath): Move to "common/pathstuff.c".
14494         (gdb_realpath_keepfile): Likewise.
14495         (gdb_abspath): Likewise.
14496         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14497         (gdb_realpath_keepfile): Likewise.
14498         (gdb_abspath): Likewise.
14499
14500 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14501
14502         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14503         wildcard process pid for super_resume for kernels with a
14504         specific bug.
14505
14506 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14507
14508         * compile/compile.c (get_args): Add additional comments
14509         explaining function.
14510
14511 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14512             Tom Tromey  <tom@tromey.com>
14513
14514         * target.h (memory_write_request_s): Remove typedef.  Don't define
14515         VEC.
14516         (target_write_memory_blocks): Change argument to std::vector.
14517         (struct memory_write_request): Add constructor.
14518         * target-memory.c (compare_block_starting_address): Return bool.
14519         Change argument types.
14520         (claim_memory): Change arguments to use std::vector.
14521         (split_regular_and_flash_blocks, blocks_to_erase)
14522         (compute_garbled_blocks): Likewise.
14523         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14524         (target_write_memory_blocks): Change argument to std::vector.
14525         * symfile.c (struct load_section_data): Add constructor and
14526         destructor.  Use std::vector for "requests".
14527         (struct load_progress_data): Add initializers.
14528         (load_section_callback): Update.  Use "new".
14529         (clear_memory_write_data): Remove.
14530         (generic_load): Update.
14531
14532 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14533
14534         * arch/aarch64.h: Use common/tdesc.h.
14535
14536 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14537
14538         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14539         architecture with a 64-bit ABI.
14540
14541 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14542
14543         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14544         ahead of target description loading.
14545
14546 2018-02-26  Tom Tromey  <tom@tromey.com>
14547
14548         * stack.c (backtrace_command_1): Update.
14549         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14550         of "flags".
14551         * python/py-framefilter.c (py_print_frame)
14552         (gdbpy_apply_frame_filter): Change type of "flags".
14553         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14554         of "flags".
14555         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14556         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14557         * extension.h (enum frame_filter_flag): Rename from
14558         frame_filter_flags.
14559         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14560         (apply_ext_lang_frame_filter): Change type of "flags".
14561         * extension.c (apply_ext_lang_frame_filter): Change type of
14562         "flags".
14563         * extension-priv.h (struct extension_language_ops)
14564         <apply_frame_filter>: Change type of "flags".
14565
14566 2018-02-26  Tom Tromey  <tom@tromey.com>
14567
14568         PR python/16497:
14569         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14570         off-by-one in py_end computation.
14571         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14572         PRINT_MORE_FRAMES.
14573         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14574         constant.
14575
14576 2018-02-26  Tom Tromey  <tom@tromey.com>
14577
14578         * dwarf2read.c (struct variant_field): New.
14579         (struct nextfield) <variant>: New field.
14580         (dwarf2_add_field): Handle DW_TAG_variant_part.
14581         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14582         discriminated union.
14583         (read_structure_type): Handle DW_TAG_variant_part.
14584         (handle_struct_member_die): New function, extracted from
14585         process_structure_scope.  Handle DW_TAG_variant.
14586         (process_structure_scope): Handle discriminated unions.  Call
14587         handle_struct_member_die.
14588
14589 2018-02-26  Tom Tromey  <tom@tromey.com>
14590
14591         * rust-lang.h (rust_last_path_segment): Declare.
14592         * rust-lang.c (rust_last_path_segment): Now public.  Change
14593         contract.
14594         (struct disr_info): Remove.
14595         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14596         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14597         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14598         (rust_enum_p, rust_enum_variant): New function.
14599         (rust_underscore_fields): Remove "offset" parameter.
14600         (rust_print_enum): New function.
14601         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14602         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14603         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14604         enums.
14605         (rust_internal_print_type): New function, from rust_print_type.
14606         Remove enum code.
14607         (rust_print_type): Call rust_internal_print_type.
14608         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14609         Update enum handling.
14610         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14611         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14612         (rust_union_quirks): New functions.
14613         (process_full_comp_unit, process_full_type_unit): Call
14614         rust_union_quirks.
14615         (process_structure_scope): Update rust_unions if necessary.
14616
14617 2018-02-26  Tom Tromey  <tom@tromey.com>
14618
14619         * value.h (value_union_variant): Declare.
14620         * valops.c (value_union_variant): New function.
14621         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14622         (struct discriminant_info): New.
14623         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14624         enumerator.
14625         (struct main_type) <flag_discriminated_union>: New field.
14626
14627 2018-02-26  Tom Tromey  <tom@tromey.com>
14628
14629         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14630         unittests/unpack-selftests.c.
14631         * unittests/unpack-selftests.c: New file.
14632         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14633
14634 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14635
14636         * dwarf2read.c (struct partial_die_info) <read>: New method.
14637         (read_partial_die): Remove the declaration.
14638         (load_partial_dies): Update.
14639         (partial_die_info::partial_die_info):
14640         (read_partial_die): Change it to partial_die_info::read.
14641
14642 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14643
14644         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14645         (fixup_partial_die): Remove declaration.
14646         (scan_partial_symbols): Update.
14647         (partial_die_parent_scope): Likewise.
14648         (partial_die_full_name): Likewise.
14649         (fixup_partial_die): Change it to partial_die_info::fixup.
14650
14651 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14652
14653         * dwarf2read.c (read_partial_die): Update the declaration.
14654         (load_partial_dies): Caller update.
14655         (read_partial_die): Remove one argument abbrev_len.
14656
14657 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14658
14659         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14660         assignment operator.
14661         (load_partial_dies): Use ctor and copy ctor.
14662         (read_partial_die): Update.
14663         (dwarf2_cu::find_partial_die): Use ctor.
14664
14665 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14666
14667         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14668         (find_partial_die_in_comp_unit): Change it to
14669         dwarf2_cu::find_partial_die.
14670         (find_partial_die): Update.
14671
14672 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14673
14674         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14675         is NULL.
14676
14677 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14678
14679         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14680
14681 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14682
14683         * arch/amd64.h: Use common/tdesc.h.
14684         * arch/i386.c: Likewise.
14685         * arch/i386.h: Likewise.
14686         * arch/tic6x.c: Likewise.
14687         * arch/tdesc.h: Move file from here...
14688         * common/tdesc.h: ...to here.
14689         * features/aarch64-core.c: Regenerate.
14690         * features/aarch64-fpu.c: Regenerate.
14691         * features/i386/32bit-avx.c: Regenerate.
14692         * features/i386/32bit-avx512.c: Regenerate.
14693         * features/i386/32bit-core.c: Regenerate.
14694         * features/i386/32bit-linux.c: Regenerate.
14695         * features/i386/32bit-mpx.c: Regenerate.
14696         * features/i386/32bit-pkeys.c: Regenerate.
14697         * features/i386/32bit-sse.c: Regenerate.
14698         * features/i386/64bit-avx.c: Regenerate.
14699         * features/i386/64bit-avx512.c: Regenerate.
14700         * features/i386/64bit-core.c: Regenerate.
14701         * features/i386/64bit-linux.c: Regenerate.
14702         * features/i386/64bit-mpx.c: Regenerate.
14703         * features/i386/64bit-pkeys.c: Regenerate.
14704         * features/i386/64bit-segments.c: Regenerate.
14705         * features/i386/64bit-sse.c: Regenerate.
14706         * features/i386/x32-core.c: Regenerate.
14707         * features/tic6x-c6xp.c: Regenerate.
14708         * features/tic6x-core.c: Regenerate.
14709         * features/tic6x-gp.c: Regenerate.
14710         * target-descriptions.c: Use common/tdesc.h.
14711         * target-descriptions.h: Likewise.
14712
14713 2018-02-24  Tom Tromey  <tom@tromey.com>
14714
14715         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14716         (try_thread_db_load_from_dir, thread_db_load_search): Use
14717         std::string.
14718         (info_auto_load_libthread_db_compare): Return bool.  Change
14719         argument types.
14720         (info_auto_load_libthread_db): Use std::vector, std::string.
14721         Remove cleanups.
14722
14723 2018-02-24  Tom Tromey  <tom@tromey.com>
14724
14725         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14726         std::string.
14727         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14728         std::string*.
14729         * gdbarch.c: Rebuild.
14730         * gdbarch.h: Rebuild.
14731         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14732         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14733         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14734         std::string*.
14735
14736 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14737
14738         * gdbtypes.h (sect_offset): Change type to uint64_t.
14739         (sect_offset_str): New function.
14740         * dwarf2read.c (create_addrmap_from_aranges): Use
14741         sect_offset_str.
14742         (error_check_comp_unit_head): Likewise.
14743         (create_debug_type_hash_table): Likewise.
14744         (read_cutu_die_from_dwo): Likewise.
14745         (init_cutu_and_read_dies): Likewise.
14746         (init_cutu_and_read_dies_no_follow): Likewise.
14747         (process_psymtab_comp_unit_reader): Likewise.
14748         (partial_die_parent_scope): Likewise.
14749         (peek_die_abbrev): Likewise.
14750         (process_queue): Likewise.
14751         (dwarf2_physname): Likewise.
14752         (read_namespace_alias): Likewise.
14753         (read_import_statement): Likewise.
14754         (create_dwo_cu_reader): Likewise.
14755         (create_cus_hash_table): Likewise.
14756         (lookup_dwo_cutu): Likewise.
14757         (inherit_abstract_dies): Likewise.
14758         (read_func_scope): Likewise.
14759         (read_call_site_scope): Likewise.
14760         (dwarf2_add_member_fn): Likewise.
14761         (read_common_block): Likewise.
14762         (read_module_type): Likewise.
14763         (read_typedef): Likewise.
14764         (read_subrange_type): Likewise.
14765         (load_partial_dies): Likewise.
14766         (read_partial_die): Likewise.
14767         (find_partial_die): Likewise.
14768         (read_str_index): Likewise.
14769         (dwarf2_string_attr): Likewise.
14770         (build_error_marker_type): Likewise.
14771         (lookup_die_type): Likewise.
14772         (dump_die_shallow): Likewise.
14773         (follow_die_ref): Likewise.
14774         (dwarf2_fetch_die_loc_sect_off): Likewise.
14775         (dwarf2_fetch_constant_bytes): Likewise.
14776         (follow_die_sig): Likewise.
14777         (get_signatured_type): Likewise.
14778         (get_DW_AT_signature_type): Likewise.
14779         (dwarf2_find_containing_comp_unit): Likewise.
14780         (set_die_type): Likewise.
14781
14782 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14783
14784         * arch/aarch64.c: Include "common-defs.h".
14785         * arch/amd64.c: Likewise.
14786         * arch/i386.c: Likewise.
14787
14788 2018-02-21  Tom Tromey  <tom@tromey.com>
14789
14790         * value.h: (extract_field_op): Update.
14791         * eval.c (extract_field_op): Return a const char *.
14792         * expression.h (parse_expression_for_completion): Update.
14793         * completer.c (complete_expression): Update.
14794         (add_struct_fields): Make fieldname const.
14795         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14796         (mark_completion_tag, parse_exp_in_context_1): Update.
14797         (parse_expression_for_completion): Change "name" to
14798         unique_xmalloc_ptr*.
14799
14800 2018-02-21  Tom Tromey  <tom@tromey.com>
14801
14802         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14803
14804 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14805
14806         * avr-tdep.c (avr_read_pc): Change parameter type to
14807         readable_regcache.
14808         * gdbarch.sh (read_pc): Likewise.
14809         * gdbarch.c: Re-generated.
14810         * gdbarch.h: Re-generated.
14811         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14812         readable_regcache.
14813         * ia64-tdep.c (ia64_read_pc): Likewise.
14814         * mips-tdep.c (mips_read_pc): Likewise.
14815         * spu-tdep.c (spu_read_pc): Likewise.
14816
14817 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14818
14819         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14820         * regcache-dump.c: New file.
14821         * regcache.c: Move register_dump to regcache-dump.c.
14822         (maintenance_print_registers): Likewise.
14823         (maintenance_print_raw_registers): Likewise.
14824         (maintenance_print_cooked_registers): Likewise.
14825         (maintenance_print_register_groups): Likewise.
14826         (maintenance_print_remote_registers): Likewise.
14827         (_initialize_regcache): Likewise.
14828         * regcache.h (register_dump): Moved from regcache.c.
14829
14830 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14831
14832         * regcache.c (regcache::regcache): Update.
14833         (regcache::invalidate): Move it to detached_regcache::invalidate.
14834         (get_thread_arch_aspace_regcache): Update.
14835         (regcache::raw_update): Update.
14836         (regcache::cooked_read): Remove some code.
14837         (regcache::cooked_read_value): Likewise.
14838         (regcache::raw_write): Remove assert on m_readonly_p.
14839         (regcache::raw_supply_integer): Move it to
14840         detached_regcache::raw_supply_integer.
14841         (regcache::raw_supply_zeroed): Likewise.
14842         * regcache.h (detached_regcache) <raw_supply_integer>: New
14843         declaration.
14844         <raw_supply_zeroed, invalidate>: Likewise.
14845         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14846         <invalidate>: Likewise.
14847         <m_readonly_p>: Removed.
14848
14849 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14850
14851         * infcmd.c (get_return_value): Let stop_regs point to
14852         get_current_regcache.
14853         * regcache.c (regcache::regcache): Remove.
14854         (register_dump_reg_buffer): New class.
14855         (regcache_print): Adjust.
14856         * regcache.h (regcache): Remove constructors.
14857
14858 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14859
14860         * regcache.c (class register_dump): New class.
14861         (register_dump_regcache, register_dump_none): New class.
14862         (register_dump_remote, register_dump_groups): New class.
14863         (regcache_print): Update.
14864         * regcache.h (regcache_dump_what): Move it to regcache.c.
14865         (regcache) <dump>: Remove.
14866
14867 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14868
14869         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14870          reg_buffer_rw *.
14871         (jit_unwind_reg_set_impl): Call raw_supply.
14872         (jit_frame_sniffer): Use reg_buffer_rw.
14873         * record-full.c (record_full_core_regbuf): Change its type.
14874         (record_full_core_open_1): Use reg_buffer_rw.
14875         (record_full_close): Likewise.
14876         (record_full_core_fetch_registers): Use regcache->raw_supply.
14877         (record_full_core_store_registers): Likewise.
14878         * regcache.c (regcache::get_register_status): Move it to
14879         reg_buffer.
14880         (regcache_raw_set_cached_value): Remove.
14881         (regcache::raw_set_cached_value): Remove.
14882         (regcache::raw_write): Call raw_supply.
14883         (regcache::raw_supply): Move it to reg_buffer_rw.
14884         * regcache.h (regcache_raw_set_cached_value): Remove.
14885         (reg_buffer_rw): New class.
14886
14887 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14888
14889         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14890         readonly_detached_regcache.
14891         (dummy_frame_prev_register): Use regcache->cooked_read.
14892         * frame.c (frame_save_as_regcache): Change return type.
14893         (frame_pop): Update.
14894         * frame.h (frame_save_as_regcache): Update declaration.
14895         * inferior.h (get_infcall_suspend_state_regcache): Update
14896         declaration.
14897         * infrun.c (infcall_suspend_state) <registers>: use
14898         readonly_detached_regcache.
14899         (save_infcall_suspend_state): Don't use regcache_dup.
14900         (get_infcall_suspend_state_regcache): Change return type.
14901         * linux-fork.c (struct fork_info) <savedregs>: Change to
14902         readonly_detached_regcache.
14903         <pc>: New field.
14904         (fork_save_infrun_state): Don't use regcache_dup.
14905         (info_checkpoints_command): Adjust.
14906         * mi/mi-main.c (register_changed_p): Update declaration.
14907         (mi_cmd_data_list_changed_registers): Use
14908         readonly_detached_regcache.
14909         (register_changed_p): Change parameter type to
14910         readonly_detached_regcache.
14911         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14912         readonly_detached_regcache.
14913         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14914         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14915         New.
14916         (regcache::save): Move it to reg_buffer.
14917         (regcache::restore): Change parameter type.
14918         (regcache_dup): Remove.
14919         * regcache.h (reg_buffer) <save>: New method.
14920         (readonly_detached_regcache): New class.
14921         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14922         readonly_detached_regcache.
14923         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14924
14925 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14926
14927         * frame.c (frame_save_as_regcache): Use regcache method save.
14928         (frame_pop): Use regcache method restore.
14929         * infrun.c (restore_infcall_suspend_state): Likewise.
14930         * linux-fork.c (fork_load_infrun_state): Likewise.
14931         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14932         save.
14933         * regcache.c (regcache_save): Remove.
14934         (regcache::restore): More asserts.
14935         (regcache_cpy): Remove.
14936         * regcache.h (regcache_save): Remove the declaration.
14937         (regcache::restore): Move from private to public.
14938         Remove the friend declaration of regcache_cpy.
14939         (regcache_cpy): Remove declaration.
14940
14941 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14942
14943         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14944         parameter type to 'readable_regcache *'.
14945         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14946         * arm-tdep.c (arm_neon_quad_read): Likewise.
14947         (arm_pseudo_read): Likewise.
14948         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14949         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14950         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14951         * gdbarch.c: Re-generated.
14952         * gdbarch.h: Re-generated.
14953         * gdbarch.sh (pseudo_register_read): Change parameter type to
14954         'readable_regcache *'.
14955         (pseudo_register_read_value): Likewise.
14956         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14957         (h8300_pseudo_register_read): Likewise.
14958         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14959         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14960         (i386_pseudo_register_read_into_value): Likewise.
14961         (i386_pseudo_register_read_value): Likewise.
14962         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14963         declaration.
14964         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14965         * m32c-tdep.c (m32c_raw_read): Likewise.
14966         (m32c_read_flg): Likewise.
14967         (m32c_banked_register): Likewise.
14968         (m32c_banked_read): Likewise.
14969         (m32c_sb_read): Likewise.
14970         (m32c_part_read): Likewise.
14971         (m32c_cat_read): Likewise.
14972         (m32c_r3r2r1r0_read): Likewise.
14973         (m32c_pseudo_register_read): Likewise.
14974         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14975         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14976         (mep_pseudo_cr64_read): Likewise.
14977         (mep_pseudo_register_read): Likewise.
14978         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14979         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14980         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14981         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14982         (regcache::cooked_read): Likewise.
14983         (regcache::cooked_read_value): Likewise.
14984         (regcache_cooked_read_signed):
14985         (regcache::cooked_read): Likewise.
14986         * regcache.h (readable_regcache): New class.
14987         (regcache): Inherit readable_regcache.  Move some methods to
14988         readable_regcache.
14989         * rl78-tdep.c (rl78_pseudo_register_read): Change
14990         parameter type to 'readable_regcache *'.
14991         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14992         (e500_pseudo_register_read): Change parameter type to
14993         'readable_regcache *'.
14994         (dfp_pseudo_register_read): Likewise.
14995         (vsx_pseudo_register_read): Likewise.
14996         (efpr_pseudo_register_read): Likewise.
14997         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14998         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14999         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
15000         (sh64_pseudo_register_read): Likewise.
15001         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15002         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15003         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15004         (spu_pseudo_register_read): Likewise.
15005         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15006         (xtensa_pseudo_register_read): Likewise.
15007
15008 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15009
15010         * regcache.c (regcache::regcache): Call reg_buffer ctor.
15011         (regcache::arch): Move it to reg_buffer::arch.
15012         (regcache::register_buffer): Likewise.
15013         (regcache::assert_regnum): Likewise.
15014         (regcache::num_raw_registers): Likewise.
15015         * regcache.h (reg_buffer): New class.
15016         (regcache): Inherit reg_buffer.
15017
15018 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
15019
15020         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
15021         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
15022
15023 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
15024
15025         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
15026
15027 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
15028
15029         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
15030         (SFILES): Remove common/*.c files.
15031         (COMMON_OBS): Remove some *.o files built from common/*.c files.
15032         * common/common.host: Add common reference.
15033         * configure.ac: Likewise.
15034         * configure: Regenerate.
15035
15036 2018-02-16  Yao Qi  <yao.qi@linaro.org>
15037
15038         * block.c (block_namespace_info): Inherit allocate_on_obstack.
15039         (block_initialize_namespace): Use new.
15040         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15041         (dwarf2_free_objfile): Use delete.
15042         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15043         (copy_type_recursive): Use new.
15044         * gdb_obstack.h (allocate_on_obstack): New.
15045
15046 2018-02-15  Yao Qi  <yao.qi@linaro.org>
15047
15048         PR gdb/22849
15049         * inferior.c (exit_inferior_1): Reset inf->control.
15050
15051 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
15052
15053         * ada-lang.c (ada_to_fixed_value_create): Delete advance
15054         declaration.
15055
15056 2018-02-14  Pedro Alves  <palves@redhat.com>
15057
15058         * frame-unwind.c (frame_unwind_try_unwinder): Always call
15059         frame_cleanup_after_sniffer on exception.
15060
15061 2018-02-14  Tom Tromey  <tom@tromey.com>
15062
15063         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15064         const.
15065         (solib_bfd_open): Make pathname const.
15066         * solib.c (solib_bfd_open): Make pathname const.
15067         * solib-spu.c (spu_bfd_fopen): Make name const.
15068         (spu_bfd_open): Make pathname const.
15069         * solib-darwin.c (darwin_bfd_open): Make pathname const.
15070         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15071
15072 2018-02-14  Tom Tromey  <tom@tromey.com>
15073
15074         * symfile.c (symfile_bfd_open): Update.
15075         * source.h (openp, source_full_path_of, find_and_open_source):
15076         Change argument type to unique_xmalloc_ptr.
15077         * source.c (openp): Take a unique_xmalloc_ptr.
15078         (source_full_path_of, find_and_open_source): Likewise.
15079         (open_source_file, symtab_to_fullname): Update.
15080         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15081         unique_xmalloc_ptr.
15082         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15083         (exec_file_find): Update.
15084         * psymtab.c (psymtab_to_fullname): Update.
15085         * nto-tdep.h (nto_find_and_open_solib): Update.
15086         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15087         unique_xmalloc_ptr.
15088         * exec.c (exec_file_attach): Update.
15089         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15090         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15091
15092 2018-02-14  Tom Tromey  <tom@tromey.com>
15093
15094         * solib.c: Include source.h.
15095         * nto-tdep.c: Include source.h.
15096         * mi/mi-cmd-env.c: Include source.h.
15097         * infcmd.c: Include source.h.
15098         * exec.c: Include source.h.
15099         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15100         (add_path, directory_switch, source_path, init_source_path): Move
15101         declarations...
15102         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15103         (add_path, directory_switch, source_path, init_source_path):
15104         ...here.
15105
15106 2018-02-14  Tom Tromey  <tom@tromey.com>
15107
15108         * solist.h (exec_file_find, solib_find): Return
15109         unique_xmalloc_ptr.
15110         (solib_bfd_fopen): Take a const char *.
15111         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15112         (exec_file_find, solib_find): Likewise.
15113         (solib_bfd_fopen): Do not take ownership of "pathname".
15114         (solib_bfd_open): Use unique_xmalloc_ptr.
15115         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15116         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15117         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15118         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15119
15120 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
15121
15122         * ada-lang.c (name_match_type_from_name): Remove reference to
15123         ada_name_for_lookup in function's documentation.
15124         * ada-lang.h (ada_name_for_lookup): Delete declaration.
15125
15126 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15127
15128         * defs.h (enum openp_flags): New enum.
15129         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15130         Move to enum openp_flags.
15131         (openp_flags): New enum flags.
15132         (openp): Change parameter type to openp_flags.
15133         * source.c (openp): Change parameter type to openp_flags.
15134         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15135         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15136
15137 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15138
15139         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15140         per-command.
15141
15142 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
15143
15144         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15145         into...
15146         (class dwarf2_queue_guard): ...the destructor of this new class.
15147         (dw2_do_instantiate_symtab): Create instance of the new class
15148         dwarf2_queue_guard, remove cleanup.
15149
15150 2018-02-09  Tom Tromey  <tom@tromey.com>
15151
15152         * source.c (find_source_lines): Don't reference past the end of
15153         the vector.
15154
15155 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15156
15157         * remote.c (remote_btrace_maybe_reopen): Change error message.
15158         * btrace.c (btrace_enable): Likewise.
15159         (parse_xml_btrace): Likewise.
15160         (parse_xml_btrace_conf): Likewise.
15161
15162 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15163
15164         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15165         (linux_enable_pt, linux_enable_bts): Call
15166         diagnose_perf_event_open_fail.
15167
15168 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15169
15170         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15171         Remove parameter and change return type.  Update callers.  Move it.
15172         (linux_enable_bts, linux_enable_pt): Improve error message.
15173         (linux_enable_pt): Remove zero buffer size check.
15174         (linux_enable_btrace): Improve error messages.  Remove NULL return
15175         check.
15176
15177 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15178
15179         * btrace.c (btrace_enable): Remove target_supports_btrace call.
15180         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15181         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15182         (linux_supports_pt, linux_supports_btrace): Remove.
15183         (linux_enable_bts): Call cpu_supports_bts.
15184         * nat/linux-btrace.h (linux_supports_btrace): Remove.
15185         * remote.c (remote_supports_btrace): Remove.
15186         (init_remote_ops): Remove remote_supports_btrace.
15187         * target-delegates.c: Regenerated.
15188         * target.c (target_supports_btrace): Remove.
15189         * target.h (target_ops) <to_supports_btrace>: Remove
15190         (target_supports_btrace): Remove.
15191         * x86-linux-nat.c (x86_linux_create_target): Remove
15192         linux_supports_btrace.
15193
15194 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15195
15196         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15197         btrace failed.
15198         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15199         exception and use message in own exception.
15200
15201 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15202
15203         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15204         (perf_event_pt_event_type): Use gdb_file_up.
15205         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15206         scoped_fd, and scoped_mmap.
15207
15208 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15209
15210         * common/scoped_mmap.h: New.
15211         * unittests/scoped_mmap-selftest.c: New.
15212         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15213         unittests/scoped_mmap-selftest.c.
15214
15215 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15216
15217         * common/scoped_fd.h: New.
15218         * unittests/scoped_fd-selftest.c: New.
15219         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15220         unittests/scoped_fd-selftest.c.
15221
15222 2018-02-09  Tom Tromey  <tom@tromey.com>
15223
15224         * auto-load.c (auto_load_section_scripts): Use
15225         gdb::unique_xmalloc_ptr.
15226
15227 2018-02-09  Tom Tromey  <tom@tromey.com>
15228
15229         * auto-load.c (execute_script_contents): Use std::string.
15230
15231 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
15232
15233         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15234         Python function, rather than a new command.
15235
15236 2018-02-08  Tom Tromey  <tom@tromey.com>
15237
15238         * solib.c (solib_find_1): Use std::string.
15239         (solib_bfd_fopen): Use unique_xmalloc_ptr.
15240
15241 2018-02-08  Tom Tromey  <tom@tromey.com>
15242
15243         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15244
15245 2018-02-08  Tom Tromey  <tom@tromey.com>
15246
15247         * source.c (find_source_lines): Use gdb::def_vector.
15248
15249 2018-02-08  Tom Tromey  <tom@tromey.com>
15250
15251         * macrocmd.c (struct temporary_macro_definition): New.
15252         (macro_define_command): Use temporary_macro_definition.  Remove
15253         cleanups.
15254         (free_macro_definition_ptr): Remove.
15255
15256 2018-02-08  Tom Tromey  <tom@tromey.com>
15257
15258         * macroexp.c (maybe_expand): Use std::string.
15259
15260 2018-02-08  Tom Tromey  <tom@tromey.com>
15261
15262         * macroexp.c (struct macro_buffer): Add initializers for some
15263         members.
15264         (init_buffer, init_shared_buffer, free_buffer)
15265         (free_buffer_return_text): Remove.
15266         (macro_buffer): New constructors.
15267         (~macro_buffer): New destructor.
15268         (macro_buffer::set_shared): New method.
15269         (macro_buffer::resize_buffer, macro_buffer::appendc)
15270         (macro_buffer::appendmem): Now methods, not free functions.
15271         (set_token, append_tokens_without_splicing, stringify)
15272         (macro_stringify): Update.
15273         (gather_arguments): Change return type.  Remove argc_p argument,
15274         add args_ptr argument.  Use std::vector.
15275         (substitute_args): Remove argc argument.  Accept std::vector.
15276         (expand): Update.  Use std::vector.
15277         (scan, macro_expand, macro_expand_next): Update.
15278
15279 2018-02-08  Tom Tromey  <tom@tromey.com>
15280
15281         * symtab.c (default_collect_symbol_completion_matches_break_on):
15282         Use unique_xmalloc_ptr.
15283         * macroscope.h: (sal_macro_scope, user_macro_scope)
15284         (default_macro_scope): Return unique_xmalloc_ptr.
15285         * macroscope.c (sal_macro_scope, user_macro_scope)
15286         (default_macro_scope): Return unique_xmalloc_ptr.
15287         * macroexp.h (macro_expand, macro_expand_once): Return
15288         unique_xmalloc_ptr.
15289         * macroexp.c (macro_expand, macro_expand_once): Return
15290         unique_xmalloc_ptr.
15291         * macrocmd.c (macro_expand_command, macro_expand_once_command)
15292         (info_macro_command, info_macros_command): Use
15293         unique_xmalloc_ptr.
15294         * compile/compile-c-support.c (write_macro_definitions): Use
15295         unique_xmalloc_ptr.
15296         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15297
15298 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
15299
15300         * value.c (value_static_field): Assign field type instead of
15301         containing type when returning an optimized out value.
15302
15303 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15304
15305         * ft32-tdep.c (ft32_read_pc): Remove.
15306         (ft32_write_pc): Remove.
15307         (ft32_gdbarch_init): Update.
15308         * m32r-tdep.c (m32r_read_pc): Remove.
15309         (m32r_gdbarch_init): Update.
15310         * mep-tdep.c (mep_read_pc): Remove.
15311         (mep_gdbarch_init): Update.
15312         * microblaze-tdep.c (microblaze_write_pc): Remove.
15313         (microblaze_gdbarch_init): Update.
15314         * mn10300-tdep.c (mn10300_read_pc): Remove.
15315         (mn10300_write_pc): Remove.
15316         (mn10300_gdbarch_init): Update.
15317         * moxie-tdep.c (moxie_read_pc): Remove.
15318         (moxie_write_pc): Remove.
15319         (moxie_gdbarch_init): Update.
15320
15321 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15322
15323         * expprint.c (print_subexp_standard): Handle
15324         OP_F77_UNDETERMINED_ARGLIST.
15325         (dump_subexp_body_standard): Likewise.
15326
15327 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
15328
15329         * target-descriptions.c (tdesc_element_visitor) Add empty
15330         implementations.
15331         (tdesc_type): Move make_gdb_type from here.
15332         (tdesc_type_builtin): Likewise.
15333         (tdesc_type_vector): Likewise.
15334         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15335         (make_gdb_type_struct): Move from tdesc_type_with_fields.
15336         (make_gdb_type_union): Likewise.
15337         (make_gdb_type_flags): Likewise.
15338         (make_gdb_type_enum): Likewise.
15339         (make_gdb_type): New function.
15340         (tdesc_register_type): Use static make_gdb_type.
15341
15342 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
15343
15344         * infcmd.c (default_print_one_register_info): Align natural-format
15345         column values consistently one under another.
15346         (pad_to_column): New function.
15347
15348 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
15349
15350         * dwarf2read.c (dwarf2_physname): Move commment.
15351
15352 2018-02-01  Leszek Swirski  <leszeks@google.com>
15353
15354         * varobj.c (varobj_formatted_print_options): Allow recursive
15355         pretty printing if pretty printing is enabled.
15356
15357 2018-02-01  Leszek Swirski  <leszeks@google.com>
15358
15359         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15360         names after a structop as a filename.
15361
15362 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15363
15364         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15365         (arm_record_coproc_data_proc): Likewise.
15366
15367 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15368
15369         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15370
15371 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
15372
15373         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15374         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15375
15376 2018-01-31  Pedro Alves  <palves@redhat.com>
15377
15378         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15379         * inflow.c (child_terminal_save_inferior): Wrap reference to
15380         tcgetpgrp in HAVE_TERMIOS_H.
15381         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15382         _WIN32.
15383         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15384         always iterate over all inferiors.
15385         (gdbsim_cntrl_c): Adjust.
15386         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15387
15388 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15389
15390         * gdbtypes.c (lookup_array_range_type): Make sure the array's
15391         index type is objfile-owned if the element type is as well.
15392
15393 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15394
15395         GDB 8.1 released.
15396
15397 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15398
15399         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15400         "features/s390x-linux64.c".
15401         (_initialize_s390_linux_tdep): Remove initialization of tdescs
15402         s390_linux32 and s390x_linux64.
15403         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15404         default tdesc.
15405         * s390-tdep.c: Include "features/s390-linux32.c" and
15406         "features/s390x-linux64.c".
15407         (s390_tdesc_valid): Add check for tdesc_has_registers.
15408         (s390_gdbarch_init): Make sure there is always a valid tdesc.
15409         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15410         tdesc_s390x_linux64.
15411         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15412         tdesc_s390x_linux64 to...
15413         * s390-tdep.h: ...here.
15414
15415 2018-01-30  Pedro Alves  <palves@redhat.com>
15416
15417         PR gdb/13211
15418         * config.in, configure: Regenerate.
15419         * configure.ac: Check for getpgid.
15420         * go32-nat.c (go32_pass_ctrlc): New.
15421         (go32_target): Install it.
15422         * inf-child.c (inf_child_target): Install
15423         child_terminal_save_inferior, child_pass_ctrlc and
15424         child_interrupt.
15425         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15426         (inf_ptrace_target): No longer install it.
15427         * infcmd.c (interrupt_target_1): Adjust.
15428         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15429         (child_interrupt): Declare.
15430         (inferior::terminal_state): New.
15431         * inflow.c (struct terminal_info): Update comments.
15432         (inferior_process_group): Delete.
15433         (terminal_is_ours): Delete.
15434         (gdb_tty_state): New.
15435         (child_terminal_init): Adjust.
15436         (is_gdb_terminal, sharing_input_terminal_1)
15437         (sharing_input_terminal): New functions.
15438         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15439         Set the process's actual process group in the foreground if
15440         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15441         mark terminal as the inferior's if not sharing GDB's terminal.
15442         Don't check attach_flag.
15443         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15444         pass down a target_terminal_state.
15445         (child_terminal_save_inferior): New, factored out from ...
15446         (child_terminal_ours_1): ... this.  Handle
15447         target_terminal_state::is_ours_for_output.
15448         (child_interrupt, child_pass_ctrlc): New.
15449         (inflow_inferior_exit): Clear the inferior's terminal_state.
15450         (copy_terminal_info): Copy the inferior's terminal state.
15451         (_initialize_inflow): Remove reference to terminal_is_ours.
15452         * inflow.h (inferior_process_group): Delete.
15453         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15454         * procfs.c (procfs_target): Don't install procfs_interrupt.
15455         (procfs_interrupt): Delete.
15456         * remote.c (remote_serial_quit_handler): Adjust.
15457         (remote_interrupt): Remove ptid parameter.  Adjust.
15458         * target-delegates.c: Regenerate.
15459         * target.c: Include "terminal.h".
15460         (target_terminal::terminal_state): Rename to ...
15461         (target_terminal::m_terminal_state): ... this.
15462         (target_terminal::init): Adjust.
15463         (target_terminal::inferior): Adjust to per-inferior
15464         terminal_state.
15465         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15466         (target_terminal::ours, target_terminal::ours_for_output): Use
15467         target_terminal_is_ours_kind.
15468         (target_interrupt): Remove ptid parameter.  Adjust.
15469         (default_target_pass_ctrlc): Adjust.
15470         * target.h (target_ops::to_terminal_save_inferior): New field.
15471         (target_ops::to_interrupt): Remove ptid_t parameter.
15472         (target_interrupt): Remove ptid_t parameter.  Update comment.
15473         (target_pass_ctrlc): Update comment.
15474         * target/target.h (target_terminal_state): New scoped enum,
15475         factored out of ...
15476         (target_terminal::terminal_state): ... here.
15477         (target_terminal::inferior): Update comments.
15478         (target_terminal::restore_inferior): New.
15479         (target_terminal::is_inferior, target_terminal::is_ours)
15480         (target_terminal::is_ours_for_output): Adjust.
15481         (target_terminal::scoped_restore_terminal_state): Adjust to
15482         rename, and call restore_inferior() instead of inferior().
15483         (target_terminal::scoped_restore_terminal_state::m_state): Change
15484         type.
15485         (target_terminal::terminal_state): Rename to ...
15486         (target_terminal::m_terminal_state): ... this and change type.
15487
15488 2018-01-30  Pedro Alves  <palves@redhat.com>
15489
15490         * linux-nat.c (wait_for_signal): New function.
15491         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15492         directly.
15493         (async_terminal_is_ours)
15494         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15495         (linux_nat_add_target): Don't override
15496         to_terminal_inferior/to_terminal_ours.
15497
15498 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15499
15500         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15501
15502 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15503
15504         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15505         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15506         dwarf2_per_objfile_free here.
15507         (dwarf2_per_objfile_free): Remove.
15508         (_initialize_dwarf2_read): Don't register
15509         dwarf2_per_objfile_free as a registry cleanup.
15510
15511 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15512
15513         Avoid compilation errors in MinGW native builds
15514
15515         The error is triggered by including python-internal.h, and the
15516         error message is:
15517
15518              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15519                       from build-gnulib/import/math.h:27,
15520                       from d:/usr/Python26/include/pyport.h:235,
15521                       from d:/usr/Python26/include/Python.h:58,
15522                       from python/python-internal.h:94,
15523                       from python/py-arch.c:24:
15524              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15525         using ::hypot;
15526                 ^~~~~
15527
15528         This happens because Python headers define 'hypot' to expand t
15529         '_hypot' in the Windows builds.
15530         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15531         'hypoth'.  This avoids a compilation error.
15532
15533 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15534
15535         * MAINTAINERS (Write After Approval): Fix ordering.
15536
15537 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15538
15539         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15540
15541 2018-01-26  Alan Modra  <amodra@gmail.com>
15542
15543         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15544         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15545         Remove nop.  Make const.  Comment.
15546         (powerpc32_plt_stub_so_2): New.
15547         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15548         Correct count.  Update uses.
15549         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15550         Move common code reading PLT entry word.  Correct
15551         powerpc32_plt_stub PLT address calculation.
15552         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15553         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15554         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15555         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15556         (ppc64_standard_linkage8): Likewise.
15557         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15558         Correct insns description.
15559         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15560
15561 2018-01-24  Pedro Alves  <palves@redhat.com>
15562
15563         GCC PR libstdc++/83906
15564         * gdbtypes.c (operator==(const dynamic_prop &,
15565         const dynamic_prop &)): New.
15566         (operator==(const range_bounds &, const range_bounds &)): New.
15567         (check_types_equal): Use them instead of memcmp.
15568         * gdbtypes.h (operator==(const dynamic_prop &,
15569         const dynamic_prop &)): Declare.
15570         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15571         (operator==(const range_bounds &, const range_bounds &)): Declare.
15572         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15573
15574 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15575
15576         * s390-linux-tdep.c (s390_record_address_mask)
15577         (s390_record_calc_disp_common, s390_record_calc_disp)
15578         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15579         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15580         (s390_process_record): Move to s390-tdep.c.
15581         (s390_linux_init_abi_any): Adjust.
15582         * s390-tdep.c (s390_record_address_mask)
15583         (s390_record_calc_disp_common, s390_record_calc_disp)
15584         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15585         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15586         (s390_process_record): Moved from s390-linux-tdep.c
15587         (s390_gdbarch_init): Adjust.
15588
15589 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15590
15591         * s390-linux-nat.c (s390-tdep.h): New include.
15592         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15593         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15594         (ALLDEPFILES): Add s390-tdep.c.
15595         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15596         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15597         * s390-tdep.h: ...this.  New file.
15598         * s390-linux-tdep.c (s390-tdep.h): New include.
15599         (_initialize_s390_tdep): Rename to...
15600         (_initialize_s390_linux_tdep): ...this and adjust.
15601         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15602         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15603         s390-tdep.h.
15604         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15605         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15606         (s390_is_partial_instruction, s390_software_single_step)
15607         (is_non_branch_ril, s390_displaced_step_copy_insn)
15608         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15609         (s390_prologue_data, s390_addr, s390_store, s390_load)
15610         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15611         (s390_register_call_saved, s390_guess_tracepoint_registers)
15612         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15613         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15614         (s390_pseudo_register_name, s390_pseudo_register_type)
15615         (s390_pseudo_register_read, s390_pseudo_register_write)
15616         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15617         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15618         (s390_addr_bits_remove, s390_address_class_type_flags)
15619         (s390_address_class_type_flags_to_name)
15620         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15621         (s390_function_arg_float, s390_function_arg_vector)
15622         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15623         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15624         (s390_frame_align, s390_register_return_value, s390_return_value)
15625         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15626         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15627         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15628         (s390_trad_frame_prev_register, s390_unwind_cache)
15629         (s390_prologue_frame_unwind_cache)
15630         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15631         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15632         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15633         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15634         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15635         (s390_frame_base_address, s390_local_base_address)
15636         (s390_frame_base, s390_gcc_target_options)
15637         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15638         (s390_validate_reg_range, s390_tdesc_valid)
15639         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15640         * s390-tdep.c: ...this.  New file.
15641
15642 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15643
15644         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15645         (s390_process_record, s390_gdbarch_tdep_alloc)
15646         (s390_linux_init_abi_any): Use/set new hook.
15647
15648 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15649
15650         * s390-linux-tdep.c (osabi.h): New include.
15651         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15652         (s390_linux_init_abi_any): New functions.
15653         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15654
15655 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15656
15657         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15658         tdesc_has_registers check
15659
15660 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15661
15662         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15663         (s390_validate_reg_range): New macro.
15664         (s390_gdbarch_init): Adjust.
15665
15666 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15667
15668         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15669         (s390_gdbarch_tdep_alloc): Adjust.
15670         (s390_gdbarch_init): Adjust.
15671
15672 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15673
15674         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15675         <have_tdb>: Change type to bool.
15676         (s390_gdbarch_tdep_alloc): Adjust.
15677         (s390_gdbarch_init): Adjust.
15678
15679 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15680
15681         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15682         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15683         (s390_gdbarch_tdep_alloc): New function.
15684         (s390_gdbarch_init): Allocate tdep at start and use its fields
15685         instead of separate variables.
15686
15687 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15688
15689         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15690         when looking for cached gdbarch and add comment for remaining.
15691
15692 2018-01-22  Pedro Alves  <palves@redhat.com>
15693             Sergio Durigan Junior  <sergiodj@redhat.com>
15694
15695         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15696         case.
15697
15698 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15699
15700         * MAINTAINERS: Update my company e-mail address.
15701
15702 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15703
15704         * regcache.c (cooked_write_test): New function.
15705         (_initialize_regcache): Register the test.
15706
15707 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15708
15709         * ia64-tdep.c (ia64_pseudo_register_read): Call
15710         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15711         * m32c-tdep.c (m32c_cat_read): Likewise.
15712         (m32c_r3r2r1r0_read): Likewise.
15713         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15714         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15715
15716 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15717
15718         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15719         method raw_read instead of regcache_raw_read.
15720         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15721         * arm-tdep.c (arm_neon_quad_read): Likewise.
15722         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15723         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15724         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15725         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15726         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15727         (i386_pseudo_register_read_into_value): Likewise.
15728         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15729         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15730         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15731         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15732         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15733         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15734         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15735         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15736         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15737
15738 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15739
15740         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15741         * configure.tgt: Remove target mt.
15742         * mt-tdep.c: Remove.
15743         * regcache.c (cooked_read_test): Remove the check for mt.
15744
15745 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15746
15747         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15748         instead of gdbarch_pseudo_register_read_value.
15749
15750 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15751
15752         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15753         language is Ada.
15754
15755 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15756
15757         * linespec.c (create_sals_line_offset): Remove code that preserved
15758         the symtab_and_line's line number.
15759
15760 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15761
15762         * varobj.c (varobj_create): Don't set valid_block when creating a
15763         floating varobj.
15764
15765 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15766
15767         * varobj.c (varobj_create): Remove out of date comment.
15768
15769 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15770
15771         PR mi/20395
15772         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15773         updating innermost block.
15774         * parse.c (innermost_block_tracker::update): Take extra type
15775         parameter, and check types match before updating innermost block.
15776         (write_dollar_variable): Update innermost block for registers.
15777         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15778         (innermost_block_tracker::innermost_block_tracker): Initialise
15779         m_types member.
15780         (innermost_block_tracker::reset): Take type parameter.
15781         (innermost_block_tracker::update): Take type parameter, and pass
15782         type through as needed.
15783         (innermost_block_tracker::m_types): New member.
15784         * varobj.c (varobj_create): Pass type when reseting innermost
15785         block.
15786
15787 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15788
15789         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15790         * ada-lang.c (resolve_subexp): Likewise.
15791         * breakpoint.c (set_breakpoint_condition) Likewise.
15792         (watch_command_1) Likewise.
15793         * c-exp.y (variable): Likewise.
15794         * d-exp.y (PrimaryExpression): Likewise.
15795         * f-exp.y (variable): Likewise.
15796         * go-exp.y (variable): Likewise.
15797         * m2-exp.y (variable): Likewise.
15798         * objfiles.c (objfile::~objfile): Likewise.
15799         * p-exp.y (variable): Likewise.
15800         * parse.c (innermost_block): Change type.
15801         * parser-defs.h (class innermost_block_tracker): New.
15802         (innermost_block): Change to innermost_block_tracker.
15803         * printcmd.c (display_command): Switch to innermost_block API.
15804         (do_one_display): Likewise.
15805         * rust-exp.y (do_one_display): Likewise.
15806         * symfile.c (clear_symtab_users): Likewise.
15807         * varobj.c (varobj_create): Switch to innermost_block API, replace
15808         use of innermost_block with block stored on varobj object.
15809
15810 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15811
15812         * expression.h (innermost_block): Remove declaration.
15813         * varobj.c: Add 'parser-defs.h' include.
15814
15815 2018-01-19  Tom Tromey  <tom@tromey.com>
15816
15817         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15818         symbols in the static and global blocks.
15819
15820 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15821
15822         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15823         gdb_ptrace.h, and move including gdb_wait.h ...
15824         * nat/linux-ptrace.h: ... to here.
15825
15826 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15827
15828         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15829         inf_ptrace_detach_success.
15830         (inf_ptrace_detach_success): Add inferior parameter, use it
15831         instead of inferior_ptid, pass it to detach_inferior.
15832         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15833         parameter.
15834         * inferior.c (detach_inferior): Add overload that takes an
15835         inferior object.
15836         * inferior.h (detach_inferior): Likewise.
15837         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15838         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15839         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15840
15841 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15842
15843         * target.h (struct target_ops) <to_detach>: Add inferior
15844         parameter.
15845         (target_detach): Likewise.
15846         * target.c (dispose_inferior): Pass inferior down.
15847         (target_detach): Pass inferior down.  Assert that it is equal to
15848         the current inferior.
15849         * aix-thread.c (aix_thread_detach): Pass inferior down.
15850         * corefile.c (core_file_command): Pass current_inferior() down.
15851         * corelow.c (core_detach): Add inferior parameter.
15852         * darwin-nat.c (darwin_detach): Likewise.
15853         * gnu-nat.c (gnu_detach): Likewise.
15854         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15855         * infcmd.c (detach_command): Pass current_inferior() down to
15856         target_detach.
15857         * infrun.c (follow_fork_inferior): Pass parent_inf to
15858         target_detach.
15859         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15860         target_detach.
15861         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15862         * linux-thread-db.c (thread_db_detach): Likewise.
15863         * nto-procfs.c (procfs_detach): Likewise.
15864         * procfs.c (procfs_detach): Likewise.
15865         * record.c (record_detach): Likewise.
15866         * record.h (struct inferior): Forward-declare.
15867         (record_detach): Add inferior parameter.
15868         * remote-sim.c (gdbsim_detach): Likewise.
15869         * remote.c (remote_detach_1): Likewise.
15870         (remote_detach): Likewise.
15871         (extended_remote_detach): Likewise.
15872         * sol-thread.c (sol_thread_detach): Likewise.
15873         * target-debug.h (target_debug_print_inferior_p): New macro.
15874         * target-delegates.c: Re-generate.
15875         * top.c (kill_or_detach): Pass inferior down to target_detach.
15876         * windows-nat.c (windows_detach): Add inferior parameter.
15877
15878 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15879
15880         * target.h (struct target_ops) <to_detach>: Remove args
15881         parameter.
15882         (target_detach): Likewise.
15883         * target.c (dispose_inferior): Adjust.
15884         (target_detach): Remove args parameter, adjust.
15885         * aix-thread.c (aix_thread_detach): Adjust.
15886         * corefile.c (core_file_command): Adjust.
15887         * corelow.c (core_detach): Adjust.
15888         * darwin-nat.c (darwin_detach): Adjust.
15889         * gnu-nat.c (gnu_detach): Adjust.
15890         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15891         * infcmd.c (detach_command): Adjust
15892         * infrun.c (follow_fork_inferior): Adjust.
15893         (handle_vfork_child_exec_or_exit): Adjust.
15894         * linux-fork.c (linux_fork_detach): Remove args parameter.
15895         * linux-fork.h (linux_fork_detach): Likewise.
15896         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15897         * linux-thread-db.c (thread_db_detach): Likewise.
15898         * nto-procfs.c (procfs_detach): Likewise.
15899         * procfs.c (procfs_detach): Likewise.
15900         (do_detach): Remove signo parameter.
15901         * record.c (record_detach): Remove args parameter.
15902         * record.h (record_detach): Likewise.
15903         * remote-sim.c (gdbsim_detach): Likewise.
15904         * remote.c (remote_detach_1): Likewise.
15905         (remote_detach): Likewise.
15906         (extended_remote_detach): Likewise.
15907         * sol-thread.c (sol_thread_detach): Likewise.
15908         * target-delegates.c: Re-generate.
15909         * top.c (struct qt_args) <args>: Remove field.
15910         (kill_or_detach): Don't pass args.
15911         (quit_force): Don't set args.
15912         * windows-nat.c (windows_detach): Remove args parameter.
15913
15914 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15915
15916         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15917         (arm_linux_init_abi): Install it.
15918
15919 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15920
15921         * osabi.c (gdb_osabi_names): Extend the regexp for
15922         arm-linux-gnueabihf.
15923
15924 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15925
15926         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15927         m_abbrevs.
15928         (abbrev_table::add_abbrev): Update.
15929         (abbrev_table::lookup_abbrev): Update.
15930
15931 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15932
15933         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15934
15935 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15936
15937         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15938         to "std::string".
15939
15940 2018-01-17  Tom Tromey  <tom@tromey.com>
15941
15942         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15943
15944 2018-01-17  Tom Tromey  <tom@tromey.com>
15945
15946         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15947         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15948         (create_array_type_with_stride): Update.
15949         * dwarf2read.c (set_die_type): Update.
15950
15951 2018-01-17  Tom Tromey  <tom@tromey.com>
15952
15953         * dwarf2read.c (delayed_method_info): Remove typedef.
15954         (dwarf2_cu::method_info): Now a std::vector.
15955         (add_to_method_list): Update.
15956         (free_delayed_list): Remove.
15957         (compute_delayed_physnames): Update.
15958         (process_full_comp_unit, process_full_type_unit): Clear the method
15959         list.  Remove cleanups.
15960         (psymtab_include_file_name): Add name_holder parameter.  Use
15961         unique_xmalloc_ptr.
15962         (dwarf_decode_lines): Update.
15963
15964 2018-01-17  Tom Tromey  <tom@tromey.com>
15965             Simon Marchi  <simon.marchi@ericsson.com>
15966
15967         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15968         (dwarf2_per_objfile::free_cached_comp_units)
15969         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15970         (init_cutu_and_read_dies_no_follow): Update.
15971         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15972         (dwarf2_cu::~dwarf2_cu): New.
15973         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15974         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15975
15976 2018-01-17  Tom Tromey  <tom@tromey.com>
15977             Simon Marchi  <simon.marchi@ericsson.com>
15978
15979         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15980         (struct die_reader_specs) <abbrev_table>: New member.
15981         (struct abbrev_table): Add constructor.
15982         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15983         <abbrev_obstack>: Now an auto_obstack.
15984         (abbrev_table_up): New typedef.
15985         (init_cu_die_reader): Add abbrev_table parameter.
15986         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15987         Add result_dwo_abbrev_table.
15988         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15989         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15990         Update.
15991         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15992         parameter.
15993         (skip_children): Update.
15994         (abbrev_table::alloc_abbrev): Rename from
15995         abbrev_table_alloc_abbrev.
15996         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15997         (abbrev_table::lookup_abbrev): Rename from
15998         abbrev_table_lookup_abbrev.
15999         (abbrev_table_read_table): Return abbrev_table_up.
16000         (abbrev_table_free, abbrev_table_free_cleanup)
16001         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
16002         (load_partial_dies): Update.
16003
16004 2018-01-17  Tom Tromey  <tom@tromey.com>
16005
16006         * dwarf2read.c (dwarf2_compute_name): Update comment.
16007         (read_func_scope, read_variable): Update.
16008         (new_symbol): Remove.
16009         (new_symbol_full): Rename to new_symbol.
16010
16011 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
16012
16013         PR gdb/16577
16014         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
16015         a warning instead of throwing an error, set section size to 0 and return
16016         NULL.
16017         * gdb_bfd.h (gdb_bfd_map_section): Update description.
16018
16019 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
16020
16021         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
16022         std::string.
16023         (linux_ptrace_attach_fail_reason_string): Likewise.
16024         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
16025         Likewise.
16026         (linux_ptrace_attach_fail_reason_string): Likewise.
16027         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
16028
16029 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
16030
16031         * linux-nat.c (linux_nat_attach): Remove xstrdup.
16032
16033 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
16034
16035         PR gdb/21559
16036         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
16037         checking for fs_base/gs_base fields in struct user_regs_struct.
16038         * configure: Regenerate.
16039
16040 2018-01-17  Yao Qi  <yao.qi@linaro.org>
16041
16042         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16043         function.
16044         (aarch64_linux_init_abi): Install it to gdbarch hook
16045         gcc_target_options.
16046
16047 2018-01-15  Pedro Alves  <palves@redhat.com>
16048
16049         * common/signals-state-save-restore.c
16050         (save_original_signals_state): Fix typos.
16051
16052 2017-01-12  Tom Tromey  <tom@tromey.com>
16053             Sergio Durigan Junior  <sergiodj@redhat.com>
16054
16055         * Makefile.in (install-only): Install gdb-add-index.
16056
16057 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
16058
16059         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16060
16061 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16062
16063         * infrun.c (keep_going_pass_signal): Clear step-over info when
16064         insert_breakpoints fails.
16065
16066 2018-01-11  Pedro Alves  <palves@redhat.com>
16067
16068         PR gdb/22583
16069         * infrun.c (resume): Rename to ...
16070         (resume_1): ... this.
16071         (resume): Reimplement as wrapper around resume_1.
16072
16073 2018-01-11  Pedro Alves  <palves@redhat.com>
16074
16075         PR remote/22597
16076         * remote.c (remote_parse_stop_reply): Default to the last-set
16077         general thread instead of to 'magic_null_ptid'.
16078
16079 2018-01-10  Pedro Alves  <palves@redhat.com>
16080
16081         * language.h (language_get_symbol_name_matcher): Rename ...
16082         (get_symbol_name_matcher): ... this.
16083         * language.c (language_get_symbol_name_matcher): Ditto.
16084         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16085         callers adjusted.
16086
16087 2018-01-10  Pedro Alves  <palves@redhat.com>
16088
16089         PR gdb/22670
16090         * dwarf2read.c
16091         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16092         Adjust to use language_get_symbol_name_matcher instead of
16093         language_defn::la_get_symbol_name_matcher.
16094         * language.c (language_get_symbol_name_matcher): If in Ada mode
16095         and the lookup name is a verbatim match, return Ada's matcher.
16096         * language.h (language_get_symbol_name_matcher): Adjust comment.
16097         (ada_lookup_name_info::verbatim_p):: New method.
16098
16099 2018-01-10  Pedro Alves  <palves@redhat.com>
16100
16101         PR gdb/22670
16102         * ada-lang.c (ada_collect_symbol_completion_matches): If the
16103         minsym's language is language_auto or language_cplus, pass down
16104         language_ada instead.
16105         * symtab.c (compare_symbol_name): Don't frob symbol language here.
16106
16107 2018-01-10  Pedro Alves  <palves@redhat.com>
16108
16109         PR gdb/22670
16110         * minsyms.c (linkage_name_str): New function.
16111         (iterate_over_minimal_symbols): Use it.
16112
16113 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16114
16115         * NEWS: Document that 'info proc' now works on FreeBSD.
16116
16117 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16118
16119         * configure.ac: Check for kinfo_getfile in libutil.
16120         * configure: Regenerate.
16121         * config.in: Regenerate.
16122         * fbsd-nat.c: Include "fbsd-tdep.h".
16123         (fbsd_fetch_cmdline): New.
16124         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16125         rather than calling error.
16126         (fbsd_info_proc): New.
16127         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16128         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16129         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16130
16131 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16132
16133         * fbsd-nat.c (struct free_deleter): Remove.
16134         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16135
16136 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16137
16138         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16139         NULL for an empty pathname.
16140
16141 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16142
16143         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16144         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16145         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16146         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16147         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16148         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16149         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16150         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16151         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16152         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16153         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16154         (fbsd_core_fetch_timeval, fbsd_print_sigset)
16155         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16156         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
16157         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16158
16159 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
16160
16161         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16162         (gnu_xfer_auxv): New function.
16163         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16164         TARGET_OBJECT_AUXV.
16165
16166 2018-01-08  Yao Qi  <yao.qi@linaro.org>
16167             Simon Marchi  <simon.marchi@ericsson.com>
16168
16169         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16170         common/selftest.c.
16171         (COMMON_OBS): Remove selftest.o.
16172         * configure.ac: Append selftest-arch.c and common/selftest.c to
16173         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
16174         * configure: Re-generated.
16175         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16176         GDB_SELF_TEST.
16177         (maintenance_info_selftests): Likewise.
16178
16179 2018-01-08  Xavier Roirand  <roirand@adacore.com>
16180
16181         * ada-valprint.c (val_print_packed_array_elements): Use
16182         proper number of elements when printing an array indexed
16183         by an enumeration type.
16184
16185 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16186
16187         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16188         (dw2_get_file_names_reader): Adjust.
16189         (lookup_dwo_signatured_type): Adjust.
16190         (lookup_dwp_signatured_type): Adjust.
16191         (lookup_signatured_type): Adjust.
16192         (create_type_unit_group): Adjust.
16193         (get_type_unit_group): Adjust.
16194         (process_psymtab_comp_unit_reader): Adjust.
16195         (build_type_psymtabs_reader): Adjust.
16196         (scan_partial_symbols): Adjust.
16197         (add_partial_symbol): Adjust.
16198         (add_partial_subprogram): Adjust.
16199         (peek_die_abbrev): Adjust.
16200         (fixup_go_packaging): Adjust.
16201         (process_imported_unit_die): Adjust.
16202         (dwarf2_compute_name): Adjust.
16203         (dwarf2_physname): Adjust.
16204         (read_import_statement): Adjust.
16205         (handle_DW_AT_stmt_list): Adjust.
16206         (read_file_scope): Adjust.
16207         (read_func_scope): Adjust.
16208         (read_lexical_block_scope): Adjust.
16209         (read_call_site_scope): Adjust.
16210         (read_variable): Adjust.
16211         (dwarf2_rnglists_process): Adjust.
16212         (dwarf2_ranges_process): Adjust.
16213         (dwarf2_ranges_read): Adjust.
16214         (dwarf2_get_pc_bounds): Adjust.
16215         (dwarf2_record_block_ranges): Adjust.
16216         (dwarf2_add_field): Adjust.
16217         (dwarf2_add_member_fn): Adjust.
16218         (read_structure_type): Adjust.
16219         (process_structure_scope): Adjust.
16220         (read_enumeration_type): Adjust.
16221         (read_array_type): Adjust.
16222         (mark_common_block_symbol_computed): Adjust.
16223         (read_common_block): Adjust.
16224         (read_namespace_type): Adjust.
16225         (read_namespace): Adjust.
16226         (read_module_type): Adjust.
16227         (read_tag_pointer_type): Adjust.
16228         (read_tag_ptr_to_member_type): Adjust.
16229         (read_tag_string_type): Adjust.
16230         (read_subroutine_type): Adjust.
16231         (read_typedef): Adjust.
16232         (read_base_type): Adjust.
16233         (attr_to_dynamic_prop): Adjust.
16234         (read_subrange_type): Adjust.
16235         (read_unspecified_type): Adjust.
16236         (dwarf2_read_abbrevs): Adjust.
16237         (load_partial_dies): Adjust.
16238         (read_partial_die): Adjust.
16239         (find_partial_die): Adjust.
16240         (guess_partial_die_structure_name): Adjust.
16241         (fixup_partial_die): Adjust.
16242         (read_attribute_value): Adjust.
16243         (read_addr_index): Adjust.
16244         (read_addr_index_from_leb128): Adjust.
16245         (read_str_index): Adjust.
16246         (dwarf2_string_attr): Adjust.
16247         (get_debug_line_section): Adjust.
16248         (dwarf_decode_line_header): Adjust.
16249         (lnp_state_machine::check_line_address): Adjust.
16250         (dwarf_decode_lines_1): Adjust.
16251         (dwarf_decode_lines): Adjust.
16252         (dwarf2_start_symtab): Adjust.
16253         (var_decode_location): Adjust.
16254         (new_symbol_full): Adjust.
16255         (dwarf2_const_value_data): Adjust.
16256         (dwarf2_const_value_attr): Adjust.
16257         (dwarf2_const_value): Adjust.
16258         (die_type): Adjust.
16259         (die_containing_type): Adjust.
16260         (build_error_marker_type): Adjust.
16261         (lookup_die_type): Adjust.
16262         (guess_full_die_structure_name): Adjust.
16263         (anonymous_struct_prefix): Adjust.
16264         (determine_prefix): Adjust.
16265         (dwarf2_name): Adjust.
16266         (follow_die_ref_or_sig): Adjust.
16267         (follow_die_offset): Adjust.
16268         (follow_die_ref): Adjust.
16269         (follow_die_sig_1): Adjust.
16270         (follow_die_sig): Adjust.
16271         (get_signatured_type): Adjust.
16272         (get_DW_AT_signature_type): Adjust.
16273         (decode_locdesc): Adjust.
16274         (dwarf_decode_macros): Adjust.
16275         (cu_debug_loc_section): Adjust.
16276         (fill_in_loclist_baton): Adjust.
16277         (dwarf2_symbol_mark_computed): Adjust.
16278         (init_one_comp_unit): Don't assign
16279         dwarf2_cu::dwarf2_per_objfile.
16280         (set_die_type): Adjust.
16281
16282 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16283
16284         * dwarf2read.c (struct mapped_debug_names): Add constructor.
16285         <dwarf2_per_objfile>: New field.
16286         (dwarf2_per_objfile): Remove global.
16287         (get_dwarf2_per_objfile): New function.
16288         (set_dwarf2_per_objfile): New function.
16289         (dwarf2_build_psymtabs_hard): Change objfile parameter to
16290         dwarf2_per_objfile.
16291         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16292         (read_abbrev_offset): Likewise.
16293         (read_indirect_string): Likewise.
16294         (read_indirect_line_string): Likewise.
16295         (read_indirect_string_at_offset): Likewise.
16296         (read_indirect_string_from_dwz): Likewise.
16297         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16298         dwarf2_per_objfile.
16299         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16300         (create_all_comp_units): Change objfile parameter to
16301         dwarf2_per_objfile.
16302         (create_all_type_units): Likewise.
16303         (process_queue): Add dwarf2_per_objfile parameter.
16304         (read_and_check_comp_unit_head): Likewise.
16305         (lookup_dwo_unit_in_dwp): Likewise.
16306         (get_dwp_file): Likewise.
16307         (process_cu_includes): Likewise.
16308         (struct free_dwo_file_cleanup_data): New struct.
16309         (dwarf2_has_info): Use get_dwarf2_per_objfile and
16310         set_dwarf2_per_objfile.
16311         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16312         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16313         context, adjust calls.
16314         (dw2_instantiate_symtab): Likewise.
16315         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16316         (dw2_get_cu): Likewise.
16317         (create_cu_from_index_list): Change objfile parameter to
16318         dwarf2_per_objfile.
16319         (create_cus_from_index_list): Get dwarf2_per_objfile from
16320         context, adjust calls.
16321         (create_cus_from_index): Likewise.
16322         (create_signatured_type_table_from_index): Change objfile
16323         parameter to dwarf2_per_objfile.
16324         (create_signatured_type_table_from_debug_names): Change objfile
16325         parameter to dwarf2_per_objfile.
16326         (create_addrmap_from_index): Likewise.
16327         (create_addrmap_from_aranges): Likewise.
16328         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16329         (dw2_setup): Remove.
16330         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16331         context.
16332         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16333         get_dwarf2_per_objfile.
16334         (dw2_forget_cached_source_info): Likewise.
16335         (dw2_map_symtabs_matching_filename): Likewise.
16336         (struct dw2_symtab_iterator) <index>: Remove.
16337         <dwarf2_per_objfile>: New field.
16338         (dw2_symtab_iter_init): Replace index parameter with
16339         dwarf2_per_objfile.
16340         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16341         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16342         (dw2_print_stats): Likewise.
16343         (dw2_dump): Likewise.
16344         (dw2_expand_symtabs_for_function): Likewise.
16345         (dw2_expand_all_symtabs): Likewise.
16346         (dw2_expand_symtabs_with_fullname): Likewise.
16347         (dw2_expand_marked_cus): Replace index and objfile parameters
16348         with dwarf2_per_objfile.
16349         (dw_expand_symtabs_matching_file_matcher): Add
16350         dwarf2_per_objfile parameter and adjust calls.
16351         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16352         adjust calls.
16353         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16354         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16355         adjust calls.
16356         (create_cus_from_debug_names_list): Replace objfile parameter
16357         with dwarf2_per_objfile and adjust calls.
16358         (create_cus_from_debug_names): Likewise.
16359         (dwarf2_read_debug_names): Likewise.
16360         (mapped_debug_names::namei_to_name): Adjust call.
16361         (dw2_debug_names_iterator::next): Likewise.
16362         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16363         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16364         (dw2_debug_names_dump): Likewise.
16365         (dw2_debug_names_expand_symtabs_for_function): Likewise.
16366         (dw2_debug_names_expand_symtabs_matching): Likewise.
16367         (dwarf2_initialize_objfile): Likewise.
16368         (dwarf2_build_psymtabs): Likewise.
16369         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16370         this_cu.
16371         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16372         (read_and_check_comp_unit_head): Likewise.
16373         (read_abbrev_offset): Likewise.
16374         (create_debug_type_hash_table): Likewise.
16375         (create_debug_types_hash_table): Likewise.
16376         (create_all_type_units): Replace objfile parameter with
16377         dwarf2_per_objfile.
16378         (add_type_unit): Add dwarf2_per_objfile parameter.
16379         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16380         with dwarf2_per_objfile.
16381         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16382         (lookup_dwp_signatured_type): Likewise.
16383         (lookup_signatured_type): Likewise.
16384         (read_cutu_die_from_dwo): Likewise.
16385         (init_tu_and_read_dwo_dies): Likewise.
16386         (init_cutu_and_read_dies): Likewise.
16387         (init_cutu_and_read_dies_no_follow): Likewise.
16388         (allocate_type_unit_groups_table): Add objfile parameter.
16389         (create_type_unit_group): Use dwarf2_per_objfile from cu.
16390         (get_type_unit_group): Likewise.
16391         (process_psymtab_comp_unit): Update call.
16392         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16393         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16394         (print_tu_stats): Likewise.
16395         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16396         in void* parameter.
16397         (build_type_psymtabs): Change objfile parameter to
16398         dwarf2_per_objfile.
16399         (process_skeletonless_type_unit): Use dwarf2_per_objfile
16400         passed in void* parameter.
16401         (process_skeletonless_type_units): Change objfile parameter to
16402         dwarf2_per_objfile.
16403         (set_partial_user): Likewise.
16404         (dwarf2_build_psymtabs_hard): Likewise.
16405         (read_comp_units_from_section): Likewise.
16406         (create_all_comp_units): Likewise.
16407         (scan_partial_symbols): Update calls.
16408         (add_partial_symbol): Likewise.
16409         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16410         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16411         (process_queue): Add dwarf2_per_objfile parameter.
16412         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16413         (compute_compunit_symtab_includes): Likewise.
16414         (process_cu_includes): Add dwarf2_per_objfile parameter.
16415         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16416         (process_full_type_unit): Likewise.
16417         (process_imported_unit_die): Update call.
16418         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16419         (read_file_scope): Likewise.
16420         (allocate_dwo_file_hash_table): Add objfile parameter.
16421         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16422         (create_cus_hash_table): Likewise.
16423         (create_dwp_hash_table): Likewise.
16424         (create_dwo_unit_in_dwp_v1): Likewise.
16425         (create_dwp_v2_section): Likewise.
16426         (create_dwo_unit_in_dwp_v2): Likewise.
16427         (lookup_dwo_unit_in_dwp): Likewise.
16428         (try_open_dwop_file): Likewise.
16429         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16430         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16431         cleanup to include a reference to dwarf2_per_objfile.
16432         (open_dwp_file): Add dwarf2_per_objfile parameter.
16433         (open_and_init_dwp_file): Likewise.
16434         (get_dwp_file): Likewise.
16435         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16436         (queue_and_load_all_dwo_tus): Update call.
16437         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16438         data.
16439         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16440         (dwarf2_ranges_process): Likewise.
16441         (dwarf2_get_pc_bounds): Likewise.
16442         (mark_common_block_symbol_computed): Likewise.
16443         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16444         (dwarf2_read_abbrevs): Update call.
16445         (read_partial_die): Use dwarf2_per_objfile from cu.
16446         (find_partial_die): Likewise.
16447         (fixup_partial_die): Likewise.
16448         (read_attribute_value): Likewise.
16449         (read_indirect_string_at_offset_from): Add objfile parameter.
16450         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16451         parameter.
16452         (read_indirect_string_from_dwz): Add objfile parameter.
16453         (read_indirect_string): Add objfile parameter.
16454         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16455         (read_addr_index): Use dwarf2_per_objfile from cu.
16456         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16457         call dw2_setup.
16458         (read_str_index): Use dwarf2_per_objfile from cu.
16459         (get_debug_line_section): Likewise.
16460         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16461         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16462         (new_symbol_full): Use dwarf2_per_objfile from cu.
16463         (build_error_marker_type): Likewise.
16464         (lookup_die_type): Likewise.
16465         (determine_prefix): Likewise.
16466         (follow_die_offset): Likewise.
16467         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16468         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16469         (dwarf2_fetch_die_type_sect_off): Likewise.
16470         (dwarf2_get_die_type): Likewise.
16471         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16472         (get_signatured_type): Likewise.
16473         (get_DW_AT_signature_type): Likewise.
16474         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16475         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16476         (cu_debug_loc_section): Likewise.
16477         (fill_in_loclist_baton): Likewise.
16478         (dwarf2_symbol_mark_computed): Likewise.
16479         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16480         dwarf2_per_objfile.
16481         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16482         parameter.
16483         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16484         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16485         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16486         (set_die_type): Use dwarf2_free_objfile from cu.
16487         (get_die_type_at_offset): Likewise.
16488         (dwarf2_per_objfile_free): Don't assign global variable.
16489         (debug_names) <constructor>: Add dwarf2_per_objfile
16490         parameter, update m_debugstrlookup construction.
16491         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16492         parameter.
16493         <m_dwarf2_per_objfile>: New field.
16494         <lookup>: Use m_dwarf2_per_objfile.
16495         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16496         (psyms_seen_size): Likewise.
16497         (write_gdbindex): Replace objfile parameter with
16498         dwarf2_per_objfile.
16499         (write_debug_names): Likewise.
16500         (write_psymtabs_to_index): Likewise.
16501         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16502         calls.
16503
16504 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16505
16506         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16507         <dwarf2_per_objfile>: New field.
16508         (struct dwarf2_per_cu_data) <objfile>: Remove.
16509         <dwarf2_per_objfile>: New field.
16510         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16511         of objfile.
16512         (create_signatured_type_table_from_index): Likewise.
16513         (create_debug_type_hash_table): Likewise.
16514         (fill_in_sig_entry_from_dwo_entry): Likewise.
16515         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16516         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16517         objfile.
16518         (create_partial_symtab): Access objfile through
16519         dwarf2_per_objfile.
16520         (process_psymtab_comp_unit_reader): Likewise.
16521         (read_comp_units_from_section): Likewise.
16522         (scan_partial_symbols): Likewise.
16523         (add_partial_symbol): Likewise.
16524         (add_partial_subprogram): Likewise.
16525         (peek_die_abbrev): Likewise.
16526         (fixup_go_packaging): Likewise.
16527         (process_full_comp_unit): Likewise.
16528         (process_full_type_unit): Likewise.
16529         (process_imported_unit_die): Likewise.
16530         (dwarf2_compute_name): Likewise.
16531         (dwarf2_physname): Likewise.
16532         (read_import_statement): Likewise.
16533         (create_cus_hash_table): Assign dwarf2_physname instead of
16534         objfile.
16535         (read_func_scope): Access objfile through dwarf2_per_objfile.
16536         (read_lexical_block_scope): Likewise.
16537         (read_call_site_scope): Likewise.
16538         (read_variable): Likewise.
16539         (dwarf2_rnglists_process): Likewise.
16540         (dwarf2_ranges_process): Likewise.
16541         (dwarf2_ranges_read): Likewise.
16542         (dwarf2_record_block_ranges): Likewise.
16543         (dwarf2_add_field): Likewise.
16544         (dwarf2_add_member_fn): Likewise.
16545         (read_structure_type): Likewise.
16546         (process_structure_scope): Likewise.
16547         (read_enumeration_type): Likewise.
16548         (read_array_type): Likewise.
16549         (read_common_block): Likewise.
16550         (read_namespace_type): Likewise.
16551         (read_namespace): Likewise.
16552         (read_module_type): Likewise.
16553         (read_tag_pointer_type): Likewise.
16554         (read_tag_ptr_to_member_type): Likewise.
16555         (read_tag_string_type): Likewise.
16556         (read_subroutine_type): Likewise.
16557         (read_typedef): Likewise.
16558         (read_base_type): Likewise.
16559         (attr_to_dynamic_prop): Likewise.
16560         (read_subrange_type): Likewise.
16561         (read_unspecified_type): Likewise.
16562         (load_partial_dies): Likewise.
16563         (read_partial_die): Likewise.
16564         (find_partial_die): Likewise.
16565         (guess_partial_die_structure_name): Likewise.
16566         (fixup_partial_die): Likewise.
16567         (read_attribute_value): Likewise.
16568         (read_addr_index_from_leb128): Likewise.
16569         (dwarf2_read_addr_index): Likewise.
16570         (dwarf2_string_attr): Likewise.
16571         (lnp_state_machine::check_line_address): Likewise.
16572         (dwarf_decode_lines_1): Likewise.
16573         (dwarf_decode_lines): Likewise.
16574         (dwarf2_start_symtab): Likewise.
16575         (var_decode_location): Likewise.
16576         (new_symbol_full): Likewise.
16577         (dwarf2_const_value_data): Likewise.
16578         (dwarf2_const_value_attr): Likewise.
16579         (dwarf2_const_value): Likewise.
16580         (die_type): Likewise.
16581         (die_containing_type): Likewise.
16582         (lookup_die_type): Likewise.
16583         (guess_full_die_structure_name): Likewise.
16584         (anonymous_struct_prefix): Likewise.
16585         (dwarf2_name): Likewise.
16586         (follow_die_ref_or_sig): Likewise.
16587         (follow_die_offset): Likewise.
16588         (follow_die_ref): Likewise.
16589         (dwarf2_fetch_die_loc_sect_off): Likewise.
16590         (dwarf2_fetch_constant_bytes): Likewise.
16591         (dwarf2_fetch_die_type_sect_off): Likewise.
16592         (dwarf2_get_die_type): Likewise.
16593         (follow_die_sig): Likewise.
16594         (decode_locdesc): Likewise.
16595         (dwarf2_per_cu_objfile): Likewise.
16596         (dwarf2_per_cu_text_offset): Likewise.
16597         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16598         objfile.
16599         (set_die_type): Access objfile through
16600         dwarf2_per_objfile.
16601
16602 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16603
16604         * valprint.c (converted_character_d): Remove typedef.
16605         (DEF_VEC_O (converted_character_d)): Remove.
16606         (count_next_character): Use std::vector.
16607         (print_converted_chars_to_obstack): Likewise.
16608         (generic_printstr): Likewise.
16609
16610 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16611
16612         * xml-support.h (struct gdb_xml_value): Add constructor.
16613         <value>: Change type to unique_xmalloc_ptr.
16614         (gdb_xml_value_s): Remove typedef.
16615         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16616         (gdb_xml_element_start_handler): Change parameter type to
16617         std::vector.
16618         (xml_find_attribute): Likewise.
16619         * xml-support.c (xml_find_attribute): Change parameter type to
16620         std::vector and adjust.
16621         (gdb_xml_values_cleanup): Remove.
16622         (gdb_xml_parser::start_element): Adjust to std::vector.
16623         (xinclude_start_include): Change paraeter type to std::vector
16624         and adjust.
16625         * btrace.c (check_xml_btrace_version): Likewise.
16626         (parse_xml_btrace_block): Likewise.
16627         (parse_xml_btrace_pt_config_cpu): Likewise.
16628         (parse_xml_btrace_pt): Likewise.
16629         (parse_xml_btrace_conf_bts): Likewise.
16630         (parse_xml_btrace_conf_pt): Likewise.
16631         * memory-map.c (memory_map_start_memory): Likewise.
16632         (memory_map_start_property): Likewise.
16633         * osdata.c (osdata_start_osdata): Likewise.
16634         (osdata_start_item): Likewise.
16635         (osdata_start_column): Likewise.
16636         * remote.c (start_thread): Likewise.
16637         * solib-aix.c (library_list_start_library): Likewise.
16638         (library_list_start_list): Likewise.
16639         * solib-svr4.c (library_list_start_library): Likewise.
16640         (svr4_library_list_start_list): Likewise.
16641         * solib-target.c (library_list_start_segment): Likewise.
16642         (library_list_start_section): Likewise.
16643         (library_list_start_library): Likewise.
16644         (library_list_start_list): Likewise.
16645         * tracepoint.c (traceframe_info_start_memory): Likewise.
16646         (traceframe_info_start_tvar): Likewise.
16647         * xml-syscall.c (syscall_start_syscall): Likewise.
16648         * xml-tdesc.c (tdesc_start_target): Likewise.
16649         (tdesc_start_feature): Likewise.
16650         (tdesc_start_reg): Likewise.
16651         (tdesc_start_union): Likewise.
16652         (tdesc_start_struct): Likewise.
16653         (tdesc_start_flags): Likewise.
16654         (tdesc_start_enum): Likewise.
16655         (tdesc_start_field): Likewise.
16656         (tdesc_start_enum_value): Likewise.
16657         (tdesc_start_vector): Likewise.
16658
16659 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16660
16661         * extension.h (struct xmethod_worker) <clone>: Remove.
16662         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16663         Remove.
16664         (python_xmethod_worker::clone): Remove.
16665         * valops.c (find_overload_match): Use std::move instead of
16666         clone.
16667
16668 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16669
16670         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16671         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16672         <free_xmethod_worker_data>: Remove.
16673         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16674         <get_xmethod_arg_types>: Remove.
16675         <get_xmethod_result_type>: Remove.
16676         <invoke_xmethod>: Remove.
16677         * extension.c (new_xmethod_worker): Remove.
16678         (clone_xmethod_worker): Remove.
16679         (get_matching_xmethod_workers): Return void, pass std::vector by
16680         pointer.
16681         (get_xmethod_arg_types): Rename to...
16682         (xmethod_worker::get_arg_types): ... this, and adjust.
16683         (get_xmethod_result_type): Rename to...
16684         (xmethod_worker::get_result_type): ... this, and adjust.
16685         (invoke_xmethod): Remove.
16686         (free_xmethod_worker): Remove.
16687         (free_xmethod_worker_vec): Remove.
16688         * extension.h (enum ext_lang_rc): Move here from
16689         extension-priv.h.
16690         (struct xmethod_worker): Add constructor and destructor.
16691         <data>: Remove.
16692         <value>: Remove.
16693         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16694         virtual pure methods.
16695         <get_arg_types, get_result_type>: New methods.
16696         (xmethod_worker_ptr): Remove typedef.
16697         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16698         (xmethod_worker_vec): Remove typedef.
16699         (xmethod_worker_up): New typedef.
16700         (invoke_xmethod): Remove.
16701         (clone_xmethod_worker): Remove.
16702         (free_xmethod_worker): Remove.
16703         (free_xmethod_worker_vec): Remove.
16704         (get_xmethod_arg_types): Remove.
16705         (get_xmethod_result_type): Remove.
16706         * valops.c (find_method_list): Use std::vector, don't use
16707         intermediate vector.
16708         (value_find_oload_method_list): Use std::vector.
16709         (find_overload_match): Use std::vector.
16710         (find_oload_champ): Use std::vector.
16711         * value.c (value_free): Use operator delete.
16712         (value_of_xmethod): Rename to...
16713         (value_from_xmethod): ... this.  Don't assign
16714         xmethod_worker::value, take rvalue-reference.
16715         (result_type_of_xmethod): Adjust.
16716         (call_xmethod): Adjust.
16717         * value.h: Include extension.h.
16718         (struct xmethod_worker): Don't forward-declare.
16719         (value_of_xmethod): Rename to...
16720         (value_from_xmethod): ... this, take rvalue-reference.
16721         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16722         (struct python_xmethod_worker): ... this, add constructor and
16723         destructor.
16724         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16725         (gdbpy_free_xmethod_worker_data): Rename to...
16726         (python_xmethod_worker::~python_xmethod_worker): ... this and
16727         adjust.
16728         (gdbpy_clone_xmethod_worker_data): Rename to...
16729         (python_xmethod_worker::clone): ... this and adjust.
16730         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16731         temporary vector.
16732         (gdbpy_get_xmethod_arg_types): Rename to...
16733         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16734         (gdbpy_get_xmethod_result_type): Rename to...
16735         (python_xmethod_worker::do_get_result_type): ... this and
16736         adjust.
16737         (gdbpy_invoke_xmethod): Rename to...
16738         (python_xmethod_worker::invoke): ... this and adjust.
16739         (new_python_xmethod_worker): Rename to...
16740         (python_xmethod_worker::python_xmethod_worker): ... this and
16741         adjust.
16742         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16743         Remove.
16744         (gdbpy_free_xmethod_worker_data): Remove.
16745         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16746         (gdbpy_get_xmethod_arg_types): Remove.
16747         (gdbpy_get_xmethod_result_type): Remove.
16748         (gdbpy_invoke_xmethod): Remove.
16749         * python/python.c (python_extension_ops): Remove obsolete
16750         callbacks.
16751
16752 2018-01-05  Pedro Alves  <palves@redhat.com>
16753
16754         PR gdb/18653
16755         * common/signals-state-save-restore.c
16756         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16757         find a custom handler preinstalled, instead of internal erroring.
16758         But only warn if !quiet.
16759         * common/signals-state-save-restore.h
16760         (save_original_signals_state): New parameter 'quiet'.
16761         * main.c (captured_main_1): Move save_original_signals_state call
16762         after option handling, and pass QUIET.
16763
16764 2018-01-05  Pedro Alves  <palves@redhat.com>
16765
16766         * spu-tdep.c (spu_catch_start): Pass
16767         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16768
16769 2018-01-05  Pedro Alves  <palves@redhat.com>
16770
16771         PR gdb/22670
16772         * ada-lang.c (literal_symbol_name_matcher): New function.
16773         (ada_get_symbol_name_matcher): Use it for
16774         symbol_name_match_type::SEARCH_NAME.
16775         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16776         it down instead of assuming symbol_name_match_type::FULL.
16777         * block.h (block_lookup_symbol): New parameter 'match_type'.
16778         * c-valprint.c (print_unpacked_pointer): Use
16779         lookup_symbol_search_name instead of lookup_symbol.
16780         * compile/compile-object-load.c (get_out_value_type): Pass down
16781         symbol_name_match_type::SEARCH_NAME.
16782         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16783         symbol_name_match_type::FULL.
16784         * cp-support.c (cp_get_symbol_name_matcher): Handle
16785         symbol_name_match_type::SEARCH_NAME.
16786         * infrun.c (insert_exception_resume_breakpoint): Use
16787         lookup_symbol_search_name.
16788         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16789         * psymtab.c (maintenance_check_psymtabs): Use
16790         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16791         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16792         SYMBOL_SEARCH_NAME.
16793         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16794         if symbol_name_match_type::SEARCH_NAME.
16795         (lookup_symbol_in_language): Pass down
16796         symbol_name_match_type::FULL.
16797         (lookup_symbol_search_name): New.
16798         (lookup_language_this): Pass down
16799         symbol_name_match_type::SEARCH_NAME.
16800         (lookup_symbol_aux, lookup_local_symbol): New parameter
16801         'match_type'.  Pass it down.
16802         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16803         (lookup_symbol_search_name): New declaration.
16804         (lookup_symbol_in_block): New 'match_type' parameter.
16805
16806 2018-01-05  Pedro Alves  <palves@redhat.com>
16807
16808         PR gdb/22670
16809         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16810         ada_lookup_symbol.
16811         (ada_lookup_symbol): Reimplement in terms of
16812         ada_lookup_symbol_list, bits factored out from
16813         ada_lookup_encoded_symbol.
16814
16815 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16816
16817         * ada-exp.y (write_object_renaming): When subscripting an array
16818         using a symbol as the index, pass the block in call to
16819         ada_lookup_encoded_symbol when looking that symbol up.
16820
16821 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16822
16823         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16824         TYPE_INDEX_TYPE.
16825
16826 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16827
16828         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16829         the case where VALUE_LVAL (val0) is not lval_memory.
16830
16831 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16832
16833         * ada-valprint.c (print_optional_low_bound): Handle
16834         character-indexed array printing like boolean-indexed array
16835         printing.
16836
16837 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16838
16839         * NEWS: Create a new section for the next release branch.
16840         Rename the section of the current branch, now that it has
16841         been cut.
16842
16843 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16844
16845         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16846         * version.in: Bump version to 8.1.50.DATE-git.
16847
16848 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16849
16850         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16851         Add field.
16852         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16853         Add field.
16854         (default_exception_support_info) <catch_handlers_sym>: Add field.
16855         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16856         (ada_exception_name_addr_1): Add "catch handlers" handling.
16857         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16858         Update all callers.
16859         (create_excep_cond_exprs) <ex>: Add parameter.
16860         (re_set_exception): Update create_excep_cond_exprs call.
16861         (print_it_exception, print_one_exception, print_mention_exception)
16862         (print_recreate_exception): Add "catch handler" handling.
16863         (allocate_location_catch_handlers, re_set_catch_handlers)
16864         (check_status_catch_handlers, print_it_catch_handlers)
16865         (print_one_catch_handlers, print_mention_catch_handlers)
16866         (print_recreate_catch_handlers): New function.
16867         (catch_handlers_breakpoint_ops): New variable.
16868         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16869         Add parameter.  Add "catch handler" handling.
16870         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16871         Add "catch handler" handling.
16872         (ada_exception_catchpoint_cond_string): Add "catch handler"
16873         handling.
16874         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16875         call.
16876         (catch_ada_handlers_command): New function.
16877         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16878         operations structure.
16879         (_initialize_ada_language): Add "catch handlers" command entry.
16880         * NEWS: Document "catch handlers" feature.
16881
16882 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16883
16884         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16885         account when creating the array type of the slice.
16886         (ada_value_slice): Likewise.
16887
16888 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16889
16890         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16891         New enum value.
16892         (create_array_type_with_stride): Add byte_stride_prop parameter.
16893         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16894         New parameter.  Update all callers in this file.
16895         (array_type_has_dynamic_stride): New function.
16896         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16897         of arrays with dynamic byte strides.
16898         * dwarf2read.c (read_array_type): Add support for dynamic
16899         DW_AT_byte_stride attributes.
16900
16901 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16902
16903         * dwarf2read.c (read_unspecified_type): Treat
16904         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16905
16906 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16907
16908         Update copyright year range in all GDB files.
16909
16910 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16911
16912         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16913         and gdb/testsuite/gdb.base/step-line.c.
16914
16915 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16916
16917         * copyright.py (main): Dump the contents of
16918         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16919         even if BY_HAND is empty.
16920
16921 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16922
16923         * top.c (print_gdb_version): Update Copyright year in version
16924         message.
16925
16926 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16927
16928         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16929
16930 For older changes see ChangeLog-2017.
16931 \f
16932 Local Variables:
16933 mode: change-log
16934 left-margin: 8
16935 fill-column: 74
16936 version-control: never
16937 coding: utf-8
16938 End: