Eliminate catch_errors
[external/binutils.git] / gdb / ChangeLog
1 2017-10-10  Pedro Alves  <palves@redhat.com>
2             Tom Tromey  <tom@tromey.com>
3
4         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5         and reverse logic.
6         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
7         No longer macros.  Instead ...
8         (enum wp_check_result): They're now values of this new
9         enumeration.
10         (watchpoint_check): Change return type to wp_check_result and
11         parameter type to bpstat.
12         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
13         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
14         catch_errors.  Reverse logic of watchpoint_check call.
15         (breakpoint_re_set_one): Now returns void and takes a breakpoint
16         pointer as parameter.
17         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
18         * common/common-exceptions.c (throw_exception_sjlj): Update
19         comments to avoid mentioning catch_errors.
20         * exceptions.c (catch_errors): Delete.
21         * exceptions.h: Update comments to avoid mentioning catch_errors.
22         (catch_errors_ftype, catch_errors): Delete.
23         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
24         (hook_stop_stub): Delete.
25         (restore_selected_frame): Change return type to void, and
26         parameter type to const frame_id &.
27         (restore_infcall_control_state): Use TRY/CATCH instead of
28         catch_errors.
29         * main.c (captured_command_loop): Return void and remove
30         parameter.  Remove references to catch_errors.
31         (captured_main): Use TRY/CATCH instead of catch_errors.
32         * objc-lang.c (objc_submethod_helper_data)
33         (find_objc_msgcall_submethod_helper): Delete.
34         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
35         catch_errors.
36         * record-full.c (record_full_message): Return void.
37         (record_full_message_args, record_full_message_wrapper): Delete.
38         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
39         instead of catch_errors.
40         * solib-aix.c (solib_aix_open_symbol_file_object): Change
41         parameter type to int.
42         * solib-darwin.c (open_symbol_file_object): Ditto.
43         * solib-dsbt.c (open_symbol_file_object): Ditto.
44         * solib-frv.c (open_symbol_file_object): Ditto.
45         * solib-svr4.c (open_symbol_file_object): Ditto.
46         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
47         * solib.c (update_solib_list): Use TRY/CATCH instead of
48         catch_errors.
49         * solist.h (struct target_so_ops) <open_symbol_file_object>:
50         Change type.
51         * symmisc.c (struct print_symbol_args): Remove.
52         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
53         (print_symbol): Change type.
54         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
55         and remove parameters.
56         (catch_errors): New.
57         (get_windows_debug_event): Adjust.
58
59 2017-10-09  Tom Tromey  <tom@tromey.com>
60
61         * mi/mi-main.c (free_splay_tree): Remove.
62         (list_available_thread_groups): Use splay_tree_up.
63         * common/gdb_splay_tree.h: New file.
64
65 2017-10-09  Tom Tromey  <tom@tromey.com>
66
67         * mi/mi-main.c (do_nothing): Remove.
68         (list_available_thread_groups): Update.
69
70 2017-10-09  Pedro Alves  <palves@redhat.com>
71
72         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
73         reading registers when switching context.
74
75 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
76
77         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
78         (fbsd_convert_siginfo): Likewise.
79         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
80
81 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
82
83         * configure.ac (try_guile_versions): Remove guile-2.2.
84         * configure: Regenerate.
85
86 2017-10-09  Tom Tromey  <tom@tromey.com>
87
88         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
89         (COMPILE.pre): Use $(CXX).
90
91 2017-10-09  Pedro Alves  <palves@redhat.com>
92
93         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
94         Use bool.
95         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
96         * cp-support.h (cp_remove_params): Now returns a
97         gdb::unique_xmalloc_ptr.
98         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
99         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
100         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
101         returning a gdb::unique_xmalloc_ptr.
102         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
103         * stack.c (find_frame_funname): Adjust to cp_remove_params
104         returning a gdb::unique_xmalloc_ptr.
105
106 2017-10-08  Tom Tromey  <tom@tromey.com>
107
108         * dwarf2read.c (dwarf2_get_dwz_file): Use
109         gdb::unique_xmalloc_ptr.
110         (find_slot_in_mapped_hash): Likewise.
111         (dwarf2_physname): Likewise.
112         (create_dwo_unit_in_dwp_v1): Use std::string.
113         (create_dwo_unit_in_dwp_v2): Likewise.
114         (lookup_dwo_cutu): Likewise.
115         (inherit_abstract_dies): Use std::vector.
116         (read_array_type): Likewise.
117         (dwarf_decode_macros): Remove unused declaration.
118         (unsigned_int_compar): Remove.
119         (dwarf2_build_psymtabs_hard): Use scoped_restore.
120         (psymtabs_addrmap_cleanup): Remove.
121
122 2017-10-08  Tom Tromey  <tom@tromey.com>
123
124         * frame-unwind.c (frame_unwind_try_unwinder): Update.
125         * frame.h (frame_cleanup_after_sniffer): Declare.
126         (frame_prepare_for_sniffer): Return void.
127         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
128         type of argument.
129         (frame_prepare_for_sniffer): Return void.
130
131 2017-10-08  Tom Tromey  <tom@tromey.com>
132
133         * utils.h (make_cleanup_value_free): Remove.
134         * utils.c (do_value_free, struct cleanup): Remove.
135         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
136         Use gdb_value_up.
137         * value.h (struct value_deleter): New.
138         (gdb_value_up): New typedef.
139
140 2017-10-08  Tom Tromey  <tom@tromey.com>
141
142         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
143         (make_cleanup_free_search_symbols): Remove.
144         (search_symbols): Return std::vector.
145         (symbol_search::compare_search_syms): Now member of
146         symbol_search.  Change arguments.
147         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
148         (symtab_symbol_info, rbreak_command): Update.
149         * symtab.h (struct symbol_search) <next>: Remove.
150         Add constructors.
151         (symbol_search::operator<): New function.
152         (symbol_search::operator==): New function.
153         (search_symbols): Remove std::vector.
154         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
155         (symbol_search::compare_search_syms): Declare.
156
157 2017-10-06  Yao Qi  <yao.qi@linaro.org>
158
159         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
160         arch/aarch64-insn.o.
161         Remove one rule.
162         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
163
164 2017-10-06  Yao Qi  <yao.qi@linaro.org>
165
166         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
167         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
168         arch/arm-linux.o respectively.
169         * configure.tgt: Likewise.
170
171 2017-10-06  Yao Qi  <yao.qi@linaro.org>
172
173         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
174         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
175
176 2017-10-06  Pedro Alves  <palves@redhat.com>
177
178         * windows-nat.c: Include <algorithm>.
179
180 2017-10-06  Yao Qi  <yao.qi@linaro.org>
181
182         * configure.tgt (i386_tobjs): New variable.
183         (amd64_tobjs): New variable.
184         Set $cpu_obs and $os_obs.
185
186 2017-10-06  Yao Qi  <yao.qi@linaro.org>
187
188         * Makefile.in (CONFIG_SRC_SUBDIR): New.
189         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
190         (clean): Remove object files and dependency files.
191         (distclean): Remove the directory.
192         * configure.ac: Invoke AC_CONFIG_COMMANDS.
193         * configure: Re-generated.
194         * configure.tgt: Replace amd64.o with arch/amd64.o.
195
196 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
197
198         PR build/22188
199         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
200         and SETEND.
201
202 2017-10-05  Pedro Alves  <palves@redhat.com>
203
204         * linux-nat.c (linux_child_follow_fork): When following the parent
205         and detaching the child, consult the parent thread's architecture
206         instead of the child's.
207
208 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
209
210         * ax.h: Do not include "doublest.h".
211         (union agent_val): Remove.
212
213 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
214
215         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
216         (decimal_to_string): Return std::string object.
217         (decimal_from_string): Accept std::string object.  Return bool.
218         (decimal_from_integral, decimal_from_doublest): Remove.
219         (decimal_from_longest): Add prototype.
220         (decimal_from_ulongest): Likewise.
221         (decimal_to_longest): Likewise.
222         (decimal_from_doublest): Likewise.
223         * dfp.c: Do not include "gdbtypes.h" or "value.h".
224         (MAX_DECIMAL_STRING): Move here.
225         (decimal_to_string): Return std::string object.
226         (decimal_from_string): Accept std::string object.  Return bool.
227         (decimal_from_integral): Remove, replace by ...
228         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
229         (decimal_to_longest): New function.
230         (decimal_from_floating): Remove, replace by ...
231         (decimal_from_doublest): ... this new function.
232         (decimal_to_doublest): Update to new decimal_to_string interface.
233
234         * value.c (unpack_long): Use decimal_to_longest.
235         * valops.c (value_cast): Use decimal_from_doublest instead of
236         decimal_from_floating.  Use decimal_from_[u]longest isntead of
237         decimal_from_integral.
238         * valarith.c (value_args_as_decimal): Likewise.
239         * valprint.c (print_decimal_floating): Update to new
240         decimal_to_string interface.
241         * printcmd.c (printf_decfloat): Likewise.
242         * c-exp.y (parse_number): Update to new decimal_from_string interface.
243
244 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
245
246         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
247         * gdbtypes.c: Include "floatformat.h".
248         * value.c: Likewise.
249         * m68k-tdep.c: Likewise.
250
251         * findvar.c: Do not include "floatformat.h".
252         * amd64-darwin-tdep.c: Likewise.
253         * arm-linux-tdep.c: Likewise.
254         * i386-darwin-tdep.c: Likewise.
255         * i387-tdep.c: Likewise.
256         * m68k-linux-tdep.c: Likewise.
257         * mep-tdep.c: Likewise.
258         * mips-tdep.c: Likewise.
259         * nios2-tdep.c: Likewise.
260         * s390-linux-tdep.c: Likewise.
261         * sparc-obsd-tdep.c: Likewise.
262         * sparc-tdep.c: Likewise.
263         * sparc64-tdep.c: Likewise.
264         * spu-tdep.c: Likewise.
265         * tic6x-tdep.c: Likewise.
266         * tilegx-tdep.c: Likewise.
267         * vax-tdep.c: Likewise.
268         * xstormy16-tdep.c: Likewise.
269         * xtensa-tdep.c: Likewise.
270
271         * top.c: Do not include "doublest.h".
272         * aarch64-tdep.c: Likewise.
273         * alpha-tdep.c: Likewise.
274         * arm-linux-tdep.c: Likewise.
275         * m68k-linux-tdep.c: Likewise.
276         * tilegx-tdep.c: Likewise.
277         * xstormy16-tdep.c: Likewise.
278
279 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
280
281         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
282         (mipsn32_fbsd_sigframe): Define.
283         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
284         for FreeBSD/mipsn32.
285
286 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
287
288         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
289         AT_HWCAP.
290
291 2017-10-05  Tristan Gingold  <tgingold@free.fr>
292
293         * MAINTAINERS (Misc): Update my email address.
294
295 2017-10-04  Pedro Alves  <palves@redhat.com>
296
297         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
298         it instead of target_gdbarch.
299         (get_remote_state, get_remote_packet_size): Adjust
300         get_remote_arch_state calls, passing down target_gdbarch
301         explicitly.
302         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
303         'gdbarch' and use it instead of target_gdbarch.
304         (get_memory_packet_size): Adjust get_remote_arch_state calls,
305         passing down target_gdbarch explicitly.
306         (struct stop_reply) <arch>: New field.
307         (remote_parse_stop_reply): Use the stopped thread's architecture,
308         not the current inferior's.  Save the architecture in the
309         stop_reply.
310         (process_stop_reply): Use the stop reply's architecture.
311         (process_g_packet, remote_fetch_registers)
312         (remote_prepare_to_store, store_registers_using_G)
313         (remote_store_registers): Adjust get_remote_arch_state calls,
314         using the regcache's architecture.
315         (remote_get_trace_status): Adjust get_remote_arch_state calls,
316         passing down target_gdbarch explicitly.
317         * spu-multiarch.c (spu_thread_architecture): Defer to the target
318         beneath instead of calling target_gdbarch.
319         * target.c (default_thread_architecture): Use the specified
320         inferior's architecture, instead of the current inferior's
321         architecture (via target_gdbarch).
322
323 2017-10-04  Pedro Alves  <palves@redhat.com>
324
325         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
326         case.
327         (regcache_print): Handle !target_has_registers here instead.
328
329 2017-10-04  Pedro Alves  <palves@redhat.com>
330
331         * frame.c (create_test_frame): Delete.
332         * frame.h (create_test_frame): Delete.
333         * gdbarch-selftests.c: Include gdbthread.h and target.h.
334         (class regcache_test): Delete.
335         (test_target_has_registers, test_target_has_stack)
336         (test_target_has_memory, test_target_prepare_to_store)
337         (test_target_store_registers): New functions.
338         (test_target_ops): New class.
339         (register_to_value_test): Error out if there's already a
340         process_stratum (or higher) target pushed.  Create a fuller mock
341         environment, with mock target_ops, inferior, address space, thread
342         and inferior_ptid.
343         * progspace.c (struct address_space): Move to ...
344         * progspace.h (struct address_space): ... here.
345         * regcache.h (regcache::~regcache, regcache::raw_write)
346         [GDB_SELF_TEST]: No longer virtual.
347
348 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
349
350         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
351
352 2017-10-04  Pedro Alves  <palves@redhat.com>
353
354         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
355         out of 'between TRY and CATCH'.
356
357 2017-10-04  Pedro Alves  <palves@redhat.com>
358
359         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
360         * common/common-exceptions.h (TRY): Open an outermost scope.
361         Expand intro comment.
362         (CATCH): Reindent.
363         (END_CATCH): Close the outermost scope.
364         * completer.c (complete_line_internal): Add missing END_CATCH.
365
366 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
367
368         * NEWS (Changes since GDB 8.0): Add entry about new
369         'set-cwd-on-gdbserver' feature.
370         (New remote packets): Add entry for QSetWorkingDir.
371         * common/common-inferior.h (set_inferior_cwd): New prototype.
372         * infcmd.c (set_inferior_cwd): Remove "static".
373         (show_cwd_command): Expand text to include remote debugging.
374         * remote.c: Add PACKET_QSetWorkingDir.
375         (remote_protocol_features) <QSetWorkingDir>: New entry for
376         PACKET_QSetWorkingDir.
377         (extended_remote_set_inferior_cwd): New function.
378         (extended_remote_create_inferior): Call
379         "extended_remote_set_inferior_cwd".
380         (_initialize_remote): Call "add_packet_config_cmd" for
381         QSetWorkingDir.
382
383 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
384
385         * NEWS (New commands): Mention "set/show cwd".
386         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
387         "cd" command's help text.
388         * common/common-inferior.h (get_inferior_cwd): New prototype.
389         * infcmd.c (inferior_cwd_scratch): New global variable.
390         (set_inferior_cwd): New function.
391         (get_inferior_cwd): Likewise.
392         (set_cwd_command): Likewise.
393         (show_cwd_command): Likewise.
394         (_initialize_infcmd): Add "set/show cwd" commands.
395         * inferior.h (class inferior) <cwd>: New field.
396         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
397         (fork_inferior): Change inferior's cwd before its execution.
398         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
399         to CreateProcess.
400
401 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
402
403         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
404         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
405         (COMMON_OBS): Add gdb_tilde_expand.o.
406         * common/gdb_tilde_expand.c: New file.
407         * common/gdb_tilde_expand.h: Likewise.
408
409 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
410
411         * gdbarch.sh (objfile): Remove duplicate declaration.
412         * gdbarch.h: Regenerate.
413
414 2017-10-03  Tom Tromey  <tom@tromey.com>
415
416         * utils.c (internal_vproblem): Use string_vprintf.
417
418 2017-10-03  Tom Tromey  <tom@tromey.com>
419
420         * printcmd.c (info_symbol_command): Use std::string.
421
422 2017-10-03  Tom Tromey  <tom@tromey.com>
423
424         * top.c (gdb_safe_append_history): Use std::string.
425
426 2017-10-03  Tom Tromey  <tom@tromey.com>
427
428         * event-top.c (stdin_event_handler): Update.
429         * main.c (captured_main_1): Update.
430         * top.h (make_delete_ui_cleanup): Remove.
431         (struct ui): Add constructor and destructor.
432         (new_ui, delete_ui): Remove.
433         * top.c (make_delete_ui_cleanup): Remove.
434         (new_ui_command): Use std::unique_ptr.
435         (delete_ui_cleanup): Remove.
436         (ui::ui): Rename from new_ui.  Update.
437         (free_ui): Remove.
438         (ui::~ui): Rename from delete_ui.  Update.
439
440 2017-10-03  Tom Tromey  <tom@tromey.com>
441
442         * symfile.c (load_progress): Use gdb::byte_vector.
443
444 2017-10-03  Tom Tromey  <tom@tromey.com>
445
446         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
447         declaration.
448         * printcmd.c (x_command): Remove unused declaration.
449         * symfile.c (symbol_file_command): Remove unused declaration.
450
451 2017-10-03  Tom Tromey  <tom@tromey.com>
452
453         * utils.c (internal_vproblem): Use std::string.
454         (defaulted_query): Likewise.
455
456 2017-10-03  Tom Tromey  <tom@tromey.com>
457
458         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
459         * top.c (execute_command_to_string): Update.
460         * utils.c (make_cleanup_restore_page_info): Remove.
461         (do_restore_page_info_cleanup): Remove.
462         (set_batch_flag_and_restore_page_info):
463         New.
464         (make_cleanup_restore_page_info): Remove.
465         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
466         (~set_batch_flag_and_restore_page_info): New
467         (make_cleanup_restore_uinteger): Remove.
468         (make_cleanup_restore_integer): Remove.
469         (struct restore_integer_closure): Remove.
470         (restore_integer): Remove.
471         * utils.h (struct set_batch_flag_and_restore_page_info): New
472         class.
473         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
474         (make_cleanup_restore_page_info): Remove.
475         (make_cleanup_restore_uinteger) Remove.
476         (make_cleanup_restore_integer) Remove.
477
478 2017-10-03  Tom Tromey  <tom@tromey.com>
479
480         * record-full.h (record_full_gdb_operation_disable_set): Return
481         scoped_restore_tmpl<int>.
482         * infrun.c (adjust_pc_after_break): Update.
483         (handle_signal_stop): Update.
484         * record-full.c (record_full_gdb_operation_disable_set): Return
485         scoped_restore_tmpl<int>.
486         (record_full_wait_1, record_full_insert_breakpoint)
487         (record_full_remove_breakpoint, record_full_save)
488         (record_full_goto_insn): Update.
489
490 2017-10-02  Tom Tromey  <tom@tromey.com>
491
492         PR rust/22236:
493         * rust-lang.c (rust_val_print_str): New function.
494         (val_print_struct): Call it.
495         (rust_subscript): Preserve name of slice type.
496
497 2017-10-02  Tom Tromey  <tom@tromey.com>
498
499         * rust-lang.c (rust_subscript): Handle slices in
500         EVAL_AVOID_SIDE_EFFECTS case.
501
502 2017-10-02  Tom Tromey  <tom@tromey.com>
503
504         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
505
506 2017-10-02  Tom Tromey  <tom@tromey.com>
507
508         * rust-lang.h (rust_slice_type): Add "extern".
509
510 2017-10-02  Tom Tromey  <tom@tromey.com>
511             Pedro Alves  <palves@redhat.com>
512
513         * ada-lang.h (ada_exc_info::operator<): Make const.
514         (ada_exc_info::operator==): Make const.
515         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
516         Make const.
517
518 2017-09-29  Tom Tromey  <tom@tromey.com>
519
520         * target.c (read_whatever_is_readable): Change type of "result".
521         Update.
522         (free_memory_read_result_vector): Remove.
523         (read_memory_robust): Change return type.  Update.
524         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
525         bin2hex, std::string.
526         * target.h (memory_read_result_s): Remove typedef.
527         (free_memory_read_result_vector): Remove.
528         (read_memory_robust): Return std::vector.
529
530 2017-09-29  Tom Tromey  <tom@tromey.com>
531
532         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
533
534 2017-09-29  Tom Tromey  <tom@tromey.com>
535
536         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
537         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
538         operator< and operator==.
539         (ada_exceptions_list): Return a std::vector.
540         * ada-lang.c (ada_exc_info::operator<): Rename from
541         compare_ada_exception_info.
542         (ada_exc_info::operator==): New.
543         (sort_remove_dups_ada_exceptions_list): Change type of
544         "exceptions".
545         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
546         (ada_add_global_exceptions): Likewise.
547         (ada_exceptions_list_1): Return a std::vector.
548         (ada_exceptions_list): Likewise.
549
550 2017-09-29  Tom Tromey  <tom@tromey.com>
551
552         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
553         'std::set *'.
554         (print_one_inferior): Update.
555         (free_vector_of_ints): Remove.
556         (list_available_thread_groups): Change "ids" to std::set.
557         (mi_cmd_list_thread_groups): Update.
558         (struct collect_cores_data) <core>: Now a std::set.
559         (collect_cores): Update.
560         (unique): Remove.
561         (print_one_inferior): Update.
562
563 2017-09-29  Tom Tromey  <tom@tromey.com>
564
565         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
566         (mi_execute_async_cli_command): Likewise.
567         (mi_cmd_trace_frame_collected): Use field_fmt.
568
569 2017-09-29  Tom Tromey  <tom@tromey.com>
570
571         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
572         gdb::byte_vector.
573
574 2017-09-29  Tom Tromey  <tom@tromey.com>
575
576         * mi/mi-parse.c (mi_parse): Remove unused declaration.
577
578 2017-09-29  Tom Tromey  <tom@tromey.com>
579
580         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
581
582 2017-09-29  Tom Tromey  <tom@tromey.com>
583
584         * varobj.h (varobj_gen_name): Return std::string.
585         * varobj.c (varobj_gen_name): Return std::string.
586         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
587         (mi_cmd_var_delete): Don't copy "name".
588
589 2017-09-29  Tom Tromey  <tom@tromey.com>
590
591         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
592         (mi_cmd_break_insert_1): Update.
593
594 2017-09-29  Tom Tromey  <tom@tromey.com>
595
596         * target.h (make_scoped_defer_target_commit_resume): Update.
597         * target.c (make_scoped_defer_target_commit_resume): Rename from
598         make_cleanup_defer_target_commit_resume.  Return a
599         scoped_restore.
600         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
601
602 2017-09-29  Tom Tromey  <tom@tromey.com>
603
604         * main.c (captured_main_1): Remove unused declaration.
605         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
606
607 2017-09-29  Tom Tromey  <tom@tromey.com>
608
609         * symtab.c (search_symbols): Remove unused outer cleanup.
610         (make_source_files_completion_list): Remove unused declaration.
611
612 2017-09-29  Tom Tromey  <tom@tromey.com>
613
614         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
615
616 2017-09-29  Tom Tromey  <tom@tromey.com>
617
618         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
619         gdb::byte_vector.
620
621 2017-09-29  Tom Tromey  <tom@tromey.com>
622
623         * complaints.c (vcomplaint): Use std::string.
624
625 2017-09-29  Tom Tromey  <tom@tromey.com>
626
627         * tracepoint.c (trace_variable_command): Use std::string.
628         (encode_actions_1): Remove unused declarations.
629         (create_tsv_from_upload): Use std::string.
630
631 2017-09-29  Tom Tromey  <tom@tromey.com>
632
633         * cp-support.c (gdb_demangle): Use std::string.
634
635 2017-09-29  Tom Tromey  <tom@tromey.com>
636
637         * stack.c (parse_frame_specification): Use std::string
638         (info_frame_command): Use gdb::unique_xmalloc_ptr.
639
640 2017-09-29  Tom Tromey  <tom@tromey.com>
641
642         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
643
644 2017-09-29  Tom Tromey  <tom@tromey.com>
645
646         * utils.c (vfprintf_maybe_filtered): Use std::string.
647         (vfprintf_unfiltered): Likewise.
648
649 2017-09-29  Tom Tromey  <tom@tromey.com>
650
651         * event-top.c (top_level_prompt): Return std::string.
652         (display_gdb_prompt): Update.
653
654 2017-09-29  Tom Tromey  <tom@tromey.com>
655
656         * unittests/common-utils-selftests.c (format): New function.
657         (string_vprintf_tests): New function.
658         (_initialize_common_utils_selftests): Register new tests.
659         * common/common-utils.c (string_vprintf): New function.
660         * common/common-utils.h (string_vprintf): Declare.
661
662 2017-09-29  Pedro Alves  <palves@redhat.com>
663
664         * common/rsp-low.c (unpack_varlen_hex): Constify.
665         * common/rsp-low.h (unpack_varlen_hex): Constify.
666         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
667         Constify.
668         * remote.c (remote_set_permissions, read_ptid)
669         (remote_current_thread, remote_get_threads_with_qthreadinfo)
670         (remote_static_tracepoint_marker_at)
671         (remote_static_tracepoint_markers_by_strid)
672         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
673         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
674         (parse_tracepoint_definition, parse_tsv_definition)
675         (parse_static_tracepoint_marker_definition): Constify.
676         * tracepoint.h (parse_static_tracepoint_marker_definition)
677         (parse_trace_status, parse_tracepoint_status)
678         (parse_tracepoint_definition, parse_tsv_definition): Constify.
679
680 2017-09-29  Pedro Alves  <palves@redhat.com>
681
682         * remote.c (target_buf, target_buf_size): Delete.
683         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
684         Use the connection's packet buffer instead.
685         All callers adjusted.
686         (_initialize_remote): Remove references to target_buf and
687         target_buf_size.
688
689 2017-09-28  Pedro Alves  <palves@redhat.com>
690
691         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
692         unittests/common-utils-selftests.c.
693         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
694         (COMMON_OBS): Remove utils-selftests.o.
695         * utils-selftests.c: Move to ...
696         * unittests/common-utils-selftests.c: ... here and rename self
697         test to "string_printf".
698
699 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
700
701         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
702         having NULL cus or tus.
703
704 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
705
706         * arm-tdep.c: (convert_from_extended): Remove.
707         (convert_to_extended): Likewise.
708         (arm_extract_return_value): Use convert_typed_floating.
709         (arm_store_return_value): Likewise.
710
711         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
712         * sh-tdep.c: Do not include "floatformat.h".
713         (sh_littlebyte_bigword_type): New function.
714         (sh_register_convert_to_virtual): Use convert_typed_floating.
715         (sh_register_convert_to_raw): Likewise.
716         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
717         (sh64_littlebyte_bigword_type): New function.
718         (sh64_extract_return_value): Use convert_typed_floating.
719         (sh64_register_convert_to_virtual): Likewise.
720         (sh64_register_convert_to_raw): Likewise.
721
722 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
723
724         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
725         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
726
727         * gdbtypes.h (union type_specific): Make field floatformat hold
728         just a single struct floatformat, not an array.
729         (floatformat_from_type): Move here.
730         * gdbtypes.c (floatformat_from_type): Move here.  Update to
731         changed TYPE_FLOATFORMAT definition.
732         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
733         (recursive_dump_type): Likewise.
734         (init_float_type): Install correct floatformat for byte order.
735         (arch_float_type): Likewise.
736
737 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
738
739         * gdbtypes.c (init_type): Change incoming argument from
740         length-in-bytes to length-in-bits.  Assert length is a
741         multiple of TARGET_CHAR_BITS.
742         (arch_type, arch_flags_type): Likewise.
743         (init_integer_type): Update call to init_type.
744         (init_character_type): Likewise.
745         (init_boolean_type): Likewise.
746         (init_float_type): Likewise.
747         (init_decfloat_type): Likewise.
748         (init_complex_type): Likewise.
749         (init_pointer_type): Likewise.
750         (objfile_type): Likewise.
751         (arch_integer_type): Update call to arch_type.
752         (arch_character_type): Likewise.
753         (arch_boolean_type): Likewise.
754         (arch_float_type): Likewise.
755         (arch_decfloat_type): Likewise.
756         (arch_complex_type): Likewise.
757         (arch_pointer_type): Likewise.
758         (gdbtypes_post_init): Likewise.
759
760         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
761         (read_base_type): Likewise.
762         * mdebugread.c (basic_type): Likewise.
763         * stabsread.c (dbx_init_float_type): Likewise.
764         (rs6000_builtin_type): Likewise.
765         (read_range_type): Likewise.  Also, fix call to init_integer_type
766         with erroneous length argument.
767
768         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
769         * d-lang.c (build_d_types): Likewise.
770         * f-lang.c (build_fortran_types): Likewise.
771         * go-lang.c (build_go_types): Likewise.
772         * opencl-lang.c (build_opencl_types): Likewise.
773         * jit.c (finalize_symtab): Likewise.
774         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
775         (build_std_type_info_type): Likewise.
776         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
777         update call to arch_flags_type.
778
779         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
780         arch_type.
781         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
782         * windows-tdep.c (windows_get_tlb_type): Likewise.
783
784         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
785         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
786         * m32c-tdep.c (make_types): Likewise.
787         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
788         (rl78_psw_type): Update call to arch_flags_type.
789         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
790         * rx-tdep.c (rx_psw_type): Likewise.
791         (rx_fpsw_type): Likewise.
792         * sparc-tdep.c (sparc_psr_type): Likewise.
793         (sparc_fsr_type): Likewise.
794         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
795         (sparc64_ccr_type): Likewise.
796         (sparc64_fsr_type): Likewise.
797         (sparc64_fprs_type): Likewise.
798
799 2017-09-27  Tom Tromey  <tom@tromey.com>
800
801         * findcmd.c (find_command): Constify.
802
803 2017-09-27  Tom Tromey  <tom@tromey.com>
804
805         * ada-tasks.c (task_command_1, task_command): Constify.
806
807 2017-09-27  Tom Tromey  <tom@tromey.com>
808
809         * symtab.c (maintenance_print_symbol_cache)
810         (maintenance_flush_symbol_cache)
811         (maintenance_print_symbol_cache_statistics): Constify.
812
813 2017-09-27  Tom Tromey  <tom@tromey.com>
814
815         * inferior.c (detach_inferior_command, kill_inferior_command)
816         (inferior_command): Constify.
817
818 2017-09-27  Tom Tromey  <tom@tromey.com>
819
820         * regcache.c (regcache_print, maintenance_print_registers)
821         (maintenance_print_raw_registers)
822         (maintenance_print_cooked_registers)
823         (maintenance_print_register_groups)
824         (maintenance_print_remote_registers): Constify.
825
826 2017-09-27  Tom Tromey  <tom@tromey.com>
827
828         * printcmd.c (map_display_numbers, undisplay_command)
829         (enable_disable_display_command, enable_display_command)
830         (disable_display_command): Constify.
831
832 2017-09-27  Tom Tromey  <tom@tromey.com>
833
834         * breakpoint.h (delete_command): Don't declare.
835         * breakpoint.c (delete_command, enable_once_command)
836         (enable_count_command, enable_delete_command, breakpoint_1)
837         (maintenance_info_breakpoints, stopin_command, stopat_command)
838         (delete_command, delete_trace_command, save_breakpoints)
839         (save_breakpoints_command, save_tracepoints_command): Constify.
840
841 2017-09-27  Tom Tromey  <tom@tromey.com>
842
843         * macrocmd.c (macro_expand_command, macro_expand_once_command)
844         (skip_ws, extract_identifier, macro_define_command)
845         (macro_undef_command, macro_list_command): Constify.
846
847 2017-09-27  Tom Tromey  <tom@tromey.com>
848
849         * infcmd.c (environment_info, set_environment_command)
850         (unset_environment_command, path_info, info_proc_cmd_1)
851         (info_proc_cmd_mappings, info_proc_cmd_stat)
852         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
853         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
854
855 2017-09-27  Tom Tromey  <tom@tromey.com>
856
857         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
858         Constify.
859
860 2017-09-27  Tom Tromey  <tom@tromey.com>
861
862         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
863
864 2017-09-27  Tom Tromey  <tom@tromey.com>
865
866         * demangle.c (demangle_command): Constify.
867
868 2017-09-27  Tom Tromey  <tom@tromey.com>
869
870         * progspace.c (maintenance_info_program_spaces_command):
871         Constify.
872
873 2017-09-27  Tom Tromey  <tom@tromey.com>
874
875         * compile/compile.c (check_raw_argument, compile_file_command)
876         (compile_code_command, compile_print_command): Constify.
877
878 2017-09-27  Tom Tromey  <tom@tromey.com>
879
880         * reggroups.c (maintenance_print_reggroups): Constify.
881
882 2017-09-27  Tom Tromey  <tom@tromey.com>
883
884         * dwarf2read.c (save_gdb_index_command): Constify.
885
886 2017-09-27  Tom Tromey  <tom@tromey.com>
887
888         * stap-probe.c (info_probes_stap_command): Constify.
889
890 2017-09-27  Tom Tromey  <tom@tromey.com>
891
892         * fork-child.c (unset_exec_wrapper_command): Constify.
893
894 2017-09-27  Tom Tromey  <tom@tromey.com>
895
896         * btrace.c (get_uint, get_context_size, no_chunk)
897         (maint_btrace_packet_history_cmd)
898         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
899         (maint_info_btrace_cmd): Constify.
900
901 2017-09-27  Tom Tromey  <tom@tromey.com>
902
903         * reverse.c (delete_bookmark_command): Constify.
904
905 2017-09-27  Tom Tromey  <tom@tromey.com>
906
907         * remote.c (set_memory_packet_size)
908         (set_memory_write_packet_size, show_memory_write_packet_size)
909         (set_memory_read_packet_size, show_memory_read_packet_size)
910         (compare_sections_command, packet_command, remote_put_command)
911         (remote_get_command, remote_delete_command): Constify.
912
913 2017-09-27  Tom Tromey  <tom@tromey.com>
914
915         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
916         (set_mipsfpu_double_command, set_mipsfpu_none_command)
917         (set_mipsfpu_auto_command): Constify.
918
919 2017-09-27  Tom Tromey  <tom@tromey.com>
920
921         * cli/cli-cmds.h (cd_command): Constify.
922         * cli/cli-cmds.c (cd_command): Constify.
923
924 2017-09-27  Tom Tromey  <tom@tromey.com>
925
926         * thread.c (thread_name_command, thread_find_command): Constify.
927
928 2017-09-27  Tom Tromey  <tom@tromey.com>
929
930         * probe.c (enable_probes_command, disable_probes_command):
931         Constify.
932
933 2017-09-27  Tom Tromey  <tom@tromey.com>
934
935         * symfile.c (symbol_file_command): Constify.
936         * gdbcore.h (deprecated_file_changed_hook): Constify.
937         * exec.c (deprecated_file_changed_hook, exec_file_command)
938         (file_command): Constify.
939         * defs.h (symbol_file_command): Constify.
940
941 2017-09-27  Tom Tromey  <tom@tromey.com>
942
943         * remote-fileio.c (set_system_call_allowed)
944         (show_system_call_allowed): Constify.
945
946 2017-09-27  Tom Tromey  <tom@tromey.com>
947
948         * tracepoint.c (delete_trace_variable_command)
949         (tfind_end_command, tfind_start_command, tfind_pc_command)
950         (tfind_tracepoint_command, tfind_line_command)
951         (tfind_range_command, tfind_outside_command): Constify.
952
953 2017-09-27  Tom Tromey  <tom@tromey.com>
954
955         * ax-gdb.c (maint_agent_printf_command, agent_command)
956         (agent_eval_command): Constify.
957
958 2017-09-27  Tom Tromey  <tom@tromey.com>
959
960         * tracepoint.c (info_scope_command): Constify.
961         * python/python.c (gdbpy_decode_line): Constify.
962         * python/py-breakpoint.c (bppy_init): Constify.
963         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
964         * location.h: (new_linespec_location)
965         (string_to_event_location_basic, string_to_event_location):
966         Constify.
967         * location.c (new_linespec_location)
968         (string_to_event_location_basic, string_to_event_location):
969         Constify.
970         * linespec.h (decode_line_with_current_source)
971         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
972         * linespec.c (linespec_lex_to_end)
973         (decode_line_with_current_source)
974         (decode_line_with_last_displayed): Constify.
975         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
976         Constify.
977         * cli/cli-cmds.c (edit_command, list_command): Constify.
978         * breakpoint.h (until_break_command, watch_command_wrapper)
979         (awatch_command_wrapper, rwatch_command_wrapper)
980         (init_ada_exception_breakpoint): Constify.
981         * breakpoint.c (break_command_1, dprintf_command)
982         (break_range_command, watch_command_wrapper)
983         (rwatch_command_wrapper, awatch_command_wrapper)
984         (until_break_command, init_ada_exception_breakpoint)
985         (strace_marker_create_sals_from_location, trace_command)
986         (ftrace_command, strace_command, struct tracepoint): Constify.
987         * ax-gdb.c (agent_command_1): Constify.
988         * ada-lang.c (ada_exception_sal): Constify.
989
990 2017-09-27  Tom Tromey  <tom@tromey.com>
991
992         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
993         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
994         (get_context_size, no_chunk, get_insn_history_modifiers)
995         (cmd_record_insn_history, get_call_history_modifiers)
996         (cmd_record_call_history): Constify.
997
998 2017-09-27  Tom Tromey  <tom@tromey.com>
999
1000         * source.c (show_substitute_path_command)
1001         (unset_substitute_path_command, set_substitute_path_command):
1002         Constify.
1003
1004 2017-09-27  Tom Tromey  <tom@tromey.com>
1005
1006         * typeprint.c (maintenance_print_type): Constify.
1007         * maint.c (maintenance_dump_me, maintenance_demangle)
1008         (maintenance_time_display, maintenance_info_sections)
1009         (maintenance_print_statistics, maintenance_deprecate)
1010         (maintenance_undeprecate): Constify.
1011         (maintenance_do_deprecate): Constify.  Use std::string.
1012         (maintenance_selftest): Constify.
1013         * gdbtypes.h (maintenance_print_type): Constify.
1014
1015 2017-09-27  Tom Tromey  <tom@tromey.com>
1016
1017         * hppa-tdep.c (unwind_command): Constify.
1018
1019 2017-09-27  Tom Tromey  <tom@tromey.com>
1020
1021         * target-descriptions.c (unset_tdesc_filename_cmd)
1022         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1023         Constify.
1024
1025 2017-09-27  Tom Tromey  <tom@tromey.com>
1026
1027         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1028
1029 2017-09-27  Tom Tromey  <tom@tromey.com>
1030
1031         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1032
1033 2017-09-27  Tom Tromey  <tom@tromey.com>
1034
1035         * tui/tui-regs.c (tui_reg_command): Constify.
1036
1037 2017-09-27  Tom Tromey  <tom@tromey.com>
1038
1039         * skip.c (skip_file_command, skip_function_command)
1040         (skip_enable_command, skip_disable_command, skip_delete_command):
1041         Constify.
1042
1043 2017-09-27  Tom Tromey  <tom@tromey.com>
1044
1045         * record-btrace.c (cmd_record_btrace_bts_start)
1046         (cmd_record_btrace_pt_start): Constify.
1047
1048 2017-09-27  Tom Tromey  <tom@tromey.com>
1049
1050         * symmisc.c (maintenance_print_symbols)
1051         (maintenance_print_msymbols, maintenance_print_objfiles)
1052         (maintenance_info_symtabs, maintenance_check_symtabs)
1053         (maintenance_expand_symtabs, maintenance_info_line_tables):
1054         Constify.
1055
1056 2017-09-27  Tom Tromey  <tom@tromey.com>
1057
1058         * top.c (new_ui_command): Constify.
1059
1060 2017-09-27  Tom Tromey  <tom@tromey.com>
1061
1062         * symfile.c (add_symbol_file_command)
1063         (remove_symbol_file_command, list_overlays_command)
1064         (map_overlay_command, unmap_overlay_command)
1065         (overlay_auto_command, overlay_manual_command)
1066         (overlay_off_command, overlay_load_command): Constify.
1067
1068 2017-09-27  Tom Tromey  <tom@tromey.com>
1069
1070         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1071         (info_spu_mailbox_command, info_spu_dma_command)
1072         (info_spu_proxydma_command): Constify.
1073
1074 2017-09-27  Tom Tromey  <tom@tromey.com>
1075
1076         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1077
1078 2017-09-27  Tom Tromey  <tom@tromey.com>
1079
1080         * cli/cli-script.c (user_defined_command): Constify.
1081
1082 2017-09-27  Tom Tromey  <tom@tromey.com>
1083
1084         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1085         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1086         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1087         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1088         (dump_binary_value, append_binary_memory, append_binary_value):
1089         Constify.
1090         (struct dump_context) <func>: Constify.
1091         (add_dump_command): Update.
1092
1093 2017-09-27  Tom Tromey  <tom@tromey.com>
1094
1095         * cli/cli-cmds.c (show_version, show_configuration)
1096         (source_command, show_user): Constify.
1097
1098 2017-09-27  Tom Tromey  <tom@tromey.com>
1099
1100         * target.c (maintenance_print_target_stack): Constify.
1101
1102 2017-09-27  Tom Tromey  <tom@tromey.com>
1103
1104         * interps.c (interpreter_exec_cmd): Constify.
1105
1106 2017-09-27  Tom Tromey  <tom@tromey.com>
1107
1108         * record-full.c (cmd_record_full_restore): Constify.
1109
1110 2017-09-27  Tom Tromey  <tom@tromey.com>
1111
1112         * memattr.c (enable_mem_command, disable_mem_command)
1113         (delete_mem_command): Constify.
1114
1115 2017-09-27  Tom Tromey  <tom@tromey.com>
1116
1117         * value.c (show_convenience): Constify.
1118
1119 2017-09-27  Tom Tromey  <tom@tromey.com>
1120
1121         * gdbcore.h (core_file_command): Update.
1122         * corefile.c (core_file_command): Constify.
1123
1124 2017-09-27  Tom Tromey  <tom@tromey.com>
1125
1126         * user-regs.c (maintenance_print_user_registers): Constify.
1127
1128 2017-09-27  Tom Tromey  <tom@tromey.com>
1129
1130         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1131
1132 2017-09-27  Tom Tromey  <tom@tromey.com>
1133
1134         * cp-support.c (first_component_command): Constify.
1135
1136 2017-09-27  Tom Tromey  <tom@tromey.com>
1137
1138         * psymtab.c (maintenance_print_psymbols)
1139         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1140         Constify.
1141
1142 2017-09-27  Tom Tromey  <tom@tromey.com>
1143
1144         * windows-tdep.c (display_tib): Constify.
1145
1146 2017-09-27  Tom Tromey  <tom@tromey.com>
1147
1148         * linux-fork.c (delete_checkpoint_command)
1149         (detach_checkpoint_command): Constify.
1150
1151 2017-09-27  Tom Tromey  <tom@tromey.com>
1152
1153         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1154
1155 2017-09-27  Tom Tromey  <tom@tromey.com>
1156
1157         * arc-tdep.c (dump_arc_instruction_command): Constify.
1158
1159 2017-09-27  Tom Tromey  <tom@tromey.com>
1160
1161         * valprint.c (set_radix, show_radix): Constify.
1162
1163 2017-09-27  Tom Tromey  <tom@tromey.com>
1164
1165         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1166
1167 2017-09-27  Tom Tromey  <tom@tromey.com>
1168
1169         * command.h (not_just_help_class_command): Update.
1170         * cli/cli-decode.h (not_just_help_class_command): Update.
1171         * cli/cli-decode.c (not_just_help_class_command): Constify.
1172
1173 2017-09-27  Tom Tromey  <tom@tromey.com>
1174
1175         * gdb_bfd.c (maintenance_info_bfds): Constify.
1176
1177 2017-09-27  Tom Tromey  <tom@tromey.com>
1178
1179         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1180         overloads.
1181         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1182         (do_const_cfunc): New function.
1183         (cmd_cfunc_eq): New overload.
1184         (cli_user_command_p): Check do_const_cfunc.
1185         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1186         const_cfunc.
1187         * command.h (add_cmd): Add const overload and no-function
1188         overload.
1189         (set_cmd_cfunc): Add const overload.
1190         (cmd_const_cfunc_ftype): Declare.
1191         (cmd_cfunc_eq): Add const overload.
1192         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1193         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1194         overload.
1195
1196 2017-09-27  Tom Tromey  <tom@tromey.com>
1197
1198         * macroexp.c (get_next_token_for_substitution): New function.
1199         (substitute_args): Call it.  Check for __VA_OPT__.
1200
1201 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1202             Pedro Alves <palves@redhat.com>
1203
1204         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1205         producer_is_icc_lt_14.
1206         (producer_is_icc_lt_14): New function.
1207         (check_producer): Add code for checking version of ICC.
1208         (producer_is_icc): Move to producer.c.
1209         (read_structure_type): Restrict ICC workaround to ICC<14.
1210         * producer.c: Include selftest.h.
1211         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1212         New functions.
1213         * producer.h (producer_is_icc): New declaration.
1214
1215 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1216
1217         * Makefile.in (SFILES): Add producer.c.
1218         (COMMON_OBS): Add producer.o
1219         * amd64-tdep.c (producer.h): Add new include.
1220         * dwarf2read.c (producer.h): Add new include.
1221         * producer.c: New file.
1222         * producer.h: New file.
1223         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1224         producer.c.
1225         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1226         producer.h.
1227
1228 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1229
1230         * configure.ac: Search ncursesw before ncurses.
1231         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1232         * gdb_curses.h: Include <ncursesw/ncurses.h>
1233         * config.in, configure: Regenerate.
1234
1235 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1236
1237         PR gdb/22185
1238         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1239         obsolete.
1240         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1241         Remove i386sol2 support.
1242         * configure.nat <i386sol2>: Remove.
1243         <sol2-64>: Fold into ...
1244         <sol2>: ... this.
1245         Move common settings to default section.
1246         Add sol-thread.o.
1247         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1248         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1249         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1250         <i[34567]86-*-solaris*>: Remove.
1251         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1252
1253         * configure.ac: Remove wctype in libw check.
1254         (_MSE_INT_H): Don't define on Solaris 7-9.
1255         <solaris*>: Remove libthread_db.so.1 check.
1256         * configure: Regenerate.
1257         * config.in: Regenerate.
1258
1259         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1260         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1261         (gdb_ps_size_t): Remove.
1262         Use base types in users.
1263         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1264
1265         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1266
1267 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1268
1269         PR build/22206
1270         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1271         (adi_is_addr_mapped): Likewise.
1272         (PSR_ICC): Don't redefine.
1273         (PSR_IMPL): Likewise.
1274
1275 2017-09-25  Tom Tromey  <tom@tromey.com>
1276
1277         * regcache.c (regcache::dump): Use string_printf.
1278
1279 2017-09-25  Tom Tromey  <tom@tromey.com>
1280
1281         * regcache.c (class regcache_invalidator): New.
1282         (struct register_to_invalidate): Remove.
1283         (make_cleanup_regcache_invalidate): Remove.
1284         (regcache::raw_write): Use regcache_invalidator.
1285
1286 2017-09-25  Tom Tromey  <tom@tromey.com>
1287
1288         * spu-tdep.c (spu2ppu_sniffer): Update.
1289         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1290         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1291         Remove.
1292         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1293         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1294         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1295         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1296         (frame_pop): Update.
1297
1298 2017-09-25  Tom Tromey  <tom@tromey.com>
1299
1300         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1301         * regcache.h (regcache_xfree): Don't declare.
1302         * regcache.c (regcache_xfree): Remove.
1303         (do_regcache_xfree): Use delete.
1304         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1305         * linux-fork.c (free_fork): Use delete.
1306         (fork_save_infrun_state): Likewise.
1307         * jit.c (jit_dealloc_cache): Use delete.
1308         * infrun.c (discard_infcall_suspend_state): Use delete.
1309
1310 2017-09-25  Tom Tromey  <tom@tromey.com>
1311
1312         * regcache.h (regcache_xmalloc): Don't declare.
1313         (regcache_raw_set_cached_value): Update comment.
1314         * regcache.c (regcache_xmalloc): Remove.
1315         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1316         * jit.c (jit_frame_sniffer): Use new.
1317         * frame.c (frame_save_as_regcache): Use new.
1318
1319 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1320
1321         * NEWS: Advertise support for guarded-storage registers on IBM z.
1322
1323 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1324
1325         * s390-linux-nat.c (have_regset_gs): New static variable.
1326         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1327         control block and guarded-storage broadcast control regsets.
1328         (s390_read_description): Detect whether the target has
1329         guarded-storage support, return appropriate tdesc.
1330         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1331         (features/s390x-gs-linux64.c): Likewise.
1332         (struct gdbarch_tdep) <have_gs>: New field.
1333         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1334         (s390_gsbc_regset): New variables.
1335         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1336         and s390_gsbc_regset, if applicable.
1337         (s390_core_read_description): Check whether core file was from a
1338         target with guarded-storage support; include appropriate regsets.
1339         (s390_gdbarch_init): Add registers for guarded-storage support.
1340         (_initialize_s390_tdep): Initialize new target descriptions that
1341         include registers for guarded-storage support.
1342         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1343         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1344         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1345         (S390_NUM_REGS): Adjust macro definition.
1346         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1347         (tdesc_s390x_gs_linux64): New declarations.
1348
1349 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1350
1351         * features/s390-gs-linux64.xml: New file.
1352         * features/s390-gs.xml: New file.
1353         * features/s390-gsbc.xml: New file.
1354         * features/s390x-gs-linux64.xml: New file.
1355         * features/Makefile (WHICH): Add s390-gs-linux64 and
1356         s390x-gs-linux64.
1357         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1358         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1359         * features/s390-gs-linux64.c: New generated file.
1360         * features/s390x-gs-linux64.c: New file.
1361         * regformats/s390-gs-linux64.dat: New file.
1362         * regformats/s390x-gs-linux64.dat: New file.
1363
1364 2017-09-23  Tom Tromey  <tom@tromey.com>
1365
1366         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1367
1368 2017-09-22  Tom Tromey  <tom@tromey.com>
1369
1370         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1371         type to scoped_restore_tmpl.
1372         <scoped_input_handler>: Initialize m_quit_handler directly.
1373
1374 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1375
1376         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1377         (cd_command): Likewise.  Free "current_directory" before
1378         assigning to it.
1379         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1380         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1381         * top.c (gdb_dirbuf): Remove global declaration.
1382         * top.h (gdb_dirbuf): Likewise.
1383
1384 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1385
1386         * gnulib/aclocal.m4: Regenerate.
1387         * gnulib/config.in: Regenerate.
1388         * gnulib/configure: Regenerate.
1389         * gnulib/import/Makefile.am: Regenerate.
1390         * gnulib/import/Makefile.in: Regenerate.
1391         * gnulib/import/assure.h: New file.
1392         * gnulib/import/at-func.c: Likewise
1393         * gnulib/import/chdir-long.c: New file.
1394         * gnulib/import/chdir-long.h: New file.
1395         * gnulib/import/cloexec.c: New file.
1396         * gnulib/import/cloexec.h: New file.
1397         * gnulib/import/close.c: New file.
1398         * gnulib/import/closedir.c: New file.
1399         * gnulib/import/dirent-private.h: New file.
1400         * gnulib/import/dup-safer.c: New file.
1401         * gnulib/import/dup.c: New file.
1402         * gnulib/import/dup2.c: New file.
1403         * gnulib/import/error.c: New file.
1404         * gnulib/import/error.h: New file.
1405         * gnulib/import/exitfail.c: New file.
1406         * gnulib/import/exitfail.h: New file.
1407         * gnulib/import/fchdir.c: New file.
1408         * gnulib/import/fcntl.c: New file.
1409         * gnulib/import/fcntl.in.h: New file.
1410         * gnulib/import/fd-hook.c: New file.
1411         * gnulib/import/fd-hook.h: New file.
1412         * gnulib/import/fd-safer.c: New file.
1413         * gnulib/import/fdopendir.c: New file.
1414         * gnulib/import/filename.h: New file.
1415         * gnulib/import/filenamecat-lgpl.c: New file.
1416         * gnulib/import/filenamecat.h: New file.
1417         * gnulib/import/fstat.c: New file.
1418         * gnulib/import/fstatat.c: New file.
1419         * gnulib/import/getcwd-lgpl.c: New file.
1420         * gnulib/import/getcwd.c: New file.
1421         * gnulib/import/getdtablesize.c: New file.
1422         * gnulib/import/getlogin_r.c: New file.
1423         * gnulib/import/getprogname.c: New file.
1424         * gnulib/import/getprogname.h: New file.
1425         * gnulib/import/gettext.h: New file.
1426         * gnulib/import/glob-libc.h: New file.
1427         * gnulib/import/glob.c: New file.
1428         * gnulib/import/glob.in.h: New file.
1429         * gnulib/import/intprops.h: New file.
1430         * gnulib/import/m4/chdir-long.m4: New file.
1431         * gnulib/import/m4/close.m4: New file.
1432         * gnulib/import/m4/closedir.m4: New file.
1433         * gnulib/import/m4/d-ino.m4: New file.
1434         * gnulib/import/m4/d-type.m4: New file.
1435         * gnulib/import/m4/dup.m4: New file.
1436         * gnulib/import/m4/dup2.m4: New file.
1437         * gnulib/import/m4/error.m4: New file.
1438         * gnulib/import/m4/fchdir.m4: New file.
1439         * gnulib/import/m4/fcntl.m4: New file.
1440         * gnulib/import/m4/fcntl_h.m4: New file.
1441         * gnulib/import/m4/fdopendir.m4: New file.
1442         * gnulib/import/m4/filenamecat.m4: New file.
1443         * gnulib/import/m4/fstat.m4: New file.
1444         * gnulib/import/m4/fstatat.m4: New file.
1445         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1446         * gnulib/import/m4/getcwd-path-max.m4: New file.
1447         * gnulib/import/m4/getcwd.m4: New file.
1448         * gnulib/import/m4/getdtablesize.m4: New file.
1449         * gnulib/import/m4/getlogin_r.m4: New file.
1450         * gnulib/import/m4/getprogname.m4: New file.
1451         * gnulib/import/m4/glob.m4: New file.
1452         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1453         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1454         * gnulib/import/m4/mempcpy.m4: New file.
1455         * gnulib/import/m4/memrchr.m4: New file.
1456         * gnulib/import/m4/mode_t.m4: New file.
1457         * gnulib/import/m4/msvc-inval.m4: New file.
1458         * gnulib/import/m4/msvc-nothrow.m4: New file.
1459         * gnulib/import/m4/open.m4: New file.
1460         * gnulib/import/m4/openat.m4: New file.
1461         * gnulib/import/m4/opendir.m4: New file.
1462         * gnulib/import/m4/readdir.m4: New file.
1463         * gnulib/import/m4/realloc.m4: New file.
1464         * gnulib/import/m4/rewinddir.m4: New file.
1465         * gnulib/import/m4/save-cwd.m4: New file.
1466         * gnulib/import/m4/strdup.m4: New file.
1467         * gnulib/import/m4/strerror.m4: New file.
1468         * gnulib/import/m4/unistd-safer.m4: New file.
1469         * gnulib/import/mempcpy.c: New file.
1470         * gnulib/import/memrchr.c: New file.
1471         * gnulib/import/msvc-inval.c: New file.
1472         * gnulib/import/msvc-inval.h: New file.
1473         * gnulib/import/msvc-nothrow.c: New file.
1474         * gnulib/import/msvc-nothrow.h: New file.
1475         * gnulib/import/open.c: New file.
1476         * gnulib/import/openat-die.c: New file.
1477         * gnulib/import/openat-priv.h: New file.
1478         * gnulib/import/openat-proc.c: New file.
1479         * gnulib/import/openat.c: New file.
1480         * gnulib/import/openat.h: New file.
1481         * gnulib/import/opendir.c: New file.
1482         * gnulib/import/pipe-safer.c: New file.
1483         * gnulib/import/readdir.c: New file.
1484         * gnulib/import/realloc.c: New file.
1485         * gnulib/import/rewinddir.c: New file.
1486         * gnulib/import/save-cwd.c: New file.
1487         * gnulib/import/save-cwd.h: New file.
1488         * gnulib/import/strdup.c: New file.
1489         * gnulib/import/strerror-override.c: New file.
1490         * gnulib/import/strerror-override.h: New file.
1491         * gnulib/import/strerror.c: New file.
1492         * gnulib/import/unistd--.h: New file.
1493         * gnulib/import/unistd-safer.h: New file.
1494         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1495         "getcwd" and "glob".
1496         * ser-tcp.c: Undefine "close" before redefining it.
1497
1498 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1499
1500         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1501         get rid of res_val.
1502
1503 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1504
1505         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1506         <sol2,sparc>: Likewise.
1507         <sol2-64,i386>: Likewise.
1508
1509         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1510         -Wdeprecated-declarations on *-*-solaris*.
1511         * configure: Regenerate.
1512
1513         * procfs.c: Include "nat/inferior.h".
1514         (procfs_info_proc): Fix typo.
1515
1516 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1517
1518         * remote.c (vector): Include.
1519         (struct private_thread_info): Add field, thread_handle.
1520         (free_private_thread_info): Deallocate storage associated with
1521         thread handle.
1522         (get_private_info_thread): Initialize `thread_handle' field.
1523         (struct thread_item): Add field, thread_handle.
1524         (clear_threads_listing_context): Deallocate storage associated
1525         with thread handle.
1526         (start_thread): Add support for "handle" attribute.
1527         (thread_attributes): Add "handle".
1528         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1529         field.
1530         (remote_update_thread_list): Update thread_handle.
1531         (remote_thread_handle_to_thread_info): New function.
1532         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1533
1534 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1535
1536         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1537         function.
1538         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1539         * python/python-internal.h (thread_object_type): Declare.
1540
1541 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1542
1543         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1544         (target_thread_handle_to_thread_info): Declare.
1545         * target.c (target_thread_handle_to_thread_info): New function.
1546         * target-delegates.c: Regenerate.
1547         * gdbthread.h (find_thread_by_handle): Declare.
1548         * thread.c (find_thread_by_handle): New function.
1549         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1550         function.
1551         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1552
1553 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1554
1555         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1556
1557 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1558
1559         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1560
1561 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1562
1563         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1564         to gdb_target_obs.
1565
1566 2017-09-20  Tom Tromey  <tom@tromey.com>
1567
1568         * breakpoint.c (struct counted_command_line): Remove.
1569         (breakpoint_commands): Update.
1570         (alloc_counted_command_line, incref_counted_command_line)
1571         (decref_counted_command_line, do_cleanup_counted_command_line)
1572         (make_cleanup_decref_counted_command_line): Remove.
1573         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1574         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1575         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1576         (save_breakpoints): Update.
1577         * breakpoint.h (counted_command_line): Now a typedef to
1578         shared_ptr.
1579         (struct breakpoint) <commands>: Now a counted_command_line.
1580         (struct bpstats) <command>: Likewise.
1581
1582 2017-09-20  Tom Tromey  <tom@tromey.com>
1583
1584         * breakpoint.c (struct commands_info, do_map_commands_command):
1585         Remove.
1586         (commands_command_1): Update.
1587         (iterate_over_related_breakpoints): Take a function_view.
1588         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1589         (delete_command): Update.
1590         (map_breakpoint_numbers): Take a function_view.
1591         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1592         (disable_command): Update.
1593         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1594         (enable_command): Update.
1595         (struct disp_data, do_enable_breakpoint_disp)
1596         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1597         (do_map_enable_delete_breakpoint): Remove.
1598         (enable_once_command, enable_count_command, enable_delete_command)
1599         (delete_trace_variable_command): Update.
1600
1601 2017-09-20  Tom Tromey  <tom@tromey.com>
1602
1603         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1604         (bpstat_clear): Use delete.
1605         (bpstats): New constructors.
1606         (bpstat_copy, bpstat_stop_status): Use new.
1607         (dprintf_after_condition_true): Update.
1608         * breakpoint.h (bpstats::bpstats): Add constructors.
1609         (bpstats::~bpstats): Add destructor.
1610
1611 2017-09-20  Pedro Alves  <palves@redhat.com>
1612
1613         * eval.c (make_params): Delete, refactored as ...
1614         (class fake_method): ... this new type's ctor.
1615         (fake_method::~fake_method): New.
1616         (evaluate_subexp_standard): Use 'fake_method'.
1617
1618 2017-09-20  Tom Tromey  <tom@tromey.com>
1619
1620         * windows-nat.c (get_windows_debug_event, windows_wait)
1621         (do_initial_windows_stuff, windows_attach): Update.
1622         * utils.c (vwarning, internal_vproblem): Update.
1623         (ui_unregister_input_event_handler_cleanup)
1624         (prepare_to_handle_input): Remove.
1625         (class scoped_input_handler): New.
1626         (defaulted_query, prompt_for_continue): Update.
1627         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1628         Update.
1629         * top.c (undo_terminal_modifications_before_exit): Update.
1630         * target/target.h (target_terminal_init, target_terminal_inferior)
1631         (target_terminal_ours): Don't declare.
1632         (class target_terminal): New.
1633         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1634         (target_terminal_ours_for_output)
1635         (make_cleanup_restore_target_terminal): Don't declare.
1636         (target_terminal_info): Remove.
1637         * target.c (enum terminal_state, terminal_state): Remove.
1638         (target_terminal::terminal_state): Define.
1639         (target_terminal::init): Rename from target_terminal_init.
1640         (target_terminal::inferior): Rename from
1641         target_terminal_inferior.
1642         (target_terminal::ours): Rename from target_terminal_ours.
1643         (target_terminal::ours_for_output): Rename from
1644         target_terminal_ours_for_output.
1645         (target_terminal::info): New method.
1646         (cleanup_restore_target_terminal)
1647         (make_cleanup_restore_target_terminal): Remove.
1648         * solib.c (handle_solib_event): Update.
1649         * remote.c (remote_serial_quit_handler): Update.
1650         (remote_terminal_inferior, remote_wait_as): Update.
1651         * record-full.c (record_full_wait_1): Update.
1652         * nto-procfs.c (procfs_create_inferior): Update.
1653         * nat/fork-inferior.c (startup_inferior): Update.
1654         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1655         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1656         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1657         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1658         (mi_breakpoint_created, mi_breakpoint_deleted)
1659         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1660         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1661         (mi_user_selected_context_changed, report_initial_inferior):
1662         Update.
1663         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1664         (linux_nat_terminal_inferior): Update.
1665         * infrun.c (follow_fork_inferior)
1666         (handle_vfork_child_exec_or_exit, do_target_resume)
1667         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1668         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1669         Update.
1670         * inflow.c (child_terminal_init, info_terminal_command): Update.
1671         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1672         (attach_command): Update.
1673         * infcall.c (call_thread_fsm_should_stop): Update.
1674         * gnu-nat.c (gnu_attach): Update.
1675         * extension.c (struct active_ext_lang_state)
1676         (restore_active_ext_lang): Update.
1677         * exceptions.c (print_flush): Update.
1678         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1679         (struct quit_handler_cleanup_data, restore_quit_handler)
1680         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1681         Remove.
1682         * cp-support.c (gdb_demangle): Update.
1683         * breakpoint.c (update_inserted_breakpoint_locations)
1684         (insert_breakpoint_locations, handle_jit_event)
1685         (disable_breakpoints_in_unloaded_shlib): Update.
1686         * annotate.c (annotate_breakpoints_invalid)
1687         (annotate_frames_invalid): Update.
1688
1689 2017-09-20  Tom Tromey  <tom@tromey.com>
1690
1691         * main.c (catch_command_errors): Rename from
1692         catch_command_errors_const.
1693         (captured_main_1): Update.
1694
1695 2017-09-20  Pedro Alves  <palves@redhat.com>
1696
1697         * cli/cli-cmds.c (list_command): Use print_sal_location.
1698         (print_sal_location): New function.
1699         (ambiguous_line_spec): Use print_sal_location.
1700         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1701         * symtab.c (find_function_start_sal): Likewise.
1702         * symtab.h (symtab_and_line::symbol): New field.
1703
1704 2017-09-20  Pedro Alves  <palves@redhat.com>
1705
1706         * linespec.c (minsym_found): Handle non-text minsyms.
1707         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1708
1709 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1710
1711         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1712         backslash.
1713
1714 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1715
1716         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1717         vmovups instead vmovaps.
1718         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1719
1720 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1721
1722         * NEWS (Changes since GDB 8.0): Add starti.
1723         * infcmd.c (enum run_break): New.
1724         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1725         case.
1726         (run_command): Use enum run_how.
1727         (start_command): Likewise.
1728         (starti_command): New function.
1729         (RUN_ARGS_HELP): New macro.
1730         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1731         commands.  Add starti command.
1732
1733 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1734
1735         * Makefile.in (monitor.o): Remove the rule.
1736
1737 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1738
1739         * annotate.h (struct annotate_arg_emitter): Use
1740         DISABLE_COPY_AND_ASSIGN.
1741         * common/refcounted-object.h (refcounted_object): Likewise.
1742         * completer.h (struct completion_result): Likewise.
1743         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1744         * filename-seen-cache.h (filename_seen_cache): Likewise.
1745         * gdbcore.h (thread_section_name): Likewise.
1746         * gdb_regex.h (compiled_regex): Likewise.
1747         * gdbthread.h (scoped_restore_current_thread): Likewise.
1748         * inferior.h (scoped_restore_current_inferior): Likewise.
1749         * jit.c (jit_reader): Likewise.
1750         * linespec.h (struct linespec_result): Likewise.
1751         * mi/mi-parse.h (struct mi_parse): Likewise.
1752         * nat/fork-inferior.c (execv_argv): Likewise.
1753         * progspace.h (scoped_restore_current_program_space): Likewise.
1754         * python/python-internal.h (class gdbpy_enter): Likewise.
1755         * regcache.h (regcache): Likewise.
1756         * target-descriptions.c (struct tdesc_reg): Likewise.
1757         (struct tdesc_type): Likewise.
1758         (struct tdesc_feature): Likewise.
1759         * ui-out.h (ui_out_emit_type): Likewise.
1760
1761 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1762
1763         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1764         label abort_expression.
1765
1766 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1767
1768         * common/buffer.c (buffer_xml_printf): Adjust.
1769         * common/xml-utils.c (xml_escape_text): Change return type to
1770         std::string, update code accordingly.
1771         * common/xml-utils.h (xml_escape_text): Change return type to
1772         std::string.
1773         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1774         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1775         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1776         Adjust.
1777
1778 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1779
1780         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1781         (SUBDIR_UNITTESTS_OBS): Add new object file.
1782         * unittests/xml-utils-selftests.c: New file.
1783
1784 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1785
1786         * common/selftest.h (selftest): New struct/interface.
1787         (register_test): Add name parameter, add new overload.
1788         (run_tests): Add filter parameter.
1789         (for_each_selftest_ftype): New typedef.
1790         (for_each_selftest): New declaration.
1791         * common/selftest.c (tests): Change type to
1792         map<string, unique_ptr<selftest>>.
1793         (simple_selftest): New struct.
1794         (register_test): New function.
1795         (register_test): Add name parameter and use it.
1796         (run_tests): Add filter parameter and use it.  Add prints.
1797         Adjust to vector -> map change.
1798         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1799         registering selftests.
1800         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1801         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1802         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1803         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1804         * findvar.c (_initialize_findvar): Likewise.
1805         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1806         * maint.c (maintenance_selftest): Update call to run_tests.
1807         (maintenance_info_selftests): New function.
1808         (_initialize_maint_cmds): Register "maintenance info selftests"
1809         command.  Update "maintenance selftest" doc.
1810         * regcache.c (_initialize_regcache): Add names when registering
1811         selftests.
1812         * rust-exp.y (_initialize_rust_exp): Likewise.
1813         * selftest-arch.c (gdbarch_selftest): New struct.
1814         (gdbarch_tests): Remove.
1815         (register_test_foreach_arch): Add name parameter.  Call
1816         register_test.
1817         (tests_with_arch): Remove, move most content to
1818         gdbarch_selftest::operator().
1819         (_initialize_selftests_foreach_arch): Remove.
1820         * selftest-arch.h (register_test_foreach_arch): Add name
1821         parameter.
1822         (run_tests_with_arch): New declaration.
1823         * utils-selftests.c (_initialize_utils_selftests): Add names
1824         when registering selftests.
1825         * utils.c (_initialize_utils): Likewise.
1826         * unittests/array-view-selftests.c
1827         (_initialize_array_view_selftests): Likewise.
1828         * unittests/environ-selftests.c (_initialize_environ_selftests):
1829         Likewise.
1830         * unittests/function-view-selftests.c
1831         (_initialize_function_view_selftests): Likewise.
1832         * unittests/offset-type-selftests.c
1833         (_initialize_offset_type_selftests): Likewise.
1834         * unittests/optional-selftests.c
1835         (_initialize_optional_selftests): Likewise.
1836         * unittests/scoped_restore-selftests.c
1837         (_initialize_scoped_restore_selftests): Likewise.
1838         * NEWS: Document "maintenance selftest" and "maint info
1839         selftests".
1840
1841 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1842
1843         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1844         scoped_restore.
1845
1846 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1847
1848         * mi/mi-main.c (mi_load_progress): Make uiout variable
1849         a unique_ptr.
1850
1851 2017-09-15  Pedro Alves  <palves@redhat.com>
1852
1853         * compile/compile-c-types.c (convert_enum, convert_int)
1854         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1855
1856 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1857
1858         * dwarf2read.c (copy_string): Remove.
1859         (parse_macro_definition): Replace copy_string with savestring.
1860
1861 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1862
1863         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1864         gdb_target_obs.
1865         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1866         Likewise.
1867         (i[34567]86-*-linux*): Likewise.
1868
1869 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1870
1871         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1872         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1873         <stack>: Change type to std::vector.
1874         <stack_len, stack_allocated>: Remove.
1875         <grow_stack>: Remove.
1876         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1877         (dwarf_expr_context::~dwarf_expr_context): Remove.
1878         (dwarf_expr_context::grow_stack): Remove.
1879         (dwarf_expr_context::push): Adjust.
1880         (dwarf_expr_context::pop): Adjust.
1881         (dwarf_expr_context::fetch): Adjust.
1882         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1883         (dwarf_expr_context::stack_empty_p): Adjust.
1884         (dwarf_expr_context::execute_stack_op): Adjust.
1885
1886 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1887
1888         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1889         return type to bool.
1890         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1891
1892 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1893
1894         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1895         Change type to bool.
1896         (dwarf_stack_value) <in_stack_memory>: Likewise.
1897         (dwarf_expr_context) <push_address>: Change parameter type to
1898         bool.
1899         <fetch_in_stack_memory>: Change return type to bool.
1900         <push>: Change parameter type to bool.
1901         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1902         to bool.
1903         (dwarf_expr_context::push_address): Likewise.
1904         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1905         to bool.
1906         (dwarf_expr_context::execute_stack_op): Adjust.
1907         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1908
1909 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1910
1911         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1912         (struct dwarf_expr_context) <n_pieces>: Remove.
1913         <pieces>: Change type to std::vector.
1914         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1915         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1916         pieces.
1917         (dwarf_expr_context::add_piece): Adjust.
1918         * dwarf2loc.c (struct piece_closure): Initialize fields.
1919         <n_pieces>: Remove.
1920         <pieces>: Change type to std::vector.
1921         (allocate_piece_closure): Adjust, change parameter to
1922         std::vector rvalue and std::move it to piece_closure.
1923         (rw_pieced_value): Adjust.
1924         (check_pieced_synthetic_pointer): Adjust.
1925         (indirect_synthetic_pointer): Adjust.
1926         (coerce_pieced_ref): Adjust.
1927         (free_pieced_value_closure):  Adjust.  Use delete to free
1928         piece_closure.
1929         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
1930         to allocate_piece_closure.
1931         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1932
1933 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1934
1935         * probe.h (probe_ops_cp): Remove typedef.
1936         (DEF_VEC_P (probe_ops_cp)): Remove.
1937         (all_probe_ops): Change type to std::vector.
1938         * probe.c (info_probes_for_ops): Adjust to vector change.
1939         (probe_linespec_to_ops): Likewise.
1940         (all_probe_ops): Change type to std::vector.
1941         (_initialize_probe): Adjust to vector change.
1942         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1943         * elfread.c (elf_get_probes): Likewise.
1944         * stap-probe.c (_initialize_stap_probe): Likewise.
1945
1946 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1947
1948         * probe.h (struct bound_probe): Define constructors.
1949         * probe.c (bound_probe_s): Remove typedef.
1950         (DEF_VEC_O (bound_probe_s)): Remove VEC.
1951         (collect_probes): Change return type to std::vector, remove
1952         cleanup.
1953         (compare_probes): Return bool, change parameter type.  Change
1954         semantic to "less than".
1955         (gen_ui_out_table_header_info): Change parameter to std::vector
1956         and update.
1957         (exists_probe_with_pops): Likewise.
1958         (info_probes_for_ops): Update to std::vector change.
1959         (enable_probes_command): Likewise.
1960         (disable_probes_command): Likewise.
1961
1962 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1963
1964         * probe.h (struct probe_ops) <get_probes>: Change parameter from
1965         vec to std::vector.
1966         * probe.c (parse_probes_in_pspace): Update.
1967         (find_probes_in_objfile): Update.
1968         (find_probe_by_pc): Update.
1969         (collect_probes): Update.
1970         (probe_any_get_probes): Update.
1971         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1972         return type to reference to std::vector.
1973         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1974         std::vector and update.
1975         (dtrace_process_dof): Likewise.
1976         (dtrace_get_probes): Likewise.
1977         * elfread.c (elf_get_probes): Change return type to std::vector,
1978         store an std::vector in bfd_data.
1979         (probe_key_free): Update to std::vector.
1980         * stap-probe.c (handle_stap_probe): Change parameter to
1981         std::vector and update.
1982         (stap_get_probes): Likewise.
1983         * symfile-debug.c (debug_sym_get_probes): Change return type to
1984         std::vector and update.
1985
1986 2017-09-11  Tom Tromey  <tom@tromey.com>
1987
1988         * breakpoint.c (program_breakpoint_here_p): Update.
1989         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1990         from make_show_memory_breakpoints_cleanup.  Return a
1991         scoped_restore_tmpl<int>.
1992         (restore_show_memory_breakpoints): Remove.
1993         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1994         * mem-break.c (memory_validate_breakpoint): Update.
1995         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1996         (ia64_memory_remove_breakpoint): Update.
1997         (ia64_breakpoint_from_pc): Update.
1998         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1999         from make_show_memory_breakpoints_cleanup.
2000
2001 2017-09-11  Tom Tromey  <tom@tromey.com>
2002
2003         * d-namespace.c (d_lookup_symbol): Use std::string.
2004         (find_symbol_in_baseclass): Likewise.
2005
2006 2017-09-11  Tom Tromey  <tom@tromey.com>
2007
2008         * ctf.c (ctf_start): Use std::string.
2009
2010 2017-09-11  Tom Tromey  <tom@tromey.com>
2011
2012         * ada-lang.c (is_known_support_routine): Update.
2013         (ada_unhandled_exception_name_addr_from_raise): Update.
2014         * guile/scm-frame.c (gdbscm_frame_name): Update.
2015         * python/py-frame.c (frapy_name): Update.
2016         (frapy_function): Update.
2017         * stack.h (find_frame_funname): Update.
2018         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2019         (print_frame): Update.
2020
2021 2017-09-11  Tom Tromey  <tom@tromey.com>
2022
2023         * findcmd.c (put_bits): Take a gdb::byte_vector.
2024         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2025         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2026         cleanups.
2027         (find_command): Update.
2028
2029 2017-09-11  Tom Tromey  <tom@tromey.com>
2030
2031         * cli/cli-script.c (class scoped_restore_hook_in): New.
2032         (clear_hook_in_cleanup): Remove.
2033         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2034         scoped_restore_hook_in.
2035
2036 2017-09-11  Tom Tromey  <tom@tromey.com>
2037
2038         * cli/cli-script.c (restore_interp): Remove.
2039         (read_command_lines): Use scoped_restore_interp.
2040         * interps.c (scoped_restore_interp::set_temp): Rename from
2041         interp_set_temp.
2042         * interps.h (class scoped_restore_interp): New.
2043         (interp_set_temp): Remove.
2044
2045 2017-09-11  Tom Tromey  <tom@tromey.com>
2046
2047         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2048         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2049         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2050         scoped_restore.
2051         (mi_cmd_break_insert_1): Update.
2052         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2053         scoped_restore.
2054
2055 2017-09-11  Tom Tromey  <tom@tromey.com>
2056
2057         * demangle.c (demangle_command): Update.
2058         * breakpoint.c (disable_command): Update.
2059         (enable_command): Update.
2060         (find_location_by_number): Make "number" const.  Use
2061         get_number_trailer.
2062         * cli/cli-utils.c (extract_arg): Return std::string.
2063         * probe.c (parse_probe_linespec): Update.  Change types.
2064         (collect_probes): Take string arguments.
2065         (parse_probe_linespec): Likewise.
2066         (info_probes_for_ops): Update.
2067         (enable_probes_command): Update.
2068         (disable_probes_command): Update.
2069         * break-catch-sig.c (catch_signal_split_args): Update.
2070         * mi/mi-parse.c (mi_parse): Update.
2071
2072 2017-09-11  Tom Tromey  <tom@tromey.com>
2073
2074         * language.h (language_enum): Make argument const.
2075         * language.c (language_enum): Make argument const.
2076
2077 2017-09-11  Tom Tromey  <tom@tromey.com>
2078
2079         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2080         as function.
2081         (skip_to_space): Rename from skip_to_space_const.
2082         * common/common-utils.c (skip_to_space): New function.
2083         (skip_to_space): Rename from skip_to_space_const.
2084         * cli/cli-utils.h (get_number): Rename from get_number_const.
2085         (extract_arg): Rename from extract_arg_const.
2086         * cli/cli-utils.c (get_number): Rename from get_number_const.
2087         (extract_arg): Rename from extract_arg_const.
2088         (number_or_range_parser::get_number): Use ::get_number.
2089         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2090         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2091         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2092         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2093         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2094         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2095         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2096         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2097
2098 2017-09-11  Tom Tromey  <tom@tromey.com>
2099
2100         * python/python.c (do_start_initialization): Use
2101         py-event-types.def to initialize types.
2102         Define all object type structures.
2103         * python/python-internal.h: Don't declare event initialization
2104         functions.
2105         * python/py-threadevent.c (thread_event_object_type): Don't
2106         define.
2107         * python/py-stopevent.c (stop_event_object_type): Don't define.
2108         * python/py-signalevent.c (signal_event_object_type): Don't
2109         declare or define.
2110         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2111         (clear_objfiles_event_object_type): Don't declare or define.
2112         * python/py-infevents.c (inferior_call_pre_event_object_type)
2113         (inferior_call_post_event_object_type)
2114         (register_changed_event_object_type)
2115         (memory_changed_event_object_type): Don't declare or define.
2116         * python/py-inferior.c (new_thread_event_object_type)
2117         (new_inferior_event_object_type)
2118         (inferior_deleted_event_object_type): Don't declare or define.
2119         * python/py-exitedevent.c (exited_event_object_type): Don't
2120         declare or define.
2121         * python/py-evts.c (gdbpy_initialize_py_events): Use
2122         py-all-events.def.
2123         * python/py-events.h (thread_event_object_type): Don't declare.
2124         (events_object): Use py-all-events.def.
2125         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2126         py-event-types.def.
2127         * python/py-event-types.def: New file.
2128         * python/py-continueevent.c (create_continue_event_object): Don't
2129         declare or define.
2130         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2131         declare or define.
2132         * python/py-all-events.def: New file.
2133
2134 2017-09-11  Tom Tromey  <tom@tromey.com>
2135
2136         * python/py-threadevent.c (create_thread_event_object): Return
2137         gdbpy_ref.
2138         * python/py-stopevent.h (create_stop_event_object)
2139         (create_breakpoint_event_object, create_signal_event_object):
2140         Update.
2141         * python/py-stopevent.c (create_stop_event_object): Return
2142         gdbpy_ref.
2143         (emit_stop_event): Update.
2144         * python/py-signalevent.c (create_signal_event_object): Return
2145         gdbpy_ref.
2146         * python/py-infevents.c (create_inferior_call_event_object):
2147         Update.
2148         * python/py-event.h (create_event_object)
2149         (create_thread_event_object): Update.
2150         * python/py-event.c (create_event_object): Return gdbpy_ref.
2151         * python/py-continueevent.c: Return gdbpy_ref.
2152         * python/py-bpevent.c (create_breakpoint_event_object): Return
2153         gdbpy_ref.
2154
2155 2017-09-11  Tom Tromey  <tom@tromey.com>
2156
2157         PR python/15622:
2158         * NEWS: Add entry.
2159         * python/python.c (do_start_initialization): Initialize new event
2160         types.
2161         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2162         (gdbpy_initialize_inferior_deleted_event)
2163         (gdbpy_initialize_new_thread_event): Declare.
2164         * python/py-threadevent.c (create_thread_event_object): Add option
2165         "thread" parameter.
2166         * python/py-inferior.c (new_thread_event_object_type)
2167         (new_inferior_event_object_type)
2168         (inferior_deleted_event_object_type): Declare.
2169         (python_new_inferior, python_inferior_deleted): New functions.
2170         (add_thread_object): Emit new_thread event.
2171         (gdbpy_initialize_inferior): Attach new functions to corresponding
2172         observers.
2173         (new_thread, new_inferior, inferior_deleted): Define new event
2174         types.
2175         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2176         registries.
2177         * python/py-events.h (events_object) <new_inferior,
2178         inferior_deleted, new_thread>: New fields.
2179         * python/py-event.h (create_thread_event_breakpoint): Add optional
2180         "thread" parameter.
2181
2182 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2183
2184         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2185         check current_ui instead.
2186         (internal_vproblem): Likewise.
2187
2188 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2189
2190         * thread.c (print_thread_info_1): Remove unnecessary calls to
2191         uiout->is_mi_like_p.
2192
2193 2017-09-09  Tom Tromey  <tom@tromey.com>
2194
2195         * namespace.h (add_using_directive): Update.
2196         * namespace.c (add_using_directive): Change type of excludes to
2197         std::vector.
2198         * dwarf2read.c (read_import_statement): Use std::vector.
2199         (read_namespace): Update.
2200         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2201
2202 2017-09-09  Tom Tromey  <tom@tromey.com>
2203
2204         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2205
2206 2017-09-09  Tom Tromey  <tom@tromey.com>
2207
2208         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2209
2210 2017-09-09  Tom Tromey  <tom@tromey.com>
2211
2212         * stack.c (func_command): Use gdb::def_vector.
2213
2214 2017-09-09  Tom Tromey  <tom@tromey.com>
2215
2216         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2217         ui_out_emit_list, ui_out_emit_tuple.
2218         (mi_cmd_var_update): Likewise.
2219
2220 2017-09-09  Tom Tromey  <tom@tromey.com>
2221
2222         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2223         ui_out_redirect_pop.
2224         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2225         ui_out_redirect_pop.
2226         * utils.c (do_ui_out_redirect_pop)
2227         (make_cleanup_ui_out_redirect_pop): Remove.
2228         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2229         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2230         * ui-out.h (ui_out_redirect_pop): New class.
2231
2232 2017-09-09  Tom Tromey  <tom@tromey.com>
2233
2234         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2235         (list_available_thread_groups, mi_cmd_list_thread_groups)
2236         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2237         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2238         Likewise.
2239
2240 2017-09-09  Tom Tromey  <tom@tromey.com>
2241
2242         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2243         ui_out_emit_tuple.
2244
2245 2017-09-09  Tom Tromey  <tom@tromey.com>
2246
2247         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2248         * stack.c (print_frame): Use ui_out_emit_tuple.
2249         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2250         (info_spu_mailbox_command, info_spu_dma_command)
2251         (info_spu_proxydma_command): Likewise.
2252         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2253         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2254         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2255         ui_out_emit_tuple.
2256         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2257
2258 2017-09-09  Tom Tromey  <tom@tromey.com>
2259
2260         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2261         (class ui_out_emit_table): Update comment.
2262         * ui-out.c (do_cleanup_table_end)
2263         (make_cleanup_ui_out_table_begin_end): Remove.
2264         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2265         (info_spu_dma_cmdlist): Likewise.
2266         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2267         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2268         ui_out_emit_table.
2269
2270 2017-09-09  Tom Tromey  <tom@tromey.com>
2271
2272         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2273         ui_out_emit_list, gdb::optional.
2274
2275 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2276
2277         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2278         prototype.
2279         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2280         prototype.
2281         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2282         prototype.
2283         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2284         * ada-exp.y: Remove _initialize_ada_exp prototype.
2285         * ada-lang.c: Remove _initialize_ada_language prototype.
2286         * ada-tasks.c: Remove _initialize_tasks prototype.
2287         * addrmap.c: Remove _initialize_addrmap prototype.
2288         * agent.c: Remove _initialize_agent prototype.
2289         * aix-thread.c: Remove _initialize_aix_thread prototype.
2290         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2291         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2292         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2293         prototype.
2294         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2295         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2296         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2297         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2298         prototype.
2299         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2300         prototype.
2301         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2302         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2303         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2304         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2305         prototype.
2306         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2307         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2308         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2309         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2310         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2311         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2312         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2313         prototype.
2314         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2315         prototype.
2316         * annotate.c: Remove _initialize_annotate prototype.
2317         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2318         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2319         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2320         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2321         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2322         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2323         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2324         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2325         prototype.
2326         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2327         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2328         * auto-load.c: Remove _initialize_auto_load prototype.
2329         * auxv.c: Remove _initialize_auxv prototype.
2330         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2331         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2332         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2333         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2334         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2335         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2336         prototype.
2337         * break-catch-throw.c: Remove _initialize_break_catch_throw
2338         prototype.
2339         * breakpoint.c: Remove _initialize_breakpoint prototype.
2340         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2341         * btrace.c: Remove _initialize_btrace prototype.
2342         * charset.c: Remove _initialize_charset prototype.
2343         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2344         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2345         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2346         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2347         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2348         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2349         * coffread.c: Remove _initialize_coffread prototype.
2350         * compile/compile.c: Remove _initialize_compile prototype.
2351         * complaints.c: Remove _initialize_complaints prototype.
2352         * completer.c: Remove _initialize_completer prototype.
2353         * copying.awk: Remove _initialize_copying prototype.
2354         * copying.c: Regenerate.
2355         * core-regset.c: Remove _initialize_core_regset prototype.
2356         * corefile.c: Remove _initialize_core prototype.
2357         * corelow.c: Remove _initialize_corelow prototype.
2358         * cp-abi.c: Remove _initialize_cp_abi prototype.
2359         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2360         * cp-support.c: Remove _initialize_cp_support prototype.
2361         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2362         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2363         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2364         * ctf.c: Remove _initialize_ctf prototype.
2365         * d-lang.c: Remove _initialize_d_language prototype.
2366         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2367         prototype.
2368         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2369         * dbxread.c: Remove _initialize_dbxread prototype.
2370         * dcache.c: Remove _initialize_dcache prototype.
2371         * demangle.c: Remove _initialize_demangler prototype.
2372         * disasm-selftests.c: Remove _initialize_disasm_selftests
2373         prototype.
2374         * disasm.c: Remove _initialize_disasm prototype.
2375         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2376         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2377         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2378         prototype.
2379         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2380         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2381         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2382         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2383         * elfread.c: Remove _initialize_elfread prototype.
2384         * exec.c: Remove _initialize_exec prototype.
2385         * extension.c: Remove _initialize_extension prototype.
2386         * f-lang.c: Remove _initialize_f_language prototype.
2387         * f-valprint.c: Remove _initialize_f_valprint prototype.
2388         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2389         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2390         * filesystem.c: Remove _initialize_filesystem prototype.
2391         * findcmd.c: Remove _initialize_mem_search prototype.
2392         * fork-child.c: Remove _initialize_fork_child prototype.
2393         * frame-base.c: Remove _initialize_frame_base prototype.
2394         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2395         * frame.c: Remove _initialize_frame prototype.
2396         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2397         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2398         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2399         * gcore.c: Remove _initialize_gcore prototype.
2400         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2401         * gdbarch.c: Regenerate.
2402         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2403         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2404         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2405         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2406         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2407         * go-lang.c: Remove _initialize_go_language prototype.
2408         * go32-nat.c: Remove _initialize_go32_nat prototype.
2409         * guile/guile.c: Remove _initialize_guile prototype.
2410         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2411         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2412         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2413         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2414         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2415         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2416         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2417         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2418         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2419         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2420         prototype.
2421         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2422         prototype.
2423         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2424         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2425         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2426         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2427         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2428         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2429         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2430         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2431         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2432         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2433         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2434         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2435         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2436         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2437         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2438         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2439         prototype.
2440         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2441         prototype.
2442         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2443         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2444         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2445         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2446         * infcall.c: Remove _initialize_infcall prototype.
2447         * infcmd.c: Remove _initialize_infcmd prototype.
2448         * inferior.c: Remove _initialize_inferiors prototype.
2449         * inflow.c: Remove _initialize_inflow prototype.
2450         * infrun.c: Remove _initialize_infrun prototype.
2451         * interps.c: Remove _initialize_interpreter prototype.
2452         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2453         * jit.c: Remove _initialize_jit prototype.
2454         * language.c: Remove _initialize_language prototype.
2455         * linux-fork.c: Remove _initialize_linux_fork prototype.
2456         * linux-nat.c: Remove _initialize_linux_nat prototype.
2457         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2458         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2459         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2460         * m2-lang.c: Remove _initialize_m2_language prototype.
2461         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2462         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2463         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2464         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2465         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2466         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2467         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2468         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2469         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2470         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2471         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2472         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2473         * machoread.c: Remove _initialize_machoread prototype.
2474         * macrocmd.c: Remove _initialize_macrocmd prototype.
2475         * macroscope.c: Remove _initialize_macroscope prototype.
2476         * maint.c: Remove _initialize_maint_cmds prototype.
2477         * mdebugread.c: Remove _initialize_mdebugread prototype.
2478         * memattr.c: Remove _initialize_mem prototype.
2479         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2480         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2481         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2482         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2483         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2484         * microblaze-linux-tdep.c: Remove
2485         _initialize_microblaze_linux_tdep prototype.
2486         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2487         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2488         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2489         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2490         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2491         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2492         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2493         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2494         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2495         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2496         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2497         prototype.
2498         * mipsread.c: Remove _initialize_mipsread prototype.
2499         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2500         prototype.
2501         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2502         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2503         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2504         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2505         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2506         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2507         prototype.
2508         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2509         * nto-procfs.c: Remove _initialize_procfs prototype.
2510         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2511         * objc-lang.c: Remove _initialize_objc_language prototype.
2512         * objfiles.c: Remove _initialize_objfiles prototype.
2513         * observer.c: Remove observer_test_first_notification_function,
2514         observer_test_second_notification_function,
2515         observer_test_third_notification_function, and
2516         _initialize_observer prototypes.
2517         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2518         * osabi.c: Remove _initialize_gdb_osabi prototype.
2519         * osdata.c: Remove _initialize_osdata prototype.
2520         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2521         * parse.c: Remove _initialize_parse prototype.
2522         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2523         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2524         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2525         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2526         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2527         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2528         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2529         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2530         * printcmd.c: Remove _initialize_printcmd prototype.
2531         * probe.c: Remove _initialize_probe prototype.
2532         * proc-api.c: Remove _initialize_proc_api prototype.
2533         * proc-events.c: Remove _initialize_proc_events prototype.
2534         * proc-service.c: Remove _initialize_proc_service prototype.
2535         * procfs.c: Remove _initialize_procfs prototype.
2536         * psymtab.c: Remove _initialize_psymtab prototype.
2537         * python/python.c: Remove _initialize_python prototype.
2538         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2539         * record-btrace.c: Remove _initialize_record_btrace prototype.
2540         * record-full.c: Remove _initialize_record_full prototype.
2541         * record.c: Remove _initialize_record prototype.
2542         * regcache.c: Remove _initialize_regcache prototype.
2543         * reggroups.c: Remove _initialize_reggroup prototype.
2544         * remote-notif.c: Remove _initialize_notif prototype.
2545         * remote-sim.c: Remove _initialize_remote_sim prototype.
2546         * remote.c: Remove _initialize_remote prototype.
2547         * reverse.c: Remove _initialize_reverse prototype.
2548         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2549         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2550         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2551         prototype.
2552         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2553         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2554         * rust-exp.y: Remove _initialize_rust_exp prototype.
2555         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2556         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2557         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2558         * score-tdep.c: Remove _initialize_score_tdep prototype.
2559         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2560         prototype.
2561         * ser-go32.c: Remove _initialize_ser_dos prototype.
2562         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2563         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2564         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2565         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2566         * serial.c: Remove _initialize_serial prototype.
2567         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2568         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2569         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2570         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2571         * skip.c: Remove _initialize_step_skip prototype.
2572         * sol-thread.c: Remove _initialize_sol_thread prototype.
2573         * solib-aix.c: Remove _initialize_solib_aix prototype.
2574         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2575         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2576         * solib-frv.c: Remove _initialize_frv_solib prototype.
2577         * solib-spu.c: Remove _initialize_spu_solib prototype.
2578         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2579         * solib-target.c: Remove _initialize_solib_target prototype.
2580         * solib.c: Remove _initialize_solib prototype.
2581         * source.c: Remove _initialize_source prototype.
2582         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2583         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2584         prototype.
2585         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2586         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2587         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2588         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2589         prototype.
2590         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2591         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2592         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2593         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2594         prototype.
2595         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2596         prototype.
2597         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2598         prototype.
2599         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2600         prototype.
2601         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2602         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2603         prototype.
2604         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2605         prototype.
2606         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2607         prototype.
2608         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2609         prototype.
2610         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2611         prototype.
2612         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2613         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2614         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2615         * stabsread.c: Remove _initialize_stabsread prototype.
2616         * stack.c: Remove _initialize_stack prototype.
2617         * stap-probe.c: Remove _initialize_stap_probe prototype.
2618         * std-regs.c: Remove _initialize_frame_reg prototype.
2619         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2620         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2621         * symfile.c: Remove _initialize_symfile prototype.
2622         * symmisc.c: Remove _initialize_symmisc prototype.
2623         * symtab.c: Remove _initialize_symtab prototype.
2624         * target-dcache.c: Remove _initialize_target_dcache prototype.
2625         * target-descriptions.c: Remove _initialize_target_descriptions
2626         prototype.
2627         * thread.c: Remove _initialize_thread prototype.
2628         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2629         prototype.
2630         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2631         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2632         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2633         prototype.
2634         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2635         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2636         * tracefile.c: Remove _initialize_tracefile prototype.
2637         * tracepoint.c: Remove _initialize_tracepoint prototype.
2638         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2639         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2640         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2641         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2642         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2643         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2644         * tui/tui.c: Remove _initialize_tui prototype.
2645         * typeprint.c: Remove _initialize_typeprint prototype.
2646         * user-regs.c: Remove _initialize_user_regs prototype.
2647         * utils.c: Remove _initialize_utils prototype.
2648         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2649         * valarith.c: Remove _initialize_valarith prototype.
2650         * valops.c: Remove _initialize_valops prototype.
2651         * valprint.c: Remove _initialize_valprint prototype.
2652         * value.c: Remove _initialize_values prototype.
2653         * varobj.c: Remove _initialize_varobj prototype.
2654         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2655         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2656         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2657         * windows-nat.c: Remove _initialize_windows_nat,
2658         _initialize_check_for_gdb_ini, and _initialize_loadable
2659         prototypes.
2660         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2661         * xcoffread.c: Remove _initialize_xcoffread prototype.
2662         * xml-support.c: Remove _initialize_xml_support prototype.
2663         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2664         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2665         prototype.
2666         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2667         prototype.
2668         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2669
2670 2017-09-08  Keith Seitz  <keiths@redhat.com>
2671
2672         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2673         field.
2674
2675 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2676
2677         * f-valprint.c (f_val_print): Remove check for one byte
2678         sized integers. Remove printing of character type.
2679
2680 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2681             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2682             Bernhard Heckel  <bernhard.heckel@intel.com>
2683
2684         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2685         to maintain proper indentation when printing pointers/refs.
2686
2687 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2688
2689         GDB 8.0.1 released.
2690
2691 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2692
2693         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2694
2695 2017-09-05  Tom Tromey  <tom@tromey.com>
2696
2697         * parse.c (funcall_chain): Now a std::vector.
2698         (start_arglist, end_arglist): Simplify.
2699         (free_funcalls): Remove.
2700         (parse_exp_in_context_1): Remove cleanup.
2701
2702 2017-09-05  Tom Tromey  <tom@tromey.com>
2703
2704         * go-exp.y (go_parse): Don't create a cleanup.
2705
2706 2017-09-05  Tom Tromey  <tom@tromey.com>
2707
2708         * d-exp.y (PrimaryExpression): Use std::string.
2709         (d_parse): Don't create a cleanup.
2710
2711 2017-09-05  Tom Tromey  <tom@tromey.com>
2712
2713         * utils.c (do_clear_parser_state): Remove.
2714         (make_cleanup_clear_parser_state): Remove.
2715         * p-exp.y (pascal_parse): Use scoped_restore.
2716         * m2-exp.y (m2_parse): Use scoped_restore.
2717         * f-exp.y (f_parse): Use scoped_restore.
2718         * d-exp.y (d_parse): Use scoped_restore.
2719         * c-exp.y (c_parse): Use scoped_restore.
2720         * ada-exp.y (ada_parse): Use scoped_restore.
2721         * utils.h (make_cleanup_clear_parser_state): Remove.
2722
2723 2017-09-06  Keith Seitz  <keiths@redhat.com>
2724
2725         * dwarf2read.c (dw2_linkage_name_attr): New function.
2726         (dw2_linkage_name): New function.
2727         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2728         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2729         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2730
2731 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2732
2733         * config/djgpp/djconfig.sh: Correct shell portability issue.
2734
2735 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2736
2737         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2738
2739 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2740
2741         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2742         * NEWS: Mention new FreeBSD/mips native configuration.
2743         * configure.host: Add aarch64*-*-freebsd*.
2744         * configure.nat: Likewise.
2745         * aarch64-fbsd-nat.c: New file.
2746
2747 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2748
2749         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2750         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2751         * NEWS: Mention new FreeBSD/aarch64 target.
2752         * configure.tgt: Add aarch64*-*-freebsd*.
2753         * aarch64-fbsd-tdep.c: New file.
2754         * aarch64-fbsd-tdep.h: New file.
2755
2756 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2757
2758         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2759
2760 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2761
2762         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2763         of TLS symbols.
2764
2765 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2766
2767         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2768         call.
2769
2770 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2771
2772         * infrun.c (follow_exec): Call add_thread after
2773         target_find_description.
2774
2775 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2776
2777         * infrun.c (handle_inferior_event_1): When exec'ing, read
2778         stop_pc after follow_exec.
2779
2780 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2781
2782         * remote.c (process_g_packet): Update error message.
2783
2784 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2785
2786         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2787         targets.
2788
2789 2017-09-05  Pedro Alves  <palves@redhat.com>
2790
2791         * eval.c (eval_call, evaluate_funcall): New functions, factored
2792         out from ...
2793         (evaluate_subexp_standard): ... this.
2794
2795 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2796
2797         * amd64-tdep.c (amd64_target_description): Create target
2798         descriptions.
2799         (_initialize_amd64_tdep): Don't call functions
2800         initialize_tdesc_amd64_*.  Add self tests.
2801         * arch/amd64.c (amd64_create_target_description): Add parameter
2802         is_linux.  Call set_tdesc_osabi if is_linux is true.
2803         * arch/amd64.h (amd64_create_target_description): Update the
2804         declaration.
2805         * arch/i386.c (i386_create_target_description): Add parameter
2806         is_linux.  Call set_tdesc_osabi if is_linux is true.
2807         * arch/i386.h (i386_create_target_description): Update
2808         declaration.
2809         * configure.tgt: Add i386.o to gdb_target_obs.
2810         * features/Makefile (XMLTOC): Remove i386/*.xml.
2811         * features/i386/amd64-avx-avx512.c: Remove.
2812         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2813         * features/i386/amd64-avx-mpx.c: Remove.
2814         * features/i386/amd64-avx.c: Remove.
2815         * features/i386/amd64-mpx.c: Remove.
2816         * features/i386/amd64.c: Remove.
2817         * features/i386/i386-avx-avx512.c: Remove.
2818         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2819         * features/i386/i386-avx-mpx.c: Remove.
2820         * features/i386/i386-avx.c: Remove.
2821         * features/i386/i386-mmx.c: Remove.
2822         * features/i386/i386-mpx.c: Remove.
2823         * features/i386/i386.c: Remove.
2824         * i386-tdep.c: Don't include features/i386/i386*.c., include
2825         target-descriptions.h and arch/i386.h.
2826         (i386_target_description): Create target descriptions.
2827         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2828         functions.  Do self tests.
2829
2830 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2831
2832         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2833         * features/i386/amd64-avx-avx512-linux.c: Removed.
2834         * features/i386/amd64-avx-linux.c: Removed.
2835         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2836         * features/i386/amd64-avx-mpx-linux.c: Removed.
2837         * features/i386/amd64-linux.c: Removed.
2838         * features/i386/amd64-mpx-linux.c: Removed.
2839         * features/i386/x32-avx-avx512-linux.c: Removed.
2840         * features/i386/x32-avx-linux.c: Removed.
2841         * features/i386/x32-linux.c: Removed.
2842
2843 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2844
2845         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2846         features/i386/*.c.
2847         (amd64_linux_read_description): Call
2848         amd64_create_target_description.
2849         * arch/amd64.c: New file.
2850         * arch/amd64.h: New file.
2851         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2852         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2853
2854 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2855
2856         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2857         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2858         (amd64_linux_read_description): Create target descriptions.
2859         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2860         functions.  Add unit tests.
2861         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2862         x32-core.xml.
2863         * features/i386/64bit-avx.c: Generated.
2864         * features/i386/64bit-avx512.c: Generated.
2865         * features/i386/64bit-core.c: Generated.
2866         * features/i386/64bit-linux.c: Generated.
2867         * features/i386/64bit-mpx.c: Generated.
2868         * features/i386/64bit-pkeys.c: Generated.
2869         * features/i386/64bit-segments.c: Generated.
2870         * features/i386/64bit-sse.c: Generated.
2871         * features/i386/x32-core.c: Generated.
2872         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2873         c files for amd64-linux and x32-linux.
2874
2875 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2876
2877         * amd64-linux-tdep.c (amd64_linux_read_description): New
2878         function.
2879         (amd64_linux_core_read_description): Call
2880         amd64_linux_read_description.
2881         (amd64_linux_init_abi): Likewise.
2882         (amd64_x32_linux_init_abi): Likewise.
2883         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2884         * x86-linux-nat.c (x86_linux_read_description): Call
2885         amd64_linux_read_description.
2886
2887 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2888
2889         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2890         comments.
2891
2892 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2893
2894         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2895         * features/i386/i386-avx-avx512-linux.c: Remove.
2896         * features/i386/i386-avx-linux.c: Remove.
2897         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2898         * features/i386/i386-avx-mpx-linux.c: Remove.
2899         * features/i386/i386-linux.c: Remove.
2900         * features/i386/i386-mmx-linux.c: Remove.
2901         * features/i386/i386-mpx-linux.c: Remove.
2902
2903 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2904
2905         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2906         (SFILES): Add arch/i386.c.
2907         (HFILES_NO_SRCDIR): Add arch/i386.h.
2908         * arch/i386.c: New file.
2909         * arch/i386.h: New file.
2910         * arch/tdesc.h (allocate_target_description): Declare.
2911         (set_tdesc_architecture): Declare.
2912         (set_tdesc_osabi): Declare.
2913         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2914         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2915         include arch/i386.h.
2916         (i386_linux_read_description): Remove code and call
2917         i386_create_target_description.
2918         (set_tdesc_architecture): New function.
2919         (set_tdesc_osabi): New function.
2920         * target-descriptions.h (allocate_target_description): Remove.
2921
2922 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2923
2924         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2925         * target-descriptions.c (tdesc_create_feature): Likewise, and
2926         adjust code.
2927         * features/i386/32bit-avx.c: Re-generated.
2928         * features/i386/32bit-avx512.c: Re-generated.
2929         * features/i386/32bit-core.c: Re-generated.
2930         * features/i386/32bit-linux.c: Re-generated.
2931         * features/i386/32bit-mpx.c: Re-generated.
2932         * features/i386/32bit-pkeys.c: Re-generated.
2933         * features/i386/32bit-sse.c: Re-generated.
2934
2935 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2936
2937         * regformats/regdef.h (struct reg): Override operator == and !=.
2938
2939 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2940
2941         * arch/tdesc.h: New file.
2942         * regformats/regdat.sh: Generate code using tdesc_create_reg.
2943         * target-descriptions.c: Update comments.
2944         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
2945         declarations.
2946         * features/i386/32bit-avx.c: Re-generated.
2947         * features/i386/32bit-avx512.c: Re-generated.
2948         * features/i386/32bit-core.c: Re-generated.
2949         * features/i386/32bit-linux.c: Re-generated.
2950         * features/i386/32bit-mpx.c: Re-generated.
2951         * features/i386/32bit-pkeys.c: Re-generated.
2952         * features/i386/32bit-sse.c: Re-generated.
2953
2954 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2955
2956         * regformats/regdat.sh: Update generated code.
2957
2958 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2959
2960         * regformats/regdat.sh: Adjust code order.
2961
2962 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2963
2964         * expprint.c (dump_subexp_body_standard): Use constant format
2965         string in fprintf_filtered call.
2966
2967 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2968
2969         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2970         NetBSD/i386.
2971         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2972
2973 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2974
2975         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2976
2977 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2978
2979         * bsd-kvm.o: Define _KMEMUSER.
2980         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2981         * configure: Regenerate.
2982
2983 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2984
2985         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2986         * i386-fbsd-nat.c: Likewise.
2987
2988 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2989
2990         * unittests/array-view-selftests.c: Add include of <array>.
2991
2992 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2993
2994         * spu-tdep.c (flush_ea_cache): Add missing argument to
2995         call_function_by_hand.
2996
2997 2017-09-04  Pedro Alves  <palves@redhat.com>
2998
2999         * NEWS (Safer support for debugging with no debug info): New.
3000
3001 2017-09-04  Pedro Alves  <palves@redhat.com>
3002
3003         * c-exp.y (function_method, function_method_void): Add current
3004         instance flags to TYPE_INSTANCE.
3005         * dwarf2read.c (check_modifier): New.
3006         (compute_delayed_physnames): Assert that only C++ adds delayed
3007         physnames.  Mark fn_fields as const/volatile depending on
3008         physname.
3009         * eval.c (make_params): New type_instance_flags parameter.  Use
3010         it as the new type's instance flags.
3011         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3012         flags element and pass it to make_params.
3013         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3014         instance flags element.
3015         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3016         * gdbtypes.h: Include "enum-flags.h".
3017         (type_instance_flags): New enum-flags type.
3018         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3019         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3020         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3021         (follow_type_instance_flags): New function.
3022         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3023         * parser-defs.h (follow_type_instance_flags): Declare.
3024         * valops.c (value_struct_elt_for_reference): const/volatile must
3025         match too.
3026
3027 2017-09-04  Pedro Alves  <palves@redhat.com>
3028
3029         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3030         function/method scopes; lookup the nested name as a function local
3031         static variable.
3032
3033 2017-09-04  Pedro Alves  <palves@redhat.com>
3034
3035         (%type <voidval>): Add function_method.
3036         * c-exp.y (exp): New production for calls with no arguments.
3037         (function_method, function_method_void_or_typelist): New
3038         productions.
3039         (exp): New production for "method()::static_var".
3040         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3041         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3042         Handle OP_FUNC_STATIC_VAR.
3043         * parse.c (operator_length_standard):
3044         Handle OP_FUNC_STATIC_VAR.
3045
3046 2017-09-04  Pedro Alves  <palves@redhat.com>
3047
3048         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3049         handling.
3050         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3051         Ditto.
3052         * parse.c (operator_length_standard, operator_check_standard):
3053         Ditto.
3054         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3055
3056 2017-09-04  Pedro Alves  <palves@redhat.com>
3057
3058         * ax-gdb.c: Include "typeprint.h".
3059         (gen_expr_for_cast): New function.
3060         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3061         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3062         type is unknown.
3063         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3064         nodebug_data_symbol.
3065         * eval.c: Include "typeprint.h".
3066         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3067         Error out if symbol has unknown type.
3068         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3069         evaluate_subexp_for_cast.
3070         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3071         OP_VAR_MSYM_VALUE.
3072         (evaluate_subexp_for_cast): New function.
3073         * gdbtypes.c (init_nodebug_var_type): New function.
3074         (objfile_type): Use it to initialize types of variables with no
3075         debug info.
3076         * typeprint.c (error_unknown_type): New.
3077         * typeprint.h (error_unknown_type): New declaration.
3078         * compile/compile-c-types.c (convert_type_basic): Handle
3079         TYPE_CODE_ERROR; warn and fallback to int for variables with
3080         unknown type.
3081
3082 2017-09-04  Pedro Alves  <palves@redhat.com>
3083
3084         * eval.c (evaluate_var_value): New function, factored out from ...
3085         (evaluate_subexp_standard): ... here.
3086
3087 2017-09-04  Pedro Alves  <palves@redhat.com>
3088
3089         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3090         Remove useless assignments to 'op'.
3091
3092 2017-09-04  Pedro Alves  <palves@redhat.com>
3093
3094         * eval.c (eval_skip_value): New function.
3095         (evaluate_subexp_standard): Use it.
3096
3097 2017-09-04  Pedro Alves  <palves@redhat.com>
3098
3099         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3100         function name from symbol/minsym and pass it to
3101         error_call_unknown_return_type.
3102
3103 2017-09-04  Pedro Alves  <palves@redhat.com>
3104
3105         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3106         * ax-gdb.c (gen_msym_var_ref): New function.
3107         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3108         * eval.c (evaluate_var_msym_value): New function.
3109         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3110         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3111         to call_function_by_hand.
3112         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3113         Handle OP_VAR_MSYM_VALUE.
3114         (union exp_element) <msymbol>: New field.
3115         * minsyms.h (struct type): Forward declare.
3116         (find_minsym_type_and_address): Declare.
3117         * parse.c (write_exp_elt_msym): New function.
3118         (write_exp_msymbol): Delete, refactored as ...
3119         (find_minsym_type_and_address): ... this new function.
3120         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3121         (operator_length_standard, operator_check_standard): Handle
3122         OP_VAR_MSYM_VALUE.
3123         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3124
3125 2017-09-04  Pedro Alves  <palves@redhat.com>
3126
3127         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3128         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3129         unknown.
3130         * ada-typeprint.c (print_func_type): Handle functions with unknown
3131         return type.
3132         * c-typeprint.c (c_type_print_base): Handle functions and methods
3133         with unknown return type.
3134         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3135         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3136         * compile/compile-c-types.c: Include "objfiles.h".
3137         (convert_func): For functions with unknown return type, warn and
3138         default to int.
3139         * compile/compile-object-run.c (compile_object_run): Adjust call
3140         to call_function_by_hand_dummy.
3141         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3142         call_function_by_hand.
3143         * eval.c (evaluate_subexp_standard): Adjust calls to
3144         call_function_by_hand.  Handle functions and methods with unknown
3145         return type.  Pass expect_type to call_function_by_hand.
3146         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3147         return type.
3148         * gcore.c (call_target_sbrk): Adjust call to
3149         call_function_by_hand.
3150         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3151         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3152         an integer address type instead of nodebug.
3153         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3154         call_function_by_hand.
3155         * infcall.c (error_call_unknown_return_type): New function.
3156         (call_function_by_hand): New "default_return_type" parameter.
3157         Pass it down.
3158         (call_function_by_hand_dummy): New "default_return_type"
3159         parameter.  Use it instead of defaulting to int.  If there's no
3160         default and the return type is unknown, throw an error.  If
3161         there's a default return type, and the called function has no
3162         debug info, then assume the function is prototyped.
3163         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3164         New "default_return_type" parameter.
3165         (error_call_unknown_return_type): New declaration.
3166         * linux-fork.c (call_lseek): Cast return type of lseek.
3167         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3168         call_function_by_hand.
3169         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3170         calls to call_function_by_hand.
3171         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3172         return type.
3173         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3174         (value_nsstring, print_object_command): Adjust calls to
3175         call_function_by_hand.
3176         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3177         functions with unknown return type.
3178         (pascal_type_print_func_varspec_suffix): New function.
3179         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3180         TYPE_CODE_METHOD>: Use it.
3181         * python/py-value.c (valpy_call): Adjust call to
3182         call_function_by_hand.
3183         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3184         call_function_by_hand.
3185         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3186         call_function_by_hand.
3187         * valops.c (value_allocate_space_in_inferior): Adjust call to
3188         call_function_by_hand.
3189         * typeprint.c (type_print_unknown_return_type): New function.
3190         * typeprint.h (type_print_unknown_return_type): New declaration.
3191
3192 2017-09-04  Pedro Alves  <palves@redhat.com>
3193
3194         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3195         types with more than one parameter as prototyped.
3196
3197 2017-09-04  Pedro Alves  <palves@redhat.com>
3198
3199         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3200         (disassemble_command): Use gdb_disassembly_flags instead of bare
3201         int.
3202         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3203         (dump_insns, do_mixed_source_and_assembly_deprecated)
3204         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3205         Use gdb_disassembly_flags instead of bare int.
3206         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3207         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3208         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3209         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3210         (enum gdb_disassembly_flag): ... values of this new enumeration.
3211         (gdb_disassembly_flags): Define.
3212         (gdb_disassembly)
3213         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3214         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3215         gdb_disassembly_flags instead of bare int.
3216         * record-btrace.c (btrace_insn_history)
3217         (record_btrace_insn_history, record_btrace_insn_history_range)
3218         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3219         instead of bare int.
3220         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3221         Use gdb_disassembly_flags instead of bare int.
3222         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3223         Define.
3224         * target-delegates.c: Regenerate.
3225         * target.c (target_insn_history, target_insn_history_from)
3226         (target_insn_history_range): Use gdb_disassembly_flags instead of
3227         bare int.
3228         * target.h: Include "disasm.h".
3229         (struct target_ops) <to_insn_history, to_insn_history_from,
3230         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3231         int.
3232         (target_insn_history, target_insn_history_from)
3233         (target_insn_history_range): Use gdb_disassembly_flags instead of
3234         bare int.
3235
3236 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3237
3238         * cli/cli-script.c (build_command_line): For if/while commands,
3239         check whether args is empty.
3240
3241 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3242
3243         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3244         (enum command_control_type): Likewise.
3245         (struct command_line): Likewise.
3246         (free_command_lines): Likewise.
3247         (struct command_lines_deleter): Likewise.
3248         (command_line_up): Likewise.
3249         (read_command_lines): Likewise.
3250         (read_command_lines_1): Likewise.
3251         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3252         (enum command_control_type): Likewise.
3253         (struct command_line): Likewise.
3254         (free_command_lines): Likewise.
3255         (struct command_lines_deleter): Likewise.
3256         (command_line_up): Likewise.
3257         (read_command_lines): Likewise.
3258         (read_command_lines_1): Likewise.
3259         * breakpoint.h: Include cli/cli-script.h.
3260         * extension-priv.h: Likewise.
3261         * gdbcmd.h: Likewise.
3262
3263 2017-09-04  Pedro Alves  <palves@redhat.com>
3264
3265         * ada-lang.c (is_known_support_routine): Move sal declaration to
3266         where it is initialized.
3267         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3268         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3269         (clear_command, update_static_tracepoint): Remove init_sal
3270         references.  Move declarations closer to initializations.
3271         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3272         initializations.
3273         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3274         references.  Move sal declarations closer to initializations.
3275         * frame.c (find_frame_sal): Return a symtab_and_line via function
3276         return instead of output parameter.  Remove init_sal references.
3277         * frame.h (find_frame_sal): Return a symtab_and_line via function
3278         return instead of output parameter.
3279         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3280         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3281         instead of memset.
3282         (gdbscm_find_pc_line): Remove init_sal reference.
3283         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3284         references.  Move declarations closer to initializations.
3285         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3286         initializations.
3287         (finish_backward): Remove init_sal references.  Move declarations
3288         closer to initializations.
3289         * infrun.c (process_event_stop_test, handle_step_into_function)
3290         (insert_hp_step_resume_breakpoint_at_frame)
3291         (insert_step_resume_breakpoint_at_caller): Likewise.
3292         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3293         (symbol_to_sal): Likewise.
3294         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3295         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3296         to its initialization.
3297         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3298         init_sal references.  Move declarations closer to initializations.
3299         * source.c (get_current_source_symtab_and_line): Remove brace
3300         initialization.
3301         (set_current_source_symtab_and_line): Now takes the sal by const
3302         reference.  Remove brace initialization.
3303         (line_info): Remove init_sal reference.
3304         * source.h (set_current_source_symtab_and_line): Now takes a
3305         symtab_and_line via const reference.
3306         * stack.c (set_current_sal_from_frame): Adjust.
3307         (print_frame_info): Adjust.
3308         (get_last_displayed_sal): Return the sal via function return
3309         instead of via output parameter.  Simplify.
3310         (frame_info): Adjust.
3311         * stack.h (get_last_displayed_sal): Return the sal via function
3312         return instead of via output parameter.
3313         * symtab.c (init_sal): Delete.
3314         (find_pc_sect_line): Remove init_sal references.  Move
3315         declarations closer to initializations.
3316         (find_function_start_sal): Remove init_sal references.  Move
3317         declarations closer to initializations.
3318         * symtab.h (struct symtab_and_line): In-class initialize all
3319         fields.
3320         * tracepoint.c (set_traceframe_context)
3321         (print_one_static_tracepoint_marker): Remove init_sal references.
3322         Move declarations closer to initializations.
3323         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3324         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3325         declarations closer to initializations.
3326         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3327         init_sal references.  Adjust.
3328
3329 2017-09-04  Pedro Alves  <palves@redhat.com>
3330
3331         * ax-gdb.c (agent_command_1): Use range-for.
3332         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3333         * breakpoint.c: Include "common/array-view.h".
3334         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3335         parameter from struct symtabs_and_lines to
3336         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3337         (breakpoint_sals_to_pc): Change sals parameter from struct
3338         symtabs_and_lines to std::vector reference.
3339         (check_fast_tracepoint_sals): Change sals parameter from struct
3340         symtabs_and_lines to std::array_view.  Use range-for.
3341         (decode_static_tracepoint_spec): Return a std::vector instead of
3342         symtabs_and_lines.  Update.
3343         (create_breakpoint): Update.
3344         (break_range_command, until_break_command, clear_command): Update.
3345         (base_breakpoint_decode_location, bkpt_decode_location)
3346         (bkpt_probe_create_sals_from_location)
3347         (bkpt_probe_decode_location, tracepoint_decode_location)
3348         (tracepoint_probe_decode_location)
3349         (strace_marker_create_sals_from_location): Return a std::vector
3350         instead of symtabs_and_lines.
3351         (strace_marker_create_breakpoints_sal): Update.
3352         (strace_marker_decode_location): Return a std::vector instead of
3353         symtabs_and_lines.  Update.
3354         (update_breakpoint_locations): Change struct symtabs_and_lines
3355         parameters to gdb::array_view.  Adjust.
3356         (location_to_sals): Return a std::vector instead of
3357         symtabs_and_lines.  Update.
3358         (breakpoint_re_set_default): Use std::vector instead of struct
3359         symtabs_and_lines.
3360         (decode_location_default): Return a std::vector instead of
3361         symtabs_and_lines.  Update.
3362         * breakpoint.h: Include "common/array-view.h".
3363         (struct breakpoint_ops) <decode_location>: Now returns a
3364         std::vector instead of returning a symtabs_and_lines via output
3365         parameter.
3366         (update_breakpoint_locations): Change sals parameters to use
3367         gdb::array_view.
3368         * cli/cli-cmds.c (edit_command, list_command): Update to use
3369         std::vector and gdb::array_view.
3370         (ambiguous_line_spec): Adjust to use gdb::array_view and
3371         range-for.
3372         (compare_symtabs): Rename to ...
3373         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3374         const reference and adjust.
3375         (filter_sals): Rewrite using std::vector and standard algorithms.
3376         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3377         (jump_command): Update to use std::vector.
3378         * linespec.c (struct linespec_state) <canonical_names>: Update
3379         comment.
3380         (add_sal_to_sals_basic): Delete.
3381         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3382         (decode_line_2, create_sals_line_offset)
3383         (convert_address_location_to_sals, convert_linespec_to_sals)
3384         (convert_explicit_location_to_sals, parse_linespec)
3385         (event_location_to_sals, decode_line_full, decode_line_1)
3386         (decode_line_with_current_source)
3387         (decode_line_with_last_displayed, decode_objc)
3388         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3389         (linespec_result::~linespec_result): Adjust to use std::vector
3390         instead of symtabs_and_lines.
3391         * linespec.h (linespec_sals::sals): Now a std::vector.
3392         (struct linespec_result): Use std::vector, bool, and in-class
3393         initialization.
3394         (decode_line_1, decode_line_with_current_source)
3395         (decode_line_with_last_displayed): Return std::vector.
3396         * macrocmd.c (info_macros_command): Use std::vector.
3397         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3398         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3399         std::vector.
3400         * probe.h (parse_probes): Return a std::vector.
3401         * python/python.c (gdbpy_decode_line): Use std::vector and
3402         gdb::array_view.
3403         * source.c (select_source_symtab, line_info): Use std::vector.
3404         * stack.c (func_command): Use std::vector.
3405         * symtab.h (struct symtabs_and_lines): Delete.
3406         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3407
3408 2017-09-04  Pedro Alves  <palves@redhat.com>
3409
3410         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3411         unittests/array-view-selftests.c.
3412         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3413         * common/array-view.h: New file.
3414         * unittests/array-view-selftests.c: New file.
3415
3416 2017-09-04  Pedro Alves  <palves@redhat.com>
3417
3418         * cli/cli-cmds.c (edit_command): Pass message to
3419         ambiguous_line_spec.
3420         (list_command): Pass message to ambiguous_line_spec.  Say
3421         "first"/"last" instead of "start" and "end" to be consistent with
3422         the manual.
3423         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3424         them to print formatted message.
3425
3426 2017-09-04  Pedro Alves  <palves@redhat.com>
3427
3428         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3429         ftrace_update_insns by reference instead of pointer.
3430
3431 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3432
3433         * i386-go32-tdep.c: Include x86-xstate.h.
3434         (i386_go32_init_abi): Call i386_target_description.
3435         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3436         if xcr0 is X86_XSTATE_X87_MASK.
3437         * i386-tdep.h (tdesc_i386): Remove the declaration.
3438         (tdesc_i386_mmx): Likewise.
3439
3440 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3441
3442         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3443         X86_XSTATE_SSE_MASK instead of 0.
3444
3445 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3446
3447         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3448         i386_target_description.
3449         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3450         i386_target_description.
3451         * i386-tdep.c (i386_gdbarch_init): Likewise.
3452
3453 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3454
3455         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3456         (x86_darwin_init_abi_64): Call amd64_target_description.
3457         * amd64-dicos-tdep.c: Likewise.
3458         * amd64-fbsd-nat.c: Likewise.
3459         * amd64-fbsd-tdep.c: Likewise.
3460         * amd64-nbsd-tdep.c: Likewise.
3461         * amd64-obsd-tdep.c: Likewise.
3462         * amd64-sol2-tdep.c: Likewise.
3463         * amd64-windows-tdep.c: Likewise.
3464         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3465
3466 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3467
3468         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3469         (btrace_function) <insn>: Change type to use std::vector.
3470         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3471         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3472         ftrace_update_insns, ftrace_compute_global_level_offset,
3473         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3474         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3475         change to std::vector.
3476         (ftrace_update_insns): Adjust to change to std::vector, change
3477         type of INSN parameter.
3478         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3479         * record-btrace.c (btrace_call_history_insn_range,
3480         btrace_compute_src_line_range,
3481         record_btrace_frame_prev_register): Adjust to change to
3482         std::vector.
3483         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3484         to change to std::vector.
3485
3486 2017-09-03  Tom Tromey  <tom@tromey.com>
3487
3488         * corefile.c (reopen_exec_file): Use std::string.
3489
3490 2017-09-03  Tom Tromey  <tom@tromey.com>
3491
3492         * compile/compile.c (compile_register_name_mangled): Return
3493         std::string.
3494         * compile/compile-loc2c.c (pushf_register_address): Update.
3495         (pushf_register): Update.
3496         * compile/compile-c-types.c (convert_array): Update.
3497         * compile/compile-c-symbols.c (generate_vla_size): Update.
3498         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3499         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3500         (convert_one_symbol): Update.
3501         (generate_c_for_for_one_variable): Update.
3502         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3503         std::string.
3504         (generate_register_struct): Update.
3505         * compile/compile-internal.h (c_get_range_decl_name): Return a
3506         std::string.
3507         (compile_register_name_mangled): Return std::string.
3508
3509 2017-09-03  Tom Tromey  <tom@tromey.com>
3510
3511         * utils.c (perror_string): Return a std::string.
3512         (throw_perror_with_name, perror_warning_with_name): Update.
3513
3514 2017-09-03  Tom Tromey  <tom@tromey.com>
3515
3516         * demangle.c (demangle_command): Use std::string,
3517         unique_xmalloc_ptr.
3518
3519 2017-09-03  Tom Tromey  <tom@tromey.com>
3520
3521         * cli/cli-setshow.c (do_set_command): Use std::string.
3522
3523 2017-09-03  Tom Tromey  <tom@tromey.com>
3524
3525         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3526
3527 2017-09-03  Tom Tromey  <tom@tromey.com>
3528
3529         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3530
3531 2017-09-03  Tom Tromey  <tom@tromey.com>
3532
3533         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3534         gdb::unique_xmalloc_ptr.
3535
3536 2017-09-03  Tom Tromey  <tom@tromey.com>
3537
3538         * thread.c (print_thread_info_1): Use string_printf.
3539         (thread_apply_command, thread_apply_all_command): Use
3540         std::string.
3541
3542 2017-09-03  Tom Tromey  <tom@tromey.com>
3543
3544         * valprint.c (val_print_string): Update.
3545         * gdbcore.h (memory_error_message): Return std::string.
3546         * corefile.c (memory_error_message): Return std::string.
3547         (memory_error): Update.
3548         * breakpoint.c (insert_bp_location): Update.
3549
3550 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3551
3552         * target/waitstatus.h (target_waitstatus_to_string): Change
3553         return type to std::string.
3554         * target/waitstatus.c (target_waitstatus_to_string): Return
3555         std::string.
3556         * target.h (target_waitstatus_to_string): Remove declaration.
3557         * infrun.c (resume, clear_proceed_status_thread,
3558         print_target_wait_results, do_target_wait, save_waitstatus,
3559         stop_all_threads): Adjust.
3560         * record-btrace.c (record_btrace_wait): Adjust.
3561         * target-debug.h
3562         (target_debug_print_struct_target_waitstatus_p): Adjust.
3563
3564 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3565
3566         PR gdb/22046
3567         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3568         detection.
3569
3570 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3571
3572         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3573         for setting/unsetting environment variables on the remote target.
3574         (New remote packets): Add entries for QEnvironmentHexEncoded,
3575         QEnvironmentUnset and QEnvironmentReset.
3576         * common/environ.c (gdb_environ::operator=): Extend method to
3577         handle m_user_set_env_list and m_user_unset_env_list.
3578         (gdb_environ::clear): Likewise.
3579         (match_var_in_string): Change type of first parameter from 'char
3580         *' to 'const char *'.
3581         (gdb_environ::set): Extend method to handle
3582         m_user_set_env_list and m_user_unset_env_list.
3583         (gdb_environ::unset): Likewise.
3584         (gdb_environ::clear_user_set_env): New method.
3585         (gdb_environ::user_set_envp): Likewise.
3586         (gdb_environ::user_unset_envp): Likewise.
3587         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3588         m_user_unset_env_list on move constructor/assignment.
3589         (unset): Add new default parameter 'update_unset_list = true'.
3590         (clear_user_set_env): New method.
3591         (user_set_envp): Likewise.
3592         (user_unset_envp): Likewise.
3593         (m_user_set_env_list): New std::set.
3594         (m_user_unset_env_list): Likewise.
3595         * common/rsp-low.c (hex2str): New function.
3596         (bin2hex): New overload for bin2hex function.
3597         * common/rsp-low.c (hex2str): New prototype.
3598         (str2hex): New overload prototype.
3599         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3600         QEnvironmentUnset and QEnvironmentReset.
3601         (remote_protocol_features): Add QEnvironmentHexEncoded,
3602         QEnvironmentUnset and QEnvironmentReset packets.
3603         (send_environment_packet): New function.
3604         (extended_remote_environment_support): Likewise.
3605         (extended_remote_create_inferior): Call
3606         extended_remote_environment_support.
3607         (_initialize_remote): Add QEnvironmentHexEncoded,
3608         QEnvironmentUnset and QEnvironmentReset packet configs.
3609         * unittests/environ-selftests.c (gdb_selftest_env_var):
3610         New variable.
3611         (test_vector_initialization): New function.
3612         (test_init_from_host_environ): Likewise.
3613         (test_reinit_from_host_environ): Likewise.
3614         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3615         Likewise.
3616         (test_unset_set_empty_vector): Likewise.
3617         (test_vector_clear): Likewise.
3618         (test_std_move): Likewise.
3619         (test_move_constructor):
3620         (test_self_move): Likewise.
3621         (test_set_unset_reset): Likewise.
3622         (run_tests): Rewrite in terms of the functions above.
3623
3624 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3625
3626         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3627         (adi_available): Use a temp variable of type CORE_ADDR as argument
3628         3 when calling target_auxv_search.
3629         (adi_normalize_address): Use masks and xor operators to calculate
3630         normalized address.
3631         (adi_read_versions, adi_write_versions, adi_print_versions)
3632         (do_examine, do_assign): Use paddress.
3633
3634 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3635
3636         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3637         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3638         out of loop and add supply of FIR.
3639         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3640         add collect of FIR.
3641
3642 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3643
3644         PR gdb/21827
3645         * cli/cli-script.c (define_command): Don't convert command name
3646         to lower case.
3647
3648 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3649
3650         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3651         Update all callers accordingly. Remove all code blocks handling
3652         the case where DISPP is not NULL.
3653
3654 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3655
3656         PR symtab/22003
3657         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3658         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3659         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3660
3661 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3662
3663         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3664         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3665         (read_comp_units_from_section): New parameter abbrev_section, use
3666         read_and_check_comp_unit_head, allocate signatured_type if needed.
3667         (create_all_comp_units): Update read_comp_units_from_section caller.
3668
3669 2017-08-23  Pedro Alves  <palves@redhat.com>
3670
3671         PR remote/21852
3672         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3673         to null_ptid and switch to thread without reading the registers
3674         after adding the inferior.
3675
3676 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3677
3678         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3679         compile-gcc.
3680         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3681         (compile_to_object): Implement compile_gcc.
3682         (_initialize_compile): Install "set compile-gcc".  Initialize
3683         compile_gcc.
3684
3685 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3686
3687         * compile/compile.c (compile_to_object): Conditionally call
3688         set_verbose.  Conditionally call compile or compile_v0.
3689
3690 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3691
3692         * sparc64-tdep.h: (adi_normalize_address): New export.
3693         * sparc-nat.h: (open_adi_tag_fd): New export.
3694         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3695         * sparc64-linux-tdep.c:
3696         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3697         (sparc64_linux_handle_segmentation_fault): New function.
3698         (sparc64_linux_init_abi): Register
3699         sparc64_linux_handle_segmentation_fault
3700         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3701         (sparc64_addr_bits_remove): New function.
3702         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3703         (MAX_PROC_NAME_SIZE): New macro.
3704         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3705         (sparc64adilist): New variable.
3706         (adi_proc_list): New variable.
3707         (find_adi_info): New function.
3708         (add_adi_info): New function.
3709         (get_adi_info_proc): New function.
3710         (get_adi_info): New function.
3711         (info_adi_command): New function.
3712         (read_maps_entry): New function.
3713         (adi_available): New function.
3714         (adi_normalize_address): New function.
3715         (adi_align_address): New function.
3716         (adi_convert_byte_count): New function.
3717         (adi_tag_fd): New function.
3718         (adi_is_addr_mapped): New function.
3719         (adi_read_versions): New function.
3720         (adi_write_versions): New function.
3721         (adi_print_versions): New function.
3722         (do_examine): New function.
3723         (do_assign): New function.
3724         (adi_examine_command): New function.
3725         (adi_assign_command): New function.
3726         (_initialize_sparc64_adi_tdep): New function.
3727
3728 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3729
3730         * breakpoint.c (breakpoints_info): Rename to ...
3731         (info_breakpoints_command): ... this.
3732         (watchpoints_info): Rename to ...
3733         (info_watchpoints_command): ... this.
3734         (tracepoints_info): Rename to ...
3735         (info_tracepoints_command): ... this.
3736         (_initialize_breakpoint): Adjust.
3737         * dcache.c (dcache_info): Rename to ...
3738         (info_display_command): ... this.
3739         (_initialize_dcache): Adjust.
3740         * frame.h (args_info): Rename to ...
3741         (info_args_command): ... this.
3742         (locals_info): Rename to ...
3743         (info_locals_command): ... this.
3744         * infcmd.c (nofp_registers_info): Rename to ...
3745         (info_registers_command): ... this.
3746         (float_info): Rename to ...
3747         (info_float_command): ... this.
3748         (program_info): Rename to ...
3749         (info_program_command): ... this.
3750         (all_registers_info): Rename to ...
3751         (info_all_registers_command): ... this.
3752         (vector_info): Rename to ...
3753         (info_vector_command): ... this.
3754         (float_info): Rename to ...
3755         (info_float_command): ... this.
3756         (_initialize_infcmd): Adjust.
3757         * inferior.h (term_info): Rename to ...
3758         (info_terminal_command): ... this.
3759         * inflow.c (term_info): Rename to ...
3760         (info_terminal_command): ... this.
3761         (_initialize_inflow): Adjust.
3762         * infrun.c (signals_info): Rename to ...
3763         (info_signals_command): ... this.
3764         (_initialize_infrun): Adjust.
3765         * objc-lang.c (classes_info): Rename to ...
3766         (info_classes_command): ... this.
3767         (selectors_info): Rename to ...
3768         (info_selectors_command): ... this.
3769         (_initialize_objc_language): Adjust.
3770         * printcmd.c (sym_info): Rename to ...
3771         (info_symbol_command): ... this.
3772         (address_info): Rename to ...
3773         (info_address_command): ... this.
3774         (display_info): Rename to ...
3775         (info_display_command): ... this.
3776         (_initialize_printcmd): Adjust.
3777         * reverse.c (bookmarks_info): Rename to ...
3778         (info_breakpoints_command): ... this.
3779         (_initialize_reverse): Adjust.
3780         * ser-go32.c (dos_info): Rename to ...
3781         (info_serial_command): ... this.
3782         (_initialize_ser_dos): Adjust.
3783         * skip.c (skip_info): Rename to ...
3784         (info_skip_command): ... this.
3785         (_initialize_step_skip): Adjust.
3786         * source.c (line_info): Rename to ...
3787         (info_line_command): ... this.
3788         (source_info): Rename to ...
3789         (info_source_command)
3790         * stack.c (frame_info): Rename to ...
3791         (info_frame_command): ... this.
3792         (locals_info): Rename to ...
3793         (info_locals_command): ... this.
3794         (args_info): Rename to ...
3795         (info_args_command): ... this.
3796         (_initialize_stack): Adjust.
3797         * symtab.c (sources_info): Rename to ...
3798         (info_sources_command): ... this.
3799         (variables_info): Rename to ...
3800         (info_variables_command): ... this.
3801         (functions_info): Rename to ...
3802         (info_functions_command): ... this.
3803         (types_info): Rename to ...
3804         (info_types_command): ... this.
3805         (_initialize_symtab): Adjust.
3806         * target.c (target_info): Rename to ...
3807         (info_target_command): ... this.
3808         (initialize_targets): Adjust.
3809         * tracepoint.c (tvariables_info): Rename to ...
3810         (info_tvariables_command): ... this.
3811         (scope_info): Rename to ...
3812         (info_scope_command): ... this.
3813         (trace_dump_actions): Adjust.
3814         (_initialize_tracepoint): Adjust.
3815
3816 2017-08-22  Tom Tromey  <tom@tromey.com>
3817
3818         * breakpoint.h (install_breakpoint): Update.
3819         * breakpoint.c (add_solib_catchpoint): Update.
3820         (install_breakpoint): Change argument to a std::unique_ptr.
3821         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3822         (create_breakpoint_sal, create_breakpoint): Update.
3823         (watch_command_1, catch_exec_command_1)
3824         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3825         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3826         Return the breakpoint.
3827         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3828         (new_single_step_breakpoint): Update.
3829         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3830         std::unique_ptr.
3831         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3832         std::unique_ptr.
3833         * break-catch-sig.c (create_signal_catchpoint): Use
3834         std::unique_ptr.
3835         * ada-lang.c (create_ada_exception_catchpoint): Use
3836         std::unique_ptr.
3837
3838 2017-08-22  Tom Tromey  <tom@tromey.com>
3839
3840         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3841
3842 2017-08-22  Tom Tromey  <tom@tromey.com>
3843
3844         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3845         (lookup_partial_symbol): Update.
3846
3847 2017-08-22  Tom Tromey  <tom@tromey.com>
3848
3849         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3850         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3851         (find_and_open_source, symtab_to_fullname): Update.
3852         * psymtab.c (psymtab_to_fullname): Update.
3853
3854 2017-08-22  Tom Tromey  <tom@tromey.com>
3855
3856         * exec.c (exec_file_attach): Update.
3857         * linux-thread-db.c (try_thread_db_load): Update.
3858         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3859         * utils.c (gdb_realpath): Change return type.
3860         (gdb_realpath_keepfile): Update.
3861         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3862         (_initialize_utils): Register the new self test.
3863         * source.c (openp): Update.
3864         (find_and_open_source): Update.
3865         * nto-tdep.c (nto_find_and_open_solib): Update.
3866         * main.c (set_gdb_data_directory): Update.
3867         (captured_main_1): Update.
3868         * dwarf2read.c (dwarf2_get_dwz_file): Update
3869         (dw2_map_symbol_filenames): Update.
3870         * auto-load.c (auto_load_safe_path_vec_update): Update.
3871         (filename_is_in_auto_load_safe_path_vec): Change type of
3872         "filename_realp".
3873         (auto_load_objfile_script): Update.
3874         (file_is_auto_load_safe): Update.  Use std::string.
3875         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3876
3877 2017-08-22  Tom Tromey  <tom@tromey.com>
3878
3879         * utils.c (gdb_realpath_keepfile): Return a
3880         gdb::unique_xmalloc_ptr.
3881         * exec.c (exec_file_attach): Update.
3882         * utils.h (gdb_realpath_keepfile): Return a
3883         gdb::unique_xmalloc_ptr.
3884
3885 2017-08-22  Tom Tromey  <tom@tromey.com>
3886
3887         * compile/compile.c (compile_file_command): Use
3888         gdb::unique_xmalloc_ptr, std::string.
3889         * utils.c (gdb_abspath): Change return type.
3890         * source.c (openp): Update.
3891         * objfiles.c (allocate_objfile): Update.
3892         * main.c (set_gdb_data_directory): Update.
3893         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3894
3895 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3896
3897         * cli-cmds.c (list_commands): List actual code around more than
3898         one location.
3899
3900 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3901
3902         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3903
3904 2017-08-21  Pedro Alves  <palves@redhat.com>
3905
3906         PR gdb/19487
3907         * c-exp.y (variable production): Handle function aliases.
3908         * minsyms.c (msymbol_is_text): New function.
3909         * minsyms.h (msymbol_is_text): Declare.
3910         * symtab.c (find_function_alias_target): New function.
3911         * symtab.h (find_function_alias_target): Declare.
3912
3913 2017-08-21  Pedro Alves  <palves@redhat.com>
3914
3915         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3916         typedefs.
3917         * typeprint.c (whatis_exp): If handling "whatis", and expression
3918         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3919         typedefs here.
3920         * valops.c (value_cast): Save "to" type before resolving
3921         stubs/typedefs.  Use that type as resulting value's type.
3922
3923 2017-08-18  Tom Tromey  <tom@tromey.com>
3924             Pedro Alves  <palves@redhat.com>
3925
3926         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3927         * sol-thread.c (sol_thread_resume, sol_thread_wait)
3928         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3929         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3930         * proc-service.c (ps_xfer_memory): Use scoped_restore.
3931         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3932         (linux_get_siginfo_data): Add "thread" argument.  Use
3933         scoped_restore.
3934         * linux-nat.c (linux_child_follow_fork)
3935         (check_stopped_by_watchpoint): Use scoped_restore.
3936         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3937         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3938         (restore_inferior_ptid, save_inferior_ptid): Remove.
3939         * btrace.c (btrace_fetch): Use scoped_restore.
3940         * bsd-uthread.c (bsd_uthread_fetch_registers)
3941         (bsd_uthread_store_registers): Use scoped_restore.
3942         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3943         scoped_restore.
3944         * aix-thread.c (aix_thread_resume, aix_thread_wait)
3945         (aix_thread_xfer_partial): Use scoped_restore.
3946         * inferior.h (save_inferior_ptid): Remove.
3947
3948 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3949
3950         PR tdep/21818
3951         * arm-tdep.c (gdb_print_insn_arm): Mark
3952         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3953
3954 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3955
3956         * NEWS: Mention GDBserver's new option "--selftest".
3957         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3958         * selftest.c: Move it to common/selftest.c.
3959         * selftest.h: Move it to common/selftest.h.
3960         * selftest-arch.c (reset): New function.
3961         (tests_with_arch): Call reset.
3962
3963 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3964
3965         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
3966         instead of exception_fprintf and printf_filtered.
3967
3968 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3969
3970         * selftest.c (register_self_test): Rename it to
3971         selftests::register_test.
3972         (run_self_tests): selftest::run_tests.
3973         * selftest.h: Update declarations.
3974         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3975         selftests::register_test_foreach_arch.
3976         * selftest-arch.h: Update declaration.
3977         * aarch64-tdep.c: Update.
3978         * arm-tdep.c: Likewise.
3979         * disasm-selftests.c: Likewise.
3980         * dwarf2loc.c: Likewise.
3981         * dwarf2-frame.c: Likewise.
3982         * findvar.c: Likewise.
3983         * gdbarch-selftests.c: Likewise.
3984         * maint.c (maintenance_selftest): Likewise.
3985         * regcache.c: Likewise.
3986         * rust-exp.y: Likewise.
3987         * selftest-arch.c: Likewise.
3988         * unittests/environ-selftests.c: Likewise.
3989         * unittests/function-view-selftests.c: Likewise.
3990         * unittests/offset-type-selftests.c: Likewise.
3991         * unittests/optional-selftests.c: Likewise.
3992         * unittests/scoped_restore-selftests.c: Likewise.
3993         * utils-selftests.c: Likewise.
3994
3995 2017-08-17  Pedro Alves  <palves@redhat.com>
3996
3997         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3998         local.
3999
4000 2017-08-17  Pedro Alves  <palves@redhat.com>
4001
4002         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4003         field.
4004         (reset_die_in_process): Delete, replaced by ...
4005         (process_die_scope): ... this new class.  Make it responsible for
4006         freeing cu->line_header too.
4007         (process_die): Use process_die_scope.
4008         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4009         cu->line_header_die_owner.  Don't release the line header if it's
4010         owned by the CU.
4011         (setup_type_unit_groups): Make the CU/DIE own the line header.
4012         Don't release the line header here.
4013
4014 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4015
4016         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4017
4018 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4019
4020         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4021         Single-Key mode
4022
4023 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4024
4025         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4026         mode command list.
4027
4028 2017-08-15  Stafford Horne  <shorne@gmail.com>
4029
4030         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4031
4032 2017-08-15  Stafford Horne  <shorne@gmail.com>
4033
4034         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4035
4036 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4037
4038         PR gdb/21954
4039         * infcmd.c (unset_environment_command): Use the 'clear' method on
4040         the environment instead of resetting it.
4041
4042 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4043
4044         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4045         platforms.
4046
4047 2017-08-14  Tom Tromey  <tom@tromey.com>
4048
4049         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4050         (print_binary_chars): Likewise.
4051         (BITS_IN_BYTES): Remove.
4052
4053 2017-08-14  Tom Tromey  <tom@tromey.com>
4054
4055         PR gdb/21675
4056         * valprint.c (LOW_ZERO): Change value to 034.
4057         (print_octal_chars): Add static_asserts for octal constants.
4058         * printcmd.c (print_scalar_formatted): Add 'd' case.
4059
4060 2017-08-11  Tom Tromey  <tom@tromey.com>
4061
4062         * symfile.c (add_symbol_file_command): Use std::vector.
4063
4064 2017-08-14  Tom Tromey  <tom@tromey.com>
4065
4066         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4067         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4068         std::move.
4069         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4070
4071 2017-08-11  Pedro Alves  <palves@redhat.com>
4072
4073         * infrun.c (process_event_stop_test): Adjust
4074         function_name_is_marked_for_skip call.
4075         * skip.c: Include <list>.
4076         (skiplist_entry): Make it a class with private fields, and
4077         getters/setters.
4078         (skiplist_entry_chain): Delete.
4079         (skiplist_entries): New.
4080         (skiplist_entry_count): Delete.
4081         (highest_skiplist_entry_num): New.
4082         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4083         (add_skiplist_entry): Delete.
4084         (skiplist_entry::skiplist_entry): New.
4085         (skiplist_entry::add_entry): New.
4086         (skip_file_command, skip_function): Adjust.
4087         (compile_skip_regexp): Delete.
4088         (skip_command): Don't compile regexp here.  Adjust to use
4089         skiplist_entry::add_entry.
4090         (skip_info): Adjust to use range-for and getters.
4091         (skip_enable_command, skip_disable_command): Adjust to use
4092         range-for and setters.
4093         (skip_delete_command): Adjust to use std::list.
4094         (add_skiplist_entry): Delete.
4095         (skip_file_p): Delete, refactored as ...
4096         (skiplist_entry::do_skip_file_p): ... this new method.
4097         (skip_gfile_p): Delete, refactored as ...
4098         (skiplist_entry::do_gskip_file_p): ... this new method.
4099         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4100         (skiplist_entry::skip_function_p): ... this new method.
4101         (function_name_is_marked_for_skip): Now returns bool, and takes
4102         the function sal by const reference.  Adjust to use range-for and
4103         skiplist_entry methods.
4104         (_initialize_step_skip): Remove references to
4105         skiplist_entry_chain, skiplist_entry_count.
4106         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4107         takes the function sal by const reference.
4108
4109 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4110
4111         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4112         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4113         (dwarf2_frame_cache):
4114         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4115         RETURN_MASK_ALL and set *this_case to NULL.
4116         * frame-unwind.h: Update comments.
4117
4118 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4119
4120         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4121         (dwarf2_frame_state_copy_regs): Remove.
4122         (dwarf2_frame_state_free_regs): Remove.
4123         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4124         (dwarf2_restore_rule): Call method .alloc_regs instead of
4125         dwarf2_frame_state_alloc_regs.
4126         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4127         constructor.  Call std::move.
4128         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4129         (dwarf2_frame_cache): Likewise.
4130
4131         [GDB_SELF_TEST]: Include selftest.h and
4132         selftest-arch.h.
4133         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4134         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4135         execute_cfa_program_test.
4136
4137         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4138         copy ctor, assignment operator, move assignment.
4139         <alloc_regs>: New method.
4140         <swap>: New method.
4141         (struct dwarf2_frame_state): Delete dtor.
4142         (dwarf2_frame_state_alloc_regs): Remove declaration.
4143         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4144         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4145
4146 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4147
4148         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4149         (dwarf2_frame_state::dwarf2_frame_state): New.
4150         (dwarf2_frame_state::~dwarf2_frame_state): New.
4151         (dwarf2_fetch_cfa_info): Update.
4152         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4153         rather than a pointer.  Update code.
4154         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4155         dtor.
4156         <data_align, code_align, retaddr_column>: Change them to const.
4157         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4158         to bool.
4159
4160 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4161
4162         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4163         <loc.exp>: New field.
4164         * dwarf2-frame.c (execute_cfa_program): Update.
4165         (dwarf2_frame_prev_register): Update.
4166
4167 2017-08-10  Pedro Alves  <palves@redhat.com>
4168
4169         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4170
4171 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4172
4173         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4174         (fbsd_pending_children): Use std::list.
4175         (fbsd_remember_child): Likewise.
4176         (fbsd_is_child_pending): Likewise.
4177         (fbsd_pending_vfork_done): Use std::forward_list.
4178         (fbsd_add_vfork_done): Likewise.
4179         (fbsd_is_vfork_done_pending): Likewise.
4180         (fbsd_next_vfork_done): Likewise.
4181
4182 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4183
4184         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4185         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4186         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4187         for `mapfilename'.
4188         (fbsd_xfer_partial): Use gdb::byte_vector.
4189         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4190
4191 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4192
4193         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4194         "filestuff.h".
4195         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4196
4197 2017-08-09  Tom Tromey  <tom@tromey.com>
4198
4199         * skip.c (skiplist_entry): New constructor.
4200         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4201         (skiplist_entry::file_is_glob): Now bool.
4202         (skiplist_entry::file, skiplist_entry::function): Now
4203         std::string.
4204         (make_skip_entry): Return a unique_ptr.  Use new.
4205         (free_skiplist_entry, free_skiplist_entry_cleanup)
4206         (make_free_skiplist_entry_cleanup): Remove.
4207         (skip_command, skip_disable_command, add_skiplist_entry)
4208         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4209         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4210         (function_name_is_marked_for_skip): Update.
4211         (skip_delete_command): Update.  Use delete.
4212
4213 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4214
4215         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4216         (aarch64_linux_core_read_description): New function.
4217         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4218
4219 2017-08-09  Pedro Alves  <palves@redhat.com>
4220
4221         * cp-name-parser.y (cp_comp_to_string): Return a
4222         gdb::unique_xmalloc_ptr<char>.
4223         * cp-support.c (replace_typedefs_qualified_name)
4224         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4225         (cp_canonicalize_string_full): Use op= instead of explicit
4226         convertion.
4227         (cp_class_name_from_physname, method_name_from_physname)
4228         (cp_func_name, cp_remove_params): Adjust to use
4229         gdb::unique_xmalloc_ptr<char>.
4230         * cp-support.h (cp_comp_to_string): Return a
4231         gdb::unique_xmalloc_ptr<char>.
4232         * python/py-type.c (typy_lookup_type): Adjust to use
4233         gdb::unique_xmalloc_ptr<char>.
4234
4235 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4236
4237         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4238
4239 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4240             Yao Qi  <yao.qi@linaro.org>
4241
4242         * cp-support.c (cp_canonicalize_string_full): Use
4243         gdb::unique_xmalloc_ptr<char>.
4244         (cp_canonicalize_string): Likewise.
4245
4246 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4247
4248         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4249         * regformats/i386/amd64-avx-avx512.dat: Remove.
4250         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4251         * regformats/i386/amd64-avx-mpx.dat:Remove.
4252         * regformats/i386/amd64-avx.dat: Remove.
4253         * regformats/i386/amd64-mpx.dat: Remove.
4254         * regformats/i386/i386-avx-avx512.dat: Remove.
4255         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4256         * regformats/i386/i386-avx-mpx.dat: Remove.
4257         * regformats/i386/i386-mmx.dat: Remove.
4258         * regformats/i386/i386-mpx.dat: Remove.
4259
4260 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4261
4262         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4263         * amd64-tdep.c: Don't include features/i386/x32*.c.
4264         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4265         functions.
4266         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4267         and i386/x32-avx-avx512.
4268         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4269         and i386/x32.xml.
4270         * features/i386/x32-avx-avx512.c: Removed.
4271         * features/i386/x32-avx-avx512.xml: Removed.
4272         * features/i386/x32-avx.c: Removed.
4273         * features/i386/x32-avx.xml: Removed.
4274         * features/i386/x32.c: Removed.
4275         * features/i386/x32.xml: Removed.
4276         * regformats/i386/x32-avx-avx512.dat: Removed.
4277         * regformats/i386/x32-avx.dat: Removed.
4278         * regformats/i386/x32.dat: Removed.
4279
4280 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4281
4282         PR breakpoints/21886
4283         * mem-break.c (default_memory_insert_breakpoint): Use
4284         `->placed_address' rather than `->reqstd_address' for the
4285         breakpoint location.
4286
4287 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4288
4289         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4290         assertions.
4291
4292 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4293
4294         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4295         a union of `tdep_info', `tdesc_data' and `id'.
4296         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4297         rather than `info.tdep_info'.
4298         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4299         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4300         * i386-tdep.c (i386_gdbarch_init): Likewise.
4301         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4302         * mips-tdep.c (mips_gdbarch_init): Likewise.
4303         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4304         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4305         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4306         `info.tdep_info'.
4307         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4308         `info.tdep_info'.
4309         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4310         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4311         `info.tdep_info'.
4312         * spu-tdep.c (spu_gdbarch_init): Likewise.
4313         * gdbarch.h: Regenerate.
4314
4315 2017-08-07  Leszek Swirski  <leszeks@google.com>
4316
4317         PR symtab/20899
4318         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4319
4320 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4321
4322         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4323         (gdbsim_open): Rename gdb_argv args object to argv.
4324
4325 2017-08-05  Tom Tromey  <tom@tromey.com>
4326
4327         * compile/compile-object-load.c (compile_object_load): Use
4328         gdb::unique_xmalloc_ptr.
4329         * cli/cli-dump.c (scan_filename): Rename from
4330         scan_filename_with_cleanup.  Change return type.
4331         (scan_expression): Rename from scan_expression_with_cleanup.
4332         Change return type.
4333         (dump_memory_to_file, dump_value_to_file, restore_command):
4334         Use gdb::unique_xmalloc_ptr.  Update.
4335         * cli/cli-cmds.c (find_and_open_script): Use
4336         gdb::unique_xmalloc_ptr.
4337         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4338         * symmisc.c (maintenance_print_symbols)
4339         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4340         * symfile.c (symfile_bfd_open, generic_load)
4341         (add_symbol_file_command, remove_symbol_file_command): Use
4342         gdb::unique_xmalloc_ptr.
4343         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4344         * psymtab.c (maintenance_print_psymbols): Use
4345         gdb::unique_xmalloc_ptr.
4346         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4347         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4348         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4349         (reload_shared_libraries_1): Likewise.
4350
4351 2017-08-05  Tom Tromey  <tom@tromey.com>
4352
4353         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4354         (rust_op_vector, rust_set_vector): New typedefs.
4355         (current_parser): New global.
4356         (work_obstack): Change to pointer type.  Update all users.
4357         (rust_ast, pstate): Remove globals.
4358         (struct rust_parser): New.
4359         (%union) <params, field_inits>: Change type.
4360         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4361         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4362         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4363         (convert_params_to_types, convert_params_to_expression): Change
4364         type of "params".
4365         (ast_string): Change type of "fields".
4366         (rust_parse): Make a rust_parser.  Remove cleanups.
4367         (rust_lex_tests): Make and install an auto_obstack.
4368
4369 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4370
4371         * configure.srv (ipa_x32_linux_regobj): New.
4372         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4373         instead of X86_TDESC_AVX512.
4374         (initialize_low_tracepoint): Call
4375         init_registers_x32_avx_avx512_linux.
4376
4377 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4378
4379         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4380
4381 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4382
4383         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4384
4385 2017-08-03  Tom Tromey  <tom@tromey.com>
4386
4387         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4388         Remove.
4389         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4390
4391 2017-08-03  Tom Tromey  <tom@tromey.com>
4392
4393         * python/py-param.c (compute_enum_values): Use gdb_argv.
4394
4395 2017-08-03  Tom Tromey  <tom@tromey.com>
4396
4397         * utils.h (struct gdb_argv_deleter): New.
4398         (gdb_argv): New class.
4399         * utils.c (gdb_argv::reset): New method.
4400         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4401         * tracefile.c (tsave_command): Use gdb_argv.
4402         * top.c (new_ui_command): Use gdb_argv.
4403         * symmisc.c (maintenance_print_symbols)
4404         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4405         * symfile.c (symbol_file_command, generic_load)
4406         (remove_symbol_file_command): Use gdb_argv.
4407         * stack.c (backtrace_command): Use gdb_argv.
4408         * source.c (add_path, show_substitute_path_command)
4409         (unset_substitute_path_command, set_substitute_path_command):
4410         Use gdb_argv.
4411         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4412         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4413         * remote.c (extended_remote_run, remote_put_command)
4414         (remote_get_command, remote_delete_command): Use gdb_argv.
4415         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4416         (gdbsim_open): Use gdb_argv.
4417         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4418         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4419         * procfs.c (procfs_info_proc): Use gdb_argv.
4420         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4421         * infrun.c (handle_command): Use gdb_argv.
4422         * inferior.c (add_inferior_command, clone_inferior_command):
4423         Use gdb_argv.
4424         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4425         * exec.c (exec_file_command): Use gdb_argv.
4426         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4427         * compile/compile.c (build_argc_argv): Use gdb_argv.
4428
4429 2017-08-03  Tom Tromey  <tom@tromey.com>
4430
4431         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4432
4433 2017-08-03  Tom Tromey  <tom@tromey.com>
4434
4435         * python/python.c (compute_python_string): Return std::string.
4436         (gdbpy_eval_from_control_command): Update.
4437         (do_start_initialization): Use std::string.
4438         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4439         xstrprintf.
4440         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4441         xstrprintf.
4442
4443 2017-08-03  Tom Tromey  <tom@tromey.com>
4444
4445         * top.h (do_restore_instream_cleanup): Remove.
4446         * top.c (do_restore_instream_cleanup): Remove.
4447         (read_command_file): Use scoped_restore.
4448         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4449
4450 2017-08-03  Tom Tromey  <tom@tromey.com>
4451
4452         * cli/cli-script.c (execute_user_command)
4453         (execute_control_command): Use scoped_restore.
4454
4455 2017-08-03  Tom Tromey  <tom@tromey.com>
4456
4457         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4458         (execute_user_command): Remove user_call_depth; use
4459         user_args_stack's size instead.
4460
4461 2017-08-03  Tom Tromey  <tom@tromey.com>
4462
4463         * top.h (in_user_command): Remove.
4464         * top.c (in_user_command): Remove.
4465         * cli/cli-script.c (do_restore_user_call_depth)
4466         (execute_user_command): Update.
4467
4468 2017-08-03  Tom Tromey  <tom@tromey.com>
4469
4470         * valops.c (search_struct_method): Use gdb::byte_vector.
4471         * valarith.c (value_concat): Use std::vector.
4472         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4473         (simple_search_memory): Likewise.
4474         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4475         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4476         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4477         * elfread.c (elf_rel_plt_read): Use std::string.
4478         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4479         * cli/cli-dump.c (restore_section_callback): Use
4480         gdb::byte_vector.
4481
4482 2017-08-03  Tom Tromey  <tom@tromey.com>
4483
4484         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4485
4486 2017-08-03  Tom Tromey  <tom@tromey.com>
4487
4488         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4489         (tui_register_format): Use scoped_restore.
4490
4491 2017-08-03  Tom Tromey  <tom@tromey.com>
4492
4493         * reverse.c (exec_direction_default): Remove.
4494         (exec_reverse_once): Use scoped_restore.
4495         * remote.c (restore_remote_timeout): Remove.
4496         (remote_flash_erase, remote_flash_write, remote_flash_done)
4497         (readchar, remote_serial_write): Use scoped_restore.
4498         * cli/cli-script.c (struct source_cleanup_lines_args)
4499         (source_cleanup_lines): Remove.
4500         (script_from_file): Use scoped_restore.
4501         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4502         (source_command): Use scoped_restore.
4503
4504 2017-08-03  Tom Tromey  <tom@tromey.com>
4505
4506         * utils.h (make_cleanup_free_so): Remove.
4507         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4508         * solist.h (struct so_deleter): New.
4509         (so_list_up): New typedef.
4510         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4511
4512 2017-08-03  Tom Tromey  <tom@tromey.com>
4513
4514         * utils.h (make_cleanup_restore_current_language): Remove.
4515         * utils.c (do_restore_current_language)
4516         (make_cleanup_restore_current_language): Remove.
4517         * parse.c (parse_exp_in_context_1)
4518         (parse_expression_with_language): Use
4519         scoped_restore_current_language.
4520         * mi/mi-main.c (mi_cmd_execute): Use
4521         scoped_restore_current_language.
4522         * language.h (scoped_restore_current_language): New class.
4523
4524 2017-08-03  Tom Tromey  <tom@tromey.com>
4525
4526         * compile/compile.c (cleanup_unlink_file): Remove.
4527         (compile_to_object): Use gdb::unlinker.
4528         (eval_compile_command): Likewise.
4529
4530 2017-08-03  Tom Tromey  <tom@tromey.com>
4531
4532         * utils.h (make_cleanup_fclose): Remove.
4533         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4534
4535 2017-08-03  Tom Tromey  <tom@tromey.com>
4536
4537         * top.c (open_terminal_stream): Return gdb_file_up.
4538         (new_ui_command): Update.
4539
4540 2017-08-03  Tom Tromey  <tom@tromey.com>
4541
4542         * source.c (print_source_lines_base, forward_search_command)
4543         (reverse_search_command): Use gdb_file_up.
4544
4545 2017-08-03  Tom Tromey  <tom@tromey.com>
4546
4547         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4548
4549 2017-08-03  Tom Tromey  <tom@tromey.com>
4550
4551         * cli/cli-cmds.c (find_and_open_script): Change return type.
4552         Remove "streamp" and "full_path" parameters.
4553         (source_script_with_search): Update.
4554         * auto-load.c (source_script_file): Update.
4555         * cli/cli-cmds.h (find_and_open_script): Change type.
4556         (open_script): New struct.
4557
4558 2017-08-03  Tom Tromey  <tom@tromey.com>
4559
4560         * xml-support.c (xml_fetch_content_from_file): Update.
4561         * ui-file.c (stdio_file::open): Update.
4562         * tracefile-tfile.c (tfile_start): Update.
4563         * remote.c (remote_file_put, remote_file_get): Update.
4564         * nat/linux-procfs.c (linux_proc_get_int)
4565         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4566         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4567         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4568         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4569         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4570         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4571         * linux-nat.c (linux_proc_pending_signals): Update.
4572         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4573         (file_closer): Remove.
4574         * compile/compile.c (compile_to_object): Update.
4575         * common/filestuff.h (struct gdb_file_deleter): New.
4576         (gdb_file_up): New typedef.
4577         (gdb_fopen_cloexec): Change return type.
4578         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4579         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4580         (dump_binary_file, restore_binary_file): Update.
4581         * auto-load.c (auto_load_objfile_script_1): Update.
4582
4583 2017-08-03  Tom Tromey  <tom@tromey.com>
4584
4585         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4586         (info_static_tracepoint_markers_command): Likewise.
4587         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4588         * skip.c (skip_info): Use ui_out_emit_table.
4589         * progspace.c (print_program_space): Use ui_out_emit_table.
4590         * osdata.c (info_osdata): Use ui_out_emit_table.
4591         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4592         ui_out_emit_table.
4593         * linux-thread-db.c (info_auto_load_libthread_db): Use
4594         ui_out_emit_table.
4595         * inferior.c (print_inferior): Use ui_out_emit_table.
4596         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4597         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4598         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4599         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4600         * ui-out.h (class ui_out_emit_table): New.
4601
4602 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4603
4604         * mips-tdep.c (mips_fpu_type_str): New function.
4605         (mips_dump_tdep): Call it.
4606
4607 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4608
4609         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4610         `->mips_fpu_type'.
4611
4612 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4613
4614         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4615
4616 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4617
4618         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4619
4620 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4621
4622         * cli/cli-cmds.c (maintenancechecklist): New variable.
4623         * gdbcmd.h (maintenancechecklist): Declare it.
4624         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4625         Call i386_linux_read_description with different masks.
4626         * maint.c (maintenance_check_command): New function.
4627         (_initialize_maint_cmds): Call add_prefix_cmd.
4628         * target-descriptions.c (tdesc_reg): override operator != and ==.
4629         (tdesc_type): Likewise.
4630         (tdesc_feature): Likewise.
4631         (target_desc): Likewise.
4632         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4633         (maintenance_check_xml_descriptions): New function.
4634         (_initialize_target_descriptions) Add command "xml-descriptions".
4635         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4636
4637 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4638
4639         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4640         Include features/i386/32bit-*.c.
4641         (i386_linux_read_description): Generate target description if it
4642         doesn't exist.
4643         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4644         functions.
4645         * features/i386/32bit-linux.c: Re-generated.
4646         * features/i386/32bit-sse.c: Likewise.
4647         * target-descriptions.c (print_c_feature::visit): Print code to
4648         set register number if needed.
4649         (print_c_feature) <m_next_regnum>: New field.
4650
4651 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4652
4653         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4654         (FEATURE_XMLFILES): New.
4655         (FEATURE_CFILES): New.
4656         New rules.
4657         (clean-cfiles): Remove generated c files.
4658         * features/i386/32bit-avx.c: Generated.
4659         * features/i386/32bit-avx512.c: Generated.
4660         * features/i386/32bit-core.c: Generated.
4661         * features/i386/32bit-linux.c: Generated.
4662         * features/i386/32bit-mpx.c: Generated.
4663         * features/i386/32bit-pkeys.c: Generated.
4664         * features/i386/32bit-sse.c: Generated.
4665         * target-descriptions.c: Include algorithm.
4666         (tdesc_element_visitor): Add method visit_end.
4667         (print_c_tdesc): Implement visit_end.
4668         (print_c_tdesc:: m_filename_after_features): Move it to
4669         protected.
4670         (print_c_feature): New class.
4671         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4672         name starts with "i386/32bit-".
4673
4674 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4675
4676         * target-descriptions.c (tdesc_element_visitor): New class.
4677         (tdesc_element): New class.
4678         (tdesc_reg): Inherit from tdesc_element.
4679         (tdesc_reg::accept): New function.
4680         (tdesc_type): Inherit from tdesc_element.
4681         (tdesc_type::accept): New function.
4682         (tdesc_feature): Inherit from tdesc_element.
4683         (tdesc_feature::accept): New function.
4684         (target_desc): Inherit from tdesc_element.
4685         (target_desc::target_desc): New.
4686         (target_desc::~target_desc): New.
4687         (target_desc::accept): New.
4688         (allocate_target_description): Use new.
4689         (free_target_description): Use delete.
4690         (print_c_tdesc): New class.
4691         (maint_print_c_tdesc_cmd): Adjust.
4692
4693         * features/aarch64.c: Re-generated.
4694         * features/arc-arcompact.c: Re-generated.
4695         * features/arc-v2.c: Re-generated.
4696         * features/arm/arm-with-iwmmxt.c: Re-generated.
4697         * features/arm/arm-with-m.c: Re-generated.
4698         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4699         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4700         * features/arm/arm-with-neon.c: Re-generated.
4701         * features/arm/arm-with-vfpv2.c: Re-generated.
4702         * features/arm/arm-with-vfpv3.c: Re-generated.
4703         * features/i386/amd64-avx-avx512.c: Re-generated.
4704         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4705         * features/i386/amd64-avx.c: Re-generated.
4706         * features/i386/amd64-avx-linux.c: Re-generated.
4707         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4708         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4709         * features/i386/amd64-avx-mpx.c: Re-generated.
4710         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4711         * features/i386/amd64.c: Re-generated.
4712         * features/i386/amd64-linux.c: Re-generated.
4713         * features/i386/amd64-mpx.c: Re-generated.
4714         * features/i386/amd64-mpx-linux.c: Re-generated.
4715         * features/i386/i386-avx-avx512.c: Re-generated.
4716         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4717         * features/i386/i386-avx.c: Re-generated.
4718         * features/i386/i386-avx-linux.c: Re-generated.
4719         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4720         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4721         * features/i386/i386-avx-mpx.c: Re-generated.
4722         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4723         * features/i386/i386.c: Re-generated.
4724         * features/i386/i386-linux.c: Re-generated.
4725         * features/i386/i386-mmx.c: Re-generated.
4726         * features/i386/i386-mmx-linux.c: Re-generated.
4727         * features/i386/i386-mpx.c: Re-generated.
4728         * features/i386/i386-mpx-linux.c: Re-generated.
4729         * features/i386/x32-avx-avx512.c: Re-generated.
4730         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4731         * features/i386/x32-avx.c: Re-generated.
4732         * features/i386/x32-avx-linux.c: Re-generated.
4733         * features/i386/x32.c: Re-generated.
4734         * features/i386/x32-linux.c: Re-generated.
4735         * features/microblaze.c: Re-generated.
4736         * features/microblaze-with-stack-protect.c: Re-generated.
4737         * features/mips64-dsp-linux.c: Re-generated.
4738         * features/mips64-linux.c: Re-generated.
4739         * features/mips-dsp-linux.c: Re-generated.
4740         * features/mips-linux.c: Re-generated.
4741         * features/nds32.c: Re-generated.
4742         * features/nios2.c: Re-generated.
4743         * features/nios2-linux.c: Re-generated.
4744         * features/rs6000/powerpc-32.c: Re-generated.
4745         * features/rs6000/powerpc-32l.c: Re-generated.
4746         * features/rs6000/powerpc-403.c: Re-generated.
4747         * features/rs6000/powerpc-403gc.c : Re-generated.
4748         * features/rs6000/powerpc-405.c: Re-generated.
4749         * features/rs6000/powerpc-505.c: Re-generated.
4750         * features/rs6000/powerpc-601.c: Re-generated.
4751         * features/rs6000/powerpc-602.c: Re-generated.
4752         * features/rs6000/powerpc-603.c: Re-generated.
4753         * features/rs6000/powerpc-604.c: Re-generated.
4754         * features/rs6000/powerpc-64.c: Re-generated.
4755         * features/rs6000/powerpc-64l.c: Re-generated.
4756         * features/rs6000/powerpc-7400.c: Re-generated.
4757         * features/rs6000/powerpc-750.c: Re-generated.
4758         * features/rs6000/powerpc-860.c: Re-generated.
4759         * features/rs6000/powerpc-altivec32.c: Re-generated.
4760         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4761         * features/rs6000/powerpc-altivec64.c: Re-generated.
4762         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4763         * features/rs6000/powerpc-cell32l.c: Re-generated.
4764         * features/rs6000/powerpc-cell64l.c: Re-generated.
4765         * features/rs6000/powerpc-e500.c: Re-generated.
4766         * features/rs6000/powerpc-e500l.c: Re-generated.
4767         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4768         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4769         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4770         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4771         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4772         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4773         * features/rs6000/powerpc-vsx32.c: Re-generated.
4774         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4775         * features/rs6000/powerpc-vsx64.c: Re-generated.
4776         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4777         * features/rs6000/rs6000.c: Re-generated.
4778         * features/s390-linux32.c: Re-generated.
4779         * features/s390-linux32v1.c: Re-generated.
4780         * features/s390-linux32v2.c: Re-generated.
4781         * features/s390-linux64.c: Re-generated.
4782         * features/s390-linux64v1.c: Re-generated.
4783         * features/s390-linux64v2.c: Re-generated.
4784         * features/s390-te-linux64.c: Re-generated.
4785         * features/s390-tevx-linux64.c: Re-generated.
4786         * features/s390-vx-linux64.c: Re-generated.
4787         * features/s390x-linux64.c: Re-generated.
4788         * features/s390x-linux64v1.c: Re-generated.
4789         * features/s390x-linux64v2.c: Re-generated.
4790         * features/s390x-te-linux64.c: Re-generated.
4791         * features/s390x-tevx-linux64.c: Re-generated.
4792         * features/s390x-vx-linux64.c: Re-generated.
4793         * features/sparc/sparc32-solaris.c: Re-generated.
4794         * features/sparc/sparc64-solaris.c: Re-generated.
4795         * features/tic6x-c62x.c: Re-generated.
4796         * features/tic6x-c62x-linux.c: Re-generated.
4797         * features/tic6x-c64x.c: Re-generated.
4798         * features/tic6x-c64x-linux.c: Re-generated.
4799         * features/tic6x-c64xp.c: Re-generated.
4800         * features/tic6x-c64xp-linux.c: Re-generated.
4801
4802 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4803
4804         * i386-linux-tdep.c (i386_linux_read_description): New function.
4805         (i386_linux_core_read_description): Call
4806         i386_linux_read_description.
4807         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4808         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4809         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4810         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4811         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4812         * x86-linux-nat.c (x86_linux_read_description): Call
4813         i386_linux_read_description.
4814
4815 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4816
4817         * NEWS: Mention it.
4818         * features/Makefile (%.c: %.xml): Pass the xml file name to
4819         command "maint print c-tdesc".
4820         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4821         name from 'arg'.
4822
4823 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4824
4825         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4826         in-class initialization.
4827         (tdesc_create_feature): Call new instead of XCNEW.
4828         (free_target_description): Ue delete.
4829
4830 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4831
4832         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4833
4834 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4835
4836         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4837         constant.
4838         (amd64_x32_init_abi): Likewise.
4839         * amd64-tdep.h (amd64_init_abi): Update declaration.
4840         (amd64_x32_init_abi): Likewise.
4841
4842 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4843
4844         PR tdep/21717
4845         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4846         condition for FPSCR.
4847         (arm_linux_store_inferior_registers): Likewise.
4848
4849 2017-07-22  Tom Tromey  <tom@tromey.com>
4850
4851         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4852         <syscalls_counts>: Now a std::vector.
4853         (get_catch_syscall_inferior_data): Use "new".
4854         (catch_syscall_inferior_data_cleanup): Use "delete".
4855         (insert_catch_syscall, remove_catch_syscall)
4856         (clear_syscall_counts): Update.
4857
4858 2017-07-22  Tom Tromey  <tom@tromey.com>
4859
4860         * break-catch-syscall.c (syscall_catchpoint)
4861         <syscalls_to_be_caught>: Now a std::vector<int>
4862         (~syscall_catchpoint): Remove.
4863         (insert_catch_syscall, remove_catch_syscall)
4864         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4865         (print_mention_catch_syscall, print_recreate_catch_syscall):
4866         Update.
4867         (create_syscall_event_catchpoint): Change type of "filter"
4868         parameter.
4869         (catch_syscall_split_args): Return a std::vector.
4870         (catch_syscall_command_1, catching_syscall_number_1): Update.
4871
4872 2017-07-22  Tom Tromey  <tom@tromey.com>
4873
4874         * break-catch-throw.c (struct exception_catchpoint)
4875         <exception_rx>: Now a std::string.
4876         (~exception_catchpoint): Remove.
4877         (print_one_detail_exception_catchpoint): Update.
4878         (handle_gnu_v3_exceptions): Change type of except_rx.
4879         (extract_exception_regexp): Return a std::string.
4880         (catch_exception_command_1): Update.
4881
4882 2017-07-22  Tom Tromey  <tom@tromey.com>
4883
4884         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4885         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4886         std::vector.
4887         <catch_all>: Now a bool.
4888         (~signal_catchpoint): Remove.
4889         (signal_catchpoint_insert_location)
4890         (signal_catchpoint_remove_location)
4891         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4892         (signal_catchpoint_print_mention)
4893         (signal_catchpoint_print_recreate)
4894         (signal_catchpoint_explains_signal): Update.
4895         (create_signal_catchpoint): Change type of "filter" and
4896         "catch_all".
4897         (catch_signal_split_args): Return a std::vector.  Change type of
4898         "catch_all".
4899         (catch_signal_command): Update.
4900
4901 2017-07-20  Pedro Alves  <palves@redhat.com>
4902
4903         * ada-lang.c (ada_language_defn): Make extern.
4904         (_initialize_ada_language): Remove add_language call.
4905         * c-lang.c (c_language_defn, cplus_language_defn)
4906         (asm_language_defn, minimal_language_defn): Make extern.
4907         (_initialize_c_language): Delete.
4908         * completer.c (compare_cstrings): Delete, moved to utils.h.
4909         * d-lang.c (d_language_defn): Make extern.
4910         (_initialize_d_language): Remove add_language calls.
4911         * defs.h (enum language): Add comment.
4912         * f-lang.c (f_language_defn): Make extern.
4913         (_initialize_f_language): Remove add_language call.
4914         * go-lang.c (go_language_defn): Make extern.
4915         (_initialize_go_language): Remove add_language call.
4916         * language.c: Include <algorithm>.
4917         (languages): Redefine as const array.
4918         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4919         (set_language_command): Handle "local".  Use for-range loop.
4920         (set_language): Remove loop.
4921         (language_enum): Rewrite.
4922         (language_def, language_str): Remove loops.
4923         (add_language): Delete.
4924         (add_set_language_command): New, based on add_languages.
4925         (skip_language_trampoline): Adjust.
4926         (local_language_defn): Delete.
4927         (language_gdbarch_post_init): Adjust.
4928         (_initialize_language): Remove add_language calls.  Call
4929         add_set_language_command.
4930         * language.h (add_language): Delete.
4931         (auto_language_defn)
4932         (unknown_language_defn, minimal_language_defn, ada_language_defn)
4933         (asm_language_defn, c_language_defn, cplus_language_defn)
4934         (d_language_defn, f_language_defn, go_language_defn)
4935         (m2_language_defn, objc_language_defn, opencl_language_defn)
4936         (pascal_language_defn, rust_language_defn): Declare.
4937         * m2-lang.c (m2_language_defn): Make extern.
4938         (_initialize_m2_language): Remove add_language call.
4939         * objc-lang.c (objc_language_defn): Make extern.
4940         (_initialize_objc_language): Remove add_language call.
4941         * opencl-lang.c (opencl_language_defn): Make extern.
4942         (_initialize_opencl_language): Remove add_language call.
4943         * p-lang.c (pascal_language_defn): Make extern.
4944         (_initialize_pascal_language): Delete.
4945         * rust-lang.c (rust_language_defn): Make extern.
4946         (_initialize_rust_language): Delete.
4947         * utils.h (compare_cstrings): New static inline function.
4948
4949 2017-07-20  Pedro Alves  <palves@redhat.com>
4950
4951         * ada-lang.c (ada_to_fixed_type_1): Adjust.
4952         (get_var_value): Constify parameters.
4953         (get_int_var_value): Change prototype.
4954         (to_fixed_range_type): Adjust.
4955         * ada-lang.h (get_int_var_value): Change prototype.
4956
4957 2017-07-20  Pedro Alves  <palves@redhat.com>
4958
4959         * dwarf2read.c (dw2_lookup_symbol): Use
4960         SYMBOL_MATCHES_SEARCH_NAME.
4961         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4962
4963 2017-07-20  Pedro Alves  <palves@redhat.com>
4964
4965         * block.c (block_iter_name_step, block_iter_name_first)
4966         (block_iter_name_next): Delete.
4967         (block_lookup_symbol_primary): Adjust to use
4968         dict_iter_match_first/dict_iter_match_next.
4969         * block.h (block_iter_name_first, block_iter_name_next): Delete
4970         declarations.
4971         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4972         dict_iter_match_first/dict_iter_match_next.
4973
4974 2017-07-20  Pedro Alves  <palves@redhat.com>
4975
4976         * cp-support.c (cp_find_first_component_aux): Add missing case for
4977         end of string.
4978
4979 2017-07-18  David Blaikie  <dblaikie@gmail.com>
4980
4981         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4982         of dwo_cu's dwo_file.
4983
4984 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4985
4986         * remote.c (store_registers_using_G): Remove one line comment.
4987
4988 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4989
4990         * regcache.c (regcache_cpy): Simplify it.
4991         (regcache::cpy_no_passthrough): Remove it.
4992         * regcache.h (cpy_no_passthrough): Remove it.
4993         (regcache_dup, regcache_cpy): Update comments.
4994
4995 2017-07-18  Pedro Alves  <palves@redhat.com>
4996
4997         * remote-sim.c (sim_command_completer): Adjust to work with a
4998         completion_tracker instead of a VEC.
4999
5000 2017-07-17  Pedro Alves  <palves@redhat.com>
5001
5002         * completer.c (complete_source_filenames): New function.
5003         (complete_address_and_linespec_locations): New function.
5004         (location_completer): Use complete_address_and_linespec_locations.
5005         (completion_tracker::build_completion_result): Honor the tracker's
5006         request to suppress append.
5007         * completer.h (completion_tracker::suppress_append_ws)
5008         (completion_tracker::set_suppress_append_ws): New methods.
5009         (completion_tracker::m_suppress_append_ws): New field.
5010         (complete_source_filenames): New declaration.
5011         * linespec.c (linespec_complete_what): New.
5012         (struct ls_parser) <complete_what, completion_word,
5013         completion_quote_char, completion_quote_end, completion_tracker>:
5014         New fields.
5015         (string_find_incomplete_keyword_at_end): New.
5016         (linespec_lexer_lex_string): Record quote char.  If in completion
5017         mode, don't throw.
5018         (linespec_lexer_consume_token): Advance the completion word point.
5019         (linespec_lexer_peek_token): Save/restore completion info.
5020         (save_stream_and_consume_token): New.
5021         (set_completion_after_number): New.
5022         (linespec_parse_basic): Set what to complete next depending on
5023         token.  Handle function and label completions specially.
5024         (parse_linespec): Disable objc shortcut in completion mode.  Set
5025         what to complete next depending on token type.  Skip keyword if in
5026         completion mode.
5027         (complete_linespec_component, linespec_complete): New.
5028         * linespec.h (linespec_complete): Declare.
5029
5030 2017-07-17  Pedro Alves  <palves@redhat.com>
5031
5032         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5033         Handle 'operator<' / 'operator<<'.
5034
5035 2017-07-17  Pedro Alves  <palves@redhat.com>
5036
5037         * completer.c (collect_explicit_location_matches): Handle
5038         MATCH_LABEL.
5039         (convert_explicit_location_to_linespec): New, factored out from
5040         ...
5041         (convert_explicit_location_to_sals): ... this.
5042         (complete_label): New.
5043         (linespec_complete_label, find_label_symbols_in_block): New.
5044         (find_label_symbols): Add completion_mode parameter and adjust to
5045         call find_label_symbols_in_block.
5046         * linespec.h (linespec_complete_label): Declare.
5047
5048 2017-07-17  Pedro Alves  <palves@redhat.com>
5049
5050         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5051         complete_symbol_mode parameter.
5052         * cli/cli-cmds.c (complete_command): Get the completion result out
5053         of the handle_brkchars tracker if used a custom word point.
5054         * completer.c: Include "linespec.h".
5055         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5056         (advance_to_expression_complete_word_point): New.
5057         (completion_tracker::completes_to_completion_word): New.
5058         (complete_files_symbols): Pass down
5059         complete_symbol_mode::EXPRESSION.
5060         (explicit_options, probe_options): New.
5061         (collect_explicit_location_matches): Complete on the
5062         explictit_loc->foo instead of word.  Use
5063         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5064         keyword and options completions.
5065         (backup_text_ptr): Delete.
5066         (skip_keyword): New.
5067         (complete_explicit_location): Remove 'word' parameter.  Add
5068         language, quoted_arg_start and quoted_arg_end parameters.
5069         Rewrite, parsing left to right.
5070         (location_completer): Rewrite.
5071         (location_completer_handle_brkchars): New function.
5072         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5073         (enum complete_line_internal_reason): Adjust comments.
5074         (completion_tracker::discard_completions): New.
5075         (completer_handle_brkchars_func_for_completer): Handle
5076         location_completer.
5077         (gdb_custom_word_point_brkchars)
5078         (gdb_org_rl_basic_quote_characters): New.
5079         (gdb_completion_word_break_characters_throw)
5080         (completion_find_completion_word): Handle trackers that use a
5081         custom word point.
5082         (completion_tracker::advance_custom_word_point_by): New.
5083         (completion_tracker::build_completion_result): Don't rely on
5084         readline appending the quote char.
5085         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5086         use a custom word point.
5087         (gdb_rl_attempted_completion_function): Restore
5088         rl_basic_quote_characters.
5089         * completer.h (class completion_tracker): Extend intro comment.
5090         (completion_tracker::set_quote_char)
5091         (completion_tracker::quote_char)
5092         (completion_tracker::set_use_custom_word_point)
5093         (completion_tracker::use_custom_word_point)
5094         (completion_tracker::custom_word_point)
5095         (completion_tracker::set_custom_word_point)
5096         (completion_tracker::advance_custom_word_point_by)
5097         (completion_tracker::completes_to_completion_word)
5098         (completion_tracker::discard_completions): New methods.
5099         (completion_tracker::m_quote_char)
5100         (completion_tracker::m_use_custom_word_point)
5101         (completion_tracker::m_custom_word_point): New fields.
5102         (advance_to_expression_complete_word_point): Declare.
5103         * f-lang.c (f_collect_symbol_completion_matches): Add
5104         complete_symbol_mode parameter.
5105         * language.h (struct language_defn)
5106         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5107         parameter.
5108         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5109         (linespec_complete_function): New function.
5110         (linespec_lexer_lex_keyword): Adjust.
5111         * linespec.h (linespec_keywords, linespec_complete_function): New
5112         declarations.
5113         * location.c (find_end_quote): New function.
5114         (explicit_location_lex_one): Add explicit_completion_info
5115         parameter.  Save quoting info.  Don't throw if being called for
5116         completion.  Don't handle Ada operators here.
5117         (is_cp_operator, skip_op_false_positives, first_of)
5118         (explicit_location_lex_one_function): New function.
5119         (string_to_explicit_location): Replace 'dont_throw' parameter with
5120         an explicit_completion_info pointer parameter.  Handle it.  Don't
5121         use explicit_location_lex_one to lex function names.  Use
5122         explicit_location_lex_one_function instead.
5123         * location.h (struct explicit_completion_info): New.
5124         (string_to_explicit_location): Replace 'dont_throw' parameter with
5125         an explicit_completion_info pointer parameter.
5126         * symtab.c (default_collect_symbol_completion_matches_break_on):
5127         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5128         (default_collect_symbol_completion_matches)
5129         (collect_symbol_completion_matches): Add complete_symbol_mode
5130         parameter.
5131         (collect_symbol_completion_matches_type): Pass down
5132         complete_symbol_mode::EXPRESSION.
5133         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5134         parameter.  Handle LINESPEC mode.
5135         * symtab.h (complete_symbol_mode): New.
5136         (default_collect_symbol_completion_matches_break_on)
5137         (default_collect_symbol_completion_matches)
5138         (collect_symbol_completion_matches)
5139         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5140         parameter.
5141
5142 2017-07-17  Pedro Alves  <palves@redhat.com>
5143
5144         * utils.c (enum class strncmp_iw_mode): New.
5145         (strcmp_iw): Rename to ...
5146         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5147         parameters.  Handle them.
5148         (strncmp_iw): New.
5149         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5150         * utils.h (strncmp_iw): Declare.
5151         (strcmp_iw): Move describing comments here.
5152
5153 2017-07-17  Pedro Alves  <palves@redhat.com>
5154
5155         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5156         CP_OPERATOR_STR.
5157         * c-typeprint.c (is_type_conversion_operator): Use
5158         CP_OPERATOR_STR.
5159         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5160         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5161         CP_OPERATOR_LEN.
5162         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5163         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5164         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5165         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5166         CP_OPERATOR_STR.
5167         * location.c: Include "cp-support.h".
5168         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5169         CP_OPERATOR_STR.
5170         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5171         CP_OPERATOR_LEN.
5172
5173 2017-07-17  Pedro Alves  <palves@redhat.com>
5174
5175         * cli/cli-cmds.c (complete_command): Use a completion tracker
5176         along with completion_find_completion_word for handle_brkchars
5177         phase.
5178         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5179         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5180         (struct gdb_rl_completion_word_info): New.
5181         (gdb_rl_find_completion_word): New.
5182         (completion_find_completion_word): New.
5183         * completer.h (completion_find_completion_word): Declare.
5184
5185 2017-07-17  Pedro Alves  <palves@redhat.com>
5186
5187         * ada-lang.c (symbol_completion_match): Adjust comments.
5188         (symbol_completion_add): Replace vector parameter with
5189         completion_tracker parameter.  Use it.
5190         (ada_make_symbol_completion_list): Rename to...
5191         (ada_collect_symbol_completion_matches): ... this.  Add
5192         completion_tracker parameter and use it.
5193         (ada_language_defn): Adjust.
5194         * break-catch-syscall.c (catch_syscall_completer): Adjust
5195         prototype and work with completion_tracker instead of VEC.
5196         * breakpoint.c (condition_completer): Adjust prototype and work
5197         with completion_tracker instead of VEC.
5198         * c-lang.c (c_language_defn, cplus_language_defn)
5199         (asm_language_defn, minimal_language_defn): Adjust to renames.
5200         * cli/cli-cmds.c (complete_command): Rework using
5201         completion_tracker.  Catch exceptions when completing.
5202         * cli/cli-decode.c (integer_unlimited_completer)
5203         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5204         with completion_tracker instead of VEC.
5205         * command.h (struct completion_tracker): Forward declare.
5206         (completer_ftype, completer_handle_brkchars_ftype): Change
5207         types.
5208         (complete_on_cmdlist, complete_on_enum): Adjust.
5209         * completer.c: Include <algorithm>.
5210         (struct gdb_completer_state): New.
5211         (current_completion): New global.
5212         (readline_line_completion_function): Delete.
5213         (noop_completer, filename_completer)
5214         (filename_completer_handle_brkchars, complete_files_symbols)
5215         (linespec_location_completer): Adjust to work with a
5216         completion_tracker instead of a VEC.
5217         (string_or_empty): New.
5218         (collect_explicit_location_matches): Adjust to work with a
5219         completion_tracker instead of a VEC.
5220         (explicit_location_completer): Rename to ...
5221         (complete_explicit_location): ... this and adjust to work with a
5222         completion_tracker instead of a VEC.
5223         (location_completer): Adjust to work with a completion_tracker
5224         instead of a VEC.
5225         (add_struct_fields): Adjust to work with a completion_list instead
5226         of VEC.
5227         (expression_completer): Rename to ...
5228         (complete_expression): ... this and adjust to work with a
5229         completion_tracker instead of a VEC.  Use complete_files_symbols.
5230         (expression_completer): Reimplement on top of complete_expression.
5231         (symbol_completer): Adjust to work with a completion_tracker
5232         instead of a VEC.
5233         (enum complete_line_internal_reason): Add describing comments.
5234         (complete_line_internal_normal_command): Adjust to work with a
5235         completion_tracker instead of a VEC.
5236         (complete_line_internal): Rename to ...
5237         (complete_line_internal_1): ... this and adjust to work with a
5238         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5239         handle_brkchars phase.
5240         (new_completion_tracker): Delete.
5241         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5242         complete_line_internal_1.
5243         (free_completion_tracker): Delete.
5244         (INITIAL_COMPLETION_HTAB_SIZE): New.
5245         (completion_tracker::completion_tracker)
5246         (completion_tracker::~completion_tracker): New.
5247         (maybe_add_completion): Delete.
5248         (completion_tracker::maybe_add_completion)
5249         (completion_tracker::add_completion)
5250         (completion_tracker::add_completions): New.
5251         (throw_max_completions_reached_error): Delete.
5252         (complete_line): Adjust to work with a completion_tracker instead
5253         of a VEC.  Don't create a completion_tracker_t or check for max
5254         completions here.
5255         (command_completer, command_completer_handle_brkchars)
5256         (signal_completer, reg_or_group_completer_1)
5257         (reg_or_group_completer, default_completer_handle_brkchars):
5258         Adjust to work with a completion_tracker.
5259         (gdb_completion_word_break_characters_throw): New.
5260         (gdb_completion_word_break_characters): Reimplement.
5261         (line_completion_function): Delete.
5262         (completion_tracker::recompute_lowest_common_denominator)
5263         (expand_preserving_ws)
5264         (completion_tracker::build_completion_result)
5265         (completion_result::completion_result)
5266         (completion_result::completion_result)
5267         (completion_result::~completion_result)
5268         (completion_result::completion_result)
5269         (completion_result::release_match_list, compare_cstrings)
5270         (completion_result::sort_match_list)
5271         (completion_result::reset_match_list)
5272         (gdb_rl_attempted_completion_function_throw)
5273         (gdb_rl_attempted_completion_function): New.
5274         * completer.h (completion_list, struct completion_result)
5275         (class completion_tracker): New.
5276         (complete_line): Add completion_tracker parameter.
5277         (readline_line_completion_function): Delete.
5278         (gdb_rl_attempted_completion_function): New.
5279         (noop_completer, filename_completer, expression_completer)
5280         (location_completer, symbol_completer, command_completer)
5281         (signal_completer, reg_or_group_completer): Update prototypes.
5282         (completion_tracker_t, new_completion_tracker)
5283         (make_cleanup_free_completion_tracker): Delete.
5284         (enum maybe_add_completion_enum): Delete.
5285         (maybe_add_completion): Delete.
5286         (throw_max_completions_reached_error): Delete.
5287         * corefile.c (complete_set_gnutarget): Adjust to work with a
5288         completion_tracker instead of a VEC.
5289         * cp-abi.c (cp_abi_completer): Adjust to work with a
5290         completion_tracker instead of a VEC.
5291         * d-lang.c (d_language_defn): Adjust.
5292         * disasm.c (disassembler_options_completer): Adjust to work with a
5293         completion_tracker instead of a VEC.
5294         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5295         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5296         with a completion_tracker instead of a VEC.
5297         (f_language_defn): Adjust.
5298         * go-lang.c (go_language_defn): Adjust.
5299         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5300         Adjust to work with a completion_tracker instead of a VEC.
5301         * infrun.c (handle_completer): Likewise.
5302         * interps.c (interpreter_completer): Likewise.
5303         * interps.h (interpreter_completer): Likewise.
5304         * language.c (unknown_language_defn, auto_language_defn)
5305         (local_language_defn): Adjust.
5306         * language.h (language_defn::la_make_symbol_completion_list):
5307         Rename to ...
5308         (language_defn::la_collect_symbol_completion_matches): ... this
5309         and adjust to work with a completion_tracker instead of a VEC.
5310         * m2-lang.c (m2_language_defn): Adjust.
5311         * objc-lang.c (objc_language_defn): Adjust.
5312         * opencl-lang.c (opencl_language_defn): Adjust.
5313         * p-lang.c (pascal_language_defn): Adjust.
5314         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5315         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5316         with a completion_tracker.
5317         * rust-lang.c (rust_language_defn): Adjust.
5318         * symtab.c (free_completion_list, do_free_completion_list)
5319         (return_val, completion_tracker): Delete.
5320         (completion_list_add_name, completion_list_add_symbol)
5321         (completion_list_add_msymbol, completion_list_objc_symbol)
5322         (completion_list_add_fields, add_symtab_completions): Add
5323         completion_tracker parameter and use it.
5324         (default_make_symbol_completion_list_break_on_1): Rename to...
5325         (default_collect_symbol_completion_matches_break_on): ... this.
5326         Add completion_tracker parameter and use it instead of allocating
5327         a completion tracker here.
5328         (default_make_symbol_completion_list_break_on): Delete old
5329         implementation.
5330         (default_make_symbol_completion_list): Delete.
5331         (default_collect_symbol_completion_matches): New.
5332         (make_symbol_completion_list): Delete.
5333         (collect_symbol_completion_matches): New.
5334         (make_symbol_completion_type): Rename to ...
5335         (collect_symbol_completion_matches_type): ... this.  Add
5336         completion_tracker parameter and use it instead of VEC.
5337         (make_file_symbol_completion_list_1): Rename to...
5338         (collect_file_symbol_completion_matches): ... this.  Add
5339         completion_tracker parameter and use it instead of VEC.
5340         (make_file_symbol_completion_list): Delete.
5341         (add_filename_to_list): Use completion_list instead of a VEC.
5342         (add_partial_filename_data::list): Now a completion_list.
5343         (make_source_files_completion_list): Work with a completion_list
5344         instead of a VEC.
5345         * symtab.h: Include "completer.h".
5346         (default_make_symbol_completion_list_break_on)
5347         (default_make_symbol_completion_list, make_symbol_completion_list)
5348         (make_symbol_completion_type, make_file_symbol_completion_list)
5349         (make_source_files_completion_list): Delete.
5350         (default_collect_symbol_completion_matches_break_on)
5351         (default_collect_symbol_completion_matches)
5352         (collect_symbol_completion_matches)
5353         (collect_symbol_completion_matches_type)
5354         (collect_file_symbol_completion_matches)
5355         (make_source_files_completion_list): New.
5356         * top.c (init_main): Don't install a rl_completion_entry_function
5357         hook.  Install a rl_attempted_completion_function hook instead.
5358         * tui/tui-layout.c (layout_completer): Adjust to work with a
5359         completion_tracker.
5360         * tui/tui-regs.c (tui_reggroup_completer):
5361         * tui/tui-win.c (window_name_completer, focus_completer)
5362         (winheight_completer): Adjust to work with a completion_tracker.
5363         * value.c: Include "completer.h".
5364         (complete_internalvar): Adjust to work with a completion_tracker.
5365         * value.h (complete_internalvar): Likewise.
5366
5367 2017-07-17  Pedro Alves  <palves@redhat.com>
5368
5369         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5370         renames.
5371         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5372         comments to completer_ftype's declaration.
5373         <completer_handle_brkchars>: Change type to
5374         completer_handle_brkchars_ftype.
5375         * command.h (completer_ftype): Add describing comment and give
5376         names to parameters.
5377         (completer_ftype_void): Rename to ...
5378         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5379         (set_cmd_completer_handle_brkchars): Adjust.
5380         * completer.c (filename_completer_handle_brkchars): New function.
5381         (complete_line_internal_normal_command): New function, factored
5382         out from ...
5383         (complete_line_internal): ... here.
5384         (command_completer_handle_brkchars)
5385         (default_completer_handle_brkchars)
5386         (completer_handle_brkchars_func_for_completer): New functions.
5387         * completer.h (set_gdb_completion_word_break_characters): Delete
5388         declaration.
5389         (completer_handle_brkchars_func_for_completer): New declaration.
5390         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5391         completer_handle_brkchars_func_for_completer.
5392
5393 2017-07-17  Pedro Alves  <palves@redhat.com>
5394
5395         * completer.c (symbol_completer): New function, based on
5396         make_symbol_completion_list_fn.
5397         * completer.h (symbol_completer): New declaration.
5398         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5399         * python/py-cmd.c (completers): Adjust.
5400         * symtab.c (make_symbol_completion_list_fn): Delete.
5401         * symtab.h (make_symbol_completion_list_fn): Delete.
5402         * cli/cli-decode.c (add_cmd): Adjust.
5403
5404 2017-07-17  Pedro Alves  <palves@redhat.com>
5405
5406         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5407         * dwarf2read.c: Include "filename-seen-cache.h".
5408         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5409         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5410         * filename-seen-cache.c: New file.
5411         * filename-seen-cache.h: New file.
5412         * symtab.c: Include "filename-seen-cache.h".
5413         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5414         (create_filename_seen_cache, clear_filename_seen_cache)
5415         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5416         to filename-seen-cache.h/filename-seen-cache.c.
5417         (output_source_filename, sources_info)
5418         (maybe_add_partial_symtab_filename)
5419         (make_source_files_completion_list): Adjust to use
5420         filename_seen_cache.
5421
5422 2017-07-17  Pedro Alves  <palves@redhat.com>
5423
5424         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5425         fields.
5426         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5427         dwarf2_debug_sections*)): New.
5428         (dwarf2_per_objfile::dwarf2_per_objfile(const
5429         dwarf2_per_objfile&)): Declare as deleted.
5430         (dwarf2_per_objfile::operator=): Declare as deleted.
5431         (dwarf2_per_objfile::dwarf2_per_objfile)
5432         (dwarf2_per_objfile::~dwarf2_per_objfile)
5433         (dwarf2_per_objfile::free_cached_comp_units): New.
5434         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5435         ctor.  Call dwarf2_per_objfile's ctor manually.
5436         (dwarf2_locate_sections): Deleted/refactored as ...
5437         (dwarf2_per_objfile::locate_sections): ... this new method.
5438         (free_cached_comp_units): Defer to
5439         dwarf2_per_objfile::free_cached_comp_units.
5440         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5441
5442 2017-07-14  Tom Tromey  <tom@tromey.com>
5443
5444         PR rust/21764:
5445         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5446         parameter.
5447         <UNOP_SIZEOF>: Split into separate case.
5448         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5449
5450 2017-07-14  Tom Tromey  <tom@tromey.com>
5451
5452         PR rust/21763:
5453         * symtab.c (symbol_matches_domain): Add language_rust to special
5454         case.
5455         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5456         treat LOC_TYPEDEF symbols as variables.
5457
5458 2017-07-14  Pedro Alves  <palves@redhat.com>
5459
5460         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5461         symtabs matching all symtabs with SRCFILE as file name instead of
5462         only considering the first hit, with lookup_symtab.
5463
5464 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5465
5466         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5467         operator_name parameters.
5468         (gen_expr): Update function call.
5469
5470 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5471
5472         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5473         parameter.
5474         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5475         Likewise.
5476         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5477         parameter, use agent_expr::gdbarch instead, update function
5478         calls.
5479         (locexpr_tracepoint_var_ref): Likewise.
5480         (loclist_tracepoint_var_ref): Likewise.
5481         * ax-gdb.c (gen_trace_static_fields): Likewise.
5482         (gen_traced_pop): Likewise.
5483         (gen_frame_args_address): Likewise.
5484         (gen_frame_locals_address): Likewise.
5485         (gen_var_ref): Likewise.
5486         (gen_struct_ref_recursive): Likewise.
5487         (gen_static_field): Likewise.
5488         (gen_maybe_namespace_elt): Likewise.
5489         (gen_expr): Likewise.
5490         (gen_trace_for_var): Likewise.
5491         (gen_trace_for_expr): Likewise.
5492         (gen_trace_for_return_address): Likewise.
5493
5494 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5495
5496         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5497         parameter.
5498         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5499
5500 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5501
5502         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5503         from ax, update calls.
5504         (gen_usual_arithmetic): Likewise.
5505         (gen_integral_promotions): Likewise.
5506         (gen_bitfield_ref): Likewise.
5507         (gen_primitive_field): Likewise.
5508         (gen_struct_ref_recursive): Likewise.
5509         (gen_struct_ref): Likewise.
5510         (gen_maybe_namespace_elt): Likewise.
5511         (gen_struct_elt_for_reference): Likewise.
5512         (gen_namespace_elt): Likewise.
5513         (gen_aggregate_elt_ref): Likewise.
5514         (gen_expr): Get gdbarch from ax, update calls.
5515         (gen_expr_binop_rest): Likewise.
5516
5517 2017-07-13  Pedro Alves  <palves@redhat.com>
5518
5519         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5520         as default tdesc.
5521         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5522         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5523         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5524         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5525         tdep.
5526         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5527         Get final tdesc from the tdep.
5528         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5529         default tdesc.
5530         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5531         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5532         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5533         Use it as default tdesc.
5534         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5535         down to amd_init_abi.  No longer handle fallback tdesc here.
5536         * amd64-tdep.h (tdesc_x32): Declare.
5537         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5538         parameter.
5539         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5540         as default tdesc.
5541
5542 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5543
5544         * s390-linux-tdep.c (s390_process_record): Add support for
5545         instructions new in arch12.
5546
5547 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5548
5549         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5550         PT_GETFSBASE and PT_GETGSBASE.
5551         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5552         PT_SETGSBASE.
5553
5554 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5555
5556         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5557         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5558         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5559         those rules.
5560         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5561         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5562         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5563         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5564         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5565         * features/i386/amd64.xml: Add 64bit-segments.xml.
5566         * features/i386/amd64-avx-avx512.c: Regenerated.
5567         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5568         * features/i386/amd64-avx-mpx.c: Regenerated.
5569         * features/i386/amd64-avx.c: Regenerated.
5570         * features/i386/amd64-mpx.c: Regenerated.
5571         * features/i386/amd64.c: Regenerated.
5572         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5573         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5574         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5575         * regformats/i386/amd64-avx.dat: Regenerated.
5576         * regformats/i386/amd64-mpx.dat: Regenerated.
5577         * regformats/i386/amd64.dat: Regenerated.
5578
5579 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5580
5581         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5582         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5583
5584 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5585
5586         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5587         unsetenv.
5588         * gnulib/aclocal.m4: Regenerate.
5589         * gnulib/config.in: Regenerate.
5590         * gnulib/configure: Regenerate.
5591         * gnulib/import/Makefile.am: Regenerate.
5592         * gnulib/import/Makefile.in: Regenerate.
5593         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5594         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5595         * gnulib/import/m4/environ.m4: New file.
5596         * gnulib/import/m4/setenv.m4: New file.
5597         * gnulib/import/setenv.c: New file.
5598         * gnulib/import/unsetenv.c: New file.
5599
5600 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5601
5602         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5603         address when op is DW_OP_addr.
5604
5605 2017-07-09  Tom Tromey  <tom@tromey.com>
5606
5607         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5608         check and apply to outer type.
5609
5610 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5611
5612         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5613         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5614         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5615         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5616
5617 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5618
5619         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5620
5621 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5622
5623         * corelow.c (get_core_siginfo): Remove.
5624         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5625         instead of get_core_siginfo.
5626         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5627         * gdbarch.h: Re-generate.
5628         * gdbarch.c: Re-generate.
5629         * linux-tdep.c (linux_core_xfer_siginfo): New.
5630         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5631
5632 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5633
5634         * corelow.c (thread_section_name): Move to ...
5635         * gdbcore.h (thread_section_name): ... here.
5636
5637 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5638
5639         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5640         (struct siginfo32): New.
5641         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5642         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5643         via ptrace(PT_LWPINFO).
5644
5645 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5646
5647         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5648         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5649         (fbsd_get_siginfo_type): New.
5650         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5651         (_initialize_fbsd_tdep): New.
5652
5653 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5654
5655         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5656         a singular dwo_unit*) to support multiple CUs in the same way that
5657         multiple TUs are supported.
5658         (create_cus_hash_table): Replace create_dwo_cu with a function for
5659         parsing multiple CUs from a DWO file.
5660         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5661         create_dwo_cu.
5662         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5663         htab_find, rather than comparing the signature to a singleton CU in
5664         the dwo_file.
5665
5666 2017-07-06  Pedro Alves  <palves@redhat.com>
5667
5668         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5669
5670 2017-07-04  Pedro Alves  <palves@redhat.com>
5671
5672         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5673         * gdbtypes.h (TYPE_STATIC): Delete.
5674         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5675         is_synchronized, is_native>: Delete.
5676         <dummy>: Bump.
5677         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5678         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5679         (TYPE_FN_FIELD_ABSTRACT): Delete.
5680
5681 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5682
5683         * buffer.h (buffer_finish): Fix spelling mistakes.
5684
5685 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5686
5687         * .dir-locals.el: Automatically switch to C-style comments in
5688         versions of Emacs that support the feature.
5689
5690 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5691             Pedro Alves  <palves@redhat.com>
5692
5693         PR cli/21688
5694         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5695         (process_next_line): New variable 'inline_cmd'.
5696         Adjust 'if' clauses for "python", "compile" and "guile" to use
5697         'command_name_equals' and check for '!inline_cmd'.
5698
5699 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5700
5701         PR cli/21688
5702         * cli/cli-script.c (command_name_equals_not_inline): New function.
5703         (process_next_line): Adjust 'if' clauses for "python", "compile"
5704         and "guile" to use command_name_equals_not_inline.
5705
5706 2017-06-29  Pedro Alves  <palves@redhat.com>
5707
5708         * completer.c (expression_completer): Call
5709         linespec_location_completer instead of location_completer.
5710
5711 2017-06-29  Pedro Alves  <palves@redhat.com>
5712
5713         * completer.c (expression_completer): Remove code that recomputes
5714         'text' from 'word'.
5715
5716 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5717
5718         * regformats/regdat.sh: Generate code with
5719         "ifndef IN_PROCESS_AGENT".
5720
5721 2017-06-28  Pedro Alves  <palves@redhat.com>
5722
5723         * command.h: Include "common/scoped_restore.h".
5724
5725 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5726
5727         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5728         instead of obstack_grow.
5729
5730 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5731
5732         PR gdb/21337
5733         * symfile.c (reread_symbols): Call objfiles_changed just before
5734         read_symbols.
5735
5736 2017-06-27  Pedro Alves  <palves@redhat.com>
5737
5738         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5739         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5740         (completion_list_add_symbol, completion_list_add_msymbol):
5741         ... these new functions.
5742         (add_symtab_completions)
5743         (default_make_symbol_completion_list_break_on_1): Adjust.
5744
5745 2017-06-27  Pedro Alves  <palves@redhat.com>
5746
5747         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5748         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5749         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5750         dtor.
5751         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5752         'storage_obstack' field an auto_obstack.  In-class initialize all
5753         non-bitfield fields.  Make minsyms_read bool.
5754         * symfile.c (read_symbols): Adjust.
5755
5756 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5757
5758         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5759         (gdbsim_store_register): Likewise.
5760
5761 2017-06-27  Pedro Alves  <palves@redhat.com>
5762
5763         * c-exp.y (name_obstack): Now an auto_obstack.
5764         (yylex): Use auto_obstack::clear.
5765         (c_parse): Use auto_obstack::clear instead of reinitializing and
5766         freeing the obstack.
5767         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5768         * d-exp.y (name_obstack): Now an auto_obstack.
5769         (yylex): Use auto_obstack::clear.
5770         (d_parse): Use auto_obstack::clear instead of reinitializing and
5771         freeing the obstack.
5772         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5773         auto_obstack.
5774         * dwarf2read.c (create_addrmap_from_index)
5775         (dwarf2_build_psymtabs_hard)
5776         (update_enumeration_type_from_children): Likewise.
5777         * gdb_obstack.h (auto_obstack): New type.
5778         * go-exp.y (name_obstack): Now an auto_obstack.
5779         (build_packaged_name): Use auto_obstack::clear.
5780         (go_parse): Use auto_obstack::clear instead of reinitializing and
5781         freeing the obstack.
5782         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5783         auto_obstack.
5784         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5785         * rust-exp.y (work_obstack): Now an auto_obstack.
5786         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5787         reinitializing and freeing the obstack.
5788         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5789         (host_char_to_target): Use auto_obstack.
5790         * utils.h (make_cleanup_obstack_free): Delete declaration.
5791         * valprint.c (generic_emit_char, generic_printstr): Use
5792         auto_obstack.
5793
5794 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5795
5796         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5797         thread.
5798         (darwin_init_thread_list): Don't update dummy thread.
5799         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5800
5801 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5802
5803         * record-full.c (netorder16): Remove.
5804
5805 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5806
5807         * common/diagnostics.h: Define macros for GCC.
5808         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5809         * common/vec.h: Include diagnostics.h.
5810         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5811         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5812         warning.
5813
5814 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5815
5816         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5817         New macro.
5818         * ada-lex.l: Ignore deprecated register warnings.
5819
5820 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5821
5822         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5823         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5824
5825 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5826
5827         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5828         its own line.
5829
5830 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5831
5832         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5833
5834 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5835
5836         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5837         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5838         (xtensa_register_read_masked): Likewise.
5839
5840 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5841
5842         * common/environ.c (gdb_environ::unset): Update comment.
5843
5844 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5845
5846         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5847         registers.
5848
5849 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5850
5851         * record-full.c (record_full_exec_insn): Use byte_vector.
5852
5853 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5854
5855         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5856         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5857
5858 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5859
5860         * remote.c (cached_reg): Move from here...
5861         * regcache.h (cached_reg): ...to here.
5862         * python/py-unwind.c (struct reg_info): Remove.
5863         (cached_frame_info): Use cached_reg_t.
5864         (pyuw_prev_register): Likewise.
5865         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5866         (pyuw_dealloc_cache): Free all registers.
5867
5868 2017-06-22  Pedro Alves  <palves@redhat.com>
5869             Simon Marchi  <simon.marchi@ericsson.com>
5870
5871         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5872         warning.
5873         * common/diagnostics.h: New file.
5874
5875 2017-06-22  Pedro Alves  <palves@redhat.com>
5876
5877         * common/agent.h: Add include guards.
5878
5879 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5880
5881         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5882         talk about addressable units instead of bytes.
5883
5884 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5885
5886         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5887         of '::const_iterator'.
5888
5889 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5890
5891         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5892         'unittests/environ-selftests.c'.
5893         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5894         * charset.c (find_charset_names): Declare object 'iconv_env'.
5895         Update code to use 'iconv_env' object.  Remove call to
5896         'free_environ'.
5897         * common/environ.c: Include <utility>.
5898         (make_environ): Delete function.
5899         (free_environ): Delete function.
5900         (gdb_environ::clear): New function.
5901         (gdb_environ::operator=): New function.
5902         (gdb_environ::get): Likewise.
5903         (environ_vector): Delete function.
5904         (set_in_environ): Delete function.
5905         (gdb_environ::set): New function.
5906         (unset_in_environ): Delete function.
5907         (gdb_environ::unset): New function.
5908         (gdb_environ::envp): Likewise.
5909         * common/environ.h: Include <vector>.
5910         (struct gdb_environ): Delete; transform into...
5911         (class gdb_environ): ... this class.
5912         (free_environ): Delete prototype.
5913         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5914         environ_vector): Likewise.
5915         * infcmd.c (run_command_1): Update code to call
5916         'envp' from 'gdb_environ' class.
5917         (environment_info): Update code to call methods from 'gdb_environ'
5918         class.
5919         (unset_environment_command): Likewise.
5920         (path_info): Likewise.
5921         (path_command): Likewise.
5922         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5923         (inferior::inferior): Initialize 'environment' using the host's
5924         information.
5925         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5926         Include "environ.h".
5927         (class inferior) <environment>: Change type from 'struct
5928         gdb_environ' to 'gdb_environ'.
5929         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5930         methods from 'gdb_environ' class.
5931         * solib.c (solib_find_1): Likewise
5932         * unittests/environ-selftests.c: New file.
5933
5934 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5935
5936         * features/i386/i386-linux.xml: Exchange the order of including
5937         32bit-linux.xml and 32bit-sse.xml.
5938         * features/i386/i386-linux.c: Regenerated.
5939
5940 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5941
5942         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5943         Delete copy ctor and assignment operator.
5944         (tdesc_type): Likewise.
5945         (tdesc_feature): Likewise.
5946         (tdesc_free_reg): Remove.
5947         (tdesc_create_reg): Use new.
5948         (tdesc_free_type): Remove.
5949         (tdesc_create_vector): Use new.
5950         (tdesc_create_union): Likewise.
5951         (tdesc_create_flags): Likewise.
5952         (tdesc_create_enum): Likewise.
5953         (tdesc_free_feature): Delete.
5954         (free_target_description): Use delete.
5955
5956 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
5957
5958         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5959         registers.
5960
5961 2017-06-19  Pedro Alves  <palves@redhat.com>
5962
5963         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5964         after gdb::unlinker.
5965
5966 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
5967
5968         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5969         gdb_environ to access an environment variable.
5970
5971 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
5972
5973         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5974         gdb_byte*.
5975
5976 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5977
5978         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5979
5980 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5981
5982         * configure: Re-generate.
5983         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5984
5985 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5986
5987         * configure: Re-generate.
5988         * warning.m4: Pass -Werror to compiler when checking for
5989         supported warning flags.
5990
5991 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5992
5993         * Makefile.in (COMPILE.pre): Add "-x c++".
5994
5995 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
5996             Pedro Alves  <palves@redhat.com>
5997             Yao Qi  <yao.qi@linaro.org>
5998
5999         * defs.h (RequireLongest): New.
6000         (extract_integer): Declare function template.
6001         (extract_signed_integer): Remove the declaration, but define it
6002         static inline.
6003         (extract_unsigned_integer): Likewise.
6004         (store_integer): Declare function template.
6005         (store_signed_integer): Remove the declaration, but define it
6006         static inline.
6007         (store_unsigned_integer): Likewise.
6008         * findvar.c (extract_integer): New function template.
6009         (extract_signed_integer): Remove.
6010         (extract_unsigned_integer): Remove.
6011         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6012         instantiations.
6013         (store_integer): New function template.
6014         (store_signed_integer): Remove.
6015         (store_unsigned_integer): Remove.
6016         (store_integer): Explicit instantiations.
6017         * regcache.c (regcache_raw_read_signed): Update.
6018         (regcache::raw_read): New function.
6019         (regcache::raw_read_signed): Remove.
6020         (regcache::raw_read_unsigned): Remove.
6021         (regcache_raw_read_unsigned): Update.
6022         (regcache_raw_write_unsigned): Update.
6023         (regcache::raw_write_signed): Remove.
6024         (regcache::raw_write): New function.
6025         (regcache_cooked_read_signed): Update.
6026         (regcache::raw_write_unsigned): Remove.
6027         (regcache::cooked_read_signed): Remove.
6028         (regcache_cooked_read_unsigned): Update.
6029         (regcache::cooked_read_unsigned): Remove.
6030         (regcache_cooked_write_signed): Update.
6031         (regcache_cooked_write_unsigned): Update.
6032         * regcache.h (regcache) <raw_read_signed>: Remove.
6033         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6034         <raw_read, raw_write>: New.
6035         <cooked_read_signed, cooked_write_signed>: Remove.
6036         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6037         <cooked_read, cooked_write>: New.
6038         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6039         (sh64_pseudo_register_write): Update.
6040
6041 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6042
6043         * arc-tdep.c (arc_disassembler_options): New variable.
6044         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6045         of default_print_insn.
6046         (arc_delayed_print_insn): Set info->section when needed,
6047         use default_print_insn to retrieve a disassembler.
6048
6049 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6050
6051         PR gdb/21574
6052         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6053         to mention $SHELL and startup-with-shell.
6054
6055 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6056
6057         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6058
6059 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6060
6061         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6062         default_print_insn instead of print_insn_aarch64.
6063         * arm-tdep.c (gdb_print_insn_arm): Call
6064         default_print_insn instead of print_insn_big_arm
6065         and print_insn_little_arm.
6066         * i386-tdep.c (i386_print_insn): Call default_print_insn
6067         instead of print_insn_i386.
6068         * ia64-tdep.c (ia64_print_insn): Call
6069         default_print_insn instead of print_insn_ia64.
6070         * mips-tdep.c (gdb_print_insn_mips): Call
6071         default_print_insn instead of print_insn_big_mips
6072         and print_insn_little_mips.
6073         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6074         instead of print_insn_spu.
6075
6076 2017-06-14  Pedro Alves  <palves@redhat.com>
6077
6078         * ada-lang.c: Include "common/byte-vector.h".
6079         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6080         * charset.c (wchar_iterator::iterate): Resize the vector instead
6081         of reserving it.
6082         * common/byte-vector.h: Include "common/def-vector.h".
6083         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6084         * cli/cli-dump.c: Include "common/byte-vector.h".
6085         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6086         * common/byte-vector.h: New file.
6087         * common/def-vector.h: New file.
6088         * common/default-init-alloc.h: New file.
6089         * dwarf2loc.c: Include "common/byte-vector.h".
6090         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6091         instead of reserving it.
6092         * dwarf2read.c: Include "common/byte-vector.h".
6093         (data_buf::m_vec): Now a gdb::byte_vector.
6094         * gdb_regex.c: Include "common/def-vector.h".
6095         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6096         * mi/mi-main.c: Include "common/byte-vector.h".
6097         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6098         * printcmd.c: Include "common/byte-vector.h".
6099         (print_scalar_formatted): Use gdb::byte_vector.
6100         * valprint.c: Include "common/byte-vector.h".
6101         (maybe_negate_by_bytes, print_decimal_chars): Use
6102         gdb::byte_vector.
6103
6104 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6105
6106         * darwin-nat.c: Include "nat/fork-inferior.h".
6107
6108 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6109
6110         * configure.nat: Factor out Darwin bits that are not
6111         architecture-specific.  Add fork-inferior.o.
6112
6113 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6114
6115         * configure.nat: Factor out AIX bits that are not
6116         architecture-specific.  Add fork-inferior.o.
6117
6118 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6119
6120         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6121         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6122         wrappers that just call rw_pieced_value.
6123
6124 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6125
6126         * dwarf2loc.c (write_pieced_value): When writing the data for a
6127         memory piece, use write_memory_with_notification instead of
6128         write_memory.
6129
6130 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6131
6132         * valops.c (read_value_memory): Change embedded_offset to
6133         represent a bit offset instead of a byte offset.
6134         * value.h (read_value_memory): Adjust comment.
6135
6136 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6137
6138         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6139         dest_offset_bits and source_offset_bits.
6140         (write_pieced_value): Likewise.
6141
6142 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6143
6144         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6145         given by DW_OP_bit_piece.
6146         (write_pieced_value): Likewise.
6147
6148 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6149
6150         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6151         some other preparations to the places where sufficient information
6152         is available.
6153         (write_pieced_value): Likewise.
6154
6155 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6156
6157         * dwarf2loc.c (bits_to_bytes): New function.
6158         (read_pieced_value): Fix offset calculations for register pieces
6159         on big-endian targets.
6160         (write_pieced_value): Likewise.
6161
6162 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6163
6164         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6165         (write_pieced_value): Likewise.
6166
6167 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6168
6169         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6170         transfer the source value's least significant bits, instead of its
6171         lowest-addressed ones.  Rename type_len to max_offset.
6172         (read_pieced_value): Mirror above changes to write_pieced_value as
6173         applicable.
6174
6175 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6176
6177         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6178         truncate full bytes from dest_offset_bits before using it as an
6179         offset into the buffer.
6180
6181 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6182
6183         * dwarf2loc.c (write_pieced_value): Include transfer size in
6184         byte-wise check.
6185
6186 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6187
6188         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6189         calculation of this_size.
6190
6191 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6192
6193         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6194         when targeting a bit-field.
6195         (write_pieced_value): Likewise.
6196
6197 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6198
6199         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6200         (allocate_piece_closure): Drop addr_size parameter.
6201         (dwarf2_evaluate_loc_desc_full): Adjust call to
6202         allocate_piece_closure.
6203
6204 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6205
6206         PR gdb/21226
6207         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6208         the LSB end, independent of endianness.
6209
6210 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6211
6212         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6213         size capping.
6214
6215 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6216
6217         * mips-linux-nat.c: Move include features/mips*-linux.c to
6218         mips-linux-tdep.c.
6219         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6220         to mips-linux-tdep.c.
6221         * mips-linux-tdep.c: Include features/mips*-linux.c
6222         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6223         functions.
6224         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6225         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6226         (tdesc_mips64_dsp_linux): Declare.
6227
6228 2017-06-12  Tom Tromey  <tom@tromey.com>
6229
6230         * valprint.h (val_print_type_code_int): Remove.
6231         * valprint.c (generic_val_print_int): Always call
6232         val_print_scalar_formatted.
6233         (val_print_type_code_int): Remove.
6234         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6235         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6236         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6237         * ada-valprint.c (ada_val_print_num): Use
6238         val_print_scalar_formatted.
6239
6240 2017-06-12  Tom Tromey  <tom@tromey.com>
6241
6242         * printcmd.c (print_scalar_formatted): Unify the two switches.
6243         Don't convert scalars to LONGEST.
6244
6245 2017-06-12  Tom Tromey  <tom@tromey.com>
6246
6247         PR exp/16225:
6248         * valprint.h (print_decimal_chars): Update.
6249         * valprint.c (maybe_negate_by_bytes): New function.
6250         (print_decimal_chars): Add "is_signed" argument.
6251         * printcmd.c (print_scalar_formatted): Update.
6252
6253 2017-06-12  Tom Tromey  <tom@tromey.com>
6254
6255         PR exp/16225:
6256         * valprint.h (print_binary_chars, print_hex_chars): Update.
6257         * valprint.c (val_print_type_code_int): Update.
6258         (print_binary_chars): Add "zero_pad" argument.
6259         (emit_octal_digit): New function.
6260         (print_octal_chars): Don't zero-pad.
6261         (print_decimal_chars): Likewise.
6262         (print_hex_chars): Add "zero_pad" argument.
6263         * sh64-tdep.c (sh64_do_fp_register): Update.
6264         * regcache.c (regcache::dump): Update.
6265         * printcmd.c (print_scalar_formatted): Update.
6266         * infcmd.c (default_print_one_register_info): Update.
6267
6268 2017-06-12  Pedro Alves  <palves@redhat.com>
6269             Alan Hayward  <alan.hayward@arm.com>
6270
6271         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6272         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6273         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6274         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6275         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6276
6277 2017-06-12  Pedro Alves  <palves@redhat.com>
6278
6279         * dwarf2read.c (mapped_symtab::data): Now a vector of
6280         symtab_index_entry instead of vector of
6281         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6282         whether an element's name is NULL instead of checking whether the
6283         element itself is NULL.
6284         (find_slot): Change return type.  Adjust.
6285         (hash_expand, , add_index_entry, uniquify_cu_indices)
6286         (write_hash_table): Adjust.
6287
6288 2017-06-12  Pedro Alves  <palves@redhat.com>
6289
6290         * dwarf2read.c (recursively_count_psymbols): New function.
6291         (write_psymtabs_to_index): Call it to compute number of psyms and
6292         pass estimate size of psyms_seen to unordered_set's ctor.
6293
6294 2017-06-12  Pedro Alves  <palves@redhat.com>
6295
6296         * dwarf2read.c (write_hash_table): Check if key already exists
6297         before emplacing.
6298
6299 2017-06-12  Pedro Alves  <palves@redhat.com>
6300
6301         * dwarf2read.c (data_buf::append_space): Rename to...
6302         (data_buf::grow): ... this, and make private.  Adjust all callers.
6303         (data_buf::append_uint): New method.
6304         (add_address_entry, write_one_signatured_type)
6305         (write_psymtabs_to_index): Use it.
6306
6307 2017-06-12  Pedro Alves  <palves@redhat.com>
6308
6309         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6310         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6311         (data_buf::file_write): Call ::fwrite directly.
6312
6313 2017-06-12  Pedro Alves  <palves@redhat.com>
6314
6315         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6316         std::vector::erase.
6317
6318 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6319
6320         Code cleanup: C++ify .gdb_index producer.
6321         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6322         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6323         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6324         (create_strtab, add_string): Remove.
6325         (file_write, data_buf): New.
6326         (struct symtab_index_entry): Use std::vector for cu_indices.
6327         (struct mapped_symtab): Use std::vector for data.
6328         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6329         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6330         Remove.
6331         (find_slot): Change return type.  Update it to the new data structures.
6332         (hash_expand, add_index_entry): Update it to the new data structures.
6333         (offset_type_compare): Remove.
6334         (uniquify_cu_indices): Update it to the new data structures.
6335         (c_str_view, c_str_view_hasher, vector_hasher): New.
6336         (add_indices_to_cpool): Remove.
6337         (write_hash_table): Update it to the new data structures.
6338         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6339         (eq_psymtab_cu_index): Remove.
6340         (psym_index_map): New typedef.
6341         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6342         reference and std::unordered_map for cu_index_htab.
6343         (add_address_entry, add_address_entry_worker, write_address_map)
6344         (write_psymbols): Update it to the new data structures.
6345         (write_obstack): Remove.
6346         (struct signatured_type_index_data): Change types_list to a data_buf
6347         reference and psyms_seen to a std::unordered_set reference.
6348         (write_one_signatured_type, recursively_write_psymbols)
6349         (write_psymtabs_to_index): Update it to the new data structures.
6350
6351 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6352
6353         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6354         separate-debug-file commands.
6355         * symfile.h (separate_debug_file_debug): New global.
6356         * symfile.c (separate_debug_file_debug): New global.
6357         (separate_debug_file_exists, find_separate_debug_file): Add
6358         debug output.
6359         (_initialize_symfile): Add "set debug separate-debug-file"
6360         command.
6361         * build-id.c (build_id_to_debug_bfd,
6362         find_separate_debug_file_by_buildid): Add debug output.
6363
6364 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6365
6366         * gdbarch.sh (displaced_step_free_closure): Remove.
6367         * gdbarch.h, gdbarch.c: Re-generate.
6368         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6369         displaced_step_free_closure.
6370         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6371         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6372         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6373         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6374         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6375         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6376         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6377         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6378         * infrun.c (displaced_step_clear): Call xfree instead of
6379         gdbarch_displaced_step_free_closure.
6380
6381 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6382
6383         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6384         NULL".
6385
6386 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6387
6388         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6389         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6390         (mn10300_push_dummy_call): Likewise.
6391
6392 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6393
6394         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6395
6396 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6397
6398         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6399
6400 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6401
6402         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6403         able to start inferiors using a shell.
6404         (New remote packets): Announce new packet "QStartupWithShell".
6405         * remote.c: Add PACKET_QStartupWithShell.
6406         (extended_remote_create_inferior): Handle new
6407         PACKET_QStartupWithShell.
6408         (remote_protocol_features) <QStartupWithShell>: New entry for
6409         PACKET_QStartupWithShell.
6410         (_initialize_remote): Call "add_packet_config_cmd" for
6411         QStartupShell.
6412
6413 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6414             Pedro Alves  <palves@redhat.com>
6415
6416         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6417         and "nat/fork-inferior.h".
6418         * common/common-inferior.h: New file, with contents from
6419         "gdb/inferior.h".
6420         * commom/common-utils.c: Include "common-utils.h".
6421         (stringify_argv): New function.
6422         * common/common-utils.h (stringify_argv): New prototype.
6423         * configure.nat: Add "fork-inferior.o" as a dependency for
6424         "*linux*", "fbsd*" and "nbsd*" hosts.
6425         * corefile.c (get_exec_file): Update comment.
6426         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6427         instead of "startup_inferior".
6428         (darwin_create_inferior): Call "add_thread_silent" after
6429         "fork_inferior".
6430         * fork-child.c: Cleanup unnecessary includes.
6431         (SHELL_FILE): Move to "common/common-fork-child.c".
6432         (environ): Likewise.
6433         (exec_wrapper): Initialize.
6434         (get_exec_wrapper): New function.
6435         (breakup_args): Move to "common/common-fork-child.c"; rename to
6436         "breakup_args_for_exec".
6437         (escape_bang_in_quoted_argument): Move to
6438         "common/common-fork-child.c".
6439         (saved_ui): New variable.
6440         (prefork_hook): New function.
6441         (postfork_hook): Likewise.
6442         (postfork_child_hook): Likewise.
6443         (gdb_startup_inferior): Likewise.
6444         (fork_inferior): Move to "common/common-fork-child.c".  Update
6445         function to support gdbserver.
6446         (startup_inferior): Likewise.
6447         * gdbcore.h (get_exec_file): Remove declaration.
6448         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6449         instead of "startup_inferior".  Call "add_thread_silent" after
6450         "fork_inferior".
6451         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6452         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6453         instead of "startup_inferior".  Call "add_thread_silent" after
6454         "fork_inferior".
6455         * inferior.h: Include "common-inferior.h".
6456         (trace_start_error): Move to "common/common-utils.h".
6457         (trace_start_error_with_name): Likewise.
6458         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6459         (startup_inferior): Likewise.
6460         (gdb_startup_inferior): New prototype.
6461         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6462         * nat/fork-inferior.h: New file.
6463         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6464         instead of "startup_inferior".  Call "add_thread_silent" after
6465         "fork_inferior".
6466         * target.h (target_terminal_init): Move prototype to
6467         "target/target.h".
6468         (target_terminal_inferior): Likewise.
6469         (target_terminal_ours): Likewise.
6470         * target/target.h (target_terminal_init): New prototype, moved
6471         from "target.h".
6472         (target_terminal_inferior): Likewise.
6473         (target_terminal_ours): Likewise.
6474         * utils.c (gdb_flush_out_err): New function.
6475
6476 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6477
6478         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6479         * common/common-gdbthread.h: New file, with parts from
6480         "gdb/gdbthread.h".
6481         * gdbthread.h: Include "common-gdbthread.h".
6482         (switch_to_thread): Moved to "common/common-gdbthread.h".
6483
6484 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6485
6486         * Makefile.in (SFILES): Add "common/job-control.c".
6487         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6488         (COMMON_OBS): Add "job-control.o".
6489         * common/job-control.c: New file, with contents from
6490         "gdb/inflow.c".
6491         * common/job-control.h: New file, with contents from "terminal.h".
6492         * fork-child.c: Include "job-control.h".
6493         * inflow.c: Include "job-control.h".
6494         (gdb_setpgid): Move to "common/common-inflow.c".
6495         (_initialize_inflow): Move setting of "job_control" to
6496         "handle_job_control".
6497         * terminal.h (job_control): Moved to "common/common-terminal.h".
6498         (gdb_setpgid): Likewise.
6499         * top.c: Include "job_control.h".
6500         * utils.c: Likewise.
6501         (job_control): Moved to "job-control.c".
6502
6503 2017-06-07  Pedro Alves  <palves@redhat.com>
6504
6505         * Makefile.in (SFILES): Add gdb_regex.c.
6506         (COMMON_OBS): Add gdb_regex.o.
6507         * ada-lang.c (ada_add_standard_exceptions)
6508         (ada_add_exceptions_from_frame, name_matches_regex)
6509         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6510         parameter type to compiled_regex.  Adjust.
6511         (ada_exceptions_list): Use compiled_regex.
6512         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6513         std::unique_ptr<compiled_regex>.
6514         (exception_catchpoint::~exception_catchpoint): Remove regfree
6515         call.
6516         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6517         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6518         * breakpoint.c (solib_catchpoint::compiled): Now a
6519         std::unique_ptr<compiled_regex>.
6520         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6521         (check_status_catch_solib): Adjust to use compiled_regex.
6522         (add_solib_catchpoint): Adjust to use compiled_regex.
6523         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6524         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6525         compiled_regex reference.  Adjust to use it.
6526         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6527         declaration.  Include "gdb_regex.h".
6528         (apropos_cmd): Change regex parameter to compiled_regex reference.
6529         * gdb_regex.c: New file.
6530         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6531         declarations.
6532         (class compiled_regex): New.
6533         * linux-tdep.c: Include "common/gdb_optional.h".
6534         (struct mapping_regexes): New, factored out from
6535         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6536         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6537         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6538         * probe.c: Include "common/gdb_optional.h".
6539         (collect_probes): Use compiled_regex and gdb::optional and remove
6540         cleanups.
6541         * skip.c: Include "common/gdb_optional.h".
6542         (skiplist_entry::compiled_function_regexp): Now a
6543         gdb::optional<compiled_regex>.
6544         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6545         (free_skiplist_entry): Remove regfree call.
6546         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6547         compiled_regex and gdb::optional.
6548         * symtab.c: Include "common/gdb_optional.h".
6549         (search_symbols): Use compiled_regex and gdb::optional.
6550         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6551         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6552         to gdb_regex.c.
6553
6554 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6555
6556         * regcache.c (regcache::save): Avoid buffer use.
6557         (regcache::dump): Likewise.
6558
6559 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6560
6561         * sh-tdep.c (sh_pseudo_register_read): Remove
6562         MAX_REGISTER_SIZE.
6563         (sh_pseudo_register_write): Likewise.
6564         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6565         (sh64_pseudo_register_write): Likewise
6566
6567 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6568
6569         * aarch64-tdep.c (aarch64_store_return_value): Use
6570         V_REGISTER_SIZE.
6571         (aarch64_pseudo_read_value): Likewise.
6572         (aarch64_pseudo_write): Likewise.
6573
6574 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6575
6576         * regformats/regdef.h (set_register_cache): Remove the
6577         declaration.
6578
6579 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6580
6581         * frame.c (frame_unwind_register_signed): Use
6582         frame_unwind_register_value.
6583
6584 2017-06-06  Pedro Alves  <palves@redhat.com>
6585
6586         PR breakpoints/21553
6587         * breakpoint.c (create_breakpoints_sal_default)
6588         (init_breakpoint_sal, create_breakpoint_sal): Use
6589         gdb::unique_xmalloc_ptr for string parameters.
6590         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6591         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6592         (base_breakpoint_create_breakpoints_sal)
6593         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6594         (strace_marker_create_breakpoints_sal)
6595         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6596         string parameters.
6597         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6598         gdb::unique_xmalloc_ptr for string parameters.
6599         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6600         parameters.
6601
6602 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6603
6604         * alpha-tdep.c (alpha_register_to_value): Use
6605         get_frame_register_value.
6606         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6607
6608 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6609
6610         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6611         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6612         (ia64_value_to_register): Likewise.
6613         (ia64_extract_return_value): Likewise.
6614         (ia64_store_return_value): Likewise.
6615         (ia64_push_dummy_call): Likewise.
6616
6617 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6618
6619         GDB 8.0 released.
6620
6621 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6622
6623         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6624
6625 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6626
6627         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6628         parameter.
6629         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6630
6631 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6632
6633         * event-loop.c (poll_timers): Unallocate timer using delete
6634         instead of xfree.
6635
6636 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6637
6638         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6639         (struct breakpoint) <~breakpoint>: New.
6640         (struct watchpoint): Inherit from breakpoint.
6641         <~watchpoint>: New.
6642         <base>: Remove.
6643         (struct tracepoint): Inherit from breakpoint.
6644         <base>: Remove.
6645         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6646         (struct longjmp_breakpoint): Inherit from breakpoint.
6647         <~longjmp_breakpoint>: New.
6648         <base>: Remove.
6649         (new_breakpoint_from_type): Remove casts.
6650         (watchpoint_in_thread_scope): Remove reference to base field.
6651         (watchpoint_del_at_next_stop): Likewise.
6652         (update_watchpoint): Likewise.
6653         (watchpoint_check): Likewise.
6654         (bpstat_check_watchpoint): Likewise.
6655         (set_longjmp_breakpoint): Likewise.
6656         (struct fork_catchpoint): Inherit from breakpoint.
6657         <base>: Remove.
6658         (struct solib_catchpoint): Inherit from breakpoint.
6659         <~solib_catchpoint>: New.
6660         <base>: Remove.
6661         (dtor_catch_solib): Change to ...
6662         (solib_catchpoint::~solib_catchpoint): ... this.
6663         (breakpoint_hit_catch_solib): Remove reference to base field.
6664         (add_solib_catchpoint): Likewise.
6665         (create_fork_vfork_event_catchpoint): Likewise.
6666         (struct exec_catchpoint): Inherit from breakpoint.
6667         <~exec_catchpoint>: New.
6668         <base>: Remove.
6669         (dtor_catch_exec): Change to ...
6670         (exec_catchpoint::~exec_catchpoint): ... this.
6671         (dtor_watchpoint): Change to ...
6672         (watchpoint::~watchpoint): ... this.
6673         (watch_command_1): Remove reference to base field.
6674         (catch_exec_command_1): Likewise.
6675         (base_breakpoint_dtor): Change to ...
6676         (breakpoint::~breakpoint): ... this.
6677         (base_breakpoint_ops): Remove dtor field value.
6678         (longjmp_bkpt_dtor): Change to ...
6679         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6680         (strace_marker_create_breakpoints_sal): Remove reference to base
6681         field.
6682         (delete_breakpoint): Don't manually call breakpoint destructor.
6683         (create_tracepoint_from_upload): Remove reference to base field.
6684         (trace_pass_set_count): Likewise.
6685         (initialize_breakpoint_ops): Don't initialize
6686         momentary_breakpoint_ops, don't set dtors.
6687         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6688         <~ada_catchpoint>: New.
6689         <base>: Remove.
6690         (create_excep_cond_exprs): Remove reference to base field.
6691         (dtor_exception): Change to ...
6692         (ada_catchpoint::~ada_catchpoint): ... this.
6693         (dtor_catch_exception): Remove.
6694         (dtor_catch_exception_unhandled): Remove.
6695         (dtor_catch_assert): Remove.
6696         (create_ada_exception_catchpoint): Remove reference to base
6697         field.
6698         (initialize_ada_catchpoint_ops): Don't set dtors.
6699         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6700         breakpoint.
6701         <~signal_catchpoint>: New.
6702         <base>: Remove.
6703         (signal_catchpoint_dtor): Change to ...
6704         (signal_catchpoint::~signal_catchpoint): ... this.
6705         (create_signal_catchpoint): Remove reference to base field.
6706         (initialize_signal_catchpoint_ops): Don't set dtor.
6707         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6708         from breakpoint.
6709         <~syscall_catchpoint>: New.
6710         <base>: Remove.
6711         (dtor_catch_syscall): Change to ...
6712         (syscall_catchpoint::~syscall_catchpoint): ... this.
6713         (create_syscall_event_catchpoint): Remove reference to base
6714         field.
6715         (initialize_syscall_catchpoint_ops): Don't set dtor.
6716         * break-catch-throw.c (struct exception_catchpoint): Inherit
6717         from breakpoint.
6718         <~exception_catchpoint>: New.
6719         <base>: Remove.
6720         (dtor_exception_catchpoint): Change to ...
6721         (exception_catchpoint::~exception_catchpoint): ... this.
6722         (handle_gnu_v3_exceptions): Remove reference to base field.
6723         (initialize_throw_catchpoint_ops): Don't set dtor.
6724         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6725         field.
6726         * remote.c (remote_get_tracepoint_status): Likewise.
6727         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6728         * tracefile.c (tracefile_fetch_registers): Likewise.
6729         * tracepoint.c (actions_command): Likewise.
6730         (validate_actionline): Likewise.
6731         (tfind_1): Likewise.
6732         (get_traceframe_location): Likewise.
6733         (find_matching_tracepoint_location): Likewise.
6734         (parse_tracepoint_status): Likewise.
6735         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6736
6737 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6738
6739         * breakpoint.c (struct longjmp_breakpoint): New struct.
6740         (is_tracepoint_type): Change return type to bool.
6741         (is_longjmp_type): New function.
6742         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6743         (set_raw_breakpoint_without_location): Use
6744         new_breakpoint_from_type.
6745         (set_raw_breakpoint): Likewise.
6746
6747 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6748
6749         * breakpoint.c (new_breakpoint_from_type): New function.
6750         (create_breakpoint_sal): Use new_breakpoint_from_type and
6751         unique_ptr.
6752         (create_breakpoint): Likewise.
6753
6754 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6755
6756         * memattr.c (mem_info_command): Rename to ...
6757         (info_mem_command): ... this.
6758         (mem_enable_command): Rename to ...
6759         (enable_mem_command): ... this.
6760         (mem_disable_command): Rename to ...
6761         (disable_mem_command): ... this.
6762         (mem_delete_command): Rename to ...
6763         (delete_mem_command): ... this.
6764         (_initialize_mem): Adjust function names.
6765
6766 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6767
6768         * btrace.c (handle_pt_insn_events): New.
6769         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6770         STATUS.  Split into this and ...
6771         (handle_pt_insn_event_flags): ... this.
6772
6773 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6774
6775         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6776         and struct pt_insn.resynced.
6777         * configure: Regenerated.
6778         * config.in: Regenerated.
6779
6780 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6781
6782         * btrace.c (ftrace_find_call_by_number): New function.
6783         (ftrace_new_function): Store objects, not pointers.
6784         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6785         ftrace_new_gap, ftrace_update_function,
6786         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6787         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6788         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6789         btrace_ends_with_single_insn, btrace_call_get): Account for
6790         btrace_thread_info::functions now storing objects.
6791         * btrace.h (struct btrace_thread_info): Add constructor.
6792         (struct btrace_thread_info) <functions>: Make std::vector.
6793         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6794         Initialize with default values.
6795         * record-btrace.c (record_btrace_frame_sniffer): Account for
6796         btrace_thread_info::functions now storing objects.
6797
6798 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6799
6800         * btrace.c: Remove typedef bfun_s.
6801         (ftrace_new_gap): Directly add gaps to the list of gaps.
6802         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6803         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6804         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6805         instead of gdb VEC.
6806
6807 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6808
6809         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6810         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6811         with btrace_thread_info::next_segment and
6812         btrace_thread_info::prev_segment.
6813         * btrace.h: Remove struct btrace_func_link.
6814         (struct btrace_function): Replace pair of function segment pointers
6815         with pair of indices.
6816         * python/py-record-btrace.c (btpy_call_prev_sibling,
6817         btpy_call_next_sibling): Replace references to
6818         btrace_thread_info::segment with btrace_thread_info::next_segment and
6819         btrace_thread_info::prev_segment.
6820         * record-btrace.c (record_btrace_frame_this_id): Use
6821         btrace_find_call_by_number.
6822
6823 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6824
6825         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6826         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6827         btrace_insn_next, btrace_insn_prev): Remove references to
6828         btrace_thread_info::flow.
6829         * btrace.h (struct btrace_function): Remove FLOW.
6830
6831 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6832
6833         * btrace.c (ftrace_find_call_by_number): New function.
6834         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6835         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6836         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6837         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6838         index.
6839         * btrace.h (struct btrace_function): Turn UP into an index.
6840         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6841         as an index.
6842         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6843         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6844         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6845
6846 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6847
6848         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6849         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6850         ftrace_update_function, ftrace_compute_global_level_offset,
6851         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6852         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6853         btrace_insn_end, btrace_is_empty): Remove references to
6854         btrace_thread_info::begin and btrace_thread_info::end.
6855         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6856         (struct btrace_thread_info) <functions>: Adjust comment.
6857         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6858         btrace_thread_info::begin.
6859
6860 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6861
6862         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6863         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6864         ftrace_update_function): Remove arguments that implicitly were always
6865         BTINFO->END.
6866         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6867         Don't pass BTINFO->END.
6868
6869 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6870
6871         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6872         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6873         btrace_find_insn_by_number): Replace function segment pointer with
6874         index.
6875         (btrace_insn_cmp): Simplify.
6876         * btrace.h: (struct btrace_insn_iterator) Rename index to
6877         insn_index.  Replace function segment pointer with index into function
6878         segment vector.
6879         * record-btrace.c (record_btrace_call_history): Replace function
6880         segment pointer use with index.
6881         (record_btrace_frame_sniffer): Retrieve function call segment through
6882         vector.
6883         (record_btrace_set_replay): Remove defunc't safety check.
6884
6885 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6886
6887         * btrace.c (btrace_ends_with_single_insn): New function.
6888         (btrace_call_get, btrace_call_number, btrace_call_begin,
6889         btrace_call_end, btrace_call_next, btrace_call_prev,
6890         btrace_find_call_by_number): Use index into call segment vector
6891         instead of pointer.
6892         (btrace_call_cmp): Simplify.
6893         * btrace.h (struct btrace_call_iterator): Replace function call segment
6894         pointer with index into vector.
6895         * record-btrace.c (record_btrace_call_history): Use index instead of
6896         pointer.
6897
6898 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6899
6900         * btrace.c (btrace_insn_begin, btrace_insn_end,
6901         btrace_find_insn_by_number): Add btinfo to iterator.
6902         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6903
6904 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6905
6906         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6907         and save pointers directly.
6908         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6909         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6910         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6911         changed signature of functions.
6912         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6913         (btrace_fetch): Remove code that adds btrace_function pointers to
6914         vector of btrace_functions.
6915         (btrace_clear): Simplify freeing vector of btrace_functions.
6916
6917 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6918
6919         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6920         Replace VEC_* with std::vector functions.
6921         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6922         (struct btrace_thread_info)<functions>: Change type to std::vector.
6923
6924 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6925
6926         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
6927         "Removed targets and native configurations" up.  Merge duplicate
6928         "New commands" sub-sections.  Add "New options" sub-sections.
6929
6930 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
6931
6932         * defs.h (copy_integer_to_size): New declaration.
6933         * findvar.c (copy_integer_to_size): New function.
6934         (do_cint_test): New selftest function.
6935         (copy_integer_to_size_test): Likewise.
6936         (_initialize_findvar): Likewise.
6937         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6938         (mips_fbsd_collect_reg): Use raw_collect_integer.
6939         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6940         (mips64_fill_gregset): Use raw_collect_integer
6941         (mips64_fill_fpregset): Use raw_supply_integer.
6942         * regcache.c (regcache::raw_supply_integer): New function.
6943         (regcache::raw_collect_integer): Likewise.
6944         * regcache.h: (regcache::raw_supply_integer): New declaration.
6945         (regcache::raw_collect_integer): Likewise.
6946
6947 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6948
6949         * Makefile.in (SFILES): Add gdbarch-selftests.c.
6950         (COMMON_OBS): Add gdbarch-selftests.o.
6951         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6952         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6953         * gdbarch-selftests.c: New file.
6954         * regcache.h (regcache) <~regcache>: Mark it virtual if
6955         GDB_SELF_TEST.
6956         <raw_write>: Likewise.
6957
6958 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6959
6960         * regcache.c (current_regcache): Change it to
6961         regcache::current_regcache.
6962         (regcache_observer_target_changed): Update.
6963         (regcache_thread_ptid_changed): Make it a regcache static
6964         method.
6965         (regcache_thread_ptid_changed): Update.
6966         (class regcache_access): New.
6967         (current_regcache_test): Update.
6968         (_initialize_regcache): Update.
6969         * regcache.h: Include forward_list.
6970         (regcache): Declare regcache_thread_ptid_changed and declare
6971         registers_changed_ptid as friend.
6972
6973 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6974
6975         * i387-tdep.c (i387_register_to_value): Use register_size
6976         instead of TYPE_LENGTH.
6977         * m68k-tdep.c (m68k_register_to_value): Likewise.
6978
6979 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6980
6981         * i387-tdep.c (i387_convert_register_p): Return false if type
6982         code isn't TYPE_CODE_FLT.
6983
6984 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6985
6986         * alpha-tdep.c (alpha_convert_register_p): Return true if type
6987         length is 4.
6988         (alpha_register_to_value): Remove type length check.
6989         (alpha_value_to_register): Likewise.
6990
6991 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6992
6993         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6994         TYPE_CODE_FLT.
6995
6996 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6997
6998         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6999         TYPE_CODE_FLT or not.
7000
7001 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7002
7003         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7004         * avr-tdep.c (avr_gdbarch_init): Likewise.
7005         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7006         * cris-tdep.c (cris_gdbarch_init): Likewise.
7007         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7008         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7009         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7010         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7011         * mep-tdep.c (mep_gdbarch_init): Likewise.
7012         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7013         * mips-tdep.c (mips_gdbarch_init): Likewise.
7014         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7015         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7016         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7017         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7018         * v850-tdep.c (v850_gdbarch_init): Likewise.
7019
7020 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7021
7022         * selftest-arch.c (tests_with_arch): Call registers_changed
7023         and reinit_frame_cache.
7024         * selftest.c (run_self_tests): Likewise.
7025
7026 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7027
7028         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7029         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7030
7031 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7032
7033         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7034         set_gdbarch_print_insn.
7035
7036 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7037
7038         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7039         set_gdbarch_print_insn.
7040
7041 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7042
7043         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7044         set_gdbarch_print_insn.
7045         * arc-tdep.c (arc_gdbarch_init): Likewise.
7046         * arch-utils.c: include dis-asm.h.
7047         (default_print_insn): New function.
7048         * arch-utils.h (default_print_insn): Declare.
7049         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7050         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7051         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7052         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7053         * frv-tdep.c (frv_gdbarch_init): Likewise.
7054         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7055         * gdbarch.sh (print_insn): Use default_print_insn.
7056         * gdbarch.c: Regenerated.
7057         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7058         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7059         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7060         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7061         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7062         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7063         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7064         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7065         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7066         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7067         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7068         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7069         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7070         * mt-tdep.c (mt_gdbarch_init): Likewise.
7071         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7072         * nios2-tdep.c (nios2_print_insn): Remove.
7073         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7074         * rx-tdep.c (rx_gdbarch_init): Likewise.
7075         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7076         * score-tdep.c (score_print_insn): Remove.
7077         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7078         * sh-tdep.c (sh_gdbarch_init): Likewise.
7079         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7080         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7081         * tic6x-tdep.c (tic6x_print_insn): Remove.
7082         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7083         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7084         * v850-tdep.c (v850_gdbarch_init): Likewise.
7085         * vax-tdep.c (vax_gdbarch_init): Likewise.
7086         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7087         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7088
7089 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7090
7091         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7092         (MIPS_FP0_REGNUM): Remove.
7093         (MIPS_FSR_REGNUM): Remove.
7094         (mips_fbsd_supply_fpregs): Use mips_regnum.
7095         (mips_fbsd_supply_gregs): Likewise.
7096         (mips_fbsd_collect_fpregs): Likewise.
7097         (mips_fbsd_collect_gregs): Likewise.
7098
7099 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7100
7101         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7102         (getpfpregs_supplies): New function.
7103         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7104         getfpregs_supplies.
7105         (mips_fbsd_store_inferior_registers): Likewise.
7106
7107 2017-05-22  Pedro Alves <palves@redhat.com>
7108
7109         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7110         maintainer.
7111
7112 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7113
7114         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7115         (store_register): Likewise.
7116         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7117         (get_decimal_float_return_value): Likewise.
7118         (do_ppc_sysv_return_value): Likewise.
7119         (ppc64_sysv_abi_push_integer): Likewise.
7120         (ppc64_sysv_abi_push_freg): Likewise.
7121         (ppc64_sysv_abi_return_value_base): Likewise.
7122         (ppc64_sysv_abi_return_value): Likewise.
7123         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7124         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7125         * rs6000-nat.c: Likewise.
7126         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7127         (rs6000_value_to_register): Likewise.
7128         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7129
7130 2017-05-21  Tom Tromey  <tom@tromey.com>
7131
7132         PR rust/21466:
7133         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7134         arrays as "[T]", not "[T; ]".
7135
7136 2017-05-19  Tom Tromey  <tom@tromey.com>
7137
7138         PR rust/21484:
7139         * rust-lang.c (exp_descriptor_rust): New function.
7140         (rust_language_defn): Use it.
7141         * p-lang.c (pascal_language_defn): Update.
7142         * opencl-lang.c (opencl_language_defn): Update.
7143         * objc-lang.c (objc_language_defn): Update.
7144         * m2-lang.c (m2_language_defn): Update.
7145         * language.h (struct language_defn)
7146         <la_watch_location_expression>: New member.
7147         * language.c (unknown_language_defn, auto_language_defn)
7148         (local_language_defn): Update.
7149         * go-lang.c (go_language_defn): Update.
7150         * f-lang.c (f_language_defn): Update.
7151         * d-lang.c (d_language_defn): Update.
7152         * c-lang.h (c_watch_location_expression): Declare.
7153         * c-lang.c (c_watch_location_expression): New function.
7154         (c_language_defn, cplus_language_defn, asm_language_defn)
7155         (minimal_language_defn): Use it.
7156         * breakpoint.c (watch_command_1): Call
7157         la_watch_location_expression.
7158         * ada-lang.c (ada_language_defn): Update.
7159
7160 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7161
7162         PR tui/21482
7163         * gdb_curses.h (NOMACROS): Define.
7164         (NCURSES_NOMACROS): Define.
7165
7166 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7167
7168         PR tui/21482
7169         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7170         arg to char *.
7171         * tui/tui-wingeneral.c (box_win): Likewise.
7172         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7173         (tui_show_source_line): Likewise.
7174         (tui_show_exec_info_content): Likewise.
7175
7176 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7177
7178         * sparc-tdep.c (sparc_structure_return_p)
7179         (sparc_arg_on_registers_p): New functions.
7180         (sparc32_store_arguments): Use them.
7181         * sparc64-tdep.c (sparc64_16_byte_align_p)
7182         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7183         Handle TYPE_CODE_ARRAY.
7184
7185 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7186
7187         * cli/cli-decode.c (add_alias_cmd): New function.
7188         * command.h (add_alias_cmd): Declare.
7189         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7190         instead call add_alias_cmd.
7191
7192 2017-05-17  Pedro Alves  <palves@redhat.com>
7193
7194         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7195         (nat_makefile_frag): ... this.  All references updated.
7196         * configure.ac: Likewise.
7197         * configure.nat: Likewise.  Enhance comments.
7198         * configure: Regenerate.
7199
7200 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7201
7202         * procfs.c (procfs_create_inferior): Change prototype to match
7203         definition.
7204
7205 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7206
7207         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7208         C++ compiler warning.
7209
7210 2017-05-12  Tom Tromey  <tom@tromey.com>
7211
7212         PR rust/21483:
7213         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7214         recurse, just call value_struct_elt directly.
7215
7216 2017-05-12  Tom Tromey  <tom@tromey.com>
7217
7218         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7219         OP_RUST_ARRAY>: Fix.
7220
7221 2017-05-12  Tom Tromey  <tom@tromey.com>
7222
7223         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7224
7225 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7226
7227         * regcache.c: Include <forward_list>.
7228         (struct regcache_list): Remove.
7229         (current_regcache): Update.
7230         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7231         (regcache_thread_ptid_changed): Likewise.
7232         (registers_changed_ptid): Likewise.
7233         (current_regcache_size): Likewise.
7234
7235 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7236
7237         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7238         (current_regcache_size): New function.
7239         (current_regcache_test): New function.
7240         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7241
7242 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7243
7244         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7245         (print_gp_register_row): Use get_frame_register_value.
7246
7247 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7248
7249         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7250         (mips_supply_fpregset): Likewise.
7251         (mips64_supply_gregset): Likewise.
7252
7253 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7254
7255         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7256         regcache->raw_supply_zeroed.
7257
7258 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7259
7260         * configure.nat: Rearrange 'case' statements to match
7261         host before cpu.
7262
7263 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7264
7265         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7266         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7267         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7268         "@nat_extra_makefile_frag@".
7269         (Makefile): Remove dependency on "@frags@".
7270         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7271         (data-directory/Makefile): Likewise.
7272         * config/aarch64/linux.mh: Deleted; moved contents to
7273         "gdb/configure.nat".
7274         * config/alpha/alpha-linux.mh: Likewise.
7275         * config/alpha/nbsd.mh: Likewise.
7276         * config/arm/linux.mh: Likewise.
7277         * config/arm/nbsdelf.mh: Likewise.
7278         * config/i386/cygwin.mh: Likewise.
7279         * config/i386/cygwin64.mh: Likewise.
7280         * config/i386/darwin.mh: Likewise.
7281         * config/i386/fbsd.mh: Likewise.
7282         * config/i386/fbsd64.mh: Likewise.
7283         * config/i386/go32.mh: Likewise.
7284         * config/i386/i386gnu.mh: Likewise.
7285         * config/i386/i386sol2.mh: Likewise.
7286         * config/i386/linux.mh: Likewise.
7287         * config/i386/linux64.mh: Likewise.
7288         * config/i386/mingw.mh: Likewise.
7289         * config/i386/mingw64.mh: Likewise.
7290         * config/i386/nbsd64.mh: Likewise.
7291         * config/i386/nbsdelf.mh: Likewise.
7292         * config/i386/nto.mh: Likewise.
7293         * config/i386/obsd.mh: Likewise.
7294         * config/i386/obsd64.mh: Likewise.
7295         * config/i386/sol2-64.mh: Likewise.
7296         * config/ia64/linux.mh: Likewise.
7297         * config/m32r/linux.mh: Likewise.
7298         * config/m68k/linux.mh: Likewise.
7299         * config/m68k/nbsdelf.mh: Likewise.
7300         * config/m68k/obsd.mh: Likewise.
7301         * config/m88k/obsd.mh: Likewise.
7302         * config/mips/fbsd.mh: Likewise.
7303         * config/mips/linux.mh: Likewise.
7304         * config/mips/nbsd.mh: Likewise.
7305         * config/mips/obsd64.mh: Likewise.
7306         * config/pa/linux.mh: Likewise.
7307         * config/pa/nbsd.mh: Likewise.
7308         * config/pa/obsd.mh: Likewise.
7309         * config/powerpc/aix.mh: Likewise.
7310         * config/powerpc/fbsd.mh: Likewise.
7311         * config/powerpc/linux.mh: Likewise.
7312         * config/powerpc/nbsd.mh: Likewise.
7313         * config/powerpc/obsd.mh: Likewise.
7314         * config/powerpc/ppc64-linux.mh: Likewise.
7315         * config/powerpc/spu-linux.mh: Likewise.
7316         * config/s390/linux.mh: Likewise.
7317         * config/sh/nbsd.mh: Likewise.
7318         * config/sparc/fbsd.mh: Likewise.
7319         * config/sparc/linux.mh: Likewise.
7320         * config/sparc/linux64.mh: Likewise.
7321         * config/sparc/nbsd64.mh: Likewise.
7322         * config/sparc/nbsdelf.mh: Likewise.
7323         * config/sparc/obsd64.mh: Likewise.
7324         * config/sparc/sol2.mh: Likewise.
7325         * config/tilegx/linux.mh: Likewise.
7326         * config/vax/nbsdelf.mh: Likewise.
7327         * config/vax/obsd.mh: Likewise.
7328         * config/xtensa/linux.mh: Likewise.
7329         * config/i386/i386gnu.mn: New file, with excerpts from
7330         "config/i386/i386gnu.mh".
7331         * configure: Regenerate.
7332         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7333         *.mh files under "gdb/config".
7334         * configure.nat: New file, with contents from the
7335         "gdb/config/*/*.mh" files.
7336
7337 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7338
7339         * btrace.c (btrace_clear): Free insn vector.
7340
7341 2017-05-05  Pedro Alves  <palves@redhat.com>
7342
7343         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7344         * configure: Regenerate.
7345
7346 2017-05-04  Pedro Alves  <palves@redhat.com>
7347
7348         * Makefile.in (SFILES): Add progspace-and-thread.c.
7349         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7350         (COMMON_OBS): Add progspace-and-thread.o.
7351         * breakpoint.c: Include "progspace-and-thread.h".
7352         (update_inserted_breakpoint_locations)
7353         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7354         Use scoped_restore_current_pspace_and_thread.
7355         (create_std_terminate_master_breakpoint): Use
7356         scoped_restore_current_program_space.
7357         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7358         (print_breakpoint_location): Use
7359         scoped_restore_current_program_space.
7360         (bp_loc_is_permanent): Use
7361         scoped_restore_current_pspace_and_thread.
7362         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7363         (download_tracepoint_locations): Use
7364         scoped_restore_current_pspace_and_thread.
7365         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7366         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7367         (enum step_over_calls_kind): Moved from inferior.h.
7368         (class scoped_restore_current_thread): New class.
7369         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7370         declaration.
7371         (scoped_restore_current_thread): New class.
7372         * infcmd.c: Include "common/gdb_optional.h".
7373         (continue_1, proceed_after_attach): Use
7374         scoped_restore_current_thread.
7375         (notice_new_inferior): Use scoped_restore_current_thread.
7376         * inferior.c: Include "progspace-and-thread.h".
7377         (restore_inferior, save_current_inferior): Delete.
7378         (add_inferior_command, clone_inferior_command): Use
7379         scoped_restore_current_pspace_and_thread.
7380         * inferior.h (scoped_restore_current_inferior): New class.
7381         * infrun.c: Include "progspace-and-thread.h" and
7382         "common/gdb_optional.h".
7383         (follow_fork_inferior): Use
7384         scoped_restore_current_pspace_and_thread.
7385         (scoped_restore_exited_inferior): New class.
7386         (handle_vfork_child_exec_or_exit): Use
7387         scoped_restore_exited_inferior,
7388         scoped_restore_current_pspace_and_thread,
7389         scoped_restore_current_thread and scoped_restore.
7390         (fetch_inferior_event): Use scoped_restore_current_thread.
7391         * linespec.c (decode_line_full, decode_line_1): Use
7392         scoped_restore_current_program_space.
7393         * mi/mi-main.c: Include "progspace-and-thread.h".
7394         (exec_continue): Use scoped_restore_current_thread.
7395         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7396         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7397         * proc-service.c (ps_pglobal_lookup): Use
7398         scoped_restore_current_program_space.
7399         * progspace-and-thread.c: New file.
7400         * progspace-and-thread.h: New file.
7401         * progspace.c (release_program_space, clone_program_space): Use
7402         scoped_restore_current_program_space.
7403         (restore_program_space, save_current_program_space)
7404         (save_current_space_and_thread): Delete.
7405         (switch_to_program_space_and_thread): Moved to
7406         progspace-and-thread.c.
7407         * progspace.h (save_current_program_space)
7408         (save_current_space_and_thread): Delete declarations.
7409         (scoped_restore_current_program_space): New class.
7410         * remote.c (remote_btrace_maybe_reopen): Use
7411         scoped_restore_current_thread.
7412         * symtab.c: Include "progspace-and-thread.h".
7413         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7414         * thread.c (print_thread_info_1): Use
7415         scoped_restore_current_thread.
7416         (struct current_thread_cleanup): Delete.
7417         (do_restore_current_thread_cleanup)
7418         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7419         (scoped_restore_current_thread::~scoped_restore_current_thread):
7420         ... this new dtor.
7421         (make_cleanup_restore_current_thread): Rename/convert to ...
7422         (scoped_restore_current_thread::scoped_restore_current_thread):
7423         ... this new ctor.
7424         (thread_apply_all_command): Use scoped_restore_current_thread.
7425         (thread_apply_command): Use scoped_restore_current_thread.
7426         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7427         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7428
7429 2017-05-04  Pedro Alves  <palves@redhat.com>
7430
7431         * thread.c (make_cleanup_restore_current_thread): Move
7432         find_thread_ptid call before the is_stopped call.  Assert that the
7433         thread is found.  Replace is_stopped call by checking the thread's
7434         state directly.  Remove unnecessary NULL-thread check.
7435
7436 2017-05-04  Pedro Alves  <palves@redhat.com>
7437
7438         * corelow.c (thread_section_name): New class.
7439         (get_core_register_section, get_core_siginfo): Use it.
7440
7441 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7442
7443         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7444         (get_core_register_section): Remove xfree of NULL pointer.
7445
7446 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7447
7448         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7449         * regcache.c (regcache::raw_supply_zeroed): New function.
7450         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7451
7452 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7453
7454         * gdbarch.sh: Remove commented out definition of
7455         TARGET_CHAR_BIT.
7456         * gdbarch.h: Re-generate.
7457
7458 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7459
7460         * configure: Regenerate.
7461
7462 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7463
7464         * solib-target.c (solib_target_relocate_section_addresses):
7465         Remove num_section_bases, num_bases, segment_bases variables.
7466
7467 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7468
7469         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7470
7471 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7472
7473         * solib-target.c: Include <vector>
7474         (struct lm_info_target) <~lm_info_target>: Remove.
7475         <segment_bases, section_bases>: Change type to
7476         std::vector<CORE_ADDR>.
7477         (library_list_start_segment, library_list_start_section,
7478         library_list_end_library,
7479         solib_target_relocate_section_addresses): Adjust.
7480
7481 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7482
7483         * gdbarch.sh (software_single_step): Change return type to
7484         std::vector<CORE_ADDR>.
7485         * gdbarch.c, gdbarch.h: Re-generate.
7486         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7487         Adjust.
7488         (arm_deal_with_atomic_sequence_raw): Adjust.
7489         (thumb_get_next_pcs_raw): Adjust.
7490         (arm_get_next_pcs_raw): Adjust.
7491         (arm_get_next_pcs): Adjust.
7492         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7493         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7494         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7495         (alpha_software_single_step): Adjust.
7496         * alpha-tdep.h (alpha_software_single_step): Adjust.
7497         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7498         * arm-tdep.c (arm_software_single_step): Adjust.
7499         (arm_breakpoint_kind_from_current_state): Adjust.
7500         * arm-tdep.h (arm_software_single_step): Adjust.
7501         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7502         * cris-tdep.c (cris_software_single_step): Adjust.
7503         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7504         (micromips_deal_with_atomic_sequence): Adjust.
7505         (deal_with_atomic_sequence): Adjust.
7506         (mips_software_single_step): Adjust.
7507         * mips-tdep.h (mips_software_single_step): Adjust.
7508         * moxie-tdep.c (moxie_software_single_step): Adjust.
7509         * nios2-tdep.c (nios2_software_single_step): Adjust.
7510         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7511         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7512         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7513         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7514         * sparc-tdep.c (sparc_software_single_step): Adjust.
7515         * spu-tdep.c (spu_software_single_step): Adjust.
7516         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7517
7518 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7519
7520         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7521         * gdbarch.h: Re-generate.
7522
7523 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7524
7525         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7526         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7527         * python/py-instruction.c, python/py-instruction.h: New file.
7528         * python/py-record.c: Add py-instruction.h include.
7529         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7530         gdb.RecordInstruction.
7531         * python/python-internal.h: Add gdbpy_initialize_instruction
7532         declaration.
7533         * python/python.c (do_start_initialization): Add
7534         gdbpy_initialize_instruction.
7535
7536 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7537
7538         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7539         Remove.
7540         (btrace_func_from_recpy_func): New function.
7541         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7542         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7543         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7544         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7545         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7546         Also, use new helper functions.
7547         (btpy_list_item): Use new helper functions.
7548         (recpy_bt_function_call_history): Use new type name.
7549         (btpy_call_getset): Remove.
7550         (gdbpy_initialize_btrace): Remove code to initialize
7551         gdb.BtraceFunctionCall.
7552         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7553         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7554         recpy_bt_func_prev, recpy_bt_func_next): New export.
7555         * python/py-record.c (recpy_func_type): New static object.
7556         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7557         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7558         recpy_func_next): New function.
7559         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7560         (recpy_func_getset): New static object.
7561         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7562         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7563
7564 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7565
7566         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7567         (btpy_object, btpy_insn_type, btpy_new): Remove.
7568         (btpy_list_object): Use gdb.RecordInstruction type instead of
7569         gdb.BtraceInstruction type.
7570         (btrace_insn_from_recpy_insn): New function.
7571         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7572         btpy_new.
7573         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7574         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7575         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7576         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7577         instead of btpy_object.
7578         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7579         btpy_insn_data, btpy_insn_decode): Rename to ...
7580         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7581         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7582         recpy_bt_insn_decode): This.  Also, use new helper functions.
7583         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7584         recpy_insn_type.
7585         (btpy_insn_getset): Remove.
7586         (gdbpy_initialize_btrace): Remove code to initialize
7587         gdb.BtraceInstruction.  Use recpy_element_object.
7588         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7589         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7590         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7591         * python/py-record.c (recpy_insn_type): New static object.
7592         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7593         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7594         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7595         New function.
7596         (recpy_insn_getset): New static object.
7597         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7598         * python/py-record.h (recpy_element_object): New typedef.
7599         (recpy_insn_type, recpy_insn_new): New export.
7600
7601 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7602
7603         * py-record-btrace.c (btpy_insn_new): Removed.
7604         (btpy_insn_or_gap_new): New function.
7605         (btpy_insn_error): Removed.
7606         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7607         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7608         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7609         btpy_insn_or_gap_new instead of btpy_insn_new.
7610         (btpy_insn_getset): Remove btpy_insn_error.
7611         * py-record.c (recpy_gap_type): New static object.
7612         (recpy_gap_object): New typedef.
7613         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7614         recpy_gap_reason_string): New function.
7615         (recpy_gap_getset): New static object.
7616         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7617         * py-record.h (recpy_gap_new): New export.
7618
7619 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7620
7621         * python/py-record.c (recpy_ptid): Remove.
7622         (recpy_record_getset): Remove recpy_ptid.
7623
7624 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7625
7626         * btrace.c (btrace_fetch): Set inferior_ptid.
7627         * python/py-record-btrace.c: Add "py-record.h" include.
7628         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7629         recpy_bt_end, recpy_bt_instruction_history,
7630         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7631         in gdb.Record object instead of current ptid.
7632         * python/py-record.c: Include new "py-record.h" file.
7633         (recpy_record_object): Moved to py-record.h.
7634         * python/py-record.h: New file.
7635
7636 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7637
7638         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7639         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7640         indentation.
7641
7642 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7643
7644         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7645         the past maintainers section.
7646
7647 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7648
7649         * infcmd.c (get_return_value): Use regcache ctor, and remove
7650         cleanup.
7651
7652 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7653             Pedro Alves  <palves@redhat.com>
7654
7655         * regcache.c (regcache::regcache): New tag dispatch ctor.
7656         (do_cooked_read): Moved above.
7657         (regcache_dup): Use the tag dispatch ctor..
7658         * regcache.h (regcache): Declare ctor, delete copy ctor and
7659         assignment operator, remove friend regcache_dup.
7660
7661 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7662
7663         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7664         call method save instead of regcache_cpy.
7665         * regcache.h (struct regcache): Make regcache_dup a friend.
7666
7667 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7668
7669         * regcache.c (struct regcache): Move to regcache.h
7670         (regcache::arch): New method.
7671         (regcache_get_ptid): Update.
7672         (get_regcache_arch): Call arch method.
7673         (get_regcache_aspace): Call method aspace.
7674         (register_buffer): Change it to method.
7675         (regcache_save): Change it to regcache::save.
7676         (regcache_restore): Likewise.
7677         (regcache_cpy_no_passthrough): Remove the declaration.
7678         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7679         (regcache_cpy_no_passthrough): Change it to method
7680         cpy_no_passthrough.
7681         (regcache_register_status): Change it to method
7682         get_register_status.
7683         (regcache_invalidate): Change it to method invalidate.
7684         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7685         (regcache_raw_update): Change it to method raw_update.
7686         (regcache_raw_read): Likewise.
7687         (regcache_raw_read_signed): Likewise.
7688         (regcache_raw_read_unsigned): Likewise.
7689         (regcache_raw_write_signed): Likewise.
7690         (regcache_raw_write_unsigned): Likewise.
7691         (regcache_cooked_read): Likewise.
7692         (regcache_cooked_read_value): Likewise.
7693         (regcache_cooked_read_signed): Likewise.
7694         (regcache_cooked_read_unsigned): Likewise.
7695         (regcache_cooked_write_signed): Likewise.
7696         (regcache_cooked_write_unsigned): Likewise.
7697         (regcache_raw_set_cached_value): Likewise.
7698         (regcache_raw_write): Likewise.
7699         (regcache_cooked_write): Likewise.
7700         (regcache_xfer_part): Likewise.
7701         (regcache_raw_read_part): Likewise.
7702         (regcache_raw_write_part): Likewise.
7703         (regcache_cooked_read_part): Likewise.
7704         (regcache_cooked_write_part): Likewise.
7705         (regcache_raw_supply): Likewise.
7706         (regcache_raw_collect): Likewise.
7707         (regcache_transfer_regset): Likewise.
7708         (regcache_supply_regset): Likewise.
7709         (regcache_collect_regset): Likewise.
7710         (regcache_debug_print_register): Likewise.
7711         (enum regcache_dump_what): Move it to regcache.h.
7712         (regcache_dump): Change it to method dump.
7713         * regcache.h (enum regcache_dump_what): New.
7714         (class regcache): New.
7715         * target.c (target_fetch_registers): Call method
7716         debug_print_register.
7717         (target_store_registers): Likewise.
7718
7719 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7720
7721         * windows-nat.c (struct lm_info_windows): Initialize field.
7722         (windows_make_so): Allocate lm_info_windows with new.
7723         (windows_free_so): Free lm_info_windows with delete.
7724
7725 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7726
7727         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7728         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7729         cleanup.
7730         (darwin_free_so): Free lm_info_darwin with delete.
7731
7732 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7733
7734         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7735         <l_addr_p>: Change type to bool.
7736         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7737         (svr4_free_so): Free lm_info_svr4 with delete.
7738         (svr4_copy_library_list): Replace memcpy with call to copy
7739         constructor.
7740         (library_list_start_library, svr4_default_sos): Allocate
7741         lm_info_svr4 with new.
7742
7743 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7744
7745         * solib-target.c (struct lm_info_target): Add destructor,
7746         initialize fields.
7747         <name>: Change type to std::string.
7748         (library_list_start_library): Allocate lm_info_target with new.
7749         (solib_target_free_library_list): Free lm_info_target with
7750         delete.
7751         (solib_target_current_sos): Adapt to std::string.
7752         (solib_target_free_so): Free lm_info_target with delete.
7753
7754 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7755
7756         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7757         fields.
7758         (frv_current_sos): Allocate lm_info_frv with new.
7759         (frv_relocate_main_executable): Free lm_info_frv with delete,
7760         allocate with new.
7761         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7762
7763 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7764
7765         * solib-frv.c (struct lm_info_frv): Fix indentation.
7766
7767 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7768
7769         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7770         map field.
7771         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7772         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7773         and allocate with new.
7774         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7775
7776 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7777
7778         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7779         <filename, member_name>: Change type to std::string.
7780         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7781         (library_list_start_library): Allocate lm_info_aix with new.
7782         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7783         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7784         with copy constructor.
7785
7786 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7787
7788         * solist.h (struct lm_info): Remove.
7789         (struct lm_info_base): New class.
7790         (struct so_list) <lm_info>: Change type to lm_info_base *.
7791         * nto-tdep.c (struct lm_info): Remove.
7792         (lm_addr): Adjust.
7793         * solib-aix.c (struct lm_info): Rename to ...
7794         (struct lm_info_aix): ... this.  Extend lm_info_base.
7795         (lm_info_p): Rename to ...
7796         (lm_info_aix_p): ... this, and adjust.
7797         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7798         solib_aix_parse_libraries, library_list_start_library,
7799         solib_aix_free_library_list, solib_aix_parse_libraries,
7800         solib_aix_get_library_list,
7801         solib_aix_relocate_section_addresses, solib_aix_free_so,
7802         solib_aix_get_section_offsets,
7803         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7804         Adjust.
7805         (struct solib_aix_inferior_data) <library_list>: Adjust.
7806         * solib-darwin.c (struct lm_info): Rename to ...
7807         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7808         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7809         * solib-dsbt.c (struct lm_info): Rename to ...
7810         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7811         (struct dsbt_info) <main_executable_lm_info): Adjust.
7812         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7813         dsbt_relocate_section_addresses): Adjust.
7814         * solib-frv.c (struct lm_info): Rename to ...
7815         (struct lm_info_frv): ... this.  Extend lm_info_base.
7816         (main_executable_lm_info): Adjust.
7817         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7818         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7819         find_canonical_descriptor_in_load_object,
7820         frv_fdpic_find_canonical_descriptor): Adjust.
7821         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7822         to lm_info_svr4.
7823         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7824         svr4_clear_so, svr4_copy_library_list,
7825         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7826         svr4_current_sos, svr4_fetch_objfile_link_map,
7827         solist_update_incremental): Adjust.
7828         * solib-svr4.h (struct lm_info_svr4): Move here from
7829         solib-svr4.c.
7830         * solib-target.c (struct lm_info): Rename to ...
7831         (struct lm_info_target): ... this.  Extend lm_info_base.
7832         (lm_info_p): Rename to ...
7833         (lm_info_target_p): ... this.
7834         (solib_target_parse_libraries, library_list_start_segment,
7835         library_list_start_section, library_list_start_library,
7836         library_list_end_library, solib_target_free_library_list,
7837         solib_target_current_sos, solib_target_free_so,
7838         solib_target_relocate_section_addresses): Adjust.
7839         * windows-nat.c (struct lm_info): Rename to ...
7840         (struct lm_info_windows): ... this.  Extend lm_info_base.
7841         (windows_make_so, handle_load_dll, handle_unload_dll,
7842         windows_xfer_shared_libraries): Adjust.
7843
7844 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7845
7846         * solib-darwin.c (struct darwin_so_list): Remove.
7847         (darwin_current_sos): Allocate an so_list object instead of a
7848         darwin_so_list, separately allocate an lm_info object.
7849         (darwin_free_so): Free lm_info.
7850
7851 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7852
7853         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7854         with fprintf_filtered.
7855
7856 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7857
7858         * regcache.c (regcache::regcache): New function.
7859         (regcache::~regcache): New function.
7860         (regcache_xmalloc_1): Remove.
7861         (regcache_xmalloc): Call new regcache.
7862         (regcache_xfree): Call delete regcache.
7863         (get_thread_arch_aspace_regcache): Call new regcache.
7864
7865 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7866
7867         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7868         lwp instead of ptid_get_lwp.
7869
7870 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7871
7872         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7873         lwp_info instead of getting from inferior_ptid.
7874
7875 2017-04-27  Keith Seitz  <keiths@redhat.com>
7876
7877         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7878         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7879         (CV_CONVERSION_BADNESS): Define.
7880         (rank_one_type): Remove overly restrictive rvalue reference
7881         rank checks.
7882         Add cv-qualifier checks and subranks for type equality.
7883         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7884         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7885         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7886
7887 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7888
7889         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7890         count when creating the object.
7891
7892 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7893             Ulrich Weigand  <uweigand@de.ibm.com>
7894
7895         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7896         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7897         is used in AIX.
7898         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7899         (process_xcoff_symbol): Likewise.
7900         (scan_xcoff_symtab): Likewise.
7901
7902 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7903
7904         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7905         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7906         (ia64_access_reg): Use get_frame_register_unsigned.
7907         (ia64_access_rse_reg): Likewise.
7908         (ia64_libunwind_frame_prev_register): Likewise.
7909
7910 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7911
7912         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7913         * gdbarch.c: Regenerated.
7914         * gdbarch.h: Regenerated.
7915         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7916         visibility external.
7917         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7918         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7919         (enum cfa_how_kind): Move to ...
7920         (struct dwarf2_frame_state_reg_info): Likewise.
7921         (struct dwarf2_frame_state): Likewise.
7922         * dwarf2-frame.h: ... here.
7923         (dwarf2_frame_state_alloc_regs): New declaration.
7924         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7925         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7926
7927 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7928
7929         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7930         regcache_raw_read_unsigned.
7931         (xtensa_pseudo_register_write): Likewise.
7932
7933 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7934
7935         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7936         (nds32_pseudo_register_write): Likewise.
7937
7938 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7939
7940         * regcache.c (struct regcache) <readonly_p>: Change its type
7941         to bool.
7942         (regcache_xmalloc_1): Update parameter type and callers update.
7943
7944 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7945
7946         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7947         set_gdbarch_wchar_bit.
7948         * arm-tdep.c (arm_gdbarch_init): Likewise.
7949
7950 2017-04-25  Pedro Alves  <palves@redhat.com>
7951
7952         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7953         (BothAreRelocatable, memcopy, memmove): Don't define.
7954         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7955         macros.
7956
7957 2017-04-25  Pedro Alves  <palves@redhat.com>
7958
7959         * common/common-defs.h: Include "common/poison.h".
7960         * common/function-view.h: (Not, Or, Requires): Move to traits.h
7961         and adjust.
7962         * common/poison.h: New file.
7963         * common/traits.h: Include <type_traits>.
7964         (Not, Or, Requires): New, moved from common/function-view.h.
7965
7966 2017-04-25  Pedro Alves  <palves@redhat.com>
7967
7968         * breakpoint.h (struct breakpoint): In-class initialize all
7969         fields.  Make boolean fields "bool".
7970         * breakpoint.c (init_raw_breakpoint_without_location): Remove
7971         memset call and initializations no longer necessary.
7972
7973 2017-04-25  Pedro Alves  <palves@redhat.com>
7974
7975         * btrace.c (pt_btrace_insn_flags): Change parameter type to
7976         reference.
7977         (pt_btrace_insn): New function.
7978         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7979
7980 2017-04-25  Pedro Alves  <palves@redhat.com>
7981
7982         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
7983         "base" field and inherit from "bp_location" instead.  Add
7984         non-default ctor.
7985         (allocate_location_exception): Use new non-default ctor.
7986         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7987         (init_bp_location): Convert to ...
7988         (bp_location::bp_location): ... this new ctor, and remove memset
7989         call.
7990         (base_breakpoint_allocate_location): Use the new non-default ctor.
7991         * breakpoint.h (bp_location): Now a class.  Declare default and
7992         non-default ctors.  In-class initialize all members.
7993         (init_bp_location): Remove declaration.
7994
7995 2017-04-25  Pedro Alves  <palves@redhat.com>
7996
7997         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7998         assignment operator.
7999
8000 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8001
8002         * doublest.c (convert_doublest_to_floatformat): Call
8003         floatformat_totalsize_bytes.
8004
8005 2017-04-22  Tom Tromey  <tom@tromey.com>
8006
8007         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8008         ui_out_emit_list.
8009         * stack.c (print_frame): Use ui_out_emit_list.
8010         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8011         ui_out_emit_list.
8012         * mi/mi-main.c (print_one_inferior)
8013         (mi_cmd_data_list_register_names)
8014         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8015         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8016         ui_out_emit_list.
8017         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8018         (mi_output_solib_attribs): Use ui_out_emit_list,
8019         ui_out_emit_tuple.
8020         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8021         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8022         (mi_cmd_stack_list_args, list_args_or_locals): Use
8023         ui_out_emit_list.
8024         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8025         * breakpoint.c (print_solib_event, output_thread_groups): Use
8026         ui_out_emit_list.
8027
8028 2017-04-22  Tom Tromey  <tom@tromey.com>
8029
8030         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8031         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8032         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8033
8034 2017-04-22  Tom Tromey  <tom@tromey.com>
8035
8036         * tracepoint.c (tvariables_info_1)
8037         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8038
8039 2017-04-22  Tom Tromey  <tom@tromey.com>
8040
8041         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8042         annotate_arg_emitter.
8043         * breakpoint.c (print_mention_watchpoint)
8044         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8045         * annotate.h (struct annotate_arg_emitter): New.
8046
8047 2017-04-22  Tom Tromey  <tom@tromey.com>
8048
8049         * record-btrace.c (record_btrace_insn_history)
8050         (record_btrace_insn_history_range, record_btrace_call_history)
8051         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8052         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8053         ui_out_emit_tuple.
8054         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8055         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8056         * skip.c (skip_info): Use ui_out_emit_tuple.
8057         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8058         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8059         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8060         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8061         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8062         ui_out_emit_tuple.
8063         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8064         (output_register, mi_cmd_data_read_memory)
8065         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8066         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8067         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8068         Use ui_out_emit_tuple.
8069         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8070         ui_out_emit_tuple.
8071         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8072         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8073         * linux-thread-db.c (info_auto_load_libthread_db): Use
8074         ui_out_emit_tuple.
8075         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8076         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8077         * disasm.c (do_mixed_source_and_assembly_deprecated)
8078         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8079         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8080         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8081         * breakpoint.c (print_one_breakpoint_location)
8082         (print_one_breakpoint): Use ui_out_emit_tuple.
8083         * auto-load.c (print_script, info_auto_load_cmd): Use
8084         ui_out_emit_tuple.
8085         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8086
8087 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8088
8089         * thread.c (print_thread_info_1): Remove dead code.
8090
8091 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8092
8093         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8094         GDB_SELF_TEST.
8095         * arm-tdep.c (selftests::arm_record_test): Likewise.
8096
8097 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8098
8099         * regcache.c (regcache_restore): Remove argument 2.  Replace
8100         argument 3 with regcache.  Get register status from
8101         src->register_status and get register contents from
8102         register_buffer (src, regnum).
8103         (regcache_cpy): Update.
8104
8105 2017-04-19  Pedro Alves  <palves@redhat.com>
8106
8107         * gdbthread.h (thread): Add missing closing parenthesis in
8108         comment.
8109
8110 2017-04-19  Pedro Alves  <palves@redhat.com>
8111
8112         * common/refcounted-object.h: New file.
8113         * gdbthread.h: Include "common/refcounted-object.h".
8114         (thread_info): Inherit from refcounted_object and add comments.
8115         (thread_info::incref, thread_info::decref)
8116         (thread_info::m_refcount): Delete.
8117         (thread_info::deletable): Use the refcounted_object::refcount()
8118         method.
8119         * inferior.c (current_inferior_): Add comment.
8120         (set_current_inferior): Increment/decrement refcounts.
8121         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8122         not-deletable instead of comparing with the current inferior.
8123         (initialize_inferiors): Increment the initial inferior's refcount.
8124         * inferior.h (struct inferior): Forward declare.
8125         Include "common/refcounted-object.h".
8126         (current_inferior, set_current_inferior): Move declaration to
8127         before struct inferior's definition, and fix comment.
8128         (inferior): Inherit from refcounted_object.  Add comments.
8129         * thread.c (switch_to_thread_no_regs): Reference the thread's
8130         inferior pointer directly instead of doing a ptid lookup.
8131         (switch_to_no_thread): New function.
8132         (switch_to_thread(thread_info *)): New function, factored out
8133         from ...
8134         (switch_to_thread(ptid_t)): ... this.
8135         (restore_current_thread): Delete.
8136         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8137         fields, and add 'inf' field.
8138         (do_restore_current_thread_cleanup): Check whether old->inf is
8139         alive instead of looking up an inferior by ptid.  Use
8140         switch_to_thread and switch_to_no_thread.
8141         (restore_current_thread_cleanup_dtor): Use old->inf directly
8142         instead of lookup up an inferior by id.  Decref the inferior.
8143         Don't restore 'removable'.
8144         (make_cleanup_restore_current_thread): Same the inferior pointer
8145         in old, instead of the inferior number.  Incref the inferior.
8146         Don't save/clear 'removable'.
8147
8148 2017-04-19  Pedro Alves  <palves@redhat.com>
8149
8150         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8151         unittests/scoped_restore-selftests.c.
8152         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8153         * common/scoped_restore.h (scoped_restore_base): Make "class".
8154         (scoped_restore_base::release): New public method.
8155         (scoped_restore_base::scoped_restore_base): New protected ctor.
8156         (scoped_restore_base::m_saved_var): New protected field.
8157         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8158         scoped_restore_base base class instead of m_saved_var directly.
8159         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8160         (scoped_restore_tmpl::scoped_restore_tmpl(const
8161         scoped_restore_tmpl<T>&)): Likewise.
8162         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8163         method.
8164         (scoped_restore_tmpl::saved_var): New method.
8165         (scoped_restore_tmpl::m_saved_var): Delete.
8166         * inferior.h (inferior::detaching): Now a bool.
8167         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8168         cleanup.
8169         * unittests/scoped_restore-selftests.c: New file.
8170
8171 2017-04-19  Pedro Alves  <palves@redhat.com>
8172
8173         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8174         Re-sort in alphabetic order.
8175
8176 2017-04-18  Pedro Alves  <palves@redhat.com>
8177
8178         * xml-support.c (obstack_xml_printf): Delete.
8179         * xml-support.h (obstack_xml_printf): Delete.
8180
8181 2017-04-18  Pedro Alves  <palves@redhat.com>
8182
8183         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8184         vdebug, verror, body_text, start_element, end_element, name,
8185         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8186         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8187         is_xinclude>: Make private and add m_ prefix.
8188         (gdb_xml_parser::body_text): New method, based on ...
8189         (gdb_xml_body_text): ... this.  Adjust.
8190         (gdb_xml_parser::vdebug): New method, based on ...
8191         (gdb_xml_debug): ... this.  Adjust.
8192         (gdb_xml_parser::verror): New method, based on ...
8193         (gdb_xml_error): ... this.  Adjust.
8194         (gdb_xml_parser::start_element): New method, based on ...
8195         (gdb_xml_start_element): ... this.  Adjust.
8196         (gdb_xml_start_element_wrapper): Defer to
8197         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8198         (gdb_xml_parser::end_element): New method, based on ...
8199         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8200         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8201         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8202         (gdb_xml_parser::use_dtd): New method, based on ...
8203         (gdb_xml_use_dtd): ... this.  Adjust.
8204         (gdb_xml_parser::parse): New method, based on ...
8205         (gdb_xml_parse): ... this.  Adjust.
8206         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8207         (xinclude_start_include): Adjust to call the parser's name method.
8208         (xml_xinclude_default, xml_xinclude_start_doctype)
8209         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8210         method.
8211         (xml_process_xincludes): Adjust to call parser methods.
8212         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8213         declarations.
8214
8215 2017-04-18  Pedro Alves  <palves@redhat.com>
8216
8217         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8218         gdb::optional<std::string>.
8219         * xml-support.c: Include <string>.
8220         (scope_level::scope_level(scope_level &&))
8221         (scope_level::~scope_level): Delete.
8222         (scope_level::body): Now a std::string.
8223         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8224         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8225         parameter.
8226         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8227         (xinclude_parsing_data::output): Now a std::string reference.
8228         (xinclude_start_include): Adjust.
8229         (xml_xinclude_default): Adjust.
8230         (xml_process_xincludes): Add 'output' parameter, and return bool.
8231         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8232         and return bool.
8233         * xml-tdesc.c: Include <unordered_map> and <string>.
8234         (tdesc_xml_cache): Delete.
8235         (tdesc_xml_cache_s): Delete.
8236         (xml_cache): Now an std::unordered_map.
8237         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8238         (target_fetch_description_xml): Change return type to
8239         gdb::optional<std::string>, and adjust.
8240         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8241         (target_fetch_description_xml): Change return type to
8242         gdb::optional<std::string>.
8243
8244 2017-04-18  Pedro Alves  <palves@redhat.com>
8245
8246         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8247         unittests/optional-selftests.c.
8248         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8249         * unittests/optional-selftests.c: New file.
8250         * unittests/optional/assignment/1.cc: New file.
8251         * unittests/optional/assignment/2.cc: New file.
8252         * unittests/optional/assignment/3.cc: New file.
8253         * unittests/optional/assignment/4.cc: New file.
8254         * unittests/optional/assignment/5.cc: New file.
8255         * unittests/optional/assignment/6.cc: New file.
8256         * unittests/optional/assignment/7.cc: New file.
8257         * unittests/optional/cons/copy.cc: New file.
8258         * unittests/optional/cons/default.cc: New file.
8259         * unittests/optional/cons/move.cc: New file.
8260         * unittests/optional/cons/value.cc: New file.
8261         * unittests/optional/in_place.cc: New file.
8262         * unittests/optional/observers/1.cc: New file.
8263         * unittests/optional/observers/2.cc: New file.
8264
8265 2017-04-18  Pedro Alves  <palves@redhat.com>
8266
8267         * common/gdb_optional.h: Include common/traits.h.
8268         (in_place_t): New type.
8269         (in_place): New constexpr variable.
8270         (optional::optional): Remove member initialization of
8271         m_instantiated.
8272         (optional::optional(in_place_t...)): New constructor.
8273         (optional::~optional): Use reset.
8274         (optional::optional(const optional&)): New.
8275         (optional::optional(const optional&&)): New.
8276         (optional::optional(T &)): New.
8277         (optional::optional(T &&)): New.
8278         (operator::operator=(const optional &)): New.
8279         (operator::operator=(optional &&)): New.
8280         (operator::operator= (const T &))
8281         (operator::operator= (T &&))
8282         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8283         (operator::reset): New.
8284         (operator::m_instantiated):: Add in-class initializer.
8285         * common/traits.h: Include <type_traits>.
8286         (struct And): New types.
8287
8288 2017-04-18  Pedro Alves  <palves@redhat.com>
8289
8290         * xml-support.c: Include <vector>.
8291         (scope_level::scope_level(const gdb_xml_element *))
8292         (scope_level::scope_level(scope_level&&)): New.
8293         (scope_level::~scope_level): New.
8294         (scope_level_s): Delete.
8295         (gdb_xml_parser::scopes): Now a std::vector.
8296         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8297         Use std::vector.
8298         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8299         scope cleanup code.
8300         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8301         of the scopes member.  Use std::vector::emplace_back.
8302
8303 2017-04-18  Pedro Alves  <palves@redhat.com>
8304
8305         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8306         a bool.
8307         (gdb_xml_end_element): Change type of first parameter.
8308         (gdb_xml_cleanup): Rename to ...
8309         (gdb_xml_parser::~gdb_xml_parser): ... this.
8310         (gdb_xml_create_parser_and_cleanup): Delete with ...
8311         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8312         to this new ctor.
8313         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8314         using gdb_xml_create_parser_and_cleanup.
8315         (xinclude_parsing_data): Add ctor/dtor.
8316         (xml_xinclude_cleanup): Delete.
8317         (xml_process_xincludes): Create a local xinclude_parsing_data
8318         instead of heap-allocating one.  Create a local gdb_xml_parser
8319         instead of heap-allocating one with
8320         gdb_xml_create_parser_and_cleanup.
8321
8322 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8323
8324         PR threads/20743
8325         * fbsd-nat.c (resume_one_thread_cb): Remove.
8326         (resume_all_threads_cb): Remove.
8327         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8328         iterate_over_threads.
8329
8330 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8331
8332         * NEWS: Create a new section for the next release branch.
8333         Rename the section of the current branch, now that it has
8334         been cut.
8335
8336 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8337
8338         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8339         * version.in: Bump version to 8.0.50.DATE-git.
8340
8341 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8342
8343         PR gdb/21385
8344         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8345         independently of the host, and fix build breakage on Cygwin.
8346
8347 2017-04-13  Pedro Alves  <palves@redhat.com>
8348
8349         * inferior.c (free_inferior): Convert to ...
8350         (inferior::~inferior): ... this dtor.
8351         (inferior::inferior): New ctor, factored out from ...
8352         (add_inferior_silent): ... here.  Allocate the inferior with a new
8353         expression.
8354         (delete_inferior): Call delete instead of free_inferior.
8355         * inferior.h (gdb_environ, continuation): Forward declare.
8356         (inferior): Now a class.  Add in-class initialization to all
8357         members.  Make boolean fields bool, except 'detaching'.
8358         (inferior::inferior): New explicit ctor.
8359         (inferior::~inferior): New.
8360
8361 2017-04-13  Pedro Alves  <palves@redhat.com>
8362
8363         * inferior.c (init_inferior_list): Delete.
8364         * inferior.h (init_inferior_list): Delete.
8365
8366 2017-04-13  Pedro Alves  <palves@redhat.com>
8367
8368         PR threads/13217
8369         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8370         (top level): Call it twice, with different thread sets.
8371
8372 2017-04-13  Pedro Alves  <palves@redhat.com>
8373
8374         * thread.c: Include <algorithm>.
8375         (thread_array_cleanup): Delete.
8376         (scoped_inc_dec_ref): New class.
8377         (live_threads_count): New function.
8378         (set_thread_refcount): Delete.
8379         (tp_array_compar_ascending): Now a bool.
8380         (tp_array_compar): Convert to a std::sort comparison function.
8381         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8382         and live_threads_count.
8383
8384 2017-04-13  Pedro Alves  <palves@redhat.com>
8385
8386         * infrun.c (follow_fork_inferior): Also switch the current
8387         inferior.
8388
8389 2017-04-13  Pedro Alves  <palves@redhat.com>
8390
8391         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8392         before calling create_internal_breakpoint.
8393
8394 2017-04-13  Pedro Alves  <palves@redhat.com>
8395
8396         * fork-child.c (execv_argv): New class.
8397         (breakup_args): Refactored as ...
8398         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8399         Copy arguments to storage and replace separators with NULL
8400         terminators in place.
8401         (escape_bang_in_quoted_argument): Adjust to return bool.
8402         (execv_argv::execv_argv): New ctor.
8403         (execv_argv::init_for_shell): New method, factored out from
8404         fork_inferior.  Don't strdup strings into the vector.
8405         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8406         Remove free_vector_argv call.
8407
8408 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8409
8410         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8411         tdep->rx_psw_type.
8412
8413 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8414
8415         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8416         * rx-tdep.c (rx_gdbarch_init): Likewise.
8417
8418 2017-04-13  Pedro Alves  <palves@redhat.com>
8419
8420         * breakpoint.h (struct breakpoint): Reindent.
8421
8422 2017-04-13  Pedro Alves  <palves@redhat.com>
8423
8424         * breakpoint.c (bp_location): Rename to ...
8425         (bp_locations): ... this.  All references updated.
8426         (bp_location_count): Rename to ...
8427         (bp_locations_count): ... this.  All references updated.
8428         (bp_location_placed_address_before_address_max): Rename to ...
8429         (bp_locations_placed_address_before_address_max): ... this.  All
8430         references updated.
8431         (bp_location_shadow_len_after_address_max): Rename to ...
8432         (bp_locations_shadow_len_after_address_max): ... this.  All
8433         references updated.
8434         (bp_location_compare_addrs): Rename to ...
8435         (bp_locations_compare_addrs): ... this.  All references updated.
8436         (bp_location_compare):Rename to ...
8437         (bp_locations_compare): ... this.  All references updated.
8438         (bp_location_target_extensions_update): Rename to ...
8439         (bp_locations_target_extensions_update): ... this.  All references
8440         updated.
8441
8442 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8443
8444         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8445         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8446         'sgtty.h'.
8447         * common/gdb_termios.h: New file, with parts of "terminal.h".
8448         * inflow.c: Include "gdb_termios.h".
8449         * ser-unix.c: Include "gdb_termios.h".
8450         * terminal.h: Move terminal-related defines to
8451         "common/gdb_termios.h".
8452
8453 2017-04-12  Tom Tromey  <tom@tromey.com>
8454
8455         * probe.c (parse_probes): Update.
8456         * location.h (delete_event_location): Don't declare.
8457         (event_location_deleter::operator()): Update.
8458         * location.c (event_location_deleter::operator()): Rename from
8459         delete_event_location.
8460         * linespec.h (linespec_result) <location>: Change type to
8461         event_location_up.
8462         * linespec.c (canonicalize_linespec, event_location_to_sals)
8463         (decode_objc): Update.
8464         (linespec_result): Don't call delete_event_location.
8465         * breakpoint.c (create_breakpoints_sal)
8466         (bkpt_probe_create_sals_from_location)
8467         (strace_marker_create_sals_from_location): Update.
8468
8469 2017-04-12  Tom Tromey  <tom@tromey.com>
8470
8471         * linespec.h (struct linespec_result): Add constructor and
8472         destructor.
8473         (init_linespec_result, destroy_linespec_result)
8474         (make_cleanup_destroy_linespec_result): Don't declare.
8475         * linespec.c (init_linespec_result): Remove.
8476         (linespec_result::~linespec_result): Rename from
8477         destroy_linespec_result.  Update.
8478         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8479         Remove.
8480         * breakpoint.c (create_breakpoint, break_range_command)
8481         (decode_location_default): Update.
8482         * ax-gdb.c (agent_command_1): Update.
8483
8484 2017-04-12  Tom Tromey  <tom@tromey.com>
8485
8486         * remote.c (remote_download_tracepoint): Update.
8487         * python/py-breakpoint.c (bppy_get_location): Update.
8488         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8489         (gdbscm_breakpoint_location): Update.
8490         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8491         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8492         Change type to event_location_up.
8493         * breakpoint.c (create_overlay_event_breakpoint)
8494         (create_longjmp_master_breakpoint)
8495         (create_std_terminate_master_breakpoint)
8496         (create_exception_master_breakpoint)
8497         (breakpoint_event_location_empty_p, print_breakpoint_location)
8498         (print_one_breakpoint_location, create_thread_event_breakpoint)
8499         (init_breakpoint_sal, create_breakpoint)
8500         (print_recreate_ranged_breakpoint, break_range_command)
8501         (init_ada_exception_breakpoint, say_where): Update.
8502         (base_breakpoint_dtor): Don't call delete_event_location.
8503         (bkpt_print_recreate, tracepoint_print_recreate)
8504         (dprintf_print_recreate, update_static_tracepoint)
8505         (breakpoint_re_set_default): Update.
8506
8507 2017-04-12  Tom Tromey  <tom@tromey.com>
8508
8509         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8510         type of "to_do".  Update.
8511         (compute_stack_depth): Use std::vector.
8512
8513 2017-04-12  Tom Tromey  <tom@tromey.com>
8514
8515         * printcmd.c (find_instruction_backward): Use std::vector.
8516
8517 2017-04-12  Tom Tromey  <tom@tromey.com>
8518
8519         * symfile.c (objfilep): Remove typedef.
8520         (reread_symbols): Use a std::vector.
8521
8522 2017-04-12  Tom Tromey  <tom@tromey.com>
8523
8524         * mi/mi-main.c (exec_direction_forward): Remove.
8525         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8526         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8527         scoped_restore.
8528         * guile/guile.c (guile_repl_command, guile_command)
8529         (gdbscm_execute_gdb_command): Use scoped_restore.
8530         * go-exp.y (go_parse): Use scoped_restore.
8531         * d-exp.y (d_parse): Use scoped_restore.
8532         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8533         * c-exp.y (c_parse): Use scoped_restore.
8534
8535 2017-04-12  Tom Tromey  <tom@tromey.com>
8536
8537         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8538         (mi_parse): Update return type.
8539         (mi_parse_free): Remove.
8540         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8541         (mi_parse::~mi_parse): Rename from mi_parse_free.
8542         (mi_parse_cleanup): Remove.
8543         (mi_parse): Return a unique_ptr.  Use new.
8544         * mi/mi-main.c (mi_execute_command): Update.
8545
8546 2017-04-12  Tom Tromey  <tom@tromey.com>
8547
8548         * location.c (explicit_location_lex_one): Return a
8549         unique_xmalloc_ptr.
8550         (string_to_explicit_location): Update.  Remove cleanups.
8551
8552 2017-04-12  Tom Tromey  <tom@tromey.com>
8553
8554         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8555         (compare_value_and_voffset): Change type.  Update.
8556         (compute_vtable_size): Change type of "offset_vec".
8557         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8558         (gnuv3_get_typeid): Remove extraneous declaration.
8559
8560 2017-04-12  Tom Tromey  <tom@tromey.com>
8561
8562         * charset.h (wchar_iterator): Fix comment.
8563
8564 2017-04-12  Tom Tromey  <tom@tromey.com>
8565
8566         * charset.c (iconv_wrapper): New class.
8567         (cleanup_iconv): Remove.
8568         (convert_between_encodings): Use it.
8569
8570 2017-04-12  Tom Tromey  <tom@tromey.com>
8571
8572         * symfile.h (increment_reading_symtab): Update type.
8573         * symfile.c (decrement_reading_symtab): Remove.
8574         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8575         * psymtab.c (psymtab_to_symtab): Update.
8576         * dwarf2read.c (dw2_instantiate_symtab): Update.
8577
8578 2017-04-12  Tom Tromey  <tom@tromey.com>
8579
8580         * jit.c (struct jit_reader): Declare separately.  Add constructor
8581         and destructor.  Change type of "handle".
8582         (loaded_jit_reader): Define separately.
8583         (jit_reader_load): Update.  New "new".
8584         (jit_reader_unload_command): Use "delete".
8585         * gdb-dlfcn.h (struct dlclose_deleter): New.
8586         (gdb_dlhandle_up): New typedef.
8587         (gdb_dlopen, gdb_dlsym): Update types.
8588         (gdb_dlclose): Remove.
8589         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8590         (gdb_dlsym): Change type of "handle".
8591         (make_cleanup_dlclose): Remove.
8592         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8593         * compile/compile-c-support.c (load_libcc): Update.
8594
8595 2017-04-12  Tom Tromey  <tom@tromey.com>
8596
8597         * symtab.h (find_pcs_for_symtab_line): Change return type.
8598         * symtab.c (find_pcs_for_symtab_line): Change return type.
8599         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8600         type of "vec".  Update.
8601         (ltpy_get_pcs_for_line): Update.
8602         * linespec.c (decode_digits_ordinary): Update.
8603
8604 2017-04-12  Tom Tromey  <tom@tromey.com>
8605
8606         * tracepoint.c (actions_command): Update.
8607         * python/python.c (python_command, python_interactive_command):
8608         Update.
8609         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8610         * guile/guile.c (guile_command): Update.
8611         * defs.h (read_command_lines, read_command_lines_1): Return
8612         command_line_up.
8613         (command_lines_deleter): New struct.
8614         (command_line_up): New typedef.
8615         * compile/compile.c (compile_code_command)
8616         (compile_print_command): Update.
8617         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8618         command_line_up.
8619         (make_cleanup_free_command_lines): Remove.
8620         * cli/cli-script.c (get_command_line, read_command_lines_1)
8621         (copy_command_lines): Return command_line_up.
8622         (while_command, if_command, read_command_lines, define_command)
8623         (document_command): Update.
8624         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8625         Remove.
8626         * breakpoint.h (breakpoint_set_commands): Change type of
8627         "commands".
8628         * breakpoint.c (breakpoint_set_commands): Change type of
8629         "commands".  Update.
8630         (do_map_commands_command, update_dprintf_command_list)
8631         (create_tracepoint_from_upload): Update.
8632
8633 2017-04-12  Tom Tromey  <tom@tromey.com>
8634
8635         * tracepoint.c (scope_info): Update.
8636         * spu-tdep.c (spu_catch_start): Update.
8637         * python/python.c (gdbpy_decode_line): Update.
8638         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8639         * python/py-breakpoint.c (bppy_init): Update.
8640         * probe.c (parse_probes): Update.
8641         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8642         * location.h (event_location_deleter): New struct.
8643         (event_location_up): New typedef.
8644         (new_linespec_location, new_address_location, new_probe_location)
8645         (new_explicit_location, copy_event_location)
8646         (string_to_event_location, string_to_event_location_basic)
8647         (string_to_explicit_location): Update return type.
8648         (make_cleanup_delete_event_location): Remove.
8649         * location.c (new_linespec_location, new_address_location)
8650         (new_probe_location, new_explicit_location, copy_event_location):
8651         Return event_location_up.
8652         (delete_event_location_cleanup)
8653         (make_cleanup_delete_event_location): Remove.
8654         (string_to_explicit_location, string_to_event_location_basic)
8655         (string_to_event_location): Return event_location_up.
8656         * linespec.c (canonicalize_linespec, event_location_to_sals)
8657         (decode_line_with_current_source)
8658         (decode_line_with_last_displayed, decode_objc): Update.
8659         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8660         * completer.c (location_completer): Update.
8661         * cli/cli-cmds.c (edit_command, list_command): Update.
8662         * breakpoint.c (create_overlay_event_breakpoint)
8663         (create_longjmp_master_breakpoint)
8664         (create_std_terminate_master_breakpoint)
8665         (create_exception_master_breakpoint)
8666         (create_thread_event_breakpoint): Update.
8667         (init_breakpoint_sal): Update.  Remove some dead code.
8668         (create_breakpoint_sal): Change type of "location".  Update.
8669         (create_breakpoints_sal, create_breakpoint, break_command_1)
8670         (dprintf_command, break_range_command, until_break_command)
8671         (init_ada_exception_breakpoint)
8672         (strace_marker_create_sals_from_location)
8673         (update_static_tracepoint, trace_command, ftrace_command)
8674         (strace_command, create_tracepoint_from_upload): Update.
8675         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8676         * ax-gdb.c (agent_command_1): Update.
8677
8678 2017-04-12  Pedro Alves  <palves@redhat.com>
8679
8680         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8681         * configure.tgt: Handle i[34567]86-*-go32* and
8682         i[34567]86-*-msdosdjgpp*.
8683         * i386-tdep.c (i386_svr4_reg_to_regnum):
8684         Make extern.
8685         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8686         i386-go32-tdep.c.
8687         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8688         * i386-go32-tdep.c: New file.
8689         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8690         declarations.
8691
8692 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8693
8694         * aix-thread.c (pd_status2str): Change return type to const char *.
8695
8696 2017-04-12  Pedro Alves  <palves@redhat.com>
8697
8698         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8699         calls to set_gdbarch_gnu_triplet_regexp.
8700
8701 2017-04-12  Pedro Alves  <palves@redhat.com>
8702
8703         PR gdb/21323
8704         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8705         New enum value.
8706         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8707         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8708         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8709         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8710         * gdbarch.h, gdbarch.c: Regenerate.
8711         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8712         gdbarch_wchar_bit and gdbarch_wchar_signed.
8713         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8714         * arm-tdep.c (arm_gdbarch_init): Likewise.
8715         * avr-tdep.c (avr_gdbarch_init): Likewise.
8716         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8717         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8718         * i386-tdep.c (i386_go32_init_abi): Likewise.
8719         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8720         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8721         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8722         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8723         * sh-tdep.c (sh_gdbarch_init): Likewise.
8724         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8725         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8726         * windows-tdep.c (windows_init_abi): Likewise.
8727         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8728
8729 2017-04-12  Pedro Alves  <palves@redhat.com>
8730
8731         PR c++/21323
8732         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8733         cplus_primitive_type_char32_t>: New enum values.
8734         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8735         and cplus_primitive_type_char32_t.
8736         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8737         32, use the archtecture's built-in type for char16_t and char32_t,
8738         respectively.  Otherwise, fallback to init_integer_type as before,
8739         but make the type unsigned, and issue a complaint.
8740         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8741
8742 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8743
8744         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8745         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8746
8747 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8748
8749         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8750         'const char *'.
8751
8752 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8753
8754         * common/common-utils.c (free_vector_argv): New function.
8755         * common/common-utils.h: Include <vector>.
8756         (free_vector_argv): New prototype.
8757         * darwin-nat.c (darwin_create_inferior): Rewrite function
8758         prototype in order to constify "exec_file" and accept a
8759         "std::string" for "allargs".
8760         * fork-child.c: Include <vector>.
8761         (breakup_args): Rewrite function, using C++.
8762         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8763         and accept "std::string" for "allargs".  Update the code to
8764         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8765         and "execvp".
8766         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8767         order to constify "exec_file" and accept a "std::string" for
8768         "allargs".
8769         * go32-nat.c (go32_create_inferior): Likewise.
8770         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8771         * infcmd.c (run_command_1): Constify "exec_file".  Use
8772         "std::string" for inferior arguments.
8773         * inferior.h (fork_inferior): Update prototype.
8774         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8775         prototype in order to constify "exec_file" and accept a
8776         "std::string" for "allargs".
8777         * nto-procfs.c (procfs_create_inferior): Likewise.
8778         * procfs.c (procfs_create_inferior): Likewise.
8779         * remote-sim.c (gdbsim_create_inferior): Likewise.
8780         * remote.c (extended_remote_run): Update code to accept
8781         "std::string" as argument.
8782         (extended_remote_create_inferior): Rewrite function prototype in
8783         order to constify "exec_file" and accept a "std::string" for
8784         "allargs".
8785         * rs6000-nat.c (super_create_inferior): Likewise.
8786         (rs6000_create_inferior): Likewise.
8787         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8788         * windows-nat.c (windows_create_inferior): Likewise.
8789
8790 2017-04-11  Pedro Alves  <palves@redhat.com>
8791
8792         * thread.c: Fix whitespace throughout.
8793
8794 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8795
8796         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8797
8798 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8799
8800         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8801
8802 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8803
8804         PR gdb/21364
8805         * osdata.c (info_osdata): Check if 'type' is an empty string
8806         instead of NULL.
8807
8808 2017-04-10  Pedro Alves  <palves@redhat.com>
8809
8810         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8811         (ptid_to_global_thread_id, in_thread_list)
8812         (do_captured_list_thread_ids, set_resumed, set_running)
8813         (set_executing, set_stop_requested, finish_thread_state)
8814         (validate_registers_access, can_access_registers_ptid)
8815         (print_thread_info_1, switch_to_thread)
8816         (do_restore_current_thread_cleanup)
8817         (make_cleanup_restore_current_thread, thread_command)
8818         (thread_name_command): Use operator== instead of ptid_equal.
8819
8820 2017-04-10  Pedro Alves  <palves@redhat.com>
8821
8822         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8823         (current_thread_cleanup_chain): Delete.
8824         (restore_current_thread_cleanup_dtor)
8825         (make_cleanup_restore_current_thread): Remove references to
8826         current_thread_cleanup_chain.
8827
8828 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8829
8830         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8831         REG_UNKNOWN.
8832
8833 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8834
8835         PR gdb/19942
8836         * gdbthread.h (thread_info::deletable): New method.
8837         (thread_info::incref): New method.
8838         (thread_info::decref): New method.
8839         (thread_info::refcount): Move it to private.
8840         * infrun.c (save_stop_context): Call inc_refcount.
8841         (release_stop_context_cleanup): Likewise.
8842         * thread.c (set_thread_exited): New function.
8843         (init_thread_list): Delete "tp" only it is deletable, otherwise
8844         call set_thread_exited.
8845         (delete_thread_1): Call set_thread_exited.
8846         (current_thread_cleanup) <inferior_pid>: Remove.
8847         <thread>: New field.
8848         (restore_current_thread_ptid_changed): Removed.
8849         (do_restore_current_thread_cleanup): Adjust.
8850         (restore_current_thread_cleanup_dtor): Don't call
8851         find_thread_ptid.
8852         (set_thread_refcount): Use dec_refcount.
8853         (make_cleanup_restore_current_thread): Adjust.
8854         (thread_apply_all_command): Call inc_refcount.
8855         (_initialize_thread): Don't call
8856         observer_attach_thread_ptid_changed.
8857
8858 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8859
8860         * thread.c (delete_thread_1): Hoist code on marking thread as
8861         exited.
8862
8863 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8864
8865         * windows-nat.c (windows_detach): Initialize ptid with
8866         minus_one_ptid.
8867
8868 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8869
8870         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8871
8872 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8873
8874         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8875         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8876         (bfin_pseudo_register_write): Likewise
8877
8878 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8879
8880         * common/ptid.h (struct ptid): Change to...
8881         (class ptid_t): ... this.
8882         <ptid_t>: New constructors.
8883         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8884         matches>: New methods.
8885         <make_null, make_minus_one>: New static methods.
8886         <pid>: Rename to...
8887         <m_pid>: ...this.
8888         <lwp>: Rename to...
8889         <m_lwp>: ...this.
8890         <tid>: Rename to...
8891         <m_tid>: ...this.
8892         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8893         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8894         as references, move comment to class ptid_t.
8895         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8896         ptid_t static methods.
8897         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8898         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8899         Take ptid arguments as references, implement using ptid_t methods.
8900         * unittests/ptid-selftests.c: New file.
8901         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8902         unittests/ptid-selftests.c.
8903         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8904
8905 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8906
8907         * python/python.c (python_run_simple_file): Cast mode literal to
8908         non-const char pointer as expected by PyFile_FromString.
8909
8910 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8911
8912         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8913         minus_one_ptid and null_ptid.
8914
8915 2017-04-05  Pedro Alves  <palves@redhat.com>
8916
8917         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8918         * configure: Regenerate.
8919
8920 2017-04-05  Pedro Alves  <palves@redhat.com>
8921
8922         * ada-exp.y (yyerror): Constify.
8923         * ada-lang.c (bound_name, get_selections)
8924         (ada_variant_discrim_type)
8925         (ada_variant_discrim_name, ada_value_struct_elt)
8926         (ada_lookup_struct_elt_type, is_unchecked_variant)
8927         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8928         (catch_ada_exception_command_split)
8929         (catch_ada_assert_command_split, catch_assert_command)
8930         (ada_op_name): Constify.
8931         * ada-lang.h (ada_yyerror, get_selections)
8932         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8933         * arc-tdep.c (arc_print_frame_cache): Constify.
8934         * arm-tdep.c (arm_skip_stub): Constify.
8935         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8936         (gen_aggregate_elt_ref): Constify.
8937         * bcache.c (print_bcache_statistics): Constify.
8938         * bcache.h (print_bcache_statistics): Constify.
8939         * break-catch-throw.c (catch_exception_command_1):
8940         * breakpoint.c (struct ep_type_description::description):
8941         Constify.
8942         (add_solib_catchpoint): Constify.
8943         (catch_fork_command_1): Add cast.
8944         (add_catch_command): Constify.
8945         * breakpoint.h (add_catch_command, add_solib_catchpoint):
8946         Constify.
8947         * bsd-uthread.c (bsd_uthread_state): Constify.
8948         * buildsym.c (patch_subfile_names): Constify.
8949         * buildsym.h (next_symbol_text_func, patch_subfile_names):
8950         Constify.
8951         * c-exp.y (yyerror): Constify.
8952         (token::oper): Constify.
8953         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8954         * c-varobj.c (cplus_describe_child): Constify.
8955         * charset.c (find_charset_names): Add cast.
8956         (find_charset_names): Constify array and add const_cast.
8957         * cli/cli-cmds.c (complete_command, cd_command): Constify.
8958         (edit_command): Constify.
8959         * cli/cli-decode.c (lookup_cmd): Constify.
8960         * cli/cli-dump.c (dump_memory_command, dump_value_command):
8961         Constify.
8962         (struct dump_context): Constify.
8963         (add_dump_command, restore_command): Constify.
8964         * cli/cli-script.c (get_command_line): Constify.
8965         * cli/cli-script.h (get_command_line): Constify.
8966         * cli/cli-utils.c (check_for_argument): Constify.
8967         * cli/cli-utils.h (check_for_argument): Constify.
8968         * coff-pe-read.c (struct read_pe_section_data): Constify.
8969         * command.h (lookup_cmd): Constify.
8970         * common/print-utils.c (decimal2str): Constify.
8971         * completer.c (gdb_print_filename): Constify.
8972         * corefile.c (set_gnutarget): Constify.
8973         * cp-name-parser.y (yyerror): Constify.
8974         * cp-valprint.c (cp_print_class_member): Constify.
8975         * cris-tdep.c (cris_register_name, crisv32_register_name):
8976         Constify.
8977         * d-exp.y (yyerror): Constify.
8978         (struct token::oper): Constify.
8979         * d-lang.h (d_yyerror): Constify.
8980         * dbxread.c (struct header_file_location::name): Constify.
8981         (add_old_header_file, add_new_header_file, last_function_name)
8982         (dbx_next_symbol_text, add_bincl_to_list)
8983         (find_corresponding_bincl_psymtab, set_namestring)
8984         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8985         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8986         * defs.h (command_line_input, print_address_symbolic)
8987         (deprecated_readline_begin_hook): Constify.
8988         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8989         Constify.
8990         * event-top.c (handle_line_of_input): Constify and add cast.
8991         * exceptions.c (catch_errors): Constify.
8992         * exceptions.h (catch_errors): Constify.
8993         * expprint.c (print_subexp_standard, op_string, op_name)
8994         (op_name_standard, dump_raw_expression, dump_raw_expression):
8995         * expression.h (op_name, op_string, dump_raw_expression):
8996         Constify.
8997         * f-exp.y (yyerror): Constify.
8998         (struct token::oper): Constify.
8999         (struct f77_boolean_val::name): Constify.
9000         * f-lang.c (f_word_break_characters): Constify.
9001         * f-lang.h (f_yyerror): Constify.
9002         * fork-child.c (fork_inferior): Add cast.
9003         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9004         (new_variant): Constify.
9005         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9006         * gdbarch.c: Regenerate.
9007         * gdbcore.h (set_gnutarget): Constify.
9008         * go-exp.y (yyerror): Constify.
9009         (token::oper): Constify.
9010         * go-lang.h (go_yyerror): Constify.
9011         * go32-nat.c (go32_sysinfo): Constify.
9012         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9013         * guile/scm-cmd.c (cmdscm_function): Constify.
9014         * guile/scm-param.c (pascm_param_value): Constify.
9015         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9016         (h8300sx_register_name): Constify.
9017         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9018         Constify.
9019         * ia64-tdep.c (ia64_register_names): Constify.
9020         * infcmd.c (construct_inferior_arguments): Constify.
9021         (path_command, attach_post_wait): Constify.
9022         * language.c (show_range_command, show_case_command)
9023         (unk_lang_error): Constify.
9024         * language.h (language_defn::la_error)
9025         (language_defn::la_name_of_this): Constify.
9026         * linespec.c (decode_line_2): Constify.
9027         * linux-thread-db.c (thread_db_err_str): Constify.
9028         * lm32-tdep.c (lm32_register_name): Constify.
9029         * m2-exp.y (yyerror): Constify.
9030         * m2-lang.h (m2_yyerror): Constify.
9031         * m32r-tdep.c (m32r_register_names): Constify and make static.
9032         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9033         * m88k-tdep.c (m88k_register_name): Constify.
9034         * macroexp.c (appendmem): Constify.
9035         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9036         (upgrade_type, parse_external, parse_partial_symbols)
9037         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9038         (new_symbol): Constify.
9039         * memattr.c (mem_info_command): Constify.
9040         * mep-tdep.c (register_name_from_keyword): Constify.
9041         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9042         Constify.
9043         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9044         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9045         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9046         cast.
9047         (mi_execute_async_cli_command): Constify.
9048         * mips-tdep.c (mips_register_name): Constify.
9049         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9050         (am33_register_name, am33_2_register_name)
9051         * moxie-tdep.c (moxie_register_names): Constify.
9052         * nat/linux-osdata.c (osdata_type): Constify fields.
9053         * nto-tdep.c (nto_parse_redirection): Constify.
9054         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9055         (lookup_child_selector): Constify.
9056         (objc_methcall::name): Constify.
9057         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9058         (lookup_struct_typedef): Constify.
9059         * objfiles.c (pc_in_section): Constify.
9060         * objfiles.h (pc_in_section): Constify.
9061         * p-exp.y (struct token::oper): Constify.
9062         (yyerror): Constify.
9063         * p-lang.h (pascal_yyerror): Constify.
9064         * parser-defs.h (op_name_standard): Constify.
9065         (op_print::string): Constify.
9066         (exp_descriptor::op_name): Constify.
9067         * printcmd.c (print_address_symbolic): Constify.
9068         * psymtab.c (print_partial_symbols): Constify.
9069         * python/py-breakpoint.c (stop_func): Constify.
9070         (bppy_get_expression): Constify.
9071         * python/py-cmd.c (cmdpy_completer::name): Constify.
9072         (cmdpy_function): Constify.
9073         * python/py-event.c (evpy_add_attribute)
9074         (gdbpy_initialize_event_generic): Constify.
9075         * python/py-event.h (evpy_add_attribute)
9076         (gdbpy_initialize_event_generic): Constify.
9077         * python/py-evts.c (add_new_registry): Constify.
9078         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9079         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9080         * python/py-inferior.c (get_buffer): Add cast.
9081         * python/py-param.c (parm_constant::name): Constify.
9082         * python/py-unwind.c (fprint_frame_id): Constify.
9083         * python/python.c (gdbpy_parameter_value): Constify.
9084         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9085         * remote.c (memory_packet_config::name): Constify.
9086         (show_packet_config_cmd, remote_write_bytes)
9087         (remote_buffer_add_string):
9088         * reverse.c (exec_reverse_once): Constify.
9089         * rs6000-tdep.c (variant::name, variant::description): Constify.
9090         * rust-exp.y (rustyyerror): Constify.
9091         * rust-lang.c (rust_op_name): Constify.
9092         * rust-lang.h (rustyyerror): Constify.
9093         * serial.h (serial_ops::name): Constify.
9094         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9095         (sh_sh3e_register_name, sh_sh2e_register_name)
9096         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9097         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9098         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9099         (sh_sh4al_dsp_register_name): Constify.
9100         * sh64-tdep.c (sh64_register_name): Constify.
9101         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9102         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9103         * stabsread.c (patch_block_stabs, read_type_number)
9104         (ref_map::stabs, ref_add, process_reference)
9105         (symbol_reference_defined, define_symbol, define_symbol)
9106         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9107         (read_one_struct_field, read_struct_fields, read_baseclasses)
9108         (read_tilde_fields, read_struct_type, read_array_type)
9109         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9110         (read_huge_number, read_range_type, read_args, common_block_start)
9111         (find_name_end): Constify.
9112         * stabsread.h (common_block_start, define_symbol)
9113         (process_one_symbol, symbol_reference_defined, ref_add):
9114         * symfile.c (get_section_index, add_symbol_file_command):
9115         * symfile.h (get_section_index): Constify.
9116         * target-descriptions.c (tdesc_type::name): Constify.
9117         (tdesc_free_type): Add cast.
9118         * target.c (find_default_run_target):
9119         (add_deprecated_target_alias, find_default_run_target)
9120         (target_announce_detach): Constify.
9121         (do_option): Constify.
9122         * target.h (add_deprecated_target_alias): Constify.
9123         * thread.c (print_thread_info_1): Constify.
9124         * top.c (deprecated_readline_begin_hook, command_line_input):
9125         Constify.
9126         (init_main): Add casts.
9127         * top.h (handle_line_of_input): Constify.
9128         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9129         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9130         (tfind_command): Rename to ...
9131         (tfind_command_1): ... this and constify.
9132         (tfind_command): New function.
9133         (tfind_end_command, tfind_start_command): Adjust.
9134         (encode_source_string): Constify.
9135         * tracepoint.h (encode_source_string): Constify.
9136         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9137         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9138         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9139         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9140         * tui/tui-win.c (parse_scrolling_args): Constify.
9141         * tui/tui-windata.c (tui_erase_data_content): Constify.
9142         * tui/tui-windata.h (tui_erase_data_content): Constify.
9143         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9144         * tui/tui.c (tui_enable): Add cast.
9145         * utils.c (defaulted_query): Constify.
9146         (init_page_info): Add cast.
9147         (puts_debug, subset_compare): Constify.
9148         * utils.h (subset_compare): Constify.
9149         * varobj.c (varobj_format_string): Constify.
9150         * varobj.h (varobj_format_string): Constify.
9151         * vax-tdep.c (vax_register_name): Constify.
9152         * windows-nat.c (windows_detach): Constify.
9153         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9154         * xml-support.c (gdb_xml_end_element): Constify.
9155         * xml-tdesc.c (tdesc_start_reg): Constify.
9156         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9157         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9158         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9159
9160 2017-04-05  Pedro Alves  <palves@redhat.com>
9161
9162         * proc-api.c (struct trans): Constify.
9163         (procfs_note): Constify.
9164         * proc-events.c (struct trans, syscall_table):
9165         * proc-flags.c (struct trans): Constify.
9166         * proc-utils.h (procfs_note): Constify.
9167         * proc-why.c (struct trans): Constify.
9168         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9169         (procfs_detach): Constify.
9170         * sol-thread.c (struct string_map): Constify.
9171         (td_err_string, td_state_string): Constify.
9172
9173 2017-04-05  Pedro Alves  <palves@redhat.com>
9174
9175         * proc-api.c (procfs_filename): Don't initialize
9176         procfs_filename.
9177         (prepare_to_trace): Assume procfs_filename is non-NULL.
9178         (_initialize_proc_api): Give procfs_filename a default value here.
9179
9180 2017-04-05  Pedro Alves  <palves@redhat.com>
9181
9182         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9183         'cond_string' parameter.
9184         (extract_exception_regexp): Constify 'string' parameter.
9185         (catch_exception_command_1): Constify.
9186         * breakpoint.c (init_catchpoint)
9187         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9188         parameter.
9189         (ep_parse_optional_if_clause, catch_fork_command_1)
9190         (catch_exec_command_1): Constify.
9191         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9192         parameter.
9193         (ep_parse_optional_if_clause): Constify.
9194         * cli/cli-utils.c (remove_trailing_whitespace)
9195         (check_for_argument): Constify.
9196         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9197         non-const overload.
9198         (check_for_argument): Likewise.
9199
9200 2017-04-05  Pedro Alves  <palves@redhat.com>
9201
9202         * event-top.c (command_line_handler): Add cast to execute_command
9203         call.
9204         * record-btrace.c (cmd_record_btrace_bts_start)
9205         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9206         (cmd_record_btrace_start): Add cast to execute_command call.
9207         * record-full.c (record_full_goto_insn):
9208         * record.c (record_start, record_stop): Add cast to
9209         execute_command_to_string calls.
9210         (cmd_record_start): Add cast to execute_command calls.
9211
9212 2017-04-05  Pedro Alves  <palves@redhat.com>
9213
9214         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9215         static inline function.
9216         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9217         array and use gdb_PyArg_ParseTupleAndKeywords.
9218         * python/py-cmd.c (cmdpy_init): Likewise.
9219         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9220         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9221         (infpy_search_memory): Likewise.
9222         * python/py-objfile.c (objfpy_add_separate_debug_file)
9223         (gdbpy_lookup_objfile): Likewise.
9224         * python/py-symbol.c (gdbpy_lookup_symbol)
9225         (gdbpy_lookup_global_symbol): Likewise.
9226         * python/py-type.c (gdbpy_lookup_type): Likewise.
9227         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9228         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9229         Likewise.
9230
9231 2017-04-05  Pedro Alves  <palves@redhat.com>
9232
9233         * python/python-internal.h (gdb_PyGetSetDef): New type.
9234         * python/py-block.c (block_object_getset)
9235         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9236         * python/py-event.c (event_object_getset)
9237         (finish_breakpoint_object_getset): Likewise.
9238         * python/py-inferior.c (inferior_object_getset): Likewise.
9239         * python/py-infthread.c (thread_object_getset): Likewise.
9240         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9241         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9242         * python/py-objfile.c (objfile_getset): Likewise.
9243         * python/py-progspace.c (pspace_getset): Likewise.
9244         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9245         Likewise.
9246         * python/py-record.c (recpy_record_getset): Likewise.
9247         * python/py-symbol.c (symbol_object_getset): Likewise.
9248         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9249         Likewise.
9250         * python/py-type.c (type_object_getset, field_object_getset):
9251         Likewise.
9252         * python/py-value.c (value_object_getset): Likewise.
9253
9254 2017-04-05  Pedro Alves  <palves@redhat.com>
9255
9256         * python/python-internal.h (gdb_PyObject_CallMethod)
9257         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9258         New functions.
9259         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9260         (PySys_GetObject, PySys_SetPath): New macros.
9261
9262 2017-04-05  Pedro Alves  <palves@redhat.com>
9263
9264         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9265         info_osdata_command.
9266         * osdata.c (info_osdata_command): Rename to ...
9267         (info_osdata): ... this.  Constify 'type' parameter, and remove
9268         the 'from_tty' parameter.  Accept NULL TYPE.
9269         (info_osdata_command): New function.
9270         * osdata.h (info_osdata_command): Remove declaration.
9271         (info_osdata): New declaration.
9272
9273 2017-04-05  Pedro Alves  <palves@redhat.com>
9274
9275         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9276         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9277         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9278         parameter.
9279         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9280         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9281         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9282         parameter.
9283         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9284         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9285         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9286         (mi_cmd_file_list_exec_source_files)
9287         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9288         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9289         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9290         parameter.
9291         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9292         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9293         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9294         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9295         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9296         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9297         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9298         'command' parameter.
9299         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9300         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9301         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9302         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9303         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9304         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9305         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9306         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9307         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9308         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9309         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9310         parameter.
9311         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9312         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9313         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9314         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9315         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9316         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9317         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9318         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9319         (mi_cmd_data_list_changed_registers)
9320         (mi_cmd_data_write_register_values)
9321         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9322         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9323         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9324         (mi_cmd_list_features, mi_cmd_list_target_features)
9325         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9326         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9327         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9328         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9329         (mi_cmd_trace_frame_collected): Constify 'command'
9330         parameter.
9331         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9332         'command' parameter.
9333
9334 2017-04-05  Pedro Alves  <palves@redhat.com>
9335
9336         * ada-lang.c (ada_completer_word_break_characters): Now a const
9337         array.
9338         (ada_get_gdb_completer_word_break_characters): Constify.
9339         * completer.c (gdb_completer_command_word_break_characters)
9340         (gdb_completer_file_name_break_characters)
9341         (gdb_completer_quote_characters): Now const arrays.
9342         (get_gdb_completer_quote_characters): Constify.
9343         (set_rl_completer_word_break_characters): New function.
9344         (set_gdb_completion_word_break_characters)
9345         (complete_line_internal): Use it.
9346         * completer.h (get_gdb_completer_quote_characters): Constify.
9347         (set_rl_completer_word_break_characters): Declare.
9348         * f-lang.c (f_word_break_characters): Constify.
9349         * language.c (default_word_break_characters): Constify.
9350         * language.h (language_defn::la_word_break_characters): Constify.
9351         (default_word_break_characters): Constify.
9352         * top.c (init_main): Use set_rl_completer_word_break_characters.
9353
9354 2017-04-05  Pedro Alves  <palves@redhat.com>
9355
9356         * aix-thread.c (aix_thread_pid_to_str)
9357         (aix_thread_extra_thread_info): Constify.
9358         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9359         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9360         (bsd_uthread_pid_to_str): Constify.
9361         * corelow.c (core_pid_to_str): Constify.
9362         * darwin-nat.c (darwin_pid_to_str): Constify.
9363         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9364         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9365         Constify.
9366         * gnu-nat.c (gnu_pid_to_str): Constify.
9367         * go32-nat.c (go32_pid_to_str): Constify.
9368         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9369         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9370         * inferior.c (inferior_pid_to_str): Constify.
9371         * linux-nat.c (linux_nat_pid_to_str): Constify.
9372         * linux-tdep.c (linux_core_pid_to_str): Constify.
9373         * linux-thread-db.c (thread_db_pid_to_str)
9374         (thread_db_extra_thread_info): Constify.
9375         * nto-tdep.c (nto_extra_thread_info): Constify.
9376         * nto-tdep.h (nto_extra_thread_info): Constify.
9377         * obsd-nat.c (obsd_pid_to_str): Constify.
9378         * procfs.c (procfs_pid_to_str): Constify.
9379         * ravenscar-thread.c (ravenscar_extra_thread_info)
9380         (ravenscar_pid_to_str): Constify.
9381         * remote-sim.c (gdbsim_pid_to_str): Constify.
9382         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9383         Constify.
9384         * sol-thread.c (solaris_pid_to_str): Constify.
9385         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9386         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9387         * target.c (default_pid_to_str, target_pid_to_str)
9388         (normal_pid_to_str, default_pid_to_str): Constify.
9389         * target.h (target_ops::to_pid_to_str)
9390         (target_ops::to_extra_thread_info): Constify.
9391         (target_pid_to_str, normal_pid_to_str): Constify.
9392         * windows-nat.c (windows_pid_to_str): Constify.
9393         * gdbarch.sh (core_pid_to_str): Constify.
9394         * target-delegates.c: Regenerate.
9395         * gdbarch.h, gdbarch.c: Regenerate.
9396
9397 2017-04-05  Pedro Alves  <palves@redhat.com>
9398
9399         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9400         the memory of the temporary warning_pre_print override.
9401         * utils.c (warning_pre_print): Constify.
9402         * utils.h (warning_pre_print): Constify.
9403
9404 2017-04-05  Pedro Alves  <palves@redhat.com>
9405
9406         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9407         (shell_command): New function.
9408         (make_command): Use std::string.
9409         (init_cli_cmds): Register shell_command instead of shell_escape.
9410
9411 2017-04-05  Pedro Alves  <palves@redhat.com>
9412
9413         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9414         * tracepoint.c (default_collect): Don't initialize.
9415
9416 2017-04-05  Pedro Alves  <palves@redhat.com>
9417
9418         * macroexp.c (macro_buffer::shared): Now a bool.
9419         (init_buffer): Update.
9420         (init_shared_buffer): Constify 'addr' parameter.
9421         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9422         casts.
9423
9424 2017-04-05  Pedro Alves  <palves@redhat.com>
9425
9426         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9427         * disasm.c (set_disassembler_options): Constify local.
9428         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9429
9430 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9431
9432         PR gdb/21352
9433         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9434         option.
9435
9436 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9437
9438         * frame.c (frame_unwind_register_unsigned): Call
9439         frame_unwind_register_value.
9440
9441 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9442
9443         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9444         Use gdb_test_multiple, and don't match anchor.
9445
9446 2017-04-05  Pedro Alves  <palves@redhat.com>
9447
9448         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9449         (Write After Approval): Remove Simon Marchi.
9450
9451 2017-04-05  Pedro Alves  <palves@redhat.com>
9452
9453         * common/gdb_optional.h (optional::optional): Make constexpr and
9454         initialize m_dummy.
9455
9456 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9457
9458         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9459         (amd64fbsd_jmp_buf_reg_offset): Remove.
9460         (amd64fbsd_supply_uthread): Remove function.
9461         (amd64fbsd_collect_uthread): Remove function.
9462         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9463         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9464         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9465         (fbsd-nat.c): Update comment.
9466         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9467         (i386fbsd_jmp_buf_reg_offset): Remove.
9468         (i386fbsd_supply_uthread): Remove function.
9469         (i386fbsd_collect_uthread): Remove function.
9470         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9471
9472 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9473
9474         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9475         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9476         * NEWS: Mention that support for FreeBSD/alpha was removed.
9477         * alpha-fbsd-tdep.c: Delete file.
9478         * config/alpha/fbsd.mh: Delete file.
9479         * configure.host: Delete alpha*-*-freebsd* and
9480         alpha*-*-kfreebsd*-gnu.
9481         * configure.tgt: Delete alpha*-*-freebsd* and
9482         alpha*-*-kfreebsd*-gnu.
9483
9484 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9485
9486         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9487         amd64bsd_store_inferior_registers): Use ptid from regcache.
9488
9489 2017-04-04  Pedro Alves  <palves@redhat.com>
9490
9491         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9492         data fields, make them private and add "m_" prefixes.
9493         (lnp_state_machine::lnp_state_machine): New ctor.
9494         (record_line, check_line_address, handle_set_discriminator)
9495         (handle_set_address, handle_advance_pc, handle_special_opcode)
9496         (handle_advance_line, handle_set_file, handle_negate_stmt)
9497         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9498         (end_sequence, advance_line): New methods.
9499         (m_gdbarch, m_record_lines_p): New fields.
9500         (lnp_reader_state): Delete.
9501         (dwarf_record_line): Rename to ...
9502         (lnp_state_machine::record_line): ... adjust.
9503         (init_lnp_state_machine): Delete.
9504         (lnp_state_machine::lnp_state_machine): New.
9505         (check_line_address): Rename to ...
9506         (lnp_state_machine::check_line_address): This.
9507         (dwarf_decode_lines_1): Remove reference to "reader_state".
9508         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9509         State machine internal state manipulation moved to
9510         lnp_state_machine methods.
9511
9512 2017-04-04  Pedro Alves  <palves@redhat.com>
9513
9514         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9515         unittests/offset-type-selftests.c.
9516         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9517         * common/offset-type.h: New file.
9518         * common/preprocessor.h: New file.
9519         * common/traits.h: New file.
9520         * common/valid-expr.h: New file.
9521         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9522         sect_offset and cu_offset strong typedefs throughout.
9523         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9524         typedefs throughout.
9525         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9526         sect_offset and cu_offset strong typedefs throughout.
9527         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9528         typedefs throughout.
9529         * gdbtypes.h: Include "common/offset-type.h".
9530         (cu_offset): Now an offset type (strong typedef) instead of a
9531         struct.
9532         (sect_offset): Likewise.
9533         (union call_site_parameter_u): Rename "param_offset" field to
9534         "param_cu_off".
9535         * unittests/offset-type-selftests.c: New file.
9536
9537 2017-04-04  Pedro Alves  <palves@redhat.com>
9538
9539         * common/underlying.h: New file.
9540         * dwarf2read.c: Include "common/gdb_optional.h" and
9541         "common/underlying.h".
9542         (dir_index, file_name_index): New types.
9543         (file_entry): Use them.
9544         (file_entry::include): Use to_underlying.
9545         (line_header::add_file_name): Use dir_index.
9546         (read_formatted_entries): Use gdb::optional.  Read form before
9547         writting to file_entry.
9548         (dwarf_decode_line_header): Use dir_index.
9549         (lnp_state_machine::current_file): Use to_underlying.
9550         (lnp_state_machine::file): Change type to file_name_index.
9551         (dwarf_record_line): Use to_underlying.
9552         (init_lnp_state_machine): Use file_name_index.
9553         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9554
9555 2017-04-04  Pedro Alves  <palves@redhat.com>
9556
9557         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9558         operator bool, has_value and get methods.
9559
9560 2017-04-04  Pedro Alves  <palves@redhat.com>
9561
9562         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9563         fields.
9564         (line_header): Initialize all data fields.  Change type of
9565         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9566         Change type of include_dirs to std::vector<const char *>.  Remove
9567         num_include_dirs, include_dirs_size.  Change type of file_names to
9568         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9569         (line_header::line_header): New.
9570         (line_header::add_include_dir, line_header::add_file_name): New
9571         methods.
9572         (line_header::include_dir_at): Remove NULL check.
9573         (line_header::file_name_at): Add const overload.
9574         (line_header_up): New unique_ptr typedef.
9575         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9576         std::vector.  Remove free_line_header call.
9577         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9578         free_line_header call.
9579         (free_cu_line_header): Delete.
9580         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9581         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9582         Adjust to use std::vector.
9583         (free_line_header): Delete.
9584         (free_line_header_voidp): Use delete.
9585         (add_include_dir): Replace with ...
9586         (line_header::add_include_dir): ... this method.  Use std::vector.
9587         (add_file_name): Replace with ...
9588         (line_header::add_file_name): ... this method.  Use std::vector.
9589         (add_include_dir_stub): Delete.
9590         (read_formatted_entries): Remove memset.
9591         (dwarf_decode_line_header): Return a line_header_up instead of a
9592         raw pointer.  Remove cleanup handling.  Pass lambdas to
9593         read_formatted_entries.  Adjust to use line_header methods.
9594         (dwarf_decode_lines_1): Adjust to use line_header methods.
9595         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9596         use std::vector.
9597
9598 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9599
9600         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9601         instead of struct ptid.
9602
9603 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9604
9605         * frame.c (get_frame_register_bytes): Unwind using value.
9606         (put_frame_register_bytes): Likewise.
9607
9608 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9609
9610         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9611         aggregate-like.
9612
9613 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9614
9615         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9616
9617 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9618
9619         * gdbthread.h (struct thread_info): Declare constructor and
9620         destructor.  Add some in-class member initializers.
9621         * thread.c (free_thread): Remove.
9622         (init_thread_list): Call delete instead of free_thread.
9623         (new_thread): Call thread_info constructor.
9624         (thread_info::thread_info): New function.
9625         (thread_info::~thread_info): New function.
9626         (delete_thread_1): Call delete instead of free_thread.
9627         (make_cleanup_restore_current_thread): Move tp and frame to
9628         inner block.
9629
9630 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9631
9632         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9633         (arc_skip_prologue): Likewise.
9634         (arc_make_frame_cache): Likewise.
9635         (arc_pv_get_operand): New function.
9636         (arc_is_in_prologue): Likewise.
9637         (arc_analyze_prologue): Likewise.
9638         (arc_print_frame_cache): Likewise.
9639         (MAX_PROLOGUE_LENGTH): New constant.
9640
9641 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9642
9643         * configure.tgt: Add arc-insn.o.
9644         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9645         (dump_arc_instruction_command): New function.
9646         (arc_fprintf_disasm): Likewise.
9647         (arc_disassemble_info): Likewise.
9648         (arc_insn_get_operand_value): Likewise.
9649         (arc_insn_get_operand_value_signed): Likewise.
9650         (arc_insn_get_memory_base_reg): Likewise.
9651         (arc_insn_get_memory_offset): Likewise.
9652         (arc_insn_get_branch_target): Likewise.
9653         (arc_insn_dump): Likewise.
9654         (arc_insn_get_linear_next_pc): Likewise.
9655         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9656         (arc_disassemble_info): Likewise.
9657         (arc_insn_get_branch_target): Likewise.
9658         (arc_insn_get_linear_next_pc): Likewise.
9659         * NEWS: Mention new "maint print arc arc-instruction".
9660
9661 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9662
9663         * arc-tdep (maintenance_print_arc_list): New variable.
9664         (maintenance_print_arc_command): New function.
9665
9666 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9667
9668         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9669         Add "limm" and "reserved".
9670         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9671         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9672         * arc-tdep.h (arc_regnum): Likewise.
9673
9674 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9675
9676         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9677         for THREADPTR register.
9678         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9679         register.
9680         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9681         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9682         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9683
9684 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9685
9686         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9687         registers above gdbarch_num_regs (gdbarch) as privileged in
9688         call0 ABI.
9689
9690 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9691
9692         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9693         for a single specified register or for all registers in
9694         a0_base..a0_base + C0_NREGS range.
9695         (supply_gregset_reg): Call regcache_raw_supply for a single
9696         specified register or for all registers in a0_base..a0_base +
9697         C0_NREGS range.
9698
9699 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9700
9701         * arch/xtensa.h (C0_NREGS): Add definition.
9702         * xtensa-tdep.c (C0_NREGS): Remove definition.
9703
9704 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9705
9706         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9707         Drop xtensa_default_isa initialization.
9708         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9709
9710 2017-03-27  Pedro Alves  <palves@redhat.com>
9711
9712         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9713         (file_entry::include_dir): New method.
9714         (line_header::include_dir_at, line_header::file_name_at): New
9715         methods.
9716         (setup_type_unit_groups, setup_type_unit_groups)
9717         (psymtab_include_file_name): Simplify using the new methods.
9718         (lnp_state_machine) <the_line_header>: New field.
9719         <file>: Add comment.
9720         (lnp_state_machine::current_file): New method.
9721         (dwarf_record_line): Simplify using the new methods.
9722         (init_lnp_state_machine): Initialize the "the_line_header" field.
9723         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9724         Simplify using the new methods.
9725
9726 2017-03-27  Pedro Alves  <palves@redhat.com>
9727
9728         * cp-name-parser.y (make_empty): Delete.
9729         (demangler_special, nested_name, ptr_operator, array_indicator)
9730         (direct_declarator, declarator_1): Use fill_comp instead of
9731         make_empty.
9732
9733 2017-03-27  Pedro Alves  <palves@redhat.com>
9734
9735         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9736         to ATTRIBUTE_PRINTF.
9737         * solib-target.c (library_list_start_list): Print "string" not
9738         "version".
9739         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9740         gdb_xml_error call.
9741
9742 2017-03-27  Pedro Alves  <palves@redhat.com>
9743
9744         * dwarf2read.c (struct file_and_directory): New.
9745         (dwarf2_get_dwz_file): Adjust to use std::string.
9746         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9747         (find_file_and_directory): Adjust to return a file_and_directory
9748         object.
9749         (read_file_scope): Adjust to use file_and_directory.  Remove
9750         make_cleanup/do_cleanups calls.
9751         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9752         make_cleanup/do_cleanups calls.
9753         * python/python.c (do_start_initialization): Adjust to ldirname
9754         returning a std::string.
9755         * utils.c (ldirname): Now returns a std::string.
9756         * utils.h (ldirname): Change return type to std::string.
9757         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9758         returning a std::string.
9759         * xml-tdesc.c (file_read_description_xml): Likewise.
9760
9761 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9762
9763         * regcache.c (regcache_debug_print_register): New function.
9764         * regcache.h (regcache_debug_print_register): New declaration.
9765         * target.c (debug_print_register): Remove.
9766         (target_fetch_registers): Call regcache_debug_print_register.
9767         (target_store_registers): Likewise.
9768
9769 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9770
9771         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9772         reference beyond the 'lh->include_dirs' array before accessing to
9773         it.
9774         (psymtab_include_file_name): Likewise.
9775         (dwarf_decode_lines_1): Likewise.
9776         (dwarf_decode_lines): Likewise.
9777         (file_file_name): Likewise.
9778
9779 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9780
9781         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9782         inferior_ptid.
9783         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9784         ps_lsetfpregs): Likewise.
9785         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9786         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9787         ps_lsetfpregs): Likewise.
9788         * target.c (target_fetch_registers, target_store_registers):
9789         Remove asserts.
9790
9791 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9792
9793         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9794
9795 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9796
9797         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9798         (_initialize_aarch64_tdep): Register it.
9799         (aarch64_record_load_store): Handle PRFM instruction.
9800         (aarch64_process_record_test): New function.
9801
9802 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9803
9804         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9805         indentation.
9806
9807 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9808
9809         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9810
9811 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9812
9813         python/python.c (do_start_initialization): Fix memory leak.
9814
9815 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9816
9817         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9818         using get_ptrace_pid.
9819         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9820         inferior_ptid.
9821         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9822         inferior_ptid instead of pid.
9823
9824 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9825
9826         * aarch64-tdep.c: Wrap locally used classes in anonymous
9827         namespace.
9828         * arm-tdep.c: Likewise.
9829         * linespec.c: Likewise.
9830         * ui-out.c: Likewise.
9831
9832 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9833
9834         PR gdb/19637
9835         * python/lib/gdb/printer/bound_registers.py: Import sys.
9836
9837 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9838
9839         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9840         windows_thread_info parameter and use it instead of
9841         current_thread.
9842         (windows_fetch_inferior_registers): Don't set current_thread,
9843         pass the thread to do_windows_fetch_inferior_registers.  Use
9844         ptid from regcache instead of inferior_ptid.
9845         (do_windows_store_inferior_registers): Add windows_thread_info
9846         parameter and use it instead of current_thread.
9847         (windows_store_inferior_registers): Don't set current_thread,
9848         pass the thread to do_windows_store_inferior_registers.  Use
9849         ptid from regcache instead of inferior_ptid.
9850
9851 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9852
9853         * ser-mingw.c (ser_windows_raw): Remove reference to
9854         struct serial::current_timeout.
9855
9856 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9857
9858         PR tdep/20928
9859         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9860         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9861         (sparc64_fsr_type): Fix %fsr decoding.
9862
9863 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9864
9865         * python/py-record-btrace.c (btpy_insn_data): Change return type
9866         for Python 2.
9867
9868 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9869
9870         * spu-linux-nat.c (spu_fetch_inferior_registers,
9871         spu_store_inferior_registers): Use ptid from regcache, set and
9872         restore inferior_ptid.
9873         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9874         Likewise.
9875
9876 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9877
9878         * i386-linux-nat.c (fetch_register, store_register,
9879         i386_linux_fetch_inferior_registers,
9880         i386_linux_store_inferior_registers): Use ptid from regcache.
9881         * ia64-linux-nat.c (ia64_linux_fetch_register,
9882         ia64_linux_store_register): Likewise.
9883         * inf-ptrace.c (inf_ptrace_fetch_register,
9884         inf_ptrace_store_register): Likewise.
9885         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9886         m32r_linux_store_inferior_registers): Likewise.
9887         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9888         m68kbsd_store_inferior_registers): Likewise.
9889         * m68k-linux-nat.c (fetch_register, store_register,
9890         m68k_linux_fetch_inferior_registers,
9891         m68k_linux_store_inferior_registers): Likewise.
9892         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9893         m88kbsd_store_inferior_registers): Likewise.
9894         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9895         mips_fbsd_store_inferior_registers): Likewise.
9896         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9897         mips64_linux_regsets_store_registers): Likewise.
9898         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9899         mipsnbsd_store_inferior_registers): Likewise.
9900         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9901         mips64obsd_store_inferior_registers): Likewise.
9902         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9903         Likewise.
9904         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9905         ppcfbsd_store_inferior_registers): Likewise.
9906         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9907         ppc_linux_store_inferior_registers): Likewise.
9908         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9909         ppcnbsd_store_inferior_registers): Likewise.
9910         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9911         ppcobsd_store_registers): Likewise.
9912         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9913         Likewise.
9914         * ravenscar-thread.c (ravenscar_fetch_registers,
9915         ravenscar_store_registers, ravenscar_prepare_to_store):
9916         Likewise.
9917         * record-btrace.c (record_btrace_fetch_registers,
9918         record_btrace_store_registers, record_btrace_prepare_to_store):
9919         Likewise.
9920         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9921         Lookup inferior using ptid from regcache, instead of
9922         current_inferior.
9923         * remote.c (remote_fetch_registers, remote_store_registers): Use
9924         ptid from regcache.
9925         * rs6000-nat.c (fetch_register, store_register): Likewise.
9926         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9927         s390_linux_store_inferior_registers): Likewise.
9928         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9929         shnbsd_store_inferior_registers): Likewise.
9930         * sol-thread.c (sol_thread_fetch_registers,
9931         sol_thread_store_registers): Likewise.
9932         * sparc-nat.c (sparc_fetch_inferior_registers,
9933         sparc_store_inferior_registers): Likewise.
9934         * tilegx-linux-nat.c (fetch_inferior_registers,
9935         store_inferior_registers): Likewise.
9936         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9937         vaxbsd_store_inferior_registers): Likewise.
9938         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9939         store_xtregs): Likewise.
9940
9941 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9942
9943         PR gdb/14441
9944         * NEWS: Mention support for rvalue references in GDB and python.
9945         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9946         supports both lvalue and rvalue references.
9947
9948 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9949
9950         PR gdb/14441
9951         * gdbtypes.c (rank_one_type): Implement overloading
9952         resolution rules regarding rvalue references.
9953
9954 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9955
9956         PR gdb/14441
9957         * aarch64-tdep.c (aarch64_type_align)
9958         (aarch64_extract_return_value, aarch64_store_return_value): Change
9959         lvalue reference type checks to general reference type checks.
9960         * amd64-tdep.c (amd64_classify): Likewise.
9961         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9962         Likewise.
9963         * arm-tdep.c (arm_type_align, arm_extract_return_value)
9964         (arm_store_return_value): Likewise.
9965         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9966         * c-typeprint.c (c_print_type): Likewise.
9967         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9968         (cplus_number_of_children, cplus_describe_child): Likewise.
9969         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9970         * completer.c (expression_completer): Likewise.
9971         * cp-support.c (make_symbol_overload_list_adl_namespace):
9972         Likewise.
9973         * darwin-nat-info.c (info_mach_region_command): Likewise.
9974         * dwarf2loc.c (entry_data_value_coerce_ref)
9975         (value_of_dwarf_reg_entry): Likewise.
9976         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9977         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9978         Likewise.
9979         * findvar.c (extract_typed_address, store_typed_address):
9980         Likewise.
9981         * gdbtypes.c (rank_one_type): Likewise.
9982         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9983         * infcall.c (value_arg_coerce): Likewise.
9984         * language.c (pointer_type): Likewise.
9985         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9986         Likewise.
9987         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9988         * mn10300-tdep.c (mn10300_type_align): Likewise.
9989         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9990         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9991         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9992         Likewise.
9993         * printcmd.c (print_formatted, x_command): Likewise.
9994         * python/py-type.c (typy_get_composite, typy_template_argument):
9995         Likewise.
9996         * python/py-value.c (valpy_referenced_value)
9997         (valpy_get_dynamic_type, value_has_field): Likewise.
9998         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9999         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10000         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10001         * spu-tdep.c (spu_scalar_value_p): Likewise.
10002         * symtab.c (lookup_symbol_aux): Likewise.
10003         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10004         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10005         Likewise.
10006         * valops.c (value_cast_pointers, value_cast)
10007         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10008         (value_struct_elt, value_struct_elt_bitpos)
10009         (value_find_oload_method_list, find_overload_match)
10010         (value_rtti_indirect_type): Likewise.
10011         * valprint.c (val_print_scalar_type_p, generic_val_print):
10012         Likewise.
10013         * value.c (value_actual_type, value_as_address, unpack_long)
10014         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10015         (coerce_ref): Likewise.
10016         * varobj.c (varobj_get_value_type): Likewise.
10017
10018 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10019
10020         PR gdb/14441
10021         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10022         table of constants.
10023         * python/lib/gdb/command/explore.py: Support exploring values
10024         of rvalue reference types.
10025         * python/lib/gdb/types.py: Implement get_basic_type() for
10026         rvalue reference types.
10027         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10028         constant.
10029         * python/py-value.c (valpy_getitem): Add an rvalue reference
10030         check.
10031         (valpy_reference_value): Add new parameter "refcode".
10032         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10033         New wrappers for valpy_reference_value().
10034         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10035         (gdbpy_invoke_xmethod): Likewise.
10036
10037 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10038
10039         PR gdb/14441
10040         * dwarf2read.c (process_die, read_type_die_1): Handle the
10041         DW_TAG_rvalue_reference_type DIE.
10042         (read_tag_reference_type): Add new parameter "refcode".
10043
10044 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10045
10046         PR gdb/14441
10047         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10048         (c_type_print_modifier, c_type_print_varspec_suffix)
10049         (c_type_print_base): Support printing rvalue reference types.
10050         * c-valprint.c (c_val_print, c_value_print): Support printing
10051         rvalue reference values.
10052
10053 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10054
10055         PR gdb/14441
10056         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10057         typename.
10058         * cp-support.c (replace_typedefs): Handle
10059         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10060         * python/py-type.c (typy_lookup_type): Likewise.
10061
10062 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10063
10064         PR gdb/14441
10065         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10066         * parse.c (insert_type): Change assert statement.
10067         (follow_types): Handle rvalue reference types.
10068         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10069         constant.
10070
10071 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10072
10073         PR gdb/14441
10074         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10075         value_ref() interface.
10076         * c-valprint.c (c_value_print): Likewise.
10077         * infcall.c (value_arg_coerce): Likewise.
10078         * python/py-value.c (valpy_reference_value): Likewise.
10079         * valops.c (value_cast, value_reinterpret_cast)
10080         (value_dynamic_cast, typecmp): Likewise.
10081         (value_ref): Parameterize by kind of return value reference type.
10082         * value.h (value_ref): Add new parameter "refcode".
10083
10084 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10085
10086         PR gdb/14441
10087         * dwarf2read.c (read_tag_reference_type): Use
10088         lookup_lvalue_reference_type() instead of lookup_reference_type().
10089         * eval.c (evaluate_subexp_standard): Likewise.
10090         * f-exp.y: Likewise.
10091         * gdbtypes.c (make_reference_type, lookup_reference_type):
10092         Generalize with rvalue reference types.
10093         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10094         convenience wrappers for lookup_reference_type().
10095         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10096         reference kind parameter.
10097         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10098         wrappers for lookup_reference_type().
10099         * guile/scm-type.c (gdbscm_type_reference): Use
10100         lookup_lvalue_reference_type() instead of lookup_reference_type().
10101         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10102         * parse.c (follow_types): Likewise.
10103         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10104         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10105         Likewise.
10106         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10107         (gdbpy_invoke_xmethod): Likewise.
10108         * stabsread.c: Provide extra argument to make_reference_type()
10109         call.
10110         * valops.c (value_ref, value_rtti_indirect_type): Use
10111         lookup_lvalue_reference_type() instead of lookup_reference_type().
10112
10113 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10114
10115         PR gdb/14441
10116         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10117         (TYPE_IS_REFERENCE): New macro.
10118         (struct type): Add rvalue_reference_type field.
10119         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10120
10121 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10122
10123         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10124         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10125         New function definition.
10126         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10127         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10128         New function declaration.
10129         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10130         * mi/mi-interp.h: New file.
10131         * solib.c (info_sharedlibrary_command): Replace for loop with
10132         ALL_SO_LIBS macro
10133         * solib.h (update_solib_list): New function declaration.
10134         (so_list_head): Move macro.
10135         * solist.h (ALL_SO_LIBS): New macro.
10136
10137 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10138
10139         * infcmd.c (post_create_inferior): Remove unused argument in
10140         call to solib_add.
10141         * remote.c (remote_start_remote): Likewise.
10142         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10143         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10144         (enable_break): Likewise.
10145         * solib.c (update_solib_list): Remove unused target argument
10146         and its documentation.
10147         (solib_add): Remove unused target argument.  Remove unused
10148         argument in call to update_solib_list.
10149         (info_sharedlibrary_command): Remove unused argument in call
10150         to update_solib_list.
10151         (sharedlibrary_command): Remove unused argument in call to
10152         solib_add.
10153         (handle_solib_event): Likewise.
10154         (reload_shared_libraries): Likewise.
10155         * solib.h (solib_add): Remove unused target argument.
10156
10157 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10158
10159         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10160         (s390_displaced_step_fixup): Cover relative branches with the
10161         default fixup handling.  This fixes lack of support for some
10162         relative branch instructions.
10163
10164 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10165
10166         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10167         ptid from regcache.
10168
10169 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10170
10171         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10172         i386_darwin_store_inferior_registers): Use ptid from regcache.
10173
10174 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10175
10176         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10177         i386bsd_store_inferior_registers): Use ptid from regcache.
10178
10179 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10180
10181         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10182         hppaobsd_store_registers): Use ptid from regcache.
10183
10184 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10185
10186         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10187         hppanbsd_store_registers): Use ptid from regcache.
10188
10189 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10190
10191         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10192         from regcache.  Use get_ptrace_pid.
10193
10194 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10195
10196         * corelow.c (get_core_register_section): Use ptid from regcache,
10197         update doc.
10198
10199 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10200
10201         * bsd-uthread.c (bsd_uthread_fetch_registers,
10202         bsd_uthread_store_registers): Use ptid from regcache, set and
10203         restore inferior_ptid.
10204
10205 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10206
10207         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10208         fetch_fp_regs, store_register, store_regs, store_fp_register,
10209         store_fp_regs): Use ptid from regcache.
10210
10211 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10212
10213         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10214         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10215         store_vfp_regs): Use ptid from regcache.
10216
10217 2017-03-17  Pedro Alves  <palves@redhat.com>
10218
10219         PR remote/21188
10220         * ser-base.c (ser_base_wait_for): Add comment.
10221         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10222         version.
10223         * ser-unix.c (hardwire_raw): Remove reference to
10224         scb->current_timeout.
10225         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10226         (hardwire_ops): Install ser_base_readchar instead of
10227         hardwire_readchar.
10228         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10229         Remove fields.
10230
10231 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10232
10233         PR gdb/19637
10234         * python/lib/gdb/printer/bound_registers.py: Add support for
10235         Python 3.
10236
10237 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10238
10239         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10240         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10241         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10242         byte_offset to subobj_byte_offset.  Fix the handling of
10243         DWARF_VALUE_STACK on big-endian targets when coming via an
10244         implicit pointer.
10245         (dwarf2_evaluate_loc_desc): Adjust call to
10246         dwarf2_evaluate_loc_desc_full.
10247         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10248         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10249
10250 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10251
10252         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10253         and REVSH instructions.
10254
10255 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10256
10257         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10258         (arm_record_test): Declare.
10259         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10260         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10261         align with the manual.
10262         (thumb_record_misc): Adjust the code order to align with the
10263         manual.
10264         (thumb2_record_decode_insn_handler): Fix instruction matching.
10265         (instruction_reader_thumb): New class.
10266         (arm_record_test): New function.
10267
10268 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10269
10270         * arm-tdep.c (abstract_memory_reader): New class.
10271         (instruction_reader): New class.
10272         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10273         (decode_insn): Likewise.
10274
10275 2017-03-16  Doug Evans  <dje@google.com>
10276
10277         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10278         member.  Change type of TYPE member to SCM.  All uses updated.
10279         (lsscm_make_lazy_string_smob): Add assert.
10280         (lsscm_make_lazy_string): Flag bad length values.
10281         (lsscm_elt_type): New function.
10282         (gdbscm_lazy_string_to_value): Rewrite to use
10283         lsscm_safe_lazy_string_to_value.
10284         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10285         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10286         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10287         in incoming type.
10288         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10289         * guile/scm-type.c (tyscm_scm_to_type): New function.
10290
10291 2017-03-15  Doug Evans  <dje@google.com>
10292
10293         PR python/17728, python/18439, python/18779
10294         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10295         member.  Change type of TYPE member to PyObject *.  All uses updated.
10296         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10297         (gdbpy_create_lazy_string_object): Flag bad length values.
10298         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10299         Handle typedefs in incoming type.
10300         (stpy_lazy_string_elt_type): New function.
10301         (gdbpy_extract_lazy_string): Call it.
10302         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10303         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10304         typedefs in incoming type.
10305
10306 2017-03-16  Doug Evans  <dje@google.com>
10307
10308         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10309         * guile/scm-type.c (tyscm_scm_to_type): New function.
10310
10311 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10312
10313         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10314         "ULONGEST" for "skip".
10315
10316 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10317
10318         PR gdb/21220
10319         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10320         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10321         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10322         over ptrace peek/poke until end of buffer or error.
10323
10324 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10325
10326         * parse.c (length_of_subexp): Make static.
10327         * parser-defs.h (length_of_subexp): Remove.
10328
10329 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10330
10331         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10332         as well.
10333
10334 2017-03-14  Pedro Alves  <palves@redhat.com>
10335
10336         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10337         (main): Use std::unique_ptr.  Remove calls to
10338         cp_demangled_name_parse_free.
10339
10340 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10341
10342         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10343         alphabsd_store_inferior_registers): Use regcache->ptid instead
10344         of inferior_ptid.
10345
10346 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10347
10348         * aix-thread.c (aix_thread_fetch_registers,
10349         aix_thread_store_registers): Use regcache->ptid instead of
10350         inferior_ptid.
10351
10352 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10353
10354         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10355         store_gregs_to_thread, fetch_fpregs_from_thread,
10356         store_fpregs_to_thread): Use regcache->ptid instead of
10357         inferior_ptid.
10358
10359 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10360
10361         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10362         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10363         instead of inferior_ptid.
10364
10365 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10366
10367         * target.c (target_fetch_registers, target_store_registers): Add
10368         assert.
10369
10370 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10371
10372         * regcache.h (regcache_get_ptid): New function.
10373         * regcache.c (regcache_get_ptid): New function.
10374
10375 2017-03-13  Mark Wielaard  <mark@klomp.org>
10376
10377         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10378
10379 2017-03-10  Keith Seitz  <keiths@redhat.com>
10380
10381         PR c++/8218
10382         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10383
10384 2017-03-08  Pedro Alves  <palves@redhat.com>
10385
10386         PR gdb/18360
10387         * infrun.c (start_step_over, do_target_resume, resume)
10388         (restart_threads): Assert we're not resuming a thread that is
10389         meant to be stopped.
10390         (infrun_thread_stop_requested_callback): Delete.
10391         (infrun_thread_stop_requested): If the thread is internally
10392         stopped, queue a pending stop event and clear the thread's
10393         inline-frame state.
10394         (handle_stop_requested): New function.
10395         (handle_syscall_event, handle_inferior_event_1): Use
10396         handle_stop_requested.
10397         (handle_stop_requested): New function.
10398         (handle_signal_stop): Set the thread's stop_signal here instead of
10399         at caller.
10400         (finish_step_over): Clear step over info unconditionally.
10401         (handle_signal_stop): If the user had interrupted the event
10402         thread, consider the stop a random signal.
10403         (handle_signal_stop) <signal arrived while stepping over
10404         breakpoint>: Don't restart threads here.
10405         (stop_waiting): Don't clear step-over info here.
10406
10407 2017-03-08  Pedro Alves  <palves@redhat.com>
10408
10409         PR 21206
10410         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10411         goes to argument 2, not 1.
10412
10413 2017-03-08  Pedro Alves  <palves@redhat.com>
10414
10415         PR cli/21218
10416         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10417         display_gdb_prompt.
10418         (command_line_input): Add comment.
10419
10420 2017-03-08  Pedro Alves  <palves@redhat.com>
10421
10422         PR tui/21216
10423         * tui/tui-file.c (tui_file::write): New.
10424         * tui/tui-file.h (tui_file): Override "write".
10425         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10426         factored out from ...
10427         (tui_puts): ... here.
10428         (tui_putc): Use them.
10429         (tui_write): New function.
10430         * tui/tui-io.h (tui_write): Declare.
10431
10432 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10433
10434         * Makefile.in (SFILES): Replace "environ.c" with
10435         "common/environ.c".
10436         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10437         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10438         to...
10439         * common/environ.c: ... here.
10440         * environ.h: Moved to...
10441         * common/environ.h: ... here.
10442
10443 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10444
10445         * gdbarch.sh (pstring_ptr): New static function.
10446         (gdbarch_disassembler_options): Use it.
10447         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10448         not valid_disassembler_option->name.
10449         * gdbarch.c: Regenerate.
10450
10451 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10452
10453         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10454
10455 2017-03-07  Pedro Alves  <palves@redhat.com>
10456
10457         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10458
10459 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10460
10461         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10462         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10463         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10464         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10465
10466 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10467
10468         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10469
10470 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10471
10472         * remote.c (remote_add_target_side_commands): Use range-based
10473         for loop.
10474
10475 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10476
10477         PR gdb/21165
10478         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10479         value is lazy.
10480         * valprint.c (common_val_print): Likewise.
10481
10482 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10483
10484         * NEWS: Mention new set/show disassembler-options commands.
10485         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10486         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10487         (prospective_options): New static variable.
10488         (gdb_disassembler::gdb_disassembler): Initialize
10489         m_di.disassembler_options.
10490         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10491         (get_disassembler_options): New function.
10492         (set_disassembler_options): Likewise.
10493         (set_disassembler_options_sfunc): Likewise.
10494         (show_disassembler_options_sfunc): Likewise.
10495         (disassembler_options_completer): Likewise.
10496         (_initialize_disasm): Likewise.
10497         * disasm.h (get_disassembler_options): New prototype.
10498         (set_disassembler_options): Likewise.
10499         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10500         (gdbarch_verify_disassembler_options): Likewise.
10501         * gdbarch.c: Regenerate.
10502         * gdbarch.h: Likewise.
10503         * arm-tdep.c (num_disassembly_options): Delete.
10504         (set_disassembly_style): Likewise.
10505         (arm_disassembler_options): New static variable.
10506         (set_disassembly_style_sfunc): Convert short style name into long
10507         option name.  Call set_disassembler_options.
10508         (show_disassembly_style_sfunc): New function.
10509         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10510         set_gdbarch_verify_disassembler_options.
10511         (_initialize_arm_tdep): Delete regnames variable and update callers.
10512         (arm_disassembler_options): Initialize.
10513         (disasm_options): New variable.
10514         (num_disassembly_options): Rename from this...
10515         (num_disassembly_styles): ...to this.  Compute by scanning through
10516         disasm_options.
10517         (valid_disassembly_styles): Initialize using disasm_options.
10518         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10519         set_arm_regname_option.
10520         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10521         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10522         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10523         set_gdbarch_verify_disassembler_options.
10524         * s390-tdep.c (s390_disassembler_options): New static variable.
10525         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10526         set_gdbarch_verify_disassembler_options.
10527
10528 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10529
10530         * remote.c (remote_add_target_side_condition): Remove "struct"
10531         keyword from range-based for loop.
10532
10533 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10534
10535         * remote.c (remote_add_target_side_condition): Use range-based
10536         for loop.  Update comment.
10537
10538 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10539
10540         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10541
10542 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10543
10544         * regcache.c (regcache_raw_update): New function.
10545         (regcache_raw_read): Move code to regcache_raw_update.
10546         * regcache.h (regcache_raw_update): New declaration.
10547         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10548
10549 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10550
10551         * dwarf2read.c (create_debug_type_hash_table): Initialize
10552         header.signature and header.type_offset_in_tu.
10553
10554 2017-02-24  Pedro Alves  <palves@redhat.com>
10555
10556         * symtab.c (make_file_symbol_completion_list_1): Use
10557         add_symtab_completions.
10558
10559 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10560
10561         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10562
10563 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10564
10565         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10566         I386_MAX_REGISTER_SIZE.
10567         (i386_pseudo_register_write): Likewise.
10568         (i386_process_record): Likewise.
10569         * i387-tdep.c (i387_supply_xsave): Likewise.
10570         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10571         (store_register): Likewise.
10572
10573 2017-02-23  Pedro Alves  <palves@redhat.com>
10574
10575         * ada-lang.c: Include "common/function-view.h".
10576         (ada_iterate_over_symbols): Adjust to use function_view as
10577         callback type.
10578         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10579         (ada_make_symbol_completion_list): Use a lambda.
10580         (ada_exc_search_name_matches): Delete.
10581         (name_matches_regex): New.
10582         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10583         * compile/compile-c-support.c: Include "common/function-view.h".
10584         (print_one_macro): Change prototype to accept a ui_file pointer.
10585         (write_macro_definitions): Use a lambda.
10586         * dwarf2read.c: Include "common/function-view.h".
10587         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10588         (dw2_expand_symtabs_matching): Adjust to use function_view as
10589         callback type.
10590         * language.h: Include "common/function-view.h".
10591         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10592         function_view as callback type.
10593         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10594         * linespec.c: Include "common/function-view.h".
10595         (collect_info::add_symbol): New method.
10596         (struct symbol_and_data_callback, iterate_inline_only, struct
10597         symbol_matcher_data, iterate_name_matcher): Delete.
10598         (iterate_over_all_matching_symtabs): Adjust to use function_view
10599         as callback type and lambdas.
10600         (iterate_over_file_blocks): Adjust to use function_view as
10601         callback type.
10602         (decode_compound_collector): Now a class with private fields.
10603         (decode_compound_collector::release_symbols): New method.
10604         (collect_one_symbol): Rename to...
10605         (decode_compound_collector::operator()): ... this and adjust.
10606         (lookup_prefix_sym): decode_compound_collector construction bits
10607         move to decode_compound_collector ctor.  Pass the
10608         decode_compound_collector object directly as callback.  Remove
10609         cleanups and use decode_compound_collector::release_symbols
10610         instead.
10611         (symtab_collector): Now a class with private fields.
10612         (symtab_collector::release_symtabs): New method.
10613         (add_symtabs_to_list): Rename to...
10614         (symtab_collector::operator()): ... this and adjust.
10615         (collect_symtabs_from_filename): symtab_collector construction
10616         bits move to symtab_collector ctor.  Pass the symtab_collector
10617         object directly as callback.  Remove cleanups and use
10618         symtab_collector::release_symtabs instead.
10619         (collect_symbols): Delete.
10620         (add_matching_symbols_to_info): Use lambdas.
10621         * macrocmd.c (print_macro_callback): Delete.
10622         (info_macro_command): Use a lambda.
10623         (info_macros_command): Pass print_macro_definition as callable
10624         directly.
10625         (print_one_macro): Remove 'ignore' parameter.
10626         (macro_list_command): Adjust.
10627         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10628         (macro_for_each_data::user_data): Delete field.
10629         (foreach_macro): Adjust to call the function_view.
10630         (macro_for_each): Adjust to use function_view as callback type.
10631         (foreach_macro_in_scope): Adjust to call the function_view.
10632         (macro_for_each_in_scope): Adjust to use function_view as callback
10633         type.
10634         * macrotab.h: Include "common/function-view.h".
10635         (macro_callback_fn): Declare a prototype instead of a pointer.
10636         Remove "user_data" parameter.
10637         (macro_for_each, macro_for_each_in_scope): Adjust to use
10638         function_view as callback type.
10639         * psymtab.c (partial_map_expand_apply)
10640         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10641         Adjust to use function_view as callback type and to return bool.
10642         (psym_expand_symtabs_matching): Adjust to use function_view as
10643         callback types.
10644         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10645         to use function_view as callback type and to return bool.
10646         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10647         callback types.
10648         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10649         as callback types.
10650         * symfile.h: Include "common/function-view.h".
10651         (expand_symtabs_file_matcher_ftype)
10652         (expand_symtabs_symbol_matcher_ftype)
10653         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10654         return bool.
10655         (quick_symbol_functions::map_symtabs_matching_filename)
10656         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10657         function_view as callback type and return bool.
10658         (expand_symtabs_matching): Adjust to use function_view as callback
10659         type.
10660         (maintenance_expand_name_matcher)
10661         (maintenance_expand_file_matcher): Delete.
10662         (maintenance_expand_symtabs): Use lambdas.
10663         * symtab.c (iterate_over_some_symtabs): Adjust to use
10664         function_view as callback types and return bool.
10665         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10666         of a cleanup.
10667         (lookup_symtab_callback): Delete.
10668         (lookup_symtab): Use a lambda.
10669         (iterate_over_symbols): Adjust to use function_view as callback
10670         type.
10671         (struct search_symbols_data, search_symbols_file_matches)
10672         (search_symbols_name_matches): Delete.
10673         (search_symbols): Use a pair of lambdas.
10674         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10675         (symtab_expansion_callback): Delete.
10676         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10677         * symtab.h: Include "common/function-view.h".
10678         (iterate_over_some_symtabs): Adjust to use function_view as
10679         callback type and return bool.
10680         (iterate_over_symtabs): Adjust to use function_view as callback
10681         type.
10682         (symbol_found_callback_ftype): Remove 'data' parameter and return
10683         bool.
10684         (iterate_over_symbols): Adjust to use function_view as callback
10685         type.
10686
10687 2017-02-23  Pedro Alves  <palves@redhat.com>
10688
10689         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10690         (%.o) <unittests/%.c>: New pattern.
10691         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10692         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10693         * common/function-view.h: New file.
10694         * unittests/function-view-selftests.c: New file.
10695         * configure: Regenerate.
10696
10697 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10698
10699         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10700         inferior_ptid.
10701         * go32-nat.c (go32_thread_alive): Likewise.
10702
10703 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10704
10705         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10706         delete.
10707
10708 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10709
10710         * varobj.c (varobj_clear_saved_item): Use delete instead of
10711         xfree.
10712         (update_dynamic_varobj_children): Likewise.
10713
10714 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10715
10716         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10717
10718 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10719
10720         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10721         m_enum_value to 0 in default constructor.
10722
10723 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10724
10725         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10726         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10727         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10728         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10729         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10730         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10731         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10732         IS_STORE_CONDITIONAL_INSN.
10733
10734 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10735
10736         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10737
10738 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10739
10740         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10741
10742 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10743
10744         * dwarf2read.c (skip_one_die, read_attribute_value)
10745         (dwarf2_const_value_attr, dump_die_shallow)
10746         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10747         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10748
10749 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10750
10751         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10752         (dwarf_parse_macro_header): Accept DWARF version 5.
10753         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10754
10755 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10756
10757         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10758         DW_AT_GNU_*.
10759         * common/common-exceptions.h (enum errors): Likewise.
10760         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10761         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10762         (dwarf_expr_context::execute_stack_op): Likewise.
10763         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10764         Likewise.
10765         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10766         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10767         (show_entry_values_debug, call_site_to_target_addr)
10768         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10769         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10770         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10771         (value_of_dwarf_block_entry, indirect_pieced_value)
10772         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10773         (disassemble_dwarf_expression): Likewise.
10774         * dwarf2read.c (process_die, inherit_abstract_dies)
10775         (read_call_site_scope): Likewise.
10776         * gdbtypes.h (struct func_type, struct call_site_parameter)
10777         (struct call_site): Likewise.
10778         * stack.c (read_frame_arg): Likewise.
10779         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10780
10781 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10782
10783         * defs.h (read_unsigned_leb128): New declaration.
10784         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10785         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10786         (dwarf2_find_location_expression): Call also
10787         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10788         * dwarf2loc.h (dwarf2_version): New declaration.
10789         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10790         rnglists.
10791         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10792         .debug_rnglists.
10793         (struct dwop_section_names): Add loclists_dwo.
10794         (dwop_section_names): Add .debug_loclists.dwo.
10795         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10796         (struct dwarf2_per_cu_data): Add dwarf_version.
10797         (struct dwo_sections): Add loclists.
10798         (struct attr_abbrev): Add implicit_const.
10799         (read_indirect_line_string): New declaration.
10800         (read_unsigned_leb128): Delete declaration.
10801         (rcuh_kind): New definition.
10802         (read_and_check_comp_unit_head): Change parameter
10803         is_debug_types_section to section_kind.
10804         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10805         (read_comp_unit_head): Change parameter abfd to section, add parameter
10806         section_kind.  Handle DWARF-5.
10807         (error_check_comp_unit_head): Accept also DWARF version 5.
10808         (read_and_check_comp_unit_head): Change parameter
10809         is_debug_types_section to section_kind.
10810         (read_and_check_type_unit_head): Delete function.
10811         (read_abbrev_offset): Handle DWARF-5.
10812         (create_debug_type_hash_table): Add parameter section_kind.  Process
10813         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10814         comp_unit_head.
10815         (create_debug_types_hash_table): Update create_debug_type_hash_table
10816         caller.
10817         (create_all_type_units): Call create_debug_type_hash_table.
10818         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10819         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10820         caller.
10821         (skip_one_die): Handle DW_FORM_implicit_const.
10822         (dwarf2_rnglists_process): New function.
10823         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10824         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10825         (read_attribute_value): Handle DW_FORM_implicit_const,
10826         DW_FORM_line_strp.
10827         (read_attribute): Handle DW_FORM_implicit_const.
10828         (read_indirect_string_at_offset_from): New function from
10829         read_indirect_string_at_offset.
10830         (read_indirect_string_at_offset): Call
10831         read_indirect_string_at_offset_from.
10832         (read_indirect_line_string_at_offset): New function.
10833         (read_indirect_string): New function comment.
10834         (read_indirect_line_string): New function.
10835         (read_unsigned_leb128): Make it global.
10836         (dwarf2_string_attr): Handle DWARF-5.
10837         (add_include_dir_stub, read_formatted_entries): New functions.
10838         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10839         Handle DWARF-5.
10840         (per_cu_header_read_in): Update read_comp_unit_head caller.
10841         (dwarf2_version): New function.
10842         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10843         rnglists.
10844         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10845         fields.
10846
10847 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10848
10849         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10850
10851 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10852
10853         * dwarf2read.c (dwarf2_ranges_process): New function from
10854         dwarf2_ranges_read.
10855         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10856         dwarf2_ranges_process.
10857
10858 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10859
10860         * dwarf2read.c (create_debug_type_hash_table): New function from
10861         create_debug_types_hash_table.
10862         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10863         (create_all_type_units, open_and_init_dwo_file): Update
10864         create_debug_types_hash_table callers.
10865
10866 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10867
10868         PR gdb/16188
10869         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10870         refer to 'ap', not 'args'.
10871
10872 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10873             Pedro Alves  <palves@redhat.com>
10874
10875         PR gdb/16188
10876         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10877         calls succeeded.
10878         * fork-child.c (trace_start_error): New function.
10879         (trace_start_error_with_name): Likewise.
10880         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10881         * inf-ptrace.c (inf_ptrace_me): Likewise.
10882         * inferior.h (trace_start_error): New prototype.
10883         (trace_start_error_with_name): Likewise.
10884
10885 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10886
10887         PR gdb/21164
10888         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10889         NULL before using it.
10890         * symmisc.c (maintenance_print_symbols): Likewise.
10891         (maintenance_print_msymbols): Likewise.
10892
10893 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10894
10895         * NEWS: Add record Python bindings entry.
10896
10897 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10898
10899         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10900         py-record-full.o.
10901         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10902         * python/py-record-btrace.c, python/py-record-btrace.h,
10903         python/py-record-full.c, python/py-record-full.h: New file.
10904         * python/py-record.c: Add include for py-record-btrace.h and
10905         py-record-full.h.
10906         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10907         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10908         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10909         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10910         New definition.
10911         (gdbpy_initialize_btrace): New export.
10912         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10913
10914 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10915
10916         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10917         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10918         * python/py-record.c: New file.
10919         * python/python-internal.h (gdbpy_start_recording,
10920         gdbpy_current_recording, gdpy_stop_recording,
10921         gdbpy_initialize_record): New export.
10922         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10923         (python_GdbMethods): Add gdbpy_start_recording,
10924         gdbpy_current_recording and gdbpy_stop_recording.
10925
10926 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10927
10928         * record-btrace.c (record_btrace_record_method): New function.
10929         (init_record_btrace_ops): Initialize to_record_method.
10930         * record-full.c (record_full_record_method): New function.
10931         (init_record_full_ops, init_record_full_core_ops): Add
10932         record_full_record_method.
10933         * record.h (enum record_method): New enum.
10934         * target-debug.h (target_debug_print_enum_record_method: New define.
10935         * target-delegates.c: Regenerate.
10936         * target.c (target_record_method): New function.
10937         * target.h: Include record.h.
10938         (struct target_ops) <to_record_method>: New field.
10939         (target_record_method): New export.
10940
10941 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10942
10943         * record.h (record_start, record_stop): New export.
10944         * record.c (record_start, record_stop): New function.
10945
10946 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10947
10948         * btrace.c (btrace_fetch): Copy function call segments pointer
10949         into a vector.
10950         (btrace_clear): Clear the vector.
10951         (btrace_find_insn_by_number): Use binary search to find the correct
10952         function call segment.
10953         * btrace.h (brace_fun_p): New typedef.
10954         (struct btrace_thread_info) <functions>: New field.
10955
10956 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10957
10958         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10959         * btrace.c (btrace_decode_error): ... here.  New function.
10960         * btrace.h (btrace_decode_error): New export.
10961
10962 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10963
10964         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10965         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10966         btrace_find_insn_by_number): Remove special case for gaps.
10967         * btrace.h (btrace_insn_get_error): New export.
10968         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10969         * record-btrace.c (btrace_insn_history): Print number for gaps.
10970         (record_btrace_info, record_btrace_goto): Handle gaps.
10971
10972 2017-02-14  Tom Tromey  <tom@tromey.com>
10973
10974         PR python/13598:
10975         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10976         event.
10977         * python/py-evts.c (gdbpy_initialize_py_events): Add
10978         before_prompt registry.
10979         * python/py-events.h (events_object) <before_prompt>: New field.
10980
10981 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
10982
10983         * btrace.c (ftrace_new_switch): Preserve up link and flags.
10984
10985 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
10986
10987         * symfile (_initialize_symfile): Add usage text to the load command's
10988         help text.
10989
10990 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
10991
10992         * utils.c (defaulted_query): Don't query on secondary UIs.
10993
10994 2017-02-10  Tom Tromey  <tom@tromey.com>
10995
10996         * rust-lang.c (rust_get_disr_info): Remove unused variable.
10997
10998 2017-02-10  Tom Tromey  <tom@tromey.com>
10999
11000         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11001         "cleanup" local.
11002         * python/py-type.c (typy_legacy_template_argument): Remove
11003         unnecessary "cleanup" local.
11004
11005 2017-02-10  Tom Tromey  <tom@tromey.com>
11006
11007         * python/python.c (do_start_initialization): New function, from
11008         _initialize_python.
11009         (_initialize_python): Call do_start_initialization.
11010         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11011         goto.
11012
11013 2017-02-10  Tom Tromey  <tom@tromey.com>
11014
11015         * python/py-prettyprint.c (pretty_print_one_value): Use
11016         gdbpy_ref.
11017
11018 2017-02-10  Tom Tromey  <tom@tromey.com>
11019
11020         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11021         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11022         gdbpy_ref.
11023         * python/py-type.c (field_new): Use gdbpy_ref.
11024         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11025         gdbpy_ref.
11026         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11027         (py_free_pspace): Likewise.
11028         (pspace_to_pspace_object): Likewise.
11029         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11030         (py_free_objfile): Likewise.
11031         (objfile_to_objfile_object): Likewise.
11032         * python/py-inferior.c (delete_thread_object): Use
11033         gdbpy_ref.
11034         (infpy_read_memory): Likewise.
11035         (py_free_inferior): Likewise.
11036         * python/py-evtregistry.c (create_eventregistry_object): Use
11037         gdbpy_ref.
11038         * python/py-event.c (create_event_object): Use gdbpy_ref.
11039
11040 2017-02-10  Tom Tromey  <tom@tromey.com>
11041
11042         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11043         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11044         used.
11045         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11046         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11047         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11048         python/py-framefilter.c, python/py-function.c,
11049         python/py-inferior.c, python/py-infevents.c,
11050         python/py-linetable.c, python/py-newobjfileevent.c,
11051         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11052         python/py-signalevent.c, python/py-stopevent.c,
11053         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11054         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11055         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11056         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11057
11058 2017-02-10  Tom Tromey  <tom@tromey.com>
11059
11060         * ui-out.h (ui_out_emit_type): New class.
11061         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11062         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11063         and ui_out_emit_tuple.
11064         (enumerate_locals): Likewise.
11065         (py_mi_print_variables, py_print_locals, py_print_args): Use
11066         ui_out_emit_list.
11067         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11068         ui_out_emit_list.
11069         * common/gdb_optional.h: New file.
11070
11071 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11072
11073         * MAINTAINERS (Write After Approval): Update my e-mail address.
11074
11075 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11076
11077         PR gdb/21122
11078         * breakpoint.c (_initialize_breakpoint): Update the help description
11079         of the 'commands' command to indicate that it takes a list argument.
11080
11081 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11082
11083         * interps.c (current_interp_set_logging): Remove "return".
11084
11085 2017-02-09  Gary Benson  <gbenson@redhat.com>
11086
11087         * symtab.c (add_symtab_completions): Prevent NULL pointer
11088         dereference.
11089
11090 2017-02-08  Pedro Alves  <palves@redhat.com>
11091
11092         * interps.c (interp::interp): Remove reference to quiet_p.
11093         (interp_set): Make static.  Remove dead "Switching to" output
11094         code.
11095         (interp_quiet_p, interp_set_quiet): Delete.
11096         (interpreter_exec_cmd): Don't set the interpreter quiet.
11097         * interps.h (interp_quiet_p): Make static.
11098         (class interp) <quiet_p>: Remove field
11099
11100 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11101
11102         * cli/cli-decode.c (find_command_name_length): Make it extern.
11103         * cli/cli-decode.h (find_command_name_length): Declare.
11104         * cli/cli-script.c (command_name_equals, line_first_arg):
11105         New functions.
11106         (process_next_line): Use cli-decode to parse command names.
11107         (build_command_line): Make args a constant pointer.
11108
11109 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11110
11111         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11112         Remove case-insensitive search.
11113
11114 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11115
11116         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11117         at the end of the line.  Avoids an ARI warning.
11118
11119 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11120
11121         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11122         rdseed instructions.
11123         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11124
11125 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11126
11127         PR tdep/20936
11128         Provide and use sparc32 and sparc64 target description XML files.
11129         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11130         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11131         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11132         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11133         * features/sparc/sparc32-solaris.xml: New file.
11134         * features/sparc/sparc64-solaris.xml: New file.
11135         * features/sparc/sparc32-solaris.c: Generated.
11136         * features/sparc/sparc64-solaris.c: Generated.
11137         * sparc-tdep.h: Account for differences in target descriptions.
11138         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11139         (sparc32_register_type): Use target provided registers.
11140         (validate_tdesc_registers): New function.
11141         (sparc32_gdbarch_init): Use tdesc_has_registers.
11142         Set pseudoregister functions.
11143         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11144         (sparc64_register_type): Use target provided registers.
11145         (sparc64_init_abi): Set pseudoregister functions.
11146
11147 2017-02-03  Tom Tromey  <tom@tromey.com>
11148
11149         PR rust/21097:
11150         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11151         with a single member.
11152
11153 2017-02-03  Pedro Alves  <palves@redhat.com>
11154
11155         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11156         (cli_interp_base::~cli_interp_base): New.
11157         (cli_interp): New struct.
11158         (as_cli_interp): Cast the interp itself to cli_interp.
11159         (cli_interpreter_pre_command_loop): Rename to ...
11160         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11161         parameter.
11162         (cli_interpreter_init): Rename to ...
11163         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11164         boolean.  Make extern.
11165         (cli_interpreter_resume): Rename to ...
11166         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11167         extern.
11168         (cli_interpreter_suspend): Rename to ...
11169         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11170         extern.
11171         (cli_interpreter_exec): Rename to ...
11172         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11173         extern.
11174         (cli_interpreter_supports_command_editing): Rename to ...
11175         (cli_interp_base::supports_command_editing): ... this.  Remove
11176         'interp' parameter.  Make extern.
11177         (cli_ui_out): Rename to ...
11178         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11179         Make extern.
11180         (cli_set_logging): Rename to ...
11181         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11182         parameter.  Make extern.
11183         (cli_interp_procs): Delete.
11184         (cli_interp_factory): Adjust to use "new".
11185         * cli/cli-interp.h: Include "interps.h".
11186         (struct cli_interp_base): New struct.
11187         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11188         (interp_new): Delete.
11189         (interp::interp, interp::~interp): New.
11190         (interp_set): Use bool, and return void.  Assume the interpreter
11191         has suspend, init and resume methods, and that the all return
11192         void.
11193         (set_top_level_interpreter): interp_set returns void.
11194         (interp_ui_out): Adapt.
11195         (current_interp_set_logging): Adapt.
11196         (interp_data): Delete.
11197         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11198         (interp_exec): Adapt.
11199         (top_level_interpreter_data): Delete.
11200         * interps.h (interp_init_ftype, interp_resume_ftype)
11201         (interp_suspend_ftype, interp_exec_ftype)
11202         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11203         (class interp): New.
11204         (interp_new): Delete.
11205         (interp_set): Now returns void.  Use bool.
11206         (interp_data, top_level_interpreter_data): Delete.
11207         * mi/mi-common.h: Include interps.h.
11208         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11209         init, resume, suspect, exec, interp_ui_out, set_logging and
11210         pre_command_loop methods.
11211         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11212         (mi_interpreter_init): Rename to ...
11213         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11214         bool, return void and make extern.  Adjust.
11215         (mi_interpreter_resume): ... Rename to ...
11216         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11217         return void and make extern.  Adjust.
11218         (mi_interpreter_suspend): ... Rename to ...
11219         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11220         return void and make extern.  Adjust.
11221         (mi_interpreter_exec): ... Rename to ...
11222         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11223         extern.  Adjust.
11224         (mi_interpreter_pre_command_loop): ... Rename to ...
11225         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11226         parameter and make extern.
11227         (mi_on_normal_stop_1): Adjust.
11228         (mi_ui_out): Rename to ...
11229         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11230         parameter and make extern.  Adjust.
11231         (mi_set_logging): Rename to ...
11232         (mi_interp::set_logging): ... this.  Remove the 'interp'
11233         parameter and make extern.  Adjust.
11234         (mi_interp_procs): Delete.
11235         (mi_interp_factory): Adjust to use 'new'.
11236         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11237         (mi_print_exception, mi_execute_command, mi_load_progress):
11238         Adjust.
11239         * tui/tui-interp.c (tui_interp): New class.
11240         (as_tui_interp): Return a tui_interp pointer.
11241         (tui_on_normal_stop, tui_on_signal_received)
11242         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11243         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11244         to use interp::interp_ui_out.
11245         (tui_init): Rename to ...
11246         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11247         bool, return void and make extern.  Adjust.
11248         (tui_resume): Rename to ...
11249         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11250         return void and make extern.  Adjust.
11251         (tui_suspend): Rename to ...
11252         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11253         return void and make extern.  Adjust.
11254         (tui_ui_out): Rename to ...
11255         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11256         parameter, and make extern.  Adjust.
11257         (tui_exec): Rename to ...
11258         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11259         make extern.
11260         (tui_interp_procs): Delete.
11261         (tui_interp_factory): Use "new".
11262
11263 2017-02-02  Tom Tromey  <tom@tromey.com>
11264
11265         * rust-exp.y (ends_raw_string, space_then_number)
11266         (rust_identifier_start_p): Return bool.
11267         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11268         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11269         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11270         (rust_chartype_p): Return bool.
11271         (val_print_struct, rust_print_struct_def, rust_print_type):
11272         Update.
11273         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11274         Return bool.
11275
11276 2017-02-02  Tom Tromey  <tom@tromey.com>
11277
11278         * rust-lang.c: Reindent.
11279
11280 2017-02-02  Tom Tromey  <tom@tromey.com>
11281
11282         * rust-lang.h (rust_crate_for_block): Update.
11283         * rust-lang.c (rust_crate_for_block): Return std::string.
11284         (rust_get_disr_info): Use std:;string, not
11285         gdb::unique_xmalloc_ptr.
11286         * rust-exp.y (crate_name): Update.
11287
11288 2017-02-02  Pedro Alves  <palves@redhat.com>
11289
11290         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11291         field out of gdb_disassembler_test and make it static.
11292
11293 2017-02-02  Pedro Alves  <palves@redhat.com>
11294
11295         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11296         mi1_interp and mi_interp fields.
11297
11298 2017-02-02  Pedro Alves  <palves@redhat.com>
11299
11300         * cli/cli-interp.c (struct saved_output_files, saved_output):
11301         Moved from cli/cli-logging.c.
11302         (cli_set_logging): New function.
11303         (cli_interp_procs): Install cli_set_logging.
11304         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11305         Declare.
11306         * cli/cli-logging.c (struct saved_output_files, saved_output):
11307         Moved to cli/cli-interp.c.
11308         (pop_output_files): Don't save outputs here.
11309         (make_logging_output): New function.
11310         (handle_redirections): Don't build tee nor save previous outputs
11311         here.
11312         * interps.c (current_interp_set_logging): Change prototype.
11313         Assume there's always a set_logging_proc method installed.
11314         * interps.h (interp_set_logging_ftype): Change prototype.
11315         (current_interp_set_logging): Change prototype and adjust comment.
11316         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11317         use make_logging_output.
11318         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11319 2017-02-02  Pedro Alves  <palves@redhat.com>
11320
11321         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11322         from ...
11323         (set_logging_overwrite): ... here.
11324         (logging_no_redirect_file): Delete.
11325         (set_logging_redirect): Don't handle redirection on the fly.
11326         Instead warn that "logging off" / "logging on" is necessary.
11327         (pop_output_files): Delete references to logging_no_redirect_file.
11328         (show_logging_command): Always speak in terms of what will happen
11329         once logging is reenabled.
11330
11331 2017-02-02  Pedro Alves  <palves@redhat.com>
11332
11333         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11334
11335 2017-02-02  Pedro Alves  <palves@redhat.com>
11336
11337         * disasm.c (gdb_pretty_print_insn): Rename to ...
11338         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11339         Remove gdbarch parameter.  Adapt to clear the object's buffers
11340         instead of allocating new buffers, and to print using the object's
11341         gdb_disassembler instead of calling gdb_print_insn.
11342         (dump_insns): Use gdb_pretty_print_disassembler.
11343         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11344         (gdb_pretty_print_disassembler): New class.
11345         * record-btrace.c (btrace_insn_history): Use
11346         gdb_pretty_print_disassembler.
11347
11348 2017-02-02  Pedro Alves  <palves@redhat.com>
11349
11350         * ada-lang.c (type_as_string): Use string_file.
11351         * ada-valprint.c (ada_print_floating): Use string_file.
11352         * ada-varobj.c (ada_varobj_scalar_image)
11353         (ada_varobj_get_value_image): Use string_file.
11354         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11355         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11356         * breakpoint.c (update_inserted_breakpoint_locations)
11357         (insert_breakpoint_locations, reattach_breakpoints)
11358         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11359         (print_it_watchpoint): Use string_file.
11360         (save_breakpoints): Use stdio_file.
11361         * c-exp.y (oper): Use string_file.
11362         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11363         tee_file.
11364         (pop_output_files): Use delete.
11365         (handle_redirections): Use stdio_file and tee_file.
11366         * cli/cli-setshow.c (do_show_command): Use string_file.
11367         * compile/compile-c-support.c (c_compute_program): Use
11368         string_file.
11369         * compile/compile-c-symbols.c (generate_vla_size): Take a
11370         'string_file &' instead of a 'ui_file *'.
11371         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11372         of a 'ui_file *'.  Use string_file.
11373         (generate_c_for_variable_locations): Take a 'string_file &'
11374         instead of a 'ui_file *'.
11375         * compile/compile-internal.h (generate_c_for_for_one_variable):
11376         Take a 'string_file &' instead of a 'ui_file *'.
11377         * compile/compile-loc2c.c (push, pushf, unary, binary)
11378         (print_label, pushf_register_address, pushf_register)
11379         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11380         'ui_file *'.  Adjust.
11381         * compile/compile.c (compile_to_object): Use string_file.
11382         * compile/compile.h (compile_dwarf_expr_to_c)
11383         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11384         'ui_file *'.
11385         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11386         (replace_typedefs_qualified_name): Use string_file and
11387         obstack_copy0.
11388         * disasm.c (gdb_pretty_print_insn): Use string_file.
11389         (gdb_disassembly): Adjust reference the null_stream global.
11390         (do_ui_file_delete): Delete.
11391         (gdb_insn_length): Use null_stream.
11392         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11393         * dwarf2loc.c (dwarf2_compile_property_to_c)
11394         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11395         'string_file &' instead of a 'ui_file *'.
11396         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11397         * dwarf2read.c (do_ui_file_peek_last): Delete.
11398         (dwarf2_compute_name): Use string_file.
11399         * event-top.c (gdb_setup_readline): Use stdio_file.
11400         * gdbarch.sh (verify_gdbarch): Use string_file.
11401         * gdbtypes.c (safe_parse_type): Use null_stream.
11402         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11403         string_file.
11404         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11405         'string_file *' instead of a 'ui_file *'.
11406         (gdbscm_arch_disassemble): Use string_file.
11407         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11408         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11409         inherits from ui_file.
11410         (ioscm_file_port_delete, ioscm_file_port_rewind)
11411         (ioscm_file_port_put): Delete.
11412         (ioscm_file_port_write): Rename to ...
11413         (ioscm_file_port::write): ... this.  Remove file_port_magic
11414         checks.
11415         (ioscm_file_port_new): Delete.
11416         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11417         ui_file_up.
11418         * guile/scm-type.c (tyscm_type_name): Use string_file.
11419         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11420         Use string_file.
11421         * infcmd.c (print_return_value_1): Use string_file.
11422         * infrun.c (print_target_wait_results): Use string_file.
11423         * language.c (add_language): Use string_file.
11424         * location.c (explicit_to_string_internal): Use string_file.
11425         * main.c (captured_main_1): Use null_file.
11426         * maint.c (maintenance_print_architecture): Use stdio_file.
11427         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11428         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11429         event_channel>: Change type to mi_console_file pointer.
11430         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11431         (mi_console_file_delete): Delete.
11432         (struct mi_console_file): Delete.
11433         (mi_console_file_magic): Delete.
11434         (mi_console_file_new): Delete.
11435         (mi_console_file::mi_console_file): New.
11436         (mi_console_file_delete): Delete.
11437         (mi_console_file_fputs): Delete.
11438         (mi_console_file::write): New.
11439         (mi_console_raw_packet): Delete.
11440         (mi_console_file::flush): New.
11441         (mi_console_file_flush): Delete.
11442         (mi_console_set_raw): Rename to ...
11443         (mi_console_file::set_raw): ... this.
11444         * mi/mi-console.h (class mi_console_file): New class.
11445         (mi_console_file_new, mi_console_set_raw): Delete.
11446         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11447         (mi_set_logging): Use delete and tee_file.  Adjust.
11448         * mi/mi-main.c (output_register): Use string_file.
11449         (mi_cmd_data_evaluate_expression): Use string_file.
11450         (mi_cmd_data_read_memory): Use string_file.
11451         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11452         * mi/mi-out.c (mi_ui_out::main_stream): New.
11453         (mi_ui_out::rewind): Use main_stream and
11454         string_file.
11455         (mi_ui_out::put): Use main_stream and string_file.
11456         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11457         Allocate a 'string_file' instead.
11458         (mi_out_new): Don't allocate a mem_fileopen stream here.
11459         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11460         (mi_ui_out::main_stream): Declare method.
11461         * printcmd.c (eval_command): Use string_file.
11462         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11463         * python/py-arch.c (archpy_disassemble): Use string_file.
11464         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11465         * python/py-frame.c (frapy_str): Use string_file.
11466         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11467         Use string_file.
11468         * python/py-type.c (typy_str): Use string_file.
11469         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11470         * python/py-value.c (valpy_str): Use string_file.
11471         * record-btrace.c (btrace_insn_history): Use string_file.
11472         * regcache.c (regcache_print): Use stdio_file.
11473         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11474         * remote.c (escape_buffer): Use string_file.
11475         * rust-lang.c (rust_get_disr_info): Use string_file.
11476         * serial.c (serial_open_ops_1): Use stdio_file.
11477         (do_serial_close): Use delete.
11478         * stack.c (print_frame_arg): Use string_file.
11479         (print_frame_args): Remove local mem_fileopen stream, not used.
11480         (print_frame): Use string_file.
11481         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11482         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11483         Take a 'string_file *' instead of a 'ui_file *'.
11484         * top.c (new_ui): Use stdio_file and stderr_file.
11485         (free_ui): Use delete.
11486         (execute_command_to_string): Use string_file.
11487         (quit_confirm): Use string_file.
11488         * tracepoint.c (collection_list::append_exp): Use string_file.
11489         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11490         * tui/tui-file.c: Don't include "ui-file.h".
11491         (enum streamtype, struct tui_stream): Delete.
11492         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11493         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11494         (tui_file::tui_file): New method.
11495         (tui_file_fputs): Delete.
11496         (tui_file_get_strbuf): Delete.
11497         (tui_file::puts): New method.
11498         (tui_file_adjust_strbuf): Delete.
11499         (tui_file_flush): Delete.
11500         (tui_file::flush): New method.
11501         * tui/tui-file.h: Tweak intro comment.
11502         Include ui-file.h.
11503         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11504         (tui_file_adjust_strbuf): Delete declarations.
11505         (class tui_file): New class.
11506         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11507         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11508         (tui_register_format): Use string_stream.
11509         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11510         (tui_get_function_from_frame): Use string_file.
11511         * typeprint.c (type_to_string): Use string_file.
11512         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11513         (null_stream): New global.
11514         (ui_file_delete): Delete.
11515         (ui_file::ui_file): New.
11516         (null_file_isatty): Delete.
11517         (ui_file::~ui_file): New.
11518         (null_file_rewind): Delete.
11519         (ui_file::printf): New.
11520         (null_file_put): Delete.
11521         (null_file_flush): Delete.
11522         (ui_file::putstr): New.
11523         (null_file_write): Delete.
11524         (ui_file::putstrn): New.
11525         (null_file_read): Delete.
11526         (ui_file::putc): New.
11527         (null_file_fputs): Delete.
11528         (null_file_write_async_safe): Delete.
11529         (ui_file::vprintf): New.
11530         (null_file_delete): Delete.
11531         (null_file::write): New.
11532         (null_file_fseek): Delete.
11533         (null_file::puts): New.
11534         (ui_file_data): Delete.
11535         (null_file::write_async_safe): New.
11536         (gdb_flush, ui_file_isatty): Adjust.
11537         (ui_file_put, ui_file_rewind): Delete.
11538         (ui_file_write): Adjust.
11539         (ui_file_write_for_put): Delete.
11540         (ui_file_write_async_safe, ui_file_read): Adjust.
11541         (ui_file_fseek): Delete.
11542         (fputs_unfiltered): Adjust.
11543         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11544         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11545         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11546         (set_ui_file_data): Delete.
11547         (string_file::~string_file, string_file::write)
11548         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11549         (do_ui_file_as_string, ui_file_as_string): Delete.
11550         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11551         (struct mem_file): Delete.
11552         (mem_file_new): Delete.
11553         (stdio_file::stdio_file): New.
11554         (mem_file_delete): Delete.
11555         (stdio_file::stdio_file): New.
11556         (mem_fileopen): Delete.
11557         (stdio_file::~stdio_file): New.
11558         (mem_file_rewind): Delete.
11559         (stdio_file::set_stream): New.
11560         (mem_file_put): Delete.
11561         (stdio_file::open): New.
11562         (mem_file_write): Delete.
11563         (stdio_file_magic, struct stdio_file): Delete.
11564         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11565         (stdio_file::flush): New.
11566         (stdio_file_read): Rename to ...
11567         (stdio_file::read): ... this.  Adjust.
11568         (stdio_file_write): Rename to ...
11569         (stdio_file::write): ... this.  Adjust.
11570         (stdio_file_write_async_safe): Rename to ...
11571         (stdio_file::write_async_safe) ... this.  Adjust.
11572         (stdio_file_fputs): Rename to ...
11573         (stdio_file::puts) ... this.  Adjust.
11574         (stdio_file_isatty): Delete.
11575         (stdio_file_fseek): Delete.
11576         (stdio_file::isatty): New.
11577         (stderr_file_write): Rename to ...
11578         (stderr_file::write) ... this.  Adjust.
11579         (stderr_file_fputs): Rename to ...
11580         (stderr_file::puts) ... this.  Adjust.
11581         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11582         (stderr_file::stderr_file): New.
11583         (tee_file_magic): Delete.
11584         (struct tee_file): Delete.
11585         (tee_file::tee_file): New.
11586         (tee_file_new): Delete.
11587         (tee_file::~tee_file): New.
11588         (tee_file_delete): Delete.
11589         (tee_file_flush): Rename to ...
11590         (tee_file::flush): ... this.  Adjust.
11591         (tee_file_write): Rename to ...
11592         (tee_file::write): ... this.  Adjust.
11593         (tee_file::write_async_safe): New.
11594         (tee_file_fputs): Rename to ...
11595         (tee_file::puts): ... this.  Adjust.
11596         (tee_file_isatty): Rename to ...
11597         (tee_file::isatty): ... this.  Adjust.
11598         * ui-file.h (struct obstack, struct ui_file): Don't
11599         forward-declare.
11600         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11601         (ui_file_write_ftype)
11602         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11603         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11604         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11605         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11606         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11607         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11608         (set_ui_file_fseek): Delete.
11609         (ui_file_data, ui_file_delete, ui_file_rewind)
11610         (struct ui_file): New.
11611         (ui_file_up): New.
11612         (class null_file): New.
11613         (null_stream): Declare.
11614         (ui_file_write_for_put, ui_file_put): Delete.
11615         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11616         Delete.
11617         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11618         (gdb_fopen, tee_file_new): Delete.
11619         (struct string_file): New.
11620         (struct stdio_file): New.
11621         (stdio_file_up): New.
11622         (struct stderr_file): New.
11623         (class tee_file): New.
11624         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11625         of a 'ui_file *'.  Adjust.
11626         * ui-out.h (class ui_out) <field_stream>: Likewise.
11627         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11628         (null_stream): Delete.
11629         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11630         Adjust.
11631         * utils.h (struct ui_file): Delete forward declaration..
11632         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11633         (error_stream): Take a 'string_file &' instead of a
11634         'ui_file *'.
11635         * varobj.c (varobj_value_get_print_value): Use string_file.
11636         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11637         * gdbarch.c: Regenerate.
11638
11639 2017-02-02  Pedro Alves  <palves@redhat.com>
11640
11641         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11642         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11643         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11644         Adjust to call gdb_print_insn instead of
11645         gdb_disassembler::print_insn.
11646         (dump_insns, do_mixed_source_and_assembly_deprecated)
11647         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11648         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11649         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11650         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11651         declaration.
11652         (gdb_pretty_print_insn): Re-add declaration.
11653         * record-btrace.c (btrace_insn_history): Don't allocate a
11654         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11655
11656 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11657
11658         * disasm.h (gdb_disassembly): Remove file_string parameter.
11659         * disasm.c (gdb_disassembly): Likewise.
11660         * cli/cli-cmds.c (print_disassembly): Adapt.
11661         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11662         * stack.c (do_gdb_disassembly): Likewise.
11663
11664 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11665
11666         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11667         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11668         targets.  And if the implicit value is longer than needed, extract
11669         the first bytes instead of the "least significant" ones.
11670
11671 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11672
11673         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11674         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11675         (btrace_fetch): Assert can_access_registers_ptid.
11676         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11677         validate_registers_access.
11678
11679 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11680
11681         * gdbthread.h (can_access_registers_ptid): New.
11682         * thread.c (can_access_registers_ptid): New.
11683
11684 2017-02-01  Pedro Alves  <palves@redhat.com>
11685
11686         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11687
11688 2017-01-31  Pedro Alves  <palves@redhat.com>
11689
11690         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11691         Fix typos.
11692
11693 2017-01-31  Pedro Alves  <palves@redhat.com>
11694
11695         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11696         not used.
11697
11698 2017-01-31  Pedro Alves  <palves@redhat.com>
11699
11700         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11701
11702 2017-01-31  Pedro Alves  <palves@redhat.com>
11703
11704         * common/scoped_restore.h
11705         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11706         change the value's parameter type to T2.
11707         (make_scoped_restore): Likewise.
11708
11709 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11710             Richard Henderson  <rth@redhat.com>
11711
11712         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11713         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11714         GS_BASE for older kernels.
11715         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11716         GS_BASE for older kernels.
11717         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11718         and GS_BASE to the offset table.
11719         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11720         system register group.
11721         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11722         for older kernels.
11723         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11724         amd64 ABI.
11725         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11726         AMD64_GSBASE_REGNUM.
11727         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11728         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11729         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11730         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11731         i386/64bit-segments.xml in those rules.
11732         * features/i386/64bit-segments.xml: New file.
11733         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11734         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11735         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11736         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11737         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11738         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11739         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11740         * features/i386/amd64-avx-linux.c: Regenerated.
11741         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11742         * features/i386/amd64-avx-mpx.c: Regenerated.
11743         * features/i386/amd64-avx512-linux.c: Regenerated.
11744         * features/i386/amd64-linux.c: Regenerated.
11745         * features/i386/amd64-mpx-linux.c: Regenerated.
11746         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11747         * features/i386/i386-avx-mpx.c: Regenerated.
11748         * features/i386/x32-avx-linux.c: Regenerated.
11749         * features/i386/x32-avx512-linux.c: Regenerated.
11750         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11751         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11752         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11753         * regformats/i386/amd64-linux.dat: Regenerated.
11754         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11755         * regformats/i386/x32-avx-linux.dat: Regenerated.
11756         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11757         * regformats/i386/x32-linux.dat: Regenerated.
11758
11759 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11760
11761         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11762         Set to AMD64_NUM_REGS.
11763
11764 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11765
11766         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11767         that checks validity of a register number.
11768
11769 2017-01-27  Kees Cook  <keescook@google.com>
11770
11771         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11772         fetch_fpregs if target has fpa registers.
11773         (arm_linux_store_inferior_registers): Call store_fpregs if target
11774         has fpa registers.
11775
11776 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11777
11778         * cris-tdep.c (cris_gdbarch_init): Remove check for
11779         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11780
11781 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11782
11783         * corelow.c (get_core_register_section): Check for regset
11784         existence before checking for REGSET_VARIABLE_SIZE.
11785
11786 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11787             Pedro Alves  <palves@redhat.com>
11788
11789         PR gdb/20939
11790         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11791         call memory_error, save memaddr instead.
11792         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11793         negative, cal memory_error.
11794         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11795
11796 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11797
11798         * disasm-selftests.c (memory_error_test): New function.
11799         (_initialize_disasm_selftests): Register memory_error_test.
11800
11801 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11802
11803         * Makefile.in (SFILES): Add disasm-selftests.c and
11804         selftest-arch.c.
11805         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11806         * disasm-selftests.c: New file.
11807         * selftest-arch.c: New file.
11808         * selftest-arch.h: New file.
11809
11810 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11811
11812         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11813         to bfd_arch_mep.  Don't return 0 if section is not
11814         found.  Call print_insn_mep.
11815
11816 2017-01-26  Pedro Alves  <palves@redhat.com>
11817             Yao Qi  <yao.qi@linaro.org>
11818
11819         * arm-tdep.c: Include "disasm.h".
11820         (gdb_print_insn_arm): Update code to get gdbarch.
11821         * disasm.c (dis_asm_read_memory): Change it to
11822         gdb_disassembler::dis_asm_read_memory.
11823         (dis_asm_memory_error): Likewise.
11824         (dis_asm_print_address): Likewise.
11825         (gdb_pretty_print_insn): Change it to
11826         gdb_disassembler::pretty_print_insn.
11827         (dump_insns): Add one argument gdb_disassemlber.  All
11828         callers updated.
11829         (do_mixed_source_and_assembly_deprecated): Likewise.
11830         (do_mixed_source_and_assembly): Likewise.
11831         (do_assembly_only): Likewise.
11832         (gdb_disassembler::gdb_disassembler): New.
11833         (gdb_disassembler::print_insn): New.
11834         * disasm.h (class gdb_disassembler): New.
11835         (gdb_pretty_print_insn): Remove declaration.
11836         (gdb_disassemble_info): Likewise.
11837         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11838         (gdbscm_disasm_read_memory_worker): Update.
11839         (gdbscm_disasm_read_memory): Update.
11840         (gdbscm_disasm_memory_error): Remove.
11841         (gdbscm_disasm_print_address): Remove.
11842         (gdbscm_disassembler::gdbscm_disassembler): New.
11843         (gdbscm_print_insn_from_port): Update.
11844         * mips-tdep.c: Include disasm.h.
11845         (gdb_print_insn_mips): Update code to get gdbarch.
11846         * record-btrace.c (btrace_insn_history): Update.
11847         * spu-tdep.c: Include disasm.h.
11848         (struct spu_dis_asm_data): Remove.
11849         (struct spu_dis_asm_info): New.
11850         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11851         SPU id.
11852         (gdb_print_insn_spu): Cast disassemble_info to
11853         spu_dis_asm_info.
11854
11855 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11856
11857         * disasm.c (do_ui_file_delete): Delete.
11858         (gdb_insn_length): Move code creating stream to ...
11859         * utils.c (null_stream): ... here.  New function.
11860         * utils.h (null_stream): Declare.
11861
11862 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11863
11864         * python/py-inferior.c (find_thread_object): Return directly
11865         from the loop.  Remove "found" variable.
11866
11867 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11868
11869         GDB 7.12.1 released.
11870
11871 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11872
11873         * python/py-function.c (fnpy_call): Reorder declarations to have
11874         the gdbpy_enter object declared first.
11875         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11876
11877 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11878
11879         PR python/21068
11880         * python/python-internal.h (PyMem_RawMalloc): Define for
11881         Python < 3.4.
11882         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11883         PyMem_RawMalloc instead of PyMem_Malloc.
11884
11885 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11886             Luis Machado  <lgustavo@codesourcery.com>
11887
11888         * NEWS (New commands): Mention flash-erase.
11889         (New MI commands): Mention target-flash-erase.
11890         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11891         command.
11892         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11893         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11894         * target.c (flash_erase_command): New function.
11895         (initialize_targets): Add new flash-erase command.
11896         * target.h (flash_erase_command): New declaration.
11897
11898 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11899
11900         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11901         HAVE_SYS_PROCFS_H is defined.
11902
11903 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11904
11905         * remote.c (struct cached_reg): Change data into a pointer.
11906         * (stop_reply_dtr): Free data pointers before deleting vector.
11907         (process_stop_reply): Likewise.
11908         (remote_parse_stop_reply): Allocate space for data
11909
11910 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11911
11912         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11913         MAX_REGISTER_SIZE.
11914         (amd64_pseudo_register_read_value): Likewise.
11915         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11916         (store_register_using_P): Likewise.
11917         * regcache.c (regcache_xfer_part): Likewise.
11918
11919 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11920
11921         Split real and pseudo registers.
11922         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11923         (sparc32_pseudo_regnum): New enum.
11924         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11925         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11926         (SPARC32_CP0_REGISTERS): New macro.
11927         (sparc32_pseudo_register_name): New function.
11928         (sparc32_register_name): Use sparc32_pseudo_register_name.
11929         (sparc32_pseudo_register_type): New function.
11930         (sparc32_register_type): Use sparc32_pseudo_register_type.
11931         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11932         pseudo register numbers.
11933         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11934         (SPARC64_CP0_REGISTERS): New macro.
11935         (sparc64_pseudo_register_name): New function.
11936         (sparc64_register_name): Use sparc64_pseudo_register_name.
11937         (sparc64_pseudo_register_type): New function.
11938         (sparc64_register_type): Use sparc64_pseudo_register_type.
11939         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11940         pseudo register numbers.
11941         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11942         sparc64_store_arguments): Handle pseudo register numbers.
11943
11944 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11945
11946         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11947         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11948         output.
11949         (getpkt_or_notif_sane_1): Likewise.
11950
11951 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11952
11953         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11954         of CC.  Pass "-x c++-header" instead of "-x c".
11955
11956 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11957
11958         * remote.c (remote_can_async_p): Update comment.
11959
11960 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11961
11962         * linux-nat.c (linux_nat_can_async_p): Update comment.
11963
11964 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11965
11966         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11967
11968 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
11969
11970         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11971
11972 2017-01-10  Tom Tromey  <tom@tromey.com>
11973
11974         * python/py-type.c (typy_legacy_template_argument): Update.
11975         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11976         ~demangle_parse_info): Declare new members.
11977         (cp_demangled_name_to_comp): Return unique_ptr.
11978         (cp_demangled_name_parse_free)
11979         (make_cleanup_cp_demangled_name_parse_free)
11980         (cp_new_demangle_parse_info): Remove.
11981         * cp-support.c (do_demangled_name_parse_free_cleanup)
11982         (make_cleanup_cp_demangled_name_parse_free): Remove.
11983         (inspect_type, cp_canonicalize_string_full)
11984         (cp_canonicalize_string): Update.
11985         (mangled_name_to_comp): Change return type.
11986         (cp_class_name_from_physname, method_name_from_physname)
11987         (cp_func_name, cp_remove_params): Update.
11988         * cp-name-parser.y (demangle_parse_info): New constructor, from
11989         cp_new_demangle_parse_info.
11990         (~demangle_parse_info): New destructor, from
11991         cp_demangled_name_parse_free.
11992         (cp_merge_demangle_parse_infos): Update.
11993         (cp_demangled_name_to_comp): Change return type.
11994
11995 2017-01-10  Tom Tromey  <tom@tromey.com>
11996
11997         * top.c (prevent_dont_repeat): Change return type.
11998         * python/python.c (execute_gdb_command): Use std::string.
11999         Update.
12000         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12001         * command.h (prevent_dont_repeat): Change return type.
12002         * breakpoint.c (bpstat_do_actions_1): Update.
12003
12004 2017-01-10  Tom Tromey  <tom@tromey.com>
12005
12006         * value.h (scoped_value_mark::~scoped_value_mark): Call
12007         free_to_mark.
12008         (scoped_value_mark::free_to_mark): New method.
12009         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12010         scoped_value_mark.
12011
12012 2017-01-10  Tom Tromey  <tom@tromey.com>
12013
12014         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12015         (valpy_reference_value, valpy_const_value, valpy_get_address)
12016         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12017         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12018         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12019         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12020         scoped_value_mark.
12021         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12022         * value.h (scoped_value_mark): New class.
12023
12024 2017-01-10  Tom Tromey  <tom@tromey.com>
12025
12026         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12027         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12028         * psymtab.c (discard_psymtabs_upto): Remove.
12029         (make_cleanup_discard_psymtabs): Remove.
12030         (struct psymtab_state): Remove.
12031
12032 2017-01-10  Tom Tromey  <tom@tromey.com>
12033
12034         * record-full.c (record_full_save_cleanups): Remove.
12035         (record_full_save): Use gdb::unlinker.
12036         * gcore.c (do_bfd_delete_cleanup): Remove.
12037         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12038         cleanups.
12039         * dwarf2read.c (unlink_if_set): Remove.
12040         (write_psymtabs_to_index): Use gdb::unlinker.
12041         * common/gdb_unlinker.h: New file.
12042
12043 2017-01-10  Tom Tromey  <tom@tromey.com>
12044
12045         * windows-tdep.c (windows_xfer_shared_library): Update.
12046         * windows-nat.c (windows_make_so): Update.
12047         * utils.h (make_cleanup_bfd_unref): Remove.
12048         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12049         * symfile.h (symfile_bfd_open)
12050         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12051         * symfile.c (read_symbols, symbol_file_add)
12052         (separate_debug_file_exists): Update.
12053         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12054         (generic_load, reread_symbols): Update.
12055         * symfile-mem.c (symbol_file_add_from_memory): Update.
12056         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12057         (spu_symbol_file_add_from_memory): Update.
12058         * solist.h (struct target_so_ops) <bfd_open>: Return
12059         gdb_bfd_ref_ptr.
12060         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12061         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12062         gdb_bfd_ref_ptr.
12063         (solib_map_sections, reload_shared_libraries_1): Update.
12064         * solib-svr4.c (enable_break): Update.
12065         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12066         * solib-frv.c (enable_break2): Update.
12067         * solib-dsbt.c (enable_break): Update.
12068         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12069         gdb_bfd_ref_ptr.
12070         (darwin_solib_get_all_image_info_addr_at_init): Update.
12071         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12072         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12073         * record-full.c (record_full_save): Update.
12074         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12075         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12076         * minidebug.c (find_separate_debug_file_in_section): Return
12077         gdb_bfd_ref_ptr.
12078         * machoread.c (macho_add_oso_symfile): Change abfd to
12079         gdb_bfd_ref_ptr.
12080         (macho_symfile_read_all_oso): Update.
12081         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12082         (macho_symfile_read): Update.
12083         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12084         (jit_bfd_try_read_symtab): Update.
12085         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12086         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12087         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12088         gdb_bfd_ref_ptr.
12089         (gdb_bfd_ref_policy): New struct.
12090         (gdb_bfd_ref_ptr): New typedef.
12091         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12092         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12093         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12094         gdb_bfd_ref_ptr.
12095         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12096         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12097         (gcore_command): Update.
12098         * exec.c (exec_file_attach): Update.
12099         * elfread.c (elf_symfile_read): Update.
12100         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12101         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12102         (open_and_init_dwo_file): Update.
12103         (open_dwp_file): Return gdb_bfd_ref_ptr.
12104         (open_and_init_dwp_file): Update.
12105         * corelow.c (core_open): Update.
12106         * compile/compile-object-load.c (compile_object_load): Update.
12107         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12108         * coffread.c (coff_symfile_read): Update.
12109         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12110         gdb_bfd_ref_ptr.  Rename.
12111         (dump_bfd_file, restore_command): Update.
12112         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12113         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12114         (find_separate_debug_file_by_buildid): Update.
12115
12116 2017-01-10  Tom Tromey  <tom@tromey.com>
12117
12118         * common/gdb_ref_ptr.h: New file.
12119         * python/py-ref.h (struct gdbpy_ref_policy): New.
12120         (gdbpy_ref): Now a typedef.
12121
12122 2017-01-10  Tom Tromey  <tom@tromey.com>
12123
12124         * utils.h (make_cleanup_htab_delete): Don't declare.
12125         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12126         Remove.
12127         * linespec.c (decode_compound_collector): Add constructor,
12128         destructor.
12129         (lookup_prefix_sym): Remove cleanup.
12130         (symtab_collector): Add constructor, destructor.
12131         (collect_symtabs_from_filename): Remove cleanup.
12132         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12133         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12134         Use htab_up.
12135         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12136         * dwarf2read.c (dw2_expand_symtabs_matching)
12137         (dw2_map_symbol_filenames, dwarf_decode_macros)
12138         (write_psymtabs_to_index): Use htab_up.
12139         * dwarf2loc.c (func_verify_no_selftailcall)
12140         (call_site_find_chain_1, func_verify_no_selftailcall)
12141         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12142         std::vector, gdb::unique_xmalloc_ptr.
12143         (call_sitep): Remove typedef.
12144         (dwarf2_locexpr_baton_eval): Remove unused variable.
12145
12146 2017-01-10  Tom Tromey  <tom@tromey.com>
12147
12148         * python/python-internal.h (make_cleanup_py_decref)
12149         (make_cleanup_py_xdecref): Don't declare.
12150         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12151         (py_xdecref, make_cleanup_py_xdecref): Remove.
12152
12153 2017-01-10  Tom Tromey  <tom@tromey.com>
12154
12155         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12156         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12157
12158 2017-01-10  Tom Tromey  <tom@tromey.com>
12159
12160         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12161
12162 2017-01-10  Tom Tromey  <tom@tromey.com>
12163
12164         * python/py-utils.c (unicode_to_encoded_string)
12165         (python_string_to_target_string)
12166         (python_string_to_target_python_string)
12167         (python_string_to_host_string, gdbpy_obj_to_string)
12168         (get_addr_from_python): Use gdbpy_ref.
12169
12170 2017-01-10  Tom Tromey  <tom@tromey.com>
12171
12172         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12173         gdbpy_ref.
12174
12175 2017-01-10  Tom Tromey  <tom@tromey.com>
12176
12177         * python/python.c (eval_python_command, gdbpy_decode_line)
12178         (gdbpy_run_events, gdbpy_start_type_printers)
12179         (gdbpy_apply_type_printers): Use gdbpy_ref.
12180
12181 2017-01-10  Tom Tromey  <tom@tromey.com>
12182
12183         * python/py-param.c (get_doc_string, compute_enum_values): Use
12184         gdbpy_ref.
12185
12186 2017-01-10  Tom Tromey  <tom@tromey.com>
12187
12188         * python/py-inferior.c (find_thread_object, build_inferior_list):
12189         Use gdbpy_ref.
12190
12191 2017-01-10  Tom Tromey  <tom@tromey.com>
12192
12193         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12194
12195 2017-01-10  Tom Tromey  <tom@tromey.com>
12196
12197         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12198         gdbpy_ref.
12199
12200 2017-01-10  Tom Tromey  <tom@tromey.com>
12201
12202         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12203         extra incref.
12204         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12205         Use gdbpy_ref.
12206
12207 2017-01-10  Tom Tromey  <tom@tromey.com>
12208
12209         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12210         gdbpy_ref.
12211
12212 2017-01-10  Tom Tromey  <tom@tromey.com>
12213
12214         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12215         decref results of PyArg_ParseTupleAndKeywords.
12216
12217 2017-01-10  Tom Tromey  <tom@tromey.com>
12218
12219         * python/python.c (python_run_simple_file): Use
12220         unique_xmalloc_ptr, gdbpy_ref.
12221
12222 2017-01-10  Tom Tromey  <tom@tromey.com>
12223
12224         * python/py-prettyprint.c (print_stack_unless_memory_error)
12225         (print_string_repr, print_children): Use gdbpy_ref.
12226         (dummy_python_frame): New class.
12227         (dummy_python_frame::dummy_python_frame): Rename from
12228         push_dummy_python_frame.
12229         (py_restore_tstate): Remove.
12230
12231 2017-01-10  Tom Tromey  <tom@tromey.com>
12232
12233         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12234
12235 2017-01-10  Tom Tromey  <tom@tromey.com>
12236
12237         * python/python.c (ensure_python_env, restore_python_env):
12238         Remove.
12239         * python/python-internal.h (ensure_python_env): Don't declare.
12240         * varobj.h (varobj_ensure_python_env): Don't declare.
12241         * varobj.c (varobj_ensure_python_env): Remove.
12242
12243 2017-01-10  Tom Tromey  <tom@tromey.com>
12244
12245         * varobj.c (varobj_value_get_print_value): Use
12246         gdbpy_enter_varobj.
12247
12248 2017-01-10  Tom Tromey  <tom@tromey.com>
12249
12250         * python/py-prettyprint.c (print_string_repr, print_children):
12251         Update.
12252         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12253         of "encoding".
12254         * varobj.c (varobj_value_get_print_value): Update.
12255         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12256
12257 2017-01-10  Tom Tromey  <tom@tromey.com>
12258
12259         * varobj.c (varobj_get_display_hint)
12260         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12261         (varobj_set_visualizer, free_variable): Use
12262         gdbpy_enter_varobj.
12263
12264 2017-01-10  Tom Tromey  <tom@tromey.com>
12265
12266         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12267         (do_finish_initialization): New function.  Use gdbpy_ref.
12268         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12269         do_finish_initialization.
12270
12271 2017-01-10  Tom Tromey  <tom@tromey.com>
12272
12273         * python/py-param.c (get_set_value, get_show_value): Use
12274         gdbpy_enter, gdbpy_ref.
12275
12276 2017-01-10  Tom Tromey  <tom@tromey.com>
12277
12278         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12279
12280 2017-01-10  Tom Tromey  <tom@tromey.com>
12281
12282         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12283
12284 2017-01-10  Tom Tromey  <tom@tromey.com>
12285
12286         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12287         Use gdbpy_enter_varobj.
12288
12289 2017-01-10  Tom Tromey  <tom@tromey.com>
12290
12291         * varobj.c (gdbpy_enter_varobj): New constructor.
12292         * python/python-internal.h (gdbpy_enter_varobj): New class.
12293         * python/py-varobj.c (py_varobj_get_iterator): Use
12294         gdbpy_enter_varobj.
12295
12296 2017-01-10  Tom Tromey  <tom@tromey.com>
12297
12298         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12299         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12300         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12301         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12302         unique_xmalloc_ptr.
12303         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12304
12305 2017-01-10  Tom Tromey  <tom@tromey.com>
12306
12307         * python/py-xmethods.c (invoke_match_method): Use
12308         gdbpy_ref.
12309
12310 2017-01-10  Tom Tromey  <tom@tromey.com>
12311
12312         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12313         gdbpy_enter, gdbpy_ref.
12314
12315 2017-01-10  Tom Tromey  <tom@tromey.com>
12316
12317         * python/python.c (python_interactive_command): Use gdbpy_enter.
12318
12319 2017-01-10  Tom Tromey  <tom@tromey.com>
12320
12321         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12322         gdbpy_ref.
12323
12324 2017-01-10  Tom Tromey  <tom@tromey.com>
12325
12326         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12327         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12328
12329 2017-01-10  Tom Tromey  <tom@tromey.com>
12330
12331         * utils.h (htab_deleter): New struct.
12332         (htab_up): New typedef.
12333         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12334         gdbpy_enter, gdbpy_ref, htab_up.
12335
12336 2017-01-10  Tom Tromey  <tom@tromey.com>
12337
12338         * python/py-unwind.c (pending_frame_invalidate): Remove.
12339         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12340
12341 2017-01-10  Tom Tromey  <tom@tromey.com>
12342
12343         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12344         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12345
12346 2017-01-10  Tom Tromey  <tom@tromey.com>
12347
12348         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12349
12350 2017-01-10  Tom Tromey  <tom@tromey.com>
12351
12352         * python/python.c (gdbpy_eval_from_control_command)
12353         (gdbpy_source_script, gdbpy_run_events)
12354         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12355         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12356         gdbpy_enter.
12357
12358 2017-01-10  Tom Tromey  <tom@tromey.com>
12359
12360         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12361
12362 2017-01-10  Tom Tromey  <tom@tromey.com>
12363
12364         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12365
12366 2017-01-10  Tom Tromey  <tom@tromey.com>
12367
12368         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12369         (python_on_inferior_call_pre, python_on_inferior_call_post)
12370         (python_on_memory_change, python_on_register_change)
12371         (python_inferior_exit, python_new_objfile, add_thread_object)
12372         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12373
12374 2017-01-10  Tom Tromey  <tom@tromey.com>
12375
12376         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12377         (bpfinishpy_handle_exit): Use gdbpy_enter.
12378
12379 2017-01-10  Tom Tromey  <tom@tromey.com>
12380
12381         * python/py-cmd.c (cmdpy_destroyer)
12382         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12383         gdbpy_enter.
12384
12385 2017-01-10  Tom Tromey  <tom@tromey.com>
12386
12387         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12388         gdbpy_enter.
12389         (gdbpy_breakpoint_has_cond): Likewise.
12390
12391 2017-01-10  Tom Tromey  <tom@tromey.com>
12392
12393         * python/python.c (gdbpy_enter): New constructor.
12394         (~gdbpy_enter): New destructor.
12395         (restore_python_env, ensure_python_env): Rewrite.
12396         * python/python-internal.h (gdbpy_enter): New class.
12397
12398 2017-01-10  Tom Tromey  <tom@tromey.com>
12399
12400         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12401
12402 2017-01-10  Tom Tromey  <tom@tromey.com>
12403
12404         * python/py-value.c (value_has_field, get_field_flag)
12405         (get_field_type, valpy_getitem, convert_value_from_python): Use
12406         gdbpy_ref.
12407
12408 2017-01-10  Tom Tromey  <tom@tromey.com>
12409
12410         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12411         gdbpy_ref.
12412
12413 2017-01-10  Tom Tromey  <tom@tromey.com>
12414
12415         * python/py-prettyprint.c (search_pp_list)
12416         (find_pretty_printer_from_objfiles)
12417         (find_pretty_printer_from_progspace)
12418         (find_pretty_printer_from_gdb, find_pretty_printer)
12419         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12420         gdbpy_ref.
12421
12422 2017-01-10  Tom Tromey  <tom@tromey.com>
12423
12424         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12425
12426 2017-01-10  Tom Tromey  <tom@tromey.com>
12427
12428         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12429         (ltpy_get_all_source_lines): Use gdbpy_ref.
12430
12431 2017-01-10  Tom Tromey  <tom@tromey.com>
12432
12433         * python/py-framefilter.c (extract_sym, extract_value)
12434         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12435         gdbpy_ref.
12436
12437 2017-01-10  Tom Tromey  <tom@tromey.com>
12438
12439         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12440
12441 2017-01-10  Tom Tromey  <tom@tromey.com>
12442
12443         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12444
12445 2017-01-10  Tom Tromey  <tom@tromey.com>
12446
12447         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12448         gdbpy_ref.
12449
12450 2017-01-10  Tom Tromey  <tom@tromey.com>
12451
12452         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12453
12454 2017-01-10  Tom Tromey  <tom@tromey.com>
12455
12456         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12457         (typy_range): Use gdbpy_ref.
12458
12459 2017-01-10  Tom Tromey  <tom@tromey.com>
12460
12461         * python/py-threadevent.c (create_thread_event_object): Use
12462         gdbpy_ref.
12463         * python/py-stopevent.c (create_stop_event_object): Simplify.
12464         (emit_stop_event): Use gdbpy_ref.
12465         * python/py-signalevent.c (create_signal_event_object): Use
12466         gdbpy_ref.
12467         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12468         (emit_new_objfile_event, create_clear_objfiles_event_object)
12469         (emit_clear_objfiles_event): Use gdbpy_ref.
12470         * python/py-infevents.c (create_inferior_call_event_object)
12471         (create_register_changed_event_object)
12472         (create_memory_changed_event_object, emit_inferior_call_event)
12473         (emit_memory_changed_event, emit_register_changed_event): Use
12474         gdbpy_ref.
12475         * python/py-exitedevent.c (create_exited_event_object)
12476         (emit_exited_event): Use gdbpy_ref.
12477         * python/py-event.h (evpy_emit_event): Remove
12478         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12479         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12480         * python/py-continueevent.c (emit_continue_event): Use
12481         gdbpy_ref.
12482         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12483         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12484         gdbpy_ref.
12485         * python/py-bpevent.c (create_breakpoint_event_object): Use
12486         gdbpy_ref.
12487
12488 2017-01-10  Tom Tromey  <tom@tromey.com>
12489
12490         * python/py-ref.h: New file.
12491
12492 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12493
12494         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12495         void.
12496         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12497         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12498         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12499         * ui-out.c (ui_out::redirect): Likewise.
12500         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12501         * cli/cli-logging.c (set_logging_redirect): Update call site of
12502         ui_out::redirect.
12503         (handle_redirections): Likewise.
12504         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12505         * top.c (execute_command_to_string): Likewise.
12506         * utils.c (do_ui_out_redirect_pop): Likewise.
12507
12508 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12509
12510         * stack.c (_initialize_stack): Update "frame" command help message.
12511
12512 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12513
12514         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12515
12516 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12517
12518         * x86-linux-nat.h: Include gdb_proc_service.h.
12519
12520 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12521
12522         * ser-base.h: Include serial.h.
12523
12524 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12525
12526         * ppc-linux-tdep.h: Include ppc-tdep.h.
12527
12528 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12529
12530         * nat/amd64-linux-siginfo.h: Include signal.h.
12531
12532 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12533
12534         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12535
12536 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12537
12538         * mi/mi-parse.h: Include mi-cmds.h.
12539
12540 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12541
12542         * inf-loop.c: Don't include "target.h".
12543         * inf-loop.h: Include it here.
12544
12545 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12546
12547         * dfp.h: Include "dboulest.h" and "expression.h".
12548
12549 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12550
12551         * ax-gdb.h: Include "ax.h".
12552
12553 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12554
12555         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12556         with nat/gdb_ptrace.h.
12557
12558 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12559
12560         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12561         new line.
12562         (mips64_fbsd_sigframe_init): Likewise.
12563
12564 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12565
12566         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12567         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12568
12569 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12570
12571         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12572         * NEWS: Mention new FreeBSD/mips native configuration.
12573         * config/mips/fbsd.mh: New file.
12574         * configure.host: Add mips*-*-freebsd*.
12575         * mips-fbsd-nat.c: New file.
12576
12577 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12578
12579         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12580         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12581         * NEWS: Mention new FreeBSD/mips target.
12582         * configure.tgt: Add mips*-*-freebsd*.
12583         * mips-fbsd-tdep.c: New file.
12584         * mips-fbsd-tdep.h: New file.
12585
12586 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12587
12588         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12589         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12590
12591 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12592
12593         Update copyright year range in all GDB files.
12594
12595 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12596
12597         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12598
12599 For older changes see ChangeLog-2016.
12600 \f
12601 Local Variables:
12602 mode: change-log
12603 left-margin: 8
12604 fill-column: 74
12605 version-control: never
12606 coding: utf-8
12607 End: