Remove "do_nothing"
[external/binutils.git] / gdb / ChangeLog
1 2017-10-09  Tom Tromey  <tom@tromey.com>
2
3         * mi/mi-main.c (do_nothing): Remove.
4         (list_available_thread_groups): Update.
5
6 2017-10-09  Pedro Alves  <palves@redhat.com>
7
8         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
9         reading registers when switching context.
10
11 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
12
13         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
14         (fbsd_convert_siginfo): Likewise.
15         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
16
17 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
18
19         * configure.ac (try_guile_versions): Remove guile-2.2.
20         * configure: Regenerate.
21
22 2017-10-09  Tom Tromey  <tom@tromey.com>
23
24         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
25         (COMPILE.pre): Use $(CXX).
26
27 2017-10-09  Pedro Alves  <palves@redhat.com>
28
29         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
30         Use bool.
31         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
32         * cp-support.h (cp_remove_params): Now returns a
33         gdb::unique_xmalloc_ptr.
34         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
35         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
36         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
37         returning a gdb::unique_xmalloc_ptr.
38         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
39         * stack.c (find_frame_funname): Adjust to cp_remove_params
40         returning a gdb::unique_xmalloc_ptr.
41
42 2017-10-08  Tom Tromey  <tom@tromey.com>
43
44         * dwarf2read.c (dwarf2_get_dwz_file): Use
45         gdb::unique_xmalloc_ptr.
46         (find_slot_in_mapped_hash): Likewise.
47         (dwarf2_physname): Likewise.
48         (create_dwo_unit_in_dwp_v1): Use std::string.
49         (create_dwo_unit_in_dwp_v2): Likewise.
50         (lookup_dwo_cutu): Likewise.
51         (inherit_abstract_dies): Use std::vector.
52         (read_array_type): Likewise.
53         (dwarf_decode_macros): Remove unused declaration.
54         (unsigned_int_compar): Remove.
55         (dwarf2_build_psymtabs_hard): Use scoped_restore.
56         (psymtabs_addrmap_cleanup): Remove.
57
58 2017-10-08  Tom Tromey  <tom@tromey.com>
59
60         * frame-unwind.c (frame_unwind_try_unwinder): Update.
61         * frame.h (frame_cleanup_after_sniffer): Declare.
62         (frame_prepare_for_sniffer): Return void.
63         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
64         type of argument.
65         (frame_prepare_for_sniffer): Return void.
66
67 2017-10-08  Tom Tromey  <tom@tromey.com>
68
69         * utils.h (make_cleanup_value_free): Remove.
70         * utils.c (do_value_free, struct cleanup): Remove.
71         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
72         Use gdb_value_up.
73         * value.h (struct value_deleter): New.
74         (gdb_value_up): New typedef.
75
76 2017-10-08  Tom Tromey  <tom@tromey.com>
77
78         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
79         (make_cleanup_free_search_symbols): Remove.
80         (search_symbols): Return std::vector.
81         (symbol_search::compare_search_syms): Now member of
82         symbol_search.  Change arguments.
83         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
84         (symtab_symbol_info, rbreak_command): Update.
85         * symtab.h (struct symbol_search) <next>: Remove.
86         Add constructors.
87         (symbol_search::operator<): New function.
88         (symbol_search::operator==): New function.
89         (search_symbols): Remove std::vector.
90         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
91         (symbol_search::compare_search_syms): Declare.
92
93 2017-10-06  Yao Qi  <yao.qi@linaro.org>
94
95         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
96         arch/aarch64-insn.o.
97         Remove one rule.
98         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
99
100 2017-10-06  Yao Qi  <yao.qi@linaro.org>
101
102         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
103         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
104         arch/arm-linux.o respectively.
105         * configure.tgt: Likewise.
106
107 2017-10-06  Yao Qi  <yao.qi@linaro.org>
108
109         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
110         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
111
112 2017-10-06  Pedro Alves  <palves@redhat.com>
113
114         * windows-nat.c: Include <algorithm>.
115
116 2017-10-06  Yao Qi  <yao.qi@linaro.org>
117
118         * configure.tgt (i386_tobjs): New variable.
119         (amd64_tobjs): New variable.
120         Set $cpu_obs and $os_obs.
121
122 2017-10-06  Yao Qi  <yao.qi@linaro.org>
123
124         * Makefile.in (CONFIG_SRC_SUBDIR): New.
125         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
126         (clean): Remove object files and dependency files.
127         (distclean): Remove the directory.
128         * configure.ac: Invoke AC_CONFIG_COMMANDS.
129         * configure: Re-generated.
130         * configure.tgt: Replace amd64.o with arch/amd64.o.
131
132 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
133
134         PR build/22188
135         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
136         and SETEND.
137
138 2017-10-05  Pedro Alves  <palves@redhat.com>
139
140         * linux-nat.c (linux_child_follow_fork): When following the parent
141         and detaching the child, consult the parent thread's architecture
142         instead of the child's.
143
144 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
145
146         * ax.h: Do not include "doublest.h".
147         (union agent_val): Remove.
148
149 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
150
151         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
152         (decimal_to_string): Return std::string object.
153         (decimal_from_string): Accept std::string object.  Return bool.
154         (decimal_from_integral, decimal_from_doublest): Remove.
155         (decimal_from_longest): Add prototype.
156         (decimal_from_ulongest): Likewise.
157         (decimal_to_longest): Likewise.
158         (decimal_from_doublest): Likewise.
159         * dfp.c: Do not include "gdbtypes.h" or "value.h".
160         (MAX_DECIMAL_STRING): Move here.
161         (decimal_to_string): Return std::string object.
162         (decimal_from_string): Accept std::string object.  Return bool.
163         (decimal_from_integral): Remove, replace by ...
164         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
165         (decimal_to_longest): New function.
166         (decimal_from_floating): Remove, replace by ...
167         (decimal_from_doublest): ... this new function.
168         (decimal_to_doublest): Update to new decimal_to_string interface.
169
170         * value.c (unpack_long): Use decimal_to_longest.
171         * valops.c (value_cast): Use decimal_from_doublest instead of
172         decimal_from_floating.  Use decimal_from_[u]longest isntead of
173         decimal_from_integral.
174         * valarith.c (value_args_as_decimal): Likewise.
175         * valprint.c (print_decimal_floating): Update to new
176         decimal_to_string interface.
177         * printcmd.c (printf_decfloat): Likewise.
178         * c-exp.y (parse_number): Update to new decimal_from_string interface.
179
180 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
181
182         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
183         * gdbtypes.c: Include "floatformat.h".
184         * value.c: Likewise.
185         * m68k-tdep.c: Likewise.
186
187         * findvar.c: Do not include "floatformat.h".
188         * amd64-darwin-tdep.c: Likewise.
189         * arm-linux-tdep.c: Likewise.
190         * i386-darwin-tdep.c: Likewise.
191         * i387-tdep.c: Likewise.
192         * m68k-linux-tdep.c: Likewise.
193         * mep-tdep.c: Likewise.
194         * mips-tdep.c: Likewise.
195         * nios2-tdep.c: Likewise.
196         * s390-linux-tdep.c: Likewise.
197         * sparc-obsd-tdep.c: Likewise.
198         * sparc-tdep.c: Likewise.
199         * sparc64-tdep.c: Likewise.
200         * spu-tdep.c: Likewise.
201         * tic6x-tdep.c: Likewise.
202         * tilegx-tdep.c: Likewise.
203         * vax-tdep.c: Likewise.
204         * xstormy16-tdep.c: Likewise.
205         * xtensa-tdep.c: Likewise.
206
207         * top.c: Do not include "doublest.h".
208         * aarch64-tdep.c: Likewise.
209         * alpha-tdep.c: Likewise.
210         * arm-linux-tdep.c: Likewise.
211         * m68k-linux-tdep.c: Likewise.
212         * tilegx-tdep.c: Likewise.
213         * xstormy16-tdep.c: Likewise.
214
215 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
216
217         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
218         (mipsn32_fbsd_sigframe): Define.
219         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
220         for FreeBSD/mipsn32.
221
222 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
223
224         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
225         AT_HWCAP.
226
227 2017-10-05  Tristan Gingold  <tgingold@free.fr>
228
229         * MAINTAINERS (Misc): Update my email address.
230
231 2017-10-04  Pedro Alves  <palves@redhat.com>
232
233         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
234         it instead of target_gdbarch.
235         (get_remote_state, get_remote_packet_size): Adjust
236         get_remote_arch_state calls, passing down target_gdbarch
237         explicitly.
238         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
239         'gdbarch' and use it instead of target_gdbarch.
240         (get_memory_packet_size): Adjust get_remote_arch_state calls,
241         passing down target_gdbarch explicitly.
242         (struct stop_reply) <arch>: New field.
243         (remote_parse_stop_reply): Use the stopped thread's architecture,
244         not the current inferior's.  Save the architecture in the
245         stop_reply.
246         (process_stop_reply): Use the stop reply's architecture.
247         (process_g_packet, remote_fetch_registers)
248         (remote_prepare_to_store, store_registers_using_G)
249         (remote_store_registers): Adjust get_remote_arch_state calls,
250         using the regcache's architecture.
251         (remote_get_trace_status): Adjust get_remote_arch_state calls,
252         passing down target_gdbarch explicitly.
253         * spu-multiarch.c (spu_thread_architecture): Defer to the target
254         beneath instead of calling target_gdbarch.
255         * target.c (default_thread_architecture): Use the specified
256         inferior's architecture, instead of the current inferior's
257         architecture (via target_gdbarch).
258
259 2017-10-04  Pedro Alves  <palves@redhat.com>
260
261         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
262         case.
263         (regcache_print): Handle !target_has_registers here instead.
264
265 2017-10-04  Pedro Alves  <palves@redhat.com>
266
267         * frame.c (create_test_frame): Delete.
268         * frame.h (create_test_frame): Delete.
269         * gdbarch-selftests.c: Include gdbthread.h and target.h.
270         (class regcache_test): Delete.
271         (test_target_has_registers, test_target_has_stack)
272         (test_target_has_memory, test_target_prepare_to_store)
273         (test_target_store_registers): New functions.
274         (test_target_ops): New class.
275         (register_to_value_test): Error out if there's already a
276         process_stratum (or higher) target pushed.  Create a fuller mock
277         environment, with mock target_ops, inferior, address space, thread
278         and inferior_ptid.
279         * progspace.c (struct address_space): Move to ...
280         * progspace.h (struct address_space): ... here.
281         * regcache.h (regcache::~regcache, regcache::raw_write)
282         [GDB_SELF_TEST]: No longer virtual.
283
284 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
285
286         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
287
288 2017-10-04  Pedro Alves  <palves@redhat.com>
289
290         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
291         out of 'between TRY and CATCH'.
292
293 2017-10-04  Pedro Alves  <palves@redhat.com>
294
295         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
296         * common/common-exceptions.h (TRY): Open an outermost scope.
297         Expand intro comment.
298         (CATCH): Reindent.
299         (END_CATCH): Close the outermost scope.
300         * completer.c (complete_line_internal): Add missing END_CATCH.
301
302 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
303
304         * NEWS (Changes since GDB 8.0): Add entry about new
305         'set-cwd-on-gdbserver' feature.
306         (New remote packets): Add entry for QSetWorkingDir.
307         * common/common-inferior.h (set_inferior_cwd): New prototype.
308         * infcmd.c (set_inferior_cwd): Remove "static".
309         (show_cwd_command): Expand text to include remote debugging.
310         * remote.c: Add PACKET_QSetWorkingDir.
311         (remote_protocol_features) <QSetWorkingDir>: New entry for
312         PACKET_QSetWorkingDir.
313         (extended_remote_set_inferior_cwd): New function.
314         (extended_remote_create_inferior): Call
315         "extended_remote_set_inferior_cwd".
316         (_initialize_remote): Call "add_packet_config_cmd" for
317         QSetWorkingDir.
318
319 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
320
321         * NEWS (New commands): Mention "set/show cwd".
322         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
323         "cd" command's help text.
324         * common/common-inferior.h (get_inferior_cwd): New prototype.
325         * infcmd.c (inferior_cwd_scratch): New global variable.
326         (set_inferior_cwd): New function.
327         (get_inferior_cwd): Likewise.
328         (set_cwd_command): Likewise.
329         (show_cwd_command): Likewise.
330         (_initialize_infcmd): Add "set/show cwd" commands.
331         * inferior.h (class inferior) <cwd>: New field.
332         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
333         (fork_inferior): Change inferior's cwd before its execution.
334         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
335         to CreateProcess.
336
337 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
338
339         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
340         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
341         (COMMON_OBS): Add gdb_tilde_expand.o.
342         * common/gdb_tilde_expand.c: New file.
343         * common/gdb_tilde_expand.h: Likewise.
344
345 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
346
347         * gdbarch.sh (objfile): Remove duplicate declaration.
348         * gdbarch.h: Regenerate.
349
350 2017-10-03  Tom Tromey  <tom@tromey.com>
351
352         * utils.c (internal_vproblem): Use string_vprintf.
353
354 2017-10-03  Tom Tromey  <tom@tromey.com>
355
356         * printcmd.c (info_symbol_command): Use std::string.
357
358 2017-10-03  Tom Tromey  <tom@tromey.com>
359
360         * top.c (gdb_safe_append_history): Use std::string.
361
362 2017-10-03  Tom Tromey  <tom@tromey.com>
363
364         * event-top.c (stdin_event_handler): Update.
365         * main.c (captured_main_1): Update.
366         * top.h (make_delete_ui_cleanup): Remove.
367         (struct ui): Add constructor and destructor.
368         (new_ui, delete_ui): Remove.
369         * top.c (make_delete_ui_cleanup): Remove.
370         (new_ui_command): Use std::unique_ptr.
371         (delete_ui_cleanup): Remove.
372         (ui::ui): Rename from new_ui.  Update.
373         (free_ui): Remove.
374         (ui::~ui): Rename from delete_ui.  Update.
375
376 2017-10-03  Tom Tromey  <tom@tromey.com>
377
378         * symfile.c (load_progress): Use gdb::byte_vector.
379
380 2017-10-03  Tom Tromey  <tom@tromey.com>
381
382         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
383         declaration.
384         * printcmd.c (x_command): Remove unused declaration.
385         * symfile.c (symbol_file_command): Remove unused declaration.
386
387 2017-10-03  Tom Tromey  <tom@tromey.com>
388
389         * utils.c (internal_vproblem): Use std::string.
390         (defaulted_query): Likewise.
391
392 2017-10-03  Tom Tromey  <tom@tromey.com>
393
394         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
395         * top.c (execute_command_to_string): Update.
396         * utils.c (make_cleanup_restore_page_info): Remove.
397         (do_restore_page_info_cleanup): Remove.
398         (set_batch_flag_and_restore_page_info):
399         New.
400         (make_cleanup_restore_page_info): Remove.
401         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
402         (~set_batch_flag_and_restore_page_info): New
403         (make_cleanup_restore_uinteger): Remove.
404         (make_cleanup_restore_integer): Remove.
405         (struct restore_integer_closure): Remove.
406         (restore_integer): Remove.
407         * utils.h (struct set_batch_flag_and_restore_page_info): New
408         class.
409         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
410         (make_cleanup_restore_page_info): Remove.
411         (make_cleanup_restore_uinteger) Remove.
412         (make_cleanup_restore_integer) Remove.
413
414 2017-10-03  Tom Tromey  <tom@tromey.com>
415
416         * record-full.h (record_full_gdb_operation_disable_set): Return
417         scoped_restore_tmpl<int>.
418         * infrun.c (adjust_pc_after_break): Update.
419         (handle_signal_stop): Update.
420         * record-full.c (record_full_gdb_operation_disable_set): Return
421         scoped_restore_tmpl<int>.
422         (record_full_wait_1, record_full_insert_breakpoint)
423         (record_full_remove_breakpoint, record_full_save)
424         (record_full_goto_insn): Update.
425
426 2017-10-02  Tom Tromey  <tom@tromey.com>
427
428         PR rust/22236:
429         * rust-lang.c (rust_val_print_str): New function.
430         (val_print_struct): Call it.
431         (rust_subscript): Preserve name of slice type.
432
433 2017-10-02  Tom Tromey  <tom@tromey.com>
434
435         * rust-lang.c (rust_subscript): Handle slices in
436         EVAL_AVOID_SIDE_EFFECTS case.
437
438 2017-10-02  Tom Tromey  <tom@tromey.com>
439
440         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
441
442 2017-10-02  Tom Tromey  <tom@tromey.com>
443
444         * rust-lang.h (rust_slice_type): Add "extern".
445
446 2017-10-02  Tom Tromey  <tom@tromey.com>
447             Pedro Alves  <palves@redhat.com>
448
449         * ada-lang.h (ada_exc_info::operator<): Make const.
450         (ada_exc_info::operator==): Make const.
451         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
452         Make const.
453
454 2017-09-29  Tom Tromey  <tom@tromey.com>
455
456         * target.c (read_whatever_is_readable): Change type of "result".
457         Update.
458         (free_memory_read_result_vector): Remove.
459         (read_memory_robust): Change return type.  Update.
460         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
461         bin2hex, std::string.
462         * target.h (memory_read_result_s): Remove typedef.
463         (free_memory_read_result_vector): Remove.
464         (read_memory_robust): Return std::vector.
465
466 2017-09-29  Tom Tromey  <tom@tromey.com>
467
468         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
469
470 2017-09-29  Tom Tromey  <tom@tromey.com>
471
472         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
473         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
474         operator< and operator==.
475         (ada_exceptions_list): Return a std::vector.
476         * ada-lang.c (ada_exc_info::operator<): Rename from
477         compare_ada_exception_info.
478         (ada_exc_info::operator==): New.
479         (sort_remove_dups_ada_exceptions_list): Change type of
480         "exceptions".
481         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
482         (ada_add_global_exceptions): Likewise.
483         (ada_exceptions_list_1): Return a std::vector.
484         (ada_exceptions_list): Likewise.
485
486 2017-09-29  Tom Tromey  <tom@tromey.com>
487
488         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
489         'std::set *'.
490         (print_one_inferior): Update.
491         (free_vector_of_ints): Remove.
492         (list_available_thread_groups): Change "ids" to std::set.
493         (mi_cmd_list_thread_groups): Update.
494         (struct collect_cores_data) <core>: Now a std::set.
495         (collect_cores): Update.
496         (unique): Remove.
497         (print_one_inferior): Update.
498
499 2017-09-29  Tom Tromey  <tom@tromey.com>
500
501         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
502         (mi_execute_async_cli_command): Likewise.
503         (mi_cmd_trace_frame_collected): Use field_fmt.
504
505 2017-09-29  Tom Tromey  <tom@tromey.com>
506
507         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
508         gdb::byte_vector.
509
510 2017-09-29  Tom Tromey  <tom@tromey.com>
511
512         * mi/mi-parse.c (mi_parse): Remove unused declaration.
513
514 2017-09-29  Tom Tromey  <tom@tromey.com>
515
516         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
517
518 2017-09-29  Tom Tromey  <tom@tromey.com>
519
520         * varobj.h (varobj_gen_name): Return std::string.
521         * varobj.c (varobj_gen_name): Return std::string.
522         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
523         (mi_cmd_var_delete): Don't copy "name".
524
525 2017-09-29  Tom Tromey  <tom@tromey.com>
526
527         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
528         (mi_cmd_break_insert_1): Update.
529
530 2017-09-29  Tom Tromey  <tom@tromey.com>
531
532         * target.h (make_scoped_defer_target_commit_resume): Update.
533         * target.c (make_scoped_defer_target_commit_resume): Rename from
534         make_cleanup_defer_target_commit_resume.  Return a
535         scoped_restore.
536         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
537
538 2017-09-29  Tom Tromey  <tom@tromey.com>
539
540         * main.c (captured_main_1): Remove unused declaration.
541         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
542
543 2017-09-29  Tom Tromey  <tom@tromey.com>
544
545         * symtab.c (search_symbols): Remove unused outer cleanup.
546         (make_source_files_completion_list): Remove unused declaration.
547
548 2017-09-29  Tom Tromey  <tom@tromey.com>
549
550         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
551
552 2017-09-29  Tom Tromey  <tom@tromey.com>
553
554         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
555         gdb::byte_vector.
556
557 2017-09-29  Tom Tromey  <tom@tromey.com>
558
559         * complaints.c (vcomplaint): Use std::string.
560
561 2017-09-29  Tom Tromey  <tom@tromey.com>
562
563         * tracepoint.c (trace_variable_command): Use std::string.
564         (encode_actions_1): Remove unused declarations.
565         (create_tsv_from_upload): Use std::string.
566
567 2017-09-29  Tom Tromey  <tom@tromey.com>
568
569         * cp-support.c (gdb_demangle): Use std::string.
570
571 2017-09-29  Tom Tromey  <tom@tromey.com>
572
573         * stack.c (parse_frame_specification): Use std::string
574         (info_frame_command): Use gdb::unique_xmalloc_ptr.
575
576 2017-09-29  Tom Tromey  <tom@tromey.com>
577
578         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
579
580 2017-09-29  Tom Tromey  <tom@tromey.com>
581
582         * utils.c (vfprintf_maybe_filtered): Use std::string.
583         (vfprintf_unfiltered): Likewise.
584
585 2017-09-29  Tom Tromey  <tom@tromey.com>
586
587         * event-top.c (top_level_prompt): Return std::string.
588         (display_gdb_prompt): Update.
589
590 2017-09-29  Tom Tromey  <tom@tromey.com>
591
592         * unittests/common-utils-selftests.c (format): New function.
593         (string_vprintf_tests): New function.
594         (_initialize_common_utils_selftests): Register new tests.
595         * common/common-utils.c (string_vprintf): New function.
596         * common/common-utils.h (string_vprintf): Declare.
597
598 2017-09-29  Pedro Alves  <palves@redhat.com>
599
600         * common/rsp-low.c (unpack_varlen_hex): Constify.
601         * common/rsp-low.h (unpack_varlen_hex): Constify.
602         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
603         Constify.
604         * remote.c (remote_set_permissions, read_ptid)
605         (remote_current_thread, remote_get_threads_with_qthreadinfo)
606         (remote_static_tracepoint_marker_at)
607         (remote_static_tracepoint_markers_by_strid)
608         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
609         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
610         (parse_tracepoint_definition, parse_tsv_definition)
611         (parse_static_tracepoint_marker_definition): Constify.
612         * tracepoint.h (parse_static_tracepoint_marker_definition)
613         (parse_trace_status, parse_tracepoint_status)
614         (parse_tracepoint_definition, parse_tsv_definition): Constify.
615
616 2017-09-29  Pedro Alves  <palves@redhat.com>
617
618         * remote.c (target_buf, target_buf_size): Delete.
619         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
620         Use the connection's packet buffer instead.
621         All callers adjusted.
622         (_initialize_remote): Remove references to target_buf and
623         target_buf_size.
624
625 2017-09-28  Pedro Alves  <palves@redhat.com>
626
627         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
628         unittests/common-utils-selftests.c.
629         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
630         (COMMON_OBS): Remove utils-selftests.o.
631         * utils-selftests.c: Move to ...
632         * unittests/common-utils-selftests.c: ... here and rename self
633         test to "string_printf".
634
635 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
636
637         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
638         having NULL cus or tus.
639
640 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
641
642         * arm-tdep.c: (convert_from_extended): Remove.
643         (convert_to_extended): Likewise.
644         (arm_extract_return_value): Use convert_typed_floating.
645         (arm_store_return_value): Likewise.
646
647         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
648         * sh-tdep.c: Do not include "floatformat.h".
649         (sh_littlebyte_bigword_type): New function.
650         (sh_register_convert_to_virtual): Use convert_typed_floating.
651         (sh_register_convert_to_raw): Likewise.
652         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
653         (sh64_littlebyte_bigword_type): New function.
654         (sh64_extract_return_value): Use convert_typed_floating.
655         (sh64_register_convert_to_virtual): Likewise.
656         (sh64_register_convert_to_raw): Likewise.
657
658 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
659
660         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
661         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
662
663         * gdbtypes.h (union type_specific): Make field floatformat hold
664         just a single struct floatformat, not an array.
665         (floatformat_from_type): Move here.
666         * gdbtypes.c (floatformat_from_type): Move here.  Update to
667         changed TYPE_FLOATFORMAT definition.
668         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
669         (recursive_dump_type): Likewise.
670         (init_float_type): Install correct floatformat for byte order.
671         (arch_float_type): Likewise.
672
673 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
674
675         * gdbtypes.c (init_type): Change incoming argument from
676         length-in-bytes to length-in-bits.  Assert length is a
677         multiple of TARGET_CHAR_BITS.
678         (arch_type, arch_flags_type): Likewise.
679         (init_integer_type): Update call to init_type.
680         (init_character_type): Likewise.
681         (init_boolean_type): Likewise.
682         (init_float_type): Likewise.
683         (init_decfloat_type): Likewise.
684         (init_complex_type): Likewise.
685         (init_pointer_type): Likewise.
686         (objfile_type): Likewise.
687         (arch_integer_type): Update call to arch_type.
688         (arch_character_type): Likewise.
689         (arch_boolean_type): Likewise.
690         (arch_float_type): Likewise.
691         (arch_decfloat_type): Likewise.
692         (arch_complex_type): Likewise.
693         (arch_pointer_type): Likewise.
694         (gdbtypes_post_init): Likewise.
695
696         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
697         (read_base_type): Likewise.
698         * mdebugread.c (basic_type): Likewise.
699         * stabsread.c (dbx_init_float_type): Likewise.
700         (rs6000_builtin_type): Likewise.
701         (read_range_type): Likewise.  Also, fix call to init_integer_type
702         with erroneous length argument.
703
704         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
705         * d-lang.c (build_d_types): Likewise.
706         * f-lang.c (build_fortran_types): Likewise.
707         * go-lang.c (build_go_types): Likewise.
708         * opencl-lang.c (build_opencl_types): Likewise.
709         * jit.c (finalize_symtab): Likewise.
710         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
711         (build_std_type_info_type): Likewise.
712         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
713         update call to arch_flags_type.
714
715         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
716         arch_type.
717         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
718         * windows-tdep.c (windows_get_tlb_type): Likewise.
719
720         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
721         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
722         * m32c-tdep.c (make_types): Likewise.
723         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
724         (rl78_psw_type): Update call to arch_flags_type.
725         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
726         * rx-tdep.c (rx_psw_type): Likewise.
727         (rx_fpsw_type): Likewise.
728         * sparc-tdep.c (sparc_psr_type): Likewise.
729         (sparc_fsr_type): Likewise.
730         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
731         (sparc64_ccr_type): Likewise.
732         (sparc64_fsr_type): Likewise.
733         (sparc64_fprs_type): Likewise.
734
735 2017-09-27  Tom Tromey  <tom@tromey.com>
736
737         * findcmd.c (find_command): Constify.
738
739 2017-09-27  Tom Tromey  <tom@tromey.com>
740
741         * ada-tasks.c (task_command_1, task_command): Constify.
742
743 2017-09-27  Tom Tromey  <tom@tromey.com>
744
745         * symtab.c (maintenance_print_symbol_cache)
746         (maintenance_flush_symbol_cache)
747         (maintenance_print_symbol_cache_statistics): Constify.
748
749 2017-09-27  Tom Tromey  <tom@tromey.com>
750
751         * inferior.c (detach_inferior_command, kill_inferior_command)
752         (inferior_command): Constify.
753
754 2017-09-27  Tom Tromey  <tom@tromey.com>
755
756         * regcache.c (regcache_print, maintenance_print_registers)
757         (maintenance_print_raw_registers)
758         (maintenance_print_cooked_registers)
759         (maintenance_print_register_groups)
760         (maintenance_print_remote_registers): Constify.
761
762 2017-09-27  Tom Tromey  <tom@tromey.com>
763
764         * printcmd.c (map_display_numbers, undisplay_command)
765         (enable_disable_display_command, enable_display_command)
766         (disable_display_command): Constify.
767
768 2017-09-27  Tom Tromey  <tom@tromey.com>
769
770         * breakpoint.h (delete_command): Don't declare.
771         * breakpoint.c (delete_command, enable_once_command)
772         (enable_count_command, enable_delete_command, breakpoint_1)
773         (maintenance_info_breakpoints, stopin_command, stopat_command)
774         (delete_command, delete_trace_command, save_breakpoints)
775         (save_breakpoints_command, save_tracepoints_command): Constify.
776
777 2017-09-27  Tom Tromey  <tom@tromey.com>
778
779         * macrocmd.c (macro_expand_command, macro_expand_once_command)
780         (skip_ws, extract_identifier, macro_define_command)
781         (macro_undef_command, macro_list_command): Constify.
782
783 2017-09-27  Tom Tromey  <tom@tromey.com>
784
785         * infcmd.c (environment_info, set_environment_command)
786         (unset_environment_command, path_info, info_proc_cmd_1)
787         (info_proc_cmd_mappings, info_proc_cmd_stat)
788         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
789         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
790
791 2017-09-27  Tom Tromey  <tom@tromey.com>
792
793         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
794         Constify.
795
796 2017-09-27  Tom Tromey  <tom@tromey.com>
797
798         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
799
800 2017-09-27  Tom Tromey  <tom@tromey.com>
801
802         * demangle.c (demangle_command): Constify.
803
804 2017-09-27  Tom Tromey  <tom@tromey.com>
805
806         * progspace.c (maintenance_info_program_spaces_command):
807         Constify.
808
809 2017-09-27  Tom Tromey  <tom@tromey.com>
810
811         * compile/compile.c (check_raw_argument, compile_file_command)
812         (compile_code_command, compile_print_command): Constify.
813
814 2017-09-27  Tom Tromey  <tom@tromey.com>
815
816         * reggroups.c (maintenance_print_reggroups): Constify.
817
818 2017-09-27  Tom Tromey  <tom@tromey.com>
819
820         * dwarf2read.c (save_gdb_index_command): Constify.
821
822 2017-09-27  Tom Tromey  <tom@tromey.com>
823
824         * stap-probe.c (info_probes_stap_command): Constify.
825
826 2017-09-27  Tom Tromey  <tom@tromey.com>
827
828         * fork-child.c (unset_exec_wrapper_command): Constify.
829
830 2017-09-27  Tom Tromey  <tom@tromey.com>
831
832         * btrace.c (get_uint, get_context_size, no_chunk)
833         (maint_btrace_packet_history_cmd)
834         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
835         (maint_info_btrace_cmd): Constify.
836
837 2017-09-27  Tom Tromey  <tom@tromey.com>
838
839         * reverse.c (delete_bookmark_command): Constify.
840
841 2017-09-27  Tom Tromey  <tom@tromey.com>
842
843         * remote.c (set_memory_packet_size)
844         (set_memory_write_packet_size, show_memory_write_packet_size)
845         (set_memory_read_packet_size, show_memory_read_packet_size)
846         (compare_sections_command, packet_command, remote_put_command)
847         (remote_get_command, remote_delete_command): Constify.
848
849 2017-09-27  Tom Tromey  <tom@tromey.com>
850
851         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
852         (set_mipsfpu_double_command, set_mipsfpu_none_command)
853         (set_mipsfpu_auto_command): Constify.
854
855 2017-09-27  Tom Tromey  <tom@tromey.com>
856
857         * cli/cli-cmds.h (cd_command): Constify.
858         * cli/cli-cmds.c (cd_command): Constify.
859
860 2017-09-27  Tom Tromey  <tom@tromey.com>
861
862         * thread.c (thread_name_command, thread_find_command): Constify.
863
864 2017-09-27  Tom Tromey  <tom@tromey.com>
865
866         * probe.c (enable_probes_command, disable_probes_command):
867         Constify.
868
869 2017-09-27  Tom Tromey  <tom@tromey.com>
870
871         * symfile.c (symbol_file_command): Constify.
872         * gdbcore.h (deprecated_file_changed_hook): Constify.
873         * exec.c (deprecated_file_changed_hook, exec_file_command)
874         (file_command): Constify.
875         * defs.h (symbol_file_command): Constify.
876
877 2017-09-27  Tom Tromey  <tom@tromey.com>
878
879         * remote-fileio.c (set_system_call_allowed)
880         (show_system_call_allowed): Constify.
881
882 2017-09-27  Tom Tromey  <tom@tromey.com>
883
884         * tracepoint.c (delete_trace_variable_command)
885         (tfind_end_command, tfind_start_command, tfind_pc_command)
886         (tfind_tracepoint_command, tfind_line_command)
887         (tfind_range_command, tfind_outside_command): Constify.
888
889 2017-09-27  Tom Tromey  <tom@tromey.com>
890
891         * ax-gdb.c (maint_agent_printf_command, agent_command)
892         (agent_eval_command): Constify.
893
894 2017-09-27  Tom Tromey  <tom@tromey.com>
895
896         * tracepoint.c (info_scope_command): Constify.
897         * python/python.c (gdbpy_decode_line): Constify.
898         * python/py-breakpoint.c (bppy_init): Constify.
899         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
900         * location.h: (new_linespec_location)
901         (string_to_event_location_basic, string_to_event_location):
902         Constify.
903         * location.c (new_linespec_location)
904         (string_to_event_location_basic, string_to_event_location):
905         Constify.
906         * linespec.h (decode_line_with_current_source)
907         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
908         * linespec.c (linespec_lex_to_end)
909         (decode_line_with_current_source)
910         (decode_line_with_last_displayed): Constify.
911         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
912         Constify.
913         * cli/cli-cmds.c (edit_command, list_command): Constify.
914         * breakpoint.h (until_break_command, watch_command_wrapper)
915         (awatch_command_wrapper, rwatch_command_wrapper)
916         (init_ada_exception_breakpoint): Constify.
917         * breakpoint.c (break_command_1, dprintf_command)
918         (break_range_command, watch_command_wrapper)
919         (rwatch_command_wrapper, awatch_command_wrapper)
920         (until_break_command, init_ada_exception_breakpoint)
921         (strace_marker_create_sals_from_location, trace_command)
922         (ftrace_command, strace_command, struct tracepoint): Constify.
923         * ax-gdb.c (agent_command_1): Constify.
924         * ada-lang.c (ada_exception_sal): Constify.
925
926 2017-09-27  Tom Tromey  <tom@tromey.com>
927
928         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
929         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
930         (get_context_size, no_chunk, get_insn_history_modifiers)
931         (cmd_record_insn_history, get_call_history_modifiers)
932         (cmd_record_call_history): Constify.
933
934 2017-09-27  Tom Tromey  <tom@tromey.com>
935
936         * source.c (show_substitute_path_command)
937         (unset_substitute_path_command, set_substitute_path_command):
938         Constify.
939
940 2017-09-27  Tom Tromey  <tom@tromey.com>
941
942         * typeprint.c (maintenance_print_type): Constify.
943         * maint.c (maintenance_dump_me, maintenance_demangle)
944         (maintenance_time_display, maintenance_info_sections)
945         (maintenance_print_statistics, maintenance_deprecate)
946         (maintenance_undeprecate): Constify.
947         (maintenance_do_deprecate): Constify.  Use std::string.
948         (maintenance_selftest): Constify.
949         * gdbtypes.h (maintenance_print_type): Constify.
950
951 2017-09-27  Tom Tromey  <tom@tromey.com>
952
953         * hppa-tdep.c (unwind_command): Constify.
954
955 2017-09-27  Tom Tromey  <tom@tromey.com>
956
957         * target-descriptions.c (unset_tdesc_filename_cmd)
958         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
959         Constify.
960
961 2017-09-27  Tom Tromey  <tom@tromey.com>
962
963         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
964
965 2017-09-27  Tom Tromey  <tom@tromey.com>
966
967         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
968
969 2017-09-27  Tom Tromey  <tom@tromey.com>
970
971         * tui/tui-regs.c (tui_reg_command): Constify.
972
973 2017-09-27  Tom Tromey  <tom@tromey.com>
974
975         * skip.c (skip_file_command, skip_function_command)
976         (skip_enable_command, skip_disable_command, skip_delete_command):
977         Constify.
978
979 2017-09-27  Tom Tromey  <tom@tromey.com>
980
981         * record-btrace.c (cmd_record_btrace_bts_start)
982         (cmd_record_btrace_pt_start): Constify.
983
984 2017-09-27  Tom Tromey  <tom@tromey.com>
985
986         * symmisc.c (maintenance_print_symbols)
987         (maintenance_print_msymbols, maintenance_print_objfiles)
988         (maintenance_info_symtabs, maintenance_check_symtabs)
989         (maintenance_expand_symtabs, maintenance_info_line_tables):
990         Constify.
991
992 2017-09-27  Tom Tromey  <tom@tromey.com>
993
994         * top.c (new_ui_command): Constify.
995
996 2017-09-27  Tom Tromey  <tom@tromey.com>
997
998         * symfile.c (add_symbol_file_command)
999         (remove_symbol_file_command, list_overlays_command)
1000         (map_overlay_command, unmap_overlay_command)
1001         (overlay_auto_command, overlay_manual_command)
1002         (overlay_off_command, overlay_load_command): Constify.
1003
1004 2017-09-27  Tom Tromey  <tom@tromey.com>
1005
1006         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1007         (info_spu_mailbox_command, info_spu_dma_command)
1008         (info_spu_proxydma_command): Constify.
1009
1010 2017-09-27  Tom Tromey  <tom@tromey.com>
1011
1012         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1013
1014 2017-09-27  Tom Tromey  <tom@tromey.com>
1015
1016         * cli/cli-script.c (user_defined_command): Constify.
1017
1018 2017-09-27  Tom Tromey  <tom@tromey.com>
1019
1020         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1021         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1022         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1023         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1024         (dump_binary_value, append_binary_memory, append_binary_value):
1025         Constify.
1026         (struct dump_context) <func>: Constify.
1027         (add_dump_command): Update.
1028
1029 2017-09-27  Tom Tromey  <tom@tromey.com>
1030
1031         * cli/cli-cmds.c (show_version, show_configuration)
1032         (source_command, show_user): Constify.
1033
1034 2017-09-27  Tom Tromey  <tom@tromey.com>
1035
1036         * target.c (maintenance_print_target_stack): Constify.
1037
1038 2017-09-27  Tom Tromey  <tom@tromey.com>
1039
1040         * interps.c (interpreter_exec_cmd): Constify.
1041
1042 2017-09-27  Tom Tromey  <tom@tromey.com>
1043
1044         * record-full.c (cmd_record_full_restore): Constify.
1045
1046 2017-09-27  Tom Tromey  <tom@tromey.com>
1047
1048         * memattr.c (enable_mem_command, disable_mem_command)
1049         (delete_mem_command): Constify.
1050
1051 2017-09-27  Tom Tromey  <tom@tromey.com>
1052
1053         * value.c (show_convenience): Constify.
1054
1055 2017-09-27  Tom Tromey  <tom@tromey.com>
1056
1057         * gdbcore.h (core_file_command): Update.
1058         * corefile.c (core_file_command): Constify.
1059
1060 2017-09-27  Tom Tromey  <tom@tromey.com>
1061
1062         * user-regs.c (maintenance_print_user_registers): Constify.
1063
1064 2017-09-27  Tom Tromey  <tom@tromey.com>
1065
1066         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1067
1068 2017-09-27  Tom Tromey  <tom@tromey.com>
1069
1070         * cp-support.c (first_component_command): Constify.
1071
1072 2017-09-27  Tom Tromey  <tom@tromey.com>
1073
1074         * psymtab.c (maintenance_print_psymbols)
1075         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1076         Constify.
1077
1078 2017-09-27  Tom Tromey  <tom@tromey.com>
1079
1080         * windows-tdep.c (display_tib): Constify.
1081
1082 2017-09-27  Tom Tromey  <tom@tromey.com>
1083
1084         * linux-fork.c (delete_checkpoint_command)
1085         (detach_checkpoint_command): Constify.
1086
1087 2017-09-27  Tom Tromey  <tom@tromey.com>
1088
1089         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1090
1091 2017-09-27  Tom Tromey  <tom@tromey.com>
1092
1093         * arc-tdep.c (dump_arc_instruction_command): Constify.
1094
1095 2017-09-27  Tom Tromey  <tom@tromey.com>
1096
1097         * valprint.c (set_radix, show_radix): Constify.
1098
1099 2017-09-27  Tom Tromey  <tom@tromey.com>
1100
1101         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1102
1103 2017-09-27  Tom Tromey  <tom@tromey.com>
1104
1105         * command.h (not_just_help_class_command): Update.
1106         * cli/cli-decode.h (not_just_help_class_command): Update.
1107         * cli/cli-decode.c (not_just_help_class_command): Constify.
1108
1109 2017-09-27  Tom Tromey  <tom@tromey.com>
1110
1111         * gdb_bfd.c (maintenance_info_bfds): Constify.
1112
1113 2017-09-27  Tom Tromey  <tom@tromey.com>
1114
1115         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1116         overloads.
1117         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1118         (do_const_cfunc): New function.
1119         (cmd_cfunc_eq): New overload.
1120         (cli_user_command_p): Check do_const_cfunc.
1121         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1122         const_cfunc.
1123         * command.h (add_cmd): Add const overload and no-function
1124         overload.
1125         (set_cmd_cfunc): Add const overload.
1126         (cmd_const_cfunc_ftype): Declare.
1127         (cmd_cfunc_eq): Add const overload.
1128         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1129         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1130         overload.
1131
1132 2017-09-27  Tom Tromey  <tom@tromey.com>
1133
1134         * macroexp.c (get_next_token_for_substitution): New function.
1135         (substitute_args): Call it.  Check for __VA_OPT__.
1136
1137 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1138             Pedro Alves <palves@redhat.com>
1139
1140         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1141         producer_is_icc_lt_14.
1142         (producer_is_icc_lt_14): New function.
1143         (check_producer): Add code for checking version of ICC.
1144         (producer_is_icc): Move to producer.c.
1145         (read_structure_type): Restrict ICC workaround to ICC<14.
1146         * producer.c: Include selftest.h.
1147         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1148         New functions.
1149         * producer.h (producer_is_icc): New declaration.
1150
1151 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1152
1153         * Makefile.in (SFILES): Add producer.c.
1154         (COMMON_OBS): Add producer.o
1155         * amd64-tdep.c (producer.h): Add new include.
1156         * dwarf2read.c (producer.h): Add new include.
1157         * producer.c: New file.
1158         * producer.h: New file.
1159         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1160         producer.c.
1161         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1162         producer.h.
1163
1164 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1165
1166         * configure.ac: Search ncursesw before ncurses.
1167         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1168         * gdb_curses.h: Include <ncursesw/ncurses.h>
1169         * config.in, configure: Regenerate.
1170
1171 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1172
1173         PR gdb/22185
1174         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1175         obsolete.
1176         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1177         Remove i386sol2 support.
1178         * configure.nat <i386sol2>: Remove.
1179         <sol2-64>: Fold into ...
1180         <sol2>: ... this.
1181         Move common settings to default section.
1182         Add sol-thread.o.
1183         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1184         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1185         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1186         <i[34567]86-*-solaris*>: Remove.
1187         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1188
1189         * configure.ac: Remove wctype in libw check.
1190         (_MSE_INT_H): Don't define on Solaris 7-9.
1191         <solaris*>: Remove libthread_db.so.1 check.
1192         * configure: Regenerate.
1193         * config.in: Regenerate.
1194
1195         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1196         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1197         (gdb_ps_size_t): Remove.
1198         Use base types in users.
1199         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1200
1201         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1202
1203 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1204
1205         PR build/22206
1206         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1207         (adi_is_addr_mapped): Likewise.
1208         (PSR_ICC): Don't redefine.
1209         (PSR_IMPL): Likewise.
1210
1211 2017-09-25  Tom Tromey  <tom@tromey.com>
1212
1213         * regcache.c (regcache::dump): Use string_printf.
1214
1215 2017-09-25  Tom Tromey  <tom@tromey.com>
1216
1217         * regcache.c (class regcache_invalidator): New.
1218         (struct register_to_invalidate): Remove.
1219         (make_cleanup_regcache_invalidate): Remove.
1220         (regcache::raw_write): Use regcache_invalidator.
1221
1222 2017-09-25  Tom Tromey  <tom@tromey.com>
1223
1224         * spu-tdep.c (spu2ppu_sniffer): Update.
1225         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1226         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1227         Remove.
1228         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1229         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1230         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1231         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1232         (frame_pop): Update.
1233
1234 2017-09-25  Tom Tromey  <tom@tromey.com>
1235
1236         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1237         * regcache.h (regcache_xfree): Don't declare.
1238         * regcache.c (regcache_xfree): Remove.
1239         (do_regcache_xfree): Use delete.
1240         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1241         * linux-fork.c (free_fork): Use delete.
1242         (fork_save_infrun_state): Likewise.
1243         * jit.c (jit_dealloc_cache): Use delete.
1244         * infrun.c (discard_infcall_suspend_state): Use delete.
1245
1246 2017-09-25  Tom Tromey  <tom@tromey.com>
1247
1248         * regcache.h (regcache_xmalloc): Don't declare.
1249         (regcache_raw_set_cached_value): Update comment.
1250         * regcache.c (regcache_xmalloc): Remove.
1251         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1252         * jit.c (jit_frame_sniffer): Use new.
1253         * frame.c (frame_save_as_regcache): Use new.
1254
1255 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1256
1257         * NEWS: Advertise support for guarded-storage registers on IBM z.
1258
1259 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1260
1261         * s390-linux-nat.c (have_regset_gs): New static variable.
1262         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1263         control block and guarded-storage broadcast control regsets.
1264         (s390_read_description): Detect whether the target has
1265         guarded-storage support, return appropriate tdesc.
1266         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1267         (features/s390x-gs-linux64.c): Likewise.
1268         (struct gdbarch_tdep) <have_gs>: New field.
1269         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1270         (s390_gsbc_regset): New variables.
1271         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1272         and s390_gsbc_regset, if applicable.
1273         (s390_core_read_description): Check whether core file was from a
1274         target with guarded-storage support; include appropriate regsets.
1275         (s390_gdbarch_init): Add registers for guarded-storage support.
1276         (_initialize_s390_tdep): Initialize new target descriptions that
1277         include registers for guarded-storage support.
1278         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1279         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1280         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1281         (S390_NUM_REGS): Adjust macro definition.
1282         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1283         (tdesc_s390x_gs_linux64): New declarations.
1284
1285 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1286
1287         * features/s390-gs-linux64.xml: New file.
1288         * features/s390-gs.xml: New file.
1289         * features/s390-gsbc.xml: New file.
1290         * features/s390x-gs-linux64.xml: New file.
1291         * features/Makefile (WHICH): Add s390-gs-linux64 and
1292         s390x-gs-linux64.
1293         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1294         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1295         * features/s390-gs-linux64.c: New generated file.
1296         * features/s390x-gs-linux64.c: New file.
1297         * regformats/s390-gs-linux64.dat: New file.
1298         * regformats/s390x-gs-linux64.dat: New file.
1299
1300 2017-09-23  Tom Tromey  <tom@tromey.com>
1301
1302         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1303
1304 2017-09-22  Tom Tromey  <tom@tromey.com>
1305
1306         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1307         type to scoped_restore_tmpl.
1308         <scoped_input_handler>: Initialize m_quit_handler directly.
1309
1310 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1311
1312         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1313         (cd_command): Likewise.  Free "current_directory" before
1314         assigning to it.
1315         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1316         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1317         * top.c (gdb_dirbuf): Remove global declaration.
1318         * top.h (gdb_dirbuf): Likewise.
1319
1320 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1321
1322         * gnulib/aclocal.m4: Regenerate.
1323         * gnulib/config.in: Regenerate.
1324         * gnulib/configure: Regenerate.
1325         * gnulib/import/Makefile.am: Regenerate.
1326         * gnulib/import/Makefile.in: Regenerate.
1327         * gnulib/import/assure.h: New file.
1328         * gnulib/import/at-func.c: Likewise
1329         * gnulib/import/chdir-long.c: New file.
1330         * gnulib/import/chdir-long.h: New file.
1331         * gnulib/import/cloexec.c: New file.
1332         * gnulib/import/cloexec.h: New file.
1333         * gnulib/import/close.c: New file.
1334         * gnulib/import/closedir.c: New file.
1335         * gnulib/import/dirent-private.h: New file.
1336         * gnulib/import/dup-safer.c: New file.
1337         * gnulib/import/dup.c: New file.
1338         * gnulib/import/dup2.c: New file.
1339         * gnulib/import/error.c: New file.
1340         * gnulib/import/error.h: New file.
1341         * gnulib/import/exitfail.c: New file.
1342         * gnulib/import/exitfail.h: New file.
1343         * gnulib/import/fchdir.c: New file.
1344         * gnulib/import/fcntl.c: New file.
1345         * gnulib/import/fcntl.in.h: New file.
1346         * gnulib/import/fd-hook.c: New file.
1347         * gnulib/import/fd-hook.h: New file.
1348         * gnulib/import/fd-safer.c: New file.
1349         * gnulib/import/fdopendir.c: New file.
1350         * gnulib/import/filename.h: New file.
1351         * gnulib/import/filenamecat-lgpl.c: New file.
1352         * gnulib/import/filenamecat.h: New file.
1353         * gnulib/import/fstat.c: New file.
1354         * gnulib/import/fstatat.c: New file.
1355         * gnulib/import/getcwd-lgpl.c: New file.
1356         * gnulib/import/getcwd.c: New file.
1357         * gnulib/import/getdtablesize.c: New file.
1358         * gnulib/import/getlogin_r.c: New file.
1359         * gnulib/import/getprogname.c: New file.
1360         * gnulib/import/getprogname.h: New file.
1361         * gnulib/import/gettext.h: New file.
1362         * gnulib/import/glob-libc.h: New file.
1363         * gnulib/import/glob.c: New file.
1364         * gnulib/import/glob.in.h: New file.
1365         * gnulib/import/intprops.h: New file.
1366         * gnulib/import/m4/chdir-long.m4: New file.
1367         * gnulib/import/m4/close.m4: New file.
1368         * gnulib/import/m4/closedir.m4: New file.
1369         * gnulib/import/m4/d-ino.m4: New file.
1370         * gnulib/import/m4/d-type.m4: New file.
1371         * gnulib/import/m4/dup.m4: New file.
1372         * gnulib/import/m4/dup2.m4: New file.
1373         * gnulib/import/m4/error.m4: New file.
1374         * gnulib/import/m4/fchdir.m4: New file.
1375         * gnulib/import/m4/fcntl.m4: New file.
1376         * gnulib/import/m4/fcntl_h.m4: New file.
1377         * gnulib/import/m4/fdopendir.m4: New file.
1378         * gnulib/import/m4/filenamecat.m4: New file.
1379         * gnulib/import/m4/fstat.m4: New file.
1380         * gnulib/import/m4/fstatat.m4: New file.
1381         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1382         * gnulib/import/m4/getcwd-path-max.m4: New file.
1383         * gnulib/import/m4/getcwd.m4: New file.
1384         * gnulib/import/m4/getdtablesize.m4: New file.
1385         * gnulib/import/m4/getlogin_r.m4: New file.
1386         * gnulib/import/m4/getprogname.m4: New file.
1387         * gnulib/import/m4/glob.m4: New file.
1388         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1389         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1390         * gnulib/import/m4/mempcpy.m4: New file.
1391         * gnulib/import/m4/memrchr.m4: New file.
1392         * gnulib/import/m4/mode_t.m4: New file.
1393         * gnulib/import/m4/msvc-inval.m4: New file.
1394         * gnulib/import/m4/msvc-nothrow.m4: New file.
1395         * gnulib/import/m4/open.m4: New file.
1396         * gnulib/import/m4/openat.m4: New file.
1397         * gnulib/import/m4/opendir.m4: New file.
1398         * gnulib/import/m4/readdir.m4: New file.
1399         * gnulib/import/m4/realloc.m4: New file.
1400         * gnulib/import/m4/rewinddir.m4: New file.
1401         * gnulib/import/m4/save-cwd.m4: New file.
1402         * gnulib/import/m4/strdup.m4: New file.
1403         * gnulib/import/m4/strerror.m4: New file.
1404         * gnulib/import/m4/unistd-safer.m4: New file.
1405         * gnulib/import/mempcpy.c: New file.
1406         * gnulib/import/memrchr.c: New file.
1407         * gnulib/import/msvc-inval.c: New file.
1408         * gnulib/import/msvc-inval.h: New file.
1409         * gnulib/import/msvc-nothrow.c: New file.
1410         * gnulib/import/msvc-nothrow.h: New file.
1411         * gnulib/import/open.c: New file.
1412         * gnulib/import/openat-die.c: New file.
1413         * gnulib/import/openat-priv.h: New file.
1414         * gnulib/import/openat-proc.c: New file.
1415         * gnulib/import/openat.c: New file.
1416         * gnulib/import/openat.h: New file.
1417         * gnulib/import/opendir.c: New file.
1418         * gnulib/import/pipe-safer.c: New file.
1419         * gnulib/import/readdir.c: New file.
1420         * gnulib/import/realloc.c: New file.
1421         * gnulib/import/rewinddir.c: New file.
1422         * gnulib/import/save-cwd.c: New file.
1423         * gnulib/import/save-cwd.h: New file.
1424         * gnulib/import/strdup.c: New file.
1425         * gnulib/import/strerror-override.c: New file.
1426         * gnulib/import/strerror-override.h: New file.
1427         * gnulib/import/strerror.c: New file.
1428         * gnulib/import/unistd--.h: New file.
1429         * gnulib/import/unistd-safer.h: New file.
1430         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1431         "getcwd" and "glob".
1432         * ser-tcp.c: Undefine "close" before redefining it.
1433
1434 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1435
1436         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1437         get rid of res_val.
1438
1439 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1440
1441         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1442         <sol2,sparc>: Likewise.
1443         <sol2-64,i386>: Likewise.
1444
1445         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1446         -Wdeprecated-declarations on *-*-solaris*.
1447         * configure: Regenerate.
1448
1449         * procfs.c: Include "nat/inferior.h".
1450         (procfs_info_proc): Fix typo.
1451
1452 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1453
1454         * remote.c (vector): Include.
1455         (struct private_thread_info): Add field, thread_handle.
1456         (free_private_thread_info): Deallocate storage associated with
1457         thread handle.
1458         (get_private_info_thread): Initialize `thread_handle' field.
1459         (struct thread_item): Add field, thread_handle.
1460         (clear_threads_listing_context): Deallocate storage associated
1461         with thread handle.
1462         (start_thread): Add support for "handle" attribute.
1463         (thread_attributes): Add "handle".
1464         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1465         field.
1466         (remote_update_thread_list): Update thread_handle.
1467         (remote_thread_handle_to_thread_info): New function.
1468         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1469
1470 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1471
1472         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1473         function.
1474         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1475         * python/python-internal.h (thread_object_type): Declare.
1476
1477 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1478
1479         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1480         (target_thread_handle_to_thread_info): Declare.
1481         * target.c (target_thread_handle_to_thread_info): New function.
1482         * target-delegates.c: Regenerate.
1483         * gdbthread.h (find_thread_by_handle): Declare.
1484         * thread.c (find_thread_by_handle): New function.
1485         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1486         function.
1487         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1488
1489 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1490
1491         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1492
1493 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1494
1495         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1496
1497 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1498
1499         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1500         to gdb_target_obs.
1501
1502 2017-09-20  Tom Tromey  <tom@tromey.com>
1503
1504         * breakpoint.c (struct counted_command_line): Remove.
1505         (breakpoint_commands): Update.
1506         (alloc_counted_command_line, incref_counted_command_line)
1507         (decref_counted_command_line, do_cleanup_counted_command_line)
1508         (make_cleanup_decref_counted_command_line): Remove.
1509         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1510         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1511         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1512         (save_breakpoints): Update.
1513         * breakpoint.h (counted_command_line): Now a typedef to
1514         shared_ptr.
1515         (struct breakpoint) <commands>: Now a counted_command_line.
1516         (struct bpstats) <command>: Likewise.
1517
1518 2017-09-20  Tom Tromey  <tom@tromey.com>
1519
1520         * breakpoint.c (struct commands_info, do_map_commands_command):
1521         Remove.
1522         (commands_command_1): Update.
1523         (iterate_over_related_breakpoints): Take a function_view.
1524         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1525         (delete_command): Update.
1526         (map_breakpoint_numbers): Take a function_view.
1527         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1528         (disable_command): Update.
1529         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1530         (enable_command): Update.
1531         (struct disp_data, do_enable_breakpoint_disp)
1532         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1533         (do_map_enable_delete_breakpoint): Remove.
1534         (enable_once_command, enable_count_command, enable_delete_command)
1535         (delete_trace_variable_command): Update.
1536
1537 2017-09-20  Tom Tromey  <tom@tromey.com>
1538
1539         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1540         (bpstat_clear): Use delete.
1541         (bpstats): New constructors.
1542         (bpstat_copy, bpstat_stop_status): Use new.
1543         (dprintf_after_condition_true): Update.
1544         * breakpoint.h (bpstats::bpstats): Add constructors.
1545         (bpstats::~bpstats): Add destructor.
1546
1547 2017-09-20  Pedro Alves  <palves@redhat.com>
1548
1549         * eval.c (make_params): Delete, refactored as ...
1550         (class fake_method): ... this new type's ctor.
1551         (fake_method::~fake_method): New.
1552         (evaluate_subexp_standard): Use 'fake_method'.
1553
1554 2017-09-20  Tom Tromey  <tom@tromey.com>
1555
1556         * windows-nat.c (get_windows_debug_event, windows_wait)
1557         (do_initial_windows_stuff, windows_attach): Update.
1558         * utils.c (vwarning, internal_vproblem): Update.
1559         (ui_unregister_input_event_handler_cleanup)
1560         (prepare_to_handle_input): Remove.
1561         (class scoped_input_handler): New.
1562         (defaulted_query, prompt_for_continue): Update.
1563         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1564         Update.
1565         * top.c (undo_terminal_modifications_before_exit): Update.
1566         * target/target.h (target_terminal_init, target_terminal_inferior)
1567         (target_terminal_ours): Don't declare.
1568         (class target_terminal): New.
1569         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1570         (target_terminal_ours_for_output)
1571         (make_cleanup_restore_target_terminal): Don't declare.
1572         (target_terminal_info): Remove.
1573         * target.c (enum terminal_state, terminal_state): Remove.
1574         (target_terminal::terminal_state): Define.
1575         (target_terminal::init): Rename from target_terminal_init.
1576         (target_terminal::inferior): Rename from
1577         target_terminal_inferior.
1578         (target_terminal::ours): Rename from target_terminal_ours.
1579         (target_terminal::ours_for_output): Rename from
1580         target_terminal_ours_for_output.
1581         (target_terminal::info): New method.
1582         (cleanup_restore_target_terminal)
1583         (make_cleanup_restore_target_terminal): Remove.
1584         * solib.c (handle_solib_event): Update.
1585         * remote.c (remote_serial_quit_handler): Update.
1586         (remote_terminal_inferior, remote_wait_as): Update.
1587         * record-full.c (record_full_wait_1): Update.
1588         * nto-procfs.c (procfs_create_inferior): Update.
1589         * nat/fork-inferior.c (startup_inferior): Update.
1590         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1591         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1592         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1593         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1594         (mi_breakpoint_created, mi_breakpoint_deleted)
1595         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1596         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1597         (mi_user_selected_context_changed, report_initial_inferior):
1598         Update.
1599         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1600         (linux_nat_terminal_inferior): Update.
1601         * infrun.c (follow_fork_inferior)
1602         (handle_vfork_child_exec_or_exit, do_target_resume)
1603         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1604         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1605         Update.
1606         * inflow.c (child_terminal_init, info_terminal_command): Update.
1607         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1608         (attach_command): Update.
1609         * infcall.c (call_thread_fsm_should_stop): Update.
1610         * gnu-nat.c (gnu_attach): Update.
1611         * extension.c (struct active_ext_lang_state)
1612         (restore_active_ext_lang): Update.
1613         * exceptions.c (print_flush): Update.
1614         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1615         (struct quit_handler_cleanup_data, restore_quit_handler)
1616         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1617         Remove.
1618         * cp-support.c (gdb_demangle): Update.
1619         * breakpoint.c (update_inserted_breakpoint_locations)
1620         (insert_breakpoint_locations, handle_jit_event)
1621         (disable_breakpoints_in_unloaded_shlib): Update.
1622         * annotate.c (annotate_breakpoints_invalid)
1623         (annotate_frames_invalid): Update.
1624
1625 2017-09-20  Tom Tromey  <tom@tromey.com>
1626
1627         * main.c (catch_command_errors): Rename from
1628         catch_command_errors_const.
1629         (captured_main_1): Update.
1630
1631 2017-09-20  Pedro Alves  <palves@redhat.com>
1632
1633         * cli/cli-cmds.c (list_command): Use print_sal_location.
1634         (print_sal_location): New function.
1635         (ambiguous_line_spec): Use print_sal_location.
1636         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1637         * symtab.c (find_function_start_sal): Likewise.
1638         * symtab.h (symtab_and_line::symbol): New field.
1639
1640 2017-09-20  Pedro Alves  <palves@redhat.com>
1641
1642         * linespec.c (minsym_found): Handle non-text minsyms.
1643         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1644
1645 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1646
1647         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1648         backslash.
1649
1650 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1651
1652         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1653         vmovups instead vmovaps.
1654         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1655
1656 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1657
1658         * NEWS (Changes since GDB 8.0): Add starti.
1659         * infcmd.c (enum run_break): New.
1660         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1661         case.
1662         (run_command): Use enum run_how.
1663         (start_command): Likewise.
1664         (starti_command): New function.
1665         (RUN_ARGS_HELP): New macro.
1666         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1667         commands.  Add starti command.
1668
1669 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1670
1671         * Makefile.in (monitor.o): Remove the rule.
1672
1673 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1674
1675         * annotate.h (struct annotate_arg_emitter): Use
1676         DISABLE_COPY_AND_ASSIGN.
1677         * common/refcounted-object.h (refcounted_object): Likewise.
1678         * completer.h (struct completion_result): Likewise.
1679         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1680         * filename-seen-cache.h (filename_seen_cache): Likewise.
1681         * gdbcore.h (thread_section_name): Likewise.
1682         * gdb_regex.h (compiled_regex): Likewise.
1683         * gdbthread.h (scoped_restore_current_thread): Likewise.
1684         * inferior.h (scoped_restore_current_inferior): Likewise.
1685         * jit.c (jit_reader): Likewise.
1686         * linespec.h (struct linespec_result): Likewise.
1687         * mi/mi-parse.h (struct mi_parse): Likewise.
1688         * nat/fork-inferior.c (execv_argv): Likewise.
1689         * progspace.h (scoped_restore_current_program_space): Likewise.
1690         * python/python-internal.h (class gdbpy_enter): Likewise.
1691         * regcache.h (regcache): Likewise.
1692         * target-descriptions.c (struct tdesc_reg): Likewise.
1693         (struct tdesc_type): Likewise.
1694         (struct tdesc_feature): Likewise.
1695         * ui-out.h (ui_out_emit_type): Likewise.
1696
1697 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1698
1699         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1700         label abort_expression.
1701
1702 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1703
1704         * common/buffer.c (buffer_xml_printf): Adjust.
1705         * common/xml-utils.c (xml_escape_text): Change return type to
1706         std::string, update code accordingly.
1707         * common/xml-utils.h (xml_escape_text): Change return type to
1708         std::string.
1709         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1710         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1711         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1712         Adjust.
1713
1714 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1715
1716         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1717         (SUBDIR_UNITTESTS_OBS): Add new object file.
1718         * unittests/xml-utils-selftests.c: New file.
1719
1720 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1721
1722         * common/selftest.h (selftest): New struct/interface.
1723         (register_test): Add name parameter, add new overload.
1724         (run_tests): Add filter parameter.
1725         (for_each_selftest_ftype): New typedef.
1726         (for_each_selftest): New declaration.
1727         * common/selftest.c (tests): Change type to
1728         map<string, unique_ptr<selftest>>.
1729         (simple_selftest): New struct.
1730         (register_test): New function.
1731         (register_test): Add name parameter and use it.
1732         (run_tests): Add filter parameter and use it.  Add prints.
1733         Adjust to vector -> map change.
1734         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1735         registering selftests.
1736         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1737         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1738         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1739         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1740         * findvar.c (_initialize_findvar): Likewise.
1741         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1742         * maint.c (maintenance_selftest): Update call to run_tests.
1743         (maintenance_info_selftests): New function.
1744         (_initialize_maint_cmds): Register "maintenance info selftests"
1745         command.  Update "maintenance selftest" doc.
1746         * regcache.c (_initialize_regcache): Add names when registering
1747         selftests.
1748         * rust-exp.y (_initialize_rust_exp): Likewise.
1749         * selftest-arch.c (gdbarch_selftest): New struct.
1750         (gdbarch_tests): Remove.
1751         (register_test_foreach_arch): Add name parameter.  Call
1752         register_test.
1753         (tests_with_arch): Remove, move most content to
1754         gdbarch_selftest::operator().
1755         (_initialize_selftests_foreach_arch): Remove.
1756         * selftest-arch.h (register_test_foreach_arch): Add name
1757         parameter.
1758         (run_tests_with_arch): New declaration.
1759         * utils-selftests.c (_initialize_utils_selftests): Add names
1760         when registering selftests.
1761         * utils.c (_initialize_utils): Likewise.
1762         * unittests/array-view-selftests.c
1763         (_initialize_array_view_selftests): Likewise.
1764         * unittests/environ-selftests.c (_initialize_environ_selftests):
1765         Likewise.
1766         * unittests/function-view-selftests.c
1767         (_initialize_function_view_selftests): Likewise.
1768         * unittests/offset-type-selftests.c
1769         (_initialize_offset_type_selftests): Likewise.
1770         * unittests/optional-selftests.c
1771         (_initialize_optional_selftests): Likewise.
1772         * unittests/scoped_restore-selftests.c
1773         (_initialize_scoped_restore_selftests): Likewise.
1774         * NEWS: Document "maintenance selftest" and "maint info
1775         selftests".
1776
1777 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1778
1779         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1780         scoped_restore.
1781
1782 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1783
1784         * mi/mi-main.c (mi_load_progress): Make uiout variable
1785         a unique_ptr.
1786
1787 2017-09-15  Pedro Alves  <palves@redhat.com>
1788
1789         * compile/compile-c-types.c (convert_enum, convert_int)
1790         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1791
1792 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1793
1794         * dwarf2read.c (copy_string): Remove.
1795         (parse_macro_definition): Replace copy_string with savestring.
1796
1797 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1798
1799         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1800         gdb_target_obs.
1801         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1802         Likewise.
1803         (i[34567]86-*-linux*): Likewise.
1804
1805 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1806
1807         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1808         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1809         <stack>: Change type to std::vector.
1810         <stack_len, stack_allocated>: Remove.
1811         <grow_stack>: Remove.
1812         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1813         (dwarf_expr_context::~dwarf_expr_context): Remove.
1814         (dwarf_expr_context::grow_stack): Remove.
1815         (dwarf_expr_context::push): Adjust.
1816         (dwarf_expr_context::pop): Adjust.
1817         (dwarf_expr_context::fetch): Adjust.
1818         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1819         (dwarf_expr_context::stack_empty_p): Adjust.
1820         (dwarf_expr_context::execute_stack_op): Adjust.
1821
1822 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1823
1824         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1825         return type to bool.
1826         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1827
1828 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1829
1830         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1831         Change type to bool.
1832         (dwarf_stack_value) <in_stack_memory>: Likewise.
1833         (dwarf_expr_context) <push_address>: Change parameter type to
1834         bool.
1835         <fetch_in_stack_memory>: Change return type to bool.
1836         <push>: Change parameter type to bool.
1837         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1838         to bool.
1839         (dwarf_expr_context::push_address): Likewise.
1840         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1841         to bool.
1842         (dwarf_expr_context::execute_stack_op): Adjust.
1843         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1844
1845 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1846
1847         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1848         (struct dwarf_expr_context) <n_pieces>: Remove.
1849         <pieces>: Change type to std::vector.
1850         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1851         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1852         pieces.
1853         (dwarf_expr_context::add_piece): Adjust.
1854         * dwarf2loc.c (struct piece_closure): Initialize fields.
1855         <n_pieces>: Remove.
1856         <pieces>: Change type to std::vector.
1857         (allocate_piece_closure): Adjust, change parameter to
1858         std::vector rvalue and std::move it to piece_closure.
1859         (rw_pieced_value): Adjust.
1860         (check_pieced_synthetic_pointer): Adjust.
1861         (indirect_synthetic_pointer): Adjust.
1862         (coerce_pieced_ref): Adjust.
1863         (free_pieced_value_closure):  Adjust.  Use delete to free
1864         piece_closure.
1865         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
1866         to allocate_piece_closure.
1867         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1868
1869 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1870
1871         * probe.h (probe_ops_cp): Remove typedef.
1872         (DEF_VEC_P (probe_ops_cp)): Remove.
1873         (all_probe_ops): Change type to std::vector.
1874         * probe.c (info_probes_for_ops): Adjust to vector change.
1875         (probe_linespec_to_ops): Likewise.
1876         (all_probe_ops): Change type to std::vector.
1877         (_initialize_probe): Adjust to vector change.
1878         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1879         * elfread.c (elf_get_probes): Likewise.
1880         * stap-probe.c (_initialize_stap_probe): Likewise.
1881
1882 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1883
1884         * probe.h (struct bound_probe): Define constructors.
1885         * probe.c (bound_probe_s): Remove typedef.
1886         (DEF_VEC_O (bound_probe_s)): Remove VEC.
1887         (collect_probes): Change return type to std::vector, remove
1888         cleanup.
1889         (compare_probes): Return bool, change parameter type.  Change
1890         semantic to "less than".
1891         (gen_ui_out_table_header_info): Change parameter to std::vector
1892         and update.
1893         (exists_probe_with_pops): Likewise.
1894         (info_probes_for_ops): Update to std::vector change.
1895         (enable_probes_command): Likewise.
1896         (disable_probes_command): Likewise.
1897
1898 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1899
1900         * probe.h (struct probe_ops) <get_probes>: Change parameter from
1901         vec to std::vector.
1902         * probe.c (parse_probes_in_pspace): Update.
1903         (find_probes_in_objfile): Update.
1904         (find_probe_by_pc): Update.
1905         (collect_probes): Update.
1906         (probe_any_get_probes): Update.
1907         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1908         return type to reference to std::vector.
1909         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1910         std::vector and update.
1911         (dtrace_process_dof): Likewise.
1912         (dtrace_get_probes): Likewise.
1913         * elfread.c (elf_get_probes): Change return type to std::vector,
1914         store an std::vector in bfd_data.
1915         (probe_key_free): Update to std::vector.
1916         * stap-probe.c (handle_stap_probe): Change parameter to
1917         std::vector and update.
1918         (stap_get_probes): Likewise.
1919         * symfile-debug.c (debug_sym_get_probes): Change return type to
1920         std::vector and update.
1921
1922 2017-09-11  Tom Tromey  <tom@tromey.com>
1923
1924         * breakpoint.c (program_breakpoint_here_p): Update.
1925         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1926         from make_show_memory_breakpoints_cleanup.  Return a
1927         scoped_restore_tmpl<int>.
1928         (restore_show_memory_breakpoints): Remove.
1929         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1930         * mem-break.c (memory_validate_breakpoint): Update.
1931         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1932         (ia64_memory_remove_breakpoint): Update.
1933         (ia64_breakpoint_from_pc): Update.
1934         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1935         from make_show_memory_breakpoints_cleanup.
1936
1937 2017-09-11  Tom Tromey  <tom@tromey.com>
1938
1939         * d-namespace.c (d_lookup_symbol): Use std::string.
1940         (find_symbol_in_baseclass): Likewise.
1941
1942 2017-09-11  Tom Tromey  <tom@tromey.com>
1943
1944         * ctf.c (ctf_start): Use std::string.
1945
1946 2017-09-11  Tom Tromey  <tom@tromey.com>
1947
1948         * ada-lang.c (is_known_support_routine): Update.
1949         (ada_unhandled_exception_name_addr_from_raise): Update.
1950         * guile/scm-frame.c (gdbscm_frame_name): Update.
1951         * python/py-frame.c (frapy_name): Update.
1952         (frapy_function): Update.
1953         * stack.h (find_frame_funname): Update.
1954         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1955         (print_frame): Update.
1956
1957 2017-09-11  Tom Tromey  <tom@tromey.com>
1958
1959         * findcmd.c (put_bits): Take a gdb::byte_vector.
1960         (parse_find_args): Return gdb::byte_vector.  "args" now const.
1961         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
1962         cleanups.
1963         (find_command): Update.
1964
1965 2017-09-11  Tom Tromey  <tom@tromey.com>
1966
1967         * cli/cli-script.c (class scoped_restore_hook_in): New.
1968         (clear_hook_in_cleanup): Remove.
1969         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1970         scoped_restore_hook_in.
1971
1972 2017-09-11  Tom Tromey  <tom@tromey.com>
1973
1974         * cli/cli-script.c (restore_interp): Remove.
1975         (read_command_lines): Use scoped_restore_interp.
1976         * interps.c (scoped_restore_interp::set_temp): Rename from
1977         interp_set_temp.
1978         * interps.h (class scoped_restore_interp): New.
1979         (interp_set_temp): Remove.
1980
1981 2017-09-11  Tom Tromey  <tom@tromey.com>
1982
1983         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1984         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1985         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1986         scoped_restore.
1987         (mi_cmd_break_insert_1): Update.
1988         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1989         scoped_restore.
1990
1991 2017-09-11  Tom Tromey  <tom@tromey.com>
1992
1993         * demangle.c (demangle_command): Update.
1994         * breakpoint.c (disable_command): Update.
1995         (enable_command): Update.
1996         (find_location_by_number): Make "number" const.  Use
1997         get_number_trailer.
1998         * cli/cli-utils.c (extract_arg): Return std::string.
1999         * probe.c (parse_probe_linespec): Update.  Change types.
2000         (collect_probes): Take string arguments.
2001         (parse_probe_linespec): Likewise.
2002         (info_probes_for_ops): Update.
2003         (enable_probes_command): Update.
2004         (disable_probes_command): Update.
2005         * break-catch-sig.c (catch_signal_split_args): Update.
2006         * mi/mi-parse.c (mi_parse): Update.
2007
2008 2017-09-11  Tom Tromey  <tom@tromey.com>
2009
2010         * language.h (language_enum): Make argument const.
2011         * language.c (language_enum): Make argument const.
2012
2013 2017-09-11  Tom Tromey  <tom@tromey.com>
2014
2015         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2016         as function.
2017         (skip_to_space): Rename from skip_to_space_const.
2018         * common/common-utils.c (skip_to_space): New function.
2019         (skip_to_space): Rename from skip_to_space_const.
2020         * cli/cli-utils.h (get_number): Rename from get_number_const.
2021         (extract_arg): Rename from extract_arg_const.
2022         * cli/cli-utils.c (get_number): Rename from get_number_const.
2023         (extract_arg): Rename from extract_arg_const.
2024         (number_or_range_parser::get_number): Use ::get_number.
2025         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2026         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2027         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2028         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2029         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2030         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2031         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2032         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2033
2034 2017-09-11  Tom Tromey  <tom@tromey.com>
2035
2036         * python/python.c (do_start_initialization): Use
2037         py-event-types.def to initialize types.
2038         Define all object type structures.
2039         * python/python-internal.h: Don't declare event initialization
2040         functions.
2041         * python/py-threadevent.c (thread_event_object_type): Don't
2042         define.
2043         * python/py-stopevent.c (stop_event_object_type): Don't define.
2044         * python/py-signalevent.c (signal_event_object_type): Don't
2045         declare or define.
2046         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2047         (clear_objfiles_event_object_type): Don't declare or define.
2048         * python/py-infevents.c (inferior_call_pre_event_object_type)
2049         (inferior_call_post_event_object_type)
2050         (register_changed_event_object_type)
2051         (memory_changed_event_object_type): Don't declare or define.
2052         * python/py-inferior.c (new_thread_event_object_type)
2053         (new_inferior_event_object_type)
2054         (inferior_deleted_event_object_type): Don't declare or define.
2055         * python/py-exitedevent.c (exited_event_object_type): Don't
2056         declare or define.
2057         * python/py-evts.c (gdbpy_initialize_py_events): Use
2058         py-all-events.def.
2059         * python/py-events.h (thread_event_object_type): Don't declare.
2060         (events_object): Use py-all-events.def.
2061         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2062         py-event-types.def.
2063         * python/py-event-types.def: New file.
2064         * python/py-continueevent.c (create_continue_event_object): Don't
2065         declare or define.
2066         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2067         declare or define.
2068         * python/py-all-events.def: New file.
2069
2070 2017-09-11  Tom Tromey  <tom@tromey.com>
2071
2072         * python/py-threadevent.c (create_thread_event_object): Return
2073         gdbpy_ref.
2074         * python/py-stopevent.h (create_stop_event_object)
2075         (create_breakpoint_event_object, create_signal_event_object):
2076         Update.
2077         * python/py-stopevent.c (create_stop_event_object): Return
2078         gdbpy_ref.
2079         (emit_stop_event): Update.
2080         * python/py-signalevent.c (create_signal_event_object): Return
2081         gdbpy_ref.
2082         * python/py-infevents.c (create_inferior_call_event_object):
2083         Update.
2084         * python/py-event.h (create_event_object)
2085         (create_thread_event_object): Update.
2086         * python/py-event.c (create_event_object): Return gdbpy_ref.
2087         * python/py-continueevent.c: Return gdbpy_ref.
2088         * python/py-bpevent.c (create_breakpoint_event_object): Return
2089         gdbpy_ref.
2090
2091 2017-09-11  Tom Tromey  <tom@tromey.com>
2092
2093         PR python/15622:
2094         * NEWS: Add entry.
2095         * python/python.c (do_start_initialization): Initialize new event
2096         types.
2097         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2098         (gdbpy_initialize_inferior_deleted_event)
2099         (gdbpy_initialize_new_thread_event): Declare.
2100         * python/py-threadevent.c (create_thread_event_object): Add option
2101         "thread" parameter.
2102         * python/py-inferior.c (new_thread_event_object_type)
2103         (new_inferior_event_object_type)
2104         (inferior_deleted_event_object_type): Declare.
2105         (python_new_inferior, python_inferior_deleted): New functions.
2106         (add_thread_object): Emit new_thread event.
2107         (gdbpy_initialize_inferior): Attach new functions to corresponding
2108         observers.
2109         (new_thread, new_inferior, inferior_deleted): Define new event
2110         types.
2111         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2112         registries.
2113         * python/py-events.h (events_object) <new_inferior,
2114         inferior_deleted, new_thread>: New fields.
2115         * python/py-event.h (create_thread_event_breakpoint): Add optional
2116         "thread" parameter.
2117
2118 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2119
2120         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2121         check current_ui instead.
2122         (internal_vproblem): Likewise.
2123
2124 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2125
2126         * thread.c (print_thread_info_1): Remove unnecessary calls to
2127         uiout->is_mi_like_p.
2128
2129 2017-09-09  Tom Tromey  <tom@tromey.com>
2130
2131         * namespace.h (add_using_directive): Update.
2132         * namespace.c (add_using_directive): Change type of excludes to
2133         std::vector.
2134         * dwarf2read.c (read_import_statement): Use std::vector.
2135         (read_namespace): Update.
2136         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2137
2138 2017-09-09  Tom Tromey  <tom@tromey.com>
2139
2140         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2141
2142 2017-09-09  Tom Tromey  <tom@tromey.com>
2143
2144         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2145
2146 2017-09-09  Tom Tromey  <tom@tromey.com>
2147
2148         * stack.c (func_command): Use gdb::def_vector.
2149
2150 2017-09-09  Tom Tromey  <tom@tromey.com>
2151
2152         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2153         ui_out_emit_list, ui_out_emit_tuple.
2154         (mi_cmd_var_update): Likewise.
2155
2156 2017-09-09  Tom Tromey  <tom@tromey.com>
2157
2158         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2159         ui_out_redirect_pop.
2160         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2161         ui_out_redirect_pop.
2162         * utils.c (do_ui_out_redirect_pop)
2163         (make_cleanup_ui_out_redirect_pop): Remove.
2164         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2165         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2166         * ui-out.h (ui_out_redirect_pop): New class.
2167
2168 2017-09-09  Tom Tromey  <tom@tromey.com>
2169
2170         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2171         (list_available_thread_groups, mi_cmd_list_thread_groups)
2172         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2173         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2174         Likewise.
2175
2176 2017-09-09  Tom Tromey  <tom@tromey.com>
2177
2178         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2179         ui_out_emit_tuple.
2180
2181 2017-09-09  Tom Tromey  <tom@tromey.com>
2182
2183         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2184         * stack.c (print_frame): Use ui_out_emit_tuple.
2185         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2186         (info_spu_mailbox_command, info_spu_dma_command)
2187         (info_spu_proxydma_command): Likewise.
2188         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2189         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2190         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2191         ui_out_emit_tuple.
2192         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2193
2194 2017-09-09  Tom Tromey  <tom@tromey.com>
2195
2196         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2197         (class ui_out_emit_table): Update comment.
2198         * ui-out.c (do_cleanup_table_end)
2199         (make_cleanup_ui_out_table_begin_end): Remove.
2200         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2201         (info_spu_dma_cmdlist): Likewise.
2202         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2203         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2204         ui_out_emit_table.
2205
2206 2017-09-09  Tom Tromey  <tom@tromey.com>
2207
2208         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2209         ui_out_emit_list, gdb::optional.
2210
2211 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2212
2213         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2214         prototype.
2215         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2216         prototype.
2217         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2218         prototype.
2219         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2220         * ada-exp.y: Remove _initialize_ada_exp prototype.
2221         * ada-lang.c: Remove _initialize_ada_language prototype.
2222         * ada-tasks.c: Remove _initialize_tasks prototype.
2223         * addrmap.c: Remove _initialize_addrmap prototype.
2224         * agent.c: Remove _initialize_agent prototype.
2225         * aix-thread.c: Remove _initialize_aix_thread prototype.
2226         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2227         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2228         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2229         prototype.
2230         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2231         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2232         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2233         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2234         prototype.
2235         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2236         prototype.
2237         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2238         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2239         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2240         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2241         prototype.
2242         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2243         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2244         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2245         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2246         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2247         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2248         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2249         prototype.
2250         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2251         prototype.
2252         * annotate.c: Remove _initialize_annotate prototype.
2253         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2254         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2255         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2256         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2257         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2258         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2259         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2260         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2261         prototype.
2262         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2263         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2264         * auto-load.c: Remove _initialize_auto_load prototype.
2265         * auxv.c: Remove _initialize_auxv prototype.
2266         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2267         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2268         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2269         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2270         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2271         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2272         prototype.
2273         * break-catch-throw.c: Remove _initialize_break_catch_throw
2274         prototype.
2275         * breakpoint.c: Remove _initialize_breakpoint prototype.
2276         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2277         * btrace.c: Remove _initialize_btrace prototype.
2278         * charset.c: Remove _initialize_charset prototype.
2279         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2280         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2281         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2282         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2283         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2284         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2285         * coffread.c: Remove _initialize_coffread prototype.
2286         * compile/compile.c: Remove _initialize_compile prototype.
2287         * complaints.c: Remove _initialize_complaints prototype.
2288         * completer.c: Remove _initialize_completer prototype.
2289         * copying.awk: Remove _initialize_copying prototype.
2290         * copying.c: Regenerate.
2291         * core-regset.c: Remove _initialize_core_regset prototype.
2292         * corefile.c: Remove _initialize_core prototype.
2293         * corelow.c: Remove _initialize_corelow prototype.
2294         * cp-abi.c: Remove _initialize_cp_abi prototype.
2295         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2296         * cp-support.c: Remove _initialize_cp_support prototype.
2297         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2298         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2299         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2300         * ctf.c: Remove _initialize_ctf prototype.
2301         * d-lang.c: Remove _initialize_d_language prototype.
2302         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2303         prototype.
2304         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2305         * dbxread.c: Remove _initialize_dbxread prototype.
2306         * dcache.c: Remove _initialize_dcache prototype.
2307         * demangle.c: Remove _initialize_demangler prototype.
2308         * disasm-selftests.c: Remove _initialize_disasm_selftests
2309         prototype.
2310         * disasm.c: Remove _initialize_disasm prototype.
2311         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2312         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2313         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2314         prototype.
2315         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2316         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2317         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2318         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2319         * elfread.c: Remove _initialize_elfread prototype.
2320         * exec.c: Remove _initialize_exec prototype.
2321         * extension.c: Remove _initialize_extension prototype.
2322         * f-lang.c: Remove _initialize_f_language prototype.
2323         * f-valprint.c: Remove _initialize_f_valprint prototype.
2324         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2325         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2326         * filesystem.c: Remove _initialize_filesystem prototype.
2327         * findcmd.c: Remove _initialize_mem_search prototype.
2328         * fork-child.c: Remove _initialize_fork_child prototype.
2329         * frame-base.c: Remove _initialize_frame_base prototype.
2330         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2331         * frame.c: Remove _initialize_frame prototype.
2332         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2333         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2334         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2335         * gcore.c: Remove _initialize_gcore prototype.
2336         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2337         * gdbarch.c: Regenerate.
2338         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2339         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2340         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2341         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2342         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2343         * go-lang.c: Remove _initialize_go_language prototype.
2344         * go32-nat.c: Remove _initialize_go32_nat prototype.
2345         * guile/guile.c: Remove _initialize_guile prototype.
2346         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2347         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2348         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2349         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2350         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2351         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2352         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2353         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2354         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2355         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2356         prototype.
2357         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2358         prototype.
2359         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2360         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2361         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2362         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2363         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2364         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2365         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2366         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2367         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2368         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2369         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2370         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2371         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2372         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2373         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2374         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2375         prototype.
2376         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2377         prototype.
2378         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2379         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2380         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2381         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2382         * infcall.c: Remove _initialize_infcall prototype.
2383         * infcmd.c: Remove _initialize_infcmd prototype.
2384         * inferior.c: Remove _initialize_inferiors prototype.
2385         * inflow.c: Remove _initialize_inflow prototype.
2386         * infrun.c: Remove _initialize_infrun prototype.
2387         * interps.c: Remove _initialize_interpreter prototype.
2388         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2389         * jit.c: Remove _initialize_jit prototype.
2390         * language.c: Remove _initialize_language prototype.
2391         * linux-fork.c: Remove _initialize_linux_fork prototype.
2392         * linux-nat.c: Remove _initialize_linux_nat prototype.
2393         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2394         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2395         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2396         * m2-lang.c: Remove _initialize_m2_language prototype.
2397         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2398         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2399         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2400         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2401         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2402         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2403         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2404         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2405         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2406         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2407         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2408         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2409         * machoread.c: Remove _initialize_machoread prototype.
2410         * macrocmd.c: Remove _initialize_macrocmd prototype.
2411         * macroscope.c: Remove _initialize_macroscope prototype.
2412         * maint.c: Remove _initialize_maint_cmds prototype.
2413         * mdebugread.c: Remove _initialize_mdebugread prototype.
2414         * memattr.c: Remove _initialize_mem prototype.
2415         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2416         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2417         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2418         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2419         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2420         * microblaze-linux-tdep.c: Remove
2421         _initialize_microblaze_linux_tdep prototype.
2422         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2423         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2424         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2425         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2426         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2427         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2428         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2429         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2430         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2431         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2432         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2433         prototype.
2434         * mipsread.c: Remove _initialize_mipsread prototype.
2435         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2436         prototype.
2437         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2438         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2439         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2440         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2441         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2442         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2443         prototype.
2444         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2445         * nto-procfs.c: Remove _initialize_procfs prototype.
2446         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2447         * objc-lang.c: Remove _initialize_objc_language prototype.
2448         * objfiles.c: Remove _initialize_objfiles prototype.
2449         * observer.c: Remove observer_test_first_notification_function,
2450         observer_test_second_notification_function,
2451         observer_test_third_notification_function, and
2452         _initialize_observer prototypes.
2453         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2454         * osabi.c: Remove _initialize_gdb_osabi prototype.
2455         * osdata.c: Remove _initialize_osdata prototype.
2456         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2457         * parse.c: Remove _initialize_parse prototype.
2458         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2459         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2460         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2461         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2462         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2463         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2464         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2465         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2466         * printcmd.c: Remove _initialize_printcmd prototype.
2467         * probe.c: Remove _initialize_probe prototype.
2468         * proc-api.c: Remove _initialize_proc_api prototype.
2469         * proc-events.c: Remove _initialize_proc_events prototype.
2470         * proc-service.c: Remove _initialize_proc_service prototype.
2471         * procfs.c: Remove _initialize_procfs prototype.
2472         * psymtab.c: Remove _initialize_psymtab prototype.
2473         * python/python.c: Remove _initialize_python prototype.
2474         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2475         * record-btrace.c: Remove _initialize_record_btrace prototype.
2476         * record-full.c: Remove _initialize_record_full prototype.
2477         * record.c: Remove _initialize_record prototype.
2478         * regcache.c: Remove _initialize_regcache prototype.
2479         * reggroups.c: Remove _initialize_reggroup prototype.
2480         * remote-notif.c: Remove _initialize_notif prototype.
2481         * remote-sim.c: Remove _initialize_remote_sim prototype.
2482         * remote.c: Remove _initialize_remote prototype.
2483         * reverse.c: Remove _initialize_reverse prototype.
2484         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2485         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2486         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2487         prototype.
2488         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2489         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2490         * rust-exp.y: Remove _initialize_rust_exp prototype.
2491         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2492         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2493         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2494         * score-tdep.c: Remove _initialize_score_tdep prototype.
2495         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2496         prototype.
2497         * ser-go32.c: Remove _initialize_ser_dos prototype.
2498         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2499         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2500         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2501         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2502         * serial.c: Remove _initialize_serial prototype.
2503         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2504         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2505         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2506         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2507         * skip.c: Remove _initialize_step_skip prototype.
2508         * sol-thread.c: Remove _initialize_sol_thread prototype.
2509         * solib-aix.c: Remove _initialize_solib_aix prototype.
2510         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2511         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2512         * solib-frv.c: Remove _initialize_frv_solib prototype.
2513         * solib-spu.c: Remove _initialize_spu_solib prototype.
2514         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2515         * solib-target.c: Remove _initialize_solib_target prototype.
2516         * solib.c: Remove _initialize_solib prototype.
2517         * source.c: Remove _initialize_source prototype.
2518         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2519         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2520         prototype.
2521         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2522         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2523         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2524         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2525         prototype.
2526         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2527         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2528         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2529         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2530         prototype.
2531         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2532         prototype.
2533         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2534         prototype.
2535         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2536         prototype.
2537         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2538         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2539         prototype.
2540         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2541         prototype.
2542         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2543         prototype.
2544         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2545         prototype.
2546         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2547         prototype.
2548         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2549         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2550         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2551         * stabsread.c: Remove _initialize_stabsread prototype.
2552         * stack.c: Remove _initialize_stack prototype.
2553         * stap-probe.c: Remove _initialize_stap_probe prototype.
2554         * std-regs.c: Remove _initialize_frame_reg prototype.
2555         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2556         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2557         * symfile.c: Remove _initialize_symfile prototype.
2558         * symmisc.c: Remove _initialize_symmisc prototype.
2559         * symtab.c: Remove _initialize_symtab prototype.
2560         * target-dcache.c: Remove _initialize_target_dcache prototype.
2561         * target-descriptions.c: Remove _initialize_target_descriptions
2562         prototype.
2563         * thread.c: Remove _initialize_thread prototype.
2564         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2565         prototype.
2566         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2567         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2568         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2569         prototype.
2570         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2571         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2572         * tracefile.c: Remove _initialize_tracefile prototype.
2573         * tracepoint.c: Remove _initialize_tracepoint prototype.
2574         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2575         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2576         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2577         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2578         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2579         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2580         * tui/tui.c: Remove _initialize_tui prototype.
2581         * typeprint.c: Remove _initialize_typeprint prototype.
2582         * user-regs.c: Remove _initialize_user_regs prototype.
2583         * utils.c: Remove _initialize_utils prototype.
2584         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2585         * valarith.c: Remove _initialize_valarith prototype.
2586         * valops.c: Remove _initialize_valops prototype.
2587         * valprint.c: Remove _initialize_valprint prototype.
2588         * value.c: Remove _initialize_values prototype.
2589         * varobj.c: Remove _initialize_varobj prototype.
2590         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2591         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2592         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2593         * windows-nat.c: Remove _initialize_windows_nat,
2594         _initialize_check_for_gdb_ini, and _initialize_loadable
2595         prototypes.
2596         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2597         * xcoffread.c: Remove _initialize_xcoffread prototype.
2598         * xml-support.c: Remove _initialize_xml_support prototype.
2599         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2600         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2601         prototype.
2602         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2603         prototype.
2604         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2605
2606 2017-09-08  Keith Seitz  <keiths@redhat.com>
2607
2608         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2609         field.
2610
2611 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2612
2613         * f-valprint.c (f_val_print): Remove check for one byte
2614         sized integers. Remove printing of character type.
2615
2616 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2617             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2618             Bernhard Heckel  <bernhard.heckel@intel.com>
2619
2620         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2621         to maintain proper indentation when printing pointers/refs.
2622
2623 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2624
2625         GDB 8.0.1 released.
2626
2627 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2628
2629         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2630
2631 2017-09-05  Tom Tromey  <tom@tromey.com>
2632
2633         * parse.c (funcall_chain): Now a std::vector.
2634         (start_arglist, end_arglist): Simplify.
2635         (free_funcalls): Remove.
2636         (parse_exp_in_context_1): Remove cleanup.
2637
2638 2017-09-05  Tom Tromey  <tom@tromey.com>
2639
2640         * go-exp.y (go_parse): Don't create a cleanup.
2641
2642 2017-09-05  Tom Tromey  <tom@tromey.com>
2643
2644         * d-exp.y (PrimaryExpression): Use std::string.
2645         (d_parse): Don't create a cleanup.
2646
2647 2017-09-05  Tom Tromey  <tom@tromey.com>
2648
2649         * utils.c (do_clear_parser_state): Remove.
2650         (make_cleanup_clear_parser_state): Remove.
2651         * p-exp.y (pascal_parse): Use scoped_restore.
2652         * m2-exp.y (m2_parse): Use scoped_restore.
2653         * f-exp.y (f_parse): Use scoped_restore.
2654         * d-exp.y (d_parse): Use scoped_restore.
2655         * c-exp.y (c_parse): Use scoped_restore.
2656         * ada-exp.y (ada_parse): Use scoped_restore.
2657         * utils.h (make_cleanup_clear_parser_state): Remove.
2658
2659 2017-09-06  Keith Seitz  <keiths@redhat.com>
2660
2661         * dwarf2read.c (dw2_linkage_name_attr): New function.
2662         (dw2_linkage_name): New function.
2663         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2664         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2665         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2666
2667 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2668
2669         * config/djgpp/djconfig.sh: Correct shell portability issue.
2670
2671 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2672
2673         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2674
2675 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2676
2677         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2678         * NEWS: Mention new FreeBSD/mips native configuration.
2679         * configure.host: Add aarch64*-*-freebsd*.
2680         * configure.nat: Likewise.
2681         * aarch64-fbsd-nat.c: New file.
2682
2683 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2684
2685         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2686         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2687         * NEWS: Mention new FreeBSD/aarch64 target.
2688         * configure.tgt: Add aarch64*-*-freebsd*.
2689         * aarch64-fbsd-tdep.c: New file.
2690         * aarch64-fbsd-tdep.h: New file.
2691
2692 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2693
2694         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2695
2696 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2697
2698         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2699         of TLS symbols.
2700
2701 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2702
2703         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2704         call.
2705
2706 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2707
2708         * infrun.c (follow_exec): Call add_thread after
2709         target_find_description.
2710
2711 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2712
2713         * infrun.c (handle_inferior_event_1): When exec'ing, read
2714         stop_pc after follow_exec.
2715
2716 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2717
2718         * remote.c (process_g_packet): Update error message.
2719
2720 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2721
2722         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2723         targets.
2724
2725 2017-09-05  Pedro Alves  <palves@redhat.com>
2726
2727         * eval.c (eval_call, evaluate_funcall): New functions, factored
2728         out from ...
2729         (evaluate_subexp_standard): ... this.
2730
2731 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2732
2733         * amd64-tdep.c (amd64_target_description): Create target
2734         descriptions.
2735         (_initialize_amd64_tdep): Don't call functions
2736         initialize_tdesc_amd64_*.  Add self tests.
2737         * arch/amd64.c (amd64_create_target_description): Add parameter
2738         is_linux.  Call set_tdesc_osabi if is_linux is true.
2739         * arch/amd64.h (amd64_create_target_description): Update the
2740         declaration.
2741         * arch/i386.c (i386_create_target_description): Add parameter
2742         is_linux.  Call set_tdesc_osabi if is_linux is true.
2743         * arch/i386.h (i386_create_target_description): Update
2744         declaration.
2745         * configure.tgt: Add i386.o to gdb_target_obs.
2746         * features/Makefile (XMLTOC): Remove i386/*.xml.
2747         * features/i386/amd64-avx-avx512.c: Remove.
2748         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2749         * features/i386/amd64-avx-mpx.c: Remove.
2750         * features/i386/amd64-avx.c: Remove.
2751         * features/i386/amd64-mpx.c: Remove.
2752         * features/i386/amd64.c: Remove.
2753         * features/i386/i386-avx-avx512.c: Remove.
2754         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2755         * features/i386/i386-avx-mpx.c: Remove.
2756         * features/i386/i386-avx.c: Remove.
2757         * features/i386/i386-mmx.c: Remove.
2758         * features/i386/i386-mpx.c: Remove.
2759         * features/i386/i386.c: Remove.
2760         * i386-tdep.c: Don't include features/i386/i386*.c., include
2761         target-descriptions.h and arch/i386.h.
2762         (i386_target_description): Create target descriptions.
2763         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2764         functions.  Do self tests.
2765
2766 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2767
2768         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2769         * features/i386/amd64-avx-avx512-linux.c: Removed.
2770         * features/i386/amd64-avx-linux.c: Removed.
2771         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2772         * features/i386/amd64-avx-mpx-linux.c: Removed.
2773         * features/i386/amd64-linux.c: Removed.
2774         * features/i386/amd64-mpx-linux.c: Removed.
2775         * features/i386/x32-avx-avx512-linux.c: Removed.
2776         * features/i386/x32-avx-linux.c: Removed.
2777         * features/i386/x32-linux.c: Removed.
2778
2779 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2780
2781         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2782         features/i386/*.c.
2783         (amd64_linux_read_description): Call
2784         amd64_create_target_description.
2785         * arch/amd64.c: New file.
2786         * arch/amd64.h: New file.
2787         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2788         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2789
2790 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2791
2792         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2793         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2794         (amd64_linux_read_description): Create target descriptions.
2795         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2796         functions.  Add unit tests.
2797         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2798         x32-core.xml.
2799         * features/i386/64bit-avx.c: Generated.
2800         * features/i386/64bit-avx512.c: Generated.
2801         * features/i386/64bit-core.c: Generated.
2802         * features/i386/64bit-linux.c: Generated.
2803         * features/i386/64bit-mpx.c: Generated.
2804         * features/i386/64bit-pkeys.c: Generated.
2805         * features/i386/64bit-segments.c: Generated.
2806         * features/i386/64bit-sse.c: Generated.
2807         * features/i386/x32-core.c: Generated.
2808         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2809         c files for amd64-linux and x32-linux.
2810
2811 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2812
2813         * amd64-linux-tdep.c (amd64_linux_read_description): New
2814         function.
2815         (amd64_linux_core_read_description): Call
2816         amd64_linux_read_description.
2817         (amd64_linux_init_abi): Likewise.
2818         (amd64_x32_linux_init_abi): Likewise.
2819         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2820         * x86-linux-nat.c (x86_linux_read_description): Call
2821         amd64_linux_read_description.
2822
2823 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2824
2825         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2826         comments.
2827
2828 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2829
2830         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2831         * features/i386/i386-avx-avx512-linux.c: Remove.
2832         * features/i386/i386-avx-linux.c: Remove.
2833         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2834         * features/i386/i386-avx-mpx-linux.c: Remove.
2835         * features/i386/i386-linux.c: Remove.
2836         * features/i386/i386-mmx-linux.c: Remove.
2837         * features/i386/i386-mpx-linux.c: Remove.
2838
2839 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2840
2841         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2842         (SFILES): Add arch/i386.c.
2843         (HFILES_NO_SRCDIR): Add arch/i386.h.
2844         * arch/i386.c: New file.
2845         * arch/i386.h: New file.
2846         * arch/tdesc.h (allocate_target_description): Declare.
2847         (set_tdesc_architecture): Declare.
2848         (set_tdesc_osabi): Declare.
2849         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2850         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2851         include arch/i386.h.
2852         (i386_linux_read_description): Remove code and call
2853         i386_create_target_description.
2854         (set_tdesc_architecture): New function.
2855         (set_tdesc_osabi): New function.
2856         * target-descriptions.h (allocate_target_description): Remove.
2857
2858 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2859
2860         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2861         * target-descriptions.c (tdesc_create_feature): Likewise, and
2862         adjust code.
2863         * features/i386/32bit-avx.c: Re-generated.
2864         * features/i386/32bit-avx512.c: Re-generated.
2865         * features/i386/32bit-core.c: Re-generated.
2866         * features/i386/32bit-linux.c: Re-generated.
2867         * features/i386/32bit-mpx.c: Re-generated.
2868         * features/i386/32bit-pkeys.c: Re-generated.
2869         * features/i386/32bit-sse.c: Re-generated.
2870
2871 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2872
2873         * regformats/regdef.h (struct reg): Override operator == and !=.
2874
2875 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2876
2877         * arch/tdesc.h: New file.
2878         * regformats/regdat.sh: Generate code using tdesc_create_reg.
2879         * target-descriptions.c: Update comments.
2880         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
2881         declarations.
2882         * features/i386/32bit-avx.c: Re-generated.
2883         * features/i386/32bit-avx512.c: Re-generated.
2884         * features/i386/32bit-core.c: Re-generated.
2885         * features/i386/32bit-linux.c: Re-generated.
2886         * features/i386/32bit-mpx.c: Re-generated.
2887         * features/i386/32bit-pkeys.c: Re-generated.
2888         * features/i386/32bit-sse.c: Re-generated.
2889
2890 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2891
2892         * regformats/regdat.sh: Update generated code.
2893
2894 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2895
2896         * regformats/regdat.sh: Adjust code order.
2897
2898 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2899
2900         * expprint.c (dump_subexp_body_standard): Use constant format
2901         string in fprintf_filtered call.
2902
2903 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2904
2905         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2906         NetBSD/i386.
2907         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2908
2909 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2910
2911         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2912
2913 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2914
2915         * bsd-kvm.o: Define _KMEMUSER.
2916         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2917         * configure: Regenerate.
2918
2919 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2920
2921         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2922         * i386-fbsd-nat.c: Likewise.
2923
2924 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2925
2926         * unittests/array-view-selftests.c: Add include of <array>.
2927
2928 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2929
2930         * spu-tdep.c (flush_ea_cache): Add missing argument to
2931         call_function_by_hand.
2932
2933 2017-09-04  Pedro Alves  <palves@redhat.com>
2934
2935         * NEWS (Safer support for debugging with no debug info): New.
2936
2937 2017-09-04  Pedro Alves  <palves@redhat.com>
2938
2939         * c-exp.y (function_method, function_method_void): Add current
2940         instance flags to TYPE_INSTANCE.
2941         * dwarf2read.c (check_modifier): New.
2942         (compute_delayed_physnames): Assert that only C++ adds delayed
2943         physnames.  Mark fn_fields as const/volatile depending on
2944         physname.
2945         * eval.c (make_params): New type_instance_flags parameter.  Use
2946         it as the new type's instance flags.
2947         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2948         flags element and pass it to make_params.
2949         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2950         instance flags element.
2951         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2952         * gdbtypes.h: Include "enum-flags.h".
2953         (type_instance_flags): New enum-flags type.
2954         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2955         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2956         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2957         (follow_type_instance_flags): New function.
2958         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2959         * parser-defs.h (follow_type_instance_flags): Declare.
2960         * valops.c (value_struct_elt_for_reference): const/volatile must
2961         match too.
2962
2963 2017-09-04  Pedro Alves  <palves@redhat.com>
2964
2965         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2966         function/method scopes; lookup the nested name as a function local
2967         static variable.
2968
2969 2017-09-04  Pedro Alves  <palves@redhat.com>
2970
2971         (%type <voidval>): Add function_method.
2972         * c-exp.y (exp): New production for calls with no arguments.
2973         (function_method, function_method_void_or_typelist): New
2974         productions.
2975         (exp): New production for "method()::static_var".
2976         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2977         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2978         Handle OP_FUNC_STATIC_VAR.
2979         * parse.c (operator_length_standard):
2980         Handle OP_FUNC_STATIC_VAR.
2981
2982 2017-09-04  Pedro Alves  <palves@redhat.com>
2983
2984         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2985         handling.
2986         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2987         Ditto.
2988         * parse.c (operator_length_standard, operator_check_standard):
2989         Ditto.
2990         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2991
2992 2017-09-04  Pedro Alves  <palves@redhat.com>
2993
2994         * ax-gdb.c: Include "typeprint.h".
2995         (gen_expr_for_cast): New function.
2996         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2997         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2998         type is unknown.
2999         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3000         nodebug_data_symbol.
3001         * eval.c: Include "typeprint.h".
3002         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3003         Error out if symbol has unknown type.
3004         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3005         evaluate_subexp_for_cast.
3006         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3007         OP_VAR_MSYM_VALUE.
3008         (evaluate_subexp_for_cast): New function.
3009         * gdbtypes.c (init_nodebug_var_type): New function.
3010         (objfile_type): Use it to initialize types of variables with no
3011         debug info.
3012         * typeprint.c (error_unknown_type): New.
3013         * typeprint.h (error_unknown_type): New declaration.
3014         * compile/compile-c-types.c (convert_type_basic): Handle
3015         TYPE_CODE_ERROR; warn and fallback to int for variables with
3016         unknown type.
3017
3018 2017-09-04  Pedro Alves  <palves@redhat.com>
3019
3020         * eval.c (evaluate_var_value): New function, factored out from ...
3021         (evaluate_subexp_standard): ... here.
3022
3023 2017-09-04  Pedro Alves  <palves@redhat.com>
3024
3025         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3026         Remove useless assignments to 'op'.
3027
3028 2017-09-04  Pedro Alves  <palves@redhat.com>
3029
3030         * eval.c (eval_skip_value): New function.
3031         (evaluate_subexp_standard): Use it.
3032
3033 2017-09-04  Pedro Alves  <palves@redhat.com>
3034
3035         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3036         function name from symbol/minsym and pass it to
3037         error_call_unknown_return_type.
3038
3039 2017-09-04  Pedro Alves  <palves@redhat.com>
3040
3041         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3042         * ax-gdb.c (gen_msym_var_ref): New function.
3043         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3044         * eval.c (evaluate_var_msym_value): New function.
3045         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3046         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3047         to call_function_by_hand.
3048         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3049         Handle OP_VAR_MSYM_VALUE.
3050         (union exp_element) <msymbol>: New field.
3051         * minsyms.h (struct type): Forward declare.
3052         (find_minsym_type_and_address): Declare.
3053         * parse.c (write_exp_elt_msym): New function.
3054         (write_exp_msymbol): Delete, refactored as ...
3055         (find_minsym_type_and_address): ... this new function.
3056         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3057         (operator_length_standard, operator_check_standard): Handle
3058         OP_VAR_MSYM_VALUE.
3059         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3060
3061 2017-09-04  Pedro Alves  <palves@redhat.com>
3062
3063         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3064         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3065         unknown.
3066         * ada-typeprint.c (print_func_type): Handle functions with unknown
3067         return type.
3068         * c-typeprint.c (c_type_print_base): Handle functions and methods
3069         with unknown return type.
3070         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3071         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3072         * compile/compile-c-types.c: Include "objfiles.h".
3073         (convert_func): For functions with unknown return type, warn and
3074         default to int.
3075         * compile/compile-object-run.c (compile_object_run): Adjust call
3076         to call_function_by_hand_dummy.
3077         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3078         call_function_by_hand.
3079         * eval.c (evaluate_subexp_standard): Adjust calls to
3080         call_function_by_hand.  Handle functions and methods with unknown
3081         return type.  Pass expect_type to call_function_by_hand.
3082         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3083         return type.
3084         * gcore.c (call_target_sbrk): Adjust call to
3085         call_function_by_hand.
3086         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3087         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3088         an integer address type instead of nodebug.
3089         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3090         call_function_by_hand.
3091         * infcall.c (error_call_unknown_return_type): New function.
3092         (call_function_by_hand): New "default_return_type" parameter.
3093         Pass it down.
3094         (call_function_by_hand_dummy): New "default_return_type"
3095         parameter.  Use it instead of defaulting to int.  If there's no
3096         default and the return type is unknown, throw an error.  If
3097         there's a default return type, and the called function has no
3098         debug info, then assume the function is prototyped.
3099         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3100         New "default_return_type" parameter.
3101         (error_call_unknown_return_type): New declaration.
3102         * linux-fork.c (call_lseek): Cast return type of lseek.
3103         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3104         call_function_by_hand.
3105         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3106         calls to call_function_by_hand.
3107         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3108         return type.
3109         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3110         (value_nsstring, print_object_command): Adjust calls to
3111         call_function_by_hand.
3112         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3113         functions with unknown return type.
3114         (pascal_type_print_func_varspec_suffix): New function.
3115         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3116         TYPE_CODE_METHOD>: Use it.
3117         * python/py-value.c (valpy_call): Adjust call to
3118         call_function_by_hand.
3119         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3120         call_function_by_hand.
3121         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3122         call_function_by_hand.
3123         * valops.c (value_allocate_space_in_inferior): Adjust call to
3124         call_function_by_hand.
3125         * typeprint.c (type_print_unknown_return_type): New function.
3126         * typeprint.h (type_print_unknown_return_type): New declaration.
3127
3128 2017-09-04  Pedro Alves  <palves@redhat.com>
3129
3130         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3131         types with more than one parameter as prototyped.
3132
3133 2017-09-04  Pedro Alves  <palves@redhat.com>
3134
3135         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3136         (disassemble_command): Use gdb_disassembly_flags instead of bare
3137         int.
3138         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3139         (dump_insns, do_mixed_source_and_assembly_deprecated)
3140         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3141         Use gdb_disassembly_flags instead of bare int.
3142         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3143         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3144         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3145         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3146         (enum gdb_disassembly_flag): ... values of this new enumeration.
3147         (gdb_disassembly_flags): Define.
3148         (gdb_disassembly)
3149         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3150         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3151         gdb_disassembly_flags instead of bare int.
3152         * record-btrace.c (btrace_insn_history)
3153         (record_btrace_insn_history, record_btrace_insn_history_range)
3154         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3155         instead of bare int.
3156         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3157         Use gdb_disassembly_flags instead of bare int.
3158         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3159         Define.
3160         * target-delegates.c: Regenerate.
3161         * target.c (target_insn_history, target_insn_history_from)
3162         (target_insn_history_range): Use gdb_disassembly_flags instead of
3163         bare int.
3164         * target.h: Include "disasm.h".
3165         (struct target_ops) <to_insn_history, to_insn_history_from,
3166         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3167         int.
3168         (target_insn_history, target_insn_history_from)
3169         (target_insn_history_range): Use gdb_disassembly_flags instead of
3170         bare int.
3171
3172 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3173
3174         * cli/cli-script.c (build_command_line): For if/while commands,
3175         check whether args is empty.
3176
3177 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3178
3179         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3180         (enum command_control_type): Likewise.
3181         (struct command_line): Likewise.
3182         (free_command_lines): Likewise.
3183         (struct command_lines_deleter): Likewise.
3184         (command_line_up): Likewise.
3185         (read_command_lines): Likewise.
3186         (read_command_lines_1): Likewise.
3187         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3188         (enum command_control_type): Likewise.
3189         (struct command_line): Likewise.
3190         (free_command_lines): Likewise.
3191         (struct command_lines_deleter): Likewise.
3192         (command_line_up): Likewise.
3193         (read_command_lines): Likewise.
3194         (read_command_lines_1): Likewise.
3195         * breakpoint.h: Include cli/cli-script.h.
3196         * extension-priv.h: Likewise.
3197         * gdbcmd.h: Likewise.
3198
3199 2017-09-04  Pedro Alves  <palves@redhat.com>
3200
3201         * ada-lang.c (is_known_support_routine): Move sal declaration to
3202         where it is initialized.
3203         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3204         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3205         (clear_command, update_static_tracepoint): Remove init_sal
3206         references.  Move declarations closer to initializations.
3207         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3208         initializations.
3209         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3210         references.  Move sal declarations closer to initializations.
3211         * frame.c (find_frame_sal): Return a symtab_and_line via function
3212         return instead of output parameter.  Remove init_sal references.
3213         * frame.h (find_frame_sal): Return a symtab_and_line via function
3214         return instead of output parameter.
3215         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3216         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3217         instead of memset.
3218         (gdbscm_find_pc_line): Remove init_sal reference.
3219         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3220         references.  Move declarations closer to initializations.
3221         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3222         initializations.
3223         (finish_backward): Remove init_sal references.  Move declarations
3224         closer to initializations.
3225         * infrun.c (process_event_stop_test, handle_step_into_function)
3226         (insert_hp_step_resume_breakpoint_at_frame)
3227         (insert_step_resume_breakpoint_at_caller): Likewise.
3228         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3229         (symbol_to_sal): Likewise.
3230         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3231         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3232         to its initialization.
3233         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3234         init_sal references.  Move declarations closer to initializations.
3235         * source.c (get_current_source_symtab_and_line): Remove brace
3236         initialization.
3237         (set_current_source_symtab_and_line): Now takes the sal by const
3238         reference.  Remove brace initialization.
3239         (line_info): Remove init_sal reference.
3240         * source.h (set_current_source_symtab_and_line): Now takes a
3241         symtab_and_line via const reference.
3242         * stack.c (set_current_sal_from_frame): Adjust.
3243         (print_frame_info): Adjust.
3244         (get_last_displayed_sal): Return the sal via function return
3245         instead of via output parameter.  Simplify.
3246         (frame_info): Adjust.
3247         * stack.h (get_last_displayed_sal): Return the sal via function
3248         return instead of via output parameter.
3249         * symtab.c (init_sal): Delete.
3250         (find_pc_sect_line): Remove init_sal references.  Move
3251         declarations closer to initializations.
3252         (find_function_start_sal): Remove init_sal references.  Move
3253         declarations closer to initializations.
3254         * symtab.h (struct symtab_and_line): In-class initialize all
3255         fields.
3256         * tracepoint.c (set_traceframe_context)
3257         (print_one_static_tracepoint_marker): Remove init_sal references.
3258         Move declarations closer to initializations.
3259         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3260         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3261         declarations closer to initializations.
3262         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3263         init_sal references.  Adjust.
3264
3265 2017-09-04  Pedro Alves  <palves@redhat.com>
3266
3267         * ax-gdb.c (agent_command_1): Use range-for.
3268         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3269         * breakpoint.c: Include "common/array-view.h".
3270         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3271         parameter from struct symtabs_and_lines to
3272         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3273         (breakpoint_sals_to_pc): Change sals parameter from struct
3274         symtabs_and_lines to std::vector reference.
3275         (check_fast_tracepoint_sals): Change sals parameter from struct
3276         symtabs_and_lines to std::array_view.  Use range-for.
3277         (decode_static_tracepoint_spec): Return a std::vector instead of
3278         symtabs_and_lines.  Update.
3279         (create_breakpoint): Update.
3280         (break_range_command, until_break_command, clear_command): Update.
3281         (base_breakpoint_decode_location, bkpt_decode_location)
3282         (bkpt_probe_create_sals_from_location)
3283         (bkpt_probe_decode_location, tracepoint_decode_location)
3284         (tracepoint_probe_decode_location)
3285         (strace_marker_create_sals_from_location): Return a std::vector
3286         instead of symtabs_and_lines.
3287         (strace_marker_create_breakpoints_sal): Update.
3288         (strace_marker_decode_location): Return a std::vector instead of
3289         symtabs_and_lines.  Update.
3290         (update_breakpoint_locations): Change struct symtabs_and_lines
3291         parameters to gdb::array_view.  Adjust.
3292         (location_to_sals): Return a std::vector instead of
3293         symtabs_and_lines.  Update.
3294         (breakpoint_re_set_default): Use std::vector instead of struct
3295         symtabs_and_lines.
3296         (decode_location_default): Return a std::vector instead of
3297         symtabs_and_lines.  Update.
3298         * breakpoint.h: Include "common/array-view.h".
3299         (struct breakpoint_ops) <decode_location>: Now returns a
3300         std::vector instead of returning a symtabs_and_lines via output
3301         parameter.
3302         (update_breakpoint_locations): Change sals parameters to use
3303         gdb::array_view.
3304         * cli/cli-cmds.c (edit_command, list_command): Update to use
3305         std::vector and gdb::array_view.
3306         (ambiguous_line_spec): Adjust to use gdb::array_view and
3307         range-for.
3308         (compare_symtabs): Rename to ...
3309         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3310         const reference and adjust.
3311         (filter_sals): Rewrite using std::vector and standard algorithms.
3312         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3313         (jump_command): Update to use std::vector.
3314         * linespec.c (struct linespec_state) <canonical_names>: Update
3315         comment.
3316         (add_sal_to_sals_basic): Delete.
3317         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3318         (decode_line_2, create_sals_line_offset)
3319         (convert_address_location_to_sals, convert_linespec_to_sals)
3320         (convert_explicit_location_to_sals, parse_linespec)
3321         (event_location_to_sals, decode_line_full, decode_line_1)
3322         (decode_line_with_current_source)
3323         (decode_line_with_last_displayed, decode_objc)
3324         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3325         (linespec_result::~linespec_result): Adjust to use std::vector
3326         instead of symtabs_and_lines.
3327         * linespec.h (linespec_sals::sals): Now a std::vector.
3328         (struct linespec_result): Use std::vector, bool, and in-class
3329         initialization.
3330         (decode_line_1, decode_line_with_current_source)
3331         (decode_line_with_last_displayed): Return std::vector.
3332         * macrocmd.c (info_macros_command): Use std::vector.
3333         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3334         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3335         std::vector.
3336         * probe.h (parse_probes): Return a std::vector.
3337         * python/python.c (gdbpy_decode_line): Use std::vector and
3338         gdb::array_view.
3339         * source.c (select_source_symtab, line_info): Use std::vector.
3340         * stack.c (func_command): Use std::vector.
3341         * symtab.h (struct symtabs_and_lines): Delete.
3342         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3343
3344 2017-09-04  Pedro Alves  <palves@redhat.com>
3345
3346         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3347         unittests/array-view-selftests.c.
3348         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3349         * common/array-view.h: New file.
3350         * unittests/array-view-selftests.c: New file.
3351
3352 2017-09-04  Pedro Alves  <palves@redhat.com>
3353
3354         * cli/cli-cmds.c (edit_command): Pass message to
3355         ambiguous_line_spec.
3356         (list_command): Pass message to ambiguous_line_spec.  Say
3357         "first"/"last" instead of "start" and "end" to be consistent with
3358         the manual.
3359         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3360         them to print formatted message.
3361
3362 2017-09-04  Pedro Alves  <palves@redhat.com>
3363
3364         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3365         ftrace_update_insns by reference instead of pointer.
3366
3367 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3368
3369         * i386-go32-tdep.c: Include x86-xstate.h.
3370         (i386_go32_init_abi): Call i386_target_description.
3371         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3372         if xcr0 is X86_XSTATE_X87_MASK.
3373         * i386-tdep.h (tdesc_i386): Remove the declaration.
3374         (tdesc_i386_mmx): Likewise.
3375
3376 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3377
3378         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3379         X86_XSTATE_SSE_MASK instead of 0.
3380
3381 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3382
3383         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3384         i386_target_description.
3385         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3386         i386_target_description.
3387         * i386-tdep.c (i386_gdbarch_init): Likewise.
3388
3389 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3390
3391         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3392         (x86_darwin_init_abi_64): Call amd64_target_description.
3393         * amd64-dicos-tdep.c: Likewise.
3394         * amd64-fbsd-nat.c: Likewise.
3395         * amd64-fbsd-tdep.c: Likewise.
3396         * amd64-nbsd-tdep.c: Likewise.
3397         * amd64-obsd-tdep.c: Likewise.
3398         * amd64-sol2-tdep.c: Likewise.
3399         * amd64-windows-tdep.c: Likewise.
3400         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3401
3402 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3403
3404         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3405         (btrace_function) <insn>: Change type to use std::vector.
3406         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3407         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3408         ftrace_update_insns, ftrace_compute_global_level_offset,
3409         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3410         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3411         change to std::vector.
3412         (ftrace_update_insns): Adjust to change to std::vector, change
3413         type of INSN parameter.
3414         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3415         * record-btrace.c (btrace_call_history_insn_range,
3416         btrace_compute_src_line_range,
3417         record_btrace_frame_prev_register): Adjust to change to
3418         std::vector.
3419         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3420         to change to std::vector.
3421
3422 2017-09-03  Tom Tromey  <tom@tromey.com>
3423
3424         * corefile.c (reopen_exec_file): Use std::string.
3425
3426 2017-09-03  Tom Tromey  <tom@tromey.com>
3427
3428         * compile/compile.c (compile_register_name_mangled): Return
3429         std::string.
3430         * compile/compile-loc2c.c (pushf_register_address): Update.
3431         (pushf_register): Update.
3432         * compile/compile-c-types.c (convert_array): Update.
3433         * compile/compile-c-symbols.c (generate_vla_size): Update.
3434         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3435         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3436         (convert_one_symbol): Update.
3437         (generate_c_for_for_one_variable): Update.
3438         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3439         std::string.
3440         (generate_register_struct): Update.
3441         * compile/compile-internal.h (c_get_range_decl_name): Return a
3442         std::string.
3443         (compile_register_name_mangled): Return std::string.
3444
3445 2017-09-03  Tom Tromey  <tom@tromey.com>
3446
3447         * utils.c (perror_string): Return a std::string.
3448         (throw_perror_with_name, perror_warning_with_name): Update.
3449
3450 2017-09-03  Tom Tromey  <tom@tromey.com>
3451
3452         * demangle.c (demangle_command): Use std::string,
3453         unique_xmalloc_ptr.
3454
3455 2017-09-03  Tom Tromey  <tom@tromey.com>
3456
3457         * cli/cli-setshow.c (do_set_command): Use std::string.
3458
3459 2017-09-03  Tom Tromey  <tom@tromey.com>
3460
3461         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3462
3463 2017-09-03  Tom Tromey  <tom@tromey.com>
3464
3465         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3466
3467 2017-09-03  Tom Tromey  <tom@tromey.com>
3468
3469         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3470         gdb::unique_xmalloc_ptr.
3471
3472 2017-09-03  Tom Tromey  <tom@tromey.com>
3473
3474         * thread.c (print_thread_info_1): Use string_printf.
3475         (thread_apply_command, thread_apply_all_command): Use
3476         std::string.
3477
3478 2017-09-03  Tom Tromey  <tom@tromey.com>
3479
3480         * valprint.c (val_print_string): Update.
3481         * gdbcore.h (memory_error_message): Return std::string.
3482         * corefile.c (memory_error_message): Return std::string.
3483         (memory_error): Update.
3484         * breakpoint.c (insert_bp_location): Update.
3485
3486 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3487
3488         * target/waitstatus.h (target_waitstatus_to_string): Change
3489         return type to std::string.
3490         * target/waitstatus.c (target_waitstatus_to_string): Return
3491         std::string.
3492         * target.h (target_waitstatus_to_string): Remove declaration.
3493         * infrun.c (resume, clear_proceed_status_thread,
3494         print_target_wait_results, do_target_wait, save_waitstatus,
3495         stop_all_threads): Adjust.
3496         * record-btrace.c (record_btrace_wait): Adjust.
3497         * target-debug.h
3498         (target_debug_print_struct_target_waitstatus_p): Adjust.
3499
3500 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3501
3502         PR gdb/22046
3503         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3504         detection.
3505
3506 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3507
3508         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3509         for setting/unsetting environment variables on the remote target.
3510         (New remote packets): Add entries for QEnvironmentHexEncoded,
3511         QEnvironmentUnset and QEnvironmentReset.
3512         * common/environ.c (gdb_environ::operator=): Extend method to
3513         handle m_user_set_env_list and m_user_unset_env_list.
3514         (gdb_environ::clear): Likewise.
3515         (match_var_in_string): Change type of first parameter from 'char
3516         *' to 'const char *'.
3517         (gdb_environ::set): Extend method to handle
3518         m_user_set_env_list and m_user_unset_env_list.
3519         (gdb_environ::unset): Likewise.
3520         (gdb_environ::clear_user_set_env): New method.
3521         (gdb_environ::user_set_envp): Likewise.
3522         (gdb_environ::user_unset_envp): Likewise.
3523         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3524         m_user_unset_env_list on move constructor/assignment.
3525         (unset): Add new default parameter 'update_unset_list = true'.
3526         (clear_user_set_env): New method.
3527         (user_set_envp): Likewise.
3528         (user_unset_envp): Likewise.
3529         (m_user_set_env_list): New std::set.
3530         (m_user_unset_env_list): Likewise.
3531         * common/rsp-low.c (hex2str): New function.
3532         (bin2hex): New overload for bin2hex function.
3533         * common/rsp-low.c (hex2str): New prototype.
3534         (str2hex): New overload prototype.
3535         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3536         QEnvironmentUnset and QEnvironmentReset.
3537         (remote_protocol_features): Add QEnvironmentHexEncoded,
3538         QEnvironmentUnset and QEnvironmentReset packets.
3539         (send_environment_packet): New function.
3540         (extended_remote_environment_support): Likewise.
3541         (extended_remote_create_inferior): Call
3542         extended_remote_environment_support.
3543         (_initialize_remote): Add QEnvironmentHexEncoded,
3544         QEnvironmentUnset and QEnvironmentReset packet configs.
3545         * unittests/environ-selftests.c (gdb_selftest_env_var):
3546         New variable.
3547         (test_vector_initialization): New function.
3548         (test_init_from_host_environ): Likewise.
3549         (test_reinit_from_host_environ): Likewise.
3550         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3551         Likewise.
3552         (test_unset_set_empty_vector): Likewise.
3553         (test_vector_clear): Likewise.
3554         (test_std_move): Likewise.
3555         (test_move_constructor):
3556         (test_self_move): Likewise.
3557         (test_set_unset_reset): Likewise.
3558         (run_tests): Rewrite in terms of the functions above.
3559
3560 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3561
3562         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3563         (adi_available): Use a temp variable of type CORE_ADDR as argument
3564         3 when calling target_auxv_search.
3565         (adi_normalize_address): Use masks and xor operators to calculate
3566         normalized address.
3567         (adi_read_versions, adi_write_versions, adi_print_versions)
3568         (do_examine, do_assign): Use paddress.
3569
3570 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3571
3572         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3573         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3574         out of loop and add supply of FIR.
3575         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3576         add collect of FIR.
3577
3578 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3579
3580         PR gdb/21827
3581         * cli/cli-script.c (define_command): Don't convert command name
3582         to lower case.
3583
3584 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3585
3586         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3587         Update all callers accordingly. Remove all code blocks handling
3588         the case where DISPP is not NULL.
3589
3590 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3591
3592         PR symtab/22003
3593         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3594         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3595         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3596
3597 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3598
3599         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3600         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3601         (read_comp_units_from_section): New parameter abbrev_section, use
3602         read_and_check_comp_unit_head, allocate signatured_type if needed.
3603         (create_all_comp_units): Update read_comp_units_from_section caller.
3604
3605 2017-08-23  Pedro Alves  <palves@redhat.com>
3606
3607         PR remote/21852
3608         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3609         to null_ptid and switch to thread without reading the registers
3610         after adding the inferior.
3611
3612 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3613
3614         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3615         compile-gcc.
3616         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3617         (compile_to_object): Implement compile_gcc.
3618         (_initialize_compile): Install "set compile-gcc".  Initialize
3619         compile_gcc.
3620
3621 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3622
3623         * compile/compile.c (compile_to_object): Conditionally call
3624         set_verbose.  Conditionally call compile or compile_v0.
3625
3626 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3627
3628         * sparc64-tdep.h: (adi_normalize_address): New export.
3629         * sparc-nat.h: (open_adi_tag_fd): New export.
3630         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3631         * sparc64-linux-tdep.c:
3632         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3633         (sparc64_linux_handle_segmentation_fault): New function.
3634         (sparc64_linux_init_abi): Register
3635         sparc64_linux_handle_segmentation_fault
3636         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3637         (sparc64_addr_bits_remove): New function.
3638         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3639         (MAX_PROC_NAME_SIZE): New macro.
3640         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3641         (sparc64adilist): New variable.
3642         (adi_proc_list): New variable.
3643         (find_adi_info): New function.
3644         (add_adi_info): New function.
3645         (get_adi_info_proc): New function.
3646         (get_adi_info): New function.
3647         (info_adi_command): New function.
3648         (read_maps_entry): New function.
3649         (adi_available): New function.
3650         (adi_normalize_address): New function.
3651         (adi_align_address): New function.
3652         (adi_convert_byte_count): New function.
3653         (adi_tag_fd): New function.
3654         (adi_is_addr_mapped): New function.
3655         (adi_read_versions): New function.
3656         (adi_write_versions): New function.
3657         (adi_print_versions): New function.
3658         (do_examine): New function.
3659         (do_assign): New function.
3660         (adi_examine_command): New function.
3661         (adi_assign_command): New function.
3662         (_initialize_sparc64_adi_tdep): New function.
3663
3664 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3665
3666         * breakpoint.c (breakpoints_info): Rename to ...
3667         (info_breakpoints_command): ... this.
3668         (watchpoints_info): Rename to ...
3669         (info_watchpoints_command): ... this.
3670         (tracepoints_info): Rename to ...
3671         (info_tracepoints_command): ... this.
3672         (_initialize_breakpoint): Adjust.
3673         * dcache.c (dcache_info): Rename to ...
3674         (info_display_command): ... this.
3675         (_initialize_dcache): Adjust.
3676         * frame.h (args_info): Rename to ...
3677         (info_args_command): ... this.
3678         (locals_info): Rename to ...
3679         (info_locals_command): ... this.
3680         * infcmd.c (nofp_registers_info): Rename to ...
3681         (info_registers_command): ... this.
3682         (float_info): Rename to ...
3683         (info_float_command): ... this.
3684         (program_info): Rename to ...
3685         (info_program_command): ... this.
3686         (all_registers_info): Rename to ...
3687         (info_all_registers_command): ... this.
3688         (vector_info): Rename to ...
3689         (info_vector_command): ... this.
3690         (float_info): Rename to ...
3691         (info_float_command): ... this.
3692         (_initialize_infcmd): Adjust.
3693         * inferior.h (term_info): Rename to ...
3694         (info_terminal_command): ... this.
3695         * inflow.c (term_info): Rename to ...
3696         (info_terminal_command): ... this.
3697         (_initialize_inflow): Adjust.
3698         * infrun.c (signals_info): Rename to ...
3699         (info_signals_command): ... this.
3700         (_initialize_infrun): Adjust.
3701         * objc-lang.c (classes_info): Rename to ...
3702         (info_classes_command): ... this.
3703         (selectors_info): Rename to ...
3704         (info_selectors_command): ... this.
3705         (_initialize_objc_language): Adjust.
3706         * printcmd.c (sym_info): Rename to ...
3707         (info_symbol_command): ... this.
3708         (address_info): Rename to ...
3709         (info_address_command): ... this.
3710         (display_info): Rename to ...
3711         (info_display_command): ... this.
3712         (_initialize_printcmd): Adjust.
3713         * reverse.c (bookmarks_info): Rename to ...
3714         (info_breakpoints_command): ... this.
3715         (_initialize_reverse): Adjust.
3716         * ser-go32.c (dos_info): Rename to ...
3717         (info_serial_command): ... this.
3718         (_initialize_ser_dos): Adjust.
3719         * skip.c (skip_info): Rename to ...
3720         (info_skip_command): ... this.
3721         (_initialize_step_skip): Adjust.
3722         * source.c (line_info): Rename to ...
3723         (info_line_command): ... this.
3724         (source_info): Rename to ...
3725         (info_source_command)
3726         * stack.c (frame_info): Rename to ...
3727         (info_frame_command): ... this.
3728         (locals_info): Rename to ...
3729         (info_locals_command): ... this.
3730         (args_info): Rename to ...
3731         (info_args_command): ... this.
3732         (_initialize_stack): Adjust.
3733         * symtab.c (sources_info): Rename to ...
3734         (info_sources_command): ... this.
3735         (variables_info): Rename to ...
3736         (info_variables_command): ... this.
3737         (functions_info): Rename to ...
3738         (info_functions_command): ... this.
3739         (types_info): Rename to ...
3740         (info_types_command): ... this.
3741         (_initialize_symtab): Adjust.
3742         * target.c (target_info): Rename to ...
3743         (info_target_command): ... this.
3744         (initialize_targets): Adjust.
3745         * tracepoint.c (tvariables_info): Rename to ...
3746         (info_tvariables_command): ... this.
3747         (scope_info): Rename to ...
3748         (info_scope_command): ... this.
3749         (trace_dump_actions): Adjust.
3750         (_initialize_tracepoint): Adjust.
3751
3752 2017-08-22  Tom Tromey  <tom@tromey.com>
3753
3754         * breakpoint.h (install_breakpoint): Update.
3755         * breakpoint.c (add_solib_catchpoint): Update.
3756         (install_breakpoint): Change argument to a std::unique_ptr.
3757         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3758         (create_breakpoint_sal, create_breakpoint): Update.
3759         (watch_command_1, catch_exec_command_1)
3760         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3761         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3762         Return the breakpoint.
3763         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3764         (new_single_step_breakpoint): Update.
3765         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3766         std::unique_ptr.
3767         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3768         std::unique_ptr.
3769         * break-catch-sig.c (create_signal_catchpoint): Use
3770         std::unique_ptr.
3771         * ada-lang.c (create_ada_exception_catchpoint): Use
3772         std::unique_ptr.
3773
3774 2017-08-22  Tom Tromey  <tom@tromey.com>
3775
3776         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3777
3778 2017-08-22  Tom Tromey  <tom@tromey.com>
3779
3780         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3781         (lookup_partial_symbol): Update.
3782
3783 2017-08-22  Tom Tromey  <tom@tromey.com>
3784
3785         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3786         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3787         (find_and_open_source, symtab_to_fullname): Update.
3788         * psymtab.c (psymtab_to_fullname): Update.
3789
3790 2017-08-22  Tom Tromey  <tom@tromey.com>
3791
3792         * exec.c (exec_file_attach): Update.
3793         * linux-thread-db.c (try_thread_db_load): Update.
3794         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3795         * utils.c (gdb_realpath): Change return type.
3796         (gdb_realpath_keepfile): Update.
3797         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3798         (_initialize_utils): Register the new self test.
3799         * source.c (openp): Update.
3800         (find_and_open_source): Update.
3801         * nto-tdep.c (nto_find_and_open_solib): Update.
3802         * main.c (set_gdb_data_directory): Update.
3803         (captured_main_1): Update.
3804         * dwarf2read.c (dwarf2_get_dwz_file): Update
3805         (dw2_map_symbol_filenames): Update.
3806         * auto-load.c (auto_load_safe_path_vec_update): Update.
3807         (filename_is_in_auto_load_safe_path_vec): Change type of
3808         "filename_realp".
3809         (auto_load_objfile_script): Update.
3810         (file_is_auto_load_safe): Update.  Use std::string.
3811         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3812
3813 2017-08-22  Tom Tromey  <tom@tromey.com>
3814
3815         * utils.c (gdb_realpath_keepfile): Return a
3816         gdb::unique_xmalloc_ptr.
3817         * exec.c (exec_file_attach): Update.
3818         * utils.h (gdb_realpath_keepfile): Return a
3819         gdb::unique_xmalloc_ptr.
3820
3821 2017-08-22  Tom Tromey  <tom@tromey.com>
3822
3823         * compile/compile.c (compile_file_command): Use
3824         gdb::unique_xmalloc_ptr, std::string.
3825         * utils.c (gdb_abspath): Change return type.
3826         * source.c (openp): Update.
3827         * objfiles.c (allocate_objfile): Update.
3828         * main.c (set_gdb_data_directory): Update.
3829         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3830
3831 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3832
3833         * cli-cmds.c (list_commands): List actual code around more than
3834         one location.
3835
3836 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3837
3838         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3839
3840 2017-08-21  Pedro Alves  <palves@redhat.com>
3841
3842         PR gdb/19487
3843         * c-exp.y (variable production): Handle function aliases.
3844         * minsyms.c (msymbol_is_text): New function.
3845         * minsyms.h (msymbol_is_text): Declare.
3846         * symtab.c (find_function_alias_target): New function.
3847         * symtab.h (find_function_alias_target): Declare.
3848
3849 2017-08-21  Pedro Alves  <palves@redhat.com>
3850
3851         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3852         typedefs.
3853         * typeprint.c (whatis_exp): If handling "whatis", and expression
3854         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3855         typedefs here.
3856         * valops.c (value_cast): Save "to" type before resolving
3857         stubs/typedefs.  Use that type as resulting value's type.
3858
3859 2017-08-18  Tom Tromey  <tom@tromey.com>
3860             Pedro Alves  <palves@redhat.com>
3861
3862         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3863         * sol-thread.c (sol_thread_resume, sol_thread_wait)
3864         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3865         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3866         * proc-service.c (ps_xfer_memory): Use scoped_restore.
3867         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3868         (linux_get_siginfo_data): Add "thread" argument.  Use
3869         scoped_restore.
3870         * linux-nat.c (linux_child_follow_fork)
3871         (check_stopped_by_watchpoint): Use scoped_restore.
3872         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3873         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3874         (restore_inferior_ptid, save_inferior_ptid): Remove.
3875         * btrace.c (btrace_fetch): Use scoped_restore.
3876         * bsd-uthread.c (bsd_uthread_fetch_registers)
3877         (bsd_uthread_store_registers): Use scoped_restore.
3878         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3879         scoped_restore.
3880         * aix-thread.c (aix_thread_resume, aix_thread_wait)
3881         (aix_thread_xfer_partial): Use scoped_restore.
3882         * inferior.h (save_inferior_ptid): Remove.
3883
3884 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3885
3886         PR tdep/21818
3887         * arm-tdep.c (gdb_print_insn_arm): Mark
3888         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3889
3890 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3891
3892         * NEWS: Mention GDBserver's new option "--selftest".
3893         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3894         * selftest.c: Move it to common/selftest.c.
3895         * selftest.h: Move it to common/selftest.h.
3896         * selftest-arch.c (reset): New function.
3897         (tests_with_arch): Call reset.
3898
3899 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3900
3901         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
3902         instead of exception_fprintf and printf_filtered.
3903
3904 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3905
3906         * selftest.c (register_self_test): Rename it to
3907         selftests::register_test.
3908         (run_self_tests): selftest::run_tests.
3909         * selftest.h: Update declarations.
3910         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3911         selftests::register_test_foreach_arch.
3912         * selftest-arch.h: Update declaration.
3913         * aarch64-tdep.c: Update.
3914         * arm-tdep.c: Likewise.
3915         * disasm-selftests.c: Likewise.
3916         * dwarf2loc.c: Likewise.
3917         * dwarf2-frame.c: Likewise.
3918         * findvar.c: Likewise.
3919         * gdbarch-selftests.c: Likewise.
3920         * maint.c (maintenance_selftest): Likewise.
3921         * regcache.c: Likewise.
3922         * rust-exp.y: Likewise.
3923         * selftest-arch.c: Likewise.
3924         * unittests/environ-selftests.c: Likewise.
3925         * unittests/function-view-selftests.c: Likewise.
3926         * unittests/offset-type-selftests.c: Likewise.
3927         * unittests/optional-selftests.c: Likewise.
3928         * unittests/scoped_restore-selftests.c: Likewise.
3929         * utils-selftests.c: Likewise.
3930
3931 2017-08-17  Pedro Alves  <palves@redhat.com>
3932
3933         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3934         local.
3935
3936 2017-08-17  Pedro Alves  <palves@redhat.com>
3937
3938         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3939         field.
3940         (reset_die_in_process): Delete, replaced by ...
3941         (process_die_scope): ... this new class.  Make it responsible for
3942         freeing cu->line_header too.
3943         (process_die): Use process_die_scope.
3944         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3945         cu->line_header_die_owner.  Don't release the line header if it's
3946         owned by the CU.
3947         (setup_type_unit_groups): Make the CU/DIE own the line header.
3948         Don't release the line header here.
3949
3950 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
3951
3952         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3953
3954 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3955
3956         * NEWS: Mention new shortcuts for nexti and stepi in TUI
3957         Single-Key mode
3958
3959 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3960
3961         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3962         mode command list.
3963
3964 2017-08-15  Stafford Horne  <shorne@gmail.com>
3965
3966         * MAINTAINERS (Write After Approval): Add Stafford Horne.
3967
3968 2017-08-15  Stafford Horne  <shorne@gmail.com>
3969
3970         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3971
3972 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3973
3974         PR gdb/21954
3975         * infcmd.c (unset_environment_command): Use the 'clear' method on
3976         the environment instead of resetting it.
3977
3978 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
3979
3980         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3981         platforms.
3982
3983 2017-08-14  Tom Tromey  <tom@tromey.com>
3984
3985         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3986         (print_binary_chars): Likewise.
3987         (BITS_IN_BYTES): Remove.
3988
3989 2017-08-14  Tom Tromey  <tom@tromey.com>
3990
3991         PR gdb/21675
3992         * valprint.c (LOW_ZERO): Change value to 034.
3993         (print_octal_chars): Add static_asserts for octal constants.
3994         * printcmd.c (print_scalar_formatted): Add 'd' case.
3995
3996 2017-08-11  Tom Tromey  <tom@tromey.com>
3997
3998         * symfile.c (add_symbol_file_command): Use std::vector.
3999
4000 2017-08-14  Tom Tromey  <tom@tromey.com>
4001
4002         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4003         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4004         std::move.
4005         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4006
4007 2017-08-11  Pedro Alves  <palves@redhat.com>
4008
4009         * infrun.c (process_event_stop_test): Adjust
4010         function_name_is_marked_for_skip call.
4011         * skip.c: Include <list>.
4012         (skiplist_entry): Make it a class with private fields, and
4013         getters/setters.
4014         (skiplist_entry_chain): Delete.
4015         (skiplist_entries): New.
4016         (skiplist_entry_count): Delete.
4017         (highest_skiplist_entry_num): New.
4018         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4019         (add_skiplist_entry): Delete.
4020         (skiplist_entry::skiplist_entry): New.
4021         (skiplist_entry::add_entry): New.
4022         (skip_file_command, skip_function): Adjust.
4023         (compile_skip_regexp): Delete.
4024         (skip_command): Don't compile regexp here.  Adjust to use
4025         skiplist_entry::add_entry.
4026         (skip_info): Adjust to use range-for and getters.
4027         (skip_enable_command, skip_disable_command): Adjust to use
4028         range-for and setters.
4029         (skip_delete_command): Adjust to use std::list.
4030         (add_skiplist_entry): Delete.
4031         (skip_file_p): Delete, refactored as ...
4032         (skiplist_entry::do_skip_file_p): ... this new method.
4033         (skip_gfile_p): Delete, refactored as ...
4034         (skiplist_entry::do_gskip_file_p): ... this new method.
4035         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4036         (skiplist_entry::skip_function_p): ... this new method.
4037         (function_name_is_marked_for_skip): Now returns bool, and takes
4038         the function sal by const reference.  Adjust to use range-for and
4039         skiplist_entry methods.
4040         (_initialize_step_skip): Remove references to
4041         skiplist_entry_chain, skiplist_entry_count.
4042         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4043         takes the function sal by const reference.
4044
4045 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4046
4047         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4048         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4049         (dwarf2_frame_cache):
4050         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4051         RETURN_MASK_ALL and set *this_case to NULL.
4052         * frame-unwind.h: Update comments.
4053
4054 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4055
4056         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4057         (dwarf2_frame_state_copy_regs): Remove.
4058         (dwarf2_frame_state_free_regs): Remove.
4059         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4060         (dwarf2_restore_rule): Call method .alloc_regs instead of
4061         dwarf2_frame_state_alloc_regs.
4062         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4063         constructor.  Call std::move.
4064         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4065         (dwarf2_frame_cache): Likewise.
4066
4067         [GDB_SELF_TEST]: Include selftest.h and
4068         selftest-arch.h.
4069         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4070         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4071         execute_cfa_program_test.
4072
4073         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4074         copy ctor, assignment operator, move assignment.
4075         <alloc_regs>: New method.
4076         <swap>: New method.
4077         (struct dwarf2_frame_state): Delete dtor.
4078         (dwarf2_frame_state_alloc_regs): Remove declaration.
4079         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4080         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4081
4082 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4083
4084         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4085         (dwarf2_frame_state::dwarf2_frame_state): New.
4086         (dwarf2_frame_state::~dwarf2_frame_state): New.
4087         (dwarf2_fetch_cfa_info): Update.
4088         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4089         rather than a pointer.  Update code.
4090         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4091         dtor.
4092         <data_align, code_align, retaddr_column>: Change them to const.
4093         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4094         to bool.
4095
4096 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4097
4098         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4099         <loc.exp>: New field.
4100         * dwarf2-frame.c (execute_cfa_program): Update.
4101         (dwarf2_frame_prev_register): Update.
4102
4103 2017-08-10  Pedro Alves  <palves@redhat.com>
4104
4105         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4106
4107 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4108
4109         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4110         (fbsd_pending_children): Use std::list.
4111         (fbsd_remember_child): Likewise.
4112         (fbsd_is_child_pending): Likewise.
4113         (fbsd_pending_vfork_done): Use std::forward_list.
4114         (fbsd_add_vfork_done): Likewise.
4115         (fbsd_is_vfork_done_pending): Likewise.
4116         (fbsd_next_vfork_done): Likewise.
4117
4118 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4119
4120         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4121         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4122         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4123         for `mapfilename'.
4124         (fbsd_xfer_partial): Use gdb::byte_vector.
4125         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4126
4127 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4128
4129         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4130         "filestuff.h".
4131         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4132
4133 2017-08-09  Tom Tromey  <tom@tromey.com>
4134
4135         * skip.c (skiplist_entry): New constructor.
4136         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4137         (skiplist_entry::file_is_glob): Now bool.
4138         (skiplist_entry::file, skiplist_entry::function): Now
4139         std::string.
4140         (make_skip_entry): Return a unique_ptr.  Use new.
4141         (free_skiplist_entry, free_skiplist_entry_cleanup)
4142         (make_free_skiplist_entry_cleanup): Remove.
4143         (skip_command, skip_disable_command, add_skiplist_entry)
4144         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4145         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4146         (function_name_is_marked_for_skip): Update.
4147         (skip_delete_command): Update.  Use delete.
4148
4149 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4150
4151         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4152         (aarch64_linux_core_read_description): New function.
4153         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4154
4155 2017-08-09  Pedro Alves  <palves@redhat.com>
4156
4157         * cp-name-parser.y (cp_comp_to_string): Return a
4158         gdb::unique_xmalloc_ptr<char>.
4159         * cp-support.c (replace_typedefs_qualified_name)
4160         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4161         (cp_canonicalize_string_full): Use op= instead of explicit
4162         convertion.
4163         (cp_class_name_from_physname, method_name_from_physname)
4164         (cp_func_name, cp_remove_params): Adjust to use
4165         gdb::unique_xmalloc_ptr<char>.
4166         * cp-support.h (cp_comp_to_string): Return a
4167         gdb::unique_xmalloc_ptr<char>.
4168         * python/py-type.c (typy_lookup_type): Adjust to use
4169         gdb::unique_xmalloc_ptr<char>.
4170
4171 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4172
4173         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4174
4175 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4176             Yao Qi  <yao.qi@linaro.org>
4177
4178         * cp-support.c (cp_canonicalize_string_full): Use
4179         gdb::unique_xmalloc_ptr<char>.
4180         (cp_canonicalize_string): Likewise.
4181
4182 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4183
4184         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4185         * regformats/i386/amd64-avx-avx512.dat: Remove.
4186         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4187         * regformats/i386/amd64-avx-mpx.dat:Remove.
4188         * regformats/i386/amd64-avx.dat: Remove.
4189         * regformats/i386/amd64-mpx.dat: Remove.
4190         * regformats/i386/i386-avx-avx512.dat: Remove.
4191         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4192         * regformats/i386/i386-avx-mpx.dat: Remove.
4193         * regformats/i386/i386-mmx.dat: Remove.
4194         * regformats/i386/i386-mpx.dat: Remove.
4195
4196 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4197
4198         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4199         * amd64-tdep.c: Don't include features/i386/x32*.c.
4200         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4201         functions.
4202         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4203         and i386/x32-avx-avx512.
4204         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4205         and i386/x32.xml.
4206         * features/i386/x32-avx-avx512.c: Removed.
4207         * features/i386/x32-avx-avx512.xml: Removed.
4208         * features/i386/x32-avx.c: Removed.
4209         * features/i386/x32-avx.xml: Removed.
4210         * features/i386/x32.c: Removed.
4211         * features/i386/x32.xml: Removed.
4212         * regformats/i386/x32-avx-avx512.dat: Removed.
4213         * regformats/i386/x32-avx.dat: Removed.
4214         * regformats/i386/x32.dat: Removed.
4215
4216 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4217
4218         PR breakpoints/21886
4219         * mem-break.c (default_memory_insert_breakpoint): Use
4220         `->placed_address' rather than `->reqstd_address' for the
4221         breakpoint location.
4222
4223 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4224
4225         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4226         assertions.
4227
4228 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4229
4230         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4231         a union of `tdep_info', `tdesc_data' and `id'.
4232         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4233         rather than `info.tdep_info'.
4234         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4235         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4236         * i386-tdep.c (i386_gdbarch_init): Likewise.
4237         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4238         * mips-tdep.c (mips_gdbarch_init): Likewise.
4239         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4240         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4241         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4242         `info.tdep_info'.
4243         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4244         `info.tdep_info'.
4245         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4246         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4247         `info.tdep_info'.
4248         * spu-tdep.c (spu_gdbarch_init): Likewise.
4249         * gdbarch.h: Regenerate.
4250
4251 2017-08-07  Leszek Swirski  <leszeks@google.com>
4252
4253         PR symtab/20899
4254         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4255
4256 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4257
4258         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4259         (gdbsim_open): Rename gdb_argv args object to argv.
4260
4261 2017-08-05  Tom Tromey  <tom@tromey.com>
4262
4263         * compile/compile-object-load.c (compile_object_load): Use
4264         gdb::unique_xmalloc_ptr.
4265         * cli/cli-dump.c (scan_filename): Rename from
4266         scan_filename_with_cleanup.  Change return type.
4267         (scan_expression): Rename from scan_expression_with_cleanup.
4268         Change return type.
4269         (dump_memory_to_file, dump_value_to_file, restore_command):
4270         Use gdb::unique_xmalloc_ptr.  Update.
4271         * cli/cli-cmds.c (find_and_open_script): Use
4272         gdb::unique_xmalloc_ptr.
4273         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4274         * symmisc.c (maintenance_print_symbols)
4275         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4276         * symfile.c (symfile_bfd_open, generic_load)
4277         (add_symbol_file_command, remove_symbol_file_command): Use
4278         gdb::unique_xmalloc_ptr.
4279         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4280         * psymtab.c (maintenance_print_psymbols): Use
4281         gdb::unique_xmalloc_ptr.
4282         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4283         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4284         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4285         (reload_shared_libraries_1): Likewise.
4286
4287 2017-08-05  Tom Tromey  <tom@tromey.com>
4288
4289         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4290         (rust_op_vector, rust_set_vector): New typedefs.
4291         (current_parser): New global.
4292         (work_obstack): Change to pointer type.  Update all users.
4293         (rust_ast, pstate): Remove globals.
4294         (struct rust_parser): New.
4295         (%union) <params, field_inits>: Change type.
4296         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4297         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4298         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4299         (convert_params_to_types, convert_params_to_expression): Change
4300         type of "params".
4301         (ast_string): Change type of "fields".
4302         (rust_parse): Make a rust_parser.  Remove cleanups.
4303         (rust_lex_tests): Make and install an auto_obstack.
4304
4305 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4306
4307         * configure.srv (ipa_x32_linux_regobj): New.
4308         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4309         instead of X86_TDESC_AVX512.
4310         (initialize_low_tracepoint): Call
4311         init_registers_x32_avx_avx512_linux.
4312
4313 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4314
4315         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4316
4317 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4318
4319         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4320
4321 2017-08-03  Tom Tromey  <tom@tromey.com>
4322
4323         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4324         Remove.
4325         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4326
4327 2017-08-03  Tom Tromey  <tom@tromey.com>
4328
4329         * python/py-param.c (compute_enum_values): Use gdb_argv.
4330
4331 2017-08-03  Tom Tromey  <tom@tromey.com>
4332
4333         * utils.h (struct gdb_argv_deleter): New.
4334         (gdb_argv): New class.
4335         * utils.c (gdb_argv::reset): New method.
4336         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4337         * tracefile.c (tsave_command): Use gdb_argv.
4338         * top.c (new_ui_command): Use gdb_argv.
4339         * symmisc.c (maintenance_print_symbols)
4340         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4341         * symfile.c (symbol_file_command, generic_load)
4342         (remove_symbol_file_command): Use gdb_argv.
4343         * stack.c (backtrace_command): Use gdb_argv.
4344         * source.c (add_path, show_substitute_path_command)
4345         (unset_substitute_path_command, set_substitute_path_command):
4346         Use gdb_argv.
4347         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4348         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4349         * remote.c (extended_remote_run, remote_put_command)
4350         (remote_get_command, remote_delete_command): Use gdb_argv.
4351         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4352         (gdbsim_open): Use gdb_argv.
4353         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4354         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4355         * procfs.c (procfs_info_proc): Use gdb_argv.
4356         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4357         * infrun.c (handle_command): Use gdb_argv.
4358         * inferior.c (add_inferior_command, clone_inferior_command):
4359         Use gdb_argv.
4360         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4361         * exec.c (exec_file_command): Use gdb_argv.
4362         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4363         * compile/compile.c (build_argc_argv): Use gdb_argv.
4364
4365 2017-08-03  Tom Tromey  <tom@tromey.com>
4366
4367         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4368
4369 2017-08-03  Tom Tromey  <tom@tromey.com>
4370
4371         * python/python.c (compute_python_string): Return std::string.
4372         (gdbpy_eval_from_control_command): Update.
4373         (do_start_initialization): Use std::string.
4374         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4375         xstrprintf.
4376         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4377         xstrprintf.
4378
4379 2017-08-03  Tom Tromey  <tom@tromey.com>
4380
4381         * top.h (do_restore_instream_cleanup): Remove.
4382         * top.c (do_restore_instream_cleanup): Remove.
4383         (read_command_file): Use scoped_restore.
4384         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4385
4386 2017-08-03  Tom Tromey  <tom@tromey.com>
4387
4388         * cli/cli-script.c (execute_user_command)
4389         (execute_control_command): Use scoped_restore.
4390
4391 2017-08-03  Tom Tromey  <tom@tromey.com>
4392
4393         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4394         (execute_user_command): Remove user_call_depth; use
4395         user_args_stack's size instead.
4396
4397 2017-08-03  Tom Tromey  <tom@tromey.com>
4398
4399         * top.h (in_user_command): Remove.
4400         * top.c (in_user_command): Remove.
4401         * cli/cli-script.c (do_restore_user_call_depth)
4402         (execute_user_command): Update.
4403
4404 2017-08-03  Tom Tromey  <tom@tromey.com>
4405
4406         * valops.c (search_struct_method): Use gdb::byte_vector.
4407         * valarith.c (value_concat): Use std::vector.
4408         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4409         (simple_search_memory): Likewise.
4410         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4411         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4412         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4413         * elfread.c (elf_rel_plt_read): Use std::string.
4414         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4415         * cli/cli-dump.c (restore_section_callback): Use
4416         gdb::byte_vector.
4417
4418 2017-08-03  Tom Tromey  <tom@tromey.com>
4419
4420         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4421
4422 2017-08-03  Tom Tromey  <tom@tromey.com>
4423
4424         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4425         (tui_register_format): Use scoped_restore.
4426
4427 2017-08-03  Tom Tromey  <tom@tromey.com>
4428
4429         * reverse.c (exec_direction_default): Remove.
4430         (exec_reverse_once): Use scoped_restore.
4431         * remote.c (restore_remote_timeout): Remove.
4432         (remote_flash_erase, remote_flash_write, remote_flash_done)
4433         (readchar, remote_serial_write): Use scoped_restore.
4434         * cli/cli-script.c (struct source_cleanup_lines_args)
4435         (source_cleanup_lines): Remove.
4436         (script_from_file): Use scoped_restore.
4437         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4438         (source_command): Use scoped_restore.
4439
4440 2017-08-03  Tom Tromey  <tom@tromey.com>
4441
4442         * utils.h (make_cleanup_free_so): Remove.
4443         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4444         * solist.h (struct so_deleter): New.
4445         (so_list_up): New typedef.
4446         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4447
4448 2017-08-03  Tom Tromey  <tom@tromey.com>
4449
4450         * utils.h (make_cleanup_restore_current_language): Remove.
4451         * utils.c (do_restore_current_language)
4452         (make_cleanup_restore_current_language): Remove.
4453         * parse.c (parse_exp_in_context_1)
4454         (parse_expression_with_language): Use
4455         scoped_restore_current_language.
4456         * mi/mi-main.c (mi_cmd_execute): Use
4457         scoped_restore_current_language.
4458         * language.h (scoped_restore_current_language): New class.
4459
4460 2017-08-03  Tom Tromey  <tom@tromey.com>
4461
4462         * compile/compile.c (cleanup_unlink_file): Remove.
4463         (compile_to_object): Use gdb::unlinker.
4464         (eval_compile_command): Likewise.
4465
4466 2017-08-03  Tom Tromey  <tom@tromey.com>
4467
4468         * utils.h (make_cleanup_fclose): Remove.
4469         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4470
4471 2017-08-03  Tom Tromey  <tom@tromey.com>
4472
4473         * top.c (open_terminal_stream): Return gdb_file_up.
4474         (new_ui_command): Update.
4475
4476 2017-08-03  Tom Tromey  <tom@tromey.com>
4477
4478         * source.c (print_source_lines_base, forward_search_command)
4479         (reverse_search_command): Use gdb_file_up.
4480
4481 2017-08-03  Tom Tromey  <tom@tromey.com>
4482
4483         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4484
4485 2017-08-03  Tom Tromey  <tom@tromey.com>
4486
4487         * cli/cli-cmds.c (find_and_open_script): Change return type.
4488         Remove "streamp" and "full_path" parameters.
4489         (source_script_with_search): Update.
4490         * auto-load.c (source_script_file): Update.
4491         * cli/cli-cmds.h (find_and_open_script): Change type.
4492         (open_script): New struct.
4493
4494 2017-08-03  Tom Tromey  <tom@tromey.com>
4495
4496         * xml-support.c (xml_fetch_content_from_file): Update.
4497         * ui-file.c (stdio_file::open): Update.
4498         * tracefile-tfile.c (tfile_start): Update.
4499         * remote.c (remote_file_put, remote_file_get): Update.
4500         * nat/linux-procfs.c (linux_proc_get_int)
4501         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4502         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4503         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4504         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4505         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4506         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4507         * linux-nat.c (linux_proc_pending_signals): Update.
4508         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4509         (file_closer): Remove.
4510         * compile/compile.c (compile_to_object): Update.
4511         * common/filestuff.h (struct gdb_file_deleter): New.
4512         (gdb_file_up): New typedef.
4513         (gdb_fopen_cloexec): Change return type.
4514         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4515         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4516         (dump_binary_file, restore_binary_file): Update.
4517         * auto-load.c (auto_load_objfile_script_1): Update.
4518
4519 2017-08-03  Tom Tromey  <tom@tromey.com>
4520
4521         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4522         (info_static_tracepoint_markers_command): Likewise.
4523         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4524         * skip.c (skip_info): Use ui_out_emit_table.
4525         * progspace.c (print_program_space): Use ui_out_emit_table.
4526         * osdata.c (info_osdata): Use ui_out_emit_table.
4527         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4528         ui_out_emit_table.
4529         * linux-thread-db.c (info_auto_load_libthread_db): Use
4530         ui_out_emit_table.
4531         * inferior.c (print_inferior): Use ui_out_emit_table.
4532         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4533         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4534         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4535         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4536         * ui-out.h (class ui_out_emit_table): New.
4537
4538 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4539
4540         * mips-tdep.c (mips_fpu_type_str): New function.
4541         (mips_dump_tdep): Call it.
4542
4543 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4544
4545         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4546         `->mips_fpu_type'.
4547
4548 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4549
4550         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4551
4552 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4553
4554         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4555
4556 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4557
4558         * cli/cli-cmds.c (maintenancechecklist): New variable.
4559         * gdbcmd.h (maintenancechecklist): Declare it.
4560         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4561         Call i386_linux_read_description with different masks.
4562         * maint.c (maintenance_check_command): New function.
4563         (_initialize_maint_cmds): Call add_prefix_cmd.
4564         * target-descriptions.c (tdesc_reg): override operator != and ==.
4565         (tdesc_type): Likewise.
4566         (tdesc_feature): Likewise.
4567         (target_desc): Likewise.
4568         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4569         (maintenance_check_xml_descriptions): New function.
4570         (_initialize_target_descriptions) Add command "xml-descriptions".
4571         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4572
4573 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4574
4575         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4576         Include features/i386/32bit-*.c.
4577         (i386_linux_read_description): Generate target description if it
4578         doesn't exist.
4579         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4580         functions.
4581         * features/i386/32bit-linux.c: Re-generated.
4582         * features/i386/32bit-sse.c: Likewise.
4583         * target-descriptions.c (print_c_feature::visit): Print code to
4584         set register number if needed.
4585         (print_c_feature) <m_next_regnum>: New field.
4586
4587 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4588
4589         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4590         (FEATURE_XMLFILES): New.
4591         (FEATURE_CFILES): New.
4592         New rules.
4593         (clean-cfiles): Remove generated c files.
4594         * features/i386/32bit-avx.c: Generated.
4595         * features/i386/32bit-avx512.c: Generated.
4596         * features/i386/32bit-core.c: Generated.
4597         * features/i386/32bit-linux.c: Generated.
4598         * features/i386/32bit-mpx.c: Generated.
4599         * features/i386/32bit-pkeys.c: Generated.
4600         * features/i386/32bit-sse.c: Generated.
4601         * target-descriptions.c: Include algorithm.
4602         (tdesc_element_visitor): Add method visit_end.
4603         (print_c_tdesc): Implement visit_end.
4604         (print_c_tdesc:: m_filename_after_features): Move it to
4605         protected.
4606         (print_c_feature): New class.
4607         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4608         name starts with "i386/32bit-".
4609
4610 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4611
4612         * target-descriptions.c (tdesc_element_visitor): New class.
4613         (tdesc_element): New class.
4614         (tdesc_reg): Inherit from tdesc_element.
4615         (tdesc_reg::accept): New function.
4616         (tdesc_type): Inherit from tdesc_element.
4617         (tdesc_type::accept): New function.
4618         (tdesc_feature): Inherit from tdesc_element.
4619         (tdesc_feature::accept): New function.
4620         (target_desc): Inherit from tdesc_element.
4621         (target_desc::target_desc): New.
4622         (target_desc::~target_desc): New.
4623         (target_desc::accept): New.
4624         (allocate_target_description): Use new.
4625         (free_target_description): Use delete.
4626         (print_c_tdesc): New class.
4627         (maint_print_c_tdesc_cmd): Adjust.
4628
4629         * features/aarch64.c: Re-generated.
4630         * features/arc-arcompact.c: Re-generated.
4631         * features/arc-v2.c: Re-generated.
4632         * features/arm/arm-with-iwmmxt.c: Re-generated.
4633         * features/arm/arm-with-m.c: Re-generated.
4634         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4635         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4636         * features/arm/arm-with-neon.c: Re-generated.
4637         * features/arm/arm-with-vfpv2.c: Re-generated.
4638         * features/arm/arm-with-vfpv3.c: Re-generated.
4639         * features/i386/amd64-avx-avx512.c: Re-generated.
4640         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4641         * features/i386/amd64-avx.c: Re-generated.
4642         * features/i386/amd64-avx-linux.c: Re-generated.
4643         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4644         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4645         * features/i386/amd64-avx-mpx.c: Re-generated.
4646         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4647         * features/i386/amd64.c: Re-generated.
4648         * features/i386/amd64-linux.c: Re-generated.
4649         * features/i386/amd64-mpx.c: Re-generated.
4650         * features/i386/amd64-mpx-linux.c: Re-generated.
4651         * features/i386/i386-avx-avx512.c: Re-generated.
4652         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4653         * features/i386/i386-avx.c: Re-generated.
4654         * features/i386/i386-avx-linux.c: Re-generated.
4655         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4656         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4657         * features/i386/i386-avx-mpx.c: Re-generated.
4658         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4659         * features/i386/i386.c: Re-generated.
4660         * features/i386/i386-linux.c: Re-generated.
4661         * features/i386/i386-mmx.c: Re-generated.
4662         * features/i386/i386-mmx-linux.c: Re-generated.
4663         * features/i386/i386-mpx.c: Re-generated.
4664         * features/i386/i386-mpx-linux.c: Re-generated.
4665         * features/i386/x32-avx-avx512.c: Re-generated.
4666         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4667         * features/i386/x32-avx.c: Re-generated.
4668         * features/i386/x32-avx-linux.c: Re-generated.
4669         * features/i386/x32.c: Re-generated.
4670         * features/i386/x32-linux.c: Re-generated.
4671         * features/microblaze.c: Re-generated.
4672         * features/microblaze-with-stack-protect.c: Re-generated.
4673         * features/mips64-dsp-linux.c: Re-generated.
4674         * features/mips64-linux.c: Re-generated.
4675         * features/mips-dsp-linux.c: Re-generated.
4676         * features/mips-linux.c: Re-generated.
4677         * features/nds32.c: Re-generated.
4678         * features/nios2.c: Re-generated.
4679         * features/nios2-linux.c: Re-generated.
4680         * features/rs6000/powerpc-32.c: Re-generated.
4681         * features/rs6000/powerpc-32l.c: Re-generated.
4682         * features/rs6000/powerpc-403.c: Re-generated.
4683         * features/rs6000/powerpc-403gc.c : Re-generated.
4684         * features/rs6000/powerpc-405.c: Re-generated.
4685         * features/rs6000/powerpc-505.c: Re-generated.
4686         * features/rs6000/powerpc-601.c: Re-generated.
4687         * features/rs6000/powerpc-602.c: Re-generated.
4688         * features/rs6000/powerpc-603.c: Re-generated.
4689         * features/rs6000/powerpc-604.c: Re-generated.
4690         * features/rs6000/powerpc-64.c: Re-generated.
4691         * features/rs6000/powerpc-64l.c: Re-generated.
4692         * features/rs6000/powerpc-7400.c: Re-generated.
4693         * features/rs6000/powerpc-750.c: Re-generated.
4694         * features/rs6000/powerpc-860.c: Re-generated.
4695         * features/rs6000/powerpc-altivec32.c: Re-generated.
4696         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4697         * features/rs6000/powerpc-altivec64.c: Re-generated.
4698         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4699         * features/rs6000/powerpc-cell32l.c: Re-generated.
4700         * features/rs6000/powerpc-cell64l.c: Re-generated.
4701         * features/rs6000/powerpc-e500.c: Re-generated.
4702         * features/rs6000/powerpc-e500l.c: Re-generated.
4703         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4704         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4705         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4706         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4707         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4708         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4709         * features/rs6000/powerpc-vsx32.c: Re-generated.
4710         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4711         * features/rs6000/powerpc-vsx64.c: Re-generated.
4712         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4713         * features/rs6000/rs6000.c: Re-generated.
4714         * features/s390-linux32.c: Re-generated.
4715         * features/s390-linux32v1.c: Re-generated.
4716         * features/s390-linux32v2.c: Re-generated.
4717         * features/s390-linux64.c: Re-generated.
4718         * features/s390-linux64v1.c: Re-generated.
4719         * features/s390-linux64v2.c: Re-generated.
4720         * features/s390-te-linux64.c: Re-generated.
4721         * features/s390-tevx-linux64.c: Re-generated.
4722         * features/s390-vx-linux64.c: Re-generated.
4723         * features/s390x-linux64.c: Re-generated.
4724         * features/s390x-linux64v1.c: Re-generated.
4725         * features/s390x-linux64v2.c: Re-generated.
4726         * features/s390x-te-linux64.c: Re-generated.
4727         * features/s390x-tevx-linux64.c: Re-generated.
4728         * features/s390x-vx-linux64.c: Re-generated.
4729         * features/sparc/sparc32-solaris.c: Re-generated.
4730         * features/sparc/sparc64-solaris.c: Re-generated.
4731         * features/tic6x-c62x.c: Re-generated.
4732         * features/tic6x-c62x-linux.c: Re-generated.
4733         * features/tic6x-c64x.c: Re-generated.
4734         * features/tic6x-c64x-linux.c: Re-generated.
4735         * features/tic6x-c64xp.c: Re-generated.
4736         * features/tic6x-c64xp-linux.c: Re-generated.
4737
4738 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4739
4740         * i386-linux-tdep.c (i386_linux_read_description): New function.
4741         (i386_linux_core_read_description): Call
4742         i386_linux_read_description.
4743         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4744         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4745         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4746         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4747         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4748         * x86-linux-nat.c (x86_linux_read_description): Call
4749         i386_linux_read_description.
4750
4751 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4752
4753         * NEWS: Mention it.
4754         * features/Makefile (%.c: %.xml): Pass the xml file name to
4755         command "maint print c-tdesc".
4756         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4757         name from 'arg'.
4758
4759 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4760
4761         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4762         in-class initialization.
4763         (tdesc_create_feature): Call new instead of XCNEW.
4764         (free_target_description): Ue delete.
4765
4766 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4767
4768         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4769
4770 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4771
4772         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4773         constant.
4774         (amd64_x32_init_abi): Likewise.
4775         * amd64-tdep.h (amd64_init_abi): Update declaration.
4776         (amd64_x32_init_abi): Likewise.
4777
4778 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4779
4780         PR tdep/21717
4781         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4782         condition for FPSCR.
4783         (arm_linux_store_inferior_registers): Likewise.
4784
4785 2017-07-22  Tom Tromey  <tom@tromey.com>
4786
4787         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4788         <syscalls_counts>: Now a std::vector.
4789         (get_catch_syscall_inferior_data): Use "new".
4790         (catch_syscall_inferior_data_cleanup): Use "delete".
4791         (insert_catch_syscall, remove_catch_syscall)
4792         (clear_syscall_counts): Update.
4793
4794 2017-07-22  Tom Tromey  <tom@tromey.com>
4795
4796         * break-catch-syscall.c (syscall_catchpoint)
4797         <syscalls_to_be_caught>: Now a std::vector<int>
4798         (~syscall_catchpoint): Remove.
4799         (insert_catch_syscall, remove_catch_syscall)
4800         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4801         (print_mention_catch_syscall, print_recreate_catch_syscall):
4802         Update.
4803         (create_syscall_event_catchpoint): Change type of "filter"
4804         parameter.
4805         (catch_syscall_split_args): Return a std::vector.
4806         (catch_syscall_command_1, catching_syscall_number_1): Update.
4807
4808 2017-07-22  Tom Tromey  <tom@tromey.com>
4809
4810         * break-catch-throw.c (struct exception_catchpoint)
4811         <exception_rx>: Now a std::string.
4812         (~exception_catchpoint): Remove.
4813         (print_one_detail_exception_catchpoint): Update.
4814         (handle_gnu_v3_exceptions): Change type of except_rx.
4815         (extract_exception_regexp): Return a std::string.
4816         (catch_exception_command_1): Update.
4817
4818 2017-07-22  Tom Tromey  <tom@tromey.com>
4819
4820         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4821         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4822         std::vector.
4823         <catch_all>: Now a bool.
4824         (~signal_catchpoint): Remove.
4825         (signal_catchpoint_insert_location)
4826         (signal_catchpoint_remove_location)
4827         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4828         (signal_catchpoint_print_mention)
4829         (signal_catchpoint_print_recreate)
4830         (signal_catchpoint_explains_signal): Update.
4831         (create_signal_catchpoint): Change type of "filter" and
4832         "catch_all".
4833         (catch_signal_split_args): Return a std::vector.  Change type of
4834         "catch_all".
4835         (catch_signal_command): Update.
4836
4837 2017-07-20  Pedro Alves  <palves@redhat.com>
4838
4839         * ada-lang.c (ada_language_defn): Make extern.
4840         (_initialize_ada_language): Remove add_language call.
4841         * c-lang.c (c_language_defn, cplus_language_defn)
4842         (asm_language_defn, minimal_language_defn): Make extern.
4843         (_initialize_c_language): Delete.
4844         * completer.c (compare_cstrings): Delete, moved to utils.h.
4845         * d-lang.c (d_language_defn): Make extern.
4846         (_initialize_d_language): Remove add_language calls.
4847         * defs.h (enum language): Add comment.
4848         * f-lang.c (f_language_defn): Make extern.
4849         (_initialize_f_language): Remove add_language call.
4850         * go-lang.c (go_language_defn): Make extern.
4851         (_initialize_go_language): Remove add_language call.
4852         * language.c: Include <algorithm>.
4853         (languages): Redefine as const array.
4854         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4855         (set_language_command): Handle "local".  Use for-range loop.
4856         (set_language): Remove loop.
4857         (language_enum): Rewrite.
4858         (language_def, language_str): Remove loops.
4859         (add_language): Delete.
4860         (add_set_language_command): New, based on add_languages.
4861         (skip_language_trampoline): Adjust.
4862         (local_language_defn): Delete.
4863         (language_gdbarch_post_init): Adjust.
4864         (_initialize_language): Remove add_language calls.  Call
4865         add_set_language_command.
4866         * language.h (add_language): Delete.
4867         (auto_language_defn)
4868         (unknown_language_defn, minimal_language_defn, ada_language_defn)
4869         (asm_language_defn, c_language_defn, cplus_language_defn)
4870         (d_language_defn, f_language_defn, go_language_defn)
4871         (m2_language_defn, objc_language_defn, opencl_language_defn)
4872         (pascal_language_defn, rust_language_defn): Declare.
4873         * m2-lang.c (m2_language_defn): Make extern.
4874         (_initialize_m2_language): Remove add_language call.
4875         * objc-lang.c (objc_language_defn): Make extern.
4876         (_initialize_objc_language): Remove add_language call.
4877         * opencl-lang.c (opencl_language_defn): Make extern.
4878         (_initialize_opencl_language): Remove add_language call.
4879         * p-lang.c (pascal_language_defn): Make extern.
4880         (_initialize_pascal_language): Delete.
4881         * rust-lang.c (rust_language_defn): Make extern.
4882         (_initialize_rust_language): Delete.
4883         * utils.h (compare_cstrings): New static inline function.
4884
4885 2017-07-20  Pedro Alves  <palves@redhat.com>
4886
4887         * ada-lang.c (ada_to_fixed_type_1): Adjust.
4888         (get_var_value): Constify parameters.
4889         (get_int_var_value): Change prototype.
4890         (to_fixed_range_type): Adjust.
4891         * ada-lang.h (get_int_var_value): Change prototype.
4892
4893 2017-07-20  Pedro Alves  <palves@redhat.com>
4894
4895         * dwarf2read.c (dw2_lookup_symbol): Use
4896         SYMBOL_MATCHES_SEARCH_NAME.
4897         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4898
4899 2017-07-20  Pedro Alves  <palves@redhat.com>
4900
4901         * block.c (block_iter_name_step, block_iter_name_first)
4902         (block_iter_name_next): Delete.
4903         (block_lookup_symbol_primary): Adjust to use
4904         dict_iter_match_first/dict_iter_match_next.
4905         * block.h (block_iter_name_first, block_iter_name_next): Delete
4906         declarations.
4907         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4908         dict_iter_match_first/dict_iter_match_next.
4909
4910 2017-07-20  Pedro Alves  <palves@redhat.com>
4911
4912         * cp-support.c (cp_find_first_component_aux): Add missing case for
4913         end of string.
4914
4915 2017-07-18  David Blaikie  <dblaikie@gmail.com>
4916
4917         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4918         of dwo_cu's dwo_file.
4919
4920 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4921
4922         * remote.c (store_registers_using_G): Remove one line comment.
4923
4924 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4925
4926         * regcache.c (regcache_cpy): Simplify it.
4927         (regcache::cpy_no_passthrough): Remove it.
4928         * regcache.h (cpy_no_passthrough): Remove it.
4929         (regcache_dup, regcache_cpy): Update comments.
4930
4931 2017-07-18  Pedro Alves  <palves@redhat.com>
4932
4933         * remote-sim.c (sim_command_completer): Adjust to work with a
4934         completion_tracker instead of a VEC.
4935
4936 2017-07-17  Pedro Alves  <palves@redhat.com>
4937
4938         * completer.c (complete_source_filenames): New function.
4939         (complete_address_and_linespec_locations): New function.
4940         (location_completer): Use complete_address_and_linespec_locations.
4941         (completion_tracker::build_completion_result): Honor the tracker's
4942         request to suppress append.
4943         * completer.h (completion_tracker::suppress_append_ws)
4944         (completion_tracker::set_suppress_append_ws): New methods.
4945         (completion_tracker::m_suppress_append_ws): New field.
4946         (complete_source_filenames): New declaration.
4947         * linespec.c (linespec_complete_what): New.
4948         (struct ls_parser) <complete_what, completion_word,
4949         completion_quote_char, completion_quote_end, completion_tracker>:
4950         New fields.
4951         (string_find_incomplete_keyword_at_end): New.
4952         (linespec_lexer_lex_string): Record quote char.  If in completion
4953         mode, don't throw.
4954         (linespec_lexer_consume_token): Advance the completion word point.
4955         (linespec_lexer_peek_token): Save/restore completion info.
4956         (save_stream_and_consume_token): New.
4957         (set_completion_after_number): New.
4958         (linespec_parse_basic): Set what to complete next depending on
4959         token.  Handle function and label completions specially.
4960         (parse_linespec): Disable objc shortcut in completion mode.  Set
4961         what to complete next depending on token type.  Skip keyword if in
4962         completion mode.
4963         (complete_linespec_component, linespec_complete): New.
4964         * linespec.h (linespec_complete): Declare.
4965
4966 2017-07-17  Pedro Alves  <palves@redhat.com>
4967
4968         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4969         Handle 'operator<' / 'operator<<'.
4970
4971 2017-07-17  Pedro Alves  <palves@redhat.com>
4972
4973         * completer.c (collect_explicit_location_matches): Handle
4974         MATCH_LABEL.
4975         (convert_explicit_location_to_linespec): New, factored out from
4976         ...
4977         (convert_explicit_location_to_sals): ... this.
4978         (complete_label): New.
4979         (linespec_complete_label, find_label_symbols_in_block): New.
4980         (find_label_symbols): Add completion_mode parameter and adjust to
4981         call find_label_symbols_in_block.
4982         * linespec.h (linespec_complete_label): Declare.
4983
4984 2017-07-17  Pedro Alves  <palves@redhat.com>
4985
4986         * ada-lang.c (ada_collect_symbol_completion_matches): Add
4987         complete_symbol_mode parameter.
4988         * cli/cli-cmds.c (complete_command): Get the completion result out
4989         of the handle_brkchars tracker if used a custom word point.
4990         * completer.c: Include "linespec.h".
4991         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4992         (advance_to_expression_complete_word_point): New.
4993         (completion_tracker::completes_to_completion_word): New.
4994         (complete_files_symbols): Pass down
4995         complete_symbol_mode::EXPRESSION.
4996         (explicit_options, probe_options): New.
4997         (collect_explicit_location_matches): Complete on the
4998         explictit_loc->foo instead of word.  Use
4999         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5000         keyword and options completions.
5001         (backup_text_ptr): Delete.
5002         (skip_keyword): New.
5003         (complete_explicit_location): Remove 'word' parameter.  Add
5004         language, quoted_arg_start and quoted_arg_end parameters.
5005         Rewrite, parsing left to right.
5006         (location_completer): Rewrite.
5007         (location_completer_handle_brkchars): New function.
5008         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5009         (enum complete_line_internal_reason): Adjust comments.
5010         (completion_tracker::discard_completions): New.
5011         (completer_handle_brkchars_func_for_completer): Handle
5012         location_completer.
5013         (gdb_custom_word_point_brkchars)
5014         (gdb_org_rl_basic_quote_characters): New.
5015         (gdb_completion_word_break_characters_throw)
5016         (completion_find_completion_word): Handle trackers that use a
5017         custom word point.
5018         (completion_tracker::advance_custom_word_point_by): New.
5019         (completion_tracker::build_completion_result): Don't rely on
5020         readline appending the quote char.
5021         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5022         use a custom word point.
5023         (gdb_rl_attempted_completion_function): Restore
5024         rl_basic_quote_characters.
5025         * completer.h (class completion_tracker): Extend intro comment.
5026         (completion_tracker::set_quote_char)
5027         (completion_tracker::quote_char)
5028         (completion_tracker::set_use_custom_word_point)
5029         (completion_tracker::use_custom_word_point)
5030         (completion_tracker::custom_word_point)
5031         (completion_tracker::set_custom_word_point)
5032         (completion_tracker::advance_custom_word_point_by)
5033         (completion_tracker::completes_to_completion_word)
5034         (completion_tracker::discard_completions): New methods.
5035         (completion_tracker::m_quote_char)
5036         (completion_tracker::m_use_custom_word_point)
5037         (completion_tracker::m_custom_word_point): New fields.
5038         (advance_to_expression_complete_word_point): Declare.
5039         * f-lang.c (f_collect_symbol_completion_matches): Add
5040         complete_symbol_mode parameter.
5041         * language.h (struct language_defn)
5042         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5043         parameter.
5044         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5045         (linespec_complete_function): New function.
5046         (linespec_lexer_lex_keyword): Adjust.
5047         * linespec.h (linespec_keywords, linespec_complete_function): New
5048         declarations.
5049         * location.c (find_end_quote): New function.
5050         (explicit_location_lex_one): Add explicit_completion_info
5051         parameter.  Save quoting info.  Don't throw if being called for
5052         completion.  Don't handle Ada operators here.
5053         (is_cp_operator, skip_op_false_positives, first_of)
5054         (explicit_location_lex_one_function): New function.
5055         (string_to_explicit_location): Replace 'dont_throw' parameter with
5056         an explicit_completion_info pointer parameter.  Handle it.  Don't
5057         use explicit_location_lex_one to lex function names.  Use
5058         explicit_location_lex_one_function instead.
5059         * location.h (struct explicit_completion_info): New.
5060         (string_to_explicit_location): Replace 'dont_throw' parameter with
5061         an explicit_completion_info pointer parameter.
5062         * symtab.c (default_collect_symbol_completion_matches_break_on):
5063         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5064         (default_collect_symbol_completion_matches)
5065         (collect_symbol_completion_matches): Add complete_symbol_mode
5066         parameter.
5067         (collect_symbol_completion_matches_type): Pass down
5068         complete_symbol_mode::EXPRESSION.
5069         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5070         parameter.  Handle LINESPEC mode.
5071         * symtab.h (complete_symbol_mode): New.
5072         (default_collect_symbol_completion_matches_break_on)
5073         (default_collect_symbol_completion_matches)
5074         (collect_symbol_completion_matches)
5075         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5076         parameter.
5077
5078 2017-07-17  Pedro Alves  <palves@redhat.com>
5079
5080         * utils.c (enum class strncmp_iw_mode): New.
5081         (strcmp_iw): Rename to ...
5082         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5083         parameters.  Handle them.
5084         (strncmp_iw): New.
5085         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5086         * utils.h (strncmp_iw): Declare.
5087         (strcmp_iw): Move describing comments here.
5088
5089 2017-07-17  Pedro Alves  <palves@redhat.com>
5090
5091         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5092         CP_OPERATOR_STR.
5093         * c-typeprint.c (is_type_conversion_operator): Use
5094         CP_OPERATOR_STR.
5095         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5096         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5097         CP_OPERATOR_LEN.
5098         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5099         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5100         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5101         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5102         CP_OPERATOR_STR.
5103         * location.c: Include "cp-support.h".
5104         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5105         CP_OPERATOR_STR.
5106         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5107         CP_OPERATOR_LEN.
5108
5109 2017-07-17  Pedro Alves  <palves@redhat.com>
5110
5111         * cli/cli-cmds.c (complete_command): Use a completion tracker
5112         along with completion_find_completion_word for handle_brkchars
5113         phase.
5114         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5115         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5116         (struct gdb_rl_completion_word_info): New.
5117         (gdb_rl_find_completion_word): New.
5118         (completion_find_completion_word): New.
5119         * completer.h (completion_find_completion_word): Declare.
5120
5121 2017-07-17  Pedro Alves  <palves@redhat.com>
5122
5123         * ada-lang.c (symbol_completion_match): Adjust comments.
5124         (symbol_completion_add): Replace vector parameter with
5125         completion_tracker parameter.  Use it.
5126         (ada_make_symbol_completion_list): Rename to...
5127         (ada_collect_symbol_completion_matches): ... this.  Add
5128         completion_tracker parameter and use it.
5129         (ada_language_defn): Adjust.
5130         * break-catch-syscall.c (catch_syscall_completer): Adjust
5131         prototype and work with completion_tracker instead of VEC.
5132         * breakpoint.c (condition_completer): Adjust prototype and work
5133         with completion_tracker instead of VEC.
5134         * c-lang.c (c_language_defn, cplus_language_defn)
5135         (asm_language_defn, minimal_language_defn): Adjust to renames.
5136         * cli/cli-cmds.c (complete_command): Rework using
5137         completion_tracker.  Catch exceptions when completing.
5138         * cli/cli-decode.c (integer_unlimited_completer)
5139         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5140         with completion_tracker instead of VEC.
5141         * command.h (struct completion_tracker): Forward declare.
5142         (completer_ftype, completer_handle_brkchars_ftype): Change
5143         types.
5144         (complete_on_cmdlist, complete_on_enum): Adjust.
5145         * completer.c: Include <algorithm>.
5146         (struct gdb_completer_state): New.
5147         (current_completion): New global.
5148         (readline_line_completion_function): Delete.
5149         (noop_completer, filename_completer)
5150         (filename_completer_handle_brkchars, complete_files_symbols)
5151         (linespec_location_completer): Adjust to work with a
5152         completion_tracker instead of a VEC.
5153         (string_or_empty): New.
5154         (collect_explicit_location_matches): Adjust to work with a
5155         completion_tracker instead of a VEC.
5156         (explicit_location_completer): Rename to ...
5157         (complete_explicit_location): ... this and adjust to work with a
5158         completion_tracker instead of a VEC.
5159         (location_completer): Adjust to work with a completion_tracker
5160         instead of a VEC.
5161         (add_struct_fields): Adjust to work with a completion_list instead
5162         of VEC.
5163         (expression_completer): Rename to ...
5164         (complete_expression): ... this and adjust to work with a
5165         completion_tracker instead of a VEC.  Use complete_files_symbols.
5166         (expression_completer): Reimplement on top of complete_expression.
5167         (symbol_completer): Adjust to work with a completion_tracker
5168         instead of a VEC.
5169         (enum complete_line_internal_reason): Add describing comments.
5170         (complete_line_internal_normal_command): Adjust to work with a
5171         completion_tracker instead of a VEC.
5172         (complete_line_internal): Rename to ...
5173         (complete_line_internal_1): ... this and adjust to work with a
5174         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5175         handle_brkchars phase.
5176         (new_completion_tracker): Delete.
5177         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5178         complete_line_internal_1.
5179         (free_completion_tracker): Delete.
5180         (INITIAL_COMPLETION_HTAB_SIZE): New.
5181         (completion_tracker::completion_tracker)
5182         (completion_tracker::~completion_tracker): New.
5183         (maybe_add_completion): Delete.
5184         (completion_tracker::maybe_add_completion)
5185         (completion_tracker::add_completion)
5186         (completion_tracker::add_completions): New.
5187         (throw_max_completions_reached_error): Delete.
5188         (complete_line): Adjust to work with a completion_tracker instead
5189         of a VEC.  Don't create a completion_tracker_t or check for max
5190         completions here.
5191         (command_completer, command_completer_handle_brkchars)
5192         (signal_completer, reg_or_group_completer_1)
5193         (reg_or_group_completer, default_completer_handle_brkchars):
5194         Adjust to work with a completion_tracker.
5195         (gdb_completion_word_break_characters_throw): New.
5196         (gdb_completion_word_break_characters): Reimplement.
5197         (line_completion_function): Delete.
5198         (completion_tracker::recompute_lowest_common_denominator)
5199         (expand_preserving_ws)
5200         (completion_tracker::build_completion_result)
5201         (completion_result::completion_result)
5202         (completion_result::completion_result)
5203         (completion_result::~completion_result)
5204         (completion_result::completion_result)
5205         (completion_result::release_match_list, compare_cstrings)
5206         (completion_result::sort_match_list)
5207         (completion_result::reset_match_list)
5208         (gdb_rl_attempted_completion_function_throw)
5209         (gdb_rl_attempted_completion_function): New.
5210         * completer.h (completion_list, struct completion_result)
5211         (class completion_tracker): New.
5212         (complete_line): Add completion_tracker parameter.
5213         (readline_line_completion_function): Delete.
5214         (gdb_rl_attempted_completion_function): New.
5215         (noop_completer, filename_completer, expression_completer)
5216         (location_completer, symbol_completer, command_completer)
5217         (signal_completer, reg_or_group_completer): Update prototypes.
5218         (completion_tracker_t, new_completion_tracker)
5219         (make_cleanup_free_completion_tracker): Delete.
5220         (enum maybe_add_completion_enum): Delete.
5221         (maybe_add_completion): Delete.
5222         (throw_max_completions_reached_error): Delete.
5223         * corefile.c (complete_set_gnutarget): Adjust to work with a
5224         completion_tracker instead of a VEC.
5225         * cp-abi.c (cp_abi_completer): Adjust to work with a
5226         completion_tracker instead of a VEC.
5227         * d-lang.c (d_language_defn): Adjust.
5228         * disasm.c (disassembler_options_completer): Adjust to work with a
5229         completion_tracker instead of a VEC.
5230         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5231         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5232         with a completion_tracker instead of a VEC.
5233         (f_language_defn): Adjust.
5234         * go-lang.c (go_language_defn): Adjust.
5235         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5236         Adjust to work with a completion_tracker instead of a VEC.
5237         * infrun.c (handle_completer): Likewise.
5238         * interps.c (interpreter_completer): Likewise.
5239         * interps.h (interpreter_completer): Likewise.
5240         * language.c (unknown_language_defn, auto_language_defn)
5241         (local_language_defn): Adjust.
5242         * language.h (language_defn::la_make_symbol_completion_list):
5243         Rename to ...
5244         (language_defn::la_collect_symbol_completion_matches): ... this
5245         and adjust to work with a completion_tracker instead of a VEC.
5246         * m2-lang.c (m2_language_defn): Adjust.
5247         * objc-lang.c (objc_language_defn): Adjust.
5248         * opencl-lang.c (opencl_language_defn): Adjust.
5249         * p-lang.c (pascal_language_defn): Adjust.
5250         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5251         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5252         with a completion_tracker.
5253         * rust-lang.c (rust_language_defn): Adjust.
5254         * symtab.c (free_completion_list, do_free_completion_list)
5255         (return_val, completion_tracker): Delete.
5256         (completion_list_add_name, completion_list_add_symbol)
5257         (completion_list_add_msymbol, completion_list_objc_symbol)
5258         (completion_list_add_fields, add_symtab_completions): Add
5259         completion_tracker parameter and use it.
5260         (default_make_symbol_completion_list_break_on_1): Rename to...
5261         (default_collect_symbol_completion_matches_break_on): ... this.
5262         Add completion_tracker parameter and use it instead of allocating
5263         a completion tracker here.
5264         (default_make_symbol_completion_list_break_on): Delete old
5265         implementation.
5266         (default_make_symbol_completion_list): Delete.
5267         (default_collect_symbol_completion_matches): New.
5268         (make_symbol_completion_list): Delete.
5269         (collect_symbol_completion_matches): New.
5270         (make_symbol_completion_type): Rename to ...
5271         (collect_symbol_completion_matches_type): ... this.  Add
5272         completion_tracker parameter and use it instead of VEC.
5273         (make_file_symbol_completion_list_1): Rename to...
5274         (collect_file_symbol_completion_matches): ... this.  Add
5275         completion_tracker parameter and use it instead of VEC.
5276         (make_file_symbol_completion_list): Delete.
5277         (add_filename_to_list): Use completion_list instead of a VEC.
5278         (add_partial_filename_data::list): Now a completion_list.
5279         (make_source_files_completion_list): Work with a completion_list
5280         instead of a VEC.
5281         * symtab.h: Include "completer.h".
5282         (default_make_symbol_completion_list_break_on)
5283         (default_make_symbol_completion_list, make_symbol_completion_list)
5284         (make_symbol_completion_type, make_file_symbol_completion_list)
5285         (make_source_files_completion_list): Delete.
5286         (default_collect_symbol_completion_matches_break_on)
5287         (default_collect_symbol_completion_matches)
5288         (collect_symbol_completion_matches)
5289         (collect_symbol_completion_matches_type)
5290         (collect_file_symbol_completion_matches)
5291         (make_source_files_completion_list): New.
5292         * top.c (init_main): Don't install a rl_completion_entry_function
5293         hook.  Install a rl_attempted_completion_function hook instead.
5294         * tui/tui-layout.c (layout_completer): Adjust to work with a
5295         completion_tracker.
5296         * tui/tui-regs.c (tui_reggroup_completer):
5297         * tui/tui-win.c (window_name_completer, focus_completer)
5298         (winheight_completer): Adjust to work with a completion_tracker.
5299         * value.c: Include "completer.h".
5300         (complete_internalvar): Adjust to work with a completion_tracker.
5301         * value.h (complete_internalvar): Likewise.
5302
5303 2017-07-17  Pedro Alves  <palves@redhat.com>
5304
5305         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5306         renames.
5307         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5308         comments to completer_ftype's declaration.
5309         <completer_handle_brkchars>: Change type to
5310         completer_handle_brkchars_ftype.
5311         * command.h (completer_ftype): Add describing comment and give
5312         names to parameters.
5313         (completer_ftype_void): Rename to ...
5314         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5315         (set_cmd_completer_handle_brkchars): Adjust.
5316         * completer.c (filename_completer_handle_brkchars): New function.
5317         (complete_line_internal_normal_command): New function, factored
5318         out from ...
5319         (complete_line_internal): ... here.
5320         (command_completer_handle_brkchars)
5321         (default_completer_handle_brkchars)
5322         (completer_handle_brkchars_func_for_completer): New functions.
5323         * completer.h (set_gdb_completion_word_break_characters): Delete
5324         declaration.
5325         (completer_handle_brkchars_func_for_completer): New declaration.
5326         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5327         completer_handle_brkchars_func_for_completer.
5328
5329 2017-07-17  Pedro Alves  <palves@redhat.com>
5330
5331         * completer.c (symbol_completer): New function, based on
5332         make_symbol_completion_list_fn.
5333         * completer.h (symbol_completer): New declaration.
5334         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5335         * python/py-cmd.c (completers): Adjust.
5336         * symtab.c (make_symbol_completion_list_fn): Delete.
5337         * symtab.h (make_symbol_completion_list_fn): Delete.
5338         * cli/cli-decode.c (add_cmd): Adjust.
5339
5340 2017-07-17  Pedro Alves  <palves@redhat.com>
5341
5342         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5343         * dwarf2read.c: Include "filename-seen-cache.h".
5344         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5345         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5346         * filename-seen-cache.c: New file.
5347         * filename-seen-cache.h: New file.
5348         * symtab.c: Include "filename-seen-cache.h".
5349         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5350         (create_filename_seen_cache, clear_filename_seen_cache)
5351         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5352         to filename-seen-cache.h/filename-seen-cache.c.
5353         (output_source_filename, sources_info)
5354         (maybe_add_partial_symtab_filename)
5355         (make_source_files_completion_list): Adjust to use
5356         filename_seen_cache.
5357
5358 2017-07-17  Pedro Alves  <palves@redhat.com>
5359
5360         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5361         fields.
5362         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5363         dwarf2_debug_sections*)): New.
5364         (dwarf2_per_objfile::dwarf2_per_objfile(const
5365         dwarf2_per_objfile&)): Declare as deleted.
5366         (dwarf2_per_objfile::operator=): Declare as deleted.
5367         (dwarf2_per_objfile::dwarf2_per_objfile)
5368         (dwarf2_per_objfile::~dwarf2_per_objfile)
5369         (dwarf2_per_objfile::free_cached_comp_units): New.
5370         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5371         ctor.  Call dwarf2_per_objfile's ctor manually.
5372         (dwarf2_locate_sections): Deleted/refactored as ...
5373         (dwarf2_per_objfile::locate_sections): ... this new method.
5374         (free_cached_comp_units): Defer to
5375         dwarf2_per_objfile::free_cached_comp_units.
5376         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5377
5378 2017-07-14  Tom Tromey  <tom@tromey.com>
5379
5380         PR rust/21764:
5381         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5382         parameter.
5383         <UNOP_SIZEOF>: Split into separate case.
5384         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5385
5386 2017-07-14  Tom Tromey  <tom@tromey.com>
5387
5388         PR rust/21763:
5389         * symtab.c (symbol_matches_domain): Add language_rust to special
5390         case.
5391         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5392         treat LOC_TYPEDEF symbols as variables.
5393
5394 2017-07-14  Pedro Alves  <palves@redhat.com>
5395
5396         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5397         symtabs matching all symtabs with SRCFILE as file name instead of
5398         only considering the first hit, with lookup_symtab.
5399
5400 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5401
5402         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5403         operator_name parameters.
5404         (gen_expr): Update function call.
5405
5406 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5407
5408         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5409         parameter.
5410         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5411         Likewise.
5412         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5413         parameter, use agent_expr::gdbarch instead, update function
5414         calls.
5415         (locexpr_tracepoint_var_ref): Likewise.
5416         (loclist_tracepoint_var_ref): Likewise.
5417         * ax-gdb.c (gen_trace_static_fields): Likewise.
5418         (gen_traced_pop): Likewise.
5419         (gen_frame_args_address): Likewise.
5420         (gen_frame_locals_address): Likewise.
5421         (gen_var_ref): Likewise.
5422         (gen_struct_ref_recursive): Likewise.
5423         (gen_static_field): Likewise.
5424         (gen_maybe_namespace_elt): Likewise.
5425         (gen_expr): Likewise.
5426         (gen_trace_for_var): Likewise.
5427         (gen_trace_for_expr): Likewise.
5428         (gen_trace_for_return_address): Likewise.
5429
5430 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5431
5432         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5433         parameter.
5434         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5435
5436 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5437
5438         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5439         from ax, update calls.
5440         (gen_usual_arithmetic): Likewise.
5441         (gen_integral_promotions): Likewise.
5442         (gen_bitfield_ref): Likewise.
5443         (gen_primitive_field): Likewise.
5444         (gen_struct_ref_recursive): Likewise.
5445         (gen_struct_ref): Likewise.
5446         (gen_maybe_namespace_elt): Likewise.
5447         (gen_struct_elt_for_reference): Likewise.
5448         (gen_namespace_elt): Likewise.
5449         (gen_aggregate_elt_ref): Likewise.
5450         (gen_expr): Get gdbarch from ax, update calls.
5451         (gen_expr_binop_rest): Likewise.
5452
5453 2017-07-13  Pedro Alves  <palves@redhat.com>
5454
5455         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5456         as default tdesc.
5457         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5458         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5459         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5460         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5461         tdep.
5462         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5463         Get final tdesc from the tdep.
5464         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5465         default tdesc.
5466         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5467         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5468         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5469         Use it as default tdesc.
5470         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5471         down to amd_init_abi.  No longer handle fallback tdesc here.
5472         * amd64-tdep.h (tdesc_x32): Declare.
5473         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5474         parameter.
5475         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5476         as default tdesc.
5477
5478 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5479
5480         * s390-linux-tdep.c (s390_process_record): Add support for
5481         instructions new in arch12.
5482
5483 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5484
5485         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5486         PT_GETFSBASE and PT_GETGSBASE.
5487         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5488         PT_SETGSBASE.
5489
5490 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5491
5492         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5493         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5494         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5495         those rules.
5496         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5497         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5498         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5499         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5500         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5501         * features/i386/amd64.xml: Add 64bit-segments.xml.
5502         * features/i386/amd64-avx-avx512.c: Regenerated.
5503         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5504         * features/i386/amd64-avx-mpx.c: Regenerated.
5505         * features/i386/amd64-avx.c: Regenerated.
5506         * features/i386/amd64-mpx.c: Regenerated.
5507         * features/i386/amd64.c: Regenerated.
5508         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5509         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5510         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5511         * regformats/i386/amd64-avx.dat: Regenerated.
5512         * regformats/i386/amd64-mpx.dat: Regenerated.
5513         * regformats/i386/amd64.dat: Regenerated.
5514
5515 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5516
5517         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5518         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5519
5520 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5521
5522         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5523         unsetenv.
5524         * gnulib/aclocal.m4: Regenerate.
5525         * gnulib/config.in: Regenerate.
5526         * gnulib/configure: Regenerate.
5527         * gnulib/import/Makefile.am: Regenerate.
5528         * gnulib/import/Makefile.in: Regenerate.
5529         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5530         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5531         * gnulib/import/m4/environ.m4: New file.
5532         * gnulib/import/m4/setenv.m4: New file.
5533         * gnulib/import/setenv.c: New file.
5534         * gnulib/import/unsetenv.c: New file.
5535
5536 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5537
5538         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5539         address when op is DW_OP_addr.
5540
5541 2017-07-09  Tom Tromey  <tom@tromey.com>
5542
5543         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5544         check and apply to outer type.
5545
5546 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5547
5548         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5549         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5550         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5551         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5552
5553 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5554
5555         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5556
5557 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5558
5559         * corelow.c (get_core_siginfo): Remove.
5560         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5561         instead of get_core_siginfo.
5562         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5563         * gdbarch.h: Re-generate.
5564         * gdbarch.c: Re-generate.
5565         * linux-tdep.c (linux_core_xfer_siginfo): New.
5566         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5567
5568 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5569
5570         * corelow.c (thread_section_name): Move to ...
5571         * gdbcore.h (thread_section_name): ... here.
5572
5573 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5574
5575         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5576         (struct siginfo32): New.
5577         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5578         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5579         via ptrace(PT_LWPINFO).
5580
5581 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5582
5583         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5584         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5585         (fbsd_get_siginfo_type): New.
5586         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5587         (_initialize_fbsd_tdep): New.
5588
5589 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5590
5591         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5592         a singular dwo_unit*) to support multiple CUs in the same way that
5593         multiple TUs are supported.
5594         (create_cus_hash_table): Replace create_dwo_cu with a function for
5595         parsing multiple CUs from a DWO file.
5596         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5597         create_dwo_cu.
5598         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5599         htab_find, rather than comparing the signature to a singleton CU in
5600         the dwo_file.
5601
5602 2017-07-06  Pedro Alves  <palves@redhat.com>
5603
5604         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5605
5606 2017-07-04  Pedro Alves  <palves@redhat.com>
5607
5608         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5609         * gdbtypes.h (TYPE_STATIC): Delete.
5610         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5611         is_synchronized, is_native>: Delete.
5612         <dummy>: Bump.
5613         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5614         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5615         (TYPE_FN_FIELD_ABSTRACT): Delete.
5616
5617 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5618
5619         * buffer.h (buffer_finish): Fix spelling mistakes.
5620
5621 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5622
5623         * .dir-locals.el: Automatically switch to C-style comments in
5624         versions of Emacs that support the feature.
5625
5626 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5627             Pedro Alves  <palves@redhat.com>
5628
5629         PR cli/21688
5630         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5631         (process_next_line): New variable 'inline_cmd'.
5632         Adjust 'if' clauses for "python", "compile" and "guile" to use
5633         'command_name_equals' and check for '!inline_cmd'.
5634
5635 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5636
5637         PR cli/21688
5638         * cli/cli-script.c (command_name_equals_not_inline): New function.
5639         (process_next_line): Adjust 'if' clauses for "python", "compile"
5640         and "guile" to use command_name_equals_not_inline.
5641
5642 2017-06-29  Pedro Alves  <palves@redhat.com>
5643
5644         * completer.c (expression_completer): Call
5645         linespec_location_completer instead of location_completer.
5646
5647 2017-06-29  Pedro Alves  <palves@redhat.com>
5648
5649         * completer.c (expression_completer): Remove code that recomputes
5650         'text' from 'word'.
5651
5652 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5653
5654         * regformats/regdat.sh: Generate code with
5655         "ifndef IN_PROCESS_AGENT".
5656
5657 2017-06-28  Pedro Alves  <palves@redhat.com>
5658
5659         * command.h: Include "common/scoped_restore.h".
5660
5661 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5662
5663         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5664         instead of obstack_grow.
5665
5666 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5667
5668         PR gdb/21337
5669         * symfile.c (reread_symbols): Call objfiles_changed just before
5670         read_symbols.
5671
5672 2017-06-27  Pedro Alves  <palves@redhat.com>
5673
5674         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5675         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5676         (completion_list_add_symbol, completion_list_add_msymbol):
5677         ... these new functions.
5678         (add_symtab_completions)
5679         (default_make_symbol_completion_list_break_on_1): Adjust.
5680
5681 2017-06-27  Pedro Alves  <palves@redhat.com>
5682
5683         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5684         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5685         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5686         dtor.
5687         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5688         'storage_obstack' field an auto_obstack.  In-class initialize all
5689         non-bitfield fields.  Make minsyms_read bool.
5690         * symfile.c (read_symbols): Adjust.
5691
5692 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5693
5694         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5695         (gdbsim_store_register): Likewise.
5696
5697 2017-06-27  Pedro Alves  <palves@redhat.com>
5698
5699         * c-exp.y (name_obstack): Now an auto_obstack.
5700         (yylex): Use auto_obstack::clear.
5701         (c_parse): Use auto_obstack::clear instead of reinitializing and
5702         freeing the obstack.
5703         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5704         * d-exp.y (name_obstack): Now an auto_obstack.
5705         (yylex): Use auto_obstack::clear.
5706         (d_parse): Use auto_obstack::clear instead of reinitializing and
5707         freeing the obstack.
5708         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5709         auto_obstack.
5710         * dwarf2read.c (create_addrmap_from_index)
5711         (dwarf2_build_psymtabs_hard)
5712         (update_enumeration_type_from_children): Likewise.
5713         * gdb_obstack.h (auto_obstack): New type.
5714         * go-exp.y (name_obstack): Now an auto_obstack.
5715         (build_packaged_name): Use auto_obstack::clear.
5716         (go_parse): Use auto_obstack::clear instead of reinitializing and
5717         freeing the obstack.
5718         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5719         auto_obstack.
5720         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5721         * rust-exp.y (work_obstack): Now an auto_obstack.
5722         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5723         reinitializing and freeing the obstack.
5724         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5725         (host_char_to_target): Use auto_obstack.
5726         * utils.h (make_cleanup_obstack_free): Delete declaration.
5727         * valprint.c (generic_emit_char, generic_printstr): Use
5728         auto_obstack.
5729
5730 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5731
5732         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5733         thread.
5734         (darwin_init_thread_list): Don't update dummy thread.
5735         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5736
5737 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5738
5739         * record-full.c (netorder16): Remove.
5740
5741 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5742
5743         * common/diagnostics.h: Define macros for GCC.
5744         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5745         * common/vec.h: Include diagnostics.h.
5746         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5747         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5748         warning.
5749
5750 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5751
5752         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5753         New macro.
5754         * ada-lex.l: Ignore deprecated register warnings.
5755
5756 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5757
5758         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5759         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5760
5761 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5762
5763         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5764         its own line.
5765
5766 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5767
5768         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5769
5770 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5771
5772         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5773         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5774         (xtensa_register_read_masked): Likewise.
5775
5776 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5777
5778         * common/environ.c (gdb_environ::unset): Update comment.
5779
5780 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5781
5782         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5783         registers.
5784
5785 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5786
5787         * record-full.c (record_full_exec_insn): Use byte_vector.
5788
5789 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5790
5791         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5792         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5793
5794 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5795
5796         * remote.c (cached_reg): Move from here...
5797         * regcache.h (cached_reg): ...to here.
5798         * python/py-unwind.c (struct reg_info): Remove.
5799         (cached_frame_info): Use cached_reg_t.
5800         (pyuw_prev_register): Likewise.
5801         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5802         (pyuw_dealloc_cache): Free all registers.
5803
5804 2017-06-22  Pedro Alves  <palves@redhat.com>
5805             Simon Marchi  <simon.marchi@ericsson.com>
5806
5807         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5808         warning.
5809         * common/diagnostics.h: New file.
5810
5811 2017-06-22  Pedro Alves  <palves@redhat.com>
5812
5813         * common/agent.h: Add include guards.
5814
5815 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5816
5817         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5818         talk about addressable units instead of bytes.
5819
5820 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5821
5822         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5823         of '::const_iterator'.
5824
5825 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5826
5827         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5828         'unittests/environ-selftests.c'.
5829         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5830         * charset.c (find_charset_names): Declare object 'iconv_env'.
5831         Update code to use 'iconv_env' object.  Remove call to
5832         'free_environ'.
5833         * common/environ.c: Include <utility>.
5834         (make_environ): Delete function.
5835         (free_environ): Delete function.
5836         (gdb_environ::clear): New function.
5837         (gdb_environ::operator=): New function.
5838         (gdb_environ::get): Likewise.
5839         (environ_vector): Delete function.
5840         (set_in_environ): Delete function.
5841         (gdb_environ::set): New function.
5842         (unset_in_environ): Delete function.
5843         (gdb_environ::unset): New function.
5844         (gdb_environ::envp): Likewise.
5845         * common/environ.h: Include <vector>.
5846         (struct gdb_environ): Delete; transform into...
5847         (class gdb_environ): ... this class.
5848         (free_environ): Delete prototype.
5849         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5850         environ_vector): Likewise.
5851         * infcmd.c (run_command_1): Update code to call
5852         'envp' from 'gdb_environ' class.
5853         (environment_info): Update code to call methods from 'gdb_environ'
5854         class.
5855         (unset_environment_command): Likewise.
5856         (path_info): Likewise.
5857         (path_command): Likewise.
5858         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5859         (inferior::inferior): Initialize 'environment' using the host's
5860         information.
5861         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5862         Include "environ.h".
5863         (class inferior) <environment>: Change type from 'struct
5864         gdb_environ' to 'gdb_environ'.
5865         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5866         methods from 'gdb_environ' class.
5867         * solib.c (solib_find_1): Likewise
5868         * unittests/environ-selftests.c: New file.
5869
5870 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5871
5872         * features/i386/i386-linux.xml: Exchange the order of including
5873         32bit-linux.xml and 32bit-sse.xml.
5874         * features/i386/i386-linux.c: Regenerated.
5875
5876 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5877
5878         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5879         Delete copy ctor and assignment operator.
5880         (tdesc_type): Likewise.
5881         (tdesc_feature): Likewise.
5882         (tdesc_free_reg): Remove.
5883         (tdesc_create_reg): Use new.
5884         (tdesc_free_type): Remove.
5885         (tdesc_create_vector): Use new.
5886         (tdesc_create_union): Likewise.
5887         (tdesc_create_flags): Likewise.
5888         (tdesc_create_enum): Likewise.
5889         (tdesc_free_feature): Delete.
5890         (free_target_description): Use delete.
5891
5892 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
5893
5894         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5895         registers.
5896
5897 2017-06-19  Pedro Alves  <palves@redhat.com>
5898
5899         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5900         after gdb::unlinker.
5901
5902 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
5903
5904         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5905         gdb_environ to access an environment variable.
5906
5907 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
5908
5909         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5910         gdb_byte*.
5911
5912 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5913
5914         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5915
5916 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5917
5918         * configure: Re-generate.
5919         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5920
5921 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5922
5923         * configure: Re-generate.
5924         * warning.m4: Pass -Werror to compiler when checking for
5925         supported warning flags.
5926
5927 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5928
5929         * Makefile.in (COMPILE.pre): Add "-x c++".
5930
5931 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
5932             Pedro Alves  <palves@redhat.com>
5933             Yao Qi  <yao.qi@linaro.org>
5934
5935         * defs.h (RequireLongest): New.
5936         (extract_integer): Declare function template.
5937         (extract_signed_integer): Remove the declaration, but define it
5938         static inline.
5939         (extract_unsigned_integer): Likewise.
5940         (store_integer): Declare function template.
5941         (store_signed_integer): Remove the declaration, but define it
5942         static inline.
5943         (store_unsigned_integer): Likewise.
5944         * findvar.c (extract_integer): New function template.
5945         (extract_signed_integer): Remove.
5946         (extract_unsigned_integer): Remove.
5947         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5948         instantiations.
5949         (store_integer): New function template.
5950         (store_signed_integer): Remove.
5951         (store_unsigned_integer): Remove.
5952         (store_integer): Explicit instantiations.
5953         * regcache.c (regcache_raw_read_signed): Update.
5954         (regcache::raw_read): New function.
5955         (regcache::raw_read_signed): Remove.
5956         (regcache::raw_read_unsigned): Remove.
5957         (regcache_raw_read_unsigned): Update.
5958         (regcache_raw_write_unsigned): Update.
5959         (regcache::raw_write_signed): Remove.
5960         (regcache::raw_write): New function.
5961         (regcache_cooked_read_signed): Update.
5962         (regcache::raw_write_unsigned): Remove.
5963         (regcache::cooked_read_signed): Remove.
5964         (regcache_cooked_read_unsigned): Update.
5965         (regcache::cooked_read_unsigned): Remove.
5966         (regcache_cooked_write_signed): Update.
5967         (regcache_cooked_write_unsigned): Update.
5968         * regcache.h (regcache) <raw_read_signed>: Remove.
5969         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5970         <raw_read, raw_write>: New.
5971         <cooked_read_signed, cooked_write_signed>: Remove.
5972         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5973         <cooked_read, cooked_write>: New.
5974         * sh64-tdep.c (sh64_pseudo_register_read): Update.
5975         (sh64_pseudo_register_write): Update.
5976
5977 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
5978
5979         * arc-tdep.c (arc_disassembler_options): New variable.
5980         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5981         of default_print_insn.
5982         (arc_delayed_print_insn): Set info->section when needed,
5983         use default_print_insn to retrieve a disassembler.
5984
5985 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5986
5987         PR gdb/21574
5988         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5989         to mention $SHELL and startup-with-shell.
5990
5991 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
5992
5993         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5994
5995 2017-06-14  Yao Qi  <yao.qi@linaro.org>
5996
5997         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5998         default_print_insn instead of print_insn_aarch64.
5999         * arm-tdep.c (gdb_print_insn_arm): Call
6000         default_print_insn instead of print_insn_big_arm
6001         and print_insn_little_arm.
6002         * i386-tdep.c (i386_print_insn): Call default_print_insn
6003         instead of print_insn_i386.
6004         * ia64-tdep.c (ia64_print_insn): Call
6005         default_print_insn instead of print_insn_ia64.
6006         * mips-tdep.c (gdb_print_insn_mips): Call
6007         default_print_insn instead of print_insn_big_mips
6008         and print_insn_little_mips.
6009         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6010         instead of print_insn_spu.
6011
6012 2017-06-14  Pedro Alves  <palves@redhat.com>
6013
6014         * ada-lang.c: Include "common/byte-vector.h".
6015         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6016         * charset.c (wchar_iterator::iterate): Resize the vector instead
6017         of reserving it.
6018         * common/byte-vector.h: Include "common/def-vector.h".
6019         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6020         * cli/cli-dump.c: Include "common/byte-vector.h".
6021         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6022         * common/byte-vector.h: New file.
6023         * common/def-vector.h: New file.
6024         * common/default-init-alloc.h: New file.
6025         * dwarf2loc.c: Include "common/byte-vector.h".
6026         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6027         instead of reserving it.
6028         * dwarf2read.c: Include "common/byte-vector.h".
6029         (data_buf::m_vec): Now a gdb::byte_vector.
6030         * gdb_regex.c: Include "common/def-vector.h".
6031         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6032         * mi/mi-main.c: Include "common/byte-vector.h".
6033         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6034         * printcmd.c: Include "common/byte-vector.h".
6035         (print_scalar_formatted): Use gdb::byte_vector.
6036         * valprint.c: Include "common/byte-vector.h".
6037         (maybe_negate_by_bytes, print_decimal_chars): Use
6038         gdb::byte_vector.
6039
6040 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6041
6042         * darwin-nat.c: Include "nat/fork-inferior.h".
6043
6044 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6045
6046         * configure.nat: Factor out Darwin bits that are not
6047         architecture-specific.  Add fork-inferior.o.
6048
6049 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6050
6051         * configure.nat: Factor out AIX bits that are not
6052         architecture-specific.  Add fork-inferior.o.
6053
6054 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6055
6056         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6057         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6058         wrappers that just call rw_pieced_value.
6059
6060 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6061
6062         * dwarf2loc.c (write_pieced_value): When writing the data for a
6063         memory piece, use write_memory_with_notification instead of
6064         write_memory.
6065
6066 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6067
6068         * valops.c (read_value_memory): Change embedded_offset to
6069         represent a bit offset instead of a byte offset.
6070         * value.h (read_value_memory): Adjust comment.
6071
6072 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6073
6074         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6075         dest_offset_bits and source_offset_bits.
6076         (write_pieced_value): Likewise.
6077
6078 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6079
6080         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6081         given by DW_OP_bit_piece.
6082         (write_pieced_value): Likewise.
6083
6084 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6085
6086         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6087         some other preparations to the places where sufficient information
6088         is available.
6089         (write_pieced_value): Likewise.
6090
6091 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6092
6093         * dwarf2loc.c (bits_to_bytes): New function.
6094         (read_pieced_value): Fix offset calculations for register pieces
6095         on big-endian targets.
6096         (write_pieced_value): Likewise.
6097
6098 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6099
6100         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6101         (write_pieced_value): Likewise.
6102
6103 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6104
6105         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6106         transfer the source value's least significant bits, instead of its
6107         lowest-addressed ones.  Rename type_len to max_offset.
6108         (read_pieced_value): Mirror above changes to write_pieced_value as
6109         applicable.
6110
6111 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6112
6113         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6114         truncate full bytes from dest_offset_bits before using it as an
6115         offset into the buffer.
6116
6117 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6118
6119         * dwarf2loc.c (write_pieced_value): Include transfer size in
6120         byte-wise check.
6121
6122 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6123
6124         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6125         calculation of this_size.
6126
6127 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6128
6129         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6130         when targeting a bit-field.
6131         (write_pieced_value): Likewise.
6132
6133 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6134
6135         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6136         (allocate_piece_closure): Drop addr_size parameter.
6137         (dwarf2_evaluate_loc_desc_full): Adjust call to
6138         allocate_piece_closure.
6139
6140 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6141
6142         PR gdb/21226
6143         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6144         the LSB end, independent of endianness.
6145
6146 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6147
6148         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6149         size capping.
6150
6151 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6152
6153         * mips-linux-nat.c: Move include features/mips*-linux.c to
6154         mips-linux-tdep.c.
6155         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6156         to mips-linux-tdep.c.
6157         * mips-linux-tdep.c: Include features/mips*-linux.c
6158         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6159         functions.
6160         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6161         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6162         (tdesc_mips64_dsp_linux): Declare.
6163
6164 2017-06-12  Tom Tromey  <tom@tromey.com>
6165
6166         * valprint.h (val_print_type_code_int): Remove.
6167         * valprint.c (generic_val_print_int): Always call
6168         val_print_scalar_formatted.
6169         (val_print_type_code_int): Remove.
6170         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6171         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6172         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6173         * ada-valprint.c (ada_val_print_num): Use
6174         val_print_scalar_formatted.
6175
6176 2017-06-12  Tom Tromey  <tom@tromey.com>
6177
6178         * printcmd.c (print_scalar_formatted): Unify the two switches.
6179         Don't convert scalars to LONGEST.
6180
6181 2017-06-12  Tom Tromey  <tom@tromey.com>
6182
6183         PR exp/16225:
6184         * valprint.h (print_decimal_chars): Update.
6185         * valprint.c (maybe_negate_by_bytes): New function.
6186         (print_decimal_chars): Add "is_signed" argument.
6187         * printcmd.c (print_scalar_formatted): Update.
6188
6189 2017-06-12  Tom Tromey  <tom@tromey.com>
6190
6191         PR exp/16225:
6192         * valprint.h (print_binary_chars, print_hex_chars): Update.
6193         * valprint.c (val_print_type_code_int): Update.
6194         (print_binary_chars): Add "zero_pad" argument.
6195         (emit_octal_digit): New function.
6196         (print_octal_chars): Don't zero-pad.
6197         (print_decimal_chars): Likewise.
6198         (print_hex_chars): Add "zero_pad" argument.
6199         * sh64-tdep.c (sh64_do_fp_register): Update.
6200         * regcache.c (regcache::dump): Update.
6201         * printcmd.c (print_scalar_formatted): Update.
6202         * infcmd.c (default_print_one_register_info): Update.
6203
6204 2017-06-12  Pedro Alves  <palves@redhat.com>
6205             Alan Hayward  <alan.hayward@arm.com>
6206
6207         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6208         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6209         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6210         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6211         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6212
6213 2017-06-12  Pedro Alves  <palves@redhat.com>
6214
6215         * dwarf2read.c (mapped_symtab::data): Now a vector of
6216         symtab_index_entry instead of vector of
6217         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6218         whether an element's name is NULL instead of checking whether the
6219         element itself is NULL.
6220         (find_slot): Change return type.  Adjust.
6221         (hash_expand, , add_index_entry, uniquify_cu_indices)
6222         (write_hash_table): Adjust.
6223
6224 2017-06-12  Pedro Alves  <palves@redhat.com>
6225
6226         * dwarf2read.c (recursively_count_psymbols): New function.
6227         (write_psymtabs_to_index): Call it to compute number of psyms and
6228         pass estimate size of psyms_seen to unordered_set's ctor.
6229
6230 2017-06-12  Pedro Alves  <palves@redhat.com>
6231
6232         * dwarf2read.c (write_hash_table): Check if key already exists
6233         before emplacing.
6234
6235 2017-06-12  Pedro Alves  <palves@redhat.com>
6236
6237         * dwarf2read.c (data_buf::append_space): Rename to...
6238         (data_buf::grow): ... this, and make private.  Adjust all callers.
6239         (data_buf::append_uint): New method.
6240         (add_address_entry, write_one_signatured_type)
6241         (write_psymtabs_to_index): Use it.
6242
6243 2017-06-12  Pedro Alves  <palves@redhat.com>
6244
6245         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6246         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6247         (data_buf::file_write): Call ::fwrite directly.
6248
6249 2017-06-12  Pedro Alves  <palves@redhat.com>
6250
6251         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6252         std::vector::erase.
6253
6254 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6255
6256         Code cleanup: C++ify .gdb_index producer.
6257         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6258         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6259         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6260         (create_strtab, add_string): Remove.
6261         (file_write, data_buf): New.
6262         (struct symtab_index_entry): Use std::vector for cu_indices.
6263         (struct mapped_symtab): Use std::vector for data.
6264         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6265         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6266         Remove.
6267         (find_slot): Change return type.  Update it to the new data structures.
6268         (hash_expand, add_index_entry): Update it to the new data structures.
6269         (offset_type_compare): Remove.
6270         (uniquify_cu_indices): Update it to the new data structures.
6271         (c_str_view, c_str_view_hasher, vector_hasher): New.
6272         (add_indices_to_cpool): Remove.
6273         (write_hash_table): Update it to the new data structures.
6274         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6275         (eq_psymtab_cu_index): Remove.
6276         (psym_index_map): New typedef.
6277         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6278         reference and std::unordered_map for cu_index_htab.
6279         (add_address_entry, add_address_entry_worker, write_address_map)
6280         (write_psymbols): Update it to the new data structures.
6281         (write_obstack): Remove.
6282         (struct signatured_type_index_data): Change types_list to a data_buf
6283         reference and psyms_seen to a std::unordered_set reference.
6284         (write_one_signatured_type, recursively_write_psymbols)
6285         (write_psymtabs_to_index): Update it to the new data structures.
6286
6287 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6288
6289         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6290         separate-debug-file commands.
6291         * symfile.h (separate_debug_file_debug): New global.
6292         * symfile.c (separate_debug_file_debug): New global.
6293         (separate_debug_file_exists, find_separate_debug_file): Add
6294         debug output.
6295         (_initialize_symfile): Add "set debug separate-debug-file"
6296         command.
6297         * build-id.c (build_id_to_debug_bfd,
6298         find_separate_debug_file_by_buildid): Add debug output.
6299
6300 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6301
6302         * gdbarch.sh (displaced_step_free_closure): Remove.
6303         * gdbarch.h, gdbarch.c: Re-generate.
6304         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6305         displaced_step_free_closure.
6306         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6307         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6308         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6309         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6310         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6311         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6312         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6313         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6314         * infrun.c (displaced_step_clear): Call xfree instead of
6315         gdbarch_displaced_step_free_closure.
6316
6317 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6318
6319         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6320         NULL".
6321
6322 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6323
6324         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6325         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6326         (mn10300_push_dummy_call): Likewise.
6327
6328 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6329
6330         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6331
6332 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6333
6334         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6335
6336 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6337
6338         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6339         able to start inferiors using a shell.
6340         (New remote packets): Announce new packet "QStartupWithShell".
6341         * remote.c: Add PACKET_QStartupWithShell.
6342         (extended_remote_create_inferior): Handle new
6343         PACKET_QStartupWithShell.
6344         (remote_protocol_features) <QStartupWithShell>: New entry for
6345         PACKET_QStartupWithShell.
6346         (_initialize_remote): Call "add_packet_config_cmd" for
6347         QStartupShell.
6348
6349 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6350             Pedro Alves  <palves@redhat.com>
6351
6352         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6353         and "nat/fork-inferior.h".
6354         * common/common-inferior.h: New file, with contents from
6355         "gdb/inferior.h".
6356         * commom/common-utils.c: Include "common-utils.h".
6357         (stringify_argv): New function.
6358         * common/common-utils.h (stringify_argv): New prototype.
6359         * configure.nat: Add "fork-inferior.o" as a dependency for
6360         "*linux*", "fbsd*" and "nbsd*" hosts.
6361         * corefile.c (get_exec_file): Update comment.
6362         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6363         instead of "startup_inferior".
6364         (darwin_create_inferior): Call "add_thread_silent" after
6365         "fork_inferior".
6366         * fork-child.c: Cleanup unnecessary includes.
6367         (SHELL_FILE): Move to "common/common-fork-child.c".
6368         (environ): Likewise.
6369         (exec_wrapper): Initialize.
6370         (get_exec_wrapper): New function.
6371         (breakup_args): Move to "common/common-fork-child.c"; rename to
6372         "breakup_args_for_exec".
6373         (escape_bang_in_quoted_argument): Move to
6374         "common/common-fork-child.c".
6375         (saved_ui): New variable.
6376         (prefork_hook): New function.
6377         (postfork_hook): Likewise.
6378         (postfork_child_hook): Likewise.
6379         (gdb_startup_inferior): Likewise.
6380         (fork_inferior): Move to "common/common-fork-child.c".  Update
6381         function to support gdbserver.
6382         (startup_inferior): Likewise.
6383         * gdbcore.h (get_exec_file): Remove declaration.
6384         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6385         instead of "startup_inferior".  Call "add_thread_silent" after
6386         "fork_inferior".
6387         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6388         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6389         instead of "startup_inferior".  Call "add_thread_silent" after
6390         "fork_inferior".
6391         * inferior.h: Include "common-inferior.h".
6392         (trace_start_error): Move to "common/common-utils.h".
6393         (trace_start_error_with_name): Likewise.
6394         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6395         (startup_inferior): Likewise.
6396         (gdb_startup_inferior): New prototype.
6397         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6398         * nat/fork-inferior.h: New file.
6399         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6400         instead of "startup_inferior".  Call "add_thread_silent" after
6401         "fork_inferior".
6402         * target.h (target_terminal_init): Move prototype to
6403         "target/target.h".
6404         (target_terminal_inferior): Likewise.
6405         (target_terminal_ours): Likewise.
6406         * target/target.h (target_terminal_init): New prototype, moved
6407         from "target.h".
6408         (target_terminal_inferior): Likewise.
6409         (target_terminal_ours): Likewise.
6410         * utils.c (gdb_flush_out_err): New function.
6411
6412 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6413
6414         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6415         * common/common-gdbthread.h: New file, with parts from
6416         "gdb/gdbthread.h".
6417         * gdbthread.h: Include "common-gdbthread.h".
6418         (switch_to_thread): Moved to "common/common-gdbthread.h".
6419
6420 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6421
6422         * Makefile.in (SFILES): Add "common/job-control.c".
6423         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6424         (COMMON_OBS): Add "job-control.o".
6425         * common/job-control.c: New file, with contents from
6426         "gdb/inflow.c".
6427         * common/job-control.h: New file, with contents from "terminal.h".
6428         * fork-child.c: Include "job-control.h".
6429         * inflow.c: Include "job-control.h".
6430         (gdb_setpgid): Move to "common/common-inflow.c".
6431         (_initialize_inflow): Move setting of "job_control" to
6432         "handle_job_control".
6433         * terminal.h (job_control): Moved to "common/common-terminal.h".
6434         (gdb_setpgid): Likewise.
6435         * top.c: Include "job_control.h".
6436         * utils.c: Likewise.
6437         (job_control): Moved to "job-control.c".
6438
6439 2017-06-07  Pedro Alves  <palves@redhat.com>
6440
6441         * Makefile.in (SFILES): Add gdb_regex.c.
6442         (COMMON_OBS): Add gdb_regex.o.
6443         * ada-lang.c (ada_add_standard_exceptions)
6444         (ada_add_exceptions_from_frame, name_matches_regex)
6445         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6446         parameter type to compiled_regex.  Adjust.
6447         (ada_exceptions_list): Use compiled_regex.
6448         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6449         std::unique_ptr<compiled_regex>.
6450         (exception_catchpoint::~exception_catchpoint): Remove regfree
6451         call.
6452         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6453         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6454         * breakpoint.c (solib_catchpoint::compiled): Now a
6455         std::unique_ptr<compiled_regex>.
6456         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6457         (check_status_catch_solib): Adjust to use compiled_regex.
6458         (add_solib_catchpoint): Adjust to use compiled_regex.
6459         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6460         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6461         compiled_regex reference.  Adjust to use it.
6462         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6463         declaration.  Include "gdb_regex.h".
6464         (apropos_cmd): Change regex parameter to compiled_regex reference.
6465         * gdb_regex.c: New file.
6466         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6467         declarations.
6468         (class compiled_regex): New.
6469         * linux-tdep.c: Include "common/gdb_optional.h".
6470         (struct mapping_regexes): New, factored out from
6471         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6472         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6473         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6474         * probe.c: Include "common/gdb_optional.h".
6475         (collect_probes): Use compiled_regex and gdb::optional and remove
6476         cleanups.
6477         * skip.c: Include "common/gdb_optional.h".
6478         (skiplist_entry::compiled_function_regexp): Now a
6479         gdb::optional<compiled_regex>.
6480         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6481         (free_skiplist_entry): Remove regfree call.
6482         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6483         compiled_regex and gdb::optional.
6484         * symtab.c: Include "common/gdb_optional.h".
6485         (search_symbols): Use compiled_regex and gdb::optional.
6486         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6487         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6488         to gdb_regex.c.
6489
6490 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6491
6492         * regcache.c (regcache::save): Avoid buffer use.
6493         (regcache::dump): Likewise.
6494
6495 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6496
6497         * sh-tdep.c (sh_pseudo_register_read): Remove
6498         MAX_REGISTER_SIZE.
6499         (sh_pseudo_register_write): Likewise.
6500         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6501         (sh64_pseudo_register_write): Likewise
6502
6503 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6504
6505         * aarch64-tdep.c (aarch64_store_return_value): Use
6506         V_REGISTER_SIZE.
6507         (aarch64_pseudo_read_value): Likewise.
6508         (aarch64_pseudo_write): Likewise.
6509
6510 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6511
6512         * regformats/regdef.h (set_register_cache): Remove the
6513         declaration.
6514
6515 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6516
6517         * frame.c (frame_unwind_register_signed): Use
6518         frame_unwind_register_value.
6519
6520 2017-06-06  Pedro Alves  <palves@redhat.com>
6521
6522         PR breakpoints/21553
6523         * breakpoint.c (create_breakpoints_sal_default)
6524         (init_breakpoint_sal, create_breakpoint_sal): Use
6525         gdb::unique_xmalloc_ptr for string parameters.
6526         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6527         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6528         (base_breakpoint_create_breakpoints_sal)
6529         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6530         (strace_marker_create_breakpoints_sal)
6531         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6532         string parameters.
6533         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6534         gdb::unique_xmalloc_ptr for string parameters.
6535         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6536         parameters.
6537
6538 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6539
6540         * alpha-tdep.c (alpha_register_to_value): Use
6541         get_frame_register_value.
6542         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6543
6544 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6545
6546         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6547         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6548         (ia64_value_to_register): Likewise.
6549         (ia64_extract_return_value): Likewise.
6550         (ia64_store_return_value): Likewise.
6551         (ia64_push_dummy_call): Likewise.
6552
6553 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6554
6555         GDB 8.0 released.
6556
6557 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6558
6559         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6560
6561 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6562
6563         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6564         parameter.
6565         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6566
6567 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6568
6569         * event-loop.c (poll_timers): Unallocate timer using delete
6570         instead of xfree.
6571
6572 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6573
6574         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6575         (struct breakpoint) <~breakpoint>: New.
6576         (struct watchpoint): Inherit from breakpoint.
6577         <~watchpoint>: New.
6578         <base>: Remove.
6579         (struct tracepoint): Inherit from breakpoint.
6580         <base>: Remove.
6581         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6582         (struct longjmp_breakpoint): Inherit from breakpoint.
6583         <~longjmp_breakpoint>: New.
6584         <base>: Remove.
6585         (new_breakpoint_from_type): Remove casts.
6586         (watchpoint_in_thread_scope): Remove reference to base field.
6587         (watchpoint_del_at_next_stop): Likewise.
6588         (update_watchpoint): Likewise.
6589         (watchpoint_check): Likewise.
6590         (bpstat_check_watchpoint): Likewise.
6591         (set_longjmp_breakpoint): Likewise.
6592         (struct fork_catchpoint): Inherit from breakpoint.
6593         <base>: Remove.
6594         (struct solib_catchpoint): Inherit from breakpoint.
6595         <~solib_catchpoint>: New.
6596         <base>: Remove.
6597         (dtor_catch_solib): Change to ...
6598         (solib_catchpoint::~solib_catchpoint): ... this.
6599         (breakpoint_hit_catch_solib): Remove reference to base field.
6600         (add_solib_catchpoint): Likewise.
6601         (create_fork_vfork_event_catchpoint): Likewise.
6602         (struct exec_catchpoint): Inherit from breakpoint.
6603         <~exec_catchpoint>: New.
6604         <base>: Remove.
6605         (dtor_catch_exec): Change to ...
6606         (exec_catchpoint::~exec_catchpoint): ... this.
6607         (dtor_watchpoint): Change to ...
6608         (watchpoint::~watchpoint): ... this.
6609         (watch_command_1): Remove reference to base field.
6610         (catch_exec_command_1): Likewise.
6611         (base_breakpoint_dtor): Change to ...
6612         (breakpoint::~breakpoint): ... this.
6613         (base_breakpoint_ops): Remove dtor field value.
6614         (longjmp_bkpt_dtor): Change to ...
6615         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6616         (strace_marker_create_breakpoints_sal): Remove reference to base
6617         field.
6618         (delete_breakpoint): Don't manually call breakpoint destructor.
6619         (create_tracepoint_from_upload): Remove reference to base field.
6620         (trace_pass_set_count): Likewise.
6621         (initialize_breakpoint_ops): Don't initialize
6622         momentary_breakpoint_ops, don't set dtors.
6623         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6624         <~ada_catchpoint>: New.
6625         <base>: Remove.
6626         (create_excep_cond_exprs): Remove reference to base field.
6627         (dtor_exception): Change to ...
6628         (ada_catchpoint::~ada_catchpoint): ... this.
6629         (dtor_catch_exception): Remove.
6630         (dtor_catch_exception_unhandled): Remove.
6631         (dtor_catch_assert): Remove.
6632         (create_ada_exception_catchpoint): Remove reference to base
6633         field.
6634         (initialize_ada_catchpoint_ops): Don't set dtors.
6635         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6636         breakpoint.
6637         <~signal_catchpoint>: New.
6638         <base>: Remove.
6639         (signal_catchpoint_dtor): Change to ...
6640         (signal_catchpoint::~signal_catchpoint): ... this.
6641         (create_signal_catchpoint): Remove reference to base field.
6642         (initialize_signal_catchpoint_ops): Don't set dtor.
6643         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6644         from breakpoint.
6645         <~syscall_catchpoint>: New.
6646         <base>: Remove.
6647         (dtor_catch_syscall): Change to ...
6648         (syscall_catchpoint::~syscall_catchpoint): ... this.
6649         (create_syscall_event_catchpoint): Remove reference to base
6650         field.
6651         (initialize_syscall_catchpoint_ops): Don't set dtor.
6652         * break-catch-throw.c (struct exception_catchpoint): Inherit
6653         from breakpoint.
6654         <~exception_catchpoint>: New.
6655         <base>: Remove.
6656         (dtor_exception_catchpoint): Change to ...
6657         (exception_catchpoint::~exception_catchpoint): ... this.
6658         (handle_gnu_v3_exceptions): Remove reference to base field.
6659         (initialize_throw_catchpoint_ops): Don't set dtor.
6660         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6661         field.
6662         * remote.c (remote_get_tracepoint_status): Likewise.
6663         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6664         * tracefile.c (tracefile_fetch_registers): Likewise.
6665         * tracepoint.c (actions_command): Likewise.
6666         (validate_actionline): Likewise.
6667         (tfind_1): Likewise.
6668         (get_traceframe_location): Likewise.
6669         (find_matching_tracepoint_location): Likewise.
6670         (parse_tracepoint_status): Likewise.
6671         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6672
6673 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6674
6675         * breakpoint.c (struct longjmp_breakpoint): New struct.
6676         (is_tracepoint_type): Change return type to bool.
6677         (is_longjmp_type): New function.
6678         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6679         (set_raw_breakpoint_without_location): Use
6680         new_breakpoint_from_type.
6681         (set_raw_breakpoint): Likewise.
6682
6683 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6684
6685         * breakpoint.c (new_breakpoint_from_type): New function.
6686         (create_breakpoint_sal): Use new_breakpoint_from_type and
6687         unique_ptr.
6688         (create_breakpoint): Likewise.
6689
6690 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6691
6692         * memattr.c (mem_info_command): Rename to ...
6693         (info_mem_command): ... this.
6694         (mem_enable_command): Rename to ...
6695         (enable_mem_command): ... this.
6696         (mem_disable_command): Rename to ...
6697         (disable_mem_command): ... this.
6698         (mem_delete_command): Rename to ...
6699         (delete_mem_command): ... this.
6700         (_initialize_mem): Adjust function names.
6701
6702 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6703
6704         * btrace.c (handle_pt_insn_events): New.
6705         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6706         STATUS.  Split into this and ...
6707         (handle_pt_insn_event_flags): ... this.
6708
6709 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6710
6711         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6712         and struct pt_insn.resynced.
6713         * configure: Regenerated.
6714         * config.in: Regenerated.
6715
6716 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6717
6718         * btrace.c (ftrace_find_call_by_number): New function.
6719         (ftrace_new_function): Store objects, not pointers.
6720         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6721         ftrace_new_gap, ftrace_update_function,
6722         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6723         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6724         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6725         btrace_ends_with_single_insn, btrace_call_get): Account for
6726         btrace_thread_info::functions now storing objects.
6727         * btrace.h (struct btrace_thread_info): Add constructor.
6728         (struct btrace_thread_info) <functions>: Make std::vector.
6729         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6730         Initialize with default values.
6731         * record-btrace.c (record_btrace_frame_sniffer): Account for
6732         btrace_thread_info::functions now storing objects.
6733
6734 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6735
6736         * btrace.c: Remove typedef bfun_s.
6737         (ftrace_new_gap): Directly add gaps to the list of gaps.
6738         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6739         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6740         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6741         instead of gdb VEC.
6742
6743 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6744
6745         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6746         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6747         with btrace_thread_info::next_segment and
6748         btrace_thread_info::prev_segment.
6749         * btrace.h: Remove struct btrace_func_link.
6750         (struct btrace_function): Replace pair of function segment pointers
6751         with pair of indices.
6752         * python/py-record-btrace.c (btpy_call_prev_sibling,
6753         btpy_call_next_sibling): Replace references to
6754         btrace_thread_info::segment with btrace_thread_info::next_segment and
6755         btrace_thread_info::prev_segment.
6756         * record-btrace.c (record_btrace_frame_this_id): Use
6757         btrace_find_call_by_number.
6758
6759 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6760
6761         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6762         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6763         btrace_insn_next, btrace_insn_prev): Remove references to
6764         btrace_thread_info::flow.
6765         * btrace.h (struct btrace_function): Remove FLOW.
6766
6767 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6768
6769         * btrace.c (ftrace_find_call_by_number): New function.
6770         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6771         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6772         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6773         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6774         index.
6775         * btrace.h (struct btrace_function): Turn UP into an index.
6776         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6777         as an index.
6778         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6779         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6780         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6781
6782 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6783
6784         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6785         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6786         ftrace_update_function, ftrace_compute_global_level_offset,
6787         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6788         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6789         btrace_insn_end, btrace_is_empty): Remove references to
6790         btrace_thread_info::begin and btrace_thread_info::end.
6791         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6792         (struct btrace_thread_info) <functions>: Adjust comment.
6793         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6794         btrace_thread_info::begin.
6795
6796 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6797
6798         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6799         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6800         ftrace_update_function): Remove arguments that implicitly were always
6801         BTINFO->END.
6802         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6803         Don't pass BTINFO->END.
6804
6805 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6806
6807         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6808         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6809         btrace_find_insn_by_number): Replace function segment pointer with
6810         index.
6811         (btrace_insn_cmp): Simplify.
6812         * btrace.h: (struct btrace_insn_iterator) Rename index to
6813         insn_index.  Replace function segment pointer with index into function
6814         segment vector.
6815         * record-btrace.c (record_btrace_call_history): Replace function
6816         segment pointer use with index.
6817         (record_btrace_frame_sniffer): Retrieve function call segment through
6818         vector.
6819         (record_btrace_set_replay): Remove defunc't safety check.
6820
6821 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6822
6823         * btrace.c (btrace_ends_with_single_insn): New function.
6824         (btrace_call_get, btrace_call_number, btrace_call_begin,
6825         btrace_call_end, btrace_call_next, btrace_call_prev,
6826         btrace_find_call_by_number): Use index into call segment vector
6827         instead of pointer.
6828         (btrace_call_cmp): Simplify.
6829         * btrace.h (struct btrace_call_iterator): Replace function call segment
6830         pointer with index into vector.
6831         * record-btrace.c (record_btrace_call_history): Use index instead of
6832         pointer.
6833
6834 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6835
6836         * btrace.c (btrace_insn_begin, btrace_insn_end,
6837         btrace_find_insn_by_number): Add btinfo to iterator.
6838         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6839
6840 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6841
6842         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6843         and save pointers directly.
6844         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6845         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6846         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6847         changed signature of functions.
6848         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6849         (btrace_fetch): Remove code that adds btrace_function pointers to
6850         vector of btrace_functions.
6851         (btrace_clear): Simplify freeing vector of btrace_functions.
6852
6853 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6854
6855         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6856         Replace VEC_* with std::vector functions.
6857         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6858         (struct btrace_thread_info)<functions>: Change type to std::vector.
6859
6860 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6861
6862         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
6863         "Removed targets and native configurations" up.  Merge duplicate
6864         "New commands" sub-sections.  Add "New options" sub-sections.
6865
6866 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
6867
6868         * defs.h (copy_integer_to_size): New declaration.
6869         * findvar.c (copy_integer_to_size): New function.
6870         (do_cint_test): New selftest function.
6871         (copy_integer_to_size_test): Likewise.
6872         (_initialize_findvar): Likewise.
6873         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6874         (mips_fbsd_collect_reg): Use raw_collect_integer.
6875         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6876         (mips64_fill_gregset): Use raw_collect_integer
6877         (mips64_fill_fpregset): Use raw_supply_integer.
6878         * regcache.c (regcache::raw_supply_integer): New function.
6879         (regcache::raw_collect_integer): Likewise.
6880         * regcache.h: (regcache::raw_supply_integer): New declaration.
6881         (regcache::raw_collect_integer): Likewise.
6882
6883 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6884
6885         * Makefile.in (SFILES): Add gdbarch-selftests.c.
6886         (COMMON_OBS): Add gdbarch-selftests.o.
6887         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6888         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6889         * gdbarch-selftests.c: New file.
6890         * regcache.h (regcache) <~regcache>: Mark it virtual if
6891         GDB_SELF_TEST.
6892         <raw_write>: Likewise.
6893
6894 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6895
6896         * regcache.c (current_regcache): Change it to
6897         regcache::current_regcache.
6898         (regcache_observer_target_changed): Update.
6899         (regcache_thread_ptid_changed): Make it a regcache static
6900         method.
6901         (regcache_thread_ptid_changed): Update.
6902         (class regcache_access): New.
6903         (current_regcache_test): Update.
6904         (_initialize_regcache): Update.
6905         * regcache.h: Include forward_list.
6906         (regcache): Declare regcache_thread_ptid_changed and declare
6907         registers_changed_ptid as friend.
6908
6909 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6910
6911         * i387-tdep.c (i387_register_to_value): Use register_size
6912         instead of TYPE_LENGTH.
6913         * m68k-tdep.c (m68k_register_to_value): Likewise.
6914
6915 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6916
6917         * i387-tdep.c (i387_convert_register_p): Return false if type
6918         code isn't TYPE_CODE_FLT.
6919
6920 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6921
6922         * alpha-tdep.c (alpha_convert_register_p): Return true if type
6923         length is 4.
6924         (alpha_register_to_value): Remove type length check.
6925         (alpha_value_to_register): Likewise.
6926
6927 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6928
6929         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6930         TYPE_CODE_FLT.
6931
6932 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6933
6934         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6935         TYPE_CODE_FLT or not.
6936
6937 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6938
6939         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6940         * avr-tdep.c (avr_gdbarch_init): Likewise.
6941         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6942         * cris-tdep.c (cris_gdbarch_init): Likewise.
6943         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6944         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6945         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6946         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6947         * mep-tdep.c (mep_gdbarch_init): Likewise.
6948         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6949         * mips-tdep.c (mips_gdbarch_init): Likewise.
6950         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6951         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6952         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6953         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6954         * v850-tdep.c (v850_gdbarch_init): Likewise.
6955
6956 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6957
6958         * selftest-arch.c (tests_with_arch): Call registers_changed
6959         and reinit_frame_cache.
6960         * selftest.c (run_self_tests): Likewise.
6961
6962 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6963
6964         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6965         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6966
6967 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6968
6969         * rl78-tdep.c (rl78_gdbarch_init): Don't call
6970         set_gdbarch_print_insn.
6971
6972 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6973
6974         * h8300-tdep.c (h8300_gdbarch_init): Don't call
6975         set_gdbarch_print_insn.
6976
6977 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6978
6979         * alpha-tdep.c (alpha_gdbarch_init): Don't call
6980         set_gdbarch_print_insn.
6981         * arc-tdep.c (arc_gdbarch_init): Likewise.
6982         * arch-utils.c: include dis-asm.h.
6983         (default_print_insn): New function.
6984         * arch-utils.h (default_print_insn): Declare.
6985         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6986         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6987         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6988         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6989         * frv-tdep.c (frv_gdbarch_init): Likewise.
6990         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6991         * gdbarch.sh (print_insn): Use default_print_insn.
6992         * gdbarch.c: Regenerated.
6993         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6994         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6995         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6996         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6997         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6998         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6999         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7000         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7001         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7002         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7003         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7004         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7005         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7006         * mt-tdep.c (mt_gdbarch_init): Likewise.
7007         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7008         * nios2-tdep.c (nios2_print_insn): Remove.
7009         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7010         * rx-tdep.c (rx_gdbarch_init): Likewise.
7011         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7012         * score-tdep.c (score_print_insn): Remove.
7013         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7014         * sh-tdep.c (sh_gdbarch_init): Likewise.
7015         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7016         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7017         * tic6x-tdep.c (tic6x_print_insn): Remove.
7018         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7019         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7020         * v850-tdep.c (v850_gdbarch_init): Likewise.
7021         * vax-tdep.c (vax_gdbarch_init): Likewise.
7022         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7023         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7024
7025 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7026
7027         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7028         (MIPS_FP0_REGNUM): Remove.
7029         (MIPS_FSR_REGNUM): Remove.
7030         (mips_fbsd_supply_fpregs): Use mips_regnum.
7031         (mips_fbsd_supply_gregs): Likewise.
7032         (mips_fbsd_collect_fpregs): Likewise.
7033         (mips_fbsd_collect_gregs): Likewise.
7034
7035 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7036
7037         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7038         (getpfpregs_supplies): New function.
7039         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7040         getfpregs_supplies.
7041         (mips_fbsd_store_inferior_registers): Likewise.
7042
7043 2017-05-22  Pedro Alves <palves@redhat.com>
7044
7045         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7046         maintainer.
7047
7048 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7049
7050         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7051         (store_register): Likewise.
7052         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7053         (get_decimal_float_return_value): Likewise.
7054         (do_ppc_sysv_return_value): Likewise.
7055         (ppc64_sysv_abi_push_integer): Likewise.
7056         (ppc64_sysv_abi_push_freg): Likewise.
7057         (ppc64_sysv_abi_return_value_base): Likewise.
7058         (ppc64_sysv_abi_return_value): Likewise.
7059         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7060         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7061         * rs6000-nat.c: Likewise.
7062         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7063         (rs6000_value_to_register): Likewise.
7064         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7065
7066 2017-05-21  Tom Tromey  <tom@tromey.com>
7067
7068         PR rust/21466:
7069         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7070         arrays as "[T]", not "[T; ]".
7071
7072 2017-05-19  Tom Tromey  <tom@tromey.com>
7073
7074         PR rust/21484:
7075         * rust-lang.c (exp_descriptor_rust): New function.
7076         (rust_language_defn): Use it.
7077         * p-lang.c (pascal_language_defn): Update.
7078         * opencl-lang.c (opencl_language_defn): Update.
7079         * objc-lang.c (objc_language_defn): Update.
7080         * m2-lang.c (m2_language_defn): Update.
7081         * language.h (struct language_defn)
7082         <la_watch_location_expression>: New member.
7083         * language.c (unknown_language_defn, auto_language_defn)
7084         (local_language_defn): Update.
7085         * go-lang.c (go_language_defn): Update.
7086         * f-lang.c (f_language_defn): Update.
7087         * d-lang.c (d_language_defn): Update.
7088         * c-lang.h (c_watch_location_expression): Declare.
7089         * c-lang.c (c_watch_location_expression): New function.
7090         (c_language_defn, cplus_language_defn, asm_language_defn)
7091         (minimal_language_defn): Use it.
7092         * breakpoint.c (watch_command_1): Call
7093         la_watch_location_expression.
7094         * ada-lang.c (ada_language_defn): Update.
7095
7096 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7097
7098         PR tui/21482
7099         * gdb_curses.h (NOMACROS): Define.
7100         (NCURSES_NOMACROS): Define.
7101
7102 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7103
7104         PR tui/21482
7105         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7106         arg to char *.
7107         * tui/tui-wingeneral.c (box_win): Likewise.
7108         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7109         (tui_show_source_line): Likewise.
7110         (tui_show_exec_info_content): Likewise.
7111
7112 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7113
7114         * sparc-tdep.c (sparc_structure_return_p)
7115         (sparc_arg_on_registers_p): New functions.
7116         (sparc32_store_arguments): Use them.
7117         * sparc64-tdep.c (sparc64_16_byte_align_p)
7118         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7119         Handle TYPE_CODE_ARRAY.
7120
7121 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7122
7123         * cli/cli-decode.c (add_alias_cmd): New function.
7124         * command.h (add_alias_cmd): Declare.
7125         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7126         instead call add_alias_cmd.
7127
7128 2017-05-17  Pedro Alves  <palves@redhat.com>
7129
7130         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7131         (nat_makefile_frag): ... this.  All references updated.
7132         * configure.ac: Likewise.
7133         * configure.nat: Likewise.  Enhance comments.
7134         * configure: Regenerate.
7135
7136 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7137
7138         * procfs.c (procfs_create_inferior): Change prototype to match
7139         definition.
7140
7141 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7142
7143         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7144         C++ compiler warning.
7145
7146 2017-05-12  Tom Tromey  <tom@tromey.com>
7147
7148         PR rust/21483:
7149         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7150         recurse, just call value_struct_elt directly.
7151
7152 2017-05-12  Tom Tromey  <tom@tromey.com>
7153
7154         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7155         OP_RUST_ARRAY>: Fix.
7156
7157 2017-05-12  Tom Tromey  <tom@tromey.com>
7158
7159         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7160
7161 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7162
7163         * regcache.c: Include <forward_list>.
7164         (struct regcache_list): Remove.
7165         (current_regcache): Update.
7166         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7167         (regcache_thread_ptid_changed): Likewise.
7168         (registers_changed_ptid): Likewise.
7169         (current_regcache_size): Likewise.
7170
7171 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7172
7173         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7174         (current_regcache_size): New function.
7175         (current_regcache_test): New function.
7176         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7177
7178 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7179
7180         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7181         (print_gp_register_row): Use get_frame_register_value.
7182
7183 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7184
7185         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7186         (mips_supply_fpregset): Likewise.
7187         (mips64_supply_gregset): Likewise.
7188
7189 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7190
7191         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7192         regcache->raw_supply_zeroed.
7193
7194 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7195
7196         * configure.nat: Rearrange 'case' statements to match
7197         host before cpu.
7198
7199 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7200
7201         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7202         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7203         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7204         "@nat_extra_makefile_frag@".
7205         (Makefile): Remove dependency on "@frags@".
7206         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7207         (data-directory/Makefile): Likewise.
7208         * config/aarch64/linux.mh: Deleted; moved contents to
7209         "gdb/configure.nat".
7210         * config/alpha/alpha-linux.mh: Likewise.
7211         * config/alpha/nbsd.mh: Likewise.
7212         * config/arm/linux.mh: Likewise.
7213         * config/arm/nbsdelf.mh: Likewise.
7214         * config/i386/cygwin.mh: Likewise.
7215         * config/i386/cygwin64.mh: Likewise.
7216         * config/i386/darwin.mh: Likewise.
7217         * config/i386/fbsd.mh: Likewise.
7218         * config/i386/fbsd64.mh: Likewise.
7219         * config/i386/go32.mh: Likewise.
7220         * config/i386/i386gnu.mh: Likewise.
7221         * config/i386/i386sol2.mh: Likewise.
7222         * config/i386/linux.mh: Likewise.
7223         * config/i386/linux64.mh: Likewise.
7224         * config/i386/mingw.mh: Likewise.
7225         * config/i386/mingw64.mh: Likewise.
7226         * config/i386/nbsd64.mh: Likewise.
7227         * config/i386/nbsdelf.mh: Likewise.
7228         * config/i386/nto.mh: Likewise.
7229         * config/i386/obsd.mh: Likewise.
7230         * config/i386/obsd64.mh: Likewise.
7231         * config/i386/sol2-64.mh: Likewise.
7232         * config/ia64/linux.mh: Likewise.
7233         * config/m32r/linux.mh: Likewise.
7234         * config/m68k/linux.mh: Likewise.
7235         * config/m68k/nbsdelf.mh: Likewise.
7236         * config/m68k/obsd.mh: Likewise.
7237         * config/m88k/obsd.mh: Likewise.
7238         * config/mips/fbsd.mh: Likewise.
7239         * config/mips/linux.mh: Likewise.
7240         * config/mips/nbsd.mh: Likewise.
7241         * config/mips/obsd64.mh: Likewise.
7242         * config/pa/linux.mh: Likewise.
7243         * config/pa/nbsd.mh: Likewise.
7244         * config/pa/obsd.mh: Likewise.
7245         * config/powerpc/aix.mh: Likewise.
7246         * config/powerpc/fbsd.mh: Likewise.
7247         * config/powerpc/linux.mh: Likewise.
7248         * config/powerpc/nbsd.mh: Likewise.
7249         * config/powerpc/obsd.mh: Likewise.
7250         * config/powerpc/ppc64-linux.mh: Likewise.
7251         * config/powerpc/spu-linux.mh: Likewise.
7252         * config/s390/linux.mh: Likewise.
7253         * config/sh/nbsd.mh: Likewise.
7254         * config/sparc/fbsd.mh: Likewise.
7255         * config/sparc/linux.mh: Likewise.
7256         * config/sparc/linux64.mh: Likewise.
7257         * config/sparc/nbsd64.mh: Likewise.
7258         * config/sparc/nbsdelf.mh: Likewise.
7259         * config/sparc/obsd64.mh: Likewise.
7260         * config/sparc/sol2.mh: Likewise.
7261         * config/tilegx/linux.mh: Likewise.
7262         * config/vax/nbsdelf.mh: Likewise.
7263         * config/vax/obsd.mh: Likewise.
7264         * config/xtensa/linux.mh: Likewise.
7265         * config/i386/i386gnu.mn: New file, with excerpts from
7266         "config/i386/i386gnu.mh".
7267         * configure: Regenerate.
7268         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7269         *.mh files under "gdb/config".
7270         * configure.nat: New file, with contents from the
7271         "gdb/config/*/*.mh" files.
7272
7273 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7274
7275         * btrace.c (btrace_clear): Free insn vector.
7276
7277 2017-05-05  Pedro Alves  <palves@redhat.com>
7278
7279         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7280         * configure: Regenerate.
7281
7282 2017-05-04  Pedro Alves  <palves@redhat.com>
7283
7284         * Makefile.in (SFILES): Add progspace-and-thread.c.
7285         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7286         (COMMON_OBS): Add progspace-and-thread.o.
7287         * breakpoint.c: Include "progspace-and-thread.h".
7288         (update_inserted_breakpoint_locations)
7289         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7290         Use scoped_restore_current_pspace_and_thread.
7291         (create_std_terminate_master_breakpoint): Use
7292         scoped_restore_current_program_space.
7293         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7294         (print_breakpoint_location): Use
7295         scoped_restore_current_program_space.
7296         (bp_loc_is_permanent): Use
7297         scoped_restore_current_pspace_and_thread.
7298         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7299         (download_tracepoint_locations): Use
7300         scoped_restore_current_pspace_and_thread.
7301         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7302         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7303         (enum step_over_calls_kind): Moved from inferior.h.
7304         (class scoped_restore_current_thread): New class.
7305         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7306         declaration.
7307         (scoped_restore_current_thread): New class.
7308         * infcmd.c: Include "common/gdb_optional.h".
7309         (continue_1, proceed_after_attach): Use
7310         scoped_restore_current_thread.
7311         (notice_new_inferior): Use scoped_restore_current_thread.
7312         * inferior.c: Include "progspace-and-thread.h".
7313         (restore_inferior, save_current_inferior): Delete.
7314         (add_inferior_command, clone_inferior_command): Use
7315         scoped_restore_current_pspace_and_thread.
7316         * inferior.h (scoped_restore_current_inferior): New class.
7317         * infrun.c: Include "progspace-and-thread.h" and
7318         "common/gdb_optional.h".
7319         (follow_fork_inferior): Use
7320         scoped_restore_current_pspace_and_thread.
7321         (scoped_restore_exited_inferior): New class.
7322         (handle_vfork_child_exec_or_exit): Use
7323         scoped_restore_exited_inferior,
7324         scoped_restore_current_pspace_and_thread,
7325         scoped_restore_current_thread and scoped_restore.
7326         (fetch_inferior_event): Use scoped_restore_current_thread.
7327         * linespec.c (decode_line_full, decode_line_1): Use
7328         scoped_restore_current_program_space.
7329         * mi/mi-main.c: Include "progspace-and-thread.h".
7330         (exec_continue): Use scoped_restore_current_thread.
7331         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7332         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7333         * proc-service.c (ps_pglobal_lookup): Use
7334         scoped_restore_current_program_space.
7335         * progspace-and-thread.c: New file.
7336         * progspace-and-thread.h: New file.
7337         * progspace.c (release_program_space, clone_program_space): Use
7338         scoped_restore_current_program_space.
7339         (restore_program_space, save_current_program_space)
7340         (save_current_space_and_thread): Delete.
7341         (switch_to_program_space_and_thread): Moved to
7342         progspace-and-thread.c.
7343         * progspace.h (save_current_program_space)
7344         (save_current_space_and_thread): Delete declarations.
7345         (scoped_restore_current_program_space): New class.
7346         * remote.c (remote_btrace_maybe_reopen): Use
7347         scoped_restore_current_thread.
7348         * symtab.c: Include "progspace-and-thread.h".
7349         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7350         * thread.c (print_thread_info_1): Use
7351         scoped_restore_current_thread.
7352         (struct current_thread_cleanup): Delete.
7353         (do_restore_current_thread_cleanup)
7354         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7355         (scoped_restore_current_thread::~scoped_restore_current_thread):
7356         ... this new dtor.
7357         (make_cleanup_restore_current_thread): Rename/convert to ...
7358         (scoped_restore_current_thread::scoped_restore_current_thread):
7359         ... this new ctor.
7360         (thread_apply_all_command): Use scoped_restore_current_thread.
7361         (thread_apply_command): Use scoped_restore_current_thread.
7362         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7363         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7364
7365 2017-05-04  Pedro Alves  <palves@redhat.com>
7366
7367         * thread.c (make_cleanup_restore_current_thread): Move
7368         find_thread_ptid call before the is_stopped call.  Assert that the
7369         thread is found.  Replace is_stopped call by checking the thread's
7370         state directly.  Remove unnecessary NULL-thread check.
7371
7372 2017-05-04  Pedro Alves  <palves@redhat.com>
7373
7374         * corelow.c (thread_section_name): New class.
7375         (get_core_register_section, get_core_siginfo): Use it.
7376
7377 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7378
7379         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7380         (get_core_register_section): Remove xfree of NULL pointer.
7381
7382 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7383
7384         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7385         * regcache.c (regcache::raw_supply_zeroed): New function.
7386         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7387
7388 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7389
7390         * gdbarch.sh: Remove commented out definition of
7391         TARGET_CHAR_BIT.
7392         * gdbarch.h: Re-generate.
7393
7394 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7395
7396         * configure: Regenerate.
7397
7398 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7399
7400         * solib-target.c (solib_target_relocate_section_addresses):
7401         Remove num_section_bases, num_bases, segment_bases variables.
7402
7403 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7404
7405         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7406
7407 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7408
7409         * solib-target.c: Include <vector>
7410         (struct lm_info_target) <~lm_info_target>: Remove.
7411         <segment_bases, section_bases>: Change type to
7412         std::vector<CORE_ADDR>.
7413         (library_list_start_segment, library_list_start_section,
7414         library_list_end_library,
7415         solib_target_relocate_section_addresses): Adjust.
7416
7417 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7418
7419         * gdbarch.sh (software_single_step): Change return type to
7420         std::vector<CORE_ADDR>.
7421         * gdbarch.c, gdbarch.h: Re-generate.
7422         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7423         Adjust.
7424         (arm_deal_with_atomic_sequence_raw): Adjust.
7425         (thumb_get_next_pcs_raw): Adjust.
7426         (arm_get_next_pcs_raw): Adjust.
7427         (arm_get_next_pcs): Adjust.
7428         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7429         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7430         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7431         (alpha_software_single_step): Adjust.
7432         * alpha-tdep.h (alpha_software_single_step): Adjust.
7433         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7434         * arm-tdep.c (arm_software_single_step): Adjust.
7435         (arm_breakpoint_kind_from_current_state): Adjust.
7436         * arm-tdep.h (arm_software_single_step): Adjust.
7437         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7438         * cris-tdep.c (cris_software_single_step): Adjust.
7439         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7440         (micromips_deal_with_atomic_sequence): Adjust.
7441         (deal_with_atomic_sequence): Adjust.
7442         (mips_software_single_step): Adjust.
7443         * mips-tdep.h (mips_software_single_step): Adjust.
7444         * moxie-tdep.c (moxie_software_single_step): Adjust.
7445         * nios2-tdep.c (nios2_software_single_step): Adjust.
7446         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7447         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7448         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7449         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7450         * sparc-tdep.c (sparc_software_single_step): Adjust.
7451         * spu-tdep.c (spu_software_single_step): Adjust.
7452         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7453
7454 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7455
7456         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7457         * gdbarch.h: Re-generate.
7458
7459 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7460
7461         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7462         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7463         * python/py-instruction.c, python/py-instruction.h: New file.
7464         * python/py-record.c: Add py-instruction.h include.
7465         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7466         gdb.RecordInstruction.
7467         * python/python-internal.h: Add gdbpy_initialize_instruction
7468         declaration.
7469         * python/python.c (do_start_initialization): Add
7470         gdbpy_initialize_instruction.
7471
7472 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7473
7474         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7475         Remove.
7476         (btrace_func_from_recpy_func): New function.
7477         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7478         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7479         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7480         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7481         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7482         Also, use new helper functions.
7483         (btpy_list_item): Use new helper functions.
7484         (recpy_bt_function_call_history): Use new type name.
7485         (btpy_call_getset): Remove.
7486         (gdbpy_initialize_btrace): Remove code to initialize
7487         gdb.BtraceFunctionCall.
7488         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7489         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7490         recpy_bt_func_prev, recpy_bt_func_next): New export.
7491         * python/py-record.c (recpy_func_type): New static object.
7492         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7493         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7494         recpy_func_next): New function.
7495         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7496         (recpy_func_getset): New static object.
7497         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7498         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7499
7500 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7501
7502         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7503         (btpy_object, btpy_insn_type, btpy_new): Remove.
7504         (btpy_list_object): Use gdb.RecordInstruction type instead of
7505         gdb.BtraceInstruction type.
7506         (btrace_insn_from_recpy_insn): New function.
7507         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7508         btpy_new.
7509         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7510         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7511         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7512         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7513         instead of btpy_object.
7514         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7515         btpy_insn_data, btpy_insn_decode): Rename to ...
7516         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7517         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7518         recpy_bt_insn_decode): This.  Also, use new helper functions.
7519         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7520         recpy_insn_type.
7521         (btpy_insn_getset): Remove.
7522         (gdbpy_initialize_btrace): Remove code to initialize
7523         gdb.BtraceInstruction.  Use recpy_element_object.
7524         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7525         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7526         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7527         * python/py-record.c (recpy_insn_type): New static object.
7528         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7529         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7530         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7531         New function.
7532         (recpy_insn_getset): New static object.
7533         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7534         * python/py-record.h (recpy_element_object): New typedef.
7535         (recpy_insn_type, recpy_insn_new): New export.
7536
7537 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7538
7539         * py-record-btrace.c (btpy_insn_new): Removed.
7540         (btpy_insn_or_gap_new): New function.
7541         (btpy_insn_error): Removed.
7542         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7543         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7544         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7545         btpy_insn_or_gap_new instead of btpy_insn_new.
7546         (btpy_insn_getset): Remove btpy_insn_error.
7547         * py-record.c (recpy_gap_type): New static object.
7548         (recpy_gap_object): New typedef.
7549         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7550         recpy_gap_reason_string): New function.
7551         (recpy_gap_getset): New static object.
7552         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7553         * py-record.h (recpy_gap_new): New export.
7554
7555 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7556
7557         * python/py-record.c (recpy_ptid): Remove.
7558         (recpy_record_getset): Remove recpy_ptid.
7559
7560 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7561
7562         * btrace.c (btrace_fetch): Set inferior_ptid.
7563         * python/py-record-btrace.c: Add "py-record.h" include.
7564         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7565         recpy_bt_end, recpy_bt_instruction_history,
7566         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7567         in gdb.Record object instead of current ptid.
7568         * python/py-record.c: Include new "py-record.h" file.
7569         (recpy_record_object): Moved to py-record.h.
7570         * python/py-record.h: New file.
7571
7572 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7573
7574         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7575         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7576         indentation.
7577
7578 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7579
7580         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7581         the past maintainers section.
7582
7583 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7584
7585         * infcmd.c (get_return_value): Use regcache ctor, and remove
7586         cleanup.
7587
7588 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7589             Pedro Alves  <palves@redhat.com>
7590
7591         * regcache.c (regcache::regcache): New tag dispatch ctor.
7592         (do_cooked_read): Moved above.
7593         (regcache_dup): Use the tag dispatch ctor..
7594         * regcache.h (regcache): Declare ctor, delete copy ctor and
7595         assignment operator, remove friend regcache_dup.
7596
7597 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7598
7599         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7600         call method save instead of regcache_cpy.
7601         * regcache.h (struct regcache): Make regcache_dup a friend.
7602
7603 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7604
7605         * regcache.c (struct regcache): Move to regcache.h
7606         (regcache::arch): New method.
7607         (regcache_get_ptid): Update.
7608         (get_regcache_arch): Call arch method.
7609         (get_regcache_aspace): Call method aspace.
7610         (register_buffer): Change it to method.
7611         (regcache_save): Change it to regcache::save.
7612         (regcache_restore): Likewise.
7613         (regcache_cpy_no_passthrough): Remove the declaration.
7614         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7615         (regcache_cpy_no_passthrough): Change it to method
7616         cpy_no_passthrough.
7617         (regcache_register_status): Change it to method
7618         get_register_status.
7619         (regcache_invalidate): Change it to method invalidate.
7620         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7621         (regcache_raw_update): Change it to method raw_update.
7622         (regcache_raw_read): Likewise.
7623         (regcache_raw_read_signed): Likewise.
7624         (regcache_raw_read_unsigned): Likewise.
7625         (regcache_raw_write_signed): Likewise.
7626         (regcache_raw_write_unsigned): Likewise.
7627         (regcache_cooked_read): Likewise.
7628         (regcache_cooked_read_value): Likewise.
7629         (regcache_cooked_read_signed): Likewise.
7630         (regcache_cooked_read_unsigned): Likewise.
7631         (regcache_cooked_write_signed): Likewise.
7632         (regcache_cooked_write_unsigned): Likewise.
7633         (regcache_raw_set_cached_value): Likewise.
7634         (regcache_raw_write): Likewise.
7635         (regcache_cooked_write): Likewise.
7636         (regcache_xfer_part): Likewise.
7637         (regcache_raw_read_part): Likewise.
7638         (regcache_raw_write_part): Likewise.
7639         (regcache_cooked_read_part): Likewise.
7640         (regcache_cooked_write_part): Likewise.
7641         (regcache_raw_supply): Likewise.
7642         (regcache_raw_collect): Likewise.
7643         (regcache_transfer_regset): Likewise.
7644         (regcache_supply_regset): Likewise.
7645         (regcache_collect_regset): Likewise.
7646         (regcache_debug_print_register): Likewise.
7647         (enum regcache_dump_what): Move it to regcache.h.
7648         (regcache_dump): Change it to method dump.
7649         * regcache.h (enum regcache_dump_what): New.
7650         (class regcache): New.
7651         * target.c (target_fetch_registers): Call method
7652         debug_print_register.
7653         (target_store_registers): Likewise.
7654
7655 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7656
7657         * windows-nat.c (struct lm_info_windows): Initialize field.
7658         (windows_make_so): Allocate lm_info_windows with new.
7659         (windows_free_so): Free lm_info_windows with delete.
7660
7661 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7662
7663         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7664         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7665         cleanup.
7666         (darwin_free_so): Free lm_info_darwin with delete.
7667
7668 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7669
7670         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7671         <l_addr_p>: Change type to bool.
7672         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7673         (svr4_free_so): Free lm_info_svr4 with delete.
7674         (svr4_copy_library_list): Replace memcpy with call to copy
7675         constructor.
7676         (library_list_start_library, svr4_default_sos): Allocate
7677         lm_info_svr4 with new.
7678
7679 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7680
7681         * solib-target.c (struct lm_info_target): Add destructor,
7682         initialize fields.
7683         <name>: Change type to std::string.
7684         (library_list_start_library): Allocate lm_info_target with new.
7685         (solib_target_free_library_list): Free lm_info_target with
7686         delete.
7687         (solib_target_current_sos): Adapt to std::string.
7688         (solib_target_free_so): Free lm_info_target with delete.
7689
7690 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7691
7692         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7693         fields.
7694         (frv_current_sos): Allocate lm_info_frv with new.
7695         (frv_relocate_main_executable): Free lm_info_frv with delete,
7696         allocate with new.
7697         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7698
7699 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7700
7701         * solib-frv.c (struct lm_info_frv): Fix indentation.
7702
7703 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7704
7705         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7706         map field.
7707         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7708         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7709         and allocate with new.
7710         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7711
7712 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7713
7714         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7715         <filename, member_name>: Change type to std::string.
7716         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7717         (library_list_start_library): Allocate lm_info_aix with new.
7718         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7719         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7720         with copy constructor.
7721
7722 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7723
7724         * solist.h (struct lm_info): Remove.
7725         (struct lm_info_base): New class.
7726         (struct so_list) <lm_info>: Change type to lm_info_base *.
7727         * nto-tdep.c (struct lm_info): Remove.
7728         (lm_addr): Adjust.
7729         * solib-aix.c (struct lm_info): Rename to ...
7730         (struct lm_info_aix): ... this.  Extend lm_info_base.
7731         (lm_info_p): Rename to ...
7732         (lm_info_aix_p): ... this, and adjust.
7733         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7734         solib_aix_parse_libraries, library_list_start_library,
7735         solib_aix_free_library_list, solib_aix_parse_libraries,
7736         solib_aix_get_library_list,
7737         solib_aix_relocate_section_addresses, solib_aix_free_so,
7738         solib_aix_get_section_offsets,
7739         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7740         Adjust.
7741         (struct solib_aix_inferior_data) <library_list>: Adjust.
7742         * solib-darwin.c (struct lm_info): Rename to ...
7743         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7744         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7745         * solib-dsbt.c (struct lm_info): Rename to ...
7746         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7747         (struct dsbt_info) <main_executable_lm_info): Adjust.
7748         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7749         dsbt_relocate_section_addresses): Adjust.
7750         * solib-frv.c (struct lm_info): Rename to ...
7751         (struct lm_info_frv): ... this.  Extend lm_info_base.
7752         (main_executable_lm_info): Adjust.
7753         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7754         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7755         find_canonical_descriptor_in_load_object,
7756         frv_fdpic_find_canonical_descriptor): Adjust.
7757         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7758         to lm_info_svr4.
7759         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7760         svr4_clear_so, svr4_copy_library_list,
7761         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7762         svr4_current_sos, svr4_fetch_objfile_link_map,
7763         solist_update_incremental): Adjust.
7764         * solib-svr4.h (struct lm_info_svr4): Move here from
7765         solib-svr4.c.
7766         * solib-target.c (struct lm_info): Rename to ...
7767         (struct lm_info_target): ... this.  Extend lm_info_base.
7768         (lm_info_p): Rename to ...
7769         (lm_info_target_p): ... this.
7770         (solib_target_parse_libraries, library_list_start_segment,
7771         library_list_start_section, library_list_start_library,
7772         library_list_end_library, solib_target_free_library_list,
7773         solib_target_current_sos, solib_target_free_so,
7774         solib_target_relocate_section_addresses): Adjust.
7775         * windows-nat.c (struct lm_info): Rename to ...
7776         (struct lm_info_windows): ... this.  Extend lm_info_base.
7777         (windows_make_so, handle_load_dll, handle_unload_dll,
7778         windows_xfer_shared_libraries): Adjust.
7779
7780 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7781
7782         * solib-darwin.c (struct darwin_so_list): Remove.
7783         (darwin_current_sos): Allocate an so_list object instead of a
7784         darwin_so_list, separately allocate an lm_info object.
7785         (darwin_free_so): Free lm_info.
7786
7787 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7788
7789         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7790         with fprintf_filtered.
7791
7792 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7793
7794         * regcache.c (regcache::regcache): New function.
7795         (regcache::~regcache): New function.
7796         (regcache_xmalloc_1): Remove.
7797         (regcache_xmalloc): Call new regcache.
7798         (regcache_xfree): Call delete regcache.
7799         (get_thread_arch_aspace_regcache): Call new regcache.
7800
7801 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7802
7803         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7804         lwp instead of ptid_get_lwp.
7805
7806 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7807
7808         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7809         lwp_info instead of getting from inferior_ptid.
7810
7811 2017-04-27  Keith Seitz  <keiths@redhat.com>
7812
7813         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7814         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7815         (CV_CONVERSION_BADNESS): Define.
7816         (rank_one_type): Remove overly restrictive rvalue reference
7817         rank checks.
7818         Add cv-qualifier checks and subranks for type equality.
7819         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7820         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7821         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7822
7823 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7824
7825         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7826         count when creating the object.
7827
7828 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7829             Ulrich Weigand  <uweigand@de.ibm.com>
7830
7831         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7832         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7833         is used in AIX.
7834         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7835         (process_xcoff_symbol): Likewise.
7836         (scan_xcoff_symtab): Likewise.
7837
7838 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7839
7840         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7841         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7842         (ia64_access_reg): Use get_frame_register_unsigned.
7843         (ia64_access_rse_reg): Likewise.
7844         (ia64_libunwind_frame_prev_register): Likewise.
7845
7846 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7847
7848         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7849         * gdbarch.c: Regenerated.
7850         * gdbarch.h: Regenerated.
7851         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7852         visibility external.
7853         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7854         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7855         (enum cfa_how_kind): Move to ...
7856         (struct dwarf2_frame_state_reg_info): Likewise.
7857         (struct dwarf2_frame_state): Likewise.
7858         * dwarf2-frame.h: ... here.
7859         (dwarf2_frame_state_alloc_regs): New declaration.
7860         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7861         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7862
7863 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7864
7865         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7866         regcache_raw_read_unsigned.
7867         (xtensa_pseudo_register_write): Likewise.
7868
7869 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7870
7871         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7872         (nds32_pseudo_register_write): Likewise.
7873
7874 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7875
7876         * regcache.c (struct regcache) <readonly_p>: Change its type
7877         to bool.
7878         (regcache_xmalloc_1): Update parameter type and callers update.
7879
7880 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7881
7882         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7883         set_gdbarch_wchar_bit.
7884         * arm-tdep.c (arm_gdbarch_init): Likewise.
7885
7886 2017-04-25  Pedro Alves  <palves@redhat.com>
7887
7888         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7889         (BothAreRelocatable, memcopy, memmove): Don't define.
7890         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7891         macros.
7892
7893 2017-04-25  Pedro Alves  <palves@redhat.com>
7894
7895         * common/common-defs.h: Include "common/poison.h".
7896         * common/function-view.h: (Not, Or, Requires): Move to traits.h
7897         and adjust.
7898         * common/poison.h: New file.
7899         * common/traits.h: Include <type_traits>.
7900         (Not, Or, Requires): New, moved from common/function-view.h.
7901
7902 2017-04-25  Pedro Alves  <palves@redhat.com>
7903
7904         * breakpoint.h (struct breakpoint): In-class initialize all
7905         fields.  Make boolean fields "bool".
7906         * breakpoint.c (init_raw_breakpoint_without_location): Remove
7907         memset call and initializations no longer necessary.
7908
7909 2017-04-25  Pedro Alves  <palves@redhat.com>
7910
7911         * btrace.c (pt_btrace_insn_flags): Change parameter type to
7912         reference.
7913         (pt_btrace_insn): New function.
7914         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7915
7916 2017-04-25  Pedro Alves  <palves@redhat.com>
7917
7918         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
7919         "base" field and inherit from "bp_location" instead.  Add
7920         non-default ctor.
7921         (allocate_location_exception): Use new non-default ctor.
7922         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7923         (init_bp_location): Convert to ...
7924         (bp_location::bp_location): ... this new ctor, and remove memset
7925         call.
7926         (base_breakpoint_allocate_location): Use the new non-default ctor.
7927         * breakpoint.h (bp_location): Now a class.  Declare default and
7928         non-default ctors.  In-class initialize all members.
7929         (init_bp_location): Remove declaration.
7930
7931 2017-04-25  Pedro Alves  <palves@redhat.com>
7932
7933         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7934         assignment operator.
7935
7936 2017-04-24  Yao Qi  <yao.qi@linaro.org>
7937
7938         * doublest.c (convert_doublest_to_floatformat): Call
7939         floatformat_totalsize_bytes.
7940
7941 2017-04-22  Tom Tromey  <tom@tromey.com>
7942
7943         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7944         ui_out_emit_list.
7945         * stack.c (print_frame): Use ui_out_emit_list.
7946         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7947         ui_out_emit_list.
7948         * mi/mi-main.c (print_one_inferior)
7949         (mi_cmd_data_list_register_names)
7950         (mi_cmd_data_list_register_values, mi_cmd_list_features)
7951         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7952         ui_out_emit_list.
7953         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7954         (mi_output_solib_attribs): Use ui_out_emit_list,
7955         ui_out_emit_tuple.
7956         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7957         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7958         (mi_cmd_stack_list_args, list_args_or_locals): Use
7959         ui_out_emit_list.
7960         * disasm.c (do_assembly_only): Use ui_out_emit_list.
7961         * breakpoint.c (print_solib_event, output_thread_groups): Use
7962         ui_out_emit_list.
7963
7964 2017-04-22  Tom Tromey  <tom@tromey.com>
7965
7966         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7967         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7968         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7969
7970 2017-04-22  Tom Tromey  <tom@tromey.com>
7971
7972         * tracepoint.c (tvariables_info_1)
7973         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7974
7975 2017-04-22  Tom Tromey  <tom@tromey.com>
7976
7977         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7978         annotate_arg_emitter.
7979         * breakpoint.c (print_mention_watchpoint)
7980         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7981         * annotate.h (struct annotate_arg_emitter): New.
7982
7983 2017-04-22  Tom Tromey  <tom@tromey.com>
7984
7985         * record-btrace.c (record_btrace_insn_history)
7986         (record_btrace_insn_history_range, record_btrace_call_history)
7987         (record_btrace_call_history_range): Use ui_out_emit_tuple.
7988         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7989         ui_out_emit_tuple.
7990         * stack.c (print_frame_info): Use ui_out_emit_tuple.
7991         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7992         * skip.c (skip_info): Use ui_out_emit_tuple.
7993         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7994         * progspace.c (print_program_space): Use ui_out_emit_tuple.
7995         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7996         * osdata.c (info_osdata): Use ui_out_emit_tuple.
7997         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7998         ui_out_emit_tuple.
7999         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8000         (output_register, mi_cmd_data_read_memory)
8001         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8002         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8003         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8004         Use ui_out_emit_tuple.
8005         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8006         ui_out_emit_tuple.
8007         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8008         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8009         * linux-thread-db.c (info_auto_load_libthread_db): Use
8010         ui_out_emit_tuple.
8011         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8012         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8013         * disasm.c (do_mixed_source_and_assembly_deprecated)
8014         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8015         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8016         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8017         * breakpoint.c (print_one_breakpoint_location)
8018         (print_one_breakpoint): Use ui_out_emit_tuple.
8019         * auto-load.c (print_script, info_auto_load_cmd): Use
8020         ui_out_emit_tuple.
8021         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8022
8023 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8024
8025         * thread.c (print_thread_info_1): Remove dead code.
8026
8027 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8028
8029         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8030         GDB_SELF_TEST.
8031         * arm-tdep.c (selftests::arm_record_test): Likewise.
8032
8033 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8034
8035         * regcache.c (regcache_restore): Remove argument 2.  Replace
8036         argument 3 with regcache.  Get register status from
8037         src->register_status and get register contents from
8038         register_buffer (src, regnum).
8039         (regcache_cpy): Update.
8040
8041 2017-04-19  Pedro Alves  <palves@redhat.com>
8042
8043         * gdbthread.h (thread): Add missing closing parenthesis in
8044         comment.
8045
8046 2017-04-19  Pedro Alves  <palves@redhat.com>
8047
8048         * common/refcounted-object.h: New file.
8049         * gdbthread.h: Include "common/refcounted-object.h".
8050         (thread_info): Inherit from refcounted_object and add comments.
8051         (thread_info::incref, thread_info::decref)
8052         (thread_info::m_refcount): Delete.
8053         (thread_info::deletable): Use the refcounted_object::refcount()
8054         method.
8055         * inferior.c (current_inferior_): Add comment.
8056         (set_current_inferior): Increment/decrement refcounts.
8057         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8058         not-deletable instead of comparing with the current inferior.
8059         (initialize_inferiors): Increment the initial inferior's refcount.
8060         * inferior.h (struct inferior): Forward declare.
8061         Include "common/refcounted-object.h".
8062         (current_inferior, set_current_inferior): Move declaration to
8063         before struct inferior's definition, and fix comment.
8064         (inferior): Inherit from refcounted_object.  Add comments.
8065         * thread.c (switch_to_thread_no_regs): Reference the thread's
8066         inferior pointer directly instead of doing a ptid lookup.
8067         (switch_to_no_thread): New function.
8068         (switch_to_thread(thread_info *)): New function, factored out
8069         from ...
8070         (switch_to_thread(ptid_t)): ... this.
8071         (restore_current_thread): Delete.
8072         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8073         fields, and add 'inf' field.
8074         (do_restore_current_thread_cleanup): Check whether old->inf is
8075         alive instead of looking up an inferior by ptid.  Use
8076         switch_to_thread and switch_to_no_thread.
8077         (restore_current_thread_cleanup_dtor): Use old->inf directly
8078         instead of lookup up an inferior by id.  Decref the inferior.
8079         Don't restore 'removable'.
8080         (make_cleanup_restore_current_thread): Same the inferior pointer
8081         in old, instead of the inferior number.  Incref the inferior.
8082         Don't save/clear 'removable'.
8083
8084 2017-04-19  Pedro Alves  <palves@redhat.com>
8085
8086         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8087         unittests/scoped_restore-selftests.c.
8088         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8089         * common/scoped_restore.h (scoped_restore_base): Make "class".
8090         (scoped_restore_base::release): New public method.
8091         (scoped_restore_base::scoped_restore_base): New protected ctor.
8092         (scoped_restore_base::m_saved_var): New protected field.
8093         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8094         scoped_restore_base base class instead of m_saved_var directly.
8095         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8096         (scoped_restore_tmpl::scoped_restore_tmpl(const
8097         scoped_restore_tmpl<T>&)): Likewise.
8098         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8099         method.
8100         (scoped_restore_tmpl::saved_var): New method.
8101         (scoped_restore_tmpl::m_saved_var): Delete.
8102         * inferior.h (inferior::detaching): Now a bool.
8103         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8104         cleanup.
8105         * unittests/scoped_restore-selftests.c: New file.
8106
8107 2017-04-19  Pedro Alves  <palves@redhat.com>
8108
8109         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8110         Re-sort in alphabetic order.
8111
8112 2017-04-18  Pedro Alves  <palves@redhat.com>
8113
8114         * xml-support.c (obstack_xml_printf): Delete.
8115         * xml-support.h (obstack_xml_printf): Delete.
8116
8117 2017-04-18  Pedro Alves  <palves@redhat.com>
8118
8119         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8120         vdebug, verror, body_text, start_element, end_element, name,
8121         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8122         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8123         is_xinclude>: Make private and add m_ prefix.
8124         (gdb_xml_parser::body_text): New method, based on ...
8125         (gdb_xml_body_text): ... this.  Adjust.
8126         (gdb_xml_parser::vdebug): New method, based on ...
8127         (gdb_xml_debug): ... this.  Adjust.
8128         (gdb_xml_parser::verror): New method, based on ...
8129         (gdb_xml_error): ... this.  Adjust.
8130         (gdb_xml_parser::start_element): New method, based on ...
8131         (gdb_xml_start_element): ... this.  Adjust.
8132         (gdb_xml_start_element_wrapper): Defer to
8133         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8134         (gdb_xml_parser::end_element): New method, based on ...
8135         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8136         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8137         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8138         (gdb_xml_parser::use_dtd): New method, based on ...
8139         (gdb_xml_use_dtd): ... this.  Adjust.
8140         (gdb_xml_parser::parse): New method, based on ...
8141         (gdb_xml_parse): ... this.  Adjust.
8142         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8143         (xinclude_start_include): Adjust to call the parser's name method.
8144         (xml_xinclude_default, xml_xinclude_start_doctype)
8145         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8146         method.
8147         (xml_process_xincludes): Adjust to call parser methods.
8148         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8149         declarations.
8150
8151 2017-04-18  Pedro Alves  <palves@redhat.com>
8152
8153         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8154         gdb::optional<std::string>.
8155         * xml-support.c: Include <string>.
8156         (scope_level::scope_level(scope_level &&))
8157         (scope_level::~scope_level): Delete.
8158         (scope_level::body): Now a std::string.
8159         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8160         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8161         parameter.
8162         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8163         (xinclude_parsing_data::output): Now a std::string reference.
8164         (xinclude_start_include): Adjust.
8165         (xml_xinclude_default): Adjust.
8166         (xml_process_xincludes): Add 'output' parameter, and return bool.
8167         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8168         and return bool.
8169         * xml-tdesc.c: Include <unordered_map> and <string>.
8170         (tdesc_xml_cache): Delete.
8171         (tdesc_xml_cache_s): Delete.
8172         (xml_cache): Now an std::unordered_map.
8173         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8174         (target_fetch_description_xml): Change return type to
8175         gdb::optional<std::string>, and adjust.
8176         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8177         (target_fetch_description_xml): Change return type to
8178         gdb::optional<std::string>.
8179
8180 2017-04-18  Pedro Alves  <palves@redhat.com>
8181
8182         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8183         unittests/optional-selftests.c.
8184         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8185         * unittests/optional-selftests.c: New file.
8186         * unittests/optional/assignment/1.cc: New file.
8187         * unittests/optional/assignment/2.cc: New file.
8188         * unittests/optional/assignment/3.cc: New file.
8189         * unittests/optional/assignment/4.cc: New file.
8190         * unittests/optional/assignment/5.cc: New file.
8191         * unittests/optional/assignment/6.cc: New file.
8192         * unittests/optional/assignment/7.cc: New file.
8193         * unittests/optional/cons/copy.cc: New file.
8194         * unittests/optional/cons/default.cc: New file.
8195         * unittests/optional/cons/move.cc: New file.
8196         * unittests/optional/cons/value.cc: New file.
8197         * unittests/optional/in_place.cc: New file.
8198         * unittests/optional/observers/1.cc: New file.
8199         * unittests/optional/observers/2.cc: New file.
8200
8201 2017-04-18  Pedro Alves  <palves@redhat.com>
8202
8203         * common/gdb_optional.h: Include common/traits.h.
8204         (in_place_t): New type.
8205         (in_place): New constexpr variable.
8206         (optional::optional): Remove member initialization of
8207         m_instantiated.
8208         (optional::optional(in_place_t...)): New constructor.
8209         (optional::~optional): Use reset.
8210         (optional::optional(const optional&)): New.
8211         (optional::optional(const optional&&)): New.
8212         (optional::optional(T &)): New.
8213         (optional::optional(T &&)): New.
8214         (operator::operator=(const optional &)): New.
8215         (operator::operator=(optional &&)): New.
8216         (operator::operator= (const T &))
8217         (operator::operator= (T &&))
8218         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8219         (operator::reset): New.
8220         (operator::m_instantiated):: Add in-class initializer.
8221         * common/traits.h: Include <type_traits>.
8222         (struct And): New types.
8223
8224 2017-04-18  Pedro Alves  <palves@redhat.com>
8225
8226         * xml-support.c: Include <vector>.
8227         (scope_level::scope_level(const gdb_xml_element *))
8228         (scope_level::scope_level(scope_level&&)): New.
8229         (scope_level::~scope_level): New.
8230         (scope_level_s): Delete.
8231         (gdb_xml_parser::scopes): Now a std::vector.
8232         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8233         Use std::vector.
8234         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8235         scope cleanup code.
8236         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8237         of the scopes member.  Use std::vector::emplace_back.
8238
8239 2017-04-18  Pedro Alves  <palves@redhat.com>
8240
8241         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8242         a bool.
8243         (gdb_xml_end_element): Change type of first parameter.
8244         (gdb_xml_cleanup): Rename to ...
8245         (gdb_xml_parser::~gdb_xml_parser): ... this.
8246         (gdb_xml_create_parser_and_cleanup): Delete with ...
8247         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8248         to this new ctor.
8249         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8250         using gdb_xml_create_parser_and_cleanup.
8251         (xinclude_parsing_data): Add ctor/dtor.
8252         (xml_xinclude_cleanup): Delete.
8253         (xml_process_xincludes): Create a local xinclude_parsing_data
8254         instead of heap-allocating one.  Create a local gdb_xml_parser
8255         instead of heap-allocating one with
8256         gdb_xml_create_parser_and_cleanup.
8257
8258 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8259
8260         PR threads/20743
8261         * fbsd-nat.c (resume_one_thread_cb): Remove.
8262         (resume_all_threads_cb): Remove.
8263         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8264         iterate_over_threads.
8265
8266 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8267
8268         * NEWS: Create a new section for the next release branch.
8269         Rename the section of the current branch, now that it has
8270         been cut.
8271
8272 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8273
8274         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8275         * version.in: Bump version to 8.0.50.DATE-git.
8276
8277 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8278
8279         PR gdb/21385
8280         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8281         independently of the host, and fix build breakage on Cygwin.
8282
8283 2017-04-13  Pedro Alves  <palves@redhat.com>
8284
8285         * inferior.c (free_inferior): Convert to ...
8286         (inferior::~inferior): ... this dtor.
8287         (inferior::inferior): New ctor, factored out from ...
8288         (add_inferior_silent): ... here.  Allocate the inferior with a new
8289         expression.
8290         (delete_inferior): Call delete instead of free_inferior.
8291         * inferior.h (gdb_environ, continuation): Forward declare.
8292         (inferior): Now a class.  Add in-class initialization to all
8293         members.  Make boolean fields bool, except 'detaching'.
8294         (inferior::inferior): New explicit ctor.
8295         (inferior::~inferior): New.
8296
8297 2017-04-13  Pedro Alves  <palves@redhat.com>
8298
8299         * inferior.c (init_inferior_list): Delete.
8300         * inferior.h (init_inferior_list): Delete.
8301
8302 2017-04-13  Pedro Alves  <palves@redhat.com>
8303
8304         PR threads/13217
8305         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8306         (top level): Call it twice, with different thread sets.
8307
8308 2017-04-13  Pedro Alves  <palves@redhat.com>
8309
8310         * thread.c: Include <algorithm>.
8311         (thread_array_cleanup): Delete.
8312         (scoped_inc_dec_ref): New class.
8313         (live_threads_count): New function.
8314         (set_thread_refcount): Delete.
8315         (tp_array_compar_ascending): Now a bool.
8316         (tp_array_compar): Convert to a std::sort comparison function.
8317         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8318         and live_threads_count.
8319
8320 2017-04-13  Pedro Alves  <palves@redhat.com>
8321
8322         * infrun.c (follow_fork_inferior): Also switch the current
8323         inferior.
8324
8325 2017-04-13  Pedro Alves  <palves@redhat.com>
8326
8327         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8328         before calling create_internal_breakpoint.
8329
8330 2017-04-13  Pedro Alves  <palves@redhat.com>
8331
8332         * fork-child.c (execv_argv): New class.
8333         (breakup_args): Refactored as ...
8334         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8335         Copy arguments to storage and replace separators with NULL
8336         terminators in place.
8337         (escape_bang_in_quoted_argument): Adjust to return bool.
8338         (execv_argv::execv_argv): New ctor.
8339         (execv_argv::init_for_shell): New method, factored out from
8340         fork_inferior.  Don't strdup strings into the vector.
8341         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8342         Remove free_vector_argv call.
8343
8344 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8345
8346         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8347         tdep->rx_psw_type.
8348
8349 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8350
8351         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8352         * rx-tdep.c (rx_gdbarch_init): Likewise.
8353
8354 2017-04-13  Pedro Alves  <palves@redhat.com>
8355
8356         * breakpoint.h (struct breakpoint): Reindent.
8357
8358 2017-04-13  Pedro Alves  <palves@redhat.com>
8359
8360         * breakpoint.c (bp_location): Rename to ...
8361         (bp_locations): ... this.  All references updated.
8362         (bp_location_count): Rename to ...
8363         (bp_locations_count): ... this.  All references updated.
8364         (bp_location_placed_address_before_address_max): Rename to ...
8365         (bp_locations_placed_address_before_address_max): ... this.  All
8366         references updated.
8367         (bp_location_shadow_len_after_address_max): Rename to ...
8368         (bp_locations_shadow_len_after_address_max): ... this.  All
8369         references updated.
8370         (bp_location_compare_addrs): Rename to ...
8371         (bp_locations_compare_addrs): ... this.  All references updated.
8372         (bp_location_compare):Rename to ...
8373         (bp_locations_compare): ... this.  All references updated.
8374         (bp_location_target_extensions_update): Rename to ...
8375         (bp_locations_target_extensions_update): ... this.  All references
8376         updated.
8377
8378 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8379
8380         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8381         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8382         'sgtty.h'.
8383         * common/gdb_termios.h: New file, with parts of "terminal.h".
8384         * inflow.c: Include "gdb_termios.h".
8385         * ser-unix.c: Include "gdb_termios.h".
8386         * terminal.h: Move terminal-related defines to
8387         "common/gdb_termios.h".
8388
8389 2017-04-12  Tom Tromey  <tom@tromey.com>
8390
8391         * probe.c (parse_probes): Update.
8392         * location.h (delete_event_location): Don't declare.
8393         (event_location_deleter::operator()): Update.
8394         * location.c (event_location_deleter::operator()): Rename from
8395         delete_event_location.
8396         * linespec.h (linespec_result) <location>: Change type to
8397         event_location_up.
8398         * linespec.c (canonicalize_linespec, event_location_to_sals)
8399         (decode_objc): Update.
8400         (linespec_result): Don't call delete_event_location.
8401         * breakpoint.c (create_breakpoints_sal)
8402         (bkpt_probe_create_sals_from_location)
8403         (strace_marker_create_sals_from_location): Update.
8404
8405 2017-04-12  Tom Tromey  <tom@tromey.com>
8406
8407         * linespec.h (struct linespec_result): Add constructor and
8408         destructor.
8409         (init_linespec_result, destroy_linespec_result)
8410         (make_cleanup_destroy_linespec_result): Don't declare.
8411         * linespec.c (init_linespec_result): Remove.
8412         (linespec_result::~linespec_result): Rename from
8413         destroy_linespec_result.  Update.
8414         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8415         Remove.
8416         * breakpoint.c (create_breakpoint, break_range_command)
8417         (decode_location_default): Update.
8418         * ax-gdb.c (agent_command_1): Update.
8419
8420 2017-04-12  Tom Tromey  <tom@tromey.com>
8421
8422         * remote.c (remote_download_tracepoint): Update.
8423         * python/py-breakpoint.c (bppy_get_location): Update.
8424         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8425         (gdbscm_breakpoint_location): Update.
8426         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8427         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8428         Change type to event_location_up.
8429         * breakpoint.c (create_overlay_event_breakpoint)
8430         (create_longjmp_master_breakpoint)
8431         (create_std_terminate_master_breakpoint)
8432         (create_exception_master_breakpoint)
8433         (breakpoint_event_location_empty_p, print_breakpoint_location)
8434         (print_one_breakpoint_location, create_thread_event_breakpoint)
8435         (init_breakpoint_sal, create_breakpoint)
8436         (print_recreate_ranged_breakpoint, break_range_command)
8437         (init_ada_exception_breakpoint, say_where): Update.
8438         (base_breakpoint_dtor): Don't call delete_event_location.
8439         (bkpt_print_recreate, tracepoint_print_recreate)
8440         (dprintf_print_recreate, update_static_tracepoint)
8441         (breakpoint_re_set_default): Update.
8442
8443 2017-04-12  Tom Tromey  <tom@tromey.com>
8444
8445         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8446         type of "to_do".  Update.
8447         (compute_stack_depth): Use std::vector.
8448
8449 2017-04-12  Tom Tromey  <tom@tromey.com>
8450
8451         * printcmd.c (find_instruction_backward): Use std::vector.
8452
8453 2017-04-12  Tom Tromey  <tom@tromey.com>
8454
8455         * symfile.c (objfilep): Remove typedef.
8456         (reread_symbols): Use a std::vector.
8457
8458 2017-04-12  Tom Tromey  <tom@tromey.com>
8459
8460         * mi/mi-main.c (exec_direction_forward): Remove.
8461         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8462         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8463         scoped_restore.
8464         * guile/guile.c (guile_repl_command, guile_command)
8465         (gdbscm_execute_gdb_command): Use scoped_restore.
8466         * go-exp.y (go_parse): Use scoped_restore.
8467         * d-exp.y (d_parse): Use scoped_restore.
8468         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8469         * c-exp.y (c_parse): Use scoped_restore.
8470
8471 2017-04-12  Tom Tromey  <tom@tromey.com>
8472
8473         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8474         (mi_parse): Update return type.
8475         (mi_parse_free): Remove.
8476         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8477         (mi_parse::~mi_parse): Rename from mi_parse_free.
8478         (mi_parse_cleanup): Remove.
8479         (mi_parse): Return a unique_ptr.  Use new.
8480         * mi/mi-main.c (mi_execute_command): Update.
8481
8482 2017-04-12  Tom Tromey  <tom@tromey.com>
8483
8484         * location.c (explicit_location_lex_one): Return a
8485         unique_xmalloc_ptr.
8486         (string_to_explicit_location): Update.  Remove cleanups.
8487
8488 2017-04-12  Tom Tromey  <tom@tromey.com>
8489
8490         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8491         (compare_value_and_voffset): Change type.  Update.
8492         (compute_vtable_size): Change type of "offset_vec".
8493         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8494         (gnuv3_get_typeid): Remove extraneous declaration.
8495
8496 2017-04-12  Tom Tromey  <tom@tromey.com>
8497
8498         * charset.h (wchar_iterator): Fix comment.
8499
8500 2017-04-12  Tom Tromey  <tom@tromey.com>
8501
8502         * charset.c (iconv_wrapper): New class.
8503         (cleanup_iconv): Remove.
8504         (convert_between_encodings): Use it.
8505
8506 2017-04-12  Tom Tromey  <tom@tromey.com>
8507
8508         * symfile.h (increment_reading_symtab): Update type.
8509         * symfile.c (decrement_reading_symtab): Remove.
8510         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8511         * psymtab.c (psymtab_to_symtab): Update.
8512         * dwarf2read.c (dw2_instantiate_symtab): Update.
8513
8514 2017-04-12  Tom Tromey  <tom@tromey.com>
8515
8516         * jit.c (struct jit_reader): Declare separately.  Add constructor
8517         and destructor.  Change type of "handle".
8518         (loaded_jit_reader): Define separately.
8519         (jit_reader_load): Update.  New "new".
8520         (jit_reader_unload_command): Use "delete".
8521         * gdb-dlfcn.h (struct dlclose_deleter): New.
8522         (gdb_dlhandle_up): New typedef.
8523         (gdb_dlopen, gdb_dlsym): Update types.
8524         (gdb_dlclose): Remove.
8525         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8526         (gdb_dlsym): Change type of "handle".
8527         (make_cleanup_dlclose): Remove.
8528         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8529         * compile/compile-c-support.c (load_libcc): Update.
8530
8531 2017-04-12  Tom Tromey  <tom@tromey.com>
8532
8533         * symtab.h (find_pcs_for_symtab_line): Change return type.
8534         * symtab.c (find_pcs_for_symtab_line): Change return type.
8535         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8536         type of "vec".  Update.
8537         (ltpy_get_pcs_for_line): Update.
8538         * linespec.c (decode_digits_ordinary): Update.
8539
8540 2017-04-12  Tom Tromey  <tom@tromey.com>
8541
8542         * tracepoint.c (actions_command): Update.
8543         * python/python.c (python_command, python_interactive_command):
8544         Update.
8545         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8546         * guile/guile.c (guile_command): Update.
8547         * defs.h (read_command_lines, read_command_lines_1): Return
8548         command_line_up.
8549         (command_lines_deleter): New struct.
8550         (command_line_up): New typedef.
8551         * compile/compile.c (compile_code_command)
8552         (compile_print_command): Update.
8553         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8554         command_line_up.
8555         (make_cleanup_free_command_lines): Remove.
8556         * cli/cli-script.c (get_command_line, read_command_lines_1)
8557         (copy_command_lines): Return command_line_up.
8558         (while_command, if_command, read_command_lines, define_command)
8559         (document_command): Update.
8560         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8561         Remove.
8562         * breakpoint.h (breakpoint_set_commands): Change type of
8563         "commands".
8564         * breakpoint.c (breakpoint_set_commands): Change type of
8565         "commands".  Update.
8566         (do_map_commands_command, update_dprintf_command_list)
8567         (create_tracepoint_from_upload): Update.
8568
8569 2017-04-12  Tom Tromey  <tom@tromey.com>
8570
8571         * tracepoint.c (scope_info): Update.
8572         * spu-tdep.c (spu_catch_start): Update.
8573         * python/python.c (gdbpy_decode_line): Update.
8574         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8575         * python/py-breakpoint.c (bppy_init): Update.
8576         * probe.c (parse_probes): Update.
8577         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8578         * location.h (event_location_deleter): New struct.
8579         (event_location_up): New typedef.
8580         (new_linespec_location, new_address_location, new_probe_location)
8581         (new_explicit_location, copy_event_location)
8582         (string_to_event_location, string_to_event_location_basic)
8583         (string_to_explicit_location): Update return type.
8584         (make_cleanup_delete_event_location): Remove.
8585         * location.c (new_linespec_location, new_address_location)
8586         (new_probe_location, new_explicit_location, copy_event_location):
8587         Return event_location_up.
8588         (delete_event_location_cleanup)
8589         (make_cleanup_delete_event_location): Remove.
8590         (string_to_explicit_location, string_to_event_location_basic)
8591         (string_to_event_location): Return event_location_up.
8592         * linespec.c (canonicalize_linespec, event_location_to_sals)
8593         (decode_line_with_current_source)
8594         (decode_line_with_last_displayed, decode_objc): Update.
8595         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8596         * completer.c (location_completer): Update.
8597         * cli/cli-cmds.c (edit_command, list_command): Update.
8598         * breakpoint.c (create_overlay_event_breakpoint)
8599         (create_longjmp_master_breakpoint)
8600         (create_std_terminate_master_breakpoint)
8601         (create_exception_master_breakpoint)
8602         (create_thread_event_breakpoint): Update.
8603         (init_breakpoint_sal): Update.  Remove some dead code.
8604         (create_breakpoint_sal): Change type of "location".  Update.
8605         (create_breakpoints_sal, create_breakpoint, break_command_1)
8606         (dprintf_command, break_range_command, until_break_command)
8607         (init_ada_exception_breakpoint)
8608         (strace_marker_create_sals_from_location)
8609         (update_static_tracepoint, trace_command, ftrace_command)
8610         (strace_command, create_tracepoint_from_upload): Update.
8611         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8612         * ax-gdb.c (agent_command_1): Update.
8613
8614 2017-04-12  Pedro Alves  <palves@redhat.com>
8615
8616         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8617         * configure.tgt: Handle i[34567]86-*-go32* and
8618         i[34567]86-*-msdosdjgpp*.
8619         * i386-tdep.c (i386_svr4_reg_to_regnum):
8620         Make extern.
8621         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8622         i386-go32-tdep.c.
8623         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8624         * i386-go32-tdep.c: New file.
8625         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8626         declarations.
8627
8628 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8629
8630         * aix-thread.c (pd_status2str): Change return type to const char *.
8631
8632 2017-04-12  Pedro Alves  <palves@redhat.com>
8633
8634         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8635         calls to set_gdbarch_gnu_triplet_regexp.
8636
8637 2017-04-12  Pedro Alves  <palves@redhat.com>
8638
8639         PR gdb/21323
8640         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8641         New enum value.
8642         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8643         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8644         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8645         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8646         * gdbarch.h, gdbarch.c: Regenerate.
8647         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8648         gdbarch_wchar_bit and gdbarch_wchar_signed.
8649         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8650         * arm-tdep.c (arm_gdbarch_init): Likewise.
8651         * avr-tdep.c (avr_gdbarch_init): Likewise.
8652         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8653         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8654         * i386-tdep.c (i386_go32_init_abi): Likewise.
8655         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8656         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8657         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8658         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8659         * sh-tdep.c (sh_gdbarch_init): Likewise.
8660         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8661         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8662         * windows-tdep.c (windows_init_abi): Likewise.
8663         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8664
8665 2017-04-12  Pedro Alves  <palves@redhat.com>
8666
8667         PR c++/21323
8668         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8669         cplus_primitive_type_char32_t>: New enum values.
8670         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8671         and cplus_primitive_type_char32_t.
8672         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8673         32, use the archtecture's built-in type for char16_t and char32_t,
8674         respectively.  Otherwise, fallback to init_integer_type as before,
8675         but make the type unsigned, and issue a complaint.
8676         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8677
8678 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8679
8680         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8681         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8682
8683 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8684
8685         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8686         'const char *'.
8687
8688 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8689
8690         * common/common-utils.c (free_vector_argv): New function.
8691         * common/common-utils.h: Include <vector>.
8692         (free_vector_argv): New prototype.
8693         * darwin-nat.c (darwin_create_inferior): Rewrite function
8694         prototype in order to constify "exec_file" and accept a
8695         "std::string" for "allargs".
8696         * fork-child.c: Include <vector>.
8697         (breakup_args): Rewrite function, using C++.
8698         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8699         and accept "std::string" for "allargs".  Update the code to
8700         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8701         and "execvp".
8702         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8703         order to constify "exec_file" and accept a "std::string" for
8704         "allargs".
8705         * go32-nat.c (go32_create_inferior): Likewise.
8706         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8707         * infcmd.c (run_command_1): Constify "exec_file".  Use
8708         "std::string" for inferior arguments.
8709         * inferior.h (fork_inferior): Update prototype.
8710         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8711         prototype in order to constify "exec_file" and accept a
8712         "std::string" for "allargs".
8713         * nto-procfs.c (procfs_create_inferior): Likewise.
8714         * procfs.c (procfs_create_inferior): Likewise.
8715         * remote-sim.c (gdbsim_create_inferior): Likewise.
8716         * remote.c (extended_remote_run): Update code to accept
8717         "std::string" as argument.
8718         (extended_remote_create_inferior): Rewrite function prototype in
8719         order to constify "exec_file" and accept a "std::string" for
8720         "allargs".
8721         * rs6000-nat.c (super_create_inferior): Likewise.
8722         (rs6000_create_inferior): Likewise.
8723         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8724         * windows-nat.c (windows_create_inferior): Likewise.
8725
8726 2017-04-11  Pedro Alves  <palves@redhat.com>
8727
8728         * thread.c: Fix whitespace throughout.
8729
8730 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8731
8732         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8733
8734 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8735
8736         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8737
8738 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8739
8740         PR gdb/21364
8741         * osdata.c (info_osdata): Check if 'type' is an empty string
8742         instead of NULL.
8743
8744 2017-04-10  Pedro Alves  <palves@redhat.com>
8745
8746         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8747         (ptid_to_global_thread_id, in_thread_list)
8748         (do_captured_list_thread_ids, set_resumed, set_running)
8749         (set_executing, set_stop_requested, finish_thread_state)
8750         (validate_registers_access, can_access_registers_ptid)
8751         (print_thread_info_1, switch_to_thread)
8752         (do_restore_current_thread_cleanup)
8753         (make_cleanup_restore_current_thread, thread_command)
8754         (thread_name_command): Use operator== instead of ptid_equal.
8755
8756 2017-04-10  Pedro Alves  <palves@redhat.com>
8757
8758         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8759         (current_thread_cleanup_chain): Delete.
8760         (restore_current_thread_cleanup_dtor)
8761         (make_cleanup_restore_current_thread): Remove references to
8762         current_thread_cleanup_chain.
8763
8764 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8765
8766         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8767         REG_UNKNOWN.
8768
8769 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8770
8771         PR gdb/19942
8772         * gdbthread.h (thread_info::deletable): New method.
8773         (thread_info::incref): New method.
8774         (thread_info::decref): New method.
8775         (thread_info::refcount): Move it to private.
8776         * infrun.c (save_stop_context): Call inc_refcount.
8777         (release_stop_context_cleanup): Likewise.
8778         * thread.c (set_thread_exited): New function.
8779         (init_thread_list): Delete "tp" only it is deletable, otherwise
8780         call set_thread_exited.
8781         (delete_thread_1): Call set_thread_exited.
8782         (current_thread_cleanup) <inferior_pid>: Remove.
8783         <thread>: New field.
8784         (restore_current_thread_ptid_changed): Removed.
8785         (do_restore_current_thread_cleanup): Adjust.
8786         (restore_current_thread_cleanup_dtor): Don't call
8787         find_thread_ptid.
8788         (set_thread_refcount): Use dec_refcount.
8789         (make_cleanup_restore_current_thread): Adjust.
8790         (thread_apply_all_command): Call inc_refcount.
8791         (_initialize_thread): Don't call
8792         observer_attach_thread_ptid_changed.
8793
8794 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8795
8796         * thread.c (delete_thread_1): Hoist code on marking thread as
8797         exited.
8798
8799 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8800
8801         * windows-nat.c (windows_detach): Initialize ptid with
8802         minus_one_ptid.
8803
8804 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8805
8806         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8807
8808 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8809
8810         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8811         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8812         (bfin_pseudo_register_write): Likewise
8813
8814 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8815
8816         * common/ptid.h (struct ptid): Change to...
8817         (class ptid_t): ... this.
8818         <ptid_t>: New constructors.
8819         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8820         matches>: New methods.
8821         <make_null, make_minus_one>: New static methods.
8822         <pid>: Rename to...
8823         <m_pid>: ...this.
8824         <lwp>: Rename to...
8825         <m_lwp>: ...this.
8826         <tid>: Rename to...
8827         <m_tid>: ...this.
8828         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8829         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8830         as references, move comment to class ptid_t.
8831         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8832         ptid_t static methods.
8833         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8834         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8835         Take ptid arguments as references, implement using ptid_t methods.
8836         * unittests/ptid-selftests.c: New file.
8837         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8838         unittests/ptid-selftests.c.
8839         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8840
8841 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8842
8843         * python/python.c (python_run_simple_file): Cast mode literal to
8844         non-const char pointer as expected by PyFile_FromString.
8845
8846 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8847
8848         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8849         minus_one_ptid and null_ptid.
8850
8851 2017-04-05  Pedro Alves  <palves@redhat.com>
8852
8853         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8854         * configure: Regenerate.
8855
8856 2017-04-05  Pedro Alves  <palves@redhat.com>
8857
8858         * ada-exp.y (yyerror): Constify.
8859         * ada-lang.c (bound_name, get_selections)
8860         (ada_variant_discrim_type)
8861         (ada_variant_discrim_name, ada_value_struct_elt)
8862         (ada_lookup_struct_elt_type, is_unchecked_variant)
8863         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8864         (catch_ada_exception_command_split)
8865         (catch_ada_assert_command_split, catch_assert_command)
8866         (ada_op_name): Constify.
8867         * ada-lang.h (ada_yyerror, get_selections)
8868         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8869         * arc-tdep.c (arc_print_frame_cache): Constify.
8870         * arm-tdep.c (arm_skip_stub): Constify.
8871         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8872         (gen_aggregate_elt_ref): Constify.
8873         * bcache.c (print_bcache_statistics): Constify.
8874         * bcache.h (print_bcache_statistics): Constify.
8875         * break-catch-throw.c (catch_exception_command_1):
8876         * breakpoint.c (struct ep_type_description::description):
8877         Constify.
8878         (add_solib_catchpoint): Constify.
8879         (catch_fork_command_1): Add cast.
8880         (add_catch_command): Constify.
8881         * breakpoint.h (add_catch_command, add_solib_catchpoint):
8882         Constify.
8883         * bsd-uthread.c (bsd_uthread_state): Constify.
8884         * buildsym.c (patch_subfile_names): Constify.
8885         * buildsym.h (next_symbol_text_func, patch_subfile_names):
8886         Constify.
8887         * c-exp.y (yyerror): Constify.
8888         (token::oper): Constify.
8889         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8890         * c-varobj.c (cplus_describe_child): Constify.
8891         * charset.c (find_charset_names): Add cast.
8892         (find_charset_names): Constify array and add const_cast.
8893         * cli/cli-cmds.c (complete_command, cd_command): Constify.
8894         (edit_command): Constify.
8895         * cli/cli-decode.c (lookup_cmd): Constify.
8896         * cli/cli-dump.c (dump_memory_command, dump_value_command):
8897         Constify.
8898         (struct dump_context): Constify.
8899         (add_dump_command, restore_command): Constify.
8900         * cli/cli-script.c (get_command_line): Constify.
8901         * cli/cli-script.h (get_command_line): Constify.
8902         * cli/cli-utils.c (check_for_argument): Constify.
8903         * cli/cli-utils.h (check_for_argument): Constify.
8904         * coff-pe-read.c (struct read_pe_section_data): Constify.
8905         * command.h (lookup_cmd): Constify.
8906         * common/print-utils.c (decimal2str): Constify.
8907         * completer.c (gdb_print_filename): Constify.
8908         * corefile.c (set_gnutarget): Constify.
8909         * cp-name-parser.y (yyerror): Constify.
8910         * cp-valprint.c (cp_print_class_member): Constify.
8911         * cris-tdep.c (cris_register_name, crisv32_register_name):
8912         Constify.
8913         * d-exp.y (yyerror): Constify.
8914         (struct token::oper): Constify.
8915         * d-lang.h (d_yyerror): Constify.
8916         * dbxread.c (struct header_file_location::name): Constify.
8917         (add_old_header_file, add_new_header_file, last_function_name)
8918         (dbx_next_symbol_text, add_bincl_to_list)
8919         (find_corresponding_bincl_psymtab, set_namestring)
8920         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8921         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8922         * defs.h (command_line_input, print_address_symbolic)
8923         (deprecated_readline_begin_hook): Constify.
8924         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8925         Constify.
8926         * event-top.c (handle_line_of_input): Constify and add cast.
8927         * exceptions.c (catch_errors): Constify.
8928         * exceptions.h (catch_errors): Constify.
8929         * expprint.c (print_subexp_standard, op_string, op_name)
8930         (op_name_standard, dump_raw_expression, dump_raw_expression):
8931         * expression.h (op_name, op_string, dump_raw_expression):
8932         Constify.
8933         * f-exp.y (yyerror): Constify.
8934         (struct token::oper): Constify.
8935         (struct f77_boolean_val::name): Constify.
8936         * f-lang.c (f_word_break_characters): Constify.
8937         * f-lang.h (f_yyerror): Constify.
8938         * fork-child.c (fork_inferior): Add cast.
8939         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8940         (new_variant): Constify.
8941         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8942         * gdbarch.c: Regenerate.
8943         * gdbcore.h (set_gnutarget): Constify.
8944         * go-exp.y (yyerror): Constify.
8945         (token::oper): Constify.
8946         * go-lang.h (go_yyerror): Constify.
8947         * go32-nat.c (go32_sysinfo): Constify.
8948         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8949         * guile/scm-cmd.c (cmdscm_function): Constify.
8950         * guile/scm-param.c (pascm_param_value): Constify.
8951         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8952         (h8300sx_register_name): Constify.
8953         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8954         Constify.
8955         * ia64-tdep.c (ia64_register_names): Constify.
8956         * infcmd.c (construct_inferior_arguments): Constify.
8957         (path_command, attach_post_wait): Constify.
8958         * language.c (show_range_command, show_case_command)
8959         (unk_lang_error): Constify.
8960         * language.h (language_defn::la_error)
8961         (language_defn::la_name_of_this): Constify.
8962         * linespec.c (decode_line_2): Constify.
8963         * linux-thread-db.c (thread_db_err_str): Constify.
8964         * lm32-tdep.c (lm32_register_name): Constify.
8965         * m2-exp.y (yyerror): Constify.
8966         * m2-lang.h (m2_yyerror): Constify.
8967         * m32r-tdep.c (m32r_register_names): Constify and make static.
8968         * m68hc11-tdep.c (m68hc11_register_names): Constify.
8969         * m88k-tdep.c (m88k_register_name): Constify.
8970         * macroexp.c (appendmem): Constify.
8971         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8972         (upgrade_type, parse_external, parse_partial_symbols)
8973         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8974         (new_symbol): Constify.
8975         * memattr.c (mem_info_command): Constify.
8976         * mep-tdep.c (register_name_from_keyword): Constify.
8977         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8978         Constify.
8979         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8980         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8981         * mi/mi-main.c (captured_mi_execute_command): Constify and add
8982         cast.
8983         (mi_execute_async_cli_command): Constify.
8984         * mips-tdep.c (mips_register_name): Constify.
8985         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8986         (am33_register_name, am33_2_register_name)
8987         * moxie-tdep.c (moxie_register_names): Constify.
8988         * nat/linux-osdata.c (osdata_type): Constify fields.
8989         * nto-tdep.c (nto_parse_redirection): Constify.
8990         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8991         (lookup_child_selector): Constify.
8992         (objc_methcall::name): Constify.
8993         * objc-lang.h (lookup_objc_class, lookup_child_selector)
8994         (lookup_struct_typedef): Constify.
8995         * objfiles.c (pc_in_section): Constify.
8996         * objfiles.h (pc_in_section): Constify.
8997         * p-exp.y (struct token::oper): Constify.
8998         (yyerror): Constify.
8999         * p-lang.h (pascal_yyerror): Constify.
9000         * parser-defs.h (op_name_standard): Constify.
9001         (op_print::string): Constify.
9002         (exp_descriptor::op_name): Constify.
9003         * printcmd.c (print_address_symbolic): Constify.
9004         * psymtab.c (print_partial_symbols): Constify.
9005         * python/py-breakpoint.c (stop_func): Constify.
9006         (bppy_get_expression): Constify.
9007         * python/py-cmd.c (cmdpy_completer::name): Constify.
9008         (cmdpy_function): Constify.
9009         * python/py-event.c (evpy_add_attribute)
9010         (gdbpy_initialize_event_generic): Constify.
9011         * python/py-event.h (evpy_add_attribute)
9012         (gdbpy_initialize_event_generic): Constify.
9013         * python/py-evts.c (add_new_registry): Constify.
9014         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9015         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9016         * python/py-inferior.c (get_buffer): Add cast.
9017         * python/py-param.c (parm_constant::name): Constify.
9018         * python/py-unwind.c (fprint_frame_id): Constify.
9019         * python/python.c (gdbpy_parameter_value): Constify.
9020         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9021         * remote.c (memory_packet_config::name): Constify.
9022         (show_packet_config_cmd, remote_write_bytes)
9023         (remote_buffer_add_string):
9024         * reverse.c (exec_reverse_once): Constify.
9025         * rs6000-tdep.c (variant::name, variant::description): Constify.
9026         * rust-exp.y (rustyyerror): Constify.
9027         * rust-lang.c (rust_op_name): Constify.
9028         * rust-lang.h (rustyyerror): Constify.
9029         * serial.h (serial_ops::name): Constify.
9030         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9031         (sh_sh3e_register_name, sh_sh2e_register_name)
9032         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9033         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9034         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9035         (sh_sh4al_dsp_register_name): Constify.
9036         * sh64-tdep.c (sh64_register_name): Constify.
9037         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9038         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9039         * stabsread.c (patch_block_stabs, read_type_number)
9040         (ref_map::stabs, ref_add, process_reference)
9041         (symbol_reference_defined, define_symbol, define_symbol)
9042         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9043         (read_one_struct_field, read_struct_fields, read_baseclasses)
9044         (read_tilde_fields, read_struct_type, read_array_type)
9045         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9046         (read_huge_number, read_range_type, read_args, common_block_start)
9047         (find_name_end): Constify.
9048         * stabsread.h (common_block_start, define_symbol)
9049         (process_one_symbol, symbol_reference_defined, ref_add):
9050         * symfile.c (get_section_index, add_symbol_file_command):
9051         * symfile.h (get_section_index): Constify.
9052         * target-descriptions.c (tdesc_type::name): Constify.
9053         (tdesc_free_type): Add cast.
9054         * target.c (find_default_run_target):
9055         (add_deprecated_target_alias, find_default_run_target)
9056         (target_announce_detach): Constify.
9057         (do_option): Constify.
9058         * target.h (add_deprecated_target_alias): Constify.
9059         * thread.c (print_thread_info_1): Constify.
9060         * top.c (deprecated_readline_begin_hook, command_line_input):
9061         Constify.
9062         (init_main): Add casts.
9063         * top.h (handle_line_of_input): Constify.
9064         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9065         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9066         (tfind_command): Rename to ...
9067         (tfind_command_1): ... this and constify.
9068         (tfind_command): New function.
9069         (tfind_end_command, tfind_start_command): Adjust.
9070         (encode_source_string): Constify.
9071         * tracepoint.h (encode_source_string): Constify.
9072         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9073         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9074         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9075         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9076         * tui/tui-win.c (parse_scrolling_args): Constify.
9077         * tui/tui-windata.c (tui_erase_data_content): Constify.
9078         * tui/tui-windata.h (tui_erase_data_content): Constify.
9079         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9080         * tui/tui.c (tui_enable): Add cast.
9081         * utils.c (defaulted_query): Constify.
9082         (init_page_info): Add cast.
9083         (puts_debug, subset_compare): Constify.
9084         * utils.h (subset_compare): Constify.
9085         * varobj.c (varobj_format_string): Constify.
9086         * varobj.h (varobj_format_string): Constify.
9087         * vax-tdep.c (vax_register_name): Constify.
9088         * windows-nat.c (windows_detach): Constify.
9089         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9090         * xml-support.c (gdb_xml_end_element): Constify.
9091         * xml-tdesc.c (tdesc_start_reg): Constify.
9092         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9093         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9094         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9095
9096 2017-04-05  Pedro Alves  <palves@redhat.com>
9097
9098         * proc-api.c (struct trans): Constify.
9099         (procfs_note): Constify.
9100         * proc-events.c (struct trans, syscall_table):
9101         * proc-flags.c (struct trans): Constify.
9102         * proc-utils.h (procfs_note): Constify.
9103         * proc-why.c (struct trans): Constify.
9104         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9105         (procfs_detach): Constify.
9106         * sol-thread.c (struct string_map): Constify.
9107         (td_err_string, td_state_string): Constify.
9108
9109 2017-04-05  Pedro Alves  <palves@redhat.com>
9110
9111         * proc-api.c (procfs_filename): Don't initialize
9112         procfs_filename.
9113         (prepare_to_trace): Assume procfs_filename is non-NULL.
9114         (_initialize_proc_api): Give procfs_filename a default value here.
9115
9116 2017-04-05  Pedro Alves  <palves@redhat.com>
9117
9118         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9119         'cond_string' parameter.
9120         (extract_exception_regexp): Constify 'string' parameter.
9121         (catch_exception_command_1): Constify.
9122         * breakpoint.c (init_catchpoint)
9123         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9124         parameter.
9125         (ep_parse_optional_if_clause, catch_fork_command_1)
9126         (catch_exec_command_1): Constify.
9127         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9128         parameter.
9129         (ep_parse_optional_if_clause): Constify.
9130         * cli/cli-utils.c (remove_trailing_whitespace)
9131         (check_for_argument): Constify.
9132         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9133         non-const overload.
9134         (check_for_argument): Likewise.
9135
9136 2017-04-05  Pedro Alves  <palves@redhat.com>
9137
9138         * event-top.c (command_line_handler): Add cast to execute_command
9139         call.
9140         * record-btrace.c (cmd_record_btrace_bts_start)
9141         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9142         (cmd_record_btrace_start): Add cast to execute_command call.
9143         * record-full.c (record_full_goto_insn):
9144         * record.c (record_start, record_stop): Add cast to
9145         execute_command_to_string calls.
9146         (cmd_record_start): Add cast to execute_command calls.
9147
9148 2017-04-05  Pedro Alves  <palves@redhat.com>
9149
9150         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9151         static inline function.
9152         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9153         array and use gdb_PyArg_ParseTupleAndKeywords.
9154         * python/py-cmd.c (cmdpy_init): Likewise.
9155         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9156         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9157         (infpy_search_memory): Likewise.
9158         * python/py-objfile.c (objfpy_add_separate_debug_file)
9159         (gdbpy_lookup_objfile): Likewise.
9160         * python/py-symbol.c (gdbpy_lookup_symbol)
9161         (gdbpy_lookup_global_symbol): Likewise.
9162         * python/py-type.c (gdbpy_lookup_type): Likewise.
9163         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9164         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9165         Likewise.
9166
9167 2017-04-05  Pedro Alves  <palves@redhat.com>
9168
9169         * python/python-internal.h (gdb_PyGetSetDef): New type.
9170         * python/py-block.c (block_object_getset)
9171         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9172         * python/py-event.c (event_object_getset)
9173         (finish_breakpoint_object_getset): Likewise.
9174         * python/py-inferior.c (inferior_object_getset): Likewise.
9175         * python/py-infthread.c (thread_object_getset): Likewise.
9176         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9177         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9178         * python/py-objfile.c (objfile_getset): Likewise.
9179         * python/py-progspace.c (pspace_getset): Likewise.
9180         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9181         Likewise.
9182         * python/py-record.c (recpy_record_getset): Likewise.
9183         * python/py-symbol.c (symbol_object_getset): Likewise.
9184         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9185         Likewise.
9186         * python/py-type.c (type_object_getset, field_object_getset):
9187         Likewise.
9188         * python/py-value.c (value_object_getset): Likewise.
9189
9190 2017-04-05  Pedro Alves  <palves@redhat.com>
9191
9192         * python/python-internal.h (gdb_PyObject_CallMethod)
9193         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9194         New functions.
9195         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9196         (PySys_GetObject, PySys_SetPath): New macros.
9197
9198 2017-04-05  Pedro Alves  <palves@redhat.com>
9199
9200         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9201         info_osdata_command.
9202         * osdata.c (info_osdata_command): Rename to ...
9203         (info_osdata): ... this.  Constify 'type' parameter, and remove
9204         the 'from_tty' parameter.  Accept NULL TYPE.
9205         (info_osdata_command): New function.
9206         * osdata.h (info_osdata_command): Remove declaration.
9207         (info_osdata): New declaration.
9208
9209 2017-04-05  Pedro Alves  <palves@redhat.com>
9210
9211         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9212         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9213         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9214         parameter.
9215         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9216         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9217         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9218         parameter.
9219         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9220         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9221         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9222         (mi_cmd_file_list_exec_source_files)
9223         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9224         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9225         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9226         parameter.
9227         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9228         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9229         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9230         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9231         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9232         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9233         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9234         'command' parameter.
9235         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9236         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9237         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9238         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9239         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9240         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9241         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9242         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9243         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9244         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9245         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9246         parameter.
9247         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9248         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9249         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9250         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9251         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9252         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9253         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9254         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9255         (mi_cmd_data_list_changed_registers)
9256         (mi_cmd_data_write_register_values)
9257         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9258         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9259         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9260         (mi_cmd_list_features, mi_cmd_list_target_features)
9261         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9262         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9263         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9264         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9265         (mi_cmd_trace_frame_collected): Constify 'command'
9266         parameter.
9267         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9268         'command' parameter.
9269
9270 2017-04-05  Pedro Alves  <palves@redhat.com>
9271
9272         * ada-lang.c (ada_completer_word_break_characters): Now a const
9273         array.
9274         (ada_get_gdb_completer_word_break_characters): Constify.
9275         * completer.c (gdb_completer_command_word_break_characters)
9276         (gdb_completer_file_name_break_characters)
9277         (gdb_completer_quote_characters): Now const arrays.
9278         (get_gdb_completer_quote_characters): Constify.
9279         (set_rl_completer_word_break_characters): New function.
9280         (set_gdb_completion_word_break_characters)
9281         (complete_line_internal): Use it.
9282         * completer.h (get_gdb_completer_quote_characters): Constify.
9283         (set_rl_completer_word_break_characters): Declare.
9284         * f-lang.c (f_word_break_characters): Constify.
9285         * language.c (default_word_break_characters): Constify.
9286         * language.h (language_defn::la_word_break_characters): Constify.
9287         (default_word_break_characters): Constify.
9288         * top.c (init_main): Use set_rl_completer_word_break_characters.
9289
9290 2017-04-05  Pedro Alves  <palves@redhat.com>
9291
9292         * aix-thread.c (aix_thread_pid_to_str)
9293         (aix_thread_extra_thread_info): Constify.
9294         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9295         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9296         (bsd_uthread_pid_to_str): Constify.
9297         * corelow.c (core_pid_to_str): Constify.
9298         * darwin-nat.c (darwin_pid_to_str): Constify.
9299         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9300         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9301         Constify.
9302         * gnu-nat.c (gnu_pid_to_str): Constify.
9303         * go32-nat.c (go32_pid_to_str): Constify.
9304         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9305         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9306         * inferior.c (inferior_pid_to_str): Constify.
9307         * linux-nat.c (linux_nat_pid_to_str): Constify.
9308         * linux-tdep.c (linux_core_pid_to_str): Constify.
9309         * linux-thread-db.c (thread_db_pid_to_str)
9310         (thread_db_extra_thread_info): Constify.
9311         * nto-tdep.c (nto_extra_thread_info): Constify.
9312         * nto-tdep.h (nto_extra_thread_info): Constify.
9313         * obsd-nat.c (obsd_pid_to_str): Constify.
9314         * procfs.c (procfs_pid_to_str): Constify.
9315         * ravenscar-thread.c (ravenscar_extra_thread_info)
9316         (ravenscar_pid_to_str): Constify.
9317         * remote-sim.c (gdbsim_pid_to_str): Constify.
9318         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9319         Constify.
9320         * sol-thread.c (solaris_pid_to_str): Constify.
9321         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9322         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9323         * target.c (default_pid_to_str, target_pid_to_str)
9324         (normal_pid_to_str, default_pid_to_str): Constify.
9325         * target.h (target_ops::to_pid_to_str)
9326         (target_ops::to_extra_thread_info): Constify.
9327         (target_pid_to_str, normal_pid_to_str): Constify.
9328         * windows-nat.c (windows_pid_to_str): Constify.
9329         * gdbarch.sh (core_pid_to_str): Constify.
9330         * target-delegates.c: Regenerate.
9331         * gdbarch.h, gdbarch.c: Regenerate.
9332
9333 2017-04-05  Pedro Alves  <palves@redhat.com>
9334
9335         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9336         the memory of the temporary warning_pre_print override.
9337         * utils.c (warning_pre_print): Constify.
9338         * utils.h (warning_pre_print): Constify.
9339
9340 2017-04-05  Pedro Alves  <palves@redhat.com>
9341
9342         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9343         (shell_command): New function.
9344         (make_command): Use std::string.
9345         (init_cli_cmds): Register shell_command instead of shell_escape.
9346
9347 2017-04-05  Pedro Alves  <palves@redhat.com>
9348
9349         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9350         * tracepoint.c (default_collect): Don't initialize.
9351
9352 2017-04-05  Pedro Alves  <palves@redhat.com>
9353
9354         * macroexp.c (macro_buffer::shared): Now a bool.
9355         (init_buffer): Update.
9356         (init_shared_buffer): Constify 'addr' parameter.
9357         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9358         casts.
9359
9360 2017-04-05  Pedro Alves  <palves@redhat.com>
9361
9362         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9363         * disasm.c (set_disassembler_options): Constify local.
9364         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9365
9366 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9367
9368         PR gdb/21352
9369         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9370         option.
9371
9372 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9373
9374         * frame.c (frame_unwind_register_unsigned): Call
9375         frame_unwind_register_value.
9376
9377 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9378
9379         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9380         Use gdb_test_multiple, and don't match anchor.
9381
9382 2017-04-05  Pedro Alves  <palves@redhat.com>
9383
9384         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9385         (Write After Approval): Remove Simon Marchi.
9386
9387 2017-04-05  Pedro Alves  <palves@redhat.com>
9388
9389         * common/gdb_optional.h (optional::optional): Make constexpr and
9390         initialize m_dummy.
9391
9392 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9393
9394         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9395         (amd64fbsd_jmp_buf_reg_offset): Remove.
9396         (amd64fbsd_supply_uthread): Remove function.
9397         (amd64fbsd_collect_uthread): Remove function.
9398         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9399         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9400         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9401         (fbsd-nat.c): Update comment.
9402         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9403         (i386fbsd_jmp_buf_reg_offset): Remove.
9404         (i386fbsd_supply_uthread): Remove function.
9405         (i386fbsd_collect_uthread): Remove function.
9406         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9407
9408 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9409
9410         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9411         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9412         * NEWS: Mention that support for FreeBSD/alpha was removed.
9413         * alpha-fbsd-tdep.c: Delete file.
9414         * config/alpha/fbsd.mh: Delete file.
9415         * configure.host: Delete alpha*-*-freebsd* and
9416         alpha*-*-kfreebsd*-gnu.
9417         * configure.tgt: Delete alpha*-*-freebsd* and
9418         alpha*-*-kfreebsd*-gnu.
9419
9420 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9421
9422         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9423         amd64bsd_store_inferior_registers): Use ptid from regcache.
9424
9425 2017-04-04  Pedro Alves  <palves@redhat.com>
9426
9427         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9428         data fields, make them private and add "m_" prefixes.
9429         (lnp_state_machine::lnp_state_machine): New ctor.
9430         (record_line, check_line_address, handle_set_discriminator)
9431         (handle_set_address, handle_advance_pc, handle_special_opcode)
9432         (handle_advance_line, handle_set_file, handle_negate_stmt)
9433         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9434         (end_sequence, advance_line): New methods.
9435         (m_gdbarch, m_record_lines_p): New fields.
9436         (lnp_reader_state): Delete.
9437         (dwarf_record_line): Rename to ...
9438         (lnp_state_machine::record_line): ... adjust.
9439         (init_lnp_state_machine): Delete.
9440         (lnp_state_machine::lnp_state_machine): New.
9441         (check_line_address): Rename to ...
9442         (lnp_state_machine::check_line_address): This.
9443         (dwarf_decode_lines_1): Remove reference to "reader_state".
9444         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9445         State machine internal state manipulation moved to
9446         lnp_state_machine methods.
9447
9448 2017-04-04  Pedro Alves  <palves@redhat.com>
9449
9450         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9451         unittests/offset-type-selftests.c.
9452         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9453         * common/offset-type.h: New file.
9454         * common/preprocessor.h: New file.
9455         * common/traits.h: New file.
9456         * common/valid-expr.h: New file.
9457         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9458         sect_offset and cu_offset strong typedefs throughout.
9459         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9460         typedefs throughout.
9461         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9462         sect_offset and cu_offset strong typedefs throughout.
9463         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9464         typedefs throughout.
9465         * gdbtypes.h: Include "common/offset-type.h".
9466         (cu_offset): Now an offset type (strong typedef) instead of a
9467         struct.
9468         (sect_offset): Likewise.
9469         (union call_site_parameter_u): Rename "param_offset" field to
9470         "param_cu_off".
9471         * unittests/offset-type-selftests.c: New file.
9472
9473 2017-04-04  Pedro Alves  <palves@redhat.com>
9474
9475         * common/underlying.h: New file.
9476         * dwarf2read.c: Include "common/gdb_optional.h" and
9477         "common/underlying.h".
9478         (dir_index, file_name_index): New types.
9479         (file_entry): Use them.
9480         (file_entry::include): Use to_underlying.
9481         (line_header::add_file_name): Use dir_index.
9482         (read_formatted_entries): Use gdb::optional.  Read form before
9483         writting to file_entry.
9484         (dwarf_decode_line_header): Use dir_index.
9485         (lnp_state_machine::current_file): Use to_underlying.
9486         (lnp_state_machine::file): Change type to file_name_index.
9487         (dwarf_record_line): Use to_underlying.
9488         (init_lnp_state_machine): Use file_name_index.
9489         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9490
9491 2017-04-04  Pedro Alves  <palves@redhat.com>
9492
9493         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9494         operator bool, has_value and get methods.
9495
9496 2017-04-04  Pedro Alves  <palves@redhat.com>
9497
9498         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9499         fields.
9500         (line_header): Initialize all data fields.  Change type of
9501         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9502         Change type of include_dirs to std::vector<const char *>.  Remove
9503         num_include_dirs, include_dirs_size.  Change type of file_names to
9504         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9505         (line_header::line_header): New.
9506         (line_header::add_include_dir, line_header::add_file_name): New
9507         methods.
9508         (line_header::include_dir_at): Remove NULL check.
9509         (line_header::file_name_at): Add const overload.
9510         (line_header_up): New unique_ptr typedef.
9511         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9512         std::vector.  Remove free_line_header call.
9513         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9514         free_line_header call.
9515         (free_cu_line_header): Delete.
9516         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9517         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9518         Adjust to use std::vector.
9519         (free_line_header): Delete.
9520         (free_line_header_voidp): Use delete.
9521         (add_include_dir): Replace with ...
9522         (line_header::add_include_dir): ... this method.  Use std::vector.
9523         (add_file_name): Replace with ...
9524         (line_header::add_file_name): ... this method.  Use std::vector.
9525         (add_include_dir_stub): Delete.
9526         (read_formatted_entries): Remove memset.
9527         (dwarf_decode_line_header): Return a line_header_up instead of a
9528         raw pointer.  Remove cleanup handling.  Pass lambdas to
9529         read_formatted_entries.  Adjust to use line_header methods.
9530         (dwarf_decode_lines_1): Adjust to use line_header methods.
9531         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9532         use std::vector.
9533
9534 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9535
9536         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9537         instead of struct ptid.
9538
9539 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9540
9541         * frame.c (get_frame_register_bytes): Unwind using value.
9542         (put_frame_register_bytes): Likewise.
9543
9544 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9545
9546         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9547         aggregate-like.
9548
9549 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9550
9551         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9552
9553 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9554
9555         * gdbthread.h (struct thread_info): Declare constructor and
9556         destructor.  Add some in-class member initializers.
9557         * thread.c (free_thread): Remove.
9558         (init_thread_list): Call delete instead of free_thread.
9559         (new_thread): Call thread_info constructor.
9560         (thread_info::thread_info): New function.
9561         (thread_info::~thread_info): New function.
9562         (delete_thread_1): Call delete instead of free_thread.
9563         (make_cleanup_restore_current_thread): Move tp and frame to
9564         inner block.
9565
9566 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9567
9568         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9569         (arc_skip_prologue): Likewise.
9570         (arc_make_frame_cache): Likewise.
9571         (arc_pv_get_operand): New function.
9572         (arc_is_in_prologue): Likewise.
9573         (arc_analyze_prologue): Likewise.
9574         (arc_print_frame_cache): Likewise.
9575         (MAX_PROLOGUE_LENGTH): New constant.
9576
9577 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9578
9579         * configure.tgt: Add arc-insn.o.
9580         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9581         (dump_arc_instruction_command): New function.
9582         (arc_fprintf_disasm): Likewise.
9583         (arc_disassemble_info): Likewise.
9584         (arc_insn_get_operand_value): Likewise.
9585         (arc_insn_get_operand_value_signed): Likewise.
9586         (arc_insn_get_memory_base_reg): Likewise.
9587         (arc_insn_get_memory_offset): Likewise.
9588         (arc_insn_get_branch_target): Likewise.
9589         (arc_insn_dump): Likewise.
9590         (arc_insn_get_linear_next_pc): Likewise.
9591         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9592         (arc_disassemble_info): Likewise.
9593         (arc_insn_get_branch_target): Likewise.
9594         (arc_insn_get_linear_next_pc): Likewise.
9595         * NEWS: Mention new "maint print arc arc-instruction".
9596
9597 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9598
9599         * arc-tdep (maintenance_print_arc_list): New variable.
9600         (maintenance_print_arc_command): New function.
9601
9602 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9603
9604         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9605         Add "limm" and "reserved".
9606         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9607         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9608         * arc-tdep.h (arc_regnum): Likewise.
9609
9610 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9611
9612         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9613         for THREADPTR register.
9614         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9615         register.
9616         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9617         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9618         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9619
9620 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9621
9622         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9623         registers above gdbarch_num_regs (gdbarch) as privileged in
9624         call0 ABI.
9625
9626 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9627
9628         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9629         for a single specified register or for all registers in
9630         a0_base..a0_base + C0_NREGS range.
9631         (supply_gregset_reg): Call regcache_raw_supply for a single
9632         specified register or for all registers in a0_base..a0_base +
9633         C0_NREGS range.
9634
9635 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9636
9637         * arch/xtensa.h (C0_NREGS): Add definition.
9638         * xtensa-tdep.c (C0_NREGS): Remove definition.
9639
9640 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9641
9642         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9643         Drop xtensa_default_isa initialization.
9644         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9645
9646 2017-03-27  Pedro Alves  <palves@redhat.com>
9647
9648         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9649         (file_entry::include_dir): New method.
9650         (line_header::include_dir_at, line_header::file_name_at): New
9651         methods.
9652         (setup_type_unit_groups, setup_type_unit_groups)
9653         (psymtab_include_file_name): Simplify using the new methods.
9654         (lnp_state_machine) <the_line_header>: New field.
9655         <file>: Add comment.
9656         (lnp_state_machine::current_file): New method.
9657         (dwarf_record_line): Simplify using the new methods.
9658         (init_lnp_state_machine): Initialize the "the_line_header" field.
9659         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9660         Simplify using the new methods.
9661
9662 2017-03-27  Pedro Alves  <palves@redhat.com>
9663
9664         * cp-name-parser.y (make_empty): Delete.
9665         (demangler_special, nested_name, ptr_operator, array_indicator)
9666         (direct_declarator, declarator_1): Use fill_comp instead of
9667         make_empty.
9668
9669 2017-03-27  Pedro Alves  <palves@redhat.com>
9670
9671         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9672         to ATTRIBUTE_PRINTF.
9673         * solib-target.c (library_list_start_list): Print "string" not
9674         "version".
9675         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9676         gdb_xml_error call.
9677
9678 2017-03-27  Pedro Alves  <palves@redhat.com>
9679
9680         * dwarf2read.c (struct file_and_directory): New.
9681         (dwarf2_get_dwz_file): Adjust to use std::string.
9682         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9683         (find_file_and_directory): Adjust to return a file_and_directory
9684         object.
9685         (read_file_scope): Adjust to use file_and_directory.  Remove
9686         make_cleanup/do_cleanups calls.
9687         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9688         make_cleanup/do_cleanups calls.
9689         * python/python.c (do_start_initialization): Adjust to ldirname
9690         returning a std::string.
9691         * utils.c (ldirname): Now returns a std::string.
9692         * utils.h (ldirname): Change return type to std::string.
9693         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9694         returning a std::string.
9695         * xml-tdesc.c (file_read_description_xml): Likewise.
9696
9697 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9698
9699         * regcache.c (regcache_debug_print_register): New function.
9700         * regcache.h (regcache_debug_print_register): New declaration.
9701         * target.c (debug_print_register): Remove.
9702         (target_fetch_registers): Call regcache_debug_print_register.
9703         (target_store_registers): Likewise.
9704
9705 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9706
9707         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9708         reference beyond the 'lh->include_dirs' array before accessing to
9709         it.
9710         (psymtab_include_file_name): Likewise.
9711         (dwarf_decode_lines_1): Likewise.
9712         (dwarf_decode_lines): Likewise.
9713         (file_file_name): Likewise.
9714
9715 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9716
9717         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9718         inferior_ptid.
9719         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9720         ps_lsetfpregs): Likewise.
9721         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9722         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9723         ps_lsetfpregs): Likewise.
9724         * target.c (target_fetch_registers, target_store_registers):
9725         Remove asserts.
9726
9727 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9728
9729         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9730
9731 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9732
9733         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9734         (_initialize_aarch64_tdep): Register it.
9735         (aarch64_record_load_store): Handle PRFM instruction.
9736         (aarch64_process_record_test): New function.
9737
9738 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9739
9740         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9741         indentation.
9742
9743 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9744
9745         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9746
9747 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9748
9749         python/python.c (do_start_initialization): Fix memory leak.
9750
9751 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9752
9753         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9754         using get_ptrace_pid.
9755         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9756         inferior_ptid.
9757         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9758         inferior_ptid instead of pid.
9759
9760 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9761
9762         * aarch64-tdep.c: Wrap locally used classes in anonymous
9763         namespace.
9764         * arm-tdep.c: Likewise.
9765         * linespec.c: Likewise.
9766         * ui-out.c: Likewise.
9767
9768 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9769
9770         PR gdb/19637
9771         * python/lib/gdb/printer/bound_registers.py: Import sys.
9772
9773 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9774
9775         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9776         windows_thread_info parameter and use it instead of
9777         current_thread.
9778         (windows_fetch_inferior_registers): Don't set current_thread,
9779         pass the thread to do_windows_fetch_inferior_registers.  Use
9780         ptid from regcache instead of inferior_ptid.
9781         (do_windows_store_inferior_registers): Add windows_thread_info
9782         parameter and use it instead of current_thread.
9783         (windows_store_inferior_registers): Don't set current_thread,
9784         pass the thread to do_windows_store_inferior_registers.  Use
9785         ptid from regcache instead of inferior_ptid.
9786
9787 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9788
9789         * ser-mingw.c (ser_windows_raw): Remove reference to
9790         struct serial::current_timeout.
9791
9792 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9793
9794         PR tdep/20928
9795         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9796         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9797         (sparc64_fsr_type): Fix %fsr decoding.
9798
9799 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9800
9801         * python/py-record-btrace.c (btpy_insn_data): Change return type
9802         for Python 2.
9803
9804 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9805
9806         * spu-linux-nat.c (spu_fetch_inferior_registers,
9807         spu_store_inferior_registers): Use ptid from regcache, set and
9808         restore inferior_ptid.
9809         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9810         Likewise.
9811
9812 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9813
9814         * i386-linux-nat.c (fetch_register, store_register,
9815         i386_linux_fetch_inferior_registers,
9816         i386_linux_store_inferior_registers): Use ptid from regcache.
9817         * ia64-linux-nat.c (ia64_linux_fetch_register,
9818         ia64_linux_store_register): Likewise.
9819         * inf-ptrace.c (inf_ptrace_fetch_register,
9820         inf_ptrace_store_register): Likewise.
9821         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9822         m32r_linux_store_inferior_registers): Likewise.
9823         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9824         m68kbsd_store_inferior_registers): Likewise.
9825         * m68k-linux-nat.c (fetch_register, store_register,
9826         m68k_linux_fetch_inferior_registers,
9827         m68k_linux_store_inferior_registers): Likewise.
9828         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9829         m88kbsd_store_inferior_registers): Likewise.
9830         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9831         mips_fbsd_store_inferior_registers): Likewise.
9832         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9833         mips64_linux_regsets_store_registers): Likewise.
9834         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9835         mipsnbsd_store_inferior_registers): Likewise.
9836         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9837         mips64obsd_store_inferior_registers): Likewise.
9838         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9839         Likewise.
9840         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9841         ppcfbsd_store_inferior_registers): Likewise.
9842         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9843         ppc_linux_store_inferior_registers): Likewise.
9844         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9845         ppcnbsd_store_inferior_registers): Likewise.
9846         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9847         ppcobsd_store_registers): Likewise.
9848         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9849         Likewise.
9850         * ravenscar-thread.c (ravenscar_fetch_registers,
9851         ravenscar_store_registers, ravenscar_prepare_to_store):
9852         Likewise.
9853         * record-btrace.c (record_btrace_fetch_registers,
9854         record_btrace_store_registers, record_btrace_prepare_to_store):
9855         Likewise.
9856         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9857         Lookup inferior using ptid from regcache, instead of
9858         current_inferior.
9859         * remote.c (remote_fetch_registers, remote_store_registers): Use
9860         ptid from regcache.
9861         * rs6000-nat.c (fetch_register, store_register): Likewise.
9862         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9863         s390_linux_store_inferior_registers): Likewise.
9864         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9865         shnbsd_store_inferior_registers): Likewise.
9866         * sol-thread.c (sol_thread_fetch_registers,
9867         sol_thread_store_registers): Likewise.
9868         * sparc-nat.c (sparc_fetch_inferior_registers,
9869         sparc_store_inferior_registers): Likewise.
9870         * tilegx-linux-nat.c (fetch_inferior_registers,
9871         store_inferior_registers): Likewise.
9872         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9873         vaxbsd_store_inferior_registers): Likewise.
9874         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9875         store_xtregs): Likewise.
9876
9877 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9878
9879         PR gdb/14441
9880         * NEWS: Mention support for rvalue references in GDB and python.
9881         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9882         supports both lvalue and rvalue references.
9883
9884 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9885
9886         PR gdb/14441
9887         * gdbtypes.c (rank_one_type): Implement overloading
9888         resolution rules regarding rvalue references.
9889
9890 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9891
9892         PR gdb/14441
9893         * aarch64-tdep.c (aarch64_type_align)
9894         (aarch64_extract_return_value, aarch64_store_return_value): Change
9895         lvalue reference type checks to general reference type checks.
9896         * amd64-tdep.c (amd64_classify): Likewise.
9897         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9898         Likewise.
9899         * arm-tdep.c (arm_type_align, arm_extract_return_value)
9900         (arm_store_return_value): Likewise.
9901         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9902         * c-typeprint.c (c_print_type): Likewise.
9903         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9904         (cplus_number_of_children, cplus_describe_child): Likewise.
9905         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9906         * completer.c (expression_completer): Likewise.
9907         * cp-support.c (make_symbol_overload_list_adl_namespace):
9908         Likewise.
9909         * darwin-nat-info.c (info_mach_region_command): Likewise.
9910         * dwarf2loc.c (entry_data_value_coerce_ref)
9911         (value_of_dwarf_reg_entry): Likewise.
9912         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9913         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9914         Likewise.
9915         * findvar.c (extract_typed_address, store_typed_address):
9916         Likewise.
9917         * gdbtypes.c (rank_one_type): Likewise.
9918         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9919         * infcall.c (value_arg_coerce): Likewise.
9920         * language.c (pointer_type): Likewise.
9921         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9922         Likewise.
9923         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9924         * mn10300-tdep.c (mn10300_type_align): Likewise.
9925         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9926         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9927         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9928         Likewise.
9929         * printcmd.c (print_formatted, x_command): Likewise.
9930         * python/py-type.c (typy_get_composite, typy_template_argument):
9931         Likewise.
9932         * python/py-value.c (valpy_referenced_value)
9933         (valpy_get_dynamic_type, value_has_field): Likewise.
9934         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9935         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9936         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9937         * spu-tdep.c (spu_scalar_value_p): Likewise.
9938         * symtab.c (lookup_symbol_aux): Likewise.
9939         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9940         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9941         Likewise.
9942         * valops.c (value_cast_pointers, value_cast)
9943         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9944         (value_struct_elt, value_struct_elt_bitpos)
9945         (value_find_oload_method_list, find_overload_match)
9946         (value_rtti_indirect_type): Likewise.
9947         * valprint.c (val_print_scalar_type_p, generic_val_print):
9948         Likewise.
9949         * value.c (value_actual_type, value_as_address, unpack_long)
9950         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9951         (coerce_ref): Likewise.
9952         * varobj.c (varobj_get_value_type): Likewise.
9953
9954 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9955
9956         PR gdb/14441
9957         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9958         table of constants.
9959         * python/lib/gdb/command/explore.py: Support exploring values
9960         of rvalue reference types.
9961         * python/lib/gdb/types.py: Implement get_basic_type() for
9962         rvalue reference types.
9963         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9964         constant.
9965         * python/py-value.c (valpy_getitem): Add an rvalue reference
9966         check.
9967         (valpy_reference_value): Add new parameter "refcode".
9968         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9969         New wrappers for valpy_reference_value().
9970         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9971         (gdbpy_invoke_xmethod): Likewise.
9972
9973 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9974
9975         PR gdb/14441
9976         * dwarf2read.c (process_die, read_type_die_1): Handle the
9977         DW_TAG_rvalue_reference_type DIE.
9978         (read_tag_reference_type): Add new parameter "refcode".
9979
9980 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9981
9982         PR gdb/14441
9983         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9984         (c_type_print_modifier, c_type_print_varspec_suffix)
9985         (c_type_print_base): Support printing rvalue reference types.
9986         * c-valprint.c (c_val_print, c_value_print): Support printing
9987         rvalue reference values.
9988
9989 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9990
9991         PR gdb/14441
9992         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9993         typename.
9994         * cp-support.c (replace_typedefs): Handle
9995         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9996         * python/py-type.c (typy_lookup_type): Likewise.
9997
9998 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9999
10000         PR gdb/14441
10001         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10002         * parse.c (insert_type): Change assert statement.
10003         (follow_types): Handle rvalue reference types.
10004         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10005         constant.
10006
10007 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10008
10009         PR gdb/14441
10010         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10011         value_ref() interface.
10012         * c-valprint.c (c_value_print): Likewise.
10013         * infcall.c (value_arg_coerce): Likewise.
10014         * python/py-value.c (valpy_reference_value): Likewise.
10015         * valops.c (value_cast, value_reinterpret_cast)
10016         (value_dynamic_cast, typecmp): Likewise.
10017         (value_ref): Parameterize by kind of return value reference type.
10018         * value.h (value_ref): Add new parameter "refcode".
10019
10020 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10021
10022         PR gdb/14441
10023         * dwarf2read.c (read_tag_reference_type): Use
10024         lookup_lvalue_reference_type() instead of lookup_reference_type().
10025         * eval.c (evaluate_subexp_standard): Likewise.
10026         * f-exp.y: Likewise.
10027         * gdbtypes.c (make_reference_type, lookup_reference_type):
10028         Generalize with rvalue reference types.
10029         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10030         convenience wrappers for lookup_reference_type().
10031         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10032         reference kind parameter.
10033         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10034         wrappers for lookup_reference_type().
10035         * guile/scm-type.c (gdbscm_type_reference): Use
10036         lookup_lvalue_reference_type() instead of lookup_reference_type().
10037         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10038         * parse.c (follow_types): Likewise.
10039         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10040         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10041         Likewise.
10042         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10043         (gdbpy_invoke_xmethod): Likewise.
10044         * stabsread.c: Provide extra argument to make_reference_type()
10045         call.
10046         * valops.c (value_ref, value_rtti_indirect_type): Use
10047         lookup_lvalue_reference_type() instead of lookup_reference_type().
10048
10049 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10050
10051         PR gdb/14441
10052         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10053         (TYPE_IS_REFERENCE): New macro.
10054         (struct type): Add rvalue_reference_type field.
10055         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10056
10057 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10058
10059         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10060         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10061         New function definition.
10062         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10063         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10064         New function declaration.
10065         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10066         * mi/mi-interp.h: New file.
10067         * solib.c (info_sharedlibrary_command): Replace for loop with
10068         ALL_SO_LIBS macro
10069         * solib.h (update_solib_list): New function declaration.
10070         (so_list_head): Move macro.
10071         * solist.h (ALL_SO_LIBS): New macro.
10072
10073 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10074
10075         * infcmd.c (post_create_inferior): Remove unused argument in
10076         call to solib_add.
10077         * remote.c (remote_start_remote): Likewise.
10078         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10079         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10080         (enable_break): Likewise.
10081         * solib.c (update_solib_list): Remove unused target argument
10082         and its documentation.
10083         (solib_add): Remove unused target argument.  Remove unused
10084         argument in call to update_solib_list.
10085         (info_sharedlibrary_command): Remove unused argument in call
10086         to update_solib_list.
10087         (sharedlibrary_command): Remove unused argument in call to
10088         solib_add.
10089         (handle_solib_event): Likewise.
10090         (reload_shared_libraries): Likewise.
10091         * solib.h (solib_add): Remove unused target argument.
10092
10093 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10094
10095         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10096         (s390_displaced_step_fixup): Cover relative branches with the
10097         default fixup handling.  This fixes lack of support for some
10098         relative branch instructions.
10099
10100 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10101
10102         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10103         ptid from regcache.
10104
10105 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10106
10107         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10108         i386_darwin_store_inferior_registers): Use ptid from regcache.
10109
10110 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10111
10112         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10113         i386bsd_store_inferior_registers): Use ptid from regcache.
10114
10115 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10116
10117         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10118         hppaobsd_store_registers): Use ptid from regcache.
10119
10120 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10121
10122         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10123         hppanbsd_store_registers): Use ptid from regcache.
10124
10125 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10126
10127         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10128         from regcache.  Use get_ptrace_pid.
10129
10130 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10131
10132         * corelow.c (get_core_register_section): Use ptid from regcache,
10133         update doc.
10134
10135 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10136
10137         * bsd-uthread.c (bsd_uthread_fetch_registers,
10138         bsd_uthread_store_registers): Use ptid from regcache, set and
10139         restore inferior_ptid.
10140
10141 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10142
10143         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10144         fetch_fp_regs, store_register, store_regs, store_fp_register,
10145         store_fp_regs): Use ptid from regcache.
10146
10147 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10148
10149         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10150         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10151         store_vfp_regs): Use ptid from regcache.
10152
10153 2017-03-17  Pedro Alves  <palves@redhat.com>
10154
10155         PR remote/21188
10156         * ser-base.c (ser_base_wait_for): Add comment.
10157         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10158         version.
10159         * ser-unix.c (hardwire_raw): Remove reference to
10160         scb->current_timeout.
10161         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10162         (hardwire_ops): Install ser_base_readchar instead of
10163         hardwire_readchar.
10164         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10165         Remove fields.
10166
10167 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10168
10169         PR gdb/19637
10170         * python/lib/gdb/printer/bound_registers.py: Add support for
10171         Python 3.
10172
10173 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10174
10175         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10176         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10177         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10178         byte_offset to subobj_byte_offset.  Fix the handling of
10179         DWARF_VALUE_STACK on big-endian targets when coming via an
10180         implicit pointer.
10181         (dwarf2_evaluate_loc_desc): Adjust call to
10182         dwarf2_evaluate_loc_desc_full.
10183         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10184         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10185
10186 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10187
10188         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10189         and REVSH instructions.
10190
10191 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10192
10193         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10194         (arm_record_test): Declare.
10195         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10196         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10197         align with the manual.
10198         (thumb_record_misc): Adjust the code order to align with the
10199         manual.
10200         (thumb2_record_decode_insn_handler): Fix instruction matching.
10201         (instruction_reader_thumb): New class.
10202         (arm_record_test): New function.
10203
10204 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10205
10206         * arm-tdep.c (abstract_memory_reader): New class.
10207         (instruction_reader): New class.
10208         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10209         (decode_insn): Likewise.
10210
10211 2017-03-16  Doug Evans  <dje@google.com>
10212
10213         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10214         member.  Change type of TYPE member to SCM.  All uses updated.
10215         (lsscm_make_lazy_string_smob): Add assert.
10216         (lsscm_make_lazy_string): Flag bad length values.
10217         (lsscm_elt_type): New function.
10218         (gdbscm_lazy_string_to_value): Rewrite to use
10219         lsscm_safe_lazy_string_to_value.
10220         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10221         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10222         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10223         in incoming type.
10224         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10225         * guile/scm-type.c (tyscm_scm_to_type): New function.
10226
10227 2017-03-15  Doug Evans  <dje@google.com>
10228
10229         PR python/17728, python/18439, python/18779
10230         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10231         member.  Change type of TYPE member to PyObject *.  All uses updated.
10232         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10233         (gdbpy_create_lazy_string_object): Flag bad length values.
10234         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10235         Handle typedefs in incoming type.
10236         (stpy_lazy_string_elt_type): New function.
10237         (gdbpy_extract_lazy_string): Call it.
10238         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10239         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10240         typedefs in incoming type.
10241
10242 2017-03-16  Doug Evans  <dje@google.com>
10243
10244         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10245         * guile/scm-type.c (tyscm_scm_to_type): New function.
10246
10247 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10248
10249         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10250         "ULONGEST" for "skip".
10251
10252 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10253
10254         PR gdb/21220
10255         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10256         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10257         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10258         over ptrace peek/poke until end of buffer or error.
10259
10260 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10261
10262         * parse.c (length_of_subexp): Make static.
10263         * parser-defs.h (length_of_subexp): Remove.
10264
10265 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10266
10267         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10268         as well.
10269
10270 2017-03-14  Pedro Alves  <palves@redhat.com>
10271
10272         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10273         (main): Use std::unique_ptr.  Remove calls to
10274         cp_demangled_name_parse_free.
10275
10276 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10277
10278         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10279         alphabsd_store_inferior_registers): Use regcache->ptid instead
10280         of inferior_ptid.
10281
10282 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10283
10284         * aix-thread.c (aix_thread_fetch_registers,
10285         aix_thread_store_registers): Use regcache->ptid instead of
10286         inferior_ptid.
10287
10288 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10289
10290         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10291         store_gregs_to_thread, fetch_fpregs_from_thread,
10292         store_fpregs_to_thread): Use regcache->ptid instead of
10293         inferior_ptid.
10294
10295 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10296
10297         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10298         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10299         instead of inferior_ptid.
10300
10301 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10302
10303         * target.c (target_fetch_registers, target_store_registers): Add
10304         assert.
10305
10306 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10307
10308         * regcache.h (regcache_get_ptid): New function.
10309         * regcache.c (regcache_get_ptid): New function.
10310
10311 2017-03-13  Mark Wielaard  <mark@klomp.org>
10312
10313         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10314
10315 2017-03-10  Keith Seitz  <keiths@redhat.com>
10316
10317         PR c++/8218
10318         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10319
10320 2017-03-08  Pedro Alves  <palves@redhat.com>
10321
10322         PR gdb/18360
10323         * infrun.c (start_step_over, do_target_resume, resume)
10324         (restart_threads): Assert we're not resuming a thread that is
10325         meant to be stopped.
10326         (infrun_thread_stop_requested_callback): Delete.
10327         (infrun_thread_stop_requested): If the thread is internally
10328         stopped, queue a pending stop event and clear the thread's
10329         inline-frame state.
10330         (handle_stop_requested): New function.
10331         (handle_syscall_event, handle_inferior_event_1): Use
10332         handle_stop_requested.
10333         (handle_stop_requested): New function.
10334         (handle_signal_stop): Set the thread's stop_signal here instead of
10335         at caller.
10336         (finish_step_over): Clear step over info unconditionally.
10337         (handle_signal_stop): If the user had interrupted the event
10338         thread, consider the stop a random signal.
10339         (handle_signal_stop) <signal arrived while stepping over
10340         breakpoint>: Don't restart threads here.
10341         (stop_waiting): Don't clear step-over info here.
10342
10343 2017-03-08  Pedro Alves  <palves@redhat.com>
10344
10345         PR 21206
10346         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10347         goes to argument 2, not 1.
10348
10349 2017-03-08  Pedro Alves  <palves@redhat.com>
10350
10351         PR cli/21218
10352         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10353         display_gdb_prompt.
10354         (command_line_input): Add comment.
10355
10356 2017-03-08  Pedro Alves  <palves@redhat.com>
10357
10358         PR tui/21216
10359         * tui/tui-file.c (tui_file::write): New.
10360         * tui/tui-file.h (tui_file): Override "write".
10361         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10362         factored out from ...
10363         (tui_puts): ... here.
10364         (tui_putc): Use them.
10365         (tui_write): New function.
10366         * tui/tui-io.h (tui_write): Declare.
10367
10368 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10369
10370         * Makefile.in (SFILES): Replace "environ.c" with
10371         "common/environ.c".
10372         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10373         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10374         to...
10375         * common/environ.c: ... here.
10376         * environ.h: Moved to...
10377         * common/environ.h: ... here.
10378
10379 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10380
10381         * gdbarch.sh (pstring_ptr): New static function.
10382         (gdbarch_disassembler_options): Use it.
10383         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10384         not valid_disassembler_option->name.
10385         * gdbarch.c: Regenerate.
10386
10387 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10388
10389         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10390
10391 2017-03-07  Pedro Alves  <palves@redhat.com>
10392
10393         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10394
10395 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10396
10397         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10398         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10399         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10400         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10401
10402 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10403
10404         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10405
10406 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10407
10408         * remote.c (remote_add_target_side_commands): Use range-based
10409         for loop.
10410
10411 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10412
10413         PR gdb/21165
10414         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10415         value is lazy.
10416         * valprint.c (common_val_print): Likewise.
10417
10418 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10419
10420         * NEWS: Mention new set/show disassembler-options commands.
10421         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10422         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10423         (prospective_options): New static variable.
10424         (gdb_disassembler::gdb_disassembler): Initialize
10425         m_di.disassembler_options.
10426         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10427         (get_disassembler_options): New function.
10428         (set_disassembler_options): Likewise.
10429         (set_disassembler_options_sfunc): Likewise.
10430         (show_disassembler_options_sfunc): Likewise.
10431         (disassembler_options_completer): Likewise.
10432         (_initialize_disasm): Likewise.
10433         * disasm.h (get_disassembler_options): New prototype.
10434         (set_disassembler_options): Likewise.
10435         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10436         (gdbarch_verify_disassembler_options): Likewise.
10437         * gdbarch.c: Regenerate.
10438         * gdbarch.h: Likewise.
10439         * arm-tdep.c (num_disassembly_options): Delete.
10440         (set_disassembly_style): Likewise.
10441         (arm_disassembler_options): New static variable.
10442         (set_disassembly_style_sfunc): Convert short style name into long
10443         option name.  Call set_disassembler_options.
10444         (show_disassembly_style_sfunc): New function.
10445         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10446         set_gdbarch_verify_disassembler_options.
10447         (_initialize_arm_tdep): Delete regnames variable and update callers.
10448         (arm_disassembler_options): Initialize.
10449         (disasm_options): New variable.
10450         (num_disassembly_options): Rename from this...
10451         (num_disassembly_styles): ...to this.  Compute by scanning through
10452         disasm_options.
10453         (valid_disassembly_styles): Initialize using disasm_options.
10454         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10455         set_arm_regname_option.
10456         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10457         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10458         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10459         set_gdbarch_verify_disassembler_options.
10460         * s390-tdep.c (s390_disassembler_options): New static variable.
10461         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10462         set_gdbarch_verify_disassembler_options.
10463
10464 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10465
10466         * remote.c (remote_add_target_side_condition): Remove "struct"
10467         keyword from range-based for loop.
10468
10469 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10470
10471         * remote.c (remote_add_target_side_condition): Use range-based
10472         for loop.  Update comment.
10473
10474 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10475
10476         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10477
10478 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10479
10480         * regcache.c (regcache_raw_update): New function.
10481         (regcache_raw_read): Move code to regcache_raw_update.
10482         * regcache.h (regcache_raw_update): New declaration.
10483         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10484
10485 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10486
10487         * dwarf2read.c (create_debug_type_hash_table): Initialize
10488         header.signature and header.type_offset_in_tu.
10489
10490 2017-02-24  Pedro Alves  <palves@redhat.com>
10491
10492         * symtab.c (make_file_symbol_completion_list_1): Use
10493         add_symtab_completions.
10494
10495 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10496
10497         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10498
10499 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10500
10501         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10502         I386_MAX_REGISTER_SIZE.
10503         (i386_pseudo_register_write): Likewise.
10504         (i386_process_record): Likewise.
10505         * i387-tdep.c (i387_supply_xsave): Likewise.
10506         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10507         (store_register): Likewise.
10508
10509 2017-02-23  Pedro Alves  <palves@redhat.com>
10510
10511         * ada-lang.c: Include "common/function-view.h".
10512         (ada_iterate_over_symbols): Adjust to use function_view as
10513         callback type.
10514         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10515         (ada_make_symbol_completion_list): Use a lambda.
10516         (ada_exc_search_name_matches): Delete.
10517         (name_matches_regex): New.
10518         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10519         * compile/compile-c-support.c: Include "common/function-view.h".
10520         (print_one_macro): Change prototype to accept a ui_file pointer.
10521         (write_macro_definitions): Use a lambda.
10522         * dwarf2read.c: Include "common/function-view.h".
10523         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10524         (dw2_expand_symtabs_matching): Adjust to use function_view as
10525         callback type.
10526         * language.h: Include "common/function-view.h".
10527         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10528         function_view as callback type.
10529         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10530         * linespec.c: Include "common/function-view.h".
10531         (collect_info::add_symbol): New method.
10532         (struct symbol_and_data_callback, iterate_inline_only, struct
10533         symbol_matcher_data, iterate_name_matcher): Delete.
10534         (iterate_over_all_matching_symtabs): Adjust to use function_view
10535         as callback type and lambdas.
10536         (iterate_over_file_blocks): Adjust to use function_view as
10537         callback type.
10538         (decode_compound_collector): Now a class with private fields.
10539         (decode_compound_collector::release_symbols): New method.
10540         (collect_one_symbol): Rename to...
10541         (decode_compound_collector::operator()): ... this and adjust.
10542         (lookup_prefix_sym): decode_compound_collector construction bits
10543         move to decode_compound_collector ctor.  Pass the
10544         decode_compound_collector object directly as callback.  Remove
10545         cleanups and use decode_compound_collector::release_symbols
10546         instead.
10547         (symtab_collector): Now a class with private fields.
10548         (symtab_collector::release_symtabs): New method.
10549         (add_symtabs_to_list): Rename to...
10550         (symtab_collector::operator()): ... this and adjust.
10551         (collect_symtabs_from_filename): symtab_collector construction
10552         bits move to symtab_collector ctor.  Pass the symtab_collector
10553         object directly as callback.  Remove cleanups and use
10554         symtab_collector::release_symtabs instead.
10555         (collect_symbols): Delete.
10556         (add_matching_symbols_to_info): Use lambdas.
10557         * macrocmd.c (print_macro_callback): Delete.
10558         (info_macro_command): Use a lambda.
10559         (info_macros_command): Pass print_macro_definition as callable
10560         directly.
10561         (print_one_macro): Remove 'ignore' parameter.
10562         (macro_list_command): Adjust.
10563         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10564         (macro_for_each_data::user_data): Delete field.
10565         (foreach_macro): Adjust to call the function_view.
10566         (macro_for_each): Adjust to use function_view as callback type.
10567         (foreach_macro_in_scope): Adjust to call the function_view.
10568         (macro_for_each_in_scope): Adjust to use function_view as callback
10569         type.
10570         * macrotab.h: Include "common/function-view.h".
10571         (macro_callback_fn): Declare a prototype instead of a pointer.
10572         Remove "user_data" parameter.
10573         (macro_for_each, macro_for_each_in_scope): Adjust to use
10574         function_view as callback type.
10575         * psymtab.c (partial_map_expand_apply)
10576         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10577         Adjust to use function_view as callback type and to return bool.
10578         (psym_expand_symtabs_matching): Adjust to use function_view as
10579         callback types.
10580         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10581         to use function_view as callback type and to return bool.
10582         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10583         callback types.
10584         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10585         as callback types.
10586         * symfile.h: Include "common/function-view.h".
10587         (expand_symtabs_file_matcher_ftype)
10588         (expand_symtabs_symbol_matcher_ftype)
10589         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10590         return bool.
10591         (quick_symbol_functions::map_symtabs_matching_filename)
10592         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10593         function_view as callback type and return bool.
10594         (expand_symtabs_matching): Adjust to use function_view as callback
10595         type.
10596         (maintenance_expand_name_matcher)
10597         (maintenance_expand_file_matcher): Delete.
10598         (maintenance_expand_symtabs): Use lambdas.
10599         * symtab.c (iterate_over_some_symtabs): Adjust to use
10600         function_view as callback types and return bool.
10601         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10602         of a cleanup.
10603         (lookup_symtab_callback): Delete.
10604         (lookup_symtab): Use a lambda.
10605         (iterate_over_symbols): Adjust to use function_view as callback
10606         type.
10607         (struct search_symbols_data, search_symbols_file_matches)
10608         (search_symbols_name_matches): Delete.
10609         (search_symbols): Use a pair of lambdas.
10610         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10611         (symtab_expansion_callback): Delete.
10612         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10613         * symtab.h: Include "common/function-view.h".
10614         (iterate_over_some_symtabs): Adjust to use function_view as
10615         callback type and return bool.
10616         (iterate_over_symtabs): Adjust to use function_view as callback
10617         type.
10618         (symbol_found_callback_ftype): Remove 'data' parameter and return
10619         bool.
10620         (iterate_over_symbols): Adjust to use function_view as callback
10621         type.
10622
10623 2017-02-23  Pedro Alves  <palves@redhat.com>
10624
10625         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10626         (%.o) <unittests/%.c>: New pattern.
10627         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10628         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10629         * common/function-view.h: New file.
10630         * unittests/function-view-selftests.c: New file.
10631         * configure: Regenerate.
10632
10633 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10634
10635         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10636         inferior_ptid.
10637         * go32-nat.c (go32_thread_alive): Likewise.
10638
10639 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10640
10641         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10642         delete.
10643
10644 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10645
10646         * varobj.c (varobj_clear_saved_item): Use delete instead of
10647         xfree.
10648         (update_dynamic_varobj_children): Likewise.
10649
10650 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10651
10652         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10653
10654 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10655
10656         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10657         m_enum_value to 0 in default constructor.
10658
10659 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10660
10661         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10662         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10663         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10664         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10665         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10666         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10667         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10668         IS_STORE_CONDITIONAL_INSN.
10669
10670 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10671
10672         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10673
10674 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10675
10676         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10677
10678 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10679
10680         * dwarf2read.c (skip_one_die, read_attribute_value)
10681         (dwarf2_const_value_attr, dump_die_shallow)
10682         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10683         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10684
10685 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10686
10687         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10688         (dwarf_parse_macro_header): Accept DWARF version 5.
10689         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10690
10691 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10692
10693         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10694         DW_AT_GNU_*.
10695         * common/common-exceptions.h (enum errors): Likewise.
10696         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10697         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10698         (dwarf_expr_context::execute_stack_op): Likewise.
10699         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10700         Likewise.
10701         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10702         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10703         (show_entry_values_debug, call_site_to_target_addr)
10704         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10705         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10706         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10707         (value_of_dwarf_block_entry, indirect_pieced_value)
10708         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10709         (disassemble_dwarf_expression): Likewise.
10710         * dwarf2read.c (process_die, inherit_abstract_dies)
10711         (read_call_site_scope): Likewise.
10712         * gdbtypes.h (struct func_type, struct call_site_parameter)
10713         (struct call_site): Likewise.
10714         * stack.c (read_frame_arg): Likewise.
10715         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10716
10717 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10718
10719         * defs.h (read_unsigned_leb128): New declaration.
10720         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10721         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10722         (dwarf2_find_location_expression): Call also
10723         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10724         * dwarf2loc.h (dwarf2_version): New declaration.
10725         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10726         rnglists.
10727         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10728         .debug_rnglists.
10729         (struct dwop_section_names): Add loclists_dwo.
10730         (dwop_section_names): Add .debug_loclists.dwo.
10731         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10732         (struct dwarf2_per_cu_data): Add dwarf_version.
10733         (struct dwo_sections): Add loclists.
10734         (struct attr_abbrev): Add implicit_const.
10735         (read_indirect_line_string): New declaration.
10736         (read_unsigned_leb128): Delete declaration.
10737         (rcuh_kind): New definition.
10738         (read_and_check_comp_unit_head): Change parameter
10739         is_debug_types_section to section_kind.
10740         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10741         (read_comp_unit_head): Change parameter abfd to section, add parameter
10742         section_kind.  Handle DWARF-5.
10743         (error_check_comp_unit_head): Accept also DWARF version 5.
10744         (read_and_check_comp_unit_head): Change parameter
10745         is_debug_types_section to section_kind.
10746         (read_and_check_type_unit_head): Delete function.
10747         (read_abbrev_offset): Handle DWARF-5.
10748         (create_debug_type_hash_table): Add parameter section_kind.  Process
10749         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10750         comp_unit_head.
10751         (create_debug_types_hash_table): Update create_debug_type_hash_table
10752         caller.
10753         (create_all_type_units): Call create_debug_type_hash_table.
10754         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10755         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10756         caller.
10757         (skip_one_die): Handle DW_FORM_implicit_const.
10758         (dwarf2_rnglists_process): New function.
10759         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10760         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10761         (read_attribute_value): Handle DW_FORM_implicit_const,
10762         DW_FORM_line_strp.
10763         (read_attribute): Handle DW_FORM_implicit_const.
10764         (read_indirect_string_at_offset_from): New function from
10765         read_indirect_string_at_offset.
10766         (read_indirect_string_at_offset): Call
10767         read_indirect_string_at_offset_from.
10768         (read_indirect_line_string_at_offset): New function.
10769         (read_indirect_string): New function comment.
10770         (read_indirect_line_string): New function.
10771         (read_unsigned_leb128): Make it global.
10772         (dwarf2_string_attr): Handle DWARF-5.
10773         (add_include_dir_stub, read_formatted_entries): New functions.
10774         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10775         Handle DWARF-5.
10776         (per_cu_header_read_in): Update read_comp_unit_head caller.
10777         (dwarf2_version): New function.
10778         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10779         rnglists.
10780         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10781         fields.
10782
10783 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10784
10785         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10786
10787 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10788
10789         * dwarf2read.c (dwarf2_ranges_process): New function from
10790         dwarf2_ranges_read.
10791         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10792         dwarf2_ranges_process.
10793
10794 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10795
10796         * dwarf2read.c (create_debug_type_hash_table): New function from
10797         create_debug_types_hash_table.
10798         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10799         (create_all_type_units, open_and_init_dwo_file): Update
10800         create_debug_types_hash_table callers.
10801
10802 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10803
10804         PR gdb/16188
10805         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10806         refer to 'ap', not 'args'.
10807
10808 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10809             Pedro Alves  <palves@redhat.com>
10810
10811         PR gdb/16188
10812         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10813         calls succeeded.
10814         * fork-child.c (trace_start_error): New function.
10815         (trace_start_error_with_name): Likewise.
10816         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10817         * inf-ptrace.c (inf_ptrace_me): Likewise.
10818         * inferior.h (trace_start_error): New prototype.
10819         (trace_start_error_with_name): Likewise.
10820
10821 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10822
10823         PR gdb/21164
10824         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10825         NULL before using it.
10826         * symmisc.c (maintenance_print_symbols): Likewise.
10827         (maintenance_print_msymbols): Likewise.
10828
10829 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10830
10831         * NEWS: Add record Python bindings entry.
10832
10833 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10834
10835         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10836         py-record-full.o.
10837         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10838         * python/py-record-btrace.c, python/py-record-btrace.h,
10839         python/py-record-full.c, python/py-record-full.h: New file.
10840         * python/py-record.c: Add include for py-record-btrace.h and
10841         py-record-full.h.
10842         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10843         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10844         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10845         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10846         New definition.
10847         (gdbpy_initialize_btrace): New export.
10848         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10849
10850 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10851
10852         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10853         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10854         * python/py-record.c: New file.
10855         * python/python-internal.h (gdbpy_start_recording,
10856         gdbpy_current_recording, gdpy_stop_recording,
10857         gdbpy_initialize_record): New export.
10858         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10859         (python_GdbMethods): Add gdbpy_start_recording,
10860         gdbpy_current_recording and gdbpy_stop_recording.
10861
10862 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10863
10864         * record-btrace.c (record_btrace_record_method): New function.
10865         (init_record_btrace_ops): Initialize to_record_method.
10866         * record-full.c (record_full_record_method): New function.
10867         (init_record_full_ops, init_record_full_core_ops): Add
10868         record_full_record_method.
10869         * record.h (enum record_method): New enum.
10870         * target-debug.h (target_debug_print_enum_record_method: New define.
10871         * target-delegates.c: Regenerate.
10872         * target.c (target_record_method): New function.
10873         * target.h: Include record.h.
10874         (struct target_ops) <to_record_method>: New field.
10875         (target_record_method): New export.
10876
10877 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10878
10879         * record.h (record_start, record_stop): New export.
10880         * record.c (record_start, record_stop): New function.
10881
10882 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10883
10884         * btrace.c (btrace_fetch): Copy function call segments pointer
10885         into a vector.
10886         (btrace_clear): Clear the vector.
10887         (btrace_find_insn_by_number): Use binary search to find the correct
10888         function call segment.
10889         * btrace.h (brace_fun_p): New typedef.
10890         (struct btrace_thread_info) <functions>: New field.
10891
10892 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10893
10894         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10895         * btrace.c (btrace_decode_error): ... here.  New function.
10896         * btrace.h (btrace_decode_error): New export.
10897
10898 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10899
10900         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10901         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10902         btrace_find_insn_by_number): Remove special case for gaps.
10903         * btrace.h (btrace_insn_get_error): New export.
10904         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10905         * record-btrace.c (btrace_insn_history): Print number for gaps.
10906         (record_btrace_info, record_btrace_goto): Handle gaps.
10907
10908 2017-02-14  Tom Tromey  <tom@tromey.com>
10909
10910         PR python/13598:
10911         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10912         event.
10913         * python/py-evts.c (gdbpy_initialize_py_events): Add
10914         before_prompt registry.
10915         * python/py-events.h (events_object) <before_prompt>: New field.
10916
10917 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
10918
10919         * btrace.c (ftrace_new_switch): Preserve up link and flags.
10920
10921 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
10922
10923         * symfile (_initialize_symfile): Add usage text to the load command's
10924         help text.
10925
10926 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
10927
10928         * utils.c (defaulted_query): Don't query on secondary UIs.
10929
10930 2017-02-10  Tom Tromey  <tom@tromey.com>
10931
10932         * rust-lang.c (rust_get_disr_info): Remove unused variable.
10933
10934 2017-02-10  Tom Tromey  <tom@tromey.com>
10935
10936         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10937         "cleanup" local.
10938         * python/py-type.c (typy_legacy_template_argument): Remove
10939         unnecessary "cleanup" local.
10940
10941 2017-02-10  Tom Tromey  <tom@tromey.com>
10942
10943         * python/python.c (do_start_initialization): New function, from
10944         _initialize_python.
10945         (_initialize_python): Call do_start_initialization.
10946         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10947         goto.
10948
10949 2017-02-10  Tom Tromey  <tom@tromey.com>
10950
10951         * python/py-prettyprint.c (pretty_print_one_value): Use
10952         gdbpy_ref.
10953
10954 2017-02-10  Tom Tromey  <tom@tromey.com>
10955
10956         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10957         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10958         gdbpy_ref.
10959         * python/py-type.c (field_new): Use gdbpy_ref.
10960         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10961         gdbpy_ref.
10962         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10963         (py_free_pspace): Likewise.
10964         (pspace_to_pspace_object): Likewise.
10965         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10966         (py_free_objfile): Likewise.
10967         (objfile_to_objfile_object): Likewise.
10968         * python/py-inferior.c (delete_thread_object): Use
10969         gdbpy_ref.
10970         (infpy_read_memory): Likewise.
10971         (py_free_inferior): Likewise.
10972         * python/py-evtregistry.c (create_eventregistry_object): Use
10973         gdbpy_ref.
10974         * python/py-event.c (create_event_object): Use gdbpy_ref.
10975
10976 2017-02-10  Tom Tromey  <tom@tromey.com>
10977
10978         * python/py-ref.h (gdbpy_ref_policy): Now a template.
10979         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10980         used.
10981         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10982         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10983         python/py-exitedevent.c, python/py-finishbreakpoint.c,
10984         python/py-framefilter.c, python/py-function.c,
10985         python/py-inferior.c, python/py-infevents.c,
10986         python/py-linetable.c, python/py-newobjfileevent.c,
10987         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10988         python/py-signalevent.c, python/py-stopevent.c,
10989         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10990         python/py-unwind.c, python/py-utils.c, python/py-value.c,
10991         python/py-varobj.c, python/py-xmethods.c, python/python.c,
10992         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10993
10994 2017-02-10  Tom Tromey  <tom@tromey.com>
10995
10996         * ui-out.h (ui_out_emit_type): New class.
10997         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10998         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10999         and ui_out_emit_tuple.
11000         (enumerate_locals): Likewise.
11001         (py_mi_print_variables, py_print_locals, py_print_args): Use
11002         ui_out_emit_list.
11003         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11004         ui_out_emit_list.
11005         * common/gdb_optional.h: New file.
11006
11007 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11008
11009         * MAINTAINERS (Write After Approval): Update my e-mail address.
11010
11011 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11012
11013         PR gdb/21122
11014         * breakpoint.c (_initialize_breakpoint): Update the help description
11015         of the 'commands' command to indicate that it takes a list argument.
11016
11017 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11018
11019         * interps.c (current_interp_set_logging): Remove "return".
11020
11021 2017-02-09  Gary Benson  <gbenson@redhat.com>
11022
11023         * symtab.c (add_symtab_completions): Prevent NULL pointer
11024         dereference.
11025
11026 2017-02-08  Pedro Alves  <palves@redhat.com>
11027
11028         * interps.c (interp::interp): Remove reference to quiet_p.
11029         (interp_set): Make static.  Remove dead "Switching to" output
11030         code.
11031         (interp_quiet_p, interp_set_quiet): Delete.
11032         (interpreter_exec_cmd): Don't set the interpreter quiet.
11033         * interps.h (interp_quiet_p): Make static.
11034         (class interp) <quiet_p>: Remove field
11035
11036 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11037
11038         * cli/cli-decode.c (find_command_name_length): Make it extern.
11039         * cli/cli-decode.h (find_command_name_length): Declare.
11040         * cli/cli-script.c (command_name_equals, line_first_arg):
11041         New functions.
11042         (process_next_line): Use cli-decode to parse command names.
11043         (build_command_line): Make args a constant pointer.
11044
11045 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11046
11047         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11048         Remove case-insensitive search.
11049
11050 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11051
11052         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11053         at the end of the line.  Avoids an ARI warning.
11054
11055 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11056
11057         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11058         rdseed instructions.
11059         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11060
11061 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11062
11063         PR tdep/20936
11064         Provide and use sparc32 and sparc64 target description XML files.
11065         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11066         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11067         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11068         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11069         * features/sparc/sparc32-solaris.xml: New file.
11070         * features/sparc/sparc64-solaris.xml: New file.
11071         * features/sparc/sparc32-solaris.c: Generated.
11072         * features/sparc/sparc64-solaris.c: Generated.
11073         * sparc-tdep.h: Account for differences in target descriptions.
11074         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11075         (sparc32_register_type): Use target provided registers.
11076         (validate_tdesc_registers): New function.
11077         (sparc32_gdbarch_init): Use tdesc_has_registers.
11078         Set pseudoregister functions.
11079         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11080         (sparc64_register_type): Use target provided registers.
11081         (sparc64_init_abi): Set pseudoregister functions.
11082
11083 2017-02-03  Tom Tromey  <tom@tromey.com>
11084
11085         PR rust/21097:
11086         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11087         with a single member.
11088
11089 2017-02-03  Pedro Alves  <palves@redhat.com>
11090
11091         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11092         (cli_interp_base::~cli_interp_base): New.
11093         (cli_interp): New struct.
11094         (as_cli_interp): Cast the interp itself to cli_interp.
11095         (cli_interpreter_pre_command_loop): Rename to ...
11096         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11097         parameter.
11098         (cli_interpreter_init): Rename to ...
11099         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11100         boolean.  Make extern.
11101         (cli_interpreter_resume): Rename to ...
11102         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11103         extern.
11104         (cli_interpreter_suspend): Rename to ...
11105         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11106         extern.
11107         (cli_interpreter_exec): Rename to ...
11108         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11109         extern.
11110         (cli_interpreter_supports_command_editing): Rename to ...
11111         (cli_interp_base::supports_command_editing): ... this.  Remove
11112         'interp' parameter.  Make extern.
11113         (cli_ui_out): Rename to ...
11114         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11115         Make extern.
11116         (cli_set_logging): Rename to ...
11117         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11118         parameter.  Make extern.
11119         (cli_interp_procs): Delete.
11120         (cli_interp_factory): Adjust to use "new".
11121         * cli/cli-interp.h: Include "interps.h".
11122         (struct cli_interp_base): New struct.
11123         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11124         (interp_new): Delete.
11125         (interp::interp, interp::~interp): New.
11126         (interp_set): Use bool, and return void.  Assume the interpreter
11127         has suspend, init and resume methods, and that the all return
11128         void.
11129         (set_top_level_interpreter): interp_set returns void.
11130         (interp_ui_out): Adapt.
11131         (current_interp_set_logging): Adapt.
11132         (interp_data): Delete.
11133         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11134         (interp_exec): Adapt.
11135         (top_level_interpreter_data): Delete.
11136         * interps.h (interp_init_ftype, interp_resume_ftype)
11137         (interp_suspend_ftype, interp_exec_ftype)
11138         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11139         (class interp): New.
11140         (interp_new): Delete.
11141         (interp_set): Now returns void.  Use bool.
11142         (interp_data, top_level_interpreter_data): Delete.
11143         * mi/mi-common.h: Include interps.h.
11144         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11145         init, resume, suspect, exec, interp_ui_out, set_logging and
11146         pre_command_loop methods.
11147         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11148         (mi_interpreter_init): Rename to ...
11149         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11150         bool, return void and make extern.  Adjust.
11151         (mi_interpreter_resume): ... Rename to ...
11152         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11153         return void and make extern.  Adjust.
11154         (mi_interpreter_suspend): ... Rename to ...
11155         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11156         return void and make extern.  Adjust.
11157         (mi_interpreter_exec): ... Rename to ...
11158         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11159         extern.  Adjust.
11160         (mi_interpreter_pre_command_loop): ... Rename to ...
11161         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11162         parameter and make extern.
11163         (mi_on_normal_stop_1): Adjust.
11164         (mi_ui_out): Rename to ...
11165         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11166         parameter and make extern.  Adjust.
11167         (mi_set_logging): Rename to ...
11168         (mi_interp::set_logging): ... this.  Remove the 'interp'
11169         parameter and make extern.  Adjust.
11170         (mi_interp_procs): Delete.
11171         (mi_interp_factory): Adjust to use 'new'.
11172         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11173         (mi_print_exception, mi_execute_command, mi_load_progress):
11174         Adjust.
11175         * tui/tui-interp.c (tui_interp): New class.
11176         (as_tui_interp): Return a tui_interp pointer.
11177         (tui_on_normal_stop, tui_on_signal_received)
11178         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11179         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11180         to use interp::interp_ui_out.
11181         (tui_init): Rename to ...
11182         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11183         bool, return void and make extern.  Adjust.
11184         (tui_resume): Rename to ...
11185         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11186         return void and make extern.  Adjust.
11187         (tui_suspend): Rename to ...
11188         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11189         return void and make extern.  Adjust.
11190         (tui_ui_out): Rename to ...
11191         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11192         parameter, and make extern.  Adjust.
11193         (tui_exec): Rename to ...
11194         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11195         make extern.
11196         (tui_interp_procs): Delete.
11197         (tui_interp_factory): Use "new".
11198
11199 2017-02-02  Tom Tromey  <tom@tromey.com>
11200
11201         * rust-exp.y (ends_raw_string, space_then_number)
11202         (rust_identifier_start_p): Return bool.
11203         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11204         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11205         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11206         (rust_chartype_p): Return bool.
11207         (val_print_struct, rust_print_struct_def, rust_print_type):
11208         Update.
11209         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11210         Return bool.
11211
11212 2017-02-02  Tom Tromey  <tom@tromey.com>
11213
11214         * rust-lang.c: Reindent.
11215
11216 2017-02-02  Tom Tromey  <tom@tromey.com>
11217
11218         * rust-lang.h (rust_crate_for_block): Update.
11219         * rust-lang.c (rust_crate_for_block): Return std::string.
11220         (rust_get_disr_info): Use std:;string, not
11221         gdb::unique_xmalloc_ptr.
11222         * rust-exp.y (crate_name): Update.
11223
11224 2017-02-02  Pedro Alves  <palves@redhat.com>
11225
11226         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11227         field out of gdb_disassembler_test and make it static.
11228
11229 2017-02-02  Pedro Alves  <palves@redhat.com>
11230
11231         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11232         mi1_interp and mi_interp fields.
11233
11234 2017-02-02  Pedro Alves  <palves@redhat.com>
11235
11236         * cli/cli-interp.c (struct saved_output_files, saved_output):
11237         Moved from cli/cli-logging.c.
11238         (cli_set_logging): New function.
11239         (cli_interp_procs): Install cli_set_logging.
11240         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11241         Declare.
11242         * cli/cli-logging.c (struct saved_output_files, saved_output):
11243         Moved to cli/cli-interp.c.
11244         (pop_output_files): Don't save outputs here.
11245         (make_logging_output): New function.
11246         (handle_redirections): Don't build tee nor save previous outputs
11247         here.
11248         * interps.c (current_interp_set_logging): Change prototype.
11249         Assume there's always a set_logging_proc method installed.
11250         * interps.h (interp_set_logging_ftype): Change prototype.
11251         (current_interp_set_logging): Change prototype and adjust comment.
11252         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11253         use make_logging_output.
11254         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11255 2017-02-02  Pedro Alves  <palves@redhat.com>
11256
11257         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11258         from ...
11259         (set_logging_overwrite): ... here.
11260         (logging_no_redirect_file): Delete.
11261         (set_logging_redirect): Don't handle redirection on the fly.
11262         Instead warn that "logging off" / "logging on" is necessary.
11263         (pop_output_files): Delete references to logging_no_redirect_file.
11264         (show_logging_command): Always speak in terms of what will happen
11265         once logging is reenabled.
11266
11267 2017-02-02  Pedro Alves  <palves@redhat.com>
11268
11269         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11270
11271 2017-02-02  Pedro Alves  <palves@redhat.com>
11272
11273         * disasm.c (gdb_pretty_print_insn): Rename to ...
11274         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11275         Remove gdbarch parameter.  Adapt to clear the object's buffers
11276         instead of allocating new buffers, and to print using the object's
11277         gdb_disassembler instead of calling gdb_print_insn.
11278         (dump_insns): Use gdb_pretty_print_disassembler.
11279         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11280         (gdb_pretty_print_disassembler): New class.
11281         * record-btrace.c (btrace_insn_history): Use
11282         gdb_pretty_print_disassembler.
11283
11284 2017-02-02  Pedro Alves  <palves@redhat.com>
11285
11286         * ada-lang.c (type_as_string): Use string_file.
11287         * ada-valprint.c (ada_print_floating): Use string_file.
11288         * ada-varobj.c (ada_varobj_scalar_image)
11289         (ada_varobj_get_value_image): Use string_file.
11290         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11291         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11292         * breakpoint.c (update_inserted_breakpoint_locations)
11293         (insert_breakpoint_locations, reattach_breakpoints)
11294         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11295         (print_it_watchpoint): Use string_file.
11296         (save_breakpoints): Use stdio_file.
11297         * c-exp.y (oper): Use string_file.
11298         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11299         tee_file.
11300         (pop_output_files): Use delete.
11301         (handle_redirections): Use stdio_file and tee_file.
11302         * cli/cli-setshow.c (do_show_command): Use string_file.
11303         * compile/compile-c-support.c (c_compute_program): Use
11304         string_file.
11305         * compile/compile-c-symbols.c (generate_vla_size): Take a
11306         'string_file &' instead of a 'ui_file *'.
11307         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11308         of a 'ui_file *'.  Use string_file.
11309         (generate_c_for_variable_locations): Take a 'string_file &'
11310         instead of a 'ui_file *'.
11311         * compile/compile-internal.h (generate_c_for_for_one_variable):
11312         Take a 'string_file &' instead of a 'ui_file *'.
11313         * compile/compile-loc2c.c (push, pushf, unary, binary)
11314         (print_label, pushf_register_address, pushf_register)
11315         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11316         'ui_file *'.  Adjust.
11317         * compile/compile.c (compile_to_object): Use string_file.
11318         * compile/compile.h (compile_dwarf_expr_to_c)
11319         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11320         'ui_file *'.
11321         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11322         (replace_typedefs_qualified_name): Use string_file and
11323         obstack_copy0.
11324         * disasm.c (gdb_pretty_print_insn): Use string_file.
11325         (gdb_disassembly): Adjust reference the null_stream global.
11326         (do_ui_file_delete): Delete.
11327         (gdb_insn_length): Use null_stream.
11328         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11329         * dwarf2loc.c (dwarf2_compile_property_to_c)
11330         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11331         'string_file &' instead of a 'ui_file *'.
11332         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11333         * dwarf2read.c (do_ui_file_peek_last): Delete.
11334         (dwarf2_compute_name): Use string_file.
11335         * event-top.c (gdb_setup_readline): Use stdio_file.
11336         * gdbarch.sh (verify_gdbarch): Use string_file.
11337         * gdbtypes.c (safe_parse_type): Use null_stream.
11338         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11339         string_file.
11340         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11341         'string_file *' instead of a 'ui_file *'.
11342         (gdbscm_arch_disassemble): Use string_file.
11343         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11344         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11345         inherits from ui_file.
11346         (ioscm_file_port_delete, ioscm_file_port_rewind)
11347         (ioscm_file_port_put): Delete.
11348         (ioscm_file_port_write): Rename to ...
11349         (ioscm_file_port::write): ... this.  Remove file_port_magic
11350         checks.
11351         (ioscm_file_port_new): Delete.
11352         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11353         ui_file_up.
11354         * guile/scm-type.c (tyscm_type_name): Use string_file.
11355         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11356         Use string_file.
11357         * infcmd.c (print_return_value_1): Use string_file.
11358         * infrun.c (print_target_wait_results): Use string_file.
11359         * language.c (add_language): Use string_file.
11360         * location.c (explicit_to_string_internal): Use string_file.
11361         * main.c (captured_main_1): Use null_file.
11362         * maint.c (maintenance_print_architecture): Use stdio_file.
11363         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11364         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11365         event_channel>: Change type to mi_console_file pointer.
11366         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11367         (mi_console_file_delete): Delete.
11368         (struct mi_console_file): Delete.
11369         (mi_console_file_magic): Delete.
11370         (mi_console_file_new): Delete.
11371         (mi_console_file::mi_console_file): New.
11372         (mi_console_file_delete): Delete.
11373         (mi_console_file_fputs): Delete.
11374         (mi_console_file::write): New.
11375         (mi_console_raw_packet): Delete.
11376         (mi_console_file::flush): New.
11377         (mi_console_file_flush): Delete.
11378         (mi_console_set_raw): Rename to ...
11379         (mi_console_file::set_raw): ... this.
11380         * mi/mi-console.h (class mi_console_file): New class.
11381         (mi_console_file_new, mi_console_set_raw): Delete.
11382         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11383         (mi_set_logging): Use delete and tee_file.  Adjust.
11384         * mi/mi-main.c (output_register): Use string_file.
11385         (mi_cmd_data_evaluate_expression): Use string_file.
11386         (mi_cmd_data_read_memory): Use string_file.
11387         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11388         * mi/mi-out.c (mi_ui_out::main_stream): New.
11389         (mi_ui_out::rewind): Use main_stream and
11390         string_file.
11391         (mi_ui_out::put): Use main_stream and string_file.
11392         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11393         Allocate a 'string_file' instead.
11394         (mi_out_new): Don't allocate a mem_fileopen stream here.
11395         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11396         (mi_ui_out::main_stream): Declare method.
11397         * printcmd.c (eval_command): Use string_file.
11398         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11399         * python/py-arch.c (archpy_disassemble): Use string_file.
11400         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11401         * python/py-frame.c (frapy_str): Use string_file.
11402         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11403         Use string_file.
11404         * python/py-type.c (typy_str): Use string_file.
11405         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11406         * python/py-value.c (valpy_str): Use string_file.
11407         * record-btrace.c (btrace_insn_history): Use string_file.
11408         * regcache.c (regcache_print): Use stdio_file.
11409         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11410         * remote.c (escape_buffer): Use string_file.
11411         * rust-lang.c (rust_get_disr_info): Use string_file.
11412         * serial.c (serial_open_ops_1): Use stdio_file.
11413         (do_serial_close): Use delete.
11414         * stack.c (print_frame_arg): Use string_file.
11415         (print_frame_args): Remove local mem_fileopen stream, not used.
11416         (print_frame): Use string_file.
11417         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11418         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11419         Take a 'string_file *' instead of a 'ui_file *'.
11420         * top.c (new_ui): Use stdio_file and stderr_file.
11421         (free_ui): Use delete.
11422         (execute_command_to_string): Use string_file.
11423         (quit_confirm): Use string_file.
11424         * tracepoint.c (collection_list::append_exp): Use string_file.
11425         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11426         * tui/tui-file.c: Don't include "ui-file.h".
11427         (enum streamtype, struct tui_stream): Delete.
11428         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11429         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11430         (tui_file::tui_file): New method.
11431         (tui_file_fputs): Delete.
11432         (tui_file_get_strbuf): Delete.
11433         (tui_file::puts): New method.
11434         (tui_file_adjust_strbuf): Delete.
11435         (tui_file_flush): Delete.
11436         (tui_file::flush): New method.
11437         * tui/tui-file.h: Tweak intro comment.
11438         Include ui-file.h.
11439         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11440         (tui_file_adjust_strbuf): Delete declarations.
11441         (class tui_file): New class.
11442         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11443         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11444         (tui_register_format): Use string_stream.
11445         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11446         (tui_get_function_from_frame): Use string_file.
11447         * typeprint.c (type_to_string): Use string_file.
11448         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11449         (null_stream): New global.
11450         (ui_file_delete): Delete.
11451         (ui_file::ui_file): New.
11452         (null_file_isatty): Delete.
11453         (ui_file::~ui_file): New.
11454         (null_file_rewind): Delete.
11455         (ui_file::printf): New.
11456         (null_file_put): Delete.
11457         (null_file_flush): Delete.
11458         (ui_file::putstr): New.
11459         (null_file_write): Delete.
11460         (ui_file::putstrn): New.
11461         (null_file_read): Delete.
11462         (ui_file::putc): New.
11463         (null_file_fputs): Delete.
11464         (null_file_write_async_safe): Delete.
11465         (ui_file::vprintf): New.
11466         (null_file_delete): Delete.
11467         (null_file::write): New.
11468         (null_file_fseek): Delete.
11469         (null_file::puts): New.
11470         (ui_file_data): Delete.
11471         (null_file::write_async_safe): New.
11472         (gdb_flush, ui_file_isatty): Adjust.
11473         (ui_file_put, ui_file_rewind): Delete.
11474         (ui_file_write): Adjust.
11475         (ui_file_write_for_put): Delete.
11476         (ui_file_write_async_safe, ui_file_read): Adjust.
11477         (ui_file_fseek): Delete.
11478         (fputs_unfiltered): Adjust.
11479         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11480         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11481         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11482         (set_ui_file_data): Delete.
11483         (string_file::~string_file, string_file::write)
11484         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11485         (do_ui_file_as_string, ui_file_as_string): Delete.
11486         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11487         (struct mem_file): Delete.
11488         (mem_file_new): Delete.
11489         (stdio_file::stdio_file): New.
11490         (mem_file_delete): Delete.
11491         (stdio_file::stdio_file): New.
11492         (mem_fileopen): Delete.
11493         (stdio_file::~stdio_file): New.
11494         (mem_file_rewind): Delete.
11495         (stdio_file::set_stream): New.
11496         (mem_file_put): Delete.
11497         (stdio_file::open): New.
11498         (mem_file_write): Delete.
11499         (stdio_file_magic, struct stdio_file): Delete.
11500         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11501         (stdio_file::flush): New.
11502         (stdio_file_read): Rename to ...
11503         (stdio_file::read): ... this.  Adjust.
11504         (stdio_file_write): Rename to ...
11505         (stdio_file::write): ... this.  Adjust.
11506         (stdio_file_write_async_safe): Rename to ...
11507         (stdio_file::write_async_safe) ... this.  Adjust.
11508         (stdio_file_fputs): Rename to ...
11509         (stdio_file::puts) ... this.  Adjust.
11510         (stdio_file_isatty): Delete.
11511         (stdio_file_fseek): Delete.
11512         (stdio_file::isatty): New.
11513         (stderr_file_write): Rename to ...
11514         (stderr_file::write) ... this.  Adjust.
11515         (stderr_file_fputs): Rename to ...
11516         (stderr_file::puts) ... this.  Adjust.
11517         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11518         (stderr_file::stderr_file): New.
11519         (tee_file_magic): Delete.
11520         (struct tee_file): Delete.
11521         (tee_file::tee_file): New.
11522         (tee_file_new): Delete.
11523         (tee_file::~tee_file): New.
11524         (tee_file_delete): Delete.
11525         (tee_file_flush): Rename to ...
11526         (tee_file::flush): ... this.  Adjust.
11527         (tee_file_write): Rename to ...
11528         (tee_file::write): ... this.  Adjust.
11529         (tee_file::write_async_safe): New.
11530         (tee_file_fputs): Rename to ...
11531         (tee_file::puts): ... this.  Adjust.
11532         (tee_file_isatty): Rename to ...
11533         (tee_file::isatty): ... this.  Adjust.
11534         * ui-file.h (struct obstack, struct ui_file): Don't
11535         forward-declare.
11536         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11537         (ui_file_write_ftype)
11538         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11539         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11540         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11541         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11542         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11543         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11544         (set_ui_file_fseek): Delete.
11545         (ui_file_data, ui_file_delete, ui_file_rewind)
11546         (struct ui_file): New.
11547         (ui_file_up): New.
11548         (class null_file): New.
11549         (null_stream): Declare.
11550         (ui_file_write_for_put, ui_file_put): Delete.
11551         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11552         Delete.
11553         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11554         (gdb_fopen, tee_file_new): Delete.
11555         (struct string_file): New.
11556         (struct stdio_file): New.
11557         (stdio_file_up): New.
11558         (struct stderr_file): New.
11559         (class tee_file): New.
11560         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11561         of a 'ui_file *'.  Adjust.
11562         * ui-out.h (class ui_out) <field_stream>: Likewise.
11563         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11564         (null_stream): Delete.
11565         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11566         Adjust.
11567         * utils.h (struct ui_file): Delete forward declaration..
11568         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11569         (error_stream): Take a 'string_file &' instead of a
11570         'ui_file *'.
11571         * varobj.c (varobj_value_get_print_value): Use string_file.
11572         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11573         * gdbarch.c: Regenerate.
11574
11575 2017-02-02  Pedro Alves  <palves@redhat.com>
11576
11577         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11578         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11579         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11580         Adjust to call gdb_print_insn instead of
11581         gdb_disassembler::print_insn.
11582         (dump_insns, do_mixed_source_and_assembly_deprecated)
11583         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11584         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11585         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11586         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11587         declaration.
11588         (gdb_pretty_print_insn): Re-add declaration.
11589         * record-btrace.c (btrace_insn_history): Don't allocate a
11590         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11591
11592 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11593
11594         * disasm.h (gdb_disassembly): Remove file_string parameter.
11595         * disasm.c (gdb_disassembly): Likewise.
11596         * cli/cli-cmds.c (print_disassembly): Adapt.
11597         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11598         * stack.c (do_gdb_disassembly): Likewise.
11599
11600 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11601
11602         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11603         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11604         targets.  And if the implicit value is longer than needed, extract
11605         the first bytes instead of the "least significant" ones.
11606
11607 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11608
11609         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11610         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11611         (btrace_fetch): Assert can_access_registers_ptid.
11612         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11613         validate_registers_access.
11614
11615 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11616
11617         * gdbthread.h (can_access_registers_ptid): New.
11618         * thread.c (can_access_registers_ptid): New.
11619
11620 2017-02-01  Pedro Alves  <palves@redhat.com>
11621
11622         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11623
11624 2017-01-31  Pedro Alves  <palves@redhat.com>
11625
11626         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11627         Fix typos.
11628
11629 2017-01-31  Pedro Alves  <palves@redhat.com>
11630
11631         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11632         not used.
11633
11634 2017-01-31  Pedro Alves  <palves@redhat.com>
11635
11636         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11637
11638 2017-01-31  Pedro Alves  <palves@redhat.com>
11639
11640         * common/scoped_restore.h
11641         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11642         change the value's parameter type to T2.
11643         (make_scoped_restore): Likewise.
11644
11645 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11646             Richard Henderson  <rth@redhat.com>
11647
11648         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11649         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11650         GS_BASE for older kernels.
11651         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11652         GS_BASE for older kernels.
11653         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11654         and GS_BASE to the offset table.
11655         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11656         system register group.
11657         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11658         for older kernels.
11659         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11660         amd64 ABI.
11661         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11662         AMD64_GSBASE_REGNUM.
11663         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11664         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11665         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11666         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11667         i386/64bit-segments.xml in those rules.
11668         * features/i386/64bit-segments.xml: New file.
11669         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11670         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11671         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11672         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11673         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11674         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11675         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11676         * features/i386/amd64-avx-linux.c: Regenerated.
11677         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11678         * features/i386/amd64-avx-mpx.c: Regenerated.
11679         * features/i386/amd64-avx512-linux.c: Regenerated.
11680         * features/i386/amd64-linux.c: Regenerated.
11681         * features/i386/amd64-mpx-linux.c: Regenerated.
11682         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11683         * features/i386/i386-avx-mpx.c: Regenerated.
11684         * features/i386/x32-avx-linux.c: Regenerated.
11685         * features/i386/x32-avx512-linux.c: Regenerated.
11686         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11687         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11688         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11689         * regformats/i386/amd64-linux.dat: Regenerated.
11690         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11691         * regformats/i386/x32-avx-linux.dat: Regenerated.
11692         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11693         * regformats/i386/x32-linux.dat: Regenerated.
11694
11695 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11696
11697         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11698         Set to AMD64_NUM_REGS.
11699
11700 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11701
11702         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11703         that checks validity of a register number.
11704
11705 2017-01-27  Kees Cook  <keescook@google.com>
11706
11707         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11708         fetch_fpregs if target has fpa registers.
11709         (arm_linux_store_inferior_registers): Call store_fpregs if target
11710         has fpa registers.
11711
11712 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11713
11714         * cris-tdep.c (cris_gdbarch_init): Remove check for
11715         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11716
11717 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11718
11719         * corelow.c (get_core_register_section): Check for regset
11720         existence before checking for REGSET_VARIABLE_SIZE.
11721
11722 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11723             Pedro Alves  <palves@redhat.com>
11724
11725         PR gdb/20939
11726         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11727         call memory_error, save memaddr instead.
11728         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11729         negative, cal memory_error.
11730         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11731
11732 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11733
11734         * disasm-selftests.c (memory_error_test): New function.
11735         (_initialize_disasm_selftests): Register memory_error_test.
11736
11737 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11738
11739         * Makefile.in (SFILES): Add disasm-selftests.c and
11740         selftest-arch.c.
11741         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11742         * disasm-selftests.c: New file.
11743         * selftest-arch.c: New file.
11744         * selftest-arch.h: New file.
11745
11746 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11747
11748         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11749         to bfd_arch_mep.  Don't return 0 if section is not
11750         found.  Call print_insn_mep.
11751
11752 2017-01-26  Pedro Alves  <palves@redhat.com>
11753             Yao Qi  <yao.qi@linaro.org>
11754
11755         * arm-tdep.c: Include "disasm.h".
11756         (gdb_print_insn_arm): Update code to get gdbarch.
11757         * disasm.c (dis_asm_read_memory): Change it to
11758         gdb_disassembler::dis_asm_read_memory.
11759         (dis_asm_memory_error): Likewise.
11760         (dis_asm_print_address): Likewise.
11761         (gdb_pretty_print_insn): Change it to
11762         gdb_disassembler::pretty_print_insn.
11763         (dump_insns): Add one argument gdb_disassemlber.  All
11764         callers updated.
11765         (do_mixed_source_and_assembly_deprecated): Likewise.
11766         (do_mixed_source_and_assembly): Likewise.
11767         (do_assembly_only): Likewise.
11768         (gdb_disassembler::gdb_disassembler): New.
11769         (gdb_disassembler::print_insn): New.
11770         * disasm.h (class gdb_disassembler): New.
11771         (gdb_pretty_print_insn): Remove declaration.
11772         (gdb_disassemble_info): Likewise.
11773         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11774         (gdbscm_disasm_read_memory_worker): Update.
11775         (gdbscm_disasm_read_memory): Update.
11776         (gdbscm_disasm_memory_error): Remove.
11777         (gdbscm_disasm_print_address): Remove.
11778         (gdbscm_disassembler::gdbscm_disassembler): New.
11779         (gdbscm_print_insn_from_port): Update.
11780         * mips-tdep.c: Include disasm.h.
11781         (gdb_print_insn_mips): Update code to get gdbarch.
11782         * record-btrace.c (btrace_insn_history): Update.
11783         * spu-tdep.c: Include disasm.h.
11784         (struct spu_dis_asm_data): Remove.
11785         (struct spu_dis_asm_info): New.
11786         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11787         SPU id.
11788         (gdb_print_insn_spu): Cast disassemble_info to
11789         spu_dis_asm_info.
11790
11791 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11792
11793         * disasm.c (do_ui_file_delete): Delete.
11794         (gdb_insn_length): Move code creating stream to ...
11795         * utils.c (null_stream): ... here.  New function.
11796         * utils.h (null_stream): Declare.
11797
11798 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11799
11800         * python/py-inferior.c (find_thread_object): Return directly
11801         from the loop.  Remove "found" variable.
11802
11803 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11804
11805         GDB 7.12.1 released.
11806
11807 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11808
11809         * python/py-function.c (fnpy_call): Reorder declarations to have
11810         the gdbpy_enter object declared first.
11811         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11812
11813 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11814
11815         PR python/21068
11816         * python/python-internal.h (PyMem_RawMalloc): Define for
11817         Python < 3.4.
11818         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11819         PyMem_RawMalloc instead of PyMem_Malloc.
11820
11821 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11822             Luis Machado  <lgustavo@codesourcery.com>
11823
11824         * NEWS (New commands): Mention flash-erase.
11825         (New MI commands): Mention target-flash-erase.
11826         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11827         command.
11828         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11829         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11830         * target.c (flash_erase_command): New function.
11831         (initialize_targets): Add new flash-erase command.
11832         * target.h (flash_erase_command): New declaration.
11833
11834 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11835
11836         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11837         HAVE_SYS_PROCFS_H is defined.
11838
11839 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11840
11841         * remote.c (struct cached_reg): Change data into a pointer.
11842         * (stop_reply_dtr): Free data pointers before deleting vector.
11843         (process_stop_reply): Likewise.
11844         (remote_parse_stop_reply): Allocate space for data
11845
11846 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11847
11848         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11849         MAX_REGISTER_SIZE.
11850         (amd64_pseudo_register_read_value): Likewise.
11851         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11852         (store_register_using_P): Likewise.
11853         * regcache.c (regcache_xfer_part): Likewise.
11854
11855 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11856
11857         Split real and pseudo registers.
11858         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11859         (sparc32_pseudo_regnum): New enum.
11860         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11861         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11862         (SPARC32_CP0_REGISTERS): New macro.
11863         (sparc32_pseudo_register_name): New function.
11864         (sparc32_register_name): Use sparc32_pseudo_register_name.
11865         (sparc32_pseudo_register_type): New function.
11866         (sparc32_register_type): Use sparc32_pseudo_register_type.
11867         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11868         pseudo register numbers.
11869         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11870         (SPARC64_CP0_REGISTERS): New macro.
11871         (sparc64_pseudo_register_name): New function.
11872         (sparc64_register_name): Use sparc64_pseudo_register_name.
11873         (sparc64_pseudo_register_type): New function.
11874         (sparc64_register_type): Use sparc64_pseudo_register_type.
11875         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11876         pseudo register numbers.
11877         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11878         sparc64_store_arguments): Handle pseudo register numbers.
11879
11880 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11881
11882         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11883         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11884         output.
11885         (getpkt_or_notif_sane_1): Likewise.
11886
11887 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11888
11889         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11890         of CC.  Pass "-x c++-header" instead of "-x c".
11891
11892 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11893
11894         * remote.c (remote_can_async_p): Update comment.
11895
11896 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11897
11898         * linux-nat.c (linux_nat_can_async_p): Update comment.
11899
11900 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11901
11902         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11903
11904 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
11905
11906         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11907
11908 2017-01-10  Tom Tromey  <tom@tromey.com>
11909
11910         * python/py-type.c (typy_legacy_template_argument): Update.
11911         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11912         ~demangle_parse_info): Declare new members.
11913         (cp_demangled_name_to_comp): Return unique_ptr.
11914         (cp_demangled_name_parse_free)
11915         (make_cleanup_cp_demangled_name_parse_free)
11916         (cp_new_demangle_parse_info): Remove.
11917         * cp-support.c (do_demangled_name_parse_free_cleanup)
11918         (make_cleanup_cp_demangled_name_parse_free): Remove.
11919         (inspect_type, cp_canonicalize_string_full)
11920         (cp_canonicalize_string): Update.
11921         (mangled_name_to_comp): Change return type.
11922         (cp_class_name_from_physname, method_name_from_physname)
11923         (cp_func_name, cp_remove_params): Update.
11924         * cp-name-parser.y (demangle_parse_info): New constructor, from
11925         cp_new_demangle_parse_info.
11926         (~demangle_parse_info): New destructor, from
11927         cp_demangled_name_parse_free.
11928         (cp_merge_demangle_parse_infos): Update.
11929         (cp_demangled_name_to_comp): Change return type.
11930
11931 2017-01-10  Tom Tromey  <tom@tromey.com>
11932
11933         * top.c (prevent_dont_repeat): Change return type.
11934         * python/python.c (execute_gdb_command): Use std::string.
11935         Update.
11936         * guile/guile.c (gdbscm_execute_gdb_command): Update.
11937         * command.h (prevent_dont_repeat): Change return type.
11938         * breakpoint.c (bpstat_do_actions_1): Update.
11939
11940 2017-01-10  Tom Tromey  <tom@tromey.com>
11941
11942         * value.h (scoped_value_mark::~scoped_value_mark): Call
11943         free_to_mark.
11944         (scoped_value_mark::free_to_mark): New method.
11945         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11946         scoped_value_mark.
11947
11948 2017-01-10  Tom Tromey  <tom@tromey.com>
11949
11950         * python/py-value.c (valpy_dereference, valpy_referenced_value)
11951         (valpy_reference_value, valpy_const_value, valpy_get_address)
11952         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11953         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11954         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11955         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11956         scoped_value_mark.
11957         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11958         * value.h (scoped_value_mark): New class.
11959
11960 2017-01-10  Tom Tromey  <tom@tromey.com>
11961
11962         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11963         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11964         * psymtab.c (discard_psymtabs_upto): Remove.
11965         (make_cleanup_discard_psymtabs): Remove.
11966         (struct psymtab_state): Remove.
11967
11968 2017-01-10  Tom Tromey  <tom@tromey.com>
11969
11970         * record-full.c (record_full_save_cleanups): Remove.
11971         (record_full_save): Use gdb::unlinker.
11972         * gcore.c (do_bfd_delete_cleanup): Remove.
11973         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
11974         cleanups.
11975         * dwarf2read.c (unlink_if_set): Remove.
11976         (write_psymtabs_to_index): Use gdb::unlinker.
11977         * common/gdb_unlinker.h: New file.
11978
11979 2017-01-10  Tom Tromey  <tom@tromey.com>
11980
11981         * windows-tdep.c (windows_xfer_shared_library): Update.
11982         * windows-nat.c (windows_make_so): Update.
11983         * utils.h (make_cleanup_bfd_unref): Remove.
11984         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11985         * symfile.h (symfile_bfd_open)
11986         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11987         * symfile.c (read_symbols, symbol_file_add)
11988         (separate_debug_file_exists): Update.
11989         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11990         (generic_load, reread_symbols): Update.
11991         * symfile-mem.c (symbol_file_add_from_memory): Update.
11992         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11993         (spu_symbol_file_add_from_memory): Update.
11994         * solist.h (struct target_so_ops) <bfd_open>: Return
11995         gdb_bfd_ref_ptr.
11996         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11997         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11998         gdb_bfd_ref_ptr.
11999         (solib_map_sections, reload_shared_libraries_1): Update.
12000         * solib-svr4.c (enable_break): Update.
12001         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12002         * solib-frv.c (enable_break2): Update.
12003         * solib-dsbt.c (enable_break): Update.
12004         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12005         gdb_bfd_ref_ptr.
12006         (darwin_solib_get_all_image_info_addr_at_init): Update.
12007         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12008         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12009         * record-full.c (record_full_save): Update.
12010         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12011         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12012         * minidebug.c (find_separate_debug_file_in_section): Return
12013         gdb_bfd_ref_ptr.
12014         * machoread.c (macho_add_oso_symfile): Change abfd to
12015         gdb_bfd_ref_ptr.
12016         (macho_symfile_read_all_oso): Update.
12017         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12018         (macho_symfile_read): Update.
12019         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12020         (jit_bfd_try_read_symtab): Update.
12021         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12022         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12023         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12024         gdb_bfd_ref_ptr.
12025         (gdb_bfd_ref_policy): New struct.
12026         (gdb_bfd_ref_ptr): New typedef.
12027         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12028         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12029         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12030         gdb_bfd_ref_ptr.
12031         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12032         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12033         (gcore_command): Update.
12034         * exec.c (exec_file_attach): Update.
12035         * elfread.c (elf_symfile_read): Update.
12036         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12037         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12038         (open_and_init_dwo_file): Update.
12039         (open_dwp_file): Return gdb_bfd_ref_ptr.
12040         (open_and_init_dwp_file): Update.
12041         * corelow.c (core_open): Update.
12042         * compile/compile-object-load.c (compile_object_load): Update.
12043         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12044         * coffread.c (coff_symfile_read): Update.
12045         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12046         gdb_bfd_ref_ptr.  Rename.
12047         (dump_bfd_file, restore_command): Update.
12048         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12049         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12050         (find_separate_debug_file_by_buildid): Update.
12051
12052 2017-01-10  Tom Tromey  <tom@tromey.com>
12053
12054         * common/gdb_ref_ptr.h: New file.
12055         * python/py-ref.h (struct gdbpy_ref_policy): New.
12056         (gdbpy_ref): Now a typedef.
12057
12058 2017-01-10  Tom Tromey  <tom@tromey.com>
12059
12060         * utils.h (make_cleanup_htab_delete): Don't declare.
12061         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12062         Remove.
12063         * linespec.c (decode_compound_collector): Add constructor,
12064         destructor.
12065         (lookup_prefix_sym): Remove cleanup.
12066         (symtab_collector): Add constructor, destructor.
12067         (collect_symtabs_from_filename): Remove cleanup.
12068         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12069         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12070         Use htab_up.
12071         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12072         * dwarf2read.c (dw2_expand_symtabs_matching)
12073         (dw2_map_symbol_filenames, dwarf_decode_macros)
12074         (write_psymtabs_to_index): Use htab_up.
12075         * dwarf2loc.c (func_verify_no_selftailcall)
12076         (call_site_find_chain_1, func_verify_no_selftailcall)
12077         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12078         std::vector, gdb::unique_xmalloc_ptr.
12079         (call_sitep): Remove typedef.
12080         (dwarf2_locexpr_baton_eval): Remove unused variable.
12081
12082 2017-01-10  Tom Tromey  <tom@tromey.com>
12083
12084         * python/python-internal.h (make_cleanup_py_decref)
12085         (make_cleanup_py_xdecref): Don't declare.
12086         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12087         (py_xdecref, make_cleanup_py_xdecref): Remove.
12088
12089 2017-01-10  Tom Tromey  <tom@tromey.com>
12090
12091         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12092         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12093
12094 2017-01-10  Tom Tromey  <tom@tromey.com>
12095
12096         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12097
12098 2017-01-10  Tom Tromey  <tom@tromey.com>
12099
12100         * python/py-utils.c (unicode_to_encoded_string)
12101         (python_string_to_target_string)
12102         (python_string_to_target_python_string)
12103         (python_string_to_host_string, gdbpy_obj_to_string)
12104         (get_addr_from_python): Use gdbpy_ref.
12105
12106 2017-01-10  Tom Tromey  <tom@tromey.com>
12107
12108         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12109         gdbpy_ref.
12110
12111 2017-01-10  Tom Tromey  <tom@tromey.com>
12112
12113         * python/python.c (eval_python_command, gdbpy_decode_line)
12114         (gdbpy_run_events, gdbpy_start_type_printers)
12115         (gdbpy_apply_type_printers): Use gdbpy_ref.
12116
12117 2017-01-10  Tom Tromey  <tom@tromey.com>
12118
12119         * python/py-param.c (get_doc_string, compute_enum_values): Use
12120         gdbpy_ref.
12121
12122 2017-01-10  Tom Tromey  <tom@tromey.com>
12123
12124         * python/py-inferior.c (find_thread_object, build_inferior_list):
12125         Use gdbpy_ref.
12126
12127 2017-01-10  Tom Tromey  <tom@tromey.com>
12128
12129         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12130
12131 2017-01-10  Tom Tromey  <tom@tromey.com>
12132
12133         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12134         gdbpy_ref.
12135
12136 2017-01-10  Tom Tromey  <tom@tromey.com>
12137
12138         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12139         extra incref.
12140         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12141         Use gdbpy_ref.
12142
12143 2017-01-10  Tom Tromey  <tom@tromey.com>
12144
12145         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12146         gdbpy_ref.
12147
12148 2017-01-10  Tom Tromey  <tom@tromey.com>
12149
12150         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12151         decref results of PyArg_ParseTupleAndKeywords.
12152
12153 2017-01-10  Tom Tromey  <tom@tromey.com>
12154
12155         * python/python.c (python_run_simple_file): Use
12156         unique_xmalloc_ptr, gdbpy_ref.
12157
12158 2017-01-10  Tom Tromey  <tom@tromey.com>
12159
12160         * python/py-prettyprint.c (print_stack_unless_memory_error)
12161         (print_string_repr, print_children): Use gdbpy_ref.
12162         (dummy_python_frame): New class.
12163         (dummy_python_frame::dummy_python_frame): Rename from
12164         push_dummy_python_frame.
12165         (py_restore_tstate): Remove.
12166
12167 2017-01-10  Tom Tromey  <tom@tromey.com>
12168
12169         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12170
12171 2017-01-10  Tom Tromey  <tom@tromey.com>
12172
12173         * python/python.c (ensure_python_env, restore_python_env):
12174         Remove.
12175         * python/python-internal.h (ensure_python_env): Don't declare.
12176         * varobj.h (varobj_ensure_python_env): Don't declare.
12177         * varobj.c (varobj_ensure_python_env): Remove.
12178
12179 2017-01-10  Tom Tromey  <tom@tromey.com>
12180
12181         * varobj.c (varobj_value_get_print_value): Use
12182         gdbpy_enter_varobj.
12183
12184 2017-01-10  Tom Tromey  <tom@tromey.com>
12185
12186         * python/py-prettyprint.c (print_string_repr, print_children):
12187         Update.
12188         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12189         of "encoding".
12190         * varobj.c (varobj_value_get_print_value): Update.
12191         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12192
12193 2017-01-10  Tom Tromey  <tom@tromey.com>
12194
12195         * varobj.c (varobj_get_display_hint)
12196         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12197         (varobj_set_visualizer, free_variable): Use
12198         gdbpy_enter_varobj.
12199
12200 2017-01-10  Tom Tromey  <tom@tromey.com>
12201
12202         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12203         (do_finish_initialization): New function.  Use gdbpy_ref.
12204         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12205         do_finish_initialization.
12206
12207 2017-01-10  Tom Tromey  <tom@tromey.com>
12208
12209         * python/py-param.c (get_set_value, get_show_value): Use
12210         gdbpy_enter, gdbpy_ref.
12211
12212 2017-01-10  Tom Tromey  <tom@tromey.com>
12213
12214         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12215
12216 2017-01-10  Tom Tromey  <tom@tromey.com>
12217
12218         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12219
12220 2017-01-10  Tom Tromey  <tom@tromey.com>
12221
12222         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12223         Use gdbpy_enter_varobj.
12224
12225 2017-01-10  Tom Tromey  <tom@tromey.com>
12226
12227         * varobj.c (gdbpy_enter_varobj): New constructor.
12228         * python/python-internal.h (gdbpy_enter_varobj): New class.
12229         * python/py-varobj.c (py_varobj_get_iterator): Use
12230         gdbpy_enter_varobj.
12231
12232 2017-01-10  Tom Tromey  <tom@tromey.com>
12233
12234         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12235         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12236         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12237         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12238         unique_xmalloc_ptr.
12239         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12240
12241 2017-01-10  Tom Tromey  <tom@tromey.com>
12242
12243         * python/py-xmethods.c (invoke_match_method): Use
12244         gdbpy_ref.
12245
12246 2017-01-10  Tom Tromey  <tom@tromey.com>
12247
12248         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12249         gdbpy_enter, gdbpy_ref.
12250
12251 2017-01-10  Tom Tromey  <tom@tromey.com>
12252
12253         * python/python.c (python_interactive_command): Use gdbpy_enter.
12254
12255 2017-01-10  Tom Tromey  <tom@tromey.com>
12256
12257         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12258         gdbpy_ref.
12259
12260 2017-01-10  Tom Tromey  <tom@tromey.com>
12261
12262         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12263         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12264
12265 2017-01-10  Tom Tromey  <tom@tromey.com>
12266
12267         * utils.h (htab_deleter): New struct.
12268         (htab_up): New typedef.
12269         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12270         gdbpy_enter, gdbpy_ref, htab_up.
12271
12272 2017-01-10  Tom Tromey  <tom@tromey.com>
12273
12274         * python/py-unwind.c (pending_frame_invalidate): Remove.
12275         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12276
12277 2017-01-10  Tom Tromey  <tom@tromey.com>
12278
12279         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12280         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12281
12282 2017-01-10  Tom Tromey  <tom@tromey.com>
12283
12284         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12285
12286 2017-01-10  Tom Tromey  <tom@tromey.com>
12287
12288         * python/python.c (gdbpy_eval_from_control_command)
12289         (gdbpy_source_script, gdbpy_run_events)
12290         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12291         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12292         gdbpy_enter.
12293
12294 2017-01-10  Tom Tromey  <tom@tromey.com>
12295
12296         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12297
12298 2017-01-10  Tom Tromey  <tom@tromey.com>
12299
12300         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12301
12302 2017-01-10  Tom Tromey  <tom@tromey.com>
12303
12304         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12305         (python_on_inferior_call_pre, python_on_inferior_call_post)
12306         (python_on_memory_change, python_on_register_change)
12307         (python_inferior_exit, python_new_objfile, add_thread_object)
12308         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12309
12310 2017-01-10  Tom Tromey  <tom@tromey.com>
12311
12312         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12313         (bpfinishpy_handle_exit): Use gdbpy_enter.
12314
12315 2017-01-10  Tom Tromey  <tom@tromey.com>
12316
12317         * python/py-cmd.c (cmdpy_destroyer)
12318         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12319         gdbpy_enter.
12320
12321 2017-01-10  Tom Tromey  <tom@tromey.com>
12322
12323         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12324         gdbpy_enter.
12325         (gdbpy_breakpoint_has_cond): Likewise.
12326
12327 2017-01-10  Tom Tromey  <tom@tromey.com>
12328
12329         * python/python.c (gdbpy_enter): New constructor.
12330         (~gdbpy_enter): New destructor.
12331         (restore_python_env, ensure_python_env): Rewrite.
12332         * python/python-internal.h (gdbpy_enter): New class.
12333
12334 2017-01-10  Tom Tromey  <tom@tromey.com>
12335
12336         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12337
12338 2017-01-10  Tom Tromey  <tom@tromey.com>
12339
12340         * python/py-value.c (value_has_field, get_field_flag)
12341         (get_field_type, valpy_getitem, convert_value_from_python): Use
12342         gdbpy_ref.
12343
12344 2017-01-10  Tom Tromey  <tom@tromey.com>
12345
12346         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12347         gdbpy_ref.
12348
12349 2017-01-10  Tom Tromey  <tom@tromey.com>
12350
12351         * python/py-prettyprint.c (search_pp_list)
12352         (find_pretty_printer_from_objfiles)
12353         (find_pretty_printer_from_progspace)
12354         (find_pretty_printer_from_gdb, find_pretty_printer)
12355         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12356         gdbpy_ref.
12357
12358 2017-01-10  Tom Tromey  <tom@tromey.com>
12359
12360         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12361
12362 2017-01-10  Tom Tromey  <tom@tromey.com>
12363
12364         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12365         (ltpy_get_all_source_lines): Use gdbpy_ref.
12366
12367 2017-01-10  Tom Tromey  <tom@tromey.com>
12368
12369         * python/py-framefilter.c (extract_sym, extract_value)
12370         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12371         gdbpy_ref.
12372
12373 2017-01-10  Tom Tromey  <tom@tromey.com>
12374
12375         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12376
12377 2017-01-10  Tom Tromey  <tom@tromey.com>
12378
12379         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12380
12381 2017-01-10  Tom Tromey  <tom@tromey.com>
12382
12383         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12384         gdbpy_ref.
12385
12386 2017-01-10  Tom Tromey  <tom@tromey.com>
12387
12388         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12389
12390 2017-01-10  Tom Tromey  <tom@tromey.com>
12391
12392         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12393         (typy_range): Use gdbpy_ref.
12394
12395 2017-01-10  Tom Tromey  <tom@tromey.com>
12396
12397         * python/py-threadevent.c (create_thread_event_object): Use
12398         gdbpy_ref.
12399         * python/py-stopevent.c (create_stop_event_object): Simplify.
12400         (emit_stop_event): Use gdbpy_ref.
12401         * python/py-signalevent.c (create_signal_event_object): Use
12402         gdbpy_ref.
12403         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12404         (emit_new_objfile_event, create_clear_objfiles_event_object)
12405         (emit_clear_objfiles_event): Use gdbpy_ref.
12406         * python/py-infevents.c (create_inferior_call_event_object)
12407         (create_register_changed_event_object)
12408         (create_memory_changed_event_object, emit_inferior_call_event)
12409         (emit_memory_changed_event, emit_register_changed_event): Use
12410         gdbpy_ref.
12411         * python/py-exitedevent.c (create_exited_event_object)
12412         (emit_exited_event): Use gdbpy_ref.
12413         * python/py-event.h (evpy_emit_event): Remove
12414         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12415         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12416         * python/py-continueevent.c (emit_continue_event): Use
12417         gdbpy_ref.
12418         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12419         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12420         gdbpy_ref.
12421         * python/py-bpevent.c (create_breakpoint_event_object): Use
12422         gdbpy_ref.
12423
12424 2017-01-10  Tom Tromey  <tom@tromey.com>
12425
12426         * python/py-ref.h: New file.
12427
12428 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12429
12430         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12431         void.
12432         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12433         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12434         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12435         * ui-out.c (ui_out::redirect): Likewise.
12436         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12437         * cli/cli-logging.c (set_logging_redirect): Update call site of
12438         ui_out::redirect.
12439         (handle_redirections): Likewise.
12440         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12441         * top.c (execute_command_to_string): Likewise.
12442         * utils.c (do_ui_out_redirect_pop): Likewise.
12443
12444 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12445
12446         * stack.c (_initialize_stack): Update "frame" command help message.
12447
12448 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12449
12450         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12451
12452 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12453
12454         * x86-linux-nat.h: Include gdb_proc_service.h.
12455
12456 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12457
12458         * ser-base.h: Include serial.h.
12459
12460 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12461
12462         * ppc-linux-tdep.h: Include ppc-tdep.h.
12463
12464 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12465
12466         * nat/amd64-linux-siginfo.h: Include signal.h.
12467
12468 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12469
12470         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12471
12472 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12473
12474         * mi/mi-parse.h: Include mi-cmds.h.
12475
12476 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12477
12478         * inf-loop.c: Don't include "target.h".
12479         * inf-loop.h: Include it here.
12480
12481 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12482
12483         * dfp.h: Include "dboulest.h" and "expression.h".
12484
12485 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12486
12487         * ax-gdb.h: Include "ax.h".
12488
12489 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12490
12491         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12492         with nat/gdb_ptrace.h.
12493
12494 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12495
12496         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12497         new line.
12498         (mips64_fbsd_sigframe_init): Likewise.
12499
12500 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12501
12502         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12503         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12504
12505 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12506
12507         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12508         * NEWS: Mention new FreeBSD/mips native configuration.
12509         * config/mips/fbsd.mh: New file.
12510         * configure.host: Add mips*-*-freebsd*.
12511         * mips-fbsd-nat.c: New file.
12512
12513 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12514
12515         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12516         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12517         * NEWS: Mention new FreeBSD/mips target.
12518         * configure.tgt: Add mips*-*-freebsd*.
12519         * mips-fbsd-tdep.c: New file.
12520         * mips-fbsd-tdep.h: New file.
12521
12522 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12523
12524         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12525         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12526
12527 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12528
12529         Update copyright year range in all GDB files.
12530
12531 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12532
12533         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12534
12535 For older changes see ChangeLog-2016.
12536 \f
12537 Local Variables:
12538 mode: change-log
12539 left-margin: 8
12540 fill-column: 74
12541 version-control: never
12542 coding: utf-8
12543 End: