Improve "set debug separate-debug-file"
[external/binutils.git] / gdb / ChangeLog
1 2018-12-26  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * build-id.c (build_id_to_debug_bfd): Enhance debug output.
4         * symfile.c (separate_debug_file_exists): Likewise.
5
6 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7
8         * c-exp.y (field_name): Allow DOUBLE_KEYWORD, INT_KEYWORD, LONG,
9         SHORT, SIGNED_KEYWORD, and UNSIGNED tokens to act as a field
10         names.
11         (typename_stoken): New function.
12
13 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
14
15         * c-exp.y (field_name): New %token, and new rule.
16         (exp): Replace uses of 'name' with 'field_name' where appropriate.
17
18 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
19
20         PR gdb/13368
21         * c-exp.y (typebase): Extend the comment.
22         (ident_tokens): Likewise.
23
24 2018-12-18  Tom Tromey  <tom@tromey.com>
25
26         * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
27         address of sect_off.
28
29 2018-12-23  Joel Brobecker  <brobecker@adacore.com>
30
31         GDB 8.2.1 released.
32
33 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
34
35         * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
36         assigning locations.
37         (riscv_return_value): Take more care not to read/write outside of
38         argument buffer.  Cast return value between the declared type and
39         the abi type.
40
41 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
42
43         * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
44         fflags, and frm registers.
45
46 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
47
48         * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
49         (riscv_gdbarch_init): Register new function with gdbarch.
50         * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
51
52 2018-12-21  Simon Marchi  <simon.marchi@ericsson.com>
53
54         * minsyms.c (mst_str): New.
55         (minimal_symbol_reader::record_full): Add debug output.
56
57 2018-12-21  John Baldwin  <jhb@FreeBSD.org>
58
59         * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
60         equal PL_FLAG_SI.
61         (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
62
63 2018-12-21  Paul Marechal  <paul.marechal@ericsson.com>
64
65         PR gdb/23974
66         * target.c (target_read_stralloc): Check for empty vector.
67
68 2018-12-21  Дилян Палаузов  <dilyan.palauzov@aegee.org>
69
70         * top.c (print_gdb_configuration): Print "--without-python"
71         if GDB was configured without Python.
72
73 2018-12-21  Andrew Burgess  <andrew.burgess@embecosm.com>
74
75         * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
76         a signed offset as a string.
77
78 2018-12-21  Dave Murphy  <davem@devkitpro.org>
79
80         * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
81         initialise.
82         * probe.c (any_static_probe_ops): Ditto.
83         * record-btrace.c (record_btrace_thread_observer_token): Ditto.
84         * stap-probe.c (stap_static_probe_ops): Ditto.
85         * tui/tui-hooks.c (tui_observers_token): Ditto.
86         * unittests/observable-selftests.c (token1, token2, token3): Ditto.
87
88 2018-12-19  Andrew Burgess  <andrew.burgess@embecosm.com>
89
90         * gdb/dummy-frame.c (default_dummy_id): Defined new function.
91         * gdb/dummy-frame.h (default_dummy_id): Declare new function.
92         * gdb/frame-unwind.c (default_unwind_pc): Define new function.
93         (default_unwind_sp): Define new function.
94         * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
95         (default_unwind_sp): Declare new function.
96         * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
97         available.
98         (get_frame_sp): Assume that gdbarch_unwind_sp is available.
99         * gdb/gdbarch.c: Regenerate.
100         * gdb/gdbarch.h: Regenerate.
101         * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
102         unwind_sp.  Add additional header files to be included in
103         generated file.
104
105 2018-12-19  Dimitar Dimitrov  <dimitar@dinux.eu>
106
107         * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
108         sp clobbers.
109
110 2018-12-17  Andrew Burgess  <andrew.burgess@embecosm.com>
111
112         * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
113         'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
114         'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
115         'processing_has_namespace_info' from unsigned int to bool.  Update
116         comments.
117         (producer_is_icc_lt_14): Update return type.
118         (producer_is_gcc_lt_4_3): Likewise.
119         (producer_is_gxx_lt_4_6): Likewise.
120         (process_die): Write true instead of 1 into predicate fields.
121         (dwarf2_start_symtab): Likewise.
122         (var_decode_location): Likewise.
123         (dwarf2_mark_helper): Likewise.
124         (dwarf2_mark): Likewise.
125         (dwarf2_clear_marks): Write false instead of 0 into predicate
126         field.
127         (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
128         0.
129
130 2018-12-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
131
132         * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
133         asm/sigcontext.h.
134
135 2018-12-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
136
137         * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
138         warning trailing new line.
139
140 2018-12-16  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
141
142         * nat/linux-ptrace.c (kill_child): New function.
143         (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
144         Add a call to kill_child in case of early return after fork.
145         (linux_check_ptrace_features): Use kill_child instead of local code.
146         (linux_test_for_tracefork): Likewise.
147
148 2018-12-14  Tom Tromey  <tom@tromey.com>
149
150         * Makefile.in: Remove "alloca" comment.
151         (INFOFILES): Remove.
152         (local-maintainer-clean): Don't use INFOFILES.
153
154 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
155
156         * syscalls/update-freebsd.sh: New file.
157         * syscalls/freebsd.xml: Regenerate.
158
159 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
160
161         * NEWS: Add entry documenting system call aliases.
162         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
163         to get_syscalls_by_name.
164         * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
165         * gdbarch.h: Regenerate.
166         * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
167         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
168         from get_syscall_by_name.  Now accepts a pointer to a vector of
169         integers and returns a bool.
170         [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
171         (syscall_create_syscall_desc): Add alias parameter and pass it to
172         syscall_desc constructor.
173         (syscall_start_syscall): Handle alias attribute.
174         (syscall_attr): Add alias attribute.
175         (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
176         Now accepts a pointer to a vector of integers and returns a
177         bool.  Add syscalls whose alias or name matches the requested
178         name.
179         (get_syscalls_by_name): Rename from get_syscall_by_name.  Now
180         accepts a pointer to a vector of integers and returns a bool.
181         * xml-syscall.h (get_syscalls_by_name): Likewise.
182
183 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
184
185         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
186         to get_syscalls_by_group.
187         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
188         false.
189         [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
190         numbers to an existing vector of integers and return a bool.
191         (get_syscalls_by_group): Accept pointer to vector of integers
192         and change return type to bool.
193         * xml-syscall.h (get_syscalls_by_group): Likewise.
194
195 2018-12-13  Jim Wilson  <jimw@sifive.com>
196
197         * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
198         comment for SD field, and correct xlen calculation.  For MISA, add
199         comment for MXL field, add call to register_size, and correct base
200         calculation.
201
202 2018-12-13  Stafford Horne  <shorne@gmail.com>
203
204         * NEWS(New targets): Add or1k*-*-linux*.
205
206 2018-12-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
207
208         * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
209         declare on one line to fix ARI warning.
210
211 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
212
213         * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
214         (infcall_suspend_state::registers): New.
215         (infcall_suspend_state::restore): New.
216         (infcall_suspend_state::thread_suspend): Rename to...
217         (infcall_suspend_state::m_thread_suspend): ...this.
218         (infcall_suspend_state::registers): Rename to...
219         (infcall_suspend_state::m_registers): ...this.
220         (infcall_suspend_state::siginfo_gdbarch): Rename to...
221         (infcall_suspend_state::m_siginfo_gdbarch): ...this.
222         (infcall_suspend_state::siginfo_data): Rename to...
223         (infcall_suspend_state::m_siginfo_data): ...this.
224         (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
225         constructor.
226         (restore_infcall_suspend_state): Rewrite to use
227         infcall_suspend_state::restore method.
228         (get_infcall_suspend_state_regcache): Use
229         infcall_suspend_state::registers method.
230
231 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
232
233         * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
234         arguments are passed in integer registers.
235         (riscv_call_arg_complex_float): Likewise.
236
237 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
238
239         * nat/linux-osdata.c (common_getter): New function.
240         (struct osdata_type): Change getter to take_snapshot.
241         Add LONGEST len_avail and struct buffer buffer.
242         Change all elements in the initializer.
243         Add an element for the list of types.
244         (linux_xfer_osdata_info_os_types): New function.
245         (linux_common_xfer_osdata): Use common_getter for the list of types.
246         Replace getter call by common_getter.
247         (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
248         Add arg BUFFER.  Only keep the code that adds data in BUFFER.
249         (linux_xfer_osdata_fds): Likewise.
250         (linux_xfer_osdata_modules): Likewise.
251         (linux_xfer_osdata_msg): Likewise.
252         (linux_xfer_osdata_processes): Likewise.
253         (linux_xfer_osdata_processgroups): Likewise.
254         (linux_xfer_osdata_sem): Likewise.
255         (linux_xfer_osdata_shm): Likewise.
256         (linux_xfer_osdata_isockets): Likewise.
257         (linux_xfer_osdata_threads): Likewise.
258
259 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
260
261         * nat/linux-osdata.c: Removed various trailing spaces.
262
263 2018-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
264
265         * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
266         leading whitespace before #include line.
267
268 2018-12-08  Simon Marchi  <simon.marchi@ericsson.com>
269             Дилян Палаузов  <dilyan.palauzov@aegee.org>
270
271         PR gdb/23950
272         * configure.ac: Search for tgetent in libtinfow.
273         * configure: Re-generate.
274
275 2018-12-08  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
276
277         * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
278         (thread_db_err_str): Forward declare.
279         (delete_thread_db_info): Call td_ta_delete_p if available.
280         (try_thread_db_load_1): Acquire td_ta_delete address.
281         * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
282
283 2018-12-08  Pedro Alves  <palves@redhat.com>
284
285         * source.c (forward_search_command): Rename to ...
286         (search_command_helper): ... this.  Add 'forward' parameter.
287         Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
288         buffer.  Handle backward searches too.
289         (forward_search_command, reverse_search_command): Reimplement by
290         calling search_command_helper.
291
292 2018-12-07  Andrew Burgess  <andrew.burgess@embecosm.com>
293
294         * .dir-locals.el: Copy most of the settings from c-mode over to
295         c++-mode.
296
297 2018-12-08  Stafford Horne  <shorne@gmail.com>
298
299         * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
300         * configure.tgt: Add or1k*-*-linux*.
301         * or1k-linux-tdep.c: New file.
302         * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
303
304 2018-12-07  Pedro Alves  <palves@redhat.com>
305
306         * dwarf2read.c (get_gdb_index_contents_from_section): Use
307         gdb::make_array_view.
308
309 2018-12-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
310
311         * language.c (_initialize_language): Fix leak by assigning
312         a static string to language.  Same for range and case_sensitive,
313         even if no leak is detected for these variables.
314
315 2018-12-05  John Baldwin  <jhb@FreeBSD.org>
316
317         * configure: Re-generate.
318         * configure.ac: Use separate sed expressions to escape variables
319         in auto-load directories.
320
321 2018-12-05  Andrew Burgess  <andrew.burgess@embecosm.com>
322
323         * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
324         (riscv_find_default_target_description): Use new function to
325         extract feature from gdbarch_info.
326         (riscv_gdbarch_init): Add error checks for xlen and flen between
327         target description and bfd headers.  Be smarter about when we
328         think the hardware floating point abi should be used.
329
330 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
331
332         * nat/aarch64-linux-hw-point.c
333         (aarch64_linux_any_set_debug_regs_state): New function.
334         * nat/aarch64-linux-hw-point.h
335         (aarch64_linux_any_set_debug_regs_state): New declaration.
336         * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
337         BPs or WPs are set.
338
339 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
340
341         * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
342         (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
343
344 2018-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
345             Simon Marchi  <simon.marchi@ericsson.com>
346
347         * linespec.c (symtab_vector_up): Remove.
348         (symtabs_from_filename): Change return type to std::vector.
349         (collect_symtabs_from_filename): Likewise.
350         (create_sals_line_offset): Assign return value of
351         collect_symtabs_from_filename to *ls->file_symtabs.
352         (convert_explicit_location_to_linespec): Remove call to release.
353         (parse_linespec): Likewise.
354         (symtab_collector) <symtab_collector>: Remove initialization of
355         m_symtabs.
356         <release_symtabs>: Change return type to std::vector<symtab *>.
357         <operator ()>: Adjust.
358
359 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
360
361         * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
362         defined.
363         (union sigval32, struct siginfo32, fbsd_siginfo_size)
364         (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
365         of KERN_PROC_AUXV and PT_LWPINFO.
366         (fbsd_nat_target::xfer_partial): Define method unconditionally.
367         Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
368         Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
369         Make TARGET_OBJECT_FREEBSD_VMMAP and
370         TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
371         and KERN_PROC_PS_STRINGS.
372         * fbsd-nat.h: Include <sys/proc.h>.
373         (fbsd_nat_target::xfer_partial): Declare method unconditionally.
374
375 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
376
377         * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
378         header files.
379         (riscv_linux_nat_target::read_description): New method.
380
381 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
382
383         * arch/riscv.h (riscv_gdbarch_features::hash): New method.
384         * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
385         (riscv_tdesc_cache): New global.
386         (riscv_create_target_description): Look in the cache before
387         creating a new target description.
388
389 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
390
391         * arch/riscv.h (riscv_gdb_features::operator==): New.
392         (riscv_gdb_features::operator!=): New.
393         * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
394         operator.
395
396 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
397
398         * arch/riscv.h (riscv_create_target_description): Make return type
399         const.
400         * arch/riscv.c (riscv_create_target_description): Likewise.
401         * riscv-tdep.c (riscv_find_default_target_description): Likewise.
402
403 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
404             Keith Seitz  <keiths@redhat.com>
405             Tom Tromey  <tom@tromey.com>
406             Sergio Durigan Junior  <sergiodj@redhat.com>
407
408         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
409         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
410         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
411         inside the CU.
412
413 2018-11-30  Pedro Alves  <palves@redhat.com>
414
415         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
416         <stratum>: New override.
417         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
418         <stratum>: New override.
419         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
420         <stratum>: New override.
421         * exec.c (exec_target) <exec_target>: Delete.
422         <stratum>: New override.
423         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
424         stratum method instead of the to_stratum field.
425         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
426         <stratum>: New override.
427         (thread_db_target::thread_db_target): Delete.
428         * make-target-delegates (print_class): Don't print a ctor
429         declaration.  Print a stratum method override declaration.
430         * process-stratum-target.h (process_stratum_target)
431         <process_stratum_target>: Delete.
432         <stratum>: New override.
433         * ravenscar-thread.c (ravenscar_thread_target)
434         <ravenscar_thread_target>: Delete.
435         <stratum>: New override.
436         * record-btrace.c (record_btrace_target)
437         <record_btrace_target>: Delete.
438         <stratum>: New override.
439         * record-full.c (record_full_base_target)
440         <record_full_base_target>: Delete.
441         <stratum>: New override.
442         * record.c (record_disconnect, record_detach)
443         (record_mourn_inferior, record_kill): Adjust to use the stratum
444         method instead of the to_stratum field.
445         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
446         * sol-thread.c (sol_thread_target)
447         <sol_thread_target>: Delete.
448         <stratum>: New override.
449         * spu-multiarch.c (spu_multiarch_target)
450         <spu_multiarch_target>: Delete.
451         <stratum>: New override.
452         * target-delegates.c: Regenerate.
453         * target.c (target_stack::push, target_stack::unpush)
454         (pop_all_targets_above, pop_all_targets_at_and_above)
455         (info_target_command, target_require_runnable)
456         (target_stack::find_beneath): Adjust to use the stratum method
457         instead of the to_stratum field.
458         (dummy_target::dummy_target): Delete.
459         (dummy_target::stratum): New.
460         (debug_target::debug_target): Delete.
461         (debug_target::stratum): New.
462         (maintenance_print_target_stack): Adjust to use the stratum method
463         instead of the to_stratum field.
464         * target.h (struct target_ops) <stratum>: New method.
465         <to_stratum>: Delete.
466         <is_pushed>: Adjust to use the stratum method
467         instead of the to_stratum field.
468
469 2018-11-30  Pedro Alves  <palves@redhat.com>
470
471         * corelow.c (core_target) <has_all_memory, has_execution>: New
472         overrides.
473         * inf-child.c (inf_child_target::has_all_memory)
474         (inf_child_target::has_memory, inf_child_target::has_stack)
475         (inf_child_target::has_registers)
476         (inf_child_target::has_execution): Delete.
477         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
478         has_stack, has_registers, has_execution>: Delete.
479         * process-stratum-target.c
480         (process_stratum_target::has_all_memory)
481         (process_stratum_target::has_memory)
482         (process_stratum_target::has_stack)
483         (process_stratum_target::has_registers)
484         (process_stratum_target::has_execution): New.
485         * process-stratum-target.h (process_stratum_target)
486         <has_all_memory, has_memory, has_stack, has_registers,
487         has_execution>: New method overrides.
488         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
489         has_memory, has_stack, has_registers, has_execution>: Delete.
490         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
491         has_execution>: Delete.
492         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
493         has_registers, has_execution>: Delete.
494         * target.c (default_child_has_all_memory)
495         (default_child_has_memory, default_child_has_stack)
496         (default_child_has_registers, default_child_has_execution):
497         Delete.
498         * target.h (default_child_has_all_memory)
499         (default_child_has_memory, default_child_has_stack)
500         (default_child_has_registers, default_child_has_execution):
501         Delete.
502         * tracefile.h (tracefile_target) <has_execution>: New override.
503
504 2018-11-30  Pedro Alves  <palves@redhat.com>
505
506         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
507         * bsd-kvm.c: Include "process-stratum-target.h".
508         (bsd_kvm_target): Now inherits from process_stratum_target.
509         (bsd_kvm_target::bsd_kvm_target): Default it.
510         * corelow.c: Include "process-stratum-target.h".
511         (core_target): Now inherits from process_stratum_target.
512         (core_target::core_target): Don't set to_stratum here.
513         * inf-child.c (inf_child_target::inf_child_target): Delete.
514         * inf-child.h: Include "process-stratum-target.h".
515         (inf_child_target): Inherit from process_stratum_target.
516         (inf_child_target) <inf_child_target>: Default it.
517         <can_async_p, supports_non_stop, supports_disable_randomization>:
518         Delete overrides.
519         * process-stratum-target.c: New file.
520         * process-stratum-target.h: New file.
521         * remote-sim.c: Include "process-stratum-target.h".
522         (gdbsim_target): Inherit from process_stratum_target.
523         <gdbsim_target>: Default it.
524         * remote.c: Include "process-stratum-target.h".
525         (remote_target): Inherit from process_stratum_target.
526         <remote_target>: Default it.
527         * target.c (default_thread_address_space)
528         (default_thread_architecture): Delete.
529         * target.h (target_ops) <thread_architecture>: Now returns NULL by
530         default.
531         <thread_address_space>: Ditto.
532         * test-target.h: Include "process-stratum-target.h" instead of
533         "target.h".
534         (test_target_ops): Inherit from process_stratum_target.
535         <test_target_ops>: Default it.
536         * tracefile.c (tracefile_target::tracefile_target): Delete.
537         * tracefile.h: Include "process-stratum-target.h".
538         (tracefile_target): Inherit from process_stratum_target.
539         <tracefile_target>: Default it.
540         * target-delegates.c: Regenerate.
541
542 2018-11-30  Pedro Alves  <palves@redhat.com>
543
544         * Makefile.in (COMMON_SFILES): Add test-target.c.
545         * gdbarch-selftests.c: Include "test-target.h".
546         * regcache.c: Include "test-target.h".
547         * target.c (test_target_info, test_target_ops::info): Move to ...
548         * test-target.c: ... this new file.
549         * target.h (test_target_ops): Move to ...
550         * test-target.h: ... this new file.
551
552 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
553
554         * source.c (forward_search_command): Fix leak by using
555         xrealloc even for the first allocation in the loop, as buf
556         is static.
557
558 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
559
560         PR gdb/23093
561         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
562         (fbsd_gdb_signal_to_target): New.
563         (fbsd_init_abi): Install gdbarch "signal_from_target" and
564         "signal_to_target" methods.
565
566 2018-11-29  Tom Tromey  <tom@tromey.com>
567
568         * valarith.c (value_x_unop): Don't set argvec[3].
569
570 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
571
572         PR gdb/23917
573         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
574         semicolon.
575
576 2018-11-26  Pedro Alves  <palves@redhat.com>
577
578         * procfs.c (procfs_notice_thread): Replace uses of
579         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
580         * sol-thread.c (sol_thread_target::wait)
581         (sol_update_thread_list_callback): Likewise.
582
583 2018-11-25  Tom Tromey  <tom@tromey.com>
584
585         * ui-out.c (ui_out::field_fmt): Remove comment.
586         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
587         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
588
589 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
590
591         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
592         leak in open_source_file' has been partially undone by '2179fbc36d23
593         Return scoped_fd from open_source_file'. Re-add the transfer of
594         current s->fullname to the unique_xmalloc_ptr fullname given
595         to find_and_open_source.
596
597 2018-11-23  Pedro Alves  <palves@redhat.com>
598
599         * gdbthread.h (enum thread_state): Move comments here.
600         (is_running, is_stopped, is_exited): Remove declarations.
601
602 2018-11-22  Pedro Alves  <palves@redhat.com>
603
604         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
605         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
606         ALL_NON_EXITED_THREADS with all_non_exited_threads.
607         (print_one_breakpoint_location): Replace ALL_INFERIORS with
608         all_inferiors.
609         * bsd-kvm.c: Include inferior.h.
610         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
611         with all_non_exited_threads.
612         * common/filtered-iterator.h: New.
613         * common/safe-iterator.h: New.
614         * corelow.c (core_target_open): Don't call init_thread_list here.
615         * darwin-nat.c (thread_info_from_private_thread_info): Replace
616         ALL_THREADS with all_threads.
617         * fbsd-nat.c (fbsd_nat_target::resume): Replace
618         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
619         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
620         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
621         * fork-child.c (postfork_hook): Don't call init_thread_list here.
622         * gdbarch-selftests.c (register_to_value_test): Adjust.
623         * gdbthread.h: Don't include "inferior.h" here.
624         (struct inferior): Forward declare.
625         (enum step_over_calls_kind): Moved here from inferior.h.
626         (thread_info::deletable): Definition moved to thread.c.
627         (find_thread_ptid (inferior *, ptid_t)): Declare.
628         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
629         Include "thread-iter.h".
630         (all_threads, all_non_exited_threads, all_threads_safe): New.
631         (any_thread_p): Declare.
632         (thread_list): Delete.
633         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
634         all_non_exited_threads.
635         (proceed_after_attach_callback): Delete.
636         (proceed_after_attach): Take an inferior pointer instead of an
637         integer PID.  Adjust to use range-for.
638         (attach_post_wait): Pass down inferior pointer instead of pid.
639         Use range-for instead of ALL_NON_EXITED_THREADS.
640         (detach_command): Remove init_thread_list call.
641         * inferior-iter.h: New.
642         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
643         (delete_thread_of_inferior): Delete.
644         (delete_inferior, exit_inferior_1): Use range-for with
645         inf->threads_safe() instead of iterate_over_threads.
646         (inferior_appeared): Call init_thread_list here.
647         (discard_all_inferiors): Use all_non_exited_inferiors.
648         (find_inferior_id, find_inferior_pid): Use all_inferiors.
649         (iterate_over_inferiors): Use all_inferiors_safe.
650         (have_inferiors, number_of_live_inferiors): Use
651         all_non_exited_inferiors.
652         (number_of_inferiors): Use all_inferiors and std::distance.
653         (print_inferior): Use all_inferiors.
654         * inferior.h: Include gdbthread.h.
655         (enum step_over_calls_kind): Moved to gdbthread.h.
656         (struct inferior) <thread_list>: New field.
657         <threads, non_exited_threads, threads_safe>: New methods.
658         (ALL_INFERIORS): Delete.
659         Include "inferior-iter.h".
660         (ALL_NON_EXITED_INFERIORS): Delete.
661         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
662         functions.
663         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
664         ALL_NON_EXITED_THREADS with all_non_exited_threads.
665         * infrun.c (follow_exec): Use all_threads_safe.
666         (clear_proceed_status, proceed): Use all_non_exited_threads.
667         (init_wait_for_inferior): Don't clear inline frame state here.
668         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
669         all_threads instead of ALL_NON_EXITED_THREADS.
670         (random_pending_event_thread): Use all_non_exited_threads instead
671         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
672         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
673         instead of ALL_NON_EXITED_THREADS.
674         (handle_no_resumed): Use all_non_exited_threads instead of
675         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
676         ALL_INFERIORS.
677         (restart_threads, switch_back_to_stepped_thread): Use
678         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
679         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
680         all_inferiors.
681         (kill_unfollowed_fork_children): Use inf->non_exited_threads
682         instead of ALL_NON_EXITED_THREADS.
683         * linux-tdep.c (linux_make_corefile_notes): Use
684         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
685         * linux-thread-db.c (thread_db_target::update_thread_list):
686         Replace ALL_INFERIORS with all_inferiors.
687         (thread_db_target::thread_handle_to_thread_info): Use
688         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
689         * mi/mi-interp.c (multiple_inferiors_p): New.
690         (mi_on_resume_1): Simplify using all_non_exited_threads and
691         multiple_inferiors_p.
692         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
693         instead of ALL_NON_EXITED_THREADS.
694         * nto-procfs.c (nto_procfs_target::open): Don't call
695         init_thread_list here.
696         * record-btrace.c (record_btrace_target_open)
697         (record_btrace_target::stop_recording)
698         (record_btrace_target::close)
699         (record_btrace_target::record_is_replaying)
700         (record_btrace_target::resume, record_btrace_target::wait)
701         (record_btrace_target::record_stop_replaying): Use
702         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
703         * record-full.c (record_full_wait_1): Use all_non_exited_threads
704         instead of ALL_NON_EXITED_THREADS.
705         * regcache.c (cooked_read_test): Remove reference to global
706         thread_list.
707         * remote-sim.c (gdbsim_target::create_inferior): Don't call
708         init_thread_list here.
709         * remote.c (remote_target::update_thread_list): Use
710         all_threads_safe instead of ALL_NON_EXITED_THREADS.
711         (remote_target::process_initial_stop_replies): Replace
712         ALL_INFERIORS with all_non_exited_inferiors and use
713         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
714         (remote_target::open_1): Don't call init_thread_list here.
715         (remote_target::append_pending_thread_resumptions)
716         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
717         instead of ALL_NON_EXITED_THREADS.
718         (remote_target::commit_resume)
719         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
720         with all_non_exited_inferiors and use all_non_exited_threads
721         instead of ALL_NON_EXITED_THREADS.
722         (remote_target::kill_new_fork_children): Use
723         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
724         init_thread_list and init_wait_for_inferior calls.
725         (remote_target::remote_btrace_maybe_reopen)
726         (remote_target::thread_handle_to_thread_info): Use
727         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
728         * target.c (target_terminal::restore_inferior)
729         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
730         all_non_exited_inferiors.
731         * thread-iter.c: New file.
732         * thread-iter.h: New file.
733         * thread.c: Include "inline-frame.h".
734         (thread_list): Delete.
735         (clear_thread_inferior_resources): Call clear_inline_frame_state.
736         (init_thread_list): Use all_threads_safe instead of
737         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
738         (new_thread): Adjust to per-inferior thread lists.
739         (add_thread_silent): Pass inferior to find_thread_ptid.
740         (thread_info::deletable): New, moved from the header.
741         (delete_thread_1): Adjust to per-inferior thread lists.
742         (find_thread_global_id): Use inf->threads().
743         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
744         find_thread_ptid.
745         (find_thread_ptid(inferior*, ptid_t)): New overload.
746         (iterate_over_threads): Use all_threads_safe.
747         (any_thread_p): New.
748         (thread_count): Use all_threads and std::distance.
749         (live_threads_count): Use all_non_exited_threads and
750         std::distance.
751         (valid_global_thread_id): Use all_threads.
752         (in_thread_list): Use find_thread_ptid.
753         (first_thread_of_inferior): Adjust to per-inferior thread lists.
754         (any_thread_of_inferior, any_live_thread_of_inferior): Use
755         inf->non_exited_threads().
756         (prune_threads, delete_exited_threads): Use all_threads_safe.
757         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
758         (set_resumed, set_running): Use all_non_exited_threads.
759         (is_thread_state, is_stopped, is_exited, is_running)
760         (is_executing): Delete.
761         (set_executing, set_stop_requested, finish_thread_state): Use
762         all_non_exited_threads.
763         (print_thread_info_1): Use all_inferiors and all_threads.
764         (thread_apply_all_command): Use all_non_exited_threads.
765         (thread_find_command): Use all_threads.
766         (update_threads_executing): Use all_non_exited_threads.
767         * tid-parse.c (parse_thread_id): Use inf->threads.
768         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
769
770 2018-11-22  Pedro Alves  <palves@redhat.com>
771
772         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
773         switch to it before calling into try_open_exec_file.
774
775 2018-11-22  Pedro Alves  <palves@redhat.com>
776
777         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
778         inferior_thread instead of find_thread_ptid, and only when
779         inferior_ptid is not null_ptid.
780         * inferior.c (add_inferior): Don't include target_pid_to_str
781         output when the inferior is not started.
782         * python/py-inferior.c (python_on_normal_stop): Don't use
783         find_thread_ptid.
784         (tui_on_user_selected_context_changed): Use inferior_thread
785         instead of find_thread_ptid, and only when inferior_ptid is not
786         null_ptid.
787
788 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
789
790         PR python/23714
791         * gdb/python/python.c (execute_gdb_command): Call
792         prevent_dont_repeat earlier to avoid affecting dont_repeat.
793
794 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
795
796         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
797         (HFILES_NO_SRCDIR): Add arch/riscv.h.
798         * arch/riscv.c: New file.
799         * arch/riscv.h: New file.
800         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
801         this list, and add arch/riscv.o.
802         * features/Makefile: Add riscv features.
803         * features/riscv/32bit-cpu.c: New file.
804         * features/riscv/32bit-cpu.xml: New file.
805         * features/riscv/32bit-csr.c: New file.
806         * features/riscv/32bit-csr.xml: New file.
807         * features/riscv/32bit-fpu.c: New file.
808         * features/riscv/32bit-fpu.xml: New file.
809         * features/riscv/64bit-cpu.c: New file.
810         * features/riscv/64bit-cpu.xml: New file.
811         * features/riscv/64bit-csr.c: New file.
812         * features/riscv/64bit-csr.xml: New file.
813         * features/riscv/64bit-fpu.c: New file.
814         * features/riscv/64bit-fpu.xml: New file.
815         * features/riscv/rebuild-csr-xml.sh: New file.
816         * riscv-tdep.c: Add 'arch/riscv.h' include.
817         (riscv_gdb_reg_names): Delete.
818         (csr_reggroup): New global.
819         (struct riscv_register_alias): Delete.
820         (struct riscv_register_feature): New structure.
821         (riscv_register_aliases): Delete.
822         (riscv_xreg_feature): New global.
823         (riscv_freg_feature): New global.
824         (riscv_virtual_feature): New global.
825         (riscv_csr_feature): New global.
826         (riscv_create_csr_aliases): New function.
827         (riscv_read_misa_reg): Delete.
828         (riscv_has_feature): Delete.
829         (riscv_isa_xlen): Simplify, just return cached xlen.
830         (riscv_isa_flen): Simplify, just return cached flen.
831         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
832         (riscv_register_name): Update to make use of tdesc_register_name.
833         Look up xreg and freg names in the new globals riscv_xreg_feature
834         and riscv_freg_feature.  Don't supply csr aliases here.
835         (riscv_fpreg_q_type): Delete.
836         (riscv_register_type): Use tdesc_register_type in almost all
837         cases, override the returned type in a few specific cases only.
838         (riscv_print_one_register_info): Handle errors reading registers.
839         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
840         registers that are otherwise unknown to GDB.  Also check the
841         csr_reggroup.
842         (riscv_print_registers_info): Remove assert about upper register
843         number, and use gdbarch_register_reggroup_p instead of
844         short-cutting.
845         (riscv_find_default_target_description): New function.
846         (riscv_check_tdesc_feature): New function.
847         (riscv_add_reggroups): New function.
848         (riscv_setup_register_aliases): New function.
849         (riscv_init_reggroups): New function.
850         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
851         setup register groups.  Register new riscv debug variable.
852         * riscv-tdep.h: Add 'arch/riscv.h' include.
853         (struct gdbarch_tdep): Remove abi union, and add
854         riscv_gdbarch_features field.  Remove cached quad floating point
855         type, and provide initialisation for double type field.
856         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
857         the list of targets using the feature based target descriptions.
858         * NEWS: Mention target description support.
859
860 2018-11-21  Pedro Alves  <palves@redhat.com>
861
862         * valops.c (find_method_list, value_find_oload_method_list)
863         (find_overload_match, find_oload_champ): Rename parameters and
864         locals.
865
866 2018-11-21  Pedro Alves  <palves@redhat.com>
867
868         * valops.c (find_method_list): Replace pointer and length
869         parameters with an gdb::array_view.  Adjust.
870         (value_find_oload_method_list): Likewise.
871         (find_overload_match): Use gdb::array_view for methods list.
872         Adjust to find_oload_champ interface change.
873         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
874         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
875
876 2018-11-21  Pedro Alves  <palves@redhat.com>
877
878         * gdbtypes.c (compare_badness): Change type of parameters to const
879         reference.  Adjust to badness_vector being a std::vector now.
880         (rank_function): Adjust to badness_vector being a std::vector now.
881         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
882         (LENGTH_MATCH): Delete.
883         (compare_badness): Change type of parameters to const reference.
884         (rank_function): Return a badness_vector by value now.
885         (find_overload_match): Adjust to badness_vector being a
886         std::vector now.  Remove cleanups.
887         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
888         badness_vector pointer.
889         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
890         a badness_vector pointer.  Adjust to badness_vector being a
891         std::vector now.  Remove cleanups.
892         (find_oload_champ): 'oload_champ_bv' parameter now
893         a badness_vector pointer.  Adjust to badness_vector being a
894         std::vector now.  Remove cleanups.
895
896 2018-11-21  Pedro Alves  <palves@redhat.com>
897
898         * cp-support.c (sym_return_val_size, sym_return_val_index)
899         (sym_return_val): Delete.
900         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
901         add to the vector.
902         (make_symbol_overload_list): Adjust to return a std::vector
903         instead of maintaining a global open coded vector.
904         (make_symbol_overload_list_block): Add std::vector parameter.
905         (make_symbol_overload_list_block): Rename to ...
906         (add_symbol_overload_list_block): ... this and add std::vector
907         parameter.
908         (make_symbol_overload_list_namespace): Rename to ...
909         (add_symbol_overload_list_namespace): ... this and add std::vector
910         parameter.
911         (make_symbol_overload_list_adl_namespace): Rename to ...
912         (add_symbol_overload_list_adl_namespace): ... this and add
913         std::vector parameter.
914         (make_symbol_overload_list_adl): Delete.
915         (add_symbol_overload_list_adl): New.
916         (make_symbol_overload_list_using): Rename to ...
917         (add_symbol_overload_list_using): ... this and add std::vector
918         parameter.
919         (make_symbol_overload_list_qualified): Rename to ...
920         (add_symbol_overload_list_qualified): ... this and add std::vector
921         parameter.
922         * cp-support.h: Include "common/array-view.h" and <vector>.
923         (make_symbol_overload_list): Change return type to std::vector.
924         (make_symbol_overload_list_adl): Delete declaration.
925         (add_symbol_overload_list_adl): New declaration.
926         * valops.c (find_overload_match): Local 'oload_syms' now a
927         std::vector.
928         (find_oload_champ_namespace): 'oload_syms' parameter now a
929         std::vector pointer.
930         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
931         std::vector pointer.  Adjust to new make_symbol_overload_list
932         interface.
933
934 2018-11-21  Pedro Alves  <palves@redhat.com>
935
936         * common/array-view.h (array_view::splice(size_type, size_t)): New.
937         (array_view::splice(size_type)): New.
938         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
939         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
940         std::vector.
941         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
942         * extension.h: Include "common/array-view.h".
943         (xmethod_worker::invoke): Adjust to use gdb::array_view.
944         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
945         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
946         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
947         (xmethod_worker::do_get_result_type): Adjust to use
948         gdb::array_view.
949         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
950         * gdbtypes.h: Include "common/array-view.h".
951         (rank_function): Adjust to use gdb::array_view.
952         * python/py-xmethods.c (python_xmethod_worker::invoke)
953         (python_xmethod_worker::do_get_arg_types)
954         (python_xmethod_worker::do_get_result_type)
955         (python_xmethod_worker::invoke): Adjust to new interfaces.
956         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
957         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
958         * valops.c (find_overload_match, find_oload_champ_namespace)
959         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
960         gdb:array_view and the new xmethod_worker interfaces.
961         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
962         gdb::array_view.
963         * value.h (find_overload_match, result_type_of_xmethod)
964         (call_xmethod): Adjust to use gdb::array_view.
965         * unittests/array-view-selftests.c: Add slicing tests.
966
967 2018-11-21  Pedro Alves  <palves@redhat.com>
968
969         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
970         * common/array-view.h (make_array_view): New.
971         * compile/compile-object-run.c (compile_object_run): Adjust to
972         pass an array_view.
973         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
974         * eval.c (eval_call): Adjust to pass an array_view.
975         (evaluate_subexp_standard): Adjust to pass an array_view.
976         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
977         * guile/scm-value.c (gdbscm_value_call): Likewise.
978         * infcall.c (push_dummy_code): Replace pointer + size parameters
979         with an array_view parameter.
980         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
981         adjust.
982         * infcall.h: Include "common/array-view.h".
983         (call_function_by_hand, call_function_by_hand_dummy): Replace
984         pointer + size parameters with an array_view parameter.
985         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
986         * linux-tdep.c (linux_infcall_mmap): Likewise.
987         * objc-lang.c (lookup_objc_class, lookup_child_selector)
988         (value_nsstring, print_object_command): Likewise.
989         * python/py-value.c (valpy_call): Likewise.
990         * rust-lang.c (rust_evaluate_funcall): Likewise.
991         * spu-tdep.c (flush_ea_cache): Likewise.
992         * valarith.c (value_x_binop, value_x_unop): Likewise.
993         * valops.c (value_allocate_space_in_inferior): Likewise.
994         * unittests/array-view-selftests.c (run_tests): Add
995         gdb::make_array_view test.
996
997 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
998
999         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
1000         than a fixed size buffer.
1001
1002 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
1003
1004         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
1005         and remove insertion of extra spaces in GDB's output.
1006         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
1007         Layout field into a temporary buffer, and then output it as a
1008         string field.
1009
1010 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1011
1012         * NEWS: Document the language choice done by
1013         'info [types|functions|variables]|rbreak'.
1014
1015 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1016
1017         * symtab.c (treg_matches_sym_type_name): Use
1018         scoped_switch_to_sym_language_if_auto instead of local logic.
1019         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1020         to switch to SYM language when language mode is auto.
1021
1022 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1023
1024         * language.h (scoped_switch_to_sym_language_if_auto): New class.
1025
1026 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1027
1028         * symtab.c (search_symbols): Properly check absence of type regexp
1029         before entering the loop scanning the minimal symbols.
1030
1031 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
1032
1033         * s12z-tdep.c (s12z_extract_return_value): New function.
1034         (inv_reg_perm) New array.
1035         (s12z_return_value): Populate readbuf if non-null.
1036
1037 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
1038
1039         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1040         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1041         to MinGW fixed by Gnulib.
1042         (O_NOINHERIT): Define if not defined.
1043
1044 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
1045
1046         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1047
1048 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1049
1050         * infrun.c (displaced_step_inferior_state) <next>: Remove.
1051
1052 2018-11-19  Tom Tromey  <tom@tromey.com>
1053
1054         * source.c (get_filename_and_charpos): Return void.
1055
1056 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1057
1058         * skip.c (_initialize_step_skip): Fix "info skip" help.
1059
1060 2018-11-16  Tom Tromey  <tom@tromey.com>
1061
1062         PR rust/23625:
1063         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1064
1065 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1066
1067         * infrun.c (displaced_step_inferior_states): Change type to
1068         std::forward_list.
1069         (get_displaced_stepping_state): Adjust.
1070         (displaced_step_in_progress_any_inferior): Adjust.
1071         (add_displaced_stepping_state): Adjust.
1072         (remove_displaced_stepping_state): Adjust.
1073
1074 2018-11-18  Tom Tromey  <tom@tromey.com>
1075
1076         PR build/23814:
1077         * target-delegates.c: Rebuild.
1078         * ia64-linux-nat.c (class ia64_linux_nat_target)
1079         <have_steppable_watchpoint>: Use override.  Return true, not 1.
1080         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
1081         "self" argument.
1082         (ia64_linux_nat_target::low_new_thread): Rename.
1083         (class ia64_linux_nat_target) <read_description>: Don't declare.
1084         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1085         bool.
1086
1087 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1088
1089         PR gdb/22736:
1090         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1091         lang_struct_return code.
1092
1093 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1094
1095         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1096         return_method.
1097         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1098         * amd64-tdep.c (amd64_push_arguments): Likewise.
1099         (amd64_push_dummy_call): Likewise.
1100         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1101         * arc-tdep.c (arc_push_dummy_call): Likewise.
1102         * arm-tdep.c (arm_push_dummy_call): Likewise.
1103         * avr-tdep.c (avr_push_dummy_call): Likewise.
1104         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1105         * cris-tdep.c (cris_push_dummy_call): Likewise.
1106         * csky-tdep.c (csky_push_dummy_call): Likewise.
1107         * frv-tdep.c (frv_push_dummy_call): Likewise.
1108         * gdbarch.c: Regenerate.
1109         * gdbarch.h: Regenerate.
1110         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1111         return_method.
1112         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1113         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1114         (hppa64_push_dummy_call): Likewise.
1115         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1116         * i386-tdep.c (i386_push_dummy_call): Likewise.
1117         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1118         * infcall.c (call_function_by_hand_dummy): Likewise.
1119         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1120         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1121         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1122         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1123         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1124         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1125         * mep-tdep.c (mep_push_dummy_call): Likewise.
1126         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1127         (mips_n32n64_push_dummy_call): Likewise.
1128         (mips_o32_push_dummy_call): Likewise.
1129         (mips_o64_push_dummy_call): Likewise.
1130         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1131         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1132         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1133         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1134         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1135         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1136         (ppc64_sysv_abi_push_dummy_call): Likewise.
1137         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1138         (ppc64_sysv_abi_push_dummy_call): Likewise.
1139         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1140         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1141         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1142         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1143         * rx-tdep.c (rx_push_dummy_call): Likewise.
1144         * s390-tdep.c (s390_push_dummy_call): Likewise.
1145         * score-tdep.c (score_push_dummy_call): Likewise.
1146         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1147         (sh_push_dummy_call_nofpu): Likewise.
1148         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1149         (sparc32_push_dummy_call): Likewise.
1150         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1151         (sparc64_push_dummy_call): Likewise.
1152         * spu-tdep.c (spu_push_dummy_call): Likewise.
1153         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1154         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1155         * v850-tdep.c (v850_push_dummy_call): Likewise.
1156         * vax-tdep.c (vax_push_dummy_call): Likewise.
1157         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1158         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1159
1160 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1161
1162         * gdbarch.sh (enum function_call_return_method): Add enum.
1163         * gdbarch.h: Regenerate.
1164         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1165
1166 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
1167
1168         * unittests/copy_bitwise-selftests.c: New file.
1169         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1170         (selftests::copy_bitwise_tests): Delete, moving this code to
1171         unittests/copy_bitwise-selftests.c instead.
1172         (_initialize_utils): Do not register copy_bitwise tests.
1173         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1174         unittests/copy_bitwise-selftests.c.
1175
1176 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
1177
1178         * ada-lang.c (move_bits): Delete. Update all callers to use
1179         copy_bitwise instead.
1180         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1181         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1182         Move from here to utils.c.
1183         (_initialize_dwarf2loc): Remove call to register copy_bitwise
1184         selftests.
1185         * utils.h (copy_bitwise): Add declaration.
1186         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1187         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1188         Moved here from dwarf2loc.c.
1189         (_initialize_utils): Register copy_bitwise selftests.
1190
1191 2018-11-14  Jim Wilson  <jimw@sifive.com>
1192
1193         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1194         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1195         then increment next_regnum if odd.
1196         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
1197         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
1198         function type.  Pass new arg to riscv_arg_location based on function
1199         type.
1200         (riscv_return_value): Pass new arg to riscv_arg_location.
1201
1202         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1203         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1204         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1205
1206         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1207         setting len.  New local align, set to max of arg align and xlen,
1208         and pass to first riscv_assign_stack_location call.
1209
1210 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
1211
1212         * skip.c (complete_skip_number): New function.
1213         (_initialize_step_skip): Add completers to some skip commands.
1214
1215 2018-11-09  Tom Tromey  <tom@tromey.com>
1216
1217         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1218         (struct remote_g_packet_data): Derive from allocate_on_obstack.
1219         <guesses>: Now a std::vector.
1220         (remote_g_packet_data_init, register_remote_g_packet_guess):
1221         Update.
1222         (remote_read_description_p): Update.  Return bool.
1223         (remote_target::read_description): Update.
1224         (struct remote_g_packet_guess): Add constructor.
1225
1226 2018-11-09  Tom Tromey  <tom@tromey.com>
1227
1228         * common/scoped_fd.h (class scoped_fd): Add move constructor and
1229         move assignment operator.
1230         * psymtab.c (psymtab_to_fullname): Update.
1231         * source.h (open_source_file): Return scoped_fd.
1232         (find_and_open_source): Likewise.
1233         * source.c (open_source_file): Return scoped_fd.
1234         (get_filename_and_charpos): Update.
1235         (print_source_lines_base): Update.  Use scoped_fd::to_file.
1236         (forward_search_command): Likewise.
1237         (reverse_search_command): Likewise.
1238         (find_and_open_source): Return scoped_fd.
1239         * tui/tui-source.c (tui_set_source_content): Update.  Use
1240         gdb_file_up.
1241
1242 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
1243
1244         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1245         overflow.
1246
1247 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1248
1249         * configure: Regenerate.
1250
1251 2018-11-09  Tom de Vries  <tdevries@suse.de>
1252
1253         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1254         unconditionally, to set the language of the symbol.  Manage freeing
1255         returned pointer using gdb::unique_xmalloc_ptr.
1256
1257 2018-11-08  Tom Tromey  <tom@tromey.com>
1258
1259         * record.c (require_record_target): Upper-case "<TAB>".
1260
1261 2018-11-08  Tom Tromey  <tom@tromey.com>
1262
1263         * python/lib/gdb/command/pretty_printers.py
1264         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1265
1266 2018-11-08  Tom Tromey  <tom@tromey.com>
1267
1268         PR gdb/23555:
1269         PR gdb/23838:
1270         * target.h (target_supports_terminal_ours): Return bool.
1271         * target.c (target_supports_terminal_ours): Handle case where
1272         current_top_target returns nullptr.  Return bool.
1273
1274 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
1275
1276         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1277         return the correct count for potential HFAs.
1278
1279 2018-11-08  Jan Beulich  <jbeulich@suse.com>
1280
1281         * i387-tdep.c (i387_supply_xsave): Split handling of
1282         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1283         (i387_collect_xsave): Likewise.
1284
1285 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1286
1287         * riscv-tdep.c (riscv_insn::decode): Update header comment.
1288         (riscv_frame_this_id): Catch errors thrown while building the
1289         frame cache, leave the frame id as the default, which is the outer
1290         frame id.
1291
1292 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1293
1294         * ada-lang.c (read_atcb): Only set task_info->called_task if
1295         task_info->state == Entry_Caller_Sleep.
1296         (print_ada_task_info): Do not check task_info->state before
1297         checking task_info->called_task.
1298         (info_task): Likewise.
1299
1300 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1301
1302         * ada-tasks.c (read_atcb): Clear task_info before computing
1303         the value of each of its fields.
1304
1305 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1306
1307         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1308         NULL before dereferencing it.
1309
1310 2018-11-06  Tom de Vries  <tdevries@suse.de>
1311
1312         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1313         program headers.
1314
1315 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
1316
1317         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1318         so that it applies to uclinux as well.
1319
1320 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
1321
1322         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1323         when on AAPCS.
1324
1325 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
1326
1327         * riscv-fbsd-nat.c (getregs_supplies): Return true for
1328         RISCV_CSR_SSTATUS_REGNUM.
1329
1330 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1331
1332         * source.c (open_source_file): Fix leak by transferring the
1333         current s->fullname to the unique_xmalloc_ptr fullname given
1334         to find_and_open_source.
1335
1336 2018-11-04  Tom Tromey  <tom@tromey.com>
1337
1338         * varobj.c (install_default_visualizer): Update.
1339         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1340         Return gdbpy_ref.
1341         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1342         (find_pretty_printer_from_progspace)
1343         (find_pretty_printer_from_gdb, find_pretty_printer)
1344         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1345         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1346         Update.
1347
1348 2018-11-04  Tom Tromey  <tom@tromey.com>
1349
1350         * python/python.c (gdbpy_parameter_value): Update.
1351         * python/python-internal.h (python_string_to_unicode)
1352         (python_string_to_target_python_string)
1353         (host_string_to_python_string): Return gdbpy_ref.
1354         * python/py-utils.c (python_string_to_unicode)
1355         (unicode_to_encoded_python_string)
1356         (unicode_to_target_python_string)
1357         (python_string_to_target_string)
1358         (python_string_to_target_python_string): Return gdbpy_ref.
1359         (python_string_to_host_string): Update.
1360         (host_string_to_python_string): Return gdbpy_ref.
1361         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1362         (stpy_fullname): Update.
1363         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1364         Update.
1365         * python/py-prettyprint.c (print_string_repr): Update.
1366         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1367         (objfpy_get_build_id): Update.
1368         * python/py-breakpoint.c (bppy_get_location)
1369         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1370         Update.
1371
1372 2018-11-04  Tom Tromey  <tom@tromey.com>
1373
1374         * python/python-internal.h (gdb_py_object_from_longest)
1375         (gdb_py_object_from_ulongest): Return gdbpy_ref.
1376         * python/py-value.c (valpy_int): Update.
1377         * python/py-utils.c (gdb_py_object_from_longest): Return
1378         gdbpy_ref.
1379         (gdb_py_object_from_ulongest): Likewise.
1380         * python/py-type.c (typy_get_alignof): Update.
1381         * python/py-linetable.c (ltpy_get_all_source_lines)
1382         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1383         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1384
1385 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1386
1387         * ada-lang.c (_initialize_ada_language): Fix typo.
1388
1389 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1390
1391         * language.c (type): Remove.
1392         (_initialize_language): Remove assignment to type.
1393
1394 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
1395
1396         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1397         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1398         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1399         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1400         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1401         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1402         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1403         and aarch64-ravenscar-thread.o.
1404         * NEWS: Add entry documenting Ravenscar tasking support
1405         on AArch64 ELF.
1406
1407 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1408
1409         * symtab.c (info_functions_command): Initialize quiet flag.
1410         * stack.c (info_args_command): Likewise.
1411
1412 2018-11-01  Jim Wilson  <jimw@sifive.com>
1413
1414         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1415         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1416         debugging messages.
1417
1418 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1419
1420         * ada-lang.c (ada_watch_location_expression): New function.
1421         (ada_language_defn): Set la_watch_location_expression to
1422         ada_watch_location_expression.
1423
1424 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1425
1426         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1427
1428 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1429
1430         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1431         shifting.
1432
1433 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1434             Joel Brobecker  <brobecker@adacore.com>
1435
1436         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1437         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1438         * arm-pikeos-tdep.c: New file.
1439         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1440         embedded system.
1441         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1442
1443 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1444
1445         * common/pathstuff.c (get_standard_temp_dir): New.
1446         * common/pathstuff.h (get_standard_temp_dir): New.
1447         * config.in: Re-generate.
1448         * configure: Re-generate.
1449         * configure.ac: Don't check for mkdtemp.
1450         * gnulib/aclocal-m4-deps.mk: Re-generate.
1451         * gnulib/aclocal.m4: Re-generate.
1452         * gnulib/config.in: Re-generate.
1453         * gnulib/configure: Re-generate.
1454         * gnulib/import/Makefile.am: Re-generate.
1455         * gnulib/import/Makefile.in: Re-generate.
1456         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1457         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1458         * gnulib/import/m4/mkdtemp.m4: New file.
1459         * gnulib/import/mkdtemp.c: New file.
1460         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1461         Add mkdtemp module.
1462         * unittests/mkdir-recursive-selftests.c (test): Use
1463         get_standard_temp_dir.
1464         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1465         ifdef.
1466         * compile/compile.c (get_compile_file_tempdir): Likewise.
1467
1468 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1469
1470         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1471         (SIG_FRAME_LR_OFFSET64): New define.
1472         (SIG_FRAME_FP_OFFSET64): New define.
1473         (aix_sighandle_frame_cache): New Function.
1474         (aix_sighandle_frame_this_id): New Function.
1475         (aix_sighandle_frame_prev_register): New Function.
1476         (aix_sighandle_frame_sniffer): New Function.
1477         (aix_sighandle_frame_unwind): New global variable.
1478         (rs6000_aix_init_osabi): Install new frame unwinder.
1479
1480 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1481
1482         PR gdb/23835
1483         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1484         already defined.
1485
1486 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1487
1488         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1489
1490 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1491
1492         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1493         (producer_is_icc): New function.
1494         (check_producer): Set producer_is_icc field on dwarf2_cu.
1495         (dwarf2_init_integer_type): New function.
1496         (read_base_type): Call dwarf2_init_integer_type instead of
1497         init_integer_type in all cases.
1498         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1499         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1500         LEN is greater than 0.
1501
1502 2018-10-30  Tom Tromey  <tom@tromey.com>
1503
1504         * main.c (captured_main_1): Check return value of bfd_init.
1505
1506 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1507
1508         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1509         Adjust comments.
1510
1511 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1512
1513         * procfs.c: Include common/pathstuff.h.
1514
1515 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1516
1517         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1518         Add missing braces.  No functional change.
1519
1520 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1521
1522         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1523         to report a bad option and fix indentation.
1524         * demangle.c (demangle_command): Use report_unrecognized_option_error
1525         to report a bad option and correctly report the bad option.
1526
1527 2018-10-27  Tom Tromey  <tom@tromey.com>
1528
1529         PR cli/23364:
1530         * darwin-nat.c (copied_shell): New global.
1531         (may_have_sip): Rename from should_disable_startup_with_shell.
1532         (copy_shell_to_cache, maybe_cache_shell): New functions.
1533         (darwin_nat_target::create_inferior): Update.  Use
1534         copied_shell.
1535
1536 2018-10-27  Tom Tromey  <tom@tromey.com>
1537
1538         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1539         (run_tests): Call test_to_file.
1540         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1541         temporary files.
1542         * common/scoped_fd.h (scoped_fd::to_file): New method.
1543
1544 2018-10-27  Tom Tromey  <tom@tromey.com>
1545
1546         * unittests/scoped_mmap-selftests.c (test_normal): Use
1547         gdb_mkostemp_cloexec.
1548         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1549         Use gdb_mkostemp_cloexec.
1550         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1551         gnulib/config.in, gnulib/configure,
1552         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1553         gnulib/import/m4/gnulib-cache.m4,
1554         gnulib/import/m4/gnulib-comp.m4: Update.
1555         * gnulib/import/m4/mkostemp.m4: New file.
1556         * gnulib/import/m4/mkstemp.m4: Remove.
1557         * gnulib/import/mkostemp.c: New file.
1558         * gnulib/import/mkstemp.m4: Remove.
1559         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1560         mkstemp, add mkostemp.  Apply new patch.
1561         * gnulib/import/stdlib.in.h: Apply patch.
1562         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1563         New file.
1564         * dwarf-index-write.c (write_psymtabs_to_index): Use
1565         gdb_mkostemp_cloexec.
1566         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1567
1568 2018-10-27  Tom Tromey  <tom@tromey.com>
1569
1570         * unittests/mkdir-recursive-selftests.c: New file.
1571         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1572         unittests/mkdir-recursive-selftests.c.
1573         * dwarf-index-cache.c (mkdir_recursive): Move to
1574         common/filestuff.c.
1575         (index_cache::store): Check return value of mkdir_recursive.
1576         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1577         (_initialize_index_cache): Don't register test.
1578         * common/filestuff.h (mkdir_recursive): Declare.
1579         * common/filestuff.c (mkdir_recursive): Move from
1580         dwarf-index-cache.c.  Return bool.
1581
1582 2018-10-27  Tom Tromey  <tom@tromey.com>
1583
1584         * dwarf-index-write.c (write_psymtabs_to_index): Move
1585         make_temp_filename to common/pathstuff.c.
1586         * common/pathstuff.h (make_temp_filename): Declare.
1587         * common/pathstuff.c (make_temp_filename): New function, moved
1588         from dwarf-index-write.c.
1589
1590 2018-10-27  Tom Tromey  <tom@tromey.com>
1591
1592         * procfs.c (procfs_target::create_inferior): Use get_shell.
1593         * cli/cli-cmds.c (shell_escape): Use get_shell.
1594         * windows-nat.c (windows_nat_target::create_inferior): Use
1595         get_shell.
1596         * common/pathstuff.c (get_shell): New function.
1597         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1598         (fork_inferior): Use get_shell.
1599         * common/pathstuff.h (get_shell): Declare.
1600
1601 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1602
1603         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1604
1605 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1606
1607         * stack.c (print_variable_and_value_data): Add preg and treg.
1608         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1609         and update callers.
1610         (print_frame_arg_vars): Likewise.
1611         (prepare_reg): New function.
1612         (info_locals_command): Extract info print args and use them.
1613         (info_args_command): Likewise.
1614         (_initialize_stack): Modify on-line help.
1615         * symtab.c (treg_matches_sym_type_name): New function.
1616         (search_symbols): New arg t_regexp.
1617         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1618         (info_variables_command): Extract info print args and use them.
1619         (info_functions_command): Likewise.
1620         (info_types_command): Update call to symtab_symbol_info.
1621         (_initialize_symtab): Modify on-line help.
1622         * symtab.h (treg_matches_sym_type_name): New function.
1623         (search_symbols): New t_regexp arg.
1624
1625 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1626
1627         * cli-utils.c (extract_arg_maybe_quoted): New function.
1628         (extract_info_print_args): New function.
1629         (info_print_args_help): New function.
1630         (report_unrecognized_option_error): New function.
1631         * cli-utils.h (extract_arg_maybe_quoted): New function.
1632         (extract_info_print_args): New function.
1633         (info_print_args_help): New function.
1634         (report_unrecognized_option_error): New function.
1635
1636 2018-10-26  Tom Tromey  <tom@tromey.com>
1637
1638         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1639         (compute_compunit_symtab_includes): Update.
1640         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1641         (compunit_symtab_ptr): Likewise.
1642
1643 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1644
1645         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1646         default_print_auxv_entry for specific tag values.
1647
1648 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1649
1650         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1651
1652 2018-10-26  Jim Wilson  <jimw@sifive.com>
1653
1654         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1655         (riscv_linux_sigframe_init): Declare.
1656         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1657         (riscv_linux_sigframe): New.
1658         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1659         (riscv_linux_sigframe_init): Define.
1660         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1661
1662         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1663         (riscv_isa_flen): Likewise.  Drop static.
1664         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1665         (riscv_isa_flen): Likewise.  Declare.
1666
1667 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1668             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1669
1670         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1671         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1672         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1673         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1674         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1675         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1676         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1677         Define.
1678         (struct ppc_linux_features) <htm>: New field.
1679         (ppc_linux_no_features): Add initializer for htm field.
1680         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1681         new tdescs.
1682         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1683         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1684         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1685         Define if not already defined.
1686         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1687         and rs6000/powerpc-isa207-htm-vsx64l.
1688         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1689         rs6000/powerpc-isa207-htm-vsx64l.xml.
1690         * features/rs6000/power-htm-spr.xml: New file.
1691         * features/rs6000/power-htm-core.xml: New file.
1692         * features/rs6000/power64-htm-core.xml: New file.
1693         * features/rs6000/power-htm-fpu.xml: New file.
1694         * features/rs6000/power-htm-altivec.xml: New file.
1695         * features/rs6000/power-htm-vsx.xml: New file.
1696         * features/rs6000/power-htm-ppr.xml: New file.
1697         * features/rs6000/power-htm-dscr.xml: New file.
1698         * features/rs6000/power-htm-tar.xml: New file.
1699         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1700         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1701         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1702         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1703         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1704         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1705         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1706         fetch_regset with HTM regsets.
1707         (store_register, store_ppc_registers): Call store_regset with HTM
1708         regsets.
1709         (ppc_linux_nat_target::read_description): Set htm field in the
1710         features struct if needed.
1711         * ppc-linux-tdep.c: Include
1712         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1713         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1714         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1715         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1716         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1717         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1718         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1719         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1720         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1721         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1722         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1723         (ppc32_linux_ctarregset): New globals.
1724         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1725         (ppc_linux_collect_core_cpgrregset): New function.
1726         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1727         regsets.
1728         (ppc_linux_core_read_description): Check if the tm spr section is
1729         present and set htm in the features struct.
1730         (_initialize_ppc_linux_tdep): Call
1731         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1732         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1733         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1734         Declare.
1735         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1736         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1737         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1738         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1739         New fields.
1740         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1741         Likewise.
1742         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1743         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1744         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1745         New enum fields.
1746         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1747         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1748         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1749         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1750         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1751         <PPC_CTAR_REGNUM>: Likewise.
1752         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1753         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1754         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1755         (IS_CEFP_PSEUDOREG): Define.
1756         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1757         registers.  Return names for the checkpointed DFP, VSX, and EFP
1758         pseudo registers.
1759         (rs6000_pseudo_register_type): Remove initial assert and raise an
1760         internal error in the else clause instead.  Return types for the
1761         checkpointed DFP, VSX, and EFP pseudo registers.
1762         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1763         checkpointed DFP pseudo registers.
1764         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1765         checkpointed VSX pseudo registers.
1766         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1767         from efpr_pseudo_register_read and
1768         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1769         registers.
1770         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1771         Handle checkpointed DFP, VSX, and EFP registers.
1772         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1773         (efp_ax_pseudo_register_collect): New functions.
1774         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1775         register logic to new functions.  Handle checkpointed DFP, VSX,
1776         and EFP pseudo registers.
1777         (rs6000_gdbarch_init): Look for and validate the htm features.
1778         Include checkpointed DFP, VSX and EFP pseudo-registers.
1779         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1780         HTM registers.
1781
1782 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1783
1784         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1785         without altivec or fpu.
1786
1787 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1788             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1789
1790         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1791         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1792         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1793         Define if not already defined.
1794         * features/rs6000/power-ebb.xml: New file.
1795         * features/rs6000/power-linux-pmu.xml: New file.
1796         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1797         features.
1798         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1799         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1800         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1801         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1802         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1803         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1804         fetch_regset with ebb and pmu regsets.
1805         (store_register, store_ppc_registers): Call store_regset with ebb
1806         and pmu regsets.
1807         (ppc_linux_nat_target::read_description): Set isa207 field in the
1808         features struct if ebb and pmu are avaiable.
1809         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1810         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1811         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1812         and pmu regsets.
1813         (ppc_linux_core_read_description): Check if the pmu section is
1814         present and set isa207 in the features struct.
1815         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1816         (ppc32_linux_pmuregset): Declare.
1817         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1818         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1819         <ppc_sier_regnum>: New field.
1820         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1821         New enum values.
1822         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1823         values.
1824         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1825         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1826         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1827         ebb and pmu features.
1828
1829 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1830             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1831
1832         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1833         (tdesc_powerpc_isa207_vsx64l): Declare.
1834         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1835         (struct ppc_linux_features) <isa207>: New field.
1836         (ppc_linux_no_features): Add initializer for isa207 field.
1837         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1838         new tdescs.
1839         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1840         (NT_PPC_TAR): Define if not already defined.
1841         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1842         rs6000/powerpc-isa207-vsx64l.
1843         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1844         rs6000/powerpc-isa207-vsx64l.xml.
1845         * features/rs6000/power-tar.xml: New file.
1846         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1847         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1848         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1849         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1850         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1851         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1852         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1853         fetch_regset with the TAR regset.
1854         (store_register, store_ppc_registers): Call store_regset with the
1855         TAR regset.
1856         (ppc_linux_nat_target::read_description): Set isa207 field in the
1857         features struct if needed.
1858         * ppc-linux-tdep.c: Include
1859         features/rs6000/powerpc-isa207-vsx32l.c and
1860         features/rs6000/powerpc-isa207-vsx64l.c.
1861         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1862         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1863         regset.
1864         (ppc_linux_core_read_description): Check if the tar section is
1865         present and set isa207 in the features struct.
1866         (_initialize_ppc_linux_tdep): Call
1867         initialize_tdesc_powerpc_isa207_vsx32l and
1868         initialize_tdesc_powerpc_isa207_vsx64l.
1869         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1870         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1871         (enum) <PPC_TAR_REGNUM>: New enum value.
1872         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1873         feature.
1874         (ppc_process_record_op31): Record changes to TAR.
1875
1876 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1877             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1878
1879         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1880         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1881         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1882         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1883         (struct ppc_linux_features) <ppr_dscr>: New field.
1884         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1885         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1886         new tdescs.
1887         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1888         Define if not already defined.
1889         * features/Makefile (WHICH): Add
1890         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1891         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1892         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1893         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1894         * features/rs6000/power-dscr.xml: New file.
1895         * features/rs6000/power-ppr.xml: New file.
1896         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1897         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1898         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1899         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1900         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1901         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1902         * ppc-linux-nat.c: Include <sys/uio.h>.
1903         (fetch_regset, store_regset, check_regset): New functions.
1904         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1905         DSCR and PPR regsets.
1906         (store_register, store_ppc_registers): Call store_regset with
1907         DSCR and PPR regsets.
1908         (ppc_linux_get_hwcap2): New function.
1909         (ppc_linux_nat_target::read_description): Call
1910         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1911         features struct if needed.
1912         * ppc-linux-tdep.c: Include
1913         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1914         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1915         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1916         (ppc32_linux_dscrregset): New globals.
1917         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1918         and dscr regsets.
1919         (ppc_linux_core_read_description): Check if the ppr and dscr
1920         sections are present and set ppr_dscr in the features struct.
1921         (_initialize_ppc_linux_tdep): Call
1922         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1923         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1924         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1925         (ppc32_linux_dscrregset): Declare.
1926         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1927         <ppc_dscr_regnum>: New field.
1928         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1929         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1930         and dscr features.
1931         (ppc_process_record_op31): Record changes to PPR and DSCR.
1932
1933 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1934
1935         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1936         second initializer line for the have_* variables.  Initialize
1937         have_fpu to 0 instead of 1.
1938
1939 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1940
1941         * arch/ppc-linux-common.c (ppc_linux_match_description):
1942         Parenthesize tdesc assignements and indent them properly.
1943
1944 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1945
1946         * ppc-linux-nat.c (fetch_register): Change if statement to else
1947         if.
1948         (store_register): Likewise.
1949
1950 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1951
1952         * rs6000-tdep.c: Remove reggroups.h include.
1953         (rs6000_pseudo_register_reggroup_p): Remove.
1954         (rs6000_gdbarch_init): Remove call to
1955         set_tdesc_pseudo_register_reggroup_p.
1956
1957 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1958
1959         * reggroups.c (default_register_reggroup_p): Return true for
1960         decfloat registers and float_reggroup.
1961
1962 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1963
1964         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1965         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1966         ppc_linux_collect_vrregset by regcache_collect_regset.
1967
1968 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1969
1970         * linux-tdep.c (linux_collect_regset_section_cb): Use
1971         std::vector<gdb_byte> instead of char * and malloc for buf.
1972         Remove xfree.
1973
1974 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1975
1976         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1977         symtab_start instead of always using language_unknown.
1978
1979 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1980
1981         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1982         READ_P parameter, catch and ignore register access errors from
1983         either the old or new MISA location.
1984         (riscv_has_feature): Update call to riscv_read_misa_reg.
1985
1986 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1987
1988         * python/py-function.c (convert_values_to_python): Return
1989         gdbpy_ref<>.  Add header comment.
1990         (fnpy_call): Adjust.
1991
1992 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1993
1994         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1995         (cmdpy_completer_handle_brkchars): Adjust.
1996         (cmdpy_completer): Adjust.
1997
1998 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1999
2000         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
2001         Pass correct regnum to raw_supply_zeroed.
2002
2003 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2004
2005         * regcache.c (cooked_read_test): Add CSKY to the list of
2006         architectures with a save_reggroup
2007
2008 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
2009
2010         PR gdb/23368
2011         * infrun.c (follow_exec): In the follow_exec_mode_new case,
2012         transfer terminal state from old new new inferior.
2013         * terminal.h (swap_terminal_info): New function.
2014         * inflow.c (swap_terminal_info): New function.
2015
2016 2018-10-23  Tom Tromey  <tom@tromey.com>
2017
2018         * record-btrace.c (get_thread_current_frame_id): Rename from
2019         get_thread_current_frame.  Return a frame_id.
2020         (record_btrace_start_replaying): Update.
2021
2022 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2023
2024         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2025         for CSRs.
2026
2027 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
2028
2029         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2030         have_nonsteppable_watchpoint attribute to 1.
2031
2032 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2033
2034         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2035         register names.
2036         (struct register_alias): Rename to...
2037         (struct riscv_register_alias): ...this, and update comment.
2038         (riscv_register_aliases): Update type, and alias names.  Remove
2039         CSR names from this list.
2040         (riscv_register_name): Use riscv_gdb_reg_names for int and float
2041         register names.  Add an extra assertion.
2042         (riscv_is_regnum_a_named_csr): New function.
2043         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2044
2045 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
2046
2047         * configure.tgt: Add configuration for s12z.
2048         * s12z-tdep.c:  New file.
2049         * NEWS: Mention new target.
2050
2051 2018-10-22  Jim Wilson  <jimw@sifive.com>
2052
2053         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2054         FP reg smaller than FP reg size, and fill with -1 instead of 0.
2055
2056         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2057         (riscv_register_type): Use them.
2058         (riscv_print_one_register_info): Handle union of floats same as float.
2059         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2060         riscv_fpreg_q_type fields.
2061
2062 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2063
2064         * gdbarch.sh (gdbarch_num_cooked_regs): New.
2065         * gdbarch.h: Re-generate.
2066         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2067         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2068         * eval.c (evaluate_subexp_standard): Likewise.
2069         * findvar.c (value_of_register): Likewise.
2070         (value_of_register_lazy): Likewise.
2071         (address_from_register): Likewise.
2072         * frame.c (get_frame_register_bytes): Likewise.
2073         * gdbarch-selftests.c (register_to_value_test): Likewise.
2074         * h8300-tdep.c (h8300_register_type): Likewise.
2075         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2076         (i386_svr4_reg_to_regnum): Likewise.
2077         * infcmd.c (default_print_registers_info): Likewise.
2078         (registers_info): Likewise.
2079         (print_vector_info): Likewise.
2080         (default_print_float_info): Likewise.
2081         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2082         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2083         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2084         (mi_cmd_data_list_changed_registers): Likewise.
2085         (mi_cmd_data_list_register_values): Likewise.
2086         (mi_cmd_data_write_register_values): Likewise.
2087         (mi_cmd_trace_frame_collected): Likewise.
2088         * mips-tdep.c (print_gp_register_row): Likewise.
2089         (mips_print_registers_info): Likewise.
2090         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2091         * regcache.c (init_regcache_descr): Likewise.
2092         (register_size): Likewise.
2093         (register_dump::dump): Likewise.
2094         (cooked_read_test): Likewise.
2095         (cooked_write_test): Likewise.
2096         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2097         (rs6000_gdbarch_init): Likewise.
2098         * stabsread.c (stab_reg_to_regnum): Likewise.
2099         * stack.c (info_frame_command): Likewise.
2100         * target-descriptions.c (tdesc_register_name): Likewise.
2101         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2102         * tui/tui-regs.c (tui_show_register_group): Likewise.
2103         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2104         (user_reg_map_regnum_to_name): Likewise.
2105         (value_of_user_reg): Likewise.
2106         (maintenance_print_user_registers): Likewise.
2107         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2108         (xtensa_register_name): Likewise.
2109         (xtensa_register_type): Likewise.
2110         (xtensa_reg_to_regnum): Likewise.
2111         (xtensa_pseudo_register_read): Likewise.
2112         (xtensa_pseudo_register_write): Likewise.
2113
2114 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2115
2116         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2117         correctly-sized buffer with raw_read.
2118         (amd64_pseudo_register_write): Use correctly-sized buffer for
2119         raw_read/raw_write.
2120
2121 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2122
2123         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2124         in add_prefix_cmd of set print type.
2125
2126 2018-10-19  Tom Tromey  <tom@tromey.com>
2127
2128         PR tui/18388:
2129         * NEWS: Mention tabset deprecation.
2130         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2131         (update_tab_width): New function.
2132         (tui_set_tab_width, tui_show_tab_width): New functions.
2133         (tui_set_tab_width_command): Use update_tab_width.
2134         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
2135         Add new "set tui tab-width" command.
2136         * tui/tui-source.c (tui_set_source_content): Update.
2137         * tui/tui-disasm.c (tui_set_disassem_content): Update.
2138         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2139         Don't declare.
2140         (tui_tab_width): Declare.
2141         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2142         (tui_set_default_tab_len): Remove.
2143
2144 2018-10-19  Tom Tromey  <tom@tromey.com>
2145
2146         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2147         (key_is_backspace, tui_getc): Don't declare.
2148         * tui/tui-io.c (key_is_start_sequence): Now static.
2149         (key_is_end_sequence, key_is_backspace): Remove.
2150         (tui_getc): Now static.
2151
2152 2018-10-19  Tom Tromey  <tom@tromey.com>
2153
2154         * symfile.c (reread_symbols): Clear "static_links".
2155
2156 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
2157
2158         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2159         define.
2160         (aarch64_linux_sigframe_init): Extra boundary checks.
2161
2162 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
2163
2164         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2165         the possibly non-existent tdesc type 'vec128', but the type of raw
2166         register v16 instead.
2167
2168 2018-10-19  Gary Benson <gbenson@redhat.com>
2169
2170         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2171
2172 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
2173
2174         PR cli/23785
2175         * cli/cli-dump.c (restore_binary_file): Check if "file" is
2176         NULL.
2177
2178 2018-10-17  Paul Koning  <paul_koning@dell.com>
2179
2180         * charset.c (convert_between_encodings): Fix unsigned overflow.
2181
2182 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
2183
2184         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2185         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2186         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2187         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2188         New functions.
2189         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2190         and fbsd_info_proc_mappings_header.
2191         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2192         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2193         New.
2194
2195 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
2196
2197         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2198         Solaris Maintainer.
2199
2200 2018-10-15  Tom Tromey  <tom@tromey.com>
2201
2202         * tui/tui.c (strcat_to_buf): Remove casts.
2203         * tui/tui-winsource.c (tui_show_source_line)
2204         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2205         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2206         * tui/tui-windata.c (tui_first_data_item_displayed)
2207         (tui_delete_data_content_windows, tui_erase_data_content)
2208         (tui_display_all_data, tui_display_data_from)
2209         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2210         * tui/tui-win.c (tui_set_win_height)
2211         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2212         casts.
2213         * tui/tui-win.c (tui_resize_all): Remove casts.
2214         (tui_scroll_backward_command, tui_set_focus)
2215         (tui_set_tab_width_command): Likewise.
2216         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2217         * tui/tui-regs.c (tui_show_register_group): Remove cast.
2218         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2219         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2220         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2221         Remove casts.
2222
2223 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2224
2225         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2226         AArch64/ARM maintainer.
2227
2228 2018-10-11  Gary Benson <gbenson@redhat.com>
2229
2230         * interps.h (interp::m_name): Make private and mutable.
2231         * interps.c (interp::~interp): Free m_name.
2232
2233 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2234             Simon Marchi <simark@simark.ca>
2235
2236         * README (`configure' options): Add documentation for new
2237         "--enable-unit-tests" option.
2238         * acinclude.m4: Include "selftest.m4".
2239         * configure: Regenerate.
2240         * configure.ac: Use "GDB_AC_SELFTEST".
2241         * maint.c (maintenance_selftest): Update message informing
2242         that selftests have been disabled.
2243         (maintenance_info_selftests): Likewise.
2244         * selftest.m4: New file.
2245
2246 2018-10-10  Gary Benson <gbenson@redhat.com>
2247
2248         * remote.c (remote_target::remote_send_printf): Add
2249         missing va_end found by Coverity.
2250
2251 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
2252
2253         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2254
2255 2018-10-09  Tom Tromey  <tom@tromey.com>
2256
2257         * configure: Rebuild.
2258         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2259         * NEWS: Update --enable-ubsan documentation.
2260
2261 2018-10-09  Gary Benson <gbenson@redhat.com>
2262
2263         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2264         found by Coverity.
2265
2266 2018-10-08  Tom Tromey  <tom@tromey.com>
2267
2268         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2269         variable.
2270         (riscv_fbsd_init_abi): Likewise.
2271
2272 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2273         * valops.c (value_struct_elt_for_reference): Rename local variable
2274         to work around the shadowing a previous local warning.
2275
2276 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2277
2278         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2279         * NEWS: Mention new FreeBSD/riscv native configuration.
2280         * configure.host: Add riscv*-*-freebsd*.
2281         * configure.nat: Likewise.
2282         * riscv-fbsd-nat.c: New file.
2283
2284 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2285
2286         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2287         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2288         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2289         * NEWS: Mention new FreeBSD/riscv target.
2290         * configure.tgt: Add riscv*-*-freebsd*.
2291         * riscv-fbsd-tdep.c: New file.
2292         * riscv-fbsd-tdep.h: New file.
2293
2294 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2295
2296         * regcache.h (struct regcache_map_entry): Note that this type can
2297         be used with traditional frame caches.
2298         * trad-frame.c (trad_frame_set_reg_regmap): New.
2299         * trad-frame.h (trad_frame_set_reg_regmap): New.
2300
2301 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2302
2303         PR c++/16841
2304         * valops.c (get_virtual_base_offset): New function.
2305         (value_struct_elt_for_reference): Use it to get virtual base offset
2306         and add it in calculating class member address.
2307
2308 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
2309
2310         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2311         (check_producer): Check if the producer is codewarrior.
2312         (producer_is_codewarrior): New function.
2313         (lnp_state_machine::record_line): Ignore is_stmt flag for records
2314         produced by codewarrior.
2315         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2316
2317 2018-10-06  Tom Tromey  <tom@tromey.com>
2318
2319         PR python/19399:
2320         * python/py-inferior.c: Add "architecture" entry.
2321         (infpy_architecture): New function.
2322
2323 2018-10-06  Tom Tromey  <tom@tromey.com>
2324
2325         PR python/21765:
2326         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2327         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2328         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
2329         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2330
2331 2018-10-06  Tom Tromey  <tom@tromey.com>
2332
2333         PR build/17077:
2334         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2335         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2336         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2337         #include.
2338
2339 2018-10-06  Tom Tromey  <tom@tromey.com>
2340
2341         * python/py-breakpoint.c (bppy_get_location): Handle a
2342         bp_breakpoint without a location.
2343
2344 2018-10-06  Tom Tromey  <tom@tromey.com>
2345
2346         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2347         (_RegEx): Reformat help text.
2348         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2349         (AnyCallerIs, AnyCallerMatches): Reformat help text.
2350         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2351         text.
2352         * python/lib/gdb/command/xmethods.py (InfoXMethod)
2353         (EnableXMethod, DisableXMethod): Remove help indentation.
2354         Capitalize meta-syntactic variables.
2355         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2356         (EnableUnwinder, DisableUnwinder): Remove help indentation.
2357         Capitalize meta-syntactic variables.
2358         * python/lib/gdb/command/explore.py (ExploreCommand)
2359         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2360         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2361         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2362         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2363         Remove help indentation.
2364         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2365         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2366         (DisableFrameFilter, SetFrameFilterPriority)
2367         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2368
2369 2018-10-06  Tom Tromey  <tom@tromey.com>
2370
2371         PR tui/28819:
2372         * tui/tui-io.c (gdb_wgetch): New function.
2373         (tui_mld_getc, tui_getc): Use it.
2374
2375 2018-10-05  Tom Tromey  <tom@tromey.com>
2376
2377         * sol-thread.c (sol_thread_target::wait): Rename inner
2378         "save_ptid".
2379
2380 2018-10-04  Tom Tromey  <tom@tromey.com>
2381
2382         * configure: Rebuild.
2383         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2384
2385 2018-10-04  Tom Tromey  <tom@tromey.com>
2386
2387         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2388         declaration of "block".
2389
2390 2018-10-04  Tom Tromey  <tom@tromey.com>
2391
2392         * common/filestuff.c (fdwalk): Remove inner declaration of
2393         "result".
2394
2395 2018-10-04  Tom Tromey  <tom@tromey.com>
2396
2397         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2398         "structs_addr" and hoist declaration.
2399
2400 2018-10-04  Tom Tromey  <tom@tromey.com>
2401
2402         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2403         variable "size".
2404
2405 2018-10-04  Tom Tromey  <tom@tromey.com>
2406
2407         * mdebugread.c (parse_partial_symbols): Use std::string.
2408
2409 2018-10-04  Tom Tromey  <tom@tromey.com>
2410
2411         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2412         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2413         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2414         header.
2415         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2416         more inner scope.
2417         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2418         * varobj.c (varobj_update): Rename inner "newobj",
2419         "type_changed".
2420         * valprint.c (generic_emit_char): Rename inner "buf".
2421         * valops.c (find_overload_match): Rename inner "temp".
2422         (value_struct_elt_for_reference): Declare "v" in more inner
2423         scope.
2424         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2425         * unittests/array-view-selftests.c (run_tests): Rename inner
2426         "vec".
2427         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2428         header.
2429         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2430         "tsv" in more inner scope.
2431         (print_one_static_tracepoint_marker): Rename inner
2432         "tuple_emitter".
2433         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2434         (tic6x_push_dummy_call): Don't redeclare "addr".
2435         * target-float.c: Declare "dto" lower.
2436         * symtab.c (lookup_local_symbol): Rename inner "sym".
2437         (find_pc_sect_line): Rename inner "pc".
2438         * stack.c (print_frame): Don't redeclare "gdbarch".
2439         (return_command): Rename inner "gdbarch".
2440         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2441         "sp".
2442         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2443         header.
2444         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2445         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2446         scope.
2447         * remote.c (remote_target::update_thread_list): Don't redeclare
2448         "tp".
2449         (remote_target::process_initial_stop_replies): Rename inner
2450         "thread".
2451         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2452         (remote_target::wait_as): Don't redeclare "stop_reply".
2453         (remote_target::get_thread_local_address): Rename inner
2454         "result".
2455         (remote_target::get_tib_address): Likewise.
2456
2457         * regcache.c (cooked_read_test): Rename "regnum".
2458         * record-btrace.c (cmd_record_btrace_start): Rename inner
2459         "exception".
2460         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2461         loop header.
2462         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2463         header.
2464         (ppu2spu_sniffer): Rename inner "buf".
2465         * parse.c (operator_check_standard): Rename inner "type",
2466         "objfile".
2467         * p-valprint.c (pascal_val_print): Introduce new scope for
2468         "low_bound", "high_bound".
2469         * p-exp.y (yylex): Declare "i" in loop header.
2470         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2471         Lower declaration of "s".
2472         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2473         header.
2474         (nios2_push_dummy_call): Rename "len".
2475         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2476         "buf".
2477         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2478         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2479         (linux_xfer_osdata_modules): Likewise.
2480         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2481         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2482         (mips_o64_push_dummy_call): Likewise.
2483         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2484         "op".
2485         * mi/mi-main.c (list_available_thread_groups): Rename inner
2486         "tuple_emitter".
2487         (mi_cmd_data_read_memory): Rename inner "opts".
2488         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2489         "tuple_emitter".
2490         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2491         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2492         more inner scope.
2493         (parse_partial_symbols): Rename inner "pst", "p", "name"
2494         * main.c (captured_main_1): Rename inner "i"s.
2495         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2496         "oso2".
2497         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2498         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2499         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2500         (handle_signal_stop): Rename inner "gdbarch".
2501         (handle_command): Declare "signum" in loop header.
2502         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2503         "status".
2504         (examine_prologue): Rename inner "sol" and "sof".
2505         (ia64_extract_return_value): Rename inner "val".  Declare another
2506         "val" in a more inner scope.
2507         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2508         inner scope.
2509         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2510         "except".
2511         * findvar.c (default_read_var_value): Don't redeclare "addr".
2512         * f-exp.y (yylex): Declare "i" in loop header.
2513         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2514         Rename inner "type", "expect_type".
2515         (evaluate_subexp_for_sizeof): Rename inner "pc".
2516         * elfread.c (elf_symfile_read): Rename inner "abfd".
2517         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2518         "bytes_read".
2519         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2520         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2521         (dwarf_decode_line_header): Rename inner "lh".
2522         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2523         "offset".  Declare "i" in loop header.
2524         (disassemble_dwarf_expression): Rename inner "addr_size".
2525         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2526         inner "result".
2527         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2528         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2529         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2530         "inner_list_emitter".
2531         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2532         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2533         declaration in a block.
2534         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2535         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2536         "obstack_final_size".
2537         * cp-support.c (inspect_type): Declare "i" in loop header.
2538         * compile/compile.c (compile_instance::insert_symbol_error):
2539         Rename inner "e".
2540         * common/agent.c (agent_run_command): Remove inner "ret"
2541         declaration.
2542         * coffread.c (coff_symfile_read): Rename inner "name".
2543         (coff_symfile_read): Rename inner "abfd".
2544         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2545         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2546         "high".
2547         * c-exp.y (lex_one_token): Move "len" declaration lower.
2548         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2549         "gdbarch".
2550         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2551         "b".
2552         (watch_command_1): Declare "mark" later.
2553         (clear_command): Don't shadow "a" or "b".
2554         (delete_command): Rename inner "b".
2555         (delete_trace_command): Likewise.
2556         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2557         "op".
2558         (arm_gdbarch_init): Remove inner "e_flags".
2559         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2560         "offset" in inner blocks.
2561
2562 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2563
2564         * dwarf-index-write.c (file_write): Don't write if the vector is
2565         empty.
2566
2567 2018-10-05  Tom de Vries  <tdevries@suse.de>
2568
2569         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2570         PyArg_ParseTuple call.
2571
2572 2018-10-05  Tom de Vries  <tdevries@suse.de>
2573
2574         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2575         PyArg_ParseTuple call.
2576
2577 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2578
2579         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2580         to avoid exceeding 80 characters per line limit.
2581
2582 2018-10-04  Tom Tromey  <tom@tromey.com>
2583
2584         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2585         (reread_symbols): Update.
2586         * complaints.h (clear_complaints): Remove argument.
2587         * complaints.c (enum complaint_series): Remove.
2588         (series): Remove global.
2589         (complaint_internal): Update.
2590         (clear_complaints): Remove argument.
2591
2592 2018-10-04  Tom Tromey  <tom@tromey.com>
2593
2594         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2595         debugging symbols" message if there is a separate debug objfile.
2596
2597 2018-10-04  Tom Tromey  <tom@tromey.com>
2598
2599         PR cli/19551:
2600         * symfile.c (symbol_file_add_with_addrs): Update output.
2601         * psymtab.c (require_partial_symbols): Update output.
2602
2603 2018-10-04  Tom Tromey  <tom@tromey.com>
2604
2605         PR cli/22234:
2606         * complaints.c: Emit \n.
2607
2608 2018-10-04  Tom Tromey  <tom@tromey.com>
2609
2610         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2611         (separate_debug_file_exists, find_separate_debug_file)
2612         (add_symbol_file_command, reread_symbols, allocate_symtab)
2613         (allocate_compunit_symtab): Use filtered printing, not
2614         unfiltered.
2615         * psymtab.c (require_partial_symbols, dump_psymtab)
2616         (allocate_psymtab): Use filtered printing, not unfiltered.
2617
2618 2018-10-04  Tom Tromey  <tom@tromey.com>
2619
2620         * complaints.c (complaint_internal): Correctly check complaint
2621         count.
2622
2623 2018-10-04  Tom Tromey  <tom@tromey.com>
2624
2625         * complaints.h (struct complaints): Remove declaration.
2626         * complaints.c (clear_complaints): Remove an unused variable.
2627
2628 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2629
2630         * MAINTAINERS (Write After Approval): Add self.
2631
2632 2018-10-03  Tom Tromey  <tom@tromey.com>
2633
2634         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2635         "buffer_contents".
2636         * coffread.c (coff_symtab_read): Initialize "newobj".
2637
2638 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2639
2640         * dwarf2read.c (read_func_scope): Remove struct keyword in
2641         range-based for.
2642
2643 2018-10-03  Tom Tromey  <tom@tromey.com>
2644
2645         * README: Mention --enable-ubsan.
2646         * NEWS: Mention --enable-ubsan.
2647         * acinclude.m4: Include sanitize.m4.
2648         * configure: Rebuild.
2649         * configure.ac: Call AM_GDB_UBSAN.
2650         * sanitize.m4: New file.
2651
2652 2018-10-03  Tom Tromey  <tom@tromey.com>
2653
2654         * expression.h (enum exp_opcode): Use uint8_t as base type.
2655         * expprint.c (op_name): Handle invalid opcodes.
2656
2657 2018-10-03  Tom Tromey  <tom@tromey.com>
2658
2659         * parse.c (prefixify_expression): Add assert.
2660         (parse_exp_in_context_1): Throw exception if the expression is
2661         empty.
2662
2663 2018-10-03  Tom Tromey  <tom@tromey.com>
2664
2665         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2666
2667 2018-10-03  Tom Tromey  <tom@tromey.com>
2668
2669         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2670
2671 2018-10-03  Tom Tromey  <tom@tromey.com>
2672
2673         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2674         unsigned.
2675
2676 2018-10-03  Tom Tromey  <tom@tromey.com>
2677
2678         * findvar.c (extract_integer): Do work in an unsigned type.
2679
2680 2018-10-03  Tom Tromey  <tom@tromey.com>
2681
2682         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2683         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2684         base type.
2685         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2686         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2687         type.
2688         * c-lang.h (enum c_string_type_values): Use unsigned as base
2689         type.
2690         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2691
2692 2018-10-03  Tom Tromey  <tom@tromey.com>
2693
2694         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2695         <~dwarf2_frame_state_reg_info>: Update.
2696         <dwarf2_frame_state_reg_info>: Update.
2697         <alloc_regs>: Add assertion.  Update.
2698         <reg>: Now a std::vector.
2699         <num_regs>: Remove.
2700         <swap>: Update.
2701         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2702         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2703
2704 2018-10-03  Tom Tromey  <tom@tromey.com>
2705
2706         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2707
2708 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2709
2710         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2711
2712 2018-10-02  Tom Tromey  <tom@tromey.com>
2713
2714         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2715
2716 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2717
2718         * NEWS: Mention changed commands.
2719         * ser-uds.c: New file.
2720         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2721         * configure: Regenerate.
2722         * Makefile.in: Add new file.
2723         * serial.c (serial_open): Check if filename is a socket
2724         and lookup the appropriate interface accordingly.
2725
2726 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2727
2728         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2729         define.
2730         (AARCH64_EXTRA_MAGIC): Likewise.
2731         (AARCH64_FPSIMD_MAGIC): Likewise.
2732         (AARCH64_SVE_MAGIC): Likewise.
2733         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2734         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2735         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2736         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2737         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2738         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2739         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2740         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2741         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2742         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2743         (read_aarch64_ctx): Add function.
2744         (aarch64_linux_sigframe_init): Detect FP registers.
2745
2746 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2747
2748         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2749         (AARCH64_D0_REGNUM): Likewise.
2750         (AARCH64_S0_REGNUM): Likewise.
2751         (AARCH64_H0_REGNUM): Likewise.
2752         (AARCH64_B0_REGNUM): Likewise.
2753         (AARCH64_SVE_V0_REGNUM): Likewise.
2754         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2755         (AARCH64_D0_REGNUM): Likewise.
2756         (AARCH64_S0_REGNUM): Likewise.
2757         (AARCH64_H0_REGNUM): Likewise.
2758         (AARCH64_B0_REGNUM): Likewise.
2759         (AARCH64_SVE_V0_REGNUM): Likewise.
2760
2761 2018-10-01  Gary Benson <gbenson@redhat.com>
2762
2763         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2764         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2765         prfpregset_t instead of gdb_prfpregset_t.
2766         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2767         * configure, config.in: Rebuild.
2768
2769 2018-10-01  Gary Benson <gbenson@redhat.com>
2770
2771         * common/gdb_proc_service.h: New file, factored out from...
2772         * gdb_proc_service.h: Moved common code to the above file.
2773         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2774
2775 2018-10-01  Gary Benson <gbenson@redhat.com>
2776
2777         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2778         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2779
2780 2018-10-01  Gary Benson <gbenson@redhat.com>
2781
2782         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2783         (AC_CHECK_HEADERS): Check for linux/elf.h.
2784         * configure, config.in: Rebuild.
2785         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2786         doesn't define elf_fpregset_t.
2787
2788 2018-10-01  Gary Benson <gbenson@redhat.com>
2789
2790         * gdb_proc_service.h: Whitespace change.
2791
2792 2018-10-01  Tom Tromey  <tom@tromey.com>
2793
2794         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2795         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2796         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2797
2798 2018-10-01  Tom Tromey  <tom@tromey.com>
2799
2800         * README: Minor change.
2801
2802 2018-09-30  Pedro Alves  <palves@redhat.com>
2803
2804         * darwin-nat-info.c (darwin_debug_regions_recurse)
2805         (info_mach_exceptions_command): Remove unused local variables.
2806         * darwin-nat.c (darwin_decode_notify_message)
2807         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2808         (darwin_stop_inferior, darwin_setup_exceptions)
2809         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2810         (darwin_nat_target::attach, darwin_nat_target::detach)
2811         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2812         local variables.
2813         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2814         variables.
2815
2816 2018-09-29  Tom Tromey  <tom@tromey.com>
2817
2818         * README: Remove some leftover text.
2819
2820 2018-09-29  Tom Tromey  <tom@tromey.com>
2821
2822         * PROBLEMS: Rewrite.
2823         * README: Update.
2824
2825 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2826
2827         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2828         case with explicit breakpoint kind.
2829         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2830         'additional_info' and related logic.
2831         (riscv_debug_breakpoints): New variable.
2832         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2833         instruction to determine the breakpoint kind.
2834         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2835         flag.  Update description of 'set/show riscv
2836         use-compressed-breakpoints' flag.
2837
2838 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2839
2840         (NEWS): Mention changes to frame related commands.
2841         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2842         (add_prefix_cmd_suppress_notification): New function.
2843         (add_com_suppress_notification): Call
2844         add_cmd_suppress_notification.
2845         * command.h (add_cmd_suppress_notification): Declare.
2846         (add_prefix_cmd_suppress_notification): Declare.
2847         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2848         (parse_frame_specification): Moved from stack.c, with
2849         simplification to handle a single argument.
2850         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2851         switch to the selected frame.  Add a header comment.
2852         * stack.c: Remove 'safe-ctype.h' include.
2853         (find_frame_for_function): Add declaration.
2854         (find_frame_for_address): New function.
2855         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2856         (frame_selection_by_function_completer): New function.
2857         (info_frame_command): Rename to...
2858         (info_frame_command_core): ...this, and update parameter types.
2859         (select_frame_command): Rename to...
2860         (select_frame_command_core): ...this, and update parameter types.
2861         (frame_command): Rename to...
2862         (frame_command_core): ...this, and update parameter types.
2863         (class frame_command_helper): New class to wrap implementations of
2864         frame related sub-commands.
2865         (frame_apply_cmd_list): New static global.
2866         (frame_cmd_list): Make static.
2867         (select_frame_cmd_list): New global for sub-commands.
2868         (info_frame_cmd_list): New global for sub-commands.
2869         (_initialize_stack): Register sub-commands for 'frame',
2870         'select-frame', and 'info frame'.  Update 'frame apply' commands
2871         to use frame_apply_cmd_list.  Move function local static
2872         frame_apply_list to file static frame_apply_cmd_list for
2873         consistency.
2874         * stack.h (select_frame_command): Delete declarationn.
2875         (select_frame_for_mi): Declare new function.
2876
2877 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2878
2879         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2880         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2881         and NOP.
2882
2883 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2884
2885         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2886
2887 2018-09-26  Tom Tromey  <tom@tromey.com>
2888
2889         * valops.c (auto_abandon): Remove dead code.
2890
2891 2018-09-26  Tom Tromey  <tom@tromey.com>
2892
2893         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2894
2895 2018-09-24  Tom Tromey  <tom@tromey.com>
2896
2897         * common/pathstuff.c (get_standard_cache_dir): Make
2898         "xdg_cache_home" and "home" const.
2899         * top.c (init_history): Make "tmpenv" const.
2900         * main.c (get_init_files): Make "homedir" const.
2901
2902 2018-09-23  Tom Tromey  <tom@tromey.com>
2903
2904         PR python/18852:
2905         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2906
2907 2018-09-23  Tom Tromey  <tom@tromey.com>
2908
2909         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2910         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2911         * python/python-internal.h (gdbpy_handle_exception): Declare.
2912         * python/py-utils.c (gdbpy_handle_exception): New function.
2913
2914 2018-09-23  Tom Tromey  <tom@tromey.com>
2915
2916         PR python/17284:
2917         * python/py-type.c (typy_template_argument): Check for negative
2918         argument number.
2919
2920 2018-09-23  Tom Tromey  <tom@tromey.com>
2921
2922         PR python/14062:
2923         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2924
2925 2018-09-23  Tom Tromey  <tom@tromey.com>
2926
2927         PR python/18170:
2928         * python/py-value.c (valpy_int): Allow conversion from pointer
2929         type.
2930
2931 2018-09-23  Tom Tromey  <tom@tromey.com>
2932
2933         PR python/20126:
2934         * python/py-value.c (valpy_int): Respect type sign.
2935
2936 2018-09-23  Tom Tromey  <tom@tromey.com>
2937
2938         PR python/18352;
2939         * python/py-value.c (valpy_float): Allow conversions from int or
2940         char.
2941         (valpy_int, valpy_long): Allow conversions from float.
2942
2943 2018-09-23  Tom Tromey  <tom@tromey.com>
2944
2945         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2946         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2947
2948 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2949
2950         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2951         __sighndlr.
2952         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2953
2954 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2955
2956         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2957         target_terminal::ours().
2958
2959 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2960
2961         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2962         of vl to ULONGEST.
2963
2964 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2965
2966         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2967         redundant condition.
2968
2969 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2970
2971         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2972
2973         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2974         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2975         * sol-thread.c (ps_pdmodel): Don't guard definition.
2976
2977         * procfs.c: Fix formatting.
2978
2979         * procfs.c (sysset_t_alloc): Remove.
2980         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2981         (procfs_debug_inferior): Likewise.
2982         (procfs_set_exec_trap): Likewise.
2983         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2984         (proc_set_traced_sysexit): Likewise.
2985
2986         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2987         (dead_procinfo): Likewise.
2988         (proc_warn): Likewise.
2989         (proc_error): Likewise.
2990         (proc_get_LDT_entry): Likewise.
2991         (do_attach): Likewise.
2992         (procfs_target::pid_to_str): Likewise.
2993         (iterate_over_mappings): Likewise.
2994
2995         * procfs.c (create_procinfo): Fix ARI warning.
2996         (proc_get_status): Likewise.
2997         (proc_stop_process): Likewise.
2998         (proc_run_process): Likewise.
2999         (proc_kill): Likewise.
3000         (proc_get_LDT_entry): Likewise.
3001         (procfs_find_LDT_entry): Likewise.
3002         (proc_update_threads): Likewise.
3003         (proc_iterate_over_threads): Likewise.
3004         (do_attach): Likewise.
3005         (procfs_xfer_memory): Likewise.
3006         (invalidate_cache): Likewise.
3007         (procfs_target::resume): Likewise.
3008         (procfs_init_inferior): Likewise.
3009         (procfs_set_exec_trap): Likewise.
3010         (procfs_target::thread_alive): Likewise.
3011         (procfs_target::pid_to_exec_file): Likewise.
3012         (iterate_over_mappings): Likewise.
3013         (procfs_target::make_corefile_notes): Likewise.
3014         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
3015
3016         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3017         (procfs_find_LDT_entry): Likewise.
3018         * sol-thread.c (ps_lgetLDT): Likewise.
3019
3020 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3021
3022         PR tdep/17903
3023         * procfs.c (procfs_target): Declare pid_to_exec_file.
3024         (procfs_target::pid_to_exec_file): New.
3025
3026 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3027
3028         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3029         renaming.
3030         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3031         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3032
3033 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3034
3035         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3036         (supply_fpregset, fill_fpregset): Move ...
3037         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3038         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3039         Remove references to ioctl-based procfs.
3040         Include <sys/reg.h>.
3041         Remove PR_MODEL_NATIVE guards.
3042         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3043         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3044
3045 2018-09-19  Xavier Roirand  <roirand@adacore.com>
3046
3047         PR gdb/20981:
3048         * solib-darwin.c (darwin_get_dyld_bfd): New function.
3049         (darwin_solib_get_all_image_info_addr_at_init): Update call.
3050         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3051
3052 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
3053
3054         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3055         (fbsd_print_sockaddr_in6): Likewise.
3056
3057 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
3058             Chris January  <chris.january@arm.com>
3059
3060         * eval.c (skip_undetermined_arglist): Skip argument list helper.
3061         (evaluate_subexp_standard): Return a dummy type when
3062         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3063         OP_F77_UNDETERMINED_ARGLIST case.
3064         * expression.h (enum noside): Update comment.
3065
3066 2018-09-19  George Vasick <george.vasick@oracle.com>
3067
3068         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3069
3070 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
3071             April Chin <april.chin@oracle.com>
3072             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3073
3074         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3075         uint_t lwpid_t.
3076         (create_procinfo): Print pids in /proc without leading zeros.
3077
3078 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
3079
3080         * nios2-tdep.c (nios2_gcc_target_options): New.
3081         (nios2_gdb_arch_init): Install new hook.
3082
3083 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3084
3085         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3086         New file.
3087         * update-gnulib.sh: Apply patch.
3088         * configure: Re-generate.
3089
3090 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3091
3092         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3093         description.  Make "info proc" command descriptions more
3094         consistent.
3095
3096 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3097
3098         * NEWS: Mention 'info proc files' command.
3099
3100 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3101
3102         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3103         descriptors for IP_FILES and IP_ALL.
3104
3105 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3106
3107         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3108         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3109         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3110         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3111         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3112         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3113         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3114         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3115         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3116         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3117         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3118         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3119         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3120         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3121         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3122         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3123         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3124         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3125         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3126         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3127         (struct fbsd_sockaddr_un): New types.
3128         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3129         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3130         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3131         (fbsd_core_info_proc_files): New functions.
3132         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3133         IP_ALL.
3134         * fbsd-tdep.h (fbsd_info_proc_files_header)
3135         (fbsd_info_proc_files_entry): New.
3136
3137 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3138
3139         * defs.h (enum info_proc_what) [IP_FILES]: New value.
3140         * infcmd.c (info_proc_cmd_files): New function.
3141         (_initialize_infcmd): Register 'info proc files' command.
3142
3143 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3144
3145         * gnulib/aclocal-m4-deps.mk: Re-generate.
3146         * gnulib/aclocal.m4: Re-generate.
3147         * gnulib/config.in: Re-generate.
3148         * gnulib/configure: Re-generate.
3149         * gnulib/import/Makefile.am: Re-generate.
3150         * gnulib/import/Makefile.in: Re-generate.
3151         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3152         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3153         * gnulib/import/arpa_inet.in.h: New file.
3154         * gnulib/import/inet_ntop.c: New file.
3155         * gnulib/import/m4/arpa_inet_h.m4: New file.
3156         * gnulib/import/m4/inet_ntop.m4: New file.
3157         * gnulib/import/m4/netinet_in_h.m4: New file.
3158         * gnulib/import/m4/socklen.m4: New file.
3159         * gnulib/import/m4/sockpfaf.m4: New file.
3160         * gnulib/import/m4/stdalign.m4: New file.
3161         * gnulib/import/m4/sys_uio_h.m4: New file.
3162         * gnulib/import/netinet_in.in.h: New file.
3163         * gnulib/import/stdalign.in.h: New file.
3164         * gnulib/import/sys_socket.c: New file.
3165         * gnulib/import/sys_socket.in.h: New file.
3166         * gnulib/import/sys_uio.in.h: New file.
3167         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3168         module.
3169
3170 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3171
3172         * gnulib/aclocal-m4-deps.mk: New file.
3173         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3174         deterministically.
3175
3176 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3177
3178         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3179         KVE_PATH.
3180
3181 2018-09-18  Tom Tromey  <tom@tromey.com>
3182
3183         * compile/compile-object-load.c (struct
3184         link_hash_table_cleanup_data): Add constructor and destructor.
3185         Use DISABLE_COPY_AND_ASSIGN.
3186         (~link_hash_table_cleanup_data): Rename from
3187         link_hash_table_free.  Now a destructor.
3188         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
3189
3190 2018-09-18  Tom Tromey  <tom@tromey.com>
3191
3192         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3193         * compile/compile-object-load.c (struct munmap_list): Move to
3194         header file.
3195         (munmap_list::add): Rename from munmap_list_add; rewrite.
3196         (munmap_list::~munmap_list): Rename from munmap_list_free.
3197         (munmap_listp_free_cleanup): Remove.
3198         (compile_object_load): Update.
3199         * compile/compile-object-load.h (struct munmap_list): Move from
3200         compile-object-load.c.  Rewrite.
3201
3202 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
3203
3204         * aarch64-tdep.c (pass_in_v): Use register size.
3205         (aarch64_extract_return_value): Likewise.
3206         (aarch64_store_return_value): Likewise.
3207
3208 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3209
3210         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3211         rlim_t.
3212
3213 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3214
3215         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3216         Fix short help line.
3217
3218 2018-09-17  Tom Tromey  <tom@tromey.com>
3219
3220         PR python/20445:
3221         * configure: Rebuild.
3222         * configure.ac: Conditionally use -DNDEBUG for Python.
3223
3224 2018-09-17  Tom Tromey  <tom@tromey.com>
3225
3226         * configure: Rebuild.
3227         * configure.ac: Use gmp as a library dependency when checking for
3228         mpfr.
3229
3230 2018-09-17  Pedro Alves  <palves@redhat.com>
3231
3232         * python/py-inferior.c (find_inferior_object): Delete.
3233
3234 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
3235
3236         * compile/compile-cplus-types.c
3237         (compile_cplus_instance::enter_scope): Don't use new_scope after
3238         std::move.
3239
3240 2018-09-17  Tom Tromey  <tom@tromey.com>
3241
3242         * common/pathstuff.c (get_standard_cache_dir): Use
3243         ~/Library/Caches on macOS.
3244         * common/pathstuff.h (get_standard_cache_dir): Update comment.
3245
3246 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
3247
3248         PR python/23669
3249         * breakpoint.c (commands_cmd_element): New.
3250         (_initialize_breakpoint): Assign commands_cmd_element.
3251         * breakpoint.h (commands_cmd_element): New.
3252         * cli/cli-script.c (while_cmd_element, if_command,
3253         define_cmd_element): New.
3254         (command_name_equals): Remove.
3255         (process_next_line): Compare commands by pointer, not by name.
3256         (_initialize_cli_script): Assign the various cmd_list_element
3257         variables.
3258         * compile/compile.c (compile_cmd_element): New.
3259         (_initialize_compile): Assign compile_cmd_element.
3260         * compile/compile.h (compile_cmd_element): New.
3261         * guile/guile.c (guile_cmd_element): New.
3262         (install_gdb_commands): Assign guile_cmd_element.
3263         * guile/guile.h (guile_cmd_element): New.
3264         * python/python.c (python_cmd_element): New.
3265         (_initialize_python): Assign python_cmd_element.
3266         * python/python.h (python_cmd_element): New.
3267         * tracepoint.c (while_stepping_cmd_element): New.
3268         (_initialize_tracepoint): Assign while_stepping_cmd_element.
3269         * tracepoint.h (while_stepping_cmd_element): New.
3270
3271 2018-09-17  Tom Tromey  <tom@tromey.com>
3272
3273         * infrun.c (save_infcall_suspend_state): Return
3274         infcall_suspend_state_up.
3275         (save_infcall_control_state): Return infcall_control_state_up.
3276         * inferior.h (save_infcall_suspend_state)
3277         (save_infcall_control_state): Declare later.  Return unique
3278         pointers.
3279
3280 2018-09-17  Tom Tromey  <tom@tromey.com>
3281
3282         * infrun.c (struct stop_context): Declare constructor,
3283         destructor, "changed" method.
3284         (stop_context::stop_context): Rename from save_stop_context.
3285         (stop_context::~stop_context): Rename from
3286         release_stop_context_cleanup.
3287         (normal_stop): Update.
3288         (stop_context::changed): Rename from stop_context_changed.  Return
3289         bool.
3290
3291 2018-09-17  Tom Tromey  <tom@tromey.com>
3292
3293         * inferior.h (struct infcall_suspend_state_deleter): New.
3294         (infcall_suspend_state_up): New typedef.
3295         (struct infcall_control_state_deleter): New.
3296         (infcall_control_state_up): New typedef.
3297         (make_cleanup_restore_infcall_suspend_state)
3298         (make_cleanup_restore_infcall_control_state): Don't declare.
3299         * infcall.c (call_function_by_hand_dummy): Update.
3300         * infrun.c (do_restore_infcall_suspend_state_cleanup)
3301         (make_cleanup_restore_infcall_suspend_state): Remove.
3302         (do_restore_infcall_control_state_cleanup)
3303         (make_cleanup_restore_infcall_control_state): Remove.
3304
3305 2018-09-17  Tom Tromey  <tom@tromey.com>
3306
3307         * gdbthread.h (struct thread_control_state): Add initializer.
3308         (class thread_info) <control>: Remove initializer.
3309         * inferior.h (struct inferior_control_state): Add initializer.
3310         (class inferior) <control>: Remove initializer.
3311         (exit_inferior_1): Update.
3312         * infrun.c (struct infcall_control_state): Add constructors.
3313         (save_infcall_control_state): Use new.
3314         (restore_infcall_control_state, discard_infcall_control_state):
3315         Use delete.
3316
3317 2018-09-17  Tom Tromey  <tom@tromey.com>
3318
3319         * infrun.c (struct infcall_suspend_state) <registers>: Now a
3320         unique_ptr.
3321         <siginfo_data>: Now a unique_xmalloc_ptr.
3322         (save_infcall_suspend_state, restore_infcall_suspend_state)
3323         (discard_infcall_suspend_state)
3324         (get_infcall_suspend_state_regcache): Update.
3325
3326 2018-09-17  Tom Tromey  <tom@tromey.com>
3327
3328         * gdbthread.h (struct thread_suspend_state): Add initializers.
3329         (class thread_info) <suspend>: Remove initializer.
3330         * infrun.c (struct infcall_suspend_state): Add initializers.
3331         (save_infcall_suspend_state): Use new.
3332         (discard_infcall_suspend_state): Use delete.
3333
3334 2018-09-16  Tom Tromey  <tom@tromey.com>
3335
3336         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3337         Remove.
3338         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3339         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3340         (py_varobj_iter_new): Likewise.
3341         (py_varobj_get_iterator): Use gdbpy_ref.
3342
3343 2018-09-16  Tom Tromey  <tom@tromey.com>
3344
3345         * python/py-threadevent.c (py_get_event_thread): Simplify.
3346         * python/py-inferior.c (infpy_thread_from_thread_handle):
3347         Return immediately after calling thread_to_thread_object.  Use
3348         Py_RETURN_NONE.
3349         (thread_to_thread_object): Set the exception on a NULL return.
3350
3351 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
3352
3353         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3354
3355 2018-09-16  Tom Tromey  <tom@tromey.com>
3356
3357         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3358         Remove.
3359
3360 2018-09-16  Tom Tromey  <tom@tromey.com>
3361
3362         * python/python-internal.h (thread_to_thread_object): Change
3363         return type.
3364         * python/py-inferior.c (thread_to_thread_object): Return a new
3365         reference.
3366         (infpy_thread_from_thread_handle): Update.
3367         * python/py-infthread.c (gdbpy_selected_thread): Update.
3368         * python/py-stopevent.c (create_stop_event_object): Update.
3369         * python/py-threadevent.c (py_get_event_thread): Return a new
3370         reference.
3371         (py_get_event_thread): Update.
3372         * python/py-event.h (py_get_event_thread): Change return type.
3373         * python/py-continueevent.c (create_continue_event_object):
3374         Update.
3375
3376 2018-09-16  Tom Tromey  <tom@tromey.com>
3377
3378         * python/py-progspace.c (pspy_get_objfiles): Update.
3379         * python/python-internal.h (objfile_to_objfile_object): Change
3380         return type.
3381         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3382         Update.
3383         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3384         Update.
3385         * python/python.c (gdbpy_get_current_objfile): Update.
3386         (gdbpy_objfiles): Update.
3387         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3388         Update.
3389         (objfile_to_objfile_object): Return a new reference.
3390         * python/py-symtab.c (stpy_get_objfile): Update.
3391         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3392         Update.
3393
3394 2018-09-16  Tom Tromey  <tom@tromey.com>
3395
3396         * python/py-inferior.c (infpy_get_progspace): Update.
3397         * python/python-internal.h (pspace_to_pspace_object): Change
3398         return type.
3399         * python/py-newobjfileevent.c
3400         (create_clear_objfiles_event_object): Update.
3401         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3402         Update.
3403         * python/python.c (gdbpy_get_current_progspace): Update.
3404         (gdbpy_progspaces): Update.
3405         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3406         reference.
3407         * python/py-objfile.c (objfpy_get_progspace): Update.
3408         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3409         Update.
3410
3411 2018-09-16  Tom Tromey  <tom@tromey.com>
3412
3413         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3414         (solib_name, block_for_pc, find_pc_line): New functions.
3415         (execute_unwinders): Update.
3416         * python/py-block.c (gdbpy_block_for_pc): Remove.
3417         * python/py-inferior.c (infpy_get_progspace): New function.
3418         (inferior_object_getset) <progspace>: Add.
3419         * python/py-progspace.c (pspy_objfiles): Rewrite.
3420         (pspy_solib_name, pspy_block_for_pc)
3421         (pspy_find_pc_line, pspy_is_valid): New functions.
3422         (progspace_object_methods): Add entries for solib_name,
3423         block_for_pc, find_pc_line, is_valid.
3424         * python/python-internal.h (gdbpy_block_for_pc)
3425         (build_objfiles_list): Don't declare.
3426         * python/python.c: Don't include solib.h.
3427         (gdbpy_solib_name, gdbpy_find_pc_line)
3428         (gdbpy_get_current_progspace, build_objfiles_list)
3429         (gdbpy_objfiles): Remove.
3430         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3431         solib_name, find_pc_line>: Remove entries.
3432
3433 2018-09-16  Tom Tromey  <tom@tromey.com>
3434
3435         * top.c (new_ui_command): Use GNU style for metasyntactic
3436         variables.
3437         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3438         variables.
3439         * maint.c (maintenance_translate_address): Remove "<>" around
3440         text.
3441         * interps.c (interpreter_exec_cmd): Use GNU style for
3442         metasyntactic variables.
3443         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3444         metasyntactic variables.
3445         * tracepoint.c (tfind_range_command): Use GNU style for
3446         metasyntactic variables.
3447         (tfind_outside_command): Likewise.
3448         (_initialize_tracepoint): Likewise.
3449         * remote.c (extended_remote_target::create_inferior): Use GNU
3450         style for metasyntactic variables.
3451         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3452         metasyntactic variables.
3453         (adi_assign_command): Likewise.
3454
3455 2018-09-16  Tom Tromey  <tom@tromey.com>
3456
3457         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3458         metasyntactic variables.  Print message if no disassembler options
3459         are available.
3460
3461 2018-09-15  Tom Tromey  <tom@tromey.com>
3462
3463         * infcmd.c (get_inferior_args): Return const char *.
3464         * inferior.h (get_inferior_args): Return type now const.
3465         * linux-tdep.c (linux_fill_prpsinfo): Update.
3466         * procfs.c (procfs_target::make_corefile_notes): Update.
3467
3468 2018-09-07  Tom Tromey  <tom@tromey.com>
3469
3470         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3471         inside the TRY.
3472
3473 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3474
3475         * nios2-tdep.c (nios2_type_align): New.
3476         (nios2_gdb_arch_init): Install type_align hook.
3477
3478 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3479
3480         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3481         type that is neither object file owned, nor gdbarch owned.
3482         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3483         gdbarch is non-NULL.
3484         (alloc_type_instance): Allocate non-objfile owned types on the
3485         gdbarch obstack.
3486         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3487         using TYPE_ALLOC to ensure memory is allocated on the correct
3488         obstack.
3489         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3490         obstack, or the gdbarch obstack.
3491         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3492
3493 2018-09-14  Tom Tromey  <tom@tromey.com>
3494
3495         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3496         block.
3497
3498 2018-09-14  Tom Tromey  <tom@tromey.com>
3499
3500         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3501
3502 2018-09-13  Tom Tromey  <tom@tromey.com>
3503
3504         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3505         static.
3506
3507 2018-09-13  Tom Tromey  <tom@tromey.com>
3508
3509         * exec.c (try_open_exec_file): Use std::string.
3510
3511 2018-09-13  Tom Tromey  <tom@tromey.com>
3512
3513         * utils.h (gdb_bfd_errmsg): Return std::string.
3514         * exec.c (exec_file_attach): Update.
3515         * compile/compile-object-load.c (compile_object_load): Update.
3516         * utils.c (gdb_bfd_errmsg): Return std::string.
3517
3518 2018-09-13  Tom Tromey  <tom@tromey.com>
3519
3520         * procfs.c (struct procinfo_deleter): New.
3521         (procinfo_up): New typedef.
3522         (do_destroy_procinfo_cleanup): Remove.
3523         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3524
3525 2018-09-13  Tom Tromey  <tom@tromey.com>
3526
3527         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3528
3529 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3530 2018-09-13  Tom Tromey  <tom@tromey.com>
3531
3532         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3533         (pspy_get_objfiles): New function.
3534         (progspace_object_methods): New.
3535         (pspace_object_type): Add tp_methods callback.
3536         * python/python-internal.h (build_objfiles_list): New
3537         declaration.
3538         * python/python.c (build_objfiles_list): New function.
3539         (gdbpy_objfiles): Implement using build_objfiles_list.
3540         * NEWS: Mention the Progspace.objfiles method.
3541
3542 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3543
3544         * python/py-inferior.c (infpy_get_progspace): New function.
3545         (inferior_object_getset): Add progspace property.
3546         * NEWS: Mention the new property.
3547
3548 2018-09-13  Tom Tromey  <tom@tromey.com>
3549
3550         PR rust/23650:
3551         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3552
3553 2018-09-13  Tom Tromey  <tom@tromey.com>
3554
3555         PR rust/23626:
3556         * rust-lang.c (rust_enum_variant): Now static.
3557         (rust_empty_enum_p): New function.
3558         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3559         Handle empty enum.
3560
3561 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3562
3563         * python/py-inferior.c (infpy_repr): New.
3564         (inferior_object_type): Register infpy_repr.
3565         * python/py-objfile.c (objfpy_repr): New.
3566         (objfile_object_type): Register objfpy_repr.
3567
3568 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3569
3570         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3571
3572 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3573
3574         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3575         typo.
3576
3577 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3578
3579         * common/common-utils.c: Don't include '<sys/stat.h>'.
3580         (is_regular_file): Move to...
3581         * common/filestuff.c (is_regular_file): ... here.
3582         * common/common-utils.h (is_regular_file): Move to...
3583         * common/filestuff.h (is_regular_file): ... here.
3584
3585 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3586
3587         * skip.c (debug_skip): New variable.
3588         (skiplist_entry::do_skip_file_p): Add debug output.
3589         (skiplist_entry::do_skip_gfile_p): Likewise.
3590         (skiplist_entry::skip_function_p): Likewise.
3591         (_initialize_step_skip): Create debug command.
3592         * NEWS: Mention set/show debug skip.
3593
3594 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3595
3596         * darwin-nat.c (should_disable_startup_with_shell):
3597         New function.
3598         (darwin_nat_target::create_inferior): Add call.
3599
3600 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3601
3602         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3603         inf_port, msg_state>: Initialize.
3604         (struct darwin_thread_info) <signaled, single_step>: Change
3605         type and initialize.
3606         (struct darwin_thread_info) <event>: Initialize.
3607
3608 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3609
3610         PR gdb/23555
3611         PR gdb/23558
3612         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3613         guesses.
3614
3615 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3616
3617         Revert:
3618         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3619
3620         PR gdb/23555
3621         PR gdb/23558
3622         * gnulib/aclocal.m4: Regenerate.
3623         * gnulib/config.in: Regenerate.
3624         * gnulib/configure: Regenerate.
3625         * gnulib/import/Makefile.am: Update.
3626         * gnulib/import/Makefile.in: Update.
3627         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3628         * gnulib/import/_Noreturn.h: ... this.
3629         * gnulib/import/alloca.in.h: Update.
3630         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3631         * gnulib/import/arg-nonnull.h: ... this.
3632         * gnulib/import/assure.h: Update.
3633         * gnulib/import/at-func.c: Update.
3634         * gnulib/import/basename-lgpl.c: Update.
3635         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3636         * gnulib/import/c++defs.h: ... this.
3637         * gnulib/import/canonicalize-lgpl.c: Update.
3638         * gnulib/import/cdefs.h: Update.
3639         * gnulib/import/chdir-long.c: Update.
3640         * gnulib/import/chdir-long.h: Update.
3641         * gnulib/import/cloexec.c: Update.
3642         * gnulib/import/cloexec.h: Update.
3643         * gnulib/import/close.c: Update.
3644         * gnulib/import/closedir.c: Update.
3645         * gnulib/import/config.charset: Update.
3646         * gnulib/import/dirent-private.h: Update.
3647         * gnulib/import/dirent.in.h: Update.
3648         * gnulib/import/dirfd.c: Update.
3649         * gnulib/import/dirname-lgpl.c: Update.
3650         * gnulib/import/dirname.h: Update.
3651         * gnulib/import/dosname.h: Update.
3652         * gnulib/import/dup-safer-flag.c: Update.
3653         * gnulib/import/dup-safer.c: Update.
3654         * gnulib/import/dup.c: Update.
3655         * gnulib/import/dup2.c: Update.
3656         * gnulib/import/errno.in.h: Update.
3657         * gnulib/import/error.c: Update.
3658         * gnulib/import/error.h: Update.
3659         * gnulib/import/exitfail.c: Update.
3660         * gnulib/import/exitfail.h: Update.
3661         * gnulib/import/extra/update-copyright: Update.
3662         * gnulib/import/fchdir.c: Update.
3663         * gnulib/import/fcntl.c: Update.
3664         * gnulib/import/fcntl.in.h: Update.
3665         * gnulib/import/fd-hook.c: Update.
3666         * gnulib/import/fd-hook.h: Update.
3667         * gnulib/import/fd-safer-flag.c: Update.
3668         * gnulib/import/fd-safer.c: Update.
3669         * gnulib/import/fdopendir.c: Update.
3670         * gnulib/import/filename.h: Update.
3671         * gnulib/import/filenamecat-lgpl.c: Update.
3672         * gnulib/import/filenamecat.h: Update.
3673         * gnulib/import/flexmember.h: Update.
3674         * gnulib/import/float+.h: Update.
3675         * gnulib/import/float.c: Update.
3676         * gnulib/import/float.in.h: Update.
3677         * gnulib/import/fnmatch.c: Update.
3678         * gnulib/import/fnmatch.in.h: Update.
3679         * gnulib/import/fnmatch_loop.c: Update.
3680         * gnulib/import/fpucw.h: Update.
3681         * gnulib/import/frexp.c: Update.
3682         * gnulib/import/frexpl.c: Update.
3683         * gnulib/import/fstat.c: Update.
3684         * gnulib/import/fstatat.c: Update.
3685         * gnulib/import/getcwd-lgpl.c: Update.
3686         * gnulib/import/getcwd.c: Update.
3687         * gnulib/import/getdtablesize.c: Update.
3688         * gnulib/import/getlogin_r.c: Update.
3689         * gnulib/import/getprogname.c: Update.
3690         * gnulib/import/getprogname.h: Update.
3691         * gnulib/import/gettext.h: Update.
3692         * gnulib/import/gettimeofday.c: Update.
3693         * gnulib/import/glob-libc.h: Update.
3694         * gnulib/import/glob.c: Update.
3695         * gnulib/import/glob.in.h: Update.
3696         * gnulib/import/glob_internal.h: Update.
3697         * gnulib/import/glob_pattern_p.c: Update.
3698         * gnulib/import/globfree.c: Update.
3699         * gnulib/import/hard-locale.c: Update.
3700         * gnulib/import/hard-locale.h: Update.
3701         * gnulib/import/intprops.h: Update.
3702         * gnulib/import/inttypes.in.h: Update.
3703         * gnulib/import/isnan.c: Update.
3704         * gnulib/import/isnand-nolibm.h: Update.
3705         * gnulib/import/isnand.c: Update.
3706         * gnulib/import/isnanl-nolibm.h: Update.
3707         * gnulib/import/isnanl.c: Update.
3708         * gnulib/import/itold.c: Update.
3709         * gnulib/import/libc-config.h: Update.
3710         * gnulib/import/limits.in.h: Update.
3711         * gnulib/import/localcharset.c: Update.
3712         * gnulib/import/localcharset.h: Update.
3713         * gnulib/import/localtime-buffer.c: Update.
3714         * gnulib/import/localtime-buffer.h: Update.
3715         * gnulib/import/lstat.c: Update.
3716         * gnulib/import/m4/00gnulib.m4: Update.
3717         * gnulib/import/m4/__inline.m4: Update.
3718         * gnulib/import/m4/absolute-header.m4: Update.
3719         * gnulib/import/m4/alloca.m4: Update.
3720         * gnulib/import/m4/builtin-expect.m4: Update.
3721         * gnulib/import/m4/canonicalize.m4: Update.
3722         * gnulib/import/m4/chdir-long.m4: Update.
3723         * gnulib/import/m4/close.m4: Update.
3724         * gnulib/import/m4/closedir.m4: Update.
3725         * gnulib/import/m4/configmake.m4: Update.
3726         * gnulib/import/m4/d-ino.m4: Update.
3727         * gnulib/import/m4/d-type.m4: Update.
3728         * gnulib/import/m4/dirent_h.m4: Update.
3729         * gnulib/import/m4/dirfd.m4: Update.
3730         * gnulib/import/m4/dirname.m4: Update.
3731         * gnulib/import/m4/double-slash-root.m4: Update.
3732         * gnulib/import/m4/dup.m4: Update.
3733         * gnulib/import/m4/dup2.m4: Update.
3734         * gnulib/import/m4/eealloc.m4: Update.
3735         * gnulib/import/m4/environ.m4: Update.
3736         * gnulib/import/m4/errno_h.m4: Update.
3737         * gnulib/import/m4/error.m4: Update.
3738         * gnulib/import/m4/exponentd.m4: Update.
3739         * gnulib/import/m4/exponentl.m4: Update.
3740         * gnulib/import/m4/extensions.m4: Update.
3741         * gnulib/import/m4/extern-inline.m4: Update.
3742         * gnulib/import/m4/fchdir.m4: Update.
3743         * gnulib/import/m4/fcntl-o.m4: Update.
3744         * gnulib/import/m4/fcntl.m4: Update.
3745         * gnulib/import/m4/fcntl_h.m4: Update.
3746         * gnulib/import/m4/fdopendir.m4: Update.
3747         * gnulib/import/m4/filenamecat.m4: Update.
3748         * gnulib/import/m4/flexmember.m4: Update.
3749         * gnulib/import/m4/float_h.m4: Update.
3750         * gnulib/import/m4/fnmatch.m4: Update.
3751         * gnulib/import/m4/fnmatch_h.m4: Update.
3752         * gnulib/import/m4/fpieee.m4: Update.
3753         * gnulib/import/m4/frexp.m4: Update.
3754         * gnulib/import/m4/frexpl.m4: Update.
3755         * gnulib/import/m4/fstat.m4: Update.
3756         * gnulib/import/m4/fstatat.m4: Update.
3757         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3758         * gnulib/import/m4/getcwd-path-max.m4: Update.
3759         * gnulib/import/m4/getcwd.m4: Update.
3760         * gnulib/import/m4/getdtablesize.m4: Update.
3761         * gnulib/import/m4/getlogin.m4: Update.
3762         * gnulib/import/m4/getlogin_r.m4: Update.
3763         * gnulib/import/m4/getpagesize.m4: Update.
3764         * gnulib/import/m4/getprogname.m4: Update.
3765         * gnulib/import/m4/gettimeofday.m4: Update.
3766         * gnulib/import/m4/glibc21.m4: Update.
3767         * gnulib/import/m4/glob.m4: Update.
3768         * gnulib/import/m4/glob_h.m4: Update.
3769         * gnulib/import/m4/gnulib-cache.m4: Update.
3770         * gnulib/import/m4/gnulib-common.m4: Update.
3771         * gnulib/import/m4/gnulib-comp.m4: Update.
3772         * gnulib/import/m4/gnulib-tool.m4: Update.
3773         * gnulib/import/m4/hard-locale.m4: Update.
3774         * gnulib/import/m4/include_next.m4: Update.
3775         * gnulib/import/m4/inttypes-pri.m4: Update.
3776         * gnulib/import/m4/inttypes.m4: Update.
3777         * gnulib/import/m4/isnand.m4: Update.
3778         * gnulib/import/m4/isnanl.m4: Update.
3779         * gnulib/import/m4/largefile.m4: Update.
3780         * gnulib/import/m4/limits-h.m4: Update.
3781         * gnulib/import/m4/localcharset.m4: Update.
3782         * gnulib/import/m4/locale-fr.m4: Update.
3783         * gnulib/import/m4/locale-ja.m4: Update.
3784         * gnulib/import/m4/locale-zh.m4: Update.
3785         * gnulib/import/m4/localtime-buffer.m4: Update.
3786         * gnulib/import/m4/longlong.m4: Update.
3787         * gnulib/import/m4/lstat.m4: Update.
3788         * gnulib/import/m4/malloc.m4: Update.
3789         * gnulib/import/m4/malloca.m4: Update.
3790         * gnulib/import/m4/math_h.m4: Update.
3791         * gnulib/import/m4/mbrtowc.m4: Update.
3792         * gnulib/import/m4/mbsinit.m4: Update.
3793         * gnulib/import/m4/mbsrtowcs.m4: Update.
3794         * gnulib/import/m4/mbstate_t.m4: Update.
3795         * gnulib/import/m4/memchr.m4: Update.
3796         * gnulib/import/m4/memmem.m4: Update.
3797         * gnulib/import/m4/mempcpy.m4: Update.
3798         * gnulib/import/m4/memrchr.m4: Update.
3799         * gnulib/import/m4/mkdir.m4: Update.
3800         * gnulib/import/m4/mkstemp.m4: Update.
3801         * gnulib/import/m4/mmap-anon.m4: Update.
3802         * gnulib/import/m4/mode_t.m4: Update.
3803         * gnulib/import/m4/msvc-inval.m4: Update.
3804         * gnulib/import/m4/msvc-nothrow.m4: Update.
3805         * gnulib/import/m4/multiarch.m4: Update.
3806         * gnulib/import/m4/nocrash.m4: Update.
3807         * gnulib/import/m4/off_t.m4: Update.
3808         * gnulib/import/m4/onceonly.m4: Update.
3809         * gnulib/import/m4/open-cloexec.m4: Update.
3810         * gnulib/import/m4/open.m4: Update.
3811         * gnulib/import/m4/openat.m4: Update.
3812         * gnulib/import/m4/opendir.m4: Update.
3813         * gnulib/import/m4/pathmax.m4: Update.
3814         * gnulib/import/m4/rawmemchr.m4: Update.
3815         * gnulib/import/m4/readdir.m4: Update.
3816         * gnulib/import/m4/readlink.m4: Update.
3817         * gnulib/import/m4/realloc.m4: Update.
3818         * gnulib/import/m4/rename.m4: Update.
3819         * gnulib/import/m4/rewinddir.m4: Update.
3820         * gnulib/import/m4/rmdir.m4: Update.
3821         * gnulib/import/m4/save-cwd.m4: Update.
3822         * gnulib/import/m4/secure_getenv.m4: Update.
3823         * gnulib/import/m4/setenv.m4: Update.
3824         * gnulib/import/m4/signal_h.m4: Update.
3825         * gnulib/import/m4/ssize_t.m4: Update.
3826         * gnulib/import/m4/stat-time.m4: Update.
3827         * gnulib/import/m4/stat.m4: Update.
3828         * gnulib/import/m4/std-gnu11.m4: Update.
3829         * gnulib/import/m4/stdbool.m4: Update.
3830         * gnulib/import/m4/stddef_h.m4: Update.
3831         * gnulib/import/m4/stdint.m4: Update.
3832         * gnulib/import/m4/stdio_h.m4: Update.
3833         * gnulib/import/m4/stdlib_h.m4: Update.
3834         * gnulib/import/m4/strchrnul.m4: Update.
3835         * gnulib/import/m4/strdup.m4: Update.
3836         * gnulib/import/m4/strerror.m4: Update.
3837         * gnulib/import/m4/string_h.m4: Update.
3838         * gnulib/import/m4/strstr.m4: Update.
3839         * gnulib/import/m4/strtok_r.m4: Update.
3840         * gnulib/import/m4/sys_socket_h.m4: Update.
3841         * gnulib/import/m4/sys_stat_h.m4: Update.
3842         * gnulib/import/m4/sys_time_h.m4: Update.
3843         * gnulib/import/m4/sys_types_h.m4: Update.
3844         * gnulib/import/m4/tempname.m4: Update.
3845         * gnulib/import/m4/time_h.m4: Update.
3846         * gnulib/import/m4/unistd-safer.m4: Update.
3847         * gnulib/import/m4/unistd_h.m4: Update.
3848         * gnulib/import/m4/warn-on-use.m4: Update.
3849         * gnulib/import/m4/wchar_h.m4: Update.
3850         * gnulib/import/m4/wchar_t.m4: Update.
3851         * gnulib/import/m4/wctype_h.m4: Update.
3852         * gnulib/import/m4/wint_t.m4: Update.
3853         * gnulib/import/malloc.c: Update.
3854         * gnulib/import/malloc/scratch_buffer.h: Update.
3855         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3856         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3857         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3858         * gnulib/import/malloca.c: Update.
3859         * gnulib/import/malloca.h: Update.
3860         * gnulib/import/malloca.valgrind: Update.
3861         * gnulib/import/math.in.h: Update.
3862         * gnulib/import/mbrtowc.c: Update.
3863         * gnulib/import/mbsinit.c: Update.
3864         * gnulib/import/mbsrtowcs-impl.h: Update.
3865         * gnulib/import/mbsrtowcs-state.c: Update.
3866         * gnulib/import/mbsrtowcs.c: Update.
3867         * gnulib/import/memchr.c: Update.
3868         * gnulib/import/memmem.c: Update.
3869         * gnulib/import/mempcpy.c: Update.
3870         * gnulib/import/memrchr.c: Update.
3871         * gnulib/import/mkdir.c: Update.
3872         * gnulib/import/mkstemp.c: Update.
3873         * gnulib/import/msvc-inval.c: Update.
3874         * gnulib/import/msvc-inval.h: Update.
3875         * gnulib/import/msvc-nothrow.c: Update.
3876         * gnulib/import/msvc-nothrow.h: Update.
3877         * gnulib/import/open.c: Update.
3878         * gnulib/import/openat-die.c: Update.
3879         * gnulib/import/openat-priv.h: Update.
3880         * gnulib/import/openat-proc.c: Update.
3881         * gnulib/import/openat.c: Update.
3882         * gnulib/import/openat.h: Update.
3883         * gnulib/import/opendir.c: Update.
3884         * gnulib/import/pathmax.h: Update.
3885         * gnulib/import/pipe-safer.c: Update.
3886         * gnulib/import/rawmemchr.c: Update.
3887         * gnulib/import/readdir.c: Update.
3888         * gnulib/import/readlink.c: Update.
3889         * gnulib/import/realloc.c: Update.
3890         * gnulib/import/ref-add.sin: Update.
3891         * gnulib/import/ref-del.sin: Update.
3892         * gnulib/import/rename.c: Update.
3893         * gnulib/import/rewinddir.c: Update.
3894         * gnulib/import/rmdir.c: Update.
3895         * gnulib/import/same-inode.h: Update.
3896         * gnulib/import/save-cwd.c: Update.
3897         * gnulib/import/save-cwd.h: Update.
3898         * gnulib/import/scratch_buffer.h: Update.
3899         * gnulib/import/secure_getenv.c: Update.
3900         * gnulib/import/setenv.c: Update.
3901         * gnulib/import/signal.in.h: Update.
3902         * gnulib/import/stat-time.c: Update.
3903         * gnulib/import/stat-time.h: Update.
3904         * gnulib/import/stat-w32.c: Update.
3905         * gnulib/import/stat-w32.h: Update.
3906         * gnulib/import/stat.c: Update.
3907         * gnulib/import/stdbool.in.h: Update.
3908         * gnulib/import/stddef.in.h: Update.
3909         * gnulib/import/stdint.in.h: Update.
3910         * gnulib/import/stdio.in.h: Update.
3911         * gnulib/import/stdlib.in.h: Update.
3912         * gnulib/import/str-two-way.h: Update.
3913         * gnulib/import/strchrnul.c: Update.
3914         * gnulib/import/strdup.c: Update.
3915         * gnulib/import/streq.h: Update.
3916         * gnulib/import/strerror-override.c: Update.
3917         * gnulib/import/strerror-override.h: Update.
3918         * gnulib/import/strerror.c: Update.
3919         * gnulib/import/string.in.h: Update.
3920         * gnulib/import/stripslash.c: Update.
3921         * gnulib/import/strnlen1.c: Update.
3922         * gnulib/import/strnlen1.h: Update.
3923         * gnulib/import/strstr.c: Update.
3924         * gnulib/import/strtok_r.c: Update.
3925         * gnulib/import/sys_stat.in.h: Update.
3926         * gnulib/import/sys_time.in.h: Update.
3927         * gnulib/import/sys_types.in.h: Update.
3928         * gnulib/import/tempname.c: Update.
3929         * gnulib/import/tempname.h: Update.
3930         * gnulib/import/time.in.h: Update.
3931         * gnulib/import/unistd--.h: Update.
3932         * gnulib/import/unistd-safer.h: Update.
3933         * gnulib/import/unistd.in.h: Update.
3934         * gnulib/import/unsetenv.c: Update.
3935         * gnulib/import/verify.h: Update.
3936         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3937         * gnulib/import/wchar.in.h: Update.
3938         * gnulib/import/wctype.in.h: Update.
3939         * gnulib/import/xalloc-oversized.h: Update.
3940         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3941         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3942
3943 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3944
3945         * record-btrace.c (get_thread_current_frame): Remove
3946         old_inferior_ptid.
3947
3948 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3949
3950         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3951         with check_tag to 1 if and only if the type is tagged and the
3952         component being searched cannot been found in the current
3953         view. Otherwise, always call ada_to_fixed_type with
3954         check_tag to 0.
3955
3956 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3957
3958         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3959         declaration.
3960         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3961         * ada-varobj.c (ada_varobj_get_number_of_children,
3962         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3963
3964 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3965
3966         * ada-valprint.c (ada_value_print): Use type instead of
3967         enclosing type.
3968
3969 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3970
3971         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3972         an array of access to unconstrained array.
3973
3974 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3975
3976         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3977         (ada_check_typedef): Use it.
3978
3979 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3980
3981         * ada-varobj.c (ada_varobj_describe_struct_child)
3982         (ada_varobj_describe_child): Handle union case like struct one.
3983
3984 2018-09-10  Tom Tromey  <tom@tromey.com>
3985
3986         PR python/18380:
3987         * python/python.c (_initialize_python): Make example in "python"
3988         help work in Python 3.
3989
3990 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3991
3992         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3993         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3994         $(EXEEXT) to the script, as it is not a program.
3995
3996 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3997
3998         * python/py-prettyprint.c (pretty_print_one_value): Return
3999         gdbpy_ref<>.
4000         (print_string_repr): Adjust.
4001         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
4002         * python/python-internal.h (apply_varobj_pretty_printer): Return
4003         gdbpy_ref<>.
4004         * varobj.c (varobj_value_get_print_value): Adjust.
4005
4006 2018-09-08  Tom Tromey  <tom@tromey.com>
4007
4008         PR python/16047:
4009         * python/py-prettyprint.c (pretty_print_one_value): Check for
4010         to_string method.
4011
4012 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4013
4014         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4015         replace_operator_with_call.
4016
4017 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4018
4019         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4020
4021 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4022
4023         * ada-typeprint.c (print_range): Print the bounds using TYPE
4024         rather than its TYPE_TARGET_TYPE.
4025
4026 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4027
4028         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4029         call to ada_to_fixed_value_create.
4030
4031 2018-09-08  Jerome Guitton  <guitton@adacore.com>
4032
4033         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4034
4035 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4036
4037         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4038         by calls to error.
4039
4040 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4041
4042         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4043         Move update of loop variable "fi".
4044
4045 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4046
4047         * ada-lang.c (value_assign_to_component): In the case of
4048         big-endian targets, extract the bits of the given VAL
4049         using an src_offset of zero if container is not a scalar.
4050
4051 2018-09-06  Simon Ser  <contact@emersion.fr>
4052
4053         PR gdb/23105
4054         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4055         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4056         * fbsd-tdep.c (fbsd_make_note_desc): New.
4057         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4058         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4059         * target.h (enum target_object) Add FreeBSD-specific
4060         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4061
4062 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4063
4064         * compile/compile-c.h (generate_c_for_variable_locations):
4065         Change reference to pointer.
4066         * compile/compile-c-support.c (compile_program) <compute>:
4067         Likewise.
4068         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4069         (generate_c_for_for_one_variable): Likewise
4070         (generate_c_for_variable_locations): Likewise
4071         * compile/compile-c-types.c (compile_c_instance::convert_type):
4072         Likewise
4073         * compile/compile-cplus-symbols.c (convert_one_symbol):
4074         std::move the scope passed to enter_scope.
4075         * compile/compile-cplus-types.c
4076         (compile_cplus_instance::enter_scope): Make parameter
4077         rvalue-reference.
4078         (compile_cplus_instance::new_scope): Change reference to
4079         pointer.
4080         (compile_cplus_instance::convert_type): Likewise
4081         (compile_cplus_convert_typedef): std::move the scope passed to
4082         enter_scope.
4083         (compile_cplus_convert_struct_or_union): Likewise.
4084         (compile_cplus_convert_enum): Likewise.
4085         (compile_cplus_convert_namespace): Likewise.
4086         * compile/compile-cplus.h (compile_cplus_instance)
4087         <enter_scope>: Make parameter rvalue-reference.
4088         * compile/compile-internal.h (compile_instance)
4089         <get_cached_type>: Likewise
4090         * compile/compile-loc2c.c (push): Likewise
4091         (pushf): Likewise
4092         (unary): Likewise
4093         (binary): Likewise
4094         (print_label): Likewise
4095         (pushf_register_address): Likewise
4096         (pushf_register): Likewise
4097         (do_compile_dwarf_expr_to_c): Likewise
4098         (compile_dwarf_expr_to_c): Likewise
4099         (compile_dwarf_bounds_to_c): Likewise
4100         * compile/compile.c (compile_instance::get_cached_type):
4101         Likewise
4102         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4103         (compile_dwarf_bounds_to_c): Likewise
4104         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4105         (dwarf2_compile_property_to_c): Likewise
4106         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4107         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4108         Likewise
4109
4110 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4111
4112         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4113         * tui/tui-data.c (init_content_element): Don't initialize it.
4114
4115 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4116
4117         * tui/tui-data.h (struct tui_win_info)
4118         <detail::opaque>: Remove.
4119         * tui/tui-data.c (init_win_info): Remove assignment.
4120
4121 2018-09-05  Tom Tromey  <tom@tromey.com>
4122
4123         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4124         -Wformat-nonliteral.
4125         * target-float.c (host_float_ops<T>::to_string)
4126         (host_float_ops<T>::from_string): Use
4127         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4128         * configure: Rebuild.
4129
4130 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4131
4132         * printcmd.c (printf_c_string): Use
4133         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4134         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4135
4136 2018-09-05  Tom Tromey  <tom@tromey.com>
4137
4138         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4139
4140 2018-09-05  Tom de Vries  <tdevries@suse.de>
4141
4142         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4143         with resolve_abstract_p == true.
4144         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4145         defaulting to false. Propagate resolve_abstract_p to
4146         dwarf2_fetch_die_loc_sect_off.
4147         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4148         parameter, defaulting to false.
4149         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4150         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4151         parameter.
4152         * dwarf2read.h (struct die_info): Forward-declare.
4153         (die_info_ptr): New typedef.
4154         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4155
4156 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
4157
4158         GDB 8.2 released.
4159
4160 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4161             Pedro Alves  <palves@redhat.com>
4162
4163         * gnulib/Makefile.in (aclocal_m4_deps): Move to
4164         "aclocal-m4-deps.mk".  Include file here.
4165         $(srcdir)/aclocal.m4: Add "configure.ac".
4166         * gnulib/aclocal-m4-deps.mk: New file.
4167         * gnulib/update-gnulib.sh: Automatically update
4168         "aclocal-m4-deps.mk".
4169
4170 2018-09-04  Tom Tromey  <tom@tromey.com>
4171
4172         * configure: Rebuild.
4173         * configure.ac: Remove multi-ice code.
4174
4175 2018-09-04  Tom Tromey  <tom@tromey.com>
4176
4177         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4178         (ada-exp.o): Update.
4179
4180 2018-09-04  Tom Tromey  <tom@tromey.com>
4181
4182         * Makefile.in (printcmd.o, target-float.o): Remove.
4183         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4184
4185 2018-09-04  Tom Tromey  <tom@tromey.com>
4186
4187         * gnulib/Makefile.in: Remove obsolete comment.
4188         * Makefile.in: Remove obsolete comment.
4189
4190 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
4191
4192         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4193         line with '+'.
4194
4195 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4196
4197         * riscv-tdep.c: Add 'prologue-value.h' include.
4198         (struct riscv_unwind_cache): New struct.
4199         (riscv_debug_unwinder): New global.
4200         (riscv_scan_prologue): Update arguments, capture register details
4201         from prologue scan.
4202         (riscv_skip_prologue): Reformat arguments line, move end of
4203         prologue calculation into riscv_scan_prologue.
4204         (riscv_frame_cache): Update return type, create
4205         riscv_unwind_cache, scan the prologue, and fill in remaining cache
4206         details.
4207         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4208         (riscv_frame_prev_register): Use the trad_frame within the
4209         riscv_unwind_cache.
4210         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4211         flag.
4212
4213 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4214
4215         * trad-frame.h (trad_frame_set_realreg): Declare.
4216         (trad_frame_set_addr): Declare.
4217         * trad-frame.c (trad_frame_set_realreg): Define new function.
4218         (trad_frame_set_addr): Define new function.
4219         (trad_frame_set_reg_realreg): Use new function.
4220         (trad_frame_set_reg_addr): Use new function.
4221
4222 2018-09-01  Keith Seitz  <keiths@redhat.com>
4223
4224         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4225         pulongest instead of "%lld".
4226         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4227         ATTRIBUTE_UNUSED.
4228
4229 2018-08-31  Tom Tromey  <tom@tromey.com>
4230
4231         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4232         variant part type.
4233
4234 2018-08-31  Pedro Alves  <palves@redhat.com>
4235
4236         * gdbarch.h: Regenerate.
4237
4238 2018-08-31  Pedro Alves  <palves@redhat.com>
4239
4240         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4241         * target.h (Hardware watchpoint interfaces): Describe
4242         continuable/steppable/non-steppable watchpoints.
4243         * gdbarch.h, gdbarch.c: Regenerate.
4244
4245 2018-08-31  Pedro Alves  <palves@redhat.com>
4246
4247         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4248         Delete.
4249         * s390-linux-nat.c
4250         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4251         * target.h (target_ops::have_continuable_watchpoint): Delete.
4252         (target_have_continuable_watchpoint): Delete.
4253         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4254         * target-delegates.c: Regenerate.
4255
4256 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4257
4258         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4259         the files present in "gnulib/import/m4/".
4260
4261 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4262
4263         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4264         c.sw, c.swsp, and c.sdsp.
4265
4266 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4267
4268         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4269         (riscv_read_misa_reg): Don't cache value read into inferior data.
4270         (riscv_new_inferior_data): Delete.
4271         (riscv_inferior_data_cleanup): Delete.
4272         (riscv_inferior_data): Delete.
4273         (riscv_invalidate_inferior_data): Delete.
4274         (_initialize_riscv_tdep): Remove initialisation of inferior data.
4275
4276 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
4277
4278         * compile/compile-cplus-types.c
4279         (compile_cplus_instance::leave_scope): Take the address of scope
4280         object.
4281         (compile_cplus_instance::convert_qualified_base): Compare quals
4282         to 0.
4283
4284 2018-08-30  Keith Seitz  <keiths@redhat.com>
4285
4286         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4287         Use "%s" and host_address_to_string instead of "%p" in printf.
4288
4289 2018-08-29  Keith Seitz  <keiths@redhat.com>
4290
4291         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4292         and compile-cplus-types.c.
4293         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4294         * c-lang.c (cplus_language_defn): Set C++ compile functions.
4295         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4296         Declare.
4297         * compile/compile-c-support.c: Include compile-cplus.h.
4298         (load_libcompile): Templatize.
4299         (get_compile_context): "New" function.
4300         (c_get_compile_context): Use get_compile_context.
4301         (cplus_get_compile_context): New function.
4302         (cplus_push_user_expression, cplus_pop_user_expression)
4303         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4304         (cplus_compute_program): Define new structs/functions.
4305         * compile/compile-cplus-symmbols.c: New file.
4306         * compile/compile-cplus-types.c: New file.
4307         * compile/compile-cplus.h: New file.
4308         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4309         Declare.
4310         * compile/compile-object-load.c (get_out_value_type): Use
4311         strncmp_iw when comparing symbol names.
4312         (compile_object_load): Add mst_bss and mst_data.
4313         * compile/compile.c (_initialize_compile): Remove
4314         -Wno-implicit-function-declaration from `compile_args'.
4315         * compile/gcc-cp-plugin.h: New file.
4316         * NEWS: Mention C++ compile support and new debug options.
4317
4318 2018-08-29  Keith Seitz  <keiths@redhat.com>
4319
4320         * linespec.c (collect_info::add_symbol): Make virtual.
4321         (struct symbol_searcher_collect_info): New struct.
4322         (symbol_searcher::find_all_symbols): New method.
4323         * symtab.h (class symbol_searcher): New class.
4324
4325 2018-08-29  Keith Seitz  <keiths@redhat.com>
4326
4327         * linespec.c (struct linespec) <function_symbols, label_symbols>:
4328         Change to vector of block_symbol.  Update all users.
4329         (struct collect_info) <symbols>: Likewise.
4330         (collect_info::add_symbol): Take block_symbol as argument.
4331         Update all callers.
4332         (decode_compound_collector) <m_symbols>: Change type to vector
4333         of block_symbol.  Update all users.
4334         (decode_compound_collector::operator ()): Change parameter type
4335         to block_symbol.
4336         (find_method, find_function_symbols, find_linespec_symbols)
4337         (find_label_symbols_in_block, find_label_symbols): Change symbol
4338         vectors to block_symbol vectors.
4339         * symtab.h (symbol_found_callback_ftype): Change parameter type to
4340         block_symbol.
4341
4342 2018-08-29  Keith Seitz  <keiths@redhat.com>
4343
4344         * linespec.c (symbolp): Remove typedef and VEC definitions.
4345         (bound_minimal_symbol_d): Likewise.
4346
4347 2018-08-29  Keith Seitz  <keiths@redhat.com>
4348
4349         * linespec.c (decode_compound_collector::decode_compound_collector):
4350         Remove initialization for `m_symtabs'.
4351         (decode_compound_collector::release_symbols): Change return type
4352         to std::vector.  Update all callers.
4353         (class decode_compound_collector) <m_symbols>: Change type to
4354         std::vector.
4355         (lookup_prefix_sym): Change return type to std::vector.  Update all
4356         callers.
4357         (compare_symbols): Remove.
4358         (std_compare_symbols): Rename to `compare_symbols'.
4359         (find_method): Change `sym_classes' parameter to std::vector.
4360         Update all callers.  Use std::sort to sort sym_classes.
4361         (find_linespec_symbols): Remove cleanup.
4362
4363 2018-08-29  Keith Seitz  <keiths@redhat.com>
4364
4365         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4366         std::vector.  Update all users.
4367         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4368         (struct collect_info) <minimal_symbols>: Likewise.
4369         (compare_msymbols): Return bool.  Change parameters to const
4370         bound_minimal_symbol references.
4371         (find_method, find_function_symbols, find_linespec_symbols): Change
4372         `minsyms' parameter to std::vector.  Update all callers.
4373
4374 2018-08-29  Keith Seitz  <keiths@redhat.com>
4375
4376         * linespec.c (struct linespec) <label_symbols>: Change type to
4377         std::vector.  Update all users.
4378         (find_label_symbols_in_block): Change `result' parameter to
4379         std::vector.  Update all callers.
4380         (find_label_symbols): Return std::vector.  Update all callers.
4381
4382 2018-08-29  Keith Seitz  <keiths@redhat.com>
4383
4384         * linespec.c (struct linespec) <function_symbols>: Change type to
4385         std::vector.  Update all users.
4386         (struct collect_info) <function_symbols>: Likewise.
4387         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4388         (std_compare_symbols): New function.
4389         (find_method, find_function_symbols, find_linespec_symbols)
4390         (find_label_symbols_in_block): Change `symbols' parameter to
4391         std::vector.  Update all callers.
4392         (find_label_symbols): Likewise for `function_symbols' and
4393         `label_funcs_ret'.
4394
4395 2018-08-29  Keith Seitz  <keiths@redhat.com>
4396
4397         * linespec.c (symtab_vector_up): Define.
4398         (struct linespec) <file_symtabs>: Change type to std::vector *.
4399         Update all uses.
4400         (struct collect_info) <file_symtabs>: Likewise.
4401         (collect_symtabs_from_filename): Return symtab_vector_up.
4402         Update all callers.
4403         (decode_objc): Remove cleanup.
4404         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4405         (symtab_collector::release_symtabs): Return symtab_vector_up.
4406         Update all callers.
4407         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4408         Update all users.
4409         (collect_symtabs_from_filename, symtabs_from_filename): Return
4410         symtab_vector_up.  Update all callers.
4411
4412 2018-08-29  Tom Tromey  <tom@tromey.com>
4413
4414         * csky-tdep.c (csky_analyze_prologue): Use
4415         core_addr_to_string_nz.
4416
4417 2018-08-29  Tom Tromey  <tom@tromey.com>
4418
4419         * windows-nat.c (struct xlate_exception) <them>: Change type to
4420         DWORD.
4421         (xlate): Fix formatting.  Remove last entry.
4422         (struct xlate_exception, xlate): Comment out.
4423         (windows_nat_target::resume): Use ranged for.
4424
4425 2018-08-29  Jim Wilson  <jimw@sifive.com>
4426
4427         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4428         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4429         of NT_PRFPREG.
4430         (riscv_linux_nat_target::store_registers): Likewise.
4431
4432 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4433
4434         PR gdb/23555
4435         PR gdb/23558
4436         * gnulib/aclocal.m4: Regenerate.
4437         * gnulib/config.in: Regenerate.
4438         * gnulib/configure: Regenerate.
4439         * gnulib/import/Makefile.am: Update.
4440         * gnulib/import/Makefile.in: Update.
4441         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4442         * gnulib/import/_Noreturn.h: ... this.
4443         * gnulib/import/alloca.in.h: Update.
4444         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4445         * gnulib/import/arg-nonnull.h: ... this.
4446         * gnulib/import/assure.h: Update.
4447         * gnulib/import/at-func.c: Update.
4448         * gnulib/import/basename-lgpl.c: Update.
4449         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4450         * gnulib/import/c++defs.h: ... this.
4451         * gnulib/import/canonicalize-lgpl.c: Update.
4452         * gnulib/import/cdefs.h: Update.
4453         * gnulib/import/chdir-long.c: Update.
4454         * gnulib/import/chdir-long.h: Update.
4455         * gnulib/import/cloexec.c: Update.
4456         * gnulib/import/cloexec.h: Update.
4457         * gnulib/import/close.c: Update.
4458         * gnulib/import/closedir.c: Update.
4459         * gnulib/import/config.charset: Update.
4460         * gnulib/import/dirent-private.h: Update.
4461         * gnulib/import/dirent.in.h: Update.
4462         * gnulib/import/dirfd.c: Update.
4463         * gnulib/import/dirname-lgpl.c: Update.
4464         * gnulib/import/dirname.h: Update.
4465         * gnulib/import/dosname.h: Update.
4466         * gnulib/import/dup-safer-flag.c: Update.
4467         * gnulib/import/dup-safer.c: Update.
4468         * gnulib/import/dup.c: Update.
4469         * gnulib/import/dup2.c: Update.
4470         * gnulib/import/errno.in.h: Update.
4471         * gnulib/import/error.c: Update.
4472         * gnulib/import/error.h: Update.
4473         * gnulib/import/exitfail.c: Update.
4474         * gnulib/import/exitfail.h: Update.
4475         * gnulib/import/extra/update-copyright: Update.
4476         * gnulib/import/fchdir.c: Update.
4477         * gnulib/import/fcntl.c: Update.
4478         * gnulib/import/fcntl.in.h: Update.
4479         * gnulib/import/fd-hook.c: Update.
4480         * gnulib/import/fd-hook.h: Update.
4481         * gnulib/import/fd-safer-flag.c: Update.
4482         * gnulib/import/fd-safer.c: Update.
4483         * gnulib/import/fdopendir.c: Update.
4484         * gnulib/import/filename.h: Update.
4485         * gnulib/import/filenamecat-lgpl.c: Update.
4486         * gnulib/import/filenamecat.h: Update.
4487         * gnulib/import/flexmember.h: Update.
4488         * gnulib/import/float+.h: Update.
4489         * gnulib/import/float.c: Update.
4490         * gnulib/import/float.in.h: Update.
4491         * gnulib/import/fnmatch.c: Update.
4492         * gnulib/import/fnmatch.in.h: Update.
4493         * gnulib/import/fnmatch_loop.c: Update.
4494         * gnulib/import/fpucw.h: Update.
4495         * gnulib/import/frexp.c: Update.
4496         * gnulib/import/frexpl.c: Update.
4497         * gnulib/import/fstat.c: Update.
4498         * gnulib/import/fstatat.c: Update.
4499         * gnulib/import/getcwd-lgpl.c: Update.
4500         * gnulib/import/getcwd.c: Update.
4501         * gnulib/import/getdtablesize.c: Update.
4502         * gnulib/import/getlogin_r.c: Update.
4503         * gnulib/import/getprogname.c: Update.
4504         * gnulib/import/getprogname.h: Update.
4505         * gnulib/import/gettext.h: Update.
4506         * gnulib/import/gettimeofday.c: Update.
4507         * gnulib/import/glob-libc.h: Update.
4508         * gnulib/import/glob.c: Update.
4509         * gnulib/import/glob.in.h: Update.
4510         * gnulib/import/glob_internal.h: Update.
4511         * gnulib/import/glob_pattern_p.c: Update.
4512         * gnulib/import/globfree.c: Update.
4513         * gnulib/import/hard-locale.c: Update.
4514         * gnulib/import/hard-locale.h: Update.
4515         * gnulib/import/intprops.h: Update.
4516         * gnulib/import/inttypes.in.h: Update.
4517         * gnulib/import/isnan.c: Update.
4518         * gnulib/import/isnand-nolibm.h: Update.
4519         * gnulib/import/isnand.c: Update.
4520         * gnulib/import/isnanl-nolibm.h: Update.
4521         * gnulib/import/isnanl.c: Update.
4522         * gnulib/import/itold.c: Update.
4523         * gnulib/import/libc-config.h: Update.
4524         * gnulib/import/limits.in.h: Update.
4525         * gnulib/import/localcharset.c: Update.
4526         * gnulib/import/localcharset.h: Update.
4527         * gnulib/import/localtime-buffer.c: Update.
4528         * gnulib/import/localtime-buffer.h: Update.
4529         * gnulib/import/lstat.c: Update.
4530         * gnulib/import/m4/00gnulib.m4: Update.
4531         * gnulib/import/m4/__inline.m4: Update.
4532         * gnulib/import/m4/absolute-header.m4: Update.
4533         * gnulib/import/m4/alloca.m4: Update.
4534         * gnulib/import/m4/builtin-expect.m4: Update.
4535         * gnulib/import/m4/canonicalize.m4: Update.
4536         * gnulib/import/m4/chdir-long.m4: Update.
4537         * gnulib/import/m4/close.m4: Update.
4538         * gnulib/import/m4/closedir.m4: Update.
4539         * gnulib/import/m4/configmake.m4: Update.
4540         * gnulib/import/m4/d-ino.m4: Update.
4541         * gnulib/import/m4/d-type.m4: Update.
4542         * gnulib/import/m4/dirent_h.m4: Update.
4543         * gnulib/import/m4/dirfd.m4: Update.
4544         * gnulib/import/m4/dirname.m4: Update.
4545         * gnulib/import/m4/double-slash-root.m4: Update.
4546         * gnulib/import/m4/dup.m4: Update.
4547         * gnulib/import/m4/dup2.m4: Update.
4548         * gnulib/import/m4/eealloc.m4: Update.
4549         * gnulib/import/m4/environ.m4: Update.
4550         * gnulib/import/m4/errno_h.m4: Update.
4551         * gnulib/import/m4/error.m4: Update.
4552         * gnulib/import/m4/exponentd.m4: Update.
4553         * gnulib/import/m4/exponentl.m4: Update.
4554         * gnulib/import/m4/extensions.m4: Update.
4555         * gnulib/import/m4/extern-inline.m4: Update.
4556         * gnulib/import/m4/fchdir.m4: Update.
4557         * gnulib/import/m4/fcntl-o.m4: Update.
4558         * gnulib/import/m4/fcntl.m4: Update.
4559         * gnulib/import/m4/fcntl_h.m4: Update.
4560         * gnulib/import/m4/fdopendir.m4: Update.
4561         * gnulib/import/m4/filenamecat.m4: Update.
4562         * gnulib/import/m4/flexmember.m4: Update.
4563         * gnulib/import/m4/float_h.m4: Update.
4564         * gnulib/import/m4/fnmatch.m4: Update.
4565         * gnulib/import/m4/fnmatch_h.m4: Update.
4566         * gnulib/import/m4/fpieee.m4: Update.
4567         * gnulib/import/m4/frexp.m4: Update.
4568         * gnulib/import/m4/frexpl.m4: Update.
4569         * gnulib/import/m4/fstat.m4: Update.
4570         * gnulib/import/m4/fstatat.m4: Update.
4571         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4572         * gnulib/import/m4/getcwd-path-max.m4: Update.
4573         * gnulib/import/m4/getcwd.m4: Update.
4574         * gnulib/import/m4/getdtablesize.m4: Update.
4575         * gnulib/import/m4/getlogin.m4: Update.
4576         * gnulib/import/m4/getlogin_r.m4: Update.
4577         * gnulib/import/m4/getpagesize.m4: Update.
4578         * gnulib/import/m4/getprogname.m4: Update.
4579         * gnulib/import/m4/gettimeofday.m4: Update.
4580         * gnulib/import/m4/glibc21.m4: Update.
4581         * gnulib/import/m4/glob.m4: Update.
4582         * gnulib/import/m4/glob_h.m4: Update.
4583         * gnulib/import/m4/gnulib-cache.m4: Update.
4584         * gnulib/import/m4/gnulib-common.m4: Update.
4585         * gnulib/import/m4/gnulib-comp.m4: Update.
4586         * gnulib/import/m4/gnulib-tool.m4: Update.
4587         * gnulib/import/m4/hard-locale.m4: Update.
4588         * gnulib/import/m4/include_next.m4: Update.
4589         * gnulib/import/m4/inttypes-pri.m4: Update.
4590         * gnulib/import/m4/inttypes.m4: Update.
4591         * gnulib/import/m4/isnand.m4: Update.
4592         * gnulib/import/m4/isnanl.m4: Update.
4593         * gnulib/import/m4/largefile.m4: Update.
4594         * gnulib/import/m4/limits-h.m4: Update.
4595         * gnulib/import/m4/localcharset.m4: Update.
4596         * gnulib/import/m4/locale-fr.m4: Update.
4597         * gnulib/import/m4/locale-ja.m4: Update.
4598         * gnulib/import/m4/locale-zh.m4: Update.
4599         * gnulib/import/m4/localtime-buffer.m4: Update.
4600         * gnulib/import/m4/longlong.m4: Update.
4601         * gnulib/import/m4/lstat.m4: Update.
4602         * gnulib/import/m4/malloc.m4: Update.
4603         * gnulib/import/m4/malloca.m4: Update.
4604         * gnulib/import/m4/math_h.m4: Update.
4605         * gnulib/import/m4/mbrtowc.m4: Update.
4606         * gnulib/import/m4/mbsinit.m4: Update.
4607         * gnulib/import/m4/mbsrtowcs.m4: Update.
4608         * gnulib/import/m4/mbstate_t.m4: Update.
4609         * gnulib/import/m4/memchr.m4: Update.
4610         * gnulib/import/m4/memmem.m4: Update.
4611         * gnulib/import/m4/mempcpy.m4: Update.
4612         * gnulib/import/m4/memrchr.m4: Update.
4613         * gnulib/import/m4/mkdir.m4: Update.
4614         * gnulib/import/m4/mkstemp.m4: Update.
4615         * gnulib/import/m4/mmap-anon.m4: Update.
4616         * gnulib/import/m4/mode_t.m4: Update.
4617         * gnulib/import/m4/msvc-inval.m4: Update.
4618         * gnulib/import/m4/msvc-nothrow.m4: Update.
4619         * gnulib/import/m4/multiarch.m4: Update.
4620         * gnulib/import/m4/nocrash.m4: Update.
4621         * gnulib/import/m4/off_t.m4: Update.
4622         * gnulib/import/m4/onceonly.m4: Update.
4623         * gnulib/import/m4/open-cloexec.m4: Update.
4624         * gnulib/import/m4/open.m4: Update.
4625         * gnulib/import/m4/openat.m4: Update.
4626         * gnulib/import/m4/opendir.m4: Update.
4627         * gnulib/import/m4/pathmax.m4: Update.
4628         * gnulib/import/m4/rawmemchr.m4: Update.
4629         * gnulib/import/m4/readdir.m4: Update.
4630         * gnulib/import/m4/readlink.m4: Update.
4631         * gnulib/import/m4/realloc.m4: Update.
4632         * gnulib/import/m4/rename.m4: Update.
4633         * gnulib/import/m4/rewinddir.m4: Update.
4634         * gnulib/import/m4/rmdir.m4: Update.
4635         * gnulib/import/m4/save-cwd.m4: Update.
4636         * gnulib/import/m4/secure_getenv.m4: Update.
4637         * gnulib/import/m4/setenv.m4: Update.
4638         * gnulib/import/m4/signal_h.m4: Update.
4639         * gnulib/import/m4/ssize_t.m4: Update.
4640         * gnulib/import/m4/stat-time.m4: Update.
4641         * gnulib/import/m4/stat.m4: Update.
4642         * gnulib/import/m4/std-gnu11.m4: Update.
4643         * gnulib/import/m4/stdbool.m4: Update.
4644         * gnulib/import/m4/stddef_h.m4: Update.
4645         * gnulib/import/m4/stdint.m4: Update.
4646         * gnulib/import/m4/stdio_h.m4: Update.
4647         * gnulib/import/m4/stdlib_h.m4: Update.
4648         * gnulib/import/m4/strchrnul.m4: Update.
4649         * gnulib/import/m4/strdup.m4: Update.
4650         * gnulib/import/m4/strerror.m4: Update.
4651         * gnulib/import/m4/string_h.m4: Update.
4652         * gnulib/import/m4/strstr.m4: Update.
4653         * gnulib/import/m4/strtok_r.m4: Update.
4654         * gnulib/import/m4/sys_socket_h.m4: Update.
4655         * gnulib/import/m4/sys_stat_h.m4: Update.
4656         * gnulib/import/m4/sys_time_h.m4: Update.
4657         * gnulib/import/m4/sys_types_h.m4: Update.
4658         * gnulib/import/m4/tempname.m4: Update.
4659         * gnulib/import/m4/time_h.m4: Update.
4660         * gnulib/import/m4/unistd-safer.m4: Update.
4661         * gnulib/import/m4/unistd_h.m4: Update.
4662         * gnulib/import/m4/warn-on-use.m4: Update.
4663         * gnulib/import/m4/wchar_h.m4: Update.
4664         * gnulib/import/m4/wchar_t.m4: Update.
4665         * gnulib/import/m4/wctype_h.m4: Update.
4666         * gnulib/import/m4/wint_t.m4: Update.
4667         * gnulib/import/malloc.c: Update.
4668         * gnulib/import/malloc/scratch_buffer.h: Update.
4669         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4670         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4671         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4672         * gnulib/import/malloca.c: Update.
4673         * gnulib/import/malloca.h: Update.
4674         * gnulib/import/malloca.valgrind: Update.
4675         * gnulib/import/math.in.h: Update.
4676         * gnulib/import/mbrtowc.c: Update.
4677         * gnulib/import/mbsinit.c: Update.
4678         * gnulib/import/mbsrtowcs-impl.h: Update.
4679         * gnulib/import/mbsrtowcs-state.c: Update.
4680         * gnulib/import/mbsrtowcs.c: Update.
4681         * gnulib/import/memchr.c: Update.
4682         * gnulib/import/memmem.c: Update.
4683         * gnulib/import/mempcpy.c: Update.
4684         * gnulib/import/memrchr.c: Update.
4685         * gnulib/import/mkdir.c: Update.
4686         * gnulib/import/mkstemp.c: Update.
4687         * gnulib/import/msvc-inval.c: Update.
4688         * gnulib/import/msvc-inval.h: Update.
4689         * gnulib/import/msvc-nothrow.c: Update.
4690         * gnulib/import/msvc-nothrow.h: Update.
4691         * gnulib/import/open.c: Update.
4692         * gnulib/import/openat-die.c: Update.
4693         * gnulib/import/openat-priv.h: Update.
4694         * gnulib/import/openat-proc.c: Update.
4695         * gnulib/import/openat.c: Update.
4696         * gnulib/import/openat.h: Update.
4697         * gnulib/import/opendir.c: Update.
4698         * gnulib/import/pathmax.h: Update.
4699         * gnulib/import/pipe-safer.c: Update.
4700         * gnulib/import/rawmemchr.c: Update.
4701         * gnulib/import/readdir.c: Update.
4702         * gnulib/import/readlink.c: Update.
4703         * gnulib/import/realloc.c: Update.
4704         * gnulib/import/ref-add.sin: Update.
4705         * gnulib/import/ref-del.sin: Update.
4706         * gnulib/import/rename.c: Update.
4707         * gnulib/import/rewinddir.c: Update.
4708         * gnulib/import/rmdir.c: Update.
4709         * gnulib/import/same-inode.h: Update.
4710         * gnulib/import/save-cwd.c: Update.
4711         * gnulib/import/save-cwd.h: Update.
4712         * gnulib/import/scratch_buffer.h: Update.
4713         * gnulib/import/secure_getenv.c: Update.
4714         * gnulib/import/setenv.c: Update.
4715         * gnulib/import/signal.in.h: Update.
4716         * gnulib/import/stat-time.c: Update.
4717         * gnulib/import/stat-time.h: Update.
4718         * gnulib/import/stat-w32.c: Update.
4719         * gnulib/import/stat-w32.h: Update.
4720         * gnulib/import/stat.c: Update.
4721         * gnulib/import/stdbool.in.h: Update.
4722         * gnulib/import/stddef.in.h: Update.
4723         * gnulib/import/stdint.in.h: Update.
4724         * gnulib/import/stdio.in.h: Update.
4725         * gnulib/import/stdlib.in.h: Update.
4726         * gnulib/import/str-two-way.h: Update.
4727         * gnulib/import/strchrnul.c: Update.
4728         * gnulib/import/strdup.c: Update.
4729         * gnulib/import/streq.h: Update.
4730         * gnulib/import/strerror-override.c: Update.
4731         * gnulib/import/strerror-override.h: Update.
4732         * gnulib/import/strerror.c: Update.
4733         * gnulib/import/string.in.h: Update.
4734         * gnulib/import/stripslash.c: Update.
4735         * gnulib/import/strnlen1.c: Update.
4736         * gnulib/import/strnlen1.h: Update.
4737         * gnulib/import/strstr.c: Update.
4738         * gnulib/import/strtok_r.c: Update.
4739         * gnulib/import/sys_stat.in.h: Update.
4740         * gnulib/import/sys_time.in.h: Update.
4741         * gnulib/import/sys_types.in.h: Update.
4742         * gnulib/import/tempname.c: Update.
4743         * gnulib/import/tempname.h: Update.
4744         * gnulib/import/time.in.h: Update.
4745         * gnulib/import/unistd--.h: Update.
4746         * gnulib/import/unistd-safer.h: Update.
4747         * gnulib/import/unistd.in.h: Update.
4748         * gnulib/import/unsetenv.c: Update.
4749         * gnulib/import/verify.h: Update.
4750         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4751         * gnulib/import/wchar.in.h: Update.
4752         * gnulib/import/wctype.in.h: Update.
4753         * gnulib/import/xalloc-oversized.h: Update.
4754         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4755         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4756
4757 2018-08-16  Gary Benson <gbenson@redhat.com>
4758
4759         PR gdb/13000:
4760         * gdb/main.c (captured_main_1): Exit with nonzero status
4761         in batch mode if the last command to be executed failed.
4762         * NEWS: Mention the above.
4763
4764 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4765
4766         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4767         end of warning message.
4768
4769 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4770
4771         PR gdb/22943:
4772         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4773         (aarch64_extract_return_value): Use
4774         aapcs_is_vfp_call_or_return_candidate.
4775         (aarch64_return_in_memory): Likewise.
4776         (aarch64_store_return_value): Likewise.
4777
4778 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4779
4780         * aarch64-tdep.c
4781         (aapcs_is_vfp_call_or_return_candidate): Make static
4782         (pass_in_v_or_stack): Remove function.
4783         (pass_in_v_vfp_candidate): New function.
4784         (aarch64_push_dummy_call): Check for float register candidates.
4785
4786 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4787
4788         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4789         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4790         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4791
4792 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4793
4794         PR build/23399
4795         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4796         (struct ipa_sym_addresses): Rename to...
4797         (struct ipa_sym_addresses_common): ... this.
4798         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4799
4800 2018-08-28  Tom Tromey  <tom@tromey.com>
4801
4802         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4803         (token_fifo): Now a std::vector.
4804         (yylex, c_parse): Update.
4805         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4806         (token_fifo): Now a std::vector.
4807         (yylex, d_parse): Update.
4808         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4809         (token_fifo): Now a std::vector.
4810         (yylex, go_parse): Update.
4811
4812 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4813
4814         * parser-defs.h (struct type_stack) <elements>: Change type to
4815         std::vector<union type_stack_elt>.
4816         <depth, size>: Remove.
4817         * parse.c (parse_exp_in_context_1): Adjust.
4818         (type_stack_reserve): Remove.
4819         (check_type_stack_depth): Remove.
4820         (insert_into_type_stack): Adjust to std::vector.
4821         (insert_type): Likewise.
4822         (push_type): Likewise.
4823         (push_type_int): Likewise.
4824         (insert_type_address_space): Likewise.
4825         (pop_type): Likewise.
4826         (pop_type_int): Likewise.
4827         (pop_typelist): Likewise.
4828         (pop_type_stack): Likewise.
4829         (append_type_stack): Likewise.
4830         (push_type_stack): Likewise.
4831         (get_type_stack): Likewise.
4832         (type_stack_cleanup): Likewise.
4833         (push_typelist): Likewise.
4834         (follow_types): Likewise.
4835         (_initialize_parse): Likewise.
4836
4837 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4838
4839         * NEWS: Mention csky target.
4840
4841 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4842             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4843             Don Breazeal  <donb@codesourcery.com>
4844
4845         * csky-linux-tdep.c: New file.
4846         * csky-tdep.c: Likewise.
4847         * csky-tdep.h: Likewise.
4848         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4849         csky-tdep.o.
4850         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4851         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4852         * configure.tgt: Add csky support.
4853
4854 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4855
4856         * python/py-framefilter.c (py_print_frame): Print frame architecture
4857         when printing on an MI output.
4858
4859 2018-08-27  Tom Tromey  <tom@tromey.com>
4860
4861         PR build/23087:
4862         * configure: Rebuild.
4863         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4864
4865 2018-08-27  Tom Tromey  <tom@tromey.com>
4866
4867         * aarch64-linux-tdep.c
4868         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4869         casts to int.
4870
4871 2018-08-27  Tom Tromey  <tom@tromey.com>
4872
4873         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4874         unsigned.
4875         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4876         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4877         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4878         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4879         unsigned.
4880
4881 2018-08-27  Tom Tromey  <tom@tromey.com>
4882
4883         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4884         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4885
4886 2018-08-27  Tom Tromey  <tom@tromey.com>
4887
4888         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4889         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4890         ULONGEST_MAX.
4891         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4892         ULONGEST_MAX.
4893         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4894         ULONGEST_MAX.
4895         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4896         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4897         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4898         ULONGEST_MAX.
4899         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4900         (ppc64_linux_sigaction_tramp_frame)
4901         (ppc32_linux_sighandler_tramp_frame)
4902         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4903         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4904         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4905         * mn10300-linux-tdep.c (am33_linux_sigframe)
4906         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4907         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4908         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4909         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4910         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4911         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4912         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4913         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4914         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4915         * microblaze-linux-tdep.c
4916         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4917         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4918         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4919         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4920         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4921         * common/common-types.h (ULONGEST_MAX): New define.
4922         (CORE_ADDR_MAX): Fix formatting.
4923         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4924         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4925         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4926         (arm_linux_rt_sigreturn_tramp_frame)
4927         (arm_eabi_linux_sigreturn_tramp_frame)
4928         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4929         (thumb2_eabi_linux_sigreturn_tramp_frame)
4930         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4931         (arm_linux_restart_syscall_tramp_frame)
4932         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4933         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4934         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4935         ULONGEST_MAX.
4936         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4937
4938 2018-08-27  Tom Tromey  <tom@tromey.com>
4939
4940         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4941         CORE_ADDR_MAX.
4942         * mips-tdep.c (mips_deal_with_atomic_sequence)
4943         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4944         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4945         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4946         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4947         CORE_ADDR_MAX.
4948         * aarch64-tdep.c (aarch64_software_single_step): Use
4949         CORE_ADDR_MAX.
4950
4951 2018-08-27  Tom Tromey  <tom@tromey.com>
4952
4953         * linespec.c (complete_linespec_component): Add cast to "char".
4954         * completer.c (completion_tracker::build_completion_result): Add
4955         cast to "char".
4956
4957 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4958
4959         * solist.h (struct solist, struct target_so_ops): Fix
4960         indentation.
4961
4962 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4963
4964         * ada-tasks.c (ada_task_info_s): Remove typedef.
4965         (DEF_VEC_O(ada_task_info_s)): Remove.
4966         (struct ada_tasks_inferior_data): Initialize fields.
4967         <task_list>: Make an std::vector.
4968         (get_ada_tasks_inferior_data): Allocate with new.
4969         (ada_get_task_number): Adjust.
4970         (get_task_number_from_id): Likewise.
4971         (valid_task_id): Likewise.
4972         (ada_get_task_info_from_ptid): Likewise.
4973         (iterate_over_live_ada_tasks): Likewise.
4974         (add_ada_task): Likewise.
4975         (read_known_tasks): Likewise.
4976         (ada_build_task_list): Likewise.
4977         (print_ada_task_info): Likewise.
4978         (info_task): Likewise.
4979         (task_command_1): Likewise.
4980
4981 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4982
4983         * ada-lang.c (add_angle_brackets): Return std::string.
4984
4985 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4986
4987         * python/py-threadevent.c (py_get_event_thread): Initialize
4988         pythread.
4989
4990 2018-08-24  Pedro Alves  <palves@redhat.com>
4991
4992         * python/py-bpevent.c (create_breakpoint_event_object): Use
4993         copy-initialization.
4994         * python/py-continueevent.c (emit_continue_event): Use
4995         copy-initialization.
4996         * python/py-exitedevent.c (create_exited_event_object): Return a
4997         gdbpy_ref<>.
4998         (emit_exited_event): Use copy-initialization.
4999         * python/py-inferior.c (python_new_inferior)
5000         (python_inferior_deleted, add_thread_object): Use
5001         copy-initialization.
5002         * python/py-infevents.c (create_inferior_call_event_object)
5003         (create_register_changed_event_object)
5004         (create_memory_changed_event_object): Return a gdbpy_ref<>.
5005         (emit_inferior_call_event, emit_memory_changed_event)
5006         (emit_register_changed_event): Use copy-initialization.
5007         * python/py-newobjfileevent.c (create_new_objfile_event_object):
5008         Return a gdbpy_ref<>.
5009         (emit_new_objfile_event): Use copy-initialization.
5010         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
5011         (emit_clear_objfiles_event): Use copy-initialization.
5012         * python/py-signalevent.c (create_signal_event_object): Use
5013         copy-initialization.
5014         * python/py-threadevent.c (create_thread_event_object): Use
5015         copy-initialization.
5016
5017 2018-08-24  Pedro Alves  <palves@redhat.com>
5018             Simon Marchi  <simon.marchi@ericsson.com>
5019
5020         PR gdb/23379
5021         * python/py-continueevent.c: Include "gdbthread.h".
5022         (create_continue_event_object): Add intro comment.  Add 'ptid'
5023         parameter.  Use it to find thread to pass to
5024         create_thread_event_object.
5025         (emit_continue_event): Pass PTID down to
5026         create_continue_event_object.
5027         * python/py-event.h (py_get_event_thread): Declare.
5028         (create_thread_event_object): Remove default from 'thread'
5029         parameter.
5030         * python/py-stopevent.c (create_stop_event_object): Use
5031         py_get_event_thread.
5032         * python/py-threadevent.c (get_event_thread): Rename to ...
5033         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5034         and use it to find the thread.
5035         (create_thread_event_object): Assert that THREAD isn't null.
5036         Don't find the event thread here.
5037
5038 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
5039
5040         * block.h (blockrange, blockranges): New struct declarations.
5041         (struct block): Add new field named `ranges'.
5042         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5043         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5044         macros for accessing ranges in struct block.
5045         (make_blockranges): New declaration.
5046         block.c (make_blockranges): New function.
5047         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5048         for block.
5049         * symtab.h (find_pc_partial_function): Add new parameter `block'.
5050         * blockframe.c (cache_pc_function_block): New static global.
5051         (clear_pc_function_cache): Clear cache_pc_function_block.
5052         (find_pc_partial_function): Move comment to symtab.h.  Add
5053         support for non-contiguous blocks.
5054         * cli/cli-cmds.c (block.h): Include.
5055         (print_disassembly): Handle printing of non-contiguous blocks.
5056         (disassemble_current_function): Likewise.
5057         (disassemble_command): Likewise.
5058
5059         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5060         BLOCK_START.
5061         * blockframe.c (get_pc_function_start): Likewise.
5062         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5063         (gcc_symbol_address): Likewise.
5064         * compile/compile-object-run.c (compile_object_run): Likewise.
5065         * compile/compile.c (get_expr_block_and_pc): Likewise.
5066         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5067         (func_addr_to_tail_call_list): Likewise.
5068         * findvar.c (default_read_var_value): Likewise.
5069         * inline-frame.c (inline_frame_this_id): Likewise.
5070         (skip-inline_frames): Likewise.
5071         * infcmd.c (until_next_command): Likewise.
5072         * linespec.c (convert_linespec_to_sals): Likewise.
5073         * parse.c (parse_exp_in_context_1): Likewise.
5074         * printcmd.c (build_address_symbolic): likewise.
5075         (info_address_command): Likewise.
5076         symtab.c (find_function_start_sal): Likewise.
5077         (skip_prologue_sal): Likewise.
5078         (find_function_alias_target): Likewise.
5079         (find_gnu_ifunc): Likewise.
5080         * stack.c (find_frame_funname): Likewise.
5081         * symtab.c (fixup_symbol_section): Likewise.
5082         (find_function_start_sal): Likewise.
5083         (skip_prologue_sal): Likewsie.
5084         (find_function_alias_target): Likewise.
5085         (find_gnu_ifunc): Likewise.
5086         * tracepoint.c (info_scope_command): Likewise.
5087         * value.c (value_fn_field): Likewise.
5088
5089         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5090         in place of find_pc_partial_function.
5091         * blockframe.c (find_function_entry_range_from_pc): New function.
5092         * symtab.h (find_function_entry_range_from_pc): Declare and document.
5093         * objfiles.c (objfile_relocate1): Relocate start and end addresses
5094         for each range in a block.
5095
5096
5097 2018-08-23  Xavier Roirand  <roirand@adacore.com>
5098
5099         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5100         incrementation.
5101
5102 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5103
5104         * solib-svr4.c (read_program_headers_from_bfd): Return
5105         gdb::optional<gdb::byte_vector>.
5106         (svr4_exec_displacement): Adjust.
5107
5108 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5109
5110         * solib-svr4.c (read_program_header): Return
5111         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5112         (find_program_interpreter): Return
5113         gdb::optional<gdb::byte_vector>.
5114         (scan_dyntag_auxv): Adjust.
5115         (enable_break): Adjust.
5116         (svr4_exec_displacement): Adjust.
5117
5118 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5119
5120         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5121         * inf-child.c (inf_child_target::terminal_save_inferior): New.
5122
5123 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5124
5125         * guile/scm-string.c (gdbscm_scm_from_printf): Use
5126         string_vprintf.
5127         * guile/scm-utils.c (gdbscm_printf): Likewise.
5128         * serial.c (serial_printf): Likewise.
5129         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5130
5131 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
5132
5133         * stack.c (print_frame): Print frame architecture when printing on
5134         an MI output.
5135         * NEWS: Mention new "arch" attribute in frame output.
5136
5137 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5138
5139         * arch/aarch64.h (aarch64_regnum): Update comment.
5140
5141 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5142
5143         * NEWS: Add SVE to 8.2 section.
5144
5145 2018-08-21  Pedro Alves  <palves@redhat.com>
5146
5147         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5148         out from gdbscm_parse_function_args.
5149         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5150         gdbscm_parse_function_args_1.
5151
5152 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
5153
5154         PR gdb/17816
5155         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5156         operator.
5157
5158 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
5159
5160         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5161
5162 2018-08-19  Michael Spang  <spang@google.com>
5163
5164         PR gdb/11786
5165         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5166         for PT_TLS segments.
5167
5168 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
5169
5170         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5171         dwarf_variable_value.
5172         * dwarf2-frame.c (class dwarf_expr_executor):
5173         Add override for dwarf_variable_value.
5174         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5175         (class symbol_needs_eval_context): Likewise.
5176         (indirect_synthetic_pointer): Add forward declaration.
5177         (sect_variable_value): New function.
5178         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5179         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5180         for DW_OP_GNU_variable_value.
5181
5182 2018-08-16  Tom Tromey  <tom@tromey.com>
5183
5184         * top.c (read_command_file): Update.
5185         (command_line_input): Remove "repeat" argument.
5186         * ada-lang.c (get_selections): Update.
5187         * linespec.c (decode_line_2): Update.
5188         * defs.h (command_line_input): Remove argument.
5189         * cli/cli-script.c (read_next_line): Update.
5190         * python/py-gdb-readline.c: Update.
5191
5192 2018-08-17  Tom Tromey  <tom@tromey.com>
5193
5194         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5195         command_line_input.
5196
5197 2018-08-15  Tom Tromey  <tom@tromey.com>
5198
5199         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5200
5201 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
5202
5203         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5204         If used, use find_pc_partial_function to find address range
5205         to disassemble.
5206         * mi/mi-main.c (mi_cmd_list_features): Report
5207         "data-disassemble-a-option" feature.
5208         * NEWS: Mention new -data-disassemble option -a.
5209
5210 2018-08-13  Tom Tromey  <tom@tromey.com>
5211
5212         * common/common-defs.h (_FORTIFY_SOURCE): Define.
5213
5214 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5215
5216         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5217         (aarch64_linux_collect_sve_regset): Likewise.
5218         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5219         * regcache.h (regcache_map_entry_size): New function.
5220
5221 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5222
5223         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5224         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5225         (SVE_HEADER_VL_LENGTH): Likewise.
5226         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5227         (SVE_HEADER_FLAGS_LENGTH): Likewise.
5228         (SVE_HEADER_RESERVED_LENGTH): Likewise.
5229         (SVE_HEADER_SIZE_OFFSET): Likewise.
5230         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5231         (SVE_HEADER_VL_OFFSET): Likewise.
5232         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5233         (SVE_HEADER_FLAGS_OFFSET): Likewise.
5234         (SVE_HEADER_RESERVED_OFFSET): Likewise.
5235         (SVE_HEADER_SIZE): Likewise.
5236         (aarch64_linux_core_read_vq): Add function.
5237         (aarch64_linux_core_read_description): Check for SVE section.
5238
5239 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5240
5241         * aarch64-fbsd-tdep.c
5242         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5243         collect_size.
5244         * aarch64-linux-tdep.c
5245         (aarch64_linux_iterate_over_regset_sections): Likewise.
5246         * alpha-linux-tdep.c
5247         (alpha_linux_iterate_over_regset_sections):
5248         * alpha-nbsd-tdep.c
5249         (alphanbsd_iterate_over_regset_sections): Likewise.
5250         * amd64-fbsd-tdep.c
5251         (amd64fbsd_iterate_over_regset_sections): Likewise.
5252         * amd64-linux-tdep.c
5253         (amd64_linux_iterate_over_regset_sections): Likewise.
5254         * arm-bsd-tdep.c
5255         (armbsd_iterate_over_regset_sections): Likewise.
5256         * arm-fbsd-tdep.c
5257         (arm_fbsd_iterate_over_regset_sections): Likewise.
5258         * arm-linux-tdep.c
5259         (arm_linux_iterate_over_regset_sections): Likewise.
5260         * corelow.c (get_core_registers_cb): Likewise.
5261         (core_target::fetch_registers): Likewise.
5262         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5263         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5264         * gdbarch.h (void): Regenerate.
5265         * gdbarch.sh: Add supply_size and collect_size.
5266         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5267         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5268         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5269         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5270         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5271         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5272         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5273         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5274         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5275         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5276         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5277         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5278         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5279         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5280         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5281         Likewise.
5282         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5283         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5284         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5285         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5286         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5287         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5288         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5289         Likewise.
5290         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5291         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5292         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5293         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5294         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5295         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5296         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5297         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5298
5299 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
5300
5301         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5302         with string_printf.
5303
5304 2018-08-10  Keith Seitz  <keiths@redhat.com>
5305
5306         * compile/compile-c-support.c (add_code_header, add_code_footer):
5307         Move into policy class.
5308         (c_push_user_expression, pop_user_expression_nop)
5309         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5310         (compile_program): New host class.
5311         (c_compile_program): New typedef.
5312         (c_compute_porgram): Use c_compile_program.
5313
5314 2018-08-10  Keith Seitz  <keiths@redhat.com>
5315
5316         * compile/compile-internal.h (compile_instance::~compile_instance):
5317         Remove calls to htab_delete.
5318         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5319         * compile.c (compile_instance::compile_instance): Initialize
5320         htab unique pointers.
5321         (compile_instance::get_cached_type, compile_instance::insert_type)
5322         (compile_instance::error_symbol_once): Update for unique_ptr.
5323
5324 2018-08-10  Keith Seitz  <keiths@redhat.com>
5325
5326         * compile/compile-c-symbols.c (struct symbol_error)
5327         (hash_symbol_error, eq_symbol_error, del_symbol_error)
5328         (compile_instance::insert_symbol_error)
5329         (compile_instance::error_symbol_once): Move to ...
5330         * compile/compile.c: ... here.
5331
5332 2018-08-10  Keith Seitz  <keiths@redhat.com>
5333
5334         * compile/compile-c-support.c (c_get_compile_context): Use `new'
5335         instead of `new_compile_instance'.
5336         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5337         Update description.
5338         If the symbol error map is not initialized, create it.
5339         (generate_c_for_for_one_symbol): Do not check/initialize
5340         the symbol error map.
5341         * compile/compile-c-types.c (compile_c_instance): Make a class.
5342         Update all callers.
5343         (compile_instance::compile_instance): Initialize the type cache.
5344         (get_cached_type): New function.
5345         (insert_type): Update description.
5346         (compile_c_instance::m_default_cflags): Define.
5347         (convert_type): Update description.  Use get_cached_type.
5348         (delete_instance): Moved to destructor.
5349         (new_compile_instance): Moved to constructor.
5350         * compile/compile-c.h (compile_c_instance): Make class inheriting
5351         from compile_instance.
5352         <base>: Remove field.
5353         <type_map, symbol_err_map>: Move to base class.
5354         <c_plugin>: Rename to `m_plugin' and remove pointer type.
5355         * compile/compile-internal.h (compile_instance): Make class.
5356         <type_map_t, symbol_err_map_t>: Define.
5357         <fe>: Rename to `m_gcc_fe'.
5358         <scope, block, gcc_target_options>: Add `m_' prefix.
5359         <m_type_map, m_symbol_err_map>: New fields, moved from
5360         compile_c_instance.
5361         <destroy>: Remove.
5362         (convert_type, new_compile_instance): Remove.
5363         * compile/compile.c (cleanup_compile_instance): Remove.
5364         (compile_to_object): Use unique_ptr to eliminate cleanups.
5365         (compile_instance::set_print_callback, compile_instance::version)
5366         (compile_instance::set_verbose)
5367         (compile_instance::set_driver_filename)
5368         (compile_instance::set_triplet_regexp)
5369         (compile_instance::set_arguments)
5370         (compile_instance::set_source_file)
5371         (compile_instance::compile): Define.
5372
5373 2018-08-10  Keith Seitz  <keiths@redhat.com>
5374
5375         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5376         * compile/compile-c-types.c: Define GCC_METHODN macros and include
5377         gcc-c-fe.def to define C plugin.
5378         (delete_instance): Delete `c_plugin'.
5379         (new_compile_instance): Initialize `c_plugin'.
5380         * compile/compile-c.h: Include gcc_c_plugin.h.
5381         (struct compile_c_instance) <c_plugin>: New member.
5382         * gcc-c-plugin.h: New file.
5383         Update all callers with API change.
5384
5385 2018-08-10  Keith Seitz  <keiths@redhat.com>
5386
5387         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5388         (HFILES_NO_SRCDIR): ... to here.
5389         Add compile-internal.h and compile-c.h.
5390         * compile/compile-c-support.c: Include compile-c.h.
5391         * compile/compile-c-symbols.c: Include compile-c.h.
5392         (generate_c_for_variable_locations): Update comment.
5393         * compile/compile-c-types.c: Include compile-c.h.
5394         * compile/compile-c.h: New file -- moved C language declarations
5395         from other files here.
5396         * compile/compile-internal.h: Do not include hashtab.h or
5397         common/enum-flags.h.
5398         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5399         (gcc_convert_symbol, gcc_symbol_address)
5400         (generate_c_for_variable_locations, c_get_mode_for_size)
5401         (c_get_range_decl_name): Definitions moved to compile-c.h.
5402         * compile/compile-loc2c.c: Include compile-c.h.
5403
5404 2018-08-10  Keith Seitz  <keiths@redhat.com>
5405
5406         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5407         (c_symbol_substitution_name): ... this.
5408         Update all callers.
5409
5410 2018-08-10  Keith Seitz  <keiths@redhat.com>
5411
5412         * compile/compile-c-support.c (c_compute_program): Use
5413         unique_xmalloc_ptr to eliminate cleanup.
5414         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5415         Return a unique_xmalloc_ptr and eliminate cleanup.
5416         * compile/compile-internal.h (generate_c_for_variable_locations):
5417         Return unique_xmalloc_ptr and update description.
5418
5419 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5420
5421         * corelow.c (core_target::get_core_register_section): Rename
5422         min_size to section_min_size.
5423
5424 2018-08-09  Jim Wilson  <jimw@sifive.com>
5425
5426         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5427         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5428         * NEWS: Mention new GNU/Linux RISC-V target.
5429         * configure.host: Add riscv*-*-linux*.
5430         * configure.nat: Add riscv*.
5431         * configure.tgt: Add riscv*-*-linux*.
5432         * riscv-linux-nat.c: New file.
5433         * riscv-linux-tdep.c: New file.
5434
5435 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5436
5437         * infrun.c (resume): Make static, add forward declaration.
5438         (proceed): Update header comment.
5439         * infrun.h (resume): Delete declaration.
5440
5441 2018-08-09  Tom Tromey  <tom@tromey.com>
5442
5443         * riscv-tdep.h: Minor formatting fixes.
5444
5445 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5446
5447         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5448         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5449         (test_mkdir_recursive): Likewise.
5450         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5451
5452 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5453
5454         * valarith.c (value_subscripted_rvalue): If an array is not in
5455         memory, and we don't know the upper bound, then we can't know that
5456         the requested element exists or not.
5457
5458 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5459
5460         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5461         (target_options_to_string): Add comment.
5462
5463 2018-08-08  Tom Tromey  <tom@tromey.com>
5464
5465         * unittests/scoped_mmap-selftests.c: Check result of "write".
5466
5467 2018-08-08  Jim Wilson  <jimw@sifive.com>
5468
5469         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5470         (decode_register_index_short): New.
5471         (decode_j_type_insn, decode_cj_type_insn): New.
5472         (decode_b_type_insn, decode_cb_type_insn): New.
5473         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5474         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5475         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5476         is_c_sw_insn instead of is_sw_insn.
5477         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5478         (riscv_software_single_step): New.
5479         * riscv-tdep.h (riscv_software_single_step): Declare.
5480
5481         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5482         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5483
5484 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5485
5486         PR gdb/18050:
5487         * target.c (dispose_inferior): Don't dispose of inferiors that are
5488         already killed.
5489
5490 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5491
5492         * remote.c (remote_target::download_tracepoint): Change char* to
5493         const char*.
5494
5495 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5496
5497         * target.h (target_options_to_string): Return an std::string.
5498         * target.c (str_comma_list_concat_elem): Return void, use
5499         std::string.
5500         (do_option): Likewise.
5501         (target_options_to_string): Return an std::string.
5502         * linux-nat.c (linux_nat_target::wait): Adjust.
5503         * target-debug.h (target_debug_print_options): Adjust.
5504
5505 2018-08-07  Tom Tromey  <tom@tromey.com>
5506
5507         * Makefile.in (CPPFLAGS): New variable.
5508         (INTERNAL_CPPFLAGS): Use it.
5509
5510 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5511
5512         * NEWS: Mention the index cache.
5513
5514 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5515
5516         * common/pathstuff.h (get_standard_cache_dir): New.
5517         * common/pathstuff.c (get_standard_cache_dir): New.
5518         * build-id.h (build_id_to_string): New.
5519         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5520         DEBUG_STR_SUFFIX): Move to here.
5521         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5522         DEBUG_STR_SUFFIX): Move from there.
5523         (write_psymtabs_to_index): Make non-static, add basename
5524         parameter.  Write to temporary files, rename when done.
5525         (save_gdb_index_command): Adjust call to
5526         write_psymtabs_to_index.
5527         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5528         field.
5529         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5530         (get_gdb_index_contents_from_cache): New.
5531         (get_gdb_index_contents_from_cache_dwz): New.
5532         (dwarf2_initialize_objfile): Read index from cache.
5533         (dwarf2_build_psymtabs): Save to index.
5534         * dwarf-index-cache.h: New file.
5535         * dwarf-index-cache.c: New file.
5536         * dwarf-index-write.h: New file.
5537
5538 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5539
5540         * gnulib/aclocal.m4: Re-generate.
5541         * gnulib/config.in: Re-generate.
5542         * gnulib/configure: Re-generate.
5543         * gnulib/import/Makefile.am: Re-generate.
5544         * gnulib/import/Makefile.in: Re-generate.
5545         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5546         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5547         * gnulib/import/m4/mkdir.m4: New file.
5548         * gnulib/import/mkdir.c: New file.
5549         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5550         module.
5551
5552 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5553
5554         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5555         * common/scoped_mmap.c: New file.
5556         * common/scoped_mmap.h (destroy): New method.
5557         (~scoped_mmap, reset): Use destroy.
5558         (scoped_mmap): New move constructor.
5559         (mmap_file): New declaration.
5560         * unittests/scoped_mmap-selftests.c (test_normal,
5561         test_invalid_filename, run_tests): New functions.
5562         (_initialize_scoped_mmap_selftests): Register selftest.
5563
5564 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5565
5566         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5567         (read_gdb_index_from_buffer): ... this.  Remove section
5568         parameter, add buffer parameter.
5569         (get_gdb_index_contents_ftype,
5570         get_gdb_index_contents_dwz_ftype): New typedefs.
5571         (dwarf2_read_gdb_index): Add callback parameters to get the
5572         index contents.
5573         (get_gdb_index_contents_from_section): New.
5574         (dwarf2_initialize_objfile): Update call to
5575         dwarf2_read_gdb_index.
5576
5577 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5578
5579         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5580         (gdb_open_cloexec): Likewise.
5581         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5582         (commandline_from_pid): Likewise.
5583         (linux_xfer_osdata_threads): Likewise.
5584         (linux_xfer_osdata_fds): Likewise.
5585         * ada-lang.c (is_package_name): Likewise.
5586         * auxv.c (procfs_xfer_auxv): Likewise.
5587         * breakpoint.c (print_one_breakpoint_location): Use
5588         uiout::field_fmt.
5589         (print_one_catch_solib): Use string_printf.
5590         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5591         (add_pe_forwarded_sym): Likewise.
5592         * dwarf2read.c (create_type_unit_group): Likewise.
5593         (build_error_marker_type): Likewise.
5594         * infcall.c (get_function_name): Likewise.
5595         * valprint.c (print_converted_chars_to_obstack): Likewise.
5596         * xtensa-tdep.c (xtensa_register_type): Likewise.
5597
5598 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5599
5600         * remote.c (remote_target::download_tracepoint): Fix format
5601         string errors.
5602
5603 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5604
5605         * tracefile.c: Include common/byte-vector.h.
5606         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5607         with trace_regblock_size if needed.  Update uses of buf.
5608
5609 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5610
5611         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5612         std::vector<unsigned char>.
5613         * tracepoint.c (collection_list::collection_list): Remove
5614         m_regs_mask initializer from initializer list.  Resize
5615         m_regs_mask using the largest remote register number.
5616         (collection_list::add_remote_register): Remove size check on
5617         m_regs_mask.  Use at to access element.
5618         (collection_list::stringify): Change type of temp_buf to
5619         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5620         stringify the register mask.  Use pack_hex_byte for the register
5621         mask.
5622
5623 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5624
5625         * tracepoint.h (class collection_list) <add_register>: Remove.
5626         <add_remote_register, add_ax_registers, add_local_register>:
5627         Declare.
5628         <add_memrange>: Add scope parameter.
5629         * tracepoint.c (encode_actions_1): Likewise.
5630         (collection_list::add_register): Rename to ...
5631         (collection_list::add_remote_register): ... this.  Update
5632         comment.
5633         (collection_list::add_ax_registers, add_local_register): New
5634         methods.
5635         (collection_list::add_memrange): Add scope parameter.  Call
5636         add_local_register instead of add_register.
5637         (finalize_tracepoint_aexpr): New function.
5638         (collection_list::collect_symbol): Update calls to add_memrange.
5639         Call add_local_register instead of add_register.  Call
5640         add_ax_registers.  Call finalize_tracepoint_aexpr.
5641         (encode_actions_1): Get remote regnos for $reg action.  Call
5642         add_remote_register, add_ax_registers, and add_local_register.
5643         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5644         (validate_actionline): Call finalize_tracepoint_aexpr.
5645
5646 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5647
5648         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5649         Replace array buf with gdb::char_vector buf, of size
5650         get_remote_packet_size ().  Replace references to buf and
5651         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5652         and xsnprintf with snprintf.  Raise errors if the buffer is too
5653         small.
5654
5655 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5656
5657         * remote.c (remote_target::download_tracepoint): Fix the has_more
5658         predicate in the QTDP action list iteration.
5659
5660 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5661
5662         * remote.c (remote_target::download_tracepoint): Fix indentation
5663         in for block.
5664
5665 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5666
5667         * proc-api.c (_initialize_proc_api): Remove c, unused.
5668         * procfs.c (procfs_init_inferior): Remove signals, unused.
5669         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5670         unused.
5671
5672 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5673             Andrew Burgess  <andrew.burgess@embecosm.com>
5674
5675         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5676         'W_STOPCODE (0)' as this could be ambiguous.
5677
5678 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5679
5680         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5681         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5682         "ai_socktype").
5683
5684 2018-08-02  Tom Tromey  <tom@tromey.com>
5685
5686         PR symtab/16842.
5687         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5688         symbols.
5689         (process_structure_scope): Likewise.
5690
5691 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5692
5693         PR gdb/22629:
5694         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5695         kill inferior.
5696
5697 2018-08-02  Tom Tromey  <tom@tromey.com>
5698
5699         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5700         (darwin_suspend_inferior, darwin_resume_inferior)
5701         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5702         (darwin_check_new_threads): Check result of get_darwin_inferior.
5703
5704 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5705
5706         GDB 8.1.1 released.
5707
5708 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5709
5710         * varobj.c (varobj_get_path_expr_parent): Report an error if
5711         parent is a dynamic varobj.
5712
5713 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5714
5715         * gnulib/aclocal.m4: Re-generate.
5716         * gnulib/config.in: Re-generate.
5717         * gnulib/configure: Re-generate.
5718         * gnulib/import/Makefile.in: Re-generate.
5719         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5720         * gnulib/import/m4/onceonly.m4: Re-generate.
5721
5722 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5723
5724         * target-descriptions.c (struct xml_test_tdesc): New.
5725         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5726         (record_xml_tdesc): Update.
5727         (maintenance_check_xml_descriptions): Update.
5728         * target-descriptions.h (record_xml_tdesc): Update comment.
5729
5730 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5731
5732         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5733         checking array bounds are defined.
5734
5735 2018-07-30  Tom Tromey  <tom@tromey.com>
5736
5737         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5738         irreflexivity violation.
5739
5740 2018-07-30  Tom Tromey  <tom@tromey.com>
5741
5742         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5743         * value.c (unpack_long): Remove lint code.
5744         * valops.c (value_ind): Remove lint code.
5745         * valarith.c (value_x_binop, value_x_unop, value_equal)
5746         (value_pos): Remove lint code.
5747
5748 2018-07-28  Tom de Vries  <tdevries@suse.de>
5749
5750         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5751         with undefined upper bound as <optimized out>.
5752
5753 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5754
5755         * gcore.in: Rename variable "name" to "prefix".  Expand
5756         "usage" text.
5757
5758 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5759
5760         * windows-nat.c (windows_nat_target::create_inferior): Update to
5761         call close() in global namespace.
5762
5763 2018-07-26  Tom Tromey  <tom@tromey.com>
5764
5765         * dwarf-index-write.c (add_address_entry): Don't add objfile
5766         offsets.
5767         * dbxread.c (find_stab_function): Rename from
5768         find_stab_function_addr.  Return a bound_minimal_symbol.
5769         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5770         Don't add objfile offsets.
5771         (end_psymtab): Use raw_text_low, raw_text_high,
5772         MSYMBOL_VALUE_RAW_ADDRESS.
5773         (read_ofile_symtab): Update.
5774         (process_one_symbol): Update.
5775         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5776         offsets.
5777         (dw2_relocate): Remove.
5778         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5779         searching addrmap.
5780         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5781         Update.
5782         (process_psymtab_comp_unit_reader, add_partial_symbol)
5783         (add_partial_subprogram, dwarf2_ranges_read): Update.
5784         (load_partial_dies): Update.
5785         (add_address_entry): Don't add objfile offsets.
5786         (dwarf2_build_include_psymtabs): Update.
5787         (create_addrmap_from_aranges): Don't add objfile offsets.
5788         (dw2_find_pc_sect_compunit_symtab): Update.
5789         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5790         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5791         Update.
5792         (parse_partial_symbols): Don't add objfile offsets.  Use
5793         raw_text_low, raw_text_high.  Update.
5794         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5795         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5796         or call 'relocate' quick function.  Clear psymbol_map.
5797         * psympriv.h (struct partial_symbol) <address>: Add section
5798         offset.
5799         <set_unrelocated_address>: Rename from set_address.
5800         <raw_text_low, raw_text_high>: New methods.
5801         <text_low, text_high>: Add objfile parameter.
5802         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5803         set_unrelocated_address.
5804         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5805         (find_pc_psymbol): Update.
5806         (fixup_psymbol_section, relocate_psymtabs): Remove.
5807         (dump_psymtab, psym_functions): Update.
5808         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5809         parameter.
5810         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5811         (start_psymtab_common): Update.
5812         * symfile-debug.c (debug_qf_relocate): Remove.
5813         (debug_sym_quick_functions): Update.
5814         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5815         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5816         Update.
5817
5818 2018-07-26  Tom Tromey  <tromey@redhat.com>
5819
5820         * dbxread.c (end_psymtab): Use text_high_valid and
5821         text_low_valid.
5822         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5823         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5824         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5825         Update comment.
5826         <text_low_valid, text_high_valid>: New fields.
5827         <set_text_low, set_text_high>: Update.
5828         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5829
5830 2018-07-26  Tom Tromey  <tom@tromey.com>
5831
5832         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5833         Update.
5834         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5835         textlow and texthigh fields.
5836         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5837         Update.
5838         * mdebugread.c (parse_lines, parse_partial_symbols)
5839         (psymtab_to_symtab_1): Update.
5840         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5841         Rename fields.  Update comment.  Now private.
5842         <text_low, text_high, set_text_low, set_text_high>: New methods.
5843         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5844         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5845         (start_psymtab_common, maintenance_info_psymtabs)
5846         (maintenance_check_psymtabs): Update.
5847         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5848         texthigh fields.
5849         (scan_xcoff_symtab): Update.
5850
5851 2018-07-26  Tom Tromey  <tromey@redhat.com>
5852
5853         * psympriv.h (struct partial_symbol) <unrelocated_address,
5854         address, set_address>: New methods.
5855         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5856         (fixup_psymbol_section, relocate_psymtabs): Update.
5857         (print_partial_symbols): Add 'objfile' parameter.  Update.
5858         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5859         Update.
5860
5861 2018-07-26  Tom Tromey  <tom@tromey.com>
5862
5863         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5864         (debug_names::write_psymbols): Update.
5865         * psympriv.h (struct partial_symbol): Derive from
5866         general_symbol_info.
5867         <obj_section>: New method.
5868         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5869         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5870         (find_pc_sect_psymbol, fixup_psymbol_section)
5871         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5872         (print_partial_symbols, recursively_search_psymtabs)
5873         (compare_psymbols, psymbol_hash, psymbol_compare)
5874         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5875         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5876
5877 2018-07-26  Tom Tromey  <tromey@redhat.com>
5878
5879         * dbxread.c (end_psymtab): Remove dead code.
5880
5881 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5882
5883         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5884         DWARF unwinders are disabled.
5885         * dwarf2-frame.c: Add dwarf2read.h include.
5886         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5887         disabled.
5888         (dwarf2_frame_unwinders_enabled_p): Define.
5889         (show_dwarf_unwinders_enabled_p): New function.
5890         (_initialize_dwarf2_frame): Register switch to control DWARF
5891         unwinder use.
5892         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5893         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5894         (show_dwarf_cmdlist): Remove static keyword.
5895         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5896         (show_dwarf_cmdlist): Declare.
5897         * NEWS: Document new feature.
5898
5899 2018-07-26  Tom de Vries  <tdevries@suse.de>
5900
5901         PR breakpoints/23366
5902         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5903
5904 2018-07-26  Tom de Vries  <tdevries@suse.de>
5905
5906         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5907         DW_AT_count can't be translated to a dynamic prop.
5908
5909 2018-07-25  Tom de Vries  <tdevries@suse.de>
5910
5911         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5912         try/catch.
5913
5914 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5915
5916         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5917
5918 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5919
5920         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5921
5922 2018-07-24  Keith Seitz  <keiths@redhat.comt
5923
5924         PR symtab/23010
5925         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5926         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5927         instead of add_symbol_to_list.
5928         (read_file_scope): Call prepare_one_comp_unit before reading
5929         any other DIEs.
5930
5931 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5932
5933         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5934
5935 2018-07-24  Tom Tromey  <tom@tromey.com>
5936
5937         * utils.c (malloc, realloc, free): Don't declare.
5938         * configure, config.in: Rebuild.
5939         * configure.ac: Don't check for declarations of free, malloc, or
5940         realloc.
5941
5942 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5943
5944         * aarch64-linux-nat.c
5945         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5946         variable.
5947         * arm-linux-nat.c (fetch_regs): Likewise.
5948         (store_regs): Likewise.
5949         (fetch_vfp_regs): Likewise.
5950         (store_vfp_regs): Likewise.
5951         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5952         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5953         (arm_linux_nat_target::insert_watchpoint): Likewise.
5954         (arm_linux_nat_target::remove_watchpoint): Likewise.
5955         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5956         Likewise.
5957         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5958         Likewise.
5959         * ppc-linux-nat.c (fetch_register): Likewise.
5960         (fetch_all_gp_regs): Likewise.
5961         (fetch_ppc_registers): Likewise.
5962         (store_all_gp_regs): Likewise.
5963         (store_ppc_registers): Likewise.
5964         (hwdebug_insert_point): Likewise.
5965         (can_use_watchpoint_cond_accel): Likewise.
5966         * remote-sim.c (gdb_os_write_stdout): Likewise.
5967
5968 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5969             Tom Tromey  <tom@tromey.com>
5970
5971         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5972         test for it.
5973         * configure: Rebuild.
5974
5975 2018-07-22  Tom Tromey  <tom@tromey.com>
5976
5977         * regformats/regdat.sh: Define xmltarget_${name} inside
5978         #ifndef IN_PROCESS_AGENT.
5979
5980 2018-07-22  Tom Tromey  <tom@tromey.com>
5981
5982         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5983
5984 2018-07-22  Tom Tromey  <tom@tromey.com>
5985
5986         * symfile.c (reread_symbols): Notify iter, not objfile.
5987
5988 2018-07-22  Tom Tromey  <tom@tromey.com>
5989
5990         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5991         Use arch_ops.
5992         (ravenscar_thread_target::prepare_to_store): Likewise.
5993
5994 2018-07-22  Tom Tromey  <tom@tromey.com>
5995
5996         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5997         unused variable.  Call value_fetch_lazy when needed.
5998         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5999         Remove unused variable.  Call value_fetch_lazy when needed.
6000
6001 2018-07-22  Tom Tromey  <tom@tromey.com>
6002
6003         * m32c-tdep.c (mark_dma): Return void.
6004         (make_regs): Remove unused declarations.
6005
6006 2018-07-22  Tom Tromey  <tom@tromey.com>
6007
6008         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
6009         cmdscm_get_valid_command_smob_arg_unsafe for effect.
6010         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
6011         bkscm_get_valid_block_smob_arg_unsafe for effect.
6012
6013 2018-07-22  Tom Tromey  <tom@tromey.com>
6014
6015         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
6016         value_type.
6017
6018 2018-07-22  Tom Tromey  <tom@tromey.com>
6019
6020         * windows-nat.c (saved_context): Conditionally define.
6021         * remote.c (remote_target::remote_btrace_maybe_reopen):
6022         Conditionally declare "warned".
6023         * inflow.c (sigquit_ours): Conditionally define.
6024         (new_tty): Move "tty" declaration inside #if.
6025         * guile/guile.c (guile_datadir): Conditionally define.
6026         * charset.c (set_be_le_names): Move some declarations inside #if.
6027         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6028         #if.
6029         (parse_xml_btrace_conf): Likewise.
6030
6031 2018-07-22  Tom Tromey  <tom@tromey.com>
6032
6033         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6034
6035 2018-07-22  Tom Tromey  <tom@tromey.com>
6036
6037         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6038         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6039         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6040         * buildsym-legacy.c (get_macro_table): Remove unused variable.
6041         * stack.c (frame_apply_level_command): Remove unused variable.
6042         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6043         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6044         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6045         unused variable.
6046         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6047         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6048         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6049         variable.
6050         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6051         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6052         variable.
6053         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6054         Remove unused variable.
6055         * cli/cli-script.c (recurse_read_control_structure): Remove unused
6056         variable.
6057         * common/tdesc.c (print_xml_feature::visit): Remove unused
6058         variable.
6059         * compile/compile-object-load.c (store_regs): Remove unused
6060         variables.
6061         * complaints.c (clear_complaints): Remove unused variable.
6062         * corelow.c (core_target_open): Remove unused variable.
6063         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6064         variable.
6065         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6066         variable.
6067         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6068         variable.
6069         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6070         variable.
6071         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6072         variable.
6073         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6074         variable.
6075         * ia64-tdep.c (examine_prologue): Remove unused variable.
6076         * infcall.c (run_inferior_call): Remove unused variable.
6077         * inferior.c (exit_inferior): Remove unused variable.
6078         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6079         * linespec.c (decode_line_2): Remove unused variable.
6080         * linux-nat.c (super_close): Remove.
6081         * linux-tdep.c (linux_info_proc): Remove unused variable.
6082         * mi/mi-main.c (mi_execute_command): Remove unused variable.
6083         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6084         Remove unused variable.
6085         * parse.c (find_minsym_type_and_address): Remove unused variable.
6086         * printcmd.c (info_symbol_command, printf_floating): Remove unused
6087         variable.
6088         * python/py-breakpoint.c (bppy_set_commands): Remove unused
6089         variable.
6090         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6091         variables.
6092         * record-btrace.c (record_btrace_target::store_registers): Remove
6093         unused variable.
6094         (cmd_show_record_btrace_cpu): Remove unused variable.
6095         * riscv-tdep.c (riscv_register_reggroup_p)
6096         (riscv_push_dummy_call, riscv_return_value): Remove unused
6097         variable.
6098         * rust-exp.y (literal): Remove unused variable.
6099         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6100         unused variable.
6101         <STRUCTOP_ANONYMOUS>: Likewise.
6102         * s390-linux-tdep.c (s390_linux_init_abi_31)
6103         (s390_linux_init_abi_64): Remove unused variable.
6104         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6105         (file_select_thread, net_windows_open, _initialize_ser_windows):
6106         Remove unused variables.
6107         * symtab.c (find_pc_sect_line): Remove unused variable.
6108         * target-memory.c (compute_garbled_blocks): Remove unused
6109         variable.
6110         (target_write_memory_blocks): Remove unused variable.
6111         * target.c (target_stack::unpush): Remove unused variables.
6112         * tracepoint.c (start_tracing, all_tracepoint_actions)
6113         (merge_uploaded_trace_state_variables)
6114         (print_one_static_tracepoint_marker): Remove unused variable.
6115         * unittests/basic_string_view/element_access/char/1.cc (test01):
6116         Remove unused variable.
6117         * windows-nat.c (windows_continue, windows_add_all_dlls)
6118         (do_initial_windows_stuff, windows_nat_target::create_inferior):
6119         Remove unused variables.
6120
6121 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
6122
6123         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6124         attr_profile in HAVE_ELF.
6125         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6126         HAVE_ELF.
6127
6128 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
6129
6130         * frame.c (frame_register_unwind): Change parameter name.
6131         (frame_unwind_register): Likewise.
6132         (frame_unwind_register_value): Likewise.
6133         (frame_unwind_register_signed): Likewise.
6134         (frame_unwind_register_unsigned): Likewise.
6135         * frame.h (frame_register_unwind): Likewise.
6136         (frame_unwind_register): Likewise.
6137         (frame_unwind_register_value): Likewise.
6138         (frame_unwind_register_signed): Likewise.
6139         (frame_unwind_register_unsigned): Likewise.
6140         (frame_unwind_arch): Likewise.
6141
6142 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6143
6144         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6145         ISA maintenance.
6146
6147 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6148
6149         * mips-linux-nat.c (mips_linux_nat_target::read_description):
6150         Call `get_ptrace_pid' rather than extracting the ptrace PID by
6151         hand.
6152
6153 2018-07-20  Keith Seitz  <keiths@redhat.com>
6154
6155         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6156         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6157         m_compunit_symtab, m_language>: Add "m_" prefix.
6158         Update all uses.
6159         * buildsym.c: Update all uses.
6160
6161 2018-07-20  Tom Tromey  <tom@tromey.com>
6162
6163         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6164         * buildsym.h (record_line_ftype): Remove typedef.
6165
6166 2018-07-20  Tom Tromey  <tom@tromey.com>
6167
6168         * buildsym-legacy.h (augment_type_symtab): Don't declare.
6169         (end_expandable_symtab): Likewise.
6170         (end_symtab_get_static_block): Likewise.
6171         (end_symtab_from_static_block): Likewise.
6172         * buildsym-legacy.c (augment_type_symtab): Remove.
6173         (end_expandable_symtab): Remove.
6174         (end_symtab_get_static_block): Remove.
6175         (end_symtab_from_static_block): Remove.
6176
6177 2018-07-20  Tom Tromey  <tom@tromey.com>
6178
6179         * dwarf2read.c: Include buildsym.h.
6180         (struct dwarf2_cu) <builder>: New method.
6181         (fixup_go_packaging): Update.
6182         (process_full_comp_unit, process_full_type_unit): Update.  Don't
6183         use scoped_free_pendings.
6184         (using_directives): Add "cu" parameter, remove "language".
6185         (read_import_statement, setup_type_unit_groups, )
6186         (read_func_scope, read_lexical_block_scope)
6187         (dwarf2_record_block_ranges, read_namespace): Update.
6188         (lnp_state_machine::lnp_state_machine): Add cu parameter.
6189         (lnp_state_machine::handle_end_sequence): Update.
6190         (class lnp_state_machine) <m_cu>: New member.
6191         <m_record_line_callback>: Remove.
6192         <m_currently_recording_lines>: New member.
6193         (lnp_state_machine::handle_set_file): Update.
6194         (noop_record_line): Remove.
6195         (dwarf_record_line_p): Add cu parameter.
6196         (dwarf_record_line_1, dwarf_finish_line): Likewise.
6197         (lnp_state_machine::record_line)
6198         (lnp_state_machine::lnp_state_machine)
6199         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6200         (dwarf_decode_lines): Update.
6201         (dwarf2_start_subfile): Add cu parameter.
6202         (dwarf2_start_symtab, new_symbol): Update.
6203         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6204         Remove dwarf2_per_objfile parameter.
6205         (dwarf_decode_macros): Update.
6206
6207 2018-07-20  Tom Tromey  <tom@tromey.com>
6208
6209         * stabsread.c (define_symbol): Update.
6210         * buildsym-legacy.h (get_buildsym_compunit): Declare.
6211         * dwarf2read.c (new_symbol): Update.
6212         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6213         * cp-namespace.c: Include buildsym.h.
6214         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6215         * buildsym-legacy.c (get_buildsym_compunit): New function.
6216
6217 2018-07-20  Tom Tromey  <tom@tromey.com>
6218
6219         * xcoffread.c: Include buildsym-legacy.h.
6220         * windows-nat.c: Include buildsym-legacy.h.
6221         * stabsread.c: Include buildsym-legacy.h.
6222         * mdebugread.c: Include buildsym-legacy.h.
6223         * buildsym-legacy.h: New file.
6224         * buildsym-legacy.c: New file, from buildsym.c.
6225         * go32-nat.c: Include buildsym-legacy.h.
6226         * dwarf2read.c: Include buildsym-legacy.h.
6227         * dbxread.c: Include buildsym-legacy.h.
6228         * cp-namespace.c: Include buildsym-legacy.h.
6229         * coffread.c: Include buildsym-legacy.h.
6230         * buildsym.h: Move some contents to buildsym-legacy.h.
6231         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
6232         buildsym-legacy.c.
6233         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6234
6235 2018-07-20  Tom Tromey  <tom@tromey.com>
6236
6237         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6238         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6239         (buildsym_compunit::buildsym_compunit)
6240         (buildsym_compunit::~buildsym_compunit)
6241         (buildsym_compunit::get_macro_table): Define.
6242
6243 2018-07-20  Tom Tromey  <tom@tromey.com>
6244
6245         * buildsym.c (reset_symtab_globals): Remove.
6246         (buildsym_compunit::end_symtab_from_static_block): Update.
6247         (buildsym_compunit::augment_type_symtab): Update.
6248         (end_symtab_from_static_block): Call free_buildsym_compunit.
6249         (augment_type_symtab, end_symtab, end_expandable_symtab):
6250         Likewise.
6251
6252 2018-07-20  Tom Tromey  <tom@tromey.com>
6253
6254         * arch-utils.c: Do not include buildsym.h.
6255         * mipsread.c: Do not include buildsym.h.
6256         * machoread.c: Do not include buildsym.h.
6257         * elfread.c: Do not include buildsym.h.
6258
6259 2018-07-20  Tom Tromey  <tom@tromey.com>
6260
6261         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6262         initialization.
6263         (buildsym_compunit): Add new constructor.
6264         (struct buildsym_compunit) <get_last_source_file, finish_block,
6265         record_block_range, start_subfile, patch_subfile_names,
6266         push_subfile, pop_subfile, record_line, get_compunit_symtab,
6267         set_last_source_start_addr, get_last_source_start_addr,
6268         get_local_using_directives, set_local_using_directives,
6269         get_global_using_directives, outermost_context_p,
6270         get_current_context_stack, get_context_stack_depth,
6271         get_current_subfile, get_local_symbols, get_file_symbols,
6272         get_global_symbols, record_debugformat, record_producer,
6273         push_context, pop_context, end_symtab_get_static_block,
6274         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6275         New public methods.
6276         <record_pending_block, finish_block_internal, make_blockvector,
6277         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6278         private methods.
6279         Update all users.
6280
6281 2018-05-22  Tom Tromey  <tom@tromey.com>
6282
6283         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6284         parameter.
6285         (finish_block_internal): Update.
6286
6287 2018-07-20  Tom Tromey  <tom@tromey.com>
6288
6289         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6290         parameter.
6291         (finish_block_internal): Update.
6292
6293 2018-07-20  Tom Tromey  <tom@tromey.com>
6294
6295         * buildsym.h (EXTERN): Don't define or undef.
6296         * buildsym.c (EXTERN): Don't define.
6297
6298 2018-07-20  Tom Tromey  <tom@tromey.com>
6299
6300         * buildsym.c: Remove TODO comment.
6301
6302 2018-07-20  Tom Tromey  <tom@tromey.com>
6303
6304         * coffread.c (coff_symtab_read): Update.
6305         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6306         (xcoff_new_init): Update.
6307         * mipsread.c (mipscoff_new_init): Update.
6308         * mdebugread.c (mdebug_build_psymtabs): Update.
6309         * elfread.c (elf_new_init): Update.
6310         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6311         Update.
6312         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6313         (coffstab_build_psymtabs, elfstab_build_psymtabs)
6314         (stabsect_build_psymtabs): Update.
6315         * buildsym.h (buildsym_init): Don't declare.
6316         * buildsym.c: Update comment.
6317         (prepare_for_building): Remove.
6318         (start_symtab, restart_symtab): Update.
6319         (reset_symtab_globals): Update comment.
6320         (buildsym_init): Remove.
6321
6322 2018-07-20  Tom Tromey  <tom@tromey.com>
6323
6324         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6325         * stabsread.c (patch_block_stabs, define_symbol, read_type)
6326         (read_enum_type, common_block_start, common_block_end)
6327         (cleanup_undefined_types_1, finish_global_stabs): Update.
6328         * mdebugread.c (psymtab_to_symtab_1): Update.
6329         * dwarf2read.c (fixup_go_packaging, read_func_scope)
6330         (read_lexical_block_scope, new_symbol): Update.
6331         * dbxread.c (process_one_symbol): Update.
6332         * coffread.c (coff_symtab_read, process_coff_symbol)
6333         (coff_read_enum_type): Update.
6334         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6335         declare.
6336         (get_local_symbols, get_file_symbols, get_global_symbols): New
6337         functions.
6338         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6339         m_global_symbols.
6340         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6341         (~scoped_free_pendings): Update.
6342         (finish_block, prepare_for_building, reset_symtab_globals)
6343         (end_symtab_get_static_block, end_symtab_with_blockvector)
6344         (augment_type_symtab, push_context): Update.
6345         (get_local_symbols, get_file_symbols, get_global_symbols): New
6346         functions.
6347         (buildsym_init): Update.
6348
6349 2018-07-20  Tom Tromey  <tom@tromey.com>
6350
6351         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6352         (process_full_type_unit): Likewise.
6353         (dwarf2_start_symtab): Set list_in_scope.
6354
6355 2018-07-20  Tom Tromey  <tom@tromey.com>
6356
6357         * dwarf2read.c (process_psymtab_comp_unit_reader)
6358         (build_type_psymtabs_reader): Do not set list_in_scope.
6359
6360 2018-07-20  Tom Tromey  <tom@tromey.com>
6361
6362         * buildsym.c (free_pendings): Remove.
6363         (add_symbol_to_list, scoped_free_pendings)
6364         (finish_block_internal, buildsym_init): Update.
6365
6366 2018-07-20  Tom Tromey  <tom@tromey.com>
6367
6368         * xcoffread.c (read_xcoff_symtab): Update.
6369         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6370         Update.
6371         * dbxread.c (process_one_symbol): Update.
6372         * coffread.c (coff_symtab_read): Update.
6373         * buildsym.h (finish_block): Update.
6374         * buildsym.c (finish_block): Remove "listhead" argument.
6375         (end_symtab_get_static_block): Update.
6376
6377 2018-07-20  Tom Tromey  <tom@tromey.com>
6378
6379         * buildsym.h (class scoped_free_pendings): Remove constructor.
6380         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6381         method.
6382         <m_pending_block_obstack, m_pending_blocks>: New members.
6383         (pending_block_obstack, pending_blocks): Remove.
6384         (scoped_free_pendings::scoped_free_pendings): Default.
6385         (~scoped_free_pendings): Update.
6386         (free_pending_blocks): Remove.
6387         (finish_block_internal, record_pending_block, make_blockvector)
6388         (end_symtab_get_static_block, augment_type_symtab, push_context)
6389         (buildsym_init): Update.
6390
6391 2018-07-20  Tom Tromey  <tom@tromey.com>
6392
6393         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6394         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6395         members.
6396         (pending_addrmap, pending_addrmap_obstack)
6397         (pending_addrmap_interesting): Remove.
6398         (scoped_free_pendings, record_block_range, make_blockvector)
6399         (prepare_for_building, reset_symtab_globals, buildsym_init):
6400         Update.
6401
6402 2018-07-20  Tom Tromey  <tom@tromey.com>
6403
6404         * xcoffread.c (process_linenos): Update.
6405         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6406         * mdebugread.c (psymtab_to_symtab_1): Update.
6407         * dwarf2read.c (setup_type_unit_groups)
6408         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6409         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6410         * dbxread.c (process_one_symbol): Update.
6411         * coffread.c (coff_symtab_read, enter_linenos)
6412         (process_coff_symbol): Update.
6413         * buildsym.h (current_subfile): Don't declare.
6414         (get_current_subfile): Declare.
6415         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6416         member.
6417         (start_subfile, free_buildsym_compunit, push_subfile)
6418         (prepare_for_building, start_symtab): Update.
6419         (get_current_subfile): New function.
6420
6421 2018-07-20  Tom Tromey  <tom@tromey.com>
6422
6423         * coffread.c (coff_symtab_read): Update.
6424         * xcoffread.c (read_xcoff_symtab): Update.
6425         * dwarf2read.c (new_symbol): Update.
6426         (read_func_scope, read_lexical_block_scope): Update.
6427         * dbxread.c (process_one_symbol): Update.
6428         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6429         (outermost_context_p): Remove macro.
6430         (outermost_context_p, get_current_context_stack)
6431         (get_context_stack_depth): Declare.
6432         (pop_context): Return struct context_stack.
6433         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6434         member.
6435         (context_stack_size): Remove.
6436         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6437         (prepare_for_building, end_symtab_get_static_block)
6438         (augment_type_symtab, push_context): Update.
6439         (pop_context): Return struct context_stack.
6440         (outermost_context_p, get_current_context_stack)
6441         (get_context_stack_depth): New functions.
6442         (buildsym_init): Update.
6443
6444 2018-07-20  Tom Tromey  <tom@tromey.com>
6445
6446         * rust-exp.y: Now a pure parser.  Update all rules.
6447         (%union): Move earlier.
6448         (current_parser, work_obstack): Remove globals.
6449         (rust_parser, ~rust_parser): Update.
6450         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6451         lex_character, lex_number, lex_string, lex_identifier,
6452         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6453         convert_name, convert_params_to_expression,
6454         convert_ast_to_expression, ast_basic_type, ast_operation,
6455         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6456         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6457         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6458         ast_array_type, ast_slice_type, ast_reference_type,
6459         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6460         (rust_parse): Update.
6461         (rustyyerror, rustyylex): Add parser parameter.
6462         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6463         (rust_lex_stringish_test, rust_lex_test_sequence)
6464         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6465         (rust_lex_test_push_back, rust_lex_tests): Update.
6466
6467 2018-07-19  Pedro Alves  <palves@redhat.com>
6468
6469         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6470         gdb::unique_xmalloc_ptr.
6471         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6472         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6473         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6474         copy-initialization.
6475         * guile/scm-pretty-print.c (ppscm_print_children): Use
6476         gdb::unique_xmalloc_ptr instead of cleanups.
6477         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6478         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6479         gdb::unique_xmalloc_ptr.
6480         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6481         Adjust to use gdb::unique_xmalloc_ptr.
6482         * guile/scm-utils.c (extract_arg): Adjust.
6483         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6484         gdb::unique_xmalloc_ptr instead of a cleanup.
6485
6486 2018-07-19  Tom Tromey  <tom@tromey.com>
6487
6488         * utils.c (do_value_free_to_mark)
6489         (make_cleanup_value_free_to_mark): Remove.
6490         * utils.h (make_cleanup_value_free_to_mark): Remove.
6491
6492 2018-07-19  Pedro Alves  <palves@redhat.com>
6493
6494         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6495         forwarding reference.
6496
6497 2018-07-18  Pedro Alves  <palves@redhat.com>
6498
6499         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6500         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6501         cleanup.
6502
6503 2018-07-18  Pedro Alves  <palves@redhat.com>
6504
6505         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6506         exceptions.
6507         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6508         (gdbscm_wrap): New.
6509         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6510         directly instead of a cleanup.
6511         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6512         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6513         (vlscm_binop_gdbthrow): New, factored out from ...
6514         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6515         (vlscm_rich_compare): Use gdbscm_wrap.
6516         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6517         instead of a cleanup.
6518         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6519         cleanup.
6520         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6521         Use xfree directly instead of a cleanup.
6522         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6523         Adjust to use gdbscm_wrap and scoped_value_mark.
6524         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6525         (gdbscm_value_address, gdbscm_value_dereference)
6526         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6527         scoped_value_mark.
6528         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6529         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6530         scoped_value_mark.
6531         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6532         gdbscm_wrap and scoped_value_mark.
6533         (gdbscm_value_to_string): Use xfree directly instead of a
6534         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6535         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6536         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6537         scoped_value_mark.
6538         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6539         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6540         scoped_value_mark.
6541         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6542         gdbscm_wrap.
6543
6544 2018-07-18  Tom de Vries  <tdevries@suse.de>
6545
6546         * findvar.c (default_read_var_value): Also resolve dynamic type for
6547         LOC_OPTIMIZED_OUT vars.
6548
6549 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6550
6551         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6552         decoding.
6553
6554 2018-07-17  Tom Tromey  <tom@tromey.com>
6555
6556         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6557         (compute_enum_list, pascm_set_param_value_x)
6558         (gdbscm_parameter_value): Update.
6559         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6560         (gdbscm_scm_to_host_string): Update.
6561         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6562         Update.
6563         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6564         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6565         * guile/scm-string.c (gdbscm_scm_to_string): Return
6566         unique_xmalloc_ptr.
6567         (gdbscm_scm_to_host_string): Likewise.
6568
6569 2018-07-17  Tom Tromey  <tom@tromey.com>
6570
6571         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6572         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6573         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6574         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6575         unique_xmalloc_ptr.
6576
6577 2018-07-17  Tom Tromey  <tom@tromey.com>
6578
6579         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6580         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6581         Update.
6582         * guile/scm-cmd.c (cmdscm_function): Update.
6583         * guile/scm-pretty-print.c
6584         (ppscm_print_exception_unless_memory_error): Update.
6585         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6586         Return unique_xmalloc_ptr.
6587
6588 2018-07-17  Tom Tromey  <tom@tromey.com>
6589
6590         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6591         Use string_printf.
6592
6593 2018-07-17  Jim Wilson  <jimw@sifive.com>
6594
6595         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6596         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6597         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6598         unecessary braces after EF_RISCV_RVC test.  Delete call to
6599         set_gdbarch_decr_pc_after_break.
6600
6601         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6602         RISCV_LAST_FP_REGNUM + 1.
6603         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6604
6605 2018-07-17  Tom Tromey  <tom@tromey.com>
6606
6607         * configure.ac: Remove --disable-gdbcli.
6608         * configure: Rebuild.
6609         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6610         (SUBDIR_CLI_CFLAGS): Remove.
6611         (SFILES): Use SUBDIR_CLI_SRCS.
6612         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6613
6614 2018-07-17  Tom Tromey  <tom@tromey.com>
6615
6616         PR gdb/18624:
6617         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6618
6619 2018-07-16  Jim Wilson  <jimw@sifive.com>
6620
6621         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6622
6623 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6624
6625         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6626         variable.
6627         (libunwind_frame_sniffer): Likewise.
6628         (libunwind_frame_prev_register): Likewise.
6629         (libunwind_sigtramp_frame_sniffer): Likewise.
6630         * ia64-tdep.c (ia64_access_reg): Likewise.
6631         (ia64_access_rse_reg): Likewise.
6632         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6633         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6634
6635 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6636
6637         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6638
6639 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6640
6641         * remote-sim.c (gdbsim_target::close,
6642         gdbsim_target::mourn_inferior): Remove unused variables.
6643
6644 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6645
6646         * ia64-tdep.c (ktab_buf): New global.
6647         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6648         (get_kernel_table): Adjust.
6649
6650 2018-07-16  Tom Tromey  <tom@tromey.com>
6651
6652         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6653         * dwarf2read.c (using_directives, new_symbol): Use
6654         outermost_context_p.
6655         * dbxread.c (process_one_symbol): Use outermost_context_p.
6656         * coffread.c (coff_symtab_read): Use outermost_context_p.
6657
6658 2018-07-16  Tom Tromey  <tom@tromey.com>
6659
6660         * dwarf2read.c (using_directives, read_func_scope)
6661         (read_lexical_block_scope): Update.
6662         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6663         * buildsym.h (local_using_directives, global_using_directives):
6664         Don't declare.
6665         (get_local_using_directives, set_local_using_directives)
6666         (get_global_using_directives): Declare.
6667         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6668         m_global_using_directives>: New members.
6669         (finish_block_internal, prepare_for_building)
6670         (reset_symtab_globals, end_symtab_get_static_block)
6671         (push_context): Update.
6672         (get_local_using_directives, set_local_using_directives)
6673         (get_global_using_directives): New functions.
6674         (buildsym_init): Update.
6675
6676 2018-07-16  Tom Tromey  <tom@tromey.com>
6677
6678         * xcoffread.c (xcoff_initial_scan): Don't call
6679         free_pending_blocks.
6680         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6681         * buildsym.h (class scoped_free_pendings): Add constructor.
6682         (free_pending_blocks): Don't declare.
6683         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6684         (free_pending_blocks): Now static.
6685
6686 2018-07-16  Tom Tromey  <tom@tromey.com>
6687
6688         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6689         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6690         member.
6691         (struct subfile_stack): Remove.
6692         (subfile_stack): Remove.
6693         (push_subfile, pop_subfile, buildsym_init): Update.
6694
6695 2018-07-16  Tom Tromey  <tom@tromey.com>
6696
6697         * buildsym.c (push_subfile): Use gdb_assert.
6698         (pop_subfile): Use gdb_assert.
6699
6700 2018-07-16  Tom Tromey  <tom@tromey.com>
6701
6702         * buildsym.h (merge_symbol_lists): Remove.
6703         * buildsym.c (merge_symbol_lists): Remove.
6704
6705 2018-07-16  Tom Tromey  <tom@tromey.com>
6706
6707         * stabsread.c (scan_file_globals): Update comment.
6708         * stabsread.h (scan_file_globals): Move from buildsym.h.
6709         * buildsym.h (scan_file_globals): Move to stabsread.h.
6710
6711 2018-07-16  Tom Tromey  <tom@tromey.com>
6712
6713         * xcoffread.c (xcoff_new_init): Update.
6714         * mipsread.c (mipscoff_new_init): Update.
6715         * mdebugread.c (mdebug_build_psymtabs): Update.
6716         * elfread.c (elf_new_init): Update.
6717         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6718         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6719         * buildsym.h (buildsym_new_init): Don't declare.
6720         * buildsym.c (buildsym_new_init): Remove.
6721
6722 2018-07-16  Tom Tromey  <tom@tromey.com>
6723
6724         * stabsread.h (within_function): Move from buildsym.h.
6725         * stabsread.c (start_stabs): Clear within_function.
6726         * coffread.c (coff_start_symtab): Clear within_function.
6727         * buildsym.h (within_function): Move to stabsread.h.
6728         * buildsym.c (prepare_for_building): Update.
6729
6730 2018-07-16  Tom Tromey  <tom@tromey.com>
6731
6732         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6733         * dwarf2read.c (dwarf2_start_symtab): Don't set
6734         processing_gcc_compilation.
6735         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6736
6737 2018-07-16  Tom Tromey  <tom@tromey.com>
6738
6739         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6740         (next_symbol_text_func): Move from buildsym.h.
6741         * stabsread.c (hashname): Move from buildsym.c.
6742         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6743         (next_symbol_text_func, hashname): Move to stabsread.h.
6744         * buildsym.c: Don't include bcache.h
6745         (hashname): Move to stasbread.c.
6746
6747 2018-07-16  Tom Tromey  <tom@tromey.com>
6748
6749         * buildsym.h (context_stack_size): Don't declare.
6750         * buildsym.c (context_stack_size): New global.
6751
6752 2018-07-16  Tom Tromey  <tom@tromey.com>
6753
6754         * dbxread.c (processing_acc_compilation): New global.
6755         * buildsym.h (processing_acc_compilation): Don't declare.
6756
6757 2018-07-16  Tom Tromey  <tom@tromey.com>
6758
6759         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6760         * dbxread.c (read_ofile_symtab): Update.
6761         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6762         * buildsym.h (last_source_start_addr): Remove.
6763         (set_last_source_start_addr, get_last_source_start_addr):
6764         Declare.
6765         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6766         parameter.
6767         (struct buildsym_compunit) <m_last_source_start_addr>: New
6768         member.
6769         (prepare_for_building): Remove start_addr parameter.
6770         (start_symtab, restart_symtab, end_symtab_get_static_block)
6771         (end_symtab_with_blockvector): Update.
6772         (set_last_source_start_addr, get_last_source_start_addr): New
6773         functions.
6774
6775 2018-07-16  Tom Tromey  <tom@tromey.com>
6776
6777         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6778         member.
6779         (have_line_numbers): Remove.
6780         (record_line, prepare_for_building, end_symtab_get_static_block)
6781         (augment_type_symtab): Update.
6782
6783 2018-07-16  Tom Tromey  <tom@tromey.com>
6784
6785         * buildsym.c (~buildsym_compunit): Free the macro table.
6786         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6787         methods.
6788         <m_pending_macros>: New member.
6789         (pending_macros): Remove.
6790         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6791         (reset_symtab_globals, end_symtab_get_static_block)
6792         (end_symtab_with_blockvector, augment_type_symtab)
6793         (buildsym_init): Update.
6794
6795 2018-07-16  Tom Tromey  <tom@tromey.com>
6796
6797         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6798         parameter.
6799         (buildsym_compunit::set_last_source_file): New method.
6800         <m_last_source_file>: New member.
6801         (prepare_for_building): Remove "name" parameter.
6802         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6803         (last_source_file): Remove.
6804         (set_last_source_file, get_last_source_file): Update.
6805
6806 2018-07-16  Tom Tromey  <tom@tromey.com>
6807
6808         * buildsym.c (prepare_for_building): Add assert.
6809
6810 2018-07-16  Tom Tromey  <tom@tromey.com>
6811
6812         * buildsym.c (~buildsym_compunit): Update.
6813         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6814         (start_subfile, patch_subfile_names)
6815         (end_symtab_with_blockvector): Update.
6816
6817 2018-07-16  Tom Tromey  <tom@tromey.com>
6818
6819         * buildsym.c (struct buildsym_compunit): Add constructor,
6820         destructor, initializers.
6821         (start_buildsym_compunit): Remove.
6822         (free_buildsym_compunit): Use "delete".
6823         (start_symtab, restart_symtab): Use "new".
6824
6825 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6826
6827         * symfile.c (set_objfile_default_section_offset): Remove struct
6828         keyword.
6829
6830 2018-07-14  Stafford Horne  <shorne@gmail.com>
6831
6832         * (Responsible Maintainers): Add myself as or1k maintainer.
6833
6834 2018-07-13  Tom Tromey  <tom@tromey.com>
6835
6836         * symfile.c (set_objfile_default_section_offset): Use extra braces
6837         around initializer.
6838
6839 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6840
6841         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6842         non-branching basr.
6843
6844 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6845
6846         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6847         unittests/cli-utils-selftests.c
6848         * unittests/cli-utils-selftests.c: New file.
6849
6850 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6851
6852         * NEWS: Mention new commands. Mention change to 'thread apply'.
6853
6854 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6855
6856         * thread.c (thr_try_catch_cmd): New function.
6857         (thread_apply_all_command): Handle qcs flags.
6858         (thread_apply_command): Handle qcs flags.
6859         (taas_command): New function.
6860         (tfaas_command): New function.
6861         (_initialize_thread): Update to setup the new commands 'taas
6862         and 'tfaas'. Change doc string for 'thread apply'.
6863
6864 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6865
6866         * stack.c: (trailing_outermost_frame): New function, mostly
6867         extracted from backtrace_command_1.
6868         (leading_innermost_frame): New function.
6869         (backtrace_command_1): Update to call trailing_outermost_frame.
6870         (frame_apply_command_count): New function.
6871         (frame_apply_level_command): New function.
6872         (frame_apply_all_command): New function.
6873         (frame_apply_command): New function.
6874         (faas_command): New function.
6875         (frame_cmd_list): New variable.
6876         (_initialize_stack): Update to setup the new commands 'frame apply'
6877         and 'faas'.
6878
6879 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6880
6881         * cli-utils.c (number_or_range_parser::get_number): Only handle
6882         numbers or convenience var as numbers.
6883         (parse_flags): New function.
6884         (parse_flags_qcs): New function.
6885         (number_or_range_parser::finished): Ensure parsing end is detected
6886         before end of string.
6887         * cli-utils.h (parse_flags): New function.
6888         (parse_flags_qcs): New function.
6889         (number_or_range_parser): Remove m_finished bool.
6890         (number_or_range_parser::skip_range): Set m_in_range to false.
6891
6892 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6893
6894         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6895         on Windows.
6896
6897 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6898             Jan Kratochvil  <jan.kratochvil@redhat.com>
6899             Paul Fertser  <fercerpav@gmail.com>
6900             Tsutomu Seki  <sekiriki@gmail.com>
6901             Pedro Alves  <palves@redhat.com>
6902
6903         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6904         'unittests/parse-connection-spec-selftests.c'.
6905         (COMMON_SFILES): Add 'common/netstuff.c'.
6906         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6907         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6908         * common/netstuff.c: New file.
6909         * common/netstuff.h: New file.
6910         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6911         (wait_for_connect): Update comment.  New parameter
6912         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6913         Use 'sock' directly instead of 'scb->fd'.
6914         (try_connect): New function, with code from 'net_open'.
6915         (net_open): Rewrite main loop to deal with multiple
6916         sockets/addresses.  Handle IPv6-style hostnames; implement
6917         support for IPv6 connections.
6918         * unittests/parse-connection-spec-selftests.c: New file.
6919
6920 2018-07-11  Pedro Alves  <palves@redhat.com>
6921
6922         PR gdb/23377
6923         * remote.c (remote_target::remote_detach_pid): Call
6924         set_current_process.
6925
6926 2018-07-11  Pedro Alves  <palves@redhat.com>
6927
6928         * h8300-tdep.c (h8300_gdbarch_init): Remove
6929         set_gdbarch_ecoff_reg_to_regnum calls.
6930
6931 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6932
6933         PR c++/23373
6934         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6935         offsets/sizes for static members of a class/struct.
6936
6937 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6938
6939         * target-descriptions.c (tdesc_register_bitsize): Rename.
6940         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6941         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6942         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6943
6944 2018-07-10  Tom Tromey  <tom@tromey.com>
6945
6946         * breakpoint.c (moribund_locations): Now static and a
6947         std::vector.
6948         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6949         (build_bpstat_chain, update_global_location_list)
6950         (breakpoint_retire_moribund): Update.
6951         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6952         VEC.
6953
6954 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6955
6956         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6957         (riscv_register_reggroup_p): Use new function, remove unneeded
6958         parenthesis.
6959         (riscv_push_dummy_call): Extend assert to compare against xlen or
6960         flen based on register type.
6961
6962 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6963
6964         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6965
6966 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6967
6968         * remote.c (show_hardware_watchpoint_limit): New function.
6969         (show_hardware_watchpoint_length_limit): New function.
6970         (show_hardware_breakpoint_limit): New function.
6971         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6972         where appropriate, update help text.
6973
6974 2018-07-09  Tom Tromey  <tom@tromey.com>
6975
6976         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6977         (CLIBS): Don't mention NAT_CLIBS.
6978
6979 2018-07-09  Tom Tromey  <tom@tromey.com>
6980
6981         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6982         (LIBGDB_OBS, clean mostlyclean): Update.
6983         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6984
6985 2018-07-09  Tom Tromey  <tom@tromey.com>
6986
6987         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6988         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6989         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6990
6991 2018-07-09  Tom Tromey  <tom@tromey.com>
6992
6993         * Makefile.in (ALLDEPFILES): Remove exec.c.
6994         (COMMON_OBS): Remove exec.o.
6995         (COMMON_SFILES): Add exec.c.
6996
6997 2018-07-09  Tom Tromey  <tom@tromey.com>
6998
6999         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
7000
7001 2018-07-09  Tom Tromey  <tom@tromey.com>
7002
7003         * Makefile.in (clean mostlyclean): Remove stamp-version.
7004         (version.c): Depend on stamp-version.
7005         (stamp-version): New rule, from version.c rule.
7006
7007 2018-07-09  Tom Tromey  <tom@tromey.com>
7008
7009         * Makefile.in (init.c): Depend on stamp-init.
7010         (stamp-init): New rule, from init.c rule.
7011         (clean mostlyclean): Remove stamp-init.
7012
7013 2018-07-09  Tom Tromey  <tom@tromey.com>
7014
7015         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
7016         SUBDIR_GCC_COMPILE_SRCS.
7017
7018 2018-07-09  Tom Tromey  <tom@tromey.com>
7019
7020         * Makefile.in (init.c): Remove some unused sed rules.
7021
7022 2018-07-09  Tom Tromey  <tom@tromey.com>
7023
7024         * Makefile.in (TSOBS): Remove.
7025         (INIT_FILES): Update.
7026         (LIBGDB_OBS): Update.
7027         (COMMON_SFILES): Add inflow.c.
7028         (SFILES): Remove inflow.c.
7029
7030 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7031
7032         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7033
7034 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
7035
7036         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7037         get_saveloc_name, is_signal_frame_name, step_name,
7038         init_remote_name, create_addr_space_name,
7039         destroy_addr_space_name, search_unwind_table_name,
7040         find_dyn_list_name): Constify.
7041
7042 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
7043
7044         * darwin-nat.c (darwin_pthread_kill): New function.
7045         (darwin_resume_thread): Use darwin_pthread_kill.
7046
7047 2018-07-05  Tom de Vries  <tdevries@suse.de>
7048
7049         * macroexp.c (macro_buffer) <operator=>: New member function.
7050
7051 2018-07-04  Tom Tromey  <tom@tromey.com>
7052
7053         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7054
7055 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
7056
7057         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7058         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7059         * maint.c: Likewise.
7060         * top.c: Likewise.
7061
7062 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7063
7064         * NEWS: Create a new section for the next release branch.
7065         Rename the section of the current branch, now that it has
7066         been cut.
7067
7068 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7069
7070         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7071         * version.in: Bump version to 8.2.50.DATE-git.
7072
7073 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
7074             Pedro Alves  <palves@redhat.com>
7075
7076         * linux-nat.c (linux_init_ptrace): Rename to ...
7077         (linux_init_ptrace_procfs): ... this.  Call
7078         linux_proc_init_warnings.
7079         (linux_nat_target::post_attach)
7080         (linux_nat_target::post_startup_inferior): Adjust.
7081         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7082         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7083
7084 2018-07-04  Tom de Vries  <tdevries@suse.de>
7085
7086         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7087         check ...
7088         (read_comp_unit_head): ... here.
7089
7090 2018-07-03  Tom Tromey  <tom@tromey.com>
7091
7092         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7093         (stop_tracing, tstatus_command)
7094         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7095         (print_one_static_tracepoint_marker): Update.
7096         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7097         std::vector.
7098         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
7099         VEC.
7100         (all_tracepoints, static_tracepoints_here): Return std::vector.
7101
7102 2018-07-03  Tom Tromey  <tom@tromey.com>
7103
7104         * common/ptid.c (ptid_equal): Remove.
7105         * common/ptid.h (ptid_equal): Don't declare.
7106         * ada-tasks.c: Update.
7107         * breakpoint.c: Update.
7108         * common/agent.c: Update.
7109         * corelow.c: Update.
7110         * darwin-nat-info.c: Update.
7111         * darwin-nat.c: Update.
7112         * dcache.c: Update.
7113         * dtrace-probe.c: Update.
7114         * dummy-frame.c: Update.
7115         * fbsd-nat.c: Update.
7116         * frame.c: Update.
7117         * gdbthread.h: Update.
7118         * gnu-nat.c: Update.
7119         * go32-nat.c: Update.
7120         * inf-loop.c: Update.
7121         * inf-ptrace.c: Update.
7122         * infcall.c: Update.
7123         * infcmd.c: Update.
7124         * inflow.c: Update.
7125         * infrun.c: Update.
7126         * linux-fork.c: Update.
7127         * linux-nat.c: Update.
7128         * linux-thread-db.c: Update.
7129         * mi/mi-cmd-var.c: Update.
7130         * mi/mi-interp.c: Update.
7131         * mi/mi-main.c: Update.
7132         * nto-procfs.c: Update.
7133         * ppc-linux-tdep.c: Update.
7134         * procfs.c: Update.
7135         * python/py-inferior.c: Update.
7136         * python/py-record-btrace.c: Update.
7137         * python/py-record.c: Update.
7138         * ravenscar-thread.c: Update.
7139         * regcache.c: Update.
7140         * remote-sim.c: Update.
7141         * remote.c: Update.
7142         * sol-thread.c: Update.
7143         * solib.c: Update.
7144         * target.c: Update.
7145         * tui/tui-stack.c: Update.
7146         * varobj.c: Update.
7147         * windows-nat.c: Update.
7148         * windows-tdep.c: Update.
7149
7150 2018-07-03  Tom Tromey  <tom@tromey.com>
7151
7152         * common/ptid.c (ptid_match): Remove.
7153         * common/ptid.h (ptid_match): Don't declare.
7154         * fbsd-nat.c: Update.
7155         * infcmd.c: Update.
7156         * infrun.c: Update.
7157         * linux-nat.c: Update.
7158         * record-btrace.c: Update.
7159         * regcache.c: Update.
7160         * remote.c: Update.
7161
7162 2018-07-03  Tom Tromey  <tom@tromey.com>
7163
7164         * common/ptid.c (ptid_tid_p): Remove.
7165         * common/ptid.h (ptid_tid_p): Don't declare.
7166         * sol-thread.c: Update.
7167
7168 2018-07-03  Tom Tromey  <tom@tromey.com>
7169
7170         * common/ptid.c (ptid_lwp_p): Remove.
7171         * common/ptid.h (ptid_lwp_p): Don't declare.
7172         * fbsd-nat.c: Update.
7173         * linux-nat.c: Update.
7174         * nat/linux-procfs.c: Update.
7175         * nat/x86-linux-dregs.c: Update.
7176         * sol-thread.c: Update.
7177
7178 2018-07-03  Tom Tromey  <tom@tromey.com>
7179
7180         * common/ptid.c (ptid_is_pid): Remove.
7181         * common/ptid.h (ptid_is_pid): Don't declare.
7182         * infrun.c: Update.
7183         * linux-nat.c: Update.
7184         * mi/mi-interp.c: Update.
7185         * remote.c: Update.
7186         * thread.c: Update.
7187
7188 2018-07-03  Tom Tromey  <tom@tromey.com>
7189
7190         * common/ptid.c (ptid_get_tid): Remove.
7191         * common/ptid.h (ptid_get_tid): Don't declare.
7192         * ada-tasks.c: Update.
7193         * aix-thread.c: Update.
7194         * bsd-uthread.c: Update.
7195         * darwin-nat.c: Update.
7196         * fbsd-nat.c: Update.
7197         * i386-darwin-nat.c: Update.
7198         * infrun.c: Update.
7199         * linux-tdep.c: Update.
7200         * nto-procfs.c: Update.
7201         * ppc-ravenscar-thread.c: Update.
7202         * python/py-infthread.c: Update.
7203         * ravenscar-thread.c: Update.
7204         * sol-thread.c: Update.
7205         * sparc-ravenscar-thread.c: Update.
7206         * windows-nat.c: Update.
7207
7208 2018-07-03  Tom Tromey  <tom@tromey.com>
7209
7210         * common/ptid.c (ptid_get_lwp): Remove.
7211         * common/ptid.h (ptid_get_lwp): Don't declare.
7212         * aarch64-linux-nat.c: Update.
7213         * ada-tasks.c: Update.
7214         * aix-thread.c: Update.
7215         * amd64-linux-nat.c: Update.
7216         * arm-linux-nat.c: Update.
7217         * corelow.c: Update.
7218         * fbsd-nat.c: Update.
7219         * fbsd-tdep.c: Update.
7220         * gnu-nat.c: Update.
7221         * i386-cygwin-tdep.c: Update.
7222         * i386-gnu-nat.c: Update.
7223         * i386-linux-nat.c: Update.
7224         * ia64-linux-nat.c: Update.
7225         * inf-ptrace.c: Update.
7226         * infrun.c: Update.
7227         * linux-fork.c: Update.
7228         * linux-nat.c: Update.
7229         * linux-tdep.c: Update.
7230         * linux-thread-db.c: Update.
7231         * mips-linux-nat.c: Update.
7232         * nat/aarch64-linux-hw-point.c: Update.
7233         * nat/aarch64-linux.c: Update.
7234         * nat/linux-btrace.c: Update.
7235         * nat/linux-osdata.c: Update.
7236         * nat/linux-procfs.c: Update.
7237         * nat/x86-linux-dregs.c: Update.
7238         * obsd-nat.c: Update.
7239         * ppc-fbsd-nat.c: Update.
7240         * ppc-linux-nat.c: Update.
7241         * procfs.c: Update.
7242         * python/py-infthread.c: Update.
7243         * ravenscar-thread.c: Update.
7244         * remote.c: Update.
7245         * s390-linux-nat.c: Update.
7246         * sol-thread.c: Update.
7247         * sol2-tdep.c: Update.
7248         * spu-linux-nat.c: Update.
7249         * x86-linux-nat.c: Update.
7250         * xtensa-linux-nat.c: Update.
7251
7252 2018-07-03  Tom Tromey  <tom@tromey.com>
7253
7254         * common/ptid.c (ptid_get_pid): Remove.
7255         * common/ptid.h (ptid_get_pid): Don't declare.
7256         * aarch64-linux-nat.c: Update.
7257         * ada-lang.c: Update.
7258         * aix-thread.c: Update.
7259         * alpha-bsd-nat.c: Update.
7260         * amd64-fbsd-nat.c: Update.
7261         * amd64-linux-nat.c: Update.
7262         * arm-linux-nat.c: Update.
7263         * arm-nbsd-nat.c: Update.
7264         * auxv.c: Update.
7265         * break-catch-syscall.c: Update.
7266         * breakpoint.c: Update.
7267         * bsd-uthread.c: Update.
7268         * corelow.c: Update.
7269         * ctf.c: Update.
7270         * darwin-nat.c: Update.
7271         * fbsd-nat.c: Update.
7272         * fbsd-tdep.c: Update.
7273         * gcore.c: Update.
7274         * gnu-nat.c: Update.
7275         * hppa-nbsd-nat.c: Update.
7276         * hppa-obsd-nat.c: Update.
7277         * i386-fbsd-nat.c: Update.
7278         * ia64-linux-nat.c: Update.
7279         * inf-ptrace.c: Update.
7280         * infcmd.c: Update.
7281         * inferior.c: Update.
7282         * inferior.h: Update.
7283         * inflow.c: Update.
7284         * infrun.c: Update.
7285         * linux-fork.c: Update.
7286         * linux-nat.c: Update.
7287         * linux-tdep.c: Update.
7288         * linux-thread-db.c: Update.
7289         * m68k-bsd-nat.c: Update.
7290         * mi/mi-interp.c: Update.
7291         * mi/mi-main.c: Update.
7292         * mips-linux-nat.c: Update.
7293         * mips-nbsd-nat.c: Update.
7294         * mips64-obsd-nat.c: Update.
7295         * nat/aarch64-linux-hw-point.c: Update.
7296         * nat/aarch64-linux.c: Update.
7297         * nat/linux-btrace.c: Update.
7298         * nat/linux-osdata.c: Update.
7299         * nat/linux-procfs.c: Update.
7300         * nat/x86-linux-dregs.c: Update.
7301         * nto-procfs.c: Update.
7302         * obsd-nat.c: Update.
7303         * ppc-linux-nat.c: Update.
7304         * ppc-nbsd-nat.c: Update.
7305         * ppc-obsd-nat.c: Update.
7306         * proc-service.c: Update.
7307         * procfs.c: Update.
7308         * python/py-inferior.c: Update.
7309         * python/py-infthread.c: Update.
7310         * ravenscar-thread.c: Update.
7311         * record.c: Update.
7312         * remote-sim.c: Update.
7313         * remote.c: Update.
7314         * rs6000-nat.c: Update.
7315         * s390-linux-nat.c: Update.
7316         * sh-nbsd-nat.c: Update.
7317         * sol-thread.c: Update.
7318         * sparc-nat.c: Update.
7319         * sparc64-tdep.c: Update.
7320         * spu-linux-nat.c: Update.
7321         * spu-tdep.c: Update.
7322         * target-debug.h: Update.
7323         * target.c: Update.
7324         * thread.c: Update.
7325         * tid-parse.c: Update.
7326         * tracefile-tfile.c: Update.
7327         * vax-bsd-nat.c: Update.
7328         * windows-nat.c: Update.
7329         * x86-linux-nat.c: Update.
7330         * x86-nat.c: Update.
7331
7332 2018-07-03  Tom Tromey  <tom@tromey.com>
7333
7334         * common/ptid.c (pid_to_ptid): Remove.
7335         * common/ptid.h (pid_to_ptid): Don't declare.
7336         * aix-thread.c: Update.
7337         * arm-linux-nat.c: Update.
7338         * common/ptid.c: Update.
7339         * common/ptid.h: Update.
7340         * corelow.c: Update.
7341         * ctf.c: Update.
7342         * darwin-nat.c: Update.
7343         * fbsd-nat.c: Update.
7344         * fork-child.c: Update.
7345         * gnu-nat.c: Update.
7346         * go32-nat.c: Update.
7347         * inf-ptrace.c: Update.
7348         * infcmd.c: Update.
7349         * inferior.c: Update.
7350         * infrun.c: Update.
7351         * linux-fork.c: Update.
7352         * linux-nat.c: Update.
7353         * nat/aarch64-linux-hw-point.c: Update.
7354         * nat/fork-inferior.c: Update.
7355         * nat/x86-linux-dregs.c: Update.
7356         * nto-procfs.c: Update.
7357         * obsd-nat.c: Update.
7358         * procfs.c: Update.
7359         * progspace.c: Update.
7360         * remote.c: Update.
7361         * rs6000-nat.c: Update.
7362         * s390-linux-nat.c: Update.
7363         * sol-thread.c: Update.
7364         * spu-linux-nat.c: Update.
7365         * target.c: Update.
7366         * top.c: Update.
7367         * tracefile-tfile.c: Update.
7368         * windows-nat.c: Update.
7369
7370 2018-07-03  Tom Tromey  <tom@tromey.com>
7371
7372         * common/ptid.h (ptid_build): Don't declare.
7373         * common/ptid.c (ptid_build): Remove.
7374         * aix-thread.c: Update.
7375         * bsd-kvm.c: Update.
7376         * bsd-uthread.c: Update.
7377         * common/agent.c: Update.
7378         * common/ptid.c: Update.
7379         * common/ptid.h: Update.
7380         * corelow.c: Update.
7381         * darwin-nat.c: Update.
7382         * fbsd-nat.c: Update.
7383         * gnu-nat.c: Update.
7384         * linux-fork.c: Update.
7385         * linux-nat.c: Update.
7386         * linux-thread-db.c: Update.
7387         * nat/linux-osdata.c: Update.
7388         * nat/linux-procfs.c: Update.
7389         * nto-procfs.c: Update.
7390         * obsd-nat.c: Update.
7391         * proc-service.c: Update.
7392         * procfs.c: Update.
7393         * ravenscar-thread.c: Update.
7394         * remote-sim.c: Update.
7395         * remote.c: Update.
7396         * sol-thread.c: Update.
7397         * target.c: Update.
7398         * windows-nat.c: Update.
7399
7400 2018-07-03  Tom Tromey  <tom@tromey.com>
7401
7402         * infrun.c (follow_exec): Use exit_inferior_silent.
7403         * inferior.c (exit_inferior_num_silent): Remove.
7404         * inferior.h (exit_inferior_num_silent): Don't declare.
7405
7406 2018-07-03  Tom Tromey  <tom@tromey.com>
7407
7408         PR cli/23340:
7409         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7410         inferior_ptid on error.
7411
7412 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7413             Simon Marchi  <simon.marchi@polymtl.ca>
7414
7415         PR tdep/8282
7416         * disasm.h (gdb_disassembler): Add
7417         `m_disassembler_options_holder'. member
7418         * disasm.c (get_all_disassembler_options): New function.
7419         (gdb_disassembler::gdb_disassembler): Use it.
7420         (gdb_buffered_insn_length_init_dis): Likewise.
7421         (gdb_buffered_insn_length): Adjust accordingly.
7422         (set_disassembler_options): Handle options with arguments.
7423         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7424         line if showing options with descriptions.
7425         (disassembler_options_completer): Adapt to using the
7426         `disasm_options_and_args_t' structure.
7427         * mips-tdep.c (mips_disassembler_options): New variable.
7428         (mips_disassembler_options_o32): Likewise.
7429         (mips_disassembler_options_n32): Likewise.
7430         (mips_disassembler_options_n64): Likewise.
7431         (gdb_print_insn_mips): Don't set `disassembler_options'.
7432         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7433         functions.
7434         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7435         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7436         `gdbarch_disassembler_options_implicit' and
7437         `gdbarch_valid_disassembler_options'.
7438         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7439         `disasm_options_and_args_t' structure.
7440         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7441         method.
7442         (valid_disassembler_options): Switch from `disasm_options_t' to
7443         the `disasm_options_and_args_t' structure.
7444         * NEWS: Document `set disassembler-options' support for the MIPS
7445         target.
7446         * gdbarch.h: Regenerate.
7447         * gdbarch.c: Regenerate.
7448
7449 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7450
7451         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7452
7453 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7454
7455         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7456         parameter in call to amd64_target_description.
7457         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7458         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7459         (amd64fbsd_init_abi): Likewise.
7460         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7461         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7462         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7463         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7464
7465 2018-06-29  Pedro Alves  <palves@redhat.com>
7466
7467         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7468         "segments" parameter.
7469         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7470         (_initialize_amd64_tdep): Update call to
7471         amd64_create_target_description.
7472         (amd64_target_description): Add "segments" parameter.  Adjust
7473         the implementation to use it.
7474         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7475         call to amd64_create_target_description.
7476         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7477         * gdb/arch/amd64.h (amd64_create_target_description): Add
7478         "segments" register.
7479         * gdb/arch/amd64.c (amd64_create_target_description): Add
7480         "segments" parameter.  Call create_feature_i386_64bit_segments
7481         only if SEGMENTS is true.
7482         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7483         call to amd64_create_target_description.
7484
7485 2018-06-29  Pedro Alves  <palves@redhat.com>
7486
7487         * thread.c (thread_target_id_str): New, factored out from ...
7488         (print_thread_info_1): ... here.  Use it to compute the max
7489         "Target Id" column width.
7490
7491 2018-06-29  Pedro Alves  <palves@redhat.com>
7492
7493         * remote.c (remote_target::extra_thread_info): Delete
7494         'display_buf' and 'n' locals.  from the cache, regardless of
7495         packet mechanims is in use.  Use cache for qThreadExtra and qP
7496         methods too.
7497
7498 2018-06-29  Pedro Alves  <palves@redhat.com>
7499
7500         * blockframe.c (find_pc_sect_containing_function): New function.
7501         * breakpoint.c (print_breakpoint_location): Don't call
7502         find_pc_sect_function.
7503         * linespec.c (create_sals_line_offset): Record the location's
7504         symbol in the sal.
7505         * linespec.c (convert_address_location_to_sals): Fill in sal's
7506         symbol with find_pc_sect_containing_function.
7507         * symtab.c (find_function_start_sal): Rename to ...
7508         (find_function_start_sal_1): ... this.
7509         (find_function_start_sal): Reimplement as wrapper around
7510         find_function_start_sal_1, and use
7511         find_pc_sect_containing_function to fill in the sal's symbol.
7512         (find_function_start_sal(symbol*, bool)): Adjust.
7513         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7514         comments.
7515         (find_pc_sect_containing_function): Declare.
7516
7517 2018-06-29  Pedro Alves  <palves@redhat.com>
7518
7519         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7520         true if the the location has no symbol.
7521
7522 2018-06-28  Tom Tromey  <tom@tromey.com>
7523
7524         * NEWS: Mention --enable-codesign.
7525         * silent-rules.mk (ECHO_SIGN): New variable.
7526         * configure.ac: Add --enable-codesign.
7527         * configure: Rebuild.
7528         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7529         (gdb$(EXEEXT)): Optionally invoke codesign.
7530
7531 2018-06-28  Pedro Alves  <palves@redhat.com>
7532
7533         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7534         comments.
7535         (switch_to_thread_no_regs): Adjust comment.
7536         * infcmd.c (stop_pc): Delete.
7537         (post_create_inferior, info_program_command): Replace references
7538         to stop_pc with references to thread_info->suspend.stop_pc.
7539         * inferior.h (stop_pc): Delete declaration.
7540         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7541         (handle_inferior_event_1, handle_signal_stop)
7542         (process_event_stop_test, keep_going_stepped_thread)
7543         (handle_step_into_function, handle_step_into_function_backward)
7544         (print_stop_location): Replace references to stop_pc with
7545         references to thread_info->suspend.stop_pc.
7546         (struct infcall_suspend_state) <stop_pc>: Delete field.
7547         (save_infcall_suspend_state, restore_infcall_suspend_state):
7548         Remove references to inf_stat->stop_pc.
7549         * linux-fork.c (fork_load_infrun_state): Likewise.
7550         * record-btrace.c (record_btrace_set_replay): Likewise.
7551         * record-full.c (record_full_goto_entry): Likewise.
7552         * remote.c (print_one_stopped_thread): Likewise.
7553         * target.c (target_resume): Extend comment.
7554         * thread.c (set_executing_thread): New.
7555         (set_executing): Use it.
7556         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7557         Remove references to stop_pc.
7558
7559 2018-06-28  Pedro Alves  <palves@redhat.com>
7560
7561         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7562         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7563
7564 2018-06-28  Tom Tromey  <tom@tromey.com>
7565
7566         * coffread.c (coff_symfile_finish): Update.
7567         * xcoffread.c (xcoff_symfile_finish): Update.
7568         * elfread.c (elf_symfile_finish): Update.
7569         * symfile.h (dwarf2_free_objfile): Don't declare.
7570         * dwarf2read.c (_initialize_dwarf2_read): Use
7571         register_objfile_data_with_cleanup.
7572         (dwarf2_free_objfile): Now static.  Change signature.
7573
7574 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7575
7576         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7577         option "-o" to add-symbol-file-load to add an offset to each
7578         section's load address.
7579         * symfile.c (set_objfile_default_section_offset): New function.
7580
7581 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7582
7583         * symfile.c (add_symbol_file_command): Make sure that sections
7584         with the same name are sorted in the same order.
7585
7586 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7587
7588         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7589         require the second argument.  If omitted, load sections at the
7590         addresses specified in the file.
7591
7592 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7593
7594         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7595         (_initialize_symfile): Add option "-o" to symbol-file to add an
7596         offset to each section of the symbol file.
7597
7598 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7599
7600         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7601
7602 2018-06-27  Tom Tromey  <tom@tromey.com>
7603
7604         * stack.c (_initialize_stack): Update "func" help text.
7605
7606 2018-06-27  Tom Tromey  <tom@tromey.com>
7607
7608         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7609         std::vector.
7610         (unwind_infopy_str, pyuw_create_unwind_info)
7611         (unwind_infopy_add_saved_register, pyuw_sniffer)
7612         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7613         Update.
7614         (struct saved_reg): Add constructor.
7615         <value>: Now a gdbpy_ref<>.
7616
7617 2018-06-27  Tom Tromey  <tom@tromey.com>
7618
7619         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7620
7621 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7622
7623         * gdb-gdb.py.in: Format using autopep8.
7624
7625 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7626
7627         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7628         (type_lookup_function): Recognize CORE_ADDR values.
7629
7630 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7631
7632         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7633         print tag_name.
7634
7635 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7636
7637         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7638         <__lt__>: Add.
7639
7640 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7641
7642         * gdb-gdb.py: Move to...
7643         * gdb-gdb.py.in: ... here.
7644         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7645         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7646         dependencies.
7647         (distclean): Remove gdb-gdb.py when cleaning.
7648         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7649         * configure: Re-generate.
7650
7651 2018-06-27  Pedro Alves  <palves@redhat.com>
7652
7653         * proc-service.c (get_ps_regcache): New.
7654         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7655         (ps_lsetfpregs): Use it.
7656
7657 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7658
7659         PR gdb/21695
7660         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7661         declaration.
7662         (dwarf_decode_lines_1): Adjust.
7663
7664 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7665
7666         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7667         override.
7668         <info_proc>: Likewise.
7669
7670 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7671
7672         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7673         to windows_fetch_one_register, and only handle the case of
7674         fetching one register.  Move the code that reloads the context
7675         and iterates over all registers if R is negative to...
7676         (windows_nat_target::fetch_registers): ... here.
7677         (do_windows_store_inferior_registers): Rename to
7678         windows_store_one_register, and only handle the case of storing
7679         one register.  Move the code that handles the case where r is
7680         negative to...
7681         (windows_nat_target::store_registers) ... here.
7682
7683 2018-06-26  Tom Tromey  <tom@tromey.com>
7684
7685         PR rust/22574:
7686         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7687         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7688         Update.
7689         (rust_internal_print_type): Add podata parameter.
7690         (rust_print_type): Update.
7691
7692 2018-06-26  Tom Tromey  <tom@tromey.com>
7693
7694         * typeprint.h (struct print_offset_data) <update, finish,
7695         maybe_print_hole>: New methods.
7696         <indentation>: New constant.
7697         * typeprint.c (print_offset_data::indentation): Define.
7698         (print_offset_data::maybe_print_hole, print_offset_data::update)
7699         (print_offset_data::finish): Move from c-typeprint.c and rename.
7700         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7701         (print_spaces_filtered_with_print_options): Update.
7702         (c_print_type_union_field_offset, maybe_print_hole)
7703         (c_print_type_struct_field_offset): Move to typeprint.c and
7704         rename.
7705         (c_type_print_base_struct_union): Update.
7706
7707 2018-06-25  Pedro Alves  <palves@redhat.com>
7708
7709         * gdbthread.h (thread_info_ref, delete_thread)
7710         (delete_thread_silent, first_thread_of_inferior)
7711         (any_thread_of_inferior, switch_to_thread)
7712         (enable_thread_stack_temporaries)
7713         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7714         (get_last_thread_stack_temporary)
7715         (value_in_thread_stack_temporaries, can_access_registers_thread):
7716         Spell out "struct thread_info" instead of just "thread_info".
7717         * inferior.h (notice_new_inferior): Likewise.
7718
7719 2018-06-25  Pedro Alves  <palves@redhat.com>
7720
7721         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7722         pass thread_info pointer to delete_thread.
7723         (windows_nat_target::detach): Pass inferior pointer to
7724         detach_inferior.
7725         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7726         delete_thread.
7727         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7728         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7729         and pass a thread_info pointer to delete_thread.
7730         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7731         pass thread_info pointer to delete_thread.
7732         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7733         delete_thread_silent call.
7734         * procfs.c (procfs_target::detach): Pass inferior pointer to
7735         detach_inferior.
7736         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7737         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7738         delete_thread_silent call.
7739         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7740         pass thread_info pointer to delete_thread.
7741         (windows_nat_target::detach): Pass inferior pointer to
7742         delete_inferior.
7743
7744 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7745
7746         * regcache.c (readable_regcache::read_part): Fix asserts.
7747         (reg_buffer::raw_collect_part): New function.
7748         (regcache::write_part): Fix asserts.
7749         (reg_buffer::raw_supply_part): New function.
7750         (regcache::transfer_regset_register): New helper function.
7751         (regcache::transfer_regset): Call new functions.
7752         (regcache_supply_regset): Use gdb_byte*.
7753         (regcache::supply_regset): Likewise.
7754         (regcache_collect_regset): Likewise.
7755         (regcache::collect_regset): Likewise.
7756         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7757         (reg_buffer::raw_supply_part): Likewise.
7758         (regcache::transfer_regset_register): Likewise.
7759         (regcache::transfer_regset): Use gdb_byte*.
7760
7761 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7762
7763         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7764
7765 2018-06-21  Pedro Alves  <palves@redhat.com>
7766
7767         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7768         instead of a ptid_t.  All callers adjusted.
7769         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7770         adjusted.
7771         (print_ada_task_info, display_current_task_id, task_command_1):
7772         Adjust.
7773         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7774         inferior_thread.
7775         (breakpoint_kind): Adjust.
7776         (remove_breakpoints_pid): Rename to ...
7777         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7778         pointer.  All callers adjusted.
7779         (bpstat_clear_actions): Use inferior_thread.
7780         (get_bpstat_thread): New.
7781         (bpstat_do_actions): Use it.
7782         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7783         to take a thread_info pointer.  All callers adjusted.
7784         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7785         (breakpoint_re_set_thread): Use inferior_thread.
7786         * breakpoint.h (struct inferior): Forward declare.
7787         (bpstat_stop_status): Update.
7788         (remove_breakpoints_pid): Delete.
7789         (remove_breakpoints_inf): New.
7790         * bsd-uthread.c (bsd_uthread_target::wait)
7791         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7792         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7793         (maint_btrace_packet_history_cmd)
7794         (maint_btrace_clear_packet_history_cmd): Adjust.
7795         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7796         inferior_thread.
7797         * cli/cli-interp.c: Include "inferior.h".
7798         * common/refcounted-object.h (struct
7799         refcounted_object_ref_policy): New.
7800         * compile/compile-object-load.c: Include gdbthread.h.
7801         (store_regs): Use inferior_thread.
7802         * corelow.c (core_target::close): Use current_inferior.
7803         (core_target_open): Adjust to use first_thread_of_inferior and use
7804         the current inferior.
7805         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7806         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7807         <thread>: ... this new field.  All references adjusted.
7808         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7809         Take a thread_info pointer instead of a ptid_t.
7810         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7811         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7812         thread_info pointer instead of a ptid_t.
7813         * elfread.c: Include "inferior.h".
7814         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7815         Use inferior_thread.
7816         * eval.c (evaluate_subexp): Likewise.
7817         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7818         inferior_thread.
7819         * gdb_proc_service.h (struct thread_info): Forward declare.
7820         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7821         <thread>: ... this new field.  All references adjusted.
7822         * gdbarch.h, gdbarch.c: Regenerate.
7823         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7824         'thread' parameter.  All implementations and callers adjusted.
7825         * gdbthread.h (thread_info) <set_running>: New method.
7826         (delete_thread, delete_thread_silent): Take a thread_info pointer
7827         instead of a ptid.
7828         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7829         (first_thread_of_process): Delete, replaced by ...
7830         (first_thread_of_inferior): ... this new function.  All callers
7831         adjusted.
7832         (any_live_thread_of_process): Delete, replaced by ...
7833         (any_live_thread_of_inferior): ... this new function.  All callers
7834         adjusted.
7835         (switch_to_thread, switch_to_no_thread): Declare.
7836         (is_executing): Delete.
7837         (enable_thread_stack_temporaries): Update comment.
7838         <enable_thread_stack_temporaries>: Take a thread_info pointer
7839         instead of a ptid_t.  Incref the thread.
7840         <~enable_thread_stack_temporaries>: Decref the thread.
7841         <m_ptid>: Delete
7842         <m_thr>: New.
7843         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7844         (get_last_thread_stack_temporary)
7845         (value_in_thread_stack_temporaries, can_access_registers_thread):
7846         Take a thread_info pointer instead of a ptid_t.  All callers
7847         adjusted.
7848         * infcall.c (get_call_return_value): Use inferior_thread.
7849         (run_inferior_call): Work with thread pointers instead of ptid_t.
7850         (call_function_by_hand_dummy): Work with thread pointers instead
7851         of ptid_t.  Use thread_info_ref.
7852         * infcmd.c (proceed_thread_callback): Access thread's state
7853         directly.
7854         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7855         access thread's state directly.
7856         (continue_command): Use inferior_thread.
7857         (info_program_command): Use find_thread_ptid and access thread
7858         state directly.
7859         (proceed_after_attach_callback): Use thread state directly.
7860         (notice_new_inferior): Take a thread_info pointer instead of a
7861         ptid_t.  All callers adjusted.
7862         (exit_inferior): Take an inferior pointer instead of a pid.  All
7863         callers adjusted.
7864         (exit_inferior_silent): New.
7865         (detach_inferior): Delete.
7866         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7867         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7868         (detach_inferior_command, kill_inferior_command): Use
7869         find_inferior_id instead of valid_gdb_inferior_id and
7870         gdb_inferior_id_to_pid.
7871         (inferior_command): Use inferior and thread pointers.
7872         * inferior.h (struct thread_info): Forward declare.
7873         (notice_new_inferior): Take a thread_info pointer instead of a
7874         ptid_t.  All callers adjusted.
7875         (detach_inferior): Delete declaration.
7876         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7877         instead of a pid.  All callers adjusted.
7878         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7879         (valid_gdb_inferior_id): Delete.
7880         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7881         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7882         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7883         ...
7884         <inf>: ... this new field.
7885         <step_ptid>: Delete, replaced by ...
7886         <step_thread>: ... this new field.
7887         (get_displaced_stepping_state): Take an inferior pointer instead
7888         of a pid.  All callers adjusted.
7889         (displaced_step_in_progress_any_inferior): Adjust.
7890         (displaced_step_in_progress_thread): Take a thread pointer instead
7891         of a ptid_t.  All callers adjusted.
7892         (displaced_step_in_progress, add_displaced_stepping_state): Take
7893         an inferior pointer instead of a pid.  All callers adjusted.
7894         (get_displaced_step_closure_by_addr): Adjust.
7895         (remove_displaced_stepping_state): Take an inferior pointer
7896         instead of a pid.  All callers adjusted.
7897         (displaced_step_prepare_throw, displaced_step_prepare)
7898         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7899         All callers adjusted.
7900         (start_step_over): Adjust.
7901         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7902         displaced step queue.
7903         (do_target_resume): Adjust.
7904         (fetch_inferior_event): Use inferior_thread.
7905         (context_switch, get_inferior_stop_soon): Take an
7906         execution_control_state pointer instead of a ptid_t.  All callers
7907         adjusted.
7908         (switch_to_thread_cleanup): Delete.
7909         (stop_all_threads): Use scoped_restore_current_thread.
7910         * inline-frame.c: Include "gdbthread.h".
7911         (inline_state) <inline_state>: Take a thread pointer instead of a
7912         ptid_t.  All callers adjusted.
7913         <ptid>: Delete, replaced by ...
7914         <thread>: ... this new field.
7915         (find_inline_frame_state): Take a thread pointer instead of a
7916         ptid_t.  All callers adjusted.
7917         (skip_inline_frames, step_into_inline_frame)
7918         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7919         pointer instead of a ptid_t.  All callers adjusted.
7920         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7921         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7922         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7923         pointers directly.
7924         * linux-nat.c (get_detach_signal): Likewise.
7925         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7926         (thread_db_notice_clone): Adjust.
7927         (thread_db_find_new_threads_silently)
7928         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7929         a thread pointer instead of a ptid_t.  All callers adjusted.
7930         * mi/mi-cmd-var.c: Include "inferior.h".
7931         (mi_cmd_var_update_iter): Update to use thread pointers.
7932         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7933         inferior directly.
7934         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7935         out to ...
7936         (mi_output_running): ... this new function.
7937         (mi_on_resume_1): Adjust to use it.
7938         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7939         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7940         directly.
7941         (interrupt_thread_callback): : Adjust to use thread and inferior
7942         pointers.
7943         * proc-service.c: Include "gdbthread.h".
7944         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7945         * progspace-and-thread.c: Include "inferior.h".
7946         * progspace.c: Include "inferior.h".
7947         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7948         hold a reference to an inferior_object.
7949         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7950         inferior_thread.
7951         * python/py-inferior.c (struct inferior_object): Give the type a
7952         tag name instead of a typedef.
7953         (python_on_normal_stop): No need to check if the current thread is
7954         listed.
7955         (inferior_to_inferior_object): Change return type to
7956         inferior_object.  All callers adjusted.
7957         (find_thread_object): Delete, bits factored out to ...
7958         (thread_to_thread_object): ... this new function.
7959         * python/py-infthread.c (create_thread_object): Use
7960         inferior_to_inferior_object.
7961         (thpy_is_stopped): Use thread pointer directly.
7962         (gdbpy_selected_thread): Use inferior_thread.
7963         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7964         field, replaced with ...
7965         <thread>: ... this new field.  All users adjusted.
7966         (btpy_insn_or_gap_new): Drop const.
7967         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7968         callers adjusted.
7969         * python/py-record.c: Include "gdbthread.h".
7970         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7971         a ptid_t.  All callers adjusted.
7972         (gdbpy_current_recording): Use inferior_thread.
7973         * python/py-record.h (recpy_record_object) <ptid>: Delete
7974         field, replaced with ...
7975         <thread>: ... this new field.  All users adjusted.
7976         (recpy_element_object) <ptid>: Delete
7977         field, replaced with ...
7978         <thread>: ... this new field.  All users adjusted.
7979         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7980         a ptid_t.  All callers adjusted.
7981         * python/py-threadevent.c: Include "gdbthread.h".
7982         (get_event_thread): Use thread_to_thread_object.
7983         * python/python-internal.h (struct inferior_object): Forward
7984         declare.
7985         (find_thread_object, find_inferior_object): Delete declarations.
7986         (thread_to_thread_object, inferior_to_inferior_object): New
7987         declarations.
7988         * record-btrace.c: Include "inferior.h".
7989         (require_btrace_thread): Use inferior_thread.
7990         (record_btrace_frame_sniffer)
7991         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7992         (get_thread_current_frame): Use scoped_restore_current_thread and
7993         switch_to_thread.
7994         (get_thread_current_frame): Use thread pointer directly.
7995         (record_btrace_replay_at_breakpoint): Use thread's inferior
7996         pointer directly.
7997         * record-full.c: Include "inferior.h".
7998         * regcache.c: Include "gdbthread.h".
7999         (get_thread_arch_regcache): Use the inferior's address space
8000         directly.
8001         (get_thread_regcache, registers_changed_thread): New.
8002         * regcache.h (get_thread_regcache(thread_info *thread)): New
8003         overload.
8004         (registers_changed_thread): New.
8005         (remote_target) <remote_detach_1>: Swap order of parameters.
8006         (remote_add_thread): <remote_add_thread>: Return the new thread.
8007         (get_remote_thread_info(ptid_t)): New overload.
8008         (remote_target::remote_notice_new_inferior): Use thread pointers
8009         directly.
8010         (remote_target::process_initial_stop_replies): Use
8011         thread_info::set_running.
8012         (remote_target::remote_detach_1, remote_target::detach)
8013         (extended_remote_target::detach): Adjust.
8014         * stack.c (frame_show_address): Use inferior_thread.
8015         * target-debug.h (target_debug_print_thread_info_pp): New.
8016         * target-delegates.c: Regenerate.
8017         * target.c (default_thread_address_space): Delete.
8018         (memory_xfer_partial_1): Use current_inferior.
8019         (target_detach): Use current_inferior.
8020         (target_thread_address_space): Delete.
8021         (generic_mourn_inferior): Use current_inferior.
8022         * target.h (struct target_ops) <thread_address_space>: Delete.
8023         (target_thread_address_space): Delete.
8024         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
8025         pointers directly.
8026         (delete_thread_1, delete_thread, delete_thread_silent): Take a
8027         thread pointer instead of a ptid_t.  Adjust all callers.
8028         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8029         (first_thread_of_process): Delete, replaced by ...
8030         (first_thread_of_inferior): ... this new function.  All callers
8031         adjusted.
8032         (any_thread_of_process): Rename to ...
8033         (any_thread_of_inferior): ... this, and take an inferior pointer.
8034         (any_live_thread_of_process): Rename to ...
8035         (any_live_thread_of_inferior): ... this, and take an inferior
8036         pointer.
8037         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8038         (value_in_thread_stack_temporaries)
8039         (get_last_thread_stack_temporary): Take a thread pointer instead
8040         of a ptid_t.  Adjust all callers.
8041         (thread_info::set_running): New.
8042         (validate_registers_access): Use inferior_thread.
8043         (can_access_registers_ptid): Rename to ...
8044         (can_access_registers_thread): ... this, and take a thread
8045         pointer.
8046         (print_thread_info_1): Adjust to compare thread pointers instead
8047         of ptids.
8048         (switch_to_no_thread, switch_to_thread): Make extern.
8049         (scoped_restore_current_thread::~scoped_restore_current_thread):
8050         Use m_thread pointer directly.
8051         (scoped_restore_current_thread::scoped_restore_current_thread):
8052         Use inferior_thread.
8053         (thread_command): Use thread pointer directly.
8054         (thread_num_make_value_helper): Use inferior_thread.
8055         * top.c (execute_command): Use inferior_thread.
8056         * tui/tui-interp.c: Include "inferior.h".
8057         * varobj.c (varobj_create): Use inferior_thread.
8058         (value_of_root_1): Use find_thread_global_id instead of
8059         global_thread_id_to_ptid.
8060
8061 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
8062
8063         * regcache.c (readable_regcache::read_part): Avoid memcpy when
8064         possible.
8065         (regcache::write_part): Likewise.
8066         (readable_regcache::cooked_read_part): Update comment.
8067         (readable_regcache::cooked_write_part): Likewise.
8068         * regcache.h: (readable_regcache::read_part): Likewise.
8069         (regcache::write_part): Likewise.
8070
8071 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
8072             Dirk Schubert  <dirk.schubert@arm.com>
8073
8074         * aarch64-linux-nat.c (post_attach): New.
8075         (aarch64_linux_nat_target::post_attach): Override post_attach to
8076         record the number of hardware debug registers.
8077
8078 2018-06-20  Tom Tromey  <tom@tromey.com>
8079
8080         * python/py-param.c (add_setshow_generic): Make parameters const.
8081         (parmpy_init): Update.
8082
8083 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8084
8085         * regcache.h (regcache_cooked_read_ftype): Rename to...
8086         (register_read_ftype): ...this, change type to function_view.
8087         (class reg_buffer) <save>: Remove src parameter.
8088         (readonly_detached_regcache) <readonly_detached_regcache>: Make
8089         parameter non-const in first overload.  Remove src parameter in
8090         second overload.
8091         * regcache.c (do_cooked_read): Remove.
8092         (readonly_detached_regcache::readonly_detached_regcache): Make
8093         parameter non-const, adjust call to other constructor.
8094         (reg_buffer::save): Remove src parameter.
8095         * frame.c (do_frame_register_read): Remove.
8096         (frame_save_as_regcache): Use lambda function.
8097         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8098         parameter to ppu2spu_data *.
8099         (ppu2spu_sniffer): Use lambda function.
8100
8101 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8102
8103         * record-full.c (record_full_target::insert_breakpoint): Remove
8104         "struct" keyword, add const.
8105
8106 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
8107
8108         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8109         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8110         * configure.ac: Remove AC_PREREQ, add missing quoting.
8111         * gnulib/configure.ac: Modernize usage of
8112         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
8113         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8114         (AUTOMAKE_VERSION): Bump to 1.15.1.
8115         * configure: Re-generate.
8116         * config.in: Re-generate.
8117         * aclocal.m4: Re-generate.
8118         * gnulib/aclocal.m4: Re-generate.
8119         * gnulib/config.in: Re-generate.
8120         * gnulib/configure: Re-generate.
8121         * gnulib/import/Makefile.in: Re-generate.
8122
8123 2018-06-19  Pedro Alves  <palves@redhat.com>
8124
8125         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8126         (lookup_minimal_symbol_by_pc_section): ... here with
8127         gdb_assert_not_reached added.
8128
8129 2018-06-19  Pedro Alves  <palves@redhat.com>
8130
8131         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8132         parameter with a block parameter.  Compare location's block symbol
8133         with the frame's block instead of addresses.
8134         (skip_inline_frames): Pass the current block instead of the
8135         frame's address.  Break out as soon as we determine the frame
8136         should not be skipped.
8137
8138 2018-06-18  Tom Tromey  <tom@tromey.com>
8139
8140         * solib-aix.c (solib_aix_get_section_offsets): Return
8141         unique_xmalloc_ptr.
8142         (solib_aix_solib_create_inferior_hook): Update.
8143
8144 2018-06-18  Tom Tromey  <tom@tromey.com>
8145
8146         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8147
8148 2018-06-18  Tom Tromey  <tom@tromey.com>
8149
8150         * solib-frv.c (frv_relocate_main_executable): Use
8151         unique_xmalloc_ptr.
8152         * solib-dsbt.c (dsbt_relocate_main_executable): Use
8153         unique_xmalloc_ptr.
8154
8155 2018-06-18  Tom Tromey  <tom@tromey.com>
8156
8157         * objfiles.h (inhibit_section_map_updates): Update.
8158         (resume_section_map_updates, resume_section_map_updates_cleanup):
8159         Remove.
8160         * solib-svr4.c (svr4_handle_solib_event): Update.
8161         * objfiles.c (inhibit_section_map_updates): Return
8162         scoped_restore_tmpl<int>.
8163         (resume_section_map_updates, resume_section_map_updates_cleanup):
8164         Remove.
8165
8166 2018-06-18  Tom Tromey  <tom@tromey.com>
8167
8168         * valprint.h (read_string): Update.
8169         * valprint.c (read_string): Change type of "buffer".
8170         (val_print_string): Update.
8171         * python/py-value.c (valpy_string): Update.
8172         * language.h (struct language_defn) <la_get_string>: Change
8173         type of "buffer".
8174         (default_get_string, c_get_string): Update.
8175         * language.c (default_get_string): Change type of "buffer".
8176         * guile/scm-value.c (gdbscm_value_to_string): Update.
8177         * c-lang.c (c_get_string): Change type of "buffer".
8178
8179 2018-06-18  Tom Tromey  <tom@tromey.com>
8180
8181         * ser-mingw.c (struct pipe_state_destroyer): New.
8182         (pipe_state_up): New typedef.
8183         (cleanup_pipe_state): Remove.
8184         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
8185
8186 2018-06-18  Tom Tromey  <tom@tromey.com>
8187
8188         * rust-lang.h (rust_yyerror): Don't declare.
8189         * rust-lang.c (rust_language_defn): Update.
8190         * rust-exp.y (yyerror): Now static.
8191         * parse.c (parse_exp_in_context_1): Update.
8192         * p-lang.h (p_yyerror): Don't declare.
8193         * p-lang.c (p_language_defn): Update.
8194         * p-exp.y (yyerror): Now static.
8195         * opencl-lang.c (opencl_language_defn): Update.
8196         * objc-lang.c (objc_language_defn): Update.
8197         * m2-lang.h (m2_yyerror): Don't declare.
8198         * m2-lang.c (m2_language_defn): Update.
8199         * m2-exp.y (yyerror): Now static.
8200         * language.h (struct language_defn) <la_error>: Remove.
8201         * language.c (unk_lang_error): Remove.
8202         (unknown_language_defn, auto_language_defn): Remove.
8203         * go-lang.h (go_yyerror): Don't declare.
8204         * go-lang.c (go_language_defn): Update.
8205         * go-exp.y (yyerror): Now static.
8206         * f-lang.h (f_yyerror): Don't declare.
8207         * f-lang.c (f_language_defn): Update.
8208         * f-exp.y (yyerror): Now static.
8209         * d-lang.h (d_yyerror): Don't declare.
8210         * d-lang.c (d_language_defn): Update.
8211         * d-exp.y (yyerror): Now static.
8212         * c-lang.h (c_yyerror): Don't declare.
8213         * c-lang.c (c_language_defn, cplus_language_defn)
8214         (asm_language_defn, minimal_language_defn): Update.
8215         * c-exp.y (yyerror): Now static.
8216         * ada-lang.h (ada_yyerror): Don't declare.
8217         * ada-lang.c (ada_language_defn): Update.
8218         * ada-exp.y (yyerror): Now static.
8219
8220 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8221
8222         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8223         (store_sveregs_to_thread): Likewise.
8224         (aarch64_linux_fetch_inferior_registers): Check for SVE.
8225         (aarch64_linux_store_inferior_registers): Likewise.
8226         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8227         function.
8228         (aarch64_sve_regs_copy_to_regcache): Likewise.
8229         (aarch64_sve_regs_copy_from_regcache): Likewise.
8230         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8231         declaration.
8232         (aarch64_sve_regs_copy_to_regcache): Likewise.
8233         (aarch64_sve_regs_copy_from_regcache): Likewise.
8234         (sve_context): Structure from Linux headers.
8235         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8236         (SVE_SIG_ZREG_SIZE): Likewise.
8237         (SVE_SIG_PREG_SIZE): Likewise.
8238         (SVE_SIG_FFR_SIZE): Likewise.
8239         (SVE_SIG_REGS_OFFSET): Likewise.
8240         (SVE_SIG_ZREGS_OFFSET): Likewise.
8241         (SVE_SIG_ZREG_OFFSET): Likewise.
8242         (SVE_SIG_ZREGS_SIZE): Likewise.
8243         (SVE_SIG_PREGS_OFFSET): Likewise.
8244         (SVE_SIG_PREG_OFFSET): Likewise.
8245         (SVE_SIG_PREGS_SIZE): Likewise.
8246         (SVE_SIG_FFR_OFFSET): Likewise.
8247         (SVE_SIG_REGS_SIZE): Likewise.
8248         (SVE_SIG_CONTEXT_SIZE): Likewise.
8249         (SVE_PT_REGS_MASK): Likewise.
8250         (SVE_PT_REGS_FPSIMD): Likewise.
8251         (SVE_PT_REGS_SVE): Likewise.
8252         (SVE_PT_VL_INHERIT): Likewise.
8253         (SVE_PT_VL_ONEXEC): Likewise.
8254         (SVE_PT_REGS_OFFSET): Likewise.
8255         (SVE_PT_FPSIMD_OFFSET): Likewise.
8256         (SVE_PT_FPSIMD_SIZE): Likewise.
8257         (SVE_PT_SVE_ZREG_SIZE): Likewise.
8258         (SVE_PT_SVE_PREG_SIZE): Likewise.
8259         (SVE_PT_SVE_FFR_SIZE): Likewise.
8260         (SVE_PT_SVE_FPSR_SIZE): Likewise.
8261         (SVE_PT_SVE_FPCR_SIZE): Likewise.
8262         (__SVE_SIG_TO_PT): Likewise.
8263         (SVE_PT_SVE_OFFSET): Likewise.
8264         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8265         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8266         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8267         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8268         (SVE_PT_SVE_PREG_OFFSET): Likewise.
8269         (SVE_PT_SVE_PREGS_SIZE): Likewise.
8270         (SVE_PT_SVE_FFR_OFFSET): Likewise.
8271         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8272         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8273         (SVE_PT_SVE_SIZE): Likewise.
8274         (SVE_PT_SIZE): Likewise.
8275         (HAS_SVE_STATE): New define.
8276
8277 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8278
8279         * nat/aarch64-sve-linux-sigcontext.h: New file.
8280         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8281         new files.
8282         (SVE_VQ_MIN): Likewise.
8283         (SVE_VQ_MAX): Likewise.
8284         (SVE_VL_MIN): Likewise.
8285         (SVE_VL_MAX): Likewise.
8286         (SVE_NUM_ZREGS): Likewise.
8287         (SVE_NUM_PREGS): Likewise.
8288         (sve_vl_valid): Likewise.
8289         (struct user_sve_header): Likewise.
8290
8291 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
8292             Richard Bunt <Richard.Bunt@arm.com>
8293
8294         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8295         was requested by GDB.
8296
8297 2018-06-15  Tom de Vries  <tdevries@suse.de>
8298
8299         * MAINTAINERS (Write After Approval): Add Tom de Vries.
8300
8301 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
8302
8303         * gnulib/update-gnulib.sh: Print expected versions of
8304         autoconf/aclocal.
8305
8306 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
8307
8308         * arch-utils.c (default_type_align): Use type_length_units.
8309         * gdbtypes.c (type_align): Use type_length_units.
8310
8311 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8312
8313         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8314         of 'define' command.
8315
8316 2018-06-14  Tom de Vries  <tdevries@suse.de>
8317
8318         PR cli/22573
8319         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8320         get_no_prettyformat_print_options.
8321
8322 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8323
8324         * sparc-nat.h: Include target.h.
8325         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8326         <fetch_registers>: Remove this argument in function call.
8327         <store_registers>: Remove this argument in function call, remove
8328         extra semicolon.
8329         <low_forget_process>: Call sparc64_forget_process instead of
8330         sparc_forget_process.
8331
8332 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8333
8334         * procfs.c (_initialize_procfs): Use add_inf_child_target.
8335         (procfs_target::make_corefile_notes): Adjust to new
8336         target_read_alloc return type.
8337
8338 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8339             Stephen Roberts  <stephen.roberts@arm.com>
8340
8341         PR gdb/22882
8342         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8343         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8344         Move should_notify_stop local into more inner scope.
8345
8346 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8347             Stephen Roberts  <stephen.roberts@arm.com>
8348
8349         PR gdb/22882
8350         * infrun.c (resume_1): Add call to mark_async_event_handler.
8351
8352 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8353
8354         * infrun.c (do_target_wait): Change old version of $pc printed.
8355
8356 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8357
8358         * dwarf2read.c (read_index_from_section): Rename to...
8359         (read_gdb_index_from_section): ... this, update all callers.
8360         (dwarf2_read_index): Rename to...
8361         (dwarf2_read_gdb_index): ... this, update all callers.
8362
8363 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
8364
8365         * hppa-linux-nat.c
8366         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8367         hppa_linux_nat_target::fetch_registers.
8368
8369 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8370
8371         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8372         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8373         (AARCH64_DWARF_SVE_FFR): Likewise.
8374         (AARCH64_DWARF_SVE_P0): Likewise.
8375         (AARCH64_DWARF_SVE_Z0): Likewise.
8376
8377 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8378
8379         * common/common-regcache.h (raw_compare): New function.
8380         * regcache.c (regcache::raw_compare): Likewise.
8381         * regcache.h (regcache::raw_compare): New declaration.
8382
8383 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8384
8385         * common/common-regcache.h (reg_buffer_common): New structure.
8386         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8387         (reg_buffer::raw_supply): Likewise.
8388         (reg_buffer::raw_supply_integer): Likewise.
8389         (reg_buffer::raw_supply_zeroed): Likewise.
8390         (reg_buffer::raw_collect): Likewise.
8391         (reg_buffer::raw_collect_integer): Likewise.
8392         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8393         (reg_buffer::raw_supply): Likewise.
8394         (reg_buffer::raw_supply_integer): Likewise.
8395         (reg_buffer::raw_supply_zeroed): Likewise.
8396         (reg_buffer::raw_collect): Likewise.
8397         (reg_buffer::raw_collect_integer): Likewise.
8398
8399 2018-06-10  Tom Tromey  <tom@tromey.com>
8400
8401         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8402         (class remote_state) <stop_reply_queue>: Now std::vector.
8403         (remote_state::~remote_state)
8404         (remote_target::stop_reply_queue_length): Update.
8405         (struct queue_iter_param, remove_child_of_pending_fork)
8406         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8407         (check_pending_event_prevents_wildcard_vcont_callback)
8408         (remove_stop_reply_for_inferior)
8409         (remove_stop_reply_of_remote_state)
8410         (remote_notif_remove_once_on_match)
8411         (stop_reply_match_ptid_and_ws)
8412         (remote_kill_child_of_pending_fork): Remove.
8413         (remote_target::remove_new_fork_children)
8414         (remote_target::check_pending_events_prevent_wildcard_vcont)
8415         (remote_target::discard_pending_stop_replies)
8416         (remote_target::discard_pending_stop_replies_in_queue)
8417         (remote_target::remote_notif_remove_queued_reply)
8418         (remote_target::queued_stop_reply)
8419         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8420         (remote_target::wait, remote_target::kill_new_fork_children)
8421         (remote_target::async): Update.
8422
8423 2018-06-10  Tom Tromey  <tom@tromey.com>
8424
8425         * record-full.c (record_full_arch_list_cleanups): Remove.
8426         (record_full_message): Use try/catch.
8427         (record_full_wait_cleanups): Remove.
8428         (record_full_wait_1): Use try/catch.
8429         (record_full_restore): Likewise.
8430
8431 2018-06-10  Tom Tromey  <tom@tromey.com>
8432
8433         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8434         declare VEC.  Add constructor.
8435         <in_target_beneath>: Now bool.
8436         (record_full_breakpoints): Now a std::vector, static.
8437         (record_full_sync_record_breakpoints)
8438         (record_full_init_record_breakpoints)
8439         (record_full_target::insert_breakpoint)
8440         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8441
8442 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8443
8444         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8445         * serial.c (serial_interface_lookup): Remove struct keyword.
8446
8447 2018-06-10  Tom Tromey  <tom@tromey.com>
8448
8449         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8450         method.
8451         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8452         a method.
8453         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8454         method.
8455         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8456         "beneath" as a method.
8457         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8458         Use "beneath" as a method.
8459
8460 2018-06-10  Tom Tromey  <tom@tromey.com>
8461
8462         * tracefile.c (struct trace_file_writer_deleter): New.
8463         <operator()>: Rename from trace_file_writer_xfree.
8464         (trace_file_writer_up): New typedef.
8465         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8466
8467 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8468
8469         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8470         <m_registers, m_register_status>: Change type to
8471         std::unique_ptr.
8472         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8473         XCNEWVEC.
8474
8475 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8476
8477         * common/common-regcache.h (enum register_status): Add
8478         underlying type "signed char".
8479         * regcache.h (reg_buffer) <m_register_status>: Change type to
8480         register_status *.
8481         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8482         register_status instead of signed char.
8483         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8484         (reg_buffer::get_register_status): Remove cast.
8485         (readable_regcache::raw_read): Remove cast.
8486         (readable_regcache::cooked_read): Remove cast.
8487
8488 2018-06-09  Tom Tromey  <tom@tromey.com>
8489
8490         * source.c (reverse_search_command, forward_search_command): Use
8491         scoped_fd.
8492
8493 2018-06-09  Tom Tromey  <tom@tromey.com>
8494
8495         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8496         (serial_ops_list): Now static, std::vector.
8497         (serial_interface_lookup, serial_add_interface): Update.
8498
8499 2018-06-09  Tom Tromey  <tom@tromey.com>
8500
8501         * dwarf2read.c (process_cu_includes): Update.
8502         (process_full_comp_unit): Update.
8503         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8504         std::vector.
8505
8506 2018-06-08  Paul Koning  <paul_koning@dell.com>
8507
8508         PR gdb/23252
8509
8510         * python/python.c (do_start_initialization):
8511         Avoid call to internal Python API.
8512         (init__gdb_module): New function.
8513
8514 2018-06-08  Gary Benson <gbenson@redhat.com>
8515
8516         * linux-thread-db.c (valprint.h): New include.
8517         (struct check_thread_db_info): New structure.
8518         (check_thread_db_on_load, tdb_testinfo): New static globals.
8519         (check_thread_db, check_thread_db_callback): New functions.
8520         (try_thread_db_load_1): Run integrity checks if requested.
8521         (maintenance_check_libthread_db): New function.
8522         (_initialize_thread_db): Register "maint check libthread-db"
8523         and "maint set/show check-libthread-db".
8524         * NEWS: Mention the above new commands.
8525
8526 2018-06-08  Tom Tromey  <tom@tromey.com>
8527
8528         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8529         now a method.
8530
8531 2018-06-08  Tom Tromey  <tom@tromey.com>
8532
8533         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8534
8535 2018-06-08  Tom Tromey  <tom@tromey.com>
8536
8537         * common/btrace-common.h (struct btrace_data): Add constructor,
8538         destructor, move assignment operator.
8539         <empty, clear, fini>: New methods.
8540         <format>: Initialize.
8541         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8542         (btrace_data_empty): Don't declare.
8543         * common/btrace-common.c (btrace_data_init): Remove.
8544         (btrace_data::fini): Rename from btrace_data_fini.
8545         (btrace_data::empty): Rename from btrace_data_empty.
8546         (btrace_data::clear): Rename from btrace_data_clear.  Return
8547         bool.
8548         * btrace.h (make_cleanup_btrace_data): Don't declare.
8549         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8550         (parse_xml_btrace): Update.
8551         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8552         (maint_btrace_clear_packet_history_cmd): Update.
8553
8554 2018-06-07  Pedro Alves  <palves@redhat.com>
8555
8556         * target.h (target_ops) <beneath>: Now a method.  All references
8557         updated.
8558         (class target_stack): New.
8559         * target.c (g_target_stack): New.
8560         (g_current_top_target): Delete.
8561         (current_top_target): Get the top target out of g_target_stack.
8562         (target_stack::push, target_stack::unpush): New.
8563         (push_target, unpush_target): Reimplement.
8564         (target_is_pushed): Reimplement in terms of g_target_stack.
8565         (target_ops::beneath, target_stack::find_beneath): New.
8566
8567 2018-06-07  Pedro Alves  <palves@redhat.com>
8568
8569         * target.h (find_target_beneath): Delete declaration.
8570         * target.c (find_target_beneath): Delete definition.
8571         * aix-thread.c: All callers of find_target_beneath adjusted to
8572         call target_ops::beneath instead.
8573         * bsd-uthread.c: Likewise.
8574         * linux-thread-db.c: Likewise.
8575         * ravenscar-thread.c: Likewise.
8576         * sol-thread.c: Likewise.
8577         * spu-multiarch.c: Likewise.
8578
8579 2018-06-07  Pedro Alves  <palves@redhat.com>
8580
8581         * target.h (target_ops) <beneath>: Now a method.  All references
8582         updated.
8583         (target_ops) <m_beneath>: New.
8584         * target.c (target_ops::beneath): New.
8585         * corelow.c: Adjust all references to target_ops::beneath.
8586         * linux-thread-db.c: Likewise.
8587         * make-target-delegates: Likewise.
8588         * record-btrace.c: Likewise.
8589         * record-full.c: Likewise.
8590         * remote.c: Likewise.
8591         * target.c: Likewise.
8592         * target-delegates.c: Regenerate.
8593
8594 2018-06-07  Pedro Alves  <palves@redhat.com>
8595
8596         * target.h (target_stack): Delete.
8597         (current_top_target): Declare function.
8598         * target.c (target_stack): Delete.
8599         (g_current_top_target): New.
8600         (current_top_target): New function.
8601         * auxv.c: Use current_top_target instead of target_stack
8602         throughout.
8603         * avr-tdep.c: Likewise.
8604         * breakpoint.c: Likewise.
8605         * corefile.c: Likewise.
8606         * elfread.c: Likewise.
8607         * eval.c: Likewise.
8608         * exceptions.c: Likewise.
8609         * frame.c: Likewise.
8610         * gdbarch-selftests.c: Likewise.
8611         * gnu-v3-abi.c: Likewise.
8612         * ia64-tdep.c: Likewise.
8613         * ia64-vms-tdep.c: Likewise.
8614         * infcall.c: Likewise.
8615         * infcmd.c: Likewise.
8616         * infrun.c: Likewise.
8617         * linespec.c: Likewise.
8618         * linux-tdep.c: Likewise.
8619         * minsyms.c: Likewise.
8620         * ppc-linux-nat.c: Likewise.
8621         * ppc-linux-tdep.c: Likewise.
8622         * procfs.c: Likewise.
8623         * regcache.c: Likewise.
8624         * remote.c: Likewise.
8625         * rs6000-tdep.c: Likewise.
8626         * s390-linux-nat.c: Likewise.
8627         * s390-tdep.c: Likewise.
8628         * solib-aix.c: Likewise.
8629         * solib-darwin.c: Likewise.
8630         * solib-dsbt.c: Likewise.
8631         * solib-spu.c: Likewise.
8632         * solib-svr4.c: Likewise.
8633         * solib-target.c: Likewise.
8634         * sparc-tdep.c: Likewise.
8635         * sparc64-tdep.c: Likewise.
8636         * spu-tdep.c: Likewise.
8637         * symfile.c: Likewise.
8638         * symtab.c: Likewise.
8639         * target-descriptions.c: Likewise.
8640         * target-memory.c: Likewise.
8641         * target.c: Likewise.
8642         * target.h: Likewise.
8643         * tracefile-tfile.c: Likewise.
8644         * tracepoint.c: Likewise.
8645         * valops.c: Likewise.
8646         * valprint.c: Likewise.
8647         * value.c: Likewise.
8648         * windows-tdep.c: Likewise.
8649         * mi/mi-main.c: Likewise.
8650
8651 2018-06-07  Tom Tromey  <tom@tromey.com>
8652
8653         * valprint.h (build_address_symbolic): Declare.
8654         * printcmd.c (print_address_symbolic): Update.
8655         (build_address_symbolic): Change "name" and "filename" to
8656         std::string.
8657         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8658         Update.
8659         * defs.h (build_address_symbolic): Remove declaration.
8660
8661 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8662
8663         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8664         (aarch64_vnv_type): Add function.
8665         (aarch64_pseudo_register_name): Add V regs for SVE.
8666         (aarch64_pseudo_register_type): Likewise.
8667         (aarch64_pseudo_register_reggroup_p): Likewise.
8668         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8669         (aarch64_pseudo_read_value): Add V regs for SVE.
8670         (aarch64_pseudo_write_2): Use V0 offset for SVE
8671         (aarch64_pseudo_write): Add V regs for SVE.
8672         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8673
8674 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8675
8676         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8677         (sve_vl_from_vq): Likewise.
8678
8679 2018-06-05  Tom Tromey  <tom@tromey.com>
8680
8681         * cli/cli-cmds.c (show_version): Update.
8682         * top.c (print_gdb_version): Add "interactive" parameter.
8683         Update.
8684         * main.c (captured_main_1): Update.
8685         * top.h (print_gdb_version): Add "interactive" parameter and a
8686         comment.
8687
8688 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8689
8690         * common/enum-flags.h: Add trailing semicolon to example in
8691         comment.
8692
8693 2018-06-05  Tom Tromey  <tom@tromey.com>
8694
8695         PR cli/12326:
8696         * NEWS: Add entry about pager.
8697         * utils.c (pagination_disabled_for_command): New global.
8698         (prompt_for_continue): Allow "c" response to prompt.
8699         (reinitialize_more_filter): Clear
8700         pagination_disabled_for_command.
8701         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8702
8703 2018-06-04  Tom Tromey  <tom@tromey.com>
8704
8705         * ada-lang.h (ada_lookup_symbol_list): Update.
8706         * ada-lang.c (resolve_subexp): Update.
8707         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8708         parameter.
8709         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8710         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8711         results parameter to std::vector.
8712         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8713         Update.
8714         * ada-exp.y (block_lookup): Update.
8715         (select_possible_type_sym): Change type of syms.  Remove nsyms
8716         parameter.
8717         (write_var_or_type, write_name_assoc): Update.
8718
8719 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8720
8721         * windows-nat.c (windows_nat_target::xfer_partial): Return
8722         TARGET_XFER_E_IO if we need to delegate to the target beneath
8723         but BENEATH is NULL.
8724
8725 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8726
8727         * Makefile.in (config.status): Add configure.nat as a
8728         dependency.
8729
8730 2018-06-04  Tom Tromey  <tom@tromey.com>
8731
8732         * cp-name-parser.y (cpname_state): Add method declarations.
8733         (HANDLE_QUAL): Update.
8734         (cpname_state::d_grab, cpname_state::fill_comp)
8735         (cpname_state::make_operator, cpname_state::make_dtor)
8736         (cpname_state::make_builtin_type, cpname_state::make_name)
8737         (cpname_state::d_qualify, cpname_state::d_int_type)
8738         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8739         (%union): Move earlier.
8740
8741 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8742
8743         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8744
8745 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8746
8747         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8748         (aarch64_pseudo_write_1): Likewise.
8749         (aarch64_pseudo_read_value): Use helper.
8750         (aarch64_pseudo_write): Likewise.
8751
8752 2018-06-04  Pedro Alves  <palves@redhat.com>
8753
8754         * darwin-nat.c (darwin_ops): Delete.
8755         (darwin_attach_pid): Use get_native_target.
8756
8757 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8758
8759         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8760         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8761
8762 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8763
8764         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8765         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8766         (aarch64_gdbarch_init): Check for SVE.
8767         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8768
8769 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8770
8771         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8772         * aarch64-tdep.h (aarch64_read_description): Likewise.
8773         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8774         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8775         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8776         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8777         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8778
8779 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8780
8781         * value.c (value_fetch_lazy_bitfield): New.
8782         (value_fetch_lazy_memory): New.
8783         (value_fetch_lazy_register): New.
8784         (value_fetch_lazy): Factor out to smaller functions.
8785
8786 2018-06-01  Tom Tromey  <tom@tromey.com>
8787
8788         * cp-name-parser.y (backslashable, represented): Now const.
8789
8790 2018-06-01  Tom Tromey  <tom@tromey.com>
8791
8792         * cp-name-parser.y: Include parser-defs.h.
8793         (parser_fprintf): Remove declaration.
8794
8795 2018-06-01  Tom Tromey  <tom@tromey.com>
8796
8797         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8798         %parse-param.
8799         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8800         (global_result): Remove globals.
8801         (struct cpname_state): New.
8802         (yyparse): Don't declare.
8803         (yylex, yyerror): Move declarations after %union.
8804         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8805         (make_name): Add state parameter.
8806         Update all callers.
8807         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8808         parameter.
8809         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8810         Update.
8811         (yylex): Add lvalp, state parameters.
8812         (yyerror): Add state parameter.
8813         (cp_demangled_name_to_comp): Update.
8814
8815 2018-06-01  Tom Tromey  <tom@tromey.com>
8816
8817         * cp-name-parser.y (parser_fprintf): Declare.
8818         (GDB_YY_REMAP_PREFIX): Define.
8819         Include yy-remap.h.  Don't redefine yy* identifiers.
8820
8821 2018-06-01  Tom Tromey  <tom@tromey.com>
8822
8823         * python/py-type.c (typy_legacy_template_argument): Update.
8824         * cp-support.h (cp_demangled_name_to_comp): Update.
8825         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8826         parameter to be a "std::string *".
8827         (main): Update.
8828
8829 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8830
8831         * ada-lex.l: Include "diagnostics.h" instead of
8832         "common/diagnostics.h".
8833         * unittests/environ-selftests.c: Likewise.
8834         * common/diagnostics.h: Moved to ../include.
8835
8836 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8837
8838         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8839         to language_mode_manual while calling breakpoint_re_set_one.
8840
8841 2018-06-01  Tom Tromey  <tom@tromey.com>
8842
8843         * valops.c (value_cast_structs, destructor_name_p): Update.
8844         * symtab.c (gdb_mangle_name): Update.
8845         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8846         Update.
8847         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8848         (pascal_object_print_value_fields, pascal_object_print_value):
8849         Update.
8850         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8851         * linespec.c (find_methods): Update.
8852         * gdbtypes.h (type_name_no_tag): Remove.
8853         (type_name_or_error): Rename from type_name_no_tag_or_error.
8854         * gdbtypes.c (type_name_no_tag): Remove.
8855         (type_name_or_error): Rename from type_name_no_tag_or_error.
8856         (lookup_struct_elt_type, check_typedef): Update.
8857         * expprint.c (print_subexp_standard): Update.
8858         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8859         * d-namespace.c (d_lookup_nested_symbol): Update.
8860         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8861         (cp_print_class_member): Update.
8862         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8863         * completer.c (add_struct_fields): Update.
8864         * c-typeprint.c (cp_type_print_derivation_info)
8865         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8866         Update.
8867         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8868         (ada_prefer_type, ada_is_exception_sym): Update.
8869
8870 2018-06-01  Tom Tromey  <tom@tromey.com>
8871
8872         * valops.c (enum_constant_from_type, value_namespace_elt)
8873         (value_maybe_namespace_elt): Update.
8874         * valarith.c (find_size_for_pointer_math): Update.
8875         * target-descriptions.c (make_gdb_type): Update.
8876         * symmisc.c (print_symbol): Update.
8877         * stabsread.c (define_symbol, read_type)
8878         (complain_about_struct_wipeout, add_undefined_type)
8879         (cleanup_undefined_types_1): Update.
8880         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8881         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8882         (rust_internal_print_type, rust_composite_type)
8883         (rust_evaluate_funcall, rust_evaluate_subexp)
8884         (rust_inclusive_range_type_p): Update.
8885         * python/py-type.c (typy_get_tag): Update.
8886         * p-typeprint.c (pascal_type_print_base): Update.
8887         * mdebugread.c (parse_symbol, parse_type): Update.
8888         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8889         Update.
8890         * guile/scm-type.c (gdbscm_type_tag): Update.
8891         * go-lang.c (sixg_string_p): Update.
8892         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8893         Update.
8894         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8895         (TYPE_TAG_NAME): Remove.
8896         * gdbtypes.c (type_name_no_tag): Simplify.
8897         (check_typedef, check_types_equal, recursive_dump_type)
8898         (copy_type_recursive, arch_composite_type): Update.
8899         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8900         in summary mode when needed.
8901         * eval.c (evaluate_funcall): Update.
8902         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8903         (process_structure_scope, read_enumeration_type)
8904         (read_namespace_type, read_module_type, determine_prefix): Update.
8905         * cp-support.c (inspect_type): Update.
8906         * coffread.c (process_coff_symbol, decode_base_type): Update.
8907         * c-varobj.c (c_is_path_expr_parent): Update.
8908         * c-typeprint.c (c_type_print_base_struct_union): Update.
8909         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8910         summary when using C language.
8911         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8912         (gen_maybe_namespace_elt): Update.
8913         * ada-lang.c (ada_type_name): Simplify.
8914         (empty_record, ada_template_to_fixed_record_type_1)
8915         (template_to_static_fixed_type)
8916         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8917
8918 2018-06-01  Tom Tromey  <tom@tromey.com>
8919
8920         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8921         c_print_type.
8922         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8923         (c_print_type): Update.
8924         (c_print_type): New overload.
8925         (c_type_print_varspec_prefix, c_type_print_args)
8926         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8927         (c_type_print_base_struct_union, c_type_print_base_1)
8928         (cp_type_print_method_args): Add "language" parameter.
8929         (c_type_print_base): Update.
8930         * c-lang.h (c_print_type): Add new overload.
8931
8932 2018-06-01  Tom Tromey  <tom@tromey.com>
8933
8934         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8935         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8936
8937 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8938
8939         * aarch64-tdep.c (aarch64_sve_register_names): New const
8940         var.
8941         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8942         (AARCH64_SVE_Z_REGS_NUM): New define.
8943         (AARCH64_SVE_P_REGS_NUM): Likewise.
8944         (AARCH64_SVE_NUM_REGS): Likewise.
8945
8946 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8947
8948         * nat/linux-ptrace.h [__alpha__]
8949         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8950         definitions.
8951
8952 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8953
8954         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8955         the endianness selected.
8956         * NEWS: Document `set endian auto' mode operation update.
8957
8958 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8959
8960         * Makefile.in: Add new header.
8961         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8962         (sve_vl_from_vg): Likewise.
8963         (sve_vq_from_vl): Likewise.
8964         (sve_vl_from_vq): Likewise.
8965         (sve_vq_from_vg): Likewise.
8966         (sve_vg_from_vq): Likewise.
8967         * configure.nat: Add new c file.
8968         * nat/aarch64-sve-linux-ptrace.c: New file.
8969         * nat/aarch64-sve-linux-ptrace.h: New file.
8970
8971 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8972
8973         * aarch64-linux-nat.c (aarch64_linux_read_description):
8974         Add parmeter zero.
8975         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8976         Likewise.
8977         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8978         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8979         (aarch64_gdbarch_init): Add parmeter zero.
8980         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8981         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8982         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8983         parmeter.
8984         * doc/gdb.texinfo: Describe SVE feature
8985         * features/aarch64-sve.c: New file.
8986
8987 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8988
8989         PR gdb/23210
8990         * gdbarch.sh (significant_addr_bit): Default to zero when
8991         not set by target architecture.
8992         * gdbarch.c: Re-generated.
8993         * utils.c (address_significant): Update.
8994
8995 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8996
8997         * stack.c (func_command): Remove trailing newline in call to error.
8998
8999 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9000
9001         * regcache.h (regcache_raw_collect): Remove, update callers to
9002         use regcache::raw_collect.
9003         * regcache.c (regcache_raw_collect): Remove.
9004
9005 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9006
9007         * regcache.h (regcache_raw_supply): Remove, update callers to
9008         use detached_regcache::raw_supply.
9009         * regcache.c (regcache_raw_supply): Remove.
9010
9011 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9012
9013         * regcache.h (regcache_cooked_write_part): Remove, update
9014         callers to use regcache::cooked_write_part.
9015         * regcache.c (regcache_cooked_write_part): Remove.
9016
9017 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9018
9019         * regcache.h (regcache_cooked_read_part): Remove, update callers
9020         to use readable_regcache::cooked_read_part.
9021         * regcache.c (regcache_cooked_read_part): Remove.
9022
9023 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9024
9025         * regcache.h (regcache_cooked_read_value): Remove, update
9026         callers to use readable_regcache::cooked_read_value.
9027         * regcache.c (regcache_cooked_read_value): Remove.
9028
9029 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9030
9031         * regcache.h (regcache_cooked_write): Remove, update callers to
9032         use regcache::cooked_write.
9033         * regcache.c (regcache_cooked_write): Remove.
9034
9035 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9036
9037         * regcache.h (regcache_invalidate): Remove, update callers to
9038         use detached_regcache::invalidate instead.
9039         * regcache.c (regcache_invalidate): Remove.
9040
9041 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9042
9043         * regcache.h (regcache_raw_write_part): Remove, update callers
9044         to use regcache::raw_write_part instead.
9045         * regcache.c (regcache_raw_write_part): Remove.
9046
9047 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9048
9049         * regcache.h (regcache_raw_read_part): Remove, update callers to
9050         use readable_regcache::raw_read_part instead.
9051         * regcache.c (regcache_raw_read_part): Remove.
9052
9053 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9054
9055         * regcache.h (regcache_cooked_read): Remove, update callers to
9056         use readable_regcache::cooked_read instead.
9057         * regcache.c (regcache_cooked_read): Remove.
9058
9059 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9060
9061         * regcache.h (regcache_raw_write): Remove, update callers to use
9062         regcache::raw_write instead.
9063         * regcache.c (regcache_raw_write): Remove.
9064
9065 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9066
9067         * regcache.h (regcache_raw_read): Remove, update callers to use
9068         readable_regcache::raw_read instead.
9069         * regcache.c (regcache_raw_read): Remove.
9070
9071 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9072
9073         * regcache.h (regcache_raw_update): Remove, update callers to
9074         use readable_regcache::raw_update instead.
9075         * regcache.c (regcache_raw_update): Remove.
9076
9077 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9078
9079         * regcache.h (regcache_register_status): Remove, update callers
9080         to use reg_buffer::get_register_status directly instead.
9081         * regcache.c (regcache_register_status): Remove.
9082
9083 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9084
9085         * regcache.h (regcache_get_ptid): Remove, update all callers to
9086         call regcache::ptid instead.
9087         * regcache.c (regcache_get_ptid): Remove.
9088
9089 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9090
9091         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9092
9093 2018-05-30  Pedro Alves  <palves@redhat.com>
9094
9095         * common/common-exceptions.h (exception_rethrow): Use
9096         ATTRIBUTE_NORETURN.
9097
9098 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
9099
9100         * breakpoint.c (print_solib_event, check_status_catch_solib):
9101         Remove struct keyword in range-based for loops.
9102         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9103         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9104         Likewise.
9105         * linespec.c (find_superclass_methods, search_minsyms_for_name):
9106         Likewise.
9107         * symfile.c (addr_info_make_relative): Likewise.
9108         * thread.c (value_in_thread_stack_temporaries): Likewise.
9109
9110 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
9111
9112         PR gdb/16841
9113         * valops.c (value_struct_elt_for_reference): Call check_typedef on
9114         aggregate type to get its real type before accessing it.
9115
9116 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
9117
9118         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9119         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9120         * coff-pe-read.c (add_pe_forwarded_sym): Replace
9121         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9122         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9123         * jit.c (jit_breakpoint_re_set_internal): Likewise.
9124         * printcmd.c (info_address_command): Likewise.
9125
9126 2018-05-29  Tom Tromey  <tom@tromey.com>
9127
9128         * windows-nat.c (handle_exception): Update fall-through comment.
9129
9130 2018-05-29  Tom Tromey  <tom@tromey.com>
9131
9132         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
9133         (struct program_space) <added_solibs>: Now a std::vector.
9134         * breakpoint.c (print_solib_event): Update.
9135         (check_status_catch_solib): Update.
9136         * progspace.c (clear_program_space_solib_cache): Update.
9137         * solib.c (update_solib_list): Update.
9138
9139 2018-05-29  Tom Tromey  <tom@tromey.com>
9140
9141         * python/py-type.c (typy_richcompare): Update.
9142         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9143         * gdbtypes.h (types_deeply_equal): Return bool.
9144         (types_equal): Likewise.
9145         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
9146         declare VEC.
9147         (check_types_equal): Change worklist to std::vector.  Return
9148         bool.
9149         (struct type_equality_entry): Add constructor.
9150         (compare_maybe_null_strings): Return bool.
9151         (check_types_worklist): Return bool.  Change worklist to
9152         std::vector.
9153         (types_deeply_equal): Use std::vector.
9154         (types_equal): Return bool.
9155         (compare_maybe_null_strings): Simplify.
9156
9157 2018-05-29  Tom Tromey  <tom@tromey.com>
9158
9159         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
9160
9161 2018-05-29  Tom Tromey  <tom@tromey.com>
9162
9163         * objc-lang.h: Don't include cp-support.h.
9164         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
9165         declare VEC.
9166
9167 2018-05-27  Tom Tromey  <tom@tromey.com>
9168
9169         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9170
9171 2018-05-25  Tom Tromey  <tom@tromey.com>
9172
9173         * value.c (value::location): Initialize.
9174
9175 2018-05-25  Tom Tromey  <tom@tromey.com>
9176
9177         * dbxread.c (init_bincl_list): Remove.
9178         (bincl_list): Now a std::vector.
9179         (bincls_allocated, next_bincl): Remove.
9180         (free_bincl_list, do_free_bincl_list_cleanup)
9181         (make_cleanup_free_bincl_list): Remove.
9182         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9183         unique_xmalloc_ptr.
9184         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9185         (struct header_file_location): Add constructor.
9186         (add_bincl_to_list): Remove.
9187
9188 2018-05-25  Tom Tromey  <tom@tromey.com>
9189
9190         * tui/tui.c (tui_enable): Update.
9191         * mi/mi-interp.c (mi_interp::init): Update.
9192         * interps.h (class interp) <name>: New method.
9193         <m_name>: Rename from name.
9194         (~scoped_restore_interp): Update.
9195         * interps.c (interp::interp): Update.
9196         (interp_add, interp_set, interp_lookup_existing)
9197         (current_interp_named_p): Update.
9198
9199 2018-05-25  Tom Tromey  <tom@tromey.com>
9200
9201         * interps.c (interp_name): Remove.
9202         * mi/mi-interp.c (mi_interp::init): Update.
9203         * interps.h (interp_name): Remove.
9204         (~scoped_restore_interp): Update.
9205         * tui/tui.c (tui_enable): Update.
9206
9207 2018-05-25  Tom Tromey  <tom@tromey.com>
9208
9209         * utils.c (fputs_maybe_filtered): Update.
9210         * linespec.c (decode_line_full): Update.
9211         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9212         (mi_print_breakpoint_for_event, mi_solib_loaded)
9213         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9214         (mi_user_selected_context_changed): Update.
9215         * mi/mi-main.c (mi_execute_command): Update.
9216         * cli/cli-script.c (execute_control_command): Update.
9217         * python/python.c (execute_gdb_command): Update.
9218         * solib.c (info_sharedlibrary_command): Update.
9219         * interps.c (interp_ui_out): Remove.
9220         * interps.h (interp_ui_out): Remove.
9221
9222 2018-05-25  Tom Tromey  <tom@tromey.com>
9223
9224         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9225         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9226         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9227
9228 2018-05-25  Tom Tromey  <tom@tromey.com>
9229
9230         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9231         * interps.c (interp_exec): Use scoped_restore.
9232
9233 2018-05-25  Tom Tromey  <tom@tromey.com>
9234
9235         * remote.c (remote_target::remote_file_get): Use
9236         gdb::byte_vector.
9237         (remote_target::remote_file_put): Likewise.
9238
9239 2018-05-25  Tom Tromey  <tom@tromey.com>
9240
9241         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9242         a std::string.
9243         (get_pe_section_index, add_pe_exported_sym): Update.
9244         (read_pe_exported_syms): Use gdb::def_vector.
9245
9246 2018-05-25  Tom Tromey  <tom@tromey.com>
9247
9248         * frame.c (remove_prev_frame): Remove.
9249         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9250
9251 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
9252
9253         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9254         Remove prototypes.
9255         * mips-linux-nat.c (supply_fpregset): Always call
9256         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9257         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9258         `mips_fill_fpregset'.
9259         * mips-linux-tdep.c (mips_supply_fpregset)
9260         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9261         (mips_fill_fpregset_wrapper): Remove functions.
9262         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9263         (mips_linux_fpregset): Remove variable.
9264         (mips_linux_iterate_over_regset_sections): Use
9265         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9266         (mips_linux_o32_sigframe_init): Remove comment.
9267
9268 2018-05-25  Pedro Alves  <palves@redhat.com>
9269
9270         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9271         (struct readahead_cache, struct packet_reg, struct
9272         remote_arch_state, class remote_state): Move higher up in the
9273         file.
9274         (remote_target::m_remote_state): Now an object instead of a pointer.
9275         (remote_target::get_remote_state): Adjust.
9276
9277 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9278
9279         * stack.c (select_and_print_frame): Delete.
9280         (struct function_bounds): Move struct within function.
9281         (func_command): Most content moved into new function
9282         find_frame_for_function, use new function, print result, add
9283         function comment.
9284         (find_frame_for_function): New function, now returns a result.
9285
9286 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9287
9288         * stack.c (iterate_over_block_arg_vars): Fix comment.
9289         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9290
9291 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9292
9293         PR gdb/23203
9294         * frame.c
9295         (scoped_restore_selected_frame::scoped_restore_selected_frame):
9296         Define.
9297         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9298         Define.
9299         * frame.h (class scoped_restore_selected_frame): New class.
9300         * stack.c (print_frame_local_vars): Remove catching and rethrowing
9301         of any exception, use scoped_restore_selected_frame to restore the
9302         frame instead.
9303
9304 2018-05-24  Pedro Alves  <palves@redhat.com>
9305
9306         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9307         override.
9308
9309 2018-05-23  Tom Tromey  <tom@tromey.com>
9310
9311         * complaints.c (struct complaints): Remove.
9312         (symfile_complaint_book): Remove.
9313         (series): New global.
9314         (complaint_internal): Update.
9315         (clear_complaints): Update.
9316
9317 2018-05-23  Tom Tromey  <tom@tromey.com>
9318
9319         * complaints.c (counters): New global.
9320         (struct complain): Remove.
9321         (struct complaints) <root>: Remove.
9322         (complaint_sentinel): Remove.
9323         (symfile_complaint_book): Update.
9324         (find_complaint) Remove.
9325         (complaint_internal, clear_complaints): Update.
9326
9327 2018-05-23  Tom Tromey  <tom@tromey.com>
9328
9329         * complaints.c (struct complain) <file, line>: Remove.
9330         (find_complaint): Remove file, line parameters.
9331         (complaint_internal): Update.
9332
9333 2018-05-23  Tom Tromey  <tom@tromey.com>
9334
9335         * complaints.c (vcomplaint): Remove.
9336         (complaint_internal) Merge in contents of vcomplaint.
9337
9338 2018-05-23  Tom Tromey  <tom@tromey.com>
9339
9340         * complaints.c (struct complaints) <explanation>: Remove.
9341         (symfile_explanations): Remove.
9342         (symfile_complaint_book): Update.
9343         (vcomplaint): Update.
9344         (struct explanation): Remove.
9345
9346 2018-05-23  Tom Tromey  <tom@tromey.com>
9347
9348         * complaints.c (symfile_complaints): Remove.
9349         (complaint_internal): Remove "complaints" parameter.
9350         (clear_complaints, vcomplaint): Remove "c" parameter.
9351         (get_complaints): Remove.
9352         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9353         (dwarf2_debug_line_missing_file_complaint)
9354         (dwarf2_debug_line_missing_end_sequence_complaint)
9355         (dwarf2_complex_location_expr_complaint)
9356         (dwarf2_const_value_length_mismatch_complaint)
9357         (dwarf2_section_buffer_overflow_complaint)
9358         (dwarf2_macro_malformed_definition_complaint)
9359         (dwarf2_invalid_attrib_class_complaint)
9360         (create_addrmap_from_index, dw2_symtab_iter_next)
9361         (dw2_expand_marked_cus)
9362         (dw2_debug_names_iterator::find_vec_in_debug_names)
9363         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9364         (create_debug_type_hash_table, init_cutu_and_read_dies)
9365         (partial_die_parent_scope, add_partial_enumeration)
9366         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9367         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9368         (read_import_statement, read_file_scope, create_dwo_cu_reader)
9369         (create_cus_hash_table, create_dwp_hash_table)
9370         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9371         (dwarf2_rnglists_process, dwarf2_ranges_process)
9372         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9373         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9374         (handle_struct_member_die, process_structure_scope)
9375         (read_array_type, read_common_block, read_module_type)
9376         (read_tag_pointer_type, read_typedef, read_base_type)
9377         (read_subrange_type, load_partial_dies, partial_die_info::read)
9378         (partial_die_info::read, partial_die_info::read)
9379         (partial_die_info::read, read_checked_initial_length_and_offset)
9380         (dwarf2_string_attr, read_formatted_entries)
9381         (dwarf_decode_line_header)
9382         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9383         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9384         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9385         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9386         (get_signatured_type, get_DW_AT_signature_type)
9387         (decode_locdesc, file_file_name, consume_improper_spaces)
9388         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9389         (dwarf_decode_macro_bytes, dwarf_decode_macros)
9390         (dwarf2_symbol_mark_computed, set_die_type)
9391         (read_attribute_value): Update.
9392         * stap-probe.c (handle_stap_probe, get_stap_base_address):
9393         Update.
9394         * dbxread.c (unknown_symtype_complaint)
9395         (lbrac_mismatch_complaint, repeated_header_complaint)
9396         (set_namestring, function_outside_compilation_unit_complaint)
9397         (read_dbx_symtab, process_one_symbol): Update.
9398         * gdbtypes.c (stub_noname_complaint): Update.
9399         * windows-nat.c (handle_unload_dll): Update.
9400         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9401         (decode_base_type): Update.
9402         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9403         (eb_complaint, record_include_begin, record_include_end)
9404         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9405         (process_xcoff_symbol, read_symbol)
9406         (function_outside_compilation_unit_complaint)
9407         (scan_xcoff_symtab): Update.
9408         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9409         * buildsym.c (finish_block_internal, make_blockvector)
9410         (end_symtab_get_static_block, augment_type_symtab): Update.
9411         * dtrace-probe.c (dtrace_process_dof)
9412         (dtrace_static_probe_ops::get_probes): Update.
9413         * complaints.h (struct complaint): Don't declare.
9414         (symfile_complaints): Remove.
9415         (complaint_internal): Remove "complaints" parameter.
9416         (complaint): Likewise.
9417         (clear_complaints): Likewise.
9418         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9419         (reread_symbols): Update.
9420         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9421         (dwarf2_frame_cache, decode_frame_entry): Update.
9422         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9423         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9424         (info_selectors_command): Update.
9425         * macrotab.c (macro_include, check_for_redefinition)
9426         (macro_undef): Update.
9427         * objfiles.c (filter_overlapping_sections): Update.
9428         * stabsread.c (invalid_cpp_abbrev_complaint)
9429         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9430         (define_symbol, error_type, read_type, rs6000_builtin_type)
9431         (stabs_method_name_from_physname, read_member_functions)
9432         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9433         (attach_fields_to_type, complain_about_struct_wipeout)
9434         (read_range_type, read_args, common_block_start)
9435         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9436         Update.
9437         * mdebugread.c (index_complaint, unknown_ext_complaint)
9438         (basic_type_complaint, bad_tag_guess_complaint)
9439         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9440         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9441         (parse_procedure, parse_lines)
9442         (function_outside_compilation_unit_complaint)
9443         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9444         (bad_tag_guess_complaint, reg_value_complaint): Update.
9445         * cp-support.c (demangled_name_complaint): Update.
9446         * macroscope.c (sal_macro_scope): Update.
9447         * dwarf-index-write.c (class debug_names): Update.
9448
9449 2018-05-23  Tom Tromey  <tom@tromey.com>
9450
9451         * complaints.c (clear_complaints): Remove "noisy" parameter.
9452         * complaints.h (clear_complaints): Update.
9453         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9454         (reread_symbols): Update.
9455
9456 2018-05-23  Tom Tromey  <tom@tromey.com>
9457
9458         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9459         SUBSEQUENT_MESSAGE.
9460         (vcomplaint, clear_complaints): Update.
9461         (symfile_explanations): Remove some messages.
9462
9463 2018-05-23  Tom Tromey  <tom@tromey.com>
9464
9465         * complaints.c (internal_complaint): Remove.
9466         * complaints.h (internal_complaint): Remove.
9467
9468 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9469
9470         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9471
9472 2018-05-22  Pedro Alves  <palves@redhat.com>
9473
9474         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9475         (remote_fileio_badfd, remote_fileio_return_errno)
9476         (remote_fileio_return_success, remote_fileio_func_open)
9477         (remote_fileio_func_open, remote_fileio_func_close)
9478         (remote_fileio_func_read, remote_fileio_func_write)
9479         (remote_fileio_func_lseek, remote_fileio_func_rename)
9480         (remote_fileio_func_unlink, remote_fileio_func_stat)
9481         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9482         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9483         remote_target parameter.
9484         (remote_fio_func_map) <func>: Add remote_target parameter.
9485         (do_remote_fileio_request, remote_fileio_request):
9486         * remote-fileio.h (remote_fileio_request):
9487         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9488         remote_target parameter.
9489         (remote_notif_process, handle_notification): Adjust to pass down
9490         the remote.
9491         (remote_notif_state_allocate): Add remote_target parameter.  Save
9492         it.
9493         * remote-notif.h (struct remote_target): Forward declare.
9494         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9495         remote_target parameter.
9496         (struct remote_notif_state) <remote>: New field.
9497         (remote_notif_ack, remote_notif_parse): Add remote_target
9498         parameter.
9499         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9500         remote_target parameter.
9501         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9502         (threads_listing_context, rmt_thread_action, protocol_feature)
9503         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9504         (packet_result, struct threads_listing_context, remote_state):
9505         Move definitions and declarations higher up.
9506         (remote_target) <~remote_target>: Declare.
9507         (remote_download_command_source, remote_file_put, remote_file_get)
9508         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9509         (remote_hostio_pread_vFile, remote_hostio_send_command)
9510         (remote_hostio_set_filesystem, remote_hostio_open)
9511         (remote_hostio_close, remote_hostio_unlink, remote_state)
9512         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9513         (get_memory_write_packet_size, get_memory_read_packet_size)
9514         (append_pending_thread_resumptions, remote_detach_1)
9515         (append_resumption, remote_resume_with_vcont)
9516         (add_current_inferior_and_thread, wait_ns, wait_as)
9517         (process_stop_reply, remote_notice_new_inferior)
9518         (process_initial_stop_replies, remote_add_thread)
9519         (btrace_sync_conf, remote_btrace_maybe_reopen)
9520         (remove_new_fork_children, kill_new_fork_children)
9521         (discard_pending_stop_replies, stop_reply_queue_length)
9522         (check_pending_events_prevent_wildcard_vcont)
9523         (discard_pending_stop_replies_in_queue, stop_reply)
9524         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9525         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9526         (remote_interrupt_as, remote_interrupt_ns)
9527         (remote_get_noisy_reply, remote_query_attached)
9528         (remote_add_inferior, remote_current_thread, get_current_thread)
9529         (set_thread, set_general_thread, set_continue_thread)
9530         (set_general_process, write_ptid)
9531         (remote_unpack_thread_info_response, remote_get_threadinfo)
9532         (parse_threadlist_response, remote_get_threadlist)
9533         (remote_threadlist_iterator, remote_get_threads_with_ql)
9534         (remote_get_threads_with_qxfer)
9535         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9536         (get_offsets, remote_check_symbols, remote_supported_packet)
9537         (remote_query_supported, remote_packet_size)
9538         (remote_serial_quit_handler, remote_detach_pid)
9539         (remote_vcont_probe, remote_resume_with_hc)
9540         (send_interrupt_sequence, interrupt_query)
9541         (remote_notif_get_pending_events, fetch_register_using_p)
9542         (send_g_packet, process_g_packet, fetch_registers_using_g)
9543         (store_register_using_P, store_registers_using_G)
9544         (set_remote_traceframe, check_binary_download)
9545         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9546         (remote_xfer_live_readonly_partial, remote_read_bytes)
9547         (remote_send_printf, remote_flash_write, readchar)
9548         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9549         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9550         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9551         (extended_remote_disable_randomization, extended_remote_run)
9552         (send_environment_packet, extended_remote_environment_support)
9553         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9554         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9555         (packet_command): Now methods of ...
9556         (remote_target): ... this class.
9557         (m_remote_state) <remote_target>: New field.
9558         (struct remote_state) <stop_reply_queue,
9559         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9560         fields.
9561         (remote_state::remote_state): Allocate stop_reply_queue.
9562         (remote_state): Delete global.
9563         (get_remote_state_raw): Delete.
9564         (remote_target::get_remote_state): Allocate m_remote_state on
9565         demand.
9566         (get_current_remote_target): New.
9567         (remote_ops, extended_remote_ops): Delete.
9568         (wait_forever_enabled_p, remote_async_inferior_event_token):
9569         Delete, moved to struct remote_state.
9570         (remote_target::close): Delete self.  Destruction bits split to
9571         ...
9572         (remote_target::~remote_target): ... this.
9573         (show_memory_packet_size): Adjust to use
9574         get_current_remote_target.
9575         (struct protocol_feature) <func>: Add remote_target parameter.
9576         All callers adjusted.
9577         (curr_quit_handler_target): New.
9578         (remote_serial_quit_handler): Reimplement.
9579         (remote_target::open_1): Adjust to use get_current_remote_target.
9580         Heap-allocate remote_target/extended_remote_target instances.
9581         (vcont_builder::vcont_builder): Add remote_target parameter, and
9582         save it in m_remote.  All callers adjusted.
9583         (vcont_builder::m_remote): New field.
9584         (vcont_builder::restart, vcont_builder::flush)
9585         (vcont_builder::push_action): Use it.
9586         (remote_target::commit_resume): Use it.
9587         (struct queue_iter_param) <remote>: New field.
9588         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9589         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9590         (check_pending_event_prevents_wildcard_vcont_callback)
9591         (remote_target::check_pending_events_prevent_wildcard_vcont)
9592         (remote_target::discard_pending_stop_replies)
9593         (remote_target::discard_pending_stop_replies_in_queue)
9594         (remote_target::remote_notif_remove_queued_reply): Fill in
9595         'remote' field.
9596         (remote_notif_get_pending_events): New.
9597         (remote_target::readchar, remote_target::remote_serial_write):
9598         Save/restore curr_quit_handler_target.
9599         (putpkt): New.
9600         (kill_new_fork_children): Fill in 'remote' field.
9601         (packet_command): Use get_current_remote_target, defer to
9602         remote_target method of same name.
9603         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9604         parameter, and save it in m_remote.  All callers adjusted.
9605         (scoped_remote_fd::release): Use m_remote.
9606         (scoped_remote_fd::m_remote): New field.
9607         (remote_file_put, remote_file_get, remote_file_delete): Use
9608         get_current_remote_target, defer to remote_target method of same
9609         name.
9610         (remote_btrace_reset): Add remote_state paremeter.  Update all
9611         callers.
9612         (remote_async_inferior_event_handler). Pass down 'data'.
9613         (remote_new_objfile): Use get_current_remote_target.
9614         (remote_target::vcont_r_supported): New.
9615         (set_range_stepping): Use get_current_remote_target and
9616         remote_target::vcont_r_supported.
9617         (_initialize_remote): Don't allocate 'remote_state' and
9618         'stop_reply_queue' globals.
9619         * remote.h (struct remote_target): Forward declare.
9620         (getpkt, putpkt, remote_notif_get_pending_events): Add
9621         'remote_target' parameter.
9622
9623 2018-05-22  Pedro Alves  <palves@redhat.com>
9624
9625         * remote.c (vcont_builder): Now a class.  Make all data members
9626         private.
9627         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9628         Declare methods.
9629         (vcont_builder_restart): Rename to ...
9630         (vcont_builder::restart): ... this.
9631         (vcont_builder_flush): Rename to ...
9632         (vcont_builder::flush): ... this.
9633         (vcont_builder_push_action): Rename to ...
9634         (vcont_builder::push_action): ... this.
9635         (remote_target::commit_resume): Adjust.
9636
9637 2018-05-22  Pedro Alves  <palves@redhat.com>
9638
9639         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9640         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9641         (get_fixed_memory_packet_size): New.
9642         (get_memory_packet_size): Use it.
9643         (set_memory_packet_size): Don't override the config size with
9644         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9645         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9646         Don't refer to get_memory_packet_size if not connected to a remote
9647         target.  Show "(default)" if configured size is 0.
9648
9649 2018-05-22  Pedro Alves  <palves@redhat.com>
9650
9651         * remote.c (remote_target::mourn_inferior): Move
9652         discard_pending_stop_replies call here from ...
9653         (_initialize_remote): ... here.
9654
9655 2018-05-22  Pedro Alves  <palves@redhat.com>
9656
9657         * remote.c (compare_section_command): Remove set_general_process
9658         call.
9659
9660 2018-05-22  Pedro Alves  <palves@redhat.com>
9661
9662         * remote.c (struct packet_reg, struct remote_arch_state):
9663         Move higher up in the file.
9664         (remote_state) <m_arch_states>: Store remote_arch_state values
9665         instead of remote_arch_state pointers.
9666         (remote_state::get_remote_arch_state): Adjust.
9667
9668 2018-05-22  Pedro Alves  <palves@redhat.com>
9669
9670         * remote.c: Include <unordered_map>.
9671         (remote_state): Now a class.
9672         (remote_state) <get_remote_arch_state>: Declare method.
9673         <get_remote_arch_state>: New field.
9674         (remote_arch_state) <remote_arch_state>: Declare ctor.
9675         <regs>: Now a unique_ptr.
9676         (remote_gdbarch_data_handle): Delete.
9677         (get_remote_arch_state): Delete.
9678         (remote_state::get_remote_arch_state): New.
9679         (get_remote_state): Adjust to call remote_state's
9680         get_remote_arch_state method.
9681         (init_remote_state): Delete, bits factored out to ...
9682         (remote_arch_state::remote_arch_state): ... this new method.
9683         (get_remote_packet_size, get_memory_packet_size)
9684         (process_g_packet, remote_target::fetch_registers)
9685         (remote_target::prepare_to_store, store_registers_using_G)
9686         (remote_target::store_registers, remote_target::get_trace_status):
9687         Adjust to call remote_state's method.
9688         (_initialize_remote): Remove reference to
9689         remote_gdbarch_data_handle.
9690
9691 2018-05-22  Pedro Alves  <palves@redhat.com>
9692
9693         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9694         pread>: New method declarations.
9695         (remote_target::open_1): Adjust.
9696         (readahead_cache_invalidate): Rename to ...
9697         (readahead_cache::invalidate): ... this, and adjust to be a class
9698         method.
9699         (readahead_cache_invalidate_fd): Rename to ...
9700         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9701         class method.
9702         (remote_hostio_pwrite): Adjust.
9703         (remote_hostio_pread_from_cache): Rename to ...
9704         (readahead_cache::pread): ... this, and adjust to be a class
9705         method.
9706         (remote_hostio_close): Adjust.
9707
9708 2018-05-22  Pedro Alves  <palves@redhat.com>
9709
9710         * remote.c (remote_hostio_close_cleanup): Delete.
9711         (class scoped_remote_fd): New.
9712         (remote_file_put, remote_file_get): Use it.
9713
9714 2018-05-22  Pedro Alves  <palves@redhat.com>
9715
9716         (struct vCont_action_support): Use bool and initialize all fields.
9717         (struct readahead_cache): Initialize all fields.
9718         (remote_state): Use bool and initialize all fields.
9719         (remote_state::remote_state, remote_state::~remote_state): New.
9720         (new_remote_state): Delete.
9721         (_initialize_remote): Use new to allocate remote_state.
9722
9723 2018-05-22  Pedro Alves  <palves@redhat.com>
9724             張俊芝  <zjz@zjz.name>
9725
9726         PR gdb/22973
9727         * c-exp.y: Include "c-support.h".
9728         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9729         of tolower.  Use c_ident_is_alpha to scan names.
9730         * c-lang.c: Include "c-support.h".
9731         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9732         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9733         * c-support.h: New file, with bits factored out from ...
9734         * cp-name-parser.y: ... this file.
9735         Include "c-support.h".
9736         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9737         c-support.h and renamed.
9738         (symbol_end, yylex): Adjust.
9739
9740 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9741
9742         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9743         parameter type to CORE_ADDR.
9744         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9745         parameter type in declaration to CORE_ADDR.
9746         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9747         target_auxv_search to get AT_HWCAP and use the result to get the
9748         target description.
9749         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9750         to CORE_ADDR. Remove the cast of the return value to unsigned
9751         long. Fix error predicate of target_auxv_search.
9752         (ppc_linux_nat_target::read_description): Change the type of the
9753         hwcap variable to CORE_ADDR.
9754
9755 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9756
9757         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9758         if the size of fpscr is larger than 32 bits.
9759
9760 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9761
9762         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9763         (ppc32_linux_vsxregmap): New global.
9764         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9765         regcache_supply_regset, and regcache_collect_regset.
9766         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9767         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9768         (fetch_vsx_register, store_vsx_register): Remove.
9769         (fetch_vsx_registers): Add regno parameter. Get regset using
9770         ppc_linux_vsxregset. Use regset to supply registers.
9771         (store_vsx_registers): Add regno parameter. Get regset using
9772         ppc_linux_vsxregset. Use regset to collect registers.
9773         (fetch_register): Call fetch_vsx_registers instead of
9774         fetch_vsx_register.
9775         (store_register): Call store_vsx_registers instead of
9776         store_vsx_register.
9777         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9778         new regno parameter.
9779         (store_ppc_registers): Call store_vsx_registers with -1 for the
9780         new regno parameter.
9781         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9782         (ppc_collect_vsxregset): Remove.
9783
9784 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9785
9786         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9787         offset fields.
9788         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9789         for vector register offset fields.
9790         (ppc64_fbsd_reg_offsets): Likewise.
9791         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9792         to vector register offset fields.
9793         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9794         to vector register offset fields.
9795         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9796         vector register offset fields.
9797         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9798         initializers for vector register offset fields.
9799         (rs6000_aix64_reg_offsets): Likewise.
9800         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9801         (ppc_supply_vrregset): Remove.
9802         (ppc_collect_vrregset): Remove.
9803         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9804         (ppc_linux_vrregset) : New function.
9805         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9806         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9807         (ppc32_linux_vrregset): Remove.
9808         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9809         and use result instead of ppc32_linux_vrregset.
9810         (ppc32_linux_reg_offsets): Remove initializers for vector register
9811         offset fields.
9812         (ppc64_linux_reg_offsets): Likewise.
9813         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9814         * ppc-linux-nat.c: Include regset.h.
9815         (gdb_vrregset_t): Adjust comment to account for little-endian
9816         mode.
9817         (supply_vrregset, fill_vrregset): Remove.
9818         (fetch_altivec_register, store_altivec_register): Remove.
9819         (fetch_altivec_registers): Add regno parameter. Get regset using
9820         ppc_linux_vrregset. Use regset to supply registers.
9821         (store_altivec_registers): Add regno parameter. Get regset using
9822         ppc_linux_vrregset. Use regset to collect registers.
9823         (fetch_register): Call fetch_altivec_registers instead of
9824         fetch_altivec_register.
9825         (store_register): Call store_altivec_registers instead of
9826         store_altivec_register.
9827         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9828         the new regno parameter.
9829         (store_ppc_registers): Call store_altivec_registers with -1 for
9830         the new regno parameter.
9831
9832 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9833
9834         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9835         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9836         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9837         (gdb_vrregset_t): Change array type size to
9838         PPC_LINUX_SIZEOF_VRREGSET.
9839         (gdb_vsxregset_t): Change array type size to
9840         PPC_LINUX_SIZEOF_VSXREGSET.
9841         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9842         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9843         PPC_LINUX_SIZEOF_VSXREGSET.
9844
9845 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9846
9847         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9848         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9849         nat/ppc-linux.c.
9850         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9851         ppc_linux_target_wordsize with tid.
9852         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9853         wordsize with tid.
9854         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9855         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9856         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9857         tid parameter. Remove static specifier.
9858         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9859         (ppc_linux_target_wordsize): New declaration.
9860
9861 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9862
9863         * arch/ppc-linux-common.c: New file.
9864         * arch/ppc-linux-common.h: New file.
9865         * arch/ppc-linux-tdesc.h: New file.
9866         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9867         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9868         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9869         arch/ppc-linux-tdesc.h.
9870         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9871         arch/ppc-linux-tdesc.h.
9872         (ppc_linux_nat_target::read_description): Remove target
9873         description matching code. Fill a ppc_linux_features struct and
9874         call ppc_linux_match_description with it. Move comment about ISA
9875         2.05 to ppc-linux-common.c.
9876         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9877         arch/ppc-linux-tdesc.h.
9878         (ppc_linux_core_read_description): Remove target description
9879         matching code. Fill a ppc_linux_features struct and call
9880         ppc_linux_match_description with it.
9881         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9882         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9883         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9884         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9885         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9886         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9887         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9888         (tdesc_powerpc_e500l): Remove.
9889
9890 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9891
9892         * ada-lang.c (catch_assert_command): Pass empty string instead
9893         of NULL for excep_string argument.
9894
9895 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9896
9897         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9898         the width of the requested register exceeds the width of the
9899         `ptrace' data type.
9900
9901 2018-05-21  Tom Tromey  <tom@tromey.com>
9902
9903         * printcmd.c (output_command): Remove.
9904         (output_command_const): Rename to output_command.
9905         * valprint.h (output_command): Rename from output_command_const.
9906         * tracepoint.c (trace_dump_actions): Call output_command.
9907
9908 2018-05-21  Tom Tromey  <tom@tromey.com>
9909
9910         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9911         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9912         * ada-lang.h (create_ada_exception_catchpoint): Update.
9913         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9914         std::string.
9915         (create_excep_cond_exprs, ~ada_catchpoint)
9916         (should_stop_exception, print_one_exception)
9917         (print_mention_exception, print_recreate_exception): Update.
9918         (ada_get_next_arg): Remove.
9919         (catch_ada_exception_command_split): Use std::string.  Change type
9920         of "excep_string", "cond_string".
9921         (catch_ada_exception_command): Update.
9922         (create_ada_exception_catchpoint): Change type of excep_string.
9923         (ada_exception_sal): Remove excep_string parameter.
9924         (~ada_catchpoint): Remove.
9925
9926 2018-05-21  Tom Tromey  <tom@tromey.com>
9927
9928         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9929         cleanup.
9930
9931 2018-05-21  Tom Tromey  <tom@tromey.com>
9932
9933         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9934         Return unique_xmalloc_ptr.
9935         (print_it_exception): Update.
9936
9937 2018-05-21  Tom Tromey  <tom@tromey.com>
9938
9939         * tracepoint.c (trace_dump_actions): Use std::string.
9940
9941 2018-05-21  Tom Tromey  <tom@tromey.com>
9942
9943         * symfile.c (reread_symbols): Use std::string for original_name.
9944
9945 2018-05-21  Tom Tromey  <tom@tromey.com>
9946
9947         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9948         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9949         constructor.
9950
9951 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9952
9953         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9954         instance to...
9955         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9956         * objfiles.c (get_objfile_bfd_data): Allocate
9957         objfile_per_bfd_storage with obstack_new when allocating on
9958         obstack.
9959
9960 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9961
9962         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9963         OBSTACK_ZALLOC.
9964         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9965         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9966         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9967         (add_pending): Likewise.
9968         (parse_symbol): Likewise.
9969         (parse_partial_symbols): Likewise.
9970         (psymtab_to_symtab_1): Likewise.
9971         (new_psymtab): Likewise.
9972         (elfmdebug_build_psymtabs): Likewise.
9973         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9974         * objfiles.c (get_objfile_bfd_data): Likewise.
9975         (objfile_register_static_link): Likewise.
9976         * psymtab.c (allocate_psymtab): Likewise.
9977         * stabsread.c (read_member_functions): Likewise.
9978         * xcoffread.c (xcoff_end_psymtab): Likewise.
9979
9980 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9981
9982         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9983         compiler supports std::is_trivially_constructible.
9984         * common/poison.h: Include obstack.h.
9985         (IsMallocable): Define to is_trivially_constructible if the
9986         compiler supports it, define to true_type otherwise.
9987         (xobnew): New.
9988         (XOBNEW): Redefine.
9989         (xobnewvec): New.
9990         (XOBNEWVEC): Redefine.
9991         * gdb_obstack.h (obstack_zalloc): New.
9992         (OBSTACK_ZALLOC): Redefine.
9993         (obstack_calloc): New.
9994         (OBSTACK_CALLOC): Redefine.
9995         (obstack_new): New.
9996         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9997         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9998         gdbarch.c.
9999         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
10000         obstack_calloc/obstack_zalloc.
10001         (gdbarch_obstack_zalloc): Remove.
10002         * target-descriptions.c (tdesc_data_init): Use obstack_new.
10003
10004 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10005
10006         * stack.c (backtrace_command_1): Remove useless variable int i.
10007
10008 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10009
10010         * stack.c (print_frame_info): Fix comment.
10011
10012 2018-05-18  Tom Tromey  <tom@tromey.com>
10013
10014         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
10015         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
10016         (~dwarf2_per_objfile): Update
10017         (dwarf2_get_dwz_file): Use new.
10018         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10019         unique_ptr.
10020
10021 2018-05-18  Tom Tromey  <tom@tromey.com>
10022
10023         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10024         unique_ptr.
10025         * dwarf2read.c (struct dwp_file): Add constructor and
10026         initializers.
10027         (open_and_init_dwp_file): Return a unique_ptr.
10028         (dwarf2_per_objfile, create_dwp_hash_table)
10029         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10030         (lookup_dwo_unit_in_dwp): Update.
10031         (open_and_init_dwp_file, get_dwp_file): Update.
10032
10033 2018-05-18  Tom Tromey  <tom@tromey.com>
10034
10035         * dwarf2read.c (dwarf2_per_objfile): Update.
10036         (struct mapped_index): Add initializers.
10037         (dwarf2_read_index): Use new.
10038         (dw2_symtab_iter_init): Update.
10039         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10040         unique_ptr.
10041
10042 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10043
10044         * dwarf2read.c (mapped_index) <total_size>: Remove.
10045
10046 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10047
10048         * unittests/format_pieces-selftests.c (test_format_specifier):
10049         Add ARI comments.
10050
10051 2018-05-18  Tom Tromey  <tom@tromey.com>
10052
10053         * c-typeprint.c (maybe_print_hole): New function.
10054         (c_print_type_struct_field_offset): Update.
10055         (c_type_print_base_struct_union): Call maybe_print_hole.
10056
10057 2018-05-17  Keith Seitz  <keiths@redhat.com>
10058
10059         * breakpoint.c (build_bpstat_chain): New function, moved from
10060         bpstat_stop_status.
10061         (bpstat_stop_status): Add optional parameter, `stop_chain'.
10062         If no stop chain is passed, call build_bpstat_chain to build it.
10063         * breakpoint.h (build_bpstat_chain): Declare.
10064         (bpstat_stop_status): Move documentation here from breakpoint.c.
10065         * infrun.c (handle_signal_stop): Before eliding inlined frames,
10066         build the stop chain and pass it to skip_inline_frames.
10067         Pass this stop chain to bpstat_stop_status.
10068         * inline-frame.c: Include breakpoint.h.
10069         (stopped_by_user_bp_inline_frame): New function.
10070         (skip_inline_frames): Add parameter `stop_chain'.
10071         Move documention to inline-frame.h.
10072         If non-NULL, use stopped_by_user_bp_inline_frame to determine
10073         whether the frame should be elided.
10074         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10075         Add moved documentation and update for new parameter.
10076
10077 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10078
10079         PR cli/14975
10080         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10081         unittests/format_pieces-selftests.c.
10082         * common/format.h (format_piece) <operator==>: New.
10083         (format_pieces) <operator[]>: Remove.
10084         * common/format.c (format_pieces::format_pieces): Handle \e.
10085         * unittests/format_pieces-selftests.c: New.
10086
10087 2018-05-17  Tom Tromey  <tom@tromey.com>
10088
10089         PR symtab/23010:
10090         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10091         (dw2_instantiate_symtab): Add skip_partial parameter.
10092         (dw2_find_last_source_symtab, dw2_map_expand_apply)
10093         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10094         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10095         (dw2_expand_symtabs_matching_one)
10096         (dw2_find_pc_sect_compunit_symtab)
10097         (dw2_debug_names_lookup_symbol)
10098         (dw2_debug_names_expand_symtabs_for_function): Update.
10099         (init_cutu_and_read_dies): Add skip_partial parameter.
10100         (process_psymtab_comp_unit, build_type_psymtabs_1)
10101         (process_skeletonless_type_unit, load_partial_comp_unit)
10102         (psymtab_to_symtab_1): Update.
10103         (load_full_comp_unit): Add skip_partial parameter.
10104         (process_imported_unit_die, dwarf2_read_addr_index)
10105         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10106         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10107         (read_signatured_type): Update.
10108
10109 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10110
10111         * value.c (release_value): Remove unused variable.
10112         (record_latest_value): Likewise.
10113         (access_value_history): Likewise.
10114         (preserve_values): Likewise.
10115
10116 2018-05-17  Tom Tromey  <tom@tromey.com>
10117
10118         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10119         Initialize.
10120
10121 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
10122
10123         PR gdb/22286
10124         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10125         Also handle registers whose width is not a multiple of
10126         PTRACE_TYPE_RET.
10127         (linux_nat_trad_target::store_register): Likewise.
10128
10129 2018-05-16  Tom Tromey  <tom@tromey.com>
10130
10131         * gdbcore.h (core_bfd): Redefine.
10132         * corelow.c (core_target::close): Update.
10133         (core_target_open): Update.
10134         * progspace.h (struct program_space) <cbfd>: Now a
10135         gdb_bfd_ref_ptr.
10136
10137 2018-05-16  Tom Tromey  <tom@tromey.com>
10138
10139         PR cli/19551:
10140         * symfile-add-flags.h (enum symfile_add_flags)
10141         <SYMFILE_NOT_FILENAME>: New constant.
10142         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
10143         objfile name from BFD.
10144         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10145         * minidebug.c (find_separate_debug_file_in_section): Put
10146         ".gnu_debugdata" into BFD's file name.
10147
10148 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
10149
10150         * regcache.c (regcache_read_ftype, regcache_write_ftype):
10151         Remove.
10152
10153 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
10154
10155         PR binutils/21446
10156         * aarch64-tdep.c (aarch64_analyze_prologue,
10157         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10158         Indicate not interested in errors.
10159
10160 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10161
10162         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10163         Supply the MIPS_ZERO_REGNUM register.
10164
10165 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10166
10167         * mips-tdep.c (mask_address_var): Make variable static.
10168
10169 2018-05-14  Tom Tromey  <tom@tromey.com>
10170
10171         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10172
10173 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
10174
10175         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10176         FXSAVE_ADDR for the mxcsr register.
10177
10178 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
10179
10180         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10181
10182 2018-05-11  Pedro Alves  <palves@redhat.com>
10183
10184         * corelow.c (core_target) <core_target>: No longer inline.
10185         Initialize m_core_gdbarch, m_core_vec and build the section table
10186         here.
10187         <~core_target>: New.
10188         <core_gdbarch, get_core_register_section>: New methods.
10189         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10190         factored out from ...
10191         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10192         (core_ops): Delete.
10193         (sniff_core_bfd): Add gdbarch parameter.
10194         (core_close): Delete, merged into ...
10195         (core_target::close): ... here.  Delete self.
10196         (core_close_cleanup): Delete.
10197         (core_target_open): Allocate a core_target on the heap.  Use a
10198         unique_ptr instead of a cleanup.  Bits moved into the core_target
10199         ctor.  Adjust to use core_target methods instead of globals.
10200         (get_core_register_section): Rename to ...
10201         (core_target::get_core_register_section): ... this and adjust.
10202         (struct get_core_registers_cb_data): New.
10203         (get_core_registers_cb): Use it.  Use bool.
10204         (core_target::fetch_registers, core_target::files_info)
10205         (core_target::xfer_partial, core_target::read_description)
10206         (core_target::pid_to, core_target::thread_name): Adjust to
10207         reference class fields instead of globals.
10208         * target.h (struct target_ops_deleter, target_ops_up): New.
10209
10210 2018-05-11  Pedro Alves  <palves@redhat.com>
10211
10212         * corefile.c (core_file_command): Move to corelow.c.
10213         * corelow.c (the_core_target): Delete.
10214         (core_file_command): Moved from corefile.c.  Check exec_bfd
10215         instead of the_core_target.  Use target_detach instead of calling
10216         into the_core_target directly.
10217         (maybe_say_no_core_file_now): New.
10218         (core_target::detach): Use it.
10219         (_initialize_corelow): Remove references to the_core_target.
10220         * gdbcore.h (the_core_target): Delete.
10221
10222 2018-05-11  Tom Tromey  <tromey@redhat.com>
10223             Pedro Alves  <palves@redhat.com>
10224
10225         * corefile.c (core_bfd): Remove.
10226         * gdbcore.h (core_bfd): Now a macro.
10227         * progspace.h (struct program_space) <cbfd>: New field.
10228
10229 2018-05-11  Tom Tromey  <tom@tromey.com>
10230
10231         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10232         gdb::def_vector.
10233
10234 2018-05-10  Tom Tromey  <tom@tromey.com>
10235
10236         * configure: Rebuild.
10237         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10238
10239 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
10240
10241         PR server/23158:
10242         * regformats/regdat.sh: Adjust script, following the addition
10243         of the new expedite_regs parameter to init_target_desc.
10244
10245 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
10246     
10247         PR gdb/23127
10248         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10249         set_gdbarch_significant_addr_bit.
10250         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10251         set_gdbarch_significant_addr_bit.
10252         * utils.c (address_significant): Update to sign extend addr.
10253
10254 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
10255
10256         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10257         (xtensa_linux_init_abi): Limit tdep->num_regs by
10258         tdep->num_nopriv_regs.
10259         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10260         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10261         not initialized.
10262
10263 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
10264
10265         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10266
10267 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
10268
10269         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10270         (I387_MXCSR_INIT_VAL): New constant.
10271         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10272         buffer if it was supplied by the inferior.
10273         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10274         (i387_xsave_get_clear_bv): New function.
10275         (i387_supply_xsave): Only read x87 control registers from the
10276         xsave buffer if the feature is enabled, and the state will have
10277         been written, otherwise, provide a suitable default.
10278         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10279         including x87 control registers.  Update control registers if they
10280         have changed from the default value, and mark features as enabled
10281         as required.
10282         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10283
10284 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10285
10286         * spu-tdep.c (info_spu_event_command): Fix output formatting.
10287
10288 2018-05-07  Tom Tromey  <tom@tromey.com>
10289
10290         * configure: Rebuild.
10291         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10292
10293 2018-05-07  Tom Tromey  <tom@tromey.com>
10294
10295         PR tdep/20362:
10296         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10297         bit.  Use correct value for VDIV.
10298
10299 2018-05-04  Tom Tromey  <tom@tromey.com>
10300
10301         * configure: Rebuild.
10302         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10303
10304 2018-05-04  Tom Tromey  <tom@tromey.com>
10305
10306         * linux-record.c (record_linux_system_call) <case
10307         RECORD_SYS_RECVFROM>: Add "break".
10308
10309 2018-05-04  Tom Tromey  <tom@tromey.com>
10310
10311         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10312         Add missing "break".
10313         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10314         Add missing "break".
10315
10316 2018-05-04  Tom Tromey  <tom@tromey.com>
10317
10318         * rs6000-tdep.c (ppc_process_record_op4)
10319         (ppc_process_record_op63): Add fall-through comment.
10320
10321 2018-05-04  Tom Tromey  <tom@tromey.com>
10322
10323         * i386-tdep.c (i386_process_record): Add fall-through comment.
10324
10325 2018-05-04  Tom Tromey  <tom@tromey.com>
10326
10327         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10328         comment.
10329
10330 2018-05-04  Tom Tromey  <tom@tromey.com>
10331
10332         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10333         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10334         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10335         comment.
10336         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10337         comment.
10338         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10339         comment.
10340
10341 2018-05-04  Tom Tromey  <tom@tromey.com>
10342
10343         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10344
10345 2018-05-04  Tom Tromey  <tom@tromey.com>
10346
10347         * s390-tdep.c (s390_process_record): Fix fall-through comments.
10348         * xcoffread.c (scan_xcoff_symtab): Move comment later.
10349         * symfile.c (section_is_mapped): Fix fall-through comment.
10350         * stabsread.c (define_symbol, read_member_functions): Fix
10351         fall-through comment.
10352         * s390-linux-tdep.c (s390_process_record): Fix fall-through
10353         comment.
10354         * remote.c (remote_wait_as): Fix fall-through comment.
10355         * p-exp.y (yylex): Fix fall-through comment.
10356         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10357         comment.
10358         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10359         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10360         * jv-exp.y (yylex): Fix fall-through comment.
10361         * go-exp.y (lex_one_token): Fix fall-through comment.
10362         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10363         fall-through comment.
10364         * f-exp.y (yylex): Fix fall-through comment.
10365         * dwarf2read.c (process_die): Fix fall-through comments.
10366         * dbxread.c (process_one_symbol): Fix fall-through comment.
10367         * d-exp.y (lex_one_token): Fix fall-through comment.
10368         * cp-name-parser.y (yylex): Fix fall-through comment.
10369         * coffread.c (coff_symtab_read): Fix fall-through comment.
10370         * c-exp.y (lex_one_token): Fix fall-through comment.
10371         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10372         comment.
10373         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10374         comment.
10375
10376 2018-05-04  Tom Tromey  <tom@tromey.com>
10377
10378         PR python/22730:
10379         * NEWS: Mention gdb.execute change.
10380         * gdbcmd.h (execute_control_command): Don't declare.
10381         * python/python.c (execute_gdb_command): Use read_command_lines_1,
10382         execute_control_commands, execute_control_commands_to_string.
10383         * cli/cli-script.h (execute_control_commands)
10384         (execute_control_commands_to_string): Declare.
10385         (execute_control_command): Add from_tty parameter.
10386         * cli/cli-script.c (execute_control_commands)
10387         (execute_control_commands_to_string): New functions.
10388         (execute_user_command): Use execute_control_commands.
10389         (execute_control_command_1): Add "from_tty" parameter.  Update.
10390         (execute_control_command): Likewise.
10391
10392 2018-05-04  Tom Tromey  <tom@tromey.com>
10393
10394         PR python/22731:
10395         * NEWS: Mention that breakpoint commands are writable.
10396         * python/py-breakpoint.c (bppy_set_commands): New function.
10397         (breakpoint_object_getset) <"commands">: Use it.
10398
10399 2018-05-04  Tom Tromey  <tom@tromey.com>
10400
10401         * tracepoint.c (actions_command): Update.
10402         * mi/mi-cmd-break.c (mi_command_line_array)
10403         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10404         (mi_read_next_line): Remove.
10405         (mi_cmd_break_commands): Update.
10406         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10407         function_view.
10408         * cli/cli-script.c (get_command_line): Update.
10409         (process_next_line): Use function_view.  Constify.
10410         (recurse_read_control_structure, read_command_lines)
10411         (read_command_lines_1): Change argument types to function_view.
10412         (do_define_command, document_command): Update.
10413         * breakpoint.h (check_tracepoint_command): Don't declare.
10414         * breakpoint.c (check_tracepoint_command): Remove.
10415         (commands_command_1, create_tracepoint_from_upload): Update.
10416
10417 2018-05-04  Tom Tromey  <tom@tromey.com>
10418
10419         PR gdb/11750:
10420         * cli/cli-script.h (enum command_control_type) <define_control>:
10421         New constant.
10422         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10423         (build_command_line, execute_control_command_1)
10424         (process_next_line): Likewise.
10425         (do_define_command): New function, extracted from define_command.
10426         (define_command): Use it.
10427
10428 2018-05-04  Tom Tromey  <tom@tromey.com>
10429
10430         * tracepoint.c (actions_command): Update.
10431         * cli/cli-script.h (read_command_lines): Update.
10432         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10433         (MAX_TMPBUF): Remove define.
10434         (define_command): Use string_printf.
10435         (document_command): Likewise.
10436         * breakpoint.c (commands_command_1): Update.
10437
10438 2018-05-04  Tom Tromey  <tom@tromey.com>
10439
10440         * top.c (execute_command): Update.
10441         * cli/cli-script.h (print_command_lines): Now varargs.
10442         * cli/cli-script.c (print_command_lines): Now varargs.
10443         (execute_control_command_1) <case while_control, case if_control>:
10444         Update.
10445
10446 2018-05-04  Tom Tromey  <tom@tromey.com>
10447
10448         * tracepoint.c (all_tracepoint_actions): Rename from
10449         all_tracepoint_actions_and_cleanup.  Change return type.
10450         (actions_command, encode_actions_1, encode_actions)
10451         (trace_dump_actions, tdump_command): Update.
10452         * remote.c (remote_download_command_source): Update.
10453         * python/python.c (gdbpy_eval_from_control_command)
10454         (python_command, python_interactive_command): Update.
10455         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10456         * guile/guile.c (guile_command)
10457         (gdbscm_eval_from_control_command, guile_command): Update.
10458         * compile/compile.c (compile_code_command)
10459         (compile_print_command, compile_to_object): Update.
10460         * cli/cli-script.h (struct command_lines_deleter): New.
10461         (counted_command_line): New typedef.
10462         (struct command_line): Add constructor, destructor.
10463         <body_list>: Remove.
10464         <body_list_0, body_list_1>: New members.
10465         (command_line_up): Remove typedef.
10466         (read_command_lines, read_command_lines_1, get_command_line):
10467         Update.
10468         (copy_command_lines): Don't declare.
10469         * cli/cli-script.c (build_command_line): Use "new".
10470         (get_command_line): Return counted_command_line.
10471         (print_command_lines, execute_user_command)
10472         (execute_control_command_1, while_command, if_command): Update.
10473         (realloc_body_list): Remove.
10474         (process_next_line, recurse_read_control_structure): Update.
10475         (read_command_lines, read_command_lines_1): Return counted_command_line.
10476         (free_command_lines): Use "delete".
10477         (copy_command_lines): Remove.
10478         (define_command, document_command, show_user_1): Update.
10479         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10480         a counted_command_line.
10481         * breakpoint.h (counted_command_line): Remove typedef.
10482         (breakpoint_set_commands): Update.
10483         * breakpoint.c (check_no_tracepoint_commands)
10484         (validate_commands_for_breakpoint): Update.
10485         (breakpoint_set_commands): Change commands to be a
10486         counted_command_line.
10487         (commands_command_1, update_dprintf_command_list)
10488         (create_tracepoint_from_upload): Update.
10489
10490 2018-05-04  Tom Tromey  <tom@tromey.com>
10491
10492         * cli/cli-decode.h (cmd_list_element): New constructor.
10493         (~cmd_list_element): New destructor.
10494         (struct cmd_list_element): Add initializers.
10495         * cli/cli-decode.c (do_add_cmd): Use "new".
10496         (delete_cmd): Use "delete".
10497
10498 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10499             Pedro Alves <palves@redhat.com>
10500
10501         PR breakpoints/19806 and support for PR external/20207.
10502         * NEWS: Mention Aarch64 watchpoint improvements.
10503         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10504         watchpoints and PR external/20207 watchpoints.
10505         * nat/aarch64-linux-hw-point.c
10506         (kernel_supports_any_contiguous_range): New.
10507         (aarch64_watchpoint_offset): New.
10508         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10509         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10510         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10511         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10512         next_addr_orig_p.  Support PR external/20207 watchpoints.
10513         (aarch64_downgrade_regs): New.
10514         (aarch64_dr_state_insert_one_point): New parameters offset and
10515         addr_orig.
10516         (aarch64_dr_state_remove_one_point): Likewise.
10517         (aarch64_handle_breakpoint): Update caller.
10518         (aarch64_handle_aligned_watchpoint): Likewise.
10519         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10520         aligned_offset.
10521         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10522         aarch64_downgrade_regs.
10523         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10524         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10525         (DR_CONTROL_MASK): ... this.
10526         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10527         (unsigned int aarch64_watchpoint_offset): New prototype.
10528         (aarch64_linux_set_debug_regs): Remove const from state.
10529         * utils.c (align_up, align_down): Move to ...
10530         * common/common-utils.c (align_up, align_down): ... here.
10531         * utils.h (align_up, align_down): Move to ...
10532         * common/common-utils.h (align_up, align_down): ... here.
10533
10534 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10535
10536         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10537         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10538         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10539         Re-implement to match the ABI as summarized in GCC's
10540         gcc/config/sparc/sparc.c.  All callers updated.
10541         (sparc32_store_arguments): Remove assertion.
10542
10543 2018-05-04  Tom Tromey  <tom@tromey.com>
10544
10545         * printcmd.c: Don't include tui.h.
10546         (decode_format): Use skip_spaces.
10547
10548 2018-05-04  Tom Tromey  <tom@tromey.com>
10549
10550         PR gdb/22619:
10551         * printcmd.c (last_count): New global.
10552         (x_command): Use saved count when repeating.
10553
10554 2018-05-04  Tom Tromey  <tom@tromey.com>
10555
10556         * nto-procfs.c (do_closedir_cleanup): Remove.
10557         (procfs_pidlist): Use gdb_dir_up.
10558         * procfs.c (do_closedir_cleanup): Remove.
10559         (proc_update_threads): Use gdb_dir_up.
10560         * common/filestuff.h (struct gdb_dir_deleter): New.
10561         (gdb_dir_up): New typedef.
10562
10563 2018-05-04  Tom Tromey  <tom@tromey.com>
10564
10565         * ada-lang.c (print_mention_exception): Use std::string.
10566
10567 2018-05-04  Tom Tromey  <tom@tromey.com>
10568
10569         * ada-lang.c (create_excep_cond_exprs): Update.
10570         (ada_exception_catchpoint_cond_string): Use std::string.
10571
10572 2018-05-04  Tom Tromey  <tom@tromey.com>
10573
10574         * ada-lang.c (xget_renaming_scope): Return std::string.
10575         (old_renaming_is_invisible): Update.
10576
10577 2018-05-04  Tom Tromey  <tom@tromey.com>
10578
10579         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10580         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10581
10582 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10583
10584         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10585
10586 2018-05-04  Tom Tromey  <tom@tromey.com>
10587
10588         * remote.c (remote_query_supported_append): Change type.
10589         (remote_check_symbols): Update.
10590
10591 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10592
10593         PR gdb/11420
10594         * configure.ac: Prepend libpython.
10595         * python/python-config.py: Likewise.
10596         * configure: Regenerate.
10597
10598 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10599
10600         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10601
10602 2018-05-03  Pedro Alves  <palves@redhat.com>
10603
10604         * s390-linux-nat.c
10605         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10606         override.  Write 'true' instead of '1'.
10607         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10608         declaration.
10609
10610 2018-05-02  Pedro Alves  <palves@redhat.com>
10611
10612         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10613         add_inf_child_target.
10614         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10615         add_inf_child_target.
10616         * aix-thread.c (aix_thread_target_info): New.
10617         (aix_thread_target) <shortname, longname, doc>: Delete.
10618         <info>: New.
10619         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10620         add_inf_child_target.
10621         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10622         add_inf_child_target.
10623         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10624         add_inf_child_target.
10625         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10626         add_inf_child_target.
10627         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10628         add_inf_child_target.
10629         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10630         add_inf_child_target.
10631         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10632         add_inf_child_target.
10633         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10634         add_inf_child_target.
10635         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10636         add_inf_child_target.
10637         * bfd-target.c (target_bfd_target_info): New.
10638         (target_bfd) <shortname, longname, doc>: Delete.
10639         <info>: New.
10640         * bsd-kvm.c (bsd_kvm_target_info): New.
10641         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10642         <info>: New.
10643         (bsd_kvm_target::open): Rename to ...
10644         (bsd_kvm_target_open): ... this.  Adjust.
10645         * bsd-uthread.c (bsd_uthread_target_info): New.
10646         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10647         <info>: New.
10648         * corefile.c (core_file_command): Adjust.
10649         * corelow.c (core_target_info): New.
10650         (core_target) <shortname, longname, doc>: Delete.
10651         <info>: New.
10652         (core_target::open): Rename to ...
10653         (core_target_open): ... this.  Adjust.
10654         * ctf.c (ctf_target_info): New.
10655         (ctf_target) <shortname, longname, doc>: Delete.
10656         <info>: New.
10657         (ctf_target::open): Rename to ...
10658         (ctf_target_open): ... this.
10659         (_initialize_ctf): Adjust.
10660         * exec.c (exec_target_info): New.
10661         (exec_target) <shortname, longname, doc>: Delete.
10662         <info>: New.
10663         (exec_target::open): Rename to ...
10664         (exec_target_open): ... this.
10665         * gdbcore.h (core_target_open): Declare.
10666         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10667         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10668         add_inf_child_target.
10669         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10670         add_inf_child_target.
10671         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10672         add_inf_child_target.
10673         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10674         add_inf_child_target.
10675         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10676         add_inf_child_target.
10677         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10678         add_inf_child_target.
10679         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10680         add_inf_child_target.
10681         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10682         add_inf_child_target.
10683         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10684         add_inf_child_target.
10685         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10686         add_inf_child_target.
10687         * inf-child.c (inf_child_target_info): New.
10688         (inf_child_target::info): New.
10689         (inf_child_open_target): Remove 'target' parameter.  Use
10690         get_native_target instead.
10691         (inf_child_target::open): Delete.
10692         (add_inf_child_target): New.
10693         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10694         Delete.
10695         <info>: New.
10696         (add_inf_child_target): Declare.
10697         (inf_child_open_target): Declare.
10698         * linux-thread-db.c (thread_db_target_info): New.
10699         (thread_db_target) <shortname, longname, doc>: Delete.
10700         <info>: New.
10701         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10702         add_inf_child_target.
10703         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10704         add_inf_child_target.
10705         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10706         add_inf_child_target.
10707         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10708         add_inf_child_target.
10709         * make-target-delegates (print_class): Adjust.
10710         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10711         add_inf_child_target.
10712         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10713         add_inf_child_target.
10714         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10715         add_inf_child_target.
10716         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10717         add_inf_child_target.
10718         * nto-procfs.c (nto_native_target_info): New.
10719         (nto_procfs_target_native) <shortname, longname, doc>:
10720         Delete.
10721         <info>: New.
10722         (nto_procfs_target_info): New.
10723         (nto_procfs_target_procfs) <shortname, longname, doc>:
10724         Delete.
10725         <info>: New.
10726         (init_procfs_targets): Adjust.
10727         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10728         add_inf_child_target.
10729         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10730         add_inf_child_target.
10731         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10732         add_inf_child_target.
10733         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10734         add_inf_child_target.
10735         * ravenscar-thread.c (ravenscar_target_info): New.
10736         (ravenscar_thread_target) <shortname, longname, doc>:
10737         Delete.
10738         <info>: New.
10739         * record-btrace.c (record_btrace_target_info):
10740         (record_btrace_target) <shortname, longname, doc>: Delete.
10741         <info>: New.
10742         (record_btrace_target::open): Rename to ...
10743         (record_btrace_target_open): ... this.  Adjust.
10744         * record-full.c (record_longname, record_doc): New.
10745         (record_full_base_target) <shortname, longname, doc>: Delete.
10746         <info>: New.
10747         (record_full_target_info): New.
10748         (record_full_target): <shortname>: Delete.
10749         <info>: New.
10750         (record_full_core_open_1, record_full_open_1): Update comments.
10751         (record_full_base_target::open): Rename to ...
10752         (record_full_open): ... this.
10753         (cmd_record_full_restore): Update.
10754         (_initialize_record_full): Update.
10755         * remote-sim.c (remote_sim_target_info): New.
10756         (gdbsim_target) <shortname, longname, doc>: Delete.
10757         <info>: New.
10758         (gdbsim_target::open): Rename to ...
10759         (gdbsim_target_open): ... this.
10760         (_initialize_remote_sim): Adjust.
10761         * remote.c (remote_doc): New.
10762         (remote_target_info): New.
10763         (remote_target) <shortname, longname, doc>: Delete.
10764         <info>: New.
10765         (extended_remote_target_info): New.
10766         (extended_remote_target) <shortname, longname, doc>: Delete.
10767         <info>: New.
10768         (remote_target::open_1): Make static.  Adjust.
10769         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10770         * s390-linux-nat.c (_initialize_s390_nat): Use
10771         add_inf_child_target.
10772         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10773         add_inf_child_target.
10774         * sol-thread.c (thread_db_target_info): New.
10775         (sol_thread_target) <shortname, longname, doc>: Delete.
10776         <info>: New.
10777         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10778         add_inf_child_target.
10779         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10780         add_inf_child_target.
10781         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10782         add_inf_child_target.
10783         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10784         add_inf_child_target.
10785         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10786         add_inf_child_target.
10787         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10788         add_inf_child_target.
10789         * spu-linux-nat.c (_initialize_spu_nat): Use
10790         add_inf_child_target.
10791         * spu-multiarch.c (spu_multiarch_target_info): New.
10792         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10793         <info>: New.
10794         * target-delegates.c: Regenerate.
10795         * target.c: Include <unordered_map>.
10796         (target_ops_p): Delete.
10797         (DEF_VEC_P(target_ops_p)): Delete.
10798         (target_factories): New.
10799         (test_target_info): New.
10800         (test_target_ops::info): New.
10801         (open_target): Adjust to use target_factories.
10802         (add_target_with_completer): Rename to ...
10803         (add_target): ... this.  Change prototype.  Register target_info
10804         and open callback in target_factories.  Register target_info in
10805         command context instead of target_ops.
10806         (add_target): Delete old implementation.
10807         (add_deprecated_target_alias): Change prototype.  Adjust.
10808         (the_native_target): New.
10809         (set_native_target, get_native_target): New.
10810         (find_default_run_target): Use the_native_target.
10811         (find_attach_target, find_run_target): Simplify.
10812         (target_ops::open): Delete.
10813         (dummy_target_info): New.
10814         (dummy_target::shortname, dummy_target::longname)
10815         (dummy_target::doc): Delete.
10816         (dummy_target::info): New.
10817         (debug_target::shortname, debug_target::longname)
10818         (debug_target::doc): Delete.
10819         (debug_target::info): New.
10820         * target.h (struct target_info): New.
10821         (target_ops::~target_ops): Add comment.
10822         (target_ops::info): New.
10823         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10824         longer virtual.  Implement in terms of target_info.
10825         (set_native_target, get_native_target): Declare.
10826         (target_open_ftype): New.
10827         (add_target, add_target_with_completer)
10828         (add_deprecated_target_alias): Change prototype.
10829         (test_target) <shortname, longname, doc>: Delete.
10830         <info>: New.
10831         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10832         add_inf_child_target.
10833         * tracefile-tfile.c (tfile_target_info): New.
10834         (tfile_target) <shortname, longname, doc>: Delete.
10835         <info>: New.
10836         (tfile_target::open): Rename to ...
10837         (tfile_target_open): ... this.
10838         (_initialize_tracefile_tfile): Adjust.
10839         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10840         add_inf_child_target.
10841         * windows-nat.c (_initialize_windows_nat): Use
10842         add_inf_child_target.
10843         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10844         add_inf_child_target.
10845
10846 2018-05-02  Pedro Alves  <palves@redhat.com>
10847
10848         * linux-nat.h (linux_nat_target) <low_new_thread,
10849         low_delete_thread, low_new_fork, low_forget_process,
10850         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10851         New virtual methods.
10852         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10853         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10854         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10855         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10856         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10857         Delete.
10858         * linux-fork.c (delete_fork): Adjust to call low method.
10859         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10860         (linux_nat_new_fork, linux_nat_forget_process_hook)
10861         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10862         (linux_nat_status_is_event):
10863         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10864         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10865         to call low method.
10866         (sigtrap_is_event): Rename to ...
10867         (linux_nat_target::low_status_is_event): ... this.
10868         (linux_nat_set_status_is_event): Delete.
10869         (save_stop_reason, linux_nat_wait_1)
10870         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10871         low methods.
10872         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10873         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10874         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10875         (linux_nat_set_prepare_to_resume): Delete.
10876         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10877         low virtual methods.
10878         * amd64-linux-nat.c: Likewise.
10879         * arm-linux-nat.c: Likewise.
10880         * i386-linux-nat.c: Likewise.
10881         * ia64-linux-nat.c: Likewise.
10882         * mips-linux-nat.c: Likewise.
10883         * ppc-linux-nat.c: Likewise.
10884         * s390-linux-nat.c: Likewise.
10885         * sparc64-linux-nat.c: Likewise.
10886         * x86-linux-nat.c: Likewise.
10887         * x86-linux-nat.h: Include "nat/x86-linux.h".
10888         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10889         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10890         Override methods.
10891
10892 2018-05-02  Pedro Alves  <palves@redhat.com>
10893
10894         * target.h (target_ops)
10895         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10896         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10897         stopped_by_watchpoint, have_continuable_watchpoint,
10898         stopped_data_address, watchpoint_addr_within_range,
10899         can_accel_watchpoint_condition, can_run, thread_alive,
10900         has_all_memory, has_memory, has_stack, has_registers,
10901         has_execution, can_async_p, is_async_p, supports_non_stop,
10902         always_non_stop_p, can_execute_reverse, supports_multi_process,
10903         supports_enable_disable_tracepoint,
10904         supports_disable_randomization, supports_string_tracing,
10905         supports_evaluation_of_breakpoint_conditions,
10906         can_run_breakpoint_commands, filesystem_is_local,
10907         can_download_tracepoint, get_trace_state_variable_value,
10908         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10909         record_is_replaying, record_will_replay,
10910         augmented_libraries_svr4_read>: Adjust to return bool.
10911         * aarch64-linux-nat.c: All implementations adjusted.
10912         * aix-thread.c: All implementations adjusted.
10913         * arm-linux-nat.c: All implementations adjusted.
10914         * breakpoint.c: All implementations adjusted.
10915         * bsd-kvm.c: All implementations adjusted.
10916         * bsd-uthread.c: All implementations adjusted.
10917         * corelow.c: All implementations adjusted.
10918         * ctf.c: All implementations adjusted.
10919         * darwin-nat.c: All implementations adjusted.
10920         * darwin-nat.h: All implementations adjusted.
10921         * exec.c: All implementations adjusted.
10922         * fbsd-nat.c: All implementations adjusted.
10923         * fbsd-nat.h: All implementations adjusted.
10924         * gnu-nat.c: All implementations adjusted.
10925         * gnu-nat.h: All implementations adjusted.
10926         * go32-nat.c: All implementations adjusted.
10927         * ia64-linux-nat.c: All implementations adjusted.
10928         * inf-child.c: All implementations adjusted.
10929         * inf-child.h: All implementations adjusted.
10930         * inf-ptrace.c: All implementations adjusted.
10931         * inf-ptrace.h: All implementations adjusted.
10932         * linux-nat.c: All implementations adjusted.
10933         * linux-nat.h: All implementations adjusted.
10934         * mips-linux-nat.c: All implementations adjusted.
10935         * nto-procfs.c: All implementations adjusted.
10936         * ppc-linux-nat.c: All implementations adjusted.
10937         * procfs.c: All implementations adjusted.
10938         * ravenscar-thread.c: All implementations adjusted.
10939         * record-btrace.c: All implementations adjusted.
10940         * record-full.c: All implementations adjusted.
10941         * remote-sim.c: All implementations adjusted.
10942         * remote.c: All implementations adjusted.
10943         * s390-linux-nat.c: All implementations adjusted.
10944         * sol-thread.c: All implementations adjusted.
10945         * spu-multiarch.c: All implementations adjusted.
10946         * target-delegates.c: All implementations adjusted.
10947         * target.c: All implementations adjusted.
10948         * target.h: All implementations adjusted.
10949         * tracefile-tfile.c: All implementations adjusted.
10950         * tracefile.c: All implementations adjusted.
10951         * tracefile.h: All implementations adjusted.
10952         * windows-nat.c: All implementations adjusted.
10953         * x86-linux-nat.h: All implementations adjusted.
10954         * x86-nat.h: All implementations adjusted.
10955
10956 2018-05-02  Pedro Alves  <palves@redhat.com>
10957
10958         * make-target-delegates (scan_target_h): Don't trim lines here.
10959         Replace sequences of tabs and/or whitespace with a single
10960         whitespace.
10961         (top level, parsing methods): Trim each line before processing it
10962         here.
10963
10964 2018-05-02  Pedro Alves  <palves@redhat.com>
10965             John Baldwin  <jhb@freebsd.org>
10966
10967         * target.h (enum strata) <debug_stratum>: New.
10968         (struct target_ops) <all delegation methods>: Replace by C++
10969         virtual methods, and drop "to_" prefix.  All references updated
10970         throughout.
10971         <to_shortname, to_longname, to_doc, to_data,
10972         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10973         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10974         virtual methods.  All references updated throughout.
10975         <can_attach, supports_terminal_ours, can_create_inferior,
10976         get_thread_control_capabilities, attach_no_wait>: New
10977         virtual methods.
10978         <insert_breakpoint, remove_breakpoint>: Now
10979         TARGET_DEFAULT_NORETURN methods.
10980         <info_proc>: Now returns bool.
10981         <to_magic>: Delete.
10982         (OPS_MAGIC): Delete.
10983         (current_target): Delete.  All references replaced by references
10984         to ...
10985         (target_stack): ... this.  New.
10986         (target_shortname, target_longname): Adjust.
10987         (target_can_run): Now a function declaration.
10988         (default_child_has_all_memory, default_child_has_memory)
10989         (default_child_has_stack, default_child_has_registers)
10990         (default_child_has_execution): Remove target_ops parameter.
10991         (complete_target_initialization): Delete.
10992         (memory_breakpoint_target): New template class.
10993         (test_target_ops): Refactor as a C++ class with virtual methods.
10994         * make-target-delegates (NAME_PART): Tighten.
10995         (POINTER_PART, CP_SYMBOL): New.
10996         (SIMPLE_RETURN_PART): Reimplement.
10997         (VEC_RETURN_PART): Expect less.
10998         (RETURN_PART, VIRTUAL_PART): New.
10999         (METHOD): Adjust to C++ virtual methods.
11000         (scan_target_h): Remove reference to C99.
11001         (dname): Output "target_ops::" prefix.
11002         (write_function_header): Adjust to output a C++ class method.
11003         (write_declaration): New.
11004         (write_delegator): Adjust to output a C++ class method.
11005         (tdname): Output "dummy_target::" prefix.
11006         (write_tdefault, write_debugmethod): Adjust to output a C++ class
11007         method.
11008         (tdefault_names, debug_names): Delete.
11009         (return_types, tdefaults, styles, argtypes_array): New.
11010         (top level): All methods are delegators.
11011         (print_class): New.
11012         (top level): Print dummy_target and debug_target classes.
11013         * target-delegates.c: Regenerate.
11014         * target-debug.h (target_debug_print_enum_info_proc_what)
11015         (target_debug_print_thread_control_capabilities)
11016         (target_debug_print_thread_info_p): New.
11017         * target.c (dummy_target): Delete.
11018         (the_dummy_target, the_debug_target): New.
11019         (target_stack): Now extern.
11020         (set_targetdebug): Push/unpush debug target.
11021         (default_child_has_all_memory, default_child_has_memory)
11022         (default_child_has_stack, default_child_has_registers)
11023         (default_child_has_execution): Remove target_ops parameter.
11024         (complete_target_initialization): Delete.
11025         (add_target_with_completer): No longer call
11026         complete_target_initialization.
11027         (target_supports_terminal_ours): Use regular delegation.
11028         (update_current_target): Delete.
11029         (push_target): No longer check magic number.  Don't call
11030         update_current_target.
11031         (unpush_target): Don't call update_current_target.
11032         (target_is_pushed): No longer check magic number.
11033         (target_require_runnable): Skip for all stratums over
11034         process_stratum.
11035         (target_ops::info_proc): New.
11036         (target_info_proc): Use find_target_at and
11037         find_default_run_target.
11038         (target_supports_disable_randomization): Use regular delegation.
11039         (target_get_osdata): Use find_target_at.
11040         (target_ops::open, target_ops::close, target_ops::can_attach)
11041         (target_ops::attach, target_ops::can_create_inferior)
11042         (target_ops::create_inferior, target_ops::can_run)
11043         (target_can_run): New.
11044         (default_fileio_target): Use regular delegation.
11045         (target_ops::fileio_open, target_ops::fileio_pwrite)
11046         (target_ops::fileio_pread, target_ops::fileio_fstat)
11047         (target_ops::fileio_close, target_ops::fileio_unlink)
11048         (target_ops::fileio_readlink): New.
11049         (target_fileio_open_1, target_fileio_unlink)
11050         (target_fileio_readlink): Always call the target method.  Handle
11051         FILEIO_ENOSYS.
11052         (return_zero, return_zero_has_execution): Delete.
11053         (init_dummy_target): Delete.
11054         (dummy_target::dummy_target, dummy_target::shortname)
11055         (dummy_target::longname, dummy_target::doc)
11056         (debug_target::debug_target, debug_target::shortname)
11057         (debug_target::longname, debug_target::doc): New.
11058         (target_supports_delete_record): Use regular delegation.
11059         (setup_target_debug): Delete.
11060         (maintenance_print_target_stack): Skip debug_stratum.
11061         (initialize_targets): Instantiate the_dummy_target and
11062         the_debug_target.
11063         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
11064         use target_stack.
11065         (target_auxv_search, fprint_target_auxv): Adjust.
11066         (info_auxv_command): Adjust to use target_stack.
11067         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11068         * exceptions.c (print_flush): Handle a NULL target_stack.
11069         * regcache.c (target_ops_no_register): Refactor as class with
11070         virtual methods.
11071
11072         * exec.c (exec_target): New class.
11073         (exec_ops): Now an exec_target.
11074         (exec_open, exec_close_1, exec_get_section_table)
11075         (exec_xfer_partial, exec_files_info, exec_has_memory)
11076         (exec_make_note_section): Refactor as exec_target methods.
11077         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11078         Delete.
11079         (exec_target::find_memory_regions): New.
11080         (_initialize_exec): Don't call init_exec_ops.
11081         * gdbcore.h (exec_file_clear): Delete.
11082
11083         * corefile.c (core_target): Delete.
11084         (core_file_command): Adjust.
11085         * corelow.c (core_target): New class.
11086         (the_core_target): New.
11087         (core_close): Remove target_ops parameter.
11088         (core_close_cleanup): Adjust.
11089         (core_target::close): New.
11090         (core_open, core_detach, get_core_registers, core_files_info)
11091         (core_xfer_partial, core_thread_alive, core_read_description)
11092         (core_pid_to_str, core_thread_name, core_has_memory)
11093         (core_has_stack, core_has_registers, core_info_proc): Rework as
11094         core_target methods.
11095         (ignore, core_remove_breakpoint, init_core_ops): Delete.
11096         (_initialize_corelow): Initialize the_core_target.
11097         * gdbcore.h (core_target): Delete.
11098         (the_core_target): New.
11099
11100         * ctf.c: (ctf_target): New class.
11101         (ctf_ops): Now a ctf_target.
11102         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11103         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11104         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11105         methods.
11106         (init_ctf_ops): Delete.
11107         (_initialize_ctf): Don't call it.
11108         * tracefile-tfile.c (tfile_target): New class.
11109         (tfile_ops): Now a tfile_target.
11110         (tfile_open, tfile_close, tfile_files_info)
11111         (tfile_get_tracepoint_status, tfile_trace_find)
11112         (tfile_fetch_registers, tfile_xfer_partial)
11113         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11114         Refactor as tfile_target methods.
11115         (tfile_xfer_partial_features): Remove target_ops parameter.
11116         (init_tfile_ops): Delete.
11117         (_initialize_tracefile_tfile): Don't call it.
11118         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11119         (tracefile_has_stack, tracefile_has_registers)
11120         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11121         tracefile_target methods.
11122         (init_tracefile_ops): Delete.
11123         (tracefile_target::tracefile_target): New.
11124         * tracefile.h: Include "target.h".
11125         (tracefile_target): New class.
11126         (init_tracefile_ops): Delete.
11127
11128         * spu-multiarch.c (spu_multiarch_target): New class.
11129         (spu_ops): Now a spu_multiarch_target.
11130         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11131         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11132         (spu_search_memory, spu_mourn_inferior): Refactor as
11133         spu_multiarch_target methods.
11134         (init_spu_ops): Delete.
11135         (_initialize_spu_multiarch): Remove references to init_spu_ops,
11136         complete_target_initialization.
11137
11138         * ravenscar-thread.c (ravenscar_thread_target): New class.
11139         (ravenscar_ops): Now a ravenscar_thread_target.
11140         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11141         (ravenscar_thread_alive, ravenscar_pid_to_str)
11142         (ravenscar_fetch_registers, ravenscar_store_registers)
11143         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11144         (ravenscar_stopped_by_hw_breakpoint)
11145         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11146         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11147         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11148         methods.
11149         (init_ravenscar_thread_ops): Delete.
11150         (_initialize_ravenscar): Remove references to
11151         init_ravenscar_thread_ops and complete_target_initialization.
11152
11153         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11154         (bsd_uthread_target): New class.
11155         (bsd_uthread_ops): Now a bsd_uthread_target.
11156         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11157         (bsd_uthread_close, bsd_uthread_mourn_inferior)
11158         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11159         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11160         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11161         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11162         (bsd_uthread_target): Delete function.
11163         (_initialize_bsd_uthread): Remove reference to
11164         complete_target_initialization.
11165
11166         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
11167         (target_bfd): ... this new class.
11168         (target_bfd_xfer_partial, target_bfd_get_section_table)
11169         (target_bfd_close): Refactor as target_bfd methods.
11170         (target_bfd::~target_bfd): New.
11171         (target_bfd_reopen): Adjust.
11172         (target_bfd::close): New.
11173
11174         * record-btrace.c (record_btrace_target): New class.
11175         (record_btrace_ops): Now a record_btrace_target.
11176         (record_btrace_open, record_btrace_stop_recording)
11177         (record_btrace_disconnect, record_btrace_close)
11178         (record_btrace_async, record_btrace_info)
11179         (record_btrace_insn_history, record_btrace_insn_history_range)
11180         (record_btrace_insn_history_from, record_btrace_call_history)
11181         (record_btrace_call_history_range)
11182         (record_btrace_call_history_from, record_btrace_record_method)
11183         (record_btrace_is_replaying, record_btrace_will_replay)
11184         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11185         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11186         (record_btrace_store_registers, record_btrace_prepare_to_store)
11187         (record_btrace_to_get_unwinder)
11188         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11189         (record_btrace_commit_resume, record_btrace_wait)
11190         (record_btrace_stop, record_btrace_can_execute_reverse)
11191         (record_btrace_stopped_by_sw_breakpoint)
11192         (record_btrace_supports_stopped_by_sw_breakpoint)
11193         (record_btrace_stopped_by_hw_breakpoint)
11194         (record_btrace_supports_stopped_by_hw_breakpoint)
11195         (record_btrace_update_thread_list, record_btrace_thread_alive)
11196         (record_btrace_goto_begin, record_btrace_goto_end)
11197         (record_btrace_goto, record_btrace_stop_replaying_all)
11198         (record_btrace_execution_direction)
11199         (record_btrace_prepare_to_generate_core)
11200         (record_btrace_done_generating_core): Refactor as
11201         record_btrace_target methods.
11202         (init_record_btrace_ops): Delete.
11203         (_initialize_record_btrace): Remove reference to
11204         init_record_btrace_ops.
11205         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11206         the execution_direction global.
11207         (record_full_base_target, record_full_target)
11208         (record_full_core_target): New classes.
11209         (record_full_ops): Now a record_full_target.
11210         (record_full_core_ops): Now a record_full_core_target.
11211         (record_full_target::detach, record_full_target::disconnect)
11212         (record_full_core_target::disconnect)
11213         (record_full_target::mourn_inferior, record_full_target::kill):
11214         New.
11215         (record_full_open, record_full_close, record_full_async): Refactor
11216         as methods of the record_full_base_target class.
11217         (record_full_resume, record_full_commit_resume): Refactor
11218         as methods of the record_full_target class.
11219         (record_full_wait, record_full_stopped_by_watchpoint)
11220         (record_full_stopped_data_address)
11221         (record_full_stopped_by_sw_breakpoint)
11222         (record_full_supports_stopped_by_sw_breakpoint)
11223         (record_full_stopped_by_hw_breakpoint)
11224         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11225         methods of the record_full_base_target class.
11226         (record_full_store_registers, record_full_xfer_partial)
11227         (record_full_insert_breakpoint, record_full_remove_breakpoint):
11228         Refactor as methods of the record_full_target class.
11229         (record_full_can_execute_reverse, record_full_get_bookmark)
11230         (record_full_goto_bookmark, record_full_execution_direction)
11231         (record_full_record_method, record_full_info, record_full_delete)
11232         (record_full_is_replaying, record_full_will_replay)
11233         (record_full_goto_begin, record_full_goto_end, record_full_goto)
11234         (record_full_stop_replaying): Refactor as methods of the
11235         record_full_base_target class.
11236         (record_full_core_resume, record_full_core_kill)
11237         (record_full_core_fetch_registers)
11238         (record_full_core_prepare_to_store)
11239         (record_full_core_store_registers, record_full_core_xfer_partial)
11240         (record_full_core_insert_breakpoint)
11241         (record_full_core_remove_breakpoint)
11242         (record_full_core_has_execution): Refactor
11243         as methods of the record_full_core_target class.
11244         (record_full_base_target::supports_delete_record): New.
11245         (init_record_full_ops): Delete.
11246         (init_record_full_core_ops): Delete.
11247         (record_full_save): Refactor as method of the
11248         record_full_base_target class.
11249         (_initialize_record_full): Remove references to
11250         init_record_full_ops and init_record_full_core_ops.
11251
11252         * remote.c (remote_target, extended_remote_target): New classes.
11253         (remote_ops): Now a remote_target.
11254         (extended_remote_ops): Now an extended_remote_target.
11255         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11256         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11257         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11258         (remote_pass_signals, remote_set_syscall_catchpoint)
11259         (remote_program_signals, )
11260         (remote_thread_always_alive): Remove target_ops parameter.
11261         (remote_thread_alive, remote_thread_name)
11262         (remote_update_thread_list, remote_threads_extra_info)
11263         (remote_static_tracepoint_marker_at)
11264         (remote_static_tracepoint_markers_by_strid)
11265         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11266         (remote_open): Refactor as methods of remote_target.
11267         (extended_remote_open, extended_remote_detach)
11268         (extended_remote_attach, extended_remote_post_attach):
11269         (extended_remote_supports_disable_randomization)
11270         (extended_remote_create_inferior): : Refactor as method of
11271         extended_remote_target.
11272         (remote_set_permissions, remote_open_1, remote_detach)
11273         (remote_follow_fork, remote_follow_exec, remote_disconnect)
11274         (remote_resume, remote_commit_resume, remote_stop)
11275         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11276         (remote_terminal_ours, remote_wait, remote_fetch_registers)
11277         (remote_prepare_to_store, remote_store_registers)
11278         (remote_flash_erase, remote_flash_done, remote_files_info)
11279         (remote_kill, remote_mourn, remote_insert_breakpoint)
11280         (remote_remove_breakpoint, remote_insert_watchpoint)
11281         (remote_watchpoint_addr_within_range)
11282         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11283         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11284         (remote_supports_stopped_by_sw_breakpoint)
11285         (remote_stopped_by_hw_breakpoint)
11286         (remote_supports_stopped_by_hw_breakpoint)
11287         (remote_stopped_by_watchpoint, remote_stopped_data_address)
11288         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11289         (remote_verify_memory): Refactor as methods of remote_target.
11290         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11291         parameter.
11292         (remote_xfer_partial, remote_get_memory_xfer_limit)
11293         (remote_search_memory, remote_rcmd, remote_memory_map)
11294         (remote_pid_to_str, remote_get_thread_local_address)
11295         (remote_get_tib_address, remote_read_description): Refactor as
11296         methods of remote_target.
11297         (remote_target::fileio_open, remote_target::fileio_pwrite)
11298         (remote_target::fileio_pread, remote_target::fileio_close): New.
11299         (remote_hostio_readlink, remote_hostio_fstat)
11300         (remote_filesystem_is_local, remote_can_execute_reverse)
11301         (remote_supports_non_stop, remote_supports_disable_randomization)
11302         (remote_supports_multi_process, remote_supports_cond_breakpoints)
11303         (remote_supports_enable_disable_tracepoint)
11304         (remote_supports_string_tracing)
11305         (remote_can_run_breakpoint_commands, remote_trace_init)
11306         (remote_download_tracepoint, remote_can_download_tracepoint)
11307         (remote_download_trace_state_variable, remote_enable_tracepoint)
11308         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11309         (remote_trace_start, remote_get_trace_status)
11310         (remote_get_tracepoint_status, remote_trace_stop)
11311         (remote_trace_find, remote_get_trace_state_variable_value)
11312         (remote_save_trace_data, remote_get_raw_trace_data)
11313         (remote_set_disconnected_tracing, remote_core_of_thread)
11314         (remote_set_circular_trace_buffer, remote_traceframe_info)
11315         (remote_get_min_fast_tracepoint_insn_len)
11316         (remote_set_trace_buffer_size, remote_set_trace_notes)
11317         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11318         (remote_disable_btrace, remote_teardown_btrace)
11319         (remote_read_btrace, remote_btrace_conf)
11320         (remote_augmented_libraries_svr4_read, remote_load)
11321         (remote_pid_to_exec_file, remote_can_do_single_step)
11322         (remote_execution_direction, remote_thread_handle_to_thread_info):
11323         Refactor as methods of remote_target.
11324         (init_remote_ops, init_extended_remote_ops): Delete.
11325         (remote_can_async_p, remote_is_async_p, remote_async)
11326         (remote_thread_events, remote_upload_tracepoints)
11327         (remote_upload_trace_state_variables): Refactor as methods of
11328         remote_target.
11329         (_initialize_remote): Remove references to init_remote_ops and
11330         init_extended_remote_ops.
11331
11332         * remote-sim.c (gdbsim_target): New class.
11333         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11334         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11335         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11336         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11337         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11338         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11339         Refactor as methods of gdbsim_target.
11340         (gdbsim_ops): Now a gdbsim_target.
11341         (init_gdbsim_ops): Delete.
11342         (gdbsim_cntrl_c): Adjust.
11343         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11344
11345         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11346         (the_amd64_linux_nat_target): New.
11347         (amd64_linux_fetch_inferior_registers)
11348         (amd64_linux_store_inferior_registers): Refactor as methods of
11349         amd64_linux_nat_target.
11350         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
11351         * i386-linux-nat.c: Don't include "linux-nat.h".
11352         (i386_linux_nat_target): New class.
11353         (the_i386_linux_nat_target): New.
11354         (i386_linux_fetch_inferior_registers)
11355         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11356         as methods of i386_linux_nat_target.
11357         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
11358         * inf-child.c (inf_child_ops): Delete.
11359         (inf_child_fetch_inferior_registers)
11360         (inf_child_store_inferior_registers): Delete.
11361         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11362         methods of inf_child_target.
11363         (inf_child_target::supports_terminal_ours)
11364         (inf_child_target::terminal_init)
11365         (inf_child_target::terminal_inferior)
11366         (inf_child_target::terminal_ours_for_output)
11367         (inf_child_target::terminal_ours, inf_child_target::interrupt)
11368         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11369         New.
11370         (inf_child_open, inf_child_disconnect, inf_child_close)
11371         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11372         (inf_child_post_startup_inferior, inf_child_can_run)
11373         (inf_child_pid_to_exec_file): Refactor as methods of
11374         inf_child_target.
11375         (inf_child_follow_fork): Delete.
11376         (inf_child_target::can_create_inferior)
11377         (inf_child_target::can_attach): New.
11378         (inf_child_target::has_all_memory, inf_child_target::has_memory)
11379         (inf_child_target::has_stack, inf_child_target::has_registers)
11380         (inf_child_target::has_execution): New.
11381         (inf_child_fileio_open, inf_child_fileio_pwrite)
11382         (inf_child_fileio_pread, inf_child_fileio_fstat)
11383         (inf_child_fileio_close, inf_child_fileio_unlink)
11384         (inf_child_fileio_readlink, inf_child_use_agent)
11385         (inf_child_can_use_agent): Refactor as methods of
11386         inf_child_target.
11387         (return_zero, inf_child_target): Delete.
11388         (inf_child_target::inf_child_target): New.
11389         * inf-child.h: Include "target.h".
11390         (inf_child_target): Delete function prototype.
11391         (inf_child_target): New class.
11392         (inf_child_open_target, inf_child_mourn_inferior)
11393         (inf_child_maybe_unpush_target): Delete.
11394         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11395         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11396         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11397         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11398         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11399         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11400         (inf_ptrace_wait, inf_ptrace_xfer_partial)
11401         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11402         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11403         methods of inf_ptrace_target.
11404         (inf_ptrace_target): Delete function.
11405         * inf-ptrace.h: Include "inf-child.h".
11406         (inf_ptrace_target): Delete function declaration.
11407         (inf_ptrace_target): New class.
11408         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11409         * linux-nat.c (linux_target): New.
11410         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11411         (linux_nat_target::~linux_nat_target): New.
11412         (linux_child_post_attach, linux_child_post_startup_inferior)
11413         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11414         (linux_child_remove_fork_catchpoint)
11415         (linux_child_insert_vfork_catchpoint)
11416         (linux_child_remove_vfork_catchpoint)
11417         (linux_child_insert_exec_catchpoint)
11418         (linux_child_remove_exec_catchpoint)
11419         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11420         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11421         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11422         (linux_nat_stopped_data_address)
11423         (linux_nat_stopped_by_sw_breakpoint)
11424         (linux_nat_supports_stopped_by_sw_breakpoint)
11425         (linux_nat_stopped_by_hw_breakpoint)
11426         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11427         (linux_nat_kill, linux_nat_mourn_inferior)
11428         (linux_nat_xfer_partial, linux_nat_thread_alive)
11429         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11430         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11431         (linux_child_static_tracepoint_markers_by_strid)
11432         (linux_nat_is_async_p, linux_nat_can_async_p)
11433         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11434         (linux_nat_supports_multi_process)
11435         (linux_nat_supports_disable_randomization, linux_nat_async)
11436         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11437         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11438         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11439         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11440         methods of linux_nat_target.
11441         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11442         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11443         parameter.
11444         (check_stopped_by_watchpoint): Adjust.
11445         (linux_xfer_partial): Delete.
11446         (linux_target_install_ops, linux_target, linux_nat_add_target):
11447         Delete.
11448         (linux_nat_target::linux_nat_target): New.
11449         * linux-nat.h: Include "inf-ptrace.h".
11450         (linux_nat_target): New.
11451         (linux_target, linux_target_install_ops, linux_nat_add_target):
11452         Delete function declarations.
11453         (linux_target): Declare global.
11454         * linux-thread-db.c (thread_db_target): New.
11455         (thread_db_target::thread_db_target): New.
11456         (thread_db_ops): Delete.
11457         (the_thread_db_target): New.
11458         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11459         (thread_db_update_thread_list, thread_db_pid_to_str)
11460         (thread_db_extra_thread_info)
11461         (thread_db_thread_handle_to_thread_info)
11462         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11463         (thread_db_resume): Refactor as methods of thread_db_target.
11464         (init_thread_db_ops): Delete.
11465         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11466         * x86-linux-nat.c: Don't include "linux-nat.h".
11467         (super_post_startup_inferior): Delete.
11468         (x86_linux_nat_target::~x86_linux_nat_target): New.
11469         (x86_linux_child_post_startup_inferior)
11470         (x86_linux_read_description, x86_linux_enable_btrace)
11471         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11472         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11473         methods of x86_linux_nat_target.
11474         (x86_linux_create_target): Delete.  Bits folded ...
11475         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11476         pointer.
11477         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11478         (x86_linux_nat_target): New class.
11479         (x86_linux_create_target): Delete.
11480         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11481         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11482         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11483         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11484         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11485         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11486         make extern.
11487         (x86_use_watchpoints): Delete.
11488         * x86-nat.h: Include "breakpoint.h" and "target.h".
11489         (x86_use_watchpoints): Delete.
11490         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11491         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11492         (x86_insert_watchpoint, x86_remove_watchpoint)
11493         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11494         (x86_stopped_by_hw_breakpoint): New declarations.
11495         (x86_nat_target): New template class.
11496
11497         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11498         (the_ppc_linux_nat_target): New.
11499         (ppc_linux_fetch_inferior_registers)
11500         (ppc_linux_can_use_hw_breakpoint)
11501         (ppc_linux_region_ok_for_hw_watchpoint)
11502         (ppc_linux_ranged_break_num_registers)
11503         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11504         (ppc_linux_insert_mask_watchpoint)
11505         (ppc_linux_remove_mask_watchpoint)
11506         (ppc_linux_can_accel_watchpoint_condition)
11507         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11508         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11509         (ppc_linux_watchpoint_addr_within_range)
11510         (ppc_linux_masked_watch_num_registers)
11511         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11512         (ppc_linux_read_description): Refactor as methods of
11513         ppc_linux_nat_target.
11514         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11515
11516         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11517         (procfs_target): New class.
11518         (the_procfs_target): New.
11519         (procfs_target): Delete function.
11520         (procfs_auxv_parse, procfs_attach, procfs_detach)
11521         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11522         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11523         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11524         (procfs_create_inferior, procfs_update_thread_list)
11525         (procfs_thread_alive, procfs_pid_to_str)
11526         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11527         (procfs_stopped_data_address, procfs_insert_watchpoint)
11528         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11529         (proc_find_memory_regions, procfs_info_proc)
11530         (procfs_make_note_section): Refactor as methods of procfs_target.
11531         (_initialize_procfs): Adjust.
11532         * sol-thread.c (sol_thread_target): New class.
11533         (sol_thread_ops): Now a sol_thread_target.
11534         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11535         (sol_thread_fetch_registers, sol_thread_store_registers)
11536         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11537         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11538         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11539         (init_sol_thread_ops): Delete.
11540         (_initialize_sol_thread): Adjust.  Remove references to
11541         init_sol_thread_ops and complete_target_initialization.
11542
11543         * windows-nat.c (windows_nat_target): New class.
11544         (windows_fetch_inferior_registers)
11545         (windows_store_inferior_registers, windows_resume, windows_wait)
11546         (windows_attach, windows_detach, windows_pid_to_exec_file)
11547         (windows_files_info, windows_create_inferior)
11548         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11549         (windows_close, windows_pid_to_str, windows_xfer_partial)
11550         (windows_get_tib_address, windows_get_ada_task_ptid)
11551         (windows_thread_name, windows_thread_alive): Refactor as
11552         windows_nat_target methods.
11553         (do_initial_windows_stuff): Adjust.
11554         (windows_target): Delete function.
11555         (_initialize_windows_nat): Adjust.
11556
11557         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11558         (darwin_mourn_inferior, darwin_kill_inferior)
11559         (darwin_create_inferior, darwin_attach, darwin_detach)
11560         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11561         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11562         (darwin_supports_multi_process): Refactor as darwin_nat_target
11563         methods.
11564         (darwin_resume_to, darwin_files_info): Delete.
11565         (_initialize_darwin_inferior): Rename to ...
11566         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11567         * darwin-nat.h: Include "inf-child.h".
11568         (darwin_nat_target): New class.
11569         (darwin_complete_target): Delete.
11570         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11571         (darwin_target): New.
11572         (i386_darwin_fetch_inferior_registers)
11573         (i386_darwin_store_inferior_registers): Refactor as methods of
11574         darwin_nat_target.
11575         (darwin_complete_target): Delete, with ...
11576         (_initialize_i386_darwin_nat): ... bits factored out here.
11577
11578         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11579         (the_alpha_linux_nat_target): New.
11580         (alpha_linux_register_u_offset): Refactor as
11581         alpha_linux_nat_target method.
11582         (_initialize_alpha_linux_nat): Adjust.
11583         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11584         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11585         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11586         methods of linux_nat_trad_target.
11587         (linux_trad_target): Delete.
11588         * linux-nat-trad.h (linux_trad_target): Delete function.
11589         (linux_nat_trad_target): New class.
11590         * mips-linux-nat.c (mips_linux_nat_target): New class.
11591         (super_fetch_registers, super_store_registers, super_close):
11592         Delete.
11593         (the_mips_linux_nat_target): New.
11594         (mips64_linux_regsets_fetch_registers)
11595         (mips64_linux_regsets_store_registers)
11596         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11597         (mips_linux_register_u_offset, mips_linux_read_description)
11598         (mips_linux_can_use_hw_breakpoint)
11599         (mips_linux_stopped_by_watchpoint)
11600         (mips_linux_stopped_data_address)
11601         (mips_linux_region_ok_for_hw_watchpoint)
11602         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11603         (mips_linux_close): Refactor as methods of mips_linux_nat.
11604         (_initialize_mips_linux_nat): Adjust to C++ification.
11605
11606         * aix-thread.c (aix_thread_target): New class.
11607         (aix_thread_ops): Now an aix_thread_target.
11608         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11609         (aix_thread_fetch_registers, aix_thread_store_registers)
11610         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11611         (aix_thread_thread_alive, aix_thread_pid_to_str)
11612         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11613         Refactor as methods of aix_thread_target.
11614         (init_aix_thread_ops): Delete.
11615         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11616         and complete_target_initialization.
11617         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11618         (rs6000_nat_target): New class.
11619         (the_rs6000_nat_target): New.
11620         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11621         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11622         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11623         (super_create_inferior): Delete.
11624         (_initialize_rs6000_nat): Adjust to C++ification.
11625
11626         * arm-linux-nat.c (arm_linux_nat_target): New class.
11627         (the_arm_linux_nat_target): New.
11628         (arm_linux_fetch_inferior_registers)
11629         (arm_linux_store_inferior_registers, arm_linux_read_description)
11630         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11631         (arm_linux_remove_hw_breakpoint)
11632         (arm_linux_region_ok_for_hw_watchpoint)
11633         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11634         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11635         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11636         arm_linux_nat_target.
11637         (_initialize_arm_linux_nat): Adjust to C++ification.
11638
11639         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11640         (the_aarch64_linux_nat_target): New.
11641         (aarch64_linux_fetch_inferior_registers)
11642         (aarch64_linux_store_inferior_registers)
11643         (aarch64_linux_child_post_startup_inferior)
11644         (aarch64_linux_read_description)
11645         (aarch64_linux_can_use_hw_breakpoint)
11646         (aarch64_linux_insert_hw_breakpoint)
11647         (aarch64_linux_remove_hw_breakpoint)
11648         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11649         (aarch64_linux_region_ok_for_hw_watchpoint)
11650         (aarch64_linux_stopped_data_address)
11651         (aarch64_linux_stopped_by_watchpoint)
11652         (aarch64_linux_watchpoint_addr_within_range)
11653         (aarch64_linux_can_do_single_step): Refactor as methods of
11654         aarch64_linux_nat_target.
11655         (super_post_startup_inferior): Delete.
11656         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11657
11658         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11659         (the_hppa_linux_nat_target): New.
11660         (hppa_linux_fetch_inferior_registers)
11661         (hppa_linux_store_inferior_registers): Refactor as methods of
11662         hppa_linux_nat_target.
11663         (_initialize_hppa_linux_nat): Adjust to C++ification.
11664
11665         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11666         (the_ia64_linux_nat_target): New.
11667         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11668         (ia64_linux_stopped_data_address)
11669         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11670         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11671         ia64_linux_nat_target methods.
11672         (super_xfer_partial): Delete.
11673         (_initialize_ia64_linux_nat): Adjust to C++ification.
11674
11675         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11676         (the_m32r_linux_nat_target): New.
11677         (m32r_linux_fetch_inferior_registers)
11678         (m32r_linux_store_inferior_registers): Refactor as
11679         m32r_linux_nat_target methods.
11680         (_initialize_m32r_linux_nat): Adjust to C++ification.
11681
11682         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11683         (the_m68k_linux_nat_target): New.
11684         (m68k_linux_fetch_inferior_registers)
11685         (m68k_linux_store_inferior_registers): Refactor as
11686         m68k_linux_nat_target methods.
11687         (_initialize_m68k_linux_nat): Adjust to C++ification.
11688
11689         * s390-linux-nat.c (s390_linux_nat_target): New class.
11690         (the_s390_linux_nat_target): New.
11691         (s390_linux_fetch_inferior_registers)
11692         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11693         (s390_insert_watchpoint, s390_remove_watchpoint)
11694         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11695         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11696         (s390_auxv_parse, s390_read_description): Refactor as methods of
11697         s390_linux_nat_target.
11698         (_initialize_s390_nat): Adjust to C++ification.
11699
11700         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11701         (the_sparc_linux_nat_target): New.
11702         (_initialize_sparc_linux_nat): Adjust to C++ification.
11703         * sparc-nat.c (sparc_fetch_inferior_registers)
11704         (sparc_store_inferior_registers): Remove target_ops parameter.
11705         * sparc-nat.h (sparc_fetch_inferior_registers)
11706         (sparc_store_inferior_registers): Remove target_ops parameter.
11707         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11708         (the_sparc64_linux_nat_target): New.
11709         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11710
11711         * spu-linux-nat.c (spu_linux_nat_target): New class.
11712         (the_spu_linux_nat_target): New.
11713         (spu_child_post_startup_inferior, spu_child_post_attach)
11714         (spu_child_wait, spu_fetch_inferior_registers)
11715         (spu_store_inferior_registers, spu_xfer_partial)
11716         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11717         methods.
11718         (_initialize_spu_nat): Adjust to C++ification.
11719
11720         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11721         (the_tilegx_linux_nat_target): New.
11722         (fetch_inferior_registers, store_inferior_registers):
11723         Refactor as methods.
11724         (_initialize_tile_linux_nat): Adjust to C++ification.
11725
11726         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11727         (the_xtensa_linux_nat_target): New.
11728         (xtensa_linux_fetch_inferior_registers)
11729         (xtensa_linux_store_inferior_registers): Refactor as
11730         xtensa_linux_nat_target methods.
11731         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11732
11733         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11734         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11735         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11736         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11737         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11738         (fbsd_stopped_by_sw_breakpoint)
11739         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11740         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11741         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11742         (fbsd_post_startup_inferior, fbsd_post_attach)
11743         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11744         (fbsd_set_syscall_catchpoint)
11745         (super_xfer_partial, super_resume, super_wait)
11746         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11747         (fbsd_handle_debug_trap): Remove target_ops parameter.
11748         (fbsd_nat_add_target): Delete.
11749         * fbsd-nat.h: Include "inf-ptrace.h".
11750         (fbsd_nat_add_target): Delete.
11751         (USE_SIGTRAP_SIGINFO): Define.
11752         (fbsd_nat_target): New class.
11753
11754         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11755         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11756         (amd64bsd_target): Delete.
11757         * amd64-bsd-nat.h: New file.
11758         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11759         "x86-bsd-nat.h".
11760         (amd64_fbsd_nat_target): New class.
11761         (the_amd64_fbsd_nat_target): New.
11762         (amd64fbsd_read_description): Refactor as method of
11763         amd64_fbsd_nat_target.
11764         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11765         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11766         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11767         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11768         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11769         (i386bsd_target): Delete.
11770         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11771         (i386bsd_fetch_inferior_registers)
11772         (i386bsd_store_inferior_registers): Declare.
11773         (i386_bsd_nat_target): New class.
11774         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11775         (the_i386_fbsd_nat_target): New.
11776         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11777         i386_fbsd_nat_target methods.
11778         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11779         (_initialize_i386fbsd_nat): Adjust to C++ification.
11780         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11781         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11782         (_initialize_x86_bsd_nat): Adjust to C++ification.
11783         * x86-bsd-nat.h: Include "x86-nat.h".
11784         (x86bsd_target): Delete declaration.
11785         (x86bsd_nat_target): New class.
11786
11787         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11788         (the_aarch64_fbsd_nat_target): New.
11789         (aarch64_fbsd_fetch_inferior_registers)
11790         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11791         aarch64_fbsd_nat_target.
11792         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11793         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11794         (the_alpha_bsd_nat_target): New.
11795         (alphabsd_fetch_inferior_registers)
11796         (alphabsd_store_inferior_registers): Refactor as
11797         alpha_bsd_nat_target methods.
11798         (_initialize_alphabsd_nat): Refactor as methods of
11799         alpha_bsd_nat_target.
11800         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11801         (the_amd64_nbsd_nat_target): New.
11802         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11803         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11804         (the_amd64_obsd_nat_target): New.
11805         (_initialize_amd64obsd_nat): Adjust to C++ification.
11806         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11807         (the_arm_fbsd_nat_target): New.
11808         (arm_fbsd_fetch_inferior_registers)
11809         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11810         (_initialize_arm_fbsd_nat): Refactor as methods of
11811         arm_fbsd_nat_target.
11812         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11813         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11814         (the_arm_netbsd_nat_target): New.
11815         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11816         arm_netbsd_nat_target.
11817         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11818         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11819         (the_hppa_nbsd_nat_target): New.
11820         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11821         hppa_nbsd_nat_target methods.
11822         (_initialize_hppanbsd_nat): Adjust to C++ification.
11823         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11824         (the_hppa_obsd_nat_target): New.
11825         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11826         methods of hppa_obsd_nat_target.
11827         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11828         add_target.
11829         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11830         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11831         add_target.
11832         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11833         (_initialize_i386obsd_nat): Use add_target.
11834         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11835         (the_m68k_bsd_nat_target): New.
11836         (m68kbsd_fetch_inferior_registers)
11837         (m68kbsd_store_inferior_registers): Refactor as methods of
11838         m68k_bsd_nat_target.
11839         (_initialize_m68kbsd_nat): Adjust to C++ification.
11840         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11841         (the_mips_fbsd_nat_target): New.
11842         (mips_fbsd_fetch_inferior_registers)
11843         (mips_fbsd_store_inferior_registers): Refactor as methods of
11844         mips_fbsd_nat_target.
11845         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11846         add_target.
11847         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11848         (the_mips_nbsd_nat_target): New.
11849         (mipsnbsd_fetch_inferior_registers)
11850         (mipsnbsd_store_inferior_registers): Refactor as methods of
11851         mips_nbsd_nat_target.
11852         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11853         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11854         (the_mips64_obsd_nat_target): New.
11855         (mips64obsd_fetch_inferior_registers)
11856         (mips64obsd_store_inferior_registers): Refactor as methods of
11857         mips64_obsd_nat_target.
11858         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11859         add_target.
11860         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11861         nbsd_nat_target.
11862         * nbsd-nat.h: Include "inf-ptrace.h".
11863         (nbsd_nat_target): New class.
11864         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11865         (obsd_wait): Refactor as methods of obsd_nat_target.
11866         (obsd_add_target): Delete.
11867         * obsd-nat.h: Include "inf-ptrace.h".
11868         (obsd_nat_target): New class.
11869         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11870         (the_ppc_fbsd_nat_target): New.
11871         (ppcfbsd_fetch_inferior_registers)
11872         (ppcfbsd_store_inferior_registers): Refactor as methods of
11873         ppc_fbsd_nat_target.
11874         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11875         add_target.
11876         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11877         (the_ppc_nbsd_nat_target): New.
11878         (ppcnbsd_fetch_inferior_registers)
11879         (ppcnbsd_store_inferior_registers): Refactor as methods of
11880         ppc_nbsd_nat_target.
11881         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11882         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11883         (the_ppc_obsd_nat_target): New.
11884         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11885         methods of ppc_obsd_nat_target.
11886         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11887         add_target.
11888         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11889         (the_sh_nbsd_nat_target): New.
11890         (shnbsd_fetch_inferior_registers)
11891         (shnbsd_store_inferior_registers): Refactor as methods of
11892         sh_nbsd_nat_target.
11893         (_initialize_shnbsd_nat): Adjust to C++ification.
11894         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11895         (inf_ptrace_xfer_partial): Delete.
11896         (sparc_xfer_partial, sparc_target): Delete.
11897         * sparc-nat.h (sparc_fetch_inferior_registers)
11898         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11899         (sparc_target): Delete function declaration.
11900         (sparc_target): New template class.
11901         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11902         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11903         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11904         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11905         add_target.
11906         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11907         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11908         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11909         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11910         add_target.
11911         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11912         (the_vax_bsd_nat_target): New.
11913         (vaxbsd_fetch_inferior_registers)
11914         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11915         methods.
11916         (_initialize_vaxbsd_nat): Adjust to C++ification.
11917
11918         * bsd-kvm.c (bsd_kvm_target): New class.
11919         (bsd_kvm_ops): Now a bsd_kvm_target.
11920         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11921         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11922         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11923         bsd_kvm_target.
11924         (bsd_kvm_return_one): Delete.
11925         (bsd_kvm_add_target): Adjust to C++ification.
11926
11927         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11928         (nto_procfs_target_procfs): New classes.
11929         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11930         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11931         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11932         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11933         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11934         (procfs_remove_hw_breakpoint, procfs_resume)
11935         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11936         (procfs_kill_inferior, procfs_store_registers)
11937         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11938         as methods of nto_procfs_target.
11939         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11940         (nto_native_ops): Delete.
11941         (procfs_open, procfs_native_open): Delete.
11942         (nto_native_ops): Now an nto_procfs_target_native.
11943         (init_procfs_targets): Adjust to C++ification.
11944         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11945         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11946         Refactor as methods of nto_procfs_target.
11947
11948         * go32-nat.c (go32_nat_target): New class.
11949         (the_go32_nat_target): New.
11950         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11951         (go32_store_registers, go32_xfer_partial, go32_files_info)
11952         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11953         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11954         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11955         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11956         (go32_target): Delete.
11957         (_initialize_go32_nat): Adjust to C++ification.
11958
11959         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11960         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11961         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11962         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11963         gnu_nat_target.
11964         (gnu_target): Delete.
11965         * gnu-nat.h (gnu_target): Delete.
11966         (gnu_nat_target): New class.
11967         * i386-gnu-nat.c (gnu_base_target): New.
11968         (i386_gnu_nat_target): New class.
11969         (the_i386_gnu_nat_target): New.
11970         (_initialize_i386gnu_nat): Adjust to C++ification.
11971
11972 2018-05-02  Pedro Alves  <palves@redhat.com>
11973
11974         * bfd-target.c (target_bfd_xclose): Rename to ...
11975         (target_bfd_close): ... this.
11976         (target_bfd_reopen): Adjust.
11977         * target.c (target_close): Remove references to to_xclose.
11978         * target.h (target_ops::to_xclose): Delete.
11979         (target_ops::to_close): Update comments.
11980
11981 2018-05-02  Pedro Alves  <palves@redhat.com>
11982
11983         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11984         "linux-nat.h".
11985         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11986         * inf-ptrace.c (inf_ptrace_register_u_offset)
11987         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11988         (inf_ptrace_store_register, inf_ptrace_store_registers)
11989         (inf_ptrace_trad_target): Move to ...
11990         * linux-nat-trad.c: ... this new file.
11991         * linux-nat-trad.h: New file.
11992         * linux-nat.c (linux_target_install_ops): Make extern.
11993         (linux_trad_target): Delete.
11994         * linux-nat.h (linux_trad_target): Delete declaration.
11995         (linux_target_install_ops): Declare.
11996         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11997         "linux-nat.h".
11998
11999 2018-05-02  Pedro Alves  <palves@redhat.com>
12000
12001         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12002         procfs_target/add_target here.
12003         * procfs.c (procfs_target): Make static.
12004         (_initialize_procfs): Call add_target here.
12005         * procfs.h (struct target_ops): Remove forward declaration.
12006         (procfs_target): Remove declaration.
12007         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
12008
12009 2018-05-02  Pedro Alves  <palves@redhat.com>
12010
12011         * procfs.c (procfs_stopped_by_watchpoint)
12012         (procfs_insert_watchpoint, procfs_remove_watchpoint)
12013         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
12014         Forward declare.
12015         (procfs_use_watchpoints): Delete, move contents...
12016         (procfs_target): ... here.
12017         * procfs.h (procfs_use_watchpoints): Delete declaration.
12018         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12019         procfs_use_watchpoints.
12020         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12021         procfs_use_watchpoints.
12022
12023 2018-05-02  Tom Tromey  <tom@tromey.com>
12024
12025         PR python/20084:
12026         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12027         and var_zuinteger_unlimited.
12028         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12029         and PARAM_ZUINTEGER_UNLIMITED.
12030         (set_parameter_value): Handle var_zuinteger and
12031         var_zuinteger_unlimited.
12032         (add_setshow_generic): Likewise.
12033         (parmpy_init): Likewise.
12034
12035 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
12036
12037         PR rust/23124
12038         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
12039         pointer is not null before dereferencing it.
12040
12041 2018-04-30  Tom Tromey  <tom@tromey.com>
12042
12043         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12044         is_mi_like_p.
12045
12046 2018-04-30  Tom Tromey  <tom@tromey.com>
12047
12048         * breakpoint.c (mention): Remove use of is_mi_like_p.
12049         (print_mention_ranged_breakpoint): Likewise.
12050         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12051         of is_mi_like_p.
12052
12053 2018-04-30  Tom Tromey  <tom@tromey.com>
12054
12055         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12056
12057 2018-04-30  Tom Tromey  <tom@tromey.com>
12058
12059         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12060         (info_spu_event_command): Remove some uses of is_mi_like_p.
12061
12062 2018-04-30  Tom Tromey  <tom@tromey.com>
12063
12064         * python/py-framefilter.c (py_print_single_arg)
12065         (enumerate_locals, py_print_args, py_print_frame): Remove some
12066         uses of is_mi_like_p.
12067
12068 2018-04-30  Tom Tromey  <tom@tromey.com>
12069
12070         * ui-out.c: Update.
12071         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12072         * ui-out.h (ui_out::is_mi_like_p): Now const.
12073         (ui_out::do_is_mi_like_p): Now const.
12074         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12075
12076 2018-04-30  Tom Tromey  <tom@tromey.com>
12077
12078         * varobj.c (varobj_set_visualizer): Use new_reference.
12079         * python/python.c (gdbpy_decode_line): Use new_reference.
12080         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12081         new_reference.
12082
12083 2018-04-30  Tom Tromey  <tom@tromey.com>
12084
12085         * varobj.c (install_new_value): Use new_reference.
12086         * value.h (value_incref): Return void.  Swap intro comment with
12087         value_decref.
12088         * value.c (set_value_parent): Use new_reference.
12089         (value_incref): Return void.  Update intro comment.
12090         (release_value): Use new_reference.
12091         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12092
12093 2018-04-30  Tom Tromey  <tom@tromey.com>
12094
12095         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12096         * gdb_bfd.h (new_bfd_ref): Remove.
12097         (gdb_bfd_open): Update comment.
12098         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12099         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12100         (gdb_bfd_fdopenr): Use new_reference.
12101         * exec.c (exec_file_attach): Use new_reference.
12102
12103 2018-04-30  Tom Tromey  <tom@tromey.com>
12104
12105         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12106         method.
12107
12108 2018-04-30  Tom Tromey  <tom@tromey.com>
12109
12110         * jit.c (jit_read_code_entry): Use type_align.
12111         * i386-tdep.c (i386_gdbarch_init): Don't call
12112         set_gdbarch_long_long_align_bit.
12113         * gdbarch.sh: Remove long_long_align_bit.
12114         * gdbarch.c, gdbarch.h: Rebuild.
12115         * arc-tdep.c (arc_type_align): New function.
12116         (arc_gdbarch_init): Use arc_type_align.  Don't call
12117         set_gdbarch_long_long_align_bit.
12118
12119 2018-04-30  Tom Tromey  <tom@tromey.com>
12120
12121         * rust-lang.c (rust_type_alignment): Remove.
12122         (rust_composite_type): Use type_align.
12123
12124 2018-04-30  Tom Tromey  <tom@tromey.com>
12125
12126         * NEWS: Mention Type.align.
12127         * python/py-type.c (typy_get_alignof): New function.
12128         (type_object_getset): Add "alignof".
12129
12130 2018-04-30  Tom Tromey  <tom@tromey.com>
12131
12132         PR exp/17095:
12133         * NEWS: Update.
12134         * std-operator.def (UNOP_ALIGNOF): New operator.
12135         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12136         New.
12137         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12138         * c-lang.c (c_op_print_tab): Add alignof.
12139         * c-exp.y (ALIGNOF): New token.
12140         (exp): Add "ALIGNOF" production.
12141         (ident_tokens): Add _Alignof and alignof.
12142
12143 2018-04-30  Tom Tromey  <tom@tromey.com>
12144
12145         * i386-tdep.c (i386_type_align): New function.
12146         (i386_gdbarch_init): Update.
12147         * gdbarch.sh (type_align): New method.
12148         * gdbarch.c, gdbarch.h: Rebuild.
12149         * arch-utils.h (default_type_align): Declare.
12150         * arch-utils.c (default_type_align): New function.
12151         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12152         (struct type) <align_log2>: New field.
12153         <instance_flags>: Now a bitfield.
12154         (TYPE_RAW_ALIGN): New macro.
12155         (type_align, type_raw_align, set_type_align): Declare.
12156         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12157         functions.
12158         * dwarf2read.c (quirk_rust_enum): Set type alignment.
12159         (get_alignment, maybe_set_alignment): New functions.
12160         (read_structure_type, read_enumeration_type, read_array_type)
12161         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12162         (read_subrange_type, read_base_type): Set type alignment.
12163
12164 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
12165
12166         * dwarf2read.c (read_index_from_section): Use bool.
12167
12168 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
12169
12170         PR gdb/22950
12171         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12172         with #ifdef.
12173
12174 2018-04-29  John Reiser  <jreiser@BitWagon.com>
12175
12176         PR build/22873
12177         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12178         last step, and do it atomically.
12179
12180 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
12181
12182         * compile/compile-c-types.c (convert_int, convert_float):
12183         Update for C FE v1.
12184
12185 2018-04-27  Tom Tromey  <tom@tromey.com>
12186
12187         PR rust/22545:
12188         * rust-lang.c (rust_inclusive_range_type_p): New function.
12189         (rust_range): Handle inclusive ranges.
12190         (rust_compute_range): Likewise.
12191         * rust-exp.y (struct rust_op) <inclusive>: New field.
12192         (DOTDOTEQ): New constant.
12193         (range_expr): Add "..=" productions.
12194         (operator_tokens): Add "..=" token.
12195         (ast_range): Add "inclusive" parameter.
12196         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12197         ranges.
12198         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12199         bounds values.
12200         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12201         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12202         Update comments.
12203         * expprint.c (print_subexp_standard): Handle new bounds values.
12204         (dump_subexp_body_standard): Likewise.
12205
12206 2018-04-27  Tom Tromey  <tom@tromey.com>
12207
12208         * configure: Rebuild.
12209         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12210         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12211         "OVERRIDE".
12212         (class symbol_needs_eval_context): Likewise.
12213         * dwarf2read.c (mock_mapped_index::symbol_name_count)
12214         (mock_mapped_index::symbol_name_at): Use "override".  Remove
12215         "virtual".
12216         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12217         "override".
12218         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12219         * aarch64-tdep.c (instruction_reader::read): Use "override".
12220         (instruction_reader_test::read): Likewise.
12221         * arm-tdep.c (instruction_reader::read): Use "override".
12222         (instruction_reader_thumb::read): Likewise.
12223
12224 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
12225
12226         PR remote/9665
12227         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12228         instead of remote_send.
12229         (remote_send): Remove.
12230
12231 2018-04-26  Pedro Alves  <palves@redhat.com>
12232
12233         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12234         find_function_start_sal instead of find_pc_line.
12235
12236 2018-04-26  Pedro Alves  <palves@redhat.com>
12237
12238         * breakpoint.c (set_breakpoint_location_function): Handle
12239         mst_data_gnu_ifunc.
12240         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12241         * elfread.c (elf_symtab_read): Give data symbols with
12242         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12243         (elf_rel_plt_read): Update comment.
12244         * linespec.c (convert_linespec_to_sals): Handle
12245         mst_data_gnu_ifunc.
12246         (minsym_found): Handle mst_data_gnu_ifunc.
12247         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12248         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12249         * parse.c (find_minsym_type_and_address): Handle
12250         mst_data_gnu_ifunc.
12251         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12252         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12253         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12254         comment.
12255         <mst_data_gnu_ifunc>: New enumerator.
12256
12257 2018-04-26  Pedro Alves  <palves@redhat.com>
12258
12259         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12260         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
12261         'want_trampoline' parameter by a lookup_msym_prefer parameter.
12262         Handle it.
12263         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12264         (lookup_minimal_symbol_by_pc): Adjust.
12265         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12266         (lookup_solib_trampoline_symbol_by_pc): Adjust.
12267         * minsyms.h (lookup_msym_prefer): New enum.
12268         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12269         parameter by a lookup_msym_prefer parameter.
12270
12271 2018-04-26  Pedro Alves  <palves@redhat.com>
12272
12273         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12274         ends in "@plt" instead of looking at the symbol's section.
12275
12276 2018-04-26  Pedro Alves  <palves@redhat.com>
12277
12278         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
12279         all references.
12280         (find_pc_partial_function_gnu_ifunc): Rename to ...
12281         (find_pc_partial_function): ... this, and remove references to
12282         'is_gnu_ifunc_p'.
12283         (find_pc_partial_function): Delete old implementation.
12284         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12285
12286 2018-04-26  Pedro Alves  <palves@redhat.com>
12287
12288         * linespec.c (struct bound_minimal_symbol_search_key): New.
12289         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
12290         skip first line if we found a GNU ifunc minimal symbol by name.
12291         (compare_msymbols): Change parameters to work with a destructured
12292         lhs minsym.
12293         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12294         functions.
12295
12296 2018-04-26  Pedro Alves  <palves@redhat.com>
12297
12298         * breakpoint.c (set_breakpoint_location_function): Don't resolve
12299         ifunc targets here.  Instead, if we have an ifunc minsym, use its
12300         address/name.
12301         (add_location_to_breakpoint): Store the minsym and the objfile in
12302         the breakpoint location.
12303         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12304         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12305         Record the minsym in the sal.
12306         * symtab.h (symtab_and_line) <msymbol>: New field.
12307
12308 2018-04-26  Pedro Alves  <palves@redhat.com>
12309
12310         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12311         unless we actually resolved the ifunc.
12312
12313 2018-04-26  Pedro Alves  <palves@redhat.com>
12314
12315         * c-exp.y (variable production): Prefer ifunc minsyms over
12316         regular function symbols.
12317         * symtab.c (find_gnu_ifunc): New function.
12318         * minsyms.h (lookup_msym_prefer): New enum.
12319         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12320         parameter by a lookup_msym_prefer parameter.
12321         * symtab.h (find_gnu_ifunc): New declaration.
12322
12323 2018-04-26  Pedro Alves  <palves@redhat.com>
12324
12325         * blockframe.c (find_gnu_ifunc_target_type): New function.
12326         (find_function_type): New.
12327         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12328         return a value with a memory address.
12329         (eval_call): For calls to GNU ifunc functions, try to find the
12330         type of the target function from the type that the resolver
12331         returns.
12332         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12333         symbols.
12334         * infcall.c (find_function_return_type): Delete.
12335         (find_function_addr): Add 'function_type' parameter.  For calls to
12336         GNU ifunc functions, try to find the type of the target function
12337         from the type that the resolver returns, and return it via
12338         FUNCTION_TYPE.
12339         (call_function_by_hand_dummy): Adjust to use the function type
12340         returned by find_function_addr.
12341         (find_function_addr): Add 'function_type' parameter and move
12342         description here.
12343         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12344         declarations.
12345
12346 2018-04-26  Pedro Alves  <palves@redhat.com>
12347
12348         * c-exp.y (variable production): Skip finding an alias for ifunc
12349         symbols.
12350
12351 2018-04-26  Pedro Alves  <palves@redhat.com>
12352
12353         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12354
12355 2018-04-25  Pedro Alves  <palves@redhat.com>
12356
12357         * infcmd.c (kill_command): Print the pid as string, not the whole
12358         thread's ptid.  Add comment.  s/has been killed/killed/ in output
12359         message.
12360         * remote.c (remote_detach_1): Print the pid as string, not the
12361         whole thread's ptid.
12362
12363 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
12364             Sergio Durigan Junior  <sergiodj@redhat.com>
12365             Pedro Alves  <palves@redhat.com>
12366
12367         * infcmd.c (kill_command): Print message when inferior has
12368         been killed.
12369         * inferior.c (print_inferior_events): Remove 'static'.  Set as
12370         '1'.
12371         (add_inferior): Improve message printed when
12372         'print_inferior_events' is on.
12373         (exit_inferior): Remove message printed when
12374         'print_inferior_events' is on.
12375         (detach_inferior): Improve message printed when
12376         'print_inferior_events' is on.
12377         (initialize_inferiors): Use 'add_inferior_silent' to set
12378         'current_inferior_'.
12379         * inferior.h (print_inferior_events): Declare here as
12380         'extern'.
12381         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12382         '[Detaching...]' messages when 'print_inferior_events' is on.
12383         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
12384         as prefix/suffix for messages.  Remove periods.  Fix erroneous
12385         'Detaching after fork from child...', replace it by '... from
12386         parent...'.
12387         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12388         prefix/suffix when printing 'Detaching...' messages.  Print
12389         them when 'print_inferior_events' is on.
12390         * remote.c (remote_detach_1): Print message when detaching
12391         from inferior and '!is_fork_parent'.
12392
12393 2018-04-24  Tom Tromey  <tom@tromey.com>
12394
12395         * cli-out.h: Reindent.
12396
12397 2018-04-24  Tom Tromey  <tom@tromey.com>
12398
12399         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12400         (cli_ui_out::do_field_string): Use fputs_filtered.
12401         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12402
12403 2018-04-23  Tom Tromey  <tom@tromey.com>
12404
12405         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12406         gdb::unique_xmalloc_ptr.
12407
12408 2018-04-23  Tom Tromey  <tom@tromey.com>
12409
12410         * configure: Rebuild.
12411
12412 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12413
12414         PR gdb/23095
12415         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12416         prepare_for_testing.  Set normal_bp to r_debug_state if target
12417         is bsd.
12418
12419 2018-04-21  Pedro Alves  <palves@redhat.com>
12420             Rajendra SY  <rajendra.sy@gmail.com>
12421
12422         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12423         * remote.c (extended_remote_attach): In all-stop mode, mark the
12424         thread as executing.
12425
12426 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12427
12428         * thread.c (thread_apply_all_command): Fix comment.
12429         (thread_command): Fix comment.
12430
12431 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12432
12433         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12434         parameter.
12435         * features/aarch64-core.c (create_feature_aarch64_core):
12436         Regenerate.
12437         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12438         Likewise.
12439         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12440         Likewise.
12441         * features/i386/32bit-avx512.c
12442         (create_feature_i386_32bit_avx512): Likewise.
12443         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12444         Likewise.
12445         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12446         Likewise.
12447         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12448         Likewise.
12449         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12450         Likewise.
12451         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12452         Likewise.
12453         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12454         Likewise.
12455         * features/i386/64bit-avx512.c
12456         (create_feature_i386_64bit_avx512): Likewise.
12457         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12458         Likewise.
12459         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12460         Likewise.
12461         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12462         Likewise.
12463         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12464         Likewise.
12465         * features/i386/64bit-segments.c
12466         (create_feature_i386_64bit_segments): Likewise.
12467         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12468         Likewise.
12469         * features/i386/x32-core.c
12470         (create_feature_i386_x32_core): Likewise.
12471         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12472         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12473         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12474         * target-descriptions.c: In generated code, don't pass xml
12475         filename.
12476
12477 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12478
12479         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12480         (print_xml_feature::visit_post): Likewise.
12481         (print_xml_feature::visit): Likewise.
12482         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12483         (print_xml_feature): Add new class.
12484         * regformats/regdat.sh: Null xmltarget on feature targets.
12485         * target-descriptions.c (struct target_desc): Add xmltarget.
12486         (maintenance_check_tdesc_xml_convert): Add unittest function.
12487         (tdesc_get_features_xml): Add function to get xml.
12488         (maintenance_check_xml_descriptions): Test xml generation.
12489         * xml-tdesc.c (string_read_description_xml): Add function.
12490         * xml-tdesc.h (string_read_description_xml): Add declaration.
12491
12492 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12493
12494         * features/Makefile: Add feature marker to targets with new style
12495         target descriptions.
12496         * regformats/aarch64.dat: Regenerate.
12497         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12498         * regformats/i386/amd64-avx-linux.dat: Likewise.
12499         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12500         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12501         * regformats/i386/amd64-linux.dat: Likewise.
12502         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12503         * regformats/i386/amd64.dat: Likewise.
12504         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12505         * regformats/i386/i386-avx-linux.dat: Likewise.
12506         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12507         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12508         * regformats/i386/i386-linux.dat: Likewise.
12509         * regformats/i386/i386-mmx-linux.dat: Likewise.
12510         * regformats/i386/i386-mpx-linux.dat: Likewise.
12511         * regformats/i386/i386.dat: Likewise.
12512         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12513         * regformats/i386/x32-avx-linux.dat: Likewise.
12514         * regformats/i386/x32-linux.dat: Likewise.
12515         * regformats/tic6x-c62x-linux.dat: Likewise.
12516         * regformats/tic6x-c64x-linux.dat: Likewise.
12517         * regformats/tic6x-c64xp-linux.dat: Likewise.
12518         * regformats/regdat.sh: Parse feature marker.
12519
12520 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12521
12522         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12523         (tdesc_osabi_name): Likewise.
12524         * target-descriptions.c (tdesc_architecture_name): Add new
12525         function.
12526         (tdesc_osabi_name): Likewise.
12527
12528 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12529
12530         * common/tdesc.c (tdesc_predefined_type): Move to here.
12531         (tdesc_named_type): Likewise.
12532         (tdesc_create_vector): Likewise.
12533         (tdesc_create_struct): Likewise.
12534         (tdesc_set_struct_size): Likewise.
12535         (tdesc_create_union): Likewise.
12536         (tdesc_create_flags): Likewise.
12537         (tdesc_create_enum): Likewise.
12538         (tdesc_add_field): Likewise.
12539         (tdesc_add_typed_bitfield): Likewise.
12540         (tdesc_add_bitfield): Likewise.
12541         (tdesc_add_flag): Likewise.
12542         (tdesc_add_enum_value): Likewise.
12543         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12544         (struct tdesc_type_vector): Likewise.
12545         (struct tdesc_type_field): Likewise.
12546         (struct tdesc_type_with_fields): Likewise.
12547         (tdesc_create_enum): Add declaration.
12548         (tdesc_add_typed_bitfield): Likewise.
12549         (tdesc_add_enum_value): Likewise.
12550         * target-descriptions.c (tdesc_type_field): Move from here.
12551         (tdesc_type_builtin): Likewise.
12552         (tdesc_type_vector): Likewise.
12553         (tdesc_type_with_fields): Likewise.
12554         (tdesc_predefined_types): Likewise.
12555         (tdesc_named_type): Likewise.
12556         (tdesc_create_vector): Likewise.
12557         (tdesc_create_struct): Likewise.
12558         (tdesc_set_struct_size): Likewise.
12559         (tdesc_create_union): Likewise.
12560         (tdesc_create_flags): Likewise.
12561         (tdesc_create_enum): Likewise.
12562         (tdesc_add_field): Likewise.
12563         (tdesc_add_typed_bitfield): Likewise.
12564         (tdesc_add_bitfield): Likewise.
12565         (tdesc_add_flag): Likewise.
12566         (tdesc_add_enum_value): Likewise.
12567         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12568         (tdesc_add_typed_bitfield): Likewise.
12569         (tdesc_add_enum_value): Likewise.
12570
12571 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12572
12573         * common/tdesc.c (tdesc_feature::accept): Move to here.
12574         (tdesc_feature::operator==): Likewise.
12575         (tdesc_create_reg): Likewise.
12576         * common/tdesc.h (tdesc_type_kind): Likewise.
12577         (struct tdesc_type): Likewise.
12578         (struct tdesc_feature): Likewise.
12579         * regformats/regdat.sh: Create a feature.
12580         * target-descriptions.c (tdesc_type_kind): Move from here.
12581         (tdesc_type): Likewise.
12582         (tdesc_type_up): Likewise.
12583         (tdesc_feature): Likewise.
12584         (tdesc_create_reg): Likewise.
12585
12586 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12587
12588         * Makefile.in: Add arch/tdesc.c
12589         * common/tdesc.c: New file.
12590         * common/tdesc.h (tdesc_element_visitor): Move to here.
12591         (tdesc_element): Likewise.
12592         (tdesc_reg): Likewise.
12593         (tdesc_reg_up): Likewise.
12594         * regformats/regdef.h (reg): Add offset to constructors.
12595         * target-descriptions.c (tdesc_element_visitor): Move from here.
12596         (tdesc_element): Likewise.
12597         (tdesc_reg): Likewise.
12598         (tdesc_reg_up): Likewise.
12599
12600 2018-04-17  Tom Tromey  <tom@tromey.com>
12601
12602         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12603         discriminant field.
12604
12605 2018-04-17  Tom Tromey  <tom@tromey.com>
12606
12607         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12608
12609 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12610
12611         * symtab.c (print_symbol_info): Skip printing filename and line
12612         number when `last' is NULL.
12613         (symtab_symbol_info): Use empty string instead of NULL for first
12614         invocation of print_symbol_info.
12615         (rbreak_command): Pass NULL to `last' parameter of
12616         print_symbol_info.
12617
12618 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12619
12620         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12621         instead of nullptr.
12622
12623 2018-04-16  Pedro Alves  <palves@redhat.com>
12624
12625         * MAINTAINERS (sh): Remove.
12626         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12627         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12628         (ALLDEPFILES): Remove sh64-tdep.c.
12629         * NEWS: Mentions that support for SH-5/SH64 is removed.
12630         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12631         (sh*-*-openbsd*): Ditto.
12632         (sh64-*-elf*): Remove.
12633         (sh*): Remove.
12634         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12635         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12636         * sh-tdep.c: No longer include "sh64-tdep.h".
12637         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12638         * sh64-tdep.c, sh64-tdep.h: Remove files.
12639
12640 2018-04-16  Pedro Alves  <palves@redhat.com>
12641
12642         * MAINTAINERS: Remove m88k.
12643         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12644         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12645         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12646         * NEWS: Mention that support for m88k was removed.
12647         * configure.host (m88*-*-*): Remove support.
12648         * configure.nat (m88k-*-*): Remove support.
12649         * configure.tgt (m88*-*-openbsd*): Remove.
12650         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12651
12652 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12653
12654         * configure.tgt (x86_tobjs): New variable.
12655         (amd64_tobjs, i386_tobjs): Use it.
12656
12657 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12658
12659         * symtab.c (print_symbol_info): Precede the symbol definition by
12660         the line number when available.
12661         * NEWS: Advertise this enhancement.
12662
12663 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12664
12665         * NEWS (New options): announce set/show record btrace cpu.
12666         * btrace.c: Include record-btrace.h.
12667         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12668         the vendor is unknown.
12669         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12670         Maybe overwrite the btrace configuration's cpu.
12671         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12672         (btrace_fetch): Add cpu parameter.  Update callers.
12673         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12674         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12675         errata workarounds if the vendor is unknown.
12676         * python/py-record-btrace.c: Include record-btrace.h.
12677         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12678         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12679         * record-btrace.c (record_btrace_cpu_state_kind): New.
12680         (record_btrace_cpu): New.
12681         (set_record_btrace_cpu_cmdlist): New.
12682         (record_btrace_get_cpu): New.
12683         (require_btrace_thread, record_btrace_info)
12684         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12685         (cmd_set_record_btrace_cpu_none): New.
12686         (cmd_set_record_btrace_cpu_auto): New.
12687         (cmd_set_record_btrace_cpu): New.
12688         (cmd_show_record_btrace_cpu): New.
12689         (_initialize_record_btrace): Initialize set/show record btrace cpu
12690         commands.
12691         * record-btrace.h (record_btrace_get_cpu): New.
12692
12693 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12694
12695         * record.c (set_record_command): Fix typo in message.
12696
12697 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12698
12699         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12700
12701 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12702
12703         * infrun.c (process_event_stop_test): Call
12704         gdbarch_in_indirect_branch_thunk.
12705         * gdbarch.sh (in_indirect_branch_thunk): New.
12706         * gdbarch.c: Regenerated.
12707         * gdbarch.h: Regenerated.
12708         * x86-tdep.h: New.
12709         * x86-tdep.c: New.
12710         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12711         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12712         (ALLDEPFILES): Add x86-tdep.c.
12713         * arch-utils.h (default_in_indirect_branch_thunk): New.
12714         * arch-utils.c (default_in_indirect_branch_thunk): New.
12715         * i386-tdep: Include x86-tdep.h.
12716         (i386_in_indirect_branch_thunk): New.
12717         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12718         function.
12719         * amd64-tdep: Include x86-tdep.h.
12720         (amd64_in_indirect_branch_thunk): New.
12721         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12722
12723 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12724
12725         PR gdb/23053
12726         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12727         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12728         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12729         regression.
12730
12731 2018-04-12  Tom Tromey  <tom@tromey.com>
12732
12733         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12734         (rust_evaluate_subexp): Likewise.
12735
12736 2018-04-12  Pedro Alves  <palves@redhat.com>
12737
12738         * procfs.c (procfs_detach): Make forward declaration's prototype
12739         match definition's protototype.
12740         (proc_get_LDT_entry): Remove stale do_cleanups call.
12741
12742 2018-04-12  Pedro Alves  <palves@redhat.com>
12743
12744         * target.h (target_ops::to_has_exited): Delete.
12745         (target_has_exited): Delete.
12746         * target-delegates.c: Regenerate.
12747
12748 2018-04-11  Pedro Alves  <palves@redhat.com>
12749
12750         * target.c (fileio_fh_t::t): Add comment.
12751         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12752         (target_fileio_close): Handle a NULL target.
12753         (invalidate_fileio_fh): New.
12754         (target_close): Call it.
12755         * remote.c (remote_hostio_send_command): No longer check whether
12756         remote_desc is open.
12757
12758 2018-04-11  Pedro Alves  <palves@redhat.com>
12759
12760         * target.c (fileio_fh_t): Make it a named struct instead of a
12761         typedef.
12762         (fileio_fh_t::is_closed): New method.
12763         (DEF_VEC_O (fileio_fh_t)): Remove.
12764         (fileio_fhandles): Now a std::vector.
12765         (is_closed_fileio_fh): Delete.
12766         (acquire_fileio_fd): Adjust.  Rename parameters.
12767         (release_fileio_fd): Adjust.
12768         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12769         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12770         (target_fileio_close): Adjust.
12771
12772 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12773
12774         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12775         index.
12776
12777 2018-04-10  Pedro Alves  <palves@redhat.com>
12778
12779         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12780         (scoped_finish_thread_state): New class.
12781         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12782         cleanup.
12783         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12784         (fetch_inferior_event, normal_stop): Likewise.
12785         * thread.c (finish_thread_state_cleanup): Delete.
12786
12787 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12788             Pedro Alves  <palves@redhat.com>
12789
12790         * value.c: Include "selftest.h" and "common/array-view.h".
12791         (struct range) <operator ==>: New.
12792         (test_ranges_contain): New.
12793         (check_ranges_vector): New.
12794         (test_insert_into_bit_range_vector): New.
12795         (_initialize_values): Register selftests.
12796         * common/array-view.h (operator==, operator!=): New.
12797
12798 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12799
12800         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12801         an iterator.
12802         * inline-frame.c: Include <algorithm>.
12803         (struct inline_state): Add constructor.
12804         (inline_state_s): Remove.
12805         (DEF_VEC_O(inline_state_s)): Remove.
12806         (inline_states): Change type to std::vector.
12807         (find_inline_frame_state): Adjust to std::vector.
12808         (allocate_inline_frame_state): Remove.
12809         (clear_inline_frame_state): Adjust to std::vector.
12810         (skip_inline_frames): Adjust to std::vector.
12811
12812 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12813
12814         * tracepoint.h (struct trace_state_variable): Add constructor.
12815         <name>: Change type to std::string.
12816         * tracepoint.c (tsv_s): Remove.
12817         (DEF_VEC_O(tsv_s)): Remove.
12818         (tvariables): Change to std::vector.
12819         (create_trace_state_variable): Adjust to std::vector.
12820         (find_trace_state_variable): Likewise.
12821         (find_trace_state_variable_by_number): Likewise.
12822         (delete_trace_state_variable): Likewise.
12823         (trace_variable_command): Adjust to std::string.
12824         (delete_trace_variable_command): Likewise.
12825         (tvariables_info_1): Adjust to std::vector.
12826         (save_trace_state_variables): Likewise.
12827         (start_tracing): Likewise.
12828         (merge_uploaded_trace_state_variables): Adjust to std::vector
12829         and std::string.
12830         * target.h (struct target_ops)
12831         <to_download_trace_state_variable>: Pass reference to
12832         trace_state_variable.
12833         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12834         * target-delegates.c: Re-generate.
12835         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12836         (mi_tsv_deleted): Likewise.
12837         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12838         * remote.c (remote_download_trace_state_variable): Change
12839         pointer to reference and adjust.
12840         * make-target-delegates (parse_argtypes): Handle references.
12841         (write_function_header): Likewise.
12842         (munge_type): Likewise.
12843
12844 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12845
12846         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12847         string_view-selftests.c.
12848         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12849         testsuite.
12850         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12851         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12852         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12853         * unittests/basic_string_view/element_access/char/1.cc:
12854         Likewise.
12855         * unittests/basic_string_view/element_access/char/empty.cc:
12856         Likewise.
12857         * unittests/basic_string_view/element_access/char/front_back.cc:
12858         Likewise.
12859         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12860         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12861         Likewise.
12862         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12863         Likewise.
12864         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12865         Likewise.
12866         * unittests/basic_string_view/operations/compare/char/1.cc:
12867         Likewise.
12868         * unittests/basic_string_view/operations/compare/char/13650.cc:
12869         Likewise.
12870         * unittests/basic_string_view/operations/copy/char/1.cc:
12871         Likewise.
12872         * unittests/basic_string_view/operations/data/char/1.cc:
12873         Likewise.
12874         * unittests/basic_string_view/operations/find/char/1.cc:
12875         Likewise.
12876         * unittests/basic_string_view/operations/find/char/2.cc:
12877         Likewise.
12878         * unittests/basic_string_view/operations/find/char/3.cc:
12879         Likewise.
12880         * unittests/basic_string_view/operations/find/char/4.cc:
12881         Likewise.
12882         * unittests/basic_string_view/operations/rfind/char/1.cc:
12883         Likewise.
12884         * unittests/basic_string_view/operations/rfind/char/2.cc:
12885         Likewise.
12886         * unittests/basic_string_view/operations/rfind/char/3.cc:
12887         Likewise.
12888         * unittests/basic_string_view/operations/substr/char/1.cc:
12889         Likewise.
12890         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12891         * unittests/string_view-selftests.c: New file.
12892
12893 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12894
12895         * unittests/basic_string_view/capacity/1.cc: New file.
12896         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12897         * unittests/basic_string_view/cons/char/1.cc: New file.
12898         * unittests/basic_string_view/cons/char/2.cc: New file.
12899         * unittests/basic_string_view/cons/char/3.cc: New file.
12900         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12901         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12902         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12903         * unittests/basic_string_view/element_access/char/1.cc: New file.
12904         * unittests/basic_string_view/element_access/char/2.cc: New file.
12905         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12906         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12907         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12908         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12909         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12910         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12911         * unittests/basic_string_view/include.cc: New file.
12912         * unittests/basic_string_view/inserters/char/1.cc: New file.
12913         * unittests/basic_string_view/inserters/char/2.cc: New file.
12914         * unittests/basic_string_view/inserters/char/3.cc: New file.
12915         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12916         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12917         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12918         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12919         * unittests/basic_string_view/literals/types.cc: New file.
12920         * unittests/basic_string_view/literals/values.cc: New file.
12921         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12922         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12923         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12924         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12925         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12926         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12927         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12928         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12929         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12930         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12931         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12932         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12933         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12934         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12935         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12936         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12937         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12938         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12939         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12940         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12941         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12942         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12943         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12944         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12945         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12946         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12947         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12948         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12949         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12950         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12951         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12952         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12953         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12954         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12955         * unittests/basic_string_view/operators/char/2.cc: New file.
12956         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12957         * unittests/basic_string_view/range_access/char/1.cc: New file.
12958         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12959         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12960         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12961         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12962         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12963         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12964         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12965         * unittests/basic_string_view/typedefs.cc: New file.
12966         * unittests/basic_string_view/types/1.cc: New file.
12967
12968 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12969
12970         * common/gdb_string_view.h: Remove libstdc++ implementation
12971         details, adjust to gdb reality.
12972         * common/gdb_string_view.tcc: Likewise.
12973         * cli/cli-script.c (struct string_view): Remove.
12974         (user_args) <m_args>: Change element type to gdb::string_view.
12975         (user_args::insert_args): Adjust.
12976
12977 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12978
12979         * common/gdb_string_view.h: New file.
12980         * common/gdb_string_view.tcc: New file.
12981
12982 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12983
12984         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12985         * configure: Re-generate.
12986
12987 2018-04-09  Pedro Alves  <palves@redhat.com>
12988
12989         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12990         (set_target_gdbarch): Call
12991         gdb::observers::architecture_changed.notify instead of
12992         observer_notify_architecture_changed.
12993
12994 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12995
12996         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12997         (do_restore_current_traceframe_cleanup): Remove.
12998         (restore_current_traceframe_cleanup_dtor): Remove.
12999         (make_cleanup_restore_current_traceframe): Remove.
13000         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
13001         New.
13002         * tracepoint.h (struct scoped_restore_current_traceframe): New.
13003         * infrun.c (fetch_inferior_event): Use
13004         scoped_restore_current_traceframe.
13005
13006 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13007
13008         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
13009         Remove.
13010         <n_allocated_type_units>: Remove.
13011         <all_type_units>: Change to std::vector.
13012         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13013         to std::vector change.
13014         (dwarf2_per_objfile::get_cutu): Likewise.
13015         (dwarf2_per_objfile::get_tu): Likewise.
13016         (create_signatured_type_table_from_index): Likewise.
13017         (create_signatured_type_table_from_debug_names): Likewise.
13018         (dw2_symtab_iter_next): Likewise.
13019         (dw2_print_stats): Likewise.
13020         (dw2_expand_all_symtabs): Likewise.
13021         (dw2_expand_marked_cus): Likewise.
13022         (dw2_debug_names_iterator::next): Likewise.
13023         (dwarf2_initialize_objfile): Likewise.
13024         (add_signatured_type_cu_to_table): Likewise.
13025         (create_all_type_units): Likewise.
13026         (add_type_unit): Likewise.
13027         (struct tu_abbrev_offset): Add constructor.
13028         (build_type_psymtabs_1): Adjust to std::vector change.
13029         (print_tu_stats): Likewise.
13030         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13031         (write_debug_names): Likewise.
13032
13033 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13034
13035         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13036         Make an std::vector.
13037         <n_comp_units>: Remove.
13038         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13039         to std::vector change.
13040         (dwarf2_per_objfile::get_cutu): Likewise.
13041         (dwarf2_per_objfile::get_cu): Likewise.
13042         (create_cus_from_index): Likewise.
13043         (create_addrmap_from_index): Likewise.
13044         (create_addrmap_from_aranges): Likewise.
13045         (dwarf2_read_index): Likewise.
13046         (dw2_find_last_source_symtab): Likewise.
13047         (dw2_map_symtabs_matching_filename): Likewise.
13048         (dw2_symtab_iter_next): Likewise.
13049         (dw2_print_stats): Likewise.
13050         (dw2_expand_all_symtabs): Likewise.
13051         (dw2_expand_symtabs_with_fullname): Likewise.
13052         (dw2_expand_marked_cus): Likewise.
13053         (dw2_map_symbol_filenames): Likewise.
13054         (create_cus_from_debug_names): Likewise.
13055         (dwarf2_read_debug_names): Likewise.
13056         (dw2_debug_names_iterator::next): Likewise.
13057         (dwarf2_initialize_objfile): Likewise.
13058         (set_partial_user): Likewise.
13059         (dwarf2_build_psymtabs_hard): Likewise.
13060         (read_comp_units_from_section): Remove arguments, adjust to
13061         std::vector change.
13062         (create_all_comp_units): Adjust to std::vector and
13063         read_comp_units_from_section changes.
13064         (dwarf2_find_containing_comp_unit): Adjust to std::vector
13065         change.
13066         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13067         (psyms_seen_size): Likewise.
13068         (write_gdbindex): Likewise.
13069         (write_debug_names): Likewise.
13070
13071 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13072
13073         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13074         with dwarf2_per_objfile.
13075         (create_cus_from_index): Likewise.
13076         (create_signatured_type_table_from_index): Likewise.
13077         (dwarf2_read_index): Likewise.
13078         (dwarf2_initialize_objfile): Likewise.
13079         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
13080         per_cu rather than get_dwarf2_per_objfile.
13081
13082 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13083
13084         * dwarf2read.h (struct signatured_type): Forward declare.
13085         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13086         New methods.
13087         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13088         (dw2_get_cutu): ...this.
13089         (dwarf2_per_objfile::get_cu): Rename from...
13090         (dw2_get_cu): ...this.
13091         (dwarf2_per_objfile::get_tu): New.
13092         (create_addrmap_from_index): Adjust.
13093         (create_addrmap_from_aranges): Adjust.
13094         (dw2_find_last_source_symtab): Adjust.
13095         (dw2_map_symtabs_matching_filename): Adjust.
13096         (dw2_symtab_iter_next): Adjust.
13097         (dw2_print_stats): Adjust.
13098         (dw2_expand_all_symtabs): Adjust.
13099         (dw2_expand_symtabs_with_fullname): Adjust.
13100         (dw2_expand_marked_cus): Adjust.
13101         (dw_expand_symtabs_matching_file_matcher): Adjust.
13102         (dw2_map_symbol_filenames): Adjust.
13103         (dw2_debug_names_iterator::next): Adjust.
13104         (dwarf2_initialize_objfile): Adjust.
13105         (set_partial_user): Adjust.
13106         (dwarf2_build_psymtabs_hard): Adjust.
13107
13108 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13109
13110         * dwarf2read.c (create_signatured_type_table_from_debug_names):
13111         Remove unused variables.
13112         (dw2_map_symtabs_matching_filename): Likewise.
13113         (dwarf2_record_block_ranges): Likewise.
13114         (dwarf2_read_addr_index): Likewise.
13115         (follow_die_offset): Likewise.
13116
13117 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13118
13119         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13120         to symbol_file_add_main.
13121
13122 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13123
13124         PR mi/22299
13125         * mi/mi-console.c (do_fputc_async_safe): New.
13126         (mi_console_file::write_async_safe): New.
13127         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13128         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13129         New.
13130         * ui-file.c (ui_file::putstrn): Adjust call to
13131         fputstrn_unfiltered.
13132         * utils.c (printchar): Replace do_fputs and do_fprintf
13133         parameters by do_fputc.
13134         (fputstr_filtered): Adjust call to printchar.
13135         (fputstr_unfiltered): Likewise.
13136         (fputstrn_filtered): Likewise.
13137         (fputstrn_unfiltered): Add do_fputc parameter, pass to
13138         printchar.
13139         * utils.h (do_fputc_ftype): New typedef.
13140         (fputstrn_unfiltered): Add do_fputc parameter.
13141
13142 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13143
13144         * regformats/i386/i386-avx.dat: Remove.
13145
13146 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13147
13148         PR gdb/22979
13149         * amd64-tdep.c (amd64_none_init_abi): New function.
13150         (amd64_x32_none_init_abi): New function.
13151         (_initialize_amd64_tdep): Register handlers for x86-64 and
13152         x64_32 with GDB_OSABI_NONE.
13153         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13154         GDB_OSABI_NONE osabi.
13155
13156 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13157
13158         PR gdb/22980
13159         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13160         GDB_OSABI_NONE.
13161         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13162         * osabi.c (gdb_osabi_names): Add "unknown" entry.
13163
13164 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13165
13166         * common/byte-vector.h (char_vector): New type.
13167         * target.h (target_read_alloc): Return
13168         gdb::optional<byte_vector>.
13169         (target_read_stralloc): Return gdb::optional<char_vector>.
13170         (target_get_osdata): Return gdb::optional<char_vector>.
13171         * target.c (target_read_alloc_1): Templatize.  Replacement
13172         manual memory management with vector.
13173         (target_read_alloc): Change return type, adjust.
13174         (target_read_stralloc): Change return type, adjust.
13175         (target_get_osdata): Change return type, adjust.
13176         * auxv.c (struct auxv_info) <length>: Remove.
13177         <data>: Change type to gdb::optional<byte_vector>.
13178         (auxv_inferior_data_cleanup): Free auxv_info with delete.
13179         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13180         (target_auxv_search): Adjust.
13181         (fprint_target_auxv): Adjust.
13182         * avr-tdep.c (avr_io_reg_read_command): Adjust.
13183         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13184         (linux_make_corefile_notes): Adjust.
13185         * osdata.c (get_osdata): Adjust.
13186         * remote.c (remote_get_threads_with_qxfer): Adjust.
13187         (remote_memory_map): Adjust.
13188         (remote_traceframe_info): Adjust.
13189         (btrace_read_config): Adjust.
13190         (remote_read_btrace): Adjust.
13191         (remote_pid_to_exec_file): Adjust.
13192         * solib-aix.c (solib_aix_get_library_list): Adjust.
13193         * solib-dsbt.c (decode_loadmap): Don't free buf.
13194         (dsbt_get_initial_loadmaps): Adjust.
13195         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13196         * solib-target.c (solib_target_current_sos): Adjust.
13197         * tracepoint.c (sdata_make_value): Adjust.
13198         * xml-support.c (xinclude_start_include): Adjust.
13199         (xml_fetch_content_from_file): Adjust.
13200         * xml-support.h (xml_fetch_another): Change return type.
13201         (xml_fetch_content_from_file): Change return type.
13202         * xml-syscall.c (xml_init_syscalls_info): Adjust.
13203         * xml-tdesc.c (file_read_description_xml): Adjust.
13204         (fetch_available_features_from_target): Change return type.
13205         (target_fetch_description_xml): Adjust.
13206         (target_read_description_xml): Adjust.
13207
13208 2018-04-06  Tom Tromey  <tom@tromey.com>
13209
13210         * value.c (~value): Update.
13211         (struct value) <contents>: Now unique_xmalloc_ptr.
13212         (value_contents_bits_eq, allocate_value_contents)
13213         (value_contents_raw, value_contents_all_raw)
13214         (value_contents_for_printing, value_contents_for_printing_const)
13215         (set_value_enclosing_type): Update.
13216
13217 2018-04-06  Tom Tromey  <tom@tromey.com>
13218
13219         * value.c (range_s): Remove typedef, VEC.
13220         (struct range): Add operator<.
13221         (range_lessthan): Remove.
13222         (ranges_contain): Change type.
13223         (~value): Update.
13224         (struct value) <unavailable, optimized_out>: Now std::vector.
13225         (value_entirely_available)
13226         (value_entirely_covered_by_range_vector)
13227         (value_entirely_unavailable, value_entirely_optimized_out):
13228         Update.
13229         (insert_into_bit_range_vector): Change argument type.
13230         (find_first_range_overlap): Likewise.
13231         (struct ranges_and_idx, value_contents_bits_eq)
13232         (require_not_optimized_out, require_available): Update.
13233         (ranges_copy_adjusted): Change argument types.
13234         (value_optimized_out, value_copy, value_fetch_lazy): Update.
13235
13236 2018-04-06  Tom Tromey  <tom@tromey.com>
13237
13238         * value.c (~value): Update.
13239         (struct value) <parent>: Now a value_ref_ptr.
13240         (value_parent, set_value_parent, value_address, value_copy):
13241         Update.
13242
13243 2018-04-06  Tom Tromey  <tom@tromey.com>
13244
13245         * value.c (struct value): Add constructor, destructor, and member
13246         initializers.
13247         (allocate_value_lazy, value_decref): Update.
13248
13249 2018-04-06  Tom Tromey  <tom@tromey.com>
13250
13251         * value.c (struct value) <released, next>: Remove.
13252         (all_values): Now a std::vector.
13253         (allocate_value_lazy): Update.
13254         (value_next): Remove.
13255         (value_mark, value_free_to_mark, release_value)
13256         (value_release_to_mark): Update.
13257
13258 2018-04-06  Tom Tromey  <tom@tromey.com>
13259
13260         * value.h (fetch_subexp_value, value_release_to_mark): Update.
13261         (free_value_chain): Remove.
13262         * value.c (free_value_chain): Remove.
13263         (value_release_to_mark): Return a std::vector.
13264         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13265         std::vector.
13266         (check_condition): Update.
13267         * eval.c (fetch_subexp_value): Change "val_chain" to a
13268         std::vector.
13269         * breakpoint.c (update_watchpoint): Update.
13270         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13271
13272 2018-04-06  Tom Tromey  <tom@tromey.com>
13273
13274         * value.h (free_all_values): Remove.
13275         * value.c (free_all_values): Remove.
13276
13277 2018-04-06  Tom Tromey  <tom@tromey.com>
13278
13279         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13280         (value_history_chain, value_history_count): Remove.
13281         (value_history): New global.
13282         (record_latest_value, access_value_history, show_values)
13283         (preserve_values): Update.
13284
13285 2018-04-06  Tom Tromey  <tom@tromey.com>
13286
13287         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13288         * varobj.c (varobj_set_display_format, varobj_set_value)
13289         (install_default_visualizer, construct_visualizer)
13290         (install_new_value, ~varobj, varobj_get_value_type)
13291         (my_value_of_variable, varobj_editable_p): Update.
13292         * c-varobj.c (c_describe_child, c_value_of_variable)
13293         (cplus_number_of_children, cplus_describe_child): Update.
13294         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13295         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13296         (ada_value_of_variable, ada_value_is_changeable_p): Update.
13297
13298 2018-04-06  Tom Tromey  <tom@tromey.com>
13299
13300         * printcmd.c (last_examine_address): Change type to
13301         value_ref_ptr.
13302         (do_examine, x_command): Update.
13303
13304 2018-04-06  Tom Tromey  <tom@tromey.com>
13305
13306         * value.c (release_value): Update.
13307         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13308         (struct bpstats) <val>: Now a value_ref_ptr.
13309         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13310         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13311         (~watchpoint, print_it_watchpoint, watch_command_1)
13312         (invalidate_bp_value_on_memory_change): Update.
13313
13314 2018-04-06  Tom Tromey  <tom@tromey.com>
13315
13316         * varobj.c (varobj_clear_saved_item)
13317         (update_dynamic_varobj_children, install_new_value, ~varobj):
13318         Update.
13319         * value.h (value_incref): Move declaration earlier.
13320         (value_decref): Rename from value_free.
13321         (struct value_ref_policy): New.
13322         (value_ref_ptr): New typedef.
13323         (struct value_deleter): Remove.
13324         (gdb_value_up): Remove typedef.
13325         (release_value): Change return type.
13326         (release_value_or_incref): Remove.
13327         * value.c (set_value_parent): Update.
13328         (value_incref): Change return type.
13329         (value_decref): Rename from value_free.
13330         (value_free_to_mark, free_all_values, free_value_chain): Update.
13331         (release_value): Return value_ref_ptr.
13332         (release_value_or_incref): Remove.
13333         (record_latest_value, set_internalvar, clear_internalvar):
13334         Update.
13335         * stack.c (info_frame_command): Don't call value_free.
13336         * python/py-value.c (valpy_dealloc, valpy_new)
13337         (value_to_value_object): Update.
13338         * printcmd.c (do_examine): Update.
13339         * opencl-lang.c (lval_func_free_closure): Update.
13340         * mi/mi-main.c (register_changed_p): Don't call value_free.
13341         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13342         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13343         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13344         value_free.
13345         * guile/scm-value.c (vlscm_free_value_smob)
13346         (vlscm_scm_from_value): Update.
13347         * frame.c (frame_register_unwind, frame_unwind_register_signed)
13348         (frame_unwind_register_unsigned, get_frame_register_bytes)
13349         (put_frame_register_bytes): Don't call value_free.
13350         * findvar.c (address_from_register): Don't call value_free.
13351         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13352         * dwarf2loc.c (entry_data_value_free_closure)
13353         (value_of_dwarf_reg_entry, free_pieced_value_closure)
13354         (dwarf2_evaluate_loc_desc_full): Update.
13355         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13356         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13357         (~watchpoint, watch_command_1)
13358         (invalidate_bp_value_on_memory_change): Update.
13359         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13360
13361 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
13362
13363         PR gdb/23022
13364         * warning.m4: Add -Wno-error=deprecated-register.
13365         * configure: Re-generate.
13366
13367 2018-04-05  Tom Tromey  <tom@tromey.com>
13368
13369         * linespec.h: Remove include of "vec.h".
13370
13371 2018-04-05  Tom Tromey  <tom@tromey.com>
13372
13373         * linespec.c (typep): Remove typedef.
13374         (find_methods, find_superclass_methods): Take a std::vector.
13375         (find_method): Use std::vector.
13376
13377 2018-04-05  Tom Tromey  <tom@tromey.com>
13378
13379         * utils.c (compare_strings): Remove.
13380         * utils.h (compare_strings): Remove.
13381         * objc-lang.h (find_imps): Update.
13382         * objc-lang.c (find_methods): Take a std::vector.
13383         (uniquify_strings, find_imps): Likewise.
13384         * linespec.c (find_methods): Take a std::vector.
13385         (decode_objc): Use std::vector.
13386         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13387         a std::vector.
13388         (find_method, find_function_symbols): Use std::vector.
13389
13390 2018-04-05  Tom Tromey  <tom@tromey.com>
13391
13392         * completer.c (completion_tracker::completion_tracker): Remove
13393         cast.
13394         (completion_tracker::discard_completions): Likewise.
13395         * breakpoint.c (ambiguous_names_p): Remove cast.
13396         * ada-lang.c (_initialize_ada_language): Remove cast.
13397         * utils.h (streq): Update.
13398         (streq_hash): Add new declaration.
13399         * utils.c (streq): Return bool.
13400         (streq_hash): New function.
13401
13402 2018-04-05  Tom Tromey  <tom@tromey.com>
13403
13404         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13405         Remove a string copy.
13406
13407 2018-04-05  Tom Tromey  <tom@tromey.com>
13408
13409         * linespec.c (filter_results): Use std::vector.
13410         (decode_line_2, decode_line_full): Update.
13411
13412 2018-04-05  Tom Tromey  <tom@tromey.com>
13413
13414         * linespec.c (canonical_to_fullform): Return std::string.
13415         (filter_results): Update.
13416         (struct decode_line_2_item): Add constructor.
13417         <fullform, displayform>: Now std::string.
13418         (decode_line_2_compare_items): Now a std::sort comparator.
13419         (decode_line_2): Update.
13420
13421 2018-04-05  Tom Tromey  <tom@tromey.com>
13422
13423         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13424         (unexpected_linespec_error): Update.
13425         (linespec_parse_basic, parse_linespec): Update.
13426
13427 2018-04-05  Tom Tromey  <tom@tromey.com>
13428
13429         * linespec.c (linespec_parse_basic): Reindent.
13430
13431 2018-04-05  Tom Tromey  <tom@tromey.com>
13432
13433         * minsyms.h (iterate_over_minimal_symbols): Update.
13434         * minsyms.c (iterate_over_minimal_symbols): Take a
13435         gdb::function_view.
13436         * linespec.c (struct collect_minsyms): Remove.
13437         (compare_msyms): Now a std::sort comparator.
13438         (add_minsym): Add parameters.
13439         (search_minsyms_for_name): Update.  Use std::vector.
13440
13441 2018-04-03  Tom Tromey  <tom@tromey.com>
13442
13443         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13444         gdb::byte_vector.
13445
13446 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13447
13448         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13449
13450 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13451
13452         PR gdb/16959
13453         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13454         printing static type.
13455
13456 2018-04-01  Tom Tromey  <tom@tromey.com>
13457
13458         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13459         (rs6000_xfer_shared_libraries): Update.
13460
13461 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13462
13463         * common/gdb_vecs.h (char_ptr): Remove.
13464         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13465
13466 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13467
13468         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13469         with std::vector.
13470         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13471
13472 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13473
13474         * tracepoint.h (struct uploaded_tp): Initialize fields.
13475         <actions, step_actions, cmd_strings>: Change type to
13476         std::vector<char *>.
13477         * tracepoint.c (get_uploaded_tp): Allocate with new.
13478         (free_uploaded_tps): Free with delete.
13479         (parse_tracepoint_definition): Adjust to std::vector change.
13480         * breakpoint.c (read_uploaded_action): Likewise.
13481         (create_tracepoint_from_upload): Likewise.
13482         * ctf.c (ctf_write_uploaded_tp): Likewise.
13483         (SET_ARRAY_FIELD): Likewise.
13484         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13485
13486 2018-03-30  Tom Tromey  <tom@tromey.com>
13487
13488         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13489         std::unique_ptr.
13490         (svr4_keep_data_in_core): Update.
13491         (svr4_read_so_list): Update.
13492
13493 2018-03-30  Tom Tromey  <tom@tromey.com>
13494
13495         * windows-nat.c (handle_output_debug_string, handle_exception):
13496         Update.
13497         * target.h (target_read_string): Update.
13498         * target.c (target_read_string): Change "string" to
13499         unique_xmalloc_ptr.
13500         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13501         Update.
13502         * solib-frv.c (frv_current_sos): Update.
13503         * solib-dsbt.c (dsbt_current_sos): Update.
13504         * solib-darwin.c (darwin_current_sos): Update.
13505         * linux-thread-db.c (inferior_has_bug): Update.
13506         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13507         Update.  Remove alloca.
13508         * ada-lang.c (ada_main_name): Update.
13509
13510 2018-03-30  Tom Tromey  <tom@tromey.com>
13511
13512         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13513         (struct dwo_file_deleter): New.
13514         (dwo_file_up): New typedef.
13515         (open_and_init_dwo_file): Use dwo_file_up.
13516         (free_dwo_file_cleanup): Remove.
13517
13518 2018-03-30  Tom Tromey  <tom@tromey.com>
13519
13520         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13521         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13522
13523 2018-03-30  Tom Tromey  <tom@tromey.com>
13524
13525         * dwarf2read.c (class free_cached_comp_units): New class.
13526         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13527         (free_cached_comp_units): Remove function.
13528
13529 2018-03-30  Tom Tromey  <tom@tromey.com>
13530
13531         * utils.h (make_cleanup_unpush_target): Remove.
13532         * inf-ptrace.c (struct target_unpusher): New.
13533         (target_unpush_up) New typedef.
13534         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13535         target_unpush_up.
13536         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13537
13538 2018-03-27  Tom Tromey  <tom@tromey.com>
13539
13540         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13541
13542 2018-03-27  Pedro Alves  <palves@redhat.com>
13543             Tom Tromey  <tom@tromey.com>
13544
13545         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13546         destructor.  Now a class.
13547         (gdb_readline_wrapper_cleanup): Remove function.
13548         (gdb_readline_wrapper): Remove cleanups.
13549
13550 2018-03-27  Tom Tromey  <tom@tromey.com>
13551
13552         * typeprint.h (struct type_print_options) <local_typedefs,
13553         global_typedefs>: Remove "struct" keyword.
13554         (class typedef_hash_table): New class.
13555         (recursively_update_typedef_hash, add_template_parameters)
13556         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13557         (find_typedef_in_hash): Don't declare.
13558         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13559         (typedef_hash_table::recursively_update): Rename from
13560         recursively_update_typedef_hash.  Now a member.
13561         (typedef_hash_table::add_template_parameters): Rename from
13562         add_template_parameters.  Now a member.
13563         (typedef_hash_table::typedef_hash_table): Now a constructor;
13564         rename from create_typedef_hash.
13565         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13566         rename from free_typedef_hash.
13567         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13568         (do_free_global_table): Remove.
13569         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13570         from copy_type_recursive.
13571         (create_global_typedef_table): Remove.
13572         (typedef_hash_table::find_global_typedef): Now a member of
13573         typedef_hash_table.
13574         (typedef_hash_table::find_typedef): Rename from
13575         find_typedef_in_hash; now a member.
13576         (whatis_exp): Update.
13577         * extension.h (struct ext_lang_type_printers): Add constructor and
13578         destructor.
13579         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13580         declare.
13581         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13582         Now a constructor; rename from start_ext_lang_type_printers.
13583         (ext_lang_type_printers): Now a destructor; rename from
13584         free_ext_lang_type_printers.
13585         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13586         Update.
13587         (c_type_print_base_struct_union): Update.  Remove cleanups.
13588
13589 2018-03-27  Tom Tromey  <tom@tromey.com>
13590
13591         * dwarf-index-write.c: Include <cmath>.
13592
13593 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13594
13595         * NEWS: Add entry describing new "set|show varsize-limit" command.
13596         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13597         command.
13598         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13599         "set variable".
13600
13601 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13602
13603         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13604         dwarf-index-write.c
13605         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13606         * dwarf-index-common.c: New file.
13607         * dwarf-index-common.h: New file.
13608         * dwarf-index-write.c: New file.
13609         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13610         (struct dwarf2_section_info): Move from here.
13611         (dwarf2_section_info_def): Likewise.
13612         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13613         (offset_type): Likewise.
13614         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13615         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13616         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13617         (byte_swap): Likewise.
13618         (MAYBE_SWAP): Likewise.
13619         (dwarf2_per_cu_ptr): Likewise.
13620         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13621         (struct tu_stats): Likewise.
13622         (struct dwarf2_per_objfile): Likewise.
13623         (struct dwarf2_per_cu_data): Likewise.
13624         (struct signatured_type): Likewise.
13625         (sig_type_ptr): Likewise.
13626         (DEF_VEC_P (sig_type_ptr)): Likewise.
13627         (INDEX4_SUFFIX): Likewise.
13628         (INDEX5_SUFFIX): Likewise.
13629         (DEBUG_STR_SUFFIX): Likewise.
13630         (dwarf2_read_section): Make non-static.
13631         (mapped_index_string_hash): Move from here.
13632         (dwarf5_djb_hash): Likewise.
13633         (file_write): Likewise.
13634         (class data_buf): Likewise.
13635         (struct symtab_index_entry): Likewise.
13636         (struct mapped_symtab): Likewise.
13637         (find_slot): Likewise.
13638         (hash_expand): Likewise.
13639         (add_index_entry): Likewise.
13640         (uniquify_cu_indices): Likewise.
13641         (class c_str_view): Likewise.
13642         (class c_str_view_hasher): Likewise.
13643         (class vector_hasher): Likewise.
13644         (write_hash_table): Likewise.
13645         (psym_index_map): Likewise.
13646         (struct addrmap_index_data): Likewise.
13647         (add_address_entry): Likewise.
13648         (add_address_entry_worker): Likewise.
13649         (write_address_map): Likewise.
13650         (symbol_kind): Likewise.
13651         (write_psymbols): Likewise.
13652         (struct signatured_type_index_data): Likewise.
13653         (write_one_signatured_type): Likewise.
13654         (recursively_count_psymbols): Likewise.
13655         (recursively_write_psymbols): Likewise.
13656         (class debug_names): Likewise.
13657         (check_dwarf64_offsets): Likewise.
13658         (psyms_seen_size): Likewise.
13659         (write_gdbindex): Likewise.
13660         (write_debug_names): Likewise.
13661         (assert_file_size): Likewise.
13662         (write_psymtabs_to_index): Likewise.
13663         (save_gdb_index_command): Likewise.
13664         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13665         command.
13666         * dwarf2read.h: New file.
13667
13668 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13669
13670         PR gdb/22670
13671         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13672         symbol name if the CU's language stores symbol names in linkage
13673         format.
13674         * language.h (struct language_defn)
13675         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13676         all instances of this struct.
13677
13678 2018-03-26  Tom Tromey  <tom@tromey.com>
13679
13680         * stack.c (backtrace_command_1): Remove verbose code.
13681
13682 2018-03-26  Tom Tromey  <tom@tromey.com>
13683
13684         * python/py-framefilter.c (py_print_type): Don't catch
13685         exceptions.  Return void.
13686         (py_print_value): Likewise.
13687         (py_print_single_arg): Likewise.
13688         (enumerate_args): Don't catch exceptions.
13689         (py_print_args): Likewise.
13690         (py_print_frame): Likewise.
13691         (gdbpy_apply_frame_filter): Catch exceptions here.
13692
13693 2018-03-26  Tom Tromey  <tom@tromey.com>
13694
13695         * stack.c (_initialize_stack): Remove trailing newlines from help
13696         text.  Add "Usage" line to "backtrace" help.
13697
13698 2018-03-26  Tom Tromey  <tom@tromey.com>
13699
13700         PR python/16486:
13701         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13702
13703 2018-03-26  Tom Tromey  <tom@tromey.com>
13704
13705         * python/py-framefilter.c (py_print_single_arg): Return
13706         EXT_LANG_BT_ERROR from catch.
13707
13708 2018-03-26  Tom Tromey  <tom@tromey.com>
13709
13710         PR backtrace/15584:
13711         * stack.c (backtrace_command_1): Move some code into no-filters
13712         "if".
13713
13714 2018-03-26  Tom Tromey  <tom@tromey.com>
13715
13716         * python/py-framefilter.c (throw_quit_or_print_exception): New
13717         function.
13718         (gdbpy_apply_frame_filter): Use it.
13719
13720 2018-03-26  Tom Tromey  <tom@tromey.com>
13721
13722         PR cli/17716:
13723         * python/py-framefilter.c (py_print_type, py_print_value)
13724         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13725         RETURN_MASK_ERROR.
13726
13727 2018-03-26  Tom Tromey  <tom@tromey.com>
13728
13729         * python/py-framefilter.c (enumerate_args): Use
13730         gdb::unique_xmalloc_ptr.
13731
13732 2018-03-26  Tom Tromey  <tom@tromey.com>
13733
13734         * python/py-framefilter.c (py_print_frame): Return
13735         EXT_LANG_BT_OK.
13736         (gdbpy_apply_frame_filter): Update comment.
13737         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13738         Remove.
13739         <EXT_LANG_BT_NO_FILTERS>: Change value.
13740
13741 2018-03-26  Tom Tromey  <tom@tromey.com>
13742
13743         PR backtrace/15582:
13744         * stack.c (backtrace_command): Parse "hide" argument.
13745         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13746         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13747         constant.
13748
13749 2018-03-26  Tom Tromey  <tom@tromey.com>
13750
13751         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13752         add "flags".
13753         (backtrace_command): Remove "fulltrace", add "flags".
13754
13755 2018-03-26  Tom Tromey  <tom@tromey.com>
13756
13757         * stack.c (backtrace_command): Rewrite command line parsing.
13758
13759 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13760
13761         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13762
13763 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13764
13765         * filename-seen-cache.h: Add include guard.
13766
13767 2018-03-26  Keith Seitz  <keiths@redhat.com>
13768
13769         * symfile.c (place_section): Remove "struct" from section_addr_info
13770         in comment.
13771         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13772         "struct" keyword from section_addr_info.
13773
13774 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13775
13776         * regformats/regdef.h (reg): Add constructors.
13777
13778 2018-03-25  Pedro Alves  <palves@redhat.com>
13779
13780         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13781         if then/else bodies in var_func_name extraction.
13782
13783 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13784
13785         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13786         lookup_minimal_symbol() to find symbol entry.
13787         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13788
13789 2018-03-23  Keith Seitz  <keiths@redhat.com>
13790
13791         PR c++/22968
13792         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13793         nested type definitions for C++, too.
13794
13795 2018-03-23  Tom Tromey  <tom@tromey.com>
13796
13797         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13798         a typedef.
13799         (macho_register_oso): Remove.
13800         (macho_symtab_read): Take a std::vector.
13801         (oso_el_compare_name): Now a std::sort comparator.
13802         (macho_symfile_read_all_oso): Take a std::vector.
13803         (macho_symfile_read): Use std::vector.  Remove cleanups.
13804
13805 2018-03-22  Tom Tromey  <tom@tromey.com>
13806
13807         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13808         (record_full_goto_bookmark): Use std::string.
13809
13810 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13811
13812         PR tdep/18295
13813         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13814         a single mask.
13815
13816 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13817
13818         * rs6000-tdep.c (store_insn_p): New function.
13819         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13820         and cr_reg to their unshifted values. Use store_insn_p to
13821         match LR saves using either R1 or fdata->alloca_reg. Use
13822         store_insn_p to match CR saves. Set alloca_reg_offset
13823         when alloca_reg and framep are set. Remove lr_reg shift
13824         when assigning to fdata->lr_register.
13825
13826 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13827
13828         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13829         command line args instead of emitting a warning.
13830
13831 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13832
13833         * tracepoint.h (struct static_tracepoint_marker): Initialize
13834         fields, define default constructor, move constructor and move
13835         assignment, disable the rest.
13836         <str_id, extra>: Make std::string.
13837         (release_static_tracepoint_marker): Remove.
13838         (free_current_marker): Remove.
13839         * tracepoint.c (free_current_marker): Remove.
13840         (parse_static_tracepoint_marker_definition): Adjust to
13841         std::string, use new hex2str overload.
13842         (release_static_tracepoint_marker): Remove.
13843         (print_one_static_tracepoint_marker): Get marker by reference
13844         and adjust to std::string.
13845         (info_static_tracepoint_markers_command): Adjust to std::vector
13846         changes
13847         * target.h (static_tracepoint_marker_p): Remove typedef.
13848         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13849         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13850         bool.
13851         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13852         * target-debug.h
13853         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13854         (target_debug_print_std_vector_static_tracepoint_marker): New.
13855         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13856         to...
13857         (target_debug_print_static_tracepoint_marker_p): ... this.
13858         * target-delegates.c: Re-generate.
13859         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13860         Make std::string.
13861         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13862         (decode_static_tracepoint_spec): Adjust to std::vector.
13863         (tracepoint_print_one_detail): Adjust to std::string.
13864         (strace_marker_decode_location): Adjust to std::string.
13865         (update_static_tracepoint): Adjust to std::string, remove call
13866         to release_static_tracepoint_marker.
13867         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13868         Adjust to std::vector.
13869         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13870         (remote_static_tracepoint_markers_by_strid): Adjust to
13871         std::vector.
13872         * common/rsp-low.h (hex2str): New overload with explicit count
13873         of bytes.
13874         * common/rsp-low.c (hex2str): New overload with explicit count
13875         of bytes.
13876         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13877         (_initialize_rsp_low_selftests): Add test_hex2str test.
13878         * unittests/tracepoint-selftests.c
13879         (test_parse_static_tracepoint_marker_definition): Adjust to
13880         std::string.
13881
13882 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13883
13884         * tracepoint.c (parse_static_tracepoint_marker_definition):
13885         Consider case where the definition is followed by more
13886         definitions.
13887         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13888         tracepoint-selftests.c.
13889         * unittests/tracepoint-selftests.c: New.
13890
13891 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13892
13893         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13894         Carvalho.
13895
13896 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13897
13898         * symtab.c (find_pc_sect_line): fixed indentation.
13899
13900 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13901
13902         * symtab.c (find_pc_sect_line): now uses binary search.
13903
13904 2018-03-19  Tom Tromey  <tom@tromey.com>
13905
13906         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13907         "IDENT" production.
13908
13909 2018-03-19  Pedro Alves  <palves@redhat.com>
13910             Tom Tromey  <tom@tromey.com>
13911
13912         * unittests/observable-selftests.c: New file.
13913         * common/observable.h: New file.
13914         * observable.h: New file.
13915         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13916         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13917         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13918         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13919         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13920         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13921         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13922         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13923         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13924         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13925         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13926         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13927         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13928         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13929         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13930         tui/tui-interp.c, valops.c: Update all users.
13931         * tui/tui-hooks.c (tui_bp_created_observer)
13932         (tui_bp_deleted_observer, tui_bp_modified_observer)
13933         (tui_inferior_exit_observer, tui_before_prompt_observer)
13934         (tui_normal_stop_observer, tui_register_changed_observer):
13935         Remove.
13936         (tui_observers_token): New global.
13937         (attach_or_detach, tui_attach_detach_observers): New functions.
13938         (tui_install_hooks, tui_remove_hooks): Use
13939         tui_attach_detach_observers.
13940         * record-btrace.c (record_btrace_thread_observer): Remove.
13941         (record_btrace_thread_observer_token): New global.
13942         * observer.sh: Remove.
13943         * observer.c: Rename to observable.c.
13944         * observable.c (namespace gdb_observers): Define new objects.
13945         (observer_debug): Move into gdb_observers namespace.
13946         (struct observer, struct observer_list, xalloc_observer_list_node)
13947         (xfree_observer_list_node, generic_observer_attach)
13948         (generic_observer_detach, generic_observer_notify): Remove.
13949         (_initialize_observer): Update.
13950         Don't include observer.inc.
13951         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13952         (clean mostlyclean): Likewise.
13953         (observer.h, observer.inc): Remove targets.
13954         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13955         (COMMON_SFILES): Use observable.c, not observer.c.
13956         * .gitignore: Remove observer.h.
13957
13958 2018-03-18  Tom Tromey  <tom@tromey.com>
13959
13960         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13961         gdb::def_vector.
13962         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13963
13964 2018-03-17  Tom Tromey  <tom@tromey.com>
13965
13966         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13967
13968 2018-03-17  Tom Tromey  <tom@tromey.com>
13969
13970         * target.c (class scoped_target_fd): New.
13971         (target_fileio_close_cleanup): Remove.
13972         (target_fileio_read_alloc_1): Use scoped_target_fd.
13973
13974 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13975
13976         * silent-rules.mk: New.
13977         * Makefile.in: Include silent-rules.mk
13978         (srcdir, VPATH, top_srcdir): Move up.
13979         (COMPILE): Add ECHO_CXX.
13980         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13981         (init.c): Add ECHO_INIT_C.
13982         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13983         (version.c): Add ECHO_GEN.
13984         (printcmd.o): Add ECHO_CXX.
13985         (target-float.o): Add ECHO_CXX.
13986         (ada-exp.o): Add ECHO_CXX.
13987         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13988         (insight$(EXEEXT)): Add ECHO_CXXLD.
13989         * gnulib/configure.ac: Add AM_SILENT_RULES.
13990         * gnulib/aclocal.m4: Re-generate.
13991         * gnulib/configure: Re-generate.
13992         * gnulib/import/Makefile.in: Re-generate.
13993
13994 2018-03-16  Tom Tromey  <tom@tromey.com>
13995
13996         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13997         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13998         * utils.c (do_free_section_addr_info)
13999         (make_cleanup_free_section_addr_info): Remove.
14000         * symfile.h (struct other_sections): Add constructor.
14001         (struct section_addr_info): Remove.
14002         (section_addr_info): New typedef.
14003         (struct sym_fns) <sym_offsets>: Change type of parameter.
14004         (build_section_addr_info_from_objfile)
14005         (relative_addr_info_to_section_offsets, addr_info_make_relative)
14006         (default_symfile_offsets, symbol_file_add)
14007         (symbol_file_add_from_bfd)
14008         (build_section_addr_info_from_section_table): Update.
14009         (alloc_section_addr_info, free_section_addr_info): Don't declare.
14010         * symfile.c (alloc_section_addr_info): Remove.
14011         (build_section_addr_info_from_section_table): Change return type.
14012         Update.
14013         (build_section_addr_info_from_bfd)
14014         (build_section_addr_info_from_objfile): Likewise.
14015         (free_section_addr_info): Remove.
14016         (relative_addr_info_to_section_offsets): Change type of "addrs".
14017         (addrs_section_compar): Now a std::sort comparator.
14018         (addrs_section_sort): Change return type.
14019         (addr_info_make_relative): Change type of "addrs".  Update.
14020         (default_symfile_offsets, syms_from_objfile_1)
14021         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14022         (symbol_file_add_separate): Update.
14023         (symbol_file_add): Change type of "addrs".  Update.
14024         (add_symbol_file_command): Update.  Remove cleanups.
14025         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
14026         cleanups.
14027         * symfile-debug.c (debug_sym_offsets): Change type of "info".
14028         * solib.c (solib_read_symbols): Update.
14029         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
14030         * machoread.c (macho_symfile_offsets): Update.
14031         * jit.c (jit_bfd_try_read_symtab): Update.
14032
14033 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
14034
14035         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14036         unittests/utils-selftests.c.
14037         * unittests/utils-selftests.c: New file.
14038
14039 2018-03-14  Tom Tromey  <tom@tromey.com>
14040
14041         PR cli/14977:
14042         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14043         for NULL.
14044
14045 2018-03-14  Tom Tromey  <tom@tromey.com>
14046
14047         PR cli/19918:
14048         * printcmd.c (printf_pointer): Allow "-" in format.
14049
14050 2018-03-14  Tom Tromey  <tom@tromey.com>
14051
14052         * printcmd.c (_initialize_printcmd): Add usage to printf.
14053
14054 2018-03-14  Yao Qi  <qiyao@sourceware.org>
14055
14056         * MAINTAINERS: Update my email address.
14057
14058 2018-03-13  Tom Tromey  <tom@tromey.com>
14059
14060         * machoread.c (macho_check_dsym): Change filenamep to a
14061         std::string*.
14062         (macho_symfile_read): Update.
14063         * symfile.c (load_command): Use std::string.
14064
14065 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14066
14067         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14068         to error message string.
14069         (riscv_register_name): Use xsnprintf instead of sprintf.
14070         (riscv_insn::fetch_instruction): Use gdb_assert instead of
14071         internal_error.
14072         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14073         error.
14074         (riscv_push_dummy_call): Likewise.
14075
14076 2018-03-12  Tom Tromey  <tom@tromey.com>
14077
14078         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14079         Use gdb::byte_vector.
14080         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14081
14082 2018-03-12  Yao Qi  <yao.qi@linaro.org>
14083
14084         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14085         parameter type to readable_regcache.
14086         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14087         the declaration.
14088
14089 2018-03-11  Tom Tromey  <tom@tromey.com>
14090
14091         * dwarf2read.c (struct nextfield): Add initializers.
14092         (struct nextfnfield): Remove.
14093         (struct fnfieldlist): Add initializers.  Remove "length" and
14094         "head", use std::vector.
14095         (struct decl_field_list): Remove.
14096         (struct field_info): Add initializers.
14097         <fields, baseclasses>: Now std::vector.
14098         <nbaseclasses, nfnfields, typedef_field_list_count,
14099         nested_types_list_count>: Remove.
14100         (dwarf2_add_field, dwarf2_add_type_defn)
14101         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14102         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14103         (process_structure_scope): Update.
14104
14105 2018-03-11  Tom Tromey  <tom@tromey.com>
14106
14107         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14108         for use by std::sort.
14109         (build_type_psymtabs_1): Use std::vector.
14110
14111 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
14112
14113         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14114         and LIBMPFR in the printed configuration.
14115
14116 2018-03-08  Tom Tromey  <tom@tromey.com>
14117
14118         * source.c (get_filename_and_charpos): Use scoped_fd.
14119         * nto-procfs.c (procfs_open_1): Use scoped_fd.
14120         (procfs_pidlist): Likewise.
14121         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14122         (iterate_over_mappings): Likewise.
14123
14124 2018-03-08  Tom Tromey  <tom@tromey.com>
14125
14126         * infcall.c (struct call_return_meta_info)
14127         <stack_temporaries_enabled>: Remove.
14128         (get_call_return_value, call_function_by_hand_dummy): Update.
14129         * thread.c (disable_thread_stack_temporaries): Remove.
14130         (enable_thread_stack_temporaries): Remove.
14131         (thread_stack_temporaries_enabled_p): Return bool.
14132         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14133         (get_last_thread_stack_temporary): Update.
14134         * eval.c (evaluate_subexp): Update.
14135         * gdbthread.h (class enable_thread_stack_temporaries): Now a
14136         class, not a function.
14137         (value_ptr, value_vec): Remove typedefs.
14138         (class thread_info) <stack_temporaries_enabled>: Now bool.
14139         <stack_temporaries>: Now a std::vector.
14140         (thread_stack_temporaries_enabled_p)
14141         (value_in_thread_stack_temporaries): Return bool.
14142
14143 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
14144
14145         * remote.c (putpkt_binary): Fix omitted bytes reporting.
14146         (getpkt_or_notif_sane_1): Likewise.
14147
14148 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14149
14150         * build-id.c (build_id_to_debug_bfd): Use std::string.
14151
14152 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14153
14154         * build-id.c (find_separate_debug_file_by_buildid): Return
14155         std::string.
14156         * build-id.h (find_separate_debug_file_by_buildid): Return
14157         std::string.
14158         * coffread.c (coff_symfile_read): Adjust to std::string.
14159         * elfread.c (elf_symfile_read): Adjust to std::string.
14160         * symfile.c (separate_debug_file_exists): Change parameter to
14161         std::string.
14162         (find_separate_debug_file): Return std::string.
14163         (find_separate_debug_file_by_debuglink): Return std::string.
14164         * symfile.h (find_separate_debug_file_by_debuglink): Return
14165         std::string.
14166
14167 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14168
14169         * common/xml-utils.c (xml_escape_text): Move code to...
14170         (xml_escape_text_append): ... this new function.
14171         * common/xml-utils.h (xml_escape_text_append): New declaration.
14172         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14173         New function.
14174         (_initialize_xml_utils): register test_xml_escape_text_append as
14175         a selftest.
14176
14177 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
14178
14179         * defs.h: Remove MAX_REGISTER_SIZE.
14180         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14181         asserts.
14182         * python/py-unwind.c (pyuw_sniffer): Likewise.
14183
14184 2018-03-07  Tom Tromey  <tom@tromey.com>
14185
14186         * linux-tdep.c (linux_info_proc): Update.
14187         * target.h (struct target_ops) <to_fileio_readlink>: Return
14188         optional<string>.
14189         (target_fileio_readlink): Return optional<string>.
14190         * remote.c (remote_hostio_readlink): Return optional<string>.
14191         * inf-child.c (inf_child_fileio_readlink): Return
14192         optional<string>.
14193         * target.c (target_fileio_readlink): Return optional<string>.
14194
14195 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
14196
14197         * regcache.c (cooked_read_test): Add riscv to the list of
14198         architectures that have a save_reggroup.
14199
14200 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14201
14202         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14203         value is not a dynamic class object.
14204
14205 2018-03-06  Tom Tromey  <tom@tromey.com>
14206
14207         * rust-exp.y: Formatting fixes.
14208
14209 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14210
14211         * riscv-tdep.c (riscv_register_name): Remove target description
14212         support.
14213         (riscv_gdbarch_init): Remove target description check.
14214
14215 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14216
14217         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14218         comment.
14219         * riscv-tdep.h: Likewise.
14220
14221 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14222
14223         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14224         (riscv_pseudo_register_write): Delete.
14225         (riscv_gdbarch_init): Remove all use of pseudo registers.
14226
14227 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14228
14229         * record-btrace.c (btrace_print_lines): Replace cleanup
14230         parameter with RAII equivalents.
14231         (btrace_insn_history): Replace cleanup with RAII equivalents.
14232         * ui-out.h (make_cleanup_ui_out_list_begin_end,
14233         make_cleanup_ui_out_tuple_begin_end): Remove.
14234         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14235         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14236         make_cleanup_ui_out_list_begin_end): Remove.
14237
14238 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14239
14240         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14241         parameter types to std::vector.  Use bool.
14242         (record_btrace_wait): Replace VEC(tp_t) with
14243         std::vector<thread_info *>.
14244         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14245
14246 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14247
14248         * record-btrace.c (record_btrace_disable_callback): Remove.
14249         (struct scoped_btrace_disable): New.
14250         (record_btrace_open): Use scoped_btrace_disable.
14251
14252 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14253
14254         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14255         reading values from registers.
14256
14257 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14258
14259         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14260         where appropriate.
14261
14262 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14263
14264         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14265         change parameter type.  Use GDB's print functions, and use
14266         core_addr_to_string where appropriate.
14267         (riscv_push_dummy_call): Use core_addr_to_string where
14268         appropriate, update call to riscv_print_arg_location, and reindent
14269         a few lines.
14270         (riscv_return_value): Update call to riscv_print_arg_location.
14271
14272 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14273             Tim Newsome <tim@sifive.com>
14274             Albert Ou <a0u@eecs.berkeley.edu>
14275             Darius Rad <darius@bluespec.com>
14276
14277         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14278         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14279         (ALLDEPFILES): Add riscv-tdep.c
14280         * configure.tgt: Add riscv support.
14281         * riscv-tdep.c: New file.
14282         * riscv-tdep.h: New file.
14283         * NEWS: Mention new target.
14284         * MAINTAINERS: Add entry for riscv.
14285
14286 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14287
14288         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14289         fields within aggregates.
14290
14291 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
14292
14293         * record-btrace.c (btrace_print_lines): Change type of flags to
14294         gdb_disassembly_flags.
14295
14296 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14297
14298         * fbsd-nat.c: Include "inf-ptrace.h".
14299         (USE_SIGTRAP_SIGINFO): Conditionally define.
14300         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14301         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14302         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14303         function.
14304         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14305         Likewise.
14306         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14307         Likewise.
14308         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14309         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14310         "supports_stopped_by_hw_breakpoint" target methods.
14311
14312 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14313
14314         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14315         * fbsd-nat.c (debug_fbsd_nat): New variable.
14316         (show_fbsd_nat_debug): New function.
14317         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14318         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14319
14320 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14321
14322         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14323         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14324         prototype.
14325         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14326         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14327         method.
14328
14329 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14330
14331         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14332         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14333
14334 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14335
14336         * charset.c (struct charset_vector): New.
14337         (charsets): Change type to charset_vector.
14338         (find_charset_names): Adjust.
14339         (add_one): Adjust.
14340         (_initialize_charset): Adjust.
14341
14342 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14343
14344         * progspace.h (struct program_space) <deleted_solibs>: Change
14345         type to std::vector<std::string>.
14346         * progspace.c (clear_program_space_solib_cache): Adjust.
14347         * breakpoint.c (print_solib_event): Adjust.
14348         (check_status_catch_solib): Adjust.
14349         * solib.c (update_solib_list): Adjust.
14350         * ui-out.h (class ui_out) <field_string>: New overload.
14351         * ui-out.c (ui_out::field_string): New overload.
14352
14353 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14354
14355         * progspace.h (struct program_space): Add constructor and
14356         destructor, initialize fields.
14357         (add_program_space): Remove.
14358         * progspace.c (add_program_space): Rename to...
14359         (program_space::program_space): ... this.
14360         (release_program_space): Rename to...
14361         (program_space::~program_space): ... this.
14362         (delete_program_space): Use delete to delete program_space.
14363         (initialize_progspace): Use new to allocate program_space.
14364         * inferior.c (add_inferior_with_spaces): Likewise.
14365         (clone_inferior_command): Likewise.
14366         * infrun.c (follow_fork_inferior): Likewise.
14367         (handle_vfork_child_exec_or_exit): Likewise.
14368
14369 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14370
14371         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14372         (delim_string_to_char_ptr_vec): Return std::vector of
14373         gdb::unique_xmalloc_ptr.
14374         (dirnames_to_char_ptr_vec_append): Take std::vector of
14375         gdb::unique_xmalloc_ptr.
14376         (dirnames_to_char_ptr_vec): Return std::vector of
14377         gdb::unique_xmalloc_ptr.
14378         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14379         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14380         (delim_string_to_char_ptr_vec): Return an std::vector of
14381         gdb::unique_xmalloc_ptr, adjust the code.
14382         (dirnames_to_char_ptr_vec_append): Take an std::vector of
14383         gdb::unique_xmalloc_ptr, adjust the code.
14384         (dirnames_to_char_ptr_vec): Return an std::vector of
14385         gdb::unique_xmalloc_ptr, adjust the code.
14386         * auto-load.c (auto_load_safe_path_vec): Change type to
14387         std::vector of gdb::unique_xmalloc_ptr.
14388         (auto_load_expand_dir_vars): Return an std::vector of
14389         gdb::unique_xmalloc_ptr, adjust the code.
14390         (auto_load_safe_path_vec_update): Adjust.
14391         (filename_is_in_auto_load_safe_path_vec): Adjust.
14392         (auto_load_objfile_script_1): Adjust.
14393         * build-id.c (build_id_to_debug_bfd): Adjust.
14394         * linux-thread-db.c (thread_db_load_search): Adjust.
14395         * source.c (add_path): Adjust.
14396         (openp): Adjust.
14397         * symfile.c (find_separate_debug_file): Adjust.
14398         * utils.c (do_free_char_ptr_vec): Remove.
14399         (make_cleanup_free_char_ptr_vec): Remove.
14400
14401 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14402
14403         PR gdb/22907
14404         * common/pathstuff.c: Conditionally include "<windows.h>".
14405
14406 2018-03-01  Georg Sauthoff  <mail@georg.so>
14407
14408         PR gdb/22888
14409         * gcore.in: Quote variables and switch interpreter to bash.
14410
14411 2018-03-01  Tom Tromey  <tom@tromey.com>
14412
14413         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14414         assertion.  Add assertion for discriminant_index.
14415         (quirk_rust_enum): Use correct base type name in univariant case.
14416
14417 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14418
14419         * record.c (get_call_history_modifiers): Return a
14420         record_print_flags.
14421         (cmd_record_call_history): Adjust.
14422         * record-btrace.c (record_btrace_call_history): Adjust.
14423         (record_btrace_call_history_range): Adjust.
14424         (record_btrace_call_history_from): Adjust.
14425         * target-debug.h (target_debug_print_record_print_flags): New.
14426         * target-delegates.c: Re-generate.
14427         * target.c (target_call_history): Change flags type.
14428         (target_call_history_from): Likewise.
14429         (target_call_history_range): Likewise.
14430         * target.h (struct target_ops) <target_call_history>: Likewise.
14431         (target_call_history_from): Likewise.
14432         (target_call_history_range): Likewise.
14433
14434 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14435             Simon Marchi  <simon.marchi@polymtl.ca>
14436
14437         * common/common-utils.c: Include "sys/stat.h".
14438         (is_regular_file): Move here from "source.c"; change return
14439         type to "bool".
14440         * common/common-utils.h (is_regular_file): New prototype.
14441         * common/pathstuff.c (contains_dir_separator): New function.
14442         * common/pathstuff.h (contains_dir_separator): New prototype.
14443         * source.c: Don't include "sys/stat.h".
14444         (is_regular_file): Move to "common/common-utils.c".
14445
14446 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14447
14448         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14449         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14450         * auto-load.c: Include "common/pathstuff.h".
14451         * common/common-def.h (current_directory): Move here.
14452         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14453         function.
14454         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14455         prototype.
14456         * common/pathstuff.c: New file.
14457         * common/pathstuff.h: New file.
14458         * compile/compile.c: Include "common/pathstuff.h".
14459         * defs.h (current_directory): Move to "common/common-defs.h".
14460         * dwarf2read.c: Include "common/pathstuff.h".
14461         * exec.c: Likewise.
14462         * guile/scm-safe-call.c: Likewise.
14463         * linux-thread-db.c: Likewise.
14464         * main.c: Likewise.
14465         * nto-tdep.c: Likewise.
14466         * objfiles.c: Likewise.
14467         * source.c: Likewise.
14468         * symtab.c: Likewise.
14469         * utils.c: Include "common/pathstuff.h".
14470         (gdb_realpath): Move to "common/pathstuff.c".
14471         (gdb_realpath_keepfile): Likewise.
14472         (gdb_abspath): Likewise.
14473         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14474         (gdb_realpath_keepfile): Likewise.
14475         (gdb_abspath): Likewise.
14476
14477 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14478
14479         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14480         wildcard process pid for super_resume for kernels with a
14481         specific bug.
14482
14483 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14484
14485         * compile/compile.c (get_args): Add additional comments
14486         explaining function.
14487
14488 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14489             Tom Tromey  <tom@tromey.com>
14490
14491         * target.h (memory_write_request_s): Remove typedef.  Don't define
14492         VEC.
14493         (target_write_memory_blocks): Change argument to std::vector.
14494         (struct memory_write_request): Add constructor.
14495         * target-memory.c (compare_block_starting_address): Return bool.
14496         Change argument types.
14497         (claim_memory): Change arguments to use std::vector.
14498         (split_regular_and_flash_blocks, blocks_to_erase)
14499         (compute_garbled_blocks): Likewise.
14500         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14501         (target_write_memory_blocks): Change argument to std::vector.
14502         * symfile.c (struct load_section_data): Add constructor and
14503         destructor.  Use std::vector for "requests".
14504         (struct load_progress_data): Add initializers.
14505         (load_section_callback): Update.  Use "new".
14506         (clear_memory_write_data): Remove.
14507         (generic_load): Update.
14508
14509 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14510
14511         * arch/aarch64.h: Use common/tdesc.h.
14512
14513 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14514
14515         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14516         architecture with a 64-bit ABI.
14517
14518 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14519
14520         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14521         ahead of target description loading.
14522
14523 2018-02-26  Tom Tromey  <tom@tromey.com>
14524
14525         * stack.c (backtrace_command_1): Update.
14526         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14527         of "flags".
14528         * python/py-framefilter.c (py_print_frame)
14529         (gdbpy_apply_frame_filter): Change type of "flags".
14530         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14531         of "flags".
14532         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14533         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14534         * extension.h (enum frame_filter_flag): Rename from
14535         frame_filter_flags.
14536         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14537         (apply_ext_lang_frame_filter): Change type of "flags".
14538         * extension.c (apply_ext_lang_frame_filter): Change type of
14539         "flags".
14540         * extension-priv.h (struct extension_language_ops)
14541         <apply_frame_filter>: Change type of "flags".
14542
14543 2018-02-26  Tom Tromey  <tom@tromey.com>
14544
14545         PR python/16497:
14546         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14547         off-by-one in py_end computation.
14548         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14549         PRINT_MORE_FRAMES.
14550         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14551         constant.
14552
14553 2018-02-26  Tom Tromey  <tom@tromey.com>
14554
14555         * dwarf2read.c (struct variant_field): New.
14556         (struct nextfield) <variant>: New field.
14557         (dwarf2_add_field): Handle DW_TAG_variant_part.
14558         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14559         discriminated union.
14560         (read_structure_type): Handle DW_TAG_variant_part.
14561         (handle_struct_member_die): New function, extracted from
14562         process_structure_scope.  Handle DW_TAG_variant.
14563         (process_structure_scope): Handle discriminated unions.  Call
14564         handle_struct_member_die.
14565
14566 2018-02-26  Tom Tromey  <tom@tromey.com>
14567
14568         * rust-lang.h (rust_last_path_segment): Declare.
14569         * rust-lang.c (rust_last_path_segment): Now public.  Change
14570         contract.
14571         (struct disr_info): Remove.
14572         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14573         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14574         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14575         (rust_enum_p, rust_enum_variant): New function.
14576         (rust_underscore_fields): Remove "offset" parameter.
14577         (rust_print_enum): New function.
14578         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14579         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14580         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14581         enums.
14582         (rust_internal_print_type): New function, from rust_print_type.
14583         Remove enum code.
14584         (rust_print_type): Call rust_internal_print_type.
14585         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14586         Update enum handling.
14587         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14588         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14589         (rust_union_quirks): New functions.
14590         (process_full_comp_unit, process_full_type_unit): Call
14591         rust_union_quirks.
14592         (process_structure_scope): Update rust_unions if necessary.
14593
14594 2018-02-26  Tom Tromey  <tom@tromey.com>
14595
14596         * value.h (value_union_variant): Declare.
14597         * valops.c (value_union_variant): New function.
14598         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14599         (struct discriminant_info): New.
14600         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14601         enumerator.
14602         (struct main_type) <flag_discriminated_union>: New field.
14603
14604 2018-02-26  Tom Tromey  <tom@tromey.com>
14605
14606         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14607         unittests/unpack-selftests.c.
14608         * unittests/unpack-selftests.c: New file.
14609         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14610
14611 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14612
14613         * dwarf2read.c (struct partial_die_info) <read>: New method.
14614         (read_partial_die): Remove the declaration.
14615         (load_partial_dies): Update.
14616         (partial_die_info::partial_die_info):
14617         (read_partial_die): Change it to partial_die_info::read.
14618
14619 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14620
14621         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14622         (fixup_partial_die): Remove declaration.
14623         (scan_partial_symbols): Update.
14624         (partial_die_parent_scope): Likewise.
14625         (partial_die_full_name): Likewise.
14626         (fixup_partial_die): Change it to partial_die_info::fixup.
14627
14628 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14629
14630         * dwarf2read.c (read_partial_die): Update the declaration.
14631         (load_partial_dies): Caller update.
14632         (read_partial_die): Remove one argument abbrev_len.
14633
14634 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14635
14636         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14637         assignment operator.
14638         (load_partial_dies): Use ctor and copy ctor.
14639         (read_partial_die): Update.
14640         (dwarf2_cu::find_partial_die): Use ctor.
14641
14642 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14643
14644         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14645         (find_partial_die_in_comp_unit): Change it to
14646         dwarf2_cu::find_partial_die.
14647         (find_partial_die): Update.
14648
14649 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14650
14651         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14652         is NULL.
14653
14654 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14655
14656         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14657
14658 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14659
14660         * arch/amd64.h: Use common/tdesc.h.
14661         * arch/i386.c: Likewise.
14662         * arch/i386.h: Likewise.
14663         * arch/tic6x.c: Likewise.
14664         * arch/tdesc.h: Move file from here...
14665         * common/tdesc.h: ...to here.
14666         * features/aarch64-core.c: Regenerate.
14667         * features/aarch64-fpu.c: Regenerate.
14668         * features/i386/32bit-avx.c: Regenerate.
14669         * features/i386/32bit-avx512.c: Regenerate.
14670         * features/i386/32bit-core.c: Regenerate.
14671         * features/i386/32bit-linux.c: Regenerate.
14672         * features/i386/32bit-mpx.c: Regenerate.
14673         * features/i386/32bit-pkeys.c: Regenerate.
14674         * features/i386/32bit-sse.c: Regenerate.
14675         * features/i386/64bit-avx.c: Regenerate.
14676         * features/i386/64bit-avx512.c: Regenerate.
14677         * features/i386/64bit-core.c: Regenerate.
14678         * features/i386/64bit-linux.c: Regenerate.
14679         * features/i386/64bit-mpx.c: Regenerate.
14680         * features/i386/64bit-pkeys.c: Regenerate.
14681         * features/i386/64bit-segments.c: Regenerate.
14682         * features/i386/64bit-sse.c: Regenerate.
14683         * features/i386/x32-core.c: Regenerate.
14684         * features/tic6x-c6xp.c: Regenerate.
14685         * features/tic6x-core.c: Regenerate.
14686         * features/tic6x-gp.c: Regenerate.
14687         * target-descriptions.c: Use common/tdesc.h.
14688         * target-descriptions.h: Likewise.
14689
14690 2018-02-24  Tom Tromey  <tom@tromey.com>
14691
14692         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14693         (try_thread_db_load_from_dir, thread_db_load_search): Use
14694         std::string.
14695         (info_auto_load_libthread_db_compare): Return bool.  Change
14696         argument types.
14697         (info_auto_load_libthread_db): Use std::vector, std::string.
14698         Remove cleanups.
14699
14700 2018-02-24  Tom Tromey  <tom@tromey.com>
14701
14702         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14703         std::string.
14704         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14705         std::string*.
14706         * gdbarch.c: Rebuild.
14707         * gdbarch.h: Rebuild.
14708         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14709         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14710         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14711         std::string*.
14712
14713 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14714
14715         * gdbtypes.h (sect_offset): Change type to uint64_t.
14716         (sect_offset_str): New function.
14717         * dwarf2read.c (create_addrmap_from_aranges): Use
14718         sect_offset_str.
14719         (error_check_comp_unit_head): Likewise.
14720         (create_debug_type_hash_table): Likewise.
14721         (read_cutu_die_from_dwo): Likewise.
14722         (init_cutu_and_read_dies): Likewise.
14723         (init_cutu_and_read_dies_no_follow): Likewise.
14724         (process_psymtab_comp_unit_reader): Likewise.
14725         (partial_die_parent_scope): Likewise.
14726         (peek_die_abbrev): Likewise.
14727         (process_queue): Likewise.
14728         (dwarf2_physname): Likewise.
14729         (read_namespace_alias): Likewise.
14730         (read_import_statement): Likewise.
14731         (create_dwo_cu_reader): Likewise.
14732         (create_cus_hash_table): Likewise.
14733         (lookup_dwo_cutu): Likewise.
14734         (inherit_abstract_dies): Likewise.
14735         (read_func_scope): Likewise.
14736         (read_call_site_scope): Likewise.
14737         (dwarf2_add_member_fn): Likewise.
14738         (read_common_block): Likewise.
14739         (read_module_type): Likewise.
14740         (read_typedef): Likewise.
14741         (read_subrange_type): Likewise.
14742         (load_partial_dies): Likewise.
14743         (read_partial_die): Likewise.
14744         (find_partial_die): Likewise.
14745         (read_str_index): Likewise.
14746         (dwarf2_string_attr): Likewise.
14747         (build_error_marker_type): Likewise.
14748         (lookup_die_type): Likewise.
14749         (dump_die_shallow): Likewise.
14750         (follow_die_ref): Likewise.
14751         (dwarf2_fetch_die_loc_sect_off): Likewise.
14752         (dwarf2_fetch_constant_bytes): Likewise.
14753         (follow_die_sig): Likewise.
14754         (get_signatured_type): Likewise.
14755         (get_DW_AT_signature_type): Likewise.
14756         (dwarf2_find_containing_comp_unit): Likewise.
14757         (set_die_type): Likewise.
14758
14759 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14760
14761         * arch/aarch64.c: Include "common-defs.h".
14762         * arch/amd64.c: Likewise.
14763         * arch/i386.c: Likewise.
14764
14765 2018-02-21  Tom Tromey  <tom@tromey.com>
14766
14767         * value.h: (extract_field_op): Update.
14768         * eval.c (extract_field_op): Return a const char *.
14769         * expression.h (parse_expression_for_completion): Update.
14770         * completer.c (complete_expression): Update.
14771         (add_struct_fields): Make fieldname const.
14772         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14773         (mark_completion_tag, parse_exp_in_context_1): Update.
14774         (parse_expression_for_completion): Change "name" to
14775         unique_xmalloc_ptr*.
14776
14777 2018-02-21  Tom Tromey  <tom@tromey.com>
14778
14779         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14780
14781 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14782
14783         * avr-tdep.c (avr_read_pc): Change parameter type to
14784         readable_regcache.
14785         * gdbarch.sh (read_pc): Likewise.
14786         * gdbarch.c: Re-generated.
14787         * gdbarch.h: Re-generated.
14788         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14789         readable_regcache.
14790         * ia64-tdep.c (ia64_read_pc): Likewise.
14791         * mips-tdep.c (mips_read_pc): Likewise.
14792         * spu-tdep.c (spu_read_pc): Likewise.
14793
14794 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14795
14796         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14797         * regcache-dump.c: New file.
14798         * regcache.c: Move register_dump to regcache-dump.c.
14799         (maintenance_print_registers): Likewise.
14800         (maintenance_print_raw_registers): Likewise.
14801         (maintenance_print_cooked_registers): Likewise.
14802         (maintenance_print_register_groups): Likewise.
14803         (maintenance_print_remote_registers): Likewise.
14804         (_initialize_regcache): Likewise.
14805         * regcache.h (register_dump): Moved from regcache.c.
14806
14807 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14808
14809         * regcache.c (regcache::regcache): Update.
14810         (regcache::invalidate): Move it to detached_regcache::invalidate.
14811         (get_thread_arch_aspace_regcache): Update.
14812         (regcache::raw_update): Update.
14813         (regcache::cooked_read): Remove some code.
14814         (regcache::cooked_read_value): Likewise.
14815         (regcache::raw_write): Remove assert on m_readonly_p.
14816         (regcache::raw_supply_integer): Move it to
14817         detached_regcache::raw_supply_integer.
14818         (regcache::raw_supply_zeroed): Likewise.
14819         * regcache.h (detached_regcache) <raw_supply_integer>: New
14820         declaration.
14821         <raw_supply_zeroed, invalidate>: Likewise.
14822         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14823         <invalidate>: Likewise.
14824         <m_readonly_p>: Removed.
14825
14826 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14827
14828         * infcmd.c (get_return_value): Let stop_regs point to
14829         get_current_regcache.
14830         * regcache.c (regcache::regcache): Remove.
14831         (register_dump_reg_buffer): New class.
14832         (regcache_print): Adjust.
14833         * regcache.h (regcache): Remove constructors.
14834
14835 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14836
14837         * regcache.c (class register_dump): New class.
14838         (register_dump_regcache, register_dump_none): New class.
14839         (register_dump_remote, register_dump_groups): New class.
14840         (regcache_print): Update.
14841         * regcache.h (regcache_dump_what): Move it to regcache.c.
14842         (regcache) <dump>: Remove.
14843
14844 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14845
14846         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14847          reg_buffer_rw *.
14848         (jit_unwind_reg_set_impl): Call raw_supply.
14849         (jit_frame_sniffer): Use reg_buffer_rw.
14850         * record-full.c (record_full_core_regbuf): Change its type.
14851         (record_full_core_open_1): Use reg_buffer_rw.
14852         (record_full_close): Likewise.
14853         (record_full_core_fetch_registers): Use regcache->raw_supply.
14854         (record_full_core_store_registers): Likewise.
14855         * regcache.c (regcache::get_register_status): Move it to
14856         reg_buffer.
14857         (regcache_raw_set_cached_value): Remove.
14858         (regcache::raw_set_cached_value): Remove.
14859         (regcache::raw_write): Call raw_supply.
14860         (regcache::raw_supply): Move it to reg_buffer_rw.
14861         * regcache.h (regcache_raw_set_cached_value): Remove.
14862         (reg_buffer_rw): New class.
14863
14864 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14865
14866         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14867         readonly_detached_regcache.
14868         (dummy_frame_prev_register): Use regcache->cooked_read.
14869         * frame.c (frame_save_as_regcache): Change return type.
14870         (frame_pop): Update.
14871         * frame.h (frame_save_as_regcache): Update declaration.
14872         * inferior.h (get_infcall_suspend_state_regcache): Update
14873         declaration.
14874         * infrun.c (infcall_suspend_state) <registers>: use
14875         readonly_detached_regcache.
14876         (save_infcall_suspend_state): Don't use regcache_dup.
14877         (get_infcall_suspend_state_regcache): Change return type.
14878         * linux-fork.c (struct fork_info) <savedregs>: Change to
14879         readonly_detached_regcache.
14880         <pc>: New field.
14881         (fork_save_infrun_state): Don't use regcache_dup.
14882         (info_checkpoints_command): Adjust.
14883         * mi/mi-main.c (register_changed_p): Update declaration.
14884         (mi_cmd_data_list_changed_registers): Use
14885         readonly_detached_regcache.
14886         (register_changed_p): Change parameter type to
14887         readonly_detached_regcache.
14888         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14889         readonly_detached_regcache.
14890         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14891         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14892         New.
14893         (regcache::save): Move it to reg_buffer.
14894         (regcache::restore): Change parameter type.
14895         (regcache_dup): Remove.
14896         * regcache.h (reg_buffer) <save>: New method.
14897         (readonly_detached_regcache): New class.
14898         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14899         readonly_detached_regcache.
14900         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14901
14902 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14903
14904         * frame.c (frame_save_as_regcache): Use regcache method save.
14905         (frame_pop): Use regcache method restore.
14906         * infrun.c (restore_infcall_suspend_state): Likewise.
14907         * linux-fork.c (fork_load_infrun_state): Likewise.
14908         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14909         save.
14910         * regcache.c (regcache_save): Remove.
14911         (regcache::restore): More asserts.
14912         (regcache_cpy): Remove.
14913         * regcache.h (regcache_save): Remove the declaration.
14914         (regcache::restore): Move from private to public.
14915         Remove the friend declaration of regcache_cpy.
14916         (regcache_cpy): Remove declaration.
14917
14918 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14919
14920         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14921         parameter type to 'readable_regcache *'.
14922         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14923         * arm-tdep.c (arm_neon_quad_read): Likewise.
14924         (arm_pseudo_read): Likewise.
14925         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14926         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14927         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14928         * gdbarch.c: Re-generated.
14929         * gdbarch.h: Re-generated.
14930         * gdbarch.sh (pseudo_register_read): Change parameter type to
14931         'readable_regcache *'.
14932         (pseudo_register_read_value): Likewise.
14933         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14934         (h8300_pseudo_register_read): Likewise.
14935         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14936         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14937         (i386_pseudo_register_read_into_value): Likewise.
14938         (i386_pseudo_register_read_value): Likewise.
14939         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14940         declaration.
14941         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14942         * m32c-tdep.c (m32c_raw_read): Likewise.
14943         (m32c_read_flg): Likewise.
14944         (m32c_banked_register): Likewise.
14945         (m32c_banked_read): Likewise.
14946         (m32c_sb_read): Likewise.
14947         (m32c_part_read): Likewise.
14948         (m32c_cat_read): Likewise.
14949         (m32c_r3r2r1r0_read): Likewise.
14950         (m32c_pseudo_register_read): Likewise.
14951         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14952         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14953         (mep_pseudo_cr64_read): Likewise.
14954         (mep_pseudo_register_read): Likewise.
14955         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14956         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14957         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14958         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14959         (regcache::cooked_read): Likewise.
14960         (regcache::cooked_read_value): Likewise.
14961         (regcache_cooked_read_signed):
14962         (regcache::cooked_read): Likewise.
14963         * regcache.h (readable_regcache): New class.
14964         (regcache): Inherit readable_regcache.  Move some methods to
14965         readable_regcache.
14966         * rl78-tdep.c (rl78_pseudo_register_read): Change
14967         parameter type to 'readable_regcache *'.
14968         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14969         (e500_pseudo_register_read): Change parameter type to
14970         'readable_regcache *'.
14971         (dfp_pseudo_register_read): Likewise.
14972         (vsx_pseudo_register_read): Likewise.
14973         (efpr_pseudo_register_read): Likewise.
14974         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14975         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14976         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14977         (sh64_pseudo_register_read): Likewise.
14978         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14979         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14980         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14981         (spu_pseudo_register_read): Likewise.
14982         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14983         (xtensa_pseudo_register_read): Likewise.
14984
14985 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14986
14987         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14988         (regcache::arch): Move it to reg_buffer::arch.
14989         (regcache::register_buffer): Likewise.
14990         (regcache::assert_regnum): Likewise.
14991         (regcache::num_raw_registers): Likewise.
14992         * regcache.h (reg_buffer): New class.
14993         (regcache): Inherit reg_buffer.
14994
14995 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14996
14997         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14998         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14999
15000 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
15001
15002         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
15003
15004 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
15005
15006         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
15007         (SFILES): Remove common/*.c files.
15008         (COMMON_OBS): Remove some *.o files built from common/*.c files.
15009         * common/common.host: Add common reference.
15010         * configure.ac: Likewise.
15011         * configure: Regenerate.
15012
15013 2018-02-16  Yao Qi  <yao.qi@linaro.org>
15014
15015         * block.c (block_namespace_info): Inherit allocate_on_obstack.
15016         (block_initialize_namespace): Use new.
15017         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15018         (dwarf2_free_objfile): Use delete.
15019         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15020         (copy_type_recursive): Use new.
15021         * gdb_obstack.h (allocate_on_obstack): New.
15022
15023 2018-02-15  Yao Qi  <yao.qi@linaro.org>
15024
15025         PR gdb/22849
15026         * inferior.c (exit_inferior_1): Reset inf->control.
15027
15028 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
15029
15030         * ada-lang.c (ada_to_fixed_value_create): Delete advance
15031         declaration.
15032
15033 2018-02-14  Pedro Alves  <palves@redhat.com>
15034
15035         * frame-unwind.c (frame_unwind_try_unwinder): Always call
15036         frame_cleanup_after_sniffer on exception.
15037
15038 2018-02-14  Tom Tromey  <tom@tromey.com>
15039
15040         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15041         const.
15042         (solib_bfd_open): Make pathname const.
15043         * solib.c (solib_bfd_open): Make pathname const.
15044         * solib-spu.c (spu_bfd_fopen): Make name const.
15045         (spu_bfd_open): Make pathname const.
15046         * solib-darwin.c (darwin_bfd_open): Make pathname const.
15047         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15048
15049 2018-02-14  Tom Tromey  <tom@tromey.com>
15050
15051         * symfile.c (symfile_bfd_open): Update.
15052         * source.h (openp, source_full_path_of, find_and_open_source):
15053         Change argument type to unique_xmalloc_ptr.
15054         * source.c (openp): Take a unique_xmalloc_ptr.
15055         (source_full_path_of, find_and_open_source): Likewise.
15056         (open_source_file, symtab_to_fullname): Update.
15057         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15058         unique_xmalloc_ptr.
15059         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15060         (exec_file_find): Update.
15061         * psymtab.c (psymtab_to_fullname): Update.
15062         * nto-tdep.h (nto_find_and_open_solib): Update.
15063         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15064         unique_xmalloc_ptr.
15065         * exec.c (exec_file_attach): Update.
15066         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15067         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15068
15069 2018-02-14  Tom Tromey  <tom@tromey.com>
15070
15071         * solib.c: Include source.h.
15072         * nto-tdep.c: Include source.h.
15073         * mi/mi-cmd-env.c: Include source.h.
15074         * infcmd.c: Include source.h.
15075         * exec.c: Include source.h.
15076         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15077         (add_path, directory_switch, source_path, init_source_path): Move
15078         declarations...
15079         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15080         (add_path, directory_switch, source_path, init_source_path):
15081         ...here.
15082
15083 2018-02-14  Tom Tromey  <tom@tromey.com>
15084
15085         * solist.h (exec_file_find, solib_find): Return
15086         unique_xmalloc_ptr.
15087         (solib_bfd_fopen): Take a const char *.
15088         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15089         (exec_file_find, solib_find): Likewise.
15090         (solib_bfd_fopen): Do not take ownership of "pathname".
15091         (solib_bfd_open): Use unique_xmalloc_ptr.
15092         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15093         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15094         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15095         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15096
15097 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
15098
15099         * ada-lang.c (name_match_type_from_name): Remove reference to
15100         ada_name_for_lookup in function's documentation.
15101         * ada-lang.h (ada_name_for_lookup): Delete declaration.
15102
15103 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15104
15105         * defs.h (enum openp_flags): New enum.
15106         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15107         Move to enum openp_flags.
15108         (openp_flags): New enum flags.
15109         (openp): Change parameter type to openp_flags.
15110         * source.c (openp): Change parameter type to openp_flags.
15111         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15112         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15113
15114 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15115
15116         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15117         per-command.
15118
15119 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
15120
15121         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15122         into...
15123         (class dwarf2_queue_guard): ...the destructor of this new class.
15124         (dw2_do_instantiate_symtab): Create instance of the new class
15125         dwarf2_queue_guard, remove cleanup.
15126
15127 2018-02-09  Tom Tromey  <tom@tromey.com>
15128
15129         * source.c (find_source_lines): Don't reference past the end of
15130         the vector.
15131
15132 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15133
15134         * remote.c (remote_btrace_maybe_reopen): Change error message.
15135         * btrace.c (btrace_enable): Likewise.
15136         (parse_xml_btrace): Likewise.
15137         (parse_xml_btrace_conf): Likewise.
15138
15139 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15140
15141         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15142         (linux_enable_pt, linux_enable_bts): Call
15143         diagnose_perf_event_open_fail.
15144
15145 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15146
15147         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15148         Remove parameter and change return type.  Update callers.  Move it.
15149         (linux_enable_bts, linux_enable_pt): Improve error message.
15150         (linux_enable_pt): Remove zero buffer size check.
15151         (linux_enable_btrace): Improve error messages.  Remove NULL return
15152         check.
15153
15154 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15155
15156         * btrace.c (btrace_enable): Remove target_supports_btrace call.
15157         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15158         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15159         (linux_supports_pt, linux_supports_btrace): Remove.
15160         (linux_enable_bts): Call cpu_supports_bts.
15161         * nat/linux-btrace.h (linux_supports_btrace): Remove.
15162         * remote.c (remote_supports_btrace): Remove.
15163         (init_remote_ops): Remove remote_supports_btrace.
15164         * target-delegates.c: Regenerated.
15165         * target.c (target_supports_btrace): Remove.
15166         * target.h (target_ops) <to_supports_btrace>: Remove
15167         (target_supports_btrace): Remove.
15168         * x86-linux-nat.c (x86_linux_create_target): Remove
15169         linux_supports_btrace.
15170
15171 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15172
15173         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15174         btrace failed.
15175         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15176         exception and use message in own exception.
15177
15178 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15179
15180         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15181         (perf_event_pt_event_type): Use gdb_file_up.
15182         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15183         scoped_fd, and scoped_mmap.
15184
15185 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15186
15187         * common/scoped_mmap.h: New.
15188         * unittests/scoped_mmap-selftest.c: New.
15189         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15190         unittests/scoped_mmap-selftest.c.
15191
15192 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15193
15194         * common/scoped_fd.h: New.
15195         * unittests/scoped_fd-selftest.c: New.
15196         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15197         unittests/scoped_fd-selftest.c.
15198
15199 2018-02-09  Tom Tromey  <tom@tromey.com>
15200
15201         * auto-load.c (auto_load_section_scripts): Use
15202         gdb::unique_xmalloc_ptr.
15203
15204 2018-02-09  Tom Tromey  <tom@tromey.com>
15205
15206         * auto-load.c (execute_script_contents): Use std::string.
15207
15208 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
15209
15210         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15211         Python function, rather than a new command.
15212
15213 2018-02-08  Tom Tromey  <tom@tromey.com>
15214
15215         * solib.c (solib_find_1): Use std::string.
15216         (solib_bfd_fopen): Use unique_xmalloc_ptr.
15217
15218 2018-02-08  Tom Tromey  <tom@tromey.com>
15219
15220         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15221
15222 2018-02-08  Tom Tromey  <tom@tromey.com>
15223
15224         * source.c (find_source_lines): Use gdb::def_vector.
15225
15226 2018-02-08  Tom Tromey  <tom@tromey.com>
15227
15228         * macrocmd.c (struct temporary_macro_definition): New.
15229         (macro_define_command): Use temporary_macro_definition.  Remove
15230         cleanups.
15231         (free_macro_definition_ptr): Remove.
15232
15233 2018-02-08  Tom Tromey  <tom@tromey.com>
15234
15235         * macroexp.c (maybe_expand): Use std::string.
15236
15237 2018-02-08  Tom Tromey  <tom@tromey.com>
15238
15239         * macroexp.c (struct macro_buffer): Add initializers for some
15240         members.
15241         (init_buffer, init_shared_buffer, free_buffer)
15242         (free_buffer_return_text): Remove.
15243         (macro_buffer): New constructors.
15244         (~macro_buffer): New destructor.
15245         (macro_buffer::set_shared): New method.
15246         (macro_buffer::resize_buffer, macro_buffer::appendc)
15247         (macro_buffer::appendmem): Now methods, not free functions.
15248         (set_token, append_tokens_without_splicing, stringify)
15249         (macro_stringify): Update.
15250         (gather_arguments): Change return type.  Remove argc_p argument,
15251         add args_ptr argument.  Use std::vector.
15252         (substitute_args): Remove argc argument.  Accept std::vector.
15253         (expand): Update.  Use std::vector.
15254         (scan, macro_expand, macro_expand_next): Update.
15255
15256 2018-02-08  Tom Tromey  <tom@tromey.com>
15257
15258         * symtab.c (default_collect_symbol_completion_matches_break_on):
15259         Use unique_xmalloc_ptr.
15260         * macroscope.h: (sal_macro_scope, user_macro_scope)
15261         (default_macro_scope): Return unique_xmalloc_ptr.
15262         * macroscope.c (sal_macro_scope, user_macro_scope)
15263         (default_macro_scope): Return unique_xmalloc_ptr.
15264         * macroexp.h (macro_expand, macro_expand_once): Return
15265         unique_xmalloc_ptr.
15266         * macroexp.c (macro_expand, macro_expand_once): Return
15267         unique_xmalloc_ptr.
15268         * macrocmd.c (macro_expand_command, macro_expand_once_command)
15269         (info_macro_command, info_macros_command): Use
15270         unique_xmalloc_ptr.
15271         * compile/compile-c-support.c (write_macro_definitions): Use
15272         unique_xmalloc_ptr.
15273         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15274
15275 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
15276
15277         * value.c (value_static_field): Assign field type instead of
15278         containing type when returning an optimized out value.
15279
15280 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15281
15282         * ft32-tdep.c (ft32_read_pc): Remove.
15283         (ft32_write_pc): Remove.
15284         (ft32_gdbarch_init): Update.
15285         * m32r-tdep.c (m32r_read_pc): Remove.
15286         (m32r_gdbarch_init): Update.
15287         * mep-tdep.c (mep_read_pc): Remove.
15288         (mep_gdbarch_init): Update.
15289         * microblaze-tdep.c (microblaze_write_pc): Remove.
15290         (microblaze_gdbarch_init): Update.
15291         * mn10300-tdep.c (mn10300_read_pc): Remove.
15292         (mn10300_write_pc): Remove.
15293         (mn10300_gdbarch_init): Update.
15294         * moxie-tdep.c (moxie_read_pc): Remove.
15295         (moxie_write_pc): Remove.
15296         (moxie_gdbarch_init): Update.
15297
15298 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15299
15300         * expprint.c (print_subexp_standard): Handle
15301         OP_F77_UNDETERMINED_ARGLIST.
15302         (dump_subexp_body_standard): Likewise.
15303
15304 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
15305
15306         * target-descriptions.c (tdesc_element_visitor) Add empty
15307         implementations.
15308         (tdesc_type): Move make_gdb_type from here.
15309         (tdesc_type_builtin): Likewise.
15310         (tdesc_type_vector): Likewise.
15311         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15312         (make_gdb_type_struct): Move from tdesc_type_with_fields.
15313         (make_gdb_type_union): Likewise.
15314         (make_gdb_type_flags): Likewise.
15315         (make_gdb_type_enum): Likewise.
15316         (make_gdb_type): New function.
15317         (tdesc_register_type): Use static make_gdb_type.
15318
15319 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
15320
15321         * infcmd.c (default_print_one_register_info): Align natural-format
15322         column values consistently one under another.
15323         (pad_to_column): New function.
15324
15325 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
15326
15327         * dwarf2read.c (dwarf2_physname): Move commment.
15328
15329 2018-02-01  Leszek Swirski  <leszeks@google.com>
15330
15331         * varobj.c (varobj_formatted_print_options): Allow recursive
15332         pretty printing if pretty printing is enabled.
15333
15334 2018-02-01  Leszek Swirski  <leszeks@google.com>
15335
15336         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15337         names after a structop as a filename.
15338
15339 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15340
15341         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15342         (arm_record_coproc_data_proc): Likewise.
15343
15344 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15345
15346         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15347
15348 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
15349
15350         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15351         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15352
15353 2018-01-31  Pedro Alves  <palves@redhat.com>
15354
15355         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15356         * inflow.c (child_terminal_save_inferior): Wrap reference to
15357         tcgetpgrp in HAVE_TERMIOS_H.
15358         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15359         _WIN32.
15360         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15361         always iterate over all inferiors.
15362         (gdbsim_cntrl_c): Adjust.
15363         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15364
15365 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15366
15367         * gdbtypes.c (lookup_array_range_type): Make sure the array's
15368         index type is objfile-owned if the element type is as well.
15369
15370 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15371
15372         GDB 8.1 released.
15373
15374 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15375
15376         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15377         "features/s390x-linux64.c".
15378         (_initialize_s390_linux_tdep): Remove initialization of tdescs
15379         s390_linux32 and s390x_linux64.
15380         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15381         default tdesc.
15382         * s390-tdep.c: Include "features/s390-linux32.c" and
15383         "features/s390x-linux64.c".
15384         (s390_tdesc_valid): Add check for tdesc_has_registers.
15385         (s390_gdbarch_init): Make sure there is always a valid tdesc.
15386         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15387         tdesc_s390x_linux64.
15388         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15389         tdesc_s390x_linux64 to...
15390         * s390-tdep.h: ...here.
15391
15392 2018-01-30  Pedro Alves  <palves@redhat.com>
15393
15394         PR gdb/13211
15395         * config.in, configure: Regenerate.
15396         * configure.ac: Check for getpgid.
15397         * go32-nat.c (go32_pass_ctrlc): New.
15398         (go32_target): Install it.
15399         * inf-child.c (inf_child_target): Install
15400         child_terminal_save_inferior, child_pass_ctrlc and
15401         child_interrupt.
15402         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15403         (inf_ptrace_target): No longer install it.
15404         * infcmd.c (interrupt_target_1): Adjust.
15405         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15406         (child_interrupt): Declare.
15407         (inferior::terminal_state): New.
15408         * inflow.c (struct terminal_info): Update comments.
15409         (inferior_process_group): Delete.
15410         (terminal_is_ours): Delete.
15411         (gdb_tty_state): New.
15412         (child_terminal_init): Adjust.
15413         (is_gdb_terminal, sharing_input_terminal_1)
15414         (sharing_input_terminal): New functions.
15415         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15416         Set the process's actual process group in the foreground if
15417         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15418         mark terminal as the inferior's if not sharing GDB's terminal.
15419         Don't check attach_flag.
15420         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15421         pass down a target_terminal_state.
15422         (child_terminal_save_inferior): New, factored out from ...
15423         (child_terminal_ours_1): ... this.  Handle
15424         target_terminal_state::is_ours_for_output.
15425         (child_interrupt, child_pass_ctrlc): New.
15426         (inflow_inferior_exit): Clear the inferior's terminal_state.
15427         (copy_terminal_info): Copy the inferior's terminal state.
15428         (_initialize_inflow): Remove reference to terminal_is_ours.
15429         * inflow.h (inferior_process_group): Delete.
15430         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15431         * procfs.c (procfs_target): Don't install procfs_interrupt.
15432         (procfs_interrupt): Delete.
15433         * remote.c (remote_serial_quit_handler): Adjust.
15434         (remote_interrupt): Remove ptid parameter.  Adjust.
15435         * target-delegates.c: Regenerate.
15436         * target.c: Include "terminal.h".
15437         (target_terminal::terminal_state): Rename to ...
15438         (target_terminal::m_terminal_state): ... this.
15439         (target_terminal::init): Adjust.
15440         (target_terminal::inferior): Adjust to per-inferior
15441         terminal_state.
15442         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15443         (target_terminal::ours, target_terminal::ours_for_output): Use
15444         target_terminal_is_ours_kind.
15445         (target_interrupt): Remove ptid parameter.  Adjust.
15446         (default_target_pass_ctrlc): Adjust.
15447         * target.h (target_ops::to_terminal_save_inferior): New field.
15448         (target_ops::to_interrupt): Remove ptid_t parameter.
15449         (target_interrupt): Remove ptid_t parameter.  Update comment.
15450         (target_pass_ctrlc): Update comment.
15451         * target/target.h (target_terminal_state): New scoped enum,
15452         factored out of ...
15453         (target_terminal::terminal_state): ... here.
15454         (target_terminal::inferior): Update comments.
15455         (target_terminal::restore_inferior): New.
15456         (target_terminal::is_inferior, target_terminal::is_ours)
15457         (target_terminal::is_ours_for_output): Adjust.
15458         (target_terminal::scoped_restore_terminal_state): Adjust to
15459         rename, and call restore_inferior() instead of inferior().
15460         (target_terminal::scoped_restore_terminal_state::m_state): Change
15461         type.
15462         (target_terminal::terminal_state): Rename to ...
15463         (target_terminal::m_terminal_state): ... this and change type.
15464
15465 2018-01-30  Pedro Alves  <palves@redhat.com>
15466
15467         * linux-nat.c (wait_for_signal): New function.
15468         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15469         directly.
15470         (async_terminal_is_ours)
15471         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15472         (linux_nat_add_target): Don't override
15473         to_terminal_inferior/to_terminal_ours.
15474
15475 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15476
15477         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15478
15479 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15480
15481         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15482         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15483         dwarf2_per_objfile_free here.
15484         (dwarf2_per_objfile_free): Remove.
15485         (_initialize_dwarf2_read): Don't register
15486         dwarf2_per_objfile_free as a registry cleanup.
15487
15488 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15489
15490         Avoid compilation errors in MinGW native builds
15491
15492         The error is triggered by including python-internal.h, and the
15493         error message is:
15494
15495              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15496                       from build-gnulib/import/math.h:27,
15497                       from d:/usr/Python26/include/pyport.h:235,
15498                       from d:/usr/Python26/include/Python.h:58,
15499                       from python/python-internal.h:94,
15500                       from python/py-arch.c:24:
15501              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15502         using ::hypot;
15503                 ^~~~~
15504
15505         This happens because Python headers define 'hypot' to expand t
15506         '_hypot' in the Windows builds.
15507         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15508         'hypoth'.  This avoids a compilation error.
15509
15510 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15511
15512         * MAINTAINERS (Write After Approval): Fix ordering.
15513
15514 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15515
15516         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15517
15518 2018-01-26  Alan Modra  <amodra@gmail.com>
15519
15520         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15521         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15522         Remove nop.  Make const.  Comment.
15523         (powerpc32_plt_stub_so_2): New.
15524         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15525         Correct count.  Update uses.
15526         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15527         Move common code reading PLT entry word.  Correct
15528         powerpc32_plt_stub PLT address calculation.
15529         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15530         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15531         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15532         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15533         (ppc64_standard_linkage8): Likewise.
15534         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15535         Correct insns description.
15536         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15537
15538 2018-01-24  Pedro Alves  <palves@redhat.com>
15539
15540         GCC PR libstdc++/83906
15541         * gdbtypes.c (operator==(const dynamic_prop &,
15542         const dynamic_prop &)): New.
15543         (operator==(const range_bounds &, const range_bounds &)): New.
15544         (check_types_equal): Use them instead of memcmp.
15545         * gdbtypes.h (operator==(const dynamic_prop &,
15546         const dynamic_prop &)): Declare.
15547         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15548         (operator==(const range_bounds &, const range_bounds &)): Declare.
15549         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15550
15551 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15552
15553         * s390-linux-tdep.c (s390_record_address_mask)
15554         (s390_record_calc_disp_common, s390_record_calc_disp)
15555         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15556         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15557         (s390_process_record): Move to s390-tdep.c.
15558         (s390_linux_init_abi_any): Adjust.
15559         * s390-tdep.c (s390_record_address_mask)
15560         (s390_record_calc_disp_common, s390_record_calc_disp)
15561         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15562         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15563         (s390_process_record): Moved from s390-linux-tdep.c
15564         (s390_gdbarch_init): Adjust.
15565
15566 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15567
15568         * s390-linux-nat.c (s390-tdep.h): New include.
15569         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15570         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15571         (ALLDEPFILES): Add s390-tdep.c.
15572         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15573         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15574         * s390-tdep.h: ...this.  New file.
15575         * s390-linux-tdep.c (s390-tdep.h): New include.
15576         (_initialize_s390_tdep): Rename to...
15577         (_initialize_s390_linux_tdep): ...this and adjust.
15578         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15579         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15580         s390-tdep.h.
15581         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15582         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15583         (s390_is_partial_instruction, s390_software_single_step)
15584         (is_non_branch_ril, s390_displaced_step_copy_insn)
15585         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15586         (s390_prologue_data, s390_addr, s390_store, s390_load)
15587         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15588         (s390_register_call_saved, s390_guess_tracepoint_registers)
15589         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15590         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15591         (s390_pseudo_register_name, s390_pseudo_register_type)
15592         (s390_pseudo_register_read, s390_pseudo_register_write)
15593         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15594         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15595         (s390_addr_bits_remove, s390_address_class_type_flags)
15596         (s390_address_class_type_flags_to_name)
15597         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15598         (s390_function_arg_float, s390_function_arg_vector)
15599         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15600         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15601         (s390_frame_align, s390_register_return_value, s390_return_value)
15602         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15603         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15604         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15605         (s390_trad_frame_prev_register, s390_unwind_cache)
15606         (s390_prologue_frame_unwind_cache)
15607         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15608         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15609         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15610         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15611         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15612         (s390_frame_base_address, s390_local_base_address)
15613         (s390_frame_base, s390_gcc_target_options)
15614         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15615         (s390_validate_reg_range, s390_tdesc_valid)
15616         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15617         * s390-tdep.c: ...this.  New file.
15618
15619 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15620
15621         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15622         (s390_process_record, s390_gdbarch_tdep_alloc)
15623         (s390_linux_init_abi_any): Use/set new hook.
15624
15625 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15626
15627         * s390-linux-tdep.c (osabi.h): New include.
15628         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15629         (s390_linux_init_abi_any): New functions.
15630         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15631
15632 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15633
15634         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15635         tdesc_has_registers check
15636
15637 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15638
15639         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15640         (s390_validate_reg_range): New macro.
15641         (s390_gdbarch_init): Adjust.
15642
15643 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15644
15645         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15646         (s390_gdbarch_tdep_alloc): Adjust.
15647         (s390_gdbarch_init): Adjust.
15648
15649 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15650
15651         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15652         <have_tdb>: Change type to bool.
15653         (s390_gdbarch_tdep_alloc): Adjust.
15654         (s390_gdbarch_init): Adjust.
15655
15656 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15657
15658         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15659         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15660         (s390_gdbarch_tdep_alloc): New function.
15661         (s390_gdbarch_init): Allocate tdep at start and use its fields
15662         instead of separate variables.
15663
15664 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15665
15666         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15667         when looking for cached gdbarch and add comment for remaining.
15668
15669 2018-01-22  Pedro Alves  <palves@redhat.com>
15670             Sergio Durigan Junior  <sergiodj@redhat.com>
15671
15672         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15673         case.
15674
15675 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15676
15677         * MAINTAINERS: Update my company e-mail address.
15678
15679 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15680
15681         * regcache.c (cooked_write_test): New function.
15682         (_initialize_regcache): Register the test.
15683
15684 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15685
15686         * ia64-tdep.c (ia64_pseudo_register_read): Call
15687         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15688         * m32c-tdep.c (m32c_cat_read): Likewise.
15689         (m32c_r3r2r1r0_read): Likewise.
15690         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15691         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15692
15693 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15694
15695         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15696         method raw_read instead of regcache_raw_read.
15697         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15698         * arm-tdep.c (arm_neon_quad_read): Likewise.
15699         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15700         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15701         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15702         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15703         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15704         (i386_pseudo_register_read_into_value): Likewise.
15705         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15706         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15707         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15708         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15709         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15710         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15711         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15712         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15713         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15714
15715 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15716
15717         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15718         * configure.tgt: Remove target mt.
15719         * mt-tdep.c: Remove.
15720         * regcache.c (cooked_read_test): Remove the check for mt.
15721
15722 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15723
15724         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15725         instead of gdbarch_pseudo_register_read_value.
15726
15727 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15728
15729         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15730         language is Ada.
15731
15732 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15733
15734         * linespec.c (create_sals_line_offset): Remove code that preserved
15735         the symtab_and_line's line number.
15736
15737 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15738
15739         * varobj.c (varobj_create): Don't set valid_block when creating a
15740         floating varobj.
15741
15742 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15743
15744         * varobj.c (varobj_create): Remove out of date comment.
15745
15746 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15747
15748         PR mi/20395
15749         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15750         updating innermost block.
15751         * parse.c (innermost_block_tracker::update): Take extra type
15752         parameter, and check types match before updating innermost block.
15753         (write_dollar_variable): Update innermost block for registers.
15754         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15755         (innermost_block_tracker::innermost_block_tracker): Initialise
15756         m_types member.
15757         (innermost_block_tracker::reset): Take type parameter.
15758         (innermost_block_tracker::update): Take type parameter, and pass
15759         type through as needed.
15760         (innermost_block_tracker::m_types): New member.
15761         * varobj.c (varobj_create): Pass type when reseting innermost
15762         block.
15763
15764 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15765
15766         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15767         * ada-lang.c (resolve_subexp): Likewise.
15768         * breakpoint.c (set_breakpoint_condition) Likewise.
15769         (watch_command_1) Likewise.
15770         * c-exp.y (variable): Likewise.
15771         * d-exp.y (PrimaryExpression): Likewise.
15772         * f-exp.y (variable): Likewise.
15773         * go-exp.y (variable): Likewise.
15774         * m2-exp.y (variable): Likewise.
15775         * objfiles.c (objfile::~objfile): Likewise.
15776         * p-exp.y (variable): Likewise.
15777         * parse.c (innermost_block): Change type.
15778         * parser-defs.h (class innermost_block_tracker): New.
15779         (innermost_block): Change to innermost_block_tracker.
15780         * printcmd.c (display_command): Switch to innermost_block API.
15781         (do_one_display): Likewise.
15782         * rust-exp.y (do_one_display): Likewise.
15783         * symfile.c (clear_symtab_users): Likewise.
15784         * varobj.c (varobj_create): Switch to innermost_block API, replace
15785         use of innermost_block with block stored on varobj object.
15786
15787 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15788
15789         * expression.h (innermost_block): Remove declaration.
15790         * varobj.c: Add 'parser-defs.h' include.
15791
15792 2018-01-19  Tom Tromey  <tom@tromey.com>
15793
15794         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15795         symbols in the static and global blocks.
15796
15797 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15798
15799         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15800         gdb_ptrace.h, and move including gdb_wait.h ...
15801         * nat/linux-ptrace.h: ... to here.
15802
15803 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15804
15805         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15806         inf_ptrace_detach_success.
15807         (inf_ptrace_detach_success): Add inferior parameter, use it
15808         instead of inferior_ptid, pass it to detach_inferior.
15809         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15810         parameter.
15811         * inferior.c (detach_inferior): Add overload that takes an
15812         inferior object.
15813         * inferior.h (detach_inferior): Likewise.
15814         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15815         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15816         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15817
15818 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15819
15820         * target.h (struct target_ops) <to_detach>: Add inferior
15821         parameter.
15822         (target_detach): Likewise.
15823         * target.c (dispose_inferior): Pass inferior down.
15824         (target_detach): Pass inferior down.  Assert that it is equal to
15825         the current inferior.
15826         * aix-thread.c (aix_thread_detach): Pass inferior down.
15827         * corefile.c (core_file_command): Pass current_inferior() down.
15828         * corelow.c (core_detach): Add inferior parameter.
15829         * darwin-nat.c (darwin_detach): Likewise.
15830         * gnu-nat.c (gnu_detach): Likewise.
15831         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15832         * infcmd.c (detach_command): Pass current_inferior() down to
15833         target_detach.
15834         * infrun.c (follow_fork_inferior): Pass parent_inf to
15835         target_detach.
15836         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15837         target_detach.
15838         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15839         * linux-thread-db.c (thread_db_detach): Likewise.
15840         * nto-procfs.c (procfs_detach): Likewise.
15841         * procfs.c (procfs_detach): Likewise.
15842         * record.c (record_detach): Likewise.
15843         * record.h (struct inferior): Forward-declare.
15844         (record_detach): Add inferior parameter.
15845         * remote-sim.c (gdbsim_detach): Likewise.
15846         * remote.c (remote_detach_1): Likewise.
15847         (remote_detach): Likewise.
15848         (extended_remote_detach): Likewise.
15849         * sol-thread.c (sol_thread_detach): Likewise.
15850         * target-debug.h (target_debug_print_inferior_p): New macro.
15851         * target-delegates.c: Re-generate.
15852         * top.c (kill_or_detach): Pass inferior down to target_detach.
15853         * windows-nat.c (windows_detach): Add inferior parameter.
15854
15855 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15856
15857         * target.h (struct target_ops) <to_detach>: Remove args
15858         parameter.
15859         (target_detach): Likewise.
15860         * target.c (dispose_inferior): Adjust.
15861         (target_detach): Remove args parameter, adjust.
15862         * aix-thread.c (aix_thread_detach): Adjust.
15863         * corefile.c (core_file_command): Adjust.
15864         * corelow.c (core_detach): Adjust.
15865         * darwin-nat.c (darwin_detach): Adjust.
15866         * gnu-nat.c (gnu_detach): Adjust.
15867         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15868         * infcmd.c (detach_command): Adjust
15869         * infrun.c (follow_fork_inferior): Adjust.
15870         (handle_vfork_child_exec_or_exit): Adjust.
15871         * linux-fork.c (linux_fork_detach): Remove args parameter.
15872         * linux-fork.h (linux_fork_detach): Likewise.
15873         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15874         * linux-thread-db.c (thread_db_detach): Likewise.
15875         * nto-procfs.c (procfs_detach): Likewise.
15876         * procfs.c (procfs_detach): Likewise.
15877         (do_detach): Remove signo parameter.
15878         * record.c (record_detach): Remove args parameter.
15879         * record.h (record_detach): Likewise.
15880         * remote-sim.c (gdbsim_detach): Likewise.
15881         * remote.c (remote_detach_1): Likewise.
15882         (remote_detach): Likewise.
15883         (extended_remote_detach): Likewise.
15884         * sol-thread.c (sol_thread_detach): Likewise.
15885         * target-delegates.c: Re-generate.
15886         * top.c (struct qt_args) <args>: Remove field.
15887         (kill_or_detach): Don't pass args.
15888         (quit_force): Don't set args.
15889         * windows-nat.c (windows_detach): Remove args parameter.
15890
15891 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15892
15893         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15894         (arm_linux_init_abi): Install it.
15895
15896 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15897
15898         * osabi.c (gdb_osabi_names): Extend the regexp for
15899         arm-linux-gnueabihf.
15900
15901 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15902
15903         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15904         m_abbrevs.
15905         (abbrev_table::add_abbrev): Update.
15906         (abbrev_table::lookup_abbrev): Update.
15907
15908 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15909
15910         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15911
15912 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15913
15914         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15915         to "std::string".
15916
15917 2018-01-17  Tom Tromey  <tom@tromey.com>
15918
15919         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15920
15921 2018-01-17  Tom Tromey  <tom@tromey.com>
15922
15923         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15924         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15925         (create_array_type_with_stride): Update.
15926         * dwarf2read.c (set_die_type): Update.
15927
15928 2018-01-17  Tom Tromey  <tom@tromey.com>
15929
15930         * dwarf2read.c (delayed_method_info): Remove typedef.
15931         (dwarf2_cu::method_info): Now a std::vector.
15932         (add_to_method_list): Update.
15933         (free_delayed_list): Remove.
15934         (compute_delayed_physnames): Update.
15935         (process_full_comp_unit, process_full_type_unit): Clear the method
15936         list.  Remove cleanups.
15937         (psymtab_include_file_name): Add name_holder parameter.  Use
15938         unique_xmalloc_ptr.
15939         (dwarf_decode_lines): Update.
15940
15941 2018-01-17  Tom Tromey  <tom@tromey.com>
15942             Simon Marchi  <simon.marchi@ericsson.com>
15943
15944         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15945         (dwarf2_per_objfile::free_cached_comp_units)
15946         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15947         (init_cutu_and_read_dies_no_follow): Update.
15948         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15949         (dwarf2_cu::~dwarf2_cu): New.
15950         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15951         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15952
15953 2018-01-17  Tom Tromey  <tom@tromey.com>
15954             Simon Marchi  <simon.marchi@ericsson.com>
15955
15956         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15957         (struct die_reader_specs) <abbrev_table>: New member.
15958         (struct abbrev_table): Add constructor.
15959         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15960         <abbrev_obstack>: Now an auto_obstack.
15961         (abbrev_table_up): New typedef.
15962         (init_cu_die_reader): Add abbrev_table parameter.
15963         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15964         Add result_dwo_abbrev_table.
15965         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15966         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15967         Update.
15968         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15969         parameter.
15970         (skip_children): Update.
15971         (abbrev_table::alloc_abbrev): Rename from
15972         abbrev_table_alloc_abbrev.
15973         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15974         (abbrev_table::lookup_abbrev): Rename from
15975         abbrev_table_lookup_abbrev.
15976         (abbrev_table_read_table): Return abbrev_table_up.
15977         (abbrev_table_free, abbrev_table_free_cleanup)
15978         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15979         (load_partial_dies): Update.
15980
15981 2018-01-17  Tom Tromey  <tom@tromey.com>
15982
15983         * dwarf2read.c (dwarf2_compute_name): Update comment.
15984         (read_func_scope, read_variable): Update.
15985         (new_symbol): Remove.
15986         (new_symbol_full): Rename to new_symbol.
15987
15988 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15989
15990         PR gdb/16577
15991         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15992         a warning instead of throwing an error, set section size to 0 and return
15993         NULL.
15994         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15995
15996 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15997
15998         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15999         std::string.
16000         (linux_ptrace_attach_fail_reason_string): Likewise.
16001         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
16002         Likewise.
16003         (linux_ptrace_attach_fail_reason_string): Likewise.
16004         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
16005
16006 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
16007
16008         * linux-nat.c (linux_nat_attach): Remove xstrdup.
16009
16010 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
16011
16012         PR gdb/21559
16013         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
16014         checking for fs_base/gs_base fields in struct user_regs_struct.
16015         * configure: Regenerate.
16016
16017 2018-01-17  Yao Qi  <yao.qi@linaro.org>
16018
16019         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16020         function.
16021         (aarch64_linux_init_abi): Install it to gdbarch hook
16022         gcc_target_options.
16023
16024 2018-01-15  Pedro Alves  <palves@redhat.com>
16025
16026         * common/signals-state-save-restore.c
16027         (save_original_signals_state): Fix typos.
16028
16029 2017-01-12  Tom Tromey  <tom@tromey.com>
16030             Sergio Durigan Junior  <sergiodj@redhat.com>
16031
16032         * Makefile.in (install-only): Install gdb-add-index.
16033
16034 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
16035
16036         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16037
16038 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16039
16040         * infrun.c (keep_going_pass_signal): Clear step-over info when
16041         insert_breakpoints fails.
16042
16043 2018-01-11  Pedro Alves  <palves@redhat.com>
16044
16045         PR gdb/22583
16046         * infrun.c (resume): Rename to ...
16047         (resume_1): ... this.
16048         (resume): Reimplement as wrapper around resume_1.
16049
16050 2018-01-11  Pedro Alves  <palves@redhat.com>
16051
16052         PR remote/22597
16053         * remote.c (remote_parse_stop_reply): Default to the last-set
16054         general thread instead of to 'magic_null_ptid'.
16055
16056 2018-01-10  Pedro Alves  <palves@redhat.com>
16057
16058         * language.h (language_get_symbol_name_matcher): Rename ...
16059         (get_symbol_name_matcher): ... this.
16060         * language.c (language_get_symbol_name_matcher): Ditto.
16061         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16062         callers adjusted.
16063
16064 2018-01-10  Pedro Alves  <palves@redhat.com>
16065
16066         PR gdb/22670
16067         * dwarf2read.c
16068         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16069         Adjust to use language_get_symbol_name_matcher instead of
16070         language_defn::la_get_symbol_name_matcher.
16071         * language.c (language_get_symbol_name_matcher): If in Ada mode
16072         and the lookup name is a verbatim match, return Ada's matcher.
16073         * language.h (language_get_symbol_name_matcher): Adjust comment.
16074         (ada_lookup_name_info::verbatim_p):: New method.
16075
16076 2018-01-10  Pedro Alves  <palves@redhat.com>
16077
16078         PR gdb/22670
16079         * ada-lang.c (ada_collect_symbol_completion_matches): If the
16080         minsym's language is language_auto or language_cplus, pass down
16081         language_ada instead.
16082         * symtab.c (compare_symbol_name): Don't frob symbol language here.
16083
16084 2018-01-10  Pedro Alves  <palves@redhat.com>
16085
16086         PR gdb/22670
16087         * minsyms.c (linkage_name_str): New function.
16088         (iterate_over_minimal_symbols): Use it.
16089
16090 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16091
16092         * NEWS: Document that 'info proc' now works on FreeBSD.
16093
16094 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16095
16096         * configure.ac: Check for kinfo_getfile in libutil.
16097         * configure: Regenerate.
16098         * config.in: Regenerate.
16099         * fbsd-nat.c: Include "fbsd-tdep.h".
16100         (fbsd_fetch_cmdline): New.
16101         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16102         rather than calling error.
16103         (fbsd_info_proc): New.
16104         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16105         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16106         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16107
16108 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16109
16110         * fbsd-nat.c (struct free_deleter): Remove.
16111         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16112
16113 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16114
16115         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16116         NULL for an empty pathname.
16117
16118 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16119
16120         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16121         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16122         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16123         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16124         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16125         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16126         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16127         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16128         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16129         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16130         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16131         (fbsd_core_fetch_timeval, fbsd_print_sigset)
16132         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16133         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
16134         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16135
16136 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
16137
16138         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16139         (gnu_xfer_auxv): New function.
16140         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16141         TARGET_OBJECT_AUXV.
16142
16143 2018-01-08  Yao Qi  <yao.qi@linaro.org>
16144             Simon Marchi  <simon.marchi@ericsson.com>
16145
16146         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16147         common/selftest.c.
16148         (COMMON_OBS): Remove selftest.o.
16149         * configure.ac: Append selftest-arch.c and common/selftest.c to
16150         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
16151         * configure: Re-generated.
16152         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16153         GDB_SELF_TEST.
16154         (maintenance_info_selftests): Likewise.
16155
16156 2018-01-08  Xavier Roirand  <roirand@adacore.com>
16157
16158         * ada-valprint.c (val_print_packed_array_elements): Use
16159         proper number of elements when printing an array indexed
16160         by an enumeration type.
16161
16162 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16163
16164         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16165         (dw2_get_file_names_reader): Adjust.
16166         (lookup_dwo_signatured_type): Adjust.
16167         (lookup_dwp_signatured_type): Adjust.
16168         (lookup_signatured_type): Adjust.
16169         (create_type_unit_group): Adjust.
16170         (get_type_unit_group): Adjust.
16171         (process_psymtab_comp_unit_reader): Adjust.
16172         (build_type_psymtabs_reader): Adjust.
16173         (scan_partial_symbols): Adjust.
16174         (add_partial_symbol): Adjust.
16175         (add_partial_subprogram): Adjust.
16176         (peek_die_abbrev): Adjust.
16177         (fixup_go_packaging): Adjust.
16178         (process_imported_unit_die): Adjust.
16179         (dwarf2_compute_name): Adjust.
16180         (dwarf2_physname): Adjust.
16181         (read_import_statement): Adjust.
16182         (handle_DW_AT_stmt_list): Adjust.
16183         (read_file_scope): Adjust.
16184         (read_func_scope): Adjust.
16185         (read_lexical_block_scope): Adjust.
16186         (read_call_site_scope): Adjust.
16187         (read_variable): Adjust.
16188         (dwarf2_rnglists_process): Adjust.
16189         (dwarf2_ranges_process): Adjust.
16190         (dwarf2_ranges_read): Adjust.
16191         (dwarf2_get_pc_bounds): Adjust.
16192         (dwarf2_record_block_ranges): Adjust.
16193         (dwarf2_add_field): Adjust.
16194         (dwarf2_add_member_fn): Adjust.
16195         (read_structure_type): Adjust.
16196         (process_structure_scope): Adjust.
16197         (read_enumeration_type): Adjust.
16198         (read_array_type): Adjust.
16199         (mark_common_block_symbol_computed): Adjust.
16200         (read_common_block): Adjust.
16201         (read_namespace_type): Adjust.
16202         (read_namespace): Adjust.
16203         (read_module_type): Adjust.
16204         (read_tag_pointer_type): Adjust.
16205         (read_tag_ptr_to_member_type): Adjust.
16206         (read_tag_string_type): Adjust.
16207         (read_subroutine_type): Adjust.
16208         (read_typedef): Adjust.
16209         (read_base_type): Adjust.
16210         (attr_to_dynamic_prop): Adjust.
16211         (read_subrange_type): Adjust.
16212         (read_unspecified_type): Adjust.
16213         (dwarf2_read_abbrevs): Adjust.
16214         (load_partial_dies): Adjust.
16215         (read_partial_die): Adjust.
16216         (find_partial_die): Adjust.
16217         (guess_partial_die_structure_name): Adjust.
16218         (fixup_partial_die): Adjust.
16219         (read_attribute_value): Adjust.
16220         (read_addr_index): Adjust.
16221         (read_addr_index_from_leb128): Adjust.
16222         (read_str_index): Adjust.
16223         (dwarf2_string_attr): Adjust.
16224         (get_debug_line_section): Adjust.
16225         (dwarf_decode_line_header): Adjust.
16226         (lnp_state_machine::check_line_address): Adjust.
16227         (dwarf_decode_lines_1): Adjust.
16228         (dwarf_decode_lines): Adjust.
16229         (dwarf2_start_symtab): Adjust.
16230         (var_decode_location): Adjust.
16231         (new_symbol_full): Adjust.
16232         (dwarf2_const_value_data): Adjust.
16233         (dwarf2_const_value_attr): Adjust.
16234         (dwarf2_const_value): Adjust.
16235         (die_type): Adjust.
16236         (die_containing_type): Adjust.
16237         (build_error_marker_type): Adjust.
16238         (lookup_die_type): Adjust.
16239         (guess_full_die_structure_name): Adjust.
16240         (anonymous_struct_prefix): Adjust.
16241         (determine_prefix): Adjust.
16242         (dwarf2_name): Adjust.
16243         (follow_die_ref_or_sig): Adjust.
16244         (follow_die_offset): Adjust.
16245         (follow_die_ref): Adjust.
16246         (follow_die_sig_1): Adjust.
16247         (follow_die_sig): Adjust.
16248         (get_signatured_type): Adjust.
16249         (get_DW_AT_signature_type): Adjust.
16250         (decode_locdesc): Adjust.
16251         (dwarf_decode_macros): Adjust.
16252         (cu_debug_loc_section): Adjust.
16253         (fill_in_loclist_baton): Adjust.
16254         (dwarf2_symbol_mark_computed): Adjust.
16255         (init_one_comp_unit): Don't assign
16256         dwarf2_cu::dwarf2_per_objfile.
16257         (set_die_type): Adjust.
16258
16259 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16260
16261         * dwarf2read.c (struct mapped_debug_names): Add constructor.
16262         <dwarf2_per_objfile>: New field.
16263         (dwarf2_per_objfile): Remove global.
16264         (get_dwarf2_per_objfile): New function.
16265         (set_dwarf2_per_objfile): New function.
16266         (dwarf2_build_psymtabs_hard): Change objfile parameter to
16267         dwarf2_per_objfile.
16268         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16269         (read_abbrev_offset): Likewise.
16270         (read_indirect_string): Likewise.
16271         (read_indirect_line_string): Likewise.
16272         (read_indirect_string_at_offset): Likewise.
16273         (read_indirect_string_from_dwz): Likewise.
16274         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16275         dwarf2_per_objfile.
16276         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16277         (create_all_comp_units): Change objfile parameter to
16278         dwarf2_per_objfile.
16279         (create_all_type_units): Likewise.
16280         (process_queue): Add dwarf2_per_objfile parameter.
16281         (read_and_check_comp_unit_head): Likewise.
16282         (lookup_dwo_unit_in_dwp): Likewise.
16283         (get_dwp_file): Likewise.
16284         (process_cu_includes): Likewise.
16285         (struct free_dwo_file_cleanup_data): New struct.
16286         (dwarf2_has_info): Use get_dwarf2_per_objfile and
16287         set_dwarf2_per_objfile.
16288         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16289         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16290         context, adjust calls.
16291         (dw2_instantiate_symtab): Likewise.
16292         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16293         (dw2_get_cu): Likewise.
16294         (create_cu_from_index_list): Change objfile parameter to
16295         dwarf2_per_objfile.
16296         (create_cus_from_index_list): Get dwarf2_per_objfile from
16297         context, adjust calls.
16298         (create_cus_from_index): Likewise.
16299         (create_signatured_type_table_from_index): Change objfile
16300         parameter to dwarf2_per_objfile.
16301         (create_signatured_type_table_from_debug_names): Change objfile
16302         parameter to dwarf2_per_objfile.
16303         (create_addrmap_from_index): Likewise.
16304         (create_addrmap_from_aranges): Likewise.
16305         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16306         (dw2_setup): Remove.
16307         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16308         context.
16309         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16310         get_dwarf2_per_objfile.
16311         (dw2_forget_cached_source_info): Likewise.
16312         (dw2_map_symtabs_matching_filename): Likewise.
16313         (struct dw2_symtab_iterator) <index>: Remove.
16314         <dwarf2_per_objfile>: New field.
16315         (dw2_symtab_iter_init): Replace index parameter with
16316         dwarf2_per_objfile.
16317         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16318         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16319         (dw2_print_stats): Likewise.
16320         (dw2_dump): Likewise.
16321         (dw2_expand_symtabs_for_function): Likewise.
16322         (dw2_expand_all_symtabs): Likewise.
16323         (dw2_expand_symtabs_with_fullname): Likewise.
16324         (dw2_expand_marked_cus): Replace index and objfile parameters
16325         with dwarf2_per_objfile.
16326         (dw_expand_symtabs_matching_file_matcher): Add
16327         dwarf2_per_objfile parameter and adjust calls.
16328         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16329         adjust calls.
16330         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16331         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16332         adjust calls.
16333         (create_cus_from_debug_names_list): Replace objfile parameter
16334         with dwarf2_per_objfile and adjust calls.
16335         (create_cus_from_debug_names): Likewise.
16336         (dwarf2_read_debug_names): Likewise.
16337         (mapped_debug_names::namei_to_name): Adjust call.
16338         (dw2_debug_names_iterator::next): Likewise.
16339         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16340         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16341         (dw2_debug_names_dump): Likewise.
16342         (dw2_debug_names_expand_symtabs_for_function): Likewise.
16343         (dw2_debug_names_expand_symtabs_matching): Likewise.
16344         (dwarf2_initialize_objfile): Likewise.
16345         (dwarf2_build_psymtabs): Likewise.
16346         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16347         this_cu.
16348         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16349         (read_and_check_comp_unit_head): Likewise.
16350         (read_abbrev_offset): Likewise.
16351         (create_debug_type_hash_table): Likewise.
16352         (create_debug_types_hash_table): Likewise.
16353         (create_all_type_units): Replace objfile parameter with
16354         dwarf2_per_objfile.
16355         (add_type_unit): Add dwarf2_per_objfile parameter.
16356         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16357         with dwarf2_per_objfile.
16358         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16359         (lookup_dwp_signatured_type): Likewise.
16360         (lookup_signatured_type): Likewise.
16361         (read_cutu_die_from_dwo): Likewise.
16362         (init_tu_and_read_dwo_dies): Likewise.
16363         (init_cutu_and_read_dies): Likewise.
16364         (init_cutu_and_read_dies_no_follow): Likewise.
16365         (allocate_type_unit_groups_table): Add objfile parameter.
16366         (create_type_unit_group): Use dwarf2_per_objfile from cu.
16367         (get_type_unit_group): Likewise.
16368         (process_psymtab_comp_unit): Update call.
16369         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16370         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16371         (print_tu_stats): Likewise.
16372         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16373         in void* parameter.
16374         (build_type_psymtabs): Change objfile parameter to
16375         dwarf2_per_objfile.
16376         (process_skeletonless_type_unit): Use dwarf2_per_objfile
16377         passed in void* parameter.
16378         (process_skeletonless_type_units): Change objfile parameter to
16379         dwarf2_per_objfile.
16380         (set_partial_user): Likewise.
16381         (dwarf2_build_psymtabs_hard): Likewise.
16382         (read_comp_units_from_section): Likewise.
16383         (create_all_comp_units): Likewise.
16384         (scan_partial_symbols): Update calls.
16385         (add_partial_symbol): Likewise.
16386         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16387         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16388         (process_queue): Add dwarf2_per_objfile parameter.
16389         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16390         (compute_compunit_symtab_includes): Likewise.
16391         (process_cu_includes): Add dwarf2_per_objfile parameter.
16392         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16393         (process_full_type_unit): Likewise.
16394         (process_imported_unit_die): Update call.
16395         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16396         (read_file_scope): Likewise.
16397         (allocate_dwo_file_hash_table): Add objfile parameter.
16398         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16399         (create_cus_hash_table): Likewise.
16400         (create_dwp_hash_table): Likewise.
16401         (create_dwo_unit_in_dwp_v1): Likewise.
16402         (create_dwp_v2_section): Likewise.
16403         (create_dwo_unit_in_dwp_v2): Likewise.
16404         (lookup_dwo_unit_in_dwp): Likewise.
16405         (try_open_dwop_file): Likewise.
16406         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16407         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16408         cleanup to include a reference to dwarf2_per_objfile.
16409         (open_dwp_file): Add dwarf2_per_objfile parameter.
16410         (open_and_init_dwp_file): Likewise.
16411         (get_dwp_file): Likewise.
16412         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16413         (queue_and_load_all_dwo_tus): Update call.
16414         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16415         data.
16416         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16417         (dwarf2_ranges_process): Likewise.
16418         (dwarf2_get_pc_bounds): Likewise.
16419         (mark_common_block_symbol_computed): Likewise.
16420         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16421         (dwarf2_read_abbrevs): Update call.
16422         (read_partial_die): Use dwarf2_per_objfile from cu.
16423         (find_partial_die): Likewise.
16424         (fixup_partial_die): Likewise.
16425         (read_attribute_value): Likewise.
16426         (read_indirect_string_at_offset_from): Add objfile parameter.
16427         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16428         parameter.
16429         (read_indirect_string_from_dwz): Add objfile parameter.
16430         (read_indirect_string): Add objfile parameter.
16431         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16432         (read_addr_index): Use dwarf2_per_objfile from cu.
16433         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16434         call dw2_setup.
16435         (read_str_index): Use dwarf2_per_objfile from cu.
16436         (get_debug_line_section): Likewise.
16437         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16438         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16439         (new_symbol_full): Use dwarf2_per_objfile from cu.
16440         (build_error_marker_type): Likewise.
16441         (lookup_die_type): Likewise.
16442         (determine_prefix): Likewise.
16443         (follow_die_offset): Likewise.
16444         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16445         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16446         (dwarf2_fetch_die_type_sect_off): Likewise.
16447         (dwarf2_get_die_type): Likewise.
16448         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16449         (get_signatured_type): Likewise.
16450         (get_DW_AT_signature_type): Likewise.
16451         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16452         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16453         (cu_debug_loc_section): Likewise.
16454         (fill_in_loclist_baton): Likewise.
16455         (dwarf2_symbol_mark_computed): Likewise.
16456         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16457         dwarf2_per_objfile.
16458         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16459         parameter.
16460         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16461         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16462         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16463         (set_die_type): Use dwarf2_free_objfile from cu.
16464         (get_die_type_at_offset): Likewise.
16465         (dwarf2_per_objfile_free): Don't assign global variable.
16466         (debug_names) <constructor>: Add dwarf2_per_objfile
16467         parameter, update m_debugstrlookup construction.
16468         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16469         parameter.
16470         <m_dwarf2_per_objfile>: New field.
16471         <lookup>: Use m_dwarf2_per_objfile.
16472         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16473         (psyms_seen_size): Likewise.
16474         (write_gdbindex): Replace objfile parameter with
16475         dwarf2_per_objfile.
16476         (write_debug_names): Likewise.
16477         (write_psymtabs_to_index): Likewise.
16478         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16479         calls.
16480
16481 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16482
16483         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16484         <dwarf2_per_objfile>: New field.
16485         (struct dwarf2_per_cu_data) <objfile>: Remove.
16486         <dwarf2_per_objfile>: New field.
16487         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16488         of objfile.
16489         (create_signatured_type_table_from_index): Likewise.
16490         (create_debug_type_hash_table): Likewise.
16491         (fill_in_sig_entry_from_dwo_entry): Likewise.
16492         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16493         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16494         objfile.
16495         (create_partial_symtab): Access objfile through
16496         dwarf2_per_objfile.
16497         (process_psymtab_comp_unit_reader): Likewise.
16498         (read_comp_units_from_section): Likewise.
16499         (scan_partial_symbols): Likewise.
16500         (add_partial_symbol): Likewise.
16501         (add_partial_subprogram): Likewise.
16502         (peek_die_abbrev): Likewise.
16503         (fixup_go_packaging): Likewise.
16504         (process_full_comp_unit): Likewise.
16505         (process_full_type_unit): Likewise.
16506         (process_imported_unit_die): Likewise.
16507         (dwarf2_compute_name): Likewise.
16508         (dwarf2_physname): Likewise.
16509         (read_import_statement): Likewise.
16510         (create_cus_hash_table): Assign dwarf2_physname instead of
16511         objfile.
16512         (read_func_scope): Access objfile through dwarf2_per_objfile.
16513         (read_lexical_block_scope): Likewise.
16514         (read_call_site_scope): Likewise.
16515         (read_variable): Likewise.
16516         (dwarf2_rnglists_process): Likewise.
16517         (dwarf2_ranges_process): Likewise.
16518         (dwarf2_ranges_read): Likewise.
16519         (dwarf2_record_block_ranges): Likewise.
16520         (dwarf2_add_field): Likewise.
16521         (dwarf2_add_member_fn): Likewise.
16522         (read_structure_type): Likewise.
16523         (process_structure_scope): Likewise.
16524         (read_enumeration_type): Likewise.
16525         (read_array_type): Likewise.
16526         (read_common_block): Likewise.
16527         (read_namespace_type): Likewise.
16528         (read_namespace): Likewise.
16529         (read_module_type): Likewise.
16530         (read_tag_pointer_type): Likewise.
16531         (read_tag_ptr_to_member_type): Likewise.
16532         (read_tag_string_type): Likewise.
16533         (read_subroutine_type): Likewise.
16534         (read_typedef): Likewise.
16535         (read_base_type): Likewise.
16536         (attr_to_dynamic_prop): Likewise.
16537         (read_subrange_type): Likewise.
16538         (read_unspecified_type): Likewise.
16539         (load_partial_dies): Likewise.
16540         (read_partial_die): Likewise.
16541         (find_partial_die): Likewise.
16542         (guess_partial_die_structure_name): Likewise.
16543         (fixup_partial_die): Likewise.
16544         (read_attribute_value): Likewise.
16545         (read_addr_index_from_leb128): Likewise.
16546         (dwarf2_read_addr_index): Likewise.
16547         (dwarf2_string_attr): Likewise.
16548         (lnp_state_machine::check_line_address): Likewise.
16549         (dwarf_decode_lines_1): Likewise.
16550         (dwarf_decode_lines): Likewise.
16551         (dwarf2_start_symtab): Likewise.
16552         (var_decode_location): Likewise.
16553         (new_symbol_full): Likewise.
16554         (dwarf2_const_value_data): Likewise.
16555         (dwarf2_const_value_attr): Likewise.
16556         (dwarf2_const_value): Likewise.
16557         (die_type): Likewise.
16558         (die_containing_type): Likewise.
16559         (lookup_die_type): Likewise.
16560         (guess_full_die_structure_name): Likewise.
16561         (anonymous_struct_prefix): Likewise.
16562         (dwarf2_name): Likewise.
16563         (follow_die_ref_or_sig): Likewise.
16564         (follow_die_offset): Likewise.
16565         (follow_die_ref): Likewise.
16566         (dwarf2_fetch_die_loc_sect_off): Likewise.
16567         (dwarf2_fetch_constant_bytes): Likewise.
16568         (dwarf2_fetch_die_type_sect_off): Likewise.
16569         (dwarf2_get_die_type): Likewise.
16570         (follow_die_sig): Likewise.
16571         (decode_locdesc): Likewise.
16572         (dwarf2_per_cu_objfile): Likewise.
16573         (dwarf2_per_cu_text_offset): Likewise.
16574         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16575         objfile.
16576         (set_die_type): Access objfile through
16577         dwarf2_per_objfile.
16578
16579 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16580
16581         * valprint.c (converted_character_d): Remove typedef.
16582         (DEF_VEC_O (converted_character_d)): Remove.
16583         (count_next_character): Use std::vector.
16584         (print_converted_chars_to_obstack): Likewise.
16585         (generic_printstr): Likewise.
16586
16587 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16588
16589         * xml-support.h (struct gdb_xml_value): Add constructor.
16590         <value>: Change type to unique_xmalloc_ptr.
16591         (gdb_xml_value_s): Remove typedef.
16592         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16593         (gdb_xml_element_start_handler): Change parameter type to
16594         std::vector.
16595         (xml_find_attribute): Likewise.
16596         * xml-support.c (xml_find_attribute): Change parameter type to
16597         std::vector and adjust.
16598         (gdb_xml_values_cleanup): Remove.
16599         (gdb_xml_parser::start_element): Adjust to std::vector.
16600         (xinclude_start_include): Change paraeter type to std::vector
16601         and adjust.
16602         * btrace.c (check_xml_btrace_version): Likewise.
16603         (parse_xml_btrace_block): Likewise.
16604         (parse_xml_btrace_pt_config_cpu): Likewise.
16605         (parse_xml_btrace_pt): Likewise.
16606         (parse_xml_btrace_conf_bts): Likewise.
16607         (parse_xml_btrace_conf_pt): Likewise.
16608         * memory-map.c (memory_map_start_memory): Likewise.
16609         (memory_map_start_property): Likewise.
16610         * osdata.c (osdata_start_osdata): Likewise.
16611         (osdata_start_item): Likewise.
16612         (osdata_start_column): Likewise.
16613         * remote.c (start_thread): Likewise.
16614         * solib-aix.c (library_list_start_library): Likewise.
16615         (library_list_start_list): Likewise.
16616         * solib-svr4.c (library_list_start_library): Likewise.
16617         (svr4_library_list_start_list): Likewise.
16618         * solib-target.c (library_list_start_segment): Likewise.
16619         (library_list_start_section): Likewise.
16620         (library_list_start_library): Likewise.
16621         (library_list_start_list): Likewise.
16622         * tracepoint.c (traceframe_info_start_memory): Likewise.
16623         (traceframe_info_start_tvar): Likewise.
16624         * xml-syscall.c (syscall_start_syscall): Likewise.
16625         * xml-tdesc.c (tdesc_start_target): Likewise.
16626         (tdesc_start_feature): Likewise.
16627         (tdesc_start_reg): Likewise.
16628         (tdesc_start_union): Likewise.
16629         (tdesc_start_struct): Likewise.
16630         (tdesc_start_flags): Likewise.
16631         (tdesc_start_enum): Likewise.
16632         (tdesc_start_field): Likewise.
16633         (tdesc_start_enum_value): Likewise.
16634         (tdesc_start_vector): Likewise.
16635
16636 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16637
16638         * extension.h (struct xmethod_worker) <clone>: Remove.
16639         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16640         Remove.
16641         (python_xmethod_worker::clone): Remove.
16642         * valops.c (find_overload_match): Use std::move instead of
16643         clone.
16644
16645 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16646
16647         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16648         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16649         <free_xmethod_worker_data>: Remove.
16650         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16651         <get_xmethod_arg_types>: Remove.
16652         <get_xmethod_result_type>: Remove.
16653         <invoke_xmethod>: Remove.
16654         * extension.c (new_xmethod_worker): Remove.
16655         (clone_xmethod_worker): Remove.
16656         (get_matching_xmethod_workers): Return void, pass std::vector by
16657         pointer.
16658         (get_xmethod_arg_types): Rename to...
16659         (xmethod_worker::get_arg_types): ... this, and adjust.
16660         (get_xmethod_result_type): Rename to...
16661         (xmethod_worker::get_result_type): ... this, and adjust.
16662         (invoke_xmethod): Remove.
16663         (free_xmethod_worker): Remove.
16664         (free_xmethod_worker_vec): Remove.
16665         * extension.h (enum ext_lang_rc): Move here from
16666         extension-priv.h.
16667         (struct xmethod_worker): Add constructor and destructor.
16668         <data>: Remove.
16669         <value>: Remove.
16670         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16671         virtual pure methods.
16672         <get_arg_types, get_result_type>: New methods.
16673         (xmethod_worker_ptr): Remove typedef.
16674         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16675         (xmethod_worker_vec): Remove typedef.
16676         (xmethod_worker_up): New typedef.
16677         (invoke_xmethod): Remove.
16678         (clone_xmethod_worker): Remove.
16679         (free_xmethod_worker): Remove.
16680         (free_xmethod_worker_vec): Remove.
16681         (get_xmethod_arg_types): Remove.
16682         (get_xmethod_result_type): Remove.
16683         * valops.c (find_method_list): Use std::vector, don't use
16684         intermediate vector.
16685         (value_find_oload_method_list): Use std::vector.
16686         (find_overload_match): Use std::vector.
16687         (find_oload_champ): Use std::vector.
16688         * value.c (value_free): Use operator delete.
16689         (value_of_xmethod): Rename to...
16690         (value_from_xmethod): ... this.  Don't assign
16691         xmethod_worker::value, take rvalue-reference.
16692         (result_type_of_xmethod): Adjust.
16693         (call_xmethod): Adjust.
16694         * value.h: Include extension.h.
16695         (struct xmethod_worker): Don't forward-declare.
16696         (value_of_xmethod): Rename to...
16697         (value_from_xmethod): ... this, take rvalue-reference.
16698         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16699         (struct python_xmethod_worker): ... this, add constructor and
16700         destructor.
16701         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16702         (gdbpy_free_xmethod_worker_data): Rename to...
16703         (python_xmethod_worker::~python_xmethod_worker): ... this and
16704         adjust.
16705         (gdbpy_clone_xmethod_worker_data): Rename to...
16706         (python_xmethod_worker::clone): ... this and adjust.
16707         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16708         temporary vector.
16709         (gdbpy_get_xmethod_arg_types): Rename to...
16710         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16711         (gdbpy_get_xmethod_result_type): Rename to...
16712         (python_xmethod_worker::do_get_result_type): ... this and
16713         adjust.
16714         (gdbpy_invoke_xmethod): Rename to...
16715         (python_xmethod_worker::invoke): ... this and adjust.
16716         (new_python_xmethod_worker): Rename to...
16717         (python_xmethod_worker::python_xmethod_worker): ... this and
16718         adjust.
16719         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16720         Remove.
16721         (gdbpy_free_xmethod_worker_data): Remove.
16722         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16723         (gdbpy_get_xmethod_arg_types): Remove.
16724         (gdbpy_get_xmethod_result_type): Remove.
16725         (gdbpy_invoke_xmethod): Remove.
16726         * python/python.c (python_extension_ops): Remove obsolete
16727         callbacks.
16728
16729 2018-01-05  Pedro Alves  <palves@redhat.com>
16730
16731         PR gdb/18653
16732         * common/signals-state-save-restore.c
16733         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16734         find a custom handler preinstalled, instead of internal erroring.
16735         But only warn if !quiet.
16736         * common/signals-state-save-restore.h
16737         (save_original_signals_state): New parameter 'quiet'.
16738         * main.c (captured_main_1): Move save_original_signals_state call
16739         after option handling, and pass QUIET.
16740
16741 2018-01-05  Pedro Alves  <palves@redhat.com>
16742
16743         * spu-tdep.c (spu_catch_start): Pass
16744         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16745
16746 2018-01-05  Pedro Alves  <palves@redhat.com>
16747
16748         PR gdb/22670
16749         * ada-lang.c (literal_symbol_name_matcher): New function.
16750         (ada_get_symbol_name_matcher): Use it for
16751         symbol_name_match_type::SEARCH_NAME.
16752         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16753         it down instead of assuming symbol_name_match_type::FULL.
16754         * block.h (block_lookup_symbol): New parameter 'match_type'.
16755         * c-valprint.c (print_unpacked_pointer): Use
16756         lookup_symbol_search_name instead of lookup_symbol.
16757         * compile/compile-object-load.c (get_out_value_type): Pass down
16758         symbol_name_match_type::SEARCH_NAME.
16759         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16760         symbol_name_match_type::FULL.
16761         * cp-support.c (cp_get_symbol_name_matcher): Handle
16762         symbol_name_match_type::SEARCH_NAME.
16763         * infrun.c (insert_exception_resume_breakpoint): Use
16764         lookup_symbol_search_name.
16765         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16766         * psymtab.c (maintenance_check_psymtabs): Use
16767         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16768         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16769         SYMBOL_SEARCH_NAME.
16770         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16771         if symbol_name_match_type::SEARCH_NAME.
16772         (lookup_symbol_in_language): Pass down
16773         symbol_name_match_type::FULL.
16774         (lookup_symbol_search_name): New.
16775         (lookup_language_this): Pass down
16776         symbol_name_match_type::SEARCH_NAME.
16777         (lookup_symbol_aux, lookup_local_symbol): New parameter
16778         'match_type'.  Pass it down.
16779         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16780         (lookup_symbol_search_name): New declaration.
16781         (lookup_symbol_in_block): New 'match_type' parameter.
16782
16783 2018-01-05  Pedro Alves  <palves@redhat.com>
16784
16785         PR gdb/22670
16786         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16787         ada_lookup_symbol.
16788         (ada_lookup_symbol): Reimplement in terms of
16789         ada_lookup_symbol_list, bits factored out from
16790         ada_lookup_encoded_symbol.
16791
16792 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16793
16794         * ada-exp.y (write_object_renaming): When subscripting an array
16795         using a symbol as the index, pass the block in call to
16796         ada_lookup_encoded_symbol when looking that symbol up.
16797
16798 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16799
16800         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16801         TYPE_INDEX_TYPE.
16802
16803 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16804
16805         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16806         the case where VALUE_LVAL (val0) is not lval_memory.
16807
16808 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16809
16810         * ada-valprint.c (print_optional_low_bound): Handle
16811         character-indexed array printing like boolean-indexed array
16812         printing.
16813
16814 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16815
16816         * NEWS: Create a new section for the next release branch.
16817         Rename the section of the current branch, now that it has
16818         been cut.
16819
16820 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16821
16822         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16823         * version.in: Bump version to 8.1.50.DATE-git.
16824
16825 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16826
16827         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16828         Add field.
16829         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16830         Add field.
16831         (default_exception_support_info) <catch_handlers_sym>: Add field.
16832         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16833         (ada_exception_name_addr_1): Add "catch handlers" handling.
16834         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16835         Update all callers.
16836         (create_excep_cond_exprs) <ex>: Add parameter.
16837         (re_set_exception): Update create_excep_cond_exprs call.
16838         (print_it_exception, print_one_exception, print_mention_exception)
16839         (print_recreate_exception): Add "catch handler" handling.
16840         (allocate_location_catch_handlers, re_set_catch_handlers)
16841         (check_status_catch_handlers, print_it_catch_handlers)
16842         (print_one_catch_handlers, print_mention_catch_handlers)
16843         (print_recreate_catch_handlers): New function.
16844         (catch_handlers_breakpoint_ops): New variable.
16845         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16846         Add parameter.  Add "catch handler" handling.
16847         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16848         Add "catch handler" handling.
16849         (ada_exception_catchpoint_cond_string): Add "catch handler"
16850         handling.
16851         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16852         call.
16853         (catch_ada_handlers_command): New function.
16854         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16855         operations structure.
16856         (_initialize_ada_language): Add "catch handlers" command entry.
16857         * NEWS: Document "catch handlers" feature.
16858
16859 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16860
16861         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16862         account when creating the array type of the slice.
16863         (ada_value_slice): Likewise.
16864
16865 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16866
16867         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16868         New enum value.
16869         (create_array_type_with_stride): Add byte_stride_prop parameter.
16870         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16871         New parameter.  Update all callers in this file.
16872         (array_type_has_dynamic_stride): New function.
16873         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16874         of arrays with dynamic byte strides.
16875         * dwarf2read.c (read_array_type): Add support for dynamic
16876         DW_AT_byte_stride attributes.
16877
16878 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16879
16880         * dwarf2read.c (read_unspecified_type): Treat
16881         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16882
16883 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16884
16885         Update copyright year range in all GDB files.
16886
16887 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16888
16889         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16890         and gdb/testsuite/gdb.base/step-line.c.
16891
16892 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16893
16894         * copyright.py (main): Dump the contents of
16895         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16896         even if BY_HAND is empty.
16897
16898 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16899
16900         * top.c (print_gdb_version): Update Copyright year in version
16901         message.
16902
16903 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16904
16905         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16906
16907 For older changes see ChangeLog-2017.
16908 \f
16909 Local Variables:
16910 mode: change-log
16911 left-margin: 8
16912 fill-column: 74
16913 version-control: never
16914 coding: utf-8
16915 End: