Remove some cleanups from breakpoint.c
[external/binutils.git] / gdb / ChangeLog
1 2017-10-11  Tom Tromey  <tom@tromey.com>
2
3         * breakpoint.c (commands_command_1): Use std::string.
4         (cleanup_executing_breakpoints): Remove.
5         (bpstat_do_actions_1): Use scoped_restore.
6         (bpstat_check_watchpoint): Use std::string.
7         (decode_static_tracepoint_spec): Likewise.
8         (break_range_command): Likewise.
9         (watch_command_1): Likewise.
10         (compare_breakpoints): Change argument types.
11         (clear_command): Use std::vector.
12         (cleanup_executing_breakpoints): Remove.
13         (update_global_location_list): Use unique_xmalloc_ptr.
14         (strace_command): Remove unused declaration.
15
16 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
17
18         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
19         * NEWS: Mention new FreeBSD/arm native configuration.
20         * configure.host: Add arm*-*-freebsd*.
21         * configure.nat: Likewise.
22         * arm-fbsd-nat.c: New file.
23
24 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
25
26         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
27         (ALLDEPFILES): Add arm-fbsd-tdep.c.
28         * NEWS: Mention new FreeBSD/arm target.
29         * configure.tgt: Add arm*-*-freebsd*.
30         * arm-fbsd-tdep.c: New file.
31         * arm-fbsd-tdep.h: New file.
32
33 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
34
35         * linux-tdep.c (linux_make_corefile_notes): Remove call to
36         `gdbarch_elfcore_write_linux_prpsinfo'.
37         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
38         method.
39         (elf_internal_linux_prpsinfo): Remove declaration.
40         * gdbarch.h: Regenerate.
41         * gdbarch.c: Regenerate.
42
43 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
44
45         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
46         `set_gdbarch_elfcore_write_linux_prpsinfo'.
47
48 2017-10-11  Pedro Alves  <palves@redhat.com>
49
50         * breakpoint.c (reattach_breakpoints): Delete.
51         * breakpoint.h (reattach_breakpoints): Delete.
52
53 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
54
55         * symfile.c (registered_sym_fns): Make struct, not typedef.
56         (DEF_VEC_O (registered_sym_fns)): Remove.
57         (symtab_fns): Change type to std::vector.
58         (add_symtab_fns): Adjust.
59         (find_sym_fns): Adjust.
60
61 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
62
63         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
64         * arc-tdep.h (arc_arch_is_em): New function.
65         (arc_arch_is_hs): Likewise.
66
67 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
68
69         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
70         parentheses in the declaration.
71         (macro_lookup_inclusion): Likewise.
72         (macro_lookup_definition): Likewise.
73         * p-lang.h (pascal_builtin_types): Likewise.
74         * tui/tui-data.c (tui_win_list): Likewise.
75         * tui/tui-data.h (tui_win_list): Likewise.
76         * utils.h (make_cleanup_free_section_addr_info): Likewise.
77
78 2017-10-11  Mark Rages  <markrages@gmail.com>
79
80         * target-memory.c (block_boundaries): Fix for block address not
81         aligned on block size.
82
83 2017-10-10  Pedro Alves <palves@redhat.com>
84             Tom Tromey  <tom@tromey.com>
85
86         * breakpoint.c (struct captured_breakpoint_query_args)
87         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
88         (print_breakpoint): New.
89         * breakpoint.h (print_breakpoint): Declare.
90         * common/common-exceptions.h (enum return_reason): Remove
91         references to catch_exceptions.
92         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
93         Delete.
94         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
95         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
96         * gdb.h: Delete.
97         * gdbthread.h (thread_select): Declare.
98         * mi/mi-cmd-break.c: Don't include gdb.h.
99         (breakpoint_notify): Use print_breakpoint.
100         * mi/mi-cmd-catch.c: Don't include gdb.h.
101         * mi/mi-interp.c: Don't include gdb.h.
102         (mi_print_breakpoint_for_event): New.
103         (mi_breakpoint_created, mi_breakpoint_modified): Use
104         mi_print_breakpoint_for_event.
105         * mi/mi-main.c: Don't include gdb.h.
106         (mi_cmd_thread_select): Parse the global thread ID here.  Use
107         thread_select instead of gdb_thread_select.
108         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
109         of using gdb_list_thread_ids.
110         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
111         FILEIO_ENOSYS here.
112         (remote_fileio_request): Use TRY/CATCH instead of
113         catch_exceptions.
114         * symfile-mem.c (struct symbol_file_add_from_memory_args)
115         (symbol_file_add_from_memory_wrapper): Delete.
116         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
117         * thread.c: Don't include gdb.h.
118         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
119         (thread_alive): Use thread_select.
120         (do_captured_thread_select): Delete, parts salvaged as ...
121         (thread_select): ... this new function.
122         (gdb_thread_select): Delete.
123
124 2017-10-10  Pedro Alves  <palves@redhat.com>
125             Tom Tromey  <tom@tromey.com>
126
127         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
128         and reverse logic.
129         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
130         No longer macros.  Instead ...
131         (enum wp_check_result): They're now values of this new
132         enumeration.
133         (watchpoint_check): Change return type to wp_check_result and
134         parameter type to bpstat.
135         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
136         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
137         catch_errors.  Reverse logic of watchpoint_check call.
138         (breakpoint_re_set_one): Now returns void and takes a breakpoint
139         pointer as parameter.
140         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
141         * common/common-exceptions.c (throw_exception_sjlj): Update
142         comments to avoid mentioning catch_errors.
143         * exceptions.c (catch_errors): Delete.
144         * exceptions.h: Update comments to avoid mentioning catch_errors.
145         (catch_errors_ftype, catch_errors): Delete.
146         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
147         (hook_stop_stub): Delete.
148         (restore_selected_frame): Change return type to void, and
149         parameter type to const frame_id &.
150         (restore_infcall_control_state): Use TRY/CATCH instead of
151         catch_errors.
152         * main.c (captured_command_loop): Return void and remove
153         parameter.  Remove references to catch_errors.
154         (captured_main): Use TRY/CATCH instead of catch_errors.
155         * objc-lang.c (objc_submethod_helper_data)
156         (find_objc_msgcall_submethod_helper): Delete.
157         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
158         catch_errors.
159         * record-full.c (record_full_message): Return void.
160         (record_full_message_args, record_full_message_wrapper): Delete.
161         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
162         instead of catch_errors.
163         * solib-aix.c (solib_aix_open_symbol_file_object): Change
164         parameter type to int.
165         * solib-darwin.c (open_symbol_file_object): Ditto.
166         * solib-dsbt.c (open_symbol_file_object): Ditto.
167         * solib-frv.c (open_symbol_file_object): Ditto.
168         * solib-svr4.c (open_symbol_file_object): Ditto.
169         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
170         * solib.c (update_solib_list): Use TRY/CATCH instead of
171         catch_errors.
172         * solist.h (struct target_so_ops) <open_symbol_file_object>:
173         Change type.
174         * symmisc.c (struct print_symbol_args): Remove.
175         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
176         (print_symbol): Change type.
177         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
178         and remove parameters.
179         (catch_errors): New.
180         (get_windows_debug_event): Adjust.
181
182 2017-10-09  Tom Tromey  <tom@tromey.com>
183
184         * mi/mi-main.c (free_splay_tree): Remove.
185         (list_available_thread_groups): Use splay_tree_up.
186         * common/gdb_splay_tree.h: New file.
187
188 2017-10-09  Tom Tromey  <tom@tromey.com>
189
190         * mi/mi-main.c (do_nothing): Remove.
191         (list_available_thread_groups): Update.
192
193 2017-10-09  Pedro Alves  <palves@redhat.com>
194
195         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
196         reading registers when switching context.
197
198 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
199
200         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
201         (fbsd_convert_siginfo): Likewise.
202         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
203
204 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
205
206         * configure.ac (try_guile_versions): Remove guile-2.2.
207         * configure: Regenerate.
208
209 2017-10-09  Tom Tromey  <tom@tromey.com>
210
211         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
212         (COMPILE.pre): Use $(CXX).
213
214 2017-10-09  Pedro Alves  <palves@redhat.com>
215
216         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
217         Use bool.
218         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
219         * cp-support.h (cp_remove_params): Now returns a
220         gdb::unique_xmalloc_ptr.
221         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
222         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
223         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
224         returning a gdb::unique_xmalloc_ptr.
225         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
226         * stack.c (find_frame_funname): Adjust to cp_remove_params
227         returning a gdb::unique_xmalloc_ptr.
228
229 2017-10-08  Tom Tromey  <tom@tromey.com>
230
231         * dwarf2read.c (dwarf2_get_dwz_file): Use
232         gdb::unique_xmalloc_ptr.
233         (find_slot_in_mapped_hash): Likewise.
234         (dwarf2_physname): Likewise.
235         (create_dwo_unit_in_dwp_v1): Use std::string.
236         (create_dwo_unit_in_dwp_v2): Likewise.
237         (lookup_dwo_cutu): Likewise.
238         (inherit_abstract_dies): Use std::vector.
239         (read_array_type): Likewise.
240         (dwarf_decode_macros): Remove unused declaration.
241         (unsigned_int_compar): Remove.
242         (dwarf2_build_psymtabs_hard): Use scoped_restore.
243         (psymtabs_addrmap_cleanup): Remove.
244
245 2017-10-08  Tom Tromey  <tom@tromey.com>
246
247         * frame-unwind.c (frame_unwind_try_unwinder): Update.
248         * frame.h (frame_cleanup_after_sniffer): Declare.
249         (frame_prepare_for_sniffer): Return void.
250         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
251         type of argument.
252         (frame_prepare_for_sniffer): Return void.
253
254 2017-10-08  Tom Tromey  <tom@tromey.com>
255
256         * utils.h (make_cleanup_value_free): Remove.
257         * utils.c (do_value_free, struct cleanup): Remove.
258         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
259         Use gdb_value_up.
260         * value.h (struct value_deleter): New.
261         (gdb_value_up): New typedef.
262
263 2017-10-08  Tom Tromey  <tom@tromey.com>
264
265         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
266         (make_cleanup_free_search_symbols): Remove.
267         (search_symbols): Return std::vector.
268         (symbol_search::compare_search_syms): Now member of
269         symbol_search.  Change arguments.
270         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
271         (symtab_symbol_info, rbreak_command): Update.
272         * symtab.h (struct symbol_search) <next>: Remove.
273         Add constructors.
274         (symbol_search::operator<): New function.
275         (symbol_search::operator==): New function.
276         (search_symbols): Remove std::vector.
277         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
278         (symbol_search::compare_search_syms): Declare.
279
280 2017-10-06  Yao Qi  <yao.qi@linaro.org>
281
282         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
283         arch/aarch64-insn.o.
284         Remove one rule.
285         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
286
287 2017-10-06  Yao Qi  <yao.qi@linaro.org>
288
289         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
290         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
291         arch/arm-linux.o respectively.
292         * configure.tgt: Likewise.
293
294 2017-10-06  Yao Qi  <yao.qi@linaro.org>
295
296         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
297         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
298
299 2017-10-06  Pedro Alves  <palves@redhat.com>
300
301         * windows-nat.c: Include <algorithm>.
302
303 2017-10-06  Yao Qi  <yao.qi@linaro.org>
304
305         * configure.tgt (i386_tobjs): New variable.
306         (amd64_tobjs): New variable.
307         Set $cpu_obs and $os_obs.
308
309 2017-10-06  Yao Qi  <yao.qi@linaro.org>
310
311         * Makefile.in (CONFIG_SRC_SUBDIR): New.
312         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
313         (clean): Remove object files and dependency files.
314         (distclean): Remove the directory.
315         * configure.ac: Invoke AC_CONFIG_COMMANDS.
316         * configure: Re-generated.
317         * configure.tgt: Replace amd64.o with arch/amd64.o.
318
319 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
320
321         PR build/22188
322         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
323         and SETEND.
324
325 2017-10-05  Pedro Alves  <palves@redhat.com>
326
327         * linux-nat.c (linux_child_follow_fork): When following the parent
328         and detaching the child, consult the parent thread's architecture
329         instead of the child's.
330
331 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
332
333         * ax.h: Do not include "doublest.h".
334         (union agent_val): Remove.
335
336 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
337
338         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
339         (decimal_to_string): Return std::string object.
340         (decimal_from_string): Accept std::string object.  Return bool.
341         (decimal_from_integral, decimal_from_doublest): Remove.
342         (decimal_from_longest): Add prototype.
343         (decimal_from_ulongest): Likewise.
344         (decimal_to_longest): Likewise.
345         (decimal_from_doublest): Likewise.
346         * dfp.c: Do not include "gdbtypes.h" or "value.h".
347         (MAX_DECIMAL_STRING): Move here.
348         (decimal_to_string): Return std::string object.
349         (decimal_from_string): Accept std::string object.  Return bool.
350         (decimal_from_integral): Remove, replace by ...
351         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
352         (decimal_to_longest): New function.
353         (decimal_from_floating): Remove, replace by ...
354         (decimal_from_doublest): ... this new function.
355         (decimal_to_doublest): Update to new decimal_to_string interface.
356
357         * value.c (unpack_long): Use decimal_to_longest.
358         * valops.c (value_cast): Use decimal_from_doublest instead of
359         decimal_from_floating.  Use decimal_from_[u]longest isntead of
360         decimal_from_integral.
361         * valarith.c (value_args_as_decimal): Likewise.
362         * valprint.c (print_decimal_floating): Update to new
363         decimal_to_string interface.
364         * printcmd.c (printf_decfloat): Likewise.
365         * c-exp.y (parse_number): Update to new decimal_from_string interface.
366
367 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
368
369         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
370         * gdbtypes.c: Include "floatformat.h".
371         * value.c: Likewise.
372         * m68k-tdep.c: Likewise.
373
374         * findvar.c: Do not include "floatformat.h".
375         * amd64-darwin-tdep.c: Likewise.
376         * arm-linux-tdep.c: Likewise.
377         * i386-darwin-tdep.c: Likewise.
378         * i387-tdep.c: Likewise.
379         * m68k-linux-tdep.c: Likewise.
380         * mep-tdep.c: Likewise.
381         * mips-tdep.c: Likewise.
382         * nios2-tdep.c: Likewise.
383         * s390-linux-tdep.c: Likewise.
384         * sparc-obsd-tdep.c: Likewise.
385         * sparc-tdep.c: Likewise.
386         * sparc64-tdep.c: Likewise.
387         * spu-tdep.c: Likewise.
388         * tic6x-tdep.c: Likewise.
389         * tilegx-tdep.c: Likewise.
390         * vax-tdep.c: Likewise.
391         * xstormy16-tdep.c: Likewise.
392         * xtensa-tdep.c: Likewise.
393
394         * top.c: Do not include "doublest.h".
395         * aarch64-tdep.c: Likewise.
396         * alpha-tdep.c: Likewise.
397         * arm-linux-tdep.c: Likewise.
398         * m68k-linux-tdep.c: Likewise.
399         * tilegx-tdep.c: Likewise.
400         * xstormy16-tdep.c: Likewise.
401
402 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
403
404         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
405         (mipsn32_fbsd_sigframe): Define.
406         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
407         for FreeBSD/mipsn32.
408
409 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
410
411         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
412         AT_HWCAP.
413
414 2017-10-05  Tristan Gingold  <tgingold@free.fr>
415
416         * MAINTAINERS (Misc): Update my email address.
417
418 2017-10-04  Pedro Alves  <palves@redhat.com>
419
420         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
421         it instead of target_gdbarch.
422         (get_remote_state, get_remote_packet_size): Adjust
423         get_remote_arch_state calls, passing down target_gdbarch
424         explicitly.
425         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
426         'gdbarch' and use it instead of target_gdbarch.
427         (get_memory_packet_size): Adjust get_remote_arch_state calls,
428         passing down target_gdbarch explicitly.
429         (struct stop_reply) <arch>: New field.
430         (remote_parse_stop_reply): Use the stopped thread's architecture,
431         not the current inferior's.  Save the architecture in the
432         stop_reply.
433         (process_stop_reply): Use the stop reply's architecture.
434         (process_g_packet, remote_fetch_registers)
435         (remote_prepare_to_store, store_registers_using_G)
436         (remote_store_registers): Adjust get_remote_arch_state calls,
437         using the regcache's architecture.
438         (remote_get_trace_status): Adjust get_remote_arch_state calls,
439         passing down target_gdbarch explicitly.
440         * spu-multiarch.c (spu_thread_architecture): Defer to the target
441         beneath instead of calling target_gdbarch.
442         * target.c (default_thread_architecture): Use the specified
443         inferior's architecture, instead of the current inferior's
444         architecture (via target_gdbarch).
445
446 2017-10-04  Pedro Alves  <palves@redhat.com>
447
448         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
449         case.
450         (regcache_print): Handle !target_has_registers here instead.
451
452 2017-10-04  Pedro Alves  <palves@redhat.com>
453
454         * frame.c (create_test_frame): Delete.
455         * frame.h (create_test_frame): Delete.
456         * gdbarch-selftests.c: Include gdbthread.h and target.h.
457         (class regcache_test): Delete.
458         (test_target_has_registers, test_target_has_stack)
459         (test_target_has_memory, test_target_prepare_to_store)
460         (test_target_store_registers): New functions.
461         (test_target_ops): New class.
462         (register_to_value_test): Error out if there's already a
463         process_stratum (or higher) target pushed.  Create a fuller mock
464         environment, with mock target_ops, inferior, address space, thread
465         and inferior_ptid.
466         * progspace.c (struct address_space): Move to ...
467         * progspace.h (struct address_space): ... here.
468         * regcache.h (regcache::~regcache, regcache::raw_write)
469         [GDB_SELF_TEST]: No longer virtual.
470
471 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
472
473         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
474
475 2017-10-04  Pedro Alves  <palves@redhat.com>
476
477         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
478         out of 'between TRY and CATCH'.
479
480 2017-10-04  Pedro Alves  <palves@redhat.com>
481
482         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
483         * common/common-exceptions.h (TRY): Open an outermost scope.
484         Expand intro comment.
485         (CATCH): Reindent.
486         (END_CATCH): Close the outermost scope.
487         * completer.c (complete_line_internal): Add missing END_CATCH.
488
489 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
490
491         * NEWS (Changes since GDB 8.0): Add entry about new
492         'set-cwd-on-gdbserver' feature.
493         (New remote packets): Add entry for QSetWorkingDir.
494         * common/common-inferior.h (set_inferior_cwd): New prototype.
495         * infcmd.c (set_inferior_cwd): Remove "static".
496         (show_cwd_command): Expand text to include remote debugging.
497         * remote.c: Add PACKET_QSetWorkingDir.
498         (remote_protocol_features) <QSetWorkingDir>: New entry for
499         PACKET_QSetWorkingDir.
500         (extended_remote_set_inferior_cwd): New function.
501         (extended_remote_create_inferior): Call
502         "extended_remote_set_inferior_cwd".
503         (_initialize_remote): Call "add_packet_config_cmd" for
504         QSetWorkingDir.
505
506 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
507
508         * NEWS (New commands): Mention "set/show cwd".
509         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
510         "cd" command's help text.
511         * common/common-inferior.h (get_inferior_cwd): New prototype.
512         * infcmd.c (inferior_cwd_scratch): New global variable.
513         (set_inferior_cwd): New function.
514         (get_inferior_cwd): Likewise.
515         (set_cwd_command): Likewise.
516         (show_cwd_command): Likewise.
517         (_initialize_infcmd): Add "set/show cwd" commands.
518         * inferior.h (class inferior) <cwd>: New field.
519         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
520         (fork_inferior): Change inferior's cwd before its execution.
521         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
522         to CreateProcess.
523
524 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
525
526         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
527         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
528         (COMMON_OBS): Add gdb_tilde_expand.o.
529         * common/gdb_tilde_expand.c: New file.
530         * common/gdb_tilde_expand.h: Likewise.
531
532 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
533
534         * gdbarch.sh (objfile): Remove duplicate declaration.
535         * gdbarch.h: Regenerate.
536
537 2017-10-03  Tom Tromey  <tom@tromey.com>
538
539         * utils.c (internal_vproblem): Use string_vprintf.
540
541 2017-10-03  Tom Tromey  <tom@tromey.com>
542
543         * printcmd.c (info_symbol_command): Use std::string.
544
545 2017-10-03  Tom Tromey  <tom@tromey.com>
546
547         * top.c (gdb_safe_append_history): Use std::string.
548
549 2017-10-03  Tom Tromey  <tom@tromey.com>
550
551         * event-top.c (stdin_event_handler): Update.
552         * main.c (captured_main_1): Update.
553         * top.h (make_delete_ui_cleanup): Remove.
554         (struct ui): Add constructor and destructor.
555         (new_ui, delete_ui): Remove.
556         * top.c (make_delete_ui_cleanup): Remove.
557         (new_ui_command): Use std::unique_ptr.
558         (delete_ui_cleanup): Remove.
559         (ui::ui): Rename from new_ui.  Update.
560         (free_ui): Remove.
561         (ui::~ui): Rename from delete_ui.  Update.
562
563 2017-10-03  Tom Tromey  <tom@tromey.com>
564
565         * symfile.c (load_progress): Use gdb::byte_vector.
566
567 2017-10-03  Tom Tromey  <tom@tromey.com>
568
569         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
570         declaration.
571         * printcmd.c (x_command): Remove unused declaration.
572         * symfile.c (symbol_file_command): Remove unused declaration.
573
574 2017-10-03  Tom Tromey  <tom@tromey.com>
575
576         * utils.c (internal_vproblem): Use std::string.
577         (defaulted_query): Likewise.
578
579 2017-10-03  Tom Tromey  <tom@tromey.com>
580
581         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
582         * top.c (execute_command_to_string): Update.
583         * utils.c (make_cleanup_restore_page_info): Remove.
584         (do_restore_page_info_cleanup): Remove.
585         (set_batch_flag_and_restore_page_info):
586         New.
587         (make_cleanup_restore_page_info): Remove.
588         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
589         (~set_batch_flag_and_restore_page_info): New
590         (make_cleanup_restore_uinteger): Remove.
591         (make_cleanup_restore_integer): Remove.
592         (struct restore_integer_closure): Remove.
593         (restore_integer): Remove.
594         * utils.h (struct set_batch_flag_and_restore_page_info): New
595         class.
596         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
597         (make_cleanup_restore_page_info): Remove.
598         (make_cleanup_restore_uinteger) Remove.
599         (make_cleanup_restore_integer) Remove.
600
601 2017-10-03  Tom Tromey  <tom@tromey.com>
602
603         * record-full.h (record_full_gdb_operation_disable_set): Return
604         scoped_restore_tmpl<int>.
605         * infrun.c (adjust_pc_after_break): Update.
606         (handle_signal_stop): Update.
607         * record-full.c (record_full_gdb_operation_disable_set): Return
608         scoped_restore_tmpl<int>.
609         (record_full_wait_1, record_full_insert_breakpoint)
610         (record_full_remove_breakpoint, record_full_save)
611         (record_full_goto_insn): Update.
612
613 2017-10-02  Tom Tromey  <tom@tromey.com>
614
615         PR rust/22236:
616         * rust-lang.c (rust_val_print_str): New function.
617         (val_print_struct): Call it.
618         (rust_subscript): Preserve name of slice type.
619
620 2017-10-02  Tom Tromey  <tom@tromey.com>
621
622         * rust-lang.c (rust_subscript): Handle slices in
623         EVAL_AVOID_SIDE_EFFECTS case.
624
625 2017-10-02  Tom Tromey  <tom@tromey.com>
626
627         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
628
629 2017-10-02  Tom Tromey  <tom@tromey.com>
630
631         * rust-lang.h (rust_slice_type): Add "extern".
632
633 2017-10-02  Tom Tromey  <tom@tromey.com>
634             Pedro Alves  <palves@redhat.com>
635
636         * ada-lang.h (ada_exc_info::operator<): Make const.
637         (ada_exc_info::operator==): Make const.
638         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
639         Make const.
640
641 2017-09-29  Tom Tromey  <tom@tromey.com>
642
643         * target.c (read_whatever_is_readable): Change type of "result".
644         Update.
645         (free_memory_read_result_vector): Remove.
646         (read_memory_robust): Change return type.  Update.
647         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
648         bin2hex, std::string.
649         * target.h (memory_read_result_s): Remove typedef.
650         (free_memory_read_result_vector): Remove.
651         (read_memory_robust): Return std::vector.
652
653 2017-09-29  Tom Tromey  <tom@tromey.com>
654
655         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
656
657 2017-09-29  Tom Tromey  <tom@tromey.com>
658
659         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
660         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
661         operator< and operator==.
662         (ada_exceptions_list): Return a std::vector.
663         * ada-lang.c (ada_exc_info::operator<): Rename from
664         compare_ada_exception_info.
665         (ada_exc_info::operator==): New.
666         (sort_remove_dups_ada_exceptions_list): Change type of
667         "exceptions".
668         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
669         (ada_add_global_exceptions): Likewise.
670         (ada_exceptions_list_1): Return a std::vector.
671         (ada_exceptions_list): Likewise.
672
673 2017-09-29  Tom Tromey  <tom@tromey.com>
674
675         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
676         'std::set *'.
677         (print_one_inferior): Update.
678         (free_vector_of_ints): Remove.
679         (list_available_thread_groups): Change "ids" to std::set.
680         (mi_cmd_list_thread_groups): Update.
681         (struct collect_cores_data) <core>: Now a std::set.
682         (collect_cores): Update.
683         (unique): Remove.
684         (print_one_inferior): Update.
685
686 2017-09-29  Tom Tromey  <tom@tromey.com>
687
688         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
689         (mi_execute_async_cli_command): Likewise.
690         (mi_cmd_trace_frame_collected): Use field_fmt.
691
692 2017-09-29  Tom Tromey  <tom@tromey.com>
693
694         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
695         gdb::byte_vector.
696
697 2017-09-29  Tom Tromey  <tom@tromey.com>
698
699         * mi/mi-parse.c (mi_parse): Remove unused declaration.
700
701 2017-09-29  Tom Tromey  <tom@tromey.com>
702
703         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
704
705 2017-09-29  Tom Tromey  <tom@tromey.com>
706
707         * varobj.h (varobj_gen_name): Return std::string.
708         * varobj.c (varobj_gen_name): Return std::string.
709         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
710         (mi_cmd_var_delete): Don't copy "name".
711
712 2017-09-29  Tom Tromey  <tom@tromey.com>
713
714         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
715         (mi_cmd_break_insert_1): Update.
716
717 2017-09-29  Tom Tromey  <tom@tromey.com>
718
719         * target.h (make_scoped_defer_target_commit_resume): Update.
720         * target.c (make_scoped_defer_target_commit_resume): Rename from
721         make_cleanup_defer_target_commit_resume.  Return a
722         scoped_restore.
723         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
724
725 2017-09-29  Tom Tromey  <tom@tromey.com>
726
727         * main.c (captured_main_1): Remove unused declaration.
728         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
729
730 2017-09-29  Tom Tromey  <tom@tromey.com>
731
732         * symtab.c (search_symbols): Remove unused outer cleanup.
733         (make_source_files_completion_list): Remove unused declaration.
734
735 2017-09-29  Tom Tromey  <tom@tromey.com>
736
737         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
738
739 2017-09-29  Tom Tromey  <tom@tromey.com>
740
741         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
742         gdb::byte_vector.
743
744 2017-09-29  Tom Tromey  <tom@tromey.com>
745
746         * complaints.c (vcomplaint): Use std::string.
747
748 2017-09-29  Tom Tromey  <tom@tromey.com>
749
750         * tracepoint.c (trace_variable_command): Use std::string.
751         (encode_actions_1): Remove unused declarations.
752         (create_tsv_from_upload): Use std::string.
753
754 2017-09-29  Tom Tromey  <tom@tromey.com>
755
756         * cp-support.c (gdb_demangle): Use std::string.
757
758 2017-09-29  Tom Tromey  <tom@tromey.com>
759
760         * stack.c (parse_frame_specification): Use std::string
761         (info_frame_command): Use gdb::unique_xmalloc_ptr.
762
763 2017-09-29  Tom Tromey  <tom@tromey.com>
764
765         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
766
767 2017-09-29  Tom Tromey  <tom@tromey.com>
768
769         * utils.c (vfprintf_maybe_filtered): Use std::string.
770         (vfprintf_unfiltered): Likewise.
771
772 2017-09-29  Tom Tromey  <tom@tromey.com>
773
774         * event-top.c (top_level_prompt): Return std::string.
775         (display_gdb_prompt): Update.
776
777 2017-09-29  Tom Tromey  <tom@tromey.com>
778
779         * unittests/common-utils-selftests.c (format): New function.
780         (string_vprintf_tests): New function.
781         (_initialize_common_utils_selftests): Register new tests.
782         * common/common-utils.c (string_vprintf): New function.
783         * common/common-utils.h (string_vprintf): Declare.
784
785 2017-09-29  Pedro Alves  <palves@redhat.com>
786
787         * common/rsp-low.c (unpack_varlen_hex): Constify.
788         * common/rsp-low.h (unpack_varlen_hex): Constify.
789         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
790         Constify.
791         * remote.c (remote_set_permissions, read_ptid)
792         (remote_current_thread, remote_get_threads_with_qthreadinfo)
793         (remote_static_tracepoint_marker_at)
794         (remote_static_tracepoint_markers_by_strid)
795         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
796         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
797         (parse_tracepoint_definition, parse_tsv_definition)
798         (parse_static_tracepoint_marker_definition): Constify.
799         * tracepoint.h (parse_static_tracepoint_marker_definition)
800         (parse_trace_status, parse_tracepoint_status)
801         (parse_tracepoint_definition, parse_tsv_definition): Constify.
802
803 2017-09-29  Pedro Alves  <palves@redhat.com>
804
805         * remote.c (target_buf, target_buf_size): Delete.
806         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
807         Use the connection's packet buffer instead.
808         All callers adjusted.
809         (_initialize_remote): Remove references to target_buf and
810         target_buf_size.
811
812 2017-09-28  Pedro Alves  <palves@redhat.com>
813
814         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
815         unittests/common-utils-selftests.c.
816         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
817         (COMMON_OBS): Remove utils-selftests.o.
818         * utils-selftests.c: Move to ...
819         * unittests/common-utils-selftests.c: ... here and rename self
820         test to "string_printf".
821
822 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
823
824         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
825         having NULL cus or tus.
826
827 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
828
829         * arm-tdep.c: (convert_from_extended): Remove.
830         (convert_to_extended): Likewise.
831         (arm_extract_return_value): Use convert_typed_floating.
832         (arm_store_return_value): Likewise.
833
834         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
835         * sh-tdep.c: Do not include "floatformat.h".
836         (sh_littlebyte_bigword_type): New function.
837         (sh_register_convert_to_virtual): Use convert_typed_floating.
838         (sh_register_convert_to_raw): Likewise.
839         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
840         (sh64_littlebyte_bigword_type): New function.
841         (sh64_extract_return_value): Use convert_typed_floating.
842         (sh64_register_convert_to_virtual): Likewise.
843         (sh64_register_convert_to_raw): Likewise.
844
845 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
846
847         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
848         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
849
850         * gdbtypes.h (union type_specific): Make field floatformat hold
851         just a single struct floatformat, not an array.
852         (floatformat_from_type): Move here.
853         * gdbtypes.c (floatformat_from_type): Move here.  Update to
854         changed TYPE_FLOATFORMAT definition.
855         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
856         (recursive_dump_type): Likewise.
857         (init_float_type): Install correct floatformat for byte order.
858         (arch_float_type): Likewise.
859
860 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
861
862         * gdbtypes.c (init_type): Change incoming argument from
863         length-in-bytes to length-in-bits.  Assert length is a
864         multiple of TARGET_CHAR_BITS.
865         (arch_type, arch_flags_type): Likewise.
866         (init_integer_type): Update call to init_type.
867         (init_character_type): Likewise.
868         (init_boolean_type): Likewise.
869         (init_float_type): Likewise.
870         (init_decfloat_type): Likewise.
871         (init_complex_type): Likewise.
872         (init_pointer_type): Likewise.
873         (objfile_type): Likewise.
874         (arch_integer_type): Update call to arch_type.
875         (arch_character_type): Likewise.
876         (arch_boolean_type): Likewise.
877         (arch_float_type): Likewise.
878         (arch_decfloat_type): Likewise.
879         (arch_complex_type): Likewise.
880         (arch_pointer_type): Likewise.
881         (gdbtypes_post_init): Likewise.
882
883         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
884         (read_base_type): Likewise.
885         * mdebugread.c (basic_type): Likewise.
886         * stabsread.c (dbx_init_float_type): Likewise.
887         (rs6000_builtin_type): Likewise.
888         (read_range_type): Likewise.  Also, fix call to init_integer_type
889         with erroneous length argument.
890
891         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
892         * d-lang.c (build_d_types): Likewise.
893         * f-lang.c (build_fortran_types): Likewise.
894         * go-lang.c (build_go_types): Likewise.
895         * opencl-lang.c (build_opencl_types): Likewise.
896         * jit.c (finalize_symtab): Likewise.
897         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
898         (build_std_type_info_type): Likewise.
899         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
900         update call to arch_flags_type.
901
902         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
903         arch_type.
904         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
905         * windows-tdep.c (windows_get_tlb_type): Likewise.
906
907         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
908         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
909         * m32c-tdep.c (make_types): Likewise.
910         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
911         (rl78_psw_type): Update call to arch_flags_type.
912         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
913         * rx-tdep.c (rx_psw_type): Likewise.
914         (rx_fpsw_type): Likewise.
915         * sparc-tdep.c (sparc_psr_type): Likewise.
916         (sparc_fsr_type): Likewise.
917         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
918         (sparc64_ccr_type): Likewise.
919         (sparc64_fsr_type): Likewise.
920         (sparc64_fprs_type): Likewise.
921
922 2017-09-27  Tom Tromey  <tom@tromey.com>
923
924         * findcmd.c (find_command): Constify.
925
926 2017-09-27  Tom Tromey  <tom@tromey.com>
927
928         * ada-tasks.c (task_command_1, task_command): Constify.
929
930 2017-09-27  Tom Tromey  <tom@tromey.com>
931
932         * symtab.c (maintenance_print_symbol_cache)
933         (maintenance_flush_symbol_cache)
934         (maintenance_print_symbol_cache_statistics): Constify.
935
936 2017-09-27  Tom Tromey  <tom@tromey.com>
937
938         * inferior.c (detach_inferior_command, kill_inferior_command)
939         (inferior_command): Constify.
940
941 2017-09-27  Tom Tromey  <tom@tromey.com>
942
943         * regcache.c (regcache_print, maintenance_print_registers)
944         (maintenance_print_raw_registers)
945         (maintenance_print_cooked_registers)
946         (maintenance_print_register_groups)
947         (maintenance_print_remote_registers): Constify.
948
949 2017-09-27  Tom Tromey  <tom@tromey.com>
950
951         * printcmd.c (map_display_numbers, undisplay_command)
952         (enable_disable_display_command, enable_display_command)
953         (disable_display_command): Constify.
954
955 2017-09-27  Tom Tromey  <tom@tromey.com>
956
957         * breakpoint.h (delete_command): Don't declare.
958         * breakpoint.c (delete_command, enable_once_command)
959         (enable_count_command, enable_delete_command, breakpoint_1)
960         (maintenance_info_breakpoints, stopin_command, stopat_command)
961         (delete_command, delete_trace_command, save_breakpoints)
962         (save_breakpoints_command, save_tracepoints_command): Constify.
963
964 2017-09-27  Tom Tromey  <tom@tromey.com>
965
966         * macrocmd.c (macro_expand_command, macro_expand_once_command)
967         (skip_ws, extract_identifier, macro_define_command)
968         (macro_undef_command, macro_list_command): Constify.
969
970 2017-09-27  Tom Tromey  <tom@tromey.com>
971
972         * infcmd.c (environment_info, set_environment_command)
973         (unset_environment_command, path_info, info_proc_cmd_1)
974         (info_proc_cmd_mappings, info_proc_cmd_stat)
975         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
976         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
977
978 2017-09-27  Tom Tromey  <tom@tromey.com>
979
980         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
981         Constify.
982
983 2017-09-27  Tom Tromey  <tom@tromey.com>
984
985         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
986
987 2017-09-27  Tom Tromey  <tom@tromey.com>
988
989         * demangle.c (demangle_command): Constify.
990
991 2017-09-27  Tom Tromey  <tom@tromey.com>
992
993         * progspace.c (maintenance_info_program_spaces_command):
994         Constify.
995
996 2017-09-27  Tom Tromey  <tom@tromey.com>
997
998         * compile/compile.c (check_raw_argument, compile_file_command)
999         (compile_code_command, compile_print_command): Constify.
1000
1001 2017-09-27  Tom Tromey  <tom@tromey.com>
1002
1003         * reggroups.c (maintenance_print_reggroups): Constify.
1004
1005 2017-09-27  Tom Tromey  <tom@tromey.com>
1006
1007         * dwarf2read.c (save_gdb_index_command): Constify.
1008
1009 2017-09-27  Tom Tromey  <tom@tromey.com>
1010
1011         * stap-probe.c (info_probes_stap_command): Constify.
1012
1013 2017-09-27  Tom Tromey  <tom@tromey.com>
1014
1015         * fork-child.c (unset_exec_wrapper_command): Constify.
1016
1017 2017-09-27  Tom Tromey  <tom@tromey.com>
1018
1019         * btrace.c (get_uint, get_context_size, no_chunk)
1020         (maint_btrace_packet_history_cmd)
1021         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1022         (maint_info_btrace_cmd): Constify.
1023
1024 2017-09-27  Tom Tromey  <tom@tromey.com>
1025
1026         * reverse.c (delete_bookmark_command): Constify.
1027
1028 2017-09-27  Tom Tromey  <tom@tromey.com>
1029
1030         * remote.c (set_memory_packet_size)
1031         (set_memory_write_packet_size, show_memory_write_packet_size)
1032         (set_memory_read_packet_size, show_memory_read_packet_size)
1033         (compare_sections_command, packet_command, remote_put_command)
1034         (remote_get_command, remote_delete_command): Constify.
1035
1036 2017-09-27  Tom Tromey  <tom@tromey.com>
1037
1038         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1039         (set_mipsfpu_double_command, set_mipsfpu_none_command)
1040         (set_mipsfpu_auto_command): Constify.
1041
1042 2017-09-27  Tom Tromey  <tom@tromey.com>
1043
1044         * cli/cli-cmds.h (cd_command): Constify.
1045         * cli/cli-cmds.c (cd_command): Constify.
1046
1047 2017-09-27  Tom Tromey  <tom@tromey.com>
1048
1049         * thread.c (thread_name_command, thread_find_command): Constify.
1050
1051 2017-09-27  Tom Tromey  <tom@tromey.com>
1052
1053         * probe.c (enable_probes_command, disable_probes_command):
1054         Constify.
1055
1056 2017-09-27  Tom Tromey  <tom@tromey.com>
1057
1058         * symfile.c (symbol_file_command): Constify.
1059         * gdbcore.h (deprecated_file_changed_hook): Constify.
1060         * exec.c (deprecated_file_changed_hook, exec_file_command)
1061         (file_command): Constify.
1062         * defs.h (symbol_file_command): Constify.
1063
1064 2017-09-27  Tom Tromey  <tom@tromey.com>
1065
1066         * remote-fileio.c (set_system_call_allowed)
1067         (show_system_call_allowed): Constify.
1068
1069 2017-09-27  Tom Tromey  <tom@tromey.com>
1070
1071         * tracepoint.c (delete_trace_variable_command)
1072         (tfind_end_command, tfind_start_command, tfind_pc_command)
1073         (tfind_tracepoint_command, tfind_line_command)
1074         (tfind_range_command, tfind_outside_command): Constify.
1075
1076 2017-09-27  Tom Tromey  <tom@tromey.com>
1077
1078         * ax-gdb.c (maint_agent_printf_command, agent_command)
1079         (agent_eval_command): Constify.
1080
1081 2017-09-27  Tom Tromey  <tom@tromey.com>
1082
1083         * tracepoint.c (info_scope_command): Constify.
1084         * python/python.c (gdbpy_decode_line): Constify.
1085         * python/py-breakpoint.c (bppy_init): Constify.
1086         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1087         * location.h: (new_linespec_location)
1088         (string_to_event_location_basic, string_to_event_location):
1089         Constify.
1090         * location.c (new_linespec_location)
1091         (string_to_event_location_basic, string_to_event_location):
1092         Constify.
1093         * linespec.h (decode_line_with_current_source)
1094         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1095         * linespec.c (linespec_lex_to_end)
1096         (decode_line_with_current_source)
1097         (decode_line_with_last_displayed): Constify.
1098         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1099         Constify.
1100         * cli/cli-cmds.c (edit_command, list_command): Constify.
1101         * breakpoint.h (until_break_command, watch_command_wrapper)
1102         (awatch_command_wrapper, rwatch_command_wrapper)
1103         (init_ada_exception_breakpoint): Constify.
1104         * breakpoint.c (break_command_1, dprintf_command)
1105         (break_range_command, watch_command_wrapper)
1106         (rwatch_command_wrapper, awatch_command_wrapper)
1107         (until_break_command, init_ada_exception_breakpoint)
1108         (strace_marker_create_sals_from_location, trace_command)
1109         (ftrace_command, strace_command, struct tracepoint): Constify.
1110         * ax-gdb.c (agent_command_1): Constify.
1111         * ada-lang.c (ada_exception_sal): Constify.
1112
1113 2017-09-27  Tom Tromey  <tom@tromey.com>
1114
1115         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1116         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1117         (get_context_size, no_chunk, get_insn_history_modifiers)
1118         (cmd_record_insn_history, get_call_history_modifiers)
1119         (cmd_record_call_history): Constify.
1120
1121 2017-09-27  Tom Tromey  <tom@tromey.com>
1122
1123         * source.c (show_substitute_path_command)
1124         (unset_substitute_path_command, set_substitute_path_command):
1125         Constify.
1126
1127 2017-09-27  Tom Tromey  <tom@tromey.com>
1128
1129         * typeprint.c (maintenance_print_type): Constify.
1130         * maint.c (maintenance_dump_me, maintenance_demangle)
1131         (maintenance_time_display, maintenance_info_sections)
1132         (maintenance_print_statistics, maintenance_deprecate)
1133         (maintenance_undeprecate): Constify.
1134         (maintenance_do_deprecate): Constify.  Use std::string.
1135         (maintenance_selftest): Constify.
1136         * gdbtypes.h (maintenance_print_type): Constify.
1137
1138 2017-09-27  Tom Tromey  <tom@tromey.com>
1139
1140         * hppa-tdep.c (unwind_command): Constify.
1141
1142 2017-09-27  Tom Tromey  <tom@tromey.com>
1143
1144         * target-descriptions.c (unset_tdesc_filename_cmd)
1145         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1146         Constify.
1147
1148 2017-09-27  Tom Tromey  <tom@tromey.com>
1149
1150         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1151
1152 2017-09-27  Tom Tromey  <tom@tromey.com>
1153
1154         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1155
1156 2017-09-27  Tom Tromey  <tom@tromey.com>
1157
1158         * tui/tui-regs.c (tui_reg_command): Constify.
1159
1160 2017-09-27  Tom Tromey  <tom@tromey.com>
1161
1162         * skip.c (skip_file_command, skip_function_command)
1163         (skip_enable_command, skip_disable_command, skip_delete_command):
1164         Constify.
1165
1166 2017-09-27  Tom Tromey  <tom@tromey.com>
1167
1168         * record-btrace.c (cmd_record_btrace_bts_start)
1169         (cmd_record_btrace_pt_start): Constify.
1170
1171 2017-09-27  Tom Tromey  <tom@tromey.com>
1172
1173         * symmisc.c (maintenance_print_symbols)
1174         (maintenance_print_msymbols, maintenance_print_objfiles)
1175         (maintenance_info_symtabs, maintenance_check_symtabs)
1176         (maintenance_expand_symtabs, maintenance_info_line_tables):
1177         Constify.
1178
1179 2017-09-27  Tom Tromey  <tom@tromey.com>
1180
1181         * top.c (new_ui_command): Constify.
1182
1183 2017-09-27  Tom Tromey  <tom@tromey.com>
1184
1185         * symfile.c (add_symbol_file_command)
1186         (remove_symbol_file_command, list_overlays_command)
1187         (map_overlay_command, unmap_overlay_command)
1188         (overlay_auto_command, overlay_manual_command)
1189         (overlay_off_command, overlay_load_command): Constify.
1190
1191 2017-09-27  Tom Tromey  <tom@tromey.com>
1192
1193         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1194         (info_spu_mailbox_command, info_spu_dma_command)
1195         (info_spu_proxydma_command): Constify.
1196
1197 2017-09-27  Tom Tromey  <tom@tromey.com>
1198
1199         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1200
1201 2017-09-27  Tom Tromey  <tom@tromey.com>
1202
1203         * cli/cli-script.c (user_defined_command): Constify.
1204
1205 2017-09-27  Tom Tromey  <tom@tromey.com>
1206
1207         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1208         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1209         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1210         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1211         (dump_binary_value, append_binary_memory, append_binary_value):
1212         Constify.
1213         (struct dump_context) <func>: Constify.
1214         (add_dump_command): Update.
1215
1216 2017-09-27  Tom Tromey  <tom@tromey.com>
1217
1218         * cli/cli-cmds.c (show_version, show_configuration)
1219         (source_command, show_user): Constify.
1220
1221 2017-09-27  Tom Tromey  <tom@tromey.com>
1222
1223         * target.c (maintenance_print_target_stack): Constify.
1224
1225 2017-09-27  Tom Tromey  <tom@tromey.com>
1226
1227         * interps.c (interpreter_exec_cmd): Constify.
1228
1229 2017-09-27  Tom Tromey  <tom@tromey.com>
1230
1231         * record-full.c (cmd_record_full_restore): Constify.
1232
1233 2017-09-27  Tom Tromey  <tom@tromey.com>
1234
1235         * memattr.c (enable_mem_command, disable_mem_command)
1236         (delete_mem_command): Constify.
1237
1238 2017-09-27  Tom Tromey  <tom@tromey.com>
1239
1240         * value.c (show_convenience): Constify.
1241
1242 2017-09-27  Tom Tromey  <tom@tromey.com>
1243
1244         * gdbcore.h (core_file_command): Update.
1245         * corefile.c (core_file_command): Constify.
1246
1247 2017-09-27  Tom Tromey  <tom@tromey.com>
1248
1249         * user-regs.c (maintenance_print_user_registers): Constify.
1250
1251 2017-09-27  Tom Tromey  <tom@tromey.com>
1252
1253         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1254
1255 2017-09-27  Tom Tromey  <tom@tromey.com>
1256
1257         * cp-support.c (first_component_command): Constify.
1258
1259 2017-09-27  Tom Tromey  <tom@tromey.com>
1260
1261         * psymtab.c (maintenance_print_psymbols)
1262         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1263         Constify.
1264
1265 2017-09-27  Tom Tromey  <tom@tromey.com>
1266
1267         * windows-tdep.c (display_tib): Constify.
1268
1269 2017-09-27  Tom Tromey  <tom@tromey.com>
1270
1271         * linux-fork.c (delete_checkpoint_command)
1272         (detach_checkpoint_command): Constify.
1273
1274 2017-09-27  Tom Tromey  <tom@tromey.com>
1275
1276         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1277
1278 2017-09-27  Tom Tromey  <tom@tromey.com>
1279
1280         * arc-tdep.c (dump_arc_instruction_command): Constify.
1281
1282 2017-09-27  Tom Tromey  <tom@tromey.com>
1283
1284         * valprint.c (set_radix, show_radix): Constify.
1285
1286 2017-09-27  Tom Tromey  <tom@tromey.com>
1287
1288         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1289
1290 2017-09-27  Tom Tromey  <tom@tromey.com>
1291
1292         * command.h (not_just_help_class_command): Update.
1293         * cli/cli-decode.h (not_just_help_class_command): Update.
1294         * cli/cli-decode.c (not_just_help_class_command): Constify.
1295
1296 2017-09-27  Tom Tromey  <tom@tromey.com>
1297
1298         * gdb_bfd.c (maintenance_info_bfds): Constify.
1299
1300 2017-09-27  Tom Tromey  <tom@tromey.com>
1301
1302         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1303         overloads.
1304         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1305         (do_const_cfunc): New function.
1306         (cmd_cfunc_eq): New overload.
1307         (cli_user_command_p): Check do_const_cfunc.
1308         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1309         const_cfunc.
1310         * command.h (add_cmd): Add const overload and no-function
1311         overload.
1312         (set_cmd_cfunc): Add const overload.
1313         (cmd_const_cfunc_ftype): Declare.
1314         (cmd_cfunc_eq): Add const overload.
1315         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1316         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1317         overload.
1318
1319 2017-09-27  Tom Tromey  <tom@tromey.com>
1320
1321         * macroexp.c (get_next_token_for_substitution): New function.
1322         (substitute_args): Call it.  Check for __VA_OPT__.
1323
1324 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1325             Pedro Alves <palves@redhat.com>
1326
1327         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1328         producer_is_icc_lt_14.
1329         (producer_is_icc_lt_14): New function.
1330         (check_producer): Add code for checking version of ICC.
1331         (producer_is_icc): Move to producer.c.
1332         (read_structure_type): Restrict ICC workaround to ICC<14.
1333         * producer.c: Include selftest.h.
1334         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1335         New functions.
1336         * producer.h (producer_is_icc): New declaration.
1337
1338 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1339
1340         * Makefile.in (SFILES): Add producer.c.
1341         (COMMON_OBS): Add producer.o
1342         * amd64-tdep.c (producer.h): Add new include.
1343         * dwarf2read.c (producer.h): Add new include.
1344         * producer.c: New file.
1345         * producer.h: New file.
1346         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1347         producer.c.
1348         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1349         producer.h.
1350
1351 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1352
1353         * configure.ac: Search ncursesw before ncurses.
1354         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1355         * gdb_curses.h: Include <ncursesw/ncurses.h>
1356         * config.in, configure: Regenerate.
1357
1358 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1359
1360         PR gdb/22185
1361         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1362         obsolete.
1363         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1364         Remove i386sol2 support.
1365         * configure.nat <i386sol2>: Remove.
1366         <sol2-64>: Fold into ...
1367         <sol2>: ... this.
1368         Move common settings to default section.
1369         Add sol-thread.o.
1370         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1371         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1372         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1373         <i[34567]86-*-solaris*>: Remove.
1374         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1375
1376         * configure.ac: Remove wctype in libw check.
1377         (_MSE_INT_H): Don't define on Solaris 7-9.
1378         <solaris*>: Remove libthread_db.so.1 check.
1379         * configure: Regenerate.
1380         * config.in: Regenerate.
1381
1382         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1383         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1384         (gdb_ps_size_t): Remove.
1385         Use base types in users.
1386         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1387
1388         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1389
1390 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1391
1392         PR build/22206
1393         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1394         (adi_is_addr_mapped): Likewise.
1395         (PSR_ICC): Don't redefine.
1396         (PSR_IMPL): Likewise.
1397
1398 2017-09-25  Tom Tromey  <tom@tromey.com>
1399
1400         * regcache.c (regcache::dump): Use string_printf.
1401
1402 2017-09-25  Tom Tromey  <tom@tromey.com>
1403
1404         * regcache.c (class regcache_invalidator): New.
1405         (struct register_to_invalidate): Remove.
1406         (make_cleanup_regcache_invalidate): Remove.
1407         (regcache::raw_write): Use regcache_invalidator.
1408
1409 2017-09-25  Tom Tromey  <tom@tromey.com>
1410
1411         * spu-tdep.c (spu2ppu_sniffer): Update.
1412         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1413         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1414         Remove.
1415         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1416         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1417         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1418         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1419         (frame_pop): Update.
1420
1421 2017-09-25  Tom Tromey  <tom@tromey.com>
1422
1423         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1424         * regcache.h (regcache_xfree): Don't declare.
1425         * regcache.c (regcache_xfree): Remove.
1426         (do_regcache_xfree): Use delete.
1427         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1428         * linux-fork.c (free_fork): Use delete.
1429         (fork_save_infrun_state): Likewise.
1430         * jit.c (jit_dealloc_cache): Use delete.
1431         * infrun.c (discard_infcall_suspend_state): Use delete.
1432
1433 2017-09-25  Tom Tromey  <tom@tromey.com>
1434
1435         * regcache.h (regcache_xmalloc): Don't declare.
1436         (regcache_raw_set_cached_value): Update comment.
1437         * regcache.c (regcache_xmalloc): Remove.
1438         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1439         * jit.c (jit_frame_sniffer): Use new.
1440         * frame.c (frame_save_as_regcache): Use new.
1441
1442 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1443
1444         * NEWS: Advertise support for guarded-storage registers on IBM z.
1445
1446 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1447
1448         * s390-linux-nat.c (have_regset_gs): New static variable.
1449         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1450         control block and guarded-storage broadcast control regsets.
1451         (s390_read_description): Detect whether the target has
1452         guarded-storage support, return appropriate tdesc.
1453         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1454         (features/s390x-gs-linux64.c): Likewise.
1455         (struct gdbarch_tdep) <have_gs>: New field.
1456         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1457         (s390_gsbc_regset): New variables.
1458         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1459         and s390_gsbc_regset, if applicable.
1460         (s390_core_read_description): Check whether core file was from a
1461         target with guarded-storage support; include appropriate regsets.
1462         (s390_gdbarch_init): Add registers for guarded-storage support.
1463         (_initialize_s390_tdep): Initialize new target descriptions that
1464         include registers for guarded-storage support.
1465         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1466         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1467         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1468         (S390_NUM_REGS): Adjust macro definition.
1469         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1470         (tdesc_s390x_gs_linux64): New declarations.
1471
1472 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1473
1474         * features/s390-gs-linux64.xml: New file.
1475         * features/s390-gs.xml: New file.
1476         * features/s390-gsbc.xml: New file.
1477         * features/s390x-gs-linux64.xml: New file.
1478         * features/Makefile (WHICH): Add s390-gs-linux64 and
1479         s390x-gs-linux64.
1480         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1481         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1482         * features/s390-gs-linux64.c: New generated file.
1483         * features/s390x-gs-linux64.c: New file.
1484         * regformats/s390-gs-linux64.dat: New file.
1485         * regformats/s390x-gs-linux64.dat: New file.
1486
1487 2017-09-23  Tom Tromey  <tom@tromey.com>
1488
1489         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1490
1491 2017-09-22  Tom Tromey  <tom@tromey.com>
1492
1493         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1494         type to scoped_restore_tmpl.
1495         <scoped_input_handler>: Initialize m_quit_handler directly.
1496
1497 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1498
1499         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1500         (cd_command): Likewise.  Free "current_directory" before
1501         assigning to it.
1502         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1503         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1504         * top.c (gdb_dirbuf): Remove global declaration.
1505         * top.h (gdb_dirbuf): Likewise.
1506
1507 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1508
1509         * gnulib/aclocal.m4: Regenerate.
1510         * gnulib/config.in: Regenerate.
1511         * gnulib/configure: Regenerate.
1512         * gnulib/import/Makefile.am: Regenerate.
1513         * gnulib/import/Makefile.in: Regenerate.
1514         * gnulib/import/assure.h: New file.
1515         * gnulib/import/at-func.c: Likewise
1516         * gnulib/import/chdir-long.c: New file.
1517         * gnulib/import/chdir-long.h: New file.
1518         * gnulib/import/cloexec.c: New file.
1519         * gnulib/import/cloexec.h: New file.
1520         * gnulib/import/close.c: New file.
1521         * gnulib/import/closedir.c: New file.
1522         * gnulib/import/dirent-private.h: New file.
1523         * gnulib/import/dup-safer.c: New file.
1524         * gnulib/import/dup.c: New file.
1525         * gnulib/import/dup2.c: New file.
1526         * gnulib/import/error.c: New file.
1527         * gnulib/import/error.h: New file.
1528         * gnulib/import/exitfail.c: New file.
1529         * gnulib/import/exitfail.h: New file.
1530         * gnulib/import/fchdir.c: New file.
1531         * gnulib/import/fcntl.c: New file.
1532         * gnulib/import/fcntl.in.h: New file.
1533         * gnulib/import/fd-hook.c: New file.
1534         * gnulib/import/fd-hook.h: New file.
1535         * gnulib/import/fd-safer.c: New file.
1536         * gnulib/import/fdopendir.c: New file.
1537         * gnulib/import/filename.h: New file.
1538         * gnulib/import/filenamecat-lgpl.c: New file.
1539         * gnulib/import/filenamecat.h: New file.
1540         * gnulib/import/fstat.c: New file.
1541         * gnulib/import/fstatat.c: New file.
1542         * gnulib/import/getcwd-lgpl.c: New file.
1543         * gnulib/import/getcwd.c: New file.
1544         * gnulib/import/getdtablesize.c: New file.
1545         * gnulib/import/getlogin_r.c: New file.
1546         * gnulib/import/getprogname.c: New file.
1547         * gnulib/import/getprogname.h: New file.
1548         * gnulib/import/gettext.h: New file.
1549         * gnulib/import/glob-libc.h: New file.
1550         * gnulib/import/glob.c: New file.
1551         * gnulib/import/glob.in.h: New file.
1552         * gnulib/import/intprops.h: New file.
1553         * gnulib/import/m4/chdir-long.m4: New file.
1554         * gnulib/import/m4/close.m4: New file.
1555         * gnulib/import/m4/closedir.m4: New file.
1556         * gnulib/import/m4/d-ino.m4: New file.
1557         * gnulib/import/m4/d-type.m4: New file.
1558         * gnulib/import/m4/dup.m4: New file.
1559         * gnulib/import/m4/dup2.m4: New file.
1560         * gnulib/import/m4/error.m4: New file.
1561         * gnulib/import/m4/fchdir.m4: New file.
1562         * gnulib/import/m4/fcntl.m4: New file.
1563         * gnulib/import/m4/fcntl_h.m4: New file.
1564         * gnulib/import/m4/fdopendir.m4: New file.
1565         * gnulib/import/m4/filenamecat.m4: New file.
1566         * gnulib/import/m4/fstat.m4: New file.
1567         * gnulib/import/m4/fstatat.m4: New file.
1568         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1569         * gnulib/import/m4/getcwd-path-max.m4: New file.
1570         * gnulib/import/m4/getcwd.m4: New file.
1571         * gnulib/import/m4/getdtablesize.m4: New file.
1572         * gnulib/import/m4/getlogin_r.m4: New file.
1573         * gnulib/import/m4/getprogname.m4: New file.
1574         * gnulib/import/m4/glob.m4: New file.
1575         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1576         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1577         * gnulib/import/m4/mempcpy.m4: New file.
1578         * gnulib/import/m4/memrchr.m4: New file.
1579         * gnulib/import/m4/mode_t.m4: New file.
1580         * gnulib/import/m4/msvc-inval.m4: New file.
1581         * gnulib/import/m4/msvc-nothrow.m4: New file.
1582         * gnulib/import/m4/open.m4: New file.
1583         * gnulib/import/m4/openat.m4: New file.
1584         * gnulib/import/m4/opendir.m4: New file.
1585         * gnulib/import/m4/readdir.m4: New file.
1586         * gnulib/import/m4/realloc.m4: New file.
1587         * gnulib/import/m4/rewinddir.m4: New file.
1588         * gnulib/import/m4/save-cwd.m4: New file.
1589         * gnulib/import/m4/strdup.m4: New file.
1590         * gnulib/import/m4/strerror.m4: New file.
1591         * gnulib/import/m4/unistd-safer.m4: New file.
1592         * gnulib/import/mempcpy.c: New file.
1593         * gnulib/import/memrchr.c: New file.
1594         * gnulib/import/msvc-inval.c: New file.
1595         * gnulib/import/msvc-inval.h: New file.
1596         * gnulib/import/msvc-nothrow.c: New file.
1597         * gnulib/import/msvc-nothrow.h: New file.
1598         * gnulib/import/open.c: New file.
1599         * gnulib/import/openat-die.c: New file.
1600         * gnulib/import/openat-priv.h: New file.
1601         * gnulib/import/openat-proc.c: New file.
1602         * gnulib/import/openat.c: New file.
1603         * gnulib/import/openat.h: New file.
1604         * gnulib/import/opendir.c: New file.
1605         * gnulib/import/pipe-safer.c: New file.
1606         * gnulib/import/readdir.c: New file.
1607         * gnulib/import/realloc.c: New file.
1608         * gnulib/import/rewinddir.c: New file.
1609         * gnulib/import/save-cwd.c: New file.
1610         * gnulib/import/save-cwd.h: New file.
1611         * gnulib/import/strdup.c: New file.
1612         * gnulib/import/strerror-override.c: New file.
1613         * gnulib/import/strerror-override.h: New file.
1614         * gnulib/import/strerror.c: New file.
1615         * gnulib/import/unistd--.h: New file.
1616         * gnulib/import/unistd-safer.h: New file.
1617         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1618         "getcwd" and "glob".
1619         * ser-tcp.c: Undefine "close" before redefining it.
1620
1621 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1622
1623         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1624         get rid of res_val.
1625
1626 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1627
1628         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1629         <sol2,sparc>: Likewise.
1630         <sol2-64,i386>: Likewise.
1631
1632         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1633         -Wdeprecated-declarations on *-*-solaris*.
1634         * configure: Regenerate.
1635
1636         * procfs.c: Include "nat/inferior.h".
1637         (procfs_info_proc): Fix typo.
1638
1639 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1640
1641         * remote.c (vector): Include.
1642         (struct private_thread_info): Add field, thread_handle.
1643         (free_private_thread_info): Deallocate storage associated with
1644         thread handle.
1645         (get_private_info_thread): Initialize `thread_handle' field.
1646         (struct thread_item): Add field, thread_handle.
1647         (clear_threads_listing_context): Deallocate storage associated
1648         with thread handle.
1649         (start_thread): Add support for "handle" attribute.
1650         (thread_attributes): Add "handle".
1651         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1652         field.
1653         (remote_update_thread_list): Update thread_handle.
1654         (remote_thread_handle_to_thread_info): New function.
1655         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1656
1657 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1658
1659         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1660         function.
1661         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1662         * python/python-internal.h (thread_object_type): Declare.
1663
1664 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1665
1666         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1667         (target_thread_handle_to_thread_info): Declare.
1668         * target.c (target_thread_handle_to_thread_info): New function.
1669         * target-delegates.c: Regenerate.
1670         * gdbthread.h (find_thread_by_handle): Declare.
1671         * thread.c (find_thread_by_handle): New function.
1672         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1673         function.
1674         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1675
1676 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1677
1678         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1679
1680 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1681
1682         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1683
1684 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1685
1686         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1687         to gdb_target_obs.
1688
1689 2017-09-20  Tom Tromey  <tom@tromey.com>
1690
1691         * breakpoint.c (struct counted_command_line): Remove.
1692         (breakpoint_commands): Update.
1693         (alloc_counted_command_line, incref_counted_command_line)
1694         (decref_counted_command_line, do_cleanup_counted_command_line)
1695         (make_cleanup_decref_counted_command_line): Remove.
1696         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1697         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1698         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1699         (save_breakpoints): Update.
1700         * breakpoint.h (counted_command_line): Now a typedef to
1701         shared_ptr.
1702         (struct breakpoint) <commands>: Now a counted_command_line.
1703         (struct bpstats) <command>: Likewise.
1704
1705 2017-09-20  Tom Tromey  <tom@tromey.com>
1706
1707         * breakpoint.c (struct commands_info, do_map_commands_command):
1708         Remove.
1709         (commands_command_1): Update.
1710         (iterate_over_related_breakpoints): Take a function_view.
1711         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1712         (delete_command): Update.
1713         (map_breakpoint_numbers): Take a function_view.
1714         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1715         (disable_command): Update.
1716         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1717         (enable_command): Update.
1718         (struct disp_data, do_enable_breakpoint_disp)
1719         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1720         (do_map_enable_delete_breakpoint): Remove.
1721         (enable_once_command, enable_count_command, enable_delete_command)
1722         (delete_trace_variable_command): Update.
1723
1724 2017-09-20  Tom Tromey  <tom@tromey.com>
1725
1726         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1727         (bpstat_clear): Use delete.
1728         (bpstats): New constructors.
1729         (bpstat_copy, bpstat_stop_status): Use new.
1730         (dprintf_after_condition_true): Update.
1731         * breakpoint.h (bpstats::bpstats): Add constructors.
1732         (bpstats::~bpstats): Add destructor.
1733
1734 2017-09-20  Pedro Alves  <palves@redhat.com>
1735
1736         * eval.c (make_params): Delete, refactored as ...
1737         (class fake_method): ... this new type's ctor.
1738         (fake_method::~fake_method): New.
1739         (evaluate_subexp_standard): Use 'fake_method'.
1740
1741 2017-09-20  Tom Tromey  <tom@tromey.com>
1742
1743         * windows-nat.c (get_windows_debug_event, windows_wait)
1744         (do_initial_windows_stuff, windows_attach): Update.
1745         * utils.c (vwarning, internal_vproblem): Update.
1746         (ui_unregister_input_event_handler_cleanup)
1747         (prepare_to_handle_input): Remove.
1748         (class scoped_input_handler): New.
1749         (defaulted_query, prompt_for_continue): Update.
1750         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1751         Update.
1752         * top.c (undo_terminal_modifications_before_exit): Update.
1753         * target/target.h (target_terminal_init, target_terminal_inferior)
1754         (target_terminal_ours): Don't declare.
1755         (class target_terminal): New.
1756         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1757         (target_terminal_ours_for_output)
1758         (make_cleanup_restore_target_terminal): Don't declare.
1759         (target_terminal_info): Remove.
1760         * target.c (enum terminal_state, terminal_state): Remove.
1761         (target_terminal::terminal_state): Define.
1762         (target_terminal::init): Rename from target_terminal_init.
1763         (target_terminal::inferior): Rename from
1764         target_terminal_inferior.
1765         (target_terminal::ours): Rename from target_terminal_ours.
1766         (target_terminal::ours_for_output): Rename from
1767         target_terminal_ours_for_output.
1768         (target_terminal::info): New method.
1769         (cleanup_restore_target_terminal)
1770         (make_cleanup_restore_target_terminal): Remove.
1771         * solib.c (handle_solib_event): Update.
1772         * remote.c (remote_serial_quit_handler): Update.
1773         (remote_terminal_inferior, remote_wait_as): Update.
1774         * record-full.c (record_full_wait_1): Update.
1775         * nto-procfs.c (procfs_create_inferior): Update.
1776         * nat/fork-inferior.c (startup_inferior): Update.
1777         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1778         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1779         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1780         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1781         (mi_breakpoint_created, mi_breakpoint_deleted)
1782         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1783         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1784         (mi_user_selected_context_changed, report_initial_inferior):
1785         Update.
1786         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1787         (linux_nat_terminal_inferior): Update.
1788         * infrun.c (follow_fork_inferior)
1789         (handle_vfork_child_exec_or_exit, do_target_resume)
1790         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1791         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1792         Update.
1793         * inflow.c (child_terminal_init, info_terminal_command): Update.
1794         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1795         (attach_command): Update.
1796         * infcall.c (call_thread_fsm_should_stop): Update.
1797         * gnu-nat.c (gnu_attach): Update.
1798         * extension.c (struct active_ext_lang_state)
1799         (restore_active_ext_lang): Update.
1800         * exceptions.c (print_flush): Update.
1801         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1802         (struct quit_handler_cleanup_data, restore_quit_handler)
1803         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1804         Remove.
1805         * cp-support.c (gdb_demangle): Update.
1806         * breakpoint.c (update_inserted_breakpoint_locations)
1807         (insert_breakpoint_locations, handle_jit_event)
1808         (disable_breakpoints_in_unloaded_shlib): Update.
1809         * annotate.c (annotate_breakpoints_invalid)
1810         (annotate_frames_invalid): Update.
1811
1812 2017-09-20  Tom Tromey  <tom@tromey.com>
1813
1814         * main.c (catch_command_errors): Rename from
1815         catch_command_errors_const.
1816         (captured_main_1): Update.
1817
1818 2017-09-20  Pedro Alves  <palves@redhat.com>
1819
1820         * cli/cli-cmds.c (list_command): Use print_sal_location.
1821         (print_sal_location): New function.
1822         (ambiguous_line_spec): Use print_sal_location.
1823         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1824         * symtab.c (find_function_start_sal): Likewise.
1825         * symtab.h (symtab_and_line::symbol): New field.
1826
1827 2017-09-20  Pedro Alves  <palves@redhat.com>
1828
1829         * linespec.c (minsym_found): Handle non-text minsyms.
1830         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1831
1832 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1833
1834         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1835         backslash.
1836
1837 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1838
1839         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1840         vmovups instead vmovaps.
1841         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1842
1843 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1844
1845         * NEWS (Changes since GDB 8.0): Add starti.
1846         * infcmd.c (enum run_break): New.
1847         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1848         case.
1849         (run_command): Use enum run_how.
1850         (start_command): Likewise.
1851         (starti_command): New function.
1852         (RUN_ARGS_HELP): New macro.
1853         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1854         commands.  Add starti command.
1855
1856 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1857
1858         * Makefile.in (monitor.o): Remove the rule.
1859
1860 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1861
1862         * annotate.h (struct annotate_arg_emitter): Use
1863         DISABLE_COPY_AND_ASSIGN.
1864         * common/refcounted-object.h (refcounted_object): Likewise.
1865         * completer.h (struct completion_result): Likewise.
1866         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1867         * filename-seen-cache.h (filename_seen_cache): Likewise.
1868         * gdbcore.h (thread_section_name): Likewise.
1869         * gdb_regex.h (compiled_regex): Likewise.
1870         * gdbthread.h (scoped_restore_current_thread): Likewise.
1871         * inferior.h (scoped_restore_current_inferior): Likewise.
1872         * jit.c (jit_reader): Likewise.
1873         * linespec.h (struct linespec_result): Likewise.
1874         * mi/mi-parse.h (struct mi_parse): Likewise.
1875         * nat/fork-inferior.c (execv_argv): Likewise.
1876         * progspace.h (scoped_restore_current_program_space): Likewise.
1877         * python/python-internal.h (class gdbpy_enter): Likewise.
1878         * regcache.h (regcache): Likewise.
1879         * target-descriptions.c (struct tdesc_reg): Likewise.
1880         (struct tdesc_type): Likewise.
1881         (struct tdesc_feature): Likewise.
1882         * ui-out.h (ui_out_emit_type): Likewise.
1883
1884 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1885
1886         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1887         label abort_expression.
1888
1889 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1890
1891         * common/buffer.c (buffer_xml_printf): Adjust.
1892         * common/xml-utils.c (xml_escape_text): Change return type to
1893         std::string, update code accordingly.
1894         * common/xml-utils.h (xml_escape_text): Change return type to
1895         std::string.
1896         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1897         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1898         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1899         Adjust.
1900
1901 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1902
1903         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1904         (SUBDIR_UNITTESTS_OBS): Add new object file.
1905         * unittests/xml-utils-selftests.c: New file.
1906
1907 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1908
1909         * common/selftest.h (selftest): New struct/interface.
1910         (register_test): Add name parameter, add new overload.
1911         (run_tests): Add filter parameter.
1912         (for_each_selftest_ftype): New typedef.
1913         (for_each_selftest): New declaration.
1914         * common/selftest.c (tests): Change type to
1915         map<string, unique_ptr<selftest>>.
1916         (simple_selftest): New struct.
1917         (register_test): New function.
1918         (register_test): Add name parameter and use it.
1919         (run_tests): Add filter parameter and use it.  Add prints.
1920         Adjust to vector -> map change.
1921         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1922         registering selftests.
1923         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1924         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1925         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1926         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1927         * findvar.c (_initialize_findvar): Likewise.
1928         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1929         * maint.c (maintenance_selftest): Update call to run_tests.
1930         (maintenance_info_selftests): New function.
1931         (_initialize_maint_cmds): Register "maintenance info selftests"
1932         command.  Update "maintenance selftest" doc.
1933         * regcache.c (_initialize_regcache): Add names when registering
1934         selftests.
1935         * rust-exp.y (_initialize_rust_exp): Likewise.
1936         * selftest-arch.c (gdbarch_selftest): New struct.
1937         (gdbarch_tests): Remove.
1938         (register_test_foreach_arch): Add name parameter.  Call
1939         register_test.
1940         (tests_with_arch): Remove, move most content to
1941         gdbarch_selftest::operator().
1942         (_initialize_selftests_foreach_arch): Remove.
1943         * selftest-arch.h (register_test_foreach_arch): Add name
1944         parameter.
1945         (run_tests_with_arch): New declaration.
1946         * utils-selftests.c (_initialize_utils_selftests): Add names
1947         when registering selftests.
1948         * utils.c (_initialize_utils): Likewise.
1949         * unittests/array-view-selftests.c
1950         (_initialize_array_view_selftests): Likewise.
1951         * unittests/environ-selftests.c (_initialize_environ_selftests):
1952         Likewise.
1953         * unittests/function-view-selftests.c
1954         (_initialize_function_view_selftests): Likewise.
1955         * unittests/offset-type-selftests.c
1956         (_initialize_offset_type_selftests): Likewise.
1957         * unittests/optional-selftests.c
1958         (_initialize_optional_selftests): Likewise.
1959         * unittests/scoped_restore-selftests.c
1960         (_initialize_scoped_restore_selftests): Likewise.
1961         * NEWS: Document "maintenance selftest" and "maint info
1962         selftests".
1963
1964 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1965
1966         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1967         scoped_restore.
1968
1969 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1970
1971         * mi/mi-main.c (mi_load_progress): Make uiout variable
1972         a unique_ptr.
1973
1974 2017-09-15  Pedro Alves  <palves@redhat.com>
1975
1976         * compile/compile-c-types.c (convert_enum, convert_int)
1977         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1978
1979 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1980
1981         * dwarf2read.c (copy_string): Remove.
1982         (parse_macro_definition): Replace copy_string with savestring.
1983
1984 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1985
1986         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1987         gdb_target_obs.
1988         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1989         Likewise.
1990         (i[34567]86-*-linux*): Likewise.
1991
1992 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1993
1994         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1995         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1996         <stack>: Change type to std::vector.
1997         <stack_len, stack_allocated>: Remove.
1998         <grow_stack>: Remove.
1999         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2000         (dwarf_expr_context::~dwarf_expr_context): Remove.
2001         (dwarf_expr_context::grow_stack): Remove.
2002         (dwarf_expr_context::push): Adjust.
2003         (dwarf_expr_context::pop): Adjust.
2004         (dwarf_expr_context::fetch): Adjust.
2005         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2006         (dwarf_expr_context::stack_empty_p): Adjust.
2007         (dwarf_expr_context::execute_stack_op): Adjust.
2008
2009 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2010
2011         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2012         return type to bool.
2013         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2014
2015 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2016
2017         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2018         Change type to bool.
2019         (dwarf_stack_value) <in_stack_memory>: Likewise.
2020         (dwarf_expr_context) <push_address>: Change parameter type to
2021         bool.
2022         <fetch_in_stack_memory>: Change return type to bool.
2023         <push>: Change parameter type to bool.
2024         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2025         to bool.
2026         (dwarf_expr_context::push_address): Likewise.
2027         (dwarf_expr_context::fetch_in_stack_memory): Change return type
2028         to bool.
2029         (dwarf_expr_context::execute_stack_op): Adjust.
2030         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2031
2032 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2033
2034         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2035         (struct dwarf_expr_context) <n_pieces>: Remove.
2036         <pieces>: Change type to std::vector.
2037         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2038         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2039         pieces.
2040         (dwarf_expr_context::add_piece): Adjust.
2041         * dwarf2loc.c (struct piece_closure): Initialize fields.
2042         <n_pieces>: Remove.
2043         <pieces>: Change type to std::vector.
2044         (allocate_piece_closure): Adjust, change parameter to
2045         std::vector rvalue and std::move it to piece_closure.
2046         (rw_pieced_value): Adjust.
2047         (check_pieced_synthetic_pointer): Adjust.
2048         (indirect_synthetic_pointer): Adjust.
2049         (coerce_pieced_ref): Adjust.
2050         (free_pieced_value_closure):  Adjust.  Use delete to free
2051         piece_closure.
2052         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2053         to allocate_piece_closure.
2054         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2055
2056 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2057
2058         * probe.h (probe_ops_cp): Remove typedef.
2059         (DEF_VEC_P (probe_ops_cp)): Remove.
2060         (all_probe_ops): Change type to std::vector.
2061         * probe.c (info_probes_for_ops): Adjust to vector change.
2062         (probe_linespec_to_ops): Likewise.
2063         (all_probe_ops): Change type to std::vector.
2064         (_initialize_probe): Adjust to vector change.
2065         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2066         * elfread.c (elf_get_probes): Likewise.
2067         * stap-probe.c (_initialize_stap_probe): Likewise.
2068
2069 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2070
2071         * probe.h (struct bound_probe): Define constructors.
2072         * probe.c (bound_probe_s): Remove typedef.
2073         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2074         (collect_probes): Change return type to std::vector, remove
2075         cleanup.
2076         (compare_probes): Return bool, change parameter type.  Change
2077         semantic to "less than".
2078         (gen_ui_out_table_header_info): Change parameter to std::vector
2079         and update.
2080         (exists_probe_with_pops): Likewise.
2081         (info_probes_for_ops): Update to std::vector change.
2082         (enable_probes_command): Likewise.
2083         (disable_probes_command): Likewise.
2084
2085 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2086
2087         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2088         vec to std::vector.
2089         * probe.c (parse_probes_in_pspace): Update.
2090         (find_probes_in_objfile): Update.
2091         (find_probe_by_pc): Update.
2092         (collect_probes): Update.
2093         (probe_any_get_probes): Update.
2094         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2095         return type to reference to std::vector.
2096         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2097         std::vector and update.
2098         (dtrace_process_dof): Likewise.
2099         (dtrace_get_probes): Likewise.
2100         * elfread.c (elf_get_probes): Change return type to std::vector,
2101         store an std::vector in bfd_data.
2102         (probe_key_free): Update to std::vector.
2103         * stap-probe.c (handle_stap_probe): Change parameter to
2104         std::vector and update.
2105         (stap_get_probes): Likewise.
2106         * symfile-debug.c (debug_sym_get_probes): Change return type to
2107         std::vector and update.
2108
2109 2017-09-11  Tom Tromey  <tom@tromey.com>
2110
2111         * breakpoint.c (program_breakpoint_here_p): Update.
2112         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2113         from make_show_memory_breakpoints_cleanup.  Return a
2114         scoped_restore_tmpl<int>.
2115         (restore_show_memory_breakpoints): Remove.
2116         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2117         * mem-break.c (memory_validate_breakpoint): Update.
2118         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2119         (ia64_memory_remove_breakpoint): Update.
2120         (ia64_breakpoint_from_pc): Update.
2121         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2122         from make_show_memory_breakpoints_cleanup.
2123
2124 2017-09-11  Tom Tromey  <tom@tromey.com>
2125
2126         * d-namespace.c (d_lookup_symbol): Use std::string.
2127         (find_symbol_in_baseclass): Likewise.
2128
2129 2017-09-11  Tom Tromey  <tom@tromey.com>
2130
2131         * ctf.c (ctf_start): Use std::string.
2132
2133 2017-09-11  Tom Tromey  <tom@tromey.com>
2134
2135         * ada-lang.c (is_known_support_routine): Update.
2136         (ada_unhandled_exception_name_addr_from_raise): Update.
2137         * guile/scm-frame.c (gdbscm_frame_name): Update.
2138         * python/py-frame.c (frapy_name): Update.
2139         (frapy_function): Update.
2140         * stack.h (find_frame_funname): Update.
2141         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2142         (print_frame): Update.
2143
2144 2017-09-11  Tom Tromey  <tom@tromey.com>
2145
2146         * findcmd.c (put_bits): Take a gdb::byte_vector.
2147         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2148         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2149         cleanups.
2150         (find_command): Update.
2151
2152 2017-09-11  Tom Tromey  <tom@tromey.com>
2153
2154         * cli/cli-script.c (class scoped_restore_hook_in): New.
2155         (clear_hook_in_cleanup): Remove.
2156         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2157         scoped_restore_hook_in.
2158
2159 2017-09-11  Tom Tromey  <tom@tromey.com>
2160
2161         * cli/cli-script.c (restore_interp): Remove.
2162         (read_command_lines): Use scoped_restore_interp.
2163         * interps.c (scoped_restore_interp::set_temp): Rename from
2164         interp_set_temp.
2165         * interps.h (class scoped_restore_interp): New.
2166         (interp_set_temp): Remove.
2167
2168 2017-09-11  Tom Tromey  <tom@tromey.com>
2169
2170         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2171         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2172         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2173         scoped_restore.
2174         (mi_cmd_break_insert_1): Update.
2175         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2176         scoped_restore.
2177
2178 2017-09-11  Tom Tromey  <tom@tromey.com>
2179
2180         * demangle.c (demangle_command): Update.
2181         * breakpoint.c (disable_command): Update.
2182         (enable_command): Update.
2183         (find_location_by_number): Make "number" const.  Use
2184         get_number_trailer.
2185         * cli/cli-utils.c (extract_arg): Return std::string.
2186         * probe.c (parse_probe_linespec): Update.  Change types.
2187         (collect_probes): Take string arguments.
2188         (parse_probe_linespec): Likewise.
2189         (info_probes_for_ops): Update.
2190         (enable_probes_command): Update.
2191         (disable_probes_command): Update.
2192         * break-catch-sig.c (catch_signal_split_args): Update.
2193         * mi/mi-parse.c (mi_parse): Update.
2194
2195 2017-09-11  Tom Tromey  <tom@tromey.com>
2196
2197         * language.h (language_enum): Make argument const.
2198         * language.c (language_enum): Make argument const.
2199
2200 2017-09-11  Tom Tromey  <tom@tromey.com>
2201
2202         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2203         as function.
2204         (skip_to_space): Rename from skip_to_space_const.
2205         * common/common-utils.c (skip_to_space): New function.
2206         (skip_to_space): Rename from skip_to_space_const.
2207         * cli/cli-utils.h (get_number): Rename from get_number_const.
2208         (extract_arg): Rename from extract_arg_const.
2209         * cli/cli-utils.c (get_number): Rename from get_number_const.
2210         (extract_arg): Rename from extract_arg_const.
2211         (number_or_range_parser::get_number): Use ::get_number.
2212         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2213         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2214         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2215         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2216         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2217         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2218         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2219         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2220
2221 2017-09-11  Tom Tromey  <tom@tromey.com>
2222
2223         * python/python.c (do_start_initialization): Use
2224         py-event-types.def to initialize types.
2225         Define all object type structures.
2226         * python/python-internal.h: Don't declare event initialization
2227         functions.
2228         * python/py-threadevent.c (thread_event_object_type): Don't
2229         define.
2230         * python/py-stopevent.c (stop_event_object_type): Don't define.
2231         * python/py-signalevent.c (signal_event_object_type): Don't
2232         declare or define.
2233         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2234         (clear_objfiles_event_object_type): Don't declare or define.
2235         * python/py-infevents.c (inferior_call_pre_event_object_type)
2236         (inferior_call_post_event_object_type)
2237         (register_changed_event_object_type)
2238         (memory_changed_event_object_type): Don't declare or define.
2239         * python/py-inferior.c (new_thread_event_object_type)
2240         (new_inferior_event_object_type)
2241         (inferior_deleted_event_object_type): Don't declare or define.
2242         * python/py-exitedevent.c (exited_event_object_type): Don't
2243         declare or define.
2244         * python/py-evts.c (gdbpy_initialize_py_events): Use
2245         py-all-events.def.
2246         * python/py-events.h (thread_event_object_type): Don't declare.
2247         (events_object): Use py-all-events.def.
2248         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2249         py-event-types.def.
2250         * python/py-event-types.def: New file.
2251         * python/py-continueevent.c (create_continue_event_object): Don't
2252         declare or define.
2253         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2254         declare or define.
2255         * python/py-all-events.def: New file.
2256
2257 2017-09-11  Tom Tromey  <tom@tromey.com>
2258
2259         * python/py-threadevent.c (create_thread_event_object): Return
2260         gdbpy_ref.
2261         * python/py-stopevent.h (create_stop_event_object)
2262         (create_breakpoint_event_object, create_signal_event_object):
2263         Update.
2264         * python/py-stopevent.c (create_stop_event_object): Return
2265         gdbpy_ref.
2266         (emit_stop_event): Update.
2267         * python/py-signalevent.c (create_signal_event_object): Return
2268         gdbpy_ref.
2269         * python/py-infevents.c (create_inferior_call_event_object):
2270         Update.
2271         * python/py-event.h (create_event_object)
2272         (create_thread_event_object): Update.
2273         * python/py-event.c (create_event_object): Return gdbpy_ref.
2274         * python/py-continueevent.c: Return gdbpy_ref.
2275         * python/py-bpevent.c (create_breakpoint_event_object): Return
2276         gdbpy_ref.
2277
2278 2017-09-11  Tom Tromey  <tom@tromey.com>
2279
2280         PR python/15622:
2281         * NEWS: Add entry.
2282         * python/python.c (do_start_initialization): Initialize new event
2283         types.
2284         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2285         (gdbpy_initialize_inferior_deleted_event)
2286         (gdbpy_initialize_new_thread_event): Declare.
2287         * python/py-threadevent.c (create_thread_event_object): Add option
2288         "thread" parameter.
2289         * python/py-inferior.c (new_thread_event_object_type)
2290         (new_inferior_event_object_type)
2291         (inferior_deleted_event_object_type): Declare.
2292         (python_new_inferior, python_inferior_deleted): New functions.
2293         (add_thread_object): Emit new_thread event.
2294         (gdbpy_initialize_inferior): Attach new functions to corresponding
2295         observers.
2296         (new_thread, new_inferior, inferior_deleted): Define new event
2297         types.
2298         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2299         registries.
2300         * python/py-events.h (events_object) <new_inferior,
2301         inferior_deleted, new_thread>: New fields.
2302         * python/py-event.h (create_thread_event_breakpoint): Add optional
2303         "thread" parameter.
2304
2305 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2306
2307         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2308         check current_ui instead.
2309         (internal_vproblem): Likewise.
2310
2311 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2312
2313         * thread.c (print_thread_info_1): Remove unnecessary calls to
2314         uiout->is_mi_like_p.
2315
2316 2017-09-09  Tom Tromey  <tom@tromey.com>
2317
2318         * namespace.h (add_using_directive): Update.
2319         * namespace.c (add_using_directive): Change type of excludes to
2320         std::vector.
2321         * dwarf2read.c (read_import_statement): Use std::vector.
2322         (read_namespace): Update.
2323         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2324
2325 2017-09-09  Tom Tromey  <tom@tromey.com>
2326
2327         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2328
2329 2017-09-09  Tom Tromey  <tom@tromey.com>
2330
2331         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2332
2333 2017-09-09  Tom Tromey  <tom@tromey.com>
2334
2335         * stack.c (func_command): Use gdb::def_vector.
2336
2337 2017-09-09  Tom Tromey  <tom@tromey.com>
2338
2339         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2340         ui_out_emit_list, ui_out_emit_tuple.
2341         (mi_cmd_var_update): Likewise.
2342
2343 2017-09-09  Tom Tromey  <tom@tromey.com>
2344
2345         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2346         ui_out_redirect_pop.
2347         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2348         ui_out_redirect_pop.
2349         * utils.c (do_ui_out_redirect_pop)
2350         (make_cleanup_ui_out_redirect_pop): Remove.
2351         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2352         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2353         * ui-out.h (ui_out_redirect_pop): New class.
2354
2355 2017-09-09  Tom Tromey  <tom@tromey.com>
2356
2357         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2358         (list_available_thread_groups, mi_cmd_list_thread_groups)
2359         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2360         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2361         Likewise.
2362
2363 2017-09-09  Tom Tromey  <tom@tromey.com>
2364
2365         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2366         ui_out_emit_tuple.
2367
2368 2017-09-09  Tom Tromey  <tom@tromey.com>
2369
2370         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2371         * stack.c (print_frame): Use ui_out_emit_tuple.
2372         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2373         (info_spu_mailbox_command, info_spu_dma_command)
2374         (info_spu_proxydma_command): Likewise.
2375         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2376         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2377         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2378         ui_out_emit_tuple.
2379         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2380
2381 2017-09-09  Tom Tromey  <tom@tromey.com>
2382
2383         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2384         (class ui_out_emit_table): Update comment.
2385         * ui-out.c (do_cleanup_table_end)
2386         (make_cleanup_ui_out_table_begin_end): Remove.
2387         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2388         (info_spu_dma_cmdlist): Likewise.
2389         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2390         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2391         ui_out_emit_table.
2392
2393 2017-09-09  Tom Tromey  <tom@tromey.com>
2394
2395         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2396         ui_out_emit_list, gdb::optional.
2397
2398 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2399
2400         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2401         prototype.
2402         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2403         prototype.
2404         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2405         prototype.
2406         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2407         * ada-exp.y: Remove _initialize_ada_exp prototype.
2408         * ada-lang.c: Remove _initialize_ada_language prototype.
2409         * ada-tasks.c: Remove _initialize_tasks prototype.
2410         * addrmap.c: Remove _initialize_addrmap prototype.
2411         * agent.c: Remove _initialize_agent prototype.
2412         * aix-thread.c: Remove _initialize_aix_thread prototype.
2413         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2414         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2415         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2416         prototype.
2417         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2418         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2419         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2420         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2421         prototype.
2422         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2423         prototype.
2424         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2425         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2426         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2427         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2428         prototype.
2429         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2430         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2431         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2432         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2433         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2434         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2435         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2436         prototype.
2437         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2438         prototype.
2439         * annotate.c: Remove _initialize_annotate prototype.
2440         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2441         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2442         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2443         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2444         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2445         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2446         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2447         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2448         prototype.
2449         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2450         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2451         * auto-load.c: Remove _initialize_auto_load prototype.
2452         * auxv.c: Remove _initialize_auxv prototype.
2453         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2454         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2455         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2456         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2457         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2458         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2459         prototype.
2460         * break-catch-throw.c: Remove _initialize_break_catch_throw
2461         prototype.
2462         * breakpoint.c: Remove _initialize_breakpoint prototype.
2463         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2464         * btrace.c: Remove _initialize_btrace prototype.
2465         * charset.c: Remove _initialize_charset prototype.
2466         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2467         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2468         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2469         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2470         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2471         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2472         * coffread.c: Remove _initialize_coffread prototype.
2473         * compile/compile.c: Remove _initialize_compile prototype.
2474         * complaints.c: Remove _initialize_complaints prototype.
2475         * completer.c: Remove _initialize_completer prototype.
2476         * copying.awk: Remove _initialize_copying prototype.
2477         * copying.c: Regenerate.
2478         * core-regset.c: Remove _initialize_core_regset prototype.
2479         * corefile.c: Remove _initialize_core prototype.
2480         * corelow.c: Remove _initialize_corelow prototype.
2481         * cp-abi.c: Remove _initialize_cp_abi prototype.
2482         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2483         * cp-support.c: Remove _initialize_cp_support prototype.
2484         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2485         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2486         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2487         * ctf.c: Remove _initialize_ctf prototype.
2488         * d-lang.c: Remove _initialize_d_language prototype.
2489         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2490         prototype.
2491         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2492         * dbxread.c: Remove _initialize_dbxread prototype.
2493         * dcache.c: Remove _initialize_dcache prototype.
2494         * demangle.c: Remove _initialize_demangler prototype.
2495         * disasm-selftests.c: Remove _initialize_disasm_selftests
2496         prototype.
2497         * disasm.c: Remove _initialize_disasm prototype.
2498         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2499         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2500         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2501         prototype.
2502         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2503         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2504         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2505         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2506         * elfread.c: Remove _initialize_elfread prototype.
2507         * exec.c: Remove _initialize_exec prototype.
2508         * extension.c: Remove _initialize_extension prototype.
2509         * f-lang.c: Remove _initialize_f_language prototype.
2510         * f-valprint.c: Remove _initialize_f_valprint prototype.
2511         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2512         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2513         * filesystem.c: Remove _initialize_filesystem prototype.
2514         * findcmd.c: Remove _initialize_mem_search prototype.
2515         * fork-child.c: Remove _initialize_fork_child prototype.
2516         * frame-base.c: Remove _initialize_frame_base prototype.
2517         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2518         * frame.c: Remove _initialize_frame prototype.
2519         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2520         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2521         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2522         * gcore.c: Remove _initialize_gcore prototype.
2523         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2524         * gdbarch.c: Regenerate.
2525         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2526         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2527         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2528         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2529         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2530         * go-lang.c: Remove _initialize_go_language prototype.
2531         * go32-nat.c: Remove _initialize_go32_nat prototype.
2532         * guile/guile.c: Remove _initialize_guile prototype.
2533         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2534         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2535         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2536         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2537         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2538         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2539         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2540         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2541         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2542         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2543         prototype.
2544         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2545         prototype.
2546         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2547         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2548         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2549         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2550         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2551         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2552         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2553         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2554         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2555         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2556         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2557         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2558         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2559         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2560         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2561         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2562         prototype.
2563         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2564         prototype.
2565         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2566         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2567         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2568         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2569         * infcall.c: Remove _initialize_infcall prototype.
2570         * infcmd.c: Remove _initialize_infcmd prototype.
2571         * inferior.c: Remove _initialize_inferiors prototype.
2572         * inflow.c: Remove _initialize_inflow prototype.
2573         * infrun.c: Remove _initialize_infrun prototype.
2574         * interps.c: Remove _initialize_interpreter prototype.
2575         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2576         * jit.c: Remove _initialize_jit prototype.
2577         * language.c: Remove _initialize_language prototype.
2578         * linux-fork.c: Remove _initialize_linux_fork prototype.
2579         * linux-nat.c: Remove _initialize_linux_nat prototype.
2580         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2581         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2582         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2583         * m2-lang.c: Remove _initialize_m2_language prototype.
2584         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2585         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2586         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2587         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2588         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2589         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2590         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2591         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2592         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2593         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2594         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2595         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2596         * machoread.c: Remove _initialize_machoread prototype.
2597         * macrocmd.c: Remove _initialize_macrocmd prototype.
2598         * macroscope.c: Remove _initialize_macroscope prototype.
2599         * maint.c: Remove _initialize_maint_cmds prototype.
2600         * mdebugread.c: Remove _initialize_mdebugread prototype.
2601         * memattr.c: Remove _initialize_mem prototype.
2602         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2603         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2604         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2605         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2606         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2607         * microblaze-linux-tdep.c: Remove
2608         _initialize_microblaze_linux_tdep prototype.
2609         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2610         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2611         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2612         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2613         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2614         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2615         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2616         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2617         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2618         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2619         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2620         prototype.
2621         * mipsread.c: Remove _initialize_mipsread prototype.
2622         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2623         prototype.
2624         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2625         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2626         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2627         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2628         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2629         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2630         prototype.
2631         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2632         * nto-procfs.c: Remove _initialize_procfs prototype.
2633         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2634         * objc-lang.c: Remove _initialize_objc_language prototype.
2635         * objfiles.c: Remove _initialize_objfiles prototype.
2636         * observer.c: Remove observer_test_first_notification_function,
2637         observer_test_second_notification_function,
2638         observer_test_third_notification_function, and
2639         _initialize_observer prototypes.
2640         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2641         * osabi.c: Remove _initialize_gdb_osabi prototype.
2642         * osdata.c: Remove _initialize_osdata prototype.
2643         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2644         * parse.c: Remove _initialize_parse prototype.
2645         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2646         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2647         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2648         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2649         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2650         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2651         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2652         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2653         * printcmd.c: Remove _initialize_printcmd prototype.
2654         * probe.c: Remove _initialize_probe prototype.
2655         * proc-api.c: Remove _initialize_proc_api prototype.
2656         * proc-events.c: Remove _initialize_proc_events prototype.
2657         * proc-service.c: Remove _initialize_proc_service prototype.
2658         * procfs.c: Remove _initialize_procfs prototype.
2659         * psymtab.c: Remove _initialize_psymtab prototype.
2660         * python/python.c: Remove _initialize_python prototype.
2661         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2662         * record-btrace.c: Remove _initialize_record_btrace prototype.
2663         * record-full.c: Remove _initialize_record_full prototype.
2664         * record.c: Remove _initialize_record prototype.
2665         * regcache.c: Remove _initialize_regcache prototype.
2666         * reggroups.c: Remove _initialize_reggroup prototype.
2667         * remote-notif.c: Remove _initialize_notif prototype.
2668         * remote-sim.c: Remove _initialize_remote_sim prototype.
2669         * remote.c: Remove _initialize_remote prototype.
2670         * reverse.c: Remove _initialize_reverse prototype.
2671         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2672         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2673         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2674         prototype.
2675         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2676         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2677         * rust-exp.y: Remove _initialize_rust_exp prototype.
2678         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2679         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2680         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2681         * score-tdep.c: Remove _initialize_score_tdep prototype.
2682         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2683         prototype.
2684         * ser-go32.c: Remove _initialize_ser_dos prototype.
2685         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2686         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2687         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2688         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2689         * serial.c: Remove _initialize_serial prototype.
2690         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2691         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2692         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2693         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2694         * skip.c: Remove _initialize_step_skip prototype.
2695         * sol-thread.c: Remove _initialize_sol_thread prototype.
2696         * solib-aix.c: Remove _initialize_solib_aix prototype.
2697         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2698         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2699         * solib-frv.c: Remove _initialize_frv_solib prototype.
2700         * solib-spu.c: Remove _initialize_spu_solib prototype.
2701         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2702         * solib-target.c: Remove _initialize_solib_target prototype.
2703         * solib.c: Remove _initialize_solib prototype.
2704         * source.c: Remove _initialize_source prototype.
2705         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2706         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2707         prototype.
2708         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2709         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2710         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2711         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2712         prototype.
2713         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2714         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2715         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2716         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2717         prototype.
2718         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2719         prototype.
2720         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2721         prototype.
2722         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2723         prototype.
2724         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2725         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2726         prototype.
2727         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2728         prototype.
2729         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2730         prototype.
2731         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2732         prototype.
2733         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2734         prototype.
2735         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2736         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2737         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2738         * stabsread.c: Remove _initialize_stabsread prototype.
2739         * stack.c: Remove _initialize_stack prototype.
2740         * stap-probe.c: Remove _initialize_stap_probe prototype.
2741         * std-regs.c: Remove _initialize_frame_reg prototype.
2742         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2743         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2744         * symfile.c: Remove _initialize_symfile prototype.
2745         * symmisc.c: Remove _initialize_symmisc prototype.
2746         * symtab.c: Remove _initialize_symtab prototype.
2747         * target-dcache.c: Remove _initialize_target_dcache prototype.
2748         * target-descriptions.c: Remove _initialize_target_descriptions
2749         prototype.
2750         * thread.c: Remove _initialize_thread prototype.
2751         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2752         prototype.
2753         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2754         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2755         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2756         prototype.
2757         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2758         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2759         * tracefile.c: Remove _initialize_tracefile prototype.
2760         * tracepoint.c: Remove _initialize_tracepoint prototype.
2761         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2762         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2763         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2764         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2765         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2766         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2767         * tui/tui.c: Remove _initialize_tui prototype.
2768         * typeprint.c: Remove _initialize_typeprint prototype.
2769         * user-regs.c: Remove _initialize_user_regs prototype.
2770         * utils.c: Remove _initialize_utils prototype.
2771         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2772         * valarith.c: Remove _initialize_valarith prototype.
2773         * valops.c: Remove _initialize_valops prototype.
2774         * valprint.c: Remove _initialize_valprint prototype.
2775         * value.c: Remove _initialize_values prototype.
2776         * varobj.c: Remove _initialize_varobj prototype.
2777         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2778         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2779         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2780         * windows-nat.c: Remove _initialize_windows_nat,
2781         _initialize_check_for_gdb_ini, and _initialize_loadable
2782         prototypes.
2783         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2784         * xcoffread.c: Remove _initialize_xcoffread prototype.
2785         * xml-support.c: Remove _initialize_xml_support prototype.
2786         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2787         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2788         prototype.
2789         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2790         prototype.
2791         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2792
2793 2017-09-08  Keith Seitz  <keiths@redhat.com>
2794
2795         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2796         field.
2797
2798 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2799
2800         * f-valprint.c (f_val_print): Remove check for one byte
2801         sized integers. Remove printing of character type.
2802
2803 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2804             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2805             Bernhard Heckel  <bernhard.heckel@intel.com>
2806
2807         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2808         to maintain proper indentation when printing pointers/refs.
2809
2810 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2811
2812         GDB 8.0.1 released.
2813
2814 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2815
2816         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2817
2818 2017-09-05  Tom Tromey  <tom@tromey.com>
2819
2820         * parse.c (funcall_chain): Now a std::vector.
2821         (start_arglist, end_arglist): Simplify.
2822         (free_funcalls): Remove.
2823         (parse_exp_in_context_1): Remove cleanup.
2824
2825 2017-09-05  Tom Tromey  <tom@tromey.com>
2826
2827         * go-exp.y (go_parse): Don't create a cleanup.
2828
2829 2017-09-05  Tom Tromey  <tom@tromey.com>
2830
2831         * d-exp.y (PrimaryExpression): Use std::string.
2832         (d_parse): Don't create a cleanup.
2833
2834 2017-09-05  Tom Tromey  <tom@tromey.com>
2835
2836         * utils.c (do_clear_parser_state): Remove.
2837         (make_cleanup_clear_parser_state): Remove.
2838         * p-exp.y (pascal_parse): Use scoped_restore.
2839         * m2-exp.y (m2_parse): Use scoped_restore.
2840         * f-exp.y (f_parse): Use scoped_restore.
2841         * d-exp.y (d_parse): Use scoped_restore.
2842         * c-exp.y (c_parse): Use scoped_restore.
2843         * ada-exp.y (ada_parse): Use scoped_restore.
2844         * utils.h (make_cleanup_clear_parser_state): Remove.
2845
2846 2017-09-06  Keith Seitz  <keiths@redhat.com>
2847
2848         * dwarf2read.c (dw2_linkage_name_attr): New function.
2849         (dw2_linkage_name): New function.
2850         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2851         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2852         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2853
2854 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2855
2856         * config/djgpp/djconfig.sh: Correct shell portability issue.
2857
2858 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2859
2860         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2861
2862 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2863
2864         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2865         * NEWS: Mention new FreeBSD/mips native configuration.
2866         * configure.host: Add aarch64*-*-freebsd*.
2867         * configure.nat: Likewise.
2868         * aarch64-fbsd-nat.c: New file.
2869
2870 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2871
2872         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2873         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2874         * NEWS: Mention new FreeBSD/aarch64 target.
2875         * configure.tgt: Add aarch64*-*-freebsd*.
2876         * aarch64-fbsd-tdep.c: New file.
2877         * aarch64-fbsd-tdep.h: New file.
2878
2879 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2880
2881         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2882
2883 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2884
2885         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2886         of TLS symbols.
2887
2888 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2889
2890         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2891         call.
2892
2893 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2894
2895         * infrun.c (follow_exec): Call add_thread after
2896         target_find_description.
2897
2898 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2899
2900         * infrun.c (handle_inferior_event_1): When exec'ing, read
2901         stop_pc after follow_exec.
2902
2903 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2904
2905         * remote.c (process_g_packet): Update error message.
2906
2907 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2908
2909         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2910         targets.
2911
2912 2017-09-05  Pedro Alves  <palves@redhat.com>
2913
2914         * eval.c (eval_call, evaluate_funcall): New functions, factored
2915         out from ...
2916         (evaluate_subexp_standard): ... this.
2917
2918 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2919
2920         * amd64-tdep.c (amd64_target_description): Create target
2921         descriptions.
2922         (_initialize_amd64_tdep): Don't call functions
2923         initialize_tdesc_amd64_*.  Add self tests.
2924         * arch/amd64.c (amd64_create_target_description): Add parameter
2925         is_linux.  Call set_tdesc_osabi if is_linux is true.
2926         * arch/amd64.h (amd64_create_target_description): Update the
2927         declaration.
2928         * arch/i386.c (i386_create_target_description): Add parameter
2929         is_linux.  Call set_tdesc_osabi if is_linux is true.
2930         * arch/i386.h (i386_create_target_description): Update
2931         declaration.
2932         * configure.tgt: Add i386.o to gdb_target_obs.
2933         * features/Makefile (XMLTOC): Remove i386/*.xml.
2934         * features/i386/amd64-avx-avx512.c: Remove.
2935         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2936         * features/i386/amd64-avx-mpx.c: Remove.
2937         * features/i386/amd64-avx.c: Remove.
2938         * features/i386/amd64-mpx.c: Remove.
2939         * features/i386/amd64.c: Remove.
2940         * features/i386/i386-avx-avx512.c: Remove.
2941         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2942         * features/i386/i386-avx-mpx.c: Remove.
2943         * features/i386/i386-avx.c: Remove.
2944         * features/i386/i386-mmx.c: Remove.
2945         * features/i386/i386-mpx.c: Remove.
2946         * features/i386/i386.c: Remove.
2947         * i386-tdep.c: Don't include features/i386/i386*.c., include
2948         target-descriptions.h and arch/i386.h.
2949         (i386_target_description): Create target descriptions.
2950         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2951         functions.  Do self tests.
2952
2953 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2954
2955         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2956         * features/i386/amd64-avx-avx512-linux.c: Removed.
2957         * features/i386/amd64-avx-linux.c: Removed.
2958         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2959         * features/i386/amd64-avx-mpx-linux.c: Removed.
2960         * features/i386/amd64-linux.c: Removed.
2961         * features/i386/amd64-mpx-linux.c: Removed.
2962         * features/i386/x32-avx-avx512-linux.c: Removed.
2963         * features/i386/x32-avx-linux.c: Removed.
2964         * features/i386/x32-linux.c: Removed.
2965
2966 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2967
2968         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2969         features/i386/*.c.
2970         (amd64_linux_read_description): Call
2971         amd64_create_target_description.
2972         * arch/amd64.c: New file.
2973         * arch/amd64.h: New file.
2974         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2975         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2976
2977 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2978
2979         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2980         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2981         (amd64_linux_read_description): Create target descriptions.
2982         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2983         functions.  Add unit tests.
2984         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2985         x32-core.xml.
2986         * features/i386/64bit-avx.c: Generated.
2987         * features/i386/64bit-avx512.c: Generated.
2988         * features/i386/64bit-core.c: Generated.
2989         * features/i386/64bit-linux.c: Generated.
2990         * features/i386/64bit-mpx.c: Generated.
2991         * features/i386/64bit-pkeys.c: Generated.
2992         * features/i386/64bit-segments.c: Generated.
2993         * features/i386/64bit-sse.c: Generated.
2994         * features/i386/x32-core.c: Generated.
2995         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2996         c files for amd64-linux and x32-linux.
2997
2998 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2999
3000         * amd64-linux-tdep.c (amd64_linux_read_description): New
3001         function.
3002         (amd64_linux_core_read_description): Call
3003         amd64_linux_read_description.
3004         (amd64_linux_init_abi): Likewise.
3005         (amd64_x32_linux_init_abi): Likewise.
3006         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3007         * x86-linux-nat.c (x86_linux_read_description): Call
3008         amd64_linux_read_description.
3009
3010 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3011
3012         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3013         comments.
3014
3015 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3016
3017         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3018         * features/i386/i386-avx-avx512-linux.c: Remove.
3019         * features/i386/i386-avx-linux.c: Remove.
3020         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3021         * features/i386/i386-avx-mpx-linux.c: Remove.
3022         * features/i386/i386-linux.c: Remove.
3023         * features/i386/i386-mmx-linux.c: Remove.
3024         * features/i386/i386-mpx-linux.c: Remove.
3025
3026 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3027
3028         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3029         (SFILES): Add arch/i386.c.
3030         (HFILES_NO_SRCDIR): Add arch/i386.h.
3031         * arch/i386.c: New file.
3032         * arch/i386.h: New file.
3033         * arch/tdesc.h (allocate_target_description): Declare.
3034         (set_tdesc_architecture): Declare.
3035         (set_tdesc_osabi): Declare.
3036         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3037         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3038         include arch/i386.h.
3039         (i386_linux_read_description): Remove code and call
3040         i386_create_target_description.
3041         (set_tdesc_architecture): New function.
3042         (set_tdesc_osabi): New function.
3043         * target-descriptions.h (allocate_target_description): Remove.
3044
3045 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3046
3047         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3048         * target-descriptions.c (tdesc_create_feature): Likewise, and
3049         adjust code.
3050         * features/i386/32bit-avx.c: Re-generated.
3051         * features/i386/32bit-avx512.c: Re-generated.
3052         * features/i386/32bit-core.c: Re-generated.
3053         * features/i386/32bit-linux.c: Re-generated.
3054         * features/i386/32bit-mpx.c: Re-generated.
3055         * features/i386/32bit-pkeys.c: Re-generated.
3056         * features/i386/32bit-sse.c: Re-generated.
3057
3058 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3059
3060         * regformats/regdef.h (struct reg): Override operator == and !=.
3061
3062 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3063
3064         * arch/tdesc.h: New file.
3065         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3066         * target-descriptions.c: Update comments.
3067         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3068         declarations.
3069         * features/i386/32bit-avx.c: Re-generated.
3070         * features/i386/32bit-avx512.c: Re-generated.
3071         * features/i386/32bit-core.c: Re-generated.
3072         * features/i386/32bit-linux.c: Re-generated.
3073         * features/i386/32bit-mpx.c: Re-generated.
3074         * features/i386/32bit-pkeys.c: Re-generated.
3075         * features/i386/32bit-sse.c: Re-generated.
3076
3077 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3078
3079         * regformats/regdat.sh: Update generated code.
3080
3081 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3082
3083         * regformats/regdat.sh: Adjust code order.
3084
3085 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3086
3087         * expprint.c (dump_subexp_body_standard): Use constant format
3088         string in fprintf_filtered call.
3089
3090 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3091
3092         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3093         NetBSD/i386.
3094         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3095
3096 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3097
3098         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3099
3100 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3101
3102         * bsd-kvm.o: Define _KMEMUSER.
3103         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3104         * configure: Regenerate.
3105
3106 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3107
3108         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3109         * i386-fbsd-nat.c: Likewise.
3110
3111 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3112
3113         * unittests/array-view-selftests.c: Add include of <array>.
3114
3115 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3116
3117         * spu-tdep.c (flush_ea_cache): Add missing argument to
3118         call_function_by_hand.
3119
3120 2017-09-04  Pedro Alves  <palves@redhat.com>
3121
3122         * NEWS (Safer support for debugging with no debug info): New.
3123
3124 2017-09-04  Pedro Alves  <palves@redhat.com>
3125
3126         * c-exp.y (function_method, function_method_void): Add current
3127         instance flags to TYPE_INSTANCE.
3128         * dwarf2read.c (check_modifier): New.
3129         (compute_delayed_physnames): Assert that only C++ adds delayed
3130         physnames.  Mark fn_fields as const/volatile depending on
3131         physname.
3132         * eval.c (make_params): New type_instance_flags parameter.  Use
3133         it as the new type's instance flags.
3134         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3135         flags element and pass it to make_params.
3136         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3137         instance flags element.
3138         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3139         * gdbtypes.h: Include "enum-flags.h".
3140         (type_instance_flags): New enum-flags type.
3141         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3142         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3143         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3144         (follow_type_instance_flags): New function.
3145         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3146         * parser-defs.h (follow_type_instance_flags): Declare.
3147         * valops.c (value_struct_elt_for_reference): const/volatile must
3148         match too.
3149
3150 2017-09-04  Pedro Alves  <palves@redhat.com>
3151
3152         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3153         function/method scopes; lookup the nested name as a function local
3154         static variable.
3155
3156 2017-09-04  Pedro Alves  <palves@redhat.com>
3157
3158         (%type <voidval>): Add function_method.
3159         * c-exp.y (exp): New production for calls with no arguments.
3160         (function_method, function_method_void_or_typelist): New
3161         productions.
3162         (exp): New production for "method()::static_var".
3163         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3164         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3165         Handle OP_FUNC_STATIC_VAR.
3166         * parse.c (operator_length_standard):
3167         Handle OP_FUNC_STATIC_VAR.
3168
3169 2017-09-04  Pedro Alves  <palves@redhat.com>
3170
3171         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3172         handling.
3173         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3174         Ditto.
3175         * parse.c (operator_length_standard, operator_check_standard):
3176         Ditto.
3177         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3178
3179 2017-09-04  Pedro Alves  <palves@redhat.com>
3180
3181         * ax-gdb.c: Include "typeprint.h".
3182         (gen_expr_for_cast): New function.
3183         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3184         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3185         type is unknown.
3186         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3187         nodebug_data_symbol.
3188         * eval.c: Include "typeprint.h".
3189         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3190         Error out if symbol has unknown type.
3191         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3192         evaluate_subexp_for_cast.
3193         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3194         OP_VAR_MSYM_VALUE.
3195         (evaluate_subexp_for_cast): New function.
3196         * gdbtypes.c (init_nodebug_var_type): New function.
3197         (objfile_type): Use it to initialize types of variables with no
3198         debug info.
3199         * typeprint.c (error_unknown_type): New.
3200         * typeprint.h (error_unknown_type): New declaration.
3201         * compile/compile-c-types.c (convert_type_basic): Handle
3202         TYPE_CODE_ERROR; warn and fallback to int for variables with
3203         unknown type.
3204
3205 2017-09-04  Pedro Alves  <palves@redhat.com>
3206
3207         * eval.c (evaluate_var_value): New function, factored out from ...
3208         (evaluate_subexp_standard): ... here.
3209
3210 2017-09-04  Pedro Alves  <palves@redhat.com>
3211
3212         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3213         Remove useless assignments to 'op'.
3214
3215 2017-09-04  Pedro Alves  <palves@redhat.com>
3216
3217         * eval.c (eval_skip_value): New function.
3218         (evaluate_subexp_standard): Use it.
3219
3220 2017-09-04  Pedro Alves  <palves@redhat.com>
3221
3222         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3223         function name from symbol/minsym and pass it to
3224         error_call_unknown_return_type.
3225
3226 2017-09-04  Pedro Alves  <palves@redhat.com>
3227
3228         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3229         * ax-gdb.c (gen_msym_var_ref): New function.
3230         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3231         * eval.c (evaluate_var_msym_value): New function.
3232         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3233         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3234         to call_function_by_hand.
3235         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3236         Handle OP_VAR_MSYM_VALUE.
3237         (union exp_element) <msymbol>: New field.
3238         * minsyms.h (struct type): Forward declare.
3239         (find_minsym_type_and_address): Declare.
3240         * parse.c (write_exp_elt_msym): New function.
3241         (write_exp_msymbol): Delete, refactored as ...
3242         (find_minsym_type_and_address): ... this new function.
3243         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3244         (operator_length_standard, operator_check_standard): Handle
3245         OP_VAR_MSYM_VALUE.
3246         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3247
3248 2017-09-04  Pedro Alves  <palves@redhat.com>
3249
3250         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3251         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3252         unknown.
3253         * ada-typeprint.c (print_func_type): Handle functions with unknown
3254         return type.
3255         * c-typeprint.c (c_type_print_base): Handle functions and methods
3256         with unknown return type.
3257         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3258         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3259         * compile/compile-c-types.c: Include "objfiles.h".
3260         (convert_func): For functions with unknown return type, warn and
3261         default to int.
3262         * compile/compile-object-run.c (compile_object_run): Adjust call
3263         to call_function_by_hand_dummy.
3264         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3265         call_function_by_hand.
3266         * eval.c (evaluate_subexp_standard): Adjust calls to
3267         call_function_by_hand.  Handle functions and methods with unknown
3268         return type.  Pass expect_type to call_function_by_hand.
3269         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3270         return type.
3271         * gcore.c (call_target_sbrk): Adjust call to
3272         call_function_by_hand.
3273         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3274         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3275         an integer address type instead of nodebug.
3276         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3277         call_function_by_hand.
3278         * infcall.c (error_call_unknown_return_type): New function.
3279         (call_function_by_hand): New "default_return_type" parameter.
3280         Pass it down.
3281         (call_function_by_hand_dummy): New "default_return_type"
3282         parameter.  Use it instead of defaulting to int.  If there's no
3283         default and the return type is unknown, throw an error.  If
3284         there's a default return type, and the called function has no
3285         debug info, then assume the function is prototyped.
3286         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3287         New "default_return_type" parameter.
3288         (error_call_unknown_return_type): New declaration.
3289         * linux-fork.c (call_lseek): Cast return type of lseek.
3290         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3291         call_function_by_hand.
3292         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3293         calls to call_function_by_hand.
3294         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3295         return type.
3296         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3297         (value_nsstring, print_object_command): Adjust calls to
3298         call_function_by_hand.
3299         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3300         functions with unknown return type.
3301         (pascal_type_print_func_varspec_suffix): New function.
3302         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3303         TYPE_CODE_METHOD>: Use it.
3304         * python/py-value.c (valpy_call): Adjust call to
3305         call_function_by_hand.
3306         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3307         call_function_by_hand.
3308         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3309         call_function_by_hand.
3310         * valops.c (value_allocate_space_in_inferior): Adjust call to
3311         call_function_by_hand.
3312         * typeprint.c (type_print_unknown_return_type): New function.
3313         * typeprint.h (type_print_unknown_return_type): New declaration.
3314
3315 2017-09-04  Pedro Alves  <palves@redhat.com>
3316
3317         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3318         types with more than one parameter as prototyped.
3319
3320 2017-09-04  Pedro Alves  <palves@redhat.com>
3321
3322         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3323         (disassemble_command): Use gdb_disassembly_flags instead of bare
3324         int.
3325         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3326         (dump_insns, do_mixed_source_and_assembly_deprecated)
3327         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3328         Use gdb_disassembly_flags instead of bare int.
3329         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3330         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3331         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3332         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3333         (enum gdb_disassembly_flag): ... values of this new enumeration.
3334         (gdb_disassembly_flags): Define.
3335         (gdb_disassembly)
3336         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3337         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3338         gdb_disassembly_flags instead of bare int.
3339         * record-btrace.c (btrace_insn_history)
3340         (record_btrace_insn_history, record_btrace_insn_history_range)
3341         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3342         instead of bare int.
3343         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3344         Use gdb_disassembly_flags instead of bare int.
3345         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3346         Define.
3347         * target-delegates.c: Regenerate.
3348         * target.c (target_insn_history, target_insn_history_from)
3349         (target_insn_history_range): Use gdb_disassembly_flags instead of
3350         bare int.
3351         * target.h: Include "disasm.h".
3352         (struct target_ops) <to_insn_history, to_insn_history_from,
3353         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3354         int.
3355         (target_insn_history, target_insn_history_from)
3356         (target_insn_history_range): Use gdb_disassembly_flags instead of
3357         bare int.
3358
3359 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3360
3361         * cli/cli-script.c (build_command_line): For if/while commands,
3362         check whether args is empty.
3363
3364 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3365
3366         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3367         (enum command_control_type): Likewise.
3368         (struct command_line): Likewise.
3369         (free_command_lines): Likewise.
3370         (struct command_lines_deleter): Likewise.
3371         (command_line_up): Likewise.
3372         (read_command_lines): Likewise.
3373         (read_command_lines_1): Likewise.
3374         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3375         (enum command_control_type): Likewise.
3376         (struct command_line): Likewise.
3377         (free_command_lines): Likewise.
3378         (struct command_lines_deleter): Likewise.
3379         (command_line_up): Likewise.
3380         (read_command_lines): Likewise.
3381         (read_command_lines_1): Likewise.
3382         * breakpoint.h: Include cli/cli-script.h.
3383         * extension-priv.h: Likewise.
3384         * gdbcmd.h: Likewise.
3385
3386 2017-09-04  Pedro Alves  <palves@redhat.com>
3387
3388         * ada-lang.c (is_known_support_routine): Move sal declaration to
3389         where it is initialized.
3390         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3391         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3392         (clear_command, update_static_tracepoint): Remove init_sal
3393         references.  Move declarations closer to initializations.
3394         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3395         initializations.
3396         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3397         references.  Move sal declarations closer to initializations.
3398         * frame.c (find_frame_sal): Return a symtab_and_line via function
3399         return instead of output parameter.  Remove init_sal references.
3400         * frame.h (find_frame_sal): Return a symtab_and_line via function
3401         return instead of output parameter.
3402         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3403         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3404         instead of memset.
3405         (gdbscm_find_pc_line): Remove init_sal reference.
3406         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3407         references.  Move declarations closer to initializations.
3408         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3409         initializations.
3410         (finish_backward): Remove init_sal references.  Move declarations
3411         closer to initializations.
3412         * infrun.c (process_event_stop_test, handle_step_into_function)
3413         (insert_hp_step_resume_breakpoint_at_frame)
3414         (insert_step_resume_breakpoint_at_caller): Likewise.
3415         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3416         (symbol_to_sal): Likewise.
3417         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3418         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3419         to its initialization.
3420         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3421         init_sal references.  Move declarations closer to initializations.
3422         * source.c (get_current_source_symtab_and_line): Remove brace
3423         initialization.
3424         (set_current_source_symtab_and_line): Now takes the sal by const
3425         reference.  Remove brace initialization.
3426         (line_info): Remove init_sal reference.
3427         * source.h (set_current_source_symtab_and_line): Now takes a
3428         symtab_and_line via const reference.
3429         * stack.c (set_current_sal_from_frame): Adjust.
3430         (print_frame_info): Adjust.
3431         (get_last_displayed_sal): Return the sal via function return
3432         instead of via output parameter.  Simplify.
3433         (frame_info): Adjust.
3434         * stack.h (get_last_displayed_sal): Return the sal via function
3435         return instead of via output parameter.
3436         * symtab.c (init_sal): Delete.
3437         (find_pc_sect_line): Remove init_sal references.  Move
3438         declarations closer to initializations.
3439         (find_function_start_sal): Remove init_sal references.  Move
3440         declarations closer to initializations.
3441         * symtab.h (struct symtab_and_line): In-class initialize all
3442         fields.
3443         * tracepoint.c (set_traceframe_context)
3444         (print_one_static_tracepoint_marker): Remove init_sal references.
3445         Move declarations closer to initializations.
3446         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3447         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3448         declarations closer to initializations.
3449         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3450         init_sal references.  Adjust.
3451
3452 2017-09-04  Pedro Alves  <palves@redhat.com>
3453
3454         * ax-gdb.c (agent_command_1): Use range-for.
3455         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3456         * breakpoint.c: Include "common/array-view.h".
3457         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3458         parameter from struct symtabs_and_lines to
3459         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3460         (breakpoint_sals_to_pc): Change sals parameter from struct
3461         symtabs_and_lines to std::vector reference.
3462         (check_fast_tracepoint_sals): Change sals parameter from struct
3463         symtabs_and_lines to std::array_view.  Use range-for.
3464         (decode_static_tracepoint_spec): Return a std::vector instead of
3465         symtabs_and_lines.  Update.
3466         (create_breakpoint): Update.
3467         (break_range_command, until_break_command, clear_command): Update.
3468         (base_breakpoint_decode_location, bkpt_decode_location)
3469         (bkpt_probe_create_sals_from_location)
3470         (bkpt_probe_decode_location, tracepoint_decode_location)
3471         (tracepoint_probe_decode_location)
3472         (strace_marker_create_sals_from_location): Return a std::vector
3473         instead of symtabs_and_lines.
3474         (strace_marker_create_breakpoints_sal): Update.
3475         (strace_marker_decode_location): Return a std::vector instead of
3476         symtabs_and_lines.  Update.
3477         (update_breakpoint_locations): Change struct symtabs_and_lines
3478         parameters to gdb::array_view.  Adjust.
3479         (location_to_sals): Return a std::vector instead of
3480         symtabs_and_lines.  Update.
3481         (breakpoint_re_set_default): Use std::vector instead of struct
3482         symtabs_and_lines.
3483         (decode_location_default): Return a std::vector instead of
3484         symtabs_and_lines.  Update.
3485         * breakpoint.h: Include "common/array-view.h".
3486         (struct breakpoint_ops) <decode_location>: Now returns a
3487         std::vector instead of returning a symtabs_and_lines via output
3488         parameter.
3489         (update_breakpoint_locations): Change sals parameters to use
3490         gdb::array_view.
3491         * cli/cli-cmds.c (edit_command, list_command): Update to use
3492         std::vector and gdb::array_view.
3493         (ambiguous_line_spec): Adjust to use gdb::array_view and
3494         range-for.
3495         (compare_symtabs): Rename to ...
3496         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3497         const reference and adjust.
3498         (filter_sals): Rewrite using std::vector and standard algorithms.
3499         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3500         (jump_command): Update to use std::vector.
3501         * linespec.c (struct linespec_state) <canonical_names>: Update
3502         comment.
3503         (add_sal_to_sals_basic): Delete.
3504         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3505         (decode_line_2, create_sals_line_offset)
3506         (convert_address_location_to_sals, convert_linespec_to_sals)
3507         (convert_explicit_location_to_sals, parse_linespec)
3508         (event_location_to_sals, decode_line_full, decode_line_1)
3509         (decode_line_with_current_source)
3510         (decode_line_with_last_displayed, decode_objc)
3511         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3512         (linespec_result::~linespec_result): Adjust to use std::vector
3513         instead of symtabs_and_lines.
3514         * linespec.h (linespec_sals::sals): Now a std::vector.
3515         (struct linespec_result): Use std::vector, bool, and in-class
3516         initialization.
3517         (decode_line_1, decode_line_with_current_source)
3518         (decode_line_with_last_displayed): Return std::vector.
3519         * macrocmd.c (info_macros_command): Use std::vector.
3520         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3521         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3522         std::vector.
3523         * probe.h (parse_probes): Return a std::vector.
3524         * python/python.c (gdbpy_decode_line): Use std::vector and
3525         gdb::array_view.
3526         * source.c (select_source_symtab, line_info): Use std::vector.
3527         * stack.c (func_command): Use std::vector.
3528         * symtab.h (struct symtabs_and_lines): Delete.
3529         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3530
3531 2017-09-04  Pedro Alves  <palves@redhat.com>
3532
3533         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3534         unittests/array-view-selftests.c.
3535         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3536         * common/array-view.h: New file.
3537         * unittests/array-view-selftests.c: New file.
3538
3539 2017-09-04  Pedro Alves  <palves@redhat.com>
3540
3541         * cli/cli-cmds.c (edit_command): Pass message to
3542         ambiguous_line_spec.
3543         (list_command): Pass message to ambiguous_line_spec.  Say
3544         "first"/"last" instead of "start" and "end" to be consistent with
3545         the manual.
3546         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3547         them to print formatted message.
3548
3549 2017-09-04  Pedro Alves  <palves@redhat.com>
3550
3551         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3552         ftrace_update_insns by reference instead of pointer.
3553
3554 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3555
3556         * i386-go32-tdep.c: Include x86-xstate.h.
3557         (i386_go32_init_abi): Call i386_target_description.
3558         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3559         if xcr0 is X86_XSTATE_X87_MASK.
3560         * i386-tdep.h (tdesc_i386): Remove the declaration.
3561         (tdesc_i386_mmx): Likewise.
3562
3563 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3564
3565         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3566         X86_XSTATE_SSE_MASK instead of 0.
3567
3568 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3569
3570         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3571         i386_target_description.
3572         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3573         i386_target_description.
3574         * i386-tdep.c (i386_gdbarch_init): Likewise.
3575
3576 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3577
3578         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3579         (x86_darwin_init_abi_64): Call amd64_target_description.
3580         * amd64-dicos-tdep.c: Likewise.
3581         * amd64-fbsd-nat.c: Likewise.
3582         * amd64-fbsd-tdep.c: Likewise.
3583         * amd64-nbsd-tdep.c: Likewise.
3584         * amd64-obsd-tdep.c: Likewise.
3585         * amd64-sol2-tdep.c: Likewise.
3586         * amd64-windows-tdep.c: Likewise.
3587         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3588
3589 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3590
3591         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3592         (btrace_function) <insn>: Change type to use std::vector.
3593         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3594         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3595         ftrace_update_insns, ftrace_compute_global_level_offset,
3596         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3597         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3598         change to std::vector.
3599         (ftrace_update_insns): Adjust to change to std::vector, change
3600         type of INSN parameter.
3601         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3602         * record-btrace.c (btrace_call_history_insn_range,
3603         btrace_compute_src_line_range,
3604         record_btrace_frame_prev_register): Adjust to change to
3605         std::vector.
3606         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3607         to change to std::vector.
3608
3609 2017-09-03  Tom Tromey  <tom@tromey.com>
3610
3611         * corefile.c (reopen_exec_file): Use std::string.
3612
3613 2017-09-03  Tom Tromey  <tom@tromey.com>
3614
3615         * compile/compile.c (compile_register_name_mangled): Return
3616         std::string.
3617         * compile/compile-loc2c.c (pushf_register_address): Update.
3618         (pushf_register): Update.
3619         * compile/compile-c-types.c (convert_array): Update.
3620         * compile/compile-c-symbols.c (generate_vla_size): Update.
3621         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3622         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3623         (convert_one_symbol): Update.
3624         (generate_c_for_for_one_variable): Update.
3625         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3626         std::string.
3627         (generate_register_struct): Update.
3628         * compile/compile-internal.h (c_get_range_decl_name): Return a
3629         std::string.
3630         (compile_register_name_mangled): Return std::string.
3631
3632 2017-09-03  Tom Tromey  <tom@tromey.com>
3633
3634         * utils.c (perror_string): Return a std::string.
3635         (throw_perror_with_name, perror_warning_with_name): Update.
3636
3637 2017-09-03  Tom Tromey  <tom@tromey.com>
3638
3639         * demangle.c (demangle_command): Use std::string,
3640         unique_xmalloc_ptr.
3641
3642 2017-09-03  Tom Tromey  <tom@tromey.com>
3643
3644         * cli/cli-setshow.c (do_set_command): Use std::string.
3645
3646 2017-09-03  Tom Tromey  <tom@tromey.com>
3647
3648         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3649
3650 2017-09-03  Tom Tromey  <tom@tromey.com>
3651
3652         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3653
3654 2017-09-03  Tom Tromey  <tom@tromey.com>
3655
3656         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3657         gdb::unique_xmalloc_ptr.
3658
3659 2017-09-03  Tom Tromey  <tom@tromey.com>
3660
3661         * thread.c (print_thread_info_1): Use string_printf.
3662         (thread_apply_command, thread_apply_all_command): Use
3663         std::string.
3664
3665 2017-09-03  Tom Tromey  <tom@tromey.com>
3666
3667         * valprint.c (val_print_string): Update.
3668         * gdbcore.h (memory_error_message): Return std::string.
3669         * corefile.c (memory_error_message): Return std::string.
3670         (memory_error): Update.
3671         * breakpoint.c (insert_bp_location): Update.
3672
3673 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3674
3675         * target/waitstatus.h (target_waitstatus_to_string): Change
3676         return type to std::string.
3677         * target/waitstatus.c (target_waitstatus_to_string): Return
3678         std::string.
3679         * target.h (target_waitstatus_to_string): Remove declaration.
3680         * infrun.c (resume, clear_proceed_status_thread,
3681         print_target_wait_results, do_target_wait, save_waitstatus,
3682         stop_all_threads): Adjust.
3683         * record-btrace.c (record_btrace_wait): Adjust.
3684         * target-debug.h
3685         (target_debug_print_struct_target_waitstatus_p): Adjust.
3686
3687 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3688
3689         PR gdb/22046
3690         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3691         detection.
3692
3693 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3694
3695         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3696         for setting/unsetting environment variables on the remote target.
3697         (New remote packets): Add entries for QEnvironmentHexEncoded,
3698         QEnvironmentUnset and QEnvironmentReset.
3699         * common/environ.c (gdb_environ::operator=): Extend method to
3700         handle m_user_set_env_list and m_user_unset_env_list.
3701         (gdb_environ::clear): Likewise.
3702         (match_var_in_string): Change type of first parameter from 'char
3703         *' to 'const char *'.
3704         (gdb_environ::set): Extend method to handle
3705         m_user_set_env_list and m_user_unset_env_list.
3706         (gdb_environ::unset): Likewise.
3707         (gdb_environ::clear_user_set_env): New method.
3708         (gdb_environ::user_set_envp): Likewise.
3709         (gdb_environ::user_unset_envp): Likewise.
3710         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3711         m_user_unset_env_list on move constructor/assignment.
3712         (unset): Add new default parameter 'update_unset_list = true'.
3713         (clear_user_set_env): New method.
3714         (user_set_envp): Likewise.
3715         (user_unset_envp): Likewise.
3716         (m_user_set_env_list): New std::set.
3717         (m_user_unset_env_list): Likewise.
3718         * common/rsp-low.c (hex2str): New function.
3719         (bin2hex): New overload for bin2hex function.
3720         * common/rsp-low.c (hex2str): New prototype.
3721         (str2hex): New overload prototype.
3722         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3723         QEnvironmentUnset and QEnvironmentReset.
3724         (remote_protocol_features): Add QEnvironmentHexEncoded,
3725         QEnvironmentUnset and QEnvironmentReset packets.
3726         (send_environment_packet): New function.
3727         (extended_remote_environment_support): Likewise.
3728         (extended_remote_create_inferior): Call
3729         extended_remote_environment_support.
3730         (_initialize_remote): Add QEnvironmentHexEncoded,
3731         QEnvironmentUnset and QEnvironmentReset packet configs.
3732         * unittests/environ-selftests.c (gdb_selftest_env_var):
3733         New variable.
3734         (test_vector_initialization): New function.
3735         (test_init_from_host_environ): Likewise.
3736         (test_reinit_from_host_environ): Likewise.
3737         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3738         Likewise.
3739         (test_unset_set_empty_vector): Likewise.
3740         (test_vector_clear): Likewise.
3741         (test_std_move): Likewise.
3742         (test_move_constructor):
3743         (test_self_move): Likewise.
3744         (test_set_unset_reset): Likewise.
3745         (run_tests): Rewrite in terms of the functions above.
3746
3747 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3748
3749         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3750         (adi_available): Use a temp variable of type CORE_ADDR as argument
3751         3 when calling target_auxv_search.
3752         (adi_normalize_address): Use masks and xor operators to calculate
3753         normalized address.
3754         (adi_read_versions, adi_write_versions, adi_print_versions)
3755         (do_examine, do_assign): Use paddress.
3756
3757 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3758
3759         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3760         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3761         out of loop and add supply of FIR.
3762         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3763         add collect of FIR.
3764
3765 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3766
3767         PR gdb/21827
3768         * cli/cli-script.c (define_command): Don't convert command name
3769         to lower case.
3770
3771 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3772
3773         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3774         Update all callers accordingly. Remove all code blocks handling
3775         the case where DISPP is not NULL.
3776
3777 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3778
3779         PR symtab/22003
3780         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3781         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3782         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3783
3784 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3785
3786         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3787         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3788         (read_comp_units_from_section): New parameter abbrev_section, use
3789         read_and_check_comp_unit_head, allocate signatured_type if needed.
3790         (create_all_comp_units): Update read_comp_units_from_section caller.
3791
3792 2017-08-23  Pedro Alves  <palves@redhat.com>
3793
3794         PR remote/21852
3795         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3796         to null_ptid and switch to thread without reading the registers
3797         after adding the inferior.
3798
3799 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3800
3801         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3802         compile-gcc.
3803         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3804         (compile_to_object): Implement compile_gcc.
3805         (_initialize_compile): Install "set compile-gcc".  Initialize
3806         compile_gcc.
3807
3808 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3809
3810         * compile/compile.c (compile_to_object): Conditionally call
3811         set_verbose.  Conditionally call compile or compile_v0.
3812
3813 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3814
3815         * sparc64-tdep.h: (adi_normalize_address): New export.
3816         * sparc-nat.h: (open_adi_tag_fd): New export.
3817         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3818         * sparc64-linux-tdep.c:
3819         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3820         (sparc64_linux_handle_segmentation_fault): New function.
3821         (sparc64_linux_init_abi): Register
3822         sparc64_linux_handle_segmentation_fault
3823         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3824         (sparc64_addr_bits_remove): New function.
3825         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3826         (MAX_PROC_NAME_SIZE): New macro.
3827         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3828         (sparc64adilist): New variable.
3829         (adi_proc_list): New variable.
3830         (find_adi_info): New function.
3831         (add_adi_info): New function.
3832         (get_adi_info_proc): New function.
3833         (get_adi_info): New function.
3834         (info_adi_command): New function.
3835         (read_maps_entry): New function.
3836         (adi_available): New function.
3837         (adi_normalize_address): New function.
3838         (adi_align_address): New function.
3839         (adi_convert_byte_count): New function.
3840         (adi_tag_fd): New function.
3841         (adi_is_addr_mapped): New function.
3842         (adi_read_versions): New function.
3843         (adi_write_versions): New function.
3844         (adi_print_versions): New function.
3845         (do_examine): New function.
3846         (do_assign): New function.
3847         (adi_examine_command): New function.
3848         (adi_assign_command): New function.
3849         (_initialize_sparc64_adi_tdep): New function.
3850
3851 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3852
3853         * breakpoint.c (breakpoints_info): Rename to ...
3854         (info_breakpoints_command): ... this.
3855         (watchpoints_info): Rename to ...
3856         (info_watchpoints_command): ... this.
3857         (tracepoints_info): Rename to ...
3858         (info_tracepoints_command): ... this.
3859         (_initialize_breakpoint): Adjust.
3860         * dcache.c (dcache_info): Rename to ...
3861         (info_display_command): ... this.
3862         (_initialize_dcache): Adjust.
3863         * frame.h (args_info): Rename to ...
3864         (info_args_command): ... this.
3865         (locals_info): Rename to ...
3866         (info_locals_command): ... this.
3867         * infcmd.c (nofp_registers_info): Rename to ...
3868         (info_registers_command): ... this.
3869         (float_info): Rename to ...
3870         (info_float_command): ... this.
3871         (program_info): Rename to ...
3872         (info_program_command): ... this.
3873         (all_registers_info): Rename to ...
3874         (info_all_registers_command): ... this.
3875         (vector_info): Rename to ...
3876         (info_vector_command): ... this.
3877         (float_info): Rename to ...
3878         (info_float_command): ... this.
3879         (_initialize_infcmd): Adjust.
3880         * inferior.h (term_info): Rename to ...
3881         (info_terminal_command): ... this.
3882         * inflow.c (term_info): Rename to ...
3883         (info_terminal_command): ... this.
3884         (_initialize_inflow): Adjust.
3885         * infrun.c (signals_info): Rename to ...
3886         (info_signals_command): ... this.
3887         (_initialize_infrun): Adjust.
3888         * objc-lang.c (classes_info): Rename to ...
3889         (info_classes_command): ... this.
3890         (selectors_info): Rename to ...
3891         (info_selectors_command): ... this.
3892         (_initialize_objc_language): Adjust.
3893         * printcmd.c (sym_info): Rename to ...
3894         (info_symbol_command): ... this.
3895         (address_info): Rename to ...
3896         (info_address_command): ... this.
3897         (display_info): Rename to ...
3898         (info_display_command): ... this.
3899         (_initialize_printcmd): Adjust.
3900         * reverse.c (bookmarks_info): Rename to ...
3901         (info_breakpoints_command): ... this.
3902         (_initialize_reverse): Adjust.
3903         * ser-go32.c (dos_info): Rename to ...
3904         (info_serial_command): ... this.
3905         (_initialize_ser_dos): Adjust.
3906         * skip.c (skip_info): Rename to ...
3907         (info_skip_command): ... this.
3908         (_initialize_step_skip): Adjust.
3909         * source.c (line_info): Rename to ...
3910         (info_line_command): ... this.
3911         (source_info): Rename to ...
3912         (info_source_command)
3913         * stack.c (frame_info): Rename to ...
3914         (info_frame_command): ... this.
3915         (locals_info): Rename to ...
3916         (info_locals_command): ... this.
3917         (args_info): Rename to ...
3918         (info_args_command): ... this.
3919         (_initialize_stack): Adjust.
3920         * symtab.c (sources_info): Rename to ...
3921         (info_sources_command): ... this.
3922         (variables_info): Rename to ...
3923         (info_variables_command): ... this.
3924         (functions_info): Rename to ...
3925         (info_functions_command): ... this.
3926         (types_info): Rename to ...
3927         (info_types_command): ... this.
3928         (_initialize_symtab): Adjust.
3929         * target.c (target_info): Rename to ...
3930         (info_target_command): ... this.
3931         (initialize_targets): Adjust.
3932         * tracepoint.c (tvariables_info): Rename to ...
3933         (info_tvariables_command): ... this.
3934         (scope_info): Rename to ...
3935         (info_scope_command): ... this.
3936         (trace_dump_actions): Adjust.
3937         (_initialize_tracepoint): Adjust.
3938
3939 2017-08-22  Tom Tromey  <tom@tromey.com>
3940
3941         * breakpoint.h (install_breakpoint): Update.
3942         * breakpoint.c (add_solib_catchpoint): Update.
3943         (install_breakpoint): Change argument to a std::unique_ptr.
3944         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3945         (create_breakpoint_sal, create_breakpoint): Update.
3946         (watch_command_1, catch_exec_command_1)
3947         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3948         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3949         Return the breakpoint.
3950         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3951         (new_single_step_breakpoint): Update.
3952         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3953         std::unique_ptr.
3954         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3955         std::unique_ptr.
3956         * break-catch-sig.c (create_signal_catchpoint): Use
3957         std::unique_ptr.
3958         * ada-lang.c (create_ada_exception_catchpoint): Use
3959         std::unique_ptr.
3960
3961 2017-08-22  Tom Tromey  <tom@tromey.com>
3962
3963         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3964
3965 2017-08-22  Tom Tromey  <tom@tromey.com>
3966
3967         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3968         (lookup_partial_symbol): Update.
3969
3970 2017-08-22  Tom Tromey  <tom@tromey.com>
3971
3972         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3973         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3974         (find_and_open_source, symtab_to_fullname): Update.
3975         * psymtab.c (psymtab_to_fullname): Update.
3976
3977 2017-08-22  Tom Tromey  <tom@tromey.com>
3978
3979         * exec.c (exec_file_attach): Update.
3980         * linux-thread-db.c (try_thread_db_load): Update.
3981         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3982         * utils.c (gdb_realpath): Change return type.
3983         (gdb_realpath_keepfile): Update.
3984         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3985         (_initialize_utils): Register the new self test.
3986         * source.c (openp): Update.
3987         (find_and_open_source): Update.
3988         * nto-tdep.c (nto_find_and_open_solib): Update.
3989         * main.c (set_gdb_data_directory): Update.
3990         (captured_main_1): Update.
3991         * dwarf2read.c (dwarf2_get_dwz_file): Update
3992         (dw2_map_symbol_filenames): Update.
3993         * auto-load.c (auto_load_safe_path_vec_update): Update.
3994         (filename_is_in_auto_load_safe_path_vec): Change type of
3995         "filename_realp".
3996         (auto_load_objfile_script): Update.
3997         (file_is_auto_load_safe): Update.  Use std::string.
3998         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3999
4000 2017-08-22  Tom Tromey  <tom@tromey.com>
4001
4002         * utils.c (gdb_realpath_keepfile): Return a
4003         gdb::unique_xmalloc_ptr.
4004         * exec.c (exec_file_attach): Update.
4005         * utils.h (gdb_realpath_keepfile): Return a
4006         gdb::unique_xmalloc_ptr.
4007
4008 2017-08-22  Tom Tromey  <tom@tromey.com>
4009
4010         * compile/compile.c (compile_file_command): Use
4011         gdb::unique_xmalloc_ptr, std::string.
4012         * utils.c (gdb_abspath): Change return type.
4013         * source.c (openp): Update.
4014         * objfiles.c (allocate_objfile): Update.
4015         * main.c (set_gdb_data_directory): Update.
4016         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4017
4018 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
4019
4020         * cli-cmds.c (list_commands): List actual code around more than
4021         one location.
4022
4023 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
4024
4025         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4026
4027 2017-08-21  Pedro Alves  <palves@redhat.com>
4028
4029         PR gdb/19487
4030         * c-exp.y (variable production): Handle function aliases.
4031         * minsyms.c (msymbol_is_text): New function.
4032         * minsyms.h (msymbol_is_text): Declare.
4033         * symtab.c (find_function_alias_target): New function.
4034         * symtab.h (find_function_alias_target): Declare.
4035
4036 2017-08-21  Pedro Alves  <palves@redhat.com>
4037
4038         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4039         typedefs.
4040         * typeprint.c (whatis_exp): If handling "whatis", and expression
4041         is OP_TYPE, strip one typedef level.  Otherwise don't strip
4042         typedefs here.
4043         * valops.c (value_cast): Save "to" type before resolving
4044         stubs/typedefs.  Use that type as resulting value's type.
4045
4046 2017-08-18  Tom Tromey  <tom@tromey.com>
4047             Pedro Alves  <palves@redhat.com>
4048
4049         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4050         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4051         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4052         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4053         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4054         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4055         (linux_get_siginfo_data): Add "thread" argument.  Use
4056         scoped_restore.
4057         * linux-nat.c (linux_child_follow_fork)
4058         (check_stopped_by_watchpoint): Use scoped_restore.
4059         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4060         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4061         (restore_inferior_ptid, save_inferior_ptid): Remove.
4062         * btrace.c (btrace_fetch): Use scoped_restore.
4063         * bsd-uthread.c (bsd_uthread_fetch_registers)
4064         (bsd_uthread_store_registers): Use scoped_restore.
4065         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4066         scoped_restore.
4067         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4068         (aix_thread_xfer_partial): Use scoped_restore.
4069         * inferior.h (save_inferior_ptid): Remove.
4070
4071 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4072
4073         PR tdep/21818
4074         * arm-tdep.c (gdb_print_insn_arm): Mark
4075         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4076
4077 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4078
4079         * NEWS: Mention GDBserver's new option "--selftest".
4080         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4081         * selftest.c: Move it to common/selftest.c.
4082         * selftest.h: Move it to common/selftest.h.
4083         * selftest-arch.c (reset): New function.
4084         (tests_with_arch): Call reset.
4085
4086 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4087
4088         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4089         instead of exception_fprintf and printf_filtered.
4090
4091 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4092
4093         * selftest.c (register_self_test): Rename it to
4094         selftests::register_test.
4095         (run_self_tests): selftest::run_tests.
4096         * selftest.h: Update declarations.
4097         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4098         selftests::register_test_foreach_arch.
4099         * selftest-arch.h: Update declaration.
4100         * aarch64-tdep.c: Update.
4101         * arm-tdep.c: Likewise.
4102         * disasm-selftests.c: Likewise.
4103         * dwarf2loc.c: Likewise.
4104         * dwarf2-frame.c: Likewise.
4105         * findvar.c: Likewise.
4106         * gdbarch-selftests.c: Likewise.
4107         * maint.c (maintenance_selftest): Likewise.
4108         * regcache.c: Likewise.
4109         * rust-exp.y: Likewise.
4110         * selftest-arch.c: Likewise.
4111         * unittests/environ-selftests.c: Likewise.
4112         * unittests/function-view-selftests.c: Likewise.
4113         * unittests/offset-type-selftests.c: Likewise.
4114         * unittests/optional-selftests.c: Likewise.
4115         * unittests/scoped_restore-selftests.c: Likewise.
4116         * utils-selftests.c: Likewise.
4117
4118 2017-08-17  Pedro Alves  <palves@redhat.com>
4119
4120         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4121         local.
4122
4123 2017-08-17  Pedro Alves  <palves@redhat.com>
4124
4125         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4126         field.
4127         (reset_die_in_process): Delete, replaced by ...
4128         (process_die_scope): ... this new class.  Make it responsible for
4129         freeing cu->line_header too.
4130         (process_die): Use process_die_scope.
4131         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4132         cu->line_header_die_owner.  Don't release the line header if it's
4133         owned by the CU.
4134         (setup_type_unit_groups): Make the CU/DIE own the line header.
4135         Don't release the line header here.
4136
4137 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4138
4139         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4140
4141 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4142
4143         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4144         Single-Key mode
4145
4146 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4147
4148         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4149         mode command list.
4150
4151 2017-08-15  Stafford Horne  <shorne@gmail.com>
4152
4153         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4154
4155 2017-08-15  Stafford Horne  <shorne@gmail.com>
4156
4157         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4158
4159 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4160
4161         PR gdb/21954
4162         * infcmd.c (unset_environment_command): Use the 'clear' method on
4163         the environment instead of resetting it.
4164
4165 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4166
4167         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4168         platforms.
4169
4170 2017-08-14  Tom Tromey  <tom@tromey.com>
4171
4172         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4173         (print_binary_chars): Likewise.
4174         (BITS_IN_BYTES): Remove.
4175
4176 2017-08-14  Tom Tromey  <tom@tromey.com>
4177
4178         PR gdb/21675
4179         * valprint.c (LOW_ZERO): Change value to 034.
4180         (print_octal_chars): Add static_asserts for octal constants.
4181         * printcmd.c (print_scalar_formatted): Add 'd' case.
4182
4183 2017-08-11  Tom Tromey  <tom@tromey.com>
4184
4185         * symfile.c (add_symbol_file_command): Use std::vector.
4186
4187 2017-08-14  Tom Tromey  <tom@tromey.com>
4188
4189         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4190         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4191         std::move.
4192         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4193
4194 2017-08-11  Pedro Alves  <palves@redhat.com>
4195
4196         * infrun.c (process_event_stop_test): Adjust
4197         function_name_is_marked_for_skip call.
4198         * skip.c: Include <list>.
4199         (skiplist_entry): Make it a class with private fields, and
4200         getters/setters.
4201         (skiplist_entry_chain): Delete.
4202         (skiplist_entries): New.
4203         (skiplist_entry_count): Delete.
4204         (highest_skiplist_entry_num): New.
4205         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4206         (add_skiplist_entry): Delete.
4207         (skiplist_entry::skiplist_entry): New.
4208         (skiplist_entry::add_entry): New.
4209         (skip_file_command, skip_function): Adjust.
4210         (compile_skip_regexp): Delete.
4211         (skip_command): Don't compile regexp here.  Adjust to use
4212         skiplist_entry::add_entry.
4213         (skip_info): Adjust to use range-for and getters.
4214         (skip_enable_command, skip_disable_command): Adjust to use
4215         range-for and setters.
4216         (skip_delete_command): Adjust to use std::list.
4217         (add_skiplist_entry): Delete.
4218         (skip_file_p): Delete, refactored as ...
4219         (skiplist_entry::do_skip_file_p): ... this new method.
4220         (skip_gfile_p): Delete, refactored as ...
4221         (skiplist_entry::do_gskip_file_p): ... this new method.
4222         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4223         (skiplist_entry::skip_function_p): ... this new method.
4224         (function_name_is_marked_for_skip): Now returns bool, and takes
4225         the function sal by const reference.  Adjust to use range-for and
4226         skiplist_entry methods.
4227         (_initialize_step_skip): Remove references to
4228         skiplist_entry_chain, skiplist_entry_count.
4229         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4230         takes the function sal by const reference.
4231
4232 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4233
4234         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4235         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4236         (dwarf2_frame_cache):
4237         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4238         RETURN_MASK_ALL and set *this_case to NULL.
4239         * frame-unwind.h: Update comments.
4240
4241 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4242
4243         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4244         (dwarf2_frame_state_copy_regs): Remove.
4245         (dwarf2_frame_state_free_regs): Remove.
4246         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4247         (dwarf2_restore_rule): Call method .alloc_regs instead of
4248         dwarf2_frame_state_alloc_regs.
4249         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4250         constructor.  Call std::move.
4251         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4252         (dwarf2_frame_cache): Likewise.
4253
4254         [GDB_SELF_TEST]: Include selftest.h and
4255         selftest-arch.h.
4256         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4257         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4258         execute_cfa_program_test.
4259
4260         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4261         copy ctor, assignment operator, move assignment.
4262         <alloc_regs>: New method.
4263         <swap>: New method.
4264         (struct dwarf2_frame_state): Delete dtor.
4265         (dwarf2_frame_state_alloc_regs): Remove declaration.
4266         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4267         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4268
4269 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4270
4271         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4272         (dwarf2_frame_state::dwarf2_frame_state): New.
4273         (dwarf2_frame_state::~dwarf2_frame_state): New.
4274         (dwarf2_fetch_cfa_info): Update.
4275         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4276         rather than a pointer.  Update code.
4277         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4278         dtor.
4279         <data_align, code_align, retaddr_column>: Change them to const.
4280         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4281         to bool.
4282
4283 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4284
4285         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4286         <loc.exp>: New field.
4287         * dwarf2-frame.c (execute_cfa_program): Update.
4288         (dwarf2_frame_prev_register): Update.
4289
4290 2017-08-10  Pedro Alves  <palves@redhat.com>
4291
4292         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4293
4294 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4295
4296         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4297         (fbsd_pending_children): Use std::list.
4298         (fbsd_remember_child): Likewise.
4299         (fbsd_is_child_pending): Likewise.
4300         (fbsd_pending_vfork_done): Use std::forward_list.
4301         (fbsd_add_vfork_done): Likewise.
4302         (fbsd_is_vfork_done_pending): Likewise.
4303         (fbsd_next_vfork_done): Likewise.
4304
4305 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4306
4307         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4308         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4309         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4310         for `mapfilename'.
4311         (fbsd_xfer_partial): Use gdb::byte_vector.
4312         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4313
4314 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4315
4316         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4317         "filestuff.h".
4318         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4319
4320 2017-08-09  Tom Tromey  <tom@tromey.com>
4321
4322         * skip.c (skiplist_entry): New constructor.
4323         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4324         (skiplist_entry::file_is_glob): Now bool.
4325         (skiplist_entry::file, skiplist_entry::function): Now
4326         std::string.
4327         (make_skip_entry): Return a unique_ptr.  Use new.
4328         (free_skiplist_entry, free_skiplist_entry_cleanup)
4329         (make_free_skiplist_entry_cleanup): Remove.
4330         (skip_command, skip_disable_command, add_skiplist_entry)
4331         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4332         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4333         (function_name_is_marked_for_skip): Update.
4334         (skip_delete_command): Update.  Use delete.
4335
4336 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4337
4338         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4339         (aarch64_linux_core_read_description): New function.
4340         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4341
4342 2017-08-09  Pedro Alves  <palves@redhat.com>
4343
4344         * cp-name-parser.y (cp_comp_to_string): Return a
4345         gdb::unique_xmalloc_ptr<char>.
4346         * cp-support.c (replace_typedefs_qualified_name)
4347         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4348         (cp_canonicalize_string_full): Use op= instead of explicit
4349         convertion.
4350         (cp_class_name_from_physname, method_name_from_physname)
4351         (cp_func_name, cp_remove_params): Adjust to use
4352         gdb::unique_xmalloc_ptr<char>.
4353         * cp-support.h (cp_comp_to_string): Return a
4354         gdb::unique_xmalloc_ptr<char>.
4355         * python/py-type.c (typy_lookup_type): Adjust to use
4356         gdb::unique_xmalloc_ptr<char>.
4357
4358 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4359
4360         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4361
4362 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4363             Yao Qi  <yao.qi@linaro.org>
4364
4365         * cp-support.c (cp_canonicalize_string_full): Use
4366         gdb::unique_xmalloc_ptr<char>.
4367         (cp_canonicalize_string): Likewise.
4368
4369 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4370
4371         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4372         * regformats/i386/amd64-avx-avx512.dat: Remove.
4373         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4374         * regformats/i386/amd64-avx-mpx.dat:Remove.
4375         * regformats/i386/amd64-avx.dat: Remove.
4376         * regformats/i386/amd64-mpx.dat: Remove.
4377         * regformats/i386/i386-avx-avx512.dat: Remove.
4378         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4379         * regformats/i386/i386-avx-mpx.dat: Remove.
4380         * regformats/i386/i386-mmx.dat: Remove.
4381         * regformats/i386/i386-mpx.dat: Remove.
4382
4383 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4384
4385         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4386         * amd64-tdep.c: Don't include features/i386/x32*.c.
4387         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4388         functions.
4389         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4390         and i386/x32-avx-avx512.
4391         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4392         and i386/x32.xml.
4393         * features/i386/x32-avx-avx512.c: Removed.
4394         * features/i386/x32-avx-avx512.xml: Removed.
4395         * features/i386/x32-avx.c: Removed.
4396         * features/i386/x32-avx.xml: Removed.
4397         * features/i386/x32.c: Removed.
4398         * features/i386/x32.xml: Removed.
4399         * regformats/i386/x32-avx-avx512.dat: Removed.
4400         * regformats/i386/x32-avx.dat: Removed.
4401         * regformats/i386/x32.dat: Removed.
4402
4403 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4404
4405         PR breakpoints/21886
4406         * mem-break.c (default_memory_insert_breakpoint): Use
4407         `->placed_address' rather than `->reqstd_address' for the
4408         breakpoint location.
4409
4410 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4411
4412         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4413         assertions.
4414
4415 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4416
4417         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4418         a union of `tdep_info', `tdesc_data' and `id'.
4419         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4420         rather than `info.tdep_info'.
4421         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4422         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4423         * i386-tdep.c (i386_gdbarch_init): Likewise.
4424         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4425         * mips-tdep.c (mips_gdbarch_init): Likewise.
4426         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4427         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4428         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4429         `info.tdep_info'.
4430         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4431         `info.tdep_info'.
4432         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4433         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4434         `info.tdep_info'.
4435         * spu-tdep.c (spu_gdbarch_init): Likewise.
4436         * gdbarch.h: Regenerate.
4437
4438 2017-08-07  Leszek Swirski  <leszeks@google.com>
4439
4440         PR symtab/20899
4441         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4442
4443 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4444
4445         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4446         (gdbsim_open): Rename gdb_argv args object to argv.
4447
4448 2017-08-05  Tom Tromey  <tom@tromey.com>
4449
4450         * compile/compile-object-load.c (compile_object_load): Use
4451         gdb::unique_xmalloc_ptr.
4452         * cli/cli-dump.c (scan_filename): Rename from
4453         scan_filename_with_cleanup.  Change return type.
4454         (scan_expression): Rename from scan_expression_with_cleanup.
4455         Change return type.
4456         (dump_memory_to_file, dump_value_to_file, restore_command):
4457         Use gdb::unique_xmalloc_ptr.  Update.
4458         * cli/cli-cmds.c (find_and_open_script): Use
4459         gdb::unique_xmalloc_ptr.
4460         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4461         * symmisc.c (maintenance_print_symbols)
4462         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4463         * symfile.c (symfile_bfd_open, generic_load)
4464         (add_symbol_file_command, remove_symbol_file_command): Use
4465         gdb::unique_xmalloc_ptr.
4466         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4467         * psymtab.c (maintenance_print_psymbols): Use
4468         gdb::unique_xmalloc_ptr.
4469         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4470         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4471         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4472         (reload_shared_libraries_1): Likewise.
4473
4474 2017-08-05  Tom Tromey  <tom@tromey.com>
4475
4476         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4477         (rust_op_vector, rust_set_vector): New typedefs.
4478         (current_parser): New global.
4479         (work_obstack): Change to pointer type.  Update all users.
4480         (rust_ast, pstate): Remove globals.
4481         (struct rust_parser): New.
4482         (%union) <params, field_inits>: Change type.
4483         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4484         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4485         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4486         (convert_params_to_types, convert_params_to_expression): Change
4487         type of "params".
4488         (ast_string): Change type of "fields".
4489         (rust_parse): Make a rust_parser.  Remove cleanups.
4490         (rust_lex_tests): Make and install an auto_obstack.
4491
4492 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4493
4494         * configure.srv (ipa_x32_linux_regobj): New.
4495         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4496         instead of X86_TDESC_AVX512.
4497         (initialize_low_tracepoint): Call
4498         init_registers_x32_avx_avx512_linux.
4499
4500 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4501
4502         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4503
4504 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4505
4506         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4507
4508 2017-08-03  Tom Tromey  <tom@tromey.com>
4509
4510         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4511         Remove.
4512         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4513
4514 2017-08-03  Tom Tromey  <tom@tromey.com>
4515
4516         * python/py-param.c (compute_enum_values): Use gdb_argv.
4517
4518 2017-08-03  Tom Tromey  <tom@tromey.com>
4519
4520         * utils.h (struct gdb_argv_deleter): New.
4521         (gdb_argv): New class.
4522         * utils.c (gdb_argv::reset): New method.
4523         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4524         * tracefile.c (tsave_command): Use gdb_argv.
4525         * top.c (new_ui_command): Use gdb_argv.
4526         * symmisc.c (maintenance_print_symbols)
4527         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4528         * symfile.c (symbol_file_command, generic_load)
4529         (remove_symbol_file_command): Use gdb_argv.
4530         * stack.c (backtrace_command): Use gdb_argv.
4531         * source.c (add_path, show_substitute_path_command)
4532         (unset_substitute_path_command, set_substitute_path_command):
4533         Use gdb_argv.
4534         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4535         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4536         * remote.c (extended_remote_run, remote_put_command)
4537         (remote_get_command, remote_delete_command): Use gdb_argv.
4538         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4539         (gdbsim_open): Use gdb_argv.
4540         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4541         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4542         * procfs.c (procfs_info_proc): Use gdb_argv.
4543         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4544         * infrun.c (handle_command): Use gdb_argv.
4545         * inferior.c (add_inferior_command, clone_inferior_command):
4546         Use gdb_argv.
4547         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4548         * exec.c (exec_file_command): Use gdb_argv.
4549         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4550         * compile/compile.c (build_argc_argv): Use gdb_argv.
4551
4552 2017-08-03  Tom Tromey  <tom@tromey.com>
4553
4554         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4555
4556 2017-08-03  Tom Tromey  <tom@tromey.com>
4557
4558         * python/python.c (compute_python_string): Return std::string.
4559         (gdbpy_eval_from_control_command): Update.
4560         (do_start_initialization): Use std::string.
4561         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4562         xstrprintf.
4563         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4564         xstrprintf.
4565
4566 2017-08-03  Tom Tromey  <tom@tromey.com>
4567
4568         * top.h (do_restore_instream_cleanup): Remove.
4569         * top.c (do_restore_instream_cleanup): Remove.
4570         (read_command_file): Use scoped_restore.
4571         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4572
4573 2017-08-03  Tom Tromey  <tom@tromey.com>
4574
4575         * cli/cli-script.c (execute_user_command)
4576         (execute_control_command): Use scoped_restore.
4577
4578 2017-08-03  Tom Tromey  <tom@tromey.com>
4579
4580         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4581         (execute_user_command): Remove user_call_depth; use
4582         user_args_stack's size instead.
4583
4584 2017-08-03  Tom Tromey  <tom@tromey.com>
4585
4586         * top.h (in_user_command): Remove.
4587         * top.c (in_user_command): Remove.
4588         * cli/cli-script.c (do_restore_user_call_depth)
4589         (execute_user_command): Update.
4590
4591 2017-08-03  Tom Tromey  <tom@tromey.com>
4592
4593         * valops.c (search_struct_method): Use gdb::byte_vector.
4594         * valarith.c (value_concat): Use std::vector.
4595         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4596         (simple_search_memory): Likewise.
4597         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4598         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4599         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4600         * elfread.c (elf_rel_plt_read): Use std::string.
4601         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4602         * cli/cli-dump.c (restore_section_callback): Use
4603         gdb::byte_vector.
4604
4605 2017-08-03  Tom Tromey  <tom@tromey.com>
4606
4607         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4608
4609 2017-08-03  Tom Tromey  <tom@tromey.com>
4610
4611         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4612         (tui_register_format): Use scoped_restore.
4613
4614 2017-08-03  Tom Tromey  <tom@tromey.com>
4615
4616         * reverse.c (exec_direction_default): Remove.
4617         (exec_reverse_once): Use scoped_restore.
4618         * remote.c (restore_remote_timeout): Remove.
4619         (remote_flash_erase, remote_flash_write, remote_flash_done)
4620         (readchar, remote_serial_write): Use scoped_restore.
4621         * cli/cli-script.c (struct source_cleanup_lines_args)
4622         (source_cleanup_lines): Remove.
4623         (script_from_file): Use scoped_restore.
4624         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4625         (source_command): Use scoped_restore.
4626
4627 2017-08-03  Tom Tromey  <tom@tromey.com>
4628
4629         * utils.h (make_cleanup_free_so): Remove.
4630         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4631         * solist.h (struct so_deleter): New.
4632         (so_list_up): New typedef.
4633         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4634
4635 2017-08-03  Tom Tromey  <tom@tromey.com>
4636
4637         * utils.h (make_cleanup_restore_current_language): Remove.
4638         * utils.c (do_restore_current_language)
4639         (make_cleanup_restore_current_language): Remove.
4640         * parse.c (parse_exp_in_context_1)
4641         (parse_expression_with_language): Use
4642         scoped_restore_current_language.
4643         * mi/mi-main.c (mi_cmd_execute): Use
4644         scoped_restore_current_language.
4645         * language.h (scoped_restore_current_language): New class.
4646
4647 2017-08-03  Tom Tromey  <tom@tromey.com>
4648
4649         * compile/compile.c (cleanup_unlink_file): Remove.
4650         (compile_to_object): Use gdb::unlinker.
4651         (eval_compile_command): Likewise.
4652
4653 2017-08-03  Tom Tromey  <tom@tromey.com>
4654
4655         * utils.h (make_cleanup_fclose): Remove.
4656         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4657
4658 2017-08-03  Tom Tromey  <tom@tromey.com>
4659
4660         * top.c (open_terminal_stream): Return gdb_file_up.
4661         (new_ui_command): Update.
4662
4663 2017-08-03  Tom Tromey  <tom@tromey.com>
4664
4665         * source.c (print_source_lines_base, forward_search_command)
4666         (reverse_search_command): Use gdb_file_up.
4667
4668 2017-08-03  Tom Tromey  <tom@tromey.com>
4669
4670         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4671
4672 2017-08-03  Tom Tromey  <tom@tromey.com>
4673
4674         * cli/cli-cmds.c (find_and_open_script): Change return type.
4675         Remove "streamp" and "full_path" parameters.
4676         (source_script_with_search): Update.
4677         * auto-load.c (source_script_file): Update.
4678         * cli/cli-cmds.h (find_and_open_script): Change type.
4679         (open_script): New struct.
4680
4681 2017-08-03  Tom Tromey  <tom@tromey.com>
4682
4683         * xml-support.c (xml_fetch_content_from_file): Update.
4684         * ui-file.c (stdio_file::open): Update.
4685         * tracefile-tfile.c (tfile_start): Update.
4686         * remote.c (remote_file_put, remote_file_get): Update.
4687         * nat/linux-procfs.c (linux_proc_get_int)
4688         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4689         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4690         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4691         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4692         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4693         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4694         * linux-nat.c (linux_proc_pending_signals): Update.
4695         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4696         (file_closer): Remove.
4697         * compile/compile.c (compile_to_object): Update.
4698         * common/filestuff.h (struct gdb_file_deleter): New.
4699         (gdb_file_up): New typedef.
4700         (gdb_fopen_cloexec): Change return type.
4701         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4702         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4703         (dump_binary_file, restore_binary_file): Update.
4704         * auto-load.c (auto_load_objfile_script_1): Update.
4705
4706 2017-08-03  Tom Tromey  <tom@tromey.com>
4707
4708         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4709         (info_static_tracepoint_markers_command): Likewise.
4710         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4711         * skip.c (skip_info): Use ui_out_emit_table.
4712         * progspace.c (print_program_space): Use ui_out_emit_table.
4713         * osdata.c (info_osdata): Use ui_out_emit_table.
4714         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4715         ui_out_emit_table.
4716         * linux-thread-db.c (info_auto_load_libthread_db): Use
4717         ui_out_emit_table.
4718         * inferior.c (print_inferior): Use ui_out_emit_table.
4719         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4720         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4721         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4722         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4723         * ui-out.h (class ui_out_emit_table): New.
4724
4725 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4726
4727         * mips-tdep.c (mips_fpu_type_str): New function.
4728         (mips_dump_tdep): Call it.
4729
4730 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4731
4732         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4733         `->mips_fpu_type'.
4734
4735 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4736
4737         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4738
4739 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4740
4741         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4742
4743 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4744
4745         * cli/cli-cmds.c (maintenancechecklist): New variable.
4746         * gdbcmd.h (maintenancechecklist): Declare it.
4747         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4748         Call i386_linux_read_description with different masks.
4749         * maint.c (maintenance_check_command): New function.
4750         (_initialize_maint_cmds): Call add_prefix_cmd.
4751         * target-descriptions.c (tdesc_reg): override operator != and ==.
4752         (tdesc_type): Likewise.
4753         (tdesc_feature): Likewise.
4754         (target_desc): Likewise.
4755         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4756         (maintenance_check_xml_descriptions): New function.
4757         (_initialize_target_descriptions) Add command "xml-descriptions".
4758         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4759
4760 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4761
4762         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4763         Include features/i386/32bit-*.c.
4764         (i386_linux_read_description): Generate target description if it
4765         doesn't exist.
4766         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4767         functions.
4768         * features/i386/32bit-linux.c: Re-generated.
4769         * features/i386/32bit-sse.c: Likewise.
4770         * target-descriptions.c (print_c_feature::visit): Print code to
4771         set register number if needed.
4772         (print_c_feature) <m_next_regnum>: New field.
4773
4774 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4775
4776         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4777         (FEATURE_XMLFILES): New.
4778         (FEATURE_CFILES): New.
4779         New rules.
4780         (clean-cfiles): Remove generated c files.
4781         * features/i386/32bit-avx.c: Generated.
4782         * features/i386/32bit-avx512.c: Generated.
4783         * features/i386/32bit-core.c: Generated.
4784         * features/i386/32bit-linux.c: Generated.
4785         * features/i386/32bit-mpx.c: Generated.
4786         * features/i386/32bit-pkeys.c: Generated.
4787         * features/i386/32bit-sse.c: Generated.
4788         * target-descriptions.c: Include algorithm.
4789         (tdesc_element_visitor): Add method visit_end.
4790         (print_c_tdesc): Implement visit_end.
4791         (print_c_tdesc:: m_filename_after_features): Move it to
4792         protected.
4793         (print_c_feature): New class.
4794         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4795         name starts with "i386/32bit-".
4796
4797 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4798
4799         * target-descriptions.c (tdesc_element_visitor): New class.
4800         (tdesc_element): New class.
4801         (tdesc_reg): Inherit from tdesc_element.
4802         (tdesc_reg::accept): New function.
4803         (tdesc_type): Inherit from tdesc_element.
4804         (tdesc_type::accept): New function.
4805         (tdesc_feature): Inherit from tdesc_element.
4806         (tdesc_feature::accept): New function.
4807         (target_desc): Inherit from tdesc_element.
4808         (target_desc::target_desc): New.
4809         (target_desc::~target_desc): New.
4810         (target_desc::accept): New.
4811         (allocate_target_description): Use new.
4812         (free_target_description): Use delete.
4813         (print_c_tdesc): New class.
4814         (maint_print_c_tdesc_cmd): Adjust.
4815
4816         * features/aarch64.c: Re-generated.
4817         * features/arc-arcompact.c: Re-generated.
4818         * features/arc-v2.c: Re-generated.
4819         * features/arm/arm-with-iwmmxt.c: Re-generated.
4820         * features/arm/arm-with-m.c: Re-generated.
4821         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4822         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4823         * features/arm/arm-with-neon.c: Re-generated.
4824         * features/arm/arm-with-vfpv2.c: Re-generated.
4825         * features/arm/arm-with-vfpv3.c: Re-generated.
4826         * features/i386/amd64-avx-avx512.c: Re-generated.
4827         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4828         * features/i386/amd64-avx.c: Re-generated.
4829         * features/i386/amd64-avx-linux.c: Re-generated.
4830         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4831         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4832         * features/i386/amd64-avx-mpx.c: Re-generated.
4833         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4834         * features/i386/amd64.c: Re-generated.
4835         * features/i386/amd64-linux.c: Re-generated.
4836         * features/i386/amd64-mpx.c: Re-generated.
4837         * features/i386/amd64-mpx-linux.c: Re-generated.
4838         * features/i386/i386-avx-avx512.c: Re-generated.
4839         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4840         * features/i386/i386-avx.c: Re-generated.
4841         * features/i386/i386-avx-linux.c: Re-generated.
4842         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4843         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4844         * features/i386/i386-avx-mpx.c: Re-generated.
4845         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4846         * features/i386/i386.c: Re-generated.
4847         * features/i386/i386-linux.c: Re-generated.
4848         * features/i386/i386-mmx.c: Re-generated.
4849         * features/i386/i386-mmx-linux.c: Re-generated.
4850         * features/i386/i386-mpx.c: Re-generated.
4851         * features/i386/i386-mpx-linux.c: Re-generated.
4852         * features/i386/x32-avx-avx512.c: Re-generated.
4853         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4854         * features/i386/x32-avx.c: Re-generated.
4855         * features/i386/x32-avx-linux.c: Re-generated.
4856         * features/i386/x32.c: Re-generated.
4857         * features/i386/x32-linux.c: Re-generated.
4858         * features/microblaze.c: Re-generated.
4859         * features/microblaze-with-stack-protect.c: Re-generated.
4860         * features/mips64-dsp-linux.c: Re-generated.
4861         * features/mips64-linux.c: Re-generated.
4862         * features/mips-dsp-linux.c: Re-generated.
4863         * features/mips-linux.c: Re-generated.
4864         * features/nds32.c: Re-generated.
4865         * features/nios2.c: Re-generated.
4866         * features/nios2-linux.c: Re-generated.
4867         * features/rs6000/powerpc-32.c: Re-generated.
4868         * features/rs6000/powerpc-32l.c: Re-generated.
4869         * features/rs6000/powerpc-403.c: Re-generated.
4870         * features/rs6000/powerpc-403gc.c : Re-generated.
4871         * features/rs6000/powerpc-405.c: Re-generated.
4872         * features/rs6000/powerpc-505.c: Re-generated.
4873         * features/rs6000/powerpc-601.c: Re-generated.
4874         * features/rs6000/powerpc-602.c: Re-generated.
4875         * features/rs6000/powerpc-603.c: Re-generated.
4876         * features/rs6000/powerpc-604.c: Re-generated.
4877         * features/rs6000/powerpc-64.c: Re-generated.
4878         * features/rs6000/powerpc-64l.c: Re-generated.
4879         * features/rs6000/powerpc-7400.c: Re-generated.
4880         * features/rs6000/powerpc-750.c: Re-generated.
4881         * features/rs6000/powerpc-860.c: Re-generated.
4882         * features/rs6000/powerpc-altivec32.c: Re-generated.
4883         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4884         * features/rs6000/powerpc-altivec64.c: Re-generated.
4885         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4886         * features/rs6000/powerpc-cell32l.c: Re-generated.
4887         * features/rs6000/powerpc-cell64l.c: Re-generated.
4888         * features/rs6000/powerpc-e500.c: Re-generated.
4889         * features/rs6000/powerpc-e500l.c: Re-generated.
4890         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4891         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4892         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4893         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4894         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4895         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4896         * features/rs6000/powerpc-vsx32.c: Re-generated.
4897         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4898         * features/rs6000/powerpc-vsx64.c: Re-generated.
4899         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4900         * features/rs6000/rs6000.c: Re-generated.
4901         * features/s390-linux32.c: Re-generated.
4902         * features/s390-linux32v1.c: Re-generated.
4903         * features/s390-linux32v2.c: Re-generated.
4904         * features/s390-linux64.c: Re-generated.
4905         * features/s390-linux64v1.c: Re-generated.
4906         * features/s390-linux64v2.c: Re-generated.
4907         * features/s390-te-linux64.c: Re-generated.
4908         * features/s390-tevx-linux64.c: Re-generated.
4909         * features/s390-vx-linux64.c: Re-generated.
4910         * features/s390x-linux64.c: Re-generated.
4911         * features/s390x-linux64v1.c: Re-generated.
4912         * features/s390x-linux64v2.c: Re-generated.
4913         * features/s390x-te-linux64.c: Re-generated.
4914         * features/s390x-tevx-linux64.c: Re-generated.
4915         * features/s390x-vx-linux64.c: Re-generated.
4916         * features/sparc/sparc32-solaris.c: Re-generated.
4917         * features/sparc/sparc64-solaris.c: Re-generated.
4918         * features/tic6x-c62x.c: Re-generated.
4919         * features/tic6x-c62x-linux.c: Re-generated.
4920         * features/tic6x-c64x.c: Re-generated.
4921         * features/tic6x-c64x-linux.c: Re-generated.
4922         * features/tic6x-c64xp.c: Re-generated.
4923         * features/tic6x-c64xp-linux.c: Re-generated.
4924
4925 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4926
4927         * i386-linux-tdep.c (i386_linux_read_description): New function.
4928         (i386_linux_core_read_description): Call
4929         i386_linux_read_description.
4930         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4931         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4932         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4933         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4934         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4935         * x86-linux-nat.c (x86_linux_read_description): Call
4936         i386_linux_read_description.
4937
4938 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4939
4940         * NEWS: Mention it.
4941         * features/Makefile (%.c: %.xml): Pass the xml file name to
4942         command "maint print c-tdesc".
4943         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4944         name from 'arg'.
4945
4946 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4947
4948         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4949         in-class initialization.
4950         (tdesc_create_feature): Call new instead of XCNEW.
4951         (free_target_description): Ue delete.
4952
4953 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4954
4955         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4956
4957 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4958
4959         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4960         constant.
4961         (amd64_x32_init_abi): Likewise.
4962         * amd64-tdep.h (amd64_init_abi): Update declaration.
4963         (amd64_x32_init_abi): Likewise.
4964
4965 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4966
4967         PR tdep/21717
4968         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4969         condition for FPSCR.
4970         (arm_linux_store_inferior_registers): Likewise.
4971
4972 2017-07-22  Tom Tromey  <tom@tromey.com>
4973
4974         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4975         <syscalls_counts>: Now a std::vector.
4976         (get_catch_syscall_inferior_data): Use "new".
4977         (catch_syscall_inferior_data_cleanup): Use "delete".
4978         (insert_catch_syscall, remove_catch_syscall)
4979         (clear_syscall_counts): Update.
4980
4981 2017-07-22  Tom Tromey  <tom@tromey.com>
4982
4983         * break-catch-syscall.c (syscall_catchpoint)
4984         <syscalls_to_be_caught>: Now a std::vector<int>
4985         (~syscall_catchpoint): Remove.
4986         (insert_catch_syscall, remove_catch_syscall)
4987         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4988         (print_mention_catch_syscall, print_recreate_catch_syscall):
4989         Update.
4990         (create_syscall_event_catchpoint): Change type of "filter"
4991         parameter.
4992         (catch_syscall_split_args): Return a std::vector.
4993         (catch_syscall_command_1, catching_syscall_number_1): Update.
4994
4995 2017-07-22  Tom Tromey  <tom@tromey.com>
4996
4997         * break-catch-throw.c (struct exception_catchpoint)
4998         <exception_rx>: Now a std::string.
4999         (~exception_catchpoint): Remove.
5000         (print_one_detail_exception_catchpoint): Update.
5001         (handle_gnu_v3_exceptions): Change type of except_rx.
5002         (extract_exception_regexp): Return a std::string.
5003         (catch_exception_command_1): Update.
5004
5005 2017-07-22  Tom Tromey  <tom@tromey.com>
5006
5007         * break-catch-sig.c (gdb_signal_type): Remove typedef.
5008         (struct signal_catchpoint) <signals_to_be_caught>: Now a
5009         std::vector.
5010         <catch_all>: Now a bool.
5011         (~signal_catchpoint): Remove.
5012         (signal_catchpoint_insert_location)
5013         (signal_catchpoint_remove_location)
5014         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5015         (signal_catchpoint_print_mention)
5016         (signal_catchpoint_print_recreate)
5017         (signal_catchpoint_explains_signal): Update.
5018         (create_signal_catchpoint): Change type of "filter" and
5019         "catch_all".
5020         (catch_signal_split_args): Return a std::vector.  Change type of
5021         "catch_all".
5022         (catch_signal_command): Update.
5023
5024 2017-07-20  Pedro Alves  <palves@redhat.com>
5025
5026         * ada-lang.c (ada_language_defn): Make extern.
5027         (_initialize_ada_language): Remove add_language call.
5028         * c-lang.c (c_language_defn, cplus_language_defn)
5029         (asm_language_defn, minimal_language_defn): Make extern.
5030         (_initialize_c_language): Delete.
5031         * completer.c (compare_cstrings): Delete, moved to utils.h.
5032         * d-lang.c (d_language_defn): Make extern.
5033         (_initialize_d_language): Remove add_language calls.
5034         * defs.h (enum language): Add comment.
5035         * f-lang.c (f_language_defn): Make extern.
5036         (_initialize_f_language): Remove add_language call.
5037         * go-lang.c (go_language_defn): Make extern.
5038         (_initialize_go_language): Remove add_language call.
5039         * language.c: Include <algorithm>.
5040         (languages): Redefine as const array.
5041         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5042         (set_language_command): Handle "local".  Use for-range loop.
5043         (set_language): Remove loop.
5044         (language_enum): Rewrite.
5045         (language_def, language_str): Remove loops.
5046         (add_language): Delete.
5047         (add_set_language_command): New, based on add_languages.
5048         (skip_language_trampoline): Adjust.
5049         (local_language_defn): Delete.
5050         (language_gdbarch_post_init): Adjust.
5051         (_initialize_language): Remove add_language calls.  Call
5052         add_set_language_command.
5053         * language.h (add_language): Delete.
5054         (auto_language_defn)
5055         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5056         (asm_language_defn, c_language_defn, cplus_language_defn)
5057         (d_language_defn, f_language_defn, go_language_defn)
5058         (m2_language_defn, objc_language_defn, opencl_language_defn)
5059         (pascal_language_defn, rust_language_defn): Declare.
5060         * m2-lang.c (m2_language_defn): Make extern.
5061         (_initialize_m2_language): Remove add_language call.
5062         * objc-lang.c (objc_language_defn): Make extern.
5063         (_initialize_objc_language): Remove add_language call.
5064         * opencl-lang.c (opencl_language_defn): Make extern.
5065         (_initialize_opencl_language): Remove add_language call.
5066         * p-lang.c (pascal_language_defn): Make extern.
5067         (_initialize_pascal_language): Delete.
5068         * rust-lang.c (rust_language_defn): Make extern.
5069         (_initialize_rust_language): Delete.
5070         * utils.h (compare_cstrings): New static inline function.
5071
5072 2017-07-20  Pedro Alves  <palves@redhat.com>
5073
5074         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5075         (get_var_value): Constify parameters.
5076         (get_int_var_value): Change prototype.
5077         (to_fixed_range_type): Adjust.
5078         * ada-lang.h (get_int_var_value): Change prototype.
5079
5080 2017-07-20  Pedro Alves  <palves@redhat.com>
5081
5082         * dwarf2read.c (dw2_lookup_symbol): Use
5083         SYMBOL_MATCHES_SEARCH_NAME.
5084         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5085
5086 2017-07-20  Pedro Alves  <palves@redhat.com>
5087
5088         * block.c (block_iter_name_step, block_iter_name_first)
5089         (block_iter_name_next): Delete.
5090         (block_lookup_symbol_primary): Adjust to use
5091         dict_iter_match_first/dict_iter_match_next.
5092         * block.h (block_iter_name_first, block_iter_name_next): Delete
5093         declarations.
5094         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5095         dict_iter_match_first/dict_iter_match_next.
5096
5097 2017-07-20  Pedro Alves  <palves@redhat.com>
5098
5099         * cp-support.c (cp_find_first_component_aux): Add missing case for
5100         end of string.
5101
5102 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5103
5104         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5105         of dwo_cu's dwo_file.
5106
5107 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5108
5109         * remote.c (store_registers_using_G): Remove one line comment.
5110
5111 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5112
5113         * regcache.c (regcache_cpy): Simplify it.
5114         (regcache::cpy_no_passthrough): Remove it.
5115         * regcache.h (cpy_no_passthrough): Remove it.
5116         (regcache_dup, regcache_cpy): Update comments.
5117
5118 2017-07-18  Pedro Alves  <palves@redhat.com>
5119
5120         * remote-sim.c (sim_command_completer): Adjust to work with a
5121         completion_tracker instead of a VEC.
5122
5123 2017-07-17  Pedro Alves  <palves@redhat.com>
5124
5125         * completer.c (complete_source_filenames): New function.
5126         (complete_address_and_linespec_locations): New function.
5127         (location_completer): Use complete_address_and_linespec_locations.
5128         (completion_tracker::build_completion_result): Honor the tracker's
5129         request to suppress append.
5130         * completer.h (completion_tracker::suppress_append_ws)
5131         (completion_tracker::set_suppress_append_ws): New methods.
5132         (completion_tracker::m_suppress_append_ws): New field.
5133         (complete_source_filenames): New declaration.
5134         * linespec.c (linespec_complete_what): New.
5135         (struct ls_parser) <complete_what, completion_word,
5136         completion_quote_char, completion_quote_end, completion_tracker>:
5137         New fields.
5138         (string_find_incomplete_keyword_at_end): New.
5139         (linespec_lexer_lex_string): Record quote char.  If in completion
5140         mode, don't throw.
5141         (linespec_lexer_consume_token): Advance the completion word point.
5142         (linespec_lexer_peek_token): Save/restore completion info.
5143         (save_stream_and_consume_token): New.
5144         (set_completion_after_number): New.
5145         (linespec_parse_basic): Set what to complete next depending on
5146         token.  Handle function and label completions specially.
5147         (parse_linespec): Disable objc shortcut in completion mode.  Set
5148         what to complete next depending on token type.  Skip keyword if in
5149         completion mode.
5150         (complete_linespec_component, linespec_complete): New.
5151         * linespec.h (linespec_complete): Declare.
5152
5153 2017-07-17  Pedro Alves  <palves@redhat.com>
5154
5155         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5156         Handle 'operator<' / 'operator<<'.
5157
5158 2017-07-17  Pedro Alves  <palves@redhat.com>
5159
5160         * completer.c (collect_explicit_location_matches): Handle
5161         MATCH_LABEL.
5162         (convert_explicit_location_to_linespec): New, factored out from
5163         ...
5164         (convert_explicit_location_to_sals): ... this.
5165         (complete_label): New.
5166         (linespec_complete_label, find_label_symbols_in_block): New.
5167         (find_label_symbols): Add completion_mode parameter and adjust to
5168         call find_label_symbols_in_block.
5169         * linespec.h (linespec_complete_label): Declare.
5170
5171 2017-07-17  Pedro Alves  <palves@redhat.com>
5172
5173         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5174         complete_symbol_mode parameter.
5175         * cli/cli-cmds.c (complete_command): Get the completion result out
5176         of the handle_brkchars tracker if used a custom word point.
5177         * completer.c: Include "linespec.h".
5178         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5179         (advance_to_expression_complete_word_point): New.
5180         (completion_tracker::completes_to_completion_word): New.
5181         (complete_files_symbols): Pass down
5182         complete_symbol_mode::EXPRESSION.
5183         (explicit_options, probe_options): New.
5184         (collect_explicit_location_matches): Complete on the
5185         explictit_loc->foo instead of word.  Use
5186         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5187         keyword and options completions.
5188         (backup_text_ptr): Delete.
5189         (skip_keyword): New.
5190         (complete_explicit_location): Remove 'word' parameter.  Add
5191         language, quoted_arg_start and quoted_arg_end parameters.
5192         Rewrite, parsing left to right.
5193         (location_completer): Rewrite.
5194         (location_completer_handle_brkchars): New function.
5195         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5196         (enum complete_line_internal_reason): Adjust comments.
5197         (completion_tracker::discard_completions): New.
5198         (completer_handle_brkchars_func_for_completer): Handle
5199         location_completer.
5200         (gdb_custom_word_point_brkchars)
5201         (gdb_org_rl_basic_quote_characters): New.
5202         (gdb_completion_word_break_characters_throw)
5203         (completion_find_completion_word): Handle trackers that use a
5204         custom word point.
5205         (completion_tracker::advance_custom_word_point_by): New.
5206         (completion_tracker::build_completion_result): Don't rely on
5207         readline appending the quote char.
5208         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5209         use a custom word point.
5210         (gdb_rl_attempted_completion_function): Restore
5211         rl_basic_quote_characters.
5212         * completer.h (class completion_tracker): Extend intro comment.
5213         (completion_tracker::set_quote_char)
5214         (completion_tracker::quote_char)
5215         (completion_tracker::set_use_custom_word_point)
5216         (completion_tracker::use_custom_word_point)
5217         (completion_tracker::custom_word_point)
5218         (completion_tracker::set_custom_word_point)
5219         (completion_tracker::advance_custom_word_point_by)
5220         (completion_tracker::completes_to_completion_word)
5221         (completion_tracker::discard_completions): New methods.
5222         (completion_tracker::m_quote_char)
5223         (completion_tracker::m_use_custom_word_point)
5224         (completion_tracker::m_custom_word_point): New fields.
5225         (advance_to_expression_complete_word_point): Declare.
5226         * f-lang.c (f_collect_symbol_completion_matches): Add
5227         complete_symbol_mode parameter.
5228         * language.h (struct language_defn)
5229         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5230         parameter.
5231         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5232         (linespec_complete_function): New function.
5233         (linespec_lexer_lex_keyword): Adjust.
5234         * linespec.h (linespec_keywords, linespec_complete_function): New
5235         declarations.
5236         * location.c (find_end_quote): New function.
5237         (explicit_location_lex_one): Add explicit_completion_info
5238         parameter.  Save quoting info.  Don't throw if being called for
5239         completion.  Don't handle Ada operators here.
5240         (is_cp_operator, skip_op_false_positives, first_of)
5241         (explicit_location_lex_one_function): New function.
5242         (string_to_explicit_location): Replace 'dont_throw' parameter with
5243         an explicit_completion_info pointer parameter.  Handle it.  Don't
5244         use explicit_location_lex_one to lex function names.  Use
5245         explicit_location_lex_one_function instead.
5246         * location.h (struct explicit_completion_info): New.
5247         (string_to_explicit_location): Replace 'dont_throw' parameter with
5248         an explicit_completion_info pointer parameter.
5249         * symtab.c (default_collect_symbol_completion_matches_break_on):
5250         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5251         (default_collect_symbol_completion_matches)
5252         (collect_symbol_completion_matches): Add complete_symbol_mode
5253         parameter.
5254         (collect_symbol_completion_matches_type): Pass down
5255         complete_symbol_mode::EXPRESSION.
5256         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5257         parameter.  Handle LINESPEC mode.
5258         * symtab.h (complete_symbol_mode): New.
5259         (default_collect_symbol_completion_matches_break_on)
5260         (default_collect_symbol_completion_matches)
5261         (collect_symbol_completion_matches)
5262         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5263         parameter.
5264
5265 2017-07-17  Pedro Alves  <palves@redhat.com>
5266
5267         * utils.c (enum class strncmp_iw_mode): New.
5268         (strcmp_iw): Rename to ...
5269         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5270         parameters.  Handle them.
5271         (strncmp_iw): New.
5272         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5273         * utils.h (strncmp_iw): Declare.
5274         (strcmp_iw): Move describing comments here.
5275
5276 2017-07-17  Pedro Alves  <palves@redhat.com>
5277
5278         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5279         CP_OPERATOR_STR.
5280         * c-typeprint.c (is_type_conversion_operator): Use
5281         CP_OPERATOR_STR.
5282         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5283         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5284         CP_OPERATOR_LEN.
5285         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5286         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5287         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5288         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5289         CP_OPERATOR_STR.
5290         * location.c: Include "cp-support.h".
5291         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5292         CP_OPERATOR_STR.
5293         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5294         CP_OPERATOR_LEN.
5295
5296 2017-07-17  Pedro Alves  <palves@redhat.com>
5297
5298         * cli/cli-cmds.c (complete_command): Use a completion tracker
5299         along with completion_find_completion_word for handle_brkchars
5300         phase.
5301         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5302         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5303         (struct gdb_rl_completion_word_info): New.
5304         (gdb_rl_find_completion_word): New.
5305         (completion_find_completion_word): New.
5306         * completer.h (completion_find_completion_word): Declare.
5307
5308 2017-07-17  Pedro Alves  <palves@redhat.com>
5309
5310         * ada-lang.c (symbol_completion_match): Adjust comments.
5311         (symbol_completion_add): Replace vector parameter with
5312         completion_tracker parameter.  Use it.
5313         (ada_make_symbol_completion_list): Rename to...
5314         (ada_collect_symbol_completion_matches): ... this.  Add
5315         completion_tracker parameter and use it.
5316         (ada_language_defn): Adjust.
5317         * break-catch-syscall.c (catch_syscall_completer): Adjust
5318         prototype and work with completion_tracker instead of VEC.
5319         * breakpoint.c (condition_completer): Adjust prototype and work
5320         with completion_tracker instead of VEC.
5321         * c-lang.c (c_language_defn, cplus_language_defn)
5322         (asm_language_defn, minimal_language_defn): Adjust to renames.
5323         * cli/cli-cmds.c (complete_command): Rework using
5324         completion_tracker.  Catch exceptions when completing.
5325         * cli/cli-decode.c (integer_unlimited_completer)
5326         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5327         with completion_tracker instead of VEC.
5328         * command.h (struct completion_tracker): Forward declare.
5329         (completer_ftype, completer_handle_brkchars_ftype): Change
5330         types.
5331         (complete_on_cmdlist, complete_on_enum): Adjust.
5332         * completer.c: Include <algorithm>.
5333         (struct gdb_completer_state): New.
5334         (current_completion): New global.
5335         (readline_line_completion_function): Delete.
5336         (noop_completer, filename_completer)
5337         (filename_completer_handle_brkchars, complete_files_symbols)
5338         (linespec_location_completer): Adjust to work with a
5339         completion_tracker instead of a VEC.
5340         (string_or_empty): New.
5341         (collect_explicit_location_matches): Adjust to work with a
5342         completion_tracker instead of a VEC.
5343         (explicit_location_completer): Rename to ...
5344         (complete_explicit_location): ... this and adjust to work with a
5345         completion_tracker instead of a VEC.
5346         (location_completer): Adjust to work with a completion_tracker
5347         instead of a VEC.
5348         (add_struct_fields): Adjust to work with a completion_list instead
5349         of VEC.
5350         (expression_completer): Rename to ...
5351         (complete_expression): ... this and adjust to work with a
5352         completion_tracker instead of a VEC.  Use complete_files_symbols.
5353         (expression_completer): Reimplement on top of complete_expression.
5354         (symbol_completer): Adjust to work with a completion_tracker
5355         instead of a VEC.
5356         (enum complete_line_internal_reason): Add describing comments.
5357         (complete_line_internal_normal_command): Adjust to work with a
5358         completion_tracker instead of a VEC.
5359         (complete_line_internal): Rename to ...
5360         (complete_line_internal_1): ... this and adjust to work with a
5361         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5362         handle_brkchars phase.
5363         (new_completion_tracker): Delete.
5364         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5365         complete_line_internal_1.
5366         (free_completion_tracker): Delete.
5367         (INITIAL_COMPLETION_HTAB_SIZE): New.
5368         (completion_tracker::completion_tracker)
5369         (completion_tracker::~completion_tracker): New.
5370         (maybe_add_completion): Delete.
5371         (completion_tracker::maybe_add_completion)
5372         (completion_tracker::add_completion)
5373         (completion_tracker::add_completions): New.
5374         (throw_max_completions_reached_error): Delete.
5375         (complete_line): Adjust to work with a completion_tracker instead
5376         of a VEC.  Don't create a completion_tracker_t or check for max
5377         completions here.
5378         (command_completer, command_completer_handle_brkchars)
5379         (signal_completer, reg_or_group_completer_1)
5380         (reg_or_group_completer, default_completer_handle_brkchars):
5381         Adjust to work with a completion_tracker.
5382         (gdb_completion_word_break_characters_throw): New.
5383         (gdb_completion_word_break_characters): Reimplement.
5384         (line_completion_function): Delete.
5385         (completion_tracker::recompute_lowest_common_denominator)
5386         (expand_preserving_ws)
5387         (completion_tracker::build_completion_result)
5388         (completion_result::completion_result)
5389         (completion_result::completion_result)
5390         (completion_result::~completion_result)
5391         (completion_result::completion_result)
5392         (completion_result::release_match_list, compare_cstrings)
5393         (completion_result::sort_match_list)
5394         (completion_result::reset_match_list)
5395         (gdb_rl_attempted_completion_function_throw)
5396         (gdb_rl_attempted_completion_function): New.
5397         * completer.h (completion_list, struct completion_result)
5398         (class completion_tracker): New.
5399         (complete_line): Add completion_tracker parameter.
5400         (readline_line_completion_function): Delete.
5401         (gdb_rl_attempted_completion_function): New.
5402         (noop_completer, filename_completer, expression_completer)
5403         (location_completer, symbol_completer, command_completer)
5404         (signal_completer, reg_or_group_completer): Update prototypes.
5405         (completion_tracker_t, new_completion_tracker)
5406         (make_cleanup_free_completion_tracker): Delete.
5407         (enum maybe_add_completion_enum): Delete.
5408         (maybe_add_completion): Delete.
5409         (throw_max_completions_reached_error): Delete.
5410         * corefile.c (complete_set_gnutarget): Adjust to work with a
5411         completion_tracker instead of a VEC.
5412         * cp-abi.c (cp_abi_completer): Adjust to work with a
5413         completion_tracker instead of a VEC.
5414         * d-lang.c (d_language_defn): Adjust.
5415         * disasm.c (disassembler_options_completer): Adjust to work with a
5416         completion_tracker instead of a VEC.
5417         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5418         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5419         with a completion_tracker instead of a VEC.
5420         (f_language_defn): Adjust.
5421         * go-lang.c (go_language_defn): Adjust.
5422         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5423         Adjust to work with a completion_tracker instead of a VEC.
5424         * infrun.c (handle_completer): Likewise.
5425         * interps.c (interpreter_completer): Likewise.
5426         * interps.h (interpreter_completer): Likewise.
5427         * language.c (unknown_language_defn, auto_language_defn)
5428         (local_language_defn): Adjust.
5429         * language.h (language_defn::la_make_symbol_completion_list):
5430         Rename to ...
5431         (language_defn::la_collect_symbol_completion_matches): ... this
5432         and adjust to work with a completion_tracker instead of a VEC.
5433         * m2-lang.c (m2_language_defn): Adjust.
5434         * objc-lang.c (objc_language_defn): Adjust.
5435         * opencl-lang.c (opencl_language_defn): Adjust.
5436         * p-lang.c (pascal_language_defn): Adjust.
5437         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5438         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5439         with a completion_tracker.
5440         * rust-lang.c (rust_language_defn): Adjust.
5441         * symtab.c (free_completion_list, do_free_completion_list)
5442         (return_val, completion_tracker): Delete.
5443         (completion_list_add_name, completion_list_add_symbol)
5444         (completion_list_add_msymbol, completion_list_objc_symbol)
5445         (completion_list_add_fields, add_symtab_completions): Add
5446         completion_tracker parameter and use it.
5447         (default_make_symbol_completion_list_break_on_1): Rename to...
5448         (default_collect_symbol_completion_matches_break_on): ... this.
5449         Add completion_tracker parameter and use it instead of allocating
5450         a completion tracker here.
5451         (default_make_symbol_completion_list_break_on): Delete old
5452         implementation.
5453         (default_make_symbol_completion_list): Delete.
5454         (default_collect_symbol_completion_matches): New.
5455         (make_symbol_completion_list): Delete.
5456         (collect_symbol_completion_matches): New.
5457         (make_symbol_completion_type): Rename to ...
5458         (collect_symbol_completion_matches_type): ... this.  Add
5459         completion_tracker parameter and use it instead of VEC.
5460         (make_file_symbol_completion_list_1): Rename to...
5461         (collect_file_symbol_completion_matches): ... this.  Add
5462         completion_tracker parameter and use it instead of VEC.
5463         (make_file_symbol_completion_list): Delete.
5464         (add_filename_to_list): Use completion_list instead of a VEC.
5465         (add_partial_filename_data::list): Now a completion_list.
5466         (make_source_files_completion_list): Work with a completion_list
5467         instead of a VEC.
5468         * symtab.h: Include "completer.h".
5469         (default_make_symbol_completion_list_break_on)
5470         (default_make_symbol_completion_list, make_symbol_completion_list)
5471         (make_symbol_completion_type, make_file_symbol_completion_list)
5472         (make_source_files_completion_list): Delete.
5473         (default_collect_symbol_completion_matches_break_on)
5474         (default_collect_symbol_completion_matches)
5475         (collect_symbol_completion_matches)
5476         (collect_symbol_completion_matches_type)
5477         (collect_file_symbol_completion_matches)
5478         (make_source_files_completion_list): New.
5479         * top.c (init_main): Don't install a rl_completion_entry_function
5480         hook.  Install a rl_attempted_completion_function hook instead.
5481         * tui/tui-layout.c (layout_completer): Adjust to work with a
5482         completion_tracker.
5483         * tui/tui-regs.c (tui_reggroup_completer):
5484         * tui/tui-win.c (window_name_completer, focus_completer)
5485         (winheight_completer): Adjust to work with a completion_tracker.
5486         * value.c: Include "completer.h".
5487         (complete_internalvar): Adjust to work with a completion_tracker.
5488         * value.h (complete_internalvar): Likewise.
5489
5490 2017-07-17  Pedro Alves  <palves@redhat.com>
5491
5492         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5493         renames.
5494         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5495         comments to completer_ftype's declaration.
5496         <completer_handle_brkchars>: Change type to
5497         completer_handle_brkchars_ftype.
5498         * command.h (completer_ftype): Add describing comment and give
5499         names to parameters.
5500         (completer_ftype_void): Rename to ...
5501         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5502         (set_cmd_completer_handle_brkchars): Adjust.
5503         * completer.c (filename_completer_handle_brkchars): New function.
5504         (complete_line_internal_normal_command): New function, factored
5505         out from ...
5506         (complete_line_internal): ... here.
5507         (command_completer_handle_brkchars)
5508         (default_completer_handle_brkchars)
5509         (completer_handle_brkchars_func_for_completer): New functions.
5510         * completer.h (set_gdb_completion_word_break_characters): Delete
5511         declaration.
5512         (completer_handle_brkchars_func_for_completer): New declaration.
5513         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5514         completer_handle_brkchars_func_for_completer.
5515
5516 2017-07-17  Pedro Alves  <palves@redhat.com>
5517
5518         * completer.c (symbol_completer): New function, based on
5519         make_symbol_completion_list_fn.
5520         * completer.h (symbol_completer): New declaration.
5521         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5522         * python/py-cmd.c (completers): Adjust.
5523         * symtab.c (make_symbol_completion_list_fn): Delete.
5524         * symtab.h (make_symbol_completion_list_fn): Delete.
5525         * cli/cli-decode.c (add_cmd): Adjust.
5526
5527 2017-07-17  Pedro Alves  <palves@redhat.com>
5528
5529         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5530         * dwarf2read.c: Include "filename-seen-cache.h".
5531         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5532         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5533         * filename-seen-cache.c: New file.
5534         * filename-seen-cache.h: New file.
5535         * symtab.c: Include "filename-seen-cache.h".
5536         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5537         (create_filename_seen_cache, clear_filename_seen_cache)
5538         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5539         to filename-seen-cache.h/filename-seen-cache.c.
5540         (output_source_filename, sources_info)
5541         (maybe_add_partial_symtab_filename)
5542         (make_source_files_completion_list): Adjust to use
5543         filename_seen_cache.
5544
5545 2017-07-17  Pedro Alves  <palves@redhat.com>
5546
5547         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5548         fields.
5549         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5550         dwarf2_debug_sections*)): New.
5551         (dwarf2_per_objfile::dwarf2_per_objfile(const
5552         dwarf2_per_objfile&)): Declare as deleted.
5553         (dwarf2_per_objfile::operator=): Declare as deleted.
5554         (dwarf2_per_objfile::dwarf2_per_objfile)
5555         (dwarf2_per_objfile::~dwarf2_per_objfile)
5556         (dwarf2_per_objfile::free_cached_comp_units): New.
5557         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5558         ctor.  Call dwarf2_per_objfile's ctor manually.
5559         (dwarf2_locate_sections): Deleted/refactored as ...
5560         (dwarf2_per_objfile::locate_sections): ... this new method.
5561         (free_cached_comp_units): Defer to
5562         dwarf2_per_objfile::free_cached_comp_units.
5563         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5564
5565 2017-07-14  Tom Tromey  <tom@tromey.com>
5566
5567         PR rust/21764:
5568         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5569         parameter.
5570         <UNOP_SIZEOF>: Split into separate case.
5571         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5572
5573 2017-07-14  Tom Tromey  <tom@tromey.com>
5574
5575         PR rust/21763:
5576         * symtab.c (symbol_matches_domain): Add language_rust to special
5577         case.
5578         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5579         treat LOC_TYPEDEF symbols as variables.
5580
5581 2017-07-14  Pedro Alves  <palves@redhat.com>
5582
5583         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5584         symtabs matching all symtabs with SRCFILE as file name instead of
5585         only considering the first hit, with lookup_symtab.
5586
5587 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5588
5589         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5590         operator_name parameters.
5591         (gen_expr): Update function call.
5592
5593 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5594
5595         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5596         parameter.
5597         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5598         Likewise.
5599         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5600         parameter, use agent_expr::gdbarch instead, update function
5601         calls.
5602         (locexpr_tracepoint_var_ref): Likewise.
5603         (loclist_tracepoint_var_ref): Likewise.
5604         * ax-gdb.c (gen_trace_static_fields): Likewise.
5605         (gen_traced_pop): Likewise.
5606         (gen_frame_args_address): Likewise.
5607         (gen_frame_locals_address): Likewise.
5608         (gen_var_ref): Likewise.
5609         (gen_struct_ref_recursive): Likewise.
5610         (gen_static_field): Likewise.
5611         (gen_maybe_namespace_elt): Likewise.
5612         (gen_expr): Likewise.
5613         (gen_trace_for_var): Likewise.
5614         (gen_trace_for_expr): Likewise.
5615         (gen_trace_for_return_address): Likewise.
5616
5617 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5618
5619         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5620         parameter.
5621         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5622
5623 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5624
5625         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5626         from ax, update calls.
5627         (gen_usual_arithmetic): Likewise.
5628         (gen_integral_promotions): Likewise.
5629         (gen_bitfield_ref): Likewise.
5630         (gen_primitive_field): Likewise.
5631         (gen_struct_ref_recursive): Likewise.
5632         (gen_struct_ref): Likewise.
5633         (gen_maybe_namespace_elt): Likewise.
5634         (gen_struct_elt_for_reference): Likewise.
5635         (gen_namespace_elt): Likewise.
5636         (gen_aggregate_elt_ref): Likewise.
5637         (gen_expr): Get gdbarch from ax, update calls.
5638         (gen_expr_binop_rest): Likewise.
5639
5640 2017-07-13  Pedro Alves  <palves@redhat.com>
5641
5642         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5643         as default tdesc.
5644         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5645         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5646         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5647         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5648         tdep.
5649         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5650         Get final tdesc from the tdep.
5651         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5652         default tdesc.
5653         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5654         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5655         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5656         Use it as default tdesc.
5657         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5658         down to amd_init_abi.  No longer handle fallback tdesc here.
5659         * amd64-tdep.h (tdesc_x32): Declare.
5660         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5661         parameter.
5662         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5663         as default tdesc.
5664
5665 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5666
5667         * s390-linux-tdep.c (s390_process_record): Add support for
5668         instructions new in arch12.
5669
5670 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5671
5672         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5673         PT_GETFSBASE and PT_GETGSBASE.
5674         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5675         PT_SETGSBASE.
5676
5677 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5678
5679         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5680         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5681         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5682         those rules.
5683         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5684         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5685         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5686         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5687         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5688         * features/i386/amd64.xml: Add 64bit-segments.xml.
5689         * features/i386/amd64-avx-avx512.c: Regenerated.
5690         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5691         * features/i386/amd64-avx-mpx.c: Regenerated.
5692         * features/i386/amd64-avx.c: Regenerated.
5693         * features/i386/amd64-mpx.c: Regenerated.
5694         * features/i386/amd64.c: Regenerated.
5695         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5696         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5697         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5698         * regformats/i386/amd64-avx.dat: Regenerated.
5699         * regformats/i386/amd64-mpx.dat: Regenerated.
5700         * regformats/i386/amd64.dat: Regenerated.
5701
5702 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5703
5704         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5705         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5706
5707 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5708
5709         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5710         unsetenv.
5711         * gnulib/aclocal.m4: Regenerate.
5712         * gnulib/config.in: Regenerate.
5713         * gnulib/configure: Regenerate.
5714         * gnulib/import/Makefile.am: Regenerate.
5715         * gnulib/import/Makefile.in: Regenerate.
5716         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5717         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5718         * gnulib/import/m4/environ.m4: New file.
5719         * gnulib/import/m4/setenv.m4: New file.
5720         * gnulib/import/setenv.c: New file.
5721         * gnulib/import/unsetenv.c: New file.
5722
5723 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5724
5725         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5726         address when op is DW_OP_addr.
5727
5728 2017-07-09  Tom Tromey  <tom@tromey.com>
5729
5730         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5731         check and apply to outer type.
5732
5733 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5734
5735         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5736         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5737         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5738         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5739
5740 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5741
5742         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5743
5744 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5745
5746         * corelow.c (get_core_siginfo): Remove.
5747         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5748         instead of get_core_siginfo.
5749         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5750         * gdbarch.h: Re-generate.
5751         * gdbarch.c: Re-generate.
5752         * linux-tdep.c (linux_core_xfer_siginfo): New.
5753         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5754
5755 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5756
5757         * corelow.c (thread_section_name): Move to ...
5758         * gdbcore.h (thread_section_name): ... here.
5759
5760 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5761
5762         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5763         (struct siginfo32): New.
5764         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5765         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5766         via ptrace(PT_LWPINFO).
5767
5768 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5769
5770         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5771         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5772         (fbsd_get_siginfo_type): New.
5773         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5774         (_initialize_fbsd_tdep): New.
5775
5776 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5777
5778         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5779         a singular dwo_unit*) to support multiple CUs in the same way that
5780         multiple TUs are supported.
5781         (create_cus_hash_table): Replace create_dwo_cu with a function for
5782         parsing multiple CUs from a DWO file.
5783         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5784         create_dwo_cu.
5785         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5786         htab_find, rather than comparing the signature to a singleton CU in
5787         the dwo_file.
5788
5789 2017-07-06  Pedro Alves  <palves@redhat.com>
5790
5791         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5792
5793 2017-07-04  Pedro Alves  <palves@redhat.com>
5794
5795         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5796         * gdbtypes.h (TYPE_STATIC): Delete.
5797         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5798         is_synchronized, is_native>: Delete.
5799         <dummy>: Bump.
5800         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5801         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5802         (TYPE_FN_FIELD_ABSTRACT): Delete.
5803
5804 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5805
5806         * buffer.h (buffer_finish): Fix spelling mistakes.
5807
5808 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5809
5810         * .dir-locals.el: Automatically switch to C-style comments in
5811         versions of Emacs that support the feature.
5812
5813 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5814             Pedro Alves  <palves@redhat.com>
5815
5816         PR cli/21688
5817         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5818         (process_next_line): New variable 'inline_cmd'.
5819         Adjust 'if' clauses for "python", "compile" and "guile" to use
5820         'command_name_equals' and check for '!inline_cmd'.
5821
5822 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5823
5824         PR cli/21688
5825         * cli/cli-script.c (command_name_equals_not_inline): New function.
5826         (process_next_line): Adjust 'if' clauses for "python", "compile"
5827         and "guile" to use command_name_equals_not_inline.
5828
5829 2017-06-29  Pedro Alves  <palves@redhat.com>
5830
5831         * completer.c (expression_completer): Call
5832         linespec_location_completer instead of location_completer.
5833
5834 2017-06-29  Pedro Alves  <palves@redhat.com>
5835
5836         * completer.c (expression_completer): Remove code that recomputes
5837         'text' from 'word'.
5838
5839 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5840
5841         * regformats/regdat.sh: Generate code with
5842         "ifndef IN_PROCESS_AGENT".
5843
5844 2017-06-28  Pedro Alves  <palves@redhat.com>
5845
5846         * command.h: Include "common/scoped_restore.h".
5847
5848 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5849
5850         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5851         instead of obstack_grow.
5852
5853 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5854
5855         PR gdb/21337
5856         * symfile.c (reread_symbols): Call objfiles_changed just before
5857         read_symbols.
5858
5859 2017-06-27  Pedro Alves  <palves@redhat.com>
5860
5861         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5862         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5863         (completion_list_add_symbol, completion_list_add_msymbol):
5864         ... these new functions.
5865         (add_symtab_completions)
5866         (default_make_symbol_completion_list_break_on_1): Adjust.
5867
5868 2017-06-27  Pedro Alves  <palves@redhat.com>
5869
5870         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5871         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5872         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5873         dtor.
5874         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5875         'storage_obstack' field an auto_obstack.  In-class initialize all
5876         non-bitfield fields.  Make minsyms_read bool.
5877         * symfile.c (read_symbols): Adjust.
5878
5879 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5880
5881         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5882         (gdbsim_store_register): Likewise.
5883
5884 2017-06-27  Pedro Alves  <palves@redhat.com>
5885
5886         * c-exp.y (name_obstack): Now an auto_obstack.
5887         (yylex): Use auto_obstack::clear.
5888         (c_parse): Use auto_obstack::clear instead of reinitializing and
5889         freeing the obstack.
5890         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5891         * d-exp.y (name_obstack): Now an auto_obstack.
5892         (yylex): Use auto_obstack::clear.
5893         (d_parse): Use auto_obstack::clear instead of reinitializing and
5894         freeing the obstack.
5895         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5896         auto_obstack.
5897         * dwarf2read.c (create_addrmap_from_index)
5898         (dwarf2_build_psymtabs_hard)
5899         (update_enumeration_type_from_children): Likewise.
5900         * gdb_obstack.h (auto_obstack): New type.
5901         * go-exp.y (name_obstack): Now an auto_obstack.
5902         (build_packaged_name): Use auto_obstack::clear.
5903         (go_parse): Use auto_obstack::clear instead of reinitializing and
5904         freeing the obstack.
5905         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5906         auto_obstack.
5907         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5908         * rust-exp.y (work_obstack): Now an auto_obstack.
5909         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5910         reinitializing and freeing the obstack.
5911         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5912         (host_char_to_target): Use auto_obstack.
5913         * utils.h (make_cleanup_obstack_free): Delete declaration.
5914         * valprint.c (generic_emit_char, generic_printstr): Use
5915         auto_obstack.
5916
5917 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5918
5919         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5920         thread.
5921         (darwin_init_thread_list): Don't update dummy thread.
5922         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5923
5924 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5925
5926         * record-full.c (netorder16): Remove.
5927
5928 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5929
5930         * common/diagnostics.h: Define macros for GCC.
5931         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5932         * common/vec.h: Include diagnostics.h.
5933         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5934         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5935         warning.
5936
5937 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5938
5939         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5940         New macro.
5941         * ada-lex.l: Ignore deprecated register warnings.
5942
5943 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5944
5945         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5946         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5947
5948 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5949
5950         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5951         its own line.
5952
5953 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5954
5955         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5956
5957 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5958
5959         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5960         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5961         (xtensa_register_read_masked): Likewise.
5962
5963 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5964
5965         * common/environ.c (gdb_environ::unset): Update comment.
5966
5967 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5968
5969         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5970         registers.
5971
5972 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5973
5974         * record-full.c (record_full_exec_insn): Use byte_vector.
5975
5976 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5977
5978         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5979         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5980
5981 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5982
5983         * remote.c (cached_reg): Move from here...
5984         * regcache.h (cached_reg): ...to here.
5985         * python/py-unwind.c (struct reg_info): Remove.
5986         (cached_frame_info): Use cached_reg_t.
5987         (pyuw_prev_register): Likewise.
5988         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5989         (pyuw_dealloc_cache): Free all registers.
5990
5991 2017-06-22  Pedro Alves  <palves@redhat.com>
5992             Simon Marchi  <simon.marchi@ericsson.com>
5993
5994         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5995         warning.
5996         * common/diagnostics.h: New file.
5997
5998 2017-06-22  Pedro Alves  <palves@redhat.com>
5999
6000         * common/agent.h: Add include guards.
6001
6002 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
6003
6004         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6005         talk about addressable units instead of bytes.
6006
6007 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6008
6009         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6010         of '::const_iterator'.
6011
6012 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6013
6014         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6015         'unittests/environ-selftests.c'.
6016         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6017         * charset.c (find_charset_names): Declare object 'iconv_env'.
6018         Update code to use 'iconv_env' object.  Remove call to
6019         'free_environ'.
6020         * common/environ.c: Include <utility>.
6021         (make_environ): Delete function.
6022         (free_environ): Delete function.
6023         (gdb_environ::clear): New function.
6024         (gdb_environ::operator=): New function.
6025         (gdb_environ::get): Likewise.
6026         (environ_vector): Delete function.
6027         (set_in_environ): Delete function.
6028         (gdb_environ::set): New function.
6029         (unset_in_environ): Delete function.
6030         (gdb_environ::unset): New function.
6031         (gdb_environ::envp): Likewise.
6032         * common/environ.h: Include <vector>.
6033         (struct gdb_environ): Delete; transform into...
6034         (class gdb_environ): ... this class.
6035         (free_environ): Delete prototype.
6036         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6037         environ_vector): Likewise.
6038         * infcmd.c (run_command_1): Update code to call
6039         'envp' from 'gdb_environ' class.
6040         (environment_info): Update code to call methods from 'gdb_environ'
6041         class.
6042         (unset_environment_command): Likewise.
6043         (path_info): Likewise.
6044         (path_command): Likewise.
6045         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6046         (inferior::inferior): Initialize 'environment' using the host's
6047         information.
6048         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6049         Include "environ.h".
6050         (class inferior) <environment>: Change type from 'struct
6051         gdb_environ' to 'gdb_environ'.
6052         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6053         methods from 'gdb_environ' class.
6054         * solib.c (solib_find_1): Likewise
6055         * unittests/environ-selftests.c: New file.
6056
6057 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6058
6059         * features/i386/i386-linux.xml: Exchange the order of including
6060         32bit-linux.xml and 32bit-sse.xml.
6061         * features/i386/i386-linux.c: Regenerated.
6062
6063 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6064
6065         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6066         Delete copy ctor and assignment operator.
6067         (tdesc_type): Likewise.
6068         (tdesc_feature): Likewise.
6069         (tdesc_free_reg): Remove.
6070         (tdesc_create_reg): Use new.
6071         (tdesc_free_type): Remove.
6072         (tdesc_create_vector): Use new.
6073         (tdesc_create_union): Likewise.
6074         (tdesc_create_flags): Likewise.
6075         (tdesc_create_enum): Likewise.
6076         (tdesc_free_feature): Delete.
6077         (free_target_description): Use delete.
6078
6079 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6080
6081         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6082         registers.
6083
6084 2017-06-19  Pedro Alves  <palves@redhat.com>
6085
6086         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6087         after gdb::unlinker.
6088
6089 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6090
6091         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6092         gdb_environ to access an environment variable.
6093
6094 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6095
6096         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6097         gdb_byte*.
6098
6099 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6100
6101         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6102
6103 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6104
6105         * configure: Re-generate.
6106         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6107
6108 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6109
6110         * configure: Re-generate.
6111         * warning.m4: Pass -Werror to compiler when checking for
6112         supported warning flags.
6113
6114 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6115
6116         * Makefile.in (COMPILE.pre): Add "-x c++".
6117
6118 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6119             Pedro Alves  <palves@redhat.com>
6120             Yao Qi  <yao.qi@linaro.org>
6121
6122         * defs.h (RequireLongest): New.
6123         (extract_integer): Declare function template.
6124         (extract_signed_integer): Remove the declaration, but define it
6125         static inline.
6126         (extract_unsigned_integer): Likewise.
6127         (store_integer): Declare function template.
6128         (store_signed_integer): Remove the declaration, but define it
6129         static inline.
6130         (store_unsigned_integer): Likewise.
6131         * findvar.c (extract_integer): New function template.
6132         (extract_signed_integer): Remove.
6133         (extract_unsigned_integer): Remove.
6134         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6135         instantiations.
6136         (store_integer): New function template.
6137         (store_signed_integer): Remove.
6138         (store_unsigned_integer): Remove.
6139         (store_integer): Explicit instantiations.
6140         * regcache.c (regcache_raw_read_signed): Update.
6141         (regcache::raw_read): New function.
6142         (regcache::raw_read_signed): Remove.
6143         (regcache::raw_read_unsigned): Remove.
6144         (regcache_raw_read_unsigned): Update.
6145         (regcache_raw_write_unsigned): Update.
6146         (regcache::raw_write_signed): Remove.
6147         (regcache::raw_write): New function.
6148         (regcache_cooked_read_signed): Update.
6149         (regcache::raw_write_unsigned): Remove.
6150         (regcache::cooked_read_signed): Remove.
6151         (regcache_cooked_read_unsigned): Update.
6152         (regcache::cooked_read_unsigned): Remove.
6153         (regcache_cooked_write_signed): Update.
6154         (regcache_cooked_write_unsigned): Update.
6155         * regcache.h (regcache) <raw_read_signed>: Remove.
6156         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6157         <raw_read, raw_write>: New.
6158         <cooked_read_signed, cooked_write_signed>: Remove.
6159         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6160         <cooked_read, cooked_write>: New.
6161         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6162         (sh64_pseudo_register_write): Update.
6163
6164 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6165
6166         * arc-tdep.c (arc_disassembler_options): New variable.
6167         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6168         of default_print_insn.
6169         (arc_delayed_print_insn): Set info->section when needed,
6170         use default_print_insn to retrieve a disassembler.
6171
6172 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6173
6174         PR gdb/21574
6175         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6176         to mention $SHELL and startup-with-shell.
6177
6178 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6179
6180         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6181
6182 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6183
6184         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6185         default_print_insn instead of print_insn_aarch64.
6186         * arm-tdep.c (gdb_print_insn_arm): Call
6187         default_print_insn instead of print_insn_big_arm
6188         and print_insn_little_arm.
6189         * i386-tdep.c (i386_print_insn): Call default_print_insn
6190         instead of print_insn_i386.
6191         * ia64-tdep.c (ia64_print_insn): Call
6192         default_print_insn instead of print_insn_ia64.
6193         * mips-tdep.c (gdb_print_insn_mips): Call
6194         default_print_insn instead of print_insn_big_mips
6195         and print_insn_little_mips.
6196         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6197         instead of print_insn_spu.
6198
6199 2017-06-14  Pedro Alves  <palves@redhat.com>
6200
6201         * ada-lang.c: Include "common/byte-vector.h".
6202         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6203         * charset.c (wchar_iterator::iterate): Resize the vector instead
6204         of reserving it.
6205         * common/byte-vector.h: Include "common/def-vector.h".
6206         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6207         * cli/cli-dump.c: Include "common/byte-vector.h".
6208         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6209         * common/byte-vector.h: New file.
6210         * common/def-vector.h: New file.
6211         * common/default-init-alloc.h: New file.
6212         * dwarf2loc.c: Include "common/byte-vector.h".
6213         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6214         instead of reserving it.
6215         * dwarf2read.c: Include "common/byte-vector.h".
6216         (data_buf::m_vec): Now a gdb::byte_vector.
6217         * gdb_regex.c: Include "common/def-vector.h".
6218         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6219         * mi/mi-main.c: Include "common/byte-vector.h".
6220         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6221         * printcmd.c: Include "common/byte-vector.h".
6222         (print_scalar_formatted): Use gdb::byte_vector.
6223         * valprint.c: Include "common/byte-vector.h".
6224         (maybe_negate_by_bytes, print_decimal_chars): Use
6225         gdb::byte_vector.
6226
6227 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6228
6229         * darwin-nat.c: Include "nat/fork-inferior.h".
6230
6231 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6232
6233         * configure.nat: Factor out Darwin bits that are not
6234         architecture-specific.  Add fork-inferior.o.
6235
6236 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6237
6238         * configure.nat: Factor out AIX bits that are not
6239         architecture-specific.  Add fork-inferior.o.
6240
6241 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6242
6243         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6244         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6245         wrappers that just call rw_pieced_value.
6246
6247 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6248
6249         * dwarf2loc.c (write_pieced_value): When writing the data for a
6250         memory piece, use write_memory_with_notification instead of
6251         write_memory.
6252
6253 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6254
6255         * valops.c (read_value_memory): Change embedded_offset to
6256         represent a bit offset instead of a byte offset.
6257         * value.h (read_value_memory): Adjust comment.
6258
6259 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6260
6261         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6262         dest_offset_bits and source_offset_bits.
6263         (write_pieced_value): Likewise.
6264
6265 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6266
6267         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6268         given by DW_OP_bit_piece.
6269         (write_pieced_value): Likewise.
6270
6271 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6272
6273         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6274         some other preparations to the places where sufficient information
6275         is available.
6276         (write_pieced_value): Likewise.
6277
6278 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6279
6280         * dwarf2loc.c (bits_to_bytes): New function.
6281         (read_pieced_value): Fix offset calculations for register pieces
6282         on big-endian targets.
6283         (write_pieced_value): Likewise.
6284
6285 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6286
6287         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6288         (write_pieced_value): Likewise.
6289
6290 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6291
6292         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6293         transfer the source value's least significant bits, instead of its
6294         lowest-addressed ones.  Rename type_len to max_offset.
6295         (read_pieced_value): Mirror above changes to write_pieced_value as
6296         applicable.
6297
6298 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6299
6300         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6301         truncate full bytes from dest_offset_bits before using it as an
6302         offset into the buffer.
6303
6304 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6305
6306         * dwarf2loc.c (write_pieced_value): Include transfer size in
6307         byte-wise check.
6308
6309 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6310
6311         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6312         calculation of this_size.
6313
6314 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6315
6316         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6317         when targeting a bit-field.
6318         (write_pieced_value): Likewise.
6319
6320 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6321
6322         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6323         (allocate_piece_closure): Drop addr_size parameter.
6324         (dwarf2_evaluate_loc_desc_full): Adjust call to
6325         allocate_piece_closure.
6326
6327 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6328
6329         PR gdb/21226
6330         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6331         the LSB end, independent of endianness.
6332
6333 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6334
6335         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6336         size capping.
6337
6338 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6339
6340         * mips-linux-nat.c: Move include features/mips*-linux.c to
6341         mips-linux-tdep.c.
6342         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6343         to mips-linux-tdep.c.
6344         * mips-linux-tdep.c: Include features/mips*-linux.c
6345         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6346         functions.
6347         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6348         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6349         (tdesc_mips64_dsp_linux): Declare.
6350
6351 2017-06-12  Tom Tromey  <tom@tromey.com>
6352
6353         * valprint.h (val_print_type_code_int): Remove.
6354         * valprint.c (generic_val_print_int): Always call
6355         val_print_scalar_formatted.
6356         (val_print_type_code_int): Remove.
6357         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6358         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6359         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6360         * ada-valprint.c (ada_val_print_num): Use
6361         val_print_scalar_formatted.
6362
6363 2017-06-12  Tom Tromey  <tom@tromey.com>
6364
6365         * printcmd.c (print_scalar_formatted): Unify the two switches.
6366         Don't convert scalars to LONGEST.
6367
6368 2017-06-12  Tom Tromey  <tom@tromey.com>
6369
6370         PR exp/16225:
6371         * valprint.h (print_decimal_chars): Update.
6372         * valprint.c (maybe_negate_by_bytes): New function.
6373         (print_decimal_chars): Add "is_signed" argument.
6374         * printcmd.c (print_scalar_formatted): Update.
6375
6376 2017-06-12  Tom Tromey  <tom@tromey.com>
6377
6378         PR exp/16225:
6379         * valprint.h (print_binary_chars, print_hex_chars): Update.
6380         * valprint.c (val_print_type_code_int): Update.
6381         (print_binary_chars): Add "zero_pad" argument.
6382         (emit_octal_digit): New function.
6383         (print_octal_chars): Don't zero-pad.
6384         (print_decimal_chars): Likewise.
6385         (print_hex_chars): Add "zero_pad" argument.
6386         * sh64-tdep.c (sh64_do_fp_register): Update.
6387         * regcache.c (regcache::dump): Update.
6388         * printcmd.c (print_scalar_formatted): Update.
6389         * infcmd.c (default_print_one_register_info): Update.
6390
6391 2017-06-12  Pedro Alves  <palves@redhat.com>
6392             Alan Hayward  <alan.hayward@arm.com>
6393
6394         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6395         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6396         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6397         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6398         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6399
6400 2017-06-12  Pedro Alves  <palves@redhat.com>
6401
6402         * dwarf2read.c (mapped_symtab::data): Now a vector of
6403         symtab_index_entry instead of vector of
6404         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6405         whether an element's name is NULL instead of checking whether the
6406         element itself is NULL.
6407         (find_slot): Change return type.  Adjust.
6408         (hash_expand, , add_index_entry, uniquify_cu_indices)
6409         (write_hash_table): Adjust.
6410
6411 2017-06-12  Pedro Alves  <palves@redhat.com>
6412
6413         * dwarf2read.c (recursively_count_psymbols): New function.
6414         (write_psymtabs_to_index): Call it to compute number of psyms and
6415         pass estimate size of psyms_seen to unordered_set's ctor.
6416
6417 2017-06-12  Pedro Alves  <palves@redhat.com>
6418
6419         * dwarf2read.c (write_hash_table): Check if key already exists
6420         before emplacing.
6421
6422 2017-06-12  Pedro Alves  <palves@redhat.com>
6423
6424         * dwarf2read.c (data_buf::append_space): Rename to...
6425         (data_buf::grow): ... this, and make private.  Adjust all callers.
6426         (data_buf::append_uint): New method.
6427         (add_address_entry, write_one_signatured_type)
6428         (write_psymtabs_to_index): Use it.
6429
6430 2017-06-12  Pedro Alves  <palves@redhat.com>
6431
6432         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6433         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6434         (data_buf::file_write): Call ::fwrite directly.
6435
6436 2017-06-12  Pedro Alves  <palves@redhat.com>
6437
6438         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6439         std::vector::erase.
6440
6441 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6442
6443         Code cleanup: C++ify .gdb_index producer.
6444         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6445         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6446         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6447         (create_strtab, add_string): Remove.
6448         (file_write, data_buf): New.
6449         (struct symtab_index_entry): Use std::vector for cu_indices.
6450         (struct mapped_symtab): Use std::vector for data.
6451         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6452         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6453         Remove.
6454         (find_slot): Change return type.  Update it to the new data structures.
6455         (hash_expand, add_index_entry): Update it to the new data structures.
6456         (offset_type_compare): Remove.
6457         (uniquify_cu_indices): Update it to the new data structures.
6458         (c_str_view, c_str_view_hasher, vector_hasher): New.
6459         (add_indices_to_cpool): Remove.
6460         (write_hash_table): Update it to the new data structures.
6461         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6462         (eq_psymtab_cu_index): Remove.
6463         (psym_index_map): New typedef.
6464         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6465         reference and std::unordered_map for cu_index_htab.
6466         (add_address_entry, add_address_entry_worker, write_address_map)
6467         (write_psymbols): Update it to the new data structures.
6468         (write_obstack): Remove.
6469         (struct signatured_type_index_data): Change types_list to a data_buf
6470         reference and psyms_seen to a std::unordered_set reference.
6471         (write_one_signatured_type, recursively_write_psymbols)
6472         (write_psymtabs_to_index): Update it to the new data structures.
6473
6474 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6475
6476         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6477         separate-debug-file commands.
6478         * symfile.h (separate_debug_file_debug): New global.
6479         * symfile.c (separate_debug_file_debug): New global.
6480         (separate_debug_file_exists, find_separate_debug_file): Add
6481         debug output.
6482         (_initialize_symfile): Add "set debug separate-debug-file"
6483         command.
6484         * build-id.c (build_id_to_debug_bfd,
6485         find_separate_debug_file_by_buildid): Add debug output.
6486
6487 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6488
6489         * gdbarch.sh (displaced_step_free_closure): Remove.
6490         * gdbarch.h, gdbarch.c: Re-generate.
6491         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6492         displaced_step_free_closure.
6493         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6494         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6495         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6496         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6497         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6498         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6499         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6500         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6501         * infrun.c (displaced_step_clear): Call xfree instead of
6502         gdbarch_displaced_step_free_closure.
6503
6504 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6505
6506         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6507         NULL".
6508
6509 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6510
6511         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6512         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6513         (mn10300_push_dummy_call): Likewise.
6514
6515 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6516
6517         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6518
6519 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6520
6521         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6522
6523 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6524
6525         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6526         able to start inferiors using a shell.
6527         (New remote packets): Announce new packet "QStartupWithShell".
6528         * remote.c: Add PACKET_QStartupWithShell.
6529         (extended_remote_create_inferior): Handle new
6530         PACKET_QStartupWithShell.
6531         (remote_protocol_features) <QStartupWithShell>: New entry for
6532         PACKET_QStartupWithShell.
6533         (_initialize_remote): Call "add_packet_config_cmd" for
6534         QStartupShell.
6535
6536 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6537             Pedro Alves  <palves@redhat.com>
6538
6539         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6540         and "nat/fork-inferior.h".
6541         * common/common-inferior.h: New file, with contents from
6542         "gdb/inferior.h".
6543         * commom/common-utils.c: Include "common-utils.h".
6544         (stringify_argv): New function.
6545         * common/common-utils.h (stringify_argv): New prototype.
6546         * configure.nat: Add "fork-inferior.o" as a dependency for
6547         "*linux*", "fbsd*" and "nbsd*" hosts.
6548         * corefile.c (get_exec_file): Update comment.
6549         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6550         instead of "startup_inferior".
6551         (darwin_create_inferior): Call "add_thread_silent" after
6552         "fork_inferior".
6553         * fork-child.c: Cleanup unnecessary includes.
6554         (SHELL_FILE): Move to "common/common-fork-child.c".
6555         (environ): Likewise.
6556         (exec_wrapper): Initialize.
6557         (get_exec_wrapper): New function.
6558         (breakup_args): Move to "common/common-fork-child.c"; rename to
6559         "breakup_args_for_exec".
6560         (escape_bang_in_quoted_argument): Move to
6561         "common/common-fork-child.c".
6562         (saved_ui): New variable.
6563         (prefork_hook): New function.
6564         (postfork_hook): Likewise.
6565         (postfork_child_hook): Likewise.
6566         (gdb_startup_inferior): Likewise.
6567         (fork_inferior): Move to "common/common-fork-child.c".  Update
6568         function to support gdbserver.
6569         (startup_inferior): Likewise.
6570         * gdbcore.h (get_exec_file): Remove declaration.
6571         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6572         instead of "startup_inferior".  Call "add_thread_silent" after
6573         "fork_inferior".
6574         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6575         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6576         instead of "startup_inferior".  Call "add_thread_silent" after
6577         "fork_inferior".
6578         * inferior.h: Include "common-inferior.h".
6579         (trace_start_error): Move to "common/common-utils.h".
6580         (trace_start_error_with_name): Likewise.
6581         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6582         (startup_inferior): Likewise.
6583         (gdb_startup_inferior): New prototype.
6584         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6585         * nat/fork-inferior.h: New file.
6586         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6587         instead of "startup_inferior".  Call "add_thread_silent" after
6588         "fork_inferior".
6589         * target.h (target_terminal_init): Move prototype to
6590         "target/target.h".
6591         (target_terminal_inferior): Likewise.
6592         (target_terminal_ours): Likewise.
6593         * target/target.h (target_terminal_init): New prototype, moved
6594         from "target.h".
6595         (target_terminal_inferior): Likewise.
6596         (target_terminal_ours): Likewise.
6597         * utils.c (gdb_flush_out_err): New function.
6598
6599 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6600
6601         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6602         * common/common-gdbthread.h: New file, with parts from
6603         "gdb/gdbthread.h".
6604         * gdbthread.h: Include "common-gdbthread.h".
6605         (switch_to_thread): Moved to "common/common-gdbthread.h".
6606
6607 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6608
6609         * Makefile.in (SFILES): Add "common/job-control.c".
6610         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6611         (COMMON_OBS): Add "job-control.o".
6612         * common/job-control.c: New file, with contents from
6613         "gdb/inflow.c".
6614         * common/job-control.h: New file, with contents from "terminal.h".
6615         * fork-child.c: Include "job-control.h".
6616         * inflow.c: Include "job-control.h".
6617         (gdb_setpgid): Move to "common/common-inflow.c".
6618         (_initialize_inflow): Move setting of "job_control" to
6619         "handle_job_control".
6620         * terminal.h (job_control): Moved to "common/common-terminal.h".
6621         (gdb_setpgid): Likewise.
6622         * top.c: Include "job_control.h".
6623         * utils.c: Likewise.
6624         (job_control): Moved to "job-control.c".
6625
6626 2017-06-07  Pedro Alves  <palves@redhat.com>
6627
6628         * Makefile.in (SFILES): Add gdb_regex.c.
6629         (COMMON_OBS): Add gdb_regex.o.
6630         * ada-lang.c (ada_add_standard_exceptions)
6631         (ada_add_exceptions_from_frame, name_matches_regex)
6632         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6633         parameter type to compiled_regex.  Adjust.
6634         (ada_exceptions_list): Use compiled_regex.
6635         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6636         std::unique_ptr<compiled_regex>.
6637         (exception_catchpoint::~exception_catchpoint): Remove regfree
6638         call.
6639         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6640         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6641         * breakpoint.c (solib_catchpoint::compiled): Now a
6642         std::unique_ptr<compiled_regex>.
6643         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6644         (check_status_catch_solib): Adjust to use compiled_regex.
6645         (add_solib_catchpoint): Adjust to use compiled_regex.
6646         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6647         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6648         compiled_regex reference.  Adjust to use it.
6649         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6650         declaration.  Include "gdb_regex.h".
6651         (apropos_cmd): Change regex parameter to compiled_regex reference.
6652         * gdb_regex.c: New file.
6653         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6654         declarations.
6655         (class compiled_regex): New.
6656         * linux-tdep.c: Include "common/gdb_optional.h".
6657         (struct mapping_regexes): New, factored out from
6658         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6659         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6660         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6661         * probe.c: Include "common/gdb_optional.h".
6662         (collect_probes): Use compiled_regex and gdb::optional and remove
6663         cleanups.
6664         * skip.c: Include "common/gdb_optional.h".
6665         (skiplist_entry::compiled_function_regexp): Now a
6666         gdb::optional<compiled_regex>.
6667         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6668         (free_skiplist_entry): Remove regfree call.
6669         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6670         compiled_regex and gdb::optional.
6671         * symtab.c: Include "common/gdb_optional.h".
6672         (search_symbols): Use compiled_regex and gdb::optional.
6673         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6674         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6675         to gdb_regex.c.
6676
6677 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6678
6679         * regcache.c (regcache::save): Avoid buffer use.
6680         (regcache::dump): Likewise.
6681
6682 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6683
6684         * sh-tdep.c (sh_pseudo_register_read): Remove
6685         MAX_REGISTER_SIZE.
6686         (sh_pseudo_register_write): Likewise.
6687         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6688         (sh64_pseudo_register_write): Likewise
6689
6690 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6691
6692         * aarch64-tdep.c (aarch64_store_return_value): Use
6693         V_REGISTER_SIZE.
6694         (aarch64_pseudo_read_value): Likewise.
6695         (aarch64_pseudo_write): Likewise.
6696
6697 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6698
6699         * regformats/regdef.h (set_register_cache): Remove the
6700         declaration.
6701
6702 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6703
6704         * frame.c (frame_unwind_register_signed): Use
6705         frame_unwind_register_value.
6706
6707 2017-06-06  Pedro Alves  <palves@redhat.com>
6708
6709         PR breakpoints/21553
6710         * breakpoint.c (create_breakpoints_sal_default)
6711         (init_breakpoint_sal, create_breakpoint_sal): Use
6712         gdb::unique_xmalloc_ptr for string parameters.
6713         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6714         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6715         (base_breakpoint_create_breakpoints_sal)
6716         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6717         (strace_marker_create_breakpoints_sal)
6718         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6719         string parameters.
6720         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6721         gdb::unique_xmalloc_ptr for string parameters.
6722         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6723         parameters.
6724
6725 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6726
6727         * alpha-tdep.c (alpha_register_to_value): Use
6728         get_frame_register_value.
6729         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6730
6731 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6732
6733         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6734         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6735         (ia64_value_to_register): Likewise.
6736         (ia64_extract_return_value): Likewise.
6737         (ia64_store_return_value): Likewise.
6738         (ia64_push_dummy_call): Likewise.
6739
6740 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6741
6742         GDB 8.0 released.
6743
6744 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6745
6746         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6747
6748 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6749
6750         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6751         parameter.
6752         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6753
6754 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6755
6756         * event-loop.c (poll_timers): Unallocate timer using delete
6757         instead of xfree.
6758
6759 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6760
6761         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6762         (struct breakpoint) <~breakpoint>: New.
6763         (struct watchpoint): Inherit from breakpoint.
6764         <~watchpoint>: New.
6765         <base>: Remove.
6766         (struct tracepoint): Inherit from breakpoint.
6767         <base>: Remove.
6768         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6769         (struct longjmp_breakpoint): Inherit from breakpoint.
6770         <~longjmp_breakpoint>: New.
6771         <base>: Remove.
6772         (new_breakpoint_from_type): Remove casts.
6773         (watchpoint_in_thread_scope): Remove reference to base field.
6774         (watchpoint_del_at_next_stop): Likewise.
6775         (update_watchpoint): Likewise.
6776         (watchpoint_check): Likewise.
6777         (bpstat_check_watchpoint): Likewise.
6778         (set_longjmp_breakpoint): Likewise.
6779         (struct fork_catchpoint): Inherit from breakpoint.
6780         <base>: Remove.
6781         (struct solib_catchpoint): Inherit from breakpoint.
6782         <~solib_catchpoint>: New.
6783         <base>: Remove.
6784         (dtor_catch_solib): Change to ...
6785         (solib_catchpoint::~solib_catchpoint): ... this.
6786         (breakpoint_hit_catch_solib): Remove reference to base field.
6787         (add_solib_catchpoint): Likewise.
6788         (create_fork_vfork_event_catchpoint): Likewise.
6789         (struct exec_catchpoint): Inherit from breakpoint.
6790         <~exec_catchpoint>: New.
6791         <base>: Remove.
6792         (dtor_catch_exec): Change to ...
6793         (exec_catchpoint::~exec_catchpoint): ... this.
6794         (dtor_watchpoint): Change to ...
6795         (watchpoint::~watchpoint): ... this.
6796         (watch_command_1): Remove reference to base field.
6797         (catch_exec_command_1): Likewise.
6798         (base_breakpoint_dtor): Change to ...
6799         (breakpoint::~breakpoint): ... this.
6800         (base_breakpoint_ops): Remove dtor field value.
6801         (longjmp_bkpt_dtor): Change to ...
6802         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6803         (strace_marker_create_breakpoints_sal): Remove reference to base
6804         field.
6805         (delete_breakpoint): Don't manually call breakpoint destructor.
6806         (create_tracepoint_from_upload): Remove reference to base field.
6807         (trace_pass_set_count): Likewise.
6808         (initialize_breakpoint_ops): Don't initialize
6809         momentary_breakpoint_ops, don't set dtors.
6810         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6811         <~ada_catchpoint>: New.
6812         <base>: Remove.
6813         (create_excep_cond_exprs): Remove reference to base field.
6814         (dtor_exception): Change to ...
6815         (ada_catchpoint::~ada_catchpoint): ... this.
6816         (dtor_catch_exception): Remove.
6817         (dtor_catch_exception_unhandled): Remove.
6818         (dtor_catch_assert): Remove.
6819         (create_ada_exception_catchpoint): Remove reference to base
6820         field.
6821         (initialize_ada_catchpoint_ops): Don't set dtors.
6822         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6823         breakpoint.
6824         <~signal_catchpoint>: New.
6825         <base>: Remove.
6826         (signal_catchpoint_dtor): Change to ...
6827         (signal_catchpoint::~signal_catchpoint): ... this.
6828         (create_signal_catchpoint): Remove reference to base field.
6829         (initialize_signal_catchpoint_ops): Don't set dtor.
6830         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6831         from breakpoint.
6832         <~syscall_catchpoint>: New.
6833         <base>: Remove.
6834         (dtor_catch_syscall): Change to ...
6835         (syscall_catchpoint::~syscall_catchpoint): ... this.
6836         (create_syscall_event_catchpoint): Remove reference to base
6837         field.
6838         (initialize_syscall_catchpoint_ops): Don't set dtor.
6839         * break-catch-throw.c (struct exception_catchpoint): Inherit
6840         from breakpoint.
6841         <~exception_catchpoint>: New.
6842         <base>: Remove.
6843         (dtor_exception_catchpoint): Change to ...
6844         (exception_catchpoint::~exception_catchpoint): ... this.
6845         (handle_gnu_v3_exceptions): Remove reference to base field.
6846         (initialize_throw_catchpoint_ops): Don't set dtor.
6847         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6848         field.
6849         * remote.c (remote_get_tracepoint_status): Likewise.
6850         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6851         * tracefile.c (tracefile_fetch_registers): Likewise.
6852         * tracepoint.c (actions_command): Likewise.
6853         (validate_actionline): Likewise.
6854         (tfind_1): Likewise.
6855         (get_traceframe_location): Likewise.
6856         (find_matching_tracepoint_location): Likewise.
6857         (parse_tracepoint_status): Likewise.
6858         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6859
6860 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6861
6862         * breakpoint.c (struct longjmp_breakpoint): New struct.
6863         (is_tracepoint_type): Change return type to bool.
6864         (is_longjmp_type): New function.
6865         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6866         (set_raw_breakpoint_without_location): Use
6867         new_breakpoint_from_type.
6868         (set_raw_breakpoint): Likewise.
6869
6870 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6871
6872         * breakpoint.c (new_breakpoint_from_type): New function.
6873         (create_breakpoint_sal): Use new_breakpoint_from_type and
6874         unique_ptr.
6875         (create_breakpoint): Likewise.
6876
6877 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6878
6879         * memattr.c (mem_info_command): Rename to ...
6880         (info_mem_command): ... this.
6881         (mem_enable_command): Rename to ...
6882         (enable_mem_command): ... this.
6883         (mem_disable_command): Rename to ...
6884         (disable_mem_command): ... this.
6885         (mem_delete_command): Rename to ...
6886         (delete_mem_command): ... this.
6887         (_initialize_mem): Adjust function names.
6888
6889 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6890
6891         * btrace.c (handle_pt_insn_events): New.
6892         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6893         STATUS.  Split into this and ...
6894         (handle_pt_insn_event_flags): ... this.
6895
6896 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6897
6898         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6899         and struct pt_insn.resynced.
6900         * configure: Regenerated.
6901         * config.in: Regenerated.
6902
6903 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6904
6905         * btrace.c (ftrace_find_call_by_number): New function.
6906         (ftrace_new_function): Store objects, not pointers.
6907         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6908         ftrace_new_gap, ftrace_update_function,
6909         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6910         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6911         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6912         btrace_ends_with_single_insn, btrace_call_get): Account for
6913         btrace_thread_info::functions now storing objects.
6914         * btrace.h (struct btrace_thread_info): Add constructor.
6915         (struct btrace_thread_info) <functions>: Make std::vector.
6916         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6917         Initialize with default values.
6918         * record-btrace.c (record_btrace_frame_sniffer): Account for
6919         btrace_thread_info::functions now storing objects.
6920
6921 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6922
6923         * btrace.c: Remove typedef bfun_s.
6924         (ftrace_new_gap): Directly add gaps to the list of gaps.
6925         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6926         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6927         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6928         instead of gdb VEC.
6929
6930 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6931
6932         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6933         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6934         with btrace_thread_info::next_segment and
6935         btrace_thread_info::prev_segment.
6936         * btrace.h: Remove struct btrace_func_link.
6937         (struct btrace_function): Replace pair of function segment pointers
6938         with pair of indices.
6939         * python/py-record-btrace.c (btpy_call_prev_sibling,
6940         btpy_call_next_sibling): Replace references to
6941         btrace_thread_info::segment with btrace_thread_info::next_segment and
6942         btrace_thread_info::prev_segment.
6943         * record-btrace.c (record_btrace_frame_this_id): Use
6944         btrace_find_call_by_number.
6945
6946 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6947
6948         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6949         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6950         btrace_insn_next, btrace_insn_prev): Remove references to
6951         btrace_thread_info::flow.
6952         * btrace.h (struct btrace_function): Remove FLOW.
6953
6954 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6955
6956         * btrace.c (ftrace_find_call_by_number): New function.
6957         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6958         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6959         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6960         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6961         index.
6962         * btrace.h (struct btrace_function): Turn UP into an index.
6963         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6964         as an index.
6965         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6966         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6967         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6968
6969 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6970
6971         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6972         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6973         ftrace_update_function, ftrace_compute_global_level_offset,
6974         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6975         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6976         btrace_insn_end, btrace_is_empty): Remove references to
6977         btrace_thread_info::begin and btrace_thread_info::end.
6978         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6979         (struct btrace_thread_info) <functions>: Adjust comment.
6980         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6981         btrace_thread_info::begin.
6982
6983 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6984
6985         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6986         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6987         ftrace_update_function): Remove arguments that implicitly were always
6988         BTINFO->END.
6989         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6990         Don't pass BTINFO->END.
6991
6992 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6993
6994         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6995         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6996         btrace_find_insn_by_number): Replace function segment pointer with
6997         index.
6998         (btrace_insn_cmp): Simplify.
6999         * btrace.h: (struct btrace_insn_iterator) Rename index to
7000         insn_index.  Replace function segment pointer with index into function
7001         segment vector.
7002         * record-btrace.c (record_btrace_call_history): Replace function
7003         segment pointer use with index.
7004         (record_btrace_frame_sniffer): Retrieve function call segment through
7005         vector.
7006         (record_btrace_set_replay): Remove defunc't safety check.
7007
7008 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7009
7010         * btrace.c (btrace_ends_with_single_insn): New function.
7011         (btrace_call_get, btrace_call_number, btrace_call_begin,
7012         btrace_call_end, btrace_call_next, btrace_call_prev,
7013         btrace_find_call_by_number): Use index into call segment vector
7014         instead of pointer.
7015         (btrace_call_cmp): Simplify.
7016         * btrace.h (struct btrace_call_iterator): Replace function call segment
7017         pointer with index into vector.
7018         * record-btrace.c (record_btrace_call_history): Use index instead of
7019         pointer.
7020
7021 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7022
7023         * btrace.c (btrace_insn_begin, btrace_insn_end,
7024         btrace_find_insn_by_number): Add btinfo to iterator.
7025         * btrace.h (struct btrace_insn_iterator): Add btinfo.
7026
7027 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7028
7029         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7030         and save pointers directly.
7031         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7032         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7033         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
7034         changed signature of functions.
7035         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7036         (btrace_fetch): Remove code that adds btrace_function pointers to
7037         vector of btrace_functions.
7038         (btrace_clear): Simplify freeing vector of btrace_functions.
7039
7040 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7041
7042         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7043         Replace VEC_* with std::vector functions.
7044         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7045         (struct btrace_thread_info)<functions>: Change type to std::vector.
7046
7047 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7048
7049         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7050         "Removed targets and native configurations" up.  Merge duplicate
7051         "New commands" sub-sections.  Add "New options" sub-sections.
7052
7053 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7054
7055         * defs.h (copy_integer_to_size): New declaration.
7056         * findvar.c (copy_integer_to_size): New function.
7057         (do_cint_test): New selftest function.
7058         (copy_integer_to_size_test): Likewise.
7059         (_initialize_findvar): Likewise.
7060         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7061         (mips_fbsd_collect_reg): Use raw_collect_integer.
7062         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7063         (mips64_fill_gregset): Use raw_collect_integer
7064         (mips64_fill_fpregset): Use raw_supply_integer.
7065         * regcache.c (regcache::raw_supply_integer): New function.
7066         (regcache::raw_collect_integer): Likewise.
7067         * regcache.h: (regcache::raw_supply_integer): New declaration.
7068         (regcache::raw_collect_integer): Likewise.
7069
7070 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7071
7072         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7073         (COMMON_OBS): Add gdbarch-selftests.o.
7074         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7075         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7076         * gdbarch-selftests.c: New file.
7077         * regcache.h (regcache) <~regcache>: Mark it virtual if
7078         GDB_SELF_TEST.
7079         <raw_write>: Likewise.
7080
7081 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7082
7083         * regcache.c (current_regcache): Change it to
7084         regcache::current_regcache.
7085         (regcache_observer_target_changed): Update.
7086         (regcache_thread_ptid_changed): Make it a regcache static
7087         method.
7088         (regcache_thread_ptid_changed): Update.
7089         (class regcache_access): New.
7090         (current_regcache_test): Update.
7091         (_initialize_regcache): Update.
7092         * regcache.h: Include forward_list.
7093         (regcache): Declare regcache_thread_ptid_changed and declare
7094         registers_changed_ptid as friend.
7095
7096 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7097
7098         * i387-tdep.c (i387_register_to_value): Use register_size
7099         instead of TYPE_LENGTH.
7100         * m68k-tdep.c (m68k_register_to_value): Likewise.
7101
7102 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7103
7104         * i387-tdep.c (i387_convert_register_p): Return false if type
7105         code isn't TYPE_CODE_FLT.
7106
7107 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7108
7109         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7110         length is 4.
7111         (alpha_register_to_value): Remove type length check.
7112         (alpha_value_to_register): Likewise.
7113
7114 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7115
7116         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7117         TYPE_CODE_FLT.
7118
7119 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7120
7121         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7122         TYPE_CODE_FLT or not.
7123
7124 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7125
7126         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7127         * avr-tdep.c (avr_gdbarch_init): Likewise.
7128         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7129         * cris-tdep.c (cris_gdbarch_init): Likewise.
7130         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7131         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7132         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7133         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7134         * mep-tdep.c (mep_gdbarch_init): Likewise.
7135         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7136         * mips-tdep.c (mips_gdbarch_init): Likewise.
7137         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7138         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7139         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7140         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7141         * v850-tdep.c (v850_gdbarch_init): Likewise.
7142
7143 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7144
7145         * selftest-arch.c (tests_with_arch): Call registers_changed
7146         and reinit_frame_cache.
7147         * selftest.c (run_self_tests): Likewise.
7148
7149 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7150
7151         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7152         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7153
7154 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7155
7156         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7157         set_gdbarch_print_insn.
7158
7159 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7160
7161         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7162         set_gdbarch_print_insn.
7163
7164 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7165
7166         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7167         set_gdbarch_print_insn.
7168         * arc-tdep.c (arc_gdbarch_init): Likewise.
7169         * arch-utils.c: include dis-asm.h.
7170         (default_print_insn): New function.
7171         * arch-utils.h (default_print_insn): Declare.
7172         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7173         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7174         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7175         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7176         * frv-tdep.c (frv_gdbarch_init): Likewise.
7177         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7178         * gdbarch.sh (print_insn): Use default_print_insn.
7179         * gdbarch.c: Regenerated.
7180         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7181         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7182         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7183         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7184         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7185         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7186         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7187         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7188         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7189         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7190         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7191         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7192         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7193         * mt-tdep.c (mt_gdbarch_init): Likewise.
7194         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7195         * nios2-tdep.c (nios2_print_insn): Remove.
7196         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7197         * rx-tdep.c (rx_gdbarch_init): Likewise.
7198         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7199         * score-tdep.c (score_print_insn): Remove.
7200         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7201         * sh-tdep.c (sh_gdbarch_init): Likewise.
7202         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7203         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7204         * tic6x-tdep.c (tic6x_print_insn): Remove.
7205         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7206         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7207         * v850-tdep.c (v850_gdbarch_init): Likewise.
7208         * vax-tdep.c (vax_gdbarch_init): Likewise.
7209         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7210         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7211
7212 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7213
7214         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7215         (MIPS_FP0_REGNUM): Remove.
7216         (MIPS_FSR_REGNUM): Remove.
7217         (mips_fbsd_supply_fpregs): Use mips_regnum.
7218         (mips_fbsd_supply_gregs): Likewise.
7219         (mips_fbsd_collect_fpregs): Likewise.
7220         (mips_fbsd_collect_gregs): Likewise.
7221
7222 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7223
7224         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7225         (getpfpregs_supplies): New function.
7226         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7227         getfpregs_supplies.
7228         (mips_fbsd_store_inferior_registers): Likewise.
7229
7230 2017-05-22  Pedro Alves <palves@redhat.com>
7231
7232         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7233         maintainer.
7234
7235 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7236
7237         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7238         (store_register): Likewise.
7239         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7240         (get_decimal_float_return_value): Likewise.
7241         (do_ppc_sysv_return_value): Likewise.
7242         (ppc64_sysv_abi_push_integer): Likewise.
7243         (ppc64_sysv_abi_push_freg): Likewise.
7244         (ppc64_sysv_abi_return_value_base): Likewise.
7245         (ppc64_sysv_abi_return_value): Likewise.
7246         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7247         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7248         * rs6000-nat.c: Likewise.
7249         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7250         (rs6000_value_to_register): Likewise.
7251         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7252
7253 2017-05-21  Tom Tromey  <tom@tromey.com>
7254
7255         PR rust/21466:
7256         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7257         arrays as "[T]", not "[T; ]".
7258
7259 2017-05-19  Tom Tromey  <tom@tromey.com>
7260
7261         PR rust/21484:
7262         * rust-lang.c (exp_descriptor_rust): New function.
7263         (rust_language_defn): Use it.
7264         * p-lang.c (pascal_language_defn): Update.
7265         * opencl-lang.c (opencl_language_defn): Update.
7266         * objc-lang.c (objc_language_defn): Update.
7267         * m2-lang.c (m2_language_defn): Update.
7268         * language.h (struct language_defn)
7269         <la_watch_location_expression>: New member.
7270         * language.c (unknown_language_defn, auto_language_defn)
7271         (local_language_defn): Update.
7272         * go-lang.c (go_language_defn): Update.
7273         * f-lang.c (f_language_defn): Update.
7274         * d-lang.c (d_language_defn): Update.
7275         * c-lang.h (c_watch_location_expression): Declare.
7276         * c-lang.c (c_watch_location_expression): New function.
7277         (c_language_defn, cplus_language_defn, asm_language_defn)
7278         (minimal_language_defn): Use it.
7279         * breakpoint.c (watch_command_1): Call
7280         la_watch_location_expression.
7281         * ada-lang.c (ada_language_defn): Update.
7282
7283 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7284
7285         PR tui/21482
7286         * gdb_curses.h (NOMACROS): Define.
7287         (NCURSES_NOMACROS): Define.
7288
7289 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7290
7291         PR tui/21482
7292         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7293         arg to char *.
7294         * tui/tui-wingeneral.c (box_win): Likewise.
7295         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7296         (tui_show_source_line): Likewise.
7297         (tui_show_exec_info_content): Likewise.
7298
7299 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7300
7301         * sparc-tdep.c (sparc_structure_return_p)
7302         (sparc_arg_on_registers_p): New functions.
7303         (sparc32_store_arguments): Use them.
7304         * sparc64-tdep.c (sparc64_16_byte_align_p)
7305         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7306         Handle TYPE_CODE_ARRAY.
7307
7308 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7309
7310         * cli/cli-decode.c (add_alias_cmd): New function.
7311         * command.h (add_alias_cmd): Declare.
7312         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7313         instead call add_alias_cmd.
7314
7315 2017-05-17  Pedro Alves  <palves@redhat.com>
7316
7317         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7318         (nat_makefile_frag): ... this.  All references updated.
7319         * configure.ac: Likewise.
7320         * configure.nat: Likewise.  Enhance comments.
7321         * configure: Regenerate.
7322
7323 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7324
7325         * procfs.c (procfs_create_inferior): Change prototype to match
7326         definition.
7327
7328 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7329
7330         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7331         C++ compiler warning.
7332
7333 2017-05-12  Tom Tromey  <tom@tromey.com>
7334
7335         PR rust/21483:
7336         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7337         recurse, just call value_struct_elt directly.
7338
7339 2017-05-12  Tom Tromey  <tom@tromey.com>
7340
7341         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7342         OP_RUST_ARRAY>: Fix.
7343
7344 2017-05-12  Tom Tromey  <tom@tromey.com>
7345
7346         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7347
7348 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7349
7350         * regcache.c: Include <forward_list>.
7351         (struct regcache_list): Remove.
7352         (current_regcache): Update.
7353         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7354         (regcache_thread_ptid_changed): Likewise.
7355         (registers_changed_ptid): Likewise.
7356         (current_regcache_size): Likewise.
7357
7358 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7359
7360         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7361         (current_regcache_size): New function.
7362         (current_regcache_test): New function.
7363         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7364
7365 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7366
7367         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7368         (print_gp_register_row): Use get_frame_register_value.
7369
7370 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7371
7372         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7373         (mips_supply_fpregset): Likewise.
7374         (mips64_supply_gregset): Likewise.
7375
7376 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7377
7378         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7379         regcache->raw_supply_zeroed.
7380
7381 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7382
7383         * configure.nat: Rearrange 'case' statements to match
7384         host before cpu.
7385
7386 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7387
7388         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7389         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7390         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7391         "@nat_extra_makefile_frag@".
7392         (Makefile): Remove dependency on "@frags@".
7393         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7394         (data-directory/Makefile): Likewise.
7395         * config/aarch64/linux.mh: Deleted; moved contents to
7396         "gdb/configure.nat".
7397         * config/alpha/alpha-linux.mh: Likewise.
7398         * config/alpha/nbsd.mh: Likewise.
7399         * config/arm/linux.mh: Likewise.
7400         * config/arm/nbsdelf.mh: Likewise.
7401         * config/i386/cygwin.mh: Likewise.
7402         * config/i386/cygwin64.mh: Likewise.
7403         * config/i386/darwin.mh: Likewise.
7404         * config/i386/fbsd.mh: Likewise.
7405         * config/i386/fbsd64.mh: Likewise.
7406         * config/i386/go32.mh: Likewise.
7407         * config/i386/i386gnu.mh: Likewise.
7408         * config/i386/i386sol2.mh: Likewise.
7409         * config/i386/linux.mh: Likewise.
7410         * config/i386/linux64.mh: Likewise.
7411         * config/i386/mingw.mh: Likewise.
7412         * config/i386/mingw64.mh: Likewise.
7413         * config/i386/nbsd64.mh: Likewise.
7414         * config/i386/nbsdelf.mh: Likewise.
7415         * config/i386/nto.mh: Likewise.
7416         * config/i386/obsd.mh: Likewise.
7417         * config/i386/obsd64.mh: Likewise.
7418         * config/i386/sol2-64.mh: Likewise.
7419         * config/ia64/linux.mh: Likewise.
7420         * config/m32r/linux.mh: Likewise.
7421         * config/m68k/linux.mh: Likewise.
7422         * config/m68k/nbsdelf.mh: Likewise.
7423         * config/m68k/obsd.mh: Likewise.
7424         * config/m88k/obsd.mh: Likewise.
7425         * config/mips/fbsd.mh: Likewise.
7426         * config/mips/linux.mh: Likewise.
7427         * config/mips/nbsd.mh: Likewise.
7428         * config/mips/obsd64.mh: Likewise.
7429         * config/pa/linux.mh: Likewise.
7430         * config/pa/nbsd.mh: Likewise.
7431         * config/pa/obsd.mh: Likewise.
7432         * config/powerpc/aix.mh: Likewise.
7433         * config/powerpc/fbsd.mh: Likewise.
7434         * config/powerpc/linux.mh: Likewise.
7435         * config/powerpc/nbsd.mh: Likewise.
7436         * config/powerpc/obsd.mh: Likewise.
7437         * config/powerpc/ppc64-linux.mh: Likewise.
7438         * config/powerpc/spu-linux.mh: Likewise.
7439         * config/s390/linux.mh: Likewise.
7440         * config/sh/nbsd.mh: Likewise.
7441         * config/sparc/fbsd.mh: Likewise.
7442         * config/sparc/linux.mh: Likewise.
7443         * config/sparc/linux64.mh: Likewise.
7444         * config/sparc/nbsd64.mh: Likewise.
7445         * config/sparc/nbsdelf.mh: Likewise.
7446         * config/sparc/obsd64.mh: Likewise.
7447         * config/sparc/sol2.mh: Likewise.
7448         * config/tilegx/linux.mh: Likewise.
7449         * config/vax/nbsdelf.mh: Likewise.
7450         * config/vax/obsd.mh: Likewise.
7451         * config/xtensa/linux.mh: Likewise.
7452         * config/i386/i386gnu.mn: New file, with excerpts from
7453         "config/i386/i386gnu.mh".
7454         * configure: Regenerate.
7455         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7456         *.mh files under "gdb/config".
7457         * configure.nat: New file, with contents from the
7458         "gdb/config/*/*.mh" files.
7459
7460 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7461
7462         * btrace.c (btrace_clear): Free insn vector.
7463
7464 2017-05-05  Pedro Alves  <palves@redhat.com>
7465
7466         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7467         * configure: Regenerate.
7468
7469 2017-05-04  Pedro Alves  <palves@redhat.com>
7470
7471         * Makefile.in (SFILES): Add progspace-and-thread.c.
7472         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7473         (COMMON_OBS): Add progspace-and-thread.o.
7474         * breakpoint.c: Include "progspace-and-thread.h".
7475         (update_inserted_breakpoint_locations)
7476         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7477         Use scoped_restore_current_pspace_and_thread.
7478         (create_std_terminate_master_breakpoint): Use
7479         scoped_restore_current_program_space.
7480         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7481         (print_breakpoint_location): Use
7482         scoped_restore_current_program_space.
7483         (bp_loc_is_permanent): Use
7484         scoped_restore_current_pspace_and_thread.
7485         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7486         (download_tracepoint_locations): Use
7487         scoped_restore_current_pspace_and_thread.
7488         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7489         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7490         (enum step_over_calls_kind): Moved from inferior.h.
7491         (class scoped_restore_current_thread): New class.
7492         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7493         declaration.
7494         (scoped_restore_current_thread): New class.
7495         * infcmd.c: Include "common/gdb_optional.h".
7496         (continue_1, proceed_after_attach): Use
7497         scoped_restore_current_thread.
7498         (notice_new_inferior): Use scoped_restore_current_thread.
7499         * inferior.c: Include "progspace-and-thread.h".
7500         (restore_inferior, save_current_inferior): Delete.
7501         (add_inferior_command, clone_inferior_command): Use
7502         scoped_restore_current_pspace_and_thread.
7503         * inferior.h (scoped_restore_current_inferior): New class.
7504         * infrun.c: Include "progspace-and-thread.h" and
7505         "common/gdb_optional.h".
7506         (follow_fork_inferior): Use
7507         scoped_restore_current_pspace_and_thread.
7508         (scoped_restore_exited_inferior): New class.
7509         (handle_vfork_child_exec_or_exit): Use
7510         scoped_restore_exited_inferior,
7511         scoped_restore_current_pspace_and_thread,
7512         scoped_restore_current_thread and scoped_restore.
7513         (fetch_inferior_event): Use scoped_restore_current_thread.
7514         * linespec.c (decode_line_full, decode_line_1): Use
7515         scoped_restore_current_program_space.
7516         * mi/mi-main.c: Include "progspace-and-thread.h".
7517         (exec_continue): Use scoped_restore_current_thread.
7518         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7519         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7520         * proc-service.c (ps_pglobal_lookup): Use
7521         scoped_restore_current_program_space.
7522         * progspace-and-thread.c: New file.
7523         * progspace-and-thread.h: New file.
7524         * progspace.c (release_program_space, clone_program_space): Use
7525         scoped_restore_current_program_space.
7526         (restore_program_space, save_current_program_space)
7527         (save_current_space_and_thread): Delete.
7528         (switch_to_program_space_and_thread): Moved to
7529         progspace-and-thread.c.
7530         * progspace.h (save_current_program_space)
7531         (save_current_space_and_thread): Delete declarations.
7532         (scoped_restore_current_program_space): New class.
7533         * remote.c (remote_btrace_maybe_reopen): Use
7534         scoped_restore_current_thread.
7535         * symtab.c: Include "progspace-and-thread.h".
7536         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7537         * thread.c (print_thread_info_1): Use
7538         scoped_restore_current_thread.
7539         (struct current_thread_cleanup): Delete.
7540         (do_restore_current_thread_cleanup)
7541         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7542         (scoped_restore_current_thread::~scoped_restore_current_thread):
7543         ... this new dtor.
7544         (make_cleanup_restore_current_thread): Rename/convert to ...
7545         (scoped_restore_current_thread::scoped_restore_current_thread):
7546         ... this new ctor.
7547         (thread_apply_all_command): Use scoped_restore_current_thread.
7548         (thread_apply_command): Use scoped_restore_current_thread.
7549         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7550         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7551
7552 2017-05-04  Pedro Alves  <palves@redhat.com>
7553
7554         * thread.c (make_cleanup_restore_current_thread): Move
7555         find_thread_ptid call before the is_stopped call.  Assert that the
7556         thread is found.  Replace is_stopped call by checking the thread's
7557         state directly.  Remove unnecessary NULL-thread check.
7558
7559 2017-05-04  Pedro Alves  <palves@redhat.com>
7560
7561         * corelow.c (thread_section_name): New class.
7562         (get_core_register_section, get_core_siginfo): Use it.
7563
7564 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7565
7566         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7567         (get_core_register_section): Remove xfree of NULL pointer.
7568
7569 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7570
7571         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7572         * regcache.c (regcache::raw_supply_zeroed): New function.
7573         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7574
7575 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7576
7577         * gdbarch.sh: Remove commented out definition of
7578         TARGET_CHAR_BIT.
7579         * gdbarch.h: Re-generate.
7580
7581 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7582
7583         * configure: Regenerate.
7584
7585 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7586
7587         * solib-target.c (solib_target_relocate_section_addresses):
7588         Remove num_section_bases, num_bases, segment_bases variables.
7589
7590 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7591
7592         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7593
7594 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7595
7596         * solib-target.c: Include <vector>
7597         (struct lm_info_target) <~lm_info_target>: Remove.
7598         <segment_bases, section_bases>: Change type to
7599         std::vector<CORE_ADDR>.
7600         (library_list_start_segment, library_list_start_section,
7601         library_list_end_library,
7602         solib_target_relocate_section_addresses): Adjust.
7603
7604 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7605
7606         * gdbarch.sh (software_single_step): Change return type to
7607         std::vector<CORE_ADDR>.
7608         * gdbarch.c, gdbarch.h: Re-generate.
7609         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7610         Adjust.
7611         (arm_deal_with_atomic_sequence_raw): Adjust.
7612         (thumb_get_next_pcs_raw): Adjust.
7613         (arm_get_next_pcs_raw): Adjust.
7614         (arm_get_next_pcs): Adjust.
7615         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7616         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7617         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7618         (alpha_software_single_step): Adjust.
7619         * alpha-tdep.h (alpha_software_single_step): Adjust.
7620         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7621         * arm-tdep.c (arm_software_single_step): Adjust.
7622         (arm_breakpoint_kind_from_current_state): Adjust.
7623         * arm-tdep.h (arm_software_single_step): Adjust.
7624         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7625         * cris-tdep.c (cris_software_single_step): Adjust.
7626         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7627         (micromips_deal_with_atomic_sequence): Adjust.
7628         (deal_with_atomic_sequence): Adjust.
7629         (mips_software_single_step): Adjust.
7630         * mips-tdep.h (mips_software_single_step): Adjust.
7631         * moxie-tdep.c (moxie_software_single_step): Adjust.
7632         * nios2-tdep.c (nios2_software_single_step): Adjust.
7633         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7634         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7635         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7636         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7637         * sparc-tdep.c (sparc_software_single_step): Adjust.
7638         * spu-tdep.c (spu_software_single_step): Adjust.
7639         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7640
7641 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7642
7643         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7644         * gdbarch.h: Re-generate.
7645
7646 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7647
7648         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7649         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7650         * python/py-instruction.c, python/py-instruction.h: New file.
7651         * python/py-record.c: Add py-instruction.h include.
7652         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7653         gdb.RecordInstruction.
7654         * python/python-internal.h: Add gdbpy_initialize_instruction
7655         declaration.
7656         * python/python.c (do_start_initialization): Add
7657         gdbpy_initialize_instruction.
7658
7659 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7660
7661         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7662         Remove.
7663         (btrace_func_from_recpy_func): New function.
7664         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7665         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7666         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7667         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7668         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7669         Also, use new helper functions.
7670         (btpy_list_item): Use new helper functions.
7671         (recpy_bt_function_call_history): Use new type name.
7672         (btpy_call_getset): Remove.
7673         (gdbpy_initialize_btrace): Remove code to initialize
7674         gdb.BtraceFunctionCall.
7675         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7676         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7677         recpy_bt_func_prev, recpy_bt_func_next): New export.
7678         * python/py-record.c (recpy_func_type): New static object.
7679         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7680         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7681         recpy_func_next): New function.
7682         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7683         (recpy_func_getset): New static object.
7684         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7685         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7686
7687 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7688
7689         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7690         (btpy_object, btpy_insn_type, btpy_new): Remove.
7691         (btpy_list_object): Use gdb.RecordInstruction type instead of
7692         gdb.BtraceInstruction type.
7693         (btrace_insn_from_recpy_insn): New function.
7694         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7695         btpy_new.
7696         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7697         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7698         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7699         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7700         instead of btpy_object.
7701         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7702         btpy_insn_data, btpy_insn_decode): Rename to ...
7703         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7704         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7705         recpy_bt_insn_decode): This.  Also, use new helper functions.
7706         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7707         recpy_insn_type.
7708         (btpy_insn_getset): Remove.
7709         (gdbpy_initialize_btrace): Remove code to initialize
7710         gdb.BtraceInstruction.  Use recpy_element_object.
7711         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7712         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7713         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7714         * python/py-record.c (recpy_insn_type): New static object.
7715         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7716         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7717         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7718         New function.
7719         (recpy_insn_getset): New static object.
7720         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7721         * python/py-record.h (recpy_element_object): New typedef.
7722         (recpy_insn_type, recpy_insn_new): New export.
7723
7724 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7725
7726         * py-record-btrace.c (btpy_insn_new): Removed.
7727         (btpy_insn_or_gap_new): New function.
7728         (btpy_insn_error): Removed.
7729         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7730         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7731         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7732         btpy_insn_or_gap_new instead of btpy_insn_new.
7733         (btpy_insn_getset): Remove btpy_insn_error.
7734         * py-record.c (recpy_gap_type): New static object.
7735         (recpy_gap_object): New typedef.
7736         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7737         recpy_gap_reason_string): New function.
7738         (recpy_gap_getset): New static object.
7739         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7740         * py-record.h (recpy_gap_new): New export.
7741
7742 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7743
7744         * python/py-record.c (recpy_ptid): Remove.
7745         (recpy_record_getset): Remove recpy_ptid.
7746
7747 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7748
7749         * btrace.c (btrace_fetch): Set inferior_ptid.
7750         * python/py-record-btrace.c: Add "py-record.h" include.
7751         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7752         recpy_bt_end, recpy_bt_instruction_history,
7753         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7754         in gdb.Record object instead of current ptid.
7755         * python/py-record.c: Include new "py-record.h" file.
7756         (recpy_record_object): Moved to py-record.h.
7757         * python/py-record.h: New file.
7758
7759 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7760
7761         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7762         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7763         indentation.
7764
7765 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7766
7767         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7768         the past maintainers section.
7769
7770 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7771
7772         * infcmd.c (get_return_value): Use regcache ctor, and remove
7773         cleanup.
7774
7775 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7776             Pedro Alves  <palves@redhat.com>
7777
7778         * regcache.c (regcache::regcache): New tag dispatch ctor.
7779         (do_cooked_read): Moved above.
7780         (regcache_dup): Use the tag dispatch ctor..
7781         * regcache.h (regcache): Declare ctor, delete copy ctor and
7782         assignment operator, remove friend regcache_dup.
7783
7784 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7785
7786         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7787         call method save instead of regcache_cpy.
7788         * regcache.h (struct regcache): Make regcache_dup a friend.
7789
7790 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7791
7792         * regcache.c (struct regcache): Move to regcache.h
7793         (regcache::arch): New method.
7794         (regcache_get_ptid): Update.
7795         (get_regcache_arch): Call arch method.
7796         (get_regcache_aspace): Call method aspace.
7797         (register_buffer): Change it to method.
7798         (regcache_save): Change it to regcache::save.
7799         (regcache_restore): Likewise.
7800         (regcache_cpy_no_passthrough): Remove the declaration.
7801         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7802         (regcache_cpy_no_passthrough): Change it to method
7803         cpy_no_passthrough.
7804         (regcache_register_status): Change it to method
7805         get_register_status.
7806         (regcache_invalidate): Change it to method invalidate.
7807         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7808         (regcache_raw_update): Change it to method raw_update.
7809         (regcache_raw_read): Likewise.
7810         (regcache_raw_read_signed): Likewise.
7811         (regcache_raw_read_unsigned): Likewise.
7812         (regcache_raw_write_signed): Likewise.
7813         (regcache_raw_write_unsigned): Likewise.
7814         (regcache_cooked_read): Likewise.
7815         (regcache_cooked_read_value): Likewise.
7816         (regcache_cooked_read_signed): Likewise.
7817         (regcache_cooked_read_unsigned): Likewise.
7818         (regcache_cooked_write_signed): Likewise.
7819         (regcache_cooked_write_unsigned): Likewise.
7820         (regcache_raw_set_cached_value): Likewise.
7821         (regcache_raw_write): Likewise.
7822         (regcache_cooked_write): Likewise.
7823         (regcache_xfer_part): Likewise.
7824         (regcache_raw_read_part): Likewise.
7825         (regcache_raw_write_part): Likewise.
7826         (regcache_cooked_read_part): Likewise.
7827         (regcache_cooked_write_part): Likewise.
7828         (regcache_raw_supply): Likewise.
7829         (regcache_raw_collect): Likewise.
7830         (regcache_transfer_regset): Likewise.
7831         (regcache_supply_regset): Likewise.
7832         (regcache_collect_regset): Likewise.
7833         (regcache_debug_print_register): Likewise.
7834         (enum regcache_dump_what): Move it to regcache.h.
7835         (regcache_dump): Change it to method dump.
7836         * regcache.h (enum regcache_dump_what): New.
7837         (class regcache): New.
7838         * target.c (target_fetch_registers): Call method
7839         debug_print_register.
7840         (target_store_registers): Likewise.
7841
7842 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7843
7844         * windows-nat.c (struct lm_info_windows): Initialize field.
7845         (windows_make_so): Allocate lm_info_windows with new.
7846         (windows_free_so): Free lm_info_windows with delete.
7847
7848 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7849
7850         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7851         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7852         cleanup.
7853         (darwin_free_so): Free lm_info_darwin with delete.
7854
7855 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7856
7857         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7858         <l_addr_p>: Change type to bool.
7859         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7860         (svr4_free_so): Free lm_info_svr4 with delete.
7861         (svr4_copy_library_list): Replace memcpy with call to copy
7862         constructor.
7863         (library_list_start_library, svr4_default_sos): Allocate
7864         lm_info_svr4 with new.
7865
7866 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7867
7868         * solib-target.c (struct lm_info_target): Add destructor,
7869         initialize fields.
7870         <name>: Change type to std::string.
7871         (library_list_start_library): Allocate lm_info_target with new.
7872         (solib_target_free_library_list): Free lm_info_target with
7873         delete.
7874         (solib_target_current_sos): Adapt to std::string.
7875         (solib_target_free_so): Free lm_info_target with delete.
7876
7877 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7878
7879         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7880         fields.
7881         (frv_current_sos): Allocate lm_info_frv with new.
7882         (frv_relocate_main_executable): Free lm_info_frv with delete,
7883         allocate with new.
7884         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7885
7886 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7887
7888         * solib-frv.c (struct lm_info_frv): Fix indentation.
7889
7890 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7891
7892         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7893         map field.
7894         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7895         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7896         and allocate with new.
7897         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7898
7899 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7900
7901         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7902         <filename, member_name>: Change type to std::string.
7903         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7904         (library_list_start_library): Allocate lm_info_aix with new.
7905         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7906         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7907         with copy constructor.
7908
7909 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7910
7911         * solist.h (struct lm_info): Remove.
7912         (struct lm_info_base): New class.
7913         (struct so_list) <lm_info>: Change type to lm_info_base *.
7914         * nto-tdep.c (struct lm_info): Remove.
7915         (lm_addr): Adjust.
7916         * solib-aix.c (struct lm_info): Rename to ...
7917         (struct lm_info_aix): ... this.  Extend lm_info_base.
7918         (lm_info_p): Rename to ...
7919         (lm_info_aix_p): ... this, and adjust.
7920         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7921         solib_aix_parse_libraries, library_list_start_library,
7922         solib_aix_free_library_list, solib_aix_parse_libraries,
7923         solib_aix_get_library_list,
7924         solib_aix_relocate_section_addresses, solib_aix_free_so,
7925         solib_aix_get_section_offsets,
7926         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7927         Adjust.
7928         (struct solib_aix_inferior_data) <library_list>: Adjust.
7929         * solib-darwin.c (struct lm_info): Rename to ...
7930         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7931         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7932         * solib-dsbt.c (struct lm_info): Rename to ...
7933         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7934         (struct dsbt_info) <main_executable_lm_info): Adjust.
7935         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7936         dsbt_relocate_section_addresses): Adjust.
7937         * solib-frv.c (struct lm_info): Rename to ...
7938         (struct lm_info_frv): ... this.  Extend lm_info_base.
7939         (main_executable_lm_info): Adjust.
7940         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7941         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7942         find_canonical_descriptor_in_load_object,
7943         frv_fdpic_find_canonical_descriptor): Adjust.
7944         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7945         to lm_info_svr4.
7946         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7947         svr4_clear_so, svr4_copy_library_list,
7948         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7949         svr4_current_sos, svr4_fetch_objfile_link_map,
7950         solist_update_incremental): Adjust.
7951         * solib-svr4.h (struct lm_info_svr4): Move here from
7952         solib-svr4.c.
7953         * solib-target.c (struct lm_info): Rename to ...
7954         (struct lm_info_target): ... this.  Extend lm_info_base.
7955         (lm_info_p): Rename to ...
7956         (lm_info_target_p): ... this.
7957         (solib_target_parse_libraries, library_list_start_segment,
7958         library_list_start_section, library_list_start_library,
7959         library_list_end_library, solib_target_free_library_list,
7960         solib_target_current_sos, solib_target_free_so,
7961         solib_target_relocate_section_addresses): Adjust.
7962         * windows-nat.c (struct lm_info): Rename to ...
7963         (struct lm_info_windows): ... this.  Extend lm_info_base.
7964         (windows_make_so, handle_load_dll, handle_unload_dll,
7965         windows_xfer_shared_libraries): Adjust.
7966
7967 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7968
7969         * solib-darwin.c (struct darwin_so_list): Remove.
7970         (darwin_current_sos): Allocate an so_list object instead of a
7971         darwin_so_list, separately allocate an lm_info object.
7972         (darwin_free_so): Free lm_info.
7973
7974 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7975
7976         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7977         with fprintf_filtered.
7978
7979 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7980
7981         * regcache.c (regcache::regcache): New function.
7982         (regcache::~regcache): New function.
7983         (regcache_xmalloc_1): Remove.
7984         (regcache_xmalloc): Call new regcache.
7985         (regcache_xfree): Call delete regcache.
7986         (get_thread_arch_aspace_regcache): Call new regcache.
7987
7988 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7989
7990         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7991         lwp instead of ptid_get_lwp.
7992
7993 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7994
7995         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7996         lwp_info instead of getting from inferior_ptid.
7997
7998 2017-04-27  Keith Seitz  <keiths@redhat.com>
7999
8000         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8001         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8002         (CV_CONVERSION_BADNESS): Define.
8003         (rank_one_type): Remove overly restrictive rvalue reference
8004         rank checks.
8005         Add cv-qualifier checks and subranks for type equality.
8006         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8007         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8008         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8009
8010 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
8011
8012         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8013         count when creating the object.
8014
8015 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
8016             Ulrich Weigand  <uweigand@de.ibm.com>
8017
8018         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8019         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8020         is used in AIX.
8021         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8022         (process_xcoff_symbol): Likewise.
8023         (scan_xcoff_symtab): Likewise.
8024
8025 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8026
8027         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8028         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8029         (ia64_access_reg): Use get_frame_register_unsigned.
8030         (ia64_access_rse_reg): Likewise.
8031         (ia64_libunwind_frame_prev_register): Likewise.
8032
8033 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
8034
8035         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8036         * gdbarch.c: Regenerated.
8037         * gdbarch.h: Regenerated.
8038         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8039         visibility external.
8040         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8041         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8042         (enum cfa_how_kind): Move to ...
8043         (struct dwarf2_frame_state_reg_info): Likewise.
8044         (struct dwarf2_frame_state): Likewise.
8045         * dwarf2-frame.h: ... here.
8046         (dwarf2_frame_state_alloc_regs): New declaration.
8047         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8048         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8049
8050 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8051
8052         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8053         regcache_raw_read_unsigned.
8054         (xtensa_pseudo_register_write): Likewise.
8055
8056 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8057
8058         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8059         (nds32_pseudo_register_write): Likewise.
8060
8061 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8062
8063         * regcache.c (struct regcache) <readonly_p>: Change its type
8064         to bool.
8065         (regcache_xmalloc_1): Update parameter type and callers update.
8066
8067 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8068
8069         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8070         set_gdbarch_wchar_bit.
8071         * arm-tdep.c (arm_gdbarch_init): Likewise.
8072
8073 2017-04-25  Pedro Alves  <palves@redhat.com>
8074
8075         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8076         (BothAreRelocatable, memcopy, memmove): Don't define.
8077         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8078         macros.
8079
8080 2017-04-25  Pedro Alves  <palves@redhat.com>
8081
8082         * common/common-defs.h: Include "common/poison.h".
8083         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8084         and adjust.
8085         * common/poison.h: New file.
8086         * common/traits.h: Include <type_traits>.
8087         (Not, Or, Requires): New, moved from common/function-view.h.
8088
8089 2017-04-25  Pedro Alves  <palves@redhat.com>
8090
8091         * breakpoint.h (struct breakpoint): In-class initialize all
8092         fields.  Make boolean fields "bool".
8093         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8094         memset call and initializations no longer necessary.
8095
8096 2017-04-25  Pedro Alves  <palves@redhat.com>
8097
8098         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8099         reference.
8100         (pt_btrace_insn): New function.
8101         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8102
8103 2017-04-25  Pedro Alves  <palves@redhat.com>
8104
8105         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8106         "base" field and inherit from "bp_location" instead.  Add
8107         non-default ctor.
8108         (allocate_location_exception): Use new non-default ctor.
8109         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8110         (init_bp_location): Convert to ...
8111         (bp_location::bp_location): ... this new ctor, and remove memset
8112         call.
8113         (base_breakpoint_allocate_location): Use the new non-default ctor.
8114         * breakpoint.h (bp_location): Now a class.  Declare default and
8115         non-default ctors.  In-class initialize all members.
8116         (init_bp_location): Remove declaration.
8117
8118 2017-04-25  Pedro Alves  <palves@redhat.com>
8119
8120         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8121         assignment operator.
8122
8123 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8124
8125         * doublest.c (convert_doublest_to_floatformat): Call
8126         floatformat_totalsize_bytes.
8127
8128 2017-04-22  Tom Tromey  <tom@tromey.com>
8129
8130         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8131         ui_out_emit_list.
8132         * stack.c (print_frame): Use ui_out_emit_list.
8133         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8134         ui_out_emit_list.
8135         * mi/mi-main.c (print_one_inferior)
8136         (mi_cmd_data_list_register_names)
8137         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8138         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8139         ui_out_emit_list.
8140         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8141         (mi_output_solib_attribs): Use ui_out_emit_list,
8142         ui_out_emit_tuple.
8143         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8144         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8145         (mi_cmd_stack_list_args, list_args_or_locals): Use
8146         ui_out_emit_list.
8147         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8148         * breakpoint.c (print_solib_event, output_thread_groups): Use
8149         ui_out_emit_list.
8150
8151 2017-04-22  Tom Tromey  <tom@tromey.com>
8152
8153         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8154         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8155         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8156
8157 2017-04-22  Tom Tromey  <tom@tromey.com>
8158
8159         * tracepoint.c (tvariables_info_1)
8160         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8161
8162 2017-04-22  Tom Tromey  <tom@tromey.com>
8163
8164         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8165         annotate_arg_emitter.
8166         * breakpoint.c (print_mention_watchpoint)
8167         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8168         * annotate.h (struct annotate_arg_emitter): New.
8169
8170 2017-04-22  Tom Tromey  <tom@tromey.com>
8171
8172         * record-btrace.c (record_btrace_insn_history)
8173         (record_btrace_insn_history_range, record_btrace_call_history)
8174         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8175         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8176         ui_out_emit_tuple.
8177         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8178         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8179         * skip.c (skip_info): Use ui_out_emit_tuple.
8180         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8181         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8182         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8183         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8184         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8185         ui_out_emit_tuple.
8186         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8187         (output_register, mi_cmd_data_read_memory)
8188         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8189         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8190         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8191         Use ui_out_emit_tuple.
8192         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8193         ui_out_emit_tuple.
8194         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8195         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8196         * linux-thread-db.c (info_auto_load_libthread_db): Use
8197         ui_out_emit_tuple.
8198         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8199         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8200         * disasm.c (do_mixed_source_and_assembly_deprecated)
8201         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8202         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8203         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8204         * breakpoint.c (print_one_breakpoint_location)
8205         (print_one_breakpoint): Use ui_out_emit_tuple.
8206         * auto-load.c (print_script, info_auto_load_cmd): Use
8207         ui_out_emit_tuple.
8208         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8209
8210 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8211
8212         * thread.c (print_thread_info_1): Remove dead code.
8213
8214 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8215
8216         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8217         GDB_SELF_TEST.
8218         * arm-tdep.c (selftests::arm_record_test): Likewise.
8219
8220 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8221
8222         * regcache.c (regcache_restore): Remove argument 2.  Replace
8223         argument 3 with regcache.  Get register status from
8224         src->register_status and get register contents from
8225         register_buffer (src, regnum).
8226         (regcache_cpy): Update.
8227
8228 2017-04-19  Pedro Alves  <palves@redhat.com>
8229
8230         * gdbthread.h (thread): Add missing closing parenthesis in
8231         comment.
8232
8233 2017-04-19  Pedro Alves  <palves@redhat.com>
8234
8235         * common/refcounted-object.h: New file.
8236         * gdbthread.h: Include "common/refcounted-object.h".
8237         (thread_info): Inherit from refcounted_object and add comments.
8238         (thread_info::incref, thread_info::decref)
8239         (thread_info::m_refcount): Delete.
8240         (thread_info::deletable): Use the refcounted_object::refcount()
8241         method.
8242         * inferior.c (current_inferior_): Add comment.
8243         (set_current_inferior): Increment/decrement refcounts.
8244         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8245         not-deletable instead of comparing with the current inferior.
8246         (initialize_inferiors): Increment the initial inferior's refcount.
8247         * inferior.h (struct inferior): Forward declare.
8248         Include "common/refcounted-object.h".
8249         (current_inferior, set_current_inferior): Move declaration to
8250         before struct inferior's definition, and fix comment.
8251         (inferior): Inherit from refcounted_object.  Add comments.
8252         * thread.c (switch_to_thread_no_regs): Reference the thread's
8253         inferior pointer directly instead of doing a ptid lookup.
8254         (switch_to_no_thread): New function.
8255         (switch_to_thread(thread_info *)): New function, factored out
8256         from ...
8257         (switch_to_thread(ptid_t)): ... this.
8258         (restore_current_thread): Delete.
8259         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8260         fields, and add 'inf' field.
8261         (do_restore_current_thread_cleanup): Check whether old->inf is
8262         alive instead of looking up an inferior by ptid.  Use
8263         switch_to_thread and switch_to_no_thread.
8264         (restore_current_thread_cleanup_dtor): Use old->inf directly
8265         instead of lookup up an inferior by id.  Decref the inferior.
8266         Don't restore 'removable'.
8267         (make_cleanup_restore_current_thread): Same the inferior pointer
8268         in old, instead of the inferior number.  Incref the inferior.
8269         Don't save/clear 'removable'.
8270
8271 2017-04-19  Pedro Alves  <palves@redhat.com>
8272
8273         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8274         unittests/scoped_restore-selftests.c.
8275         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8276         * common/scoped_restore.h (scoped_restore_base): Make "class".
8277         (scoped_restore_base::release): New public method.
8278         (scoped_restore_base::scoped_restore_base): New protected ctor.
8279         (scoped_restore_base::m_saved_var): New protected field.
8280         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8281         scoped_restore_base base class instead of m_saved_var directly.
8282         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8283         (scoped_restore_tmpl::scoped_restore_tmpl(const
8284         scoped_restore_tmpl<T>&)): Likewise.
8285         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8286         method.
8287         (scoped_restore_tmpl::saved_var): New method.
8288         (scoped_restore_tmpl::m_saved_var): Delete.
8289         * inferior.h (inferior::detaching): Now a bool.
8290         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8291         cleanup.
8292         * unittests/scoped_restore-selftests.c: New file.
8293
8294 2017-04-19  Pedro Alves  <palves@redhat.com>
8295
8296         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8297         Re-sort in alphabetic order.
8298
8299 2017-04-18  Pedro Alves  <palves@redhat.com>
8300
8301         * xml-support.c (obstack_xml_printf): Delete.
8302         * xml-support.h (obstack_xml_printf): Delete.
8303
8304 2017-04-18  Pedro Alves  <palves@redhat.com>
8305
8306         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8307         vdebug, verror, body_text, start_element, end_element, name,
8308         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8309         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8310         is_xinclude>: Make private and add m_ prefix.
8311         (gdb_xml_parser::body_text): New method, based on ...
8312         (gdb_xml_body_text): ... this.  Adjust.
8313         (gdb_xml_parser::vdebug): New method, based on ...
8314         (gdb_xml_debug): ... this.  Adjust.
8315         (gdb_xml_parser::verror): New method, based on ...
8316         (gdb_xml_error): ... this.  Adjust.
8317         (gdb_xml_parser::start_element): New method, based on ...
8318         (gdb_xml_start_element): ... this.  Adjust.
8319         (gdb_xml_start_element_wrapper): Defer to
8320         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8321         (gdb_xml_parser::end_element): New method, based on ...
8322         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8323         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8324         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8325         (gdb_xml_parser::use_dtd): New method, based on ...
8326         (gdb_xml_use_dtd): ... this.  Adjust.
8327         (gdb_xml_parser::parse): New method, based on ...
8328         (gdb_xml_parse): ... this.  Adjust.
8329         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8330         (xinclude_start_include): Adjust to call the parser's name method.
8331         (xml_xinclude_default, xml_xinclude_start_doctype)
8332         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8333         method.
8334         (xml_process_xincludes): Adjust to call parser methods.
8335         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8336         declarations.
8337
8338 2017-04-18  Pedro Alves  <palves@redhat.com>
8339
8340         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8341         gdb::optional<std::string>.
8342         * xml-support.c: Include <string>.
8343         (scope_level::scope_level(scope_level &&))
8344         (scope_level::~scope_level): Delete.
8345         (scope_level::body): Now a std::string.
8346         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8347         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8348         parameter.
8349         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8350         (xinclude_parsing_data::output): Now a std::string reference.
8351         (xinclude_start_include): Adjust.
8352         (xml_xinclude_default): Adjust.
8353         (xml_process_xincludes): Add 'output' parameter, and return bool.
8354         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8355         and return bool.
8356         * xml-tdesc.c: Include <unordered_map> and <string>.
8357         (tdesc_xml_cache): Delete.
8358         (tdesc_xml_cache_s): Delete.
8359         (xml_cache): Now an std::unordered_map.
8360         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8361         (target_fetch_description_xml): Change return type to
8362         gdb::optional<std::string>, and adjust.
8363         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8364         (target_fetch_description_xml): Change return type to
8365         gdb::optional<std::string>.
8366
8367 2017-04-18  Pedro Alves  <palves@redhat.com>
8368
8369         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8370         unittests/optional-selftests.c.
8371         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8372         * unittests/optional-selftests.c: New file.
8373         * unittests/optional/assignment/1.cc: New file.
8374         * unittests/optional/assignment/2.cc: New file.
8375         * unittests/optional/assignment/3.cc: New file.
8376         * unittests/optional/assignment/4.cc: New file.
8377         * unittests/optional/assignment/5.cc: New file.
8378         * unittests/optional/assignment/6.cc: New file.
8379         * unittests/optional/assignment/7.cc: New file.
8380         * unittests/optional/cons/copy.cc: New file.
8381         * unittests/optional/cons/default.cc: New file.
8382         * unittests/optional/cons/move.cc: New file.
8383         * unittests/optional/cons/value.cc: New file.
8384         * unittests/optional/in_place.cc: New file.
8385         * unittests/optional/observers/1.cc: New file.
8386         * unittests/optional/observers/2.cc: New file.
8387
8388 2017-04-18  Pedro Alves  <palves@redhat.com>
8389
8390         * common/gdb_optional.h: Include common/traits.h.
8391         (in_place_t): New type.
8392         (in_place): New constexpr variable.
8393         (optional::optional): Remove member initialization of
8394         m_instantiated.
8395         (optional::optional(in_place_t...)): New constructor.
8396         (optional::~optional): Use reset.
8397         (optional::optional(const optional&)): New.
8398         (optional::optional(const optional&&)): New.
8399         (optional::optional(T &)): New.
8400         (optional::optional(T &&)): New.
8401         (operator::operator=(const optional &)): New.
8402         (operator::operator=(optional &&)): New.
8403         (operator::operator= (const T &))
8404         (operator::operator= (T &&))
8405         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8406         (operator::reset): New.
8407         (operator::m_instantiated):: Add in-class initializer.
8408         * common/traits.h: Include <type_traits>.
8409         (struct And): New types.
8410
8411 2017-04-18  Pedro Alves  <palves@redhat.com>
8412
8413         * xml-support.c: Include <vector>.
8414         (scope_level::scope_level(const gdb_xml_element *))
8415         (scope_level::scope_level(scope_level&&)): New.
8416         (scope_level::~scope_level): New.
8417         (scope_level_s): Delete.
8418         (gdb_xml_parser::scopes): Now a std::vector.
8419         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8420         Use std::vector.
8421         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8422         scope cleanup code.
8423         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8424         of the scopes member.  Use std::vector::emplace_back.
8425
8426 2017-04-18  Pedro Alves  <palves@redhat.com>
8427
8428         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8429         a bool.
8430         (gdb_xml_end_element): Change type of first parameter.
8431         (gdb_xml_cleanup): Rename to ...
8432         (gdb_xml_parser::~gdb_xml_parser): ... this.
8433         (gdb_xml_create_parser_and_cleanup): Delete with ...
8434         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8435         to this new ctor.
8436         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8437         using gdb_xml_create_parser_and_cleanup.
8438         (xinclude_parsing_data): Add ctor/dtor.
8439         (xml_xinclude_cleanup): Delete.
8440         (xml_process_xincludes): Create a local xinclude_parsing_data
8441         instead of heap-allocating one.  Create a local gdb_xml_parser
8442         instead of heap-allocating one with
8443         gdb_xml_create_parser_and_cleanup.
8444
8445 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8446
8447         PR threads/20743
8448         * fbsd-nat.c (resume_one_thread_cb): Remove.
8449         (resume_all_threads_cb): Remove.
8450         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8451         iterate_over_threads.
8452
8453 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8454
8455         * NEWS: Create a new section for the next release branch.
8456         Rename the section of the current branch, now that it has
8457         been cut.
8458
8459 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8460
8461         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8462         * version.in: Bump version to 8.0.50.DATE-git.
8463
8464 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8465
8466         PR gdb/21385
8467         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8468         independently of the host, and fix build breakage on Cygwin.
8469
8470 2017-04-13  Pedro Alves  <palves@redhat.com>
8471
8472         * inferior.c (free_inferior): Convert to ...
8473         (inferior::~inferior): ... this dtor.
8474         (inferior::inferior): New ctor, factored out from ...
8475         (add_inferior_silent): ... here.  Allocate the inferior with a new
8476         expression.
8477         (delete_inferior): Call delete instead of free_inferior.
8478         * inferior.h (gdb_environ, continuation): Forward declare.
8479         (inferior): Now a class.  Add in-class initialization to all
8480         members.  Make boolean fields bool, except 'detaching'.
8481         (inferior::inferior): New explicit ctor.
8482         (inferior::~inferior): New.
8483
8484 2017-04-13  Pedro Alves  <palves@redhat.com>
8485
8486         * inferior.c (init_inferior_list): Delete.
8487         * inferior.h (init_inferior_list): Delete.
8488
8489 2017-04-13  Pedro Alves  <palves@redhat.com>
8490
8491         PR threads/13217
8492         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8493         (top level): Call it twice, with different thread sets.
8494
8495 2017-04-13  Pedro Alves  <palves@redhat.com>
8496
8497         * thread.c: Include <algorithm>.
8498         (thread_array_cleanup): Delete.
8499         (scoped_inc_dec_ref): New class.
8500         (live_threads_count): New function.
8501         (set_thread_refcount): Delete.
8502         (tp_array_compar_ascending): Now a bool.
8503         (tp_array_compar): Convert to a std::sort comparison function.
8504         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8505         and live_threads_count.
8506
8507 2017-04-13  Pedro Alves  <palves@redhat.com>
8508
8509         * infrun.c (follow_fork_inferior): Also switch the current
8510         inferior.
8511
8512 2017-04-13  Pedro Alves  <palves@redhat.com>
8513
8514         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8515         before calling create_internal_breakpoint.
8516
8517 2017-04-13  Pedro Alves  <palves@redhat.com>
8518
8519         * fork-child.c (execv_argv): New class.
8520         (breakup_args): Refactored as ...
8521         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8522         Copy arguments to storage and replace separators with NULL
8523         terminators in place.
8524         (escape_bang_in_quoted_argument): Adjust to return bool.
8525         (execv_argv::execv_argv): New ctor.
8526         (execv_argv::init_for_shell): New method, factored out from
8527         fork_inferior.  Don't strdup strings into the vector.
8528         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8529         Remove free_vector_argv call.
8530
8531 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8532
8533         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8534         tdep->rx_psw_type.
8535
8536 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8537
8538         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8539         * rx-tdep.c (rx_gdbarch_init): Likewise.
8540
8541 2017-04-13  Pedro Alves  <palves@redhat.com>
8542
8543         * breakpoint.h (struct breakpoint): Reindent.
8544
8545 2017-04-13  Pedro Alves  <palves@redhat.com>
8546
8547         * breakpoint.c (bp_location): Rename to ...
8548         (bp_locations): ... this.  All references updated.
8549         (bp_location_count): Rename to ...
8550         (bp_locations_count): ... this.  All references updated.
8551         (bp_location_placed_address_before_address_max): Rename to ...
8552         (bp_locations_placed_address_before_address_max): ... this.  All
8553         references updated.
8554         (bp_location_shadow_len_after_address_max): Rename to ...
8555         (bp_locations_shadow_len_after_address_max): ... this.  All
8556         references updated.
8557         (bp_location_compare_addrs): Rename to ...
8558         (bp_locations_compare_addrs): ... this.  All references updated.
8559         (bp_location_compare):Rename to ...
8560         (bp_locations_compare): ... this.  All references updated.
8561         (bp_location_target_extensions_update): Rename to ...
8562         (bp_locations_target_extensions_update): ... this.  All references
8563         updated.
8564
8565 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8566
8567         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8568         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8569         'sgtty.h'.
8570         * common/gdb_termios.h: New file, with parts of "terminal.h".
8571         * inflow.c: Include "gdb_termios.h".
8572         * ser-unix.c: Include "gdb_termios.h".
8573         * terminal.h: Move terminal-related defines to
8574         "common/gdb_termios.h".
8575
8576 2017-04-12  Tom Tromey  <tom@tromey.com>
8577
8578         * probe.c (parse_probes): Update.
8579         * location.h (delete_event_location): Don't declare.
8580         (event_location_deleter::operator()): Update.
8581         * location.c (event_location_deleter::operator()): Rename from
8582         delete_event_location.
8583         * linespec.h (linespec_result) <location>: Change type to
8584         event_location_up.
8585         * linespec.c (canonicalize_linespec, event_location_to_sals)
8586         (decode_objc): Update.
8587         (linespec_result): Don't call delete_event_location.
8588         * breakpoint.c (create_breakpoints_sal)
8589         (bkpt_probe_create_sals_from_location)
8590         (strace_marker_create_sals_from_location): Update.
8591
8592 2017-04-12  Tom Tromey  <tom@tromey.com>
8593
8594         * linespec.h (struct linespec_result): Add constructor and
8595         destructor.
8596         (init_linespec_result, destroy_linespec_result)
8597         (make_cleanup_destroy_linespec_result): Don't declare.
8598         * linespec.c (init_linespec_result): Remove.
8599         (linespec_result::~linespec_result): Rename from
8600         destroy_linespec_result.  Update.
8601         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8602         Remove.
8603         * breakpoint.c (create_breakpoint, break_range_command)
8604         (decode_location_default): Update.
8605         * ax-gdb.c (agent_command_1): Update.
8606
8607 2017-04-12  Tom Tromey  <tom@tromey.com>
8608
8609         * remote.c (remote_download_tracepoint): Update.
8610         * python/py-breakpoint.c (bppy_get_location): Update.
8611         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8612         (gdbscm_breakpoint_location): Update.
8613         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8614         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8615         Change type to event_location_up.
8616         * breakpoint.c (create_overlay_event_breakpoint)
8617         (create_longjmp_master_breakpoint)
8618         (create_std_terminate_master_breakpoint)
8619         (create_exception_master_breakpoint)
8620         (breakpoint_event_location_empty_p, print_breakpoint_location)
8621         (print_one_breakpoint_location, create_thread_event_breakpoint)
8622         (init_breakpoint_sal, create_breakpoint)
8623         (print_recreate_ranged_breakpoint, break_range_command)
8624         (init_ada_exception_breakpoint, say_where): Update.
8625         (base_breakpoint_dtor): Don't call delete_event_location.
8626         (bkpt_print_recreate, tracepoint_print_recreate)
8627         (dprintf_print_recreate, update_static_tracepoint)
8628         (breakpoint_re_set_default): Update.
8629
8630 2017-04-12  Tom Tromey  <tom@tromey.com>
8631
8632         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8633         type of "to_do".  Update.
8634         (compute_stack_depth): Use std::vector.
8635
8636 2017-04-12  Tom Tromey  <tom@tromey.com>
8637
8638         * printcmd.c (find_instruction_backward): Use std::vector.
8639
8640 2017-04-12  Tom Tromey  <tom@tromey.com>
8641
8642         * symfile.c (objfilep): Remove typedef.
8643         (reread_symbols): Use a std::vector.
8644
8645 2017-04-12  Tom Tromey  <tom@tromey.com>
8646
8647         * mi/mi-main.c (exec_direction_forward): Remove.
8648         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8649         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8650         scoped_restore.
8651         * guile/guile.c (guile_repl_command, guile_command)
8652         (gdbscm_execute_gdb_command): Use scoped_restore.
8653         * go-exp.y (go_parse): Use scoped_restore.
8654         * d-exp.y (d_parse): Use scoped_restore.
8655         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8656         * c-exp.y (c_parse): Use scoped_restore.
8657
8658 2017-04-12  Tom Tromey  <tom@tromey.com>
8659
8660         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8661         (mi_parse): Update return type.
8662         (mi_parse_free): Remove.
8663         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8664         (mi_parse::~mi_parse): Rename from mi_parse_free.
8665         (mi_parse_cleanup): Remove.
8666         (mi_parse): Return a unique_ptr.  Use new.
8667         * mi/mi-main.c (mi_execute_command): Update.
8668
8669 2017-04-12  Tom Tromey  <tom@tromey.com>
8670
8671         * location.c (explicit_location_lex_one): Return a
8672         unique_xmalloc_ptr.
8673         (string_to_explicit_location): Update.  Remove cleanups.
8674
8675 2017-04-12  Tom Tromey  <tom@tromey.com>
8676
8677         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8678         (compare_value_and_voffset): Change type.  Update.
8679         (compute_vtable_size): Change type of "offset_vec".
8680         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8681         (gnuv3_get_typeid): Remove extraneous declaration.
8682
8683 2017-04-12  Tom Tromey  <tom@tromey.com>
8684
8685         * charset.h (wchar_iterator): Fix comment.
8686
8687 2017-04-12  Tom Tromey  <tom@tromey.com>
8688
8689         * charset.c (iconv_wrapper): New class.
8690         (cleanup_iconv): Remove.
8691         (convert_between_encodings): Use it.
8692
8693 2017-04-12  Tom Tromey  <tom@tromey.com>
8694
8695         * symfile.h (increment_reading_symtab): Update type.
8696         * symfile.c (decrement_reading_symtab): Remove.
8697         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8698         * psymtab.c (psymtab_to_symtab): Update.
8699         * dwarf2read.c (dw2_instantiate_symtab): Update.
8700
8701 2017-04-12  Tom Tromey  <tom@tromey.com>
8702
8703         * jit.c (struct jit_reader): Declare separately.  Add constructor
8704         and destructor.  Change type of "handle".
8705         (loaded_jit_reader): Define separately.
8706         (jit_reader_load): Update.  New "new".
8707         (jit_reader_unload_command): Use "delete".
8708         * gdb-dlfcn.h (struct dlclose_deleter): New.
8709         (gdb_dlhandle_up): New typedef.
8710         (gdb_dlopen, gdb_dlsym): Update types.
8711         (gdb_dlclose): Remove.
8712         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8713         (gdb_dlsym): Change type of "handle".
8714         (make_cleanup_dlclose): Remove.
8715         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8716         * compile/compile-c-support.c (load_libcc): Update.
8717
8718 2017-04-12  Tom Tromey  <tom@tromey.com>
8719
8720         * symtab.h (find_pcs_for_symtab_line): Change return type.
8721         * symtab.c (find_pcs_for_symtab_line): Change return type.
8722         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8723         type of "vec".  Update.
8724         (ltpy_get_pcs_for_line): Update.
8725         * linespec.c (decode_digits_ordinary): Update.
8726
8727 2017-04-12  Tom Tromey  <tom@tromey.com>
8728
8729         * tracepoint.c (actions_command): Update.
8730         * python/python.c (python_command, python_interactive_command):
8731         Update.
8732         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8733         * guile/guile.c (guile_command): Update.
8734         * defs.h (read_command_lines, read_command_lines_1): Return
8735         command_line_up.
8736         (command_lines_deleter): New struct.
8737         (command_line_up): New typedef.
8738         * compile/compile.c (compile_code_command)
8739         (compile_print_command): Update.
8740         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8741         command_line_up.
8742         (make_cleanup_free_command_lines): Remove.
8743         * cli/cli-script.c (get_command_line, read_command_lines_1)
8744         (copy_command_lines): Return command_line_up.
8745         (while_command, if_command, read_command_lines, define_command)
8746         (document_command): Update.
8747         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8748         Remove.
8749         * breakpoint.h (breakpoint_set_commands): Change type of
8750         "commands".
8751         * breakpoint.c (breakpoint_set_commands): Change type of
8752         "commands".  Update.
8753         (do_map_commands_command, update_dprintf_command_list)
8754         (create_tracepoint_from_upload): Update.
8755
8756 2017-04-12  Tom Tromey  <tom@tromey.com>
8757
8758         * tracepoint.c (scope_info): Update.
8759         * spu-tdep.c (spu_catch_start): Update.
8760         * python/python.c (gdbpy_decode_line): Update.
8761         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8762         * python/py-breakpoint.c (bppy_init): Update.
8763         * probe.c (parse_probes): Update.
8764         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8765         * location.h (event_location_deleter): New struct.
8766         (event_location_up): New typedef.
8767         (new_linespec_location, new_address_location, new_probe_location)
8768         (new_explicit_location, copy_event_location)
8769         (string_to_event_location, string_to_event_location_basic)
8770         (string_to_explicit_location): Update return type.
8771         (make_cleanup_delete_event_location): Remove.
8772         * location.c (new_linespec_location, new_address_location)
8773         (new_probe_location, new_explicit_location, copy_event_location):
8774         Return event_location_up.
8775         (delete_event_location_cleanup)
8776         (make_cleanup_delete_event_location): Remove.
8777         (string_to_explicit_location, string_to_event_location_basic)
8778         (string_to_event_location): Return event_location_up.
8779         * linespec.c (canonicalize_linespec, event_location_to_sals)
8780         (decode_line_with_current_source)
8781         (decode_line_with_last_displayed, decode_objc): Update.
8782         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8783         * completer.c (location_completer): Update.
8784         * cli/cli-cmds.c (edit_command, list_command): Update.
8785         * breakpoint.c (create_overlay_event_breakpoint)
8786         (create_longjmp_master_breakpoint)
8787         (create_std_terminate_master_breakpoint)
8788         (create_exception_master_breakpoint)
8789         (create_thread_event_breakpoint): Update.
8790         (init_breakpoint_sal): Update.  Remove some dead code.
8791         (create_breakpoint_sal): Change type of "location".  Update.
8792         (create_breakpoints_sal, create_breakpoint, break_command_1)
8793         (dprintf_command, break_range_command, until_break_command)
8794         (init_ada_exception_breakpoint)
8795         (strace_marker_create_sals_from_location)
8796         (update_static_tracepoint, trace_command, ftrace_command)
8797         (strace_command, create_tracepoint_from_upload): Update.
8798         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8799         * ax-gdb.c (agent_command_1): Update.
8800
8801 2017-04-12  Pedro Alves  <palves@redhat.com>
8802
8803         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8804         * configure.tgt: Handle i[34567]86-*-go32* and
8805         i[34567]86-*-msdosdjgpp*.
8806         * i386-tdep.c (i386_svr4_reg_to_regnum):
8807         Make extern.
8808         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8809         i386-go32-tdep.c.
8810         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8811         * i386-go32-tdep.c: New file.
8812         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8813         declarations.
8814
8815 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8816
8817         * aix-thread.c (pd_status2str): Change return type to const char *.
8818
8819 2017-04-12  Pedro Alves  <palves@redhat.com>
8820
8821         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8822         calls to set_gdbarch_gnu_triplet_regexp.
8823
8824 2017-04-12  Pedro Alves  <palves@redhat.com>
8825
8826         PR gdb/21323
8827         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8828         New enum value.
8829         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8830         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8831         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8832         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8833         * gdbarch.h, gdbarch.c: Regenerate.
8834         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8835         gdbarch_wchar_bit and gdbarch_wchar_signed.
8836         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8837         * arm-tdep.c (arm_gdbarch_init): Likewise.
8838         * avr-tdep.c (avr_gdbarch_init): Likewise.
8839         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8840         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8841         * i386-tdep.c (i386_go32_init_abi): Likewise.
8842         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8843         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8844         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8845         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8846         * sh-tdep.c (sh_gdbarch_init): Likewise.
8847         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8848         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8849         * windows-tdep.c (windows_init_abi): Likewise.
8850         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8851
8852 2017-04-12  Pedro Alves  <palves@redhat.com>
8853
8854         PR c++/21323
8855         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8856         cplus_primitive_type_char32_t>: New enum values.
8857         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8858         and cplus_primitive_type_char32_t.
8859         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8860         32, use the archtecture's built-in type for char16_t and char32_t,
8861         respectively.  Otherwise, fallback to init_integer_type as before,
8862         but make the type unsigned, and issue a complaint.
8863         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8864
8865 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8866
8867         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8868         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8869
8870 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8871
8872         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8873         'const char *'.
8874
8875 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8876
8877         * common/common-utils.c (free_vector_argv): New function.
8878         * common/common-utils.h: Include <vector>.
8879         (free_vector_argv): New prototype.
8880         * darwin-nat.c (darwin_create_inferior): Rewrite function
8881         prototype in order to constify "exec_file" and accept a
8882         "std::string" for "allargs".
8883         * fork-child.c: Include <vector>.
8884         (breakup_args): Rewrite function, using C++.
8885         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8886         and accept "std::string" for "allargs".  Update the code to
8887         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8888         and "execvp".
8889         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8890         order to constify "exec_file" and accept a "std::string" for
8891         "allargs".
8892         * go32-nat.c (go32_create_inferior): Likewise.
8893         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8894         * infcmd.c (run_command_1): Constify "exec_file".  Use
8895         "std::string" for inferior arguments.
8896         * inferior.h (fork_inferior): Update prototype.
8897         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8898         prototype in order to constify "exec_file" and accept a
8899         "std::string" for "allargs".
8900         * nto-procfs.c (procfs_create_inferior): Likewise.
8901         * procfs.c (procfs_create_inferior): Likewise.
8902         * remote-sim.c (gdbsim_create_inferior): Likewise.
8903         * remote.c (extended_remote_run): Update code to accept
8904         "std::string" as argument.
8905         (extended_remote_create_inferior): Rewrite function prototype in
8906         order to constify "exec_file" and accept a "std::string" for
8907         "allargs".
8908         * rs6000-nat.c (super_create_inferior): Likewise.
8909         (rs6000_create_inferior): Likewise.
8910         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8911         * windows-nat.c (windows_create_inferior): Likewise.
8912
8913 2017-04-11  Pedro Alves  <palves@redhat.com>
8914
8915         * thread.c: Fix whitespace throughout.
8916
8917 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8918
8919         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8920
8921 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8922
8923         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8924
8925 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8926
8927         PR gdb/21364
8928         * osdata.c (info_osdata): Check if 'type' is an empty string
8929         instead of NULL.
8930
8931 2017-04-10  Pedro Alves  <palves@redhat.com>
8932
8933         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8934         (ptid_to_global_thread_id, in_thread_list)
8935         (do_captured_list_thread_ids, set_resumed, set_running)
8936         (set_executing, set_stop_requested, finish_thread_state)
8937         (validate_registers_access, can_access_registers_ptid)
8938         (print_thread_info_1, switch_to_thread)
8939         (do_restore_current_thread_cleanup)
8940         (make_cleanup_restore_current_thread, thread_command)
8941         (thread_name_command): Use operator== instead of ptid_equal.
8942
8943 2017-04-10  Pedro Alves  <palves@redhat.com>
8944
8945         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8946         (current_thread_cleanup_chain): Delete.
8947         (restore_current_thread_cleanup_dtor)
8948         (make_cleanup_restore_current_thread): Remove references to
8949         current_thread_cleanup_chain.
8950
8951 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8952
8953         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8954         REG_UNKNOWN.
8955
8956 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8957
8958         PR gdb/19942
8959         * gdbthread.h (thread_info::deletable): New method.
8960         (thread_info::incref): New method.
8961         (thread_info::decref): New method.
8962         (thread_info::refcount): Move it to private.
8963         * infrun.c (save_stop_context): Call inc_refcount.
8964         (release_stop_context_cleanup): Likewise.
8965         * thread.c (set_thread_exited): New function.
8966         (init_thread_list): Delete "tp" only it is deletable, otherwise
8967         call set_thread_exited.
8968         (delete_thread_1): Call set_thread_exited.
8969         (current_thread_cleanup) <inferior_pid>: Remove.
8970         <thread>: New field.
8971         (restore_current_thread_ptid_changed): Removed.
8972         (do_restore_current_thread_cleanup): Adjust.
8973         (restore_current_thread_cleanup_dtor): Don't call
8974         find_thread_ptid.
8975         (set_thread_refcount): Use dec_refcount.
8976         (make_cleanup_restore_current_thread): Adjust.
8977         (thread_apply_all_command): Call inc_refcount.
8978         (_initialize_thread): Don't call
8979         observer_attach_thread_ptid_changed.
8980
8981 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8982
8983         * thread.c (delete_thread_1): Hoist code on marking thread as
8984         exited.
8985
8986 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8987
8988         * windows-nat.c (windows_detach): Initialize ptid with
8989         minus_one_ptid.
8990
8991 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8992
8993         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8994
8995 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8996
8997         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8998         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8999         (bfin_pseudo_register_write): Likewise
9000
9001 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
9002
9003         * common/ptid.h (struct ptid): Change to...
9004         (class ptid_t): ... this.
9005         <ptid_t>: New constructors.
9006         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9007         matches>: New methods.
9008         <make_null, make_minus_one>: New static methods.
9009         <pid>: Rename to...
9010         <m_pid>: ...this.
9011         <lwp>: Rename to...
9012         <m_lwp>: ...this.
9013         <tid>: Rename to...
9014         <m_tid>: ...this.
9015         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9016         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9017         as references, move comment to class ptid_t.
9018         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9019         ptid_t static methods.
9020         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9021         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9022         Take ptid arguments as references, implement using ptid_t methods.
9023         * unittests/ptid-selftests.c: New file.
9024         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9025         unittests/ptid-selftests.c.
9026         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9027
9028 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9029
9030         * python/python.c (python_run_simple_file): Cast mode literal to
9031         non-const char pointer as expected by PyFile_FromString.
9032
9033 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
9034
9035         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9036         minus_one_ptid and null_ptid.
9037
9038 2017-04-05  Pedro Alves  <palves@redhat.com>
9039
9040         * warning.m4 (build_warnings): Remove -Wno-write-strings.
9041         * configure: Regenerate.
9042
9043 2017-04-05  Pedro Alves  <palves@redhat.com>
9044
9045         * ada-exp.y (yyerror): Constify.
9046         * ada-lang.c (bound_name, get_selections)
9047         (ada_variant_discrim_type)
9048         (ada_variant_discrim_name, ada_value_struct_elt)
9049         (ada_lookup_struct_elt_type, is_unchecked_variant)
9050         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9051         (catch_ada_exception_command_split)
9052         (catch_ada_assert_command_split, catch_assert_command)
9053         (ada_op_name): Constify.
9054         * ada-lang.h (ada_yyerror, get_selections)
9055         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9056         * arc-tdep.c (arc_print_frame_cache): Constify.
9057         * arm-tdep.c (arm_skip_stub): Constify.
9058         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9059         (gen_aggregate_elt_ref): Constify.
9060         * bcache.c (print_bcache_statistics): Constify.
9061         * bcache.h (print_bcache_statistics): Constify.
9062         * break-catch-throw.c (catch_exception_command_1):
9063         * breakpoint.c (struct ep_type_description::description):
9064         Constify.
9065         (add_solib_catchpoint): Constify.
9066         (catch_fork_command_1): Add cast.
9067         (add_catch_command): Constify.
9068         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9069         Constify.
9070         * bsd-uthread.c (bsd_uthread_state): Constify.
9071         * buildsym.c (patch_subfile_names): Constify.
9072         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9073         Constify.
9074         * c-exp.y (yyerror): Constify.
9075         (token::oper): Constify.
9076         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9077         * c-varobj.c (cplus_describe_child): Constify.
9078         * charset.c (find_charset_names): Add cast.
9079         (find_charset_names): Constify array and add const_cast.
9080         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9081         (edit_command): Constify.
9082         * cli/cli-decode.c (lookup_cmd): Constify.
9083         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9084         Constify.
9085         (struct dump_context): Constify.
9086         (add_dump_command, restore_command): Constify.
9087         * cli/cli-script.c (get_command_line): Constify.
9088         * cli/cli-script.h (get_command_line): Constify.
9089         * cli/cli-utils.c (check_for_argument): Constify.
9090         * cli/cli-utils.h (check_for_argument): Constify.
9091         * coff-pe-read.c (struct read_pe_section_data): Constify.
9092         * command.h (lookup_cmd): Constify.
9093         * common/print-utils.c (decimal2str): Constify.
9094         * completer.c (gdb_print_filename): Constify.
9095         * corefile.c (set_gnutarget): Constify.
9096         * cp-name-parser.y (yyerror): Constify.
9097         * cp-valprint.c (cp_print_class_member): Constify.
9098         * cris-tdep.c (cris_register_name, crisv32_register_name):
9099         Constify.
9100         * d-exp.y (yyerror): Constify.
9101         (struct token::oper): Constify.
9102         * d-lang.h (d_yyerror): Constify.
9103         * dbxread.c (struct header_file_location::name): Constify.
9104         (add_old_header_file, add_new_header_file, last_function_name)
9105         (dbx_next_symbol_text, add_bincl_to_list)
9106         (find_corresponding_bincl_psymtab, set_namestring)
9107         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9108         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9109         * defs.h (command_line_input, print_address_symbolic)
9110         (deprecated_readline_begin_hook): Constify.
9111         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9112         Constify.
9113         * event-top.c (handle_line_of_input): Constify and add cast.
9114         * exceptions.c (catch_errors): Constify.
9115         * exceptions.h (catch_errors): Constify.
9116         * expprint.c (print_subexp_standard, op_string, op_name)
9117         (op_name_standard, dump_raw_expression, dump_raw_expression):
9118         * expression.h (op_name, op_string, dump_raw_expression):
9119         Constify.
9120         * f-exp.y (yyerror): Constify.
9121         (struct token::oper): Constify.
9122         (struct f77_boolean_val::name): Constify.
9123         * f-lang.c (f_word_break_characters): Constify.
9124         * f-lang.h (f_yyerror): Constify.
9125         * fork-child.c (fork_inferior): Add cast.
9126         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9127         (new_variant): Constify.
9128         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9129         * gdbarch.c: Regenerate.
9130         * gdbcore.h (set_gnutarget): Constify.
9131         * go-exp.y (yyerror): Constify.
9132         (token::oper): Constify.
9133         * go-lang.h (go_yyerror): Constify.
9134         * go32-nat.c (go32_sysinfo): Constify.
9135         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9136         * guile/scm-cmd.c (cmdscm_function): Constify.
9137         * guile/scm-param.c (pascm_param_value): Constify.
9138         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9139         (h8300sx_register_name): Constify.
9140         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9141         Constify.
9142         * ia64-tdep.c (ia64_register_names): Constify.
9143         * infcmd.c (construct_inferior_arguments): Constify.
9144         (path_command, attach_post_wait): Constify.
9145         * language.c (show_range_command, show_case_command)
9146         (unk_lang_error): Constify.
9147         * language.h (language_defn::la_error)
9148         (language_defn::la_name_of_this): Constify.
9149         * linespec.c (decode_line_2): Constify.
9150         * linux-thread-db.c (thread_db_err_str): Constify.
9151         * lm32-tdep.c (lm32_register_name): Constify.
9152         * m2-exp.y (yyerror): Constify.
9153         * m2-lang.h (m2_yyerror): Constify.
9154         * m32r-tdep.c (m32r_register_names): Constify and make static.
9155         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9156         * m88k-tdep.c (m88k_register_name): Constify.
9157         * macroexp.c (appendmem): Constify.
9158         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9159         (upgrade_type, parse_external, parse_partial_symbols)
9160         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9161         (new_symbol): Constify.
9162         * memattr.c (mem_info_command): Constify.
9163         * mep-tdep.c (register_name_from_keyword): Constify.
9164         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9165         Constify.
9166         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9167         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9168         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9169         cast.
9170         (mi_execute_async_cli_command): Constify.
9171         * mips-tdep.c (mips_register_name): Constify.
9172         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9173         (am33_register_name, am33_2_register_name)
9174         * moxie-tdep.c (moxie_register_names): Constify.
9175         * nat/linux-osdata.c (osdata_type): Constify fields.
9176         * nto-tdep.c (nto_parse_redirection): Constify.
9177         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9178         (lookup_child_selector): Constify.
9179         (objc_methcall::name): Constify.
9180         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9181         (lookup_struct_typedef): Constify.
9182         * objfiles.c (pc_in_section): Constify.
9183         * objfiles.h (pc_in_section): Constify.
9184         * p-exp.y (struct token::oper): Constify.
9185         (yyerror): Constify.
9186         * p-lang.h (pascal_yyerror): Constify.
9187         * parser-defs.h (op_name_standard): Constify.
9188         (op_print::string): Constify.
9189         (exp_descriptor::op_name): Constify.
9190         * printcmd.c (print_address_symbolic): Constify.
9191         * psymtab.c (print_partial_symbols): Constify.
9192         * python/py-breakpoint.c (stop_func): Constify.
9193         (bppy_get_expression): Constify.
9194         * python/py-cmd.c (cmdpy_completer::name): Constify.
9195         (cmdpy_function): Constify.
9196         * python/py-event.c (evpy_add_attribute)
9197         (gdbpy_initialize_event_generic): Constify.
9198         * python/py-event.h (evpy_add_attribute)
9199         (gdbpy_initialize_event_generic): Constify.
9200         * python/py-evts.c (add_new_registry): Constify.
9201         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9202         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9203         * python/py-inferior.c (get_buffer): Add cast.
9204         * python/py-param.c (parm_constant::name): Constify.
9205         * python/py-unwind.c (fprint_frame_id): Constify.
9206         * python/python.c (gdbpy_parameter_value): Constify.
9207         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9208         * remote.c (memory_packet_config::name): Constify.
9209         (show_packet_config_cmd, remote_write_bytes)
9210         (remote_buffer_add_string):
9211         * reverse.c (exec_reverse_once): Constify.
9212         * rs6000-tdep.c (variant::name, variant::description): Constify.
9213         * rust-exp.y (rustyyerror): Constify.
9214         * rust-lang.c (rust_op_name): Constify.
9215         * rust-lang.h (rustyyerror): Constify.
9216         * serial.h (serial_ops::name): Constify.
9217         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9218         (sh_sh3e_register_name, sh_sh2e_register_name)
9219         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9220         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9221         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9222         (sh_sh4al_dsp_register_name): Constify.
9223         * sh64-tdep.c (sh64_register_name): Constify.
9224         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9225         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9226         * stabsread.c (patch_block_stabs, read_type_number)
9227         (ref_map::stabs, ref_add, process_reference)
9228         (symbol_reference_defined, define_symbol, define_symbol)
9229         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9230         (read_one_struct_field, read_struct_fields, read_baseclasses)
9231         (read_tilde_fields, read_struct_type, read_array_type)
9232         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9233         (read_huge_number, read_range_type, read_args, common_block_start)
9234         (find_name_end): Constify.
9235         * stabsread.h (common_block_start, define_symbol)
9236         (process_one_symbol, symbol_reference_defined, ref_add):
9237         * symfile.c (get_section_index, add_symbol_file_command):
9238         * symfile.h (get_section_index): Constify.
9239         * target-descriptions.c (tdesc_type::name): Constify.
9240         (tdesc_free_type): Add cast.
9241         * target.c (find_default_run_target):
9242         (add_deprecated_target_alias, find_default_run_target)
9243         (target_announce_detach): Constify.
9244         (do_option): Constify.
9245         * target.h (add_deprecated_target_alias): Constify.
9246         * thread.c (print_thread_info_1): Constify.
9247         * top.c (deprecated_readline_begin_hook, command_line_input):
9248         Constify.
9249         (init_main): Add casts.
9250         * top.h (handle_line_of_input): Constify.
9251         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9252         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9253         (tfind_command): Rename to ...
9254         (tfind_command_1): ... this and constify.
9255         (tfind_command): New function.
9256         (tfind_end_command, tfind_start_command): Adjust.
9257         (encode_source_string): Constify.
9258         * tracepoint.h (encode_source_string): Constify.
9259         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9260         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9261         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9262         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9263         * tui/tui-win.c (parse_scrolling_args): Constify.
9264         * tui/tui-windata.c (tui_erase_data_content): Constify.
9265         * tui/tui-windata.h (tui_erase_data_content): Constify.
9266         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9267         * tui/tui.c (tui_enable): Add cast.
9268         * utils.c (defaulted_query): Constify.
9269         (init_page_info): Add cast.
9270         (puts_debug, subset_compare): Constify.
9271         * utils.h (subset_compare): Constify.
9272         * varobj.c (varobj_format_string): Constify.
9273         * varobj.h (varobj_format_string): Constify.
9274         * vax-tdep.c (vax_register_name): Constify.
9275         * windows-nat.c (windows_detach): Constify.
9276         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9277         * xml-support.c (gdb_xml_end_element): Constify.
9278         * xml-tdesc.c (tdesc_start_reg): Constify.
9279         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9280         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9281         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9282
9283 2017-04-05  Pedro Alves  <palves@redhat.com>
9284
9285         * proc-api.c (struct trans): Constify.
9286         (procfs_note): Constify.
9287         * proc-events.c (struct trans, syscall_table):
9288         * proc-flags.c (struct trans): Constify.
9289         * proc-utils.h (procfs_note): Constify.
9290         * proc-why.c (struct trans): Constify.
9291         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9292         (procfs_detach): Constify.
9293         * sol-thread.c (struct string_map): Constify.
9294         (td_err_string, td_state_string): Constify.
9295
9296 2017-04-05  Pedro Alves  <palves@redhat.com>
9297
9298         * proc-api.c (procfs_filename): Don't initialize
9299         procfs_filename.
9300         (prepare_to_trace): Assume procfs_filename is non-NULL.
9301         (_initialize_proc_api): Give procfs_filename a default value here.
9302
9303 2017-04-05  Pedro Alves  <palves@redhat.com>
9304
9305         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9306         'cond_string' parameter.
9307         (extract_exception_regexp): Constify 'string' parameter.
9308         (catch_exception_command_1): Constify.
9309         * breakpoint.c (init_catchpoint)
9310         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9311         parameter.
9312         (ep_parse_optional_if_clause, catch_fork_command_1)
9313         (catch_exec_command_1): Constify.
9314         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9315         parameter.
9316         (ep_parse_optional_if_clause): Constify.
9317         * cli/cli-utils.c (remove_trailing_whitespace)
9318         (check_for_argument): Constify.
9319         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9320         non-const overload.
9321         (check_for_argument): Likewise.
9322
9323 2017-04-05  Pedro Alves  <palves@redhat.com>
9324
9325         * event-top.c (command_line_handler): Add cast to execute_command
9326         call.
9327         * record-btrace.c (cmd_record_btrace_bts_start)
9328         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9329         (cmd_record_btrace_start): Add cast to execute_command call.
9330         * record-full.c (record_full_goto_insn):
9331         * record.c (record_start, record_stop): Add cast to
9332         execute_command_to_string calls.
9333         (cmd_record_start): Add cast to execute_command calls.
9334
9335 2017-04-05  Pedro Alves  <palves@redhat.com>
9336
9337         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9338         static inline function.
9339         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9340         array and use gdb_PyArg_ParseTupleAndKeywords.
9341         * python/py-cmd.c (cmdpy_init): Likewise.
9342         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9343         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9344         (infpy_search_memory): Likewise.
9345         * python/py-objfile.c (objfpy_add_separate_debug_file)
9346         (gdbpy_lookup_objfile): Likewise.
9347         * python/py-symbol.c (gdbpy_lookup_symbol)
9348         (gdbpy_lookup_global_symbol): Likewise.
9349         * python/py-type.c (gdbpy_lookup_type): Likewise.
9350         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9351         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9352         Likewise.
9353
9354 2017-04-05  Pedro Alves  <palves@redhat.com>
9355
9356         * python/python-internal.h (gdb_PyGetSetDef): New type.
9357         * python/py-block.c (block_object_getset)
9358         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9359         * python/py-event.c (event_object_getset)
9360         (finish_breakpoint_object_getset): Likewise.
9361         * python/py-inferior.c (inferior_object_getset): Likewise.
9362         * python/py-infthread.c (thread_object_getset): Likewise.
9363         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9364         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9365         * python/py-objfile.c (objfile_getset): Likewise.
9366         * python/py-progspace.c (pspace_getset): Likewise.
9367         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9368         Likewise.
9369         * python/py-record.c (recpy_record_getset): Likewise.
9370         * python/py-symbol.c (symbol_object_getset): Likewise.
9371         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9372         Likewise.
9373         * python/py-type.c (type_object_getset, field_object_getset):
9374         Likewise.
9375         * python/py-value.c (value_object_getset): Likewise.
9376
9377 2017-04-05  Pedro Alves  <palves@redhat.com>
9378
9379         * python/python-internal.h (gdb_PyObject_CallMethod)
9380         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9381         New functions.
9382         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9383         (PySys_GetObject, PySys_SetPath): New macros.
9384
9385 2017-04-05  Pedro Alves  <palves@redhat.com>
9386
9387         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9388         info_osdata_command.
9389         * osdata.c (info_osdata_command): Rename to ...
9390         (info_osdata): ... this.  Constify 'type' parameter, and remove
9391         the 'from_tty' parameter.  Accept NULL TYPE.
9392         (info_osdata_command): New function.
9393         * osdata.h (info_osdata_command): Remove declaration.
9394         (info_osdata): New declaration.
9395
9396 2017-04-05  Pedro Alves  <palves@redhat.com>
9397
9398         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9399         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9400         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9401         parameter.
9402         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9403         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9404         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9405         parameter.
9406         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9407         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9408         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9409         (mi_cmd_file_list_exec_source_files)
9410         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9411         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9412         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9413         parameter.
9414         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9415         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9416         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9417         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9418         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9419         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9420         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9421         'command' parameter.
9422         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9423         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9424         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9425         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9426         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9427         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9428         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9429         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9430         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9431         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9432         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9433         parameter.
9434         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9435         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9436         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9437         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9438         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9439         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9440         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9441         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9442         (mi_cmd_data_list_changed_registers)
9443         (mi_cmd_data_write_register_values)
9444         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9445         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9446         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9447         (mi_cmd_list_features, mi_cmd_list_target_features)
9448         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9449         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9450         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9451         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9452         (mi_cmd_trace_frame_collected): Constify 'command'
9453         parameter.
9454         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9455         'command' parameter.
9456
9457 2017-04-05  Pedro Alves  <palves@redhat.com>
9458
9459         * ada-lang.c (ada_completer_word_break_characters): Now a const
9460         array.
9461         (ada_get_gdb_completer_word_break_characters): Constify.
9462         * completer.c (gdb_completer_command_word_break_characters)
9463         (gdb_completer_file_name_break_characters)
9464         (gdb_completer_quote_characters): Now const arrays.
9465         (get_gdb_completer_quote_characters): Constify.
9466         (set_rl_completer_word_break_characters): New function.
9467         (set_gdb_completion_word_break_characters)
9468         (complete_line_internal): Use it.
9469         * completer.h (get_gdb_completer_quote_characters): Constify.
9470         (set_rl_completer_word_break_characters): Declare.
9471         * f-lang.c (f_word_break_characters): Constify.
9472         * language.c (default_word_break_characters): Constify.
9473         * language.h (language_defn::la_word_break_characters): Constify.
9474         (default_word_break_characters): Constify.
9475         * top.c (init_main): Use set_rl_completer_word_break_characters.
9476
9477 2017-04-05  Pedro Alves  <palves@redhat.com>
9478
9479         * aix-thread.c (aix_thread_pid_to_str)
9480         (aix_thread_extra_thread_info): Constify.
9481         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9482         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9483         (bsd_uthread_pid_to_str): Constify.
9484         * corelow.c (core_pid_to_str): Constify.
9485         * darwin-nat.c (darwin_pid_to_str): Constify.
9486         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9487         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9488         Constify.
9489         * gnu-nat.c (gnu_pid_to_str): Constify.
9490         * go32-nat.c (go32_pid_to_str): Constify.
9491         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9492         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9493         * inferior.c (inferior_pid_to_str): Constify.
9494         * linux-nat.c (linux_nat_pid_to_str): Constify.
9495         * linux-tdep.c (linux_core_pid_to_str): Constify.
9496         * linux-thread-db.c (thread_db_pid_to_str)
9497         (thread_db_extra_thread_info): Constify.
9498         * nto-tdep.c (nto_extra_thread_info): Constify.
9499         * nto-tdep.h (nto_extra_thread_info): Constify.
9500         * obsd-nat.c (obsd_pid_to_str): Constify.
9501         * procfs.c (procfs_pid_to_str): Constify.
9502         * ravenscar-thread.c (ravenscar_extra_thread_info)
9503         (ravenscar_pid_to_str): Constify.
9504         * remote-sim.c (gdbsim_pid_to_str): Constify.
9505         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9506         Constify.
9507         * sol-thread.c (solaris_pid_to_str): Constify.
9508         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9509         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9510         * target.c (default_pid_to_str, target_pid_to_str)
9511         (normal_pid_to_str, default_pid_to_str): Constify.
9512         * target.h (target_ops::to_pid_to_str)
9513         (target_ops::to_extra_thread_info): Constify.
9514         (target_pid_to_str, normal_pid_to_str): Constify.
9515         * windows-nat.c (windows_pid_to_str): Constify.
9516         * gdbarch.sh (core_pid_to_str): Constify.
9517         * target-delegates.c: Regenerate.
9518         * gdbarch.h, gdbarch.c: Regenerate.
9519
9520 2017-04-05  Pedro Alves  <palves@redhat.com>
9521
9522         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9523         the memory of the temporary warning_pre_print override.
9524         * utils.c (warning_pre_print): Constify.
9525         * utils.h (warning_pre_print): Constify.
9526
9527 2017-04-05  Pedro Alves  <palves@redhat.com>
9528
9529         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9530         (shell_command): New function.
9531         (make_command): Use std::string.
9532         (init_cli_cmds): Register shell_command instead of shell_escape.
9533
9534 2017-04-05  Pedro Alves  <palves@redhat.com>
9535
9536         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9537         * tracepoint.c (default_collect): Don't initialize.
9538
9539 2017-04-05  Pedro Alves  <palves@redhat.com>
9540
9541         * macroexp.c (macro_buffer::shared): Now a bool.
9542         (init_buffer): Update.
9543         (init_shared_buffer): Constify 'addr' parameter.
9544         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9545         casts.
9546
9547 2017-04-05  Pedro Alves  <palves@redhat.com>
9548
9549         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9550         * disasm.c (set_disassembler_options): Constify local.
9551         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9552
9553 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9554
9555         PR gdb/21352
9556         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9557         option.
9558
9559 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9560
9561         * frame.c (frame_unwind_register_unsigned): Call
9562         frame_unwind_register_value.
9563
9564 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9565
9566         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9567         Use gdb_test_multiple, and don't match anchor.
9568
9569 2017-04-05  Pedro Alves  <palves@redhat.com>
9570
9571         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9572         (Write After Approval): Remove Simon Marchi.
9573
9574 2017-04-05  Pedro Alves  <palves@redhat.com>
9575
9576         * common/gdb_optional.h (optional::optional): Make constexpr and
9577         initialize m_dummy.
9578
9579 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9580
9581         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9582         (amd64fbsd_jmp_buf_reg_offset): Remove.
9583         (amd64fbsd_supply_uthread): Remove function.
9584         (amd64fbsd_collect_uthread): Remove function.
9585         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9586         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9587         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9588         (fbsd-nat.c): Update comment.
9589         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9590         (i386fbsd_jmp_buf_reg_offset): Remove.
9591         (i386fbsd_supply_uthread): Remove function.
9592         (i386fbsd_collect_uthread): Remove function.
9593         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9594
9595 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9596
9597         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9598         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9599         * NEWS: Mention that support for FreeBSD/alpha was removed.
9600         * alpha-fbsd-tdep.c: Delete file.
9601         * config/alpha/fbsd.mh: Delete file.
9602         * configure.host: Delete alpha*-*-freebsd* and
9603         alpha*-*-kfreebsd*-gnu.
9604         * configure.tgt: Delete alpha*-*-freebsd* and
9605         alpha*-*-kfreebsd*-gnu.
9606
9607 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9608
9609         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9610         amd64bsd_store_inferior_registers): Use ptid from regcache.
9611
9612 2017-04-04  Pedro Alves  <palves@redhat.com>
9613
9614         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9615         data fields, make them private and add "m_" prefixes.
9616         (lnp_state_machine::lnp_state_machine): New ctor.
9617         (record_line, check_line_address, handle_set_discriminator)
9618         (handle_set_address, handle_advance_pc, handle_special_opcode)
9619         (handle_advance_line, handle_set_file, handle_negate_stmt)
9620         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9621         (end_sequence, advance_line): New methods.
9622         (m_gdbarch, m_record_lines_p): New fields.
9623         (lnp_reader_state): Delete.
9624         (dwarf_record_line): Rename to ...
9625         (lnp_state_machine::record_line): ... adjust.
9626         (init_lnp_state_machine): Delete.
9627         (lnp_state_machine::lnp_state_machine): New.
9628         (check_line_address): Rename to ...
9629         (lnp_state_machine::check_line_address): This.
9630         (dwarf_decode_lines_1): Remove reference to "reader_state".
9631         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9632         State machine internal state manipulation moved to
9633         lnp_state_machine methods.
9634
9635 2017-04-04  Pedro Alves  <palves@redhat.com>
9636
9637         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9638         unittests/offset-type-selftests.c.
9639         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9640         * common/offset-type.h: New file.
9641         * common/preprocessor.h: New file.
9642         * common/traits.h: New file.
9643         * common/valid-expr.h: New file.
9644         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9645         sect_offset and cu_offset strong typedefs throughout.
9646         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9647         typedefs throughout.
9648         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9649         sect_offset and cu_offset strong typedefs throughout.
9650         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9651         typedefs throughout.
9652         * gdbtypes.h: Include "common/offset-type.h".
9653         (cu_offset): Now an offset type (strong typedef) instead of a
9654         struct.
9655         (sect_offset): Likewise.
9656         (union call_site_parameter_u): Rename "param_offset" field to
9657         "param_cu_off".
9658         * unittests/offset-type-selftests.c: New file.
9659
9660 2017-04-04  Pedro Alves  <palves@redhat.com>
9661
9662         * common/underlying.h: New file.
9663         * dwarf2read.c: Include "common/gdb_optional.h" and
9664         "common/underlying.h".
9665         (dir_index, file_name_index): New types.
9666         (file_entry): Use them.
9667         (file_entry::include): Use to_underlying.
9668         (line_header::add_file_name): Use dir_index.
9669         (read_formatted_entries): Use gdb::optional.  Read form before
9670         writting to file_entry.
9671         (dwarf_decode_line_header): Use dir_index.
9672         (lnp_state_machine::current_file): Use to_underlying.
9673         (lnp_state_machine::file): Change type to file_name_index.
9674         (dwarf_record_line): Use to_underlying.
9675         (init_lnp_state_machine): Use file_name_index.
9676         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9677
9678 2017-04-04  Pedro Alves  <palves@redhat.com>
9679
9680         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9681         operator bool, has_value and get methods.
9682
9683 2017-04-04  Pedro Alves  <palves@redhat.com>
9684
9685         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9686         fields.
9687         (line_header): Initialize all data fields.  Change type of
9688         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9689         Change type of include_dirs to std::vector<const char *>.  Remove
9690         num_include_dirs, include_dirs_size.  Change type of file_names to
9691         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9692         (line_header::line_header): New.
9693         (line_header::add_include_dir, line_header::add_file_name): New
9694         methods.
9695         (line_header::include_dir_at): Remove NULL check.
9696         (line_header::file_name_at): Add const overload.
9697         (line_header_up): New unique_ptr typedef.
9698         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9699         std::vector.  Remove free_line_header call.
9700         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9701         free_line_header call.
9702         (free_cu_line_header): Delete.
9703         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9704         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9705         Adjust to use std::vector.
9706         (free_line_header): Delete.
9707         (free_line_header_voidp): Use delete.
9708         (add_include_dir): Replace with ...
9709         (line_header::add_include_dir): ... this method.  Use std::vector.
9710         (add_file_name): Replace with ...
9711         (line_header::add_file_name): ... this method.  Use std::vector.
9712         (add_include_dir_stub): Delete.
9713         (read_formatted_entries): Remove memset.
9714         (dwarf_decode_line_header): Return a line_header_up instead of a
9715         raw pointer.  Remove cleanup handling.  Pass lambdas to
9716         read_formatted_entries.  Adjust to use line_header methods.
9717         (dwarf_decode_lines_1): Adjust to use line_header methods.
9718         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9719         use std::vector.
9720
9721 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9722
9723         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9724         instead of struct ptid.
9725
9726 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9727
9728         * frame.c (get_frame_register_bytes): Unwind using value.
9729         (put_frame_register_bytes): Likewise.
9730
9731 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9732
9733         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9734         aggregate-like.
9735
9736 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9737
9738         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9739
9740 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9741
9742         * gdbthread.h (struct thread_info): Declare constructor and
9743         destructor.  Add some in-class member initializers.
9744         * thread.c (free_thread): Remove.
9745         (init_thread_list): Call delete instead of free_thread.
9746         (new_thread): Call thread_info constructor.
9747         (thread_info::thread_info): New function.
9748         (thread_info::~thread_info): New function.
9749         (delete_thread_1): Call delete instead of free_thread.
9750         (make_cleanup_restore_current_thread): Move tp and frame to
9751         inner block.
9752
9753 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9754
9755         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9756         (arc_skip_prologue): Likewise.
9757         (arc_make_frame_cache): Likewise.
9758         (arc_pv_get_operand): New function.
9759         (arc_is_in_prologue): Likewise.
9760         (arc_analyze_prologue): Likewise.
9761         (arc_print_frame_cache): Likewise.
9762         (MAX_PROLOGUE_LENGTH): New constant.
9763
9764 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9765
9766         * configure.tgt: Add arc-insn.o.
9767         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9768         (dump_arc_instruction_command): New function.
9769         (arc_fprintf_disasm): Likewise.
9770         (arc_disassemble_info): Likewise.
9771         (arc_insn_get_operand_value): Likewise.
9772         (arc_insn_get_operand_value_signed): Likewise.
9773         (arc_insn_get_memory_base_reg): Likewise.
9774         (arc_insn_get_memory_offset): Likewise.
9775         (arc_insn_get_branch_target): Likewise.
9776         (arc_insn_dump): Likewise.
9777         (arc_insn_get_linear_next_pc): Likewise.
9778         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9779         (arc_disassemble_info): Likewise.
9780         (arc_insn_get_branch_target): Likewise.
9781         (arc_insn_get_linear_next_pc): Likewise.
9782         * NEWS: Mention new "maint print arc arc-instruction".
9783
9784 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9785
9786         * arc-tdep (maintenance_print_arc_list): New variable.
9787         (maintenance_print_arc_command): New function.
9788
9789 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9790
9791         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9792         Add "limm" and "reserved".
9793         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9794         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9795         * arc-tdep.h (arc_regnum): Likewise.
9796
9797 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9798
9799         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9800         for THREADPTR register.
9801         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9802         register.
9803         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9804         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9805         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9806
9807 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9808
9809         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9810         registers above gdbarch_num_regs (gdbarch) as privileged in
9811         call0 ABI.
9812
9813 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9814
9815         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9816         for a single specified register or for all registers in
9817         a0_base..a0_base + C0_NREGS range.
9818         (supply_gregset_reg): Call regcache_raw_supply for a single
9819         specified register or for all registers in a0_base..a0_base +
9820         C0_NREGS range.
9821
9822 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9823
9824         * arch/xtensa.h (C0_NREGS): Add definition.
9825         * xtensa-tdep.c (C0_NREGS): Remove definition.
9826
9827 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9828
9829         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9830         Drop xtensa_default_isa initialization.
9831         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9832
9833 2017-03-27  Pedro Alves  <palves@redhat.com>
9834
9835         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9836         (file_entry::include_dir): New method.
9837         (line_header::include_dir_at, line_header::file_name_at): New
9838         methods.
9839         (setup_type_unit_groups, setup_type_unit_groups)
9840         (psymtab_include_file_name): Simplify using the new methods.
9841         (lnp_state_machine) <the_line_header>: New field.
9842         <file>: Add comment.
9843         (lnp_state_machine::current_file): New method.
9844         (dwarf_record_line): Simplify using the new methods.
9845         (init_lnp_state_machine): Initialize the "the_line_header" field.
9846         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9847         Simplify using the new methods.
9848
9849 2017-03-27  Pedro Alves  <palves@redhat.com>
9850
9851         * cp-name-parser.y (make_empty): Delete.
9852         (demangler_special, nested_name, ptr_operator, array_indicator)
9853         (direct_declarator, declarator_1): Use fill_comp instead of
9854         make_empty.
9855
9856 2017-03-27  Pedro Alves  <palves@redhat.com>
9857
9858         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9859         to ATTRIBUTE_PRINTF.
9860         * solib-target.c (library_list_start_list): Print "string" not
9861         "version".
9862         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9863         gdb_xml_error call.
9864
9865 2017-03-27  Pedro Alves  <palves@redhat.com>
9866
9867         * dwarf2read.c (struct file_and_directory): New.
9868         (dwarf2_get_dwz_file): Adjust to use std::string.
9869         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9870         (find_file_and_directory): Adjust to return a file_and_directory
9871         object.
9872         (read_file_scope): Adjust to use file_and_directory.  Remove
9873         make_cleanup/do_cleanups calls.
9874         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9875         make_cleanup/do_cleanups calls.
9876         * python/python.c (do_start_initialization): Adjust to ldirname
9877         returning a std::string.
9878         * utils.c (ldirname): Now returns a std::string.
9879         * utils.h (ldirname): Change return type to std::string.
9880         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9881         returning a std::string.
9882         * xml-tdesc.c (file_read_description_xml): Likewise.
9883
9884 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9885
9886         * regcache.c (regcache_debug_print_register): New function.
9887         * regcache.h (regcache_debug_print_register): New declaration.
9888         * target.c (debug_print_register): Remove.
9889         (target_fetch_registers): Call regcache_debug_print_register.
9890         (target_store_registers): Likewise.
9891
9892 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9893
9894         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9895         reference beyond the 'lh->include_dirs' array before accessing to
9896         it.
9897         (psymtab_include_file_name): Likewise.
9898         (dwarf_decode_lines_1): Likewise.
9899         (dwarf_decode_lines): Likewise.
9900         (file_file_name): Likewise.
9901
9902 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9903
9904         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9905         inferior_ptid.
9906         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9907         ps_lsetfpregs): Likewise.
9908         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9909         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9910         ps_lsetfpregs): Likewise.
9911         * target.c (target_fetch_registers, target_store_registers):
9912         Remove asserts.
9913
9914 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9915
9916         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9917
9918 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9919
9920         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9921         (_initialize_aarch64_tdep): Register it.
9922         (aarch64_record_load_store): Handle PRFM instruction.
9923         (aarch64_process_record_test): New function.
9924
9925 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9926
9927         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9928         indentation.
9929
9930 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9931
9932         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9933
9934 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9935
9936         python/python.c (do_start_initialization): Fix memory leak.
9937
9938 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9939
9940         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9941         using get_ptrace_pid.
9942         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9943         inferior_ptid.
9944         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9945         inferior_ptid instead of pid.
9946
9947 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9948
9949         * aarch64-tdep.c: Wrap locally used classes in anonymous
9950         namespace.
9951         * arm-tdep.c: Likewise.
9952         * linespec.c: Likewise.
9953         * ui-out.c: Likewise.
9954
9955 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9956
9957         PR gdb/19637
9958         * python/lib/gdb/printer/bound_registers.py: Import sys.
9959
9960 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9961
9962         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9963         windows_thread_info parameter and use it instead of
9964         current_thread.
9965         (windows_fetch_inferior_registers): Don't set current_thread,
9966         pass the thread to do_windows_fetch_inferior_registers.  Use
9967         ptid from regcache instead of inferior_ptid.
9968         (do_windows_store_inferior_registers): Add windows_thread_info
9969         parameter and use it instead of current_thread.
9970         (windows_store_inferior_registers): Don't set current_thread,
9971         pass the thread to do_windows_store_inferior_registers.  Use
9972         ptid from regcache instead of inferior_ptid.
9973
9974 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9975
9976         * ser-mingw.c (ser_windows_raw): Remove reference to
9977         struct serial::current_timeout.
9978
9979 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9980
9981         PR tdep/20928
9982         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9983         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9984         (sparc64_fsr_type): Fix %fsr decoding.
9985
9986 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9987
9988         * python/py-record-btrace.c (btpy_insn_data): Change return type
9989         for Python 2.
9990
9991 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9992
9993         * spu-linux-nat.c (spu_fetch_inferior_registers,
9994         spu_store_inferior_registers): Use ptid from regcache, set and
9995         restore inferior_ptid.
9996         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9997         Likewise.
9998
9999 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10000
10001         * i386-linux-nat.c (fetch_register, store_register,
10002         i386_linux_fetch_inferior_registers,
10003         i386_linux_store_inferior_registers): Use ptid from regcache.
10004         * ia64-linux-nat.c (ia64_linux_fetch_register,
10005         ia64_linux_store_register): Likewise.
10006         * inf-ptrace.c (inf_ptrace_fetch_register,
10007         inf_ptrace_store_register): Likewise.
10008         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10009         m32r_linux_store_inferior_registers): Likewise.
10010         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10011         m68kbsd_store_inferior_registers): Likewise.
10012         * m68k-linux-nat.c (fetch_register, store_register,
10013         m68k_linux_fetch_inferior_registers,
10014         m68k_linux_store_inferior_registers): Likewise.
10015         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10016         m88kbsd_store_inferior_registers): Likewise.
10017         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10018         mips_fbsd_store_inferior_registers): Likewise.
10019         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10020         mips64_linux_regsets_store_registers): Likewise.
10021         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10022         mipsnbsd_store_inferior_registers): Likewise.
10023         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10024         mips64obsd_store_inferior_registers): Likewise.
10025         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10026         Likewise.
10027         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10028         ppcfbsd_store_inferior_registers): Likewise.
10029         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10030         ppc_linux_store_inferior_registers): Likewise.
10031         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10032         ppcnbsd_store_inferior_registers): Likewise.
10033         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10034         ppcobsd_store_registers): Likewise.
10035         * procfs.c (procfs_fetch_registers, procfs_store_registers):
10036         Likewise.
10037         * ravenscar-thread.c (ravenscar_fetch_registers,
10038         ravenscar_store_registers, ravenscar_prepare_to_store):
10039         Likewise.
10040         * record-btrace.c (record_btrace_fetch_registers,
10041         record_btrace_store_registers, record_btrace_prepare_to_store):
10042         Likewise.
10043         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10044         Lookup inferior using ptid from regcache, instead of
10045         current_inferior.
10046         * remote.c (remote_fetch_registers, remote_store_registers): Use
10047         ptid from regcache.
10048         * rs6000-nat.c (fetch_register, store_register): Likewise.
10049         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10050         s390_linux_store_inferior_registers): Likewise.
10051         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10052         shnbsd_store_inferior_registers): Likewise.
10053         * sol-thread.c (sol_thread_fetch_registers,
10054         sol_thread_store_registers): Likewise.
10055         * sparc-nat.c (sparc_fetch_inferior_registers,
10056         sparc_store_inferior_registers): Likewise.
10057         * tilegx-linux-nat.c (fetch_inferior_registers,
10058         store_inferior_registers): Likewise.
10059         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10060         vaxbsd_store_inferior_registers): Likewise.
10061         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10062         store_xtregs): Likewise.
10063
10064 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10065
10066         PR gdb/14441
10067         * NEWS: Mention support for rvalue references in GDB and python.
10068         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10069         supports both lvalue and rvalue references.
10070
10071 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10072
10073         PR gdb/14441
10074         * gdbtypes.c (rank_one_type): Implement overloading
10075         resolution rules regarding rvalue references.
10076
10077 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10078
10079         PR gdb/14441
10080         * aarch64-tdep.c (aarch64_type_align)
10081         (aarch64_extract_return_value, aarch64_store_return_value): Change
10082         lvalue reference type checks to general reference type checks.
10083         * amd64-tdep.c (amd64_classify): Likewise.
10084         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10085         Likewise.
10086         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10087         (arm_store_return_value): Likewise.
10088         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10089         * c-typeprint.c (c_print_type): Likewise.
10090         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10091         (cplus_number_of_children, cplus_describe_child): Likewise.
10092         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10093         * completer.c (expression_completer): Likewise.
10094         * cp-support.c (make_symbol_overload_list_adl_namespace):
10095         Likewise.
10096         * darwin-nat-info.c (info_mach_region_command): Likewise.
10097         * dwarf2loc.c (entry_data_value_coerce_ref)
10098         (value_of_dwarf_reg_entry): Likewise.
10099         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10100         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10101         Likewise.
10102         * findvar.c (extract_typed_address, store_typed_address):
10103         Likewise.
10104         * gdbtypes.c (rank_one_type): Likewise.
10105         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10106         * infcall.c (value_arg_coerce): Likewise.
10107         * language.c (pointer_type): Likewise.
10108         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10109         Likewise.
10110         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10111         * mn10300-tdep.c (mn10300_type_align): Likewise.
10112         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10113         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10114         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10115         Likewise.
10116         * printcmd.c (print_formatted, x_command): Likewise.
10117         * python/py-type.c (typy_get_composite, typy_template_argument):
10118         Likewise.
10119         * python/py-value.c (valpy_referenced_value)
10120         (valpy_get_dynamic_type, value_has_field): Likewise.
10121         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10122         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10123         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10124         * spu-tdep.c (spu_scalar_value_p): Likewise.
10125         * symtab.c (lookup_symbol_aux): Likewise.
10126         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10127         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10128         Likewise.
10129         * valops.c (value_cast_pointers, value_cast)
10130         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10131         (value_struct_elt, value_struct_elt_bitpos)
10132         (value_find_oload_method_list, find_overload_match)
10133         (value_rtti_indirect_type): Likewise.
10134         * valprint.c (val_print_scalar_type_p, generic_val_print):
10135         Likewise.
10136         * value.c (value_actual_type, value_as_address, unpack_long)
10137         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10138         (coerce_ref): Likewise.
10139         * varobj.c (varobj_get_value_type): Likewise.
10140
10141 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10142
10143         PR gdb/14441
10144         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10145         table of constants.
10146         * python/lib/gdb/command/explore.py: Support exploring values
10147         of rvalue reference types.
10148         * python/lib/gdb/types.py: Implement get_basic_type() for
10149         rvalue reference types.
10150         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10151         constant.
10152         * python/py-value.c (valpy_getitem): Add an rvalue reference
10153         check.
10154         (valpy_reference_value): Add new parameter "refcode".
10155         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10156         New wrappers for valpy_reference_value().
10157         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10158         (gdbpy_invoke_xmethod): Likewise.
10159
10160 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10161
10162         PR gdb/14441
10163         * dwarf2read.c (process_die, read_type_die_1): Handle the
10164         DW_TAG_rvalue_reference_type DIE.
10165         (read_tag_reference_type): Add new parameter "refcode".
10166
10167 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10168
10169         PR gdb/14441
10170         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10171         (c_type_print_modifier, c_type_print_varspec_suffix)
10172         (c_type_print_base): Support printing rvalue reference types.
10173         * c-valprint.c (c_val_print, c_value_print): Support printing
10174         rvalue reference values.
10175
10176 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10177
10178         PR gdb/14441
10179         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10180         typename.
10181         * cp-support.c (replace_typedefs): Handle
10182         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10183         * python/py-type.c (typy_lookup_type): Likewise.
10184
10185 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10186
10187         PR gdb/14441
10188         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10189         * parse.c (insert_type): Change assert statement.
10190         (follow_types): Handle rvalue reference types.
10191         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10192         constant.
10193
10194 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10195
10196         PR gdb/14441
10197         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10198         value_ref() interface.
10199         * c-valprint.c (c_value_print): Likewise.
10200         * infcall.c (value_arg_coerce): Likewise.
10201         * python/py-value.c (valpy_reference_value): Likewise.
10202         * valops.c (value_cast, value_reinterpret_cast)
10203         (value_dynamic_cast, typecmp): Likewise.
10204         (value_ref): Parameterize by kind of return value reference type.
10205         * value.h (value_ref): Add new parameter "refcode".
10206
10207 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10208
10209         PR gdb/14441
10210         * dwarf2read.c (read_tag_reference_type): Use
10211         lookup_lvalue_reference_type() instead of lookup_reference_type().
10212         * eval.c (evaluate_subexp_standard): Likewise.
10213         * f-exp.y: Likewise.
10214         * gdbtypes.c (make_reference_type, lookup_reference_type):
10215         Generalize with rvalue reference types.
10216         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10217         convenience wrappers for lookup_reference_type().
10218         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10219         reference kind parameter.
10220         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10221         wrappers for lookup_reference_type().
10222         * guile/scm-type.c (gdbscm_type_reference): Use
10223         lookup_lvalue_reference_type() instead of lookup_reference_type().
10224         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10225         * parse.c (follow_types): Likewise.
10226         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10227         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10228         Likewise.
10229         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10230         (gdbpy_invoke_xmethod): Likewise.
10231         * stabsread.c: Provide extra argument to make_reference_type()
10232         call.
10233         * valops.c (value_ref, value_rtti_indirect_type): Use
10234         lookup_lvalue_reference_type() instead of lookup_reference_type().
10235
10236 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10237
10238         PR gdb/14441
10239         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10240         (TYPE_IS_REFERENCE): New macro.
10241         (struct type): Add rvalue_reference_type field.
10242         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10243
10244 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10245
10246         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10247         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10248         New function definition.
10249         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10250         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10251         New function declaration.
10252         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10253         * mi/mi-interp.h: New file.
10254         * solib.c (info_sharedlibrary_command): Replace for loop with
10255         ALL_SO_LIBS macro
10256         * solib.h (update_solib_list): New function declaration.
10257         (so_list_head): Move macro.
10258         * solist.h (ALL_SO_LIBS): New macro.
10259
10260 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10261
10262         * infcmd.c (post_create_inferior): Remove unused argument in
10263         call to solib_add.
10264         * remote.c (remote_start_remote): Likewise.
10265         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10266         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10267         (enable_break): Likewise.
10268         * solib.c (update_solib_list): Remove unused target argument
10269         and its documentation.
10270         (solib_add): Remove unused target argument.  Remove unused
10271         argument in call to update_solib_list.
10272         (info_sharedlibrary_command): Remove unused argument in call
10273         to update_solib_list.
10274         (sharedlibrary_command): Remove unused argument in call to
10275         solib_add.
10276         (handle_solib_event): Likewise.
10277         (reload_shared_libraries): Likewise.
10278         * solib.h (solib_add): Remove unused target argument.
10279
10280 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10281
10282         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10283         (s390_displaced_step_fixup): Cover relative branches with the
10284         default fixup handling.  This fixes lack of support for some
10285         relative branch instructions.
10286
10287 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10288
10289         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10290         ptid from regcache.
10291
10292 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10293
10294         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10295         i386_darwin_store_inferior_registers): Use ptid from regcache.
10296
10297 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10298
10299         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10300         i386bsd_store_inferior_registers): Use ptid from regcache.
10301
10302 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10303
10304         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10305         hppaobsd_store_registers): Use ptid from regcache.
10306
10307 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10308
10309         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10310         hppanbsd_store_registers): Use ptid from regcache.
10311
10312 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10313
10314         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10315         from regcache.  Use get_ptrace_pid.
10316
10317 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10318
10319         * corelow.c (get_core_register_section): Use ptid from regcache,
10320         update doc.
10321
10322 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10323
10324         * bsd-uthread.c (bsd_uthread_fetch_registers,
10325         bsd_uthread_store_registers): Use ptid from regcache, set and
10326         restore inferior_ptid.
10327
10328 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10329
10330         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10331         fetch_fp_regs, store_register, store_regs, store_fp_register,
10332         store_fp_regs): Use ptid from regcache.
10333
10334 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10335
10336         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10337         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10338         store_vfp_regs): Use ptid from regcache.
10339
10340 2017-03-17  Pedro Alves  <palves@redhat.com>
10341
10342         PR remote/21188
10343         * ser-base.c (ser_base_wait_for): Add comment.
10344         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10345         version.
10346         * ser-unix.c (hardwire_raw): Remove reference to
10347         scb->current_timeout.
10348         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10349         (hardwire_ops): Install ser_base_readchar instead of
10350         hardwire_readchar.
10351         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10352         Remove fields.
10353
10354 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10355
10356         PR gdb/19637
10357         * python/lib/gdb/printer/bound_registers.py: Add support for
10358         Python 3.
10359
10360 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10361
10362         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10363         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10364         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10365         byte_offset to subobj_byte_offset.  Fix the handling of
10366         DWARF_VALUE_STACK on big-endian targets when coming via an
10367         implicit pointer.
10368         (dwarf2_evaluate_loc_desc): Adjust call to
10369         dwarf2_evaluate_loc_desc_full.
10370         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10371         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10372
10373 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10374
10375         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10376         and REVSH instructions.
10377
10378 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10379
10380         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10381         (arm_record_test): Declare.
10382         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10383         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10384         align with the manual.
10385         (thumb_record_misc): Adjust the code order to align with the
10386         manual.
10387         (thumb2_record_decode_insn_handler): Fix instruction matching.
10388         (instruction_reader_thumb): New class.
10389         (arm_record_test): New function.
10390
10391 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10392
10393         * arm-tdep.c (abstract_memory_reader): New class.
10394         (instruction_reader): New class.
10395         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10396         (decode_insn): Likewise.
10397
10398 2017-03-16  Doug Evans  <dje@google.com>
10399
10400         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10401         member.  Change type of TYPE member to SCM.  All uses updated.
10402         (lsscm_make_lazy_string_smob): Add assert.
10403         (lsscm_make_lazy_string): Flag bad length values.
10404         (lsscm_elt_type): New function.
10405         (gdbscm_lazy_string_to_value): Rewrite to use
10406         lsscm_safe_lazy_string_to_value.
10407         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10408         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10409         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10410         in incoming type.
10411         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10412         * guile/scm-type.c (tyscm_scm_to_type): New function.
10413
10414 2017-03-15  Doug Evans  <dje@google.com>
10415
10416         PR python/17728, python/18439, python/18779
10417         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10418         member.  Change type of TYPE member to PyObject *.  All uses updated.
10419         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10420         (gdbpy_create_lazy_string_object): Flag bad length values.
10421         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10422         Handle typedefs in incoming type.
10423         (stpy_lazy_string_elt_type): New function.
10424         (gdbpy_extract_lazy_string): Call it.
10425         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10426         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10427         typedefs in incoming type.
10428
10429 2017-03-16  Doug Evans  <dje@google.com>
10430
10431         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10432         * guile/scm-type.c (tyscm_scm_to_type): New function.
10433
10434 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10435
10436         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10437         "ULONGEST" for "skip".
10438
10439 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10440
10441         PR gdb/21220
10442         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10443         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10444         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10445         over ptrace peek/poke until end of buffer or error.
10446
10447 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10448
10449         * parse.c (length_of_subexp): Make static.
10450         * parser-defs.h (length_of_subexp): Remove.
10451
10452 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10453
10454         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10455         as well.
10456
10457 2017-03-14  Pedro Alves  <palves@redhat.com>
10458
10459         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10460         (main): Use std::unique_ptr.  Remove calls to
10461         cp_demangled_name_parse_free.
10462
10463 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10464
10465         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10466         alphabsd_store_inferior_registers): Use regcache->ptid instead
10467         of inferior_ptid.
10468
10469 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10470
10471         * aix-thread.c (aix_thread_fetch_registers,
10472         aix_thread_store_registers): Use regcache->ptid instead of
10473         inferior_ptid.
10474
10475 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10476
10477         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10478         store_gregs_to_thread, fetch_fpregs_from_thread,
10479         store_fpregs_to_thread): Use regcache->ptid instead of
10480         inferior_ptid.
10481
10482 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10483
10484         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10485         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10486         instead of inferior_ptid.
10487
10488 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10489
10490         * target.c (target_fetch_registers, target_store_registers): Add
10491         assert.
10492
10493 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10494
10495         * regcache.h (regcache_get_ptid): New function.
10496         * regcache.c (regcache_get_ptid): New function.
10497
10498 2017-03-13  Mark Wielaard  <mark@klomp.org>
10499
10500         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10501
10502 2017-03-10  Keith Seitz  <keiths@redhat.com>
10503
10504         PR c++/8218
10505         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10506
10507 2017-03-08  Pedro Alves  <palves@redhat.com>
10508
10509         PR gdb/18360
10510         * infrun.c (start_step_over, do_target_resume, resume)
10511         (restart_threads): Assert we're not resuming a thread that is
10512         meant to be stopped.
10513         (infrun_thread_stop_requested_callback): Delete.
10514         (infrun_thread_stop_requested): If the thread is internally
10515         stopped, queue a pending stop event and clear the thread's
10516         inline-frame state.
10517         (handle_stop_requested): New function.
10518         (handle_syscall_event, handle_inferior_event_1): Use
10519         handle_stop_requested.
10520         (handle_stop_requested): New function.
10521         (handle_signal_stop): Set the thread's stop_signal here instead of
10522         at caller.
10523         (finish_step_over): Clear step over info unconditionally.
10524         (handle_signal_stop): If the user had interrupted the event
10525         thread, consider the stop a random signal.
10526         (handle_signal_stop) <signal arrived while stepping over
10527         breakpoint>: Don't restart threads here.
10528         (stop_waiting): Don't clear step-over info here.
10529
10530 2017-03-08  Pedro Alves  <palves@redhat.com>
10531
10532         PR 21206
10533         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10534         goes to argument 2, not 1.
10535
10536 2017-03-08  Pedro Alves  <palves@redhat.com>
10537
10538         PR cli/21218
10539         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10540         display_gdb_prompt.
10541         (command_line_input): Add comment.
10542
10543 2017-03-08  Pedro Alves  <palves@redhat.com>
10544
10545         PR tui/21216
10546         * tui/tui-file.c (tui_file::write): New.
10547         * tui/tui-file.h (tui_file): Override "write".
10548         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10549         factored out from ...
10550         (tui_puts): ... here.
10551         (tui_putc): Use them.
10552         (tui_write): New function.
10553         * tui/tui-io.h (tui_write): Declare.
10554
10555 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10556
10557         * Makefile.in (SFILES): Replace "environ.c" with
10558         "common/environ.c".
10559         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10560         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10561         to...
10562         * common/environ.c: ... here.
10563         * environ.h: Moved to...
10564         * common/environ.h: ... here.
10565
10566 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10567
10568         * gdbarch.sh (pstring_ptr): New static function.
10569         (gdbarch_disassembler_options): Use it.
10570         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10571         not valid_disassembler_option->name.
10572         * gdbarch.c: Regenerate.
10573
10574 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10575
10576         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10577
10578 2017-03-07  Pedro Alves  <palves@redhat.com>
10579
10580         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10581
10582 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10583
10584         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10585         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10586         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10587         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10588
10589 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10590
10591         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10592
10593 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10594
10595         * remote.c (remote_add_target_side_commands): Use range-based
10596         for loop.
10597
10598 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10599
10600         PR gdb/21165
10601         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10602         value is lazy.
10603         * valprint.c (common_val_print): Likewise.
10604
10605 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10606
10607         * NEWS: Mention new set/show disassembler-options commands.
10608         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10609         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10610         (prospective_options): New static variable.
10611         (gdb_disassembler::gdb_disassembler): Initialize
10612         m_di.disassembler_options.
10613         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10614         (get_disassembler_options): New function.
10615         (set_disassembler_options): Likewise.
10616         (set_disassembler_options_sfunc): Likewise.
10617         (show_disassembler_options_sfunc): Likewise.
10618         (disassembler_options_completer): Likewise.
10619         (_initialize_disasm): Likewise.
10620         * disasm.h (get_disassembler_options): New prototype.
10621         (set_disassembler_options): Likewise.
10622         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10623         (gdbarch_verify_disassembler_options): Likewise.
10624         * gdbarch.c: Regenerate.
10625         * gdbarch.h: Likewise.
10626         * arm-tdep.c (num_disassembly_options): Delete.
10627         (set_disassembly_style): Likewise.
10628         (arm_disassembler_options): New static variable.
10629         (set_disassembly_style_sfunc): Convert short style name into long
10630         option name.  Call set_disassembler_options.
10631         (show_disassembly_style_sfunc): New function.
10632         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10633         set_gdbarch_verify_disassembler_options.
10634         (_initialize_arm_tdep): Delete regnames variable and update callers.
10635         (arm_disassembler_options): Initialize.
10636         (disasm_options): New variable.
10637         (num_disassembly_options): Rename from this...
10638         (num_disassembly_styles): ...to this.  Compute by scanning through
10639         disasm_options.
10640         (valid_disassembly_styles): Initialize using disasm_options.
10641         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10642         set_arm_regname_option.
10643         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10644         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10645         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10646         set_gdbarch_verify_disassembler_options.
10647         * s390-tdep.c (s390_disassembler_options): New static variable.
10648         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10649         set_gdbarch_verify_disassembler_options.
10650
10651 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10652
10653         * remote.c (remote_add_target_side_condition): Remove "struct"
10654         keyword from range-based for loop.
10655
10656 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10657
10658         * remote.c (remote_add_target_side_condition): Use range-based
10659         for loop.  Update comment.
10660
10661 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10662
10663         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10664
10665 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10666
10667         * regcache.c (regcache_raw_update): New function.
10668         (regcache_raw_read): Move code to regcache_raw_update.
10669         * regcache.h (regcache_raw_update): New declaration.
10670         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10671
10672 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10673
10674         * dwarf2read.c (create_debug_type_hash_table): Initialize
10675         header.signature and header.type_offset_in_tu.
10676
10677 2017-02-24  Pedro Alves  <palves@redhat.com>
10678
10679         * symtab.c (make_file_symbol_completion_list_1): Use
10680         add_symtab_completions.
10681
10682 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10683
10684         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10685
10686 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10687
10688         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10689         I386_MAX_REGISTER_SIZE.
10690         (i386_pseudo_register_write): Likewise.
10691         (i386_process_record): Likewise.
10692         * i387-tdep.c (i387_supply_xsave): Likewise.
10693         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10694         (store_register): Likewise.
10695
10696 2017-02-23  Pedro Alves  <palves@redhat.com>
10697
10698         * ada-lang.c: Include "common/function-view.h".
10699         (ada_iterate_over_symbols): Adjust to use function_view as
10700         callback type.
10701         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10702         (ada_make_symbol_completion_list): Use a lambda.
10703         (ada_exc_search_name_matches): Delete.
10704         (name_matches_regex): New.
10705         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10706         * compile/compile-c-support.c: Include "common/function-view.h".
10707         (print_one_macro): Change prototype to accept a ui_file pointer.
10708         (write_macro_definitions): Use a lambda.
10709         * dwarf2read.c: Include "common/function-view.h".
10710         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10711         (dw2_expand_symtabs_matching): Adjust to use function_view as
10712         callback type.
10713         * language.h: Include "common/function-view.h".
10714         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10715         function_view as callback type.
10716         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10717         * linespec.c: Include "common/function-view.h".
10718         (collect_info::add_symbol): New method.
10719         (struct symbol_and_data_callback, iterate_inline_only, struct
10720         symbol_matcher_data, iterate_name_matcher): Delete.
10721         (iterate_over_all_matching_symtabs): Adjust to use function_view
10722         as callback type and lambdas.
10723         (iterate_over_file_blocks): Adjust to use function_view as
10724         callback type.
10725         (decode_compound_collector): Now a class with private fields.
10726         (decode_compound_collector::release_symbols): New method.
10727         (collect_one_symbol): Rename to...
10728         (decode_compound_collector::operator()): ... this and adjust.
10729         (lookup_prefix_sym): decode_compound_collector construction bits
10730         move to decode_compound_collector ctor.  Pass the
10731         decode_compound_collector object directly as callback.  Remove
10732         cleanups and use decode_compound_collector::release_symbols
10733         instead.
10734         (symtab_collector): Now a class with private fields.
10735         (symtab_collector::release_symtabs): New method.
10736         (add_symtabs_to_list): Rename to...
10737         (symtab_collector::operator()): ... this and adjust.
10738         (collect_symtabs_from_filename): symtab_collector construction
10739         bits move to symtab_collector ctor.  Pass the symtab_collector
10740         object directly as callback.  Remove cleanups and use
10741         symtab_collector::release_symtabs instead.
10742         (collect_symbols): Delete.
10743         (add_matching_symbols_to_info): Use lambdas.
10744         * macrocmd.c (print_macro_callback): Delete.
10745         (info_macro_command): Use a lambda.
10746         (info_macros_command): Pass print_macro_definition as callable
10747         directly.
10748         (print_one_macro): Remove 'ignore' parameter.
10749         (macro_list_command): Adjust.
10750         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10751         (macro_for_each_data::user_data): Delete field.
10752         (foreach_macro): Adjust to call the function_view.
10753         (macro_for_each): Adjust to use function_view as callback type.
10754         (foreach_macro_in_scope): Adjust to call the function_view.
10755         (macro_for_each_in_scope): Adjust to use function_view as callback
10756         type.
10757         * macrotab.h: Include "common/function-view.h".
10758         (macro_callback_fn): Declare a prototype instead of a pointer.
10759         Remove "user_data" parameter.
10760         (macro_for_each, macro_for_each_in_scope): Adjust to use
10761         function_view as callback type.
10762         * psymtab.c (partial_map_expand_apply)
10763         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10764         Adjust to use function_view as callback type and to return bool.
10765         (psym_expand_symtabs_matching): Adjust to use function_view as
10766         callback types.
10767         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10768         to use function_view as callback type and to return bool.
10769         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10770         callback types.
10771         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10772         as callback types.
10773         * symfile.h: Include "common/function-view.h".
10774         (expand_symtabs_file_matcher_ftype)
10775         (expand_symtabs_symbol_matcher_ftype)
10776         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10777         return bool.
10778         (quick_symbol_functions::map_symtabs_matching_filename)
10779         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10780         function_view as callback type and return bool.
10781         (expand_symtabs_matching): Adjust to use function_view as callback
10782         type.
10783         (maintenance_expand_name_matcher)
10784         (maintenance_expand_file_matcher): Delete.
10785         (maintenance_expand_symtabs): Use lambdas.
10786         * symtab.c (iterate_over_some_symtabs): Adjust to use
10787         function_view as callback types and return bool.
10788         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10789         of a cleanup.
10790         (lookup_symtab_callback): Delete.
10791         (lookup_symtab): Use a lambda.
10792         (iterate_over_symbols): Adjust to use function_view as callback
10793         type.
10794         (struct search_symbols_data, search_symbols_file_matches)
10795         (search_symbols_name_matches): Delete.
10796         (search_symbols): Use a pair of lambdas.
10797         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10798         (symtab_expansion_callback): Delete.
10799         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10800         * symtab.h: Include "common/function-view.h".
10801         (iterate_over_some_symtabs): Adjust to use function_view as
10802         callback type and return bool.
10803         (iterate_over_symtabs): Adjust to use function_view as callback
10804         type.
10805         (symbol_found_callback_ftype): Remove 'data' parameter and return
10806         bool.
10807         (iterate_over_symbols): Adjust to use function_view as callback
10808         type.
10809
10810 2017-02-23  Pedro Alves  <palves@redhat.com>
10811
10812         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10813         (%.o) <unittests/%.c>: New pattern.
10814         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10815         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10816         * common/function-view.h: New file.
10817         * unittests/function-view-selftests.c: New file.
10818         * configure: Regenerate.
10819
10820 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10821
10822         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10823         inferior_ptid.
10824         * go32-nat.c (go32_thread_alive): Likewise.
10825
10826 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10827
10828         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10829         delete.
10830
10831 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10832
10833         * varobj.c (varobj_clear_saved_item): Use delete instead of
10834         xfree.
10835         (update_dynamic_varobj_children): Likewise.
10836
10837 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10838
10839         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10840
10841 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10842
10843         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10844         m_enum_value to 0 in default constructor.
10845
10846 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10847
10848         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10849         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10850         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10851         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10852         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10853         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10854         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10855         IS_STORE_CONDITIONAL_INSN.
10856
10857 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10858
10859         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10860
10861 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10862
10863         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10864
10865 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10866
10867         * dwarf2read.c (skip_one_die, read_attribute_value)
10868         (dwarf2_const_value_attr, dump_die_shallow)
10869         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10870         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10871
10872 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10873
10874         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10875         (dwarf_parse_macro_header): Accept DWARF version 5.
10876         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10877
10878 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10879
10880         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10881         DW_AT_GNU_*.
10882         * common/common-exceptions.h (enum errors): Likewise.
10883         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10884         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10885         (dwarf_expr_context::execute_stack_op): Likewise.
10886         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10887         Likewise.
10888         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10889         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10890         (show_entry_values_debug, call_site_to_target_addr)
10891         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10892         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10893         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10894         (value_of_dwarf_block_entry, indirect_pieced_value)
10895         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10896         (disassemble_dwarf_expression): Likewise.
10897         * dwarf2read.c (process_die, inherit_abstract_dies)
10898         (read_call_site_scope): Likewise.
10899         * gdbtypes.h (struct func_type, struct call_site_parameter)
10900         (struct call_site): Likewise.
10901         * stack.c (read_frame_arg): Likewise.
10902         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10903
10904 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10905
10906         * defs.h (read_unsigned_leb128): New declaration.
10907         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10908         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10909         (dwarf2_find_location_expression): Call also
10910         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10911         * dwarf2loc.h (dwarf2_version): New declaration.
10912         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10913         rnglists.
10914         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10915         .debug_rnglists.
10916         (struct dwop_section_names): Add loclists_dwo.
10917         (dwop_section_names): Add .debug_loclists.dwo.
10918         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10919         (struct dwarf2_per_cu_data): Add dwarf_version.
10920         (struct dwo_sections): Add loclists.
10921         (struct attr_abbrev): Add implicit_const.
10922         (read_indirect_line_string): New declaration.
10923         (read_unsigned_leb128): Delete declaration.
10924         (rcuh_kind): New definition.
10925         (read_and_check_comp_unit_head): Change parameter
10926         is_debug_types_section to section_kind.
10927         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10928         (read_comp_unit_head): Change parameter abfd to section, add parameter
10929         section_kind.  Handle DWARF-5.
10930         (error_check_comp_unit_head): Accept also DWARF version 5.
10931         (read_and_check_comp_unit_head): Change parameter
10932         is_debug_types_section to section_kind.
10933         (read_and_check_type_unit_head): Delete function.
10934         (read_abbrev_offset): Handle DWARF-5.
10935         (create_debug_type_hash_table): Add parameter section_kind.  Process
10936         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10937         comp_unit_head.
10938         (create_debug_types_hash_table): Update create_debug_type_hash_table
10939         caller.
10940         (create_all_type_units): Call create_debug_type_hash_table.
10941         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10942         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10943         caller.
10944         (skip_one_die): Handle DW_FORM_implicit_const.
10945         (dwarf2_rnglists_process): New function.
10946         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10947         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10948         (read_attribute_value): Handle DW_FORM_implicit_const,
10949         DW_FORM_line_strp.
10950         (read_attribute): Handle DW_FORM_implicit_const.
10951         (read_indirect_string_at_offset_from): New function from
10952         read_indirect_string_at_offset.
10953         (read_indirect_string_at_offset): Call
10954         read_indirect_string_at_offset_from.
10955         (read_indirect_line_string_at_offset): New function.
10956         (read_indirect_string): New function comment.
10957         (read_indirect_line_string): New function.
10958         (read_unsigned_leb128): Make it global.
10959         (dwarf2_string_attr): Handle DWARF-5.
10960         (add_include_dir_stub, read_formatted_entries): New functions.
10961         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10962         Handle DWARF-5.
10963         (per_cu_header_read_in): Update read_comp_unit_head caller.
10964         (dwarf2_version): New function.
10965         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10966         rnglists.
10967         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10968         fields.
10969
10970 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10971
10972         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10973
10974 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10975
10976         * dwarf2read.c (dwarf2_ranges_process): New function from
10977         dwarf2_ranges_read.
10978         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10979         dwarf2_ranges_process.
10980
10981 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10982
10983         * dwarf2read.c (create_debug_type_hash_table): New function from
10984         create_debug_types_hash_table.
10985         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10986         (create_all_type_units, open_and_init_dwo_file): Update
10987         create_debug_types_hash_table callers.
10988
10989 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10990
10991         PR gdb/16188
10992         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10993         refer to 'ap', not 'args'.
10994
10995 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10996             Pedro Alves  <palves@redhat.com>
10997
10998         PR gdb/16188
10999         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11000         calls succeeded.
11001         * fork-child.c (trace_start_error): New function.
11002         (trace_start_error_with_name): Likewise.
11003         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11004         * inf-ptrace.c (inf_ptrace_me): Likewise.
11005         * inferior.h (trace_start_error): New prototype.
11006         (trace_start_error_with_name): Likewise.
11007
11008 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
11009
11010         PR gdb/21164
11011         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11012         NULL before using it.
11013         * symmisc.c (maintenance_print_symbols): Likewise.
11014         (maintenance_print_msymbols): Likewise.
11015
11016 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11017
11018         * NEWS: Add record Python bindings entry.
11019
11020 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11021
11022         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11023         py-record-full.o.
11024         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11025         * python/py-record-btrace.c, python/py-record-btrace.h,
11026         python/py-record-full.c, python/py-record-full.h: New file.
11027         * python/py-record.c: Add include for py-record-btrace.h and
11028         py-record-full.h.
11029         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11030         recpy_instruction_history, recpy_function_call_history, recpy_begin,
11031         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11032         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11033         New definition.
11034         (gdbpy_initialize_btrace): New export.
11035         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11036
11037 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11038
11039         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11040         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11041         * python/py-record.c: New file.
11042         * python/python-internal.h (gdbpy_start_recording,
11043         gdbpy_current_recording, gdpy_stop_recording,
11044         gdbpy_initialize_record): New export.
11045         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11046         (python_GdbMethods): Add gdbpy_start_recording,
11047         gdbpy_current_recording and gdbpy_stop_recording.
11048
11049 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11050
11051         * record-btrace.c (record_btrace_record_method): New function.
11052         (init_record_btrace_ops): Initialize to_record_method.
11053         * record-full.c (record_full_record_method): New function.
11054         (init_record_full_ops, init_record_full_core_ops): Add
11055         record_full_record_method.
11056         * record.h (enum record_method): New enum.
11057         * target-debug.h (target_debug_print_enum_record_method: New define.
11058         * target-delegates.c: Regenerate.
11059         * target.c (target_record_method): New function.
11060         * target.h: Include record.h.
11061         (struct target_ops) <to_record_method>: New field.
11062         (target_record_method): New export.
11063
11064 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11065
11066         * record.h (record_start, record_stop): New export.
11067         * record.c (record_start, record_stop): New function.
11068
11069 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11070
11071         * btrace.c (btrace_fetch): Copy function call segments pointer
11072         into a vector.
11073         (btrace_clear): Clear the vector.
11074         (btrace_find_insn_by_number): Use binary search to find the correct
11075         function call segment.
11076         * btrace.h (brace_fun_p): New typedef.
11077         (struct btrace_thread_info) <functions>: New field.
11078
11079 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11080
11081         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11082         * btrace.c (btrace_decode_error): ... here.  New function.
11083         * btrace.h (btrace_decode_error): New export.
11084
11085 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11086
11087         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11088         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11089         btrace_find_insn_by_number): Remove special case for gaps.
11090         * btrace.h (btrace_insn_get_error): New export.
11091         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11092         * record-btrace.c (btrace_insn_history): Print number for gaps.
11093         (record_btrace_info, record_btrace_goto): Handle gaps.
11094
11095 2017-02-14  Tom Tromey  <tom@tromey.com>
11096
11097         PR python/13598:
11098         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11099         event.
11100         * python/py-evts.c (gdbpy_initialize_py_events): Add
11101         before_prompt registry.
11102         * python/py-events.h (events_object) <before_prompt>: New field.
11103
11104 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11105
11106         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11107
11108 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11109
11110         * symfile (_initialize_symfile): Add usage text to the load command's
11111         help text.
11112
11113 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11114
11115         * utils.c (defaulted_query): Don't query on secondary UIs.
11116
11117 2017-02-10  Tom Tromey  <tom@tromey.com>
11118
11119         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11120
11121 2017-02-10  Tom Tromey  <tom@tromey.com>
11122
11123         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11124         "cleanup" local.
11125         * python/py-type.c (typy_legacy_template_argument): Remove
11126         unnecessary "cleanup" local.
11127
11128 2017-02-10  Tom Tromey  <tom@tromey.com>
11129
11130         * python/python.c (do_start_initialization): New function, from
11131         _initialize_python.
11132         (_initialize_python): Call do_start_initialization.
11133         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11134         goto.
11135
11136 2017-02-10  Tom Tromey  <tom@tromey.com>
11137
11138         * python/py-prettyprint.c (pretty_print_one_value): Use
11139         gdbpy_ref.
11140
11141 2017-02-10  Tom Tromey  <tom@tromey.com>
11142
11143         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11144         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11145         gdbpy_ref.
11146         * python/py-type.c (field_new): Use gdbpy_ref.
11147         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11148         gdbpy_ref.
11149         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11150         (py_free_pspace): Likewise.
11151         (pspace_to_pspace_object): Likewise.
11152         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11153         (py_free_objfile): Likewise.
11154         (objfile_to_objfile_object): Likewise.
11155         * python/py-inferior.c (delete_thread_object): Use
11156         gdbpy_ref.
11157         (infpy_read_memory): Likewise.
11158         (py_free_inferior): Likewise.
11159         * python/py-evtregistry.c (create_eventregistry_object): Use
11160         gdbpy_ref.
11161         * python/py-event.c (create_event_object): Use gdbpy_ref.
11162
11163 2017-02-10  Tom Tromey  <tom@tromey.com>
11164
11165         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11166         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11167         used.
11168         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11169         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11170         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11171         python/py-framefilter.c, python/py-function.c,
11172         python/py-inferior.c, python/py-infevents.c,
11173         python/py-linetable.c, python/py-newobjfileevent.c,
11174         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11175         python/py-signalevent.c, python/py-stopevent.c,
11176         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11177         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11178         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11179         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11180
11181 2017-02-10  Tom Tromey  <tom@tromey.com>
11182
11183         * ui-out.h (ui_out_emit_type): New class.
11184         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11185         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11186         and ui_out_emit_tuple.
11187         (enumerate_locals): Likewise.
11188         (py_mi_print_variables, py_print_locals, py_print_args): Use
11189         ui_out_emit_list.
11190         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11191         ui_out_emit_list.
11192         * common/gdb_optional.h: New file.
11193
11194 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11195
11196         * MAINTAINERS (Write After Approval): Update my e-mail address.
11197
11198 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11199
11200         PR gdb/21122
11201         * breakpoint.c (_initialize_breakpoint): Update the help description
11202         of the 'commands' command to indicate that it takes a list argument.
11203
11204 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11205
11206         * interps.c (current_interp_set_logging): Remove "return".
11207
11208 2017-02-09  Gary Benson  <gbenson@redhat.com>
11209
11210         * symtab.c (add_symtab_completions): Prevent NULL pointer
11211         dereference.
11212
11213 2017-02-08  Pedro Alves  <palves@redhat.com>
11214
11215         * interps.c (interp::interp): Remove reference to quiet_p.
11216         (interp_set): Make static.  Remove dead "Switching to" output
11217         code.
11218         (interp_quiet_p, interp_set_quiet): Delete.
11219         (interpreter_exec_cmd): Don't set the interpreter quiet.
11220         * interps.h (interp_quiet_p): Make static.
11221         (class interp) <quiet_p>: Remove field
11222
11223 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11224
11225         * cli/cli-decode.c (find_command_name_length): Make it extern.
11226         * cli/cli-decode.h (find_command_name_length): Declare.
11227         * cli/cli-script.c (command_name_equals, line_first_arg):
11228         New functions.
11229         (process_next_line): Use cli-decode to parse command names.
11230         (build_command_line): Make args a constant pointer.
11231
11232 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11233
11234         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11235         Remove case-insensitive search.
11236
11237 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11238
11239         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11240         at the end of the line.  Avoids an ARI warning.
11241
11242 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11243
11244         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11245         rdseed instructions.
11246         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11247
11248 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11249
11250         PR tdep/20936
11251         Provide and use sparc32 and sparc64 target description XML files.
11252         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11253         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11254         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11255         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11256         * features/sparc/sparc32-solaris.xml: New file.
11257         * features/sparc/sparc64-solaris.xml: New file.
11258         * features/sparc/sparc32-solaris.c: Generated.
11259         * features/sparc/sparc64-solaris.c: Generated.
11260         * sparc-tdep.h: Account for differences in target descriptions.
11261         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11262         (sparc32_register_type): Use target provided registers.
11263         (validate_tdesc_registers): New function.
11264         (sparc32_gdbarch_init): Use tdesc_has_registers.
11265         Set pseudoregister functions.
11266         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11267         (sparc64_register_type): Use target provided registers.
11268         (sparc64_init_abi): Set pseudoregister functions.
11269
11270 2017-02-03  Tom Tromey  <tom@tromey.com>
11271
11272         PR rust/21097:
11273         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11274         with a single member.
11275
11276 2017-02-03  Pedro Alves  <palves@redhat.com>
11277
11278         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11279         (cli_interp_base::~cli_interp_base): New.
11280         (cli_interp): New struct.
11281         (as_cli_interp): Cast the interp itself to cli_interp.
11282         (cli_interpreter_pre_command_loop): Rename to ...
11283         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11284         parameter.
11285         (cli_interpreter_init): Rename to ...
11286         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11287         boolean.  Make extern.
11288         (cli_interpreter_resume): Rename to ...
11289         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11290         extern.
11291         (cli_interpreter_suspend): Rename to ...
11292         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11293         extern.
11294         (cli_interpreter_exec): Rename to ...
11295         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11296         extern.
11297         (cli_interpreter_supports_command_editing): Rename to ...
11298         (cli_interp_base::supports_command_editing): ... this.  Remove
11299         'interp' parameter.  Make extern.
11300         (cli_ui_out): Rename to ...
11301         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11302         Make extern.
11303         (cli_set_logging): Rename to ...
11304         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11305         parameter.  Make extern.
11306         (cli_interp_procs): Delete.
11307         (cli_interp_factory): Adjust to use "new".
11308         * cli/cli-interp.h: Include "interps.h".
11309         (struct cli_interp_base): New struct.
11310         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11311         (interp_new): Delete.
11312         (interp::interp, interp::~interp): New.
11313         (interp_set): Use bool, and return void.  Assume the interpreter
11314         has suspend, init and resume methods, and that the all return
11315         void.
11316         (set_top_level_interpreter): interp_set returns void.
11317         (interp_ui_out): Adapt.
11318         (current_interp_set_logging): Adapt.
11319         (interp_data): Delete.
11320         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11321         (interp_exec): Adapt.
11322         (top_level_interpreter_data): Delete.
11323         * interps.h (interp_init_ftype, interp_resume_ftype)
11324         (interp_suspend_ftype, interp_exec_ftype)
11325         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11326         (class interp): New.
11327         (interp_new): Delete.
11328         (interp_set): Now returns void.  Use bool.
11329         (interp_data, top_level_interpreter_data): Delete.
11330         * mi/mi-common.h: Include interps.h.
11331         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11332         init, resume, suspect, exec, interp_ui_out, set_logging and
11333         pre_command_loop methods.
11334         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11335         (mi_interpreter_init): Rename to ...
11336         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11337         bool, return void and make extern.  Adjust.
11338         (mi_interpreter_resume): ... Rename to ...
11339         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11340         return void and make extern.  Adjust.
11341         (mi_interpreter_suspend): ... Rename to ...
11342         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11343         return void and make extern.  Adjust.
11344         (mi_interpreter_exec): ... Rename to ...
11345         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11346         extern.  Adjust.
11347         (mi_interpreter_pre_command_loop): ... Rename to ...
11348         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11349         parameter and make extern.
11350         (mi_on_normal_stop_1): Adjust.
11351         (mi_ui_out): Rename to ...
11352         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11353         parameter and make extern.  Adjust.
11354         (mi_set_logging): Rename to ...
11355         (mi_interp::set_logging): ... this.  Remove the 'interp'
11356         parameter and make extern.  Adjust.
11357         (mi_interp_procs): Delete.
11358         (mi_interp_factory): Adjust to use 'new'.
11359         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11360         (mi_print_exception, mi_execute_command, mi_load_progress):
11361         Adjust.
11362         * tui/tui-interp.c (tui_interp): New class.
11363         (as_tui_interp): Return a tui_interp pointer.
11364         (tui_on_normal_stop, tui_on_signal_received)
11365         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11366         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11367         to use interp::interp_ui_out.
11368         (tui_init): Rename to ...
11369         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11370         bool, return void and make extern.  Adjust.
11371         (tui_resume): Rename to ...
11372         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11373         return void and make extern.  Adjust.
11374         (tui_suspend): Rename to ...
11375         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11376         return void and make extern.  Adjust.
11377         (tui_ui_out): Rename to ...
11378         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11379         parameter, and make extern.  Adjust.
11380         (tui_exec): Rename to ...
11381         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11382         make extern.
11383         (tui_interp_procs): Delete.
11384         (tui_interp_factory): Use "new".
11385
11386 2017-02-02  Tom Tromey  <tom@tromey.com>
11387
11388         * rust-exp.y (ends_raw_string, space_then_number)
11389         (rust_identifier_start_p): Return bool.
11390         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11391         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11392         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11393         (rust_chartype_p): Return bool.
11394         (val_print_struct, rust_print_struct_def, rust_print_type):
11395         Update.
11396         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11397         Return bool.
11398
11399 2017-02-02  Tom Tromey  <tom@tromey.com>
11400
11401         * rust-lang.c: Reindent.
11402
11403 2017-02-02  Tom Tromey  <tom@tromey.com>
11404
11405         * rust-lang.h (rust_crate_for_block): Update.
11406         * rust-lang.c (rust_crate_for_block): Return std::string.
11407         (rust_get_disr_info): Use std:;string, not
11408         gdb::unique_xmalloc_ptr.
11409         * rust-exp.y (crate_name): Update.
11410
11411 2017-02-02  Pedro Alves  <palves@redhat.com>
11412
11413         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11414         field out of gdb_disassembler_test and make it static.
11415
11416 2017-02-02  Pedro Alves  <palves@redhat.com>
11417
11418         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11419         mi1_interp and mi_interp fields.
11420
11421 2017-02-02  Pedro Alves  <palves@redhat.com>
11422
11423         * cli/cli-interp.c (struct saved_output_files, saved_output):
11424         Moved from cli/cli-logging.c.
11425         (cli_set_logging): New function.
11426         (cli_interp_procs): Install cli_set_logging.
11427         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11428         Declare.
11429         * cli/cli-logging.c (struct saved_output_files, saved_output):
11430         Moved to cli/cli-interp.c.
11431         (pop_output_files): Don't save outputs here.
11432         (make_logging_output): New function.
11433         (handle_redirections): Don't build tee nor save previous outputs
11434         here.
11435         * interps.c (current_interp_set_logging): Change prototype.
11436         Assume there's always a set_logging_proc method installed.
11437         * interps.h (interp_set_logging_ftype): Change prototype.
11438         (current_interp_set_logging): Change prototype and adjust comment.
11439         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11440         use make_logging_output.
11441         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11442 2017-02-02  Pedro Alves  <palves@redhat.com>
11443
11444         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11445         from ...
11446         (set_logging_overwrite): ... here.
11447         (logging_no_redirect_file): Delete.
11448         (set_logging_redirect): Don't handle redirection on the fly.
11449         Instead warn that "logging off" / "logging on" is necessary.
11450         (pop_output_files): Delete references to logging_no_redirect_file.
11451         (show_logging_command): Always speak in terms of what will happen
11452         once logging is reenabled.
11453
11454 2017-02-02  Pedro Alves  <palves@redhat.com>
11455
11456         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11457
11458 2017-02-02  Pedro Alves  <palves@redhat.com>
11459
11460         * disasm.c (gdb_pretty_print_insn): Rename to ...
11461         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11462         Remove gdbarch parameter.  Adapt to clear the object's buffers
11463         instead of allocating new buffers, and to print using the object's
11464         gdb_disassembler instead of calling gdb_print_insn.
11465         (dump_insns): Use gdb_pretty_print_disassembler.
11466         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11467         (gdb_pretty_print_disassembler): New class.
11468         * record-btrace.c (btrace_insn_history): Use
11469         gdb_pretty_print_disassembler.
11470
11471 2017-02-02  Pedro Alves  <palves@redhat.com>
11472
11473         * ada-lang.c (type_as_string): Use string_file.
11474         * ada-valprint.c (ada_print_floating): Use string_file.
11475         * ada-varobj.c (ada_varobj_scalar_image)
11476         (ada_varobj_get_value_image): Use string_file.
11477         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11478         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11479         * breakpoint.c (update_inserted_breakpoint_locations)
11480         (insert_breakpoint_locations, reattach_breakpoints)
11481         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11482         (print_it_watchpoint): Use string_file.
11483         (save_breakpoints): Use stdio_file.
11484         * c-exp.y (oper): Use string_file.
11485         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11486         tee_file.
11487         (pop_output_files): Use delete.
11488         (handle_redirections): Use stdio_file and tee_file.
11489         * cli/cli-setshow.c (do_show_command): Use string_file.
11490         * compile/compile-c-support.c (c_compute_program): Use
11491         string_file.
11492         * compile/compile-c-symbols.c (generate_vla_size): Take a
11493         'string_file &' instead of a 'ui_file *'.
11494         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11495         of a 'ui_file *'.  Use string_file.
11496         (generate_c_for_variable_locations): Take a 'string_file &'
11497         instead of a 'ui_file *'.
11498         * compile/compile-internal.h (generate_c_for_for_one_variable):
11499         Take a 'string_file &' instead of a 'ui_file *'.
11500         * compile/compile-loc2c.c (push, pushf, unary, binary)
11501         (print_label, pushf_register_address, pushf_register)
11502         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11503         'ui_file *'.  Adjust.
11504         * compile/compile.c (compile_to_object): Use string_file.
11505         * compile/compile.h (compile_dwarf_expr_to_c)
11506         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11507         'ui_file *'.
11508         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11509         (replace_typedefs_qualified_name): Use string_file and
11510         obstack_copy0.
11511         * disasm.c (gdb_pretty_print_insn): Use string_file.
11512         (gdb_disassembly): Adjust reference the null_stream global.
11513         (do_ui_file_delete): Delete.
11514         (gdb_insn_length): Use null_stream.
11515         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11516         * dwarf2loc.c (dwarf2_compile_property_to_c)
11517         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11518         'string_file &' instead of a 'ui_file *'.
11519         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11520         * dwarf2read.c (do_ui_file_peek_last): Delete.
11521         (dwarf2_compute_name): Use string_file.
11522         * event-top.c (gdb_setup_readline): Use stdio_file.
11523         * gdbarch.sh (verify_gdbarch): Use string_file.
11524         * gdbtypes.c (safe_parse_type): Use null_stream.
11525         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11526         string_file.
11527         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11528         'string_file *' instead of a 'ui_file *'.
11529         (gdbscm_arch_disassemble): Use string_file.
11530         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11531         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11532         inherits from ui_file.
11533         (ioscm_file_port_delete, ioscm_file_port_rewind)
11534         (ioscm_file_port_put): Delete.
11535         (ioscm_file_port_write): Rename to ...
11536         (ioscm_file_port::write): ... this.  Remove file_port_magic
11537         checks.
11538         (ioscm_file_port_new): Delete.
11539         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11540         ui_file_up.
11541         * guile/scm-type.c (tyscm_type_name): Use string_file.
11542         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11543         Use string_file.
11544         * infcmd.c (print_return_value_1): Use string_file.
11545         * infrun.c (print_target_wait_results): Use string_file.
11546         * language.c (add_language): Use string_file.
11547         * location.c (explicit_to_string_internal): Use string_file.
11548         * main.c (captured_main_1): Use null_file.
11549         * maint.c (maintenance_print_architecture): Use stdio_file.
11550         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11551         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11552         event_channel>: Change type to mi_console_file pointer.
11553         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11554         (mi_console_file_delete): Delete.
11555         (struct mi_console_file): Delete.
11556         (mi_console_file_magic): Delete.
11557         (mi_console_file_new): Delete.
11558         (mi_console_file::mi_console_file): New.
11559         (mi_console_file_delete): Delete.
11560         (mi_console_file_fputs): Delete.
11561         (mi_console_file::write): New.
11562         (mi_console_raw_packet): Delete.
11563         (mi_console_file::flush): New.
11564         (mi_console_file_flush): Delete.
11565         (mi_console_set_raw): Rename to ...
11566         (mi_console_file::set_raw): ... this.
11567         * mi/mi-console.h (class mi_console_file): New class.
11568         (mi_console_file_new, mi_console_set_raw): Delete.
11569         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11570         (mi_set_logging): Use delete and tee_file.  Adjust.
11571         * mi/mi-main.c (output_register): Use string_file.
11572         (mi_cmd_data_evaluate_expression): Use string_file.
11573         (mi_cmd_data_read_memory): Use string_file.
11574         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11575         * mi/mi-out.c (mi_ui_out::main_stream): New.
11576         (mi_ui_out::rewind): Use main_stream and
11577         string_file.
11578         (mi_ui_out::put): Use main_stream and string_file.
11579         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11580         Allocate a 'string_file' instead.
11581         (mi_out_new): Don't allocate a mem_fileopen stream here.
11582         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11583         (mi_ui_out::main_stream): Declare method.
11584         * printcmd.c (eval_command): Use string_file.
11585         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11586         * python/py-arch.c (archpy_disassemble): Use string_file.
11587         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11588         * python/py-frame.c (frapy_str): Use string_file.
11589         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11590         Use string_file.
11591         * python/py-type.c (typy_str): Use string_file.
11592         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11593         * python/py-value.c (valpy_str): Use string_file.
11594         * record-btrace.c (btrace_insn_history): Use string_file.
11595         * regcache.c (regcache_print): Use stdio_file.
11596         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11597         * remote.c (escape_buffer): Use string_file.
11598         * rust-lang.c (rust_get_disr_info): Use string_file.
11599         * serial.c (serial_open_ops_1): Use stdio_file.
11600         (do_serial_close): Use delete.
11601         * stack.c (print_frame_arg): Use string_file.
11602         (print_frame_args): Remove local mem_fileopen stream, not used.
11603         (print_frame): Use string_file.
11604         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11605         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11606         Take a 'string_file *' instead of a 'ui_file *'.
11607         * top.c (new_ui): Use stdio_file and stderr_file.
11608         (free_ui): Use delete.
11609         (execute_command_to_string): Use string_file.
11610         (quit_confirm): Use string_file.
11611         * tracepoint.c (collection_list::append_exp): Use string_file.
11612         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11613         * tui/tui-file.c: Don't include "ui-file.h".
11614         (enum streamtype, struct tui_stream): Delete.
11615         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11616         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11617         (tui_file::tui_file): New method.
11618         (tui_file_fputs): Delete.
11619         (tui_file_get_strbuf): Delete.
11620         (tui_file::puts): New method.
11621         (tui_file_adjust_strbuf): Delete.
11622         (tui_file_flush): Delete.
11623         (tui_file::flush): New method.
11624         * tui/tui-file.h: Tweak intro comment.
11625         Include ui-file.h.
11626         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11627         (tui_file_adjust_strbuf): Delete declarations.
11628         (class tui_file): New class.
11629         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11630         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11631         (tui_register_format): Use string_stream.
11632         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11633         (tui_get_function_from_frame): Use string_file.
11634         * typeprint.c (type_to_string): Use string_file.
11635         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11636         (null_stream): New global.
11637         (ui_file_delete): Delete.
11638         (ui_file::ui_file): New.
11639         (null_file_isatty): Delete.
11640         (ui_file::~ui_file): New.
11641         (null_file_rewind): Delete.
11642         (ui_file::printf): New.
11643         (null_file_put): Delete.
11644         (null_file_flush): Delete.
11645         (ui_file::putstr): New.
11646         (null_file_write): Delete.
11647         (ui_file::putstrn): New.
11648         (null_file_read): Delete.
11649         (ui_file::putc): New.
11650         (null_file_fputs): Delete.
11651         (null_file_write_async_safe): Delete.
11652         (ui_file::vprintf): New.
11653         (null_file_delete): Delete.
11654         (null_file::write): New.
11655         (null_file_fseek): Delete.
11656         (null_file::puts): New.
11657         (ui_file_data): Delete.
11658         (null_file::write_async_safe): New.
11659         (gdb_flush, ui_file_isatty): Adjust.
11660         (ui_file_put, ui_file_rewind): Delete.
11661         (ui_file_write): Adjust.
11662         (ui_file_write_for_put): Delete.
11663         (ui_file_write_async_safe, ui_file_read): Adjust.
11664         (ui_file_fseek): Delete.
11665         (fputs_unfiltered): Adjust.
11666         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11667         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11668         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11669         (set_ui_file_data): Delete.
11670         (string_file::~string_file, string_file::write)
11671         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11672         (do_ui_file_as_string, ui_file_as_string): Delete.
11673         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11674         (struct mem_file): Delete.
11675         (mem_file_new): Delete.
11676         (stdio_file::stdio_file): New.
11677         (mem_file_delete): Delete.
11678         (stdio_file::stdio_file): New.
11679         (mem_fileopen): Delete.
11680         (stdio_file::~stdio_file): New.
11681         (mem_file_rewind): Delete.
11682         (stdio_file::set_stream): New.
11683         (mem_file_put): Delete.
11684         (stdio_file::open): New.
11685         (mem_file_write): Delete.
11686         (stdio_file_magic, struct stdio_file): Delete.
11687         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11688         (stdio_file::flush): New.
11689         (stdio_file_read): Rename to ...
11690         (stdio_file::read): ... this.  Adjust.
11691         (stdio_file_write): Rename to ...
11692         (stdio_file::write): ... this.  Adjust.
11693         (stdio_file_write_async_safe): Rename to ...
11694         (stdio_file::write_async_safe) ... this.  Adjust.
11695         (stdio_file_fputs): Rename to ...
11696         (stdio_file::puts) ... this.  Adjust.
11697         (stdio_file_isatty): Delete.
11698         (stdio_file_fseek): Delete.
11699         (stdio_file::isatty): New.
11700         (stderr_file_write): Rename to ...
11701         (stderr_file::write) ... this.  Adjust.
11702         (stderr_file_fputs): Rename to ...
11703         (stderr_file::puts) ... this.  Adjust.
11704         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11705         (stderr_file::stderr_file): New.
11706         (tee_file_magic): Delete.
11707         (struct tee_file): Delete.
11708         (tee_file::tee_file): New.
11709         (tee_file_new): Delete.
11710         (tee_file::~tee_file): New.
11711         (tee_file_delete): Delete.
11712         (tee_file_flush): Rename to ...
11713         (tee_file::flush): ... this.  Adjust.
11714         (tee_file_write): Rename to ...
11715         (tee_file::write): ... this.  Adjust.
11716         (tee_file::write_async_safe): New.
11717         (tee_file_fputs): Rename to ...
11718         (tee_file::puts): ... this.  Adjust.
11719         (tee_file_isatty): Rename to ...
11720         (tee_file::isatty): ... this.  Adjust.
11721         * ui-file.h (struct obstack, struct ui_file): Don't
11722         forward-declare.
11723         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11724         (ui_file_write_ftype)
11725         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11726         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11727         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11728         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11729         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11730         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11731         (set_ui_file_fseek): Delete.
11732         (ui_file_data, ui_file_delete, ui_file_rewind)
11733         (struct ui_file): New.
11734         (ui_file_up): New.
11735         (class null_file): New.
11736         (null_stream): Declare.
11737         (ui_file_write_for_put, ui_file_put): Delete.
11738         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11739         Delete.
11740         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11741         (gdb_fopen, tee_file_new): Delete.
11742         (struct string_file): New.
11743         (struct stdio_file): New.
11744         (stdio_file_up): New.
11745         (struct stderr_file): New.
11746         (class tee_file): New.
11747         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11748         of a 'ui_file *'.  Adjust.
11749         * ui-out.h (class ui_out) <field_stream>: Likewise.
11750         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11751         (null_stream): Delete.
11752         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11753         Adjust.
11754         * utils.h (struct ui_file): Delete forward declaration..
11755         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11756         (error_stream): Take a 'string_file &' instead of a
11757         'ui_file *'.
11758         * varobj.c (varobj_value_get_print_value): Use string_file.
11759         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11760         * gdbarch.c: Regenerate.
11761
11762 2017-02-02  Pedro Alves  <palves@redhat.com>
11763
11764         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11765         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11766         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11767         Adjust to call gdb_print_insn instead of
11768         gdb_disassembler::print_insn.
11769         (dump_insns, do_mixed_source_and_assembly_deprecated)
11770         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11771         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11772         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11773         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11774         declaration.
11775         (gdb_pretty_print_insn): Re-add declaration.
11776         * record-btrace.c (btrace_insn_history): Don't allocate a
11777         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11778
11779 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11780
11781         * disasm.h (gdb_disassembly): Remove file_string parameter.
11782         * disasm.c (gdb_disassembly): Likewise.
11783         * cli/cli-cmds.c (print_disassembly): Adapt.
11784         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11785         * stack.c (do_gdb_disassembly): Likewise.
11786
11787 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11788
11789         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11790         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11791         targets.  And if the implicit value is longer than needed, extract
11792         the first bytes instead of the "least significant" ones.
11793
11794 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11795
11796         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11797         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11798         (btrace_fetch): Assert can_access_registers_ptid.
11799         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11800         validate_registers_access.
11801
11802 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11803
11804         * gdbthread.h (can_access_registers_ptid): New.
11805         * thread.c (can_access_registers_ptid): New.
11806
11807 2017-02-01  Pedro Alves  <palves@redhat.com>
11808
11809         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11810
11811 2017-01-31  Pedro Alves  <palves@redhat.com>
11812
11813         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11814         Fix typos.
11815
11816 2017-01-31  Pedro Alves  <palves@redhat.com>
11817
11818         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11819         not used.
11820
11821 2017-01-31  Pedro Alves  <palves@redhat.com>
11822
11823         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11824
11825 2017-01-31  Pedro Alves  <palves@redhat.com>
11826
11827         * common/scoped_restore.h
11828         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11829         change the value's parameter type to T2.
11830         (make_scoped_restore): Likewise.
11831
11832 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11833             Richard Henderson  <rth@redhat.com>
11834
11835         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11836         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11837         GS_BASE for older kernels.
11838         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11839         GS_BASE for older kernels.
11840         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11841         and GS_BASE to the offset table.
11842         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11843         system register group.
11844         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11845         for older kernels.
11846         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11847         amd64 ABI.
11848         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11849         AMD64_GSBASE_REGNUM.
11850         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11851         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11852         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11853         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11854         i386/64bit-segments.xml in those rules.
11855         * features/i386/64bit-segments.xml: New file.
11856         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11857         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11858         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11859         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11860         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11861         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11862         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11863         * features/i386/amd64-avx-linux.c: Regenerated.
11864         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11865         * features/i386/amd64-avx-mpx.c: Regenerated.
11866         * features/i386/amd64-avx512-linux.c: Regenerated.
11867         * features/i386/amd64-linux.c: Regenerated.
11868         * features/i386/amd64-mpx-linux.c: Regenerated.
11869         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11870         * features/i386/i386-avx-mpx.c: Regenerated.
11871         * features/i386/x32-avx-linux.c: Regenerated.
11872         * features/i386/x32-avx512-linux.c: Regenerated.
11873         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11874         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11875         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11876         * regformats/i386/amd64-linux.dat: Regenerated.
11877         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11878         * regformats/i386/x32-avx-linux.dat: Regenerated.
11879         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11880         * regformats/i386/x32-linux.dat: Regenerated.
11881
11882 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11883
11884         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11885         Set to AMD64_NUM_REGS.
11886
11887 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11888
11889         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11890         that checks validity of a register number.
11891
11892 2017-01-27  Kees Cook  <keescook@google.com>
11893
11894         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11895         fetch_fpregs if target has fpa registers.
11896         (arm_linux_store_inferior_registers): Call store_fpregs if target
11897         has fpa registers.
11898
11899 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11900
11901         * cris-tdep.c (cris_gdbarch_init): Remove check for
11902         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11903
11904 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11905
11906         * corelow.c (get_core_register_section): Check for regset
11907         existence before checking for REGSET_VARIABLE_SIZE.
11908
11909 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11910             Pedro Alves  <palves@redhat.com>
11911
11912         PR gdb/20939
11913         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11914         call memory_error, save memaddr instead.
11915         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11916         negative, cal memory_error.
11917         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11918
11919 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11920
11921         * disasm-selftests.c (memory_error_test): New function.
11922         (_initialize_disasm_selftests): Register memory_error_test.
11923
11924 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11925
11926         * Makefile.in (SFILES): Add disasm-selftests.c and
11927         selftest-arch.c.
11928         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11929         * disasm-selftests.c: New file.
11930         * selftest-arch.c: New file.
11931         * selftest-arch.h: New file.
11932
11933 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11934
11935         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11936         to bfd_arch_mep.  Don't return 0 if section is not
11937         found.  Call print_insn_mep.
11938
11939 2017-01-26  Pedro Alves  <palves@redhat.com>
11940             Yao Qi  <yao.qi@linaro.org>
11941
11942         * arm-tdep.c: Include "disasm.h".
11943         (gdb_print_insn_arm): Update code to get gdbarch.
11944         * disasm.c (dis_asm_read_memory): Change it to
11945         gdb_disassembler::dis_asm_read_memory.
11946         (dis_asm_memory_error): Likewise.
11947         (dis_asm_print_address): Likewise.
11948         (gdb_pretty_print_insn): Change it to
11949         gdb_disassembler::pretty_print_insn.
11950         (dump_insns): Add one argument gdb_disassemlber.  All
11951         callers updated.
11952         (do_mixed_source_and_assembly_deprecated): Likewise.
11953         (do_mixed_source_and_assembly): Likewise.
11954         (do_assembly_only): Likewise.
11955         (gdb_disassembler::gdb_disassembler): New.
11956         (gdb_disassembler::print_insn): New.
11957         * disasm.h (class gdb_disassembler): New.
11958         (gdb_pretty_print_insn): Remove declaration.
11959         (gdb_disassemble_info): Likewise.
11960         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11961         (gdbscm_disasm_read_memory_worker): Update.
11962         (gdbscm_disasm_read_memory): Update.
11963         (gdbscm_disasm_memory_error): Remove.
11964         (gdbscm_disasm_print_address): Remove.
11965         (gdbscm_disassembler::gdbscm_disassembler): New.
11966         (gdbscm_print_insn_from_port): Update.
11967         * mips-tdep.c: Include disasm.h.
11968         (gdb_print_insn_mips): Update code to get gdbarch.
11969         * record-btrace.c (btrace_insn_history): Update.
11970         * spu-tdep.c: Include disasm.h.
11971         (struct spu_dis_asm_data): Remove.
11972         (struct spu_dis_asm_info): New.
11973         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11974         SPU id.
11975         (gdb_print_insn_spu): Cast disassemble_info to
11976         spu_dis_asm_info.
11977
11978 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11979
11980         * disasm.c (do_ui_file_delete): Delete.
11981         (gdb_insn_length): Move code creating stream to ...
11982         * utils.c (null_stream): ... here.  New function.
11983         * utils.h (null_stream): Declare.
11984
11985 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11986
11987         * python/py-inferior.c (find_thread_object): Return directly
11988         from the loop.  Remove "found" variable.
11989
11990 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11991
11992         GDB 7.12.1 released.
11993
11994 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11995
11996         * python/py-function.c (fnpy_call): Reorder declarations to have
11997         the gdbpy_enter object declared first.
11998         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11999
12000 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12001
12002         PR python/21068
12003         * python/python-internal.h (PyMem_RawMalloc): Define for
12004         Python < 3.4.
12005         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12006         PyMem_RawMalloc instead of PyMem_Malloc.
12007
12008 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
12009             Luis Machado  <lgustavo@codesourcery.com>
12010
12011         * NEWS (New commands): Mention flash-erase.
12012         (New MI commands): Mention target-flash-erase.
12013         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12014         command.
12015         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12016         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12017         * target.c (flash_erase_command): New function.
12018         (initialize_targets): Add new flash-erase command.
12019         * target.h (flash_erase_command): New declaration.
12020
12021 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
12022
12023         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12024         HAVE_SYS_PROCFS_H is defined.
12025
12026 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12027
12028         * remote.c (struct cached_reg): Change data into a pointer.
12029         * (stop_reply_dtr): Free data pointers before deleting vector.
12030         (process_stop_reply): Likewise.
12031         (remote_parse_stop_reply): Allocate space for data
12032
12033 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12034
12035         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12036         MAX_REGISTER_SIZE.
12037         (amd64_pseudo_register_read_value): Likewise.
12038         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12039         (store_register_using_P): Likewise.
12040         * regcache.c (regcache_xfer_part): Likewise.
12041
12042 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
12043
12044         Split real and pseudo registers.
12045         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12046         (sparc32_pseudo_regnum): New enum.
12047         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12048         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12049         (SPARC32_CP0_REGISTERS): New macro.
12050         (sparc32_pseudo_register_name): New function.
12051         (sparc32_register_name): Use sparc32_pseudo_register_name.
12052         (sparc32_pseudo_register_type): New function.
12053         (sparc32_register_type): Use sparc32_pseudo_register_type.
12054         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12055         pseudo register numbers.
12056         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12057         (SPARC64_CP0_REGISTERS): New macro.
12058         (sparc64_pseudo_register_name): New function.
12059         (sparc64_register_name): Use sparc64_pseudo_register_name.
12060         (sparc64_pseudo_register_type): New function.
12061         (sparc64_register_type): Use sparc64_pseudo_register_type.
12062         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12063         pseudo register numbers.
12064         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12065         sparc64_store_arguments): Handle pseudo register numbers.
12066
12067 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12068
12069         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12070         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12071         output.
12072         (getpkt_or_notif_sane_1): Likewise.
12073
12074 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12075
12076         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12077         of CC.  Pass "-x c++-header" instead of "-x c".
12078
12079 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12080
12081         * remote.c (remote_can_async_p): Update comment.
12082
12083 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12084
12085         * linux-nat.c (linux_nat_can_async_p): Update comment.
12086
12087 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12088
12089         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12090
12091 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12092
12093         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12094
12095 2017-01-10  Tom Tromey  <tom@tromey.com>
12096
12097         * python/py-type.c (typy_legacy_template_argument): Update.
12098         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12099         ~demangle_parse_info): Declare new members.
12100         (cp_demangled_name_to_comp): Return unique_ptr.
12101         (cp_demangled_name_parse_free)
12102         (make_cleanup_cp_demangled_name_parse_free)
12103         (cp_new_demangle_parse_info): Remove.
12104         * cp-support.c (do_demangled_name_parse_free_cleanup)
12105         (make_cleanup_cp_demangled_name_parse_free): Remove.
12106         (inspect_type, cp_canonicalize_string_full)
12107         (cp_canonicalize_string): Update.
12108         (mangled_name_to_comp): Change return type.
12109         (cp_class_name_from_physname, method_name_from_physname)
12110         (cp_func_name, cp_remove_params): Update.
12111         * cp-name-parser.y (demangle_parse_info): New constructor, from
12112         cp_new_demangle_parse_info.
12113         (~demangle_parse_info): New destructor, from
12114         cp_demangled_name_parse_free.
12115         (cp_merge_demangle_parse_infos): Update.
12116         (cp_demangled_name_to_comp): Change return type.
12117
12118 2017-01-10  Tom Tromey  <tom@tromey.com>
12119
12120         * top.c (prevent_dont_repeat): Change return type.
12121         * python/python.c (execute_gdb_command): Use std::string.
12122         Update.
12123         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12124         * command.h (prevent_dont_repeat): Change return type.
12125         * breakpoint.c (bpstat_do_actions_1): Update.
12126
12127 2017-01-10  Tom Tromey  <tom@tromey.com>
12128
12129         * value.h (scoped_value_mark::~scoped_value_mark): Call
12130         free_to_mark.
12131         (scoped_value_mark::free_to_mark): New method.
12132         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12133         scoped_value_mark.
12134
12135 2017-01-10  Tom Tromey  <tom@tromey.com>
12136
12137         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12138         (valpy_reference_value, valpy_const_value, valpy_get_address)
12139         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12140         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12141         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12142         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12143         scoped_value_mark.
12144         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12145         * value.h (scoped_value_mark): New class.
12146
12147 2017-01-10  Tom Tromey  <tom@tromey.com>
12148
12149         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12150         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12151         * psymtab.c (discard_psymtabs_upto): Remove.
12152         (make_cleanup_discard_psymtabs): Remove.
12153         (struct psymtab_state): Remove.
12154
12155 2017-01-10  Tom Tromey  <tom@tromey.com>
12156
12157         * record-full.c (record_full_save_cleanups): Remove.
12158         (record_full_save): Use gdb::unlinker.
12159         * gcore.c (do_bfd_delete_cleanup): Remove.
12160         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12161         cleanups.
12162         * dwarf2read.c (unlink_if_set): Remove.
12163         (write_psymtabs_to_index): Use gdb::unlinker.
12164         * common/gdb_unlinker.h: New file.
12165
12166 2017-01-10  Tom Tromey  <tom@tromey.com>
12167
12168         * windows-tdep.c (windows_xfer_shared_library): Update.
12169         * windows-nat.c (windows_make_so): Update.
12170         * utils.h (make_cleanup_bfd_unref): Remove.
12171         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12172         * symfile.h (symfile_bfd_open)
12173         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12174         * symfile.c (read_symbols, symbol_file_add)
12175         (separate_debug_file_exists): Update.
12176         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12177         (generic_load, reread_symbols): Update.
12178         * symfile-mem.c (symbol_file_add_from_memory): Update.
12179         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12180         (spu_symbol_file_add_from_memory): Update.
12181         * solist.h (struct target_so_ops) <bfd_open>: Return
12182         gdb_bfd_ref_ptr.
12183         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12184         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12185         gdb_bfd_ref_ptr.
12186         (solib_map_sections, reload_shared_libraries_1): Update.
12187         * solib-svr4.c (enable_break): Update.
12188         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12189         * solib-frv.c (enable_break2): Update.
12190         * solib-dsbt.c (enable_break): Update.
12191         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12192         gdb_bfd_ref_ptr.
12193         (darwin_solib_get_all_image_info_addr_at_init): Update.
12194         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12195         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12196         * record-full.c (record_full_save): Update.
12197         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12198         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12199         * minidebug.c (find_separate_debug_file_in_section): Return
12200         gdb_bfd_ref_ptr.
12201         * machoread.c (macho_add_oso_symfile): Change abfd to
12202         gdb_bfd_ref_ptr.
12203         (macho_symfile_read_all_oso): Update.
12204         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12205         (macho_symfile_read): Update.
12206         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12207         (jit_bfd_try_read_symtab): Update.
12208         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12209         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12210         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12211         gdb_bfd_ref_ptr.
12212         (gdb_bfd_ref_policy): New struct.
12213         (gdb_bfd_ref_ptr): New typedef.
12214         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12215         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12216         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12217         gdb_bfd_ref_ptr.
12218         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12219         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12220         (gcore_command): Update.
12221         * exec.c (exec_file_attach): Update.
12222         * elfread.c (elf_symfile_read): Update.
12223         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12224         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12225         (open_and_init_dwo_file): Update.
12226         (open_dwp_file): Return gdb_bfd_ref_ptr.
12227         (open_and_init_dwp_file): Update.
12228         * corelow.c (core_open): Update.
12229         * compile/compile-object-load.c (compile_object_load): Update.
12230         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12231         * coffread.c (coff_symfile_read): Update.
12232         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12233         gdb_bfd_ref_ptr.  Rename.
12234         (dump_bfd_file, restore_command): Update.
12235         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12236         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12237         (find_separate_debug_file_by_buildid): Update.
12238
12239 2017-01-10  Tom Tromey  <tom@tromey.com>
12240
12241         * common/gdb_ref_ptr.h: New file.
12242         * python/py-ref.h (struct gdbpy_ref_policy): New.
12243         (gdbpy_ref): Now a typedef.
12244
12245 2017-01-10  Tom Tromey  <tom@tromey.com>
12246
12247         * utils.h (make_cleanup_htab_delete): Don't declare.
12248         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12249         Remove.
12250         * linespec.c (decode_compound_collector): Add constructor,
12251         destructor.
12252         (lookup_prefix_sym): Remove cleanup.
12253         (symtab_collector): Add constructor, destructor.
12254         (collect_symtabs_from_filename): Remove cleanup.
12255         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12256         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12257         Use htab_up.
12258         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12259         * dwarf2read.c (dw2_expand_symtabs_matching)
12260         (dw2_map_symbol_filenames, dwarf_decode_macros)
12261         (write_psymtabs_to_index): Use htab_up.
12262         * dwarf2loc.c (func_verify_no_selftailcall)
12263         (call_site_find_chain_1, func_verify_no_selftailcall)
12264         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12265         std::vector, gdb::unique_xmalloc_ptr.
12266         (call_sitep): Remove typedef.
12267         (dwarf2_locexpr_baton_eval): Remove unused variable.
12268
12269 2017-01-10  Tom Tromey  <tom@tromey.com>
12270
12271         * python/python-internal.h (make_cleanup_py_decref)
12272         (make_cleanup_py_xdecref): Don't declare.
12273         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12274         (py_xdecref, make_cleanup_py_xdecref): Remove.
12275
12276 2017-01-10  Tom Tromey  <tom@tromey.com>
12277
12278         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12279         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12280
12281 2017-01-10  Tom Tromey  <tom@tromey.com>
12282
12283         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12284
12285 2017-01-10  Tom Tromey  <tom@tromey.com>
12286
12287         * python/py-utils.c (unicode_to_encoded_string)
12288         (python_string_to_target_string)
12289         (python_string_to_target_python_string)
12290         (python_string_to_host_string, gdbpy_obj_to_string)
12291         (get_addr_from_python): Use gdbpy_ref.
12292
12293 2017-01-10  Tom Tromey  <tom@tromey.com>
12294
12295         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12296         gdbpy_ref.
12297
12298 2017-01-10  Tom Tromey  <tom@tromey.com>
12299
12300         * python/python.c (eval_python_command, gdbpy_decode_line)
12301         (gdbpy_run_events, gdbpy_start_type_printers)
12302         (gdbpy_apply_type_printers): Use gdbpy_ref.
12303
12304 2017-01-10  Tom Tromey  <tom@tromey.com>
12305
12306         * python/py-param.c (get_doc_string, compute_enum_values): Use
12307         gdbpy_ref.
12308
12309 2017-01-10  Tom Tromey  <tom@tromey.com>
12310
12311         * python/py-inferior.c (find_thread_object, build_inferior_list):
12312         Use gdbpy_ref.
12313
12314 2017-01-10  Tom Tromey  <tom@tromey.com>
12315
12316         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12317
12318 2017-01-10  Tom Tromey  <tom@tromey.com>
12319
12320         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12321         gdbpy_ref.
12322
12323 2017-01-10  Tom Tromey  <tom@tromey.com>
12324
12325         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12326         extra incref.
12327         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12328         Use gdbpy_ref.
12329
12330 2017-01-10  Tom Tromey  <tom@tromey.com>
12331
12332         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12333         gdbpy_ref.
12334
12335 2017-01-10  Tom Tromey  <tom@tromey.com>
12336
12337         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12338         decref results of PyArg_ParseTupleAndKeywords.
12339
12340 2017-01-10  Tom Tromey  <tom@tromey.com>
12341
12342         * python/python.c (python_run_simple_file): Use
12343         unique_xmalloc_ptr, gdbpy_ref.
12344
12345 2017-01-10  Tom Tromey  <tom@tromey.com>
12346
12347         * python/py-prettyprint.c (print_stack_unless_memory_error)
12348         (print_string_repr, print_children): Use gdbpy_ref.
12349         (dummy_python_frame): New class.
12350         (dummy_python_frame::dummy_python_frame): Rename from
12351         push_dummy_python_frame.
12352         (py_restore_tstate): Remove.
12353
12354 2017-01-10  Tom Tromey  <tom@tromey.com>
12355
12356         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12357
12358 2017-01-10  Tom Tromey  <tom@tromey.com>
12359
12360         * python/python.c (ensure_python_env, restore_python_env):
12361         Remove.
12362         * python/python-internal.h (ensure_python_env): Don't declare.
12363         * varobj.h (varobj_ensure_python_env): Don't declare.
12364         * varobj.c (varobj_ensure_python_env): Remove.
12365
12366 2017-01-10  Tom Tromey  <tom@tromey.com>
12367
12368         * varobj.c (varobj_value_get_print_value): Use
12369         gdbpy_enter_varobj.
12370
12371 2017-01-10  Tom Tromey  <tom@tromey.com>
12372
12373         * python/py-prettyprint.c (print_string_repr, print_children):
12374         Update.
12375         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12376         of "encoding".
12377         * varobj.c (varobj_value_get_print_value): Update.
12378         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12379
12380 2017-01-10  Tom Tromey  <tom@tromey.com>
12381
12382         * varobj.c (varobj_get_display_hint)
12383         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12384         (varobj_set_visualizer, free_variable): Use
12385         gdbpy_enter_varobj.
12386
12387 2017-01-10  Tom Tromey  <tom@tromey.com>
12388
12389         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12390         (do_finish_initialization): New function.  Use gdbpy_ref.
12391         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12392         do_finish_initialization.
12393
12394 2017-01-10  Tom Tromey  <tom@tromey.com>
12395
12396         * python/py-param.c (get_set_value, get_show_value): Use
12397         gdbpy_enter, gdbpy_ref.
12398
12399 2017-01-10  Tom Tromey  <tom@tromey.com>
12400
12401         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12402
12403 2017-01-10  Tom Tromey  <tom@tromey.com>
12404
12405         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12406
12407 2017-01-10  Tom Tromey  <tom@tromey.com>
12408
12409         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12410         Use gdbpy_enter_varobj.
12411
12412 2017-01-10  Tom Tromey  <tom@tromey.com>
12413
12414         * varobj.c (gdbpy_enter_varobj): New constructor.
12415         * python/python-internal.h (gdbpy_enter_varobj): New class.
12416         * python/py-varobj.c (py_varobj_get_iterator): Use
12417         gdbpy_enter_varobj.
12418
12419 2017-01-10  Tom Tromey  <tom@tromey.com>
12420
12421         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12422         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12423         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12424         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12425         unique_xmalloc_ptr.
12426         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12427
12428 2017-01-10  Tom Tromey  <tom@tromey.com>
12429
12430         * python/py-xmethods.c (invoke_match_method): Use
12431         gdbpy_ref.
12432
12433 2017-01-10  Tom Tromey  <tom@tromey.com>
12434
12435         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12436         gdbpy_enter, gdbpy_ref.
12437
12438 2017-01-10  Tom Tromey  <tom@tromey.com>
12439
12440         * python/python.c (python_interactive_command): Use gdbpy_enter.
12441
12442 2017-01-10  Tom Tromey  <tom@tromey.com>
12443
12444         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12445         gdbpy_ref.
12446
12447 2017-01-10  Tom Tromey  <tom@tromey.com>
12448
12449         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12450         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12451
12452 2017-01-10  Tom Tromey  <tom@tromey.com>
12453
12454         * utils.h (htab_deleter): New struct.
12455         (htab_up): New typedef.
12456         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12457         gdbpy_enter, gdbpy_ref, htab_up.
12458
12459 2017-01-10  Tom Tromey  <tom@tromey.com>
12460
12461         * python/py-unwind.c (pending_frame_invalidate): Remove.
12462         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12463
12464 2017-01-10  Tom Tromey  <tom@tromey.com>
12465
12466         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12467         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12468
12469 2017-01-10  Tom Tromey  <tom@tromey.com>
12470
12471         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12472
12473 2017-01-10  Tom Tromey  <tom@tromey.com>
12474
12475         * python/python.c (gdbpy_eval_from_control_command)
12476         (gdbpy_source_script, gdbpy_run_events)
12477         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12478         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12479         gdbpy_enter.
12480
12481 2017-01-10  Tom Tromey  <tom@tromey.com>
12482
12483         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12484
12485 2017-01-10  Tom Tromey  <tom@tromey.com>
12486
12487         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12488
12489 2017-01-10  Tom Tromey  <tom@tromey.com>
12490
12491         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12492         (python_on_inferior_call_pre, python_on_inferior_call_post)
12493         (python_on_memory_change, python_on_register_change)
12494         (python_inferior_exit, python_new_objfile, add_thread_object)
12495         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12496
12497 2017-01-10  Tom Tromey  <tom@tromey.com>
12498
12499         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12500         (bpfinishpy_handle_exit): Use gdbpy_enter.
12501
12502 2017-01-10  Tom Tromey  <tom@tromey.com>
12503
12504         * python/py-cmd.c (cmdpy_destroyer)
12505         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12506         gdbpy_enter.
12507
12508 2017-01-10  Tom Tromey  <tom@tromey.com>
12509
12510         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12511         gdbpy_enter.
12512         (gdbpy_breakpoint_has_cond): Likewise.
12513
12514 2017-01-10  Tom Tromey  <tom@tromey.com>
12515
12516         * python/python.c (gdbpy_enter): New constructor.
12517         (~gdbpy_enter): New destructor.
12518         (restore_python_env, ensure_python_env): Rewrite.
12519         * python/python-internal.h (gdbpy_enter): New class.
12520
12521 2017-01-10  Tom Tromey  <tom@tromey.com>
12522
12523         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12524
12525 2017-01-10  Tom Tromey  <tom@tromey.com>
12526
12527         * python/py-value.c (value_has_field, get_field_flag)
12528         (get_field_type, valpy_getitem, convert_value_from_python): Use
12529         gdbpy_ref.
12530
12531 2017-01-10  Tom Tromey  <tom@tromey.com>
12532
12533         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12534         gdbpy_ref.
12535
12536 2017-01-10  Tom Tromey  <tom@tromey.com>
12537
12538         * python/py-prettyprint.c (search_pp_list)
12539         (find_pretty_printer_from_objfiles)
12540         (find_pretty_printer_from_progspace)
12541         (find_pretty_printer_from_gdb, find_pretty_printer)
12542         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12543         gdbpy_ref.
12544
12545 2017-01-10  Tom Tromey  <tom@tromey.com>
12546
12547         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12548
12549 2017-01-10  Tom Tromey  <tom@tromey.com>
12550
12551         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12552         (ltpy_get_all_source_lines): Use gdbpy_ref.
12553
12554 2017-01-10  Tom Tromey  <tom@tromey.com>
12555
12556         * python/py-framefilter.c (extract_sym, extract_value)
12557         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12558         gdbpy_ref.
12559
12560 2017-01-10  Tom Tromey  <tom@tromey.com>
12561
12562         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12563
12564 2017-01-10  Tom Tromey  <tom@tromey.com>
12565
12566         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12567
12568 2017-01-10  Tom Tromey  <tom@tromey.com>
12569
12570         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12571         gdbpy_ref.
12572
12573 2017-01-10  Tom Tromey  <tom@tromey.com>
12574
12575         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12576
12577 2017-01-10  Tom Tromey  <tom@tromey.com>
12578
12579         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12580         (typy_range): Use gdbpy_ref.
12581
12582 2017-01-10  Tom Tromey  <tom@tromey.com>
12583
12584         * python/py-threadevent.c (create_thread_event_object): Use
12585         gdbpy_ref.
12586         * python/py-stopevent.c (create_stop_event_object): Simplify.
12587         (emit_stop_event): Use gdbpy_ref.
12588         * python/py-signalevent.c (create_signal_event_object): Use
12589         gdbpy_ref.
12590         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12591         (emit_new_objfile_event, create_clear_objfiles_event_object)
12592         (emit_clear_objfiles_event): Use gdbpy_ref.
12593         * python/py-infevents.c (create_inferior_call_event_object)
12594         (create_register_changed_event_object)
12595         (create_memory_changed_event_object, emit_inferior_call_event)
12596         (emit_memory_changed_event, emit_register_changed_event): Use
12597         gdbpy_ref.
12598         * python/py-exitedevent.c (create_exited_event_object)
12599         (emit_exited_event): Use gdbpy_ref.
12600         * python/py-event.h (evpy_emit_event): Remove
12601         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12602         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12603         * python/py-continueevent.c (emit_continue_event): Use
12604         gdbpy_ref.
12605         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12606         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12607         gdbpy_ref.
12608         * python/py-bpevent.c (create_breakpoint_event_object): Use
12609         gdbpy_ref.
12610
12611 2017-01-10  Tom Tromey  <tom@tromey.com>
12612
12613         * python/py-ref.h: New file.
12614
12615 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12616
12617         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12618         void.
12619         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12620         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12621         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12622         * ui-out.c (ui_out::redirect): Likewise.
12623         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12624         * cli/cli-logging.c (set_logging_redirect): Update call site of
12625         ui_out::redirect.
12626         (handle_redirections): Likewise.
12627         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12628         * top.c (execute_command_to_string): Likewise.
12629         * utils.c (do_ui_out_redirect_pop): Likewise.
12630
12631 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12632
12633         * stack.c (_initialize_stack): Update "frame" command help message.
12634
12635 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12636
12637         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12638
12639 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12640
12641         * x86-linux-nat.h: Include gdb_proc_service.h.
12642
12643 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12644
12645         * ser-base.h: Include serial.h.
12646
12647 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12648
12649         * ppc-linux-tdep.h: Include ppc-tdep.h.
12650
12651 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12652
12653         * nat/amd64-linux-siginfo.h: Include signal.h.
12654
12655 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12656
12657         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12658
12659 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12660
12661         * mi/mi-parse.h: Include mi-cmds.h.
12662
12663 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12664
12665         * inf-loop.c: Don't include "target.h".
12666         * inf-loop.h: Include it here.
12667
12668 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12669
12670         * dfp.h: Include "dboulest.h" and "expression.h".
12671
12672 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12673
12674         * ax-gdb.h: Include "ax.h".
12675
12676 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12677
12678         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12679         with nat/gdb_ptrace.h.
12680
12681 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12682
12683         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12684         new line.
12685         (mips64_fbsd_sigframe_init): Likewise.
12686
12687 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12688
12689         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12690         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12691
12692 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12693
12694         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12695         * NEWS: Mention new FreeBSD/mips native configuration.
12696         * config/mips/fbsd.mh: New file.
12697         * configure.host: Add mips*-*-freebsd*.
12698         * mips-fbsd-nat.c: New file.
12699
12700 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12701
12702         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12703         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12704         * NEWS: Mention new FreeBSD/mips target.
12705         * configure.tgt: Add mips*-*-freebsd*.
12706         * mips-fbsd-tdep.c: New file.
12707         * mips-fbsd-tdep.h: New file.
12708
12709 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12710
12711         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12712         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12713
12714 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12715
12716         Update copyright year range in all GDB files.
12717
12718 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12719
12720         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12721
12722 For older changes see ChangeLog-2016.
12723 \f
12724 Local Variables:
12725 mode: change-log
12726 left-margin: 8
12727 fill-column: 74
12728 version-control: never
12729 coding: utf-8
12730 End: