Don't try building gdb against guile-2.2
[external/binutils.git] / gdb / ChangeLog
1 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * configure.ac (try_guile_versions): Remove guile-2.2.
4         * configure: Regenerate.
5
6 2017-10-09  Tom Tromey  <tom@tromey.com>
7
8         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
9         (COMPILE.pre): Use $(CXX).
10
11 2017-10-09  Pedro Alves  <palves@redhat.com>
12
13         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
14         Use bool.
15         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
16         * cp-support.h (cp_remove_params): Now returns a
17         gdb::unique_xmalloc_ptr.
18         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
19         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
20         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
21         returning a gdb::unique_xmalloc_ptr.
22         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
23         * stack.c (find_frame_funname): Adjust to cp_remove_params
24         returning a gdb::unique_xmalloc_ptr.
25
26 2017-10-08  Tom Tromey  <tom@tromey.com>
27
28         * dwarf2read.c (dwarf2_get_dwz_file): Use
29         gdb::unique_xmalloc_ptr.
30         (find_slot_in_mapped_hash): Likewise.
31         (dwarf2_physname): Likewise.
32         (create_dwo_unit_in_dwp_v1): Use std::string.
33         (create_dwo_unit_in_dwp_v2): Likewise.
34         (lookup_dwo_cutu): Likewise.
35         (inherit_abstract_dies): Use std::vector.
36         (read_array_type): Likewise.
37         (dwarf_decode_macros): Remove unused declaration.
38         (unsigned_int_compar): Remove.
39         (dwarf2_build_psymtabs_hard): Use scoped_restore.
40         (psymtabs_addrmap_cleanup): Remove.
41
42 2017-10-08  Tom Tromey  <tom@tromey.com>
43
44         * frame-unwind.c (frame_unwind_try_unwinder): Update.
45         * frame.h (frame_cleanup_after_sniffer): Declare.
46         (frame_prepare_for_sniffer): Return void.
47         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
48         type of argument.
49         (frame_prepare_for_sniffer): Return void.
50
51 2017-10-08  Tom Tromey  <tom@tromey.com>
52
53         * utils.h (make_cleanup_value_free): Remove.
54         * utils.c (do_value_free, struct cleanup): Remove.
55         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
56         Use gdb_value_up.
57         * value.h (struct value_deleter): New.
58         (gdb_value_up): New typedef.
59
60 2017-10-08  Tom Tromey  <tom@tromey.com>
61
62         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
63         (make_cleanup_free_search_symbols): Remove.
64         (search_symbols): Return std::vector.
65         (symbol_search::compare_search_syms): Now member of
66         symbol_search.  Change arguments.
67         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
68         (symtab_symbol_info, rbreak_command): Update.
69         * symtab.h (struct symbol_search) <next>: Remove.
70         Add constructors.
71         (symbol_search::operator<): New function.
72         (symbol_search::operator==): New function.
73         (search_symbols): Remove std::vector.
74         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
75         (symbol_search::compare_search_syms): Declare.
76
77 2017-10-06  Yao Qi  <yao.qi@linaro.org>
78
79         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
80         arch/aarch64-insn.o.
81         Remove one rule.
82         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
83
84 2017-10-06  Yao Qi  <yao.qi@linaro.org>
85
86         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
87         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
88         arch/arm-linux.o respectively.
89         * configure.tgt: Likewise.
90
91 2017-10-06  Yao Qi  <yao.qi@linaro.org>
92
93         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
94         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
95
96 2017-10-06  Pedro Alves  <palves@redhat.com>
97
98         * windows-nat.c: Include <algorithm>.
99
100 2017-10-06  Yao Qi  <yao.qi@linaro.org>
101
102         * configure.tgt (i386_tobjs): New variable.
103         (amd64_tobjs): New variable.
104         Set $cpu_obs and $os_obs.
105
106 2017-10-06  Yao Qi  <yao.qi@linaro.org>
107
108         * Makefile.in (CONFIG_SRC_SUBDIR): New.
109         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
110         (clean): Remove object files and dependency files.
111         (distclean): Remove the directory.
112         * configure.ac: Invoke AC_CONFIG_COMMANDS.
113         * configure: Re-generated.
114         * configure.tgt: Replace amd64.o with arch/amd64.o.
115
116 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
117
118         PR build/22188
119         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
120         and SETEND.
121
122 2017-10-05  Pedro Alves  <palves@redhat.com>
123
124         * linux-nat.c (linux_child_follow_fork): When following the parent
125         and detaching the child, consult the parent thread's architecture
126         instead of the child's.
127
128 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
129
130         * ax.h: Do not include "doublest.h".
131         (union agent_val): Remove.
132
133 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
134
135         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
136         (decimal_to_string): Return std::string object.
137         (decimal_from_string): Accept std::string object.  Return bool.
138         (decimal_from_integral, decimal_from_doublest): Remove.
139         (decimal_from_longest): Add prototype.
140         (decimal_from_ulongest): Likewise.
141         (decimal_to_longest): Likewise.
142         (decimal_from_doublest): Likewise.
143         * dfp.c: Do not include "gdbtypes.h" or "value.h".
144         (MAX_DECIMAL_STRING): Move here.
145         (decimal_to_string): Return std::string object.
146         (decimal_from_string): Accept std::string object.  Return bool.
147         (decimal_from_integral): Remove, replace by ...
148         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
149         (decimal_to_longest): New function.
150         (decimal_from_floating): Remove, replace by ...
151         (decimal_from_doublest): ... this new function.
152         (decimal_to_doublest): Update to new decimal_to_string interface.
153
154         * value.c (unpack_long): Use decimal_to_longest.
155         * valops.c (value_cast): Use decimal_from_doublest instead of
156         decimal_from_floating.  Use decimal_from_[u]longest isntead of
157         decimal_from_integral.
158         * valarith.c (value_args_as_decimal): Likewise.
159         * valprint.c (print_decimal_floating): Update to new
160         decimal_to_string interface.
161         * printcmd.c (printf_decfloat): Likewise.
162         * c-exp.y (parse_number): Update to new decimal_from_string interface.
163
164 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
165
166         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
167         * gdbtypes.c: Include "floatformat.h".
168         * value.c: Likewise.
169         * m68k-tdep.c: Likewise.
170
171         * findvar.c: Do not include "floatformat.h".
172         * amd64-darwin-tdep.c: Likewise.
173         * arm-linux-tdep.c: Likewise.
174         * i386-darwin-tdep.c: Likewise.
175         * i387-tdep.c: Likewise.
176         * m68k-linux-tdep.c: Likewise.
177         * mep-tdep.c: Likewise.
178         * mips-tdep.c: Likewise.
179         * nios2-tdep.c: Likewise.
180         * s390-linux-tdep.c: Likewise.
181         * sparc-obsd-tdep.c: Likewise.
182         * sparc-tdep.c: Likewise.
183         * sparc64-tdep.c: Likewise.
184         * spu-tdep.c: Likewise.
185         * tic6x-tdep.c: Likewise.
186         * tilegx-tdep.c: Likewise.
187         * vax-tdep.c: Likewise.
188         * xstormy16-tdep.c: Likewise.
189         * xtensa-tdep.c: Likewise.
190
191         * top.c: Do not include "doublest.h".
192         * aarch64-tdep.c: Likewise.
193         * alpha-tdep.c: Likewise.
194         * arm-linux-tdep.c: Likewise.
195         * m68k-linux-tdep.c: Likewise.
196         * tilegx-tdep.c: Likewise.
197         * xstormy16-tdep.c: Likewise.
198
199 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
200
201         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
202         (mipsn32_fbsd_sigframe): Define.
203         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
204         for FreeBSD/mipsn32.
205
206 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
207
208         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
209         AT_HWCAP.
210
211 2017-10-05  Tristan Gingold  <tgingold@free.fr>
212
213         * MAINTAINERS (Misc): Update my email address.
214
215 2017-10-04  Pedro Alves  <palves@redhat.com>
216
217         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
218         it instead of target_gdbarch.
219         (get_remote_state, get_remote_packet_size): Adjust
220         get_remote_arch_state calls, passing down target_gdbarch
221         explicitly.
222         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
223         'gdbarch' and use it instead of target_gdbarch.
224         (get_memory_packet_size): Adjust get_remote_arch_state calls,
225         passing down target_gdbarch explicitly.
226         (struct stop_reply) <arch>: New field.
227         (remote_parse_stop_reply): Use the stopped thread's architecture,
228         not the current inferior's.  Save the architecture in the
229         stop_reply.
230         (process_stop_reply): Use the stop reply's architecture.
231         (process_g_packet, remote_fetch_registers)
232         (remote_prepare_to_store, store_registers_using_G)
233         (remote_store_registers): Adjust get_remote_arch_state calls,
234         using the regcache's architecture.
235         (remote_get_trace_status): Adjust get_remote_arch_state calls,
236         passing down target_gdbarch explicitly.
237         * spu-multiarch.c (spu_thread_architecture): Defer to the target
238         beneath instead of calling target_gdbarch.
239         * target.c (default_thread_architecture): Use the specified
240         inferior's architecture, instead of the current inferior's
241         architecture (via target_gdbarch).
242
243 2017-10-04  Pedro Alves  <palves@redhat.com>
244
245         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
246         case.
247         (regcache_print): Handle !target_has_registers here instead.
248
249 2017-10-04  Pedro Alves  <palves@redhat.com>
250
251         * frame.c (create_test_frame): Delete.
252         * frame.h (create_test_frame): Delete.
253         * gdbarch-selftests.c: Include gdbthread.h and target.h.
254         (class regcache_test): Delete.
255         (test_target_has_registers, test_target_has_stack)
256         (test_target_has_memory, test_target_prepare_to_store)
257         (test_target_store_registers): New functions.
258         (test_target_ops): New class.
259         (register_to_value_test): Error out if there's already a
260         process_stratum (or higher) target pushed.  Create a fuller mock
261         environment, with mock target_ops, inferior, address space, thread
262         and inferior_ptid.
263         * progspace.c (struct address_space): Move to ...
264         * progspace.h (struct address_space): ... here.
265         * regcache.h (regcache::~regcache, regcache::raw_write)
266         [GDB_SELF_TEST]: No longer virtual.
267
268 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
269
270         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
271
272 2017-10-04  Pedro Alves  <palves@redhat.com>
273
274         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
275         out of 'between TRY and CATCH'.
276
277 2017-10-04  Pedro Alves  <palves@redhat.com>
278
279         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
280         * common/common-exceptions.h (TRY): Open an outermost scope.
281         Expand intro comment.
282         (CATCH): Reindent.
283         (END_CATCH): Close the outermost scope.
284         * completer.c (complete_line_internal): Add missing END_CATCH.
285
286 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
287
288         * NEWS (Changes since GDB 8.0): Add entry about new
289         'set-cwd-on-gdbserver' feature.
290         (New remote packets): Add entry for QSetWorkingDir.
291         * common/common-inferior.h (set_inferior_cwd): New prototype.
292         * infcmd.c (set_inferior_cwd): Remove "static".
293         (show_cwd_command): Expand text to include remote debugging.
294         * remote.c: Add PACKET_QSetWorkingDir.
295         (remote_protocol_features) <QSetWorkingDir>: New entry for
296         PACKET_QSetWorkingDir.
297         (extended_remote_set_inferior_cwd): New function.
298         (extended_remote_create_inferior): Call
299         "extended_remote_set_inferior_cwd".
300         (_initialize_remote): Call "add_packet_config_cmd" for
301         QSetWorkingDir.
302
303 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
304
305         * NEWS (New commands): Mention "set/show cwd".
306         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
307         "cd" command's help text.
308         * common/common-inferior.h (get_inferior_cwd): New prototype.
309         * infcmd.c (inferior_cwd_scratch): New global variable.
310         (set_inferior_cwd): New function.
311         (get_inferior_cwd): Likewise.
312         (set_cwd_command): Likewise.
313         (show_cwd_command): Likewise.
314         (_initialize_infcmd): Add "set/show cwd" commands.
315         * inferior.h (class inferior) <cwd>: New field.
316         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
317         (fork_inferior): Change inferior's cwd before its execution.
318         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
319         to CreateProcess.
320
321 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
322
323         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
324         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
325         (COMMON_OBS): Add gdb_tilde_expand.o.
326         * common/gdb_tilde_expand.c: New file.
327         * common/gdb_tilde_expand.h: Likewise.
328
329 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
330
331         * gdbarch.sh (objfile): Remove duplicate declaration.
332         * gdbarch.h: Regenerate.
333
334 2017-10-03  Tom Tromey  <tom@tromey.com>
335
336         * utils.c (internal_vproblem): Use string_vprintf.
337
338 2017-10-03  Tom Tromey  <tom@tromey.com>
339
340         * printcmd.c (info_symbol_command): Use std::string.
341
342 2017-10-03  Tom Tromey  <tom@tromey.com>
343
344         * top.c (gdb_safe_append_history): Use std::string.
345
346 2017-10-03  Tom Tromey  <tom@tromey.com>
347
348         * event-top.c (stdin_event_handler): Update.
349         * main.c (captured_main_1): Update.
350         * top.h (make_delete_ui_cleanup): Remove.
351         (struct ui): Add constructor and destructor.
352         (new_ui, delete_ui): Remove.
353         * top.c (make_delete_ui_cleanup): Remove.
354         (new_ui_command): Use std::unique_ptr.
355         (delete_ui_cleanup): Remove.
356         (ui::ui): Rename from new_ui.  Update.
357         (free_ui): Remove.
358         (ui::~ui): Rename from delete_ui.  Update.
359
360 2017-10-03  Tom Tromey  <tom@tromey.com>
361
362         * symfile.c (load_progress): Use gdb::byte_vector.
363
364 2017-10-03  Tom Tromey  <tom@tromey.com>
365
366         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
367         declaration.
368         * printcmd.c (x_command): Remove unused declaration.
369         * symfile.c (symbol_file_command): Remove unused declaration.
370
371 2017-10-03  Tom Tromey  <tom@tromey.com>
372
373         * utils.c (internal_vproblem): Use std::string.
374         (defaulted_query): Likewise.
375
376 2017-10-03  Tom Tromey  <tom@tromey.com>
377
378         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
379         * top.c (execute_command_to_string): Update.
380         * utils.c (make_cleanup_restore_page_info): Remove.
381         (do_restore_page_info_cleanup): Remove.
382         (set_batch_flag_and_restore_page_info):
383         New.
384         (make_cleanup_restore_page_info): Remove.
385         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
386         (~set_batch_flag_and_restore_page_info): New
387         (make_cleanup_restore_uinteger): Remove.
388         (make_cleanup_restore_integer): Remove.
389         (struct restore_integer_closure): Remove.
390         (restore_integer): Remove.
391         * utils.h (struct set_batch_flag_and_restore_page_info): New
392         class.
393         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
394         (make_cleanup_restore_page_info): Remove.
395         (make_cleanup_restore_uinteger) Remove.
396         (make_cleanup_restore_integer) Remove.
397
398 2017-10-03  Tom Tromey  <tom@tromey.com>
399
400         * record-full.h (record_full_gdb_operation_disable_set): Return
401         scoped_restore_tmpl<int>.
402         * infrun.c (adjust_pc_after_break): Update.
403         (handle_signal_stop): Update.
404         * record-full.c (record_full_gdb_operation_disable_set): Return
405         scoped_restore_tmpl<int>.
406         (record_full_wait_1, record_full_insert_breakpoint)
407         (record_full_remove_breakpoint, record_full_save)
408         (record_full_goto_insn): Update.
409
410 2017-10-02  Tom Tromey  <tom@tromey.com>
411
412         PR rust/22236:
413         * rust-lang.c (rust_val_print_str): New function.
414         (val_print_struct): Call it.
415         (rust_subscript): Preserve name of slice type.
416
417 2017-10-02  Tom Tromey  <tom@tromey.com>
418
419         * rust-lang.c (rust_subscript): Handle slices in
420         EVAL_AVOID_SIDE_EFFECTS case.
421
422 2017-10-02  Tom Tromey  <tom@tromey.com>
423
424         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
425
426 2017-10-02  Tom Tromey  <tom@tromey.com>
427
428         * rust-lang.h (rust_slice_type): Add "extern".
429
430 2017-10-02  Tom Tromey  <tom@tromey.com>
431             Pedro Alves  <palves@redhat.com>
432
433         * ada-lang.h (ada_exc_info::operator<): Make const.
434         (ada_exc_info::operator==): Make const.
435         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
436         Make const.
437
438 2017-09-29  Tom Tromey  <tom@tromey.com>
439
440         * target.c (read_whatever_is_readable): Change type of "result".
441         Update.
442         (free_memory_read_result_vector): Remove.
443         (read_memory_robust): Change return type.  Update.
444         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
445         bin2hex, std::string.
446         * target.h (memory_read_result_s): Remove typedef.
447         (free_memory_read_result_vector): Remove.
448         (read_memory_robust): Return std::vector.
449
450 2017-09-29  Tom Tromey  <tom@tromey.com>
451
452         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
453
454 2017-09-29  Tom Tromey  <tom@tromey.com>
455
456         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
457         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
458         operator< and operator==.
459         (ada_exceptions_list): Return a std::vector.
460         * ada-lang.c (ada_exc_info::operator<): Rename from
461         compare_ada_exception_info.
462         (ada_exc_info::operator==): New.
463         (sort_remove_dups_ada_exceptions_list): Change type of
464         "exceptions".
465         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
466         (ada_add_global_exceptions): Likewise.
467         (ada_exceptions_list_1): Return a std::vector.
468         (ada_exceptions_list): Likewise.
469
470 2017-09-29  Tom Tromey  <tom@tromey.com>
471
472         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
473         'std::set *'.
474         (print_one_inferior): Update.
475         (free_vector_of_ints): Remove.
476         (list_available_thread_groups): Change "ids" to std::set.
477         (mi_cmd_list_thread_groups): Update.
478         (struct collect_cores_data) <core>: Now a std::set.
479         (collect_cores): Update.
480         (unique): Remove.
481         (print_one_inferior): Update.
482
483 2017-09-29  Tom Tromey  <tom@tromey.com>
484
485         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
486         (mi_execute_async_cli_command): Likewise.
487         (mi_cmd_trace_frame_collected): Use field_fmt.
488
489 2017-09-29  Tom Tromey  <tom@tromey.com>
490
491         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
492         gdb::byte_vector.
493
494 2017-09-29  Tom Tromey  <tom@tromey.com>
495
496         * mi/mi-parse.c (mi_parse): Remove unused declaration.
497
498 2017-09-29  Tom Tromey  <tom@tromey.com>
499
500         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
501
502 2017-09-29  Tom Tromey  <tom@tromey.com>
503
504         * varobj.h (varobj_gen_name): Return std::string.
505         * varobj.c (varobj_gen_name): Return std::string.
506         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
507         (mi_cmd_var_delete): Don't copy "name".
508
509 2017-09-29  Tom Tromey  <tom@tromey.com>
510
511         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
512         (mi_cmd_break_insert_1): Update.
513
514 2017-09-29  Tom Tromey  <tom@tromey.com>
515
516         * target.h (make_scoped_defer_target_commit_resume): Update.
517         * target.c (make_scoped_defer_target_commit_resume): Rename from
518         make_cleanup_defer_target_commit_resume.  Return a
519         scoped_restore.
520         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
521
522 2017-09-29  Tom Tromey  <tom@tromey.com>
523
524         * main.c (captured_main_1): Remove unused declaration.
525         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
526
527 2017-09-29  Tom Tromey  <tom@tromey.com>
528
529         * symtab.c (search_symbols): Remove unused outer cleanup.
530         (make_source_files_completion_list): Remove unused declaration.
531
532 2017-09-29  Tom Tromey  <tom@tromey.com>
533
534         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
535
536 2017-09-29  Tom Tromey  <tom@tromey.com>
537
538         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
539         gdb::byte_vector.
540
541 2017-09-29  Tom Tromey  <tom@tromey.com>
542
543         * complaints.c (vcomplaint): Use std::string.
544
545 2017-09-29  Tom Tromey  <tom@tromey.com>
546
547         * tracepoint.c (trace_variable_command): Use std::string.
548         (encode_actions_1): Remove unused declarations.
549         (create_tsv_from_upload): Use std::string.
550
551 2017-09-29  Tom Tromey  <tom@tromey.com>
552
553         * cp-support.c (gdb_demangle): Use std::string.
554
555 2017-09-29  Tom Tromey  <tom@tromey.com>
556
557         * stack.c (parse_frame_specification): Use std::string
558         (info_frame_command): Use gdb::unique_xmalloc_ptr.
559
560 2017-09-29  Tom Tromey  <tom@tromey.com>
561
562         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
563
564 2017-09-29  Tom Tromey  <tom@tromey.com>
565
566         * utils.c (vfprintf_maybe_filtered): Use std::string.
567         (vfprintf_unfiltered): Likewise.
568
569 2017-09-29  Tom Tromey  <tom@tromey.com>
570
571         * event-top.c (top_level_prompt): Return std::string.
572         (display_gdb_prompt): Update.
573
574 2017-09-29  Tom Tromey  <tom@tromey.com>
575
576         * unittests/common-utils-selftests.c (format): New function.
577         (string_vprintf_tests): New function.
578         (_initialize_common_utils_selftests): Register new tests.
579         * common/common-utils.c (string_vprintf): New function.
580         * common/common-utils.h (string_vprintf): Declare.
581
582 2017-09-29  Pedro Alves  <palves@redhat.com>
583
584         * common/rsp-low.c (unpack_varlen_hex): Constify.
585         * common/rsp-low.h (unpack_varlen_hex): Constify.
586         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
587         Constify.
588         * remote.c (remote_set_permissions, read_ptid)
589         (remote_current_thread, remote_get_threads_with_qthreadinfo)
590         (remote_static_tracepoint_marker_at)
591         (remote_static_tracepoint_markers_by_strid)
592         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
593         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
594         (parse_tracepoint_definition, parse_tsv_definition)
595         (parse_static_tracepoint_marker_definition): Constify.
596         * tracepoint.h (parse_static_tracepoint_marker_definition)
597         (parse_trace_status, parse_tracepoint_status)
598         (parse_tracepoint_definition, parse_tsv_definition): Constify.
599
600 2017-09-29  Pedro Alves  <palves@redhat.com>
601
602         * remote.c (target_buf, target_buf_size): Delete.
603         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
604         Use the connection's packet buffer instead.
605         All callers adjusted.
606         (_initialize_remote): Remove references to target_buf and
607         target_buf_size.
608
609 2017-09-28  Pedro Alves  <palves@redhat.com>
610
611         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
612         unittests/common-utils-selftests.c.
613         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
614         (COMMON_OBS): Remove utils-selftests.o.
615         * utils-selftests.c: Move to ...
616         * unittests/common-utils-selftests.c: ... here and rename self
617         test to "string_printf".
618
619 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
620
621         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
622         having NULL cus or tus.
623
624 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
625
626         * arm-tdep.c: (convert_from_extended): Remove.
627         (convert_to_extended): Likewise.
628         (arm_extract_return_value): Use convert_typed_floating.
629         (arm_store_return_value): Likewise.
630
631         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
632         * sh-tdep.c: Do not include "floatformat.h".
633         (sh_littlebyte_bigword_type): New function.
634         (sh_register_convert_to_virtual): Use convert_typed_floating.
635         (sh_register_convert_to_raw): Likewise.
636         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
637         (sh64_littlebyte_bigword_type): New function.
638         (sh64_extract_return_value): Use convert_typed_floating.
639         (sh64_register_convert_to_virtual): Likewise.
640         (sh64_register_convert_to_raw): Likewise.
641
642 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
643
644         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
645         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
646
647         * gdbtypes.h (union type_specific): Make field floatformat hold
648         just a single struct floatformat, not an array.
649         (floatformat_from_type): Move here.
650         * gdbtypes.c (floatformat_from_type): Move here.  Update to
651         changed TYPE_FLOATFORMAT definition.
652         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
653         (recursive_dump_type): Likewise.
654         (init_float_type): Install correct floatformat for byte order.
655         (arch_float_type): Likewise.
656
657 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
658
659         * gdbtypes.c (init_type): Change incoming argument from
660         length-in-bytes to length-in-bits.  Assert length is a
661         multiple of TARGET_CHAR_BITS.
662         (arch_type, arch_flags_type): Likewise.
663         (init_integer_type): Update call to init_type.
664         (init_character_type): Likewise.
665         (init_boolean_type): Likewise.
666         (init_float_type): Likewise.
667         (init_decfloat_type): Likewise.
668         (init_complex_type): Likewise.
669         (init_pointer_type): Likewise.
670         (objfile_type): Likewise.
671         (arch_integer_type): Update call to arch_type.
672         (arch_character_type): Likewise.
673         (arch_boolean_type): Likewise.
674         (arch_float_type): Likewise.
675         (arch_decfloat_type): Likewise.
676         (arch_complex_type): Likewise.
677         (arch_pointer_type): Likewise.
678         (gdbtypes_post_init): Likewise.
679
680         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
681         (read_base_type): Likewise.
682         * mdebugread.c (basic_type): Likewise.
683         * stabsread.c (dbx_init_float_type): Likewise.
684         (rs6000_builtin_type): Likewise.
685         (read_range_type): Likewise.  Also, fix call to init_integer_type
686         with erroneous length argument.
687
688         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
689         * d-lang.c (build_d_types): Likewise.
690         * f-lang.c (build_fortran_types): Likewise.
691         * go-lang.c (build_go_types): Likewise.
692         * opencl-lang.c (build_opencl_types): Likewise.
693         * jit.c (finalize_symtab): Likewise.
694         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
695         (build_std_type_info_type): Likewise.
696         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
697         update call to arch_flags_type.
698
699         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
700         arch_type.
701         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
702         * windows-tdep.c (windows_get_tlb_type): Likewise.
703
704         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
705         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
706         * m32c-tdep.c (make_types): Likewise.
707         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
708         (rl78_psw_type): Update call to arch_flags_type.
709         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
710         * rx-tdep.c (rx_psw_type): Likewise.
711         (rx_fpsw_type): Likewise.
712         * sparc-tdep.c (sparc_psr_type): Likewise.
713         (sparc_fsr_type): Likewise.
714         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
715         (sparc64_ccr_type): Likewise.
716         (sparc64_fsr_type): Likewise.
717         (sparc64_fprs_type): Likewise.
718
719 2017-09-27  Tom Tromey  <tom@tromey.com>
720
721         * findcmd.c (find_command): Constify.
722
723 2017-09-27  Tom Tromey  <tom@tromey.com>
724
725         * ada-tasks.c (task_command_1, task_command): Constify.
726
727 2017-09-27  Tom Tromey  <tom@tromey.com>
728
729         * symtab.c (maintenance_print_symbol_cache)
730         (maintenance_flush_symbol_cache)
731         (maintenance_print_symbol_cache_statistics): Constify.
732
733 2017-09-27  Tom Tromey  <tom@tromey.com>
734
735         * inferior.c (detach_inferior_command, kill_inferior_command)
736         (inferior_command): Constify.
737
738 2017-09-27  Tom Tromey  <tom@tromey.com>
739
740         * regcache.c (regcache_print, maintenance_print_registers)
741         (maintenance_print_raw_registers)
742         (maintenance_print_cooked_registers)
743         (maintenance_print_register_groups)
744         (maintenance_print_remote_registers): Constify.
745
746 2017-09-27  Tom Tromey  <tom@tromey.com>
747
748         * printcmd.c (map_display_numbers, undisplay_command)
749         (enable_disable_display_command, enable_display_command)
750         (disable_display_command): Constify.
751
752 2017-09-27  Tom Tromey  <tom@tromey.com>
753
754         * breakpoint.h (delete_command): Don't declare.
755         * breakpoint.c (delete_command, enable_once_command)
756         (enable_count_command, enable_delete_command, breakpoint_1)
757         (maintenance_info_breakpoints, stopin_command, stopat_command)
758         (delete_command, delete_trace_command, save_breakpoints)
759         (save_breakpoints_command, save_tracepoints_command): Constify.
760
761 2017-09-27  Tom Tromey  <tom@tromey.com>
762
763         * macrocmd.c (macro_expand_command, macro_expand_once_command)
764         (skip_ws, extract_identifier, macro_define_command)
765         (macro_undef_command, macro_list_command): Constify.
766
767 2017-09-27  Tom Tromey  <tom@tromey.com>
768
769         * infcmd.c (environment_info, set_environment_command)
770         (unset_environment_command, path_info, info_proc_cmd_1)
771         (info_proc_cmd_mappings, info_proc_cmd_stat)
772         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
773         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
774
775 2017-09-27  Tom Tromey  <tom@tromey.com>
776
777         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
778         Constify.
779
780 2017-09-27  Tom Tromey  <tom@tromey.com>
781
782         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
783
784 2017-09-27  Tom Tromey  <tom@tromey.com>
785
786         * demangle.c (demangle_command): Constify.
787
788 2017-09-27  Tom Tromey  <tom@tromey.com>
789
790         * progspace.c (maintenance_info_program_spaces_command):
791         Constify.
792
793 2017-09-27  Tom Tromey  <tom@tromey.com>
794
795         * compile/compile.c (check_raw_argument, compile_file_command)
796         (compile_code_command, compile_print_command): Constify.
797
798 2017-09-27  Tom Tromey  <tom@tromey.com>
799
800         * reggroups.c (maintenance_print_reggroups): Constify.
801
802 2017-09-27  Tom Tromey  <tom@tromey.com>
803
804         * dwarf2read.c (save_gdb_index_command): Constify.
805
806 2017-09-27  Tom Tromey  <tom@tromey.com>
807
808         * stap-probe.c (info_probes_stap_command): Constify.
809
810 2017-09-27  Tom Tromey  <tom@tromey.com>
811
812         * fork-child.c (unset_exec_wrapper_command): Constify.
813
814 2017-09-27  Tom Tromey  <tom@tromey.com>
815
816         * btrace.c (get_uint, get_context_size, no_chunk)
817         (maint_btrace_packet_history_cmd)
818         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
819         (maint_info_btrace_cmd): Constify.
820
821 2017-09-27  Tom Tromey  <tom@tromey.com>
822
823         * reverse.c (delete_bookmark_command): Constify.
824
825 2017-09-27  Tom Tromey  <tom@tromey.com>
826
827         * remote.c (set_memory_packet_size)
828         (set_memory_write_packet_size, show_memory_write_packet_size)
829         (set_memory_read_packet_size, show_memory_read_packet_size)
830         (compare_sections_command, packet_command, remote_put_command)
831         (remote_get_command, remote_delete_command): Constify.
832
833 2017-09-27  Tom Tromey  <tom@tromey.com>
834
835         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
836         (set_mipsfpu_double_command, set_mipsfpu_none_command)
837         (set_mipsfpu_auto_command): Constify.
838
839 2017-09-27  Tom Tromey  <tom@tromey.com>
840
841         * cli/cli-cmds.h (cd_command): Constify.
842         * cli/cli-cmds.c (cd_command): Constify.
843
844 2017-09-27  Tom Tromey  <tom@tromey.com>
845
846         * thread.c (thread_name_command, thread_find_command): Constify.
847
848 2017-09-27  Tom Tromey  <tom@tromey.com>
849
850         * probe.c (enable_probes_command, disable_probes_command):
851         Constify.
852
853 2017-09-27  Tom Tromey  <tom@tromey.com>
854
855         * symfile.c (symbol_file_command): Constify.
856         * gdbcore.h (deprecated_file_changed_hook): Constify.
857         * exec.c (deprecated_file_changed_hook, exec_file_command)
858         (file_command): Constify.
859         * defs.h (symbol_file_command): Constify.
860
861 2017-09-27  Tom Tromey  <tom@tromey.com>
862
863         * remote-fileio.c (set_system_call_allowed)
864         (show_system_call_allowed): Constify.
865
866 2017-09-27  Tom Tromey  <tom@tromey.com>
867
868         * tracepoint.c (delete_trace_variable_command)
869         (tfind_end_command, tfind_start_command, tfind_pc_command)
870         (tfind_tracepoint_command, tfind_line_command)
871         (tfind_range_command, tfind_outside_command): Constify.
872
873 2017-09-27  Tom Tromey  <tom@tromey.com>
874
875         * ax-gdb.c (maint_agent_printf_command, agent_command)
876         (agent_eval_command): Constify.
877
878 2017-09-27  Tom Tromey  <tom@tromey.com>
879
880         * tracepoint.c (info_scope_command): Constify.
881         * python/python.c (gdbpy_decode_line): Constify.
882         * python/py-breakpoint.c (bppy_init): Constify.
883         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
884         * location.h: (new_linespec_location)
885         (string_to_event_location_basic, string_to_event_location):
886         Constify.
887         * location.c (new_linespec_location)
888         (string_to_event_location_basic, string_to_event_location):
889         Constify.
890         * linespec.h (decode_line_with_current_source)
891         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
892         * linespec.c (linespec_lex_to_end)
893         (decode_line_with_current_source)
894         (decode_line_with_last_displayed): Constify.
895         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
896         Constify.
897         * cli/cli-cmds.c (edit_command, list_command): Constify.
898         * breakpoint.h (until_break_command, watch_command_wrapper)
899         (awatch_command_wrapper, rwatch_command_wrapper)
900         (init_ada_exception_breakpoint): Constify.
901         * breakpoint.c (break_command_1, dprintf_command)
902         (break_range_command, watch_command_wrapper)
903         (rwatch_command_wrapper, awatch_command_wrapper)
904         (until_break_command, init_ada_exception_breakpoint)
905         (strace_marker_create_sals_from_location, trace_command)
906         (ftrace_command, strace_command, struct tracepoint): Constify.
907         * ax-gdb.c (agent_command_1): Constify.
908         * ada-lang.c (ada_exception_sal): Constify.
909
910 2017-09-27  Tom Tromey  <tom@tromey.com>
911
912         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
913         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
914         (get_context_size, no_chunk, get_insn_history_modifiers)
915         (cmd_record_insn_history, get_call_history_modifiers)
916         (cmd_record_call_history): Constify.
917
918 2017-09-27  Tom Tromey  <tom@tromey.com>
919
920         * source.c (show_substitute_path_command)
921         (unset_substitute_path_command, set_substitute_path_command):
922         Constify.
923
924 2017-09-27  Tom Tromey  <tom@tromey.com>
925
926         * typeprint.c (maintenance_print_type): Constify.
927         * maint.c (maintenance_dump_me, maintenance_demangle)
928         (maintenance_time_display, maintenance_info_sections)
929         (maintenance_print_statistics, maintenance_deprecate)
930         (maintenance_undeprecate): Constify.
931         (maintenance_do_deprecate): Constify.  Use std::string.
932         (maintenance_selftest): Constify.
933         * gdbtypes.h (maintenance_print_type): Constify.
934
935 2017-09-27  Tom Tromey  <tom@tromey.com>
936
937         * hppa-tdep.c (unwind_command): Constify.
938
939 2017-09-27  Tom Tromey  <tom@tromey.com>
940
941         * target-descriptions.c (unset_tdesc_filename_cmd)
942         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
943         Constify.
944
945 2017-09-27  Tom Tromey  <tom@tromey.com>
946
947         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
948
949 2017-09-27  Tom Tromey  <tom@tromey.com>
950
951         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
952
953 2017-09-27  Tom Tromey  <tom@tromey.com>
954
955         * tui/tui-regs.c (tui_reg_command): Constify.
956
957 2017-09-27  Tom Tromey  <tom@tromey.com>
958
959         * skip.c (skip_file_command, skip_function_command)
960         (skip_enable_command, skip_disable_command, skip_delete_command):
961         Constify.
962
963 2017-09-27  Tom Tromey  <tom@tromey.com>
964
965         * record-btrace.c (cmd_record_btrace_bts_start)
966         (cmd_record_btrace_pt_start): Constify.
967
968 2017-09-27  Tom Tromey  <tom@tromey.com>
969
970         * symmisc.c (maintenance_print_symbols)
971         (maintenance_print_msymbols, maintenance_print_objfiles)
972         (maintenance_info_symtabs, maintenance_check_symtabs)
973         (maintenance_expand_symtabs, maintenance_info_line_tables):
974         Constify.
975
976 2017-09-27  Tom Tromey  <tom@tromey.com>
977
978         * top.c (new_ui_command): Constify.
979
980 2017-09-27  Tom Tromey  <tom@tromey.com>
981
982         * symfile.c (add_symbol_file_command)
983         (remove_symbol_file_command, list_overlays_command)
984         (map_overlay_command, unmap_overlay_command)
985         (overlay_auto_command, overlay_manual_command)
986         (overlay_off_command, overlay_load_command): Constify.
987
988 2017-09-27  Tom Tromey  <tom@tromey.com>
989
990         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
991         (info_spu_mailbox_command, info_spu_dma_command)
992         (info_spu_proxydma_command): Constify.
993
994 2017-09-27  Tom Tromey  <tom@tromey.com>
995
996         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
997
998 2017-09-27  Tom Tromey  <tom@tromey.com>
999
1000         * cli/cli-script.c (user_defined_command): Constify.
1001
1002 2017-09-27  Tom Tromey  <tom@tromey.com>
1003
1004         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1005         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1006         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1007         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1008         (dump_binary_value, append_binary_memory, append_binary_value):
1009         Constify.
1010         (struct dump_context) <func>: Constify.
1011         (add_dump_command): Update.
1012
1013 2017-09-27  Tom Tromey  <tom@tromey.com>
1014
1015         * cli/cli-cmds.c (show_version, show_configuration)
1016         (source_command, show_user): Constify.
1017
1018 2017-09-27  Tom Tromey  <tom@tromey.com>
1019
1020         * target.c (maintenance_print_target_stack): Constify.
1021
1022 2017-09-27  Tom Tromey  <tom@tromey.com>
1023
1024         * interps.c (interpreter_exec_cmd): Constify.
1025
1026 2017-09-27  Tom Tromey  <tom@tromey.com>
1027
1028         * record-full.c (cmd_record_full_restore): Constify.
1029
1030 2017-09-27  Tom Tromey  <tom@tromey.com>
1031
1032         * memattr.c (enable_mem_command, disable_mem_command)
1033         (delete_mem_command): Constify.
1034
1035 2017-09-27  Tom Tromey  <tom@tromey.com>
1036
1037         * value.c (show_convenience): Constify.
1038
1039 2017-09-27  Tom Tromey  <tom@tromey.com>
1040
1041         * gdbcore.h (core_file_command): Update.
1042         * corefile.c (core_file_command): Constify.
1043
1044 2017-09-27  Tom Tromey  <tom@tromey.com>
1045
1046         * user-regs.c (maintenance_print_user_registers): Constify.
1047
1048 2017-09-27  Tom Tromey  <tom@tromey.com>
1049
1050         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1051
1052 2017-09-27  Tom Tromey  <tom@tromey.com>
1053
1054         * cp-support.c (first_component_command): Constify.
1055
1056 2017-09-27  Tom Tromey  <tom@tromey.com>
1057
1058         * psymtab.c (maintenance_print_psymbols)
1059         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1060         Constify.
1061
1062 2017-09-27  Tom Tromey  <tom@tromey.com>
1063
1064         * windows-tdep.c (display_tib): Constify.
1065
1066 2017-09-27  Tom Tromey  <tom@tromey.com>
1067
1068         * linux-fork.c (delete_checkpoint_command)
1069         (detach_checkpoint_command): Constify.
1070
1071 2017-09-27  Tom Tromey  <tom@tromey.com>
1072
1073         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1074
1075 2017-09-27  Tom Tromey  <tom@tromey.com>
1076
1077         * arc-tdep.c (dump_arc_instruction_command): Constify.
1078
1079 2017-09-27  Tom Tromey  <tom@tromey.com>
1080
1081         * valprint.c (set_radix, show_radix): Constify.
1082
1083 2017-09-27  Tom Tromey  <tom@tromey.com>
1084
1085         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1086
1087 2017-09-27  Tom Tromey  <tom@tromey.com>
1088
1089         * command.h (not_just_help_class_command): Update.
1090         * cli/cli-decode.h (not_just_help_class_command): Update.
1091         * cli/cli-decode.c (not_just_help_class_command): Constify.
1092
1093 2017-09-27  Tom Tromey  <tom@tromey.com>
1094
1095         * gdb_bfd.c (maintenance_info_bfds): Constify.
1096
1097 2017-09-27  Tom Tromey  <tom@tromey.com>
1098
1099         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1100         overloads.
1101         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1102         (do_const_cfunc): New function.
1103         (cmd_cfunc_eq): New overload.
1104         (cli_user_command_p): Check do_const_cfunc.
1105         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1106         const_cfunc.
1107         * command.h (add_cmd): Add const overload and no-function
1108         overload.
1109         (set_cmd_cfunc): Add const overload.
1110         (cmd_const_cfunc_ftype): Declare.
1111         (cmd_cfunc_eq): Add const overload.
1112         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1113         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1114         overload.
1115
1116 2017-09-27  Tom Tromey  <tom@tromey.com>
1117
1118         * macroexp.c (get_next_token_for_substitution): New function.
1119         (substitute_args): Call it.  Check for __VA_OPT__.
1120
1121 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1122             Pedro Alves <palves@redhat.com>
1123
1124         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1125         producer_is_icc_lt_14.
1126         (producer_is_icc_lt_14): New function.
1127         (check_producer): Add code for checking version of ICC.
1128         (producer_is_icc): Move to producer.c.
1129         (read_structure_type): Restrict ICC workaround to ICC<14.
1130         * producer.c: Include selftest.h.
1131         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1132         New functions.
1133         * producer.h (producer_is_icc): New declaration.
1134
1135 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1136
1137         * Makefile.in (SFILES): Add producer.c.
1138         (COMMON_OBS): Add producer.o
1139         * amd64-tdep.c (producer.h): Add new include.
1140         * dwarf2read.c (producer.h): Add new include.
1141         * producer.c: New file.
1142         * producer.h: New file.
1143         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1144         producer.c.
1145         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1146         producer.h.
1147
1148 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1149
1150         * configure.ac: Search ncursesw before ncurses.
1151         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1152         * gdb_curses.h: Include <ncursesw/ncurses.h>
1153         * config.in, configure: Regenerate.
1154
1155 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1156
1157         PR gdb/22185
1158         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1159         obsolete.
1160         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1161         Remove i386sol2 support.
1162         * configure.nat <i386sol2>: Remove.
1163         <sol2-64>: Fold into ...
1164         <sol2>: ... this.
1165         Move common settings to default section.
1166         Add sol-thread.o.
1167         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1168         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1169         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1170         <i[34567]86-*-solaris*>: Remove.
1171         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1172
1173         * configure.ac: Remove wctype in libw check.
1174         (_MSE_INT_H): Don't define on Solaris 7-9.
1175         <solaris*>: Remove libthread_db.so.1 check.
1176         * configure: Regenerate.
1177         * config.in: Regenerate.
1178
1179         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1180         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1181         (gdb_ps_size_t): Remove.
1182         Use base types in users.
1183         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1184
1185         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1186
1187 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1188
1189         PR build/22206
1190         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1191         (adi_is_addr_mapped): Likewise.
1192         (PSR_ICC): Don't redefine.
1193         (PSR_IMPL): Likewise.
1194
1195 2017-09-25  Tom Tromey  <tom@tromey.com>
1196
1197         * regcache.c (regcache::dump): Use string_printf.
1198
1199 2017-09-25  Tom Tromey  <tom@tromey.com>
1200
1201         * regcache.c (class regcache_invalidator): New.
1202         (struct register_to_invalidate): Remove.
1203         (make_cleanup_regcache_invalidate): Remove.
1204         (regcache::raw_write): Use regcache_invalidator.
1205
1206 2017-09-25  Tom Tromey  <tom@tromey.com>
1207
1208         * spu-tdep.c (spu2ppu_sniffer): Update.
1209         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1210         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1211         Remove.
1212         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1213         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1214         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1215         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1216         (frame_pop): Update.
1217
1218 2017-09-25  Tom Tromey  <tom@tromey.com>
1219
1220         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1221         * regcache.h (regcache_xfree): Don't declare.
1222         * regcache.c (regcache_xfree): Remove.
1223         (do_regcache_xfree): Use delete.
1224         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1225         * linux-fork.c (free_fork): Use delete.
1226         (fork_save_infrun_state): Likewise.
1227         * jit.c (jit_dealloc_cache): Use delete.
1228         * infrun.c (discard_infcall_suspend_state): Use delete.
1229
1230 2017-09-25  Tom Tromey  <tom@tromey.com>
1231
1232         * regcache.h (regcache_xmalloc): Don't declare.
1233         (regcache_raw_set_cached_value): Update comment.
1234         * regcache.c (regcache_xmalloc): Remove.
1235         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1236         * jit.c (jit_frame_sniffer): Use new.
1237         * frame.c (frame_save_as_regcache): Use new.
1238
1239 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1240
1241         * NEWS: Advertise support for guarded-storage registers on IBM z.
1242
1243 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1244
1245         * s390-linux-nat.c (have_regset_gs): New static variable.
1246         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1247         control block and guarded-storage broadcast control regsets.
1248         (s390_read_description): Detect whether the target has
1249         guarded-storage support, return appropriate tdesc.
1250         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1251         (features/s390x-gs-linux64.c): Likewise.
1252         (struct gdbarch_tdep) <have_gs>: New field.
1253         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1254         (s390_gsbc_regset): New variables.
1255         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1256         and s390_gsbc_regset, if applicable.
1257         (s390_core_read_description): Check whether core file was from a
1258         target with guarded-storage support; include appropriate regsets.
1259         (s390_gdbarch_init): Add registers for guarded-storage support.
1260         (_initialize_s390_tdep): Initialize new target descriptions that
1261         include registers for guarded-storage support.
1262         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1263         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1264         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1265         (S390_NUM_REGS): Adjust macro definition.
1266         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1267         (tdesc_s390x_gs_linux64): New declarations.
1268
1269 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1270
1271         * features/s390-gs-linux64.xml: New file.
1272         * features/s390-gs.xml: New file.
1273         * features/s390-gsbc.xml: New file.
1274         * features/s390x-gs-linux64.xml: New file.
1275         * features/Makefile (WHICH): Add s390-gs-linux64 and
1276         s390x-gs-linux64.
1277         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1278         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1279         * features/s390-gs-linux64.c: New generated file.
1280         * features/s390x-gs-linux64.c: New file.
1281         * regformats/s390-gs-linux64.dat: New file.
1282         * regformats/s390x-gs-linux64.dat: New file.
1283
1284 2017-09-23  Tom Tromey  <tom@tromey.com>
1285
1286         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1287
1288 2017-09-22  Tom Tromey  <tom@tromey.com>
1289
1290         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1291         type to scoped_restore_tmpl.
1292         <scoped_input_handler>: Initialize m_quit_handler directly.
1293
1294 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1295
1296         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1297         (cd_command): Likewise.  Free "current_directory" before
1298         assigning to it.
1299         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1300         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1301         * top.c (gdb_dirbuf): Remove global declaration.
1302         * top.h (gdb_dirbuf): Likewise.
1303
1304 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1305
1306         * gnulib/aclocal.m4: Regenerate.
1307         * gnulib/config.in: Regenerate.
1308         * gnulib/configure: Regenerate.
1309         * gnulib/import/Makefile.am: Regenerate.
1310         * gnulib/import/Makefile.in: Regenerate.
1311         * gnulib/import/assure.h: New file.
1312         * gnulib/import/at-func.c: Likewise
1313         * gnulib/import/chdir-long.c: New file.
1314         * gnulib/import/chdir-long.h: New file.
1315         * gnulib/import/cloexec.c: New file.
1316         * gnulib/import/cloexec.h: New file.
1317         * gnulib/import/close.c: New file.
1318         * gnulib/import/closedir.c: New file.
1319         * gnulib/import/dirent-private.h: New file.
1320         * gnulib/import/dup-safer.c: New file.
1321         * gnulib/import/dup.c: New file.
1322         * gnulib/import/dup2.c: New file.
1323         * gnulib/import/error.c: New file.
1324         * gnulib/import/error.h: New file.
1325         * gnulib/import/exitfail.c: New file.
1326         * gnulib/import/exitfail.h: New file.
1327         * gnulib/import/fchdir.c: New file.
1328         * gnulib/import/fcntl.c: New file.
1329         * gnulib/import/fcntl.in.h: New file.
1330         * gnulib/import/fd-hook.c: New file.
1331         * gnulib/import/fd-hook.h: New file.
1332         * gnulib/import/fd-safer.c: New file.
1333         * gnulib/import/fdopendir.c: New file.
1334         * gnulib/import/filename.h: New file.
1335         * gnulib/import/filenamecat-lgpl.c: New file.
1336         * gnulib/import/filenamecat.h: New file.
1337         * gnulib/import/fstat.c: New file.
1338         * gnulib/import/fstatat.c: New file.
1339         * gnulib/import/getcwd-lgpl.c: New file.
1340         * gnulib/import/getcwd.c: New file.
1341         * gnulib/import/getdtablesize.c: New file.
1342         * gnulib/import/getlogin_r.c: New file.
1343         * gnulib/import/getprogname.c: New file.
1344         * gnulib/import/getprogname.h: New file.
1345         * gnulib/import/gettext.h: New file.
1346         * gnulib/import/glob-libc.h: New file.
1347         * gnulib/import/glob.c: New file.
1348         * gnulib/import/glob.in.h: New file.
1349         * gnulib/import/intprops.h: New file.
1350         * gnulib/import/m4/chdir-long.m4: New file.
1351         * gnulib/import/m4/close.m4: New file.
1352         * gnulib/import/m4/closedir.m4: New file.
1353         * gnulib/import/m4/d-ino.m4: New file.
1354         * gnulib/import/m4/d-type.m4: New file.
1355         * gnulib/import/m4/dup.m4: New file.
1356         * gnulib/import/m4/dup2.m4: New file.
1357         * gnulib/import/m4/error.m4: New file.
1358         * gnulib/import/m4/fchdir.m4: New file.
1359         * gnulib/import/m4/fcntl.m4: New file.
1360         * gnulib/import/m4/fcntl_h.m4: New file.
1361         * gnulib/import/m4/fdopendir.m4: New file.
1362         * gnulib/import/m4/filenamecat.m4: New file.
1363         * gnulib/import/m4/fstat.m4: New file.
1364         * gnulib/import/m4/fstatat.m4: New file.
1365         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1366         * gnulib/import/m4/getcwd-path-max.m4: New file.
1367         * gnulib/import/m4/getcwd.m4: New file.
1368         * gnulib/import/m4/getdtablesize.m4: New file.
1369         * gnulib/import/m4/getlogin_r.m4: New file.
1370         * gnulib/import/m4/getprogname.m4: New file.
1371         * gnulib/import/m4/glob.m4: New file.
1372         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1373         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1374         * gnulib/import/m4/mempcpy.m4: New file.
1375         * gnulib/import/m4/memrchr.m4: New file.
1376         * gnulib/import/m4/mode_t.m4: New file.
1377         * gnulib/import/m4/msvc-inval.m4: New file.
1378         * gnulib/import/m4/msvc-nothrow.m4: New file.
1379         * gnulib/import/m4/open.m4: New file.
1380         * gnulib/import/m4/openat.m4: New file.
1381         * gnulib/import/m4/opendir.m4: New file.
1382         * gnulib/import/m4/readdir.m4: New file.
1383         * gnulib/import/m4/realloc.m4: New file.
1384         * gnulib/import/m4/rewinddir.m4: New file.
1385         * gnulib/import/m4/save-cwd.m4: New file.
1386         * gnulib/import/m4/strdup.m4: New file.
1387         * gnulib/import/m4/strerror.m4: New file.
1388         * gnulib/import/m4/unistd-safer.m4: New file.
1389         * gnulib/import/mempcpy.c: New file.
1390         * gnulib/import/memrchr.c: New file.
1391         * gnulib/import/msvc-inval.c: New file.
1392         * gnulib/import/msvc-inval.h: New file.
1393         * gnulib/import/msvc-nothrow.c: New file.
1394         * gnulib/import/msvc-nothrow.h: New file.
1395         * gnulib/import/open.c: New file.
1396         * gnulib/import/openat-die.c: New file.
1397         * gnulib/import/openat-priv.h: New file.
1398         * gnulib/import/openat-proc.c: New file.
1399         * gnulib/import/openat.c: New file.
1400         * gnulib/import/openat.h: New file.
1401         * gnulib/import/opendir.c: New file.
1402         * gnulib/import/pipe-safer.c: New file.
1403         * gnulib/import/readdir.c: New file.
1404         * gnulib/import/realloc.c: New file.
1405         * gnulib/import/rewinddir.c: New file.
1406         * gnulib/import/save-cwd.c: New file.
1407         * gnulib/import/save-cwd.h: New file.
1408         * gnulib/import/strdup.c: New file.
1409         * gnulib/import/strerror-override.c: New file.
1410         * gnulib/import/strerror-override.h: New file.
1411         * gnulib/import/strerror.c: New file.
1412         * gnulib/import/unistd--.h: New file.
1413         * gnulib/import/unistd-safer.h: New file.
1414         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1415         "getcwd" and "glob".
1416         * ser-tcp.c: Undefine "close" before redefining it.
1417
1418 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1419
1420         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1421         get rid of res_val.
1422
1423 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1424
1425         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1426         <sol2,sparc>: Likewise.
1427         <sol2-64,i386>: Likewise.
1428
1429         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1430         -Wdeprecated-declarations on *-*-solaris*.
1431         * configure: Regenerate.
1432
1433         * procfs.c: Include "nat/inferior.h".
1434         (procfs_info_proc): Fix typo.
1435
1436 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1437
1438         * remote.c (vector): Include.
1439         (struct private_thread_info): Add field, thread_handle.
1440         (free_private_thread_info): Deallocate storage associated with
1441         thread handle.
1442         (get_private_info_thread): Initialize `thread_handle' field.
1443         (struct thread_item): Add field, thread_handle.
1444         (clear_threads_listing_context): Deallocate storage associated
1445         with thread handle.
1446         (start_thread): Add support for "handle" attribute.
1447         (thread_attributes): Add "handle".
1448         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1449         field.
1450         (remote_update_thread_list): Update thread_handle.
1451         (remote_thread_handle_to_thread_info): New function.
1452         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1453
1454 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1455
1456         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1457         function.
1458         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1459         * python/python-internal.h (thread_object_type): Declare.
1460
1461 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1462
1463         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1464         (target_thread_handle_to_thread_info): Declare.
1465         * target.c (target_thread_handle_to_thread_info): New function.
1466         * target-delegates.c: Regenerate.
1467         * gdbthread.h (find_thread_by_handle): Declare.
1468         * thread.c (find_thread_by_handle): New function.
1469         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1470         function.
1471         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1472
1473 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1474
1475         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1476
1477 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1478
1479         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1480
1481 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1482
1483         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1484         to gdb_target_obs.
1485
1486 2017-09-20  Tom Tromey  <tom@tromey.com>
1487
1488         * breakpoint.c (struct counted_command_line): Remove.
1489         (breakpoint_commands): Update.
1490         (alloc_counted_command_line, incref_counted_command_line)
1491         (decref_counted_command_line, do_cleanup_counted_command_line)
1492         (make_cleanup_decref_counted_command_line): Remove.
1493         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1494         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1495         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1496         (save_breakpoints): Update.
1497         * breakpoint.h (counted_command_line): Now a typedef to
1498         shared_ptr.
1499         (struct breakpoint) <commands>: Now a counted_command_line.
1500         (struct bpstats) <command>: Likewise.
1501
1502 2017-09-20  Tom Tromey  <tom@tromey.com>
1503
1504         * breakpoint.c (struct commands_info, do_map_commands_command):
1505         Remove.
1506         (commands_command_1): Update.
1507         (iterate_over_related_breakpoints): Take a function_view.
1508         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1509         (delete_command): Update.
1510         (map_breakpoint_numbers): Take a function_view.
1511         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1512         (disable_command): Update.
1513         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1514         (enable_command): Update.
1515         (struct disp_data, do_enable_breakpoint_disp)
1516         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1517         (do_map_enable_delete_breakpoint): Remove.
1518         (enable_once_command, enable_count_command, enable_delete_command)
1519         (delete_trace_variable_command): Update.
1520
1521 2017-09-20  Tom Tromey  <tom@tromey.com>
1522
1523         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1524         (bpstat_clear): Use delete.
1525         (bpstats): New constructors.
1526         (bpstat_copy, bpstat_stop_status): Use new.
1527         (dprintf_after_condition_true): Update.
1528         * breakpoint.h (bpstats::bpstats): Add constructors.
1529         (bpstats::~bpstats): Add destructor.
1530
1531 2017-09-20  Pedro Alves  <palves@redhat.com>
1532
1533         * eval.c (make_params): Delete, refactored as ...
1534         (class fake_method): ... this new type's ctor.
1535         (fake_method::~fake_method): New.
1536         (evaluate_subexp_standard): Use 'fake_method'.
1537
1538 2017-09-20  Tom Tromey  <tom@tromey.com>
1539
1540         * windows-nat.c (get_windows_debug_event, windows_wait)
1541         (do_initial_windows_stuff, windows_attach): Update.
1542         * utils.c (vwarning, internal_vproblem): Update.
1543         (ui_unregister_input_event_handler_cleanup)
1544         (prepare_to_handle_input): Remove.
1545         (class scoped_input_handler): New.
1546         (defaulted_query, prompt_for_continue): Update.
1547         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1548         Update.
1549         * top.c (undo_terminal_modifications_before_exit): Update.
1550         * target/target.h (target_terminal_init, target_terminal_inferior)
1551         (target_terminal_ours): Don't declare.
1552         (class target_terminal): New.
1553         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1554         (target_terminal_ours_for_output)
1555         (make_cleanup_restore_target_terminal): Don't declare.
1556         (target_terminal_info): Remove.
1557         * target.c (enum terminal_state, terminal_state): Remove.
1558         (target_terminal::terminal_state): Define.
1559         (target_terminal::init): Rename from target_terminal_init.
1560         (target_terminal::inferior): Rename from
1561         target_terminal_inferior.
1562         (target_terminal::ours): Rename from target_terminal_ours.
1563         (target_terminal::ours_for_output): Rename from
1564         target_terminal_ours_for_output.
1565         (target_terminal::info): New method.
1566         (cleanup_restore_target_terminal)
1567         (make_cleanup_restore_target_terminal): Remove.
1568         * solib.c (handle_solib_event): Update.
1569         * remote.c (remote_serial_quit_handler): Update.
1570         (remote_terminal_inferior, remote_wait_as): Update.
1571         * record-full.c (record_full_wait_1): Update.
1572         * nto-procfs.c (procfs_create_inferior): Update.
1573         * nat/fork-inferior.c (startup_inferior): Update.
1574         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1575         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1576         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1577         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1578         (mi_breakpoint_created, mi_breakpoint_deleted)
1579         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1580         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1581         (mi_user_selected_context_changed, report_initial_inferior):
1582         Update.
1583         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1584         (linux_nat_terminal_inferior): Update.
1585         * infrun.c (follow_fork_inferior)
1586         (handle_vfork_child_exec_or_exit, do_target_resume)
1587         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1588         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1589         Update.
1590         * inflow.c (child_terminal_init, info_terminal_command): Update.
1591         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1592         (attach_command): Update.
1593         * infcall.c (call_thread_fsm_should_stop): Update.
1594         * gnu-nat.c (gnu_attach): Update.
1595         * extension.c (struct active_ext_lang_state)
1596         (restore_active_ext_lang): Update.
1597         * exceptions.c (print_flush): Update.
1598         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1599         (struct quit_handler_cleanup_data, restore_quit_handler)
1600         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1601         Remove.
1602         * cp-support.c (gdb_demangle): Update.
1603         * breakpoint.c (update_inserted_breakpoint_locations)
1604         (insert_breakpoint_locations, handle_jit_event)
1605         (disable_breakpoints_in_unloaded_shlib): Update.
1606         * annotate.c (annotate_breakpoints_invalid)
1607         (annotate_frames_invalid): Update.
1608
1609 2017-09-20  Tom Tromey  <tom@tromey.com>
1610
1611         * main.c (catch_command_errors): Rename from
1612         catch_command_errors_const.
1613         (captured_main_1): Update.
1614
1615 2017-09-20  Pedro Alves  <palves@redhat.com>
1616
1617         * cli/cli-cmds.c (list_command): Use print_sal_location.
1618         (print_sal_location): New function.
1619         (ambiguous_line_spec): Use print_sal_location.
1620         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1621         * symtab.c (find_function_start_sal): Likewise.
1622         * symtab.h (symtab_and_line::symbol): New field.
1623
1624 2017-09-20  Pedro Alves  <palves@redhat.com>
1625
1626         * linespec.c (minsym_found): Handle non-text minsyms.
1627         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1628
1629 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1630
1631         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1632         backslash.
1633
1634 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1635
1636         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1637         vmovups instead vmovaps.
1638         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1639
1640 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1641
1642         * NEWS (Changes since GDB 8.0): Add starti.
1643         * infcmd.c (enum run_break): New.
1644         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1645         case.
1646         (run_command): Use enum run_how.
1647         (start_command): Likewise.
1648         (starti_command): New function.
1649         (RUN_ARGS_HELP): New macro.
1650         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1651         commands.  Add starti command.
1652
1653 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1654
1655         * Makefile.in (monitor.o): Remove the rule.
1656
1657 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1658
1659         * annotate.h (struct annotate_arg_emitter): Use
1660         DISABLE_COPY_AND_ASSIGN.
1661         * common/refcounted-object.h (refcounted_object): Likewise.
1662         * completer.h (struct completion_result): Likewise.
1663         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1664         * filename-seen-cache.h (filename_seen_cache): Likewise.
1665         * gdbcore.h (thread_section_name): Likewise.
1666         * gdb_regex.h (compiled_regex): Likewise.
1667         * gdbthread.h (scoped_restore_current_thread): Likewise.
1668         * inferior.h (scoped_restore_current_inferior): Likewise.
1669         * jit.c (jit_reader): Likewise.
1670         * linespec.h (struct linespec_result): Likewise.
1671         * mi/mi-parse.h (struct mi_parse): Likewise.
1672         * nat/fork-inferior.c (execv_argv): Likewise.
1673         * progspace.h (scoped_restore_current_program_space): Likewise.
1674         * python/python-internal.h (class gdbpy_enter): Likewise.
1675         * regcache.h (regcache): Likewise.
1676         * target-descriptions.c (struct tdesc_reg): Likewise.
1677         (struct tdesc_type): Likewise.
1678         (struct tdesc_feature): Likewise.
1679         * ui-out.h (ui_out_emit_type): Likewise.
1680
1681 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1682
1683         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1684         label abort_expression.
1685
1686 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1687
1688         * common/buffer.c (buffer_xml_printf): Adjust.
1689         * common/xml-utils.c (xml_escape_text): Change return type to
1690         std::string, update code accordingly.
1691         * common/xml-utils.h (xml_escape_text): Change return type to
1692         std::string.
1693         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1694         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1695         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1696         Adjust.
1697
1698 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1699
1700         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1701         (SUBDIR_UNITTESTS_OBS): Add new object file.
1702         * unittests/xml-utils-selftests.c: New file.
1703
1704 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1705
1706         * common/selftest.h (selftest): New struct/interface.
1707         (register_test): Add name parameter, add new overload.
1708         (run_tests): Add filter parameter.
1709         (for_each_selftest_ftype): New typedef.
1710         (for_each_selftest): New declaration.
1711         * common/selftest.c (tests): Change type to
1712         map<string, unique_ptr<selftest>>.
1713         (simple_selftest): New struct.
1714         (register_test): New function.
1715         (register_test): Add name parameter and use it.
1716         (run_tests): Add filter parameter and use it.  Add prints.
1717         Adjust to vector -> map change.
1718         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1719         registering selftests.
1720         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1721         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1722         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1723         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1724         * findvar.c (_initialize_findvar): Likewise.
1725         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1726         * maint.c (maintenance_selftest): Update call to run_tests.
1727         (maintenance_info_selftests): New function.
1728         (_initialize_maint_cmds): Register "maintenance info selftests"
1729         command.  Update "maintenance selftest" doc.
1730         * regcache.c (_initialize_regcache): Add names when registering
1731         selftests.
1732         * rust-exp.y (_initialize_rust_exp): Likewise.
1733         * selftest-arch.c (gdbarch_selftest): New struct.
1734         (gdbarch_tests): Remove.
1735         (register_test_foreach_arch): Add name parameter.  Call
1736         register_test.
1737         (tests_with_arch): Remove, move most content to
1738         gdbarch_selftest::operator().
1739         (_initialize_selftests_foreach_arch): Remove.
1740         * selftest-arch.h (register_test_foreach_arch): Add name
1741         parameter.
1742         (run_tests_with_arch): New declaration.
1743         * utils-selftests.c (_initialize_utils_selftests): Add names
1744         when registering selftests.
1745         * utils.c (_initialize_utils): Likewise.
1746         * unittests/array-view-selftests.c
1747         (_initialize_array_view_selftests): Likewise.
1748         * unittests/environ-selftests.c (_initialize_environ_selftests):
1749         Likewise.
1750         * unittests/function-view-selftests.c
1751         (_initialize_function_view_selftests): Likewise.
1752         * unittests/offset-type-selftests.c
1753         (_initialize_offset_type_selftests): Likewise.
1754         * unittests/optional-selftests.c
1755         (_initialize_optional_selftests): Likewise.
1756         * unittests/scoped_restore-selftests.c
1757         (_initialize_scoped_restore_selftests): Likewise.
1758         * NEWS: Document "maintenance selftest" and "maint info
1759         selftests".
1760
1761 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1762
1763         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1764         scoped_restore.
1765
1766 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1767
1768         * mi/mi-main.c (mi_load_progress): Make uiout variable
1769         a unique_ptr.
1770
1771 2017-09-15  Pedro Alves  <palves@redhat.com>
1772
1773         * compile/compile-c-types.c (convert_enum, convert_int)
1774         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1775
1776 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1777
1778         * dwarf2read.c (copy_string): Remove.
1779         (parse_macro_definition): Replace copy_string with savestring.
1780
1781 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1782
1783         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1784         gdb_target_obs.
1785         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1786         Likewise.
1787         (i[34567]86-*-linux*): Likewise.
1788
1789 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1790
1791         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1792         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1793         <stack>: Change type to std::vector.
1794         <stack_len, stack_allocated>: Remove.
1795         <grow_stack>: Remove.
1796         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1797         (dwarf_expr_context::~dwarf_expr_context): Remove.
1798         (dwarf_expr_context::grow_stack): Remove.
1799         (dwarf_expr_context::push): Adjust.
1800         (dwarf_expr_context::pop): Adjust.
1801         (dwarf_expr_context::fetch): Adjust.
1802         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1803         (dwarf_expr_context::stack_empty_p): Adjust.
1804         (dwarf_expr_context::execute_stack_op): Adjust.
1805
1806 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1807
1808         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1809         return type to bool.
1810         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1811
1812 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1813
1814         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1815         Change type to bool.
1816         (dwarf_stack_value) <in_stack_memory>: Likewise.
1817         (dwarf_expr_context) <push_address>: Change parameter type to
1818         bool.
1819         <fetch_in_stack_memory>: Change return type to bool.
1820         <push>: Change parameter type to bool.
1821         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1822         to bool.
1823         (dwarf_expr_context::push_address): Likewise.
1824         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1825         to bool.
1826         (dwarf_expr_context::execute_stack_op): Adjust.
1827         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1828
1829 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1830
1831         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1832         (struct dwarf_expr_context) <n_pieces>: Remove.
1833         <pieces>: Change type to std::vector.
1834         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1835         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1836         pieces.
1837         (dwarf_expr_context::add_piece): Adjust.
1838         * dwarf2loc.c (struct piece_closure): Initialize fields.
1839         <n_pieces>: Remove.
1840         <pieces>: Change type to std::vector.
1841         (allocate_piece_closure): Adjust, change parameter to
1842         std::vector rvalue and std::move it to piece_closure.
1843         (rw_pieced_value): Adjust.
1844         (check_pieced_synthetic_pointer): Adjust.
1845         (indirect_synthetic_pointer): Adjust.
1846         (coerce_pieced_ref): Adjust.
1847         (free_pieced_value_closure):  Adjust.  Use delete to free
1848         piece_closure.
1849         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
1850         to allocate_piece_closure.
1851         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1852
1853 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1854
1855         * probe.h (probe_ops_cp): Remove typedef.
1856         (DEF_VEC_P (probe_ops_cp)): Remove.
1857         (all_probe_ops): Change type to std::vector.
1858         * probe.c (info_probes_for_ops): Adjust to vector change.
1859         (probe_linespec_to_ops): Likewise.
1860         (all_probe_ops): Change type to std::vector.
1861         (_initialize_probe): Adjust to vector change.
1862         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1863         * elfread.c (elf_get_probes): Likewise.
1864         * stap-probe.c (_initialize_stap_probe): Likewise.
1865
1866 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1867
1868         * probe.h (struct bound_probe): Define constructors.
1869         * probe.c (bound_probe_s): Remove typedef.
1870         (DEF_VEC_O (bound_probe_s)): Remove VEC.
1871         (collect_probes): Change return type to std::vector, remove
1872         cleanup.
1873         (compare_probes): Return bool, change parameter type.  Change
1874         semantic to "less than".
1875         (gen_ui_out_table_header_info): Change parameter to std::vector
1876         and update.
1877         (exists_probe_with_pops): Likewise.
1878         (info_probes_for_ops): Update to std::vector change.
1879         (enable_probes_command): Likewise.
1880         (disable_probes_command): Likewise.
1881
1882 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1883
1884         * probe.h (struct probe_ops) <get_probes>: Change parameter from
1885         vec to std::vector.
1886         * probe.c (parse_probes_in_pspace): Update.
1887         (find_probes_in_objfile): Update.
1888         (find_probe_by_pc): Update.
1889         (collect_probes): Update.
1890         (probe_any_get_probes): Update.
1891         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1892         return type to reference to std::vector.
1893         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1894         std::vector and update.
1895         (dtrace_process_dof): Likewise.
1896         (dtrace_get_probes): Likewise.
1897         * elfread.c (elf_get_probes): Change return type to std::vector,
1898         store an std::vector in bfd_data.
1899         (probe_key_free): Update to std::vector.
1900         * stap-probe.c (handle_stap_probe): Change parameter to
1901         std::vector and update.
1902         (stap_get_probes): Likewise.
1903         * symfile-debug.c (debug_sym_get_probes): Change return type to
1904         std::vector and update.
1905
1906 2017-09-11  Tom Tromey  <tom@tromey.com>
1907
1908         * breakpoint.c (program_breakpoint_here_p): Update.
1909         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1910         from make_show_memory_breakpoints_cleanup.  Return a
1911         scoped_restore_tmpl<int>.
1912         (restore_show_memory_breakpoints): Remove.
1913         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1914         * mem-break.c (memory_validate_breakpoint): Update.
1915         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1916         (ia64_memory_remove_breakpoint): Update.
1917         (ia64_breakpoint_from_pc): Update.
1918         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1919         from make_show_memory_breakpoints_cleanup.
1920
1921 2017-09-11  Tom Tromey  <tom@tromey.com>
1922
1923         * d-namespace.c (d_lookup_symbol): Use std::string.
1924         (find_symbol_in_baseclass): Likewise.
1925
1926 2017-09-11  Tom Tromey  <tom@tromey.com>
1927
1928         * ctf.c (ctf_start): Use std::string.
1929
1930 2017-09-11  Tom Tromey  <tom@tromey.com>
1931
1932         * ada-lang.c (is_known_support_routine): Update.
1933         (ada_unhandled_exception_name_addr_from_raise): Update.
1934         * guile/scm-frame.c (gdbscm_frame_name): Update.
1935         * python/py-frame.c (frapy_name): Update.
1936         (frapy_function): Update.
1937         * stack.h (find_frame_funname): Update.
1938         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1939         (print_frame): Update.
1940
1941 2017-09-11  Tom Tromey  <tom@tromey.com>
1942
1943         * findcmd.c (put_bits): Take a gdb::byte_vector.
1944         (parse_find_args): Return gdb::byte_vector.  "args" now const.
1945         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
1946         cleanups.
1947         (find_command): Update.
1948
1949 2017-09-11  Tom Tromey  <tom@tromey.com>
1950
1951         * cli/cli-script.c (class scoped_restore_hook_in): New.
1952         (clear_hook_in_cleanup): Remove.
1953         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1954         scoped_restore_hook_in.
1955
1956 2017-09-11  Tom Tromey  <tom@tromey.com>
1957
1958         * cli/cli-script.c (restore_interp): Remove.
1959         (read_command_lines): Use scoped_restore_interp.
1960         * interps.c (scoped_restore_interp::set_temp): Rename from
1961         interp_set_temp.
1962         * interps.h (class scoped_restore_interp): New.
1963         (interp_set_temp): Remove.
1964
1965 2017-09-11  Tom Tromey  <tom@tromey.com>
1966
1967         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1968         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1969         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1970         scoped_restore.
1971         (mi_cmd_break_insert_1): Update.
1972         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1973         scoped_restore.
1974
1975 2017-09-11  Tom Tromey  <tom@tromey.com>
1976
1977         * demangle.c (demangle_command): Update.
1978         * breakpoint.c (disable_command): Update.
1979         (enable_command): Update.
1980         (find_location_by_number): Make "number" const.  Use
1981         get_number_trailer.
1982         * cli/cli-utils.c (extract_arg): Return std::string.
1983         * probe.c (parse_probe_linespec): Update.  Change types.
1984         (collect_probes): Take string arguments.
1985         (parse_probe_linespec): Likewise.
1986         (info_probes_for_ops): Update.
1987         (enable_probes_command): Update.
1988         (disable_probes_command): Update.
1989         * break-catch-sig.c (catch_signal_split_args): Update.
1990         * mi/mi-parse.c (mi_parse): Update.
1991
1992 2017-09-11  Tom Tromey  <tom@tromey.com>
1993
1994         * language.h (language_enum): Make argument const.
1995         * language.c (language_enum): Make argument const.
1996
1997 2017-09-11  Tom Tromey  <tom@tromey.com>
1998
1999         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2000         as function.
2001         (skip_to_space): Rename from skip_to_space_const.
2002         * common/common-utils.c (skip_to_space): New function.
2003         (skip_to_space): Rename from skip_to_space_const.
2004         * cli/cli-utils.h (get_number): Rename from get_number_const.
2005         (extract_arg): Rename from extract_arg_const.
2006         * cli/cli-utils.c (get_number): Rename from get_number_const.
2007         (extract_arg): Rename from extract_arg_const.
2008         (number_or_range_parser::get_number): Use ::get_number.
2009         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2010         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2011         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2012         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2013         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2014         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2015         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2016         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2017
2018 2017-09-11  Tom Tromey  <tom@tromey.com>
2019
2020         * python/python.c (do_start_initialization): Use
2021         py-event-types.def to initialize types.
2022         Define all object type structures.
2023         * python/python-internal.h: Don't declare event initialization
2024         functions.
2025         * python/py-threadevent.c (thread_event_object_type): Don't
2026         define.
2027         * python/py-stopevent.c (stop_event_object_type): Don't define.
2028         * python/py-signalevent.c (signal_event_object_type): Don't
2029         declare or define.
2030         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2031         (clear_objfiles_event_object_type): Don't declare or define.
2032         * python/py-infevents.c (inferior_call_pre_event_object_type)
2033         (inferior_call_post_event_object_type)
2034         (register_changed_event_object_type)
2035         (memory_changed_event_object_type): Don't declare or define.
2036         * python/py-inferior.c (new_thread_event_object_type)
2037         (new_inferior_event_object_type)
2038         (inferior_deleted_event_object_type): Don't declare or define.
2039         * python/py-exitedevent.c (exited_event_object_type): Don't
2040         declare or define.
2041         * python/py-evts.c (gdbpy_initialize_py_events): Use
2042         py-all-events.def.
2043         * python/py-events.h (thread_event_object_type): Don't declare.
2044         (events_object): Use py-all-events.def.
2045         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2046         py-event-types.def.
2047         * python/py-event-types.def: New file.
2048         * python/py-continueevent.c (create_continue_event_object): Don't
2049         declare or define.
2050         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2051         declare or define.
2052         * python/py-all-events.def: New file.
2053
2054 2017-09-11  Tom Tromey  <tom@tromey.com>
2055
2056         * python/py-threadevent.c (create_thread_event_object): Return
2057         gdbpy_ref.
2058         * python/py-stopevent.h (create_stop_event_object)
2059         (create_breakpoint_event_object, create_signal_event_object):
2060         Update.
2061         * python/py-stopevent.c (create_stop_event_object): Return
2062         gdbpy_ref.
2063         (emit_stop_event): Update.
2064         * python/py-signalevent.c (create_signal_event_object): Return
2065         gdbpy_ref.
2066         * python/py-infevents.c (create_inferior_call_event_object):
2067         Update.
2068         * python/py-event.h (create_event_object)
2069         (create_thread_event_object): Update.
2070         * python/py-event.c (create_event_object): Return gdbpy_ref.
2071         * python/py-continueevent.c: Return gdbpy_ref.
2072         * python/py-bpevent.c (create_breakpoint_event_object): Return
2073         gdbpy_ref.
2074
2075 2017-09-11  Tom Tromey  <tom@tromey.com>
2076
2077         PR python/15622:
2078         * NEWS: Add entry.
2079         * python/python.c (do_start_initialization): Initialize new event
2080         types.
2081         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2082         (gdbpy_initialize_inferior_deleted_event)
2083         (gdbpy_initialize_new_thread_event): Declare.
2084         * python/py-threadevent.c (create_thread_event_object): Add option
2085         "thread" parameter.
2086         * python/py-inferior.c (new_thread_event_object_type)
2087         (new_inferior_event_object_type)
2088         (inferior_deleted_event_object_type): Declare.
2089         (python_new_inferior, python_inferior_deleted): New functions.
2090         (add_thread_object): Emit new_thread event.
2091         (gdbpy_initialize_inferior): Attach new functions to corresponding
2092         observers.
2093         (new_thread, new_inferior, inferior_deleted): Define new event
2094         types.
2095         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2096         registries.
2097         * python/py-events.h (events_object) <new_inferior,
2098         inferior_deleted, new_thread>: New fields.
2099         * python/py-event.h (create_thread_event_breakpoint): Add optional
2100         "thread" parameter.
2101
2102 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2103
2104         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2105         check current_ui instead.
2106         (internal_vproblem): Likewise.
2107
2108 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2109
2110         * thread.c (print_thread_info_1): Remove unnecessary calls to
2111         uiout->is_mi_like_p.
2112
2113 2017-09-09  Tom Tromey  <tom@tromey.com>
2114
2115         * namespace.h (add_using_directive): Update.
2116         * namespace.c (add_using_directive): Change type of excludes to
2117         std::vector.
2118         * dwarf2read.c (read_import_statement): Use std::vector.
2119         (read_namespace): Update.
2120         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2121
2122 2017-09-09  Tom Tromey  <tom@tromey.com>
2123
2124         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2125
2126 2017-09-09  Tom Tromey  <tom@tromey.com>
2127
2128         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2129
2130 2017-09-09  Tom Tromey  <tom@tromey.com>
2131
2132         * stack.c (func_command): Use gdb::def_vector.
2133
2134 2017-09-09  Tom Tromey  <tom@tromey.com>
2135
2136         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2137         ui_out_emit_list, ui_out_emit_tuple.
2138         (mi_cmd_var_update): Likewise.
2139
2140 2017-09-09  Tom Tromey  <tom@tromey.com>
2141
2142         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2143         ui_out_redirect_pop.
2144         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2145         ui_out_redirect_pop.
2146         * utils.c (do_ui_out_redirect_pop)
2147         (make_cleanup_ui_out_redirect_pop): Remove.
2148         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2149         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2150         * ui-out.h (ui_out_redirect_pop): New class.
2151
2152 2017-09-09  Tom Tromey  <tom@tromey.com>
2153
2154         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2155         (list_available_thread_groups, mi_cmd_list_thread_groups)
2156         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2157         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2158         Likewise.
2159
2160 2017-09-09  Tom Tromey  <tom@tromey.com>
2161
2162         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2163         ui_out_emit_tuple.
2164
2165 2017-09-09  Tom Tromey  <tom@tromey.com>
2166
2167         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2168         * stack.c (print_frame): Use ui_out_emit_tuple.
2169         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2170         (info_spu_mailbox_command, info_spu_dma_command)
2171         (info_spu_proxydma_command): Likewise.
2172         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2173         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2174         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2175         ui_out_emit_tuple.
2176         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2177
2178 2017-09-09  Tom Tromey  <tom@tromey.com>
2179
2180         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2181         (class ui_out_emit_table): Update comment.
2182         * ui-out.c (do_cleanup_table_end)
2183         (make_cleanup_ui_out_table_begin_end): Remove.
2184         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2185         (info_spu_dma_cmdlist): Likewise.
2186         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2187         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2188         ui_out_emit_table.
2189
2190 2017-09-09  Tom Tromey  <tom@tromey.com>
2191
2192         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2193         ui_out_emit_list, gdb::optional.
2194
2195 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2196
2197         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2198         prototype.
2199         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2200         prototype.
2201         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2202         prototype.
2203         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2204         * ada-exp.y: Remove _initialize_ada_exp prototype.
2205         * ada-lang.c: Remove _initialize_ada_language prototype.
2206         * ada-tasks.c: Remove _initialize_tasks prototype.
2207         * addrmap.c: Remove _initialize_addrmap prototype.
2208         * agent.c: Remove _initialize_agent prototype.
2209         * aix-thread.c: Remove _initialize_aix_thread prototype.
2210         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2211         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2212         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2213         prototype.
2214         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2215         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2216         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2217         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2218         prototype.
2219         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2220         prototype.
2221         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2222         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2223         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2224         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2225         prototype.
2226         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2227         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2228         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2229         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2230         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2231         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2232         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2233         prototype.
2234         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2235         prototype.
2236         * annotate.c: Remove _initialize_annotate prototype.
2237         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2238         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2239         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2240         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2241         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2242         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2243         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2244         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2245         prototype.
2246         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2247         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2248         * auto-load.c: Remove _initialize_auto_load prototype.
2249         * auxv.c: Remove _initialize_auxv prototype.
2250         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2251         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2252         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2253         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2254         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2255         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2256         prototype.
2257         * break-catch-throw.c: Remove _initialize_break_catch_throw
2258         prototype.
2259         * breakpoint.c: Remove _initialize_breakpoint prototype.
2260         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2261         * btrace.c: Remove _initialize_btrace prototype.
2262         * charset.c: Remove _initialize_charset prototype.
2263         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2264         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2265         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2266         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2267         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2268         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2269         * coffread.c: Remove _initialize_coffread prototype.
2270         * compile/compile.c: Remove _initialize_compile prototype.
2271         * complaints.c: Remove _initialize_complaints prototype.
2272         * completer.c: Remove _initialize_completer prototype.
2273         * copying.awk: Remove _initialize_copying prototype.
2274         * copying.c: Regenerate.
2275         * core-regset.c: Remove _initialize_core_regset prototype.
2276         * corefile.c: Remove _initialize_core prototype.
2277         * corelow.c: Remove _initialize_corelow prototype.
2278         * cp-abi.c: Remove _initialize_cp_abi prototype.
2279         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2280         * cp-support.c: Remove _initialize_cp_support prototype.
2281         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2282         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2283         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2284         * ctf.c: Remove _initialize_ctf prototype.
2285         * d-lang.c: Remove _initialize_d_language prototype.
2286         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2287         prototype.
2288         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2289         * dbxread.c: Remove _initialize_dbxread prototype.
2290         * dcache.c: Remove _initialize_dcache prototype.
2291         * demangle.c: Remove _initialize_demangler prototype.
2292         * disasm-selftests.c: Remove _initialize_disasm_selftests
2293         prototype.
2294         * disasm.c: Remove _initialize_disasm prototype.
2295         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2296         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2297         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2298         prototype.
2299         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2300         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2301         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2302         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2303         * elfread.c: Remove _initialize_elfread prototype.
2304         * exec.c: Remove _initialize_exec prototype.
2305         * extension.c: Remove _initialize_extension prototype.
2306         * f-lang.c: Remove _initialize_f_language prototype.
2307         * f-valprint.c: Remove _initialize_f_valprint prototype.
2308         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2309         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2310         * filesystem.c: Remove _initialize_filesystem prototype.
2311         * findcmd.c: Remove _initialize_mem_search prototype.
2312         * fork-child.c: Remove _initialize_fork_child prototype.
2313         * frame-base.c: Remove _initialize_frame_base prototype.
2314         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2315         * frame.c: Remove _initialize_frame prototype.
2316         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2317         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2318         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2319         * gcore.c: Remove _initialize_gcore prototype.
2320         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2321         * gdbarch.c: Regenerate.
2322         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2323         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2324         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2325         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2326         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2327         * go-lang.c: Remove _initialize_go_language prototype.
2328         * go32-nat.c: Remove _initialize_go32_nat prototype.
2329         * guile/guile.c: Remove _initialize_guile prototype.
2330         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2331         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2332         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2333         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2334         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2335         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2336         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2337         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2338         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2339         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2340         prototype.
2341         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2342         prototype.
2343         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2344         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2345         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2346         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2347         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2348         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2349         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2350         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2351         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2352         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2353         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2354         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2355         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2356         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2357         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2358         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2359         prototype.
2360         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2361         prototype.
2362         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2363         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2364         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2365         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2366         * infcall.c: Remove _initialize_infcall prototype.
2367         * infcmd.c: Remove _initialize_infcmd prototype.
2368         * inferior.c: Remove _initialize_inferiors prototype.
2369         * inflow.c: Remove _initialize_inflow prototype.
2370         * infrun.c: Remove _initialize_infrun prototype.
2371         * interps.c: Remove _initialize_interpreter prototype.
2372         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2373         * jit.c: Remove _initialize_jit prototype.
2374         * language.c: Remove _initialize_language prototype.
2375         * linux-fork.c: Remove _initialize_linux_fork prototype.
2376         * linux-nat.c: Remove _initialize_linux_nat prototype.
2377         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2378         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2379         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2380         * m2-lang.c: Remove _initialize_m2_language prototype.
2381         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2382         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2383         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2384         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2385         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2386         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2387         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2388         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2389         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2390         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2391         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2392         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2393         * machoread.c: Remove _initialize_machoread prototype.
2394         * macrocmd.c: Remove _initialize_macrocmd prototype.
2395         * macroscope.c: Remove _initialize_macroscope prototype.
2396         * maint.c: Remove _initialize_maint_cmds prototype.
2397         * mdebugread.c: Remove _initialize_mdebugread prototype.
2398         * memattr.c: Remove _initialize_mem prototype.
2399         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2400         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2401         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2402         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2403         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2404         * microblaze-linux-tdep.c: Remove
2405         _initialize_microblaze_linux_tdep prototype.
2406         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2407         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2408         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2409         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2410         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2411         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2412         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2413         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2414         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2415         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2416         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2417         prototype.
2418         * mipsread.c: Remove _initialize_mipsread prototype.
2419         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2420         prototype.
2421         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2422         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2423         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2424         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2425         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2426         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2427         prototype.
2428         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2429         * nto-procfs.c: Remove _initialize_procfs prototype.
2430         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2431         * objc-lang.c: Remove _initialize_objc_language prototype.
2432         * objfiles.c: Remove _initialize_objfiles prototype.
2433         * observer.c: Remove observer_test_first_notification_function,
2434         observer_test_second_notification_function,
2435         observer_test_third_notification_function, and
2436         _initialize_observer prototypes.
2437         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2438         * osabi.c: Remove _initialize_gdb_osabi prototype.
2439         * osdata.c: Remove _initialize_osdata prototype.
2440         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2441         * parse.c: Remove _initialize_parse prototype.
2442         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2443         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2444         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2445         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2446         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2447         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2448         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2449         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2450         * printcmd.c: Remove _initialize_printcmd prototype.
2451         * probe.c: Remove _initialize_probe prototype.
2452         * proc-api.c: Remove _initialize_proc_api prototype.
2453         * proc-events.c: Remove _initialize_proc_events prototype.
2454         * proc-service.c: Remove _initialize_proc_service prototype.
2455         * procfs.c: Remove _initialize_procfs prototype.
2456         * psymtab.c: Remove _initialize_psymtab prototype.
2457         * python/python.c: Remove _initialize_python prototype.
2458         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2459         * record-btrace.c: Remove _initialize_record_btrace prototype.
2460         * record-full.c: Remove _initialize_record_full prototype.
2461         * record.c: Remove _initialize_record prototype.
2462         * regcache.c: Remove _initialize_regcache prototype.
2463         * reggroups.c: Remove _initialize_reggroup prototype.
2464         * remote-notif.c: Remove _initialize_notif prototype.
2465         * remote-sim.c: Remove _initialize_remote_sim prototype.
2466         * remote.c: Remove _initialize_remote prototype.
2467         * reverse.c: Remove _initialize_reverse prototype.
2468         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2469         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2470         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2471         prototype.
2472         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2473         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2474         * rust-exp.y: Remove _initialize_rust_exp prototype.
2475         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2476         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2477         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2478         * score-tdep.c: Remove _initialize_score_tdep prototype.
2479         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2480         prototype.
2481         * ser-go32.c: Remove _initialize_ser_dos prototype.
2482         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2483         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2484         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2485         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2486         * serial.c: Remove _initialize_serial prototype.
2487         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2488         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2489         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2490         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2491         * skip.c: Remove _initialize_step_skip prototype.
2492         * sol-thread.c: Remove _initialize_sol_thread prototype.
2493         * solib-aix.c: Remove _initialize_solib_aix prototype.
2494         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2495         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2496         * solib-frv.c: Remove _initialize_frv_solib prototype.
2497         * solib-spu.c: Remove _initialize_spu_solib prototype.
2498         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2499         * solib-target.c: Remove _initialize_solib_target prototype.
2500         * solib.c: Remove _initialize_solib prototype.
2501         * source.c: Remove _initialize_source prototype.
2502         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2503         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2504         prototype.
2505         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2506         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2507         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2508         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2509         prototype.
2510         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2511         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2512         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2513         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2514         prototype.
2515         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2516         prototype.
2517         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2518         prototype.
2519         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2520         prototype.
2521         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2522         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2523         prototype.
2524         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2525         prototype.
2526         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2527         prototype.
2528         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2529         prototype.
2530         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2531         prototype.
2532         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2533         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2534         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2535         * stabsread.c: Remove _initialize_stabsread prototype.
2536         * stack.c: Remove _initialize_stack prototype.
2537         * stap-probe.c: Remove _initialize_stap_probe prototype.
2538         * std-regs.c: Remove _initialize_frame_reg prototype.
2539         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2540         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2541         * symfile.c: Remove _initialize_symfile prototype.
2542         * symmisc.c: Remove _initialize_symmisc prototype.
2543         * symtab.c: Remove _initialize_symtab prototype.
2544         * target-dcache.c: Remove _initialize_target_dcache prototype.
2545         * target-descriptions.c: Remove _initialize_target_descriptions
2546         prototype.
2547         * thread.c: Remove _initialize_thread prototype.
2548         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2549         prototype.
2550         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2551         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2552         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2553         prototype.
2554         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2555         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2556         * tracefile.c: Remove _initialize_tracefile prototype.
2557         * tracepoint.c: Remove _initialize_tracepoint prototype.
2558         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2559         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2560         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2561         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2562         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2563         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2564         * tui/tui.c: Remove _initialize_tui prototype.
2565         * typeprint.c: Remove _initialize_typeprint prototype.
2566         * user-regs.c: Remove _initialize_user_regs prototype.
2567         * utils.c: Remove _initialize_utils prototype.
2568         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2569         * valarith.c: Remove _initialize_valarith prototype.
2570         * valops.c: Remove _initialize_valops prototype.
2571         * valprint.c: Remove _initialize_valprint prototype.
2572         * value.c: Remove _initialize_values prototype.
2573         * varobj.c: Remove _initialize_varobj prototype.
2574         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2575         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2576         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2577         * windows-nat.c: Remove _initialize_windows_nat,
2578         _initialize_check_for_gdb_ini, and _initialize_loadable
2579         prototypes.
2580         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2581         * xcoffread.c: Remove _initialize_xcoffread prototype.
2582         * xml-support.c: Remove _initialize_xml_support prototype.
2583         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2584         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2585         prototype.
2586         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2587         prototype.
2588         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2589
2590 2017-09-08  Keith Seitz  <keiths@redhat.com>
2591
2592         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2593         field.
2594
2595 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2596
2597         * f-valprint.c (f_val_print): Remove check for one byte
2598         sized integers. Remove printing of character type.
2599
2600 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2601             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2602             Bernhard Heckel  <bernhard.heckel@intel.com>
2603
2604         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2605         to maintain proper indentation when printing pointers/refs.
2606
2607 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2608
2609         GDB 8.0.1 released.
2610
2611 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2612
2613         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2614
2615 2017-09-05  Tom Tromey  <tom@tromey.com>
2616
2617         * parse.c (funcall_chain): Now a std::vector.
2618         (start_arglist, end_arglist): Simplify.
2619         (free_funcalls): Remove.
2620         (parse_exp_in_context_1): Remove cleanup.
2621
2622 2017-09-05  Tom Tromey  <tom@tromey.com>
2623
2624         * go-exp.y (go_parse): Don't create a cleanup.
2625
2626 2017-09-05  Tom Tromey  <tom@tromey.com>
2627
2628         * d-exp.y (PrimaryExpression): Use std::string.
2629         (d_parse): Don't create a cleanup.
2630
2631 2017-09-05  Tom Tromey  <tom@tromey.com>
2632
2633         * utils.c (do_clear_parser_state): Remove.
2634         (make_cleanup_clear_parser_state): Remove.
2635         * p-exp.y (pascal_parse): Use scoped_restore.
2636         * m2-exp.y (m2_parse): Use scoped_restore.
2637         * f-exp.y (f_parse): Use scoped_restore.
2638         * d-exp.y (d_parse): Use scoped_restore.
2639         * c-exp.y (c_parse): Use scoped_restore.
2640         * ada-exp.y (ada_parse): Use scoped_restore.
2641         * utils.h (make_cleanup_clear_parser_state): Remove.
2642
2643 2017-09-06  Keith Seitz  <keiths@redhat.com>
2644
2645         * dwarf2read.c (dw2_linkage_name_attr): New function.
2646         (dw2_linkage_name): New function.
2647         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2648         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2649         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2650
2651 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2652
2653         * config/djgpp/djconfig.sh: Correct shell portability issue.
2654
2655 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2656
2657         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2658
2659 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2660
2661         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2662         * NEWS: Mention new FreeBSD/mips native configuration.
2663         * configure.host: Add aarch64*-*-freebsd*.
2664         * configure.nat: Likewise.
2665         * aarch64-fbsd-nat.c: New file.
2666
2667 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2668
2669         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2670         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2671         * NEWS: Mention new FreeBSD/aarch64 target.
2672         * configure.tgt: Add aarch64*-*-freebsd*.
2673         * aarch64-fbsd-tdep.c: New file.
2674         * aarch64-fbsd-tdep.h: New file.
2675
2676 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2677
2678         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2679
2680 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2681
2682         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2683         of TLS symbols.
2684
2685 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2686
2687         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2688         call.
2689
2690 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2691
2692         * infrun.c (follow_exec): Call add_thread after
2693         target_find_description.
2694
2695 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2696
2697         * infrun.c (handle_inferior_event_1): When exec'ing, read
2698         stop_pc after follow_exec.
2699
2700 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2701
2702         * remote.c (process_g_packet): Update error message.
2703
2704 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2705
2706         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2707         targets.
2708
2709 2017-09-05  Pedro Alves  <palves@redhat.com>
2710
2711         * eval.c (eval_call, evaluate_funcall): New functions, factored
2712         out from ...
2713         (evaluate_subexp_standard): ... this.
2714
2715 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2716
2717         * amd64-tdep.c (amd64_target_description): Create target
2718         descriptions.
2719         (_initialize_amd64_tdep): Don't call functions
2720         initialize_tdesc_amd64_*.  Add self tests.
2721         * arch/amd64.c (amd64_create_target_description): Add parameter
2722         is_linux.  Call set_tdesc_osabi if is_linux is true.
2723         * arch/amd64.h (amd64_create_target_description): Update the
2724         declaration.
2725         * arch/i386.c (i386_create_target_description): Add parameter
2726         is_linux.  Call set_tdesc_osabi if is_linux is true.
2727         * arch/i386.h (i386_create_target_description): Update
2728         declaration.
2729         * configure.tgt: Add i386.o to gdb_target_obs.
2730         * features/Makefile (XMLTOC): Remove i386/*.xml.
2731         * features/i386/amd64-avx-avx512.c: Remove.
2732         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2733         * features/i386/amd64-avx-mpx.c: Remove.
2734         * features/i386/amd64-avx.c: Remove.
2735         * features/i386/amd64-mpx.c: Remove.
2736         * features/i386/amd64.c: Remove.
2737         * features/i386/i386-avx-avx512.c: Remove.
2738         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2739         * features/i386/i386-avx-mpx.c: Remove.
2740         * features/i386/i386-avx.c: Remove.
2741         * features/i386/i386-mmx.c: Remove.
2742         * features/i386/i386-mpx.c: Remove.
2743         * features/i386/i386.c: Remove.
2744         * i386-tdep.c: Don't include features/i386/i386*.c., include
2745         target-descriptions.h and arch/i386.h.
2746         (i386_target_description): Create target descriptions.
2747         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2748         functions.  Do self tests.
2749
2750 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2751
2752         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2753         * features/i386/amd64-avx-avx512-linux.c: Removed.
2754         * features/i386/amd64-avx-linux.c: Removed.
2755         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2756         * features/i386/amd64-avx-mpx-linux.c: Removed.
2757         * features/i386/amd64-linux.c: Removed.
2758         * features/i386/amd64-mpx-linux.c: Removed.
2759         * features/i386/x32-avx-avx512-linux.c: Removed.
2760         * features/i386/x32-avx-linux.c: Removed.
2761         * features/i386/x32-linux.c: Removed.
2762
2763 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2764
2765         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2766         features/i386/*.c.
2767         (amd64_linux_read_description): Call
2768         amd64_create_target_description.
2769         * arch/amd64.c: New file.
2770         * arch/amd64.h: New file.
2771         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2772         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2773
2774 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2775
2776         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2777         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2778         (amd64_linux_read_description): Create target descriptions.
2779         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2780         functions.  Add unit tests.
2781         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2782         x32-core.xml.
2783         * features/i386/64bit-avx.c: Generated.
2784         * features/i386/64bit-avx512.c: Generated.
2785         * features/i386/64bit-core.c: Generated.
2786         * features/i386/64bit-linux.c: Generated.
2787         * features/i386/64bit-mpx.c: Generated.
2788         * features/i386/64bit-pkeys.c: Generated.
2789         * features/i386/64bit-segments.c: Generated.
2790         * features/i386/64bit-sse.c: Generated.
2791         * features/i386/x32-core.c: Generated.
2792         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2793         c files for amd64-linux and x32-linux.
2794
2795 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2796
2797         * amd64-linux-tdep.c (amd64_linux_read_description): New
2798         function.
2799         (amd64_linux_core_read_description): Call
2800         amd64_linux_read_description.
2801         (amd64_linux_init_abi): Likewise.
2802         (amd64_x32_linux_init_abi): Likewise.
2803         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2804         * x86-linux-nat.c (x86_linux_read_description): Call
2805         amd64_linux_read_description.
2806
2807 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2808
2809         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2810         comments.
2811
2812 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2813
2814         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2815         * features/i386/i386-avx-avx512-linux.c: Remove.
2816         * features/i386/i386-avx-linux.c: Remove.
2817         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2818         * features/i386/i386-avx-mpx-linux.c: Remove.
2819         * features/i386/i386-linux.c: Remove.
2820         * features/i386/i386-mmx-linux.c: Remove.
2821         * features/i386/i386-mpx-linux.c: Remove.
2822
2823 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2824
2825         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2826         (SFILES): Add arch/i386.c.
2827         (HFILES_NO_SRCDIR): Add arch/i386.h.
2828         * arch/i386.c: New file.
2829         * arch/i386.h: New file.
2830         * arch/tdesc.h (allocate_target_description): Declare.
2831         (set_tdesc_architecture): Declare.
2832         (set_tdesc_osabi): Declare.
2833         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2834         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2835         include arch/i386.h.
2836         (i386_linux_read_description): Remove code and call
2837         i386_create_target_description.
2838         (set_tdesc_architecture): New function.
2839         (set_tdesc_osabi): New function.
2840         * target-descriptions.h (allocate_target_description): Remove.
2841
2842 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2843
2844         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2845         * target-descriptions.c (tdesc_create_feature): Likewise, and
2846         adjust code.
2847         * features/i386/32bit-avx.c: Re-generated.
2848         * features/i386/32bit-avx512.c: Re-generated.
2849         * features/i386/32bit-core.c: Re-generated.
2850         * features/i386/32bit-linux.c: Re-generated.
2851         * features/i386/32bit-mpx.c: Re-generated.
2852         * features/i386/32bit-pkeys.c: Re-generated.
2853         * features/i386/32bit-sse.c: Re-generated.
2854
2855 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2856
2857         * regformats/regdef.h (struct reg): Override operator == and !=.
2858
2859 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2860
2861         * arch/tdesc.h: New file.
2862         * regformats/regdat.sh: Generate code using tdesc_create_reg.
2863         * target-descriptions.c: Update comments.
2864         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
2865         declarations.
2866         * features/i386/32bit-avx.c: Re-generated.
2867         * features/i386/32bit-avx512.c: Re-generated.
2868         * features/i386/32bit-core.c: Re-generated.
2869         * features/i386/32bit-linux.c: Re-generated.
2870         * features/i386/32bit-mpx.c: Re-generated.
2871         * features/i386/32bit-pkeys.c: Re-generated.
2872         * features/i386/32bit-sse.c: Re-generated.
2873
2874 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2875
2876         * regformats/regdat.sh: Update generated code.
2877
2878 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2879
2880         * regformats/regdat.sh: Adjust code order.
2881
2882 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2883
2884         * expprint.c (dump_subexp_body_standard): Use constant format
2885         string in fprintf_filtered call.
2886
2887 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2888
2889         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2890         NetBSD/i386.
2891         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2892
2893 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2894
2895         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2896
2897 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2898
2899         * bsd-kvm.o: Define _KMEMUSER.
2900         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2901         * configure: Regenerate.
2902
2903 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2904
2905         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2906         * i386-fbsd-nat.c: Likewise.
2907
2908 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2909
2910         * unittests/array-view-selftests.c: Add include of <array>.
2911
2912 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2913
2914         * spu-tdep.c (flush_ea_cache): Add missing argument to
2915         call_function_by_hand.
2916
2917 2017-09-04  Pedro Alves  <palves@redhat.com>
2918
2919         * NEWS (Safer support for debugging with no debug info): New.
2920
2921 2017-09-04  Pedro Alves  <palves@redhat.com>
2922
2923         * c-exp.y (function_method, function_method_void): Add current
2924         instance flags to TYPE_INSTANCE.
2925         * dwarf2read.c (check_modifier): New.
2926         (compute_delayed_physnames): Assert that only C++ adds delayed
2927         physnames.  Mark fn_fields as const/volatile depending on
2928         physname.
2929         * eval.c (make_params): New type_instance_flags parameter.  Use
2930         it as the new type's instance flags.
2931         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2932         flags element and pass it to make_params.
2933         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2934         instance flags element.
2935         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2936         * gdbtypes.h: Include "enum-flags.h".
2937         (type_instance_flags): New enum-flags type.
2938         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2939         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2940         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2941         (follow_type_instance_flags): New function.
2942         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2943         * parser-defs.h (follow_type_instance_flags): Declare.
2944         * valops.c (value_struct_elt_for_reference): const/volatile must
2945         match too.
2946
2947 2017-09-04  Pedro Alves  <palves@redhat.com>
2948
2949         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2950         function/method scopes; lookup the nested name as a function local
2951         static variable.
2952
2953 2017-09-04  Pedro Alves  <palves@redhat.com>
2954
2955         (%type <voidval>): Add function_method.
2956         * c-exp.y (exp): New production for calls with no arguments.
2957         (function_method, function_method_void_or_typelist): New
2958         productions.
2959         (exp): New production for "method()::static_var".
2960         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2961         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2962         Handle OP_FUNC_STATIC_VAR.
2963         * parse.c (operator_length_standard):
2964         Handle OP_FUNC_STATIC_VAR.
2965
2966 2017-09-04  Pedro Alves  <palves@redhat.com>
2967
2968         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2969         handling.
2970         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2971         Ditto.
2972         * parse.c (operator_length_standard, operator_check_standard):
2973         Ditto.
2974         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2975
2976 2017-09-04  Pedro Alves  <palves@redhat.com>
2977
2978         * ax-gdb.c: Include "typeprint.h".
2979         (gen_expr_for_cast): New function.
2980         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2981         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2982         type is unknown.
2983         * dwarf2read.c (new_symbol_full): Fallback to int instead of
2984         nodebug_data_symbol.
2985         * eval.c: Include "typeprint.h".
2986         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2987         Error out if symbol has unknown type.
2988         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2989         evaluate_subexp_for_cast.
2990         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2991         OP_VAR_MSYM_VALUE.
2992         (evaluate_subexp_for_cast): New function.
2993         * gdbtypes.c (init_nodebug_var_type): New function.
2994         (objfile_type): Use it to initialize types of variables with no
2995         debug info.
2996         * typeprint.c (error_unknown_type): New.
2997         * typeprint.h (error_unknown_type): New declaration.
2998         * compile/compile-c-types.c (convert_type_basic): Handle
2999         TYPE_CODE_ERROR; warn and fallback to int for variables with
3000         unknown type.
3001
3002 2017-09-04  Pedro Alves  <palves@redhat.com>
3003
3004         * eval.c (evaluate_var_value): New function, factored out from ...
3005         (evaluate_subexp_standard): ... here.
3006
3007 2017-09-04  Pedro Alves  <palves@redhat.com>
3008
3009         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3010         Remove useless assignments to 'op'.
3011
3012 2017-09-04  Pedro Alves  <palves@redhat.com>
3013
3014         * eval.c (eval_skip_value): New function.
3015         (evaluate_subexp_standard): Use it.
3016
3017 2017-09-04  Pedro Alves  <palves@redhat.com>
3018
3019         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3020         function name from symbol/minsym and pass it to
3021         error_call_unknown_return_type.
3022
3023 2017-09-04  Pedro Alves  <palves@redhat.com>
3024
3025         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3026         * ax-gdb.c (gen_msym_var_ref): New function.
3027         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3028         * eval.c (evaluate_var_msym_value): New function.
3029         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3030         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3031         to call_function_by_hand.
3032         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3033         Handle OP_VAR_MSYM_VALUE.
3034         (union exp_element) <msymbol>: New field.
3035         * minsyms.h (struct type): Forward declare.
3036         (find_minsym_type_and_address): Declare.
3037         * parse.c (write_exp_elt_msym): New function.
3038         (write_exp_msymbol): Delete, refactored as ...
3039         (find_minsym_type_and_address): ... this new function.
3040         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3041         (operator_length_standard, operator_check_standard): Handle
3042         OP_VAR_MSYM_VALUE.
3043         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3044
3045 2017-09-04  Pedro Alves  <palves@redhat.com>
3046
3047         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3048         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3049         unknown.
3050         * ada-typeprint.c (print_func_type): Handle functions with unknown
3051         return type.
3052         * c-typeprint.c (c_type_print_base): Handle functions and methods
3053         with unknown return type.
3054         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3055         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3056         * compile/compile-c-types.c: Include "objfiles.h".
3057         (convert_func): For functions with unknown return type, warn and
3058         default to int.
3059         * compile/compile-object-run.c (compile_object_run): Adjust call
3060         to call_function_by_hand_dummy.
3061         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3062         call_function_by_hand.
3063         * eval.c (evaluate_subexp_standard): Adjust calls to
3064         call_function_by_hand.  Handle functions and methods with unknown
3065         return type.  Pass expect_type to call_function_by_hand.
3066         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3067         return type.
3068         * gcore.c (call_target_sbrk): Adjust call to
3069         call_function_by_hand.
3070         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3071         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3072         an integer address type instead of nodebug.
3073         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3074         call_function_by_hand.
3075         * infcall.c (error_call_unknown_return_type): New function.
3076         (call_function_by_hand): New "default_return_type" parameter.
3077         Pass it down.
3078         (call_function_by_hand_dummy): New "default_return_type"
3079         parameter.  Use it instead of defaulting to int.  If there's no
3080         default and the return type is unknown, throw an error.  If
3081         there's a default return type, and the called function has no
3082         debug info, then assume the function is prototyped.
3083         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3084         New "default_return_type" parameter.
3085         (error_call_unknown_return_type): New declaration.
3086         * linux-fork.c (call_lseek): Cast return type of lseek.
3087         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3088         call_function_by_hand.
3089         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3090         calls to call_function_by_hand.
3091         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3092         return type.
3093         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3094         (value_nsstring, print_object_command): Adjust calls to
3095         call_function_by_hand.
3096         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3097         functions with unknown return type.
3098         (pascal_type_print_func_varspec_suffix): New function.
3099         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3100         TYPE_CODE_METHOD>: Use it.
3101         * python/py-value.c (valpy_call): Adjust call to
3102         call_function_by_hand.
3103         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3104         call_function_by_hand.
3105         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3106         call_function_by_hand.
3107         * valops.c (value_allocate_space_in_inferior): Adjust call to
3108         call_function_by_hand.
3109         * typeprint.c (type_print_unknown_return_type): New function.
3110         * typeprint.h (type_print_unknown_return_type): New declaration.
3111
3112 2017-09-04  Pedro Alves  <palves@redhat.com>
3113
3114         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3115         types with more than one parameter as prototyped.
3116
3117 2017-09-04  Pedro Alves  <palves@redhat.com>
3118
3119         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3120         (disassemble_command): Use gdb_disassembly_flags instead of bare
3121         int.
3122         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3123         (dump_insns, do_mixed_source_and_assembly_deprecated)
3124         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3125         Use gdb_disassembly_flags instead of bare int.
3126         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3127         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3128         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3129         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3130         (enum gdb_disassembly_flag): ... values of this new enumeration.
3131         (gdb_disassembly_flags): Define.
3132         (gdb_disassembly)
3133         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3134         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3135         gdb_disassembly_flags instead of bare int.
3136         * record-btrace.c (btrace_insn_history)
3137         (record_btrace_insn_history, record_btrace_insn_history_range)
3138         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3139         instead of bare int.
3140         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3141         Use gdb_disassembly_flags instead of bare int.
3142         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3143         Define.
3144         * target-delegates.c: Regenerate.
3145         * target.c (target_insn_history, target_insn_history_from)
3146         (target_insn_history_range): Use gdb_disassembly_flags instead of
3147         bare int.
3148         * target.h: Include "disasm.h".
3149         (struct target_ops) <to_insn_history, to_insn_history_from,
3150         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3151         int.
3152         (target_insn_history, target_insn_history_from)
3153         (target_insn_history_range): Use gdb_disassembly_flags instead of
3154         bare int.
3155
3156 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3157
3158         * cli/cli-script.c (build_command_line): For if/while commands,
3159         check whether args is empty.
3160
3161 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3162
3163         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3164         (enum command_control_type): Likewise.
3165         (struct command_line): Likewise.
3166         (free_command_lines): Likewise.
3167         (struct command_lines_deleter): Likewise.
3168         (command_line_up): Likewise.
3169         (read_command_lines): Likewise.
3170         (read_command_lines_1): Likewise.
3171         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3172         (enum command_control_type): Likewise.
3173         (struct command_line): Likewise.
3174         (free_command_lines): Likewise.
3175         (struct command_lines_deleter): Likewise.
3176         (command_line_up): Likewise.
3177         (read_command_lines): Likewise.
3178         (read_command_lines_1): Likewise.
3179         * breakpoint.h: Include cli/cli-script.h.
3180         * extension-priv.h: Likewise.
3181         * gdbcmd.h: Likewise.
3182
3183 2017-09-04  Pedro Alves  <palves@redhat.com>
3184
3185         * ada-lang.c (is_known_support_routine): Move sal declaration to
3186         where it is initialized.
3187         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3188         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3189         (clear_command, update_static_tracepoint): Remove init_sal
3190         references.  Move declarations closer to initializations.
3191         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3192         initializations.
3193         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3194         references.  Move sal declarations closer to initializations.
3195         * frame.c (find_frame_sal): Return a symtab_and_line via function
3196         return instead of output parameter.  Remove init_sal references.
3197         * frame.h (find_frame_sal): Return a symtab_and_line via function
3198         return instead of output parameter.
3199         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3200         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3201         instead of memset.
3202         (gdbscm_find_pc_line): Remove init_sal reference.
3203         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3204         references.  Move declarations closer to initializations.
3205         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3206         initializations.
3207         (finish_backward): Remove init_sal references.  Move declarations
3208         closer to initializations.
3209         * infrun.c (process_event_stop_test, handle_step_into_function)
3210         (insert_hp_step_resume_breakpoint_at_frame)
3211         (insert_step_resume_breakpoint_at_caller): Likewise.
3212         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3213         (symbol_to_sal): Likewise.
3214         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3215         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3216         to its initialization.
3217         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3218         init_sal references.  Move declarations closer to initializations.
3219         * source.c (get_current_source_symtab_and_line): Remove brace
3220         initialization.
3221         (set_current_source_symtab_and_line): Now takes the sal by const
3222         reference.  Remove brace initialization.
3223         (line_info): Remove init_sal reference.
3224         * source.h (set_current_source_symtab_and_line): Now takes a
3225         symtab_and_line via const reference.
3226         * stack.c (set_current_sal_from_frame): Adjust.
3227         (print_frame_info): Adjust.
3228         (get_last_displayed_sal): Return the sal via function return
3229         instead of via output parameter.  Simplify.
3230         (frame_info): Adjust.
3231         * stack.h (get_last_displayed_sal): Return the sal via function
3232         return instead of via output parameter.
3233         * symtab.c (init_sal): Delete.
3234         (find_pc_sect_line): Remove init_sal references.  Move
3235         declarations closer to initializations.
3236         (find_function_start_sal): Remove init_sal references.  Move
3237         declarations closer to initializations.
3238         * symtab.h (struct symtab_and_line): In-class initialize all
3239         fields.
3240         * tracepoint.c (set_traceframe_context)
3241         (print_one_static_tracepoint_marker): Remove init_sal references.
3242         Move declarations closer to initializations.
3243         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3244         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3245         declarations closer to initializations.
3246         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3247         init_sal references.  Adjust.
3248
3249 2017-09-04  Pedro Alves  <palves@redhat.com>
3250
3251         * ax-gdb.c (agent_command_1): Use range-for.
3252         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3253         * breakpoint.c: Include "common/array-view.h".
3254         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3255         parameter from struct symtabs_and_lines to
3256         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3257         (breakpoint_sals_to_pc): Change sals parameter from struct
3258         symtabs_and_lines to std::vector reference.
3259         (check_fast_tracepoint_sals): Change sals parameter from struct
3260         symtabs_and_lines to std::array_view.  Use range-for.
3261         (decode_static_tracepoint_spec): Return a std::vector instead of
3262         symtabs_and_lines.  Update.
3263         (create_breakpoint): Update.
3264         (break_range_command, until_break_command, clear_command): Update.
3265         (base_breakpoint_decode_location, bkpt_decode_location)
3266         (bkpt_probe_create_sals_from_location)
3267         (bkpt_probe_decode_location, tracepoint_decode_location)
3268         (tracepoint_probe_decode_location)
3269         (strace_marker_create_sals_from_location): Return a std::vector
3270         instead of symtabs_and_lines.
3271         (strace_marker_create_breakpoints_sal): Update.
3272         (strace_marker_decode_location): Return a std::vector instead of
3273         symtabs_and_lines.  Update.
3274         (update_breakpoint_locations): Change struct symtabs_and_lines
3275         parameters to gdb::array_view.  Adjust.
3276         (location_to_sals): Return a std::vector instead of
3277         symtabs_and_lines.  Update.
3278         (breakpoint_re_set_default): Use std::vector instead of struct
3279         symtabs_and_lines.
3280         (decode_location_default): Return a std::vector instead of
3281         symtabs_and_lines.  Update.
3282         * breakpoint.h: Include "common/array-view.h".
3283         (struct breakpoint_ops) <decode_location>: Now returns a
3284         std::vector instead of returning a symtabs_and_lines via output
3285         parameter.
3286         (update_breakpoint_locations): Change sals parameters to use
3287         gdb::array_view.
3288         * cli/cli-cmds.c (edit_command, list_command): Update to use
3289         std::vector and gdb::array_view.
3290         (ambiguous_line_spec): Adjust to use gdb::array_view and
3291         range-for.
3292         (compare_symtabs): Rename to ...
3293         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3294         const reference and adjust.
3295         (filter_sals): Rewrite using std::vector and standard algorithms.
3296         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3297         (jump_command): Update to use std::vector.
3298         * linespec.c (struct linespec_state) <canonical_names>: Update
3299         comment.
3300         (add_sal_to_sals_basic): Delete.
3301         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3302         (decode_line_2, create_sals_line_offset)
3303         (convert_address_location_to_sals, convert_linespec_to_sals)
3304         (convert_explicit_location_to_sals, parse_linespec)
3305         (event_location_to_sals, decode_line_full, decode_line_1)
3306         (decode_line_with_current_source)
3307         (decode_line_with_last_displayed, decode_objc)
3308         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3309         (linespec_result::~linespec_result): Adjust to use std::vector
3310         instead of symtabs_and_lines.
3311         * linespec.h (linespec_sals::sals): Now a std::vector.
3312         (struct linespec_result): Use std::vector, bool, and in-class
3313         initialization.
3314         (decode_line_1, decode_line_with_current_source)
3315         (decode_line_with_last_displayed): Return std::vector.
3316         * macrocmd.c (info_macros_command): Use std::vector.
3317         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3318         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3319         std::vector.
3320         * probe.h (parse_probes): Return a std::vector.
3321         * python/python.c (gdbpy_decode_line): Use std::vector and
3322         gdb::array_view.
3323         * source.c (select_source_symtab, line_info): Use std::vector.
3324         * stack.c (func_command): Use std::vector.
3325         * symtab.h (struct symtabs_and_lines): Delete.
3326         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3327
3328 2017-09-04  Pedro Alves  <palves@redhat.com>
3329
3330         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3331         unittests/array-view-selftests.c.
3332         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3333         * common/array-view.h: New file.
3334         * unittests/array-view-selftests.c: New file.
3335
3336 2017-09-04  Pedro Alves  <palves@redhat.com>
3337
3338         * cli/cli-cmds.c (edit_command): Pass message to
3339         ambiguous_line_spec.
3340         (list_command): Pass message to ambiguous_line_spec.  Say
3341         "first"/"last" instead of "start" and "end" to be consistent with
3342         the manual.
3343         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3344         them to print formatted message.
3345
3346 2017-09-04  Pedro Alves  <palves@redhat.com>
3347
3348         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3349         ftrace_update_insns by reference instead of pointer.
3350
3351 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3352
3353         * i386-go32-tdep.c: Include x86-xstate.h.
3354         (i386_go32_init_abi): Call i386_target_description.
3355         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3356         if xcr0 is X86_XSTATE_X87_MASK.
3357         * i386-tdep.h (tdesc_i386): Remove the declaration.
3358         (tdesc_i386_mmx): Likewise.
3359
3360 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3361
3362         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3363         X86_XSTATE_SSE_MASK instead of 0.
3364
3365 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3366
3367         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3368         i386_target_description.
3369         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3370         i386_target_description.
3371         * i386-tdep.c (i386_gdbarch_init): Likewise.
3372
3373 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3374
3375         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3376         (x86_darwin_init_abi_64): Call amd64_target_description.
3377         * amd64-dicos-tdep.c: Likewise.
3378         * amd64-fbsd-nat.c: Likewise.
3379         * amd64-fbsd-tdep.c: Likewise.
3380         * amd64-nbsd-tdep.c: Likewise.
3381         * amd64-obsd-tdep.c: Likewise.
3382         * amd64-sol2-tdep.c: Likewise.
3383         * amd64-windows-tdep.c: Likewise.
3384         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3385
3386 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3387
3388         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3389         (btrace_function) <insn>: Change type to use std::vector.
3390         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3391         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3392         ftrace_update_insns, ftrace_compute_global_level_offset,
3393         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3394         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3395         change to std::vector.
3396         (ftrace_update_insns): Adjust to change to std::vector, change
3397         type of INSN parameter.
3398         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3399         * record-btrace.c (btrace_call_history_insn_range,
3400         btrace_compute_src_line_range,
3401         record_btrace_frame_prev_register): Adjust to change to
3402         std::vector.
3403         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3404         to change to std::vector.
3405
3406 2017-09-03  Tom Tromey  <tom@tromey.com>
3407
3408         * corefile.c (reopen_exec_file): Use std::string.
3409
3410 2017-09-03  Tom Tromey  <tom@tromey.com>
3411
3412         * compile/compile.c (compile_register_name_mangled): Return
3413         std::string.
3414         * compile/compile-loc2c.c (pushf_register_address): Update.
3415         (pushf_register): Update.
3416         * compile/compile-c-types.c (convert_array): Update.
3417         * compile/compile-c-symbols.c (generate_vla_size): Update.
3418         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3419         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3420         (convert_one_symbol): Update.
3421         (generate_c_for_for_one_variable): Update.
3422         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3423         std::string.
3424         (generate_register_struct): Update.
3425         * compile/compile-internal.h (c_get_range_decl_name): Return a
3426         std::string.
3427         (compile_register_name_mangled): Return std::string.
3428
3429 2017-09-03  Tom Tromey  <tom@tromey.com>
3430
3431         * utils.c (perror_string): Return a std::string.
3432         (throw_perror_with_name, perror_warning_with_name): Update.
3433
3434 2017-09-03  Tom Tromey  <tom@tromey.com>
3435
3436         * demangle.c (demangle_command): Use std::string,
3437         unique_xmalloc_ptr.
3438
3439 2017-09-03  Tom Tromey  <tom@tromey.com>
3440
3441         * cli/cli-setshow.c (do_set_command): Use std::string.
3442
3443 2017-09-03  Tom Tromey  <tom@tromey.com>
3444
3445         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3446
3447 2017-09-03  Tom Tromey  <tom@tromey.com>
3448
3449         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3450
3451 2017-09-03  Tom Tromey  <tom@tromey.com>
3452
3453         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3454         gdb::unique_xmalloc_ptr.
3455
3456 2017-09-03  Tom Tromey  <tom@tromey.com>
3457
3458         * thread.c (print_thread_info_1): Use string_printf.
3459         (thread_apply_command, thread_apply_all_command): Use
3460         std::string.
3461
3462 2017-09-03  Tom Tromey  <tom@tromey.com>
3463
3464         * valprint.c (val_print_string): Update.
3465         * gdbcore.h (memory_error_message): Return std::string.
3466         * corefile.c (memory_error_message): Return std::string.
3467         (memory_error): Update.
3468         * breakpoint.c (insert_bp_location): Update.
3469
3470 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3471
3472         * target/waitstatus.h (target_waitstatus_to_string): Change
3473         return type to std::string.
3474         * target/waitstatus.c (target_waitstatus_to_string): Return
3475         std::string.
3476         * target.h (target_waitstatus_to_string): Remove declaration.
3477         * infrun.c (resume, clear_proceed_status_thread,
3478         print_target_wait_results, do_target_wait, save_waitstatus,
3479         stop_all_threads): Adjust.
3480         * record-btrace.c (record_btrace_wait): Adjust.
3481         * target-debug.h
3482         (target_debug_print_struct_target_waitstatus_p): Adjust.
3483
3484 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3485
3486         PR gdb/22046
3487         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3488         detection.
3489
3490 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3491
3492         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3493         for setting/unsetting environment variables on the remote target.
3494         (New remote packets): Add entries for QEnvironmentHexEncoded,
3495         QEnvironmentUnset and QEnvironmentReset.
3496         * common/environ.c (gdb_environ::operator=): Extend method to
3497         handle m_user_set_env_list and m_user_unset_env_list.
3498         (gdb_environ::clear): Likewise.
3499         (match_var_in_string): Change type of first parameter from 'char
3500         *' to 'const char *'.
3501         (gdb_environ::set): Extend method to handle
3502         m_user_set_env_list and m_user_unset_env_list.
3503         (gdb_environ::unset): Likewise.
3504         (gdb_environ::clear_user_set_env): New method.
3505         (gdb_environ::user_set_envp): Likewise.
3506         (gdb_environ::user_unset_envp): Likewise.
3507         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3508         m_user_unset_env_list on move constructor/assignment.
3509         (unset): Add new default parameter 'update_unset_list = true'.
3510         (clear_user_set_env): New method.
3511         (user_set_envp): Likewise.
3512         (user_unset_envp): Likewise.
3513         (m_user_set_env_list): New std::set.
3514         (m_user_unset_env_list): Likewise.
3515         * common/rsp-low.c (hex2str): New function.
3516         (bin2hex): New overload for bin2hex function.
3517         * common/rsp-low.c (hex2str): New prototype.
3518         (str2hex): New overload prototype.
3519         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3520         QEnvironmentUnset and QEnvironmentReset.
3521         (remote_protocol_features): Add QEnvironmentHexEncoded,
3522         QEnvironmentUnset and QEnvironmentReset packets.
3523         (send_environment_packet): New function.
3524         (extended_remote_environment_support): Likewise.
3525         (extended_remote_create_inferior): Call
3526         extended_remote_environment_support.
3527         (_initialize_remote): Add QEnvironmentHexEncoded,
3528         QEnvironmentUnset and QEnvironmentReset packet configs.
3529         * unittests/environ-selftests.c (gdb_selftest_env_var):
3530         New variable.
3531         (test_vector_initialization): New function.
3532         (test_init_from_host_environ): Likewise.
3533         (test_reinit_from_host_environ): Likewise.
3534         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3535         Likewise.
3536         (test_unset_set_empty_vector): Likewise.
3537         (test_vector_clear): Likewise.
3538         (test_std_move): Likewise.
3539         (test_move_constructor):
3540         (test_self_move): Likewise.
3541         (test_set_unset_reset): Likewise.
3542         (run_tests): Rewrite in terms of the functions above.
3543
3544 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3545
3546         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3547         (adi_available): Use a temp variable of type CORE_ADDR as argument
3548         3 when calling target_auxv_search.
3549         (adi_normalize_address): Use masks and xor operators to calculate
3550         normalized address.
3551         (adi_read_versions, adi_write_versions, adi_print_versions)
3552         (do_examine, do_assign): Use paddress.
3553
3554 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3555
3556         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3557         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3558         out of loop and add supply of FIR.
3559         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3560         add collect of FIR.
3561
3562 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3563
3564         PR gdb/21827
3565         * cli/cli-script.c (define_command): Don't convert command name
3566         to lower case.
3567
3568 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3569
3570         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3571         Update all callers accordingly. Remove all code blocks handling
3572         the case where DISPP is not NULL.
3573
3574 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3575
3576         PR symtab/22003
3577         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3578         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3579         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3580
3581 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3582
3583         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3584         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3585         (read_comp_units_from_section): New parameter abbrev_section, use
3586         read_and_check_comp_unit_head, allocate signatured_type if needed.
3587         (create_all_comp_units): Update read_comp_units_from_section caller.
3588
3589 2017-08-23  Pedro Alves  <palves@redhat.com>
3590
3591         PR remote/21852
3592         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3593         to null_ptid and switch to thread without reading the registers
3594         after adding the inferior.
3595
3596 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3597
3598         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3599         compile-gcc.
3600         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3601         (compile_to_object): Implement compile_gcc.
3602         (_initialize_compile): Install "set compile-gcc".  Initialize
3603         compile_gcc.
3604
3605 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3606
3607         * compile/compile.c (compile_to_object): Conditionally call
3608         set_verbose.  Conditionally call compile or compile_v0.
3609
3610 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3611
3612         * sparc64-tdep.h: (adi_normalize_address): New export.
3613         * sparc-nat.h: (open_adi_tag_fd): New export.
3614         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3615         * sparc64-linux-tdep.c:
3616         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3617         (sparc64_linux_handle_segmentation_fault): New function.
3618         (sparc64_linux_init_abi): Register
3619         sparc64_linux_handle_segmentation_fault
3620         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3621         (sparc64_addr_bits_remove): New function.
3622         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3623         (MAX_PROC_NAME_SIZE): New macro.
3624         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3625         (sparc64adilist): New variable.
3626         (adi_proc_list): New variable.
3627         (find_adi_info): New function.
3628         (add_adi_info): New function.
3629         (get_adi_info_proc): New function.
3630         (get_adi_info): New function.
3631         (info_adi_command): New function.
3632         (read_maps_entry): New function.
3633         (adi_available): New function.
3634         (adi_normalize_address): New function.
3635         (adi_align_address): New function.
3636         (adi_convert_byte_count): New function.
3637         (adi_tag_fd): New function.
3638         (adi_is_addr_mapped): New function.
3639         (adi_read_versions): New function.
3640         (adi_write_versions): New function.
3641         (adi_print_versions): New function.
3642         (do_examine): New function.
3643         (do_assign): New function.
3644         (adi_examine_command): New function.
3645         (adi_assign_command): New function.
3646         (_initialize_sparc64_adi_tdep): New function.
3647
3648 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3649
3650         * breakpoint.c (breakpoints_info): Rename to ...
3651         (info_breakpoints_command): ... this.
3652         (watchpoints_info): Rename to ...
3653         (info_watchpoints_command): ... this.
3654         (tracepoints_info): Rename to ...
3655         (info_tracepoints_command): ... this.
3656         (_initialize_breakpoint): Adjust.
3657         * dcache.c (dcache_info): Rename to ...
3658         (info_display_command): ... this.
3659         (_initialize_dcache): Adjust.
3660         * frame.h (args_info): Rename to ...
3661         (info_args_command): ... this.
3662         (locals_info): Rename to ...
3663         (info_locals_command): ... this.
3664         * infcmd.c (nofp_registers_info): Rename to ...
3665         (info_registers_command): ... this.
3666         (float_info): Rename to ...
3667         (info_float_command): ... this.
3668         (program_info): Rename to ...
3669         (info_program_command): ... this.
3670         (all_registers_info): Rename to ...
3671         (info_all_registers_command): ... this.
3672         (vector_info): Rename to ...
3673         (info_vector_command): ... this.
3674         (float_info): Rename to ...
3675         (info_float_command): ... this.
3676         (_initialize_infcmd): Adjust.
3677         * inferior.h (term_info): Rename to ...
3678         (info_terminal_command): ... this.
3679         * inflow.c (term_info): Rename to ...
3680         (info_terminal_command): ... this.
3681         (_initialize_inflow): Adjust.
3682         * infrun.c (signals_info): Rename to ...
3683         (info_signals_command): ... this.
3684         (_initialize_infrun): Adjust.
3685         * objc-lang.c (classes_info): Rename to ...
3686         (info_classes_command): ... this.
3687         (selectors_info): Rename to ...
3688         (info_selectors_command): ... this.
3689         (_initialize_objc_language): Adjust.
3690         * printcmd.c (sym_info): Rename to ...
3691         (info_symbol_command): ... this.
3692         (address_info): Rename to ...
3693         (info_address_command): ... this.
3694         (display_info): Rename to ...
3695         (info_display_command): ... this.
3696         (_initialize_printcmd): Adjust.
3697         * reverse.c (bookmarks_info): Rename to ...
3698         (info_breakpoints_command): ... this.
3699         (_initialize_reverse): Adjust.
3700         * ser-go32.c (dos_info): Rename to ...
3701         (info_serial_command): ... this.
3702         (_initialize_ser_dos): Adjust.
3703         * skip.c (skip_info): Rename to ...
3704         (info_skip_command): ... this.
3705         (_initialize_step_skip): Adjust.
3706         * source.c (line_info): Rename to ...
3707         (info_line_command): ... this.
3708         (source_info): Rename to ...
3709         (info_source_command)
3710         * stack.c (frame_info): Rename to ...
3711         (info_frame_command): ... this.
3712         (locals_info): Rename to ...
3713         (info_locals_command): ... this.
3714         (args_info): Rename to ...
3715         (info_args_command): ... this.
3716         (_initialize_stack): Adjust.
3717         * symtab.c (sources_info): Rename to ...
3718         (info_sources_command): ... this.
3719         (variables_info): Rename to ...
3720         (info_variables_command): ... this.
3721         (functions_info): Rename to ...
3722         (info_functions_command): ... this.
3723         (types_info): Rename to ...
3724         (info_types_command): ... this.
3725         (_initialize_symtab): Adjust.
3726         * target.c (target_info): Rename to ...
3727         (info_target_command): ... this.
3728         (initialize_targets): Adjust.
3729         * tracepoint.c (tvariables_info): Rename to ...
3730         (info_tvariables_command): ... this.
3731         (scope_info): Rename to ...
3732         (info_scope_command): ... this.
3733         (trace_dump_actions): Adjust.
3734         (_initialize_tracepoint): Adjust.
3735
3736 2017-08-22  Tom Tromey  <tom@tromey.com>
3737
3738         * breakpoint.h (install_breakpoint): Update.
3739         * breakpoint.c (add_solib_catchpoint): Update.
3740         (install_breakpoint): Change argument to a std::unique_ptr.
3741         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3742         (create_breakpoint_sal, create_breakpoint): Update.
3743         (watch_command_1, catch_exec_command_1)
3744         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3745         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3746         Return the breakpoint.
3747         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3748         (new_single_step_breakpoint): Update.
3749         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3750         std::unique_ptr.
3751         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3752         std::unique_ptr.
3753         * break-catch-sig.c (create_signal_catchpoint): Use
3754         std::unique_ptr.
3755         * ada-lang.c (create_ada_exception_catchpoint): Use
3756         std::unique_ptr.
3757
3758 2017-08-22  Tom Tromey  <tom@tromey.com>
3759
3760         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3761
3762 2017-08-22  Tom Tromey  <tom@tromey.com>
3763
3764         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3765         (lookup_partial_symbol): Update.
3766
3767 2017-08-22  Tom Tromey  <tom@tromey.com>
3768
3769         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3770         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3771         (find_and_open_source, symtab_to_fullname): Update.
3772         * psymtab.c (psymtab_to_fullname): Update.
3773
3774 2017-08-22  Tom Tromey  <tom@tromey.com>
3775
3776         * exec.c (exec_file_attach): Update.
3777         * linux-thread-db.c (try_thread_db_load): Update.
3778         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3779         * utils.c (gdb_realpath): Change return type.
3780         (gdb_realpath_keepfile): Update.
3781         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3782         (_initialize_utils): Register the new self test.
3783         * source.c (openp): Update.
3784         (find_and_open_source): Update.
3785         * nto-tdep.c (nto_find_and_open_solib): Update.
3786         * main.c (set_gdb_data_directory): Update.
3787         (captured_main_1): Update.
3788         * dwarf2read.c (dwarf2_get_dwz_file): Update
3789         (dw2_map_symbol_filenames): Update.
3790         * auto-load.c (auto_load_safe_path_vec_update): Update.
3791         (filename_is_in_auto_load_safe_path_vec): Change type of
3792         "filename_realp".
3793         (auto_load_objfile_script): Update.
3794         (file_is_auto_load_safe): Update.  Use std::string.
3795         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3796
3797 2017-08-22  Tom Tromey  <tom@tromey.com>
3798
3799         * utils.c (gdb_realpath_keepfile): Return a
3800         gdb::unique_xmalloc_ptr.
3801         * exec.c (exec_file_attach): Update.
3802         * utils.h (gdb_realpath_keepfile): Return a
3803         gdb::unique_xmalloc_ptr.
3804
3805 2017-08-22  Tom Tromey  <tom@tromey.com>
3806
3807         * compile/compile.c (compile_file_command): Use
3808         gdb::unique_xmalloc_ptr, std::string.
3809         * utils.c (gdb_abspath): Change return type.
3810         * source.c (openp): Update.
3811         * objfiles.c (allocate_objfile): Update.
3812         * main.c (set_gdb_data_directory): Update.
3813         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3814
3815 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3816
3817         * cli-cmds.c (list_commands): List actual code around more than
3818         one location.
3819
3820 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3821
3822         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3823
3824 2017-08-21  Pedro Alves  <palves@redhat.com>
3825
3826         PR gdb/19487
3827         * c-exp.y (variable production): Handle function aliases.
3828         * minsyms.c (msymbol_is_text): New function.
3829         * minsyms.h (msymbol_is_text): Declare.
3830         * symtab.c (find_function_alias_target): New function.
3831         * symtab.h (find_function_alias_target): Declare.
3832
3833 2017-08-21  Pedro Alves  <palves@redhat.com>
3834
3835         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3836         typedefs.
3837         * typeprint.c (whatis_exp): If handling "whatis", and expression
3838         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3839         typedefs here.
3840         * valops.c (value_cast): Save "to" type before resolving
3841         stubs/typedefs.  Use that type as resulting value's type.
3842
3843 2017-08-18  Tom Tromey  <tom@tromey.com>
3844             Pedro Alves  <palves@redhat.com>
3845
3846         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3847         * sol-thread.c (sol_thread_resume, sol_thread_wait)
3848         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3849         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3850         * proc-service.c (ps_xfer_memory): Use scoped_restore.
3851         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3852         (linux_get_siginfo_data): Add "thread" argument.  Use
3853         scoped_restore.
3854         * linux-nat.c (linux_child_follow_fork)
3855         (check_stopped_by_watchpoint): Use scoped_restore.
3856         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3857         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3858         (restore_inferior_ptid, save_inferior_ptid): Remove.
3859         * btrace.c (btrace_fetch): Use scoped_restore.
3860         * bsd-uthread.c (bsd_uthread_fetch_registers)
3861         (bsd_uthread_store_registers): Use scoped_restore.
3862         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3863         scoped_restore.
3864         * aix-thread.c (aix_thread_resume, aix_thread_wait)
3865         (aix_thread_xfer_partial): Use scoped_restore.
3866         * inferior.h (save_inferior_ptid): Remove.
3867
3868 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3869
3870         PR tdep/21818
3871         * arm-tdep.c (gdb_print_insn_arm): Mark
3872         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3873
3874 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3875
3876         * NEWS: Mention GDBserver's new option "--selftest".
3877         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3878         * selftest.c: Move it to common/selftest.c.
3879         * selftest.h: Move it to common/selftest.h.
3880         * selftest-arch.c (reset): New function.
3881         (tests_with_arch): Call reset.
3882
3883 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3884
3885         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
3886         instead of exception_fprintf and printf_filtered.
3887
3888 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3889
3890         * selftest.c (register_self_test): Rename it to
3891         selftests::register_test.
3892         (run_self_tests): selftest::run_tests.
3893         * selftest.h: Update declarations.
3894         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3895         selftests::register_test_foreach_arch.
3896         * selftest-arch.h: Update declaration.
3897         * aarch64-tdep.c: Update.
3898         * arm-tdep.c: Likewise.
3899         * disasm-selftests.c: Likewise.
3900         * dwarf2loc.c: Likewise.
3901         * dwarf2-frame.c: Likewise.
3902         * findvar.c: Likewise.
3903         * gdbarch-selftests.c: Likewise.
3904         * maint.c (maintenance_selftest): Likewise.
3905         * regcache.c: Likewise.
3906         * rust-exp.y: Likewise.
3907         * selftest-arch.c: Likewise.
3908         * unittests/environ-selftests.c: Likewise.
3909         * unittests/function-view-selftests.c: Likewise.
3910         * unittests/offset-type-selftests.c: Likewise.
3911         * unittests/optional-selftests.c: Likewise.
3912         * unittests/scoped_restore-selftests.c: Likewise.
3913         * utils-selftests.c: Likewise.
3914
3915 2017-08-17  Pedro Alves  <palves@redhat.com>
3916
3917         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3918         local.
3919
3920 2017-08-17  Pedro Alves  <palves@redhat.com>
3921
3922         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3923         field.
3924         (reset_die_in_process): Delete, replaced by ...
3925         (process_die_scope): ... this new class.  Make it responsible for
3926         freeing cu->line_header too.
3927         (process_die): Use process_die_scope.
3928         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3929         cu->line_header_die_owner.  Don't release the line header if it's
3930         owned by the CU.
3931         (setup_type_unit_groups): Make the CU/DIE own the line header.
3932         Don't release the line header here.
3933
3934 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
3935
3936         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3937
3938 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3939
3940         * NEWS: Mention new shortcuts for nexti and stepi in TUI
3941         Single-Key mode
3942
3943 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3944
3945         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3946         mode command list.
3947
3948 2017-08-15  Stafford Horne  <shorne@gmail.com>
3949
3950         * MAINTAINERS (Write After Approval): Add Stafford Horne.
3951
3952 2017-08-15  Stafford Horne  <shorne@gmail.com>
3953
3954         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3955
3956 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3957
3958         PR gdb/21954
3959         * infcmd.c (unset_environment_command): Use the 'clear' method on
3960         the environment instead of resetting it.
3961
3962 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
3963
3964         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3965         platforms.
3966
3967 2017-08-14  Tom Tromey  <tom@tromey.com>
3968
3969         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3970         (print_binary_chars): Likewise.
3971         (BITS_IN_BYTES): Remove.
3972
3973 2017-08-14  Tom Tromey  <tom@tromey.com>
3974
3975         PR gdb/21675
3976         * valprint.c (LOW_ZERO): Change value to 034.
3977         (print_octal_chars): Add static_asserts for octal constants.
3978         * printcmd.c (print_scalar_formatted): Add 'd' case.
3979
3980 2017-08-11  Tom Tromey  <tom@tromey.com>
3981
3982         * symfile.c (add_symbol_file_command): Use std::vector.
3983
3984 2017-08-14  Tom Tromey  <tom@tromey.com>
3985
3986         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3987         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3988         std::move.
3989         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3990
3991 2017-08-11  Pedro Alves  <palves@redhat.com>
3992
3993         * infrun.c (process_event_stop_test): Adjust
3994         function_name_is_marked_for_skip call.
3995         * skip.c: Include <list>.
3996         (skiplist_entry): Make it a class with private fields, and
3997         getters/setters.
3998         (skiplist_entry_chain): Delete.
3999         (skiplist_entries): New.
4000         (skiplist_entry_count): Delete.
4001         (highest_skiplist_entry_num): New.
4002         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4003         (add_skiplist_entry): Delete.
4004         (skiplist_entry::skiplist_entry): New.
4005         (skiplist_entry::add_entry): New.
4006         (skip_file_command, skip_function): Adjust.
4007         (compile_skip_regexp): Delete.
4008         (skip_command): Don't compile regexp here.  Adjust to use
4009         skiplist_entry::add_entry.
4010         (skip_info): Adjust to use range-for and getters.
4011         (skip_enable_command, skip_disable_command): Adjust to use
4012         range-for and setters.
4013         (skip_delete_command): Adjust to use std::list.
4014         (add_skiplist_entry): Delete.
4015         (skip_file_p): Delete, refactored as ...
4016         (skiplist_entry::do_skip_file_p): ... this new method.
4017         (skip_gfile_p): Delete, refactored as ...
4018         (skiplist_entry::do_gskip_file_p): ... this new method.
4019         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4020         (skiplist_entry::skip_function_p): ... this new method.
4021         (function_name_is_marked_for_skip): Now returns bool, and takes
4022         the function sal by const reference.  Adjust to use range-for and
4023         skiplist_entry methods.
4024         (_initialize_step_skip): Remove references to
4025         skiplist_entry_chain, skiplist_entry_count.
4026         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4027         takes the function sal by const reference.
4028
4029 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4030
4031         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4032         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4033         (dwarf2_frame_cache):
4034         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4035         RETURN_MASK_ALL and set *this_case to NULL.
4036         * frame-unwind.h: Update comments.
4037
4038 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4039
4040         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4041         (dwarf2_frame_state_copy_regs): Remove.
4042         (dwarf2_frame_state_free_regs): Remove.
4043         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4044         (dwarf2_restore_rule): Call method .alloc_regs instead of
4045         dwarf2_frame_state_alloc_regs.
4046         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4047         constructor.  Call std::move.
4048         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4049         (dwarf2_frame_cache): Likewise.
4050
4051         [GDB_SELF_TEST]: Include selftest.h and
4052         selftest-arch.h.
4053         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4054         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4055         execute_cfa_program_test.
4056
4057         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4058         copy ctor, assignment operator, move assignment.
4059         <alloc_regs>: New method.
4060         <swap>: New method.
4061         (struct dwarf2_frame_state): Delete dtor.
4062         (dwarf2_frame_state_alloc_regs): Remove declaration.
4063         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4064         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4065
4066 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4067
4068         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4069         (dwarf2_frame_state::dwarf2_frame_state): New.
4070         (dwarf2_frame_state::~dwarf2_frame_state): New.
4071         (dwarf2_fetch_cfa_info): Update.
4072         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4073         rather than a pointer.  Update code.
4074         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4075         dtor.
4076         <data_align, code_align, retaddr_column>: Change them to const.
4077         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4078         to bool.
4079
4080 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4081
4082         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4083         <loc.exp>: New field.
4084         * dwarf2-frame.c (execute_cfa_program): Update.
4085         (dwarf2_frame_prev_register): Update.
4086
4087 2017-08-10  Pedro Alves  <palves@redhat.com>
4088
4089         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4090
4091 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4092
4093         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4094         (fbsd_pending_children): Use std::list.
4095         (fbsd_remember_child): Likewise.
4096         (fbsd_is_child_pending): Likewise.
4097         (fbsd_pending_vfork_done): Use std::forward_list.
4098         (fbsd_add_vfork_done): Likewise.
4099         (fbsd_is_vfork_done_pending): Likewise.
4100         (fbsd_next_vfork_done): Likewise.
4101
4102 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4103
4104         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4105         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4106         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4107         for `mapfilename'.
4108         (fbsd_xfer_partial): Use gdb::byte_vector.
4109         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4110
4111 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4112
4113         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4114         "filestuff.h".
4115         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4116
4117 2017-08-09  Tom Tromey  <tom@tromey.com>
4118
4119         * skip.c (skiplist_entry): New constructor.
4120         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4121         (skiplist_entry::file_is_glob): Now bool.
4122         (skiplist_entry::file, skiplist_entry::function): Now
4123         std::string.
4124         (make_skip_entry): Return a unique_ptr.  Use new.
4125         (free_skiplist_entry, free_skiplist_entry_cleanup)
4126         (make_free_skiplist_entry_cleanup): Remove.
4127         (skip_command, skip_disable_command, add_skiplist_entry)
4128         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4129         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4130         (function_name_is_marked_for_skip): Update.
4131         (skip_delete_command): Update.  Use delete.
4132
4133 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4134
4135         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4136         (aarch64_linux_core_read_description): New function.
4137         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4138
4139 2017-08-09  Pedro Alves  <palves@redhat.com>
4140
4141         * cp-name-parser.y (cp_comp_to_string): Return a
4142         gdb::unique_xmalloc_ptr<char>.
4143         * cp-support.c (replace_typedefs_qualified_name)
4144         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4145         (cp_canonicalize_string_full): Use op= instead of explicit
4146         convertion.
4147         (cp_class_name_from_physname, method_name_from_physname)
4148         (cp_func_name, cp_remove_params): Adjust to use
4149         gdb::unique_xmalloc_ptr<char>.
4150         * cp-support.h (cp_comp_to_string): Return a
4151         gdb::unique_xmalloc_ptr<char>.
4152         * python/py-type.c (typy_lookup_type): Adjust to use
4153         gdb::unique_xmalloc_ptr<char>.
4154
4155 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4156
4157         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4158
4159 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4160             Yao Qi  <yao.qi@linaro.org>
4161
4162         * cp-support.c (cp_canonicalize_string_full): Use
4163         gdb::unique_xmalloc_ptr<char>.
4164         (cp_canonicalize_string): Likewise.
4165
4166 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4167
4168         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4169         * regformats/i386/amd64-avx-avx512.dat: Remove.
4170         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4171         * regformats/i386/amd64-avx-mpx.dat:Remove.
4172         * regformats/i386/amd64-avx.dat: Remove.
4173         * regformats/i386/amd64-mpx.dat: Remove.
4174         * regformats/i386/i386-avx-avx512.dat: Remove.
4175         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4176         * regformats/i386/i386-avx-mpx.dat: Remove.
4177         * regformats/i386/i386-mmx.dat: Remove.
4178         * regformats/i386/i386-mpx.dat: Remove.
4179
4180 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4181
4182         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4183         * amd64-tdep.c: Don't include features/i386/x32*.c.
4184         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4185         functions.
4186         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4187         and i386/x32-avx-avx512.
4188         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4189         and i386/x32.xml.
4190         * features/i386/x32-avx-avx512.c: Removed.
4191         * features/i386/x32-avx-avx512.xml: Removed.
4192         * features/i386/x32-avx.c: Removed.
4193         * features/i386/x32-avx.xml: Removed.
4194         * features/i386/x32.c: Removed.
4195         * features/i386/x32.xml: Removed.
4196         * regformats/i386/x32-avx-avx512.dat: Removed.
4197         * regformats/i386/x32-avx.dat: Removed.
4198         * regformats/i386/x32.dat: Removed.
4199
4200 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4201
4202         PR breakpoints/21886
4203         * mem-break.c (default_memory_insert_breakpoint): Use
4204         `->placed_address' rather than `->reqstd_address' for the
4205         breakpoint location.
4206
4207 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4208
4209         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4210         assertions.
4211
4212 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4213
4214         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4215         a union of `tdep_info', `tdesc_data' and `id'.
4216         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4217         rather than `info.tdep_info'.
4218         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4219         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4220         * i386-tdep.c (i386_gdbarch_init): Likewise.
4221         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4222         * mips-tdep.c (mips_gdbarch_init): Likewise.
4223         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4224         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4225         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4226         `info.tdep_info'.
4227         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4228         `info.tdep_info'.
4229         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4230         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4231         `info.tdep_info'.
4232         * spu-tdep.c (spu_gdbarch_init): Likewise.
4233         * gdbarch.h: Regenerate.
4234
4235 2017-08-07  Leszek Swirski  <leszeks@google.com>
4236
4237         PR symtab/20899
4238         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4239
4240 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4241
4242         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4243         (gdbsim_open): Rename gdb_argv args object to argv.
4244
4245 2017-08-05  Tom Tromey  <tom@tromey.com>
4246
4247         * compile/compile-object-load.c (compile_object_load): Use
4248         gdb::unique_xmalloc_ptr.
4249         * cli/cli-dump.c (scan_filename): Rename from
4250         scan_filename_with_cleanup.  Change return type.
4251         (scan_expression): Rename from scan_expression_with_cleanup.
4252         Change return type.
4253         (dump_memory_to_file, dump_value_to_file, restore_command):
4254         Use gdb::unique_xmalloc_ptr.  Update.
4255         * cli/cli-cmds.c (find_and_open_script): Use
4256         gdb::unique_xmalloc_ptr.
4257         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4258         * symmisc.c (maintenance_print_symbols)
4259         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4260         * symfile.c (symfile_bfd_open, generic_load)
4261         (add_symbol_file_command, remove_symbol_file_command): Use
4262         gdb::unique_xmalloc_ptr.
4263         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4264         * psymtab.c (maintenance_print_psymbols): Use
4265         gdb::unique_xmalloc_ptr.
4266         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4267         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4268         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4269         (reload_shared_libraries_1): Likewise.
4270
4271 2017-08-05  Tom Tromey  <tom@tromey.com>
4272
4273         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4274         (rust_op_vector, rust_set_vector): New typedefs.
4275         (current_parser): New global.
4276         (work_obstack): Change to pointer type.  Update all users.
4277         (rust_ast, pstate): Remove globals.
4278         (struct rust_parser): New.
4279         (%union) <params, field_inits>: Change type.
4280         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4281         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4282         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4283         (convert_params_to_types, convert_params_to_expression): Change
4284         type of "params".
4285         (ast_string): Change type of "fields".
4286         (rust_parse): Make a rust_parser.  Remove cleanups.
4287         (rust_lex_tests): Make and install an auto_obstack.
4288
4289 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4290
4291         * configure.srv (ipa_x32_linux_regobj): New.
4292         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4293         instead of X86_TDESC_AVX512.
4294         (initialize_low_tracepoint): Call
4295         init_registers_x32_avx_avx512_linux.
4296
4297 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4298
4299         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4300
4301 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4302
4303         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4304
4305 2017-08-03  Tom Tromey  <tom@tromey.com>
4306
4307         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4308         Remove.
4309         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4310
4311 2017-08-03  Tom Tromey  <tom@tromey.com>
4312
4313         * python/py-param.c (compute_enum_values): Use gdb_argv.
4314
4315 2017-08-03  Tom Tromey  <tom@tromey.com>
4316
4317         * utils.h (struct gdb_argv_deleter): New.
4318         (gdb_argv): New class.
4319         * utils.c (gdb_argv::reset): New method.
4320         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4321         * tracefile.c (tsave_command): Use gdb_argv.
4322         * top.c (new_ui_command): Use gdb_argv.
4323         * symmisc.c (maintenance_print_symbols)
4324         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4325         * symfile.c (symbol_file_command, generic_load)
4326         (remove_symbol_file_command): Use gdb_argv.
4327         * stack.c (backtrace_command): Use gdb_argv.
4328         * source.c (add_path, show_substitute_path_command)
4329         (unset_substitute_path_command, set_substitute_path_command):
4330         Use gdb_argv.
4331         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4332         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4333         * remote.c (extended_remote_run, remote_put_command)
4334         (remote_get_command, remote_delete_command): Use gdb_argv.
4335         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4336         (gdbsim_open): Use gdb_argv.
4337         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4338         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4339         * procfs.c (procfs_info_proc): Use gdb_argv.
4340         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4341         * infrun.c (handle_command): Use gdb_argv.
4342         * inferior.c (add_inferior_command, clone_inferior_command):
4343         Use gdb_argv.
4344         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4345         * exec.c (exec_file_command): Use gdb_argv.
4346         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4347         * compile/compile.c (build_argc_argv): Use gdb_argv.
4348
4349 2017-08-03  Tom Tromey  <tom@tromey.com>
4350
4351         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4352
4353 2017-08-03  Tom Tromey  <tom@tromey.com>
4354
4355         * python/python.c (compute_python_string): Return std::string.
4356         (gdbpy_eval_from_control_command): Update.
4357         (do_start_initialization): Use std::string.
4358         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4359         xstrprintf.
4360         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4361         xstrprintf.
4362
4363 2017-08-03  Tom Tromey  <tom@tromey.com>
4364
4365         * top.h (do_restore_instream_cleanup): Remove.
4366         * top.c (do_restore_instream_cleanup): Remove.
4367         (read_command_file): Use scoped_restore.
4368         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4369
4370 2017-08-03  Tom Tromey  <tom@tromey.com>
4371
4372         * cli/cli-script.c (execute_user_command)
4373         (execute_control_command): Use scoped_restore.
4374
4375 2017-08-03  Tom Tromey  <tom@tromey.com>
4376
4377         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4378         (execute_user_command): Remove user_call_depth; use
4379         user_args_stack's size instead.
4380
4381 2017-08-03  Tom Tromey  <tom@tromey.com>
4382
4383         * top.h (in_user_command): Remove.
4384         * top.c (in_user_command): Remove.
4385         * cli/cli-script.c (do_restore_user_call_depth)
4386         (execute_user_command): Update.
4387
4388 2017-08-03  Tom Tromey  <tom@tromey.com>
4389
4390         * valops.c (search_struct_method): Use gdb::byte_vector.
4391         * valarith.c (value_concat): Use std::vector.
4392         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4393         (simple_search_memory): Likewise.
4394         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4395         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4396         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4397         * elfread.c (elf_rel_plt_read): Use std::string.
4398         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4399         * cli/cli-dump.c (restore_section_callback): Use
4400         gdb::byte_vector.
4401
4402 2017-08-03  Tom Tromey  <tom@tromey.com>
4403
4404         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4405
4406 2017-08-03  Tom Tromey  <tom@tromey.com>
4407
4408         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4409         (tui_register_format): Use scoped_restore.
4410
4411 2017-08-03  Tom Tromey  <tom@tromey.com>
4412
4413         * reverse.c (exec_direction_default): Remove.
4414         (exec_reverse_once): Use scoped_restore.
4415         * remote.c (restore_remote_timeout): Remove.
4416         (remote_flash_erase, remote_flash_write, remote_flash_done)
4417         (readchar, remote_serial_write): Use scoped_restore.
4418         * cli/cli-script.c (struct source_cleanup_lines_args)
4419         (source_cleanup_lines): Remove.
4420         (script_from_file): Use scoped_restore.
4421         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4422         (source_command): Use scoped_restore.
4423
4424 2017-08-03  Tom Tromey  <tom@tromey.com>
4425
4426         * utils.h (make_cleanup_free_so): Remove.
4427         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4428         * solist.h (struct so_deleter): New.
4429         (so_list_up): New typedef.
4430         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4431
4432 2017-08-03  Tom Tromey  <tom@tromey.com>
4433
4434         * utils.h (make_cleanup_restore_current_language): Remove.
4435         * utils.c (do_restore_current_language)
4436         (make_cleanup_restore_current_language): Remove.
4437         * parse.c (parse_exp_in_context_1)
4438         (parse_expression_with_language): Use
4439         scoped_restore_current_language.
4440         * mi/mi-main.c (mi_cmd_execute): Use
4441         scoped_restore_current_language.
4442         * language.h (scoped_restore_current_language): New class.
4443
4444 2017-08-03  Tom Tromey  <tom@tromey.com>
4445
4446         * compile/compile.c (cleanup_unlink_file): Remove.
4447         (compile_to_object): Use gdb::unlinker.
4448         (eval_compile_command): Likewise.
4449
4450 2017-08-03  Tom Tromey  <tom@tromey.com>
4451
4452         * utils.h (make_cleanup_fclose): Remove.
4453         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4454
4455 2017-08-03  Tom Tromey  <tom@tromey.com>
4456
4457         * top.c (open_terminal_stream): Return gdb_file_up.
4458         (new_ui_command): Update.
4459
4460 2017-08-03  Tom Tromey  <tom@tromey.com>
4461
4462         * source.c (print_source_lines_base, forward_search_command)
4463         (reverse_search_command): Use gdb_file_up.
4464
4465 2017-08-03  Tom Tromey  <tom@tromey.com>
4466
4467         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4468
4469 2017-08-03  Tom Tromey  <tom@tromey.com>
4470
4471         * cli/cli-cmds.c (find_and_open_script): Change return type.
4472         Remove "streamp" and "full_path" parameters.
4473         (source_script_with_search): Update.
4474         * auto-load.c (source_script_file): Update.
4475         * cli/cli-cmds.h (find_and_open_script): Change type.
4476         (open_script): New struct.
4477
4478 2017-08-03  Tom Tromey  <tom@tromey.com>
4479
4480         * xml-support.c (xml_fetch_content_from_file): Update.
4481         * ui-file.c (stdio_file::open): Update.
4482         * tracefile-tfile.c (tfile_start): Update.
4483         * remote.c (remote_file_put, remote_file_get): Update.
4484         * nat/linux-procfs.c (linux_proc_get_int)
4485         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4486         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4487         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4488         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4489         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4490         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4491         * linux-nat.c (linux_proc_pending_signals): Update.
4492         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4493         (file_closer): Remove.
4494         * compile/compile.c (compile_to_object): Update.
4495         * common/filestuff.h (struct gdb_file_deleter): New.
4496         (gdb_file_up): New typedef.
4497         (gdb_fopen_cloexec): Change return type.
4498         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4499         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4500         (dump_binary_file, restore_binary_file): Update.
4501         * auto-load.c (auto_load_objfile_script_1): Update.
4502
4503 2017-08-03  Tom Tromey  <tom@tromey.com>
4504
4505         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4506         (info_static_tracepoint_markers_command): Likewise.
4507         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4508         * skip.c (skip_info): Use ui_out_emit_table.
4509         * progspace.c (print_program_space): Use ui_out_emit_table.
4510         * osdata.c (info_osdata): Use ui_out_emit_table.
4511         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4512         ui_out_emit_table.
4513         * linux-thread-db.c (info_auto_load_libthread_db): Use
4514         ui_out_emit_table.
4515         * inferior.c (print_inferior): Use ui_out_emit_table.
4516         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4517         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4518         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4519         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4520         * ui-out.h (class ui_out_emit_table): New.
4521
4522 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4523
4524         * mips-tdep.c (mips_fpu_type_str): New function.
4525         (mips_dump_tdep): Call it.
4526
4527 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4528
4529         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4530         `->mips_fpu_type'.
4531
4532 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4533
4534         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4535
4536 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4537
4538         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4539
4540 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4541
4542         * cli/cli-cmds.c (maintenancechecklist): New variable.
4543         * gdbcmd.h (maintenancechecklist): Declare it.
4544         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4545         Call i386_linux_read_description with different masks.
4546         * maint.c (maintenance_check_command): New function.
4547         (_initialize_maint_cmds): Call add_prefix_cmd.
4548         * target-descriptions.c (tdesc_reg): override operator != and ==.
4549         (tdesc_type): Likewise.
4550         (tdesc_feature): Likewise.
4551         (target_desc): Likewise.
4552         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4553         (maintenance_check_xml_descriptions): New function.
4554         (_initialize_target_descriptions) Add command "xml-descriptions".
4555         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4556
4557 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4558
4559         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4560         Include features/i386/32bit-*.c.
4561         (i386_linux_read_description): Generate target description if it
4562         doesn't exist.
4563         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4564         functions.
4565         * features/i386/32bit-linux.c: Re-generated.
4566         * features/i386/32bit-sse.c: Likewise.
4567         * target-descriptions.c (print_c_feature::visit): Print code to
4568         set register number if needed.
4569         (print_c_feature) <m_next_regnum>: New field.
4570
4571 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4572
4573         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4574         (FEATURE_XMLFILES): New.
4575         (FEATURE_CFILES): New.
4576         New rules.
4577         (clean-cfiles): Remove generated c files.
4578         * features/i386/32bit-avx.c: Generated.
4579         * features/i386/32bit-avx512.c: Generated.
4580         * features/i386/32bit-core.c: Generated.
4581         * features/i386/32bit-linux.c: Generated.
4582         * features/i386/32bit-mpx.c: Generated.
4583         * features/i386/32bit-pkeys.c: Generated.
4584         * features/i386/32bit-sse.c: Generated.
4585         * target-descriptions.c: Include algorithm.
4586         (tdesc_element_visitor): Add method visit_end.
4587         (print_c_tdesc): Implement visit_end.
4588         (print_c_tdesc:: m_filename_after_features): Move it to
4589         protected.
4590         (print_c_feature): New class.
4591         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4592         name starts with "i386/32bit-".
4593
4594 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4595
4596         * target-descriptions.c (tdesc_element_visitor): New class.
4597         (tdesc_element): New class.
4598         (tdesc_reg): Inherit from tdesc_element.
4599         (tdesc_reg::accept): New function.
4600         (tdesc_type): Inherit from tdesc_element.
4601         (tdesc_type::accept): New function.
4602         (tdesc_feature): Inherit from tdesc_element.
4603         (tdesc_feature::accept): New function.
4604         (target_desc): Inherit from tdesc_element.
4605         (target_desc::target_desc): New.
4606         (target_desc::~target_desc): New.
4607         (target_desc::accept): New.
4608         (allocate_target_description): Use new.
4609         (free_target_description): Use delete.
4610         (print_c_tdesc): New class.
4611         (maint_print_c_tdesc_cmd): Adjust.
4612
4613         * features/aarch64.c: Re-generated.
4614         * features/arc-arcompact.c: Re-generated.
4615         * features/arc-v2.c: Re-generated.
4616         * features/arm/arm-with-iwmmxt.c: Re-generated.
4617         * features/arm/arm-with-m.c: Re-generated.
4618         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4619         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4620         * features/arm/arm-with-neon.c: Re-generated.
4621         * features/arm/arm-with-vfpv2.c: Re-generated.
4622         * features/arm/arm-with-vfpv3.c: Re-generated.
4623         * features/i386/amd64-avx-avx512.c: Re-generated.
4624         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4625         * features/i386/amd64-avx.c: Re-generated.
4626         * features/i386/amd64-avx-linux.c: Re-generated.
4627         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4628         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4629         * features/i386/amd64-avx-mpx.c: Re-generated.
4630         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4631         * features/i386/amd64.c: Re-generated.
4632         * features/i386/amd64-linux.c: Re-generated.
4633         * features/i386/amd64-mpx.c: Re-generated.
4634         * features/i386/amd64-mpx-linux.c: Re-generated.
4635         * features/i386/i386-avx-avx512.c: Re-generated.
4636         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4637         * features/i386/i386-avx.c: Re-generated.
4638         * features/i386/i386-avx-linux.c: Re-generated.
4639         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4640         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4641         * features/i386/i386-avx-mpx.c: Re-generated.
4642         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4643         * features/i386/i386.c: Re-generated.
4644         * features/i386/i386-linux.c: Re-generated.
4645         * features/i386/i386-mmx.c: Re-generated.
4646         * features/i386/i386-mmx-linux.c: Re-generated.
4647         * features/i386/i386-mpx.c: Re-generated.
4648         * features/i386/i386-mpx-linux.c: Re-generated.
4649         * features/i386/x32-avx-avx512.c: Re-generated.
4650         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4651         * features/i386/x32-avx.c: Re-generated.
4652         * features/i386/x32-avx-linux.c: Re-generated.
4653         * features/i386/x32.c: Re-generated.
4654         * features/i386/x32-linux.c: Re-generated.
4655         * features/microblaze.c: Re-generated.
4656         * features/microblaze-with-stack-protect.c: Re-generated.
4657         * features/mips64-dsp-linux.c: Re-generated.
4658         * features/mips64-linux.c: Re-generated.
4659         * features/mips-dsp-linux.c: Re-generated.
4660         * features/mips-linux.c: Re-generated.
4661         * features/nds32.c: Re-generated.
4662         * features/nios2.c: Re-generated.
4663         * features/nios2-linux.c: Re-generated.
4664         * features/rs6000/powerpc-32.c: Re-generated.
4665         * features/rs6000/powerpc-32l.c: Re-generated.
4666         * features/rs6000/powerpc-403.c: Re-generated.
4667         * features/rs6000/powerpc-403gc.c : Re-generated.
4668         * features/rs6000/powerpc-405.c: Re-generated.
4669         * features/rs6000/powerpc-505.c: Re-generated.
4670         * features/rs6000/powerpc-601.c: Re-generated.
4671         * features/rs6000/powerpc-602.c: Re-generated.
4672         * features/rs6000/powerpc-603.c: Re-generated.
4673         * features/rs6000/powerpc-604.c: Re-generated.
4674         * features/rs6000/powerpc-64.c: Re-generated.
4675         * features/rs6000/powerpc-64l.c: Re-generated.
4676         * features/rs6000/powerpc-7400.c: Re-generated.
4677         * features/rs6000/powerpc-750.c: Re-generated.
4678         * features/rs6000/powerpc-860.c: Re-generated.
4679         * features/rs6000/powerpc-altivec32.c: Re-generated.
4680         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4681         * features/rs6000/powerpc-altivec64.c: Re-generated.
4682         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4683         * features/rs6000/powerpc-cell32l.c: Re-generated.
4684         * features/rs6000/powerpc-cell64l.c: Re-generated.
4685         * features/rs6000/powerpc-e500.c: Re-generated.
4686         * features/rs6000/powerpc-e500l.c: Re-generated.
4687         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4688         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4689         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4690         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4691         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4692         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4693         * features/rs6000/powerpc-vsx32.c: Re-generated.
4694         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4695         * features/rs6000/powerpc-vsx64.c: Re-generated.
4696         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4697         * features/rs6000/rs6000.c: Re-generated.
4698         * features/s390-linux32.c: Re-generated.
4699         * features/s390-linux32v1.c: Re-generated.
4700         * features/s390-linux32v2.c: Re-generated.
4701         * features/s390-linux64.c: Re-generated.
4702         * features/s390-linux64v1.c: Re-generated.
4703         * features/s390-linux64v2.c: Re-generated.
4704         * features/s390-te-linux64.c: Re-generated.
4705         * features/s390-tevx-linux64.c: Re-generated.
4706         * features/s390-vx-linux64.c: Re-generated.
4707         * features/s390x-linux64.c: Re-generated.
4708         * features/s390x-linux64v1.c: Re-generated.
4709         * features/s390x-linux64v2.c: Re-generated.
4710         * features/s390x-te-linux64.c: Re-generated.
4711         * features/s390x-tevx-linux64.c: Re-generated.
4712         * features/s390x-vx-linux64.c: Re-generated.
4713         * features/sparc/sparc32-solaris.c: Re-generated.
4714         * features/sparc/sparc64-solaris.c: Re-generated.
4715         * features/tic6x-c62x.c: Re-generated.
4716         * features/tic6x-c62x-linux.c: Re-generated.
4717         * features/tic6x-c64x.c: Re-generated.
4718         * features/tic6x-c64x-linux.c: Re-generated.
4719         * features/tic6x-c64xp.c: Re-generated.
4720         * features/tic6x-c64xp-linux.c: Re-generated.
4721
4722 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4723
4724         * i386-linux-tdep.c (i386_linux_read_description): New function.
4725         (i386_linux_core_read_description): Call
4726         i386_linux_read_description.
4727         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4728         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4729         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4730         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4731         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4732         * x86-linux-nat.c (x86_linux_read_description): Call
4733         i386_linux_read_description.
4734
4735 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4736
4737         * NEWS: Mention it.
4738         * features/Makefile (%.c: %.xml): Pass the xml file name to
4739         command "maint print c-tdesc".
4740         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4741         name from 'arg'.
4742
4743 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4744
4745         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4746         in-class initialization.
4747         (tdesc_create_feature): Call new instead of XCNEW.
4748         (free_target_description): Ue delete.
4749
4750 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4751
4752         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4753
4754 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4755
4756         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4757         constant.
4758         (amd64_x32_init_abi): Likewise.
4759         * amd64-tdep.h (amd64_init_abi): Update declaration.
4760         (amd64_x32_init_abi): Likewise.
4761
4762 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4763
4764         PR tdep/21717
4765         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4766         condition for FPSCR.
4767         (arm_linux_store_inferior_registers): Likewise.
4768
4769 2017-07-22  Tom Tromey  <tom@tromey.com>
4770
4771         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4772         <syscalls_counts>: Now a std::vector.
4773         (get_catch_syscall_inferior_data): Use "new".
4774         (catch_syscall_inferior_data_cleanup): Use "delete".
4775         (insert_catch_syscall, remove_catch_syscall)
4776         (clear_syscall_counts): Update.
4777
4778 2017-07-22  Tom Tromey  <tom@tromey.com>
4779
4780         * break-catch-syscall.c (syscall_catchpoint)
4781         <syscalls_to_be_caught>: Now a std::vector<int>
4782         (~syscall_catchpoint): Remove.
4783         (insert_catch_syscall, remove_catch_syscall)
4784         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4785         (print_mention_catch_syscall, print_recreate_catch_syscall):
4786         Update.
4787         (create_syscall_event_catchpoint): Change type of "filter"
4788         parameter.
4789         (catch_syscall_split_args): Return a std::vector.
4790         (catch_syscall_command_1, catching_syscall_number_1): Update.
4791
4792 2017-07-22  Tom Tromey  <tom@tromey.com>
4793
4794         * break-catch-throw.c (struct exception_catchpoint)
4795         <exception_rx>: Now a std::string.
4796         (~exception_catchpoint): Remove.
4797         (print_one_detail_exception_catchpoint): Update.
4798         (handle_gnu_v3_exceptions): Change type of except_rx.
4799         (extract_exception_regexp): Return a std::string.
4800         (catch_exception_command_1): Update.
4801
4802 2017-07-22  Tom Tromey  <tom@tromey.com>
4803
4804         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4805         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4806         std::vector.
4807         <catch_all>: Now a bool.
4808         (~signal_catchpoint): Remove.
4809         (signal_catchpoint_insert_location)
4810         (signal_catchpoint_remove_location)
4811         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4812         (signal_catchpoint_print_mention)
4813         (signal_catchpoint_print_recreate)
4814         (signal_catchpoint_explains_signal): Update.
4815         (create_signal_catchpoint): Change type of "filter" and
4816         "catch_all".
4817         (catch_signal_split_args): Return a std::vector.  Change type of
4818         "catch_all".
4819         (catch_signal_command): Update.
4820
4821 2017-07-20  Pedro Alves  <palves@redhat.com>
4822
4823         * ada-lang.c (ada_language_defn): Make extern.
4824         (_initialize_ada_language): Remove add_language call.
4825         * c-lang.c (c_language_defn, cplus_language_defn)
4826         (asm_language_defn, minimal_language_defn): Make extern.
4827         (_initialize_c_language): Delete.
4828         * completer.c (compare_cstrings): Delete, moved to utils.h.
4829         * d-lang.c (d_language_defn): Make extern.
4830         (_initialize_d_language): Remove add_language calls.
4831         * defs.h (enum language): Add comment.
4832         * f-lang.c (f_language_defn): Make extern.
4833         (_initialize_f_language): Remove add_language call.
4834         * go-lang.c (go_language_defn): Make extern.
4835         (_initialize_go_language): Remove add_language call.
4836         * language.c: Include <algorithm>.
4837         (languages): Redefine as const array.
4838         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4839         (set_language_command): Handle "local".  Use for-range loop.
4840         (set_language): Remove loop.
4841         (language_enum): Rewrite.
4842         (language_def, language_str): Remove loops.
4843         (add_language): Delete.
4844         (add_set_language_command): New, based on add_languages.
4845         (skip_language_trampoline): Adjust.
4846         (local_language_defn): Delete.
4847         (language_gdbarch_post_init): Adjust.
4848         (_initialize_language): Remove add_language calls.  Call
4849         add_set_language_command.
4850         * language.h (add_language): Delete.
4851         (auto_language_defn)
4852         (unknown_language_defn, minimal_language_defn, ada_language_defn)
4853         (asm_language_defn, c_language_defn, cplus_language_defn)
4854         (d_language_defn, f_language_defn, go_language_defn)
4855         (m2_language_defn, objc_language_defn, opencl_language_defn)
4856         (pascal_language_defn, rust_language_defn): Declare.
4857         * m2-lang.c (m2_language_defn): Make extern.
4858         (_initialize_m2_language): Remove add_language call.
4859         * objc-lang.c (objc_language_defn): Make extern.
4860         (_initialize_objc_language): Remove add_language call.
4861         * opencl-lang.c (opencl_language_defn): Make extern.
4862         (_initialize_opencl_language): Remove add_language call.
4863         * p-lang.c (pascal_language_defn): Make extern.
4864         (_initialize_pascal_language): Delete.
4865         * rust-lang.c (rust_language_defn): Make extern.
4866         (_initialize_rust_language): Delete.
4867         * utils.h (compare_cstrings): New static inline function.
4868
4869 2017-07-20  Pedro Alves  <palves@redhat.com>
4870
4871         * ada-lang.c (ada_to_fixed_type_1): Adjust.
4872         (get_var_value): Constify parameters.
4873         (get_int_var_value): Change prototype.
4874         (to_fixed_range_type): Adjust.
4875         * ada-lang.h (get_int_var_value): Change prototype.
4876
4877 2017-07-20  Pedro Alves  <palves@redhat.com>
4878
4879         * dwarf2read.c (dw2_lookup_symbol): Use
4880         SYMBOL_MATCHES_SEARCH_NAME.
4881         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4882
4883 2017-07-20  Pedro Alves  <palves@redhat.com>
4884
4885         * block.c (block_iter_name_step, block_iter_name_first)
4886         (block_iter_name_next): Delete.
4887         (block_lookup_symbol_primary): Adjust to use
4888         dict_iter_match_first/dict_iter_match_next.
4889         * block.h (block_iter_name_first, block_iter_name_next): Delete
4890         declarations.
4891         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4892         dict_iter_match_first/dict_iter_match_next.
4893
4894 2017-07-20  Pedro Alves  <palves@redhat.com>
4895
4896         * cp-support.c (cp_find_first_component_aux): Add missing case for
4897         end of string.
4898
4899 2017-07-18  David Blaikie  <dblaikie@gmail.com>
4900
4901         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4902         of dwo_cu's dwo_file.
4903
4904 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4905
4906         * remote.c (store_registers_using_G): Remove one line comment.
4907
4908 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4909
4910         * regcache.c (regcache_cpy): Simplify it.
4911         (regcache::cpy_no_passthrough): Remove it.
4912         * regcache.h (cpy_no_passthrough): Remove it.
4913         (regcache_dup, regcache_cpy): Update comments.
4914
4915 2017-07-18  Pedro Alves  <palves@redhat.com>
4916
4917         * remote-sim.c (sim_command_completer): Adjust to work with a
4918         completion_tracker instead of a VEC.
4919
4920 2017-07-17  Pedro Alves  <palves@redhat.com>
4921
4922         * completer.c (complete_source_filenames): New function.
4923         (complete_address_and_linespec_locations): New function.
4924         (location_completer): Use complete_address_and_linespec_locations.
4925         (completion_tracker::build_completion_result): Honor the tracker's
4926         request to suppress append.
4927         * completer.h (completion_tracker::suppress_append_ws)
4928         (completion_tracker::set_suppress_append_ws): New methods.
4929         (completion_tracker::m_suppress_append_ws): New field.
4930         (complete_source_filenames): New declaration.
4931         * linespec.c (linespec_complete_what): New.
4932         (struct ls_parser) <complete_what, completion_word,
4933         completion_quote_char, completion_quote_end, completion_tracker>:
4934         New fields.
4935         (string_find_incomplete_keyword_at_end): New.
4936         (linespec_lexer_lex_string): Record quote char.  If in completion
4937         mode, don't throw.
4938         (linespec_lexer_consume_token): Advance the completion word point.
4939         (linespec_lexer_peek_token): Save/restore completion info.
4940         (save_stream_and_consume_token): New.
4941         (set_completion_after_number): New.
4942         (linespec_parse_basic): Set what to complete next depending on
4943         token.  Handle function and label completions specially.
4944         (parse_linespec): Disable objc shortcut in completion mode.  Set
4945         what to complete next depending on token type.  Skip keyword if in
4946         completion mode.
4947         (complete_linespec_component, linespec_complete): New.
4948         * linespec.h (linespec_complete): Declare.
4949
4950 2017-07-17  Pedro Alves  <palves@redhat.com>
4951
4952         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4953         Handle 'operator<' / 'operator<<'.
4954
4955 2017-07-17  Pedro Alves  <palves@redhat.com>
4956
4957         * completer.c (collect_explicit_location_matches): Handle
4958         MATCH_LABEL.
4959         (convert_explicit_location_to_linespec): New, factored out from
4960         ...
4961         (convert_explicit_location_to_sals): ... this.
4962         (complete_label): New.
4963         (linespec_complete_label, find_label_symbols_in_block): New.
4964         (find_label_symbols): Add completion_mode parameter and adjust to
4965         call find_label_symbols_in_block.
4966         * linespec.h (linespec_complete_label): Declare.
4967
4968 2017-07-17  Pedro Alves  <palves@redhat.com>
4969
4970         * ada-lang.c (ada_collect_symbol_completion_matches): Add
4971         complete_symbol_mode parameter.
4972         * cli/cli-cmds.c (complete_command): Get the completion result out
4973         of the handle_brkchars tracker if used a custom word point.
4974         * completer.c: Include "linespec.h".
4975         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4976         (advance_to_expression_complete_word_point): New.
4977         (completion_tracker::completes_to_completion_word): New.
4978         (complete_files_symbols): Pass down
4979         complete_symbol_mode::EXPRESSION.
4980         (explicit_options, probe_options): New.
4981         (collect_explicit_location_matches): Complete on the
4982         explictit_loc->foo instead of word.  Use
4983         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
4984         keyword and options completions.
4985         (backup_text_ptr): Delete.
4986         (skip_keyword): New.
4987         (complete_explicit_location): Remove 'word' parameter.  Add
4988         language, quoted_arg_start and quoted_arg_end parameters.
4989         Rewrite, parsing left to right.
4990         (location_completer): Rewrite.
4991         (location_completer_handle_brkchars): New function.
4992         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4993         (enum complete_line_internal_reason): Adjust comments.
4994         (completion_tracker::discard_completions): New.
4995         (completer_handle_brkchars_func_for_completer): Handle
4996         location_completer.
4997         (gdb_custom_word_point_brkchars)
4998         (gdb_org_rl_basic_quote_characters): New.
4999         (gdb_completion_word_break_characters_throw)
5000         (completion_find_completion_word): Handle trackers that use a
5001         custom word point.
5002         (completion_tracker::advance_custom_word_point_by): New.
5003         (completion_tracker::build_completion_result): Don't rely on
5004         readline appending the quote char.
5005         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5006         use a custom word point.
5007         (gdb_rl_attempted_completion_function): Restore
5008         rl_basic_quote_characters.
5009         * completer.h (class completion_tracker): Extend intro comment.
5010         (completion_tracker::set_quote_char)
5011         (completion_tracker::quote_char)
5012         (completion_tracker::set_use_custom_word_point)
5013         (completion_tracker::use_custom_word_point)
5014         (completion_tracker::custom_word_point)
5015         (completion_tracker::set_custom_word_point)
5016         (completion_tracker::advance_custom_word_point_by)
5017         (completion_tracker::completes_to_completion_word)
5018         (completion_tracker::discard_completions): New methods.
5019         (completion_tracker::m_quote_char)
5020         (completion_tracker::m_use_custom_word_point)
5021         (completion_tracker::m_custom_word_point): New fields.
5022         (advance_to_expression_complete_word_point): Declare.
5023         * f-lang.c (f_collect_symbol_completion_matches): Add
5024         complete_symbol_mode parameter.
5025         * language.h (struct language_defn)
5026         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5027         parameter.
5028         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5029         (linespec_complete_function): New function.
5030         (linespec_lexer_lex_keyword): Adjust.
5031         * linespec.h (linespec_keywords, linespec_complete_function): New
5032         declarations.
5033         * location.c (find_end_quote): New function.
5034         (explicit_location_lex_one): Add explicit_completion_info
5035         parameter.  Save quoting info.  Don't throw if being called for
5036         completion.  Don't handle Ada operators here.
5037         (is_cp_operator, skip_op_false_positives, first_of)
5038         (explicit_location_lex_one_function): New function.
5039         (string_to_explicit_location): Replace 'dont_throw' parameter with
5040         an explicit_completion_info pointer parameter.  Handle it.  Don't
5041         use explicit_location_lex_one to lex function names.  Use
5042         explicit_location_lex_one_function instead.
5043         * location.h (struct explicit_completion_info): New.
5044         (string_to_explicit_location): Replace 'dont_throw' parameter with
5045         an explicit_completion_info pointer parameter.
5046         * symtab.c (default_collect_symbol_completion_matches_break_on):
5047         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5048         (default_collect_symbol_completion_matches)
5049         (collect_symbol_completion_matches): Add complete_symbol_mode
5050         parameter.
5051         (collect_symbol_completion_matches_type): Pass down
5052         complete_symbol_mode::EXPRESSION.
5053         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5054         parameter.  Handle LINESPEC mode.
5055         * symtab.h (complete_symbol_mode): New.
5056         (default_collect_symbol_completion_matches_break_on)
5057         (default_collect_symbol_completion_matches)
5058         (collect_symbol_completion_matches)
5059         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5060         parameter.
5061
5062 2017-07-17  Pedro Alves  <palves@redhat.com>
5063
5064         * utils.c (enum class strncmp_iw_mode): New.
5065         (strcmp_iw): Rename to ...
5066         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5067         parameters.  Handle them.
5068         (strncmp_iw): New.
5069         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5070         * utils.h (strncmp_iw): Declare.
5071         (strcmp_iw): Move describing comments here.
5072
5073 2017-07-17  Pedro Alves  <palves@redhat.com>
5074
5075         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5076         CP_OPERATOR_STR.
5077         * c-typeprint.c (is_type_conversion_operator): Use
5078         CP_OPERATOR_STR.
5079         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5080         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5081         CP_OPERATOR_LEN.
5082         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5083         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5084         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5085         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5086         CP_OPERATOR_STR.
5087         * location.c: Include "cp-support.h".
5088         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5089         CP_OPERATOR_STR.
5090         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5091         CP_OPERATOR_LEN.
5092
5093 2017-07-17  Pedro Alves  <palves@redhat.com>
5094
5095         * cli/cli-cmds.c (complete_command): Use a completion tracker
5096         along with completion_find_completion_word for handle_brkchars
5097         phase.
5098         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5099         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5100         (struct gdb_rl_completion_word_info): New.
5101         (gdb_rl_find_completion_word): New.
5102         (completion_find_completion_word): New.
5103         * completer.h (completion_find_completion_word): Declare.
5104
5105 2017-07-17  Pedro Alves  <palves@redhat.com>
5106
5107         * ada-lang.c (symbol_completion_match): Adjust comments.
5108         (symbol_completion_add): Replace vector parameter with
5109         completion_tracker parameter.  Use it.
5110         (ada_make_symbol_completion_list): Rename to...
5111         (ada_collect_symbol_completion_matches): ... this.  Add
5112         completion_tracker parameter and use it.
5113         (ada_language_defn): Adjust.
5114         * break-catch-syscall.c (catch_syscall_completer): Adjust
5115         prototype and work with completion_tracker instead of VEC.
5116         * breakpoint.c (condition_completer): Adjust prototype and work
5117         with completion_tracker instead of VEC.
5118         * c-lang.c (c_language_defn, cplus_language_defn)
5119         (asm_language_defn, minimal_language_defn): Adjust to renames.
5120         * cli/cli-cmds.c (complete_command): Rework using
5121         completion_tracker.  Catch exceptions when completing.
5122         * cli/cli-decode.c (integer_unlimited_completer)
5123         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5124         with completion_tracker instead of VEC.
5125         * command.h (struct completion_tracker): Forward declare.
5126         (completer_ftype, completer_handle_brkchars_ftype): Change
5127         types.
5128         (complete_on_cmdlist, complete_on_enum): Adjust.
5129         * completer.c: Include <algorithm>.
5130         (struct gdb_completer_state): New.
5131         (current_completion): New global.
5132         (readline_line_completion_function): Delete.
5133         (noop_completer, filename_completer)
5134         (filename_completer_handle_brkchars, complete_files_symbols)
5135         (linespec_location_completer): Adjust to work with a
5136         completion_tracker instead of a VEC.
5137         (string_or_empty): New.
5138         (collect_explicit_location_matches): Adjust to work with a
5139         completion_tracker instead of a VEC.
5140         (explicit_location_completer): Rename to ...
5141         (complete_explicit_location): ... this and adjust to work with a
5142         completion_tracker instead of a VEC.
5143         (location_completer): Adjust to work with a completion_tracker
5144         instead of a VEC.
5145         (add_struct_fields): Adjust to work with a completion_list instead
5146         of VEC.
5147         (expression_completer): Rename to ...
5148         (complete_expression): ... this and adjust to work with a
5149         completion_tracker instead of a VEC.  Use complete_files_symbols.
5150         (expression_completer): Reimplement on top of complete_expression.
5151         (symbol_completer): Adjust to work with a completion_tracker
5152         instead of a VEC.
5153         (enum complete_line_internal_reason): Add describing comments.
5154         (complete_line_internal_normal_command): Adjust to work with a
5155         completion_tracker instead of a VEC.
5156         (complete_line_internal): Rename to ...
5157         (complete_line_internal_1): ... this and adjust to work with a
5158         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5159         handle_brkchars phase.
5160         (new_completion_tracker): Delete.
5161         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5162         complete_line_internal_1.
5163         (free_completion_tracker): Delete.
5164         (INITIAL_COMPLETION_HTAB_SIZE): New.
5165         (completion_tracker::completion_tracker)
5166         (completion_tracker::~completion_tracker): New.
5167         (maybe_add_completion): Delete.
5168         (completion_tracker::maybe_add_completion)
5169         (completion_tracker::add_completion)
5170         (completion_tracker::add_completions): New.
5171         (throw_max_completions_reached_error): Delete.
5172         (complete_line): Adjust to work with a completion_tracker instead
5173         of a VEC.  Don't create a completion_tracker_t or check for max
5174         completions here.
5175         (command_completer, command_completer_handle_brkchars)
5176         (signal_completer, reg_or_group_completer_1)
5177         (reg_or_group_completer, default_completer_handle_brkchars):
5178         Adjust to work with a completion_tracker.
5179         (gdb_completion_word_break_characters_throw): New.
5180         (gdb_completion_word_break_characters): Reimplement.
5181         (line_completion_function): Delete.
5182         (completion_tracker::recompute_lowest_common_denominator)
5183         (expand_preserving_ws)
5184         (completion_tracker::build_completion_result)
5185         (completion_result::completion_result)
5186         (completion_result::completion_result)
5187         (completion_result::~completion_result)
5188         (completion_result::completion_result)
5189         (completion_result::release_match_list, compare_cstrings)
5190         (completion_result::sort_match_list)
5191         (completion_result::reset_match_list)
5192         (gdb_rl_attempted_completion_function_throw)
5193         (gdb_rl_attempted_completion_function): New.
5194         * completer.h (completion_list, struct completion_result)
5195         (class completion_tracker): New.
5196         (complete_line): Add completion_tracker parameter.
5197         (readline_line_completion_function): Delete.
5198         (gdb_rl_attempted_completion_function): New.
5199         (noop_completer, filename_completer, expression_completer)
5200         (location_completer, symbol_completer, command_completer)
5201         (signal_completer, reg_or_group_completer): Update prototypes.
5202         (completion_tracker_t, new_completion_tracker)
5203         (make_cleanup_free_completion_tracker): Delete.
5204         (enum maybe_add_completion_enum): Delete.
5205         (maybe_add_completion): Delete.
5206         (throw_max_completions_reached_error): Delete.
5207         * corefile.c (complete_set_gnutarget): Adjust to work with a
5208         completion_tracker instead of a VEC.
5209         * cp-abi.c (cp_abi_completer): Adjust to work with a
5210         completion_tracker instead of a VEC.
5211         * d-lang.c (d_language_defn): Adjust.
5212         * disasm.c (disassembler_options_completer): Adjust to work with a
5213         completion_tracker instead of a VEC.
5214         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5215         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5216         with a completion_tracker instead of a VEC.
5217         (f_language_defn): Adjust.
5218         * go-lang.c (go_language_defn): Adjust.
5219         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5220         Adjust to work with a completion_tracker instead of a VEC.
5221         * infrun.c (handle_completer): Likewise.
5222         * interps.c (interpreter_completer): Likewise.
5223         * interps.h (interpreter_completer): Likewise.
5224         * language.c (unknown_language_defn, auto_language_defn)
5225         (local_language_defn): Adjust.
5226         * language.h (language_defn::la_make_symbol_completion_list):
5227         Rename to ...
5228         (language_defn::la_collect_symbol_completion_matches): ... this
5229         and adjust to work with a completion_tracker instead of a VEC.
5230         * m2-lang.c (m2_language_defn): Adjust.
5231         * objc-lang.c (objc_language_defn): Adjust.
5232         * opencl-lang.c (opencl_language_defn): Adjust.
5233         * p-lang.c (pascal_language_defn): Adjust.
5234         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5235         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5236         with a completion_tracker.
5237         * rust-lang.c (rust_language_defn): Adjust.
5238         * symtab.c (free_completion_list, do_free_completion_list)
5239         (return_val, completion_tracker): Delete.
5240         (completion_list_add_name, completion_list_add_symbol)
5241         (completion_list_add_msymbol, completion_list_objc_symbol)
5242         (completion_list_add_fields, add_symtab_completions): Add
5243         completion_tracker parameter and use it.
5244         (default_make_symbol_completion_list_break_on_1): Rename to...
5245         (default_collect_symbol_completion_matches_break_on): ... this.
5246         Add completion_tracker parameter and use it instead of allocating
5247         a completion tracker here.
5248         (default_make_symbol_completion_list_break_on): Delete old
5249         implementation.
5250         (default_make_symbol_completion_list): Delete.
5251         (default_collect_symbol_completion_matches): New.
5252         (make_symbol_completion_list): Delete.
5253         (collect_symbol_completion_matches): New.
5254         (make_symbol_completion_type): Rename to ...
5255         (collect_symbol_completion_matches_type): ... this.  Add
5256         completion_tracker parameter and use it instead of VEC.
5257         (make_file_symbol_completion_list_1): Rename to...
5258         (collect_file_symbol_completion_matches): ... this.  Add
5259         completion_tracker parameter and use it instead of VEC.
5260         (make_file_symbol_completion_list): Delete.
5261         (add_filename_to_list): Use completion_list instead of a VEC.
5262         (add_partial_filename_data::list): Now a completion_list.
5263         (make_source_files_completion_list): Work with a completion_list
5264         instead of a VEC.
5265         * symtab.h: Include "completer.h".
5266         (default_make_symbol_completion_list_break_on)
5267         (default_make_symbol_completion_list, make_symbol_completion_list)
5268         (make_symbol_completion_type, make_file_symbol_completion_list)
5269         (make_source_files_completion_list): Delete.
5270         (default_collect_symbol_completion_matches_break_on)
5271         (default_collect_symbol_completion_matches)
5272         (collect_symbol_completion_matches)
5273         (collect_symbol_completion_matches_type)
5274         (collect_file_symbol_completion_matches)
5275         (make_source_files_completion_list): New.
5276         * top.c (init_main): Don't install a rl_completion_entry_function
5277         hook.  Install a rl_attempted_completion_function hook instead.
5278         * tui/tui-layout.c (layout_completer): Adjust to work with a
5279         completion_tracker.
5280         * tui/tui-regs.c (tui_reggroup_completer):
5281         * tui/tui-win.c (window_name_completer, focus_completer)
5282         (winheight_completer): Adjust to work with a completion_tracker.
5283         * value.c: Include "completer.h".
5284         (complete_internalvar): Adjust to work with a completion_tracker.
5285         * value.h (complete_internalvar): Likewise.
5286
5287 2017-07-17  Pedro Alves  <palves@redhat.com>
5288
5289         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5290         renames.
5291         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5292         comments to completer_ftype's declaration.
5293         <completer_handle_brkchars>: Change type to
5294         completer_handle_brkchars_ftype.
5295         * command.h (completer_ftype): Add describing comment and give
5296         names to parameters.
5297         (completer_ftype_void): Rename to ...
5298         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5299         (set_cmd_completer_handle_brkchars): Adjust.
5300         * completer.c (filename_completer_handle_brkchars): New function.
5301         (complete_line_internal_normal_command): New function, factored
5302         out from ...
5303         (complete_line_internal): ... here.
5304         (command_completer_handle_brkchars)
5305         (default_completer_handle_brkchars)
5306         (completer_handle_brkchars_func_for_completer): New functions.
5307         * completer.h (set_gdb_completion_word_break_characters): Delete
5308         declaration.
5309         (completer_handle_brkchars_func_for_completer): New declaration.
5310         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5311         completer_handle_brkchars_func_for_completer.
5312
5313 2017-07-17  Pedro Alves  <palves@redhat.com>
5314
5315         * completer.c (symbol_completer): New function, based on
5316         make_symbol_completion_list_fn.
5317         * completer.h (symbol_completer): New declaration.
5318         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5319         * python/py-cmd.c (completers): Adjust.
5320         * symtab.c (make_symbol_completion_list_fn): Delete.
5321         * symtab.h (make_symbol_completion_list_fn): Delete.
5322         * cli/cli-decode.c (add_cmd): Adjust.
5323
5324 2017-07-17  Pedro Alves  <palves@redhat.com>
5325
5326         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5327         * dwarf2read.c: Include "filename-seen-cache.h".
5328         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5329         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5330         * filename-seen-cache.c: New file.
5331         * filename-seen-cache.h: New file.
5332         * symtab.c: Include "filename-seen-cache.h".
5333         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5334         (create_filename_seen_cache, clear_filename_seen_cache)
5335         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5336         to filename-seen-cache.h/filename-seen-cache.c.
5337         (output_source_filename, sources_info)
5338         (maybe_add_partial_symtab_filename)
5339         (make_source_files_completion_list): Adjust to use
5340         filename_seen_cache.
5341
5342 2017-07-17  Pedro Alves  <palves@redhat.com>
5343
5344         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5345         fields.
5346         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5347         dwarf2_debug_sections*)): New.
5348         (dwarf2_per_objfile::dwarf2_per_objfile(const
5349         dwarf2_per_objfile&)): Declare as deleted.
5350         (dwarf2_per_objfile::operator=): Declare as deleted.
5351         (dwarf2_per_objfile::dwarf2_per_objfile)
5352         (dwarf2_per_objfile::~dwarf2_per_objfile)
5353         (dwarf2_per_objfile::free_cached_comp_units): New.
5354         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5355         ctor.  Call dwarf2_per_objfile's ctor manually.
5356         (dwarf2_locate_sections): Deleted/refactored as ...
5357         (dwarf2_per_objfile::locate_sections): ... this new method.
5358         (free_cached_comp_units): Defer to
5359         dwarf2_per_objfile::free_cached_comp_units.
5360         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5361
5362 2017-07-14  Tom Tromey  <tom@tromey.com>
5363
5364         PR rust/21764:
5365         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5366         parameter.
5367         <UNOP_SIZEOF>: Split into separate case.
5368         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5369
5370 2017-07-14  Tom Tromey  <tom@tromey.com>
5371
5372         PR rust/21763:
5373         * symtab.c (symbol_matches_domain): Add language_rust to special
5374         case.
5375         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5376         treat LOC_TYPEDEF symbols as variables.
5377
5378 2017-07-14  Pedro Alves  <palves@redhat.com>
5379
5380         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5381         symtabs matching all symtabs with SRCFILE as file name instead of
5382         only considering the first hit, with lookup_symtab.
5383
5384 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5385
5386         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5387         operator_name parameters.
5388         (gen_expr): Update function call.
5389
5390 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5391
5392         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5393         parameter.
5394         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5395         Likewise.
5396         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5397         parameter, use agent_expr::gdbarch instead, update function
5398         calls.
5399         (locexpr_tracepoint_var_ref): Likewise.
5400         (loclist_tracepoint_var_ref): Likewise.
5401         * ax-gdb.c (gen_trace_static_fields): Likewise.
5402         (gen_traced_pop): Likewise.
5403         (gen_frame_args_address): Likewise.
5404         (gen_frame_locals_address): Likewise.
5405         (gen_var_ref): Likewise.
5406         (gen_struct_ref_recursive): Likewise.
5407         (gen_static_field): Likewise.
5408         (gen_maybe_namespace_elt): Likewise.
5409         (gen_expr): Likewise.
5410         (gen_trace_for_var): Likewise.
5411         (gen_trace_for_expr): Likewise.
5412         (gen_trace_for_return_address): Likewise.
5413
5414 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5415
5416         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5417         parameter.
5418         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5419
5420 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5421
5422         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5423         from ax, update calls.
5424         (gen_usual_arithmetic): Likewise.
5425         (gen_integral_promotions): Likewise.
5426         (gen_bitfield_ref): Likewise.
5427         (gen_primitive_field): Likewise.
5428         (gen_struct_ref_recursive): Likewise.
5429         (gen_struct_ref): Likewise.
5430         (gen_maybe_namespace_elt): Likewise.
5431         (gen_struct_elt_for_reference): Likewise.
5432         (gen_namespace_elt): Likewise.
5433         (gen_aggregate_elt_ref): Likewise.
5434         (gen_expr): Get gdbarch from ax, update calls.
5435         (gen_expr_binop_rest): Likewise.
5436
5437 2017-07-13  Pedro Alves  <palves@redhat.com>
5438
5439         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5440         as default tdesc.
5441         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5442         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5443         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5444         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5445         tdep.
5446         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5447         Get final tdesc from the tdep.
5448         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5449         default tdesc.
5450         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5451         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5452         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5453         Use it as default tdesc.
5454         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5455         down to amd_init_abi.  No longer handle fallback tdesc here.
5456         * amd64-tdep.h (tdesc_x32): Declare.
5457         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5458         parameter.
5459         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5460         as default tdesc.
5461
5462 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5463
5464         * s390-linux-tdep.c (s390_process_record): Add support for
5465         instructions new in arch12.
5466
5467 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5468
5469         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5470         PT_GETFSBASE and PT_GETGSBASE.
5471         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5472         PT_SETGSBASE.
5473
5474 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5475
5476         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5477         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5478         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5479         those rules.
5480         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5481         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5482         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5483         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5484         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5485         * features/i386/amd64.xml: Add 64bit-segments.xml.
5486         * features/i386/amd64-avx-avx512.c: Regenerated.
5487         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5488         * features/i386/amd64-avx-mpx.c: Regenerated.
5489         * features/i386/amd64-avx.c: Regenerated.
5490         * features/i386/amd64-mpx.c: Regenerated.
5491         * features/i386/amd64.c: Regenerated.
5492         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5493         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5494         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5495         * regformats/i386/amd64-avx.dat: Regenerated.
5496         * regformats/i386/amd64-mpx.dat: Regenerated.
5497         * regformats/i386/amd64.dat: Regenerated.
5498
5499 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5500
5501         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5502         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5503
5504 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5505
5506         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5507         unsetenv.
5508         * gnulib/aclocal.m4: Regenerate.
5509         * gnulib/config.in: Regenerate.
5510         * gnulib/configure: Regenerate.
5511         * gnulib/import/Makefile.am: Regenerate.
5512         * gnulib/import/Makefile.in: Regenerate.
5513         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5514         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5515         * gnulib/import/m4/environ.m4: New file.
5516         * gnulib/import/m4/setenv.m4: New file.
5517         * gnulib/import/setenv.c: New file.
5518         * gnulib/import/unsetenv.c: New file.
5519
5520 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5521
5522         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5523         address when op is DW_OP_addr.
5524
5525 2017-07-09  Tom Tromey  <tom@tromey.com>
5526
5527         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5528         check and apply to outer type.
5529
5530 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5531
5532         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5533         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5534         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5535         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5536
5537 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5538
5539         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5540
5541 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5542
5543         * corelow.c (get_core_siginfo): Remove.
5544         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5545         instead of get_core_siginfo.
5546         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5547         * gdbarch.h: Re-generate.
5548         * gdbarch.c: Re-generate.
5549         * linux-tdep.c (linux_core_xfer_siginfo): New.
5550         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5551
5552 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5553
5554         * corelow.c (thread_section_name): Move to ...
5555         * gdbcore.h (thread_section_name): ... here.
5556
5557 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5558
5559         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5560         (struct siginfo32): New.
5561         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5562         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5563         via ptrace(PT_LWPINFO).
5564
5565 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5566
5567         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5568         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5569         (fbsd_get_siginfo_type): New.
5570         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5571         (_initialize_fbsd_tdep): New.
5572
5573 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5574
5575         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5576         a singular dwo_unit*) to support multiple CUs in the same way that
5577         multiple TUs are supported.
5578         (create_cus_hash_table): Replace create_dwo_cu with a function for
5579         parsing multiple CUs from a DWO file.
5580         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5581         create_dwo_cu.
5582         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5583         htab_find, rather than comparing the signature to a singleton CU in
5584         the dwo_file.
5585
5586 2017-07-06  Pedro Alves  <palves@redhat.com>
5587
5588         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5589
5590 2017-07-04  Pedro Alves  <palves@redhat.com>
5591
5592         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5593         * gdbtypes.h (TYPE_STATIC): Delete.
5594         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5595         is_synchronized, is_native>: Delete.
5596         <dummy>: Bump.
5597         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5598         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5599         (TYPE_FN_FIELD_ABSTRACT): Delete.
5600
5601 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5602
5603         * buffer.h (buffer_finish): Fix spelling mistakes.
5604
5605 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5606
5607         * .dir-locals.el: Automatically switch to C-style comments in
5608         versions of Emacs that support the feature.
5609
5610 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5611             Pedro Alves  <palves@redhat.com>
5612
5613         PR cli/21688
5614         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5615         (process_next_line): New variable 'inline_cmd'.
5616         Adjust 'if' clauses for "python", "compile" and "guile" to use
5617         'command_name_equals' and check for '!inline_cmd'.
5618
5619 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5620
5621         PR cli/21688
5622         * cli/cli-script.c (command_name_equals_not_inline): New function.
5623         (process_next_line): Adjust 'if' clauses for "python", "compile"
5624         and "guile" to use command_name_equals_not_inline.
5625
5626 2017-06-29  Pedro Alves  <palves@redhat.com>
5627
5628         * completer.c (expression_completer): Call
5629         linespec_location_completer instead of location_completer.
5630
5631 2017-06-29  Pedro Alves  <palves@redhat.com>
5632
5633         * completer.c (expression_completer): Remove code that recomputes
5634         'text' from 'word'.
5635
5636 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5637
5638         * regformats/regdat.sh: Generate code with
5639         "ifndef IN_PROCESS_AGENT".
5640
5641 2017-06-28  Pedro Alves  <palves@redhat.com>
5642
5643         * command.h: Include "common/scoped_restore.h".
5644
5645 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5646
5647         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5648         instead of obstack_grow.
5649
5650 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5651
5652         PR gdb/21337
5653         * symfile.c (reread_symbols): Call objfiles_changed just before
5654         read_symbols.
5655
5656 2017-06-27  Pedro Alves  <palves@redhat.com>
5657
5658         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5659         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5660         (completion_list_add_symbol, completion_list_add_msymbol):
5661         ... these new functions.
5662         (add_symtab_completions)
5663         (default_make_symbol_completion_list_break_on_1): Adjust.
5664
5665 2017-06-27  Pedro Alves  <palves@redhat.com>
5666
5667         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5668         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5669         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5670         dtor.
5671         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5672         'storage_obstack' field an auto_obstack.  In-class initialize all
5673         non-bitfield fields.  Make minsyms_read bool.
5674         * symfile.c (read_symbols): Adjust.
5675
5676 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5677
5678         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5679         (gdbsim_store_register): Likewise.
5680
5681 2017-06-27  Pedro Alves  <palves@redhat.com>
5682
5683         * c-exp.y (name_obstack): Now an auto_obstack.
5684         (yylex): Use auto_obstack::clear.
5685         (c_parse): Use auto_obstack::clear instead of reinitializing and
5686         freeing the obstack.
5687         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5688         * d-exp.y (name_obstack): Now an auto_obstack.
5689         (yylex): Use auto_obstack::clear.
5690         (d_parse): Use auto_obstack::clear instead of reinitializing and
5691         freeing the obstack.
5692         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5693         auto_obstack.
5694         * dwarf2read.c (create_addrmap_from_index)
5695         (dwarf2_build_psymtabs_hard)
5696         (update_enumeration_type_from_children): Likewise.
5697         * gdb_obstack.h (auto_obstack): New type.
5698         * go-exp.y (name_obstack): Now an auto_obstack.
5699         (build_packaged_name): Use auto_obstack::clear.
5700         (go_parse): Use auto_obstack::clear instead of reinitializing and
5701         freeing the obstack.
5702         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5703         auto_obstack.
5704         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5705         * rust-exp.y (work_obstack): Now an auto_obstack.
5706         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5707         reinitializing and freeing the obstack.
5708         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5709         (host_char_to_target): Use auto_obstack.
5710         * utils.h (make_cleanup_obstack_free): Delete declaration.
5711         * valprint.c (generic_emit_char, generic_printstr): Use
5712         auto_obstack.
5713
5714 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5715
5716         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5717         thread.
5718         (darwin_init_thread_list): Don't update dummy thread.
5719         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5720
5721 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5722
5723         * record-full.c (netorder16): Remove.
5724
5725 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5726
5727         * common/diagnostics.h: Define macros for GCC.
5728         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5729         * common/vec.h: Include diagnostics.h.
5730         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5731         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5732         warning.
5733
5734 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5735
5736         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5737         New macro.
5738         * ada-lex.l: Ignore deprecated register warnings.
5739
5740 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5741
5742         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5743         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5744
5745 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5746
5747         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5748         its own line.
5749
5750 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5751
5752         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5753
5754 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5755
5756         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5757         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5758         (xtensa_register_read_masked): Likewise.
5759
5760 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5761
5762         * common/environ.c (gdb_environ::unset): Update comment.
5763
5764 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5765
5766         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5767         registers.
5768
5769 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5770
5771         * record-full.c (record_full_exec_insn): Use byte_vector.
5772
5773 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5774
5775         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5776         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5777
5778 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5779
5780         * remote.c (cached_reg): Move from here...
5781         * regcache.h (cached_reg): ...to here.
5782         * python/py-unwind.c (struct reg_info): Remove.
5783         (cached_frame_info): Use cached_reg_t.
5784         (pyuw_prev_register): Likewise.
5785         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5786         (pyuw_dealloc_cache): Free all registers.
5787
5788 2017-06-22  Pedro Alves  <palves@redhat.com>
5789             Simon Marchi  <simon.marchi@ericsson.com>
5790
5791         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5792         warning.
5793         * common/diagnostics.h: New file.
5794
5795 2017-06-22  Pedro Alves  <palves@redhat.com>
5796
5797         * common/agent.h: Add include guards.
5798
5799 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5800
5801         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5802         talk about addressable units instead of bytes.
5803
5804 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5805
5806         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5807         of '::const_iterator'.
5808
5809 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5810
5811         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5812         'unittests/environ-selftests.c'.
5813         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5814         * charset.c (find_charset_names): Declare object 'iconv_env'.
5815         Update code to use 'iconv_env' object.  Remove call to
5816         'free_environ'.
5817         * common/environ.c: Include <utility>.
5818         (make_environ): Delete function.
5819         (free_environ): Delete function.
5820         (gdb_environ::clear): New function.
5821         (gdb_environ::operator=): New function.
5822         (gdb_environ::get): Likewise.
5823         (environ_vector): Delete function.
5824         (set_in_environ): Delete function.
5825         (gdb_environ::set): New function.
5826         (unset_in_environ): Delete function.
5827         (gdb_environ::unset): New function.
5828         (gdb_environ::envp): Likewise.
5829         * common/environ.h: Include <vector>.
5830         (struct gdb_environ): Delete; transform into...
5831         (class gdb_environ): ... this class.
5832         (free_environ): Delete prototype.
5833         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5834         environ_vector): Likewise.
5835         * infcmd.c (run_command_1): Update code to call
5836         'envp' from 'gdb_environ' class.
5837         (environment_info): Update code to call methods from 'gdb_environ'
5838         class.
5839         (unset_environment_command): Likewise.
5840         (path_info): Likewise.
5841         (path_command): Likewise.
5842         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5843         (inferior::inferior): Initialize 'environment' using the host's
5844         information.
5845         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5846         Include "environ.h".
5847         (class inferior) <environment>: Change type from 'struct
5848         gdb_environ' to 'gdb_environ'.
5849         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5850         methods from 'gdb_environ' class.
5851         * solib.c (solib_find_1): Likewise
5852         * unittests/environ-selftests.c: New file.
5853
5854 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5855
5856         * features/i386/i386-linux.xml: Exchange the order of including
5857         32bit-linux.xml and 32bit-sse.xml.
5858         * features/i386/i386-linux.c: Regenerated.
5859
5860 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5861
5862         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5863         Delete copy ctor and assignment operator.
5864         (tdesc_type): Likewise.
5865         (tdesc_feature): Likewise.
5866         (tdesc_free_reg): Remove.
5867         (tdesc_create_reg): Use new.
5868         (tdesc_free_type): Remove.
5869         (tdesc_create_vector): Use new.
5870         (tdesc_create_union): Likewise.
5871         (tdesc_create_flags): Likewise.
5872         (tdesc_create_enum): Likewise.
5873         (tdesc_free_feature): Delete.
5874         (free_target_description): Use delete.
5875
5876 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
5877
5878         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5879         registers.
5880
5881 2017-06-19  Pedro Alves  <palves@redhat.com>
5882
5883         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5884         after gdb::unlinker.
5885
5886 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
5887
5888         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5889         gdb_environ to access an environment variable.
5890
5891 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
5892
5893         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5894         gdb_byte*.
5895
5896 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5897
5898         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5899
5900 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5901
5902         * configure: Re-generate.
5903         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5904
5905 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5906
5907         * configure: Re-generate.
5908         * warning.m4: Pass -Werror to compiler when checking for
5909         supported warning flags.
5910
5911 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5912
5913         * Makefile.in (COMPILE.pre): Add "-x c++".
5914
5915 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
5916             Pedro Alves  <palves@redhat.com>
5917             Yao Qi  <yao.qi@linaro.org>
5918
5919         * defs.h (RequireLongest): New.
5920         (extract_integer): Declare function template.
5921         (extract_signed_integer): Remove the declaration, but define it
5922         static inline.
5923         (extract_unsigned_integer): Likewise.
5924         (store_integer): Declare function template.
5925         (store_signed_integer): Remove the declaration, but define it
5926         static inline.
5927         (store_unsigned_integer): Likewise.
5928         * findvar.c (extract_integer): New function template.
5929         (extract_signed_integer): Remove.
5930         (extract_unsigned_integer): Remove.
5931         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5932         instantiations.
5933         (store_integer): New function template.
5934         (store_signed_integer): Remove.
5935         (store_unsigned_integer): Remove.
5936         (store_integer): Explicit instantiations.
5937         * regcache.c (regcache_raw_read_signed): Update.
5938         (regcache::raw_read): New function.
5939         (regcache::raw_read_signed): Remove.
5940         (regcache::raw_read_unsigned): Remove.
5941         (regcache_raw_read_unsigned): Update.
5942         (regcache_raw_write_unsigned): Update.
5943         (regcache::raw_write_signed): Remove.
5944         (regcache::raw_write): New function.
5945         (regcache_cooked_read_signed): Update.
5946         (regcache::raw_write_unsigned): Remove.
5947         (regcache::cooked_read_signed): Remove.
5948         (regcache_cooked_read_unsigned): Update.
5949         (regcache::cooked_read_unsigned): Remove.
5950         (regcache_cooked_write_signed): Update.
5951         (regcache_cooked_write_unsigned): Update.
5952         * regcache.h (regcache) <raw_read_signed>: Remove.
5953         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5954         <raw_read, raw_write>: New.
5955         <cooked_read_signed, cooked_write_signed>: Remove.
5956         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5957         <cooked_read, cooked_write>: New.
5958         * sh64-tdep.c (sh64_pseudo_register_read): Update.
5959         (sh64_pseudo_register_write): Update.
5960
5961 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
5962
5963         * arc-tdep.c (arc_disassembler_options): New variable.
5964         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5965         of default_print_insn.
5966         (arc_delayed_print_insn): Set info->section when needed,
5967         use default_print_insn to retrieve a disassembler.
5968
5969 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5970
5971         PR gdb/21574
5972         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5973         to mention $SHELL and startup-with-shell.
5974
5975 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
5976
5977         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5978
5979 2017-06-14  Yao Qi  <yao.qi@linaro.org>
5980
5981         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5982         default_print_insn instead of print_insn_aarch64.
5983         * arm-tdep.c (gdb_print_insn_arm): Call
5984         default_print_insn instead of print_insn_big_arm
5985         and print_insn_little_arm.
5986         * i386-tdep.c (i386_print_insn): Call default_print_insn
5987         instead of print_insn_i386.
5988         * ia64-tdep.c (ia64_print_insn): Call
5989         default_print_insn instead of print_insn_ia64.
5990         * mips-tdep.c (gdb_print_insn_mips): Call
5991         default_print_insn instead of print_insn_big_mips
5992         and print_insn_little_mips.
5993         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5994         instead of print_insn_spu.
5995
5996 2017-06-14  Pedro Alves  <palves@redhat.com>
5997
5998         * ada-lang.c: Include "common/byte-vector.h".
5999         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6000         * charset.c (wchar_iterator::iterate): Resize the vector instead
6001         of reserving it.
6002         * common/byte-vector.h: Include "common/def-vector.h".
6003         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6004         * cli/cli-dump.c: Include "common/byte-vector.h".
6005         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6006         * common/byte-vector.h: New file.
6007         * common/def-vector.h: New file.
6008         * common/default-init-alloc.h: New file.
6009         * dwarf2loc.c: Include "common/byte-vector.h".
6010         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6011         instead of reserving it.
6012         * dwarf2read.c: Include "common/byte-vector.h".
6013         (data_buf::m_vec): Now a gdb::byte_vector.
6014         * gdb_regex.c: Include "common/def-vector.h".
6015         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6016         * mi/mi-main.c: Include "common/byte-vector.h".
6017         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6018         * printcmd.c: Include "common/byte-vector.h".
6019         (print_scalar_formatted): Use gdb::byte_vector.
6020         * valprint.c: Include "common/byte-vector.h".
6021         (maybe_negate_by_bytes, print_decimal_chars): Use
6022         gdb::byte_vector.
6023
6024 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6025
6026         * darwin-nat.c: Include "nat/fork-inferior.h".
6027
6028 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6029
6030         * configure.nat: Factor out Darwin bits that are not
6031         architecture-specific.  Add fork-inferior.o.
6032
6033 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6034
6035         * configure.nat: Factor out AIX bits that are not
6036         architecture-specific.  Add fork-inferior.o.
6037
6038 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6039
6040         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6041         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6042         wrappers that just call rw_pieced_value.
6043
6044 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6045
6046         * dwarf2loc.c (write_pieced_value): When writing the data for a
6047         memory piece, use write_memory_with_notification instead of
6048         write_memory.
6049
6050 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6051
6052         * valops.c (read_value_memory): Change embedded_offset to
6053         represent a bit offset instead of a byte offset.
6054         * value.h (read_value_memory): Adjust comment.
6055
6056 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6057
6058         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6059         dest_offset_bits and source_offset_bits.
6060         (write_pieced_value): Likewise.
6061
6062 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6063
6064         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6065         given by DW_OP_bit_piece.
6066         (write_pieced_value): Likewise.
6067
6068 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6069
6070         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6071         some other preparations to the places where sufficient information
6072         is available.
6073         (write_pieced_value): Likewise.
6074
6075 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6076
6077         * dwarf2loc.c (bits_to_bytes): New function.
6078         (read_pieced_value): Fix offset calculations for register pieces
6079         on big-endian targets.
6080         (write_pieced_value): Likewise.
6081
6082 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6083
6084         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6085         (write_pieced_value): Likewise.
6086
6087 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6088
6089         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6090         transfer the source value's least significant bits, instead of its
6091         lowest-addressed ones.  Rename type_len to max_offset.
6092         (read_pieced_value): Mirror above changes to write_pieced_value as
6093         applicable.
6094
6095 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6096
6097         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6098         truncate full bytes from dest_offset_bits before using it as an
6099         offset into the buffer.
6100
6101 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6102
6103         * dwarf2loc.c (write_pieced_value): Include transfer size in
6104         byte-wise check.
6105
6106 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6107
6108         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6109         calculation of this_size.
6110
6111 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6112
6113         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6114         when targeting a bit-field.
6115         (write_pieced_value): Likewise.
6116
6117 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6118
6119         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6120         (allocate_piece_closure): Drop addr_size parameter.
6121         (dwarf2_evaluate_loc_desc_full): Adjust call to
6122         allocate_piece_closure.
6123
6124 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6125
6126         PR gdb/21226
6127         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6128         the LSB end, independent of endianness.
6129
6130 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6131
6132         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6133         size capping.
6134
6135 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6136
6137         * mips-linux-nat.c: Move include features/mips*-linux.c to
6138         mips-linux-tdep.c.
6139         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6140         to mips-linux-tdep.c.
6141         * mips-linux-tdep.c: Include features/mips*-linux.c
6142         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6143         functions.
6144         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6145         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6146         (tdesc_mips64_dsp_linux): Declare.
6147
6148 2017-06-12  Tom Tromey  <tom@tromey.com>
6149
6150         * valprint.h (val_print_type_code_int): Remove.
6151         * valprint.c (generic_val_print_int): Always call
6152         val_print_scalar_formatted.
6153         (val_print_type_code_int): Remove.
6154         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6155         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6156         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6157         * ada-valprint.c (ada_val_print_num): Use
6158         val_print_scalar_formatted.
6159
6160 2017-06-12  Tom Tromey  <tom@tromey.com>
6161
6162         * printcmd.c (print_scalar_formatted): Unify the two switches.
6163         Don't convert scalars to LONGEST.
6164
6165 2017-06-12  Tom Tromey  <tom@tromey.com>
6166
6167         PR exp/16225:
6168         * valprint.h (print_decimal_chars): Update.
6169         * valprint.c (maybe_negate_by_bytes): New function.
6170         (print_decimal_chars): Add "is_signed" argument.
6171         * printcmd.c (print_scalar_formatted): Update.
6172
6173 2017-06-12  Tom Tromey  <tom@tromey.com>
6174
6175         PR exp/16225:
6176         * valprint.h (print_binary_chars, print_hex_chars): Update.
6177         * valprint.c (val_print_type_code_int): Update.
6178         (print_binary_chars): Add "zero_pad" argument.
6179         (emit_octal_digit): New function.
6180         (print_octal_chars): Don't zero-pad.
6181         (print_decimal_chars): Likewise.
6182         (print_hex_chars): Add "zero_pad" argument.
6183         * sh64-tdep.c (sh64_do_fp_register): Update.
6184         * regcache.c (regcache::dump): Update.
6185         * printcmd.c (print_scalar_formatted): Update.
6186         * infcmd.c (default_print_one_register_info): Update.
6187
6188 2017-06-12  Pedro Alves  <palves@redhat.com>
6189             Alan Hayward  <alan.hayward@arm.com>
6190
6191         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6192         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6193         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6194         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6195         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6196
6197 2017-06-12  Pedro Alves  <palves@redhat.com>
6198
6199         * dwarf2read.c (mapped_symtab::data): Now a vector of
6200         symtab_index_entry instead of vector of
6201         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6202         whether an element's name is NULL instead of checking whether the
6203         element itself is NULL.
6204         (find_slot): Change return type.  Adjust.
6205         (hash_expand, , add_index_entry, uniquify_cu_indices)
6206         (write_hash_table): Adjust.
6207
6208 2017-06-12  Pedro Alves  <palves@redhat.com>
6209
6210         * dwarf2read.c (recursively_count_psymbols): New function.
6211         (write_psymtabs_to_index): Call it to compute number of psyms and
6212         pass estimate size of psyms_seen to unordered_set's ctor.
6213
6214 2017-06-12  Pedro Alves  <palves@redhat.com>
6215
6216         * dwarf2read.c (write_hash_table): Check if key already exists
6217         before emplacing.
6218
6219 2017-06-12  Pedro Alves  <palves@redhat.com>
6220
6221         * dwarf2read.c (data_buf::append_space): Rename to...
6222         (data_buf::grow): ... this, and make private.  Adjust all callers.
6223         (data_buf::append_uint): New method.
6224         (add_address_entry, write_one_signatured_type)
6225         (write_psymtabs_to_index): Use it.
6226
6227 2017-06-12  Pedro Alves  <palves@redhat.com>
6228
6229         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6230         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6231         (data_buf::file_write): Call ::fwrite directly.
6232
6233 2017-06-12  Pedro Alves  <palves@redhat.com>
6234
6235         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6236         std::vector::erase.
6237
6238 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6239
6240         Code cleanup: C++ify .gdb_index producer.
6241         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6242         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6243         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6244         (create_strtab, add_string): Remove.
6245         (file_write, data_buf): New.
6246         (struct symtab_index_entry): Use std::vector for cu_indices.
6247         (struct mapped_symtab): Use std::vector for data.
6248         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6249         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6250         Remove.
6251         (find_slot): Change return type.  Update it to the new data structures.
6252         (hash_expand, add_index_entry): Update it to the new data structures.
6253         (offset_type_compare): Remove.
6254         (uniquify_cu_indices): Update it to the new data structures.
6255         (c_str_view, c_str_view_hasher, vector_hasher): New.
6256         (add_indices_to_cpool): Remove.
6257         (write_hash_table): Update it to the new data structures.
6258         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6259         (eq_psymtab_cu_index): Remove.
6260         (psym_index_map): New typedef.
6261         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6262         reference and std::unordered_map for cu_index_htab.
6263         (add_address_entry, add_address_entry_worker, write_address_map)
6264         (write_psymbols): Update it to the new data structures.
6265         (write_obstack): Remove.
6266         (struct signatured_type_index_data): Change types_list to a data_buf
6267         reference and psyms_seen to a std::unordered_set reference.
6268         (write_one_signatured_type, recursively_write_psymbols)
6269         (write_psymtabs_to_index): Update it to the new data structures.
6270
6271 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6272
6273         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6274         separate-debug-file commands.
6275         * symfile.h (separate_debug_file_debug): New global.
6276         * symfile.c (separate_debug_file_debug): New global.
6277         (separate_debug_file_exists, find_separate_debug_file): Add
6278         debug output.
6279         (_initialize_symfile): Add "set debug separate-debug-file"
6280         command.
6281         * build-id.c (build_id_to_debug_bfd,
6282         find_separate_debug_file_by_buildid): Add debug output.
6283
6284 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6285
6286         * gdbarch.sh (displaced_step_free_closure): Remove.
6287         * gdbarch.h, gdbarch.c: Re-generate.
6288         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6289         displaced_step_free_closure.
6290         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6291         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6292         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6293         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6294         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6295         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6296         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6297         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6298         * infrun.c (displaced_step_clear): Call xfree instead of
6299         gdbarch_displaced_step_free_closure.
6300
6301 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6302
6303         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6304         NULL".
6305
6306 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6307
6308         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6309         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6310         (mn10300_push_dummy_call): Likewise.
6311
6312 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6313
6314         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6315
6316 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6317
6318         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6319
6320 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6321
6322         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6323         able to start inferiors using a shell.
6324         (New remote packets): Announce new packet "QStartupWithShell".
6325         * remote.c: Add PACKET_QStartupWithShell.
6326         (extended_remote_create_inferior): Handle new
6327         PACKET_QStartupWithShell.
6328         (remote_protocol_features) <QStartupWithShell>: New entry for
6329         PACKET_QStartupWithShell.
6330         (_initialize_remote): Call "add_packet_config_cmd" for
6331         QStartupShell.
6332
6333 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6334             Pedro Alves  <palves@redhat.com>
6335
6336         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6337         and "nat/fork-inferior.h".
6338         * common/common-inferior.h: New file, with contents from
6339         "gdb/inferior.h".
6340         * commom/common-utils.c: Include "common-utils.h".
6341         (stringify_argv): New function.
6342         * common/common-utils.h (stringify_argv): New prototype.
6343         * configure.nat: Add "fork-inferior.o" as a dependency for
6344         "*linux*", "fbsd*" and "nbsd*" hosts.
6345         * corefile.c (get_exec_file): Update comment.
6346         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6347         instead of "startup_inferior".
6348         (darwin_create_inferior): Call "add_thread_silent" after
6349         "fork_inferior".
6350         * fork-child.c: Cleanup unnecessary includes.
6351         (SHELL_FILE): Move to "common/common-fork-child.c".
6352         (environ): Likewise.
6353         (exec_wrapper): Initialize.
6354         (get_exec_wrapper): New function.
6355         (breakup_args): Move to "common/common-fork-child.c"; rename to
6356         "breakup_args_for_exec".
6357         (escape_bang_in_quoted_argument): Move to
6358         "common/common-fork-child.c".
6359         (saved_ui): New variable.
6360         (prefork_hook): New function.
6361         (postfork_hook): Likewise.
6362         (postfork_child_hook): Likewise.
6363         (gdb_startup_inferior): Likewise.
6364         (fork_inferior): Move to "common/common-fork-child.c".  Update
6365         function to support gdbserver.
6366         (startup_inferior): Likewise.
6367         * gdbcore.h (get_exec_file): Remove declaration.
6368         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6369         instead of "startup_inferior".  Call "add_thread_silent" after
6370         "fork_inferior".
6371         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6372         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6373         instead of "startup_inferior".  Call "add_thread_silent" after
6374         "fork_inferior".
6375         * inferior.h: Include "common-inferior.h".
6376         (trace_start_error): Move to "common/common-utils.h".
6377         (trace_start_error_with_name): Likewise.
6378         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6379         (startup_inferior): Likewise.
6380         (gdb_startup_inferior): New prototype.
6381         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6382         * nat/fork-inferior.h: New file.
6383         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6384         instead of "startup_inferior".  Call "add_thread_silent" after
6385         "fork_inferior".
6386         * target.h (target_terminal_init): Move prototype to
6387         "target/target.h".
6388         (target_terminal_inferior): Likewise.
6389         (target_terminal_ours): Likewise.
6390         * target/target.h (target_terminal_init): New prototype, moved
6391         from "target.h".
6392         (target_terminal_inferior): Likewise.
6393         (target_terminal_ours): Likewise.
6394         * utils.c (gdb_flush_out_err): New function.
6395
6396 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6397
6398         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6399         * common/common-gdbthread.h: New file, with parts from
6400         "gdb/gdbthread.h".
6401         * gdbthread.h: Include "common-gdbthread.h".
6402         (switch_to_thread): Moved to "common/common-gdbthread.h".
6403
6404 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6405
6406         * Makefile.in (SFILES): Add "common/job-control.c".
6407         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6408         (COMMON_OBS): Add "job-control.o".
6409         * common/job-control.c: New file, with contents from
6410         "gdb/inflow.c".
6411         * common/job-control.h: New file, with contents from "terminal.h".
6412         * fork-child.c: Include "job-control.h".
6413         * inflow.c: Include "job-control.h".
6414         (gdb_setpgid): Move to "common/common-inflow.c".
6415         (_initialize_inflow): Move setting of "job_control" to
6416         "handle_job_control".
6417         * terminal.h (job_control): Moved to "common/common-terminal.h".
6418         (gdb_setpgid): Likewise.
6419         * top.c: Include "job_control.h".
6420         * utils.c: Likewise.
6421         (job_control): Moved to "job-control.c".
6422
6423 2017-06-07  Pedro Alves  <palves@redhat.com>
6424
6425         * Makefile.in (SFILES): Add gdb_regex.c.
6426         (COMMON_OBS): Add gdb_regex.o.
6427         * ada-lang.c (ada_add_standard_exceptions)
6428         (ada_add_exceptions_from_frame, name_matches_regex)
6429         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6430         parameter type to compiled_regex.  Adjust.
6431         (ada_exceptions_list): Use compiled_regex.
6432         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6433         std::unique_ptr<compiled_regex>.
6434         (exception_catchpoint::~exception_catchpoint): Remove regfree
6435         call.
6436         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6437         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6438         * breakpoint.c (solib_catchpoint::compiled): Now a
6439         std::unique_ptr<compiled_regex>.
6440         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6441         (check_status_catch_solib): Adjust to use compiled_regex.
6442         (add_solib_catchpoint): Adjust to use compiled_regex.
6443         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6444         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6445         compiled_regex reference.  Adjust to use it.
6446         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6447         declaration.  Include "gdb_regex.h".
6448         (apropos_cmd): Change regex parameter to compiled_regex reference.
6449         * gdb_regex.c: New file.
6450         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6451         declarations.
6452         (class compiled_regex): New.
6453         * linux-tdep.c: Include "common/gdb_optional.h".
6454         (struct mapping_regexes): New, factored out from
6455         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6456         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6457         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6458         * probe.c: Include "common/gdb_optional.h".
6459         (collect_probes): Use compiled_regex and gdb::optional and remove
6460         cleanups.
6461         * skip.c: Include "common/gdb_optional.h".
6462         (skiplist_entry::compiled_function_regexp): Now a
6463         gdb::optional<compiled_regex>.
6464         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6465         (free_skiplist_entry): Remove regfree call.
6466         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6467         compiled_regex and gdb::optional.
6468         * symtab.c: Include "common/gdb_optional.h".
6469         (search_symbols): Use compiled_regex and gdb::optional.
6470         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6471         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6472         to gdb_regex.c.
6473
6474 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6475
6476         * regcache.c (regcache::save): Avoid buffer use.
6477         (regcache::dump): Likewise.
6478
6479 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6480
6481         * sh-tdep.c (sh_pseudo_register_read): Remove
6482         MAX_REGISTER_SIZE.
6483         (sh_pseudo_register_write): Likewise.
6484         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6485         (sh64_pseudo_register_write): Likewise
6486
6487 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6488
6489         * aarch64-tdep.c (aarch64_store_return_value): Use
6490         V_REGISTER_SIZE.
6491         (aarch64_pseudo_read_value): Likewise.
6492         (aarch64_pseudo_write): Likewise.
6493
6494 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6495
6496         * regformats/regdef.h (set_register_cache): Remove the
6497         declaration.
6498
6499 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6500
6501         * frame.c (frame_unwind_register_signed): Use
6502         frame_unwind_register_value.
6503
6504 2017-06-06  Pedro Alves  <palves@redhat.com>
6505
6506         PR breakpoints/21553
6507         * breakpoint.c (create_breakpoints_sal_default)
6508         (init_breakpoint_sal, create_breakpoint_sal): Use
6509         gdb::unique_xmalloc_ptr for string parameters.
6510         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6511         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6512         (base_breakpoint_create_breakpoints_sal)
6513         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6514         (strace_marker_create_breakpoints_sal)
6515         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6516         string parameters.
6517         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6518         gdb::unique_xmalloc_ptr for string parameters.
6519         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6520         parameters.
6521
6522 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6523
6524         * alpha-tdep.c (alpha_register_to_value): Use
6525         get_frame_register_value.
6526         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6527
6528 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6529
6530         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6531         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6532         (ia64_value_to_register): Likewise.
6533         (ia64_extract_return_value): Likewise.
6534         (ia64_store_return_value): Likewise.
6535         (ia64_push_dummy_call): Likewise.
6536
6537 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6538
6539         GDB 8.0 released.
6540
6541 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6542
6543         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6544
6545 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6546
6547         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6548         parameter.
6549         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6550
6551 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6552
6553         * event-loop.c (poll_timers): Unallocate timer using delete
6554         instead of xfree.
6555
6556 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6557
6558         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6559         (struct breakpoint) <~breakpoint>: New.
6560         (struct watchpoint): Inherit from breakpoint.
6561         <~watchpoint>: New.
6562         <base>: Remove.
6563         (struct tracepoint): Inherit from breakpoint.
6564         <base>: Remove.
6565         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6566         (struct longjmp_breakpoint): Inherit from breakpoint.
6567         <~longjmp_breakpoint>: New.
6568         <base>: Remove.
6569         (new_breakpoint_from_type): Remove casts.
6570         (watchpoint_in_thread_scope): Remove reference to base field.
6571         (watchpoint_del_at_next_stop): Likewise.
6572         (update_watchpoint): Likewise.
6573         (watchpoint_check): Likewise.
6574         (bpstat_check_watchpoint): Likewise.
6575         (set_longjmp_breakpoint): Likewise.
6576         (struct fork_catchpoint): Inherit from breakpoint.
6577         <base>: Remove.
6578         (struct solib_catchpoint): Inherit from breakpoint.
6579         <~solib_catchpoint>: New.
6580         <base>: Remove.
6581         (dtor_catch_solib): Change to ...
6582         (solib_catchpoint::~solib_catchpoint): ... this.
6583         (breakpoint_hit_catch_solib): Remove reference to base field.
6584         (add_solib_catchpoint): Likewise.
6585         (create_fork_vfork_event_catchpoint): Likewise.
6586         (struct exec_catchpoint): Inherit from breakpoint.
6587         <~exec_catchpoint>: New.
6588         <base>: Remove.
6589         (dtor_catch_exec): Change to ...
6590         (exec_catchpoint::~exec_catchpoint): ... this.
6591         (dtor_watchpoint): Change to ...
6592         (watchpoint::~watchpoint): ... this.
6593         (watch_command_1): Remove reference to base field.
6594         (catch_exec_command_1): Likewise.
6595         (base_breakpoint_dtor): Change to ...
6596         (breakpoint::~breakpoint): ... this.
6597         (base_breakpoint_ops): Remove dtor field value.
6598         (longjmp_bkpt_dtor): Change to ...
6599         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6600         (strace_marker_create_breakpoints_sal): Remove reference to base
6601         field.
6602         (delete_breakpoint): Don't manually call breakpoint destructor.
6603         (create_tracepoint_from_upload): Remove reference to base field.
6604         (trace_pass_set_count): Likewise.
6605         (initialize_breakpoint_ops): Don't initialize
6606         momentary_breakpoint_ops, don't set dtors.
6607         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6608         <~ada_catchpoint>: New.
6609         <base>: Remove.
6610         (create_excep_cond_exprs): Remove reference to base field.
6611         (dtor_exception): Change to ...
6612         (ada_catchpoint::~ada_catchpoint): ... this.
6613         (dtor_catch_exception): Remove.
6614         (dtor_catch_exception_unhandled): Remove.
6615         (dtor_catch_assert): Remove.
6616         (create_ada_exception_catchpoint): Remove reference to base
6617         field.
6618         (initialize_ada_catchpoint_ops): Don't set dtors.
6619         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6620         breakpoint.
6621         <~signal_catchpoint>: New.
6622         <base>: Remove.
6623         (signal_catchpoint_dtor): Change to ...
6624         (signal_catchpoint::~signal_catchpoint): ... this.
6625         (create_signal_catchpoint): Remove reference to base field.
6626         (initialize_signal_catchpoint_ops): Don't set dtor.
6627         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6628         from breakpoint.
6629         <~syscall_catchpoint>: New.
6630         <base>: Remove.
6631         (dtor_catch_syscall): Change to ...
6632         (syscall_catchpoint::~syscall_catchpoint): ... this.
6633         (create_syscall_event_catchpoint): Remove reference to base
6634         field.
6635         (initialize_syscall_catchpoint_ops): Don't set dtor.
6636         * break-catch-throw.c (struct exception_catchpoint): Inherit
6637         from breakpoint.
6638         <~exception_catchpoint>: New.
6639         <base>: Remove.
6640         (dtor_exception_catchpoint): Change to ...
6641         (exception_catchpoint::~exception_catchpoint): ... this.
6642         (handle_gnu_v3_exceptions): Remove reference to base field.
6643         (initialize_throw_catchpoint_ops): Don't set dtor.
6644         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6645         field.
6646         * remote.c (remote_get_tracepoint_status): Likewise.
6647         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6648         * tracefile.c (tracefile_fetch_registers): Likewise.
6649         * tracepoint.c (actions_command): Likewise.
6650         (validate_actionline): Likewise.
6651         (tfind_1): Likewise.
6652         (get_traceframe_location): Likewise.
6653         (find_matching_tracepoint_location): Likewise.
6654         (parse_tracepoint_status): Likewise.
6655         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6656
6657 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6658
6659         * breakpoint.c (struct longjmp_breakpoint): New struct.
6660         (is_tracepoint_type): Change return type to bool.
6661         (is_longjmp_type): New function.
6662         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6663         (set_raw_breakpoint_without_location): Use
6664         new_breakpoint_from_type.
6665         (set_raw_breakpoint): Likewise.
6666
6667 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6668
6669         * breakpoint.c (new_breakpoint_from_type): New function.
6670         (create_breakpoint_sal): Use new_breakpoint_from_type and
6671         unique_ptr.
6672         (create_breakpoint): Likewise.
6673
6674 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6675
6676         * memattr.c (mem_info_command): Rename to ...
6677         (info_mem_command): ... this.
6678         (mem_enable_command): Rename to ...
6679         (enable_mem_command): ... this.
6680         (mem_disable_command): Rename to ...
6681         (disable_mem_command): ... this.
6682         (mem_delete_command): Rename to ...
6683         (delete_mem_command): ... this.
6684         (_initialize_mem): Adjust function names.
6685
6686 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6687
6688         * btrace.c (handle_pt_insn_events): New.
6689         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6690         STATUS.  Split into this and ...
6691         (handle_pt_insn_event_flags): ... this.
6692
6693 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6694
6695         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6696         and struct pt_insn.resynced.
6697         * configure: Regenerated.
6698         * config.in: Regenerated.
6699
6700 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6701
6702         * btrace.c (ftrace_find_call_by_number): New function.
6703         (ftrace_new_function): Store objects, not pointers.
6704         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6705         ftrace_new_gap, ftrace_update_function,
6706         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6707         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6708         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6709         btrace_ends_with_single_insn, btrace_call_get): Account for
6710         btrace_thread_info::functions now storing objects.
6711         * btrace.h (struct btrace_thread_info): Add constructor.
6712         (struct btrace_thread_info) <functions>: Make std::vector.
6713         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6714         Initialize with default values.
6715         * record-btrace.c (record_btrace_frame_sniffer): Account for
6716         btrace_thread_info::functions now storing objects.
6717
6718 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6719
6720         * btrace.c: Remove typedef bfun_s.
6721         (ftrace_new_gap): Directly add gaps to the list of gaps.
6722         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6723         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6724         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6725         instead of gdb VEC.
6726
6727 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6728
6729         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6730         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6731         with btrace_thread_info::next_segment and
6732         btrace_thread_info::prev_segment.
6733         * btrace.h: Remove struct btrace_func_link.
6734         (struct btrace_function): Replace pair of function segment pointers
6735         with pair of indices.
6736         * python/py-record-btrace.c (btpy_call_prev_sibling,
6737         btpy_call_next_sibling): Replace references to
6738         btrace_thread_info::segment with btrace_thread_info::next_segment and
6739         btrace_thread_info::prev_segment.
6740         * record-btrace.c (record_btrace_frame_this_id): Use
6741         btrace_find_call_by_number.
6742
6743 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6744
6745         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6746         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6747         btrace_insn_next, btrace_insn_prev): Remove references to
6748         btrace_thread_info::flow.
6749         * btrace.h (struct btrace_function): Remove FLOW.
6750
6751 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6752
6753         * btrace.c (ftrace_find_call_by_number): New function.
6754         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6755         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6756         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6757         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6758         index.
6759         * btrace.h (struct btrace_function): Turn UP into an index.
6760         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6761         as an index.
6762         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6763         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6764         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6765
6766 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6767
6768         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6769         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6770         ftrace_update_function, ftrace_compute_global_level_offset,
6771         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6772         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6773         btrace_insn_end, btrace_is_empty): Remove references to
6774         btrace_thread_info::begin and btrace_thread_info::end.
6775         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6776         (struct btrace_thread_info) <functions>: Adjust comment.
6777         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6778         btrace_thread_info::begin.
6779
6780 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6781
6782         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6783         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6784         ftrace_update_function): Remove arguments that implicitly were always
6785         BTINFO->END.
6786         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6787         Don't pass BTINFO->END.
6788
6789 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6790
6791         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6792         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6793         btrace_find_insn_by_number): Replace function segment pointer with
6794         index.
6795         (btrace_insn_cmp): Simplify.
6796         * btrace.h: (struct btrace_insn_iterator) Rename index to
6797         insn_index.  Replace function segment pointer with index into function
6798         segment vector.
6799         * record-btrace.c (record_btrace_call_history): Replace function
6800         segment pointer use with index.
6801         (record_btrace_frame_sniffer): Retrieve function call segment through
6802         vector.
6803         (record_btrace_set_replay): Remove defunc't safety check.
6804
6805 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6806
6807         * btrace.c (btrace_ends_with_single_insn): New function.
6808         (btrace_call_get, btrace_call_number, btrace_call_begin,
6809         btrace_call_end, btrace_call_next, btrace_call_prev,
6810         btrace_find_call_by_number): Use index into call segment vector
6811         instead of pointer.
6812         (btrace_call_cmp): Simplify.
6813         * btrace.h (struct btrace_call_iterator): Replace function call segment
6814         pointer with index into vector.
6815         * record-btrace.c (record_btrace_call_history): Use index instead of
6816         pointer.
6817
6818 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6819
6820         * btrace.c (btrace_insn_begin, btrace_insn_end,
6821         btrace_find_insn_by_number): Add btinfo to iterator.
6822         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6823
6824 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6825
6826         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6827         and save pointers directly.
6828         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6829         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6830         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6831         changed signature of functions.
6832         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6833         (btrace_fetch): Remove code that adds btrace_function pointers to
6834         vector of btrace_functions.
6835         (btrace_clear): Simplify freeing vector of btrace_functions.
6836
6837 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6838
6839         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6840         Replace VEC_* with std::vector functions.
6841         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6842         (struct btrace_thread_info)<functions>: Change type to std::vector.
6843
6844 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6845
6846         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
6847         "Removed targets and native configurations" up.  Merge duplicate
6848         "New commands" sub-sections.  Add "New options" sub-sections.
6849
6850 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
6851
6852         * defs.h (copy_integer_to_size): New declaration.
6853         * findvar.c (copy_integer_to_size): New function.
6854         (do_cint_test): New selftest function.
6855         (copy_integer_to_size_test): Likewise.
6856         (_initialize_findvar): Likewise.
6857         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6858         (mips_fbsd_collect_reg): Use raw_collect_integer.
6859         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6860         (mips64_fill_gregset): Use raw_collect_integer
6861         (mips64_fill_fpregset): Use raw_supply_integer.
6862         * regcache.c (regcache::raw_supply_integer): New function.
6863         (regcache::raw_collect_integer): Likewise.
6864         * regcache.h: (regcache::raw_supply_integer): New declaration.
6865         (regcache::raw_collect_integer): Likewise.
6866
6867 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6868
6869         * Makefile.in (SFILES): Add gdbarch-selftests.c.
6870         (COMMON_OBS): Add gdbarch-selftests.o.
6871         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6872         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6873         * gdbarch-selftests.c: New file.
6874         * regcache.h (regcache) <~regcache>: Mark it virtual if
6875         GDB_SELF_TEST.
6876         <raw_write>: Likewise.
6877
6878 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6879
6880         * regcache.c (current_regcache): Change it to
6881         regcache::current_regcache.
6882         (regcache_observer_target_changed): Update.
6883         (regcache_thread_ptid_changed): Make it a regcache static
6884         method.
6885         (regcache_thread_ptid_changed): Update.
6886         (class regcache_access): New.
6887         (current_regcache_test): Update.
6888         (_initialize_regcache): Update.
6889         * regcache.h: Include forward_list.
6890         (regcache): Declare regcache_thread_ptid_changed and declare
6891         registers_changed_ptid as friend.
6892
6893 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6894
6895         * i387-tdep.c (i387_register_to_value): Use register_size
6896         instead of TYPE_LENGTH.
6897         * m68k-tdep.c (m68k_register_to_value): Likewise.
6898
6899 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6900
6901         * i387-tdep.c (i387_convert_register_p): Return false if type
6902         code isn't TYPE_CODE_FLT.
6903
6904 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6905
6906         * alpha-tdep.c (alpha_convert_register_p): Return true if type
6907         length is 4.
6908         (alpha_register_to_value): Remove type length check.
6909         (alpha_value_to_register): Likewise.
6910
6911 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6912
6913         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6914         TYPE_CODE_FLT.
6915
6916 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6917
6918         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6919         TYPE_CODE_FLT or not.
6920
6921 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6922
6923         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6924         * avr-tdep.c (avr_gdbarch_init): Likewise.
6925         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6926         * cris-tdep.c (cris_gdbarch_init): Likewise.
6927         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6928         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6929         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6930         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6931         * mep-tdep.c (mep_gdbarch_init): Likewise.
6932         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6933         * mips-tdep.c (mips_gdbarch_init): Likewise.
6934         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6935         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6936         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6937         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6938         * v850-tdep.c (v850_gdbarch_init): Likewise.
6939
6940 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6941
6942         * selftest-arch.c (tests_with_arch): Call registers_changed
6943         and reinit_frame_cache.
6944         * selftest.c (run_self_tests): Likewise.
6945
6946 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6947
6948         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6949         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6950
6951 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6952
6953         * rl78-tdep.c (rl78_gdbarch_init): Don't call
6954         set_gdbarch_print_insn.
6955
6956 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6957
6958         * h8300-tdep.c (h8300_gdbarch_init): Don't call
6959         set_gdbarch_print_insn.
6960
6961 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6962
6963         * alpha-tdep.c (alpha_gdbarch_init): Don't call
6964         set_gdbarch_print_insn.
6965         * arc-tdep.c (arc_gdbarch_init): Likewise.
6966         * arch-utils.c: include dis-asm.h.
6967         (default_print_insn): New function.
6968         * arch-utils.h (default_print_insn): Declare.
6969         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6970         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6971         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6972         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6973         * frv-tdep.c (frv_gdbarch_init): Likewise.
6974         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6975         * gdbarch.sh (print_insn): Use default_print_insn.
6976         * gdbarch.c: Regenerated.
6977         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6978         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6979         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6980         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6981         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6982         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6983         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6984         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6985         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6986         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6987         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6988         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6989         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6990         * mt-tdep.c (mt_gdbarch_init): Likewise.
6991         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6992         * nios2-tdep.c (nios2_print_insn): Remove.
6993         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6994         * rx-tdep.c (rx_gdbarch_init): Likewise.
6995         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6996         * score-tdep.c (score_print_insn): Remove.
6997         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6998         * sh-tdep.c (sh_gdbarch_init): Likewise.
6999         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7000         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7001         * tic6x-tdep.c (tic6x_print_insn): Remove.
7002         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7003         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7004         * v850-tdep.c (v850_gdbarch_init): Likewise.
7005         * vax-tdep.c (vax_gdbarch_init): Likewise.
7006         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7007         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7008
7009 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7010
7011         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7012         (MIPS_FP0_REGNUM): Remove.
7013         (MIPS_FSR_REGNUM): Remove.
7014         (mips_fbsd_supply_fpregs): Use mips_regnum.
7015         (mips_fbsd_supply_gregs): Likewise.
7016         (mips_fbsd_collect_fpregs): Likewise.
7017         (mips_fbsd_collect_gregs): Likewise.
7018
7019 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7020
7021         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7022         (getpfpregs_supplies): New function.
7023         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7024         getfpregs_supplies.
7025         (mips_fbsd_store_inferior_registers): Likewise.
7026
7027 2017-05-22  Pedro Alves <palves@redhat.com>
7028
7029         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7030         maintainer.
7031
7032 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7033
7034         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7035         (store_register): Likewise.
7036         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7037         (get_decimal_float_return_value): Likewise.
7038         (do_ppc_sysv_return_value): Likewise.
7039         (ppc64_sysv_abi_push_integer): Likewise.
7040         (ppc64_sysv_abi_push_freg): Likewise.
7041         (ppc64_sysv_abi_return_value_base): Likewise.
7042         (ppc64_sysv_abi_return_value): Likewise.
7043         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7044         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7045         * rs6000-nat.c: Likewise.
7046         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7047         (rs6000_value_to_register): Likewise.
7048         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7049
7050 2017-05-21  Tom Tromey  <tom@tromey.com>
7051
7052         PR rust/21466:
7053         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7054         arrays as "[T]", not "[T; ]".
7055
7056 2017-05-19  Tom Tromey  <tom@tromey.com>
7057
7058         PR rust/21484:
7059         * rust-lang.c (exp_descriptor_rust): New function.
7060         (rust_language_defn): Use it.
7061         * p-lang.c (pascal_language_defn): Update.
7062         * opencl-lang.c (opencl_language_defn): Update.
7063         * objc-lang.c (objc_language_defn): Update.
7064         * m2-lang.c (m2_language_defn): Update.
7065         * language.h (struct language_defn)
7066         <la_watch_location_expression>: New member.
7067         * language.c (unknown_language_defn, auto_language_defn)
7068         (local_language_defn): Update.
7069         * go-lang.c (go_language_defn): Update.
7070         * f-lang.c (f_language_defn): Update.
7071         * d-lang.c (d_language_defn): Update.
7072         * c-lang.h (c_watch_location_expression): Declare.
7073         * c-lang.c (c_watch_location_expression): New function.
7074         (c_language_defn, cplus_language_defn, asm_language_defn)
7075         (minimal_language_defn): Use it.
7076         * breakpoint.c (watch_command_1): Call
7077         la_watch_location_expression.
7078         * ada-lang.c (ada_language_defn): Update.
7079
7080 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7081
7082         PR tui/21482
7083         * gdb_curses.h (NOMACROS): Define.
7084         (NCURSES_NOMACROS): Define.
7085
7086 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7087
7088         PR tui/21482
7089         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7090         arg to char *.
7091         * tui/tui-wingeneral.c (box_win): Likewise.
7092         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7093         (tui_show_source_line): Likewise.
7094         (tui_show_exec_info_content): Likewise.
7095
7096 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7097
7098         * sparc-tdep.c (sparc_structure_return_p)
7099         (sparc_arg_on_registers_p): New functions.
7100         (sparc32_store_arguments): Use them.
7101         * sparc64-tdep.c (sparc64_16_byte_align_p)
7102         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7103         Handle TYPE_CODE_ARRAY.
7104
7105 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7106
7107         * cli/cli-decode.c (add_alias_cmd): New function.
7108         * command.h (add_alias_cmd): Declare.
7109         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7110         instead call add_alias_cmd.
7111
7112 2017-05-17  Pedro Alves  <palves@redhat.com>
7113
7114         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7115         (nat_makefile_frag): ... this.  All references updated.
7116         * configure.ac: Likewise.
7117         * configure.nat: Likewise.  Enhance comments.
7118         * configure: Regenerate.
7119
7120 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7121
7122         * procfs.c (procfs_create_inferior): Change prototype to match
7123         definition.
7124
7125 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7126
7127         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7128         C++ compiler warning.
7129
7130 2017-05-12  Tom Tromey  <tom@tromey.com>
7131
7132         PR rust/21483:
7133         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7134         recurse, just call value_struct_elt directly.
7135
7136 2017-05-12  Tom Tromey  <tom@tromey.com>
7137
7138         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7139         OP_RUST_ARRAY>: Fix.
7140
7141 2017-05-12  Tom Tromey  <tom@tromey.com>
7142
7143         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7144
7145 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7146
7147         * regcache.c: Include <forward_list>.
7148         (struct regcache_list): Remove.
7149         (current_regcache): Update.
7150         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7151         (regcache_thread_ptid_changed): Likewise.
7152         (registers_changed_ptid): Likewise.
7153         (current_regcache_size): Likewise.
7154
7155 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7156
7157         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7158         (current_regcache_size): New function.
7159         (current_regcache_test): New function.
7160         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7161
7162 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7163
7164         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7165         (print_gp_register_row): Use get_frame_register_value.
7166
7167 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7168
7169         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7170         (mips_supply_fpregset): Likewise.
7171         (mips64_supply_gregset): Likewise.
7172
7173 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7174
7175         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7176         regcache->raw_supply_zeroed.
7177
7178 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7179
7180         * configure.nat: Rearrange 'case' statements to match
7181         host before cpu.
7182
7183 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7184
7185         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7186         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7187         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7188         "@nat_extra_makefile_frag@".
7189         (Makefile): Remove dependency on "@frags@".
7190         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7191         (data-directory/Makefile): Likewise.
7192         * config/aarch64/linux.mh: Deleted; moved contents to
7193         "gdb/configure.nat".
7194         * config/alpha/alpha-linux.mh: Likewise.
7195         * config/alpha/nbsd.mh: Likewise.
7196         * config/arm/linux.mh: Likewise.
7197         * config/arm/nbsdelf.mh: Likewise.
7198         * config/i386/cygwin.mh: Likewise.
7199         * config/i386/cygwin64.mh: Likewise.
7200         * config/i386/darwin.mh: Likewise.
7201         * config/i386/fbsd.mh: Likewise.
7202         * config/i386/fbsd64.mh: Likewise.
7203         * config/i386/go32.mh: Likewise.
7204         * config/i386/i386gnu.mh: Likewise.
7205         * config/i386/i386sol2.mh: Likewise.
7206         * config/i386/linux.mh: Likewise.
7207         * config/i386/linux64.mh: Likewise.
7208         * config/i386/mingw.mh: Likewise.
7209         * config/i386/mingw64.mh: Likewise.
7210         * config/i386/nbsd64.mh: Likewise.
7211         * config/i386/nbsdelf.mh: Likewise.
7212         * config/i386/nto.mh: Likewise.
7213         * config/i386/obsd.mh: Likewise.
7214         * config/i386/obsd64.mh: Likewise.
7215         * config/i386/sol2-64.mh: Likewise.
7216         * config/ia64/linux.mh: Likewise.
7217         * config/m32r/linux.mh: Likewise.
7218         * config/m68k/linux.mh: Likewise.
7219         * config/m68k/nbsdelf.mh: Likewise.
7220         * config/m68k/obsd.mh: Likewise.
7221         * config/m88k/obsd.mh: Likewise.
7222         * config/mips/fbsd.mh: Likewise.
7223         * config/mips/linux.mh: Likewise.
7224         * config/mips/nbsd.mh: Likewise.
7225         * config/mips/obsd64.mh: Likewise.
7226         * config/pa/linux.mh: Likewise.
7227         * config/pa/nbsd.mh: Likewise.
7228         * config/pa/obsd.mh: Likewise.
7229         * config/powerpc/aix.mh: Likewise.
7230         * config/powerpc/fbsd.mh: Likewise.
7231         * config/powerpc/linux.mh: Likewise.
7232         * config/powerpc/nbsd.mh: Likewise.
7233         * config/powerpc/obsd.mh: Likewise.
7234         * config/powerpc/ppc64-linux.mh: Likewise.
7235         * config/powerpc/spu-linux.mh: Likewise.
7236         * config/s390/linux.mh: Likewise.
7237         * config/sh/nbsd.mh: Likewise.
7238         * config/sparc/fbsd.mh: Likewise.
7239         * config/sparc/linux.mh: Likewise.
7240         * config/sparc/linux64.mh: Likewise.
7241         * config/sparc/nbsd64.mh: Likewise.
7242         * config/sparc/nbsdelf.mh: Likewise.
7243         * config/sparc/obsd64.mh: Likewise.
7244         * config/sparc/sol2.mh: Likewise.
7245         * config/tilegx/linux.mh: Likewise.
7246         * config/vax/nbsdelf.mh: Likewise.
7247         * config/vax/obsd.mh: Likewise.
7248         * config/xtensa/linux.mh: Likewise.
7249         * config/i386/i386gnu.mn: New file, with excerpts from
7250         "config/i386/i386gnu.mh".
7251         * configure: Regenerate.
7252         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7253         *.mh files under "gdb/config".
7254         * configure.nat: New file, with contents from the
7255         "gdb/config/*/*.mh" files.
7256
7257 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7258
7259         * btrace.c (btrace_clear): Free insn vector.
7260
7261 2017-05-05  Pedro Alves  <palves@redhat.com>
7262
7263         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7264         * configure: Regenerate.
7265
7266 2017-05-04  Pedro Alves  <palves@redhat.com>
7267
7268         * Makefile.in (SFILES): Add progspace-and-thread.c.
7269         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7270         (COMMON_OBS): Add progspace-and-thread.o.
7271         * breakpoint.c: Include "progspace-and-thread.h".
7272         (update_inserted_breakpoint_locations)
7273         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7274         Use scoped_restore_current_pspace_and_thread.
7275         (create_std_terminate_master_breakpoint): Use
7276         scoped_restore_current_program_space.
7277         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7278         (print_breakpoint_location): Use
7279         scoped_restore_current_program_space.
7280         (bp_loc_is_permanent): Use
7281         scoped_restore_current_pspace_and_thread.
7282         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7283         (download_tracepoint_locations): Use
7284         scoped_restore_current_pspace_and_thread.
7285         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7286         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7287         (enum step_over_calls_kind): Moved from inferior.h.
7288         (class scoped_restore_current_thread): New class.
7289         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7290         declaration.
7291         (scoped_restore_current_thread): New class.
7292         * infcmd.c: Include "common/gdb_optional.h".
7293         (continue_1, proceed_after_attach): Use
7294         scoped_restore_current_thread.
7295         (notice_new_inferior): Use scoped_restore_current_thread.
7296         * inferior.c: Include "progspace-and-thread.h".
7297         (restore_inferior, save_current_inferior): Delete.
7298         (add_inferior_command, clone_inferior_command): Use
7299         scoped_restore_current_pspace_and_thread.
7300         * inferior.h (scoped_restore_current_inferior): New class.
7301         * infrun.c: Include "progspace-and-thread.h" and
7302         "common/gdb_optional.h".
7303         (follow_fork_inferior): Use
7304         scoped_restore_current_pspace_and_thread.
7305         (scoped_restore_exited_inferior): New class.
7306         (handle_vfork_child_exec_or_exit): Use
7307         scoped_restore_exited_inferior,
7308         scoped_restore_current_pspace_and_thread,
7309         scoped_restore_current_thread and scoped_restore.
7310         (fetch_inferior_event): Use scoped_restore_current_thread.
7311         * linespec.c (decode_line_full, decode_line_1): Use
7312         scoped_restore_current_program_space.
7313         * mi/mi-main.c: Include "progspace-and-thread.h".
7314         (exec_continue): Use scoped_restore_current_thread.
7315         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7316         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7317         * proc-service.c (ps_pglobal_lookup): Use
7318         scoped_restore_current_program_space.
7319         * progspace-and-thread.c: New file.
7320         * progspace-and-thread.h: New file.
7321         * progspace.c (release_program_space, clone_program_space): Use
7322         scoped_restore_current_program_space.
7323         (restore_program_space, save_current_program_space)
7324         (save_current_space_and_thread): Delete.
7325         (switch_to_program_space_and_thread): Moved to
7326         progspace-and-thread.c.
7327         * progspace.h (save_current_program_space)
7328         (save_current_space_and_thread): Delete declarations.
7329         (scoped_restore_current_program_space): New class.
7330         * remote.c (remote_btrace_maybe_reopen): Use
7331         scoped_restore_current_thread.
7332         * symtab.c: Include "progspace-and-thread.h".
7333         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7334         * thread.c (print_thread_info_1): Use
7335         scoped_restore_current_thread.
7336         (struct current_thread_cleanup): Delete.
7337         (do_restore_current_thread_cleanup)
7338         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7339         (scoped_restore_current_thread::~scoped_restore_current_thread):
7340         ... this new dtor.
7341         (make_cleanup_restore_current_thread): Rename/convert to ...
7342         (scoped_restore_current_thread::scoped_restore_current_thread):
7343         ... this new ctor.
7344         (thread_apply_all_command): Use scoped_restore_current_thread.
7345         (thread_apply_command): Use scoped_restore_current_thread.
7346         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7347         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7348
7349 2017-05-04  Pedro Alves  <palves@redhat.com>
7350
7351         * thread.c (make_cleanup_restore_current_thread): Move
7352         find_thread_ptid call before the is_stopped call.  Assert that the
7353         thread is found.  Replace is_stopped call by checking the thread's
7354         state directly.  Remove unnecessary NULL-thread check.
7355
7356 2017-05-04  Pedro Alves  <palves@redhat.com>
7357
7358         * corelow.c (thread_section_name): New class.
7359         (get_core_register_section, get_core_siginfo): Use it.
7360
7361 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7362
7363         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7364         (get_core_register_section): Remove xfree of NULL pointer.
7365
7366 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7367
7368         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7369         * regcache.c (regcache::raw_supply_zeroed): New function.
7370         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7371
7372 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7373
7374         * gdbarch.sh: Remove commented out definition of
7375         TARGET_CHAR_BIT.
7376         * gdbarch.h: Re-generate.
7377
7378 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7379
7380         * configure: Regenerate.
7381
7382 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7383
7384         * solib-target.c (solib_target_relocate_section_addresses):
7385         Remove num_section_bases, num_bases, segment_bases variables.
7386
7387 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7388
7389         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7390
7391 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7392
7393         * solib-target.c: Include <vector>
7394         (struct lm_info_target) <~lm_info_target>: Remove.
7395         <segment_bases, section_bases>: Change type to
7396         std::vector<CORE_ADDR>.
7397         (library_list_start_segment, library_list_start_section,
7398         library_list_end_library,
7399         solib_target_relocate_section_addresses): Adjust.
7400
7401 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7402
7403         * gdbarch.sh (software_single_step): Change return type to
7404         std::vector<CORE_ADDR>.
7405         * gdbarch.c, gdbarch.h: Re-generate.
7406         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7407         Adjust.
7408         (arm_deal_with_atomic_sequence_raw): Adjust.
7409         (thumb_get_next_pcs_raw): Adjust.
7410         (arm_get_next_pcs_raw): Adjust.
7411         (arm_get_next_pcs): Adjust.
7412         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7413         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7414         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7415         (alpha_software_single_step): Adjust.
7416         * alpha-tdep.h (alpha_software_single_step): Adjust.
7417         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7418         * arm-tdep.c (arm_software_single_step): Adjust.
7419         (arm_breakpoint_kind_from_current_state): Adjust.
7420         * arm-tdep.h (arm_software_single_step): Adjust.
7421         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7422         * cris-tdep.c (cris_software_single_step): Adjust.
7423         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7424         (micromips_deal_with_atomic_sequence): Adjust.
7425         (deal_with_atomic_sequence): Adjust.
7426         (mips_software_single_step): Adjust.
7427         * mips-tdep.h (mips_software_single_step): Adjust.
7428         * moxie-tdep.c (moxie_software_single_step): Adjust.
7429         * nios2-tdep.c (nios2_software_single_step): Adjust.
7430         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7431         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7432         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7433         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7434         * sparc-tdep.c (sparc_software_single_step): Adjust.
7435         * spu-tdep.c (spu_software_single_step): Adjust.
7436         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7437
7438 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7439
7440         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7441         * gdbarch.h: Re-generate.
7442
7443 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7444
7445         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7446         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7447         * python/py-instruction.c, python/py-instruction.h: New file.
7448         * python/py-record.c: Add py-instruction.h include.
7449         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7450         gdb.RecordInstruction.
7451         * python/python-internal.h: Add gdbpy_initialize_instruction
7452         declaration.
7453         * python/python.c (do_start_initialization): Add
7454         gdbpy_initialize_instruction.
7455
7456 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7457
7458         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7459         Remove.
7460         (btrace_func_from_recpy_func): New function.
7461         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7462         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7463         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7464         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7465         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7466         Also, use new helper functions.
7467         (btpy_list_item): Use new helper functions.
7468         (recpy_bt_function_call_history): Use new type name.
7469         (btpy_call_getset): Remove.
7470         (gdbpy_initialize_btrace): Remove code to initialize
7471         gdb.BtraceFunctionCall.
7472         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7473         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7474         recpy_bt_func_prev, recpy_bt_func_next): New export.
7475         * python/py-record.c (recpy_func_type): New static object.
7476         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7477         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7478         recpy_func_next): New function.
7479         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7480         (recpy_func_getset): New static object.
7481         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7482         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7483
7484 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7485
7486         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7487         (btpy_object, btpy_insn_type, btpy_new): Remove.
7488         (btpy_list_object): Use gdb.RecordInstruction type instead of
7489         gdb.BtraceInstruction type.
7490         (btrace_insn_from_recpy_insn): New function.
7491         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7492         btpy_new.
7493         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7494         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7495         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7496         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7497         instead of btpy_object.
7498         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7499         btpy_insn_data, btpy_insn_decode): Rename to ...
7500         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7501         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7502         recpy_bt_insn_decode): This.  Also, use new helper functions.
7503         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7504         recpy_insn_type.
7505         (btpy_insn_getset): Remove.
7506         (gdbpy_initialize_btrace): Remove code to initialize
7507         gdb.BtraceInstruction.  Use recpy_element_object.
7508         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7509         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7510         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7511         * python/py-record.c (recpy_insn_type): New static object.
7512         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7513         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7514         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7515         New function.
7516         (recpy_insn_getset): New static object.
7517         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7518         * python/py-record.h (recpy_element_object): New typedef.
7519         (recpy_insn_type, recpy_insn_new): New export.
7520
7521 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7522
7523         * py-record-btrace.c (btpy_insn_new): Removed.
7524         (btpy_insn_or_gap_new): New function.
7525         (btpy_insn_error): Removed.
7526         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7527         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7528         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7529         btpy_insn_or_gap_new instead of btpy_insn_new.
7530         (btpy_insn_getset): Remove btpy_insn_error.
7531         * py-record.c (recpy_gap_type): New static object.
7532         (recpy_gap_object): New typedef.
7533         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7534         recpy_gap_reason_string): New function.
7535         (recpy_gap_getset): New static object.
7536         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7537         * py-record.h (recpy_gap_new): New export.
7538
7539 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7540
7541         * python/py-record.c (recpy_ptid): Remove.
7542         (recpy_record_getset): Remove recpy_ptid.
7543
7544 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7545
7546         * btrace.c (btrace_fetch): Set inferior_ptid.
7547         * python/py-record-btrace.c: Add "py-record.h" include.
7548         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7549         recpy_bt_end, recpy_bt_instruction_history,
7550         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7551         in gdb.Record object instead of current ptid.
7552         * python/py-record.c: Include new "py-record.h" file.
7553         (recpy_record_object): Moved to py-record.h.
7554         * python/py-record.h: New file.
7555
7556 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7557
7558         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7559         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7560         indentation.
7561
7562 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7563
7564         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7565         the past maintainers section.
7566
7567 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7568
7569         * infcmd.c (get_return_value): Use regcache ctor, and remove
7570         cleanup.
7571
7572 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7573             Pedro Alves  <palves@redhat.com>
7574
7575         * regcache.c (regcache::regcache): New tag dispatch ctor.
7576         (do_cooked_read): Moved above.
7577         (regcache_dup): Use the tag dispatch ctor..
7578         * regcache.h (regcache): Declare ctor, delete copy ctor and
7579         assignment operator, remove friend regcache_dup.
7580
7581 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7582
7583         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7584         call method save instead of regcache_cpy.
7585         * regcache.h (struct regcache): Make regcache_dup a friend.
7586
7587 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7588
7589         * regcache.c (struct regcache): Move to regcache.h
7590         (regcache::arch): New method.
7591         (regcache_get_ptid): Update.
7592         (get_regcache_arch): Call arch method.
7593         (get_regcache_aspace): Call method aspace.
7594         (register_buffer): Change it to method.
7595         (regcache_save): Change it to regcache::save.
7596         (regcache_restore): Likewise.
7597         (regcache_cpy_no_passthrough): Remove the declaration.
7598         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7599         (regcache_cpy_no_passthrough): Change it to method
7600         cpy_no_passthrough.
7601         (regcache_register_status): Change it to method
7602         get_register_status.
7603         (regcache_invalidate): Change it to method invalidate.
7604         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7605         (regcache_raw_update): Change it to method raw_update.
7606         (regcache_raw_read): Likewise.
7607         (regcache_raw_read_signed): Likewise.
7608         (regcache_raw_read_unsigned): Likewise.
7609         (regcache_raw_write_signed): Likewise.
7610         (regcache_raw_write_unsigned): Likewise.
7611         (regcache_cooked_read): Likewise.
7612         (regcache_cooked_read_value): Likewise.
7613         (regcache_cooked_read_signed): Likewise.
7614         (regcache_cooked_read_unsigned): Likewise.
7615         (regcache_cooked_write_signed): Likewise.
7616         (regcache_cooked_write_unsigned): Likewise.
7617         (regcache_raw_set_cached_value): Likewise.
7618         (regcache_raw_write): Likewise.
7619         (regcache_cooked_write): Likewise.
7620         (regcache_xfer_part): Likewise.
7621         (regcache_raw_read_part): Likewise.
7622         (regcache_raw_write_part): Likewise.
7623         (regcache_cooked_read_part): Likewise.
7624         (regcache_cooked_write_part): Likewise.
7625         (regcache_raw_supply): Likewise.
7626         (regcache_raw_collect): Likewise.
7627         (regcache_transfer_regset): Likewise.
7628         (regcache_supply_regset): Likewise.
7629         (regcache_collect_regset): Likewise.
7630         (regcache_debug_print_register): Likewise.
7631         (enum regcache_dump_what): Move it to regcache.h.
7632         (regcache_dump): Change it to method dump.
7633         * regcache.h (enum regcache_dump_what): New.
7634         (class regcache): New.
7635         * target.c (target_fetch_registers): Call method
7636         debug_print_register.
7637         (target_store_registers): Likewise.
7638
7639 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7640
7641         * windows-nat.c (struct lm_info_windows): Initialize field.
7642         (windows_make_so): Allocate lm_info_windows with new.
7643         (windows_free_so): Free lm_info_windows with delete.
7644
7645 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7646
7647         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7648         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7649         cleanup.
7650         (darwin_free_so): Free lm_info_darwin with delete.
7651
7652 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7653
7654         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7655         <l_addr_p>: Change type to bool.
7656         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7657         (svr4_free_so): Free lm_info_svr4 with delete.
7658         (svr4_copy_library_list): Replace memcpy with call to copy
7659         constructor.
7660         (library_list_start_library, svr4_default_sos): Allocate
7661         lm_info_svr4 with new.
7662
7663 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7664
7665         * solib-target.c (struct lm_info_target): Add destructor,
7666         initialize fields.
7667         <name>: Change type to std::string.
7668         (library_list_start_library): Allocate lm_info_target with new.
7669         (solib_target_free_library_list): Free lm_info_target with
7670         delete.
7671         (solib_target_current_sos): Adapt to std::string.
7672         (solib_target_free_so): Free lm_info_target with delete.
7673
7674 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7675
7676         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7677         fields.
7678         (frv_current_sos): Allocate lm_info_frv with new.
7679         (frv_relocate_main_executable): Free lm_info_frv with delete,
7680         allocate with new.
7681         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7682
7683 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7684
7685         * solib-frv.c (struct lm_info_frv): Fix indentation.
7686
7687 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7688
7689         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7690         map field.
7691         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7692         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7693         and allocate with new.
7694         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7695
7696 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7697
7698         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7699         <filename, member_name>: Change type to std::string.
7700         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7701         (library_list_start_library): Allocate lm_info_aix with new.
7702         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7703         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7704         with copy constructor.
7705
7706 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7707
7708         * solist.h (struct lm_info): Remove.
7709         (struct lm_info_base): New class.
7710         (struct so_list) <lm_info>: Change type to lm_info_base *.
7711         * nto-tdep.c (struct lm_info): Remove.
7712         (lm_addr): Adjust.
7713         * solib-aix.c (struct lm_info): Rename to ...
7714         (struct lm_info_aix): ... this.  Extend lm_info_base.
7715         (lm_info_p): Rename to ...
7716         (lm_info_aix_p): ... this, and adjust.
7717         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7718         solib_aix_parse_libraries, library_list_start_library,
7719         solib_aix_free_library_list, solib_aix_parse_libraries,
7720         solib_aix_get_library_list,
7721         solib_aix_relocate_section_addresses, solib_aix_free_so,
7722         solib_aix_get_section_offsets,
7723         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7724         Adjust.
7725         (struct solib_aix_inferior_data) <library_list>: Adjust.
7726         * solib-darwin.c (struct lm_info): Rename to ...
7727         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7728         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7729         * solib-dsbt.c (struct lm_info): Rename to ...
7730         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7731         (struct dsbt_info) <main_executable_lm_info): Adjust.
7732         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7733         dsbt_relocate_section_addresses): Adjust.
7734         * solib-frv.c (struct lm_info): Rename to ...
7735         (struct lm_info_frv): ... this.  Extend lm_info_base.
7736         (main_executable_lm_info): Adjust.
7737         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7738         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7739         find_canonical_descriptor_in_load_object,
7740         frv_fdpic_find_canonical_descriptor): Adjust.
7741         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7742         to lm_info_svr4.
7743         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7744         svr4_clear_so, svr4_copy_library_list,
7745         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7746         svr4_current_sos, svr4_fetch_objfile_link_map,
7747         solist_update_incremental): Adjust.
7748         * solib-svr4.h (struct lm_info_svr4): Move here from
7749         solib-svr4.c.
7750         * solib-target.c (struct lm_info): Rename to ...
7751         (struct lm_info_target): ... this.  Extend lm_info_base.
7752         (lm_info_p): Rename to ...
7753         (lm_info_target_p): ... this.
7754         (solib_target_parse_libraries, library_list_start_segment,
7755         library_list_start_section, library_list_start_library,
7756         library_list_end_library, solib_target_free_library_list,
7757         solib_target_current_sos, solib_target_free_so,
7758         solib_target_relocate_section_addresses): Adjust.
7759         * windows-nat.c (struct lm_info): Rename to ...
7760         (struct lm_info_windows): ... this.  Extend lm_info_base.
7761         (windows_make_so, handle_load_dll, handle_unload_dll,
7762         windows_xfer_shared_libraries): Adjust.
7763
7764 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7765
7766         * solib-darwin.c (struct darwin_so_list): Remove.
7767         (darwin_current_sos): Allocate an so_list object instead of a
7768         darwin_so_list, separately allocate an lm_info object.
7769         (darwin_free_so): Free lm_info.
7770
7771 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7772
7773         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7774         with fprintf_filtered.
7775
7776 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7777
7778         * regcache.c (regcache::regcache): New function.
7779         (regcache::~regcache): New function.
7780         (regcache_xmalloc_1): Remove.
7781         (regcache_xmalloc): Call new regcache.
7782         (regcache_xfree): Call delete regcache.
7783         (get_thread_arch_aspace_regcache): Call new regcache.
7784
7785 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7786
7787         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7788         lwp instead of ptid_get_lwp.
7789
7790 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7791
7792         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7793         lwp_info instead of getting from inferior_ptid.
7794
7795 2017-04-27  Keith Seitz  <keiths@redhat.com>
7796
7797         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7798         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7799         (CV_CONVERSION_BADNESS): Define.
7800         (rank_one_type): Remove overly restrictive rvalue reference
7801         rank checks.
7802         Add cv-qualifier checks and subranks for type equality.
7803         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7804         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7805         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7806
7807 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7808
7809         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7810         count when creating the object.
7811
7812 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7813             Ulrich Weigand  <uweigand@de.ibm.com>
7814
7815         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7816         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7817         is used in AIX.
7818         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7819         (process_xcoff_symbol): Likewise.
7820         (scan_xcoff_symtab): Likewise.
7821
7822 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7823
7824         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7825         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7826         (ia64_access_reg): Use get_frame_register_unsigned.
7827         (ia64_access_rse_reg): Likewise.
7828         (ia64_libunwind_frame_prev_register): Likewise.
7829
7830 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7831
7832         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7833         * gdbarch.c: Regenerated.
7834         * gdbarch.h: Regenerated.
7835         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7836         visibility external.
7837         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7838         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7839         (enum cfa_how_kind): Move to ...
7840         (struct dwarf2_frame_state_reg_info): Likewise.
7841         (struct dwarf2_frame_state): Likewise.
7842         * dwarf2-frame.h: ... here.
7843         (dwarf2_frame_state_alloc_regs): New declaration.
7844         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7845         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7846
7847 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7848
7849         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7850         regcache_raw_read_unsigned.
7851         (xtensa_pseudo_register_write): Likewise.
7852
7853 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7854
7855         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7856         (nds32_pseudo_register_write): Likewise.
7857
7858 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7859
7860         * regcache.c (struct regcache) <readonly_p>: Change its type
7861         to bool.
7862         (regcache_xmalloc_1): Update parameter type and callers update.
7863
7864 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7865
7866         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7867         set_gdbarch_wchar_bit.
7868         * arm-tdep.c (arm_gdbarch_init): Likewise.
7869
7870 2017-04-25  Pedro Alves  <palves@redhat.com>
7871
7872         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7873         (BothAreRelocatable, memcopy, memmove): Don't define.
7874         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7875         macros.
7876
7877 2017-04-25  Pedro Alves  <palves@redhat.com>
7878
7879         * common/common-defs.h: Include "common/poison.h".
7880         * common/function-view.h: (Not, Or, Requires): Move to traits.h
7881         and adjust.
7882         * common/poison.h: New file.
7883         * common/traits.h: Include <type_traits>.
7884         (Not, Or, Requires): New, moved from common/function-view.h.
7885
7886 2017-04-25  Pedro Alves  <palves@redhat.com>
7887
7888         * breakpoint.h (struct breakpoint): In-class initialize all
7889         fields.  Make boolean fields "bool".
7890         * breakpoint.c (init_raw_breakpoint_without_location): Remove
7891         memset call and initializations no longer necessary.
7892
7893 2017-04-25  Pedro Alves  <palves@redhat.com>
7894
7895         * btrace.c (pt_btrace_insn_flags): Change parameter type to
7896         reference.
7897         (pt_btrace_insn): New function.
7898         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7899
7900 2017-04-25  Pedro Alves  <palves@redhat.com>
7901
7902         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
7903         "base" field and inherit from "bp_location" instead.  Add
7904         non-default ctor.
7905         (allocate_location_exception): Use new non-default ctor.
7906         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7907         (init_bp_location): Convert to ...
7908         (bp_location::bp_location): ... this new ctor, and remove memset
7909         call.
7910         (base_breakpoint_allocate_location): Use the new non-default ctor.
7911         * breakpoint.h (bp_location): Now a class.  Declare default and
7912         non-default ctors.  In-class initialize all members.
7913         (init_bp_location): Remove declaration.
7914
7915 2017-04-25  Pedro Alves  <palves@redhat.com>
7916
7917         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7918         assignment operator.
7919
7920 2017-04-24  Yao Qi  <yao.qi@linaro.org>
7921
7922         * doublest.c (convert_doublest_to_floatformat): Call
7923         floatformat_totalsize_bytes.
7924
7925 2017-04-22  Tom Tromey  <tom@tromey.com>
7926
7927         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7928         ui_out_emit_list.
7929         * stack.c (print_frame): Use ui_out_emit_list.
7930         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7931         ui_out_emit_list.
7932         * mi/mi-main.c (print_one_inferior)
7933         (mi_cmd_data_list_register_names)
7934         (mi_cmd_data_list_register_values, mi_cmd_list_features)
7935         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7936         ui_out_emit_list.
7937         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7938         (mi_output_solib_attribs): Use ui_out_emit_list,
7939         ui_out_emit_tuple.
7940         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7941         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7942         (mi_cmd_stack_list_args, list_args_or_locals): Use
7943         ui_out_emit_list.
7944         * disasm.c (do_assembly_only): Use ui_out_emit_list.
7945         * breakpoint.c (print_solib_event, output_thread_groups): Use
7946         ui_out_emit_list.
7947
7948 2017-04-22  Tom Tromey  <tom@tromey.com>
7949
7950         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7951         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7952         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7953
7954 2017-04-22  Tom Tromey  <tom@tromey.com>
7955
7956         * tracepoint.c (tvariables_info_1)
7957         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7958
7959 2017-04-22  Tom Tromey  <tom@tromey.com>
7960
7961         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7962         annotate_arg_emitter.
7963         * breakpoint.c (print_mention_watchpoint)
7964         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7965         * annotate.h (struct annotate_arg_emitter): New.
7966
7967 2017-04-22  Tom Tromey  <tom@tromey.com>
7968
7969         * record-btrace.c (record_btrace_insn_history)
7970         (record_btrace_insn_history_range, record_btrace_call_history)
7971         (record_btrace_call_history_range): Use ui_out_emit_tuple.
7972         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7973         ui_out_emit_tuple.
7974         * stack.c (print_frame_info): Use ui_out_emit_tuple.
7975         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7976         * skip.c (skip_info): Use ui_out_emit_tuple.
7977         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7978         * progspace.c (print_program_space): Use ui_out_emit_tuple.
7979         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7980         * osdata.c (info_osdata): Use ui_out_emit_tuple.
7981         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7982         ui_out_emit_tuple.
7983         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7984         (output_register, mi_cmd_data_read_memory)
7985         (mi_cmd_data_read_memory_bytes, mi_load_progress)
7986         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7987         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7988         Use ui_out_emit_tuple.
7989         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7990         ui_out_emit_tuple.
7991         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7992         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7993         * linux-thread-db.c (info_auto_load_libthread_db): Use
7994         ui_out_emit_tuple.
7995         * inferior.c (print_inferior): Use ui_out_emit_tuple.
7996         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7997         * disasm.c (do_mixed_source_and_assembly_deprecated)
7998         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7999         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8000         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8001         * breakpoint.c (print_one_breakpoint_location)
8002         (print_one_breakpoint): Use ui_out_emit_tuple.
8003         * auto-load.c (print_script, info_auto_load_cmd): Use
8004         ui_out_emit_tuple.
8005         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8006
8007 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8008
8009         * thread.c (print_thread_info_1): Remove dead code.
8010
8011 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8012
8013         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8014         GDB_SELF_TEST.
8015         * arm-tdep.c (selftests::arm_record_test): Likewise.
8016
8017 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8018
8019         * regcache.c (regcache_restore): Remove argument 2.  Replace
8020         argument 3 with regcache.  Get register status from
8021         src->register_status and get register contents from
8022         register_buffer (src, regnum).
8023         (regcache_cpy): Update.
8024
8025 2017-04-19  Pedro Alves  <palves@redhat.com>
8026
8027         * gdbthread.h (thread): Add missing closing parenthesis in
8028         comment.
8029
8030 2017-04-19  Pedro Alves  <palves@redhat.com>
8031
8032         * common/refcounted-object.h: New file.
8033         * gdbthread.h: Include "common/refcounted-object.h".
8034         (thread_info): Inherit from refcounted_object and add comments.
8035         (thread_info::incref, thread_info::decref)
8036         (thread_info::m_refcount): Delete.
8037         (thread_info::deletable): Use the refcounted_object::refcount()
8038         method.
8039         * inferior.c (current_inferior_): Add comment.
8040         (set_current_inferior): Increment/decrement refcounts.
8041         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8042         not-deletable instead of comparing with the current inferior.
8043         (initialize_inferiors): Increment the initial inferior's refcount.
8044         * inferior.h (struct inferior): Forward declare.
8045         Include "common/refcounted-object.h".
8046         (current_inferior, set_current_inferior): Move declaration to
8047         before struct inferior's definition, and fix comment.
8048         (inferior): Inherit from refcounted_object.  Add comments.
8049         * thread.c (switch_to_thread_no_regs): Reference the thread's
8050         inferior pointer directly instead of doing a ptid lookup.
8051         (switch_to_no_thread): New function.
8052         (switch_to_thread(thread_info *)): New function, factored out
8053         from ...
8054         (switch_to_thread(ptid_t)): ... this.
8055         (restore_current_thread): Delete.
8056         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8057         fields, and add 'inf' field.
8058         (do_restore_current_thread_cleanup): Check whether old->inf is
8059         alive instead of looking up an inferior by ptid.  Use
8060         switch_to_thread and switch_to_no_thread.
8061         (restore_current_thread_cleanup_dtor): Use old->inf directly
8062         instead of lookup up an inferior by id.  Decref the inferior.
8063         Don't restore 'removable'.
8064         (make_cleanup_restore_current_thread): Same the inferior pointer
8065         in old, instead of the inferior number.  Incref the inferior.
8066         Don't save/clear 'removable'.
8067
8068 2017-04-19  Pedro Alves  <palves@redhat.com>
8069
8070         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8071         unittests/scoped_restore-selftests.c.
8072         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8073         * common/scoped_restore.h (scoped_restore_base): Make "class".
8074         (scoped_restore_base::release): New public method.
8075         (scoped_restore_base::scoped_restore_base): New protected ctor.
8076         (scoped_restore_base::m_saved_var): New protected field.
8077         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8078         scoped_restore_base base class instead of m_saved_var directly.
8079         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8080         (scoped_restore_tmpl::scoped_restore_tmpl(const
8081         scoped_restore_tmpl<T>&)): Likewise.
8082         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8083         method.
8084         (scoped_restore_tmpl::saved_var): New method.
8085         (scoped_restore_tmpl::m_saved_var): Delete.
8086         * inferior.h (inferior::detaching): Now a bool.
8087         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8088         cleanup.
8089         * unittests/scoped_restore-selftests.c: New file.
8090
8091 2017-04-19  Pedro Alves  <palves@redhat.com>
8092
8093         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8094         Re-sort in alphabetic order.
8095
8096 2017-04-18  Pedro Alves  <palves@redhat.com>
8097
8098         * xml-support.c (obstack_xml_printf): Delete.
8099         * xml-support.h (obstack_xml_printf): Delete.
8100
8101 2017-04-18  Pedro Alves  <palves@redhat.com>
8102
8103         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8104         vdebug, verror, body_text, start_element, end_element, name,
8105         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8106         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8107         is_xinclude>: Make private and add m_ prefix.
8108         (gdb_xml_parser::body_text): New method, based on ...
8109         (gdb_xml_body_text): ... this.  Adjust.
8110         (gdb_xml_parser::vdebug): New method, based on ...
8111         (gdb_xml_debug): ... this.  Adjust.
8112         (gdb_xml_parser::verror): New method, based on ...
8113         (gdb_xml_error): ... this.  Adjust.
8114         (gdb_xml_parser::start_element): New method, based on ...
8115         (gdb_xml_start_element): ... this.  Adjust.
8116         (gdb_xml_start_element_wrapper): Defer to
8117         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8118         (gdb_xml_parser::end_element): New method, based on ...
8119         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8120         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8121         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8122         (gdb_xml_parser::use_dtd): New method, based on ...
8123         (gdb_xml_use_dtd): ... this.  Adjust.
8124         (gdb_xml_parser::parse): New method, based on ...
8125         (gdb_xml_parse): ... this.  Adjust.
8126         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8127         (xinclude_start_include): Adjust to call the parser's name method.
8128         (xml_xinclude_default, xml_xinclude_start_doctype)
8129         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8130         method.
8131         (xml_process_xincludes): Adjust to call parser methods.
8132         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8133         declarations.
8134
8135 2017-04-18  Pedro Alves  <palves@redhat.com>
8136
8137         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8138         gdb::optional<std::string>.
8139         * xml-support.c: Include <string>.
8140         (scope_level::scope_level(scope_level &&))
8141         (scope_level::~scope_level): Delete.
8142         (scope_level::body): Now a std::string.
8143         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8144         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8145         parameter.
8146         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8147         (xinclude_parsing_data::output): Now a std::string reference.
8148         (xinclude_start_include): Adjust.
8149         (xml_xinclude_default): Adjust.
8150         (xml_process_xincludes): Add 'output' parameter, and return bool.
8151         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8152         and return bool.
8153         * xml-tdesc.c: Include <unordered_map> and <string>.
8154         (tdesc_xml_cache): Delete.
8155         (tdesc_xml_cache_s): Delete.
8156         (xml_cache): Now an std::unordered_map.
8157         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8158         (target_fetch_description_xml): Change return type to
8159         gdb::optional<std::string>, and adjust.
8160         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8161         (target_fetch_description_xml): Change return type to
8162         gdb::optional<std::string>.
8163
8164 2017-04-18  Pedro Alves  <palves@redhat.com>
8165
8166         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8167         unittests/optional-selftests.c.
8168         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8169         * unittests/optional-selftests.c: New file.
8170         * unittests/optional/assignment/1.cc: New file.
8171         * unittests/optional/assignment/2.cc: New file.
8172         * unittests/optional/assignment/3.cc: New file.
8173         * unittests/optional/assignment/4.cc: New file.
8174         * unittests/optional/assignment/5.cc: New file.
8175         * unittests/optional/assignment/6.cc: New file.
8176         * unittests/optional/assignment/7.cc: New file.
8177         * unittests/optional/cons/copy.cc: New file.
8178         * unittests/optional/cons/default.cc: New file.
8179         * unittests/optional/cons/move.cc: New file.
8180         * unittests/optional/cons/value.cc: New file.
8181         * unittests/optional/in_place.cc: New file.
8182         * unittests/optional/observers/1.cc: New file.
8183         * unittests/optional/observers/2.cc: New file.
8184
8185 2017-04-18  Pedro Alves  <palves@redhat.com>
8186
8187         * common/gdb_optional.h: Include common/traits.h.
8188         (in_place_t): New type.
8189         (in_place): New constexpr variable.
8190         (optional::optional): Remove member initialization of
8191         m_instantiated.
8192         (optional::optional(in_place_t...)): New constructor.
8193         (optional::~optional): Use reset.
8194         (optional::optional(const optional&)): New.
8195         (optional::optional(const optional&&)): New.
8196         (optional::optional(T &)): New.
8197         (optional::optional(T &&)): New.
8198         (operator::operator=(const optional &)): New.
8199         (operator::operator=(optional &&)): New.
8200         (operator::operator= (const T &))
8201         (operator::operator= (T &&))
8202         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8203         (operator::reset): New.
8204         (operator::m_instantiated):: Add in-class initializer.
8205         * common/traits.h: Include <type_traits>.
8206         (struct And): New types.
8207
8208 2017-04-18  Pedro Alves  <palves@redhat.com>
8209
8210         * xml-support.c: Include <vector>.
8211         (scope_level::scope_level(const gdb_xml_element *))
8212         (scope_level::scope_level(scope_level&&)): New.
8213         (scope_level::~scope_level): New.
8214         (scope_level_s): Delete.
8215         (gdb_xml_parser::scopes): Now a std::vector.
8216         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8217         Use std::vector.
8218         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8219         scope cleanup code.
8220         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8221         of the scopes member.  Use std::vector::emplace_back.
8222
8223 2017-04-18  Pedro Alves  <palves@redhat.com>
8224
8225         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8226         a bool.
8227         (gdb_xml_end_element): Change type of first parameter.
8228         (gdb_xml_cleanup): Rename to ...
8229         (gdb_xml_parser::~gdb_xml_parser): ... this.
8230         (gdb_xml_create_parser_and_cleanup): Delete with ...
8231         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8232         to this new ctor.
8233         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8234         using gdb_xml_create_parser_and_cleanup.
8235         (xinclude_parsing_data): Add ctor/dtor.
8236         (xml_xinclude_cleanup): Delete.
8237         (xml_process_xincludes): Create a local xinclude_parsing_data
8238         instead of heap-allocating one.  Create a local gdb_xml_parser
8239         instead of heap-allocating one with
8240         gdb_xml_create_parser_and_cleanup.
8241
8242 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8243
8244         PR threads/20743
8245         * fbsd-nat.c (resume_one_thread_cb): Remove.
8246         (resume_all_threads_cb): Remove.
8247         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8248         iterate_over_threads.
8249
8250 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8251
8252         * NEWS: Create a new section for the next release branch.
8253         Rename the section of the current branch, now that it has
8254         been cut.
8255
8256 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8257
8258         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8259         * version.in: Bump version to 8.0.50.DATE-git.
8260
8261 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8262
8263         PR gdb/21385
8264         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8265         independently of the host, and fix build breakage on Cygwin.
8266
8267 2017-04-13  Pedro Alves  <palves@redhat.com>
8268
8269         * inferior.c (free_inferior): Convert to ...
8270         (inferior::~inferior): ... this dtor.
8271         (inferior::inferior): New ctor, factored out from ...
8272         (add_inferior_silent): ... here.  Allocate the inferior with a new
8273         expression.
8274         (delete_inferior): Call delete instead of free_inferior.
8275         * inferior.h (gdb_environ, continuation): Forward declare.
8276         (inferior): Now a class.  Add in-class initialization to all
8277         members.  Make boolean fields bool, except 'detaching'.
8278         (inferior::inferior): New explicit ctor.
8279         (inferior::~inferior): New.
8280
8281 2017-04-13  Pedro Alves  <palves@redhat.com>
8282
8283         * inferior.c (init_inferior_list): Delete.
8284         * inferior.h (init_inferior_list): Delete.
8285
8286 2017-04-13  Pedro Alves  <palves@redhat.com>
8287
8288         PR threads/13217
8289         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8290         (top level): Call it twice, with different thread sets.
8291
8292 2017-04-13  Pedro Alves  <palves@redhat.com>
8293
8294         * thread.c: Include <algorithm>.
8295         (thread_array_cleanup): Delete.
8296         (scoped_inc_dec_ref): New class.
8297         (live_threads_count): New function.
8298         (set_thread_refcount): Delete.
8299         (tp_array_compar_ascending): Now a bool.
8300         (tp_array_compar): Convert to a std::sort comparison function.
8301         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8302         and live_threads_count.
8303
8304 2017-04-13  Pedro Alves  <palves@redhat.com>
8305
8306         * infrun.c (follow_fork_inferior): Also switch the current
8307         inferior.
8308
8309 2017-04-13  Pedro Alves  <palves@redhat.com>
8310
8311         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8312         before calling create_internal_breakpoint.
8313
8314 2017-04-13  Pedro Alves  <palves@redhat.com>
8315
8316         * fork-child.c (execv_argv): New class.
8317         (breakup_args): Refactored as ...
8318         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8319         Copy arguments to storage and replace separators with NULL
8320         terminators in place.
8321         (escape_bang_in_quoted_argument): Adjust to return bool.
8322         (execv_argv::execv_argv): New ctor.
8323         (execv_argv::init_for_shell): New method, factored out from
8324         fork_inferior.  Don't strdup strings into the vector.
8325         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8326         Remove free_vector_argv call.
8327
8328 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8329
8330         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8331         tdep->rx_psw_type.
8332
8333 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8334
8335         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8336         * rx-tdep.c (rx_gdbarch_init): Likewise.
8337
8338 2017-04-13  Pedro Alves  <palves@redhat.com>
8339
8340         * breakpoint.h (struct breakpoint): Reindent.
8341
8342 2017-04-13  Pedro Alves  <palves@redhat.com>
8343
8344         * breakpoint.c (bp_location): Rename to ...
8345         (bp_locations): ... this.  All references updated.
8346         (bp_location_count): Rename to ...
8347         (bp_locations_count): ... this.  All references updated.
8348         (bp_location_placed_address_before_address_max): Rename to ...
8349         (bp_locations_placed_address_before_address_max): ... this.  All
8350         references updated.
8351         (bp_location_shadow_len_after_address_max): Rename to ...
8352         (bp_locations_shadow_len_after_address_max): ... this.  All
8353         references updated.
8354         (bp_location_compare_addrs): Rename to ...
8355         (bp_locations_compare_addrs): ... this.  All references updated.
8356         (bp_location_compare):Rename to ...
8357         (bp_locations_compare): ... this.  All references updated.
8358         (bp_location_target_extensions_update): Rename to ...
8359         (bp_locations_target_extensions_update): ... this.  All references
8360         updated.
8361
8362 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8363
8364         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8365         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8366         'sgtty.h'.
8367         * common/gdb_termios.h: New file, with parts of "terminal.h".
8368         * inflow.c: Include "gdb_termios.h".
8369         * ser-unix.c: Include "gdb_termios.h".
8370         * terminal.h: Move terminal-related defines to
8371         "common/gdb_termios.h".
8372
8373 2017-04-12  Tom Tromey  <tom@tromey.com>
8374
8375         * probe.c (parse_probes): Update.
8376         * location.h (delete_event_location): Don't declare.
8377         (event_location_deleter::operator()): Update.
8378         * location.c (event_location_deleter::operator()): Rename from
8379         delete_event_location.
8380         * linespec.h (linespec_result) <location>: Change type to
8381         event_location_up.
8382         * linespec.c (canonicalize_linespec, event_location_to_sals)
8383         (decode_objc): Update.
8384         (linespec_result): Don't call delete_event_location.
8385         * breakpoint.c (create_breakpoints_sal)
8386         (bkpt_probe_create_sals_from_location)
8387         (strace_marker_create_sals_from_location): Update.
8388
8389 2017-04-12  Tom Tromey  <tom@tromey.com>
8390
8391         * linespec.h (struct linespec_result): Add constructor and
8392         destructor.
8393         (init_linespec_result, destroy_linespec_result)
8394         (make_cleanup_destroy_linespec_result): Don't declare.
8395         * linespec.c (init_linespec_result): Remove.
8396         (linespec_result::~linespec_result): Rename from
8397         destroy_linespec_result.  Update.
8398         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8399         Remove.
8400         * breakpoint.c (create_breakpoint, break_range_command)
8401         (decode_location_default): Update.
8402         * ax-gdb.c (agent_command_1): Update.
8403
8404 2017-04-12  Tom Tromey  <tom@tromey.com>
8405
8406         * remote.c (remote_download_tracepoint): Update.
8407         * python/py-breakpoint.c (bppy_get_location): Update.
8408         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8409         (gdbscm_breakpoint_location): Update.
8410         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8411         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8412         Change type to event_location_up.
8413         * breakpoint.c (create_overlay_event_breakpoint)
8414         (create_longjmp_master_breakpoint)
8415         (create_std_terminate_master_breakpoint)
8416         (create_exception_master_breakpoint)
8417         (breakpoint_event_location_empty_p, print_breakpoint_location)
8418         (print_one_breakpoint_location, create_thread_event_breakpoint)
8419         (init_breakpoint_sal, create_breakpoint)
8420         (print_recreate_ranged_breakpoint, break_range_command)
8421         (init_ada_exception_breakpoint, say_where): Update.
8422         (base_breakpoint_dtor): Don't call delete_event_location.
8423         (bkpt_print_recreate, tracepoint_print_recreate)
8424         (dprintf_print_recreate, update_static_tracepoint)
8425         (breakpoint_re_set_default): Update.
8426
8427 2017-04-12  Tom Tromey  <tom@tromey.com>
8428
8429         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8430         type of "to_do".  Update.
8431         (compute_stack_depth): Use std::vector.
8432
8433 2017-04-12  Tom Tromey  <tom@tromey.com>
8434
8435         * printcmd.c (find_instruction_backward): Use std::vector.
8436
8437 2017-04-12  Tom Tromey  <tom@tromey.com>
8438
8439         * symfile.c (objfilep): Remove typedef.
8440         (reread_symbols): Use a std::vector.
8441
8442 2017-04-12  Tom Tromey  <tom@tromey.com>
8443
8444         * mi/mi-main.c (exec_direction_forward): Remove.
8445         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8446         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8447         scoped_restore.
8448         * guile/guile.c (guile_repl_command, guile_command)
8449         (gdbscm_execute_gdb_command): Use scoped_restore.
8450         * go-exp.y (go_parse): Use scoped_restore.
8451         * d-exp.y (d_parse): Use scoped_restore.
8452         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8453         * c-exp.y (c_parse): Use scoped_restore.
8454
8455 2017-04-12  Tom Tromey  <tom@tromey.com>
8456
8457         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8458         (mi_parse): Update return type.
8459         (mi_parse_free): Remove.
8460         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8461         (mi_parse::~mi_parse): Rename from mi_parse_free.
8462         (mi_parse_cleanup): Remove.
8463         (mi_parse): Return a unique_ptr.  Use new.
8464         * mi/mi-main.c (mi_execute_command): Update.
8465
8466 2017-04-12  Tom Tromey  <tom@tromey.com>
8467
8468         * location.c (explicit_location_lex_one): Return a
8469         unique_xmalloc_ptr.
8470         (string_to_explicit_location): Update.  Remove cleanups.
8471
8472 2017-04-12  Tom Tromey  <tom@tromey.com>
8473
8474         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8475         (compare_value_and_voffset): Change type.  Update.
8476         (compute_vtable_size): Change type of "offset_vec".
8477         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8478         (gnuv3_get_typeid): Remove extraneous declaration.
8479
8480 2017-04-12  Tom Tromey  <tom@tromey.com>
8481
8482         * charset.h (wchar_iterator): Fix comment.
8483
8484 2017-04-12  Tom Tromey  <tom@tromey.com>
8485
8486         * charset.c (iconv_wrapper): New class.
8487         (cleanup_iconv): Remove.
8488         (convert_between_encodings): Use it.
8489
8490 2017-04-12  Tom Tromey  <tom@tromey.com>
8491
8492         * symfile.h (increment_reading_symtab): Update type.
8493         * symfile.c (decrement_reading_symtab): Remove.
8494         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8495         * psymtab.c (psymtab_to_symtab): Update.
8496         * dwarf2read.c (dw2_instantiate_symtab): Update.
8497
8498 2017-04-12  Tom Tromey  <tom@tromey.com>
8499
8500         * jit.c (struct jit_reader): Declare separately.  Add constructor
8501         and destructor.  Change type of "handle".
8502         (loaded_jit_reader): Define separately.
8503         (jit_reader_load): Update.  New "new".
8504         (jit_reader_unload_command): Use "delete".
8505         * gdb-dlfcn.h (struct dlclose_deleter): New.
8506         (gdb_dlhandle_up): New typedef.
8507         (gdb_dlopen, gdb_dlsym): Update types.
8508         (gdb_dlclose): Remove.
8509         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8510         (gdb_dlsym): Change type of "handle".
8511         (make_cleanup_dlclose): Remove.
8512         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8513         * compile/compile-c-support.c (load_libcc): Update.
8514
8515 2017-04-12  Tom Tromey  <tom@tromey.com>
8516
8517         * symtab.h (find_pcs_for_symtab_line): Change return type.
8518         * symtab.c (find_pcs_for_symtab_line): Change return type.
8519         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8520         type of "vec".  Update.
8521         (ltpy_get_pcs_for_line): Update.
8522         * linespec.c (decode_digits_ordinary): Update.
8523
8524 2017-04-12  Tom Tromey  <tom@tromey.com>
8525
8526         * tracepoint.c (actions_command): Update.
8527         * python/python.c (python_command, python_interactive_command):
8528         Update.
8529         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8530         * guile/guile.c (guile_command): Update.
8531         * defs.h (read_command_lines, read_command_lines_1): Return
8532         command_line_up.
8533         (command_lines_deleter): New struct.
8534         (command_line_up): New typedef.
8535         * compile/compile.c (compile_code_command)
8536         (compile_print_command): Update.
8537         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8538         command_line_up.
8539         (make_cleanup_free_command_lines): Remove.
8540         * cli/cli-script.c (get_command_line, read_command_lines_1)
8541         (copy_command_lines): Return command_line_up.
8542         (while_command, if_command, read_command_lines, define_command)
8543         (document_command): Update.
8544         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8545         Remove.
8546         * breakpoint.h (breakpoint_set_commands): Change type of
8547         "commands".
8548         * breakpoint.c (breakpoint_set_commands): Change type of
8549         "commands".  Update.
8550         (do_map_commands_command, update_dprintf_command_list)
8551         (create_tracepoint_from_upload): Update.
8552
8553 2017-04-12  Tom Tromey  <tom@tromey.com>
8554
8555         * tracepoint.c (scope_info): Update.
8556         * spu-tdep.c (spu_catch_start): Update.
8557         * python/python.c (gdbpy_decode_line): Update.
8558         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8559         * python/py-breakpoint.c (bppy_init): Update.
8560         * probe.c (parse_probes): Update.
8561         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8562         * location.h (event_location_deleter): New struct.
8563         (event_location_up): New typedef.
8564         (new_linespec_location, new_address_location, new_probe_location)
8565         (new_explicit_location, copy_event_location)
8566         (string_to_event_location, string_to_event_location_basic)
8567         (string_to_explicit_location): Update return type.
8568         (make_cleanup_delete_event_location): Remove.
8569         * location.c (new_linespec_location, new_address_location)
8570         (new_probe_location, new_explicit_location, copy_event_location):
8571         Return event_location_up.
8572         (delete_event_location_cleanup)
8573         (make_cleanup_delete_event_location): Remove.
8574         (string_to_explicit_location, string_to_event_location_basic)
8575         (string_to_event_location): Return event_location_up.
8576         * linespec.c (canonicalize_linespec, event_location_to_sals)
8577         (decode_line_with_current_source)
8578         (decode_line_with_last_displayed, decode_objc): Update.
8579         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8580         * completer.c (location_completer): Update.
8581         * cli/cli-cmds.c (edit_command, list_command): Update.
8582         * breakpoint.c (create_overlay_event_breakpoint)
8583         (create_longjmp_master_breakpoint)
8584         (create_std_terminate_master_breakpoint)
8585         (create_exception_master_breakpoint)
8586         (create_thread_event_breakpoint): Update.
8587         (init_breakpoint_sal): Update.  Remove some dead code.
8588         (create_breakpoint_sal): Change type of "location".  Update.
8589         (create_breakpoints_sal, create_breakpoint, break_command_1)
8590         (dprintf_command, break_range_command, until_break_command)
8591         (init_ada_exception_breakpoint)
8592         (strace_marker_create_sals_from_location)
8593         (update_static_tracepoint, trace_command, ftrace_command)
8594         (strace_command, create_tracepoint_from_upload): Update.
8595         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8596         * ax-gdb.c (agent_command_1): Update.
8597
8598 2017-04-12  Pedro Alves  <palves@redhat.com>
8599
8600         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8601         * configure.tgt: Handle i[34567]86-*-go32* and
8602         i[34567]86-*-msdosdjgpp*.
8603         * i386-tdep.c (i386_svr4_reg_to_regnum):
8604         Make extern.
8605         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8606         i386-go32-tdep.c.
8607         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8608         * i386-go32-tdep.c: New file.
8609         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8610         declarations.
8611
8612 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8613
8614         * aix-thread.c (pd_status2str): Change return type to const char *.
8615
8616 2017-04-12  Pedro Alves  <palves@redhat.com>
8617
8618         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8619         calls to set_gdbarch_gnu_triplet_regexp.
8620
8621 2017-04-12  Pedro Alves  <palves@redhat.com>
8622
8623         PR gdb/21323
8624         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8625         New enum value.
8626         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8627         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8628         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8629         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8630         * gdbarch.h, gdbarch.c: Regenerate.
8631         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8632         gdbarch_wchar_bit and gdbarch_wchar_signed.
8633         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8634         * arm-tdep.c (arm_gdbarch_init): Likewise.
8635         * avr-tdep.c (avr_gdbarch_init): Likewise.
8636         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8637         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8638         * i386-tdep.c (i386_go32_init_abi): Likewise.
8639         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8640         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8641         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8642         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8643         * sh-tdep.c (sh_gdbarch_init): Likewise.
8644         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8645         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8646         * windows-tdep.c (windows_init_abi): Likewise.
8647         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8648
8649 2017-04-12  Pedro Alves  <palves@redhat.com>
8650
8651         PR c++/21323
8652         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8653         cplus_primitive_type_char32_t>: New enum values.
8654         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8655         and cplus_primitive_type_char32_t.
8656         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8657         32, use the archtecture's built-in type for char16_t and char32_t,
8658         respectively.  Otherwise, fallback to init_integer_type as before,
8659         but make the type unsigned, and issue a complaint.
8660         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8661
8662 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8663
8664         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8665         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8666
8667 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8668
8669         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8670         'const char *'.
8671
8672 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8673
8674         * common/common-utils.c (free_vector_argv): New function.
8675         * common/common-utils.h: Include <vector>.
8676         (free_vector_argv): New prototype.
8677         * darwin-nat.c (darwin_create_inferior): Rewrite function
8678         prototype in order to constify "exec_file" and accept a
8679         "std::string" for "allargs".
8680         * fork-child.c: Include <vector>.
8681         (breakup_args): Rewrite function, using C++.
8682         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8683         and accept "std::string" for "allargs".  Update the code to
8684         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8685         and "execvp".
8686         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8687         order to constify "exec_file" and accept a "std::string" for
8688         "allargs".
8689         * go32-nat.c (go32_create_inferior): Likewise.
8690         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8691         * infcmd.c (run_command_1): Constify "exec_file".  Use
8692         "std::string" for inferior arguments.
8693         * inferior.h (fork_inferior): Update prototype.
8694         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8695         prototype in order to constify "exec_file" and accept a
8696         "std::string" for "allargs".
8697         * nto-procfs.c (procfs_create_inferior): Likewise.
8698         * procfs.c (procfs_create_inferior): Likewise.
8699         * remote-sim.c (gdbsim_create_inferior): Likewise.
8700         * remote.c (extended_remote_run): Update code to accept
8701         "std::string" as argument.
8702         (extended_remote_create_inferior): Rewrite function prototype in
8703         order to constify "exec_file" and accept a "std::string" for
8704         "allargs".
8705         * rs6000-nat.c (super_create_inferior): Likewise.
8706         (rs6000_create_inferior): Likewise.
8707         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8708         * windows-nat.c (windows_create_inferior): Likewise.
8709
8710 2017-04-11  Pedro Alves  <palves@redhat.com>
8711
8712         * thread.c: Fix whitespace throughout.
8713
8714 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8715
8716         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8717
8718 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8719
8720         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8721
8722 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8723
8724         PR gdb/21364
8725         * osdata.c (info_osdata): Check if 'type' is an empty string
8726         instead of NULL.
8727
8728 2017-04-10  Pedro Alves  <palves@redhat.com>
8729
8730         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8731         (ptid_to_global_thread_id, in_thread_list)
8732         (do_captured_list_thread_ids, set_resumed, set_running)
8733         (set_executing, set_stop_requested, finish_thread_state)
8734         (validate_registers_access, can_access_registers_ptid)
8735         (print_thread_info_1, switch_to_thread)
8736         (do_restore_current_thread_cleanup)
8737         (make_cleanup_restore_current_thread, thread_command)
8738         (thread_name_command): Use operator== instead of ptid_equal.
8739
8740 2017-04-10  Pedro Alves  <palves@redhat.com>
8741
8742         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8743         (current_thread_cleanup_chain): Delete.
8744         (restore_current_thread_cleanup_dtor)
8745         (make_cleanup_restore_current_thread): Remove references to
8746         current_thread_cleanup_chain.
8747
8748 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8749
8750         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8751         REG_UNKNOWN.
8752
8753 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8754
8755         PR gdb/19942
8756         * gdbthread.h (thread_info::deletable): New method.
8757         (thread_info::incref): New method.
8758         (thread_info::decref): New method.
8759         (thread_info::refcount): Move it to private.
8760         * infrun.c (save_stop_context): Call inc_refcount.
8761         (release_stop_context_cleanup): Likewise.
8762         * thread.c (set_thread_exited): New function.
8763         (init_thread_list): Delete "tp" only it is deletable, otherwise
8764         call set_thread_exited.
8765         (delete_thread_1): Call set_thread_exited.
8766         (current_thread_cleanup) <inferior_pid>: Remove.
8767         <thread>: New field.
8768         (restore_current_thread_ptid_changed): Removed.
8769         (do_restore_current_thread_cleanup): Adjust.
8770         (restore_current_thread_cleanup_dtor): Don't call
8771         find_thread_ptid.
8772         (set_thread_refcount): Use dec_refcount.
8773         (make_cleanup_restore_current_thread): Adjust.
8774         (thread_apply_all_command): Call inc_refcount.
8775         (_initialize_thread): Don't call
8776         observer_attach_thread_ptid_changed.
8777
8778 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8779
8780         * thread.c (delete_thread_1): Hoist code on marking thread as
8781         exited.
8782
8783 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8784
8785         * windows-nat.c (windows_detach): Initialize ptid with
8786         minus_one_ptid.
8787
8788 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8789
8790         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8791
8792 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8793
8794         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8795         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8796         (bfin_pseudo_register_write): Likewise
8797
8798 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8799
8800         * common/ptid.h (struct ptid): Change to...
8801         (class ptid_t): ... this.
8802         <ptid_t>: New constructors.
8803         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8804         matches>: New methods.
8805         <make_null, make_minus_one>: New static methods.
8806         <pid>: Rename to...
8807         <m_pid>: ...this.
8808         <lwp>: Rename to...
8809         <m_lwp>: ...this.
8810         <tid>: Rename to...
8811         <m_tid>: ...this.
8812         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8813         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8814         as references, move comment to class ptid_t.
8815         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8816         ptid_t static methods.
8817         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8818         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8819         Take ptid arguments as references, implement using ptid_t methods.
8820         * unittests/ptid-selftests.c: New file.
8821         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8822         unittests/ptid-selftests.c.
8823         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8824
8825 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8826
8827         * python/python.c (python_run_simple_file): Cast mode literal to
8828         non-const char pointer as expected by PyFile_FromString.
8829
8830 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8831
8832         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8833         minus_one_ptid and null_ptid.
8834
8835 2017-04-05  Pedro Alves  <palves@redhat.com>
8836
8837         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8838         * configure: Regenerate.
8839
8840 2017-04-05  Pedro Alves  <palves@redhat.com>
8841
8842         * ada-exp.y (yyerror): Constify.
8843         * ada-lang.c (bound_name, get_selections)
8844         (ada_variant_discrim_type)
8845         (ada_variant_discrim_name, ada_value_struct_elt)
8846         (ada_lookup_struct_elt_type, is_unchecked_variant)
8847         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8848         (catch_ada_exception_command_split)
8849         (catch_ada_assert_command_split, catch_assert_command)
8850         (ada_op_name): Constify.
8851         * ada-lang.h (ada_yyerror, get_selections)
8852         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8853         * arc-tdep.c (arc_print_frame_cache): Constify.
8854         * arm-tdep.c (arm_skip_stub): Constify.
8855         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8856         (gen_aggregate_elt_ref): Constify.
8857         * bcache.c (print_bcache_statistics): Constify.
8858         * bcache.h (print_bcache_statistics): Constify.
8859         * break-catch-throw.c (catch_exception_command_1):
8860         * breakpoint.c (struct ep_type_description::description):
8861         Constify.
8862         (add_solib_catchpoint): Constify.
8863         (catch_fork_command_1): Add cast.
8864         (add_catch_command): Constify.
8865         * breakpoint.h (add_catch_command, add_solib_catchpoint):
8866         Constify.
8867         * bsd-uthread.c (bsd_uthread_state): Constify.
8868         * buildsym.c (patch_subfile_names): Constify.
8869         * buildsym.h (next_symbol_text_func, patch_subfile_names):
8870         Constify.
8871         * c-exp.y (yyerror): Constify.
8872         (token::oper): Constify.
8873         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8874         * c-varobj.c (cplus_describe_child): Constify.
8875         * charset.c (find_charset_names): Add cast.
8876         (find_charset_names): Constify array and add const_cast.
8877         * cli/cli-cmds.c (complete_command, cd_command): Constify.
8878         (edit_command): Constify.
8879         * cli/cli-decode.c (lookup_cmd): Constify.
8880         * cli/cli-dump.c (dump_memory_command, dump_value_command):
8881         Constify.
8882         (struct dump_context): Constify.
8883         (add_dump_command, restore_command): Constify.
8884         * cli/cli-script.c (get_command_line): Constify.
8885         * cli/cli-script.h (get_command_line): Constify.
8886         * cli/cli-utils.c (check_for_argument): Constify.
8887         * cli/cli-utils.h (check_for_argument): Constify.
8888         * coff-pe-read.c (struct read_pe_section_data): Constify.
8889         * command.h (lookup_cmd): Constify.
8890         * common/print-utils.c (decimal2str): Constify.
8891         * completer.c (gdb_print_filename): Constify.
8892         * corefile.c (set_gnutarget): Constify.
8893         * cp-name-parser.y (yyerror): Constify.
8894         * cp-valprint.c (cp_print_class_member): Constify.
8895         * cris-tdep.c (cris_register_name, crisv32_register_name):
8896         Constify.
8897         * d-exp.y (yyerror): Constify.
8898         (struct token::oper): Constify.
8899         * d-lang.h (d_yyerror): Constify.
8900         * dbxread.c (struct header_file_location::name): Constify.
8901         (add_old_header_file, add_new_header_file, last_function_name)
8902         (dbx_next_symbol_text, add_bincl_to_list)
8903         (find_corresponding_bincl_psymtab, set_namestring)
8904         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8905         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8906         * defs.h (command_line_input, print_address_symbolic)
8907         (deprecated_readline_begin_hook): Constify.
8908         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8909         Constify.
8910         * event-top.c (handle_line_of_input): Constify and add cast.
8911         * exceptions.c (catch_errors): Constify.
8912         * exceptions.h (catch_errors): Constify.
8913         * expprint.c (print_subexp_standard, op_string, op_name)
8914         (op_name_standard, dump_raw_expression, dump_raw_expression):
8915         * expression.h (op_name, op_string, dump_raw_expression):
8916         Constify.
8917         * f-exp.y (yyerror): Constify.
8918         (struct token::oper): Constify.
8919         (struct f77_boolean_val::name): Constify.
8920         * f-lang.c (f_word_break_characters): Constify.
8921         * f-lang.h (f_yyerror): Constify.
8922         * fork-child.c (fork_inferior): Add cast.
8923         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8924         (new_variant): Constify.
8925         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8926         * gdbarch.c: Regenerate.
8927         * gdbcore.h (set_gnutarget): Constify.
8928         * go-exp.y (yyerror): Constify.
8929         (token::oper): Constify.
8930         * go-lang.h (go_yyerror): Constify.
8931         * go32-nat.c (go32_sysinfo): Constify.
8932         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8933         * guile/scm-cmd.c (cmdscm_function): Constify.
8934         * guile/scm-param.c (pascm_param_value): Constify.
8935         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8936         (h8300sx_register_name): Constify.
8937         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8938         Constify.
8939         * ia64-tdep.c (ia64_register_names): Constify.
8940         * infcmd.c (construct_inferior_arguments): Constify.
8941         (path_command, attach_post_wait): Constify.
8942         * language.c (show_range_command, show_case_command)
8943         (unk_lang_error): Constify.
8944         * language.h (language_defn::la_error)
8945         (language_defn::la_name_of_this): Constify.
8946         * linespec.c (decode_line_2): Constify.
8947         * linux-thread-db.c (thread_db_err_str): Constify.
8948         * lm32-tdep.c (lm32_register_name): Constify.
8949         * m2-exp.y (yyerror): Constify.
8950         * m2-lang.h (m2_yyerror): Constify.
8951         * m32r-tdep.c (m32r_register_names): Constify and make static.
8952         * m68hc11-tdep.c (m68hc11_register_names): Constify.
8953         * m88k-tdep.c (m88k_register_name): Constify.
8954         * macroexp.c (appendmem): Constify.
8955         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8956         (upgrade_type, parse_external, parse_partial_symbols)
8957         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8958         (new_symbol): Constify.
8959         * memattr.c (mem_info_command): Constify.
8960         * mep-tdep.c (register_name_from_keyword): Constify.
8961         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8962         Constify.
8963         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8964         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8965         * mi/mi-main.c (captured_mi_execute_command): Constify and add
8966         cast.
8967         (mi_execute_async_cli_command): Constify.
8968         * mips-tdep.c (mips_register_name): Constify.
8969         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8970         (am33_register_name, am33_2_register_name)
8971         * moxie-tdep.c (moxie_register_names): Constify.
8972         * nat/linux-osdata.c (osdata_type): Constify fields.
8973         * nto-tdep.c (nto_parse_redirection): Constify.
8974         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8975         (lookup_child_selector): Constify.
8976         (objc_methcall::name): Constify.
8977         * objc-lang.h (lookup_objc_class, lookup_child_selector)
8978         (lookup_struct_typedef): Constify.
8979         * objfiles.c (pc_in_section): Constify.
8980         * objfiles.h (pc_in_section): Constify.
8981         * p-exp.y (struct token::oper): Constify.
8982         (yyerror): Constify.
8983         * p-lang.h (pascal_yyerror): Constify.
8984         * parser-defs.h (op_name_standard): Constify.
8985         (op_print::string): Constify.
8986         (exp_descriptor::op_name): Constify.
8987         * printcmd.c (print_address_symbolic): Constify.
8988         * psymtab.c (print_partial_symbols): Constify.
8989         * python/py-breakpoint.c (stop_func): Constify.
8990         (bppy_get_expression): Constify.
8991         * python/py-cmd.c (cmdpy_completer::name): Constify.
8992         (cmdpy_function): Constify.
8993         * python/py-event.c (evpy_add_attribute)
8994         (gdbpy_initialize_event_generic): Constify.
8995         * python/py-event.h (evpy_add_attribute)
8996         (gdbpy_initialize_event_generic): Constify.
8997         * python/py-evts.c (add_new_registry): Constify.
8998         * python/py-finishbreakpoint.c (outofscope_func): Constify.
8999         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9000         * python/py-inferior.c (get_buffer): Add cast.
9001         * python/py-param.c (parm_constant::name): Constify.
9002         * python/py-unwind.c (fprint_frame_id): Constify.
9003         * python/python.c (gdbpy_parameter_value): Constify.
9004         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9005         * remote.c (memory_packet_config::name): Constify.
9006         (show_packet_config_cmd, remote_write_bytes)
9007         (remote_buffer_add_string):
9008         * reverse.c (exec_reverse_once): Constify.
9009         * rs6000-tdep.c (variant::name, variant::description): Constify.
9010         * rust-exp.y (rustyyerror): Constify.
9011         * rust-lang.c (rust_op_name): Constify.
9012         * rust-lang.h (rustyyerror): Constify.
9013         * serial.h (serial_ops::name): Constify.
9014         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9015         (sh_sh3e_register_name, sh_sh2e_register_name)
9016         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9017         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9018         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9019         (sh_sh4al_dsp_register_name): Constify.
9020         * sh64-tdep.c (sh64_register_name): Constify.
9021         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9022         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9023         * stabsread.c (patch_block_stabs, read_type_number)
9024         (ref_map::stabs, ref_add, process_reference)
9025         (symbol_reference_defined, define_symbol, define_symbol)
9026         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9027         (read_one_struct_field, read_struct_fields, read_baseclasses)
9028         (read_tilde_fields, read_struct_type, read_array_type)
9029         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9030         (read_huge_number, read_range_type, read_args, common_block_start)
9031         (find_name_end): Constify.
9032         * stabsread.h (common_block_start, define_symbol)
9033         (process_one_symbol, symbol_reference_defined, ref_add):
9034         * symfile.c (get_section_index, add_symbol_file_command):
9035         * symfile.h (get_section_index): Constify.
9036         * target-descriptions.c (tdesc_type::name): Constify.
9037         (tdesc_free_type): Add cast.
9038         * target.c (find_default_run_target):
9039         (add_deprecated_target_alias, find_default_run_target)
9040         (target_announce_detach): Constify.
9041         (do_option): Constify.
9042         * target.h (add_deprecated_target_alias): Constify.
9043         * thread.c (print_thread_info_1): Constify.
9044         * top.c (deprecated_readline_begin_hook, command_line_input):
9045         Constify.
9046         (init_main): Add casts.
9047         * top.h (handle_line_of_input): Constify.
9048         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9049         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9050         (tfind_command): Rename to ...
9051         (tfind_command_1): ... this and constify.
9052         (tfind_command): New function.
9053         (tfind_end_command, tfind_start_command): Adjust.
9054         (encode_source_string): Constify.
9055         * tracepoint.h (encode_source_string): Constify.
9056         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9057         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9058         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9059         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9060         * tui/tui-win.c (parse_scrolling_args): Constify.
9061         * tui/tui-windata.c (tui_erase_data_content): Constify.
9062         * tui/tui-windata.h (tui_erase_data_content): Constify.
9063         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9064         * tui/tui.c (tui_enable): Add cast.
9065         * utils.c (defaulted_query): Constify.
9066         (init_page_info): Add cast.
9067         (puts_debug, subset_compare): Constify.
9068         * utils.h (subset_compare): Constify.
9069         * varobj.c (varobj_format_string): Constify.
9070         * varobj.h (varobj_format_string): Constify.
9071         * vax-tdep.c (vax_register_name): Constify.
9072         * windows-nat.c (windows_detach): Constify.
9073         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9074         * xml-support.c (gdb_xml_end_element): Constify.
9075         * xml-tdesc.c (tdesc_start_reg): Constify.
9076         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9077         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9078         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9079
9080 2017-04-05  Pedro Alves  <palves@redhat.com>
9081
9082         * proc-api.c (struct trans): Constify.
9083         (procfs_note): Constify.
9084         * proc-events.c (struct trans, syscall_table):
9085         * proc-flags.c (struct trans): Constify.
9086         * proc-utils.h (procfs_note): Constify.
9087         * proc-why.c (struct trans): Constify.
9088         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9089         (procfs_detach): Constify.
9090         * sol-thread.c (struct string_map): Constify.
9091         (td_err_string, td_state_string): Constify.
9092
9093 2017-04-05  Pedro Alves  <palves@redhat.com>
9094
9095         * proc-api.c (procfs_filename): Don't initialize
9096         procfs_filename.
9097         (prepare_to_trace): Assume procfs_filename is non-NULL.
9098         (_initialize_proc_api): Give procfs_filename a default value here.
9099
9100 2017-04-05  Pedro Alves  <palves@redhat.com>
9101
9102         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9103         'cond_string' parameter.
9104         (extract_exception_regexp): Constify 'string' parameter.
9105         (catch_exception_command_1): Constify.
9106         * breakpoint.c (init_catchpoint)
9107         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9108         parameter.
9109         (ep_parse_optional_if_clause, catch_fork_command_1)
9110         (catch_exec_command_1): Constify.
9111         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9112         parameter.
9113         (ep_parse_optional_if_clause): Constify.
9114         * cli/cli-utils.c (remove_trailing_whitespace)
9115         (check_for_argument): Constify.
9116         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9117         non-const overload.
9118         (check_for_argument): Likewise.
9119
9120 2017-04-05  Pedro Alves  <palves@redhat.com>
9121
9122         * event-top.c (command_line_handler): Add cast to execute_command
9123         call.
9124         * record-btrace.c (cmd_record_btrace_bts_start)
9125         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9126         (cmd_record_btrace_start): Add cast to execute_command call.
9127         * record-full.c (record_full_goto_insn):
9128         * record.c (record_start, record_stop): Add cast to
9129         execute_command_to_string calls.
9130         (cmd_record_start): Add cast to execute_command calls.
9131
9132 2017-04-05  Pedro Alves  <palves@redhat.com>
9133
9134         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9135         static inline function.
9136         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9137         array and use gdb_PyArg_ParseTupleAndKeywords.
9138         * python/py-cmd.c (cmdpy_init): Likewise.
9139         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9140         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9141         (infpy_search_memory): Likewise.
9142         * python/py-objfile.c (objfpy_add_separate_debug_file)
9143         (gdbpy_lookup_objfile): Likewise.
9144         * python/py-symbol.c (gdbpy_lookup_symbol)
9145         (gdbpy_lookup_global_symbol): Likewise.
9146         * python/py-type.c (gdbpy_lookup_type): Likewise.
9147         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9148         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9149         Likewise.
9150
9151 2017-04-05  Pedro Alves  <palves@redhat.com>
9152
9153         * python/python-internal.h (gdb_PyGetSetDef): New type.
9154         * python/py-block.c (block_object_getset)
9155         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9156         * python/py-event.c (event_object_getset)
9157         (finish_breakpoint_object_getset): Likewise.
9158         * python/py-inferior.c (inferior_object_getset): Likewise.
9159         * python/py-infthread.c (thread_object_getset): Likewise.
9160         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9161         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9162         * python/py-objfile.c (objfile_getset): Likewise.
9163         * python/py-progspace.c (pspace_getset): Likewise.
9164         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9165         Likewise.
9166         * python/py-record.c (recpy_record_getset): Likewise.
9167         * python/py-symbol.c (symbol_object_getset): Likewise.
9168         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9169         Likewise.
9170         * python/py-type.c (type_object_getset, field_object_getset):
9171         Likewise.
9172         * python/py-value.c (value_object_getset): Likewise.
9173
9174 2017-04-05  Pedro Alves  <palves@redhat.com>
9175
9176         * python/python-internal.h (gdb_PyObject_CallMethod)
9177         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9178         New functions.
9179         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9180         (PySys_GetObject, PySys_SetPath): New macros.
9181
9182 2017-04-05  Pedro Alves  <palves@redhat.com>
9183
9184         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9185         info_osdata_command.
9186         * osdata.c (info_osdata_command): Rename to ...
9187         (info_osdata): ... this.  Constify 'type' parameter, and remove
9188         the 'from_tty' parameter.  Accept NULL TYPE.
9189         (info_osdata_command): New function.
9190         * osdata.h (info_osdata_command): Remove declaration.
9191         (info_osdata): New declaration.
9192
9193 2017-04-05  Pedro Alves  <palves@redhat.com>
9194
9195         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9196         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9197         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9198         parameter.
9199         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9200         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9201         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9202         parameter.
9203         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9204         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9205         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9206         (mi_cmd_file_list_exec_source_files)
9207         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9208         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9209         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9210         parameter.
9211         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9212         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9213         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9214         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9215         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9216         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9217         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9218         'command' parameter.
9219         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9220         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9221         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9222         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9223         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9224         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9225         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9226         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9227         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9228         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9229         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9230         parameter.
9231         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9232         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9233         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9234         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9235         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9236         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9237         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9238         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9239         (mi_cmd_data_list_changed_registers)
9240         (mi_cmd_data_write_register_values)
9241         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9242         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9243         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9244         (mi_cmd_list_features, mi_cmd_list_target_features)
9245         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9246         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9247         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9248         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9249         (mi_cmd_trace_frame_collected): Constify 'command'
9250         parameter.
9251         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9252         'command' parameter.
9253
9254 2017-04-05  Pedro Alves  <palves@redhat.com>
9255
9256         * ada-lang.c (ada_completer_word_break_characters): Now a const
9257         array.
9258         (ada_get_gdb_completer_word_break_characters): Constify.
9259         * completer.c (gdb_completer_command_word_break_characters)
9260         (gdb_completer_file_name_break_characters)
9261         (gdb_completer_quote_characters): Now const arrays.
9262         (get_gdb_completer_quote_characters): Constify.
9263         (set_rl_completer_word_break_characters): New function.
9264         (set_gdb_completion_word_break_characters)
9265         (complete_line_internal): Use it.
9266         * completer.h (get_gdb_completer_quote_characters): Constify.
9267         (set_rl_completer_word_break_characters): Declare.
9268         * f-lang.c (f_word_break_characters): Constify.
9269         * language.c (default_word_break_characters): Constify.
9270         * language.h (language_defn::la_word_break_characters): Constify.
9271         (default_word_break_characters): Constify.
9272         * top.c (init_main): Use set_rl_completer_word_break_characters.
9273
9274 2017-04-05  Pedro Alves  <palves@redhat.com>
9275
9276         * aix-thread.c (aix_thread_pid_to_str)
9277         (aix_thread_extra_thread_info): Constify.
9278         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9279         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9280         (bsd_uthread_pid_to_str): Constify.
9281         * corelow.c (core_pid_to_str): Constify.
9282         * darwin-nat.c (darwin_pid_to_str): Constify.
9283         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9284         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9285         Constify.
9286         * gnu-nat.c (gnu_pid_to_str): Constify.
9287         * go32-nat.c (go32_pid_to_str): Constify.
9288         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9289         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9290         * inferior.c (inferior_pid_to_str): Constify.
9291         * linux-nat.c (linux_nat_pid_to_str): Constify.
9292         * linux-tdep.c (linux_core_pid_to_str): Constify.
9293         * linux-thread-db.c (thread_db_pid_to_str)
9294         (thread_db_extra_thread_info): Constify.
9295         * nto-tdep.c (nto_extra_thread_info): Constify.
9296         * nto-tdep.h (nto_extra_thread_info): Constify.
9297         * obsd-nat.c (obsd_pid_to_str): Constify.
9298         * procfs.c (procfs_pid_to_str): Constify.
9299         * ravenscar-thread.c (ravenscar_extra_thread_info)
9300         (ravenscar_pid_to_str): Constify.
9301         * remote-sim.c (gdbsim_pid_to_str): Constify.
9302         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9303         Constify.
9304         * sol-thread.c (solaris_pid_to_str): Constify.
9305         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9306         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9307         * target.c (default_pid_to_str, target_pid_to_str)
9308         (normal_pid_to_str, default_pid_to_str): Constify.
9309         * target.h (target_ops::to_pid_to_str)
9310         (target_ops::to_extra_thread_info): Constify.
9311         (target_pid_to_str, normal_pid_to_str): Constify.
9312         * windows-nat.c (windows_pid_to_str): Constify.
9313         * gdbarch.sh (core_pid_to_str): Constify.
9314         * target-delegates.c: Regenerate.
9315         * gdbarch.h, gdbarch.c: Regenerate.
9316
9317 2017-04-05  Pedro Alves  <palves@redhat.com>
9318
9319         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9320         the memory of the temporary warning_pre_print override.
9321         * utils.c (warning_pre_print): Constify.
9322         * utils.h (warning_pre_print): Constify.
9323
9324 2017-04-05  Pedro Alves  <palves@redhat.com>
9325
9326         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9327         (shell_command): New function.
9328         (make_command): Use std::string.
9329         (init_cli_cmds): Register shell_command instead of shell_escape.
9330
9331 2017-04-05  Pedro Alves  <palves@redhat.com>
9332
9333         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9334         * tracepoint.c (default_collect): Don't initialize.
9335
9336 2017-04-05  Pedro Alves  <palves@redhat.com>
9337
9338         * macroexp.c (macro_buffer::shared): Now a bool.
9339         (init_buffer): Update.
9340         (init_shared_buffer): Constify 'addr' parameter.
9341         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9342         casts.
9343
9344 2017-04-05  Pedro Alves  <palves@redhat.com>
9345
9346         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9347         * disasm.c (set_disassembler_options): Constify local.
9348         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9349
9350 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9351
9352         PR gdb/21352
9353         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9354         option.
9355
9356 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9357
9358         * frame.c (frame_unwind_register_unsigned): Call
9359         frame_unwind_register_value.
9360
9361 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9362
9363         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9364         Use gdb_test_multiple, and don't match anchor.
9365
9366 2017-04-05  Pedro Alves  <palves@redhat.com>
9367
9368         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9369         (Write After Approval): Remove Simon Marchi.
9370
9371 2017-04-05  Pedro Alves  <palves@redhat.com>
9372
9373         * common/gdb_optional.h (optional::optional): Make constexpr and
9374         initialize m_dummy.
9375
9376 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9377
9378         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9379         (amd64fbsd_jmp_buf_reg_offset): Remove.
9380         (amd64fbsd_supply_uthread): Remove function.
9381         (amd64fbsd_collect_uthread): Remove function.
9382         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9383         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9384         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9385         (fbsd-nat.c): Update comment.
9386         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9387         (i386fbsd_jmp_buf_reg_offset): Remove.
9388         (i386fbsd_supply_uthread): Remove function.
9389         (i386fbsd_collect_uthread): Remove function.
9390         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9391
9392 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9393
9394         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9395         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9396         * NEWS: Mention that support for FreeBSD/alpha was removed.
9397         * alpha-fbsd-tdep.c: Delete file.
9398         * config/alpha/fbsd.mh: Delete file.
9399         * configure.host: Delete alpha*-*-freebsd* and
9400         alpha*-*-kfreebsd*-gnu.
9401         * configure.tgt: Delete alpha*-*-freebsd* and
9402         alpha*-*-kfreebsd*-gnu.
9403
9404 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9405
9406         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9407         amd64bsd_store_inferior_registers): Use ptid from regcache.
9408
9409 2017-04-04  Pedro Alves  <palves@redhat.com>
9410
9411         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9412         data fields, make them private and add "m_" prefixes.
9413         (lnp_state_machine::lnp_state_machine): New ctor.
9414         (record_line, check_line_address, handle_set_discriminator)
9415         (handle_set_address, handle_advance_pc, handle_special_opcode)
9416         (handle_advance_line, handle_set_file, handle_negate_stmt)
9417         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9418         (end_sequence, advance_line): New methods.
9419         (m_gdbarch, m_record_lines_p): New fields.
9420         (lnp_reader_state): Delete.
9421         (dwarf_record_line): Rename to ...
9422         (lnp_state_machine::record_line): ... adjust.
9423         (init_lnp_state_machine): Delete.
9424         (lnp_state_machine::lnp_state_machine): New.
9425         (check_line_address): Rename to ...
9426         (lnp_state_machine::check_line_address): This.
9427         (dwarf_decode_lines_1): Remove reference to "reader_state".
9428         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9429         State machine internal state manipulation moved to
9430         lnp_state_machine methods.
9431
9432 2017-04-04  Pedro Alves  <palves@redhat.com>
9433
9434         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9435         unittests/offset-type-selftests.c.
9436         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9437         * common/offset-type.h: New file.
9438         * common/preprocessor.h: New file.
9439         * common/traits.h: New file.
9440         * common/valid-expr.h: New file.
9441         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9442         sect_offset and cu_offset strong typedefs throughout.
9443         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9444         typedefs throughout.
9445         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9446         sect_offset and cu_offset strong typedefs throughout.
9447         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9448         typedefs throughout.
9449         * gdbtypes.h: Include "common/offset-type.h".
9450         (cu_offset): Now an offset type (strong typedef) instead of a
9451         struct.
9452         (sect_offset): Likewise.
9453         (union call_site_parameter_u): Rename "param_offset" field to
9454         "param_cu_off".
9455         * unittests/offset-type-selftests.c: New file.
9456
9457 2017-04-04  Pedro Alves  <palves@redhat.com>
9458
9459         * common/underlying.h: New file.
9460         * dwarf2read.c: Include "common/gdb_optional.h" and
9461         "common/underlying.h".
9462         (dir_index, file_name_index): New types.
9463         (file_entry): Use them.
9464         (file_entry::include): Use to_underlying.
9465         (line_header::add_file_name): Use dir_index.
9466         (read_formatted_entries): Use gdb::optional.  Read form before
9467         writting to file_entry.
9468         (dwarf_decode_line_header): Use dir_index.
9469         (lnp_state_machine::current_file): Use to_underlying.
9470         (lnp_state_machine::file): Change type to file_name_index.
9471         (dwarf_record_line): Use to_underlying.
9472         (init_lnp_state_machine): Use file_name_index.
9473         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9474
9475 2017-04-04  Pedro Alves  <palves@redhat.com>
9476
9477         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9478         operator bool, has_value and get methods.
9479
9480 2017-04-04  Pedro Alves  <palves@redhat.com>
9481
9482         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9483         fields.
9484         (line_header): Initialize all data fields.  Change type of
9485         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9486         Change type of include_dirs to std::vector<const char *>.  Remove
9487         num_include_dirs, include_dirs_size.  Change type of file_names to
9488         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9489         (line_header::line_header): New.
9490         (line_header::add_include_dir, line_header::add_file_name): New
9491         methods.
9492         (line_header::include_dir_at): Remove NULL check.
9493         (line_header::file_name_at): Add const overload.
9494         (line_header_up): New unique_ptr typedef.
9495         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9496         std::vector.  Remove free_line_header call.
9497         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9498         free_line_header call.
9499         (free_cu_line_header): Delete.
9500         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9501         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9502         Adjust to use std::vector.
9503         (free_line_header): Delete.
9504         (free_line_header_voidp): Use delete.
9505         (add_include_dir): Replace with ...
9506         (line_header::add_include_dir): ... this method.  Use std::vector.
9507         (add_file_name): Replace with ...
9508         (line_header::add_file_name): ... this method.  Use std::vector.
9509         (add_include_dir_stub): Delete.
9510         (read_formatted_entries): Remove memset.
9511         (dwarf_decode_line_header): Return a line_header_up instead of a
9512         raw pointer.  Remove cleanup handling.  Pass lambdas to
9513         read_formatted_entries.  Adjust to use line_header methods.
9514         (dwarf_decode_lines_1): Adjust to use line_header methods.
9515         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9516         use std::vector.
9517
9518 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9519
9520         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9521         instead of struct ptid.
9522
9523 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9524
9525         * frame.c (get_frame_register_bytes): Unwind using value.
9526         (put_frame_register_bytes): Likewise.
9527
9528 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9529
9530         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9531         aggregate-like.
9532
9533 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9534
9535         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9536
9537 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9538
9539         * gdbthread.h (struct thread_info): Declare constructor and
9540         destructor.  Add some in-class member initializers.
9541         * thread.c (free_thread): Remove.
9542         (init_thread_list): Call delete instead of free_thread.
9543         (new_thread): Call thread_info constructor.
9544         (thread_info::thread_info): New function.
9545         (thread_info::~thread_info): New function.
9546         (delete_thread_1): Call delete instead of free_thread.
9547         (make_cleanup_restore_current_thread): Move tp and frame to
9548         inner block.
9549
9550 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9551
9552         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9553         (arc_skip_prologue): Likewise.
9554         (arc_make_frame_cache): Likewise.
9555         (arc_pv_get_operand): New function.
9556         (arc_is_in_prologue): Likewise.
9557         (arc_analyze_prologue): Likewise.
9558         (arc_print_frame_cache): Likewise.
9559         (MAX_PROLOGUE_LENGTH): New constant.
9560
9561 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9562
9563         * configure.tgt: Add arc-insn.o.
9564         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9565         (dump_arc_instruction_command): New function.
9566         (arc_fprintf_disasm): Likewise.
9567         (arc_disassemble_info): Likewise.
9568         (arc_insn_get_operand_value): Likewise.
9569         (arc_insn_get_operand_value_signed): Likewise.
9570         (arc_insn_get_memory_base_reg): Likewise.
9571         (arc_insn_get_memory_offset): Likewise.
9572         (arc_insn_get_branch_target): Likewise.
9573         (arc_insn_dump): Likewise.
9574         (arc_insn_get_linear_next_pc): Likewise.
9575         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9576         (arc_disassemble_info): Likewise.
9577         (arc_insn_get_branch_target): Likewise.
9578         (arc_insn_get_linear_next_pc): Likewise.
9579         * NEWS: Mention new "maint print arc arc-instruction".
9580
9581 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9582
9583         * arc-tdep (maintenance_print_arc_list): New variable.
9584         (maintenance_print_arc_command): New function.
9585
9586 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9587
9588         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9589         Add "limm" and "reserved".
9590         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9591         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9592         * arc-tdep.h (arc_regnum): Likewise.
9593
9594 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9595
9596         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9597         for THREADPTR register.
9598         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9599         register.
9600         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9601         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9602         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9603
9604 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9605
9606         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9607         registers above gdbarch_num_regs (gdbarch) as privileged in
9608         call0 ABI.
9609
9610 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9611
9612         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9613         for a single specified register or for all registers in
9614         a0_base..a0_base + C0_NREGS range.
9615         (supply_gregset_reg): Call regcache_raw_supply for a single
9616         specified register or for all registers in a0_base..a0_base +
9617         C0_NREGS range.
9618
9619 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9620
9621         * arch/xtensa.h (C0_NREGS): Add definition.
9622         * xtensa-tdep.c (C0_NREGS): Remove definition.
9623
9624 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9625
9626         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9627         Drop xtensa_default_isa initialization.
9628         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9629
9630 2017-03-27  Pedro Alves  <palves@redhat.com>
9631
9632         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9633         (file_entry::include_dir): New method.
9634         (line_header::include_dir_at, line_header::file_name_at): New
9635         methods.
9636         (setup_type_unit_groups, setup_type_unit_groups)
9637         (psymtab_include_file_name): Simplify using the new methods.
9638         (lnp_state_machine) <the_line_header>: New field.
9639         <file>: Add comment.
9640         (lnp_state_machine::current_file): New method.
9641         (dwarf_record_line): Simplify using the new methods.
9642         (init_lnp_state_machine): Initialize the "the_line_header" field.
9643         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9644         Simplify using the new methods.
9645
9646 2017-03-27  Pedro Alves  <palves@redhat.com>
9647
9648         * cp-name-parser.y (make_empty): Delete.
9649         (demangler_special, nested_name, ptr_operator, array_indicator)
9650         (direct_declarator, declarator_1): Use fill_comp instead of
9651         make_empty.
9652
9653 2017-03-27  Pedro Alves  <palves@redhat.com>
9654
9655         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9656         to ATTRIBUTE_PRINTF.
9657         * solib-target.c (library_list_start_list): Print "string" not
9658         "version".
9659         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9660         gdb_xml_error call.
9661
9662 2017-03-27  Pedro Alves  <palves@redhat.com>
9663
9664         * dwarf2read.c (struct file_and_directory): New.
9665         (dwarf2_get_dwz_file): Adjust to use std::string.
9666         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9667         (find_file_and_directory): Adjust to return a file_and_directory
9668         object.
9669         (read_file_scope): Adjust to use file_and_directory.  Remove
9670         make_cleanup/do_cleanups calls.
9671         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9672         make_cleanup/do_cleanups calls.
9673         * python/python.c (do_start_initialization): Adjust to ldirname
9674         returning a std::string.
9675         * utils.c (ldirname): Now returns a std::string.
9676         * utils.h (ldirname): Change return type to std::string.
9677         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9678         returning a std::string.
9679         * xml-tdesc.c (file_read_description_xml): Likewise.
9680
9681 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9682
9683         * regcache.c (regcache_debug_print_register): New function.
9684         * regcache.h (regcache_debug_print_register): New declaration.
9685         * target.c (debug_print_register): Remove.
9686         (target_fetch_registers): Call regcache_debug_print_register.
9687         (target_store_registers): Likewise.
9688
9689 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9690
9691         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9692         reference beyond the 'lh->include_dirs' array before accessing to
9693         it.
9694         (psymtab_include_file_name): Likewise.
9695         (dwarf_decode_lines_1): Likewise.
9696         (dwarf_decode_lines): Likewise.
9697         (file_file_name): Likewise.
9698
9699 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9700
9701         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9702         inferior_ptid.
9703         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9704         ps_lsetfpregs): Likewise.
9705         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9706         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9707         ps_lsetfpregs): Likewise.
9708         * target.c (target_fetch_registers, target_store_registers):
9709         Remove asserts.
9710
9711 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9712
9713         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9714
9715 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9716
9717         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9718         (_initialize_aarch64_tdep): Register it.
9719         (aarch64_record_load_store): Handle PRFM instruction.
9720         (aarch64_process_record_test): New function.
9721
9722 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9723
9724         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9725         indentation.
9726
9727 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9728
9729         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9730
9731 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9732
9733         python/python.c (do_start_initialization): Fix memory leak.
9734
9735 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9736
9737         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9738         using get_ptrace_pid.
9739         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9740         inferior_ptid.
9741         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9742         inferior_ptid instead of pid.
9743
9744 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9745
9746         * aarch64-tdep.c: Wrap locally used classes in anonymous
9747         namespace.
9748         * arm-tdep.c: Likewise.
9749         * linespec.c: Likewise.
9750         * ui-out.c: Likewise.
9751
9752 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9753
9754         PR gdb/19637
9755         * python/lib/gdb/printer/bound_registers.py: Import sys.
9756
9757 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9758
9759         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9760         windows_thread_info parameter and use it instead of
9761         current_thread.
9762         (windows_fetch_inferior_registers): Don't set current_thread,
9763         pass the thread to do_windows_fetch_inferior_registers.  Use
9764         ptid from regcache instead of inferior_ptid.
9765         (do_windows_store_inferior_registers): Add windows_thread_info
9766         parameter and use it instead of current_thread.
9767         (windows_store_inferior_registers): Don't set current_thread,
9768         pass the thread to do_windows_store_inferior_registers.  Use
9769         ptid from regcache instead of inferior_ptid.
9770
9771 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9772
9773         * ser-mingw.c (ser_windows_raw): Remove reference to
9774         struct serial::current_timeout.
9775
9776 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9777
9778         PR tdep/20928
9779         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9780         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9781         (sparc64_fsr_type): Fix %fsr decoding.
9782
9783 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9784
9785         * python/py-record-btrace.c (btpy_insn_data): Change return type
9786         for Python 2.
9787
9788 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9789
9790         * spu-linux-nat.c (spu_fetch_inferior_registers,
9791         spu_store_inferior_registers): Use ptid from regcache, set and
9792         restore inferior_ptid.
9793         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9794         Likewise.
9795
9796 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9797
9798         * i386-linux-nat.c (fetch_register, store_register,
9799         i386_linux_fetch_inferior_registers,
9800         i386_linux_store_inferior_registers): Use ptid from regcache.
9801         * ia64-linux-nat.c (ia64_linux_fetch_register,
9802         ia64_linux_store_register): Likewise.
9803         * inf-ptrace.c (inf_ptrace_fetch_register,
9804         inf_ptrace_store_register): Likewise.
9805         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9806         m32r_linux_store_inferior_registers): Likewise.
9807         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9808         m68kbsd_store_inferior_registers): Likewise.
9809         * m68k-linux-nat.c (fetch_register, store_register,
9810         m68k_linux_fetch_inferior_registers,
9811         m68k_linux_store_inferior_registers): Likewise.
9812         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9813         m88kbsd_store_inferior_registers): Likewise.
9814         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9815         mips_fbsd_store_inferior_registers): Likewise.
9816         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9817         mips64_linux_regsets_store_registers): Likewise.
9818         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9819         mipsnbsd_store_inferior_registers): Likewise.
9820         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9821         mips64obsd_store_inferior_registers): Likewise.
9822         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9823         Likewise.
9824         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9825         ppcfbsd_store_inferior_registers): Likewise.
9826         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9827         ppc_linux_store_inferior_registers): Likewise.
9828         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9829         ppcnbsd_store_inferior_registers): Likewise.
9830         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9831         ppcobsd_store_registers): Likewise.
9832         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9833         Likewise.
9834         * ravenscar-thread.c (ravenscar_fetch_registers,
9835         ravenscar_store_registers, ravenscar_prepare_to_store):
9836         Likewise.
9837         * record-btrace.c (record_btrace_fetch_registers,
9838         record_btrace_store_registers, record_btrace_prepare_to_store):
9839         Likewise.
9840         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9841         Lookup inferior using ptid from regcache, instead of
9842         current_inferior.
9843         * remote.c (remote_fetch_registers, remote_store_registers): Use
9844         ptid from regcache.
9845         * rs6000-nat.c (fetch_register, store_register): Likewise.
9846         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9847         s390_linux_store_inferior_registers): Likewise.
9848         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9849         shnbsd_store_inferior_registers): Likewise.
9850         * sol-thread.c (sol_thread_fetch_registers,
9851         sol_thread_store_registers): Likewise.
9852         * sparc-nat.c (sparc_fetch_inferior_registers,
9853         sparc_store_inferior_registers): Likewise.
9854         * tilegx-linux-nat.c (fetch_inferior_registers,
9855         store_inferior_registers): Likewise.
9856         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9857         vaxbsd_store_inferior_registers): Likewise.
9858         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9859         store_xtregs): Likewise.
9860
9861 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9862
9863         PR gdb/14441
9864         * NEWS: Mention support for rvalue references in GDB and python.
9865         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9866         supports both lvalue and rvalue references.
9867
9868 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9869
9870         PR gdb/14441
9871         * gdbtypes.c (rank_one_type): Implement overloading
9872         resolution rules regarding rvalue references.
9873
9874 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9875
9876         PR gdb/14441
9877         * aarch64-tdep.c (aarch64_type_align)
9878         (aarch64_extract_return_value, aarch64_store_return_value): Change
9879         lvalue reference type checks to general reference type checks.
9880         * amd64-tdep.c (amd64_classify): Likewise.
9881         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9882         Likewise.
9883         * arm-tdep.c (arm_type_align, arm_extract_return_value)
9884         (arm_store_return_value): Likewise.
9885         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9886         * c-typeprint.c (c_print_type): Likewise.
9887         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9888         (cplus_number_of_children, cplus_describe_child): Likewise.
9889         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9890         * completer.c (expression_completer): Likewise.
9891         * cp-support.c (make_symbol_overload_list_adl_namespace):
9892         Likewise.
9893         * darwin-nat-info.c (info_mach_region_command): Likewise.
9894         * dwarf2loc.c (entry_data_value_coerce_ref)
9895         (value_of_dwarf_reg_entry): Likewise.
9896         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9897         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9898         Likewise.
9899         * findvar.c (extract_typed_address, store_typed_address):
9900         Likewise.
9901         * gdbtypes.c (rank_one_type): Likewise.
9902         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9903         * infcall.c (value_arg_coerce): Likewise.
9904         * language.c (pointer_type): Likewise.
9905         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9906         Likewise.
9907         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9908         * mn10300-tdep.c (mn10300_type_align): Likewise.
9909         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9910         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9911         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9912         Likewise.
9913         * printcmd.c (print_formatted, x_command): Likewise.
9914         * python/py-type.c (typy_get_composite, typy_template_argument):
9915         Likewise.
9916         * python/py-value.c (valpy_referenced_value)
9917         (valpy_get_dynamic_type, value_has_field): Likewise.
9918         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9919         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9920         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9921         * spu-tdep.c (spu_scalar_value_p): Likewise.
9922         * symtab.c (lookup_symbol_aux): Likewise.
9923         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9924         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9925         Likewise.
9926         * valops.c (value_cast_pointers, value_cast)
9927         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9928         (value_struct_elt, value_struct_elt_bitpos)
9929         (value_find_oload_method_list, find_overload_match)
9930         (value_rtti_indirect_type): Likewise.
9931         * valprint.c (val_print_scalar_type_p, generic_val_print):
9932         Likewise.
9933         * value.c (value_actual_type, value_as_address, unpack_long)
9934         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9935         (coerce_ref): Likewise.
9936         * varobj.c (varobj_get_value_type): Likewise.
9937
9938 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9939
9940         PR gdb/14441
9941         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9942         table of constants.
9943         * python/lib/gdb/command/explore.py: Support exploring values
9944         of rvalue reference types.
9945         * python/lib/gdb/types.py: Implement get_basic_type() for
9946         rvalue reference types.
9947         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9948         constant.
9949         * python/py-value.c (valpy_getitem): Add an rvalue reference
9950         check.
9951         (valpy_reference_value): Add new parameter "refcode".
9952         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9953         New wrappers for valpy_reference_value().
9954         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9955         (gdbpy_invoke_xmethod): Likewise.
9956
9957 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9958
9959         PR gdb/14441
9960         * dwarf2read.c (process_die, read_type_die_1): Handle the
9961         DW_TAG_rvalue_reference_type DIE.
9962         (read_tag_reference_type): Add new parameter "refcode".
9963
9964 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9965
9966         PR gdb/14441
9967         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9968         (c_type_print_modifier, c_type_print_varspec_suffix)
9969         (c_type_print_base): Support printing rvalue reference types.
9970         * c-valprint.c (c_val_print, c_value_print): Support printing
9971         rvalue reference values.
9972
9973 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9974
9975         PR gdb/14441
9976         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9977         typename.
9978         * cp-support.c (replace_typedefs): Handle
9979         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9980         * python/py-type.c (typy_lookup_type): Likewise.
9981
9982 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9983
9984         PR gdb/14441
9985         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9986         * parse.c (insert_type): Change assert statement.
9987         (follow_types): Handle rvalue reference types.
9988         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9989         constant.
9990
9991 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9992
9993         PR gdb/14441
9994         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9995         value_ref() interface.
9996         * c-valprint.c (c_value_print): Likewise.
9997         * infcall.c (value_arg_coerce): Likewise.
9998         * python/py-value.c (valpy_reference_value): Likewise.
9999         * valops.c (value_cast, value_reinterpret_cast)
10000         (value_dynamic_cast, typecmp): Likewise.
10001         (value_ref): Parameterize by kind of return value reference type.
10002         * value.h (value_ref): Add new parameter "refcode".
10003
10004 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10005
10006         PR gdb/14441
10007         * dwarf2read.c (read_tag_reference_type): Use
10008         lookup_lvalue_reference_type() instead of lookup_reference_type().
10009         * eval.c (evaluate_subexp_standard): Likewise.
10010         * f-exp.y: Likewise.
10011         * gdbtypes.c (make_reference_type, lookup_reference_type):
10012         Generalize with rvalue reference types.
10013         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10014         convenience wrappers for lookup_reference_type().
10015         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10016         reference kind parameter.
10017         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10018         wrappers for lookup_reference_type().
10019         * guile/scm-type.c (gdbscm_type_reference): Use
10020         lookup_lvalue_reference_type() instead of lookup_reference_type().
10021         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10022         * parse.c (follow_types): Likewise.
10023         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10024         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10025         Likewise.
10026         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10027         (gdbpy_invoke_xmethod): Likewise.
10028         * stabsread.c: Provide extra argument to make_reference_type()
10029         call.
10030         * valops.c (value_ref, value_rtti_indirect_type): Use
10031         lookup_lvalue_reference_type() instead of lookup_reference_type().
10032
10033 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10034
10035         PR gdb/14441
10036         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10037         (TYPE_IS_REFERENCE): New macro.
10038         (struct type): Add rvalue_reference_type field.
10039         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10040
10041 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10042
10043         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10044         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10045         New function definition.
10046         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10047         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10048         New function declaration.
10049         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10050         * mi/mi-interp.h: New file.
10051         * solib.c (info_sharedlibrary_command): Replace for loop with
10052         ALL_SO_LIBS macro
10053         * solib.h (update_solib_list): New function declaration.
10054         (so_list_head): Move macro.
10055         * solist.h (ALL_SO_LIBS): New macro.
10056
10057 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10058
10059         * infcmd.c (post_create_inferior): Remove unused argument in
10060         call to solib_add.
10061         * remote.c (remote_start_remote): Likewise.
10062         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10063         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10064         (enable_break): Likewise.
10065         * solib.c (update_solib_list): Remove unused target argument
10066         and its documentation.
10067         (solib_add): Remove unused target argument.  Remove unused
10068         argument in call to update_solib_list.
10069         (info_sharedlibrary_command): Remove unused argument in call
10070         to update_solib_list.
10071         (sharedlibrary_command): Remove unused argument in call to
10072         solib_add.
10073         (handle_solib_event): Likewise.
10074         (reload_shared_libraries): Likewise.
10075         * solib.h (solib_add): Remove unused target argument.
10076
10077 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10078
10079         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10080         (s390_displaced_step_fixup): Cover relative branches with the
10081         default fixup handling.  This fixes lack of support for some
10082         relative branch instructions.
10083
10084 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10085
10086         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10087         ptid from regcache.
10088
10089 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10090
10091         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10092         i386_darwin_store_inferior_registers): Use ptid from regcache.
10093
10094 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10095
10096         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10097         i386bsd_store_inferior_registers): Use ptid from regcache.
10098
10099 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10100
10101         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10102         hppaobsd_store_registers): Use ptid from regcache.
10103
10104 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10105
10106         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10107         hppanbsd_store_registers): Use ptid from regcache.
10108
10109 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10110
10111         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10112         from regcache.  Use get_ptrace_pid.
10113
10114 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10115
10116         * corelow.c (get_core_register_section): Use ptid from regcache,
10117         update doc.
10118
10119 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10120
10121         * bsd-uthread.c (bsd_uthread_fetch_registers,
10122         bsd_uthread_store_registers): Use ptid from regcache, set and
10123         restore inferior_ptid.
10124
10125 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10126
10127         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10128         fetch_fp_regs, store_register, store_regs, store_fp_register,
10129         store_fp_regs): Use ptid from regcache.
10130
10131 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10132
10133         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10134         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10135         store_vfp_regs): Use ptid from regcache.
10136
10137 2017-03-17  Pedro Alves  <palves@redhat.com>
10138
10139         PR remote/21188
10140         * ser-base.c (ser_base_wait_for): Add comment.
10141         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10142         version.
10143         * ser-unix.c (hardwire_raw): Remove reference to
10144         scb->current_timeout.
10145         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10146         (hardwire_ops): Install ser_base_readchar instead of
10147         hardwire_readchar.
10148         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10149         Remove fields.
10150
10151 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10152
10153         PR gdb/19637
10154         * python/lib/gdb/printer/bound_registers.py: Add support for
10155         Python 3.
10156
10157 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10158
10159         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10160         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10161         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10162         byte_offset to subobj_byte_offset.  Fix the handling of
10163         DWARF_VALUE_STACK on big-endian targets when coming via an
10164         implicit pointer.
10165         (dwarf2_evaluate_loc_desc): Adjust call to
10166         dwarf2_evaluate_loc_desc_full.
10167         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10168         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10169
10170 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10171
10172         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10173         and REVSH instructions.
10174
10175 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10176
10177         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10178         (arm_record_test): Declare.
10179         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10180         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10181         align with the manual.
10182         (thumb_record_misc): Adjust the code order to align with the
10183         manual.
10184         (thumb2_record_decode_insn_handler): Fix instruction matching.
10185         (instruction_reader_thumb): New class.
10186         (arm_record_test): New function.
10187
10188 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10189
10190         * arm-tdep.c (abstract_memory_reader): New class.
10191         (instruction_reader): New class.
10192         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10193         (decode_insn): Likewise.
10194
10195 2017-03-16  Doug Evans  <dje@google.com>
10196
10197         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10198         member.  Change type of TYPE member to SCM.  All uses updated.
10199         (lsscm_make_lazy_string_smob): Add assert.
10200         (lsscm_make_lazy_string): Flag bad length values.
10201         (lsscm_elt_type): New function.
10202         (gdbscm_lazy_string_to_value): Rewrite to use
10203         lsscm_safe_lazy_string_to_value.
10204         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10205         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10206         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10207         in incoming type.
10208         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10209         * guile/scm-type.c (tyscm_scm_to_type): New function.
10210
10211 2017-03-15  Doug Evans  <dje@google.com>
10212
10213         PR python/17728, python/18439, python/18779
10214         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10215         member.  Change type of TYPE member to PyObject *.  All uses updated.
10216         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10217         (gdbpy_create_lazy_string_object): Flag bad length values.
10218         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10219         Handle typedefs in incoming type.
10220         (stpy_lazy_string_elt_type): New function.
10221         (gdbpy_extract_lazy_string): Call it.
10222         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10223         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10224         typedefs in incoming type.
10225
10226 2017-03-16  Doug Evans  <dje@google.com>
10227
10228         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10229         * guile/scm-type.c (tyscm_scm_to_type): New function.
10230
10231 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10232
10233         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10234         "ULONGEST" for "skip".
10235
10236 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10237
10238         PR gdb/21220
10239         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10240         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10241         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10242         over ptrace peek/poke until end of buffer or error.
10243
10244 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10245
10246         * parse.c (length_of_subexp): Make static.
10247         * parser-defs.h (length_of_subexp): Remove.
10248
10249 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10250
10251         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10252         as well.
10253
10254 2017-03-14  Pedro Alves  <palves@redhat.com>
10255
10256         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10257         (main): Use std::unique_ptr.  Remove calls to
10258         cp_demangled_name_parse_free.
10259
10260 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10261
10262         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10263         alphabsd_store_inferior_registers): Use regcache->ptid instead
10264         of inferior_ptid.
10265
10266 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10267
10268         * aix-thread.c (aix_thread_fetch_registers,
10269         aix_thread_store_registers): Use regcache->ptid instead of
10270         inferior_ptid.
10271
10272 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10273
10274         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10275         store_gregs_to_thread, fetch_fpregs_from_thread,
10276         store_fpregs_to_thread): Use regcache->ptid instead of
10277         inferior_ptid.
10278
10279 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10280
10281         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10282         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10283         instead of inferior_ptid.
10284
10285 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10286
10287         * target.c (target_fetch_registers, target_store_registers): Add
10288         assert.
10289
10290 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10291
10292         * regcache.h (regcache_get_ptid): New function.
10293         * regcache.c (regcache_get_ptid): New function.
10294
10295 2017-03-13  Mark Wielaard  <mark@klomp.org>
10296
10297         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10298
10299 2017-03-10  Keith Seitz  <keiths@redhat.com>
10300
10301         PR c++/8218
10302         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10303
10304 2017-03-08  Pedro Alves  <palves@redhat.com>
10305
10306         PR gdb/18360
10307         * infrun.c (start_step_over, do_target_resume, resume)
10308         (restart_threads): Assert we're not resuming a thread that is
10309         meant to be stopped.
10310         (infrun_thread_stop_requested_callback): Delete.
10311         (infrun_thread_stop_requested): If the thread is internally
10312         stopped, queue a pending stop event and clear the thread's
10313         inline-frame state.
10314         (handle_stop_requested): New function.
10315         (handle_syscall_event, handle_inferior_event_1): Use
10316         handle_stop_requested.
10317         (handle_stop_requested): New function.
10318         (handle_signal_stop): Set the thread's stop_signal here instead of
10319         at caller.
10320         (finish_step_over): Clear step over info unconditionally.
10321         (handle_signal_stop): If the user had interrupted the event
10322         thread, consider the stop a random signal.
10323         (handle_signal_stop) <signal arrived while stepping over
10324         breakpoint>: Don't restart threads here.
10325         (stop_waiting): Don't clear step-over info here.
10326
10327 2017-03-08  Pedro Alves  <palves@redhat.com>
10328
10329         PR 21206
10330         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10331         goes to argument 2, not 1.
10332
10333 2017-03-08  Pedro Alves  <palves@redhat.com>
10334
10335         PR cli/21218
10336         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10337         display_gdb_prompt.
10338         (command_line_input): Add comment.
10339
10340 2017-03-08  Pedro Alves  <palves@redhat.com>
10341
10342         PR tui/21216
10343         * tui/tui-file.c (tui_file::write): New.
10344         * tui/tui-file.h (tui_file): Override "write".
10345         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10346         factored out from ...
10347         (tui_puts): ... here.
10348         (tui_putc): Use them.
10349         (tui_write): New function.
10350         * tui/tui-io.h (tui_write): Declare.
10351
10352 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10353
10354         * Makefile.in (SFILES): Replace "environ.c" with
10355         "common/environ.c".
10356         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10357         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10358         to...
10359         * common/environ.c: ... here.
10360         * environ.h: Moved to...
10361         * common/environ.h: ... here.
10362
10363 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10364
10365         * gdbarch.sh (pstring_ptr): New static function.
10366         (gdbarch_disassembler_options): Use it.
10367         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10368         not valid_disassembler_option->name.
10369         * gdbarch.c: Regenerate.
10370
10371 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10372
10373         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10374
10375 2017-03-07  Pedro Alves  <palves@redhat.com>
10376
10377         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10378
10379 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10380
10381         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10382         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10383         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10384         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10385
10386 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10387
10388         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10389
10390 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10391
10392         * remote.c (remote_add_target_side_commands): Use range-based
10393         for loop.
10394
10395 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10396
10397         PR gdb/21165
10398         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10399         value is lazy.
10400         * valprint.c (common_val_print): Likewise.
10401
10402 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10403
10404         * NEWS: Mention new set/show disassembler-options commands.
10405         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10406         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10407         (prospective_options): New static variable.
10408         (gdb_disassembler::gdb_disassembler): Initialize
10409         m_di.disassembler_options.
10410         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10411         (get_disassembler_options): New function.
10412         (set_disassembler_options): Likewise.
10413         (set_disassembler_options_sfunc): Likewise.
10414         (show_disassembler_options_sfunc): Likewise.
10415         (disassembler_options_completer): Likewise.
10416         (_initialize_disasm): Likewise.
10417         * disasm.h (get_disassembler_options): New prototype.
10418         (set_disassembler_options): Likewise.
10419         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10420         (gdbarch_verify_disassembler_options): Likewise.
10421         * gdbarch.c: Regenerate.
10422         * gdbarch.h: Likewise.
10423         * arm-tdep.c (num_disassembly_options): Delete.
10424         (set_disassembly_style): Likewise.
10425         (arm_disassembler_options): New static variable.
10426         (set_disassembly_style_sfunc): Convert short style name into long
10427         option name.  Call set_disassembler_options.
10428         (show_disassembly_style_sfunc): New function.
10429         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10430         set_gdbarch_verify_disassembler_options.
10431         (_initialize_arm_tdep): Delete regnames variable and update callers.
10432         (arm_disassembler_options): Initialize.
10433         (disasm_options): New variable.
10434         (num_disassembly_options): Rename from this...
10435         (num_disassembly_styles): ...to this.  Compute by scanning through
10436         disasm_options.
10437         (valid_disassembly_styles): Initialize using disasm_options.
10438         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10439         set_arm_regname_option.
10440         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10441         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10442         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10443         set_gdbarch_verify_disassembler_options.
10444         * s390-tdep.c (s390_disassembler_options): New static variable.
10445         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10446         set_gdbarch_verify_disassembler_options.
10447
10448 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10449
10450         * remote.c (remote_add_target_side_condition): Remove "struct"
10451         keyword from range-based for loop.
10452
10453 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10454
10455         * remote.c (remote_add_target_side_condition): Use range-based
10456         for loop.  Update comment.
10457
10458 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10459
10460         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10461
10462 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10463
10464         * regcache.c (regcache_raw_update): New function.
10465         (regcache_raw_read): Move code to regcache_raw_update.
10466         * regcache.h (regcache_raw_update): New declaration.
10467         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10468
10469 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10470
10471         * dwarf2read.c (create_debug_type_hash_table): Initialize
10472         header.signature and header.type_offset_in_tu.
10473
10474 2017-02-24  Pedro Alves  <palves@redhat.com>
10475
10476         * symtab.c (make_file_symbol_completion_list_1): Use
10477         add_symtab_completions.
10478
10479 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10480
10481         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10482
10483 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10484
10485         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10486         I386_MAX_REGISTER_SIZE.
10487         (i386_pseudo_register_write): Likewise.
10488         (i386_process_record): Likewise.
10489         * i387-tdep.c (i387_supply_xsave): Likewise.
10490         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10491         (store_register): Likewise.
10492
10493 2017-02-23  Pedro Alves  <palves@redhat.com>
10494
10495         * ada-lang.c: Include "common/function-view.h".
10496         (ada_iterate_over_symbols): Adjust to use function_view as
10497         callback type.
10498         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10499         (ada_make_symbol_completion_list): Use a lambda.
10500         (ada_exc_search_name_matches): Delete.
10501         (name_matches_regex): New.
10502         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10503         * compile/compile-c-support.c: Include "common/function-view.h".
10504         (print_one_macro): Change prototype to accept a ui_file pointer.
10505         (write_macro_definitions): Use a lambda.
10506         * dwarf2read.c: Include "common/function-view.h".
10507         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10508         (dw2_expand_symtabs_matching): Adjust to use function_view as
10509         callback type.
10510         * language.h: Include "common/function-view.h".
10511         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10512         function_view as callback type.
10513         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10514         * linespec.c: Include "common/function-view.h".
10515         (collect_info::add_symbol): New method.
10516         (struct symbol_and_data_callback, iterate_inline_only, struct
10517         symbol_matcher_data, iterate_name_matcher): Delete.
10518         (iterate_over_all_matching_symtabs): Adjust to use function_view
10519         as callback type and lambdas.
10520         (iterate_over_file_blocks): Adjust to use function_view as
10521         callback type.
10522         (decode_compound_collector): Now a class with private fields.
10523         (decode_compound_collector::release_symbols): New method.
10524         (collect_one_symbol): Rename to...
10525         (decode_compound_collector::operator()): ... this and adjust.
10526         (lookup_prefix_sym): decode_compound_collector construction bits
10527         move to decode_compound_collector ctor.  Pass the
10528         decode_compound_collector object directly as callback.  Remove
10529         cleanups and use decode_compound_collector::release_symbols
10530         instead.
10531         (symtab_collector): Now a class with private fields.
10532         (symtab_collector::release_symtabs): New method.
10533         (add_symtabs_to_list): Rename to...
10534         (symtab_collector::operator()): ... this and adjust.
10535         (collect_symtabs_from_filename): symtab_collector construction
10536         bits move to symtab_collector ctor.  Pass the symtab_collector
10537         object directly as callback.  Remove cleanups and use
10538         symtab_collector::release_symtabs instead.
10539         (collect_symbols): Delete.
10540         (add_matching_symbols_to_info): Use lambdas.
10541         * macrocmd.c (print_macro_callback): Delete.
10542         (info_macro_command): Use a lambda.
10543         (info_macros_command): Pass print_macro_definition as callable
10544         directly.
10545         (print_one_macro): Remove 'ignore' parameter.
10546         (macro_list_command): Adjust.
10547         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10548         (macro_for_each_data::user_data): Delete field.
10549         (foreach_macro): Adjust to call the function_view.
10550         (macro_for_each): Adjust to use function_view as callback type.
10551         (foreach_macro_in_scope): Adjust to call the function_view.
10552         (macro_for_each_in_scope): Adjust to use function_view as callback
10553         type.
10554         * macrotab.h: Include "common/function-view.h".
10555         (macro_callback_fn): Declare a prototype instead of a pointer.
10556         Remove "user_data" parameter.
10557         (macro_for_each, macro_for_each_in_scope): Adjust to use
10558         function_view as callback type.
10559         * psymtab.c (partial_map_expand_apply)
10560         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10561         Adjust to use function_view as callback type and to return bool.
10562         (psym_expand_symtabs_matching): Adjust to use function_view as
10563         callback types.
10564         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10565         to use function_view as callback type and to return bool.
10566         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10567         callback types.
10568         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10569         as callback types.
10570         * symfile.h: Include "common/function-view.h".
10571         (expand_symtabs_file_matcher_ftype)
10572         (expand_symtabs_symbol_matcher_ftype)
10573         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10574         return bool.
10575         (quick_symbol_functions::map_symtabs_matching_filename)
10576         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10577         function_view as callback type and return bool.
10578         (expand_symtabs_matching): Adjust to use function_view as callback
10579         type.
10580         (maintenance_expand_name_matcher)
10581         (maintenance_expand_file_matcher): Delete.
10582         (maintenance_expand_symtabs): Use lambdas.
10583         * symtab.c (iterate_over_some_symtabs): Adjust to use
10584         function_view as callback types and return bool.
10585         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10586         of a cleanup.
10587         (lookup_symtab_callback): Delete.
10588         (lookup_symtab): Use a lambda.
10589         (iterate_over_symbols): Adjust to use function_view as callback
10590         type.
10591         (struct search_symbols_data, search_symbols_file_matches)
10592         (search_symbols_name_matches): Delete.
10593         (search_symbols): Use a pair of lambdas.
10594         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10595         (symtab_expansion_callback): Delete.
10596         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10597         * symtab.h: Include "common/function-view.h".
10598         (iterate_over_some_symtabs): Adjust to use function_view as
10599         callback type and return bool.
10600         (iterate_over_symtabs): Adjust to use function_view as callback
10601         type.
10602         (symbol_found_callback_ftype): Remove 'data' parameter and return
10603         bool.
10604         (iterate_over_symbols): Adjust to use function_view as callback
10605         type.
10606
10607 2017-02-23  Pedro Alves  <palves@redhat.com>
10608
10609         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10610         (%.o) <unittests/%.c>: New pattern.
10611         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10612         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10613         * common/function-view.h: New file.
10614         * unittests/function-view-selftests.c: New file.
10615         * configure: Regenerate.
10616
10617 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10618
10619         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10620         inferior_ptid.
10621         * go32-nat.c (go32_thread_alive): Likewise.
10622
10623 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10624
10625         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10626         delete.
10627
10628 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10629
10630         * varobj.c (varobj_clear_saved_item): Use delete instead of
10631         xfree.
10632         (update_dynamic_varobj_children): Likewise.
10633
10634 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10635
10636         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10637
10638 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10639
10640         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10641         m_enum_value to 0 in default constructor.
10642
10643 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10644
10645         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10646         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10647         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10648         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10649         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10650         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10651         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10652         IS_STORE_CONDITIONAL_INSN.
10653
10654 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10655
10656         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10657
10658 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10659
10660         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10661
10662 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10663
10664         * dwarf2read.c (skip_one_die, read_attribute_value)
10665         (dwarf2_const_value_attr, dump_die_shallow)
10666         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10667         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10668
10669 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10670
10671         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10672         (dwarf_parse_macro_header): Accept DWARF version 5.
10673         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10674
10675 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10676
10677         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10678         DW_AT_GNU_*.
10679         * common/common-exceptions.h (enum errors): Likewise.
10680         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10681         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10682         (dwarf_expr_context::execute_stack_op): Likewise.
10683         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10684         Likewise.
10685         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10686         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10687         (show_entry_values_debug, call_site_to_target_addr)
10688         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10689         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10690         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10691         (value_of_dwarf_block_entry, indirect_pieced_value)
10692         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10693         (disassemble_dwarf_expression): Likewise.
10694         * dwarf2read.c (process_die, inherit_abstract_dies)
10695         (read_call_site_scope): Likewise.
10696         * gdbtypes.h (struct func_type, struct call_site_parameter)
10697         (struct call_site): Likewise.
10698         * stack.c (read_frame_arg): Likewise.
10699         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10700
10701 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10702
10703         * defs.h (read_unsigned_leb128): New declaration.
10704         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10705         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10706         (dwarf2_find_location_expression): Call also
10707         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10708         * dwarf2loc.h (dwarf2_version): New declaration.
10709         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10710         rnglists.
10711         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10712         .debug_rnglists.
10713         (struct dwop_section_names): Add loclists_dwo.
10714         (dwop_section_names): Add .debug_loclists.dwo.
10715         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10716         (struct dwarf2_per_cu_data): Add dwarf_version.
10717         (struct dwo_sections): Add loclists.
10718         (struct attr_abbrev): Add implicit_const.
10719         (read_indirect_line_string): New declaration.
10720         (read_unsigned_leb128): Delete declaration.
10721         (rcuh_kind): New definition.
10722         (read_and_check_comp_unit_head): Change parameter
10723         is_debug_types_section to section_kind.
10724         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10725         (read_comp_unit_head): Change parameter abfd to section, add parameter
10726         section_kind.  Handle DWARF-5.
10727         (error_check_comp_unit_head): Accept also DWARF version 5.
10728         (read_and_check_comp_unit_head): Change parameter
10729         is_debug_types_section to section_kind.
10730         (read_and_check_type_unit_head): Delete function.
10731         (read_abbrev_offset): Handle DWARF-5.
10732         (create_debug_type_hash_table): Add parameter section_kind.  Process
10733         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10734         comp_unit_head.
10735         (create_debug_types_hash_table): Update create_debug_type_hash_table
10736         caller.
10737         (create_all_type_units): Call create_debug_type_hash_table.
10738         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10739         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10740         caller.
10741         (skip_one_die): Handle DW_FORM_implicit_const.
10742         (dwarf2_rnglists_process): New function.
10743         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10744         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10745         (read_attribute_value): Handle DW_FORM_implicit_const,
10746         DW_FORM_line_strp.
10747         (read_attribute): Handle DW_FORM_implicit_const.
10748         (read_indirect_string_at_offset_from): New function from
10749         read_indirect_string_at_offset.
10750         (read_indirect_string_at_offset): Call
10751         read_indirect_string_at_offset_from.
10752         (read_indirect_line_string_at_offset): New function.
10753         (read_indirect_string): New function comment.
10754         (read_indirect_line_string): New function.
10755         (read_unsigned_leb128): Make it global.
10756         (dwarf2_string_attr): Handle DWARF-5.
10757         (add_include_dir_stub, read_formatted_entries): New functions.
10758         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10759         Handle DWARF-5.
10760         (per_cu_header_read_in): Update read_comp_unit_head caller.
10761         (dwarf2_version): New function.
10762         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10763         rnglists.
10764         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10765         fields.
10766
10767 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10768
10769         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10770
10771 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10772
10773         * dwarf2read.c (dwarf2_ranges_process): New function from
10774         dwarf2_ranges_read.
10775         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10776         dwarf2_ranges_process.
10777
10778 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10779
10780         * dwarf2read.c (create_debug_type_hash_table): New function from
10781         create_debug_types_hash_table.
10782         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10783         (create_all_type_units, open_and_init_dwo_file): Update
10784         create_debug_types_hash_table callers.
10785
10786 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10787
10788         PR gdb/16188
10789         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10790         refer to 'ap', not 'args'.
10791
10792 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10793             Pedro Alves  <palves@redhat.com>
10794
10795         PR gdb/16188
10796         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10797         calls succeeded.
10798         * fork-child.c (trace_start_error): New function.
10799         (trace_start_error_with_name): Likewise.
10800         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10801         * inf-ptrace.c (inf_ptrace_me): Likewise.
10802         * inferior.h (trace_start_error): New prototype.
10803         (trace_start_error_with_name): Likewise.
10804
10805 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10806
10807         PR gdb/21164
10808         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10809         NULL before using it.
10810         * symmisc.c (maintenance_print_symbols): Likewise.
10811         (maintenance_print_msymbols): Likewise.
10812
10813 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10814
10815         * NEWS: Add record Python bindings entry.
10816
10817 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10818
10819         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10820         py-record-full.o.
10821         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10822         * python/py-record-btrace.c, python/py-record-btrace.h,
10823         python/py-record-full.c, python/py-record-full.h: New file.
10824         * python/py-record.c: Add include for py-record-btrace.h and
10825         py-record-full.h.
10826         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10827         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10828         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10829         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10830         New definition.
10831         (gdbpy_initialize_btrace): New export.
10832         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10833
10834 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10835
10836         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10837         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10838         * python/py-record.c: New file.
10839         * python/python-internal.h (gdbpy_start_recording,
10840         gdbpy_current_recording, gdpy_stop_recording,
10841         gdbpy_initialize_record): New export.
10842         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10843         (python_GdbMethods): Add gdbpy_start_recording,
10844         gdbpy_current_recording and gdbpy_stop_recording.
10845
10846 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10847
10848         * record-btrace.c (record_btrace_record_method): New function.
10849         (init_record_btrace_ops): Initialize to_record_method.
10850         * record-full.c (record_full_record_method): New function.
10851         (init_record_full_ops, init_record_full_core_ops): Add
10852         record_full_record_method.
10853         * record.h (enum record_method): New enum.
10854         * target-debug.h (target_debug_print_enum_record_method: New define.
10855         * target-delegates.c: Regenerate.
10856         * target.c (target_record_method): New function.
10857         * target.h: Include record.h.
10858         (struct target_ops) <to_record_method>: New field.
10859         (target_record_method): New export.
10860
10861 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10862
10863         * record.h (record_start, record_stop): New export.
10864         * record.c (record_start, record_stop): New function.
10865
10866 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10867
10868         * btrace.c (btrace_fetch): Copy function call segments pointer
10869         into a vector.
10870         (btrace_clear): Clear the vector.
10871         (btrace_find_insn_by_number): Use binary search to find the correct
10872         function call segment.
10873         * btrace.h (brace_fun_p): New typedef.
10874         (struct btrace_thread_info) <functions>: New field.
10875
10876 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10877
10878         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10879         * btrace.c (btrace_decode_error): ... here.  New function.
10880         * btrace.h (btrace_decode_error): New export.
10881
10882 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10883
10884         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10885         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10886         btrace_find_insn_by_number): Remove special case for gaps.
10887         * btrace.h (btrace_insn_get_error): New export.
10888         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10889         * record-btrace.c (btrace_insn_history): Print number for gaps.
10890         (record_btrace_info, record_btrace_goto): Handle gaps.
10891
10892 2017-02-14  Tom Tromey  <tom@tromey.com>
10893
10894         PR python/13598:
10895         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10896         event.
10897         * python/py-evts.c (gdbpy_initialize_py_events): Add
10898         before_prompt registry.
10899         * python/py-events.h (events_object) <before_prompt>: New field.
10900
10901 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
10902
10903         * btrace.c (ftrace_new_switch): Preserve up link and flags.
10904
10905 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
10906
10907         * symfile (_initialize_symfile): Add usage text to the load command's
10908         help text.
10909
10910 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
10911
10912         * utils.c (defaulted_query): Don't query on secondary UIs.
10913
10914 2017-02-10  Tom Tromey  <tom@tromey.com>
10915
10916         * rust-lang.c (rust_get_disr_info): Remove unused variable.
10917
10918 2017-02-10  Tom Tromey  <tom@tromey.com>
10919
10920         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10921         "cleanup" local.
10922         * python/py-type.c (typy_legacy_template_argument): Remove
10923         unnecessary "cleanup" local.
10924
10925 2017-02-10  Tom Tromey  <tom@tromey.com>
10926
10927         * python/python.c (do_start_initialization): New function, from
10928         _initialize_python.
10929         (_initialize_python): Call do_start_initialization.
10930         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10931         goto.
10932
10933 2017-02-10  Tom Tromey  <tom@tromey.com>
10934
10935         * python/py-prettyprint.c (pretty_print_one_value): Use
10936         gdbpy_ref.
10937
10938 2017-02-10  Tom Tromey  <tom@tromey.com>
10939
10940         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10941         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10942         gdbpy_ref.
10943         * python/py-type.c (field_new): Use gdbpy_ref.
10944         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10945         gdbpy_ref.
10946         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10947         (py_free_pspace): Likewise.
10948         (pspace_to_pspace_object): Likewise.
10949         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10950         (py_free_objfile): Likewise.
10951         (objfile_to_objfile_object): Likewise.
10952         * python/py-inferior.c (delete_thread_object): Use
10953         gdbpy_ref.
10954         (infpy_read_memory): Likewise.
10955         (py_free_inferior): Likewise.
10956         * python/py-evtregistry.c (create_eventregistry_object): Use
10957         gdbpy_ref.
10958         * python/py-event.c (create_event_object): Use gdbpy_ref.
10959
10960 2017-02-10  Tom Tromey  <tom@tromey.com>
10961
10962         * python/py-ref.h (gdbpy_ref_policy): Now a template.
10963         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10964         used.
10965         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10966         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10967         python/py-exitedevent.c, python/py-finishbreakpoint.c,
10968         python/py-framefilter.c, python/py-function.c,
10969         python/py-inferior.c, python/py-infevents.c,
10970         python/py-linetable.c, python/py-newobjfileevent.c,
10971         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10972         python/py-signalevent.c, python/py-stopevent.c,
10973         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10974         python/py-unwind.c, python/py-utils.c, python/py-value.c,
10975         python/py-varobj.c, python/py-xmethods.c, python/python.c,
10976         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10977
10978 2017-02-10  Tom Tromey  <tom@tromey.com>
10979
10980         * ui-out.h (ui_out_emit_type): New class.
10981         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10982         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10983         and ui_out_emit_tuple.
10984         (enumerate_locals): Likewise.
10985         (py_mi_print_variables, py_print_locals, py_print_args): Use
10986         ui_out_emit_list.
10987         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10988         ui_out_emit_list.
10989         * common/gdb_optional.h: New file.
10990
10991 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10992
10993         * MAINTAINERS (Write After Approval): Update my e-mail address.
10994
10995 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10996
10997         PR gdb/21122
10998         * breakpoint.c (_initialize_breakpoint): Update the help description
10999         of the 'commands' command to indicate that it takes a list argument.
11000
11001 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11002
11003         * interps.c (current_interp_set_logging): Remove "return".
11004
11005 2017-02-09  Gary Benson  <gbenson@redhat.com>
11006
11007         * symtab.c (add_symtab_completions): Prevent NULL pointer
11008         dereference.
11009
11010 2017-02-08  Pedro Alves  <palves@redhat.com>
11011
11012         * interps.c (interp::interp): Remove reference to quiet_p.
11013         (interp_set): Make static.  Remove dead "Switching to" output
11014         code.
11015         (interp_quiet_p, interp_set_quiet): Delete.
11016         (interpreter_exec_cmd): Don't set the interpreter quiet.
11017         * interps.h (interp_quiet_p): Make static.
11018         (class interp) <quiet_p>: Remove field
11019
11020 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11021
11022         * cli/cli-decode.c (find_command_name_length): Make it extern.
11023         * cli/cli-decode.h (find_command_name_length): Declare.
11024         * cli/cli-script.c (command_name_equals, line_first_arg):
11025         New functions.
11026         (process_next_line): Use cli-decode to parse command names.
11027         (build_command_line): Make args a constant pointer.
11028
11029 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11030
11031         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11032         Remove case-insensitive search.
11033
11034 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11035
11036         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11037         at the end of the line.  Avoids an ARI warning.
11038
11039 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11040
11041         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11042         rdseed instructions.
11043         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11044
11045 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11046
11047         PR tdep/20936
11048         Provide and use sparc32 and sparc64 target description XML files.
11049         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11050         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11051         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11052         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11053         * features/sparc/sparc32-solaris.xml: New file.
11054         * features/sparc/sparc64-solaris.xml: New file.
11055         * features/sparc/sparc32-solaris.c: Generated.
11056         * features/sparc/sparc64-solaris.c: Generated.
11057         * sparc-tdep.h: Account for differences in target descriptions.
11058         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11059         (sparc32_register_type): Use target provided registers.
11060         (validate_tdesc_registers): New function.
11061         (sparc32_gdbarch_init): Use tdesc_has_registers.
11062         Set pseudoregister functions.
11063         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11064         (sparc64_register_type): Use target provided registers.
11065         (sparc64_init_abi): Set pseudoregister functions.
11066
11067 2017-02-03  Tom Tromey  <tom@tromey.com>
11068
11069         PR rust/21097:
11070         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11071         with a single member.
11072
11073 2017-02-03  Pedro Alves  <palves@redhat.com>
11074
11075         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11076         (cli_interp_base::~cli_interp_base): New.
11077         (cli_interp): New struct.
11078         (as_cli_interp): Cast the interp itself to cli_interp.
11079         (cli_interpreter_pre_command_loop): Rename to ...
11080         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11081         parameter.
11082         (cli_interpreter_init): Rename to ...
11083         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11084         boolean.  Make extern.
11085         (cli_interpreter_resume): Rename to ...
11086         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11087         extern.
11088         (cli_interpreter_suspend): Rename to ...
11089         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11090         extern.
11091         (cli_interpreter_exec): Rename to ...
11092         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11093         extern.
11094         (cli_interpreter_supports_command_editing): Rename to ...
11095         (cli_interp_base::supports_command_editing): ... this.  Remove
11096         'interp' parameter.  Make extern.
11097         (cli_ui_out): Rename to ...
11098         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11099         Make extern.
11100         (cli_set_logging): Rename to ...
11101         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11102         parameter.  Make extern.
11103         (cli_interp_procs): Delete.
11104         (cli_interp_factory): Adjust to use "new".
11105         * cli/cli-interp.h: Include "interps.h".
11106         (struct cli_interp_base): New struct.
11107         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11108         (interp_new): Delete.
11109         (interp::interp, interp::~interp): New.
11110         (interp_set): Use bool, and return void.  Assume the interpreter
11111         has suspend, init and resume methods, and that the all return
11112         void.
11113         (set_top_level_interpreter): interp_set returns void.
11114         (interp_ui_out): Adapt.
11115         (current_interp_set_logging): Adapt.
11116         (interp_data): Delete.
11117         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11118         (interp_exec): Adapt.
11119         (top_level_interpreter_data): Delete.
11120         * interps.h (interp_init_ftype, interp_resume_ftype)
11121         (interp_suspend_ftype, interp_exec_ftype)
11122         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11123         (class interp): New.
11124         (interp_new): Delete.
11125         (interp_set): Now returns void.  Use bool.
11126         (interp_data, top_level_interpreter_data): Delete.
11127         * mi/mi-common.h: Include interps.h.
11128         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11129         init, resume, suspect, exec, interp_ui_out, set_logging and
11130         pre_command_loop methods.
11131         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11132         (mi_interpreter_init): Rename to ...
11133         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11134         bool, return void and make extern.  Adjust.
11135         (mi_interpreter_resume): ... Rename to ...
11136         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11137         return void and make extern.  Adjust.
11138         (mi_interpreter_suspend): ... Rename to ...
11139         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11140         return void and make extern.  Adjust.
11141         (mi_interpreter_exec): ... Rename to ...
11142         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11143         extern.  Adjust.
11144         (mi_interpreter_pre_command_loop): ... Rename to ...
11145         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11146         parameter and make extern.
11147         (mi_on_normal_stop_1): Adjust.
11148         (mi_ui_out): Rename to ...
11149         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11150         parameter and make extern.  Adjust.
11151         (mi_set_logging): Rename to ...
11152         (mi_interp::set_logging): ... this.  Remove the 'interp'
11153         parameter and make extern.  Adjust.
11154         (mi_interp_procs): Delete.
11155         (mi_interp_factory): Adjust to use 'new'.
11156         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11157         (mi_print_exception, mi_execute_command, mi_load_progress):
11158         Adjust.
11159         * tui/tui-interp.c (tui_interp): New class.
11160         (as_tui_interp): Return a tui_interp pointer.
11161         (tui_on_normal_stop, tui_on_signal_received)
11162         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11163         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11164         to use interp::interp_ui_out.
11165         (tui_init): Rename to ...
11166         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11167         bool, return void and make extern.  Adjust.
11168         (tui_resume): Rename to ...
11169         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11170         return void and make extern.  Adjust.
11171         (tui_suspend): Rename to ...
11172         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11173         return void and make extern.  Adjust.
11174         (tui_ui_out): Rename to ...
11175         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11176         parameter, and make extern.  Adjust.
11177         (tui_exec): Rename to ...
11178         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11179         make extern.
11180         (tui_interp_procs): Delete.
11181         (tui_interp_factory): Use "new".
11182
11183 2017-02-02  Tom Tromey  <tom@tromey.com>
11184
11185         * rust-exp.y (ends_raw_string, space_then_number)
11186         (rust_identifier_start_p): Return bool.
11187         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11188         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11189         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11190         (rust_chartype_p): Return bool.
11191         (val_print_struct, rust_print_struct_def, rust_print_type):
11192         Update.
11193         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11194         Return bool.
11195
11196 2017-02-02  Tom Tromey  <tom@tromey.com>
11197
11198         * rust-lang.c: Reindent.
11199
11200 2017-02-02  Tom Tromey  <tom@tromey.com>
11201
11202         * rust-lang.h (rust_crate_for_block): Update.
11203         * rust-lang.c (rust_crate_for_block): Return std::string.
11204         (rust_get_disr_info): Use std:;string, not
11205         gdb::unique_xmalloc_ptr.
11206         * rust-exp.y (crate_name): Update.
11207
11208 2017-02-02  Pedro Alves  <palves@redhat.com>
11209
11210         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11211         field out of gdb_disassembler_test and make it static.
11212
11213 2017-02-02  Pedro Alves  <palves@redhat.com>
11214
11215         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11216         mi1_interp and mi_interp fields.
11217
11218 2017-02-02  Pedro Alves  <palves@redhat.com>
11219
11220         * cli/cli-interp.c (struct saved_output_files, saved_output):
11221         Moved from cli/cli-logging.c.
11222         (cli_set_logging): New function.
11223         (cli_interp_procs): Install cli_set_logging.
11224         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11225         Declare.
11226         * cli/cli-logging.c (struct saved_output_files, saved_output):
11227         Moved to cli/cli-interp.c.
11228         (pop_output_files): Don't save outputs here.
11229         (make_logging_output): New function.
11230         (handle_redirections): Don't build tee nor save previous outputs
11231         here.
11232         * interps.c (current_interp_set_logging): Change prototype.
11233         Assume there's always a set_logging_proc method installed.
11234         * interps.h (interp_set_logging_ftype): Change prototype.
11235         (current_interp_set_logging): Change prototype and adjust comment.
11236         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11237         use make_logging_output.
11238         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11239 2017-02-02  Pedro Alves  <palves@redhat.com>
11240
11241         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11242         from ...
11243         (set_logging_overwrite): ... here.
11244         (logging_no_redirect_file): Delete.
11245         (set_logging_redirect): Don't handle redirection on the fly.
11246         Instead warn that "logging off" / "logging on" is necessary.
11247         (pop_output_files): Delete references to logging_no_redirect_file.
11248         (show_logging_command): Always speak in terms of what will happen
11249         once logging is reenabled.
11250
11251 2017-02-02  Pedro Alves  <palves@redhat.com>
11252
11253         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11254
11255 2017-02-02  Pedro Alves  <palves@redhat.com>
11256
11257         * disasm.c (gdb_pretty_print_insn): Rename to ...
11258         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11259         Remove gdbarch parameter.  Adapt to clear the object's buffers
11260         instead of allocating new buffers, and to print using the object's
11261         gdb_disassembler instead of calling gdb_print_insn.
11262         (dump_insns): Use gdb_pretty_print_disassembler.
11263         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11264         (gdb_pretty_print_disassembler): New class.
11265         * record-btrace.c (btrace_insn_history): Use
11266         gdb_pretty_print_disassembler.
11267
11268 2017-02-02  Pedro Alves  <palves@redhat.com>
11269
11270         * ada-lang.c (type_as_string): Use string_file.
11271         * ada-valprint.c (ada_print_floating): Use string_file.
11272         * ada-varobj.c (ada_varobj_scalar_image)
11273         (ada_varobj_get_value_image): Use string_file.
11274         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11275         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11276         * breakpoint.c (update_inserted_breakpoint_locations)
11277         (insert_breakpoint_locations, reattach_breakpoints)
11278         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11279         (print_it_watchpoint): Use string_file.
11280         (save_breakpoints): Use stdio_file.
11281         * c-exp.y (oper): Use string_file.
11282         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11283         tee_file.
11284         (pop_output_files): Use delete.
11285         (handle_redirections): Use stdio_file and tee_file.
11286         * cli/cli-setshow.c (do_show_command): Use string_file.
11287         * compile/compile-c-support.c (c_compute_program): Use
11288         string_file.
11289         * compile/compile-c-symbols.c (generate_vla_size): Take a
11290         'string_file &' instead of a 'ui_file *'.
11291         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11292         of a 'ui_file *'.  Use string_file.
11293         (generate_c_for_variable_locations): Take a 'string_file &'
11294         instead of a 'ui_file *'.
11295         * compile/compile-internal.h (generate_c_for_for_one_variable):
11296         Take a 'string_file &' instead of a 'ui_file *'.
11297         * compile/compile-loc2c.c (push, pushf, unary, binary)
11298         (print_label, pushf_register_address, pushf_register)
11299         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11300         'ui_file *'.  Adjust.
11301         * compile/compile.c (compile_to_object): Use string_file.
11302         * compile/compile.h (compile_dwarf_expr_to_c)
11303         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11304         'ui_file *'.
11305         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11306         (replace_typedefs_qualified_name): Use string_file and
11307         obstack_copy0.
11308         * disasm.c (gdb_pretty_print_insn): Use string_file.
11309         (gdb_disassembly): Adjust reference the null_stream global.
11310         (do_ui_file_delete): Delete.
11311         (gdb_insn_length): Use null_stream.
11312         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11313         * dwarf2loc.c (dwarf2_compile_property_to_c)
11314         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11315         'string_file &' instead of a 'ui_file *'.
11316         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11317         * dwarf2read.c (do_ui_file_peek_last): Delete.
11318         (dwarf2_compute_name): Use string_file.
11319         * event-top.c (gdb_setup_readline): Use stdio_file.
11320         * gdbarch.sh (verify_gdbarch): Use string_file.
11321         * gdbtypes.c (safe_parse_type): Use null_stream.
11322         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11323         string_file.
11324         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11325         'string_file *' instead of a 'ui_file *'.
11326         (gdbscm_arch_disassemble): Use string_file.
11327         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11328         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11329         inherits from ui_file.
11330         (ioscm_file_port_delete, ioscm_file_port_rewind)
11331         (ioscm_file_port_put): Delete.
11332         (ioscm_file_port_write): Rename to ...
11333         (ioscm_file_port::write): ... this.  Remove file_port_magic
11334         checks.
11335         (ioscm_file_port_new): Delete.
11336         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11337         ui_file_up.
11338         * guile/scm-type.c (tyscm_type_name): Use string_file.
11339         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11340         Use string_file.
11341         * infcmd.c (print_return_value_1): Use string_file.
11342         * infrun.c (print_target_wait_results): Use string_file.
11343         * language.c (add_language): Use string_file.
11344         * location.c (explicit_to_string_internal): Use string_file.
11345         * main.c (captured_main_1): Use null_file.
11346         * maint.c (maintenance_print_architecture): Use stdio_file.
11347         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11348         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11349         event_channel>: Change type to mi_console_file pointer.
11350         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11351         (mi_console_file_delete): Delete.
11352         (struct mi_console_file): Delete.
11353         (mi_console_file_magic): Delete.
11354         (mi_console_file_new): Delete.
11355         (mi_console_file::mi_console_file): New.
11356         (mi_console_file_delete): Delete.
11357         (mi_console_file_fputs): Delete.
11358         (mi_console_file::write): New.
11359         (mi_console_raw_packet): Delete.
11360         (mi_console_file::flush): New.
11361         (mi_console_file_flush): Delete.
11362         (mi_console_set_raw): Rename to ...
11363         (mi_console_file::set_raw): ... this.
11364         * mi/mi-console.h (class mi_console_file): New class.
11365         (mi_console_file_new, mi_console_set_raw): Delete.
11366         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11367         (mi_set_logging): Use delete and tee_file.  Adjust.
11368         * mi/mi-main.c (output_register): Use string_file.
11369         (mi_cmd_data_evaluate_expression): Use string_file.
11370         (mi_cmd_data_read_memory): Use string_file.
11371         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11372         * mi/mi-out.c (mi_ui_out::main_stream): New.
11373         (mi_ui_out::rewind): Use main_stream and
11374         string_file.
11375         (mi_ui_out::put): Use main_stream and string_file.
11376         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11377         Allocate a 'string_file' instead.
11378         (mi_out_new): Don't allocate a mem_fileopen stream here.
11379         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11380         (mi_ui_out::main_stream): Declare method.
11381         * printcmd.c (eval_command): Use string_file.
11382         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11383         * python/py-arch.c (archpy_disassemble): Use string_file.
11384         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11385         * python/py-frame.c (frapy_str): Use string_file.
11386         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11387         Use string_file.
11388         * python/py-type.c (typy_str): Use string_file.
11389         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11390         * python/py-value.c (valpy_str): Use string_file.
11391         * record-btrace.c (btrace_insn_history): Use string_file.
11392         * regcache.c (regcache_print): Use stdio_file.
11393         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11394         * remote.c (escape_buffer): Use string_file.
11395         * rust-lang.c (rust_get_disr_info): Use string_file.
11396         * serial.c (serial_open_ops_1): Use stdio_file.
11397         (do_serial_close): Use delete.
11398         * stack.c (print_frame_arg): Use string_file.
11399         (print_frame_args): Remove local mem_fileopen stream, not used.
11400         (print_frame): Use string_file.
11401         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11402         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11403         Take a 'string_file *' instead of a 'ui_file *'.
11404         * top.c (new_ui): Use stdio_file and stderr_file.
11405         (free_ui): Use delete.
11406         (execute_command_to_string): Use string_file.
11407         (quit_confirm): Use string_file.
11408         * tracepoint.c (collection_list::append_exp): Use string_file.
11409         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11410         * tui/tui-file.c: Don't include "ui-file.h".
11411         (enum streamtype, struct tui_stream): Delete.
11412         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11413         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11414         (tui_file::tui_file): New method.
11415         (tui_file_fputs): Delete.
11416         (tui_file_get_strbuf): Delete.
11417         (tui_file::puts): New method.
11418         (tui_file_adjust_strbuf): Delete.
11419         (tui_file_flush): Delete.
11420         (tui_file::flush): New method.
11421         * tui/tui-file.h: Tweak intro comment.
11422         Include ui-file.h.
11423         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11424         (tui_file_adjust_strbuf): Delete declarations.
11425         (class tui_file): New class.
11426         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11427         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11428         (tui_register_format): Use string_stream.
11429         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11430         (tui_get_function_from_frame): Use string_file.
11431         * typeprint.c (type_to_string): Use string_file.
11432         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11433         (null_stream): New global.
11434         (ui_file_delete): Delete.
11435         (ui_file::ui_file): New.
11436         (null_file_isatty): Delete.
11437         (ui_file::~ui_file): New.
11438         (null_file_rewind): Delete.
11439         (ui_file::printf): New.
11440         (null_file_put): Delete.
11441         (null_file_flush): Delete.
11442         (ui_file::putstr): New.
11443         (null_file_write): Delete.
11444         (ui_file::putstrn): New.
11445         (null_file_read): Delete.
11446         (ui_file::putc): New.
11447         (null_file_fputs): Delete.
11448         (null_file_write_async_safe): Delete.
11449         (ui_file::vprintf): New.
11450         (null_file_delete): Delete.
11451         (null_file::write): New.
11452         (null_file_fseek): Delete.
11453         (null_file::puts): New.
11454         (ui_file_data): Delete.
11455         (null_file::write_async_safe): New.
11456         (gdb_flush, ui_file_isatty): Adjust.
11457         (ui_file_put, ui_file_rewind): Delete.
11458         (ui_file_write): Adjust.
11459         (ui_file_write_for_put): Delete.
11460         (ui_file_write_async_safe, ui_file_read): Adjust.
11461         (ui_file_fseek): Delete.
11462         (fputs_unfiltered): Adjust.
11463         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11464         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11465         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11466         (set_ui_file_data): Delete.
11467         (string_file::~string_file, string_file::write)
11468         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11469         (do_ui_file_as_string, ui_file_as_string): Delete.
11470         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11471         (struct mem_file): Delete.
11472         (mem_file_new): Delete.
11473         (stdio_file::stdio_file): New.
11474         (mem_file_delete): Delete.
11475         (stdio_file::stdio_file): New.
11476         (mem_fileopen): Delete.
11477         (stdio_file::~stdio_file): New.
11478         (mem_file_rewind): Delete.
11479         (stdio_file::set_stream): New.
11480         (mem_file_put): Delete.
11481         (stdio_file::open): New.
11482         (mem_file_write): Delete.
11483         (stdio_file_magic, struct stdio_file): Delete.
11484         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11485         (stdio_file::flush): New.
11486         (stdio_file_read): Rename to ...
11487         (stdio_file::read): ... this.  Adjust.
11488         (stdio_file_write): Rename to ...
11489         (stdio_file::write): ... this.  Adjust.
11490         (stdio_file_write_async_safe): Rename to ...
11491         (stdio_file::write_async_safe) ... this.  Adjust.
11492         (stdio_file_fputs): Rename to ...
11493         (stdio_file::puts) ... this.  Adjust.
11494         (stdio_file_isatty): Delete.
11495         (stdio_file_fseek): Delete.
11496         (stdio_file::isatty): New.
11497         (stderr_file_write): Rename to ...
11498         (stderr_file::write) ... this.  Adjust.
11499         (stderr_file_fputs): Rename to ...
11500         (stderr_file::puts) ... this.  Adjust.
11501         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11502         (stderr_file::stderr_file): New.
11503         (tee_file_magic): Delete.
11504         (struct tee_file): Delete.
11505         (tee_file::tee_file): New.
11506         (tee_file_new): Delete.
11507         (tee_file::~tee_file): New.
11508         (tee_file_delete): Delete.
11509         (tee_file_flush): Rename to ...
11510         (tee_file::flush): ... this.  Adjust.
11511         (tee_file_write): Rename to ...
11512         (tee_file::write): ... this.  Adjust.
11513         (tee_file::write_async_safe): New.
11514         (tee_file_fputs): Rename to ...
11515         (tee_file::puts): ... this.  Adjust.
11516         (tee_file_isatty): Rename to ...
11517         (tee_file::isatty): ... this.  Adjust.
11518         * ui-file.h (struct obstack, struct ui_file): Don't
11519         forward-declare.
11520         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11521         (ui_file_write_ftype)
11522         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11523         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11524         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11525         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11526         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11527         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11528         (set_ui_file_fseek): Delete.
11529         (ui_file_data, ui_file_delete, ui_file_rewind)
11530         (struct ui_file): New.
11531         (ui_file_up): New.
11532         (class null_file): New.
11533         (null_stream): Declare.
11534         (ui_file_write_for_put, ui_file_put): Delete.
11535         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11536         Delete.
11537         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11538         (gdb_fopen, tee_file_new): Delete.
11539         (struct string_file): New.
11540         (struct stdio_file): New.
11541         (stdio_file_up): New.
11542         (struct stderr_file): New.
11543         (class tee_file): New.
11544         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11545         of a 'ui_file *'.  Adjust.
11546         * ui-out.h (class ui_out) <field_stream>: Likewise.
11547         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11548         (null_stream): Delete.
11549         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11550         Adjust.
11551         * utils.h (struct ui_file): Delete forward declaration..
11552         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11553         (error_stream): Take a 'string_file &' instead of a
11554         'ui_file *'.
11555         * varobj.c (varobj_value_get_print_value): Use string_file.
11556         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11557         * gdbarch.c: Regenerate.
11558
11559 2017-02-02  Pedro Alves  <palves@redhat.com>
11560
11561         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11562         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11563         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11564         Adjust to call gdb_print_insn instead of
11565         gdb_disassembler::print_insn.
11566         (dump_insns, do_mixed_source_and_assembly_deprecated)
11567         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11568         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11569         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11570         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11571         declaration.
11572         (gdb_pretty_print_insn): Re-add declaration.
11573         * record-btrace.c (btrace_insn_history): Don't allocate a
11574         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11575
11576 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11577
11578         * disasm.h (gdb_disassembly): Remove file_string parameter.
11579         * disasm.c (gdb_disassembly): Likewise.
11580         * cli/cli-cmds.c (print_disassembly): Adapt.
11581         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11582         * stack.c (do_gdb_disassembly): Likewise.
11583
11584 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11585
11586         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11587         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11588         targets.  And if the implicit value is longer than needed, extract
11589         the first bytes instead of the "least significant" ones.
11590
11591 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11592
11593         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11594         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11595         (btrace_fetch): Assert can_access_registers_ptid.
11596         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11597         validate_registers_access.
11598
11599 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11600
11601         * gdbthread.h (can_access_registers_ptid): New.
11602         * thread.c (can_access_registers_ptid): New.
11603
11604 2017-02-01  Pedro Alves  <palves@redhat.com>
11605
11606         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11607
11608 2017-01-31  Pedro Alves  <palves@redhat.com>
11609
11610         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11611         Fix typos.
11612
11613 2017-01-31  Pedro Alves  <palves@redhat.com>
11614
11615         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11616         not used.
11617
11618 2017-01-31  Pedro Alves  <palves@redhat.com>
11619
11620         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11621
11622 2017-01-31  Pedro Alves  <palves@redhat.com>
11623
11624         * common/scoped_restore.h
11625         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11626         change the value's parameter type to T2.
11627         (make_scoped_restore): Likewise.
11628
11629 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11630             Richard Henderson  <rth@redhat.com>
11631
11632         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11633         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11634         GS_BASE for older kernels.
11635         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11636         GS_BASE for older kernels.
11637         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11638         and GS_BASE to the offset table.
11639         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11640         system register group.
11641         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11642         for older kernels.
11643         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11644         amd64 ABI.
11645         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11646         AMD64_GSBASE_REGNUM.
11647         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11648         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11649         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11650         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11651         i386/64bit-segments.xml in those rules.
11652         * features/i386/64bit-segments.xml: New file.
11653         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11654         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11655         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11656         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11657         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11658         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11659         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11660         * features/i386/amd64-avx-linux.c: Regenerated.
11661         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11662         * features/i386/amd64-avx-mpx.c: Regenerated.
11663         * features/i386/amd64-avx512-linux.c: Regenerated.
11664         * features/i386/amd64-linux.c: Regenerated.
11665         * features/i386/amd64-mpx-linux.c: Regenerated.
11666         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11667         * features/i386/i386-avx-mpx.c: Regenerated.
11668         * features/i386/x32-avx-linux.c: Regenerated.
11669         * features/i386/x32-avx512-linux.c: Regenerated.
11670         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11671         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11672         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11673         * regformats/i386/amd64-linux.dat: Regenerated.
11674         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11675         * regformats/i386/x32-avx-linux.dat: Regenerated.
11676         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11677         * regformats/i386/x32-linux.dat: Regenerated.
11678
11679 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11680
11681         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11682         Set to AMD64_NUM_REGS.
11683
11684 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11685
11686         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11687         that checks validity of a register number.
11688
11689 2017-01-27  Kees Cook  <keescook@google.com>
11690
11691         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11692         fetch_fpregs if target has fpa registers.
11693         (arm_linux_store_inferior_registers): Call store_fpregs if target
11694         has fpa registers.
11695
11696 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11697
11698         * cris-tdep.c (cris_gdbarch_init): Remove check for
11699         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11700
11701 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11702
11703         * corelow.c (get_core_register_section): Check for regset
11704         existence before checking for REGSET_VARIABLE_SIZE.
11705
11706 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11707             Pedro Alves  <palves@redhat.com>
11708
11709         PR gdb/20939
11710         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11711         call memory_error, save memaddr instead.
11712         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11713         negative, cal memory_error.
11714         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11715
11716 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11717
11718         * disasm-selftests.c (memory_error_test): New function.
11719         (_initialize_disasm_selftests): Register memory_error_test.
11720
11721 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11722
11723         * Makefile.in (SFILES): Add disasm-selftests.c and
11724         selftest-arch.c.
11725         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11726         * disasm-selftests.c: New file.
11727         * selftest-arch.c: New file.
11728         * selftest-arch.h: New file.
11729
11730 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11731
11732         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11733         to bfd_arch_mep.  Don't return 0 if section is not
11734         found.  Call print_insn_mep.
11735
11736 2017-01-26  Pedro Alves  <palves@redhat.com>
11737             Yao Qi  <yao.qi@linaro.org>
11738
11739         * arm-tdep.c: Include "disasm.h".
11740         (gdb_print_insn_arm): Update code to get gdbarch.
11741         * disasm.c (dis_asm_read_memory): Change it to
11742         gdb_disassembler::dis_asm_read_memory.
11743         (dis_asm_memory_error): Likewise.
11744         (dis_asm_print_address): Likewise.
11745         (gdb_pretty_print_insn): Change it to
11746         gdb_disassembler::pretty_print_insn.
11747         (dump_insns): Add one argument gdb_disassemlber.  All
11748         callers updated.
11749         (do_mixed_source_and_assembly_deprecated): Likewise.
11750         (do_mixed_source_and_assembly): Likewise.
11751         (do_assembly_only): Likewise.
11752         (gdb_disassembler::gdb_disassembler): New.
11753         (gdb_disassembler::print_insn): New.
11754         * disasm.h (class gdb_disassembler): New.
11755         (gdb_pretty_print_insn): Remove declaration.
11756         (gdb_disassemble_info): Likewise.
11757         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11758         (gdbscm_disasm_read_memory_worker): Update.
11759         (gdbscm_disasm_read_memory): Update.
11760         (gdbscm_disasm_memory_error): Remove.
11761         (gdbscm_disasm_print_address): Remove.
11762         (gdbscm_disassembler::gdbscm_disassembler): New.
11763         (gdbscm_print_insn_from_port): Update.
11764         * mips-tdep.c: Include disasm.h.
11765         (gdb_print_insn_mips): Update code to get gdbarch.
11766         * record-btrace.c (btrace_insn_history): Update.
11767         * spu-tdep.c: Include disasm.h.
11768         (struct spu_dis_asm_data): Remove.
11769         (struct spu_dis_asm_info): New.
11770         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11771         SPU id.
11772         (gdb_print_insn_spu): Cast disassemble_info to
11773         spu_dis_asm_info.
11774
11775 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11776
11777         * disasm.c (do_ui_file_delete): Delete.
11778         (gdb_insn_length): Move code creating stream to ...
11779         * utils.c (null_stream): ... here.  New function.
11780         * utils.h (null_stream): Declare.
11781
11782 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11783
11784         * python/py-inferior.c (find_thread_object): Return directly
11785         from the loop.  Remove "found" variable.
11786
11787 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11788
11789         GDB 7.12.1 released.
11790
11791 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11792
11793         * python/py-function.c (fnpy_call): Reorder declarations to have
11794         the gdbpy_enter object declared first.
11795         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11796
11797 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11798
11799         PR python/21068
11800         * python/python-internal.h (PyMem_RawMalloc): Define for
11801         Python < 3.4.
11802         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11803         PyMem_RawMalloc instead of PyMem_Malloc.
11804
11805 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11806             Luis Machado  <lgustavo@codesourcery.com>
11807
11808         * NEWS (New commands): Mention flash-erase.
11809         (New MI commands): Mention target-flash-erase.
11810         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11811         command.
11812         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11813         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11814         * target.c (flash_erase_command): New function.
11815         (initialize_targets): Add new flash-erase command.
11816         * target.h (flash_erase_command): New declaration.
11817
11818 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11819
11820         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11821         HAVE_SYS_PROCFS_H is defined.
11822
11823 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11824
11825         * remote.c (struct cached_reg): Change data into a pointer.
11826         * (stop_reply_dtr): Free data pointers before deleting vector.
11827         (process_stop_reply): Likewise.
11828         (remote_parse_stop_reply): Allocate space for data
11829
11830 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11831
11832         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11833         MAX_REGISTER_SIZE.
11834         (amd64_pseudo_register_read_value): Likewise.
11835         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11836         (store_register_using_P): Likewise.
11837         * regcache.c (regcache_xfer_part): Likewise.
11838
11839 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11840
11841         Split real and pseudo registers.
11842         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11843         (sparc32_pseudo_regnum): New enum.
11844         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11845         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11846         (SPARC32_CP0_REGISTERS): New macro.
11847         (sparc32_pseudo_register_name): New function.
11848         (sparc32_register_name): Use sparc32_pseudo_register_name.
11849         (sparc32_pseudo_register_type): New function.
11850         (sparc32_register_type): Use sparc32_pseudo_register_type.
11851         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11852         pseudo register numbers.
11853         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11854         (SPARC64_CP0_REGISTERS): New macro.
11855         (sparc64_pseudo_register_name): New function.
11856         (sparc64_register_name): Use sparc64_pseudo_register_name.
11857         (sparc64_pseudo_register_type): New function.
11858         (sparc64_register_type): Use sparc64_pseudo_register_type.
11859         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11860         pseudo register numbers.
11861         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11862         sparc64_store_arguments): Handle pseudo register numbers.
11863
11864 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11865
11866         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11867         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11868         output.
11869         (getpkt_or_notif_sane_1): Likewise.
11870
11871 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11872
11873         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11874         of CC.  Pass "-x c++-header" instead of "-x c".
11875
11876 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11877
11878         * remote.c (remote_can_async_p): Update comment.
11879
11880 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11881
11882         * linux-nat.c (linux_nat_can_async_p): Update comment.
11883
11884 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11885
11886         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11887
11888 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
11889
11890         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11891
11892 2017-01-10  Tom Tromey  <tom@tromey.com>
11893
11894         * python/py-type.c (typy_legacy_template_argument): Update.
11895         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11896         ~demangle_parse_info): Declare new members.
11897         (cp_demangled_name_to_comp): Return unique_ptr.
11898         (cp_demangled_name_parse_free)
11899         (make_cleanup_cp_demangled_name_parse_free)
11900         (cp_new_demangle_parse_info): Remove.
11901         * cp-support.c (do_demangled_name_parse_free_cleanup)
11902         (make_cleanup_cp_demangled_name_parse_free): Remove.
11903         (inspect_type, cp_canonicalize_string_full)
11904         (cp_canonicalize_string): Update.
11905         (mangled_name_to_comp): Change return type.
11906         (cp_class_name_from_physname, method_name_from_physname)
11907         (cp_func_name, cp_remove_params): Update.
11908         * cp-name-parser.y (demangle_parse_info): New constructor, from
11909         cp_new_demangle_parse_info.
11910         (~demangle_parse_info): New destructor, from
11911         cp_demangled_name_parse_free.
11912         (cp_merge_demangle_parse_infos): Update.
11913         (cp_demangled_name_to_comp): Change return type.
11914
11915 2017-01-10  Tom Tromey  <tom@tromey.com>
11916
11917         * top.c (prevent_dont_repeat): Change return type.
11918         * python/python.c (execute_gdb_command): Use std::string.
11919         Update.
11920         * guile/guile.c (gdbscm_execute_gdb_command): Update.
11921         * command.h (prevent_dont_repeat): Change return type.
11922         * breakpoint.c (bpstat_do_actions_1): Update.
11923
11924 2017-01-10  Tom Tromey  <tom@tromey.com>
11925
11926         * value.h (scoped_value_mark::~scoped_value_mark): Call
11927         free_to_mark.
11928         (scoped_value_mark::free_to_mark): New method.
11929         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11930         scoped_value_mark.
11931
11932 2017-01-10  Tom Tromey  <tom@tromey.com>
11933
11934         * python/py-value.c (valpy_dereference, valpy_referenced_value)
11935         (valpy_reference_value, valpy_const_value, valpy_get_address)
11936         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11937         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11938         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11939         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11940         scoped_value_mark.
11941         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11942         * value.h (scoped_value_mark): New class.
11943
11944 2017-01-10  Tom Tromey  <tom@tromey.com>
11945
11946         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11947         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11948         * psymtab.c (discard_psymtabs_upto): Remove.
11949         (make_cleanup_discard_psymtabs): Remove.
11950         (struct psymtab_state): Remove.
11951
11952 2017-01-10  Tom Tromey  <tom@tromey.com>
11953
11954         * record-full.c (record_full_save_cleanups): Remove.
11955         (record_full_save): Use gdb::unlinker.
11956         * gcore.c (do_bfd_delete_cleanup): Remove.
11957         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
11958         cleanups.
11959         * dwarf2read.c (unlink_if_set): Remove.
11960         (write_psymtabs_to_index): Use gdb::unlinker.
11961         * common/gdb_unlinker.h: New file.
11962
11963 2017-01-10  Tom Tromey  <tom@tromey.com>
11964
11965         * windows-tdep.c (windows_xfer_shared_library): Update.
11966         * windows-nat.c (windows_make_so): Update.
11967         * utils.h (make_cleanup_bfd_unref): Remove.
11968         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11969         * symfile.h (symfile_bfd_open)
11970         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11971         * symfile.c (read_symbols, symbol_file_add)
11972         (separate_debug_file_exists): Update.
11973         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11974         (generic_load, reread_symbols): Update.
11975         * symfile-mem.c (symbol_file_add_from_memory): Update.
11976         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11977         (spu_symbol_file_add_from_memory): Update.
11978         * solist.h (struct target_so_ops) <bfd_open>: Return
11979         gdb_bfd_ref_ptr.
11980         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11981         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11982         gdb_bfd_ref_ptr.
11983         (solib_map_sections, reload_shared_libraries_1): Update.
11984         * solib-svr4.c (enable_break): Update.
11985         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11986         * solib-frv.c (enable_break2): Update.
11987         * solib-dsbt.c (enable_break): Update.
11988         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11989         gdb_bfd_ref_ptr.
11990         (darwin_solib_get_all_image_info_addr_at_init): Update.
11991         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11992         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11993         * record-full.c (record_full_save): Update.
11994         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11995         * procfs.c (insert_dbx_link_bpt_in_file): Update.
11996         * minidebug.c (find_separate_debug_file_in_section): Return
11997         gdb_bfd_ref_ptr.
11998         * machoread.c (macho_add_oso_symfile): Change abfd to
11999         gdb_bfd_ref_ptr.
12000         (macho_symfile_read_all_oso): Update.
12001         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12002         (macho_symfile_read): Update.
12003         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12004         (jit_bfd_try_read_symtab): Update.
12005         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12006         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12007         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12008         gdb_bfd_ref_ptr.
12009         (gdb_bfd_ref_policy): New struct.
12010         (gdb_bfd_ref_ptr): New typedef.
12011         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12012         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12013         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12014         gdb_bfd_ref_ptr.
12015         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12016         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12017         (gcore_command): Update.
12018         * exec.c (exec_file_attach): Update.
12019         * elfread.c (elf_symfile_read): Update.
12020         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12021         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12022         (open_and_init_dwo_file): Update.
12023         (open_dwp_file): Return gdb_bfd_ref_ptr.
12024         (open_and_init_dwp_file): Update.
12025         * corelow.c (core_open): Update.
12026         * compile/compile-object-load.c (compile_object_load): Update.
12027         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12028         * coffread.c (coff_symfile_read): Update.
12029         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12030         gdb_bfd_ref_ptr.  Rename.
12031         (dump_bfd_file, restore_command): Update.
12032         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12033         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12034         (find_separate_debug_file_by_buildid): Update.
12035
12036 2017-01-10  Tom Tromey  <tom@tromey.com>
12037
12038         * common/gdb_ref_ptr.h: New file.
12039         * python/py-ref.h (struct gdbpy_ref_policy): New.
12040         (gdbpy_ref): Now a typedef.
12041
12042 2017-01-10  Tom Tromey  <tom@tromey.com>
12043
12044         * utils.h (make_cleanup_htab_delete): Don't declare.
12045         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12046         Remove.
12047         * linespec.c (decode_compound_collector): Add constructor,
12048         destructor.
12049         (lookup_prefix_sym): Remove cleanup.
12050         (symtab_collector): Add constructor, destructor.
12051         (collect_symtabs_from_filename): Remove cleanup.
12052         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12053         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12054         Use htab_up.
12055         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12056         * dwarf2read.c (dw2_expand_symtabs_matching)
12057         (dw2_map_symbol_filenames, dwarf_decode_macros)
12058         (write_psymtabs_to_index): Use htab_up.
12059         * dwarf2loc.c (func_verify_no_selftailcall)
12060         (call_site_find_chain_1, func_verify_no_selftailcall)
12061         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12062         std::vector, gdb::unique_xmalloc_ptr.
12063         (call_sitep): Remove typedef.
12064         (dwarf2_locexpr_baton_eval): Remove unused variable.
12065
12066 2017-01-10  Tom Tromey  <tom@tromey.com>
12067
12068         * python/python-internal.h (make_cleanup_py_decref)
12069         (make_cleanup_py_xdecref): Don't declare.
12070         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12071         (py_xdecref, make_cleanup_py_xdecref): Remove.
12072
12073 2017-01-10  Tom Tromey  <tom@tromey.com>
12074
12075         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12076         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12077
12078 2017-01-10  Tom Tromey  <tom@tromey.com>
12079
12080         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12081
12082 2017-01-10  Tom Tromey  <tom@tromey.com>
12083
12084         * python/py-utils.c (unicode_to_encoded_string)
12085         (python_string_to_target_string)
12086         (python_string_to_target_python_string)
12087         (python_string_to_host_string, gdbpy_obj_to_string)
12088         (get_addr_from_python): Use gdbpy_ref.
12089
12090 2017-01-10  Tom Tromey  <tom@tromey.com>
12091
12092         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12093         gdbpy_ref.
12094
12095 2017-01-10  Tom Tromey  <tom@tromey.com>
12096
12097         * python/python.c (eval_python_command, gdbpy_decode_line)
12098         (gdbpy_run_events, gdbpy_start_type_printers)
12099         (gdbpy_apply_type_printers): Use gdbpy_ref.
12100
12101 2017-01-10  Tom Tromey  <tom@tromey.com>
12102
12103         * python/py-param.c (get_doc_string, compute_enum_values): Use
12104         gdbpy_ref.
12105
12106 2017-01-10  Tom Tromey  <tom@tromey.com>
12107
12108         * python/py-inferior.c (find_thread_object, build_inferior_list):
12109         Use gdbpy_ref.
12110
12111 2017-01-10  Tom Tromey  <tom@tromey.com>
12112
12113         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12114
12115 2017-01-10  Tom Tromey  <tom@tromey.com>
12116
12117         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12118         gdbpy_ref.
12119
12120 2017-01-10  Tom Tromey  <tom@tromey.com>
12121
12122         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12123         extra incref.
12124         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12125         Use gdbpy_ref.
12126
12127 2017-01-10  Tom Tromey  <tom@tromey.com>
12128
12129         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12130         gdbpy_ref.
12131
12132 2017-01-10  Tom Tromey  <tom@tromey.com>
12133
12134         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12135         decref results of PyArg_ParseTupleAndKeywords.
12136
12137 2017-01-10  Tom Tromey  <tom@tromey.com>
12138
12139         * python/python.c (python_run_simple_file): Use
12140         unique_xmalloc_ptr, gdbpy_ref.
12141
12142 2017-01-10  Tom Tromey  <tom@tromey.com>
12143
12144         * python/py-prettyprint.c (print_stack_unless_memory_error)
12145         (print_string_repr, print_children): Use gdbpy_ref.
12146         (dummy_python_frame): New class.
12147         (dummy_python_frame::dummy_python_frame): Rename from
12148         push_dummy_python_frame.
12149         (py_restore_tstate): Remove.
12150
12151 2017-01-10  Tom Tromey  <tom@tromey.com>
12152
12153         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12154
12155 2017-01-10  Tom Tromey  <tom@tromey.com>
12156
12157         * python/python.c (ensure_python_env, restore_python_env):
12158         Remove.
12159         * python/python-internal.h (ensure_python_env): Don't declare.
12160         * varobj.h (varobj_ensure_python_env): Don't declare.
12161         * varobj.c (varobj_ensure_python_env): Remove.
12162
12163 2017-01-10  Tom Tromey  <tom@tromey.com>
12164
12165         * varobj.c (varobj_value_get_print_value): Use
12166         gdbpy_enter_varobj.
12167
12168 2017-01-10  Tom Tromey  <tom@tromey.com>
12169
12170         * python/py-prettyprint.c (print_string_repr, print_children):
12171         Update.
12172         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12173         of "encoding".
12174         * varobj.c (varobj_value_get_print_value): Update.
12175         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12176
12177 2017-01-10  Tom Tromey  <tom@tromey.com>
12178
12179         * varobj.c (varobj_get_display_hint)
12180         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12181         (varobj_set_visualizer, free_variable): Use
12182         gdbpy_enter_varobj.
12183
12184 2017-01-10  Tom Tromey  <tom@tromey.com>
12185
12186         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12187         (do_finish_initialization): New function.  Use gdbpy_ref.
12188         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12189         do_finish_initialization.
12190
12191 2017-01-10  Tom Tromey  <tom@tromey.com>
12192
12193         * python/py-param.c (get_set_value, get_show_value): Use
12194         gdbpy_enter, gdbpy_ref.
12195
12196 2017-01-10  Tom Tromey  <tom@tromey.com>
12197
12198         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12199
12200 2017-01-10  Tom Tromey  <tom@tromey.com>
12201
12202         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12203
12204 2017-01-10  Tom Tromey  <tom@tromey.com>
12205
12206         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12207         Use gdbpy_enter_varobj.
12208
12209 2017-01-10  Tom Tromey  <tom@tromey.com>
12210
12211         * varobj.c (gdbpy_enter_varobj): New constructor.
12212         * python/python-internal.h (gdbpy_enter_varobj): New class.
12213         * python/py-varobj.c (py_varobj_get_iterator): Use
12214         gdbpy_enter_varobj.
12215
12216 2017-01-10  Tom Tromey  <tom@tromey.com>
12217
12218         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12219         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12220         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12221         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12222         unique_xmalloc_ptr.
12223         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12224
12225 2017-01-10  Tom Tromey  <tom@tromey.com>
12226
12227         * python/py-xmethods.c (invoke_match_method): Use
12228         gdbpy_ref.
12229
12230 2017-01-10  Tom Tromey  <tom@tromey.com>
12231
12232         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12233         gdbpy_enter, gdbpy_ref.
12234
12235 2017-01-10  Tom Tromey  <tom@tromey.com>
12236
12237         * python/python.c (python_interactive_command): Use gdbpy_enter.
12238
12239 2017-01-10  Tom Tromey  <tom@tromey.com>
12240
12241         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12242         gdbpy_ref.
12243
12244 2017-01-10  Tom Tromey  <tom@tromey.com>
12245
12246         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12247         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12248
12249 2017-01-10  Tom Tromey  <tom@tromey.com>
12250
12251         * utils.h (htab_deleter): New struct.
12252         (htab_up): New typedef.
12253         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12254         gdbpy_enter, gdbpy_ref, htab_up.
12255
12256 2017-01-10  Tom Tromey  <tom@tromey.com>
12257
12258         * python/py-unwind.c (pending_frame_invalidate): Remove.
12259         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12260
12261 2017-01-10  Tom Tromey  <tom@tromey.com>
12262
12263         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12264         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12265
12266 2017-01-10  Tom Tromey  <tom@tromey.com>
12267
12268         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12269
12270 2017-01-10  Tom Tromey  <tom@tromey.com>
12271
12272         * python/python.c (gdbpy_eval_from_control_command)
12273         (gdbpy_source_script, gdbpy_run_events)
12274         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12275         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12276         gdbpy_enter.
12277
12278 2017-01-10  Tom Tromey  <tom@tromey.com>
12279
12280         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12281
12282 2017-01-10  Tom Tromey  <tom@tromey.com>
12283
12284         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12285
12286 2017-01-10  Tom Tromey  <tom@tromey.com>
12287
12288         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12289         (python_on_inferior_call_pre, python_on_inferior_call_post)
12290         (python_on_memory_change, python_on_register_change)
12291         (python_inferior_exit, python_new_objfile, add_thread_object)
12292         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12293
12294 2017-01-10  Tom Tromey  <tom@tromey.com>
12295
12296         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12297         (bpfinishpy_handle_exit): Use gdbpy_enter.
12298
12299 2017-01-10  Tom Tromey  <tom@tromey.com>
12300
12301         * python/py-cmd.c (cmdpy_destroyer)
12302         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12303         gdbpy_enter.
12304
12305 2017-01-10  Tom Tromey  <tom@tromey.com>
12306
12307         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12308         gdbpy_enter.
12309         (gdbpy_breakpoint_has_cond): Likewise.
12310
12311 2017-01-10  Tom Tromey  <tom@tromey.com>
12312
12313         * python/python.c (gdbpy_enter): New constructor.
12314         (~gdbpy_enter): New destructor.
12315         (restore_python_env, ensure_python_env): Rewrite.
12316         * python/python-internal.h (gdbpy_enter): New class.
12317
12318 2017-01-10  Tom Tromey  <tom@tromey.com>
12319
12320         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12321
12322 2017-01-10  Tom Tromey  <tom@tromey.com>
12323
12324         * python/py-value.c (value_has_field, get_field_flag)
12325         (get_field_type, valpy_getitem, convert_value_from_python): Use
12326         gdbpy_ref.
12327
12328 2017-01-10  Tom Tromey  <tom@tromey.com>
12329
12330         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12331         gdbpy_ref.
12332
12333 2017-01-10  Tom Tromey  <tom@tromey.com>
12334
12335         * python/py-prettyprint.c (search_pp_list)
12336         (find_pretty_printer_from_objfiles)
12337         (find_pretty_printer_from_progspace)
12338         (find_pretty_printer_from_gdb, find_pretty_printer)
12339         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12340         gdbpy_ref.
12341
12342 2017-01-10  Tom Tromey  <tom@tromey.com>
12343
12344         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12345
12346 2017-01-10  Tom Tromey  <tom@tromey.com>
12347
12348         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12349         (ltpy_get_all_source_lines): Use gdbpy_ref.
12350
12351 2017-01-10  Tom Tromey  <tom@tromey.com>
12352
12353         * python/py-framefilter.c (extract_sym, extract_value)
12354         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12355         gdbpy_ref.
12356
12357 2017-01-10  Tom Tromey  <tom@tromey.com>
12358
12359         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12360
12361 2017-01-10  Tom Tromey  <tom@tromey.com>
12362
12363         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12364
12365 2017-01-10  Tom Tromey  <tom@tromey.com>
12366
12367         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12368         gdbpy_ref.
12369
12370 2017-01-10  Tom Tromey  <tom@tromey.com>
12371
12372         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12373
12374 2017-01-10  Tom Tromey  <tom@tromey.com>
12375
12376         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12377         (typy_range): Use gdbpy_ref.
12378
12379 2017-01-10  Tom Tromey  <tom@tromey.com>
12380
12381         * python/py-threadevent.c (create_thread_event_object): Use
12382         gdbpy_ref.
12383         * python/py-stopevent.c (create_stop_event_object): Simplify.
12384         (emit_stop_event): Use gdbpy_ref.
12385         * python/py-signalevent.c (create_signal_event_object): Use
12386         gdbpy_ref.
12387         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12388         (emit_new_objfile_event, create_clear_objfiles_event_object)
12389         (emit_clear_objfiles_event): Use gdbpy_ref.
12390         * python/py-infevents.c (create_inferior_call_event_object)
12391         (create_register_changed_event_object)
12392         (create_memory_changed_event_object, emit_inferior_call_event)
12393         (emit_memory_changed_event, emit_register_changed_event): Use
12394         gdbpy_ref.
12395         * python/py-exitedevent.c (create_exited_event_object)
12396         (emit_exited_event): Use gdbpy_ref.
12397         * python/py-event.h (evpy_emit_event): Remove
12398         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12399         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12400         * python/py-continueevent.c (emit_continue_event): Use
12401         gdbpy_ref.
12402         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12403         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12404         gdbpy_ref.
12405         * python/py-bpevent.c (create_breakpoint_event_object): Use
12406         gdbpy_ref.
12407
12408 2017-01-10  Tom Tromey  <tom@tromey.com>
12409
12410         * python/py-ref.h: New file.
12411
12412 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12413
12414         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12415         void.
12416         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12417         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12418         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12419         * ui-out.c (ui_out::redirect): Likewise.
12420         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12421         * cli/cli-logging.c (set_logging_redirect): Update call site of
12422         ui_out::redirect.
12423         (handle_redirections): Likewise.
12424         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12425         * top.c (execute_command_to_string): Likewise.
12426         * utils.c (do_ui_out_redirect_pop): Likewise.
12427
12428 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12429
12430         * stack.c (_initialize_stack): Update "frame" command help message.
12431
12432 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12433
12434         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12435
12436 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12437
12438         * x86-linux-nat.h: Include gdb_proc_service.h.
12439
12440 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12441
12442         * ser-base.h: Include serial.h.
12443
12444 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12445
12446         * ppc-linux-tdep.h: Include ppc-tdep.h.
12447
12448 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12449
12450         * nat/amd64-linux-siginfo.h: Include signal.h.
12451
12452 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12453
12454         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12455
12456 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12457
12458         * mi/mi-parse.h: Include mi-cmds.h.
12459
12460 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12461
12462         * inf-loop.c: Don't include "target.h".
12463         * inf-loop.h: Include it here.
12464
12465 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12466
12467         * dfp.h: Include "dboulest.h" and "expression.h".
12468
12469 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12470
12471         * ax-gdb.h: Include "ax.h".
12472
12473 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12474
12475         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12476         with nat/gdb_ptrace.h.
12477
12478 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12479
12480         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12481         new line.
12482         (mips64_fbsd_sigframe_init): Likewise.
12483
12484 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12485
12486         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12487         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12488
12489 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12490
12491         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12492         * NEWS: Mention new FreeBSD/mips native configuration.
12493         * config/mips/fbsd.mh: New file.
12494         * configure.host: Add mips*-*-freebsd*.
12495         * mips-fbsd-nat.c: New file.
12496
12497 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12498
12499         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12500         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12501         * NEWS: Mention new FreeBSD/mips target.
12502         * configure.tgt: Add mips*-*-freebsd*.
12503         * mips-fbsd-tdep.c: New file.
12504         * mips-fbsd-tdep.h: New file.
12505
12506 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12507
12508         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12509         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12510
12511 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12512
12513         Update copyright year range in all GDB files.
12514
12515 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12516
12517         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12518
12519 For older changes see ChangeLog-2016.
12520 \f
12521 Local Variables:
12522 mode: change-log
12523 left-margin: 8
12524 fill-column: 74
12525 version-control: never
12526 coding: utf-8
12527 End: