Use std::vector for symtab_fns
[external/binutils.git] / gdb / ChangeLog
1 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * symfile.c (registered_sym_fns): Make struct, not typedef.
4         (DEF_VEC_O (registered_sym_fns)): Remove.
5         (symtab_fns): Change type to std::vector.
6         (add_symtab_fns): Adjust.
7         (find_sym_fns): Adjust.
8
9 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
10
11         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
12         * arc-tdep.h (arc_arch_is_em): New function.
13         (arc_arch_is_hs): Likewise.
14
15 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
16
17         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
18         parentheses in the declaration.
19         (macro_lookup_inclusion): Likewise.
20         (macro_lookup_definition): Likewise.
21         * p-lang.h (pascal_builtin_types): Likewise.
22         * tui/tui-data.c (tui_win_list): Likewise.
23         * tui/tui-data.h (tui_win_list): Likewise.
24         * utils.h (make_cleanup_free_section_addr_info): Likewise.
25
26 2017-10-11  Mark Rages  <markrages@gmail.com>
27
28         * target-memory.c (block_boundaries): Fix for block address not
29         aligned on block size.
30
31 2017-10-10  Pedro Alves <palves@redhat.com>
32             Tom Tromey  <tom@tromey.com>
33
34         * breakpoint.c (struct captured_breakpoint_query_args)
35         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
36         (print_breakpoint): New.
37         * breakpoint.h (print_breakpoint): Declare.
38         * common/common-exceptions.h (enum return_reason): Remove
39         references to catch_exceptions.
40         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
41         Delete.
42         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
43         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
44         * gdb.h: Delete.
45         * gdbthread.h (thread_select): Declare.
46         * mi/mi-cmd-break.c: Don't include gdb.h.
47         (breakpoint_notify): Use print_breakpoint.
48         * mi/mi-cmd-catch.c: Don't include gdb.h.
49         * mi/mi-interp.c: Don't include gdb.h.
50         (mi_print_breakpoint_for_event): New.
51         (mi_breakpoint_created, mi_breakpoint_modified): Use
52         mi_print_breakpoint_for_event.
53         * mi/mi-main.c: Don't include gdb.h.
54         (mi_cmd_thread_select): Parse the global thread ID here.  Use
55         thread_select instead of gdb_thread_select.
56         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
57         of using gdb_list_thread_ids.
58         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
59         FILEIO_ENOSYS here.
60         (remote_fileio_request): Use TRY/CATCH instead of
61         catch_exceptions.
62         * symfile-mem.c (struct symbol_file_add_from_memory_args)
63         (symbol_file_add_from_memory_wrapper): Delete.
64         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
65         * thread.c: Don't include gdb.h.
66         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
67         (thread_alive): Use thread_select.
68         (do_captured_thread_select): Delete, parts salvaged as ...
69         (thread_select): ... this new function.
70         (gdb_thread_select): Delete.
71
72 2017-10-10  Pedro Alves  <palves@redhat.com>
73             Tom Tromey  <tom@tromey.com>
74
75         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
76         and reverse logic.
77         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
78         No longer macros.  Instead ...
79         (enum wp_check_result): They're now values of this new
80         enumeration.
81         (watchpoint_check): Change return type to wp_check_result and
82         parameter type to bpstat.
83         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
84         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
85         catch_errors.  Reverse logic of watchpoint_check call.
86         (breakpoint_re_set_one): Now returns void and takes a breakpoint
87         pointer as parameter.
88         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
89         * common/common-exceptions.c (throw_exception_sjlj): Update
90         comments to avoid mentioning catch_errors.
91         * exceptions.c (catch_errors): Delete.
92         * exceptions.h: Update comments to avoid mentioning catch_errors.
93         (catch_errors_ftype, catch_errors): Delete.
94         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
95         (hook_stop_stub): Delete.
96         (restore_selected_frame): Change return type to void, and
97         parameter type to const frame_id &.
98         (restore_infcall_control_state): Use TRY/CATCH instead of
99         catch_errors.
100         * main.c (captured_command_loop): Return void and remove
101         parameter.  Remove references to catch_errors.
102         (captured_main): Use TRY/CATCH instead of catch_errors.
103         * objc-lang.c (objc_submethod_helper_data)
104         (find_objc_msgcall_submethod_helper): Delete.
105         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
106         catch_errors.
107         * record-full.c (record_full_message): Return void.
108         (record_full_message_args, record_full_message_wrapper): Delete.
109         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
110         instead of catch_errors.
111         * solib-aix.c (solib_aix_open_symbol_file_object): Change
112         parameter type to int.
113         * solib-darwin.c (open_symbol_file_object): Ditto.
114         * solib-dsbt.c (open_symbol_file_object): Ditto.
115         * solib-frv.c (open_symbol_file_object): Ditto.
116         * solib-svr4.c (open_symbol_file_object): Ditto.
117         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
118         * solib.c (update_solib_list): Use TRY/CATCH instead of
119         catch_errors.
120         * solist.h (struct target_so_ops) <open_symbol_file_object>:
121         Change type.
122         * symmisc.c (struct print_symbol_args): Remove.
123         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
124         (print_symbol): Change type.
125         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
126         and remove parameters.
127         (catch_errors): New.
128         (get_windows_debug_event): Adjust.
129
130 2017-10-09  Tom Tromey  <tom@tromey.com>
131
132         * mi/mi-main.c (free_splay_tree): Remove.
133         (list_available_thread_groups): Use splay_tree_up.
134         * common/gdb_splay_tree.h: New file.
135
136 2017-10-09  Tom Tromey  <tom@tromey.com>
137
138         * mi/mi-main.c (do_nothing): Remove.
139         (list_available_thread_groups): Update.
140
141 2017-10-09  Pedro Alves  <palves@redhat.com>
142
143         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
144         reading registers when switching context.
145
146 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
147
148         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
149         (fbsd_convert_siginfo): Likewise.
150         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
151
152 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
153
154         * configure.ac (try_guile_versions): Remove guile-2.2.
155         * configure: Regenerate.
156
157 2017-10-09  Tom Tromey  <tom@tromey.com>
158
159         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
160         (COMPILE.pre): Use $(CXX).
161
162 2017-10-09  Pedro Alves  <palves@redhat.com>
163
164         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
165         Use bool.
166         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
167         * cp-support.h (cp_remove_params): Now returns a
168         gdb::unique_xmalloc_ptr.
169         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
170         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
171         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
172         returning a gdb::unique_xmalloc_ptr.
173         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
174         * stack.c (find_frame_funname): Adjust to cp_remove_params
175         returning a gdb::unique_xmalloc_ptr.
176
177 2017-10-08  Tom Tromey  <tom@tromey.com>
178
179         * dwarf2read.c (dwarf2_get_dwz_file): Use
180         gdb::unique_xmalloc_ptr.
181         (find_slot_in_mapped_hash): Likewise.
182         (dwarf2_physname): Likewise.
183         (create_dwo_unit_in_dwp_v1): Use std::string.
184         (create_dwo_unit_in_dwp_v2): Likewise.
185         (lookup_dwo_cutu): Likewise.
186         (inherit_abstract_dies): Use std::vector.
187         (read_array_type): Likewise.
188         (dwarf_decode_macros): Remove unused declaration.
189         (unsigned_int_compar): Remove.
190         (dwarf2_build_psymtabs_hard): Use scoped_restore.
191         (psymtabs_addrmap_cleanup): Remove.
192
193 2017-10-08  Tom Tromey  <tom@tromey.com>
194
195         * frame-unwind.c (frame_unwind_try_unwinder): Update.
196         * frame.h (frame_cleanup_after_sniffer): Declare.
197         (frame_prepare_for_sniffer): Return void.
198         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
199         type of argument.
200         (frame_prepare_for_sniffer): Return void.
201
202 2017-10-08  Tom Tromey  <tom@tromey.com>
203
204         * utils.h (make_cleanup_value_free): Remove.
205         * utils.c (do_value_free, struct cleanup): Remove.
206         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
207         Use gdb_value_up.
208         * value.h (struct value_deleter): New.
209         (gdb_value_up): New typedef.
210
211 2017-10-08  Tom Tromey  <tom@tromey.com>
212
213         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
214         (make_cleanup_free_search_symbols): Remove.
215         (search_symbols): Return std::vector.
216         (symbol_search::compare_search_syms): Now member of
217         symbol_search.  Change arguments.
218         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
219         (symtab_symbol_info, rbreak_command): Update.
220         * symtab.h (struct symbol_search) <next>: Remove.
221         Add constructors.
222         (symbol_search::operator<): New function.
223         (symbol_search::operator==): New function.
224         (search_symbols): Remove std::vector.
225         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
226         (symbol_search::compare_search_syms): Declare.
227
228 2017-10-06  Yao Qi  <yao.qi@linaro.org>
229
230         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
231         arch/aarch64-insn.o.
232         Remove one rule.
233         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
234
235 2017-10-06  Yao Qi  <yao.qi@linaro.org>
236
237         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
238         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
239         arch/arm-linux.o respectively.
240         * configure.tgt: Likewise.
241
242 2017-10-06  Yao Qi  <yao.qi@linaro.org>
243
244         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
245         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
246
247 2017-10-06  Pedro Alves  <palves@redhat.com>
248
249         * windows-nat.c: Include <algorithm>.
250
251 2017-10-06  Yao Qi  <yao.qi@linaro.org>
252
253         * configure.tgt (i386_tobjs): New variable.
254         (amd64_tobjs): New variable.
255         Set $cpu_obs and $os_obs.
256
257 2017-10-06  Yao Qi  <yao.qi@linaro.org>
258
259         * Makefile.in (CONFIG_SRC_SUBDIR): New.
260         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
261         (clean): Remove object files and dependency files.
262         (distclean): Remove the directory.
263         * configure.ac: Invoke AC_CONFIG_COMMANDS.
264         * configure: Re-generated.
265         * configure.tgt: Replace amd64.o with arch/amd64.o.
266
267 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
268
269         PR build/22188
270         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
271         and SETEND.
272
273 2017-10-05  Pedro Alves  <palves@redhat.com>
274
275         * linux-nat.c (linux_child_follow_fork): When following the parent
276         and detaching the child, consult the parent thread's architecture
277         instead of the child's.
278
279 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
280
281         * ax.h: Do not include "doublest.h".
282         (union agent_val): Remove.
283
284 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
285
286         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
287         (decimal_to_string): Return std::string object.
288         (decimal_from_string): Accept std::string object.  Return bool.
289         (decimal_from_integral, decimal_from_doublest): Remove.
290         (decimal_from_longest): Add prototype.
291         (decimal_from_ulongest): Likewise.
292         (decimal_to_longest): Likewise.
293         (decimal_from_doublest): Likewise.
294         * dfp.c: Do not include "gdbtypes.h" or "value.h".
295         (MAX_DECIMAL_STRING): Move here.
296         (decimal_to_string): Return std::string object.
297         (decimal_from_string): Accept std::string object.  Return bool.
298         (decimal_from_integral): Remove, replace by ...
299         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
300         (decimal_to_longest): New function.
301         (decimal_from_floating): Remove, replace by ...
302         (decimal_from_doublest): ... this new function.
303         (decimal_to_doublest): Update to new decimal_to_string interface.
304
305         * value.c (unpack_long): Use decimal_to_longest.
306         * valops.c (value_cast): Use decimal_from_doublest instead of
307         decimal_from_floating.  Use decimal_from_[u]longest isntead of
308         decimal_from_integral.
309         * valarith.c (value_args_as_decimal): Likewise.
310         * valprint.c (print_decimal_floating): Update to new
311         decimal_to_string interface.
312         * printcmd.c (printf_decfloat): Likewise.
313         * c-exp.y (parse_number): Update to new decimal_from_string interface.
314
315 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
316
317         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
318         * gdbtypes.c: Include "floatformat.h".
319         * value.c: Likewise.
320         * m68k-tdep.c: Likewise.
321
322         * findvar.c: Do not include "floatformat.h".
323         * amd64-darwin-tdep.c: Likewise.
324         * arm-linux-tdep.c: Likewise.
325         * i386-darwin-tdep.c: Likewise.
326         * i387-tdep.c: Likewise.
327         * m68k-linux-tdep.c: Likewise.
328         * mep-tdep.c: Likewise.
329         * mips-tdep.c: Likewise.
330         * nios2-tdep.c: Likewise.
331         * s390-linux-tdep.c: Likewise.
332         * sparc-obsd-tdep.c: Likewise.
333         * sparc-tdep.c: Likewise.
334         * sparc64-tdep.c: Likewise.
335         * spu-tdep.c: Likewise.
336         * tic6x-tdep.c: Likewise.
337         * tilegx-tdep.c: Likewise.
338         * vax-tdep.c: Likewise.
339         * xstormy16-tdep.c: Likewise.
340         * xtensa-tdep.c: Likewise.
341
342         * top.c: Do not include "doublest.h".
343         * aarch64-tdep.c: Likewise.
344         * alpha-tdep.c: Likewise.
345         * arm-linux-tdep.c: Likewise.
346         * m68k-linux-tdep.c: Likewise.
347         * tilegx-tdep.c: Likewise.
348         * xstormy16-tdep.c: Likewise.
349
350 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
351
352         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
353         (mipsn32_fbsd_sigframe): Define.
354         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
355         for FreeBSD/mipsn32.
356
357 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
358
359         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
360         AT_HWCAP.
361
362 2017-10-05  Tristan Gingold  <tgingold@free.fr>
363
364         * MAINTAINERS (Misc): Update my email address.
365
366 2017-10-04  Pedro Alves  <palves@redhat.com>
367
368         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
369         it instead of target_gdbarch.
370         (get_remote_state, get_remote_packet_size): Adjust
371         get_remote_arch_state calls, passing down target_gdbarch
372         explicitly.
373         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
374         'gdbarch' and use it instead of target_gdbarch.
375         (get_memory_packet_size): Adjust get_remote_arch_state calls,
376         passing down target_gdbarch explicitly.
377         (struct stop_reply) <arch>: New field.
378         (remote_parse_stop_reply): Use the stopped thread's architecture,
379         not the current inferior's.  Save the architecture in the
380         stop_reply.
381         (process_stop_reply): Use the stop reply's architecture.
382         (process_g_packet, remote_fetch_registers)
383         (remote_prepare_to_store, store_registers_using_G)
384         (remote_store_registers): Adjust get_remote_arch_state calls,
385         using the regcache's architecture.
386         (remote_get_trace_status): Adjust get_remote_arch_state calls,
387         passing down target_gdbarch explicitly.
388         * spu-multiarch.c (spu_thread_architecture): Defer to the target
389         beneath instead of calling target_gdbarch.
390         * target.c (default_thread_architecture): Use the specified
391         inferior's architecture, instead of the current inferior's
392         architecture (via target_gdbarch).
393
394 2017-10-04  Pedro Alves  <palves@redhat.com>
395
396         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
397         case.
398         (regcache_print): Handle !target_has_registers here instead.
399
400 2017-10-04  Pedro Alves  <palves@redhat.com>
401
402         * frame.c (create_test_frame): Delete.
403         * frame.h (create_test_frame): Delete.
404         * gdbarch-selftests.c: Include gdbthread.h and target.h.
405         (class regcache_test): Delete.
406         (test_target_has_registers, test_target_has_stack)
407         (test_target_has_memory, test_target_prepare_to_store)
408         (test_target_store_registers): New functions.
409         (test_target_ops): New class.
410         (register_to_value_test): Error out if there's already a
411         process_stratum (or higher) target pushed.  Create a fuller mock
412         environment, with mock target_ops, inferior, address space, thread
413         and inferior_ptid.
414         * progspace.c (struct address_space): Move to ...
415         * progspace.h (struct address_space): ... here.
416         * regcache.h (regcache::~regcache, regcache::raw_write)
417         [GDB_SELF_TEST]: No longer virtual.
418
419 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
420
421         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
422
423 2017-10-04  Pedro Alves  <palves@redhat.com>
424
425         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
426         out of 'between TRY and CATCH'.
427
428 2017-10-04  Pedro Alves  <palves@redhat.com>
429
430         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
431         * common/common-exceptions.h (TRY): Open an outermost scope.
432         Expand intro comment.
433         (CATCH): Reindent.
434         (END_CATCH): Close the outermost scope.
435         * completer.c (complete_line_internal): Add missing END_CATCH.
436
437 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
438
439         * NEWS (Changes since GDB 8.0): Add entry about new
440         'set-cwd-on-gdbserver' feature.
441         (New remote packets): Add entry for QSetWorkingDir.
442         * common/common-inferior.h (set_inferior_cwd): New prototype.
443         * infcmd.c (set_inferior_cwd): Remove "static".
444         (show_cwd_command): Expand text to include remote debugging.
445         * remote.c: Add PACKET_QSetWorkingDir.
446         (remote_protocol_features) <QSetWorkingDir>: New entry for
447         PACKET_QSetWorkingDir.
448         (extended_remote_set_inferior_cwd): New function.
449         (extended_remote_create_inferior): Call
450         "extended_remote_set_inferior_cwd".
451         (_initialize_remote): Call "add_packet_config_cmd" for
452         QSetWorkingDir.
453
454 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
455
456         * NEWS (New commands): Mention "set/show cwd".
457         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
458         "cd" command's help text.
459         * common/common-inferior.h (get_inferior_cwd): New prototype.
460         * infcmd.c (inferior_cwd_scratch): New global variable.
461         (set_inferior_cwd): New function.
462         (get_inferior_cwd): Likewise.
463         (set_cwd_command): Likewise.
464         (show_cwd_command): Likewise.
465         (_initialize_infcmd): Add "set/show cwd" commands.
466         * inferior.h (class inferior) <cwd>: New field.
467         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
468         (fork_inferior): Change inferior's cwd before its execution.
469         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
470         to CreateProcess.
471
472 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
473
474         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
475         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
476         (COMMON_OBS): Add gdb_tilde_expand.o.
477         * common/gdb_tilde_expand.c: New file.
478         * common/gdb_tilde_expand.h: Likewise.
479
480 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
481
482         * gdbarch.sh (objfile): Remove duplicate declaration.
483         * gdbarch.h: Regenerate.
484
485 2017-10-03  Tom Tromey  <tom@tromey.com>
486
487         * utils.c (internal_vproblem): Use string_vprintf.
488
489 2017-10-03  Tom Tromey  <tom@tromey.com>
490
491         * printcmd.c (info_symbol_command): Use std::string.
492
493 2017-10-03  Tom Tromey  <tom@tromey.com>
494
495         * top.c (gdb_safe_append_history): Use std::string.
496
497 2017-10-03  Tom Tromey  <tom@tromey.com>
498
499         * event-top.c (stdin_event_handler): Update.
500         * main.c (captured_main_1): Update.
501         * top.h (make_delete_ui_cleanup): Remove.
502         (struct ui): Add constructor and destructor.
503         (new_ui, delete_ui): Remove.
504         * top.c (make_delete_ui_cleanup): Remove.
505         (new_ui_command): Use std::unique_ptr.
506         (delete_ui_cleanup): Remove.
507         (ui::ui): Rename from new_ui.  Update.
508         (free_ui): Remove.
509         (ui::~ui): Rename from delete_ui.  Update.
510
511 2017-10-03  Tom Tromey  <tom@tromey.com>
512
513         * symfile.c (load_progress): Use gdb::byte_vector.
514
515 2017-10-03  Tom Tromey  <tom@tromey.com>
516
517         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
518         declaration.
519         * printcmd.c (x_command): Remove unused declaration.
520         * symfile.c (symbol_file_command): Remove unused declaration.
521
522 2017-10-03  Tom Tromey  <tom@tromey.com>
523
524         * utils.c (internal_vproblem): Use std::string.
525         (defaulted_query): Likewise.
526
527 2017-10-03  Tom Tromey  <tom@tromey.com>
528
529         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
530         * top.c (execute_command_to_string): Update.
531         * utils.c (make_cleanup_restore_page_info): Remove.
532         (do_restore_page_info_cleanup): Remove.
533         (set_batch_flag_and_restore_page_info):
534         New.
535         (make_cleanup_restore_page_info): Remove.
536         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
537         (~set_batch_flag_and_restore_page_info): New
538         (make_cleanup_restore_uinteger): Remove.
539         (make_cleanup_restore_integer): Remove.
540         (struct restore_integer_closure): Remove.
541         (restore_integer): Remove.
542         * utils.h (struct set_batch_flag_and_restore_page_info): New
543         class.
544         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
545         (make_cleanup_restore_page_info): Remove.
546         (make_cleanup_restore_uinteger) Remove.
547         (make_cleanup_restore_integer) Remove.
548
549 2017-10-03  Tom Tromey  <tom@tromey.com>
550
551         * record-full.h (record_full_gdb_operation_disable_set): Return
552         scoped_restore_tmpl<int>.
553         * infrun.c (adjust_pc_after_break): Update.
554         (handle_signal_stop): Update.
555         * record-full.c (record_full_gdb_operation_disable_set): Return
556         scoped_restore_tmpl<int>.
557         (record_full_wait_1, record_full_insert_breakpoint)
558         (record_full_remove_breakpoint, record_full_save)
559         (record_full_goto_insn): Update.
560
561 2017-10-02  Tom Tromey  <tom@tromey.com>
562
563         PR rust/22236:
564         * rust-lang.c (rust_val_print_str): New function.
565         (val_print_struct): Call it.
566         (rust_subscript): Preserve name of slice type.
567
568 2017-10-02  Tom Tromey  <tom@tromey.com>
569
570         * rust-lang.c (rust_subscript): Handle slices in
571         EVAL_AVOID_SIDE_EFFECTS case.
572
573 2017-10-02  Tom Tromey  <tom@tromey.com>
574
575         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
576
577 2017-10-02  Tom Tromey  <tom@tromey.com>
578
579         * rust-lang.h (rust_slice_type): Add "extern".
580
581 2017-10-02  Tom Tromey  <tom@tromey.com>
582             Pedro Alves  <palves@redhat.com>
583
584         * ada-lang.h (ada_exc_info::operator<): Make const.
585         (ada_exc_info::operator==): Make const.
586         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
587         Make const.
588
589 2017-09-29  Tom Tromey  <tom@tromey.com>
590
591         * target.c (read_whatever_is_readable): Change type of "result".
592         Update.
593         (free_memory_read_result_vector): Remove.
594         (read_memory_robust): Change return type.  Update.
595         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
596         bin2hex, std::string.
597         * target.h (memory_read_result_s): Remove typedef.
598         (free_memory_read_result_vector): Remove.
599         (read_memory_robust): Return std::vector.
600
601 2017-09-29  Tom Tromey  <tom@tromey.com>
602
603         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
604
605 2017-09-29  Tom Tromey  <tom@tromey.com>
606
607         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
608         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
609         operator< and operator==.
610         (ada_exceptions_list): Return a std::vector.
611         * ada-lang.c (ada_exc_info::operator<): Rename from
612         compare_ada_exception_info.
613         (ada_exc_info::operator==): New.
614         (sort_remove_dups_ada_exceptions_list): Change type of
615         "exceptions".
616         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
617         (ada_add_global_exceptions): Likewise.
618         (ada_exceptions_list_1): Return a std::vector.
619         (ada_exceptions_list): Likewise.
620
621 2017-09-29  Tom Tromey  <tom@tromey.com>
622
623         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
624         'std::set *'.
625         (print_one_inferior): Update.
626         (free_vector_of_ints): Remove.
627         (list_available_thread_groups): Change "ids" to std::set.
628         (mi_cmd_list_thread_groups): Update.
629         (struct collect_cores_data) <core>: Now a std::set.
630         (collect_cores): Update.
631         (unique): Remove.
632         (print_one_inferior): Update.
633
634 2017-09-29  Tom Tromey  <tom@tromey.com>
635
636         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
637         (mi_execute_async_cli_command): Likewise.
638         (mi_cmd_trace_frame_collected): Use field_fmt.
639
640 2017-09-29  Tom Tromey  <tom@tromey.com>
641
642         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
643         gdb::byte_vector.
644
645 2017-09-29  Tom Tromey  <tom@tromey.com>
646
647         * mi/mi-parse.c (mi_parse): Remove unused declaration.
648
649 2017-09-29  Tom Tromey  <tom@tromey.com>
650
651         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
652
653 2017-09-29  Tom Tromey  <tom@tromey.com>
654
655         * varobj.h (varobj_gen_name): Return std::string.
656         * varobj.c (varobj_gen_name): Return std::string.
657         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
658         (mi_cmd_var_delete): Don't copy "name".
659
660 2017-09-29  Tom Tromey  <tom@tromey.com>
661
662         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
663         (mi_cmd_break_insert_1): Update.
664
665 2017-09-29  Tom Tromey  <tom@tromey.com>
666
667         * target.h (make_scoped_defer_target_commit_resume): Update.
668         * target.c (make_scoped_defer_target_commit_resume): Rename from
669         make_cleanup_defer_target_commit_resume.  Return a
670         scoped_restore.
671         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
672
673 2017-09-29  Tom Tromey  <tom@tromey.com>
674
675         * main.c (captured_main_1): Remove unused declaration.
676         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
677
678 2017-09-29  Tom Tromey  <tom@tromey.com>
679
680         * symtab.c (search_symbols): Remove unused outer cleanup.
681         (make_source_files_completion_list): Remove unused declaration.
682
683 2017-09-29  Tom Tromey  <tom@tromey.com>
684
685         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
686
687 2017-09-29  Tom Tromey  <tom@tromey.com>
688
689         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
690         gdb::byte_vector.
691
692 2017-09-29  Tom Tromey  <tom@tromey.com>
693
694         * complaints.c (vcomplaint): Use std::string.
695
696 2017-09-29  Tom Tromey  <tom@tromey.com>
697
698         * tracepoint.c (trace_variable_command): Use std::string.
699         (encode_actions_1): Remove unused declarations.
700         (create_tsv_from_upload): Use std::string.
701
702 2017-09-29  Tom Tromey  <tom@tromey.com>
703
704         * cp-support.c (gdb_demangle): Use std::string.
705
706 2017-09-29  Tom Tromey  <tom@tromey.com>
707
708         * stack.c (parse_frame_specification): Use std::string
709         (info_frame_command): Use gdb::unique_xmalloc_ptr.
710
711 2017-09-29  Tom Tromey  <tom@tromey.com>
712
713         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
714
715 2017-09-29  Tom Tromey  <tom@tromey.com>
716
717         * utils.c (vfprintf_maybe_filtered): Use std::string.
718         (vfprintf_unfiltered): Likewise.
719
720 2017-09-29  Tom Tromey  <tom@tromey.com>
721
722         * event-top.c (top_level_prompt): Return std::string.
723         (display_gdb_prompt): Update.
724
725 2017-09-29  Tom Tromey  <tom@tromey.com>
726
727         * unittests/common-utils-selftests.c (format): New function.
728         (string_vprintf_tests): New function.
729         (_initialize_common_utils_selftests): Register new tests.
730         * common/common-utils.c (string_vprintf): New function.
731         * common/common-utils.h (string_vprintf): Declare.
732
733 2017-09-29  Pedro Alves  <palves@redhat.com>
734
735         * common/rsp-low.c (unpack_varlen_hex): Constify.
736         * common/rsp-low.h (unpack_varlen_hex): Constify.
737         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
738         Constify.
739         * remote.c (remote_set_permissions, read_ptid)
740         (remote_current_thread, remote_get_threads_with_qthreadinfo)
741         (remote_static_tracepoint_marker_at)
742         (remote_static_tracepoint_markers_by_strid)
743         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
744         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
745         (parse_tracepoint_definition, parse_tsv_definition)
746         (parse_static_tracepoint_marker_definition): Constify.
747         * tracepoint.h (parse_static_tracepoint_marker_definition)
748         (parse_trace_status, parse_tracepoint_status)
749         (parse_tracepoint_definition, parse_tsv_definition): Constify.
750
751 2017-09-29  Pedro Alves  <palves@redhat.com>
752
753         * remote.c (target_buf, target_buf_size): Delete.
754         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
755         Use the connection's packet buffer instead.
756         All callers adjusted.
757         (_initialize_remote): Remove references to target_buf and
758         target_buf_size.
759
760 2017-09-28  Pedro Alves  <palves@redhat.com>
761
762         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
763         unittests/common-utils-selftests.c.
764         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
765         (COMMON_OBS): Remove utils-selftests.o.
766         * utils-selftests.c: Move to ...
767         * unittests/common-utils-selftests.c: ... here and rename self
768         test to "string_printf".
769
770 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
771
772         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
773         having NULL cus or tus.
774
775 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
776
777         * arm-tdep.c: (convert_from_extended): Remove.
778         (convert_to_extended): Likewise.
779         (arm_extract_return_value): Use convert_typed_floating.
780         (arm_store_return_value): Likewise.
781
782         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
783         * sh-tdep.c: Do not include "floatformat.h".
784         (sh_littlebyte_bigword_type): New function.
785         (sh_register_convert_to_virtual): Use convert_typed_floating.
786         (sh_register_convert_to_raw): Likewise.
787         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
788         (sh64_littlebyte_bigword_type): New function.
789         (sh64_extract_return_value): Use convert_typed_floating.
790         (sh64_register_convert_to_virtual): Likewise.
791         (sh64_register_convert_to_raw): Likewise.
792
793 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
794
795         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
796         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
797
798         * gdbtypes.h (union type_specific): Make field floatformat hold
799         just a single struct floatformat, not an array.
800         (floatformat_from_type): Move here.
801         * gdbtypes.c (floatformat_from_type): Move here.  Update to
802         changed TYPE_FLOATFORMAT definition.
803         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
804         (recursive_dump_type): Likewise.
805         (init_float_type): Install correct floatformat for byte order.
806         (arch_float_type): Likewise.
807
808 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
809
810         * gdbtypes.c (init_type): Change incoming argument from
811         length-in-bytes to length-in-bits.  Assert length is a
812         multiple of TARGET_CHAR_BITS.
813         (arch_type, arch_flags_type): Likewise.
814         (init_integer_type): Update call to init_type.
815         (init_character_type): Likewise.
816         (init_boolean_type): Likewise.
817         (init_float_type): Likewise.
818         (init_decfloat_type): Likewise.
819         (init_complex_type): Likewise.
820         (init_pointer_type): Likewise.
821         (objfile_type): Likewise.
822         (arch_integer_type): Update call to arch_type.
823         (arch_character_type): Likewise.
824         (arch_boolean_type): Likewise.
825         (arch_float_type): Likewise.
826         (arch_decfloat_type): Likewise.
827         (arch_complex_type): Likewise.
828         (arch_pointer_type): Likewise.
829         (gdbtypes_post_init): Likewise.
830
831         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
832         (read_base_type): Likewise.
833         * mdebugread.c (basic_type): Likewise.
834         * stabsread.c (dbx_init_float_type): Likewise.
835         (rs6000_builtin_type): Likewise.
836         (read_range_type): Likewise.  Also, fix call to init_integer_type
837         with erroneous length argument.
838
839         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
840         * d-lang.c (build_d_types): Likewise.
841         * f-lang.c (build_fortran_types): Likewise.
842         * go-lang.c (build_go_types): Likewise.
843         * opencl-lang.c (build_opencl_types): Likewise.
844         * jit.c (finalize_symtab): Likewise.
845         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
846         (build_std_type_info_type): Likewise.
847         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
848         update call to arch_flags_type.
849
850         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
851         arch_type.
852         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
853         * windows-tdep.c (windows_get_tlb_type): Likewise.
854
855         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
856         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
857         * m32c-tdep.c (make_types): Likewise.
858         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
859         (rl78_psw_type): Update call to arch_flags_type.
860         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
861         * rx-tdep.c (rx_psw_type): Likewise.
862         (rx_fpsw_type): Likewise.
863         * sparc-tdep.c (sparc_psr_type): Likewise.
864         (sparc_fsr_type): Likewise.
865         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
866         (sparc64_ccr_type): Likewise.
867         (sparc64_fsr_type): Likewise.
868         (sparc64_fprs_type): Likewise.
869
870 2017-09-27  Tom Tromey  <tom@tromey.com>
871
872         * findcmd.c (find_command): Constify.
873
874 2017-09-27  Tom Tromey  <tom@tromey.com>
875
876         * ada-tasks.c (task_command_1, task_command): Constify.
877
878 2017-09-27  Tom Tromey  <tom@tromey.com>
879
880         * symtab.c (maintenance_print_symbol_cache)
881         (maintenance_flush_symbol_cache)
882         (maintenance_print_symbol_cache_statistics): Constify.
883
884 2017-09-27  Tom Tromey  <tom@tromey.com>
885
886         * inferior.c (detach_inferior_command, kill_inferior_command)
887         (inferior_command): Constify.
888
889 2017-09-27  Tom Tromey  <tom@tromey.com>
890
891         * regcache.c (regcache_print, maintenance_print_registers)
892         (maintenance_print_raw_registers)
893         (maintenance_print_cooked_registers)
894         (maintenance_print_register_groups)
895         (maintenance_print_remote_registers): Constify.
896
897 2017-09-27  Tom Tromey  <tom@tromey.com>
898
899         * printcmd.c (map_display_numbers, undisplay_command)
900         (enable_disable_display_command, enable_display_command)
901         (disable_display_command): Constify.
902
903 2017-09-27  Tom Tromey  <tom@tromey.com>
904
905         * breakpoint.h (delete_command): Don't declare.
906         * breakpoint.c (delete_command, enable_once_command)
907         (enable_count_command, enable_delete_command, breakpoint_1)
908         (maintenance_info_breakpoints, stopin_command, stopat_command)
909         (delete_command, delete_trace_command, save_breakpoints)
910         (save_breakpoints_command, save_tracepoints_command): Constify.
911
912 2017-09-27  Tom Tromey  <tom@tromey.com>
913
914         * macrocmd.c (macro_expand_command, macro_expand_once_command)
915         (skip_ws, extract_identifier, macro_define_command)
916         (macro_undef_command, macro_list_command): Constify.
917
918 2017-09-27  Tom Tromey  <tom@tromey.com>
919
920         * infcmd.c (environment_info, set_environment_command)
921         (unset_environment_command, path_info, info_proc_cmd_1)
922         (info_proc_cmd_mappings, info_proc_cmd_stat)
923         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
924         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
925
926 2017-09-27  Tom Tromey  <tom@tromey.com>
927
928         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
929         Constify.
930
931 2017-09-27  Tom Tromey  <tom@tromey.com>
932
933         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
934
935 2017-09-27  Tom Tromey  <tom@tromey.com>
936
937         * demangle.c (demangle_command): Constify.
938
939 2017-09-27  Tom Tromey  <tom@tromey.com>
940
941         * progspace.c (maintenance_info_program_spaces_command):
942         Constify.
943
944 2017-09-27  Tom Tromey  <tom@tromey.com>
945
946         * compile/compile.c (check_raw_argument, compile_file_command)
947         (compile_code_command, compile_print_command): Constify.
948
949 2017-09-27  Tom Tromey  <tom@tromey.com>
950
951         * reggroups.c (maintenance_print_reggroups): Constify.
952
953 2017-09-27  Tom Tromey  <tom@tromey.com>
954
955         * dwarf2read.c (save_gdb_index_command): Constify.
956
957 2017-09-27  Tom Tromey  <tom@tromey.com>
958
959         * stap-probe.c (info_probes_stap_command): Constify.
960
961 2017-09-27  Tom Tromey  <tom@tromey.com>
962
963         * fork-child.c (unset_exec_wrapper_command): Constify.
964
965 2017-09-27  Tom Tromey  <tom@tromey.com>
966
967         * btrace.c (get_uint, get_context_size, no_chunk)
968         (maint_btrace_packet_history_cmd)
969         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
970         (maint_info_btrace_cmd): Constify.
971
972 2017-09-27  Tom Tromey  <tom@tromey.com>
973
974         * reverse.c (delete_bookmark_command): Constify.
975
976 2017-09-27  Tom Tromey  <tom@tromey.com>
977
978         * remote.c (set_memory_packet_size)
979         (set_memory_write_packet_size, show_memory_write_packet_size)
980         (set_memory_read_packet_size, show_memory_read_packet_size)
981         (compare_sections_command, packet_command, remote_put_command)
982         (remote_get_command, remote_delete_command): Constify.
983
984 2017-09-27  Tom Tromey  <tom@tromey.com>
985
986         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
987         (set_mipsfpu_double_command, set_mipsfpu_none_command)
988         (set_mipsfpu_auto_command): Constify.
989
990 2017-09-27  Tom Tromey  <tom@tromey.com>
991
992         * cli/cli-cmds.h (cd_command): Constify.
993         * cli/cli-cmds.c (cd_command): Constify.
994
995 2017-09-27  Tom Tromey  <tom@tromey.com>
996
997         * thread.c (thread_name_command, thread_find_command): Constify.
998
999 2017-09-27  Tom Tromey  <tom@tromey.com>
1000
1001         * probe.c (enable_probes_command, disable_probes_command):
1002         Constify.
1003
1004 2017-09-27  Tom Tromey  <tom@tromey.com>
1005
1006         * symfile.c (symbol_file_command): Constify.
1007         * gdbcore.h (deprecated_file_changed_hook): Constify.
1008         * exec.c (deprecated_file_changed_hook, exec_file_command)
1009         (file_command): Constify.
1010         * defs.h (symbol_file_command): Constify.
1011
1012 2017-09-27  Tom Tromey  <tom@tromey.com>
1013
1014         * remote-fileio.c (set_system_call_allowed)
1015         (show_system_call_allowed): Constify.
1016
1017 2017-09-27  Tom Tromey  <tom@tromey.com>
1018
1019         * tracepoint.c (delete_trace_variable_command)
1020         (tfind_end_command, tfind_start_command, tfind_pc_command)
1021         (tfind_tracepoint_command, tfind_line_command)
1022         (tfind_range_command, tfind_outside_command): Constify.
1023
1024 2017-09-27  Tom Tromey  <tom@tromey.com>
1025
1026         * ax-gdb.c (maint_agent_printf_command, agent_command)
1027         (agent_eval_command): Constify.
1028
1029 2017-09-27  Tom Tromey  <tom@tromey.com>
1030
1031         * tracepoint.c (info_scope_command): Constify.
1032         * python/python.c (gdbpy_decode_line): Constify.
1033         * python/py-breakpoint.c (bppy_init): Constify.
1034         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1035         * location.h: (new_linespec_location)
1036         (string_to_event_location_basic, string_to_event_location):
1037         Constify.
1038         * location.c (new_linespec_location)
1039         (string_to_event_location_basic, string_to_event_location):
1040         Constify.
1041         * linespec.h (decode_line_with_current_source)
1042         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1043         * linespec.c (linespec_lex_to_end)
1044         (decode_line_with_current_source)
1045         (decode_line_with_last_displayed): Constify.
1046         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1047         Constify.
1048         * cli/cli-cmds.c (edit_command, list_command): Constify.
1049         * breakpoint.h (until_break_command, watch_command_wrapper)
1050         (awatch_command_wrapper, rwatch_command_wrapper)
1051         (init_ada_exception_breakpoint): Constify.
1052         * breakpoint.c (break_command_1, dprintf_command)
1053         (break_range_command, watch_command_wrapper)
1054         (rwatch_command_wrapper, awatch_command_wrapper)
1055         (until_break_command, init_ada_exception_breakpoint)
1056         (strace_marker_create_sals_from_location, trace_command)
1057         (ftrace_command, strace_command, struct tracepoint): Constify.
1058         * ax-gdb.c (agent_command_1): Constify.
1059         * ada-lang.c (ada_exception_sal): Constify.
1060
1061 2017-09-27  Tom Tromey  <tom@tromey.com>
1062
1063         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1064         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1065         (get_context_size, no_chunk, get_insn_history_modifiers)
1066         (cmd_record_insn_history, get_call_history_modifiers)
1067         (cmd_record_call_history): Constify.
1068
1069 2017-09-27  Tom Tromey  <tom@tromey.com>
1070
1071         * source.c (show_substitute_path_command)
1072         (unset_substitute_path_command, set_substitute_path_command):
1073         Constify.
1074
1075 2017-09-27  Tom Tromey  <tom@tromey.com>
1076
1077         * typeprint.c (maintenance_print_type): Constify.
1078         * maint.c (maintenance_dump_me, maintenance_demangle)
1079         (maintenance_time_display, maintenance_info_sections)
1080         (maintenance_print_statistics, maintenance_deprecate)
1081         (maintenance_undeprecate): Constify.
1082         (maintenance_do_deprecate): Constify.  Use std::string.
1083         (maintenance_selftest): Constify.
1084         * gdbtypes.h (maintenance_print_type): Constify.
1085
1086 2017-09-27  Tom Tromey  <tom@tromey.com>
1087
1088         * hppa-tdep.c (unwind_command): Constify.
1089
1090 2017-09-27  Tom Tromey  <tom@tromey.com>
1091
1092         * target-descriptions.c (unset_tdesc_filename_cmd)
1093         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1094         Constify.
1095
1096 2017-09-27  Tom Tromey  <tom@tromey.com>
1097
1098         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1099
1100 2017-09-27  Tom Tromey  <tom@tromey.com>
1101
1102         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1103
1104 2017-09-27  Tom Tromey  <tom@tromey.com>
1105
1106         * tui/tui-regs.c (tui_reg_command): Constify.
1107
1108 2017-09-27  Tom Tromey  <tom@tromey.com>
1109
1110         * skip.c (skip_file_command, skip_function_command)
1111         (skip_enable_command, skip_disable_command, skip_delete_command):
1112         Constify.
1113
1114 2017-09-27  Tom Tromey  <tom@tromey.com>
1115
1116         * record-btrace.c (cmd_record_btrace_bts_start)
1117         (cmd_record_btrace_pt_start): Constify.
1118
1119 2017-09-27  Tom Tromey  <tom@tromey.com>
1120
1121         * symmisc.c (maintenance_print_symbols)
1122         (maintenance_print_msymbols, maintenance_print_objfiles)
1123         (maintenance_info_symtabs, maintenance_check_symtabs)
1124         (maintenance_expand_symtabs, maintenance_info_line_tables):
1125         Constify.
1126
1127 2017-09-27  Tom Tromey  <tom@tromey.com>
1128
1129         * top.c (new_ui_command): Constify.
1130
1131 2017-09-27  Tom Tromey  <tom@tromey.com>
1132
1133         * symfile.c (add_symbol_file_command)
1134         (remove_symbol_file_command, list_overlays_command)
1135         (map_overlay_command, unmap_overlay_command)
1136         (overlay_auto_command, overlay_manual_command)
1137         (overlay_off_command, overlay_load_command): Constify.
1138
1139 2017-09-27  Tom Tromey  <tom@tromey.com>
1140
1141         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1142         (info_spu_mailbox_command, info_spu_dma_command)
1143         (info_spu_proxydma_command): Constify.
1144
1145 2017-09-27  Tom Tromey  <tom@tromey.com>
1146
1147         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1148
1149 2017-09-27  Tom Tromey  <tom@tromey.com>
1150
1151         * cli/cli-script.c (user_defined_command): Constify.
1152
1153 2017-09-27  Tom Tromey  <tom@tromey.com>
1154
1155         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1156         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1157         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1158         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1159         (dump_binary_value, append_binary_memory, append_binary_value):
1160         Constify.
1161         (struct dump_context) <func>: Constify.
1162         (add_dump_command): Update.
1163
1164 2017-09-27  Tom Tromey  <tom@tromey.com>
1165
1166         * cli/cli-cmds.c (show_version, show_configuration)
1167         (source_command, show_user): Constify.
1168
1169 2017-09-27  Tom Tromey  <tom@tromey.com>
1170
1171         * target.c (maintenance_print_target_stack): Constify.
1172
1173 2017-09-27  Tom Tromey  <tom@tromey.com>
1174
1175         * interps.c (interpreter_exec_cmd): Constify.
1176
1177 2017-09-27  Tom Tromey  <tom@tromey.com>
1178
1179         * record-full.c (cmd_record_full_restore): Constify.
1180
1181 2017-09-27  Tom Tromey  <tom@tromey.com>
1182
1183         * memattr.c (enable_mem_command, disable_mem_command)
1184         (delete_mem_command): Constify.
1185
1186 2017-09-27  Tom Tromey  <tom@tromey.com>
1187
1188         * value.c (show_convenience): Constify.
1189
1190 2017-09-27  Tom Tromey  <tom@tromey.com>
1191
1192         * gdbcore.h (core_file_command): Update.
1193         * corefile.c (core_file_command): Constify.
1194
1195 2017-09-27  Tom Tromey  <tom@tromey.com>
1196
1197         * user-regs.c (maintenance_print_user_registers): Constify.
1198
1199 2017-09-27  Tom Tromey  <tom@tromey.com>
1200
1201         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1202
1203 2017-09-27  Tom Tromey  <tom@tromey.com>
1204
1205         * cp-support.c (first_component_command): Constify.
1206
1207 2017-09-27  Tom Tromey  <tom@tromey.com>
1208
1209         * psymtab.c (maintenance_print_psymbols)
1210         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1211         Constify.
1212
1213 2017-09-27  Tom Tromey  <tom@tromey.com>
1214
1215         * windows-tdep.c (display_tib): Constify.
1216
1217 2017-09-27  Tom Tromey  <tom@tromey.com>
1218
1219         * linux-fork.c (delete_checkpoint_command)
1220         (detach_checkpoint_command): Constify.
1221
1222 2017-09-27  Tom Tromey  <tom@tromey.com>
1223
1224         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1225
1226 2017-09-27  Tom Tromey  <tom@tromey.com>
1227
1228         * arc-tdep.c (dump_arc_instruction_command): Constify.
1229
1230 2017-09-27  Tom Tromey  <tom@tromey.com>
1231
1232         * valprint.c (set_radix, show_radix): Constify.
1233
1234 2017-09-27  Tom Tromey  <tom@tromey.com>
1235
1236         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1237
1238 2017-09-27  Tom Tromey  <tom@tromey.com>
1239
1240         * command.h (not_just_help_class_command): Update.
1241         * cli/cli-decode.h (not_just_help_class_command): Update.
1242         * cli/cli-decode.c (not_just_help_class_command): Constify.
1243
1244 2017-09-27  Tom Tromey  <tom@tromey.com>
1245
1246         * gdb_bfd.c (maintenance_info_bfds): Constify.
1247
1248 2017-09-27  Tom Tromey  <tom@tromey.com>
1249
1250         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1251         overloads.
1252         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1253         (do_const_cfunc): New function.
1254         (cmd_cfunc_eq): New overload.
1255         (cli_user_command_p): Check do_const_cfunc.
1256         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1257         const_cfunc.
1258         * command.h (add_cmd): Add const overload and no-function
1259         overload.
1260         (set_cmd_cfunc): Add const overload.
1261         (cmd_const_cfunc_ftype): Declare.
1262         (cmd_cfunc_eq): Add const overload.
1263         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1264         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1265         overload.
1266
1267 2017-09-27  Tom Tromey  <tom@tromey.com>
1268
1269         * macroexp.c (get_next_token_for_substitution): New function.
1270         (substitute_args): Call it.  Check for __VA_OPT__.
1271
1272 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1273             Pedro Alves <palves@redhat.com>
1274
1275         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1276         producer_is_icc_lt_14.
1277         (producer_is_icc_lt_14): New function.
1278         (check_producer): Add code for checking version of ICC.
1279         (producer_is_icc): Move to producer.c.
1280         (read_structure_type): Restrict ICC workaround to ICC<14.
1281         * producer.c: Include selftest.h.
1282         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1283         New functions.
1284         * producer.h (producer_is_icc): New declaration.
1285
1286 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1287
1288         * Makefile.in (SFILES): Add producer.c.
1289         (COMMON_OBS): Add producer.o
1290         * amd64-tdep.c (producer.h): Add new include.
1291         * dwarf2read.c (producer.h): Add new include.
1292         * producer.c: New file.
1293         * producer.h: New file.
1294         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1295         producer.c.
1296         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1297         producer.h.
1298
1299 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1300
1301         * configure.ac: Search ncursesw before ncurses.
1302         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1303         * gdb_curses.h: Include <ncursesw/ncurses.h>
1304         * config.in, configure: Regenerate.
1305
1306 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1307
1308         PR gdb/22185
1309         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1310         obsolete.
1311         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1312         Remove i386sol2 support.
1313         * configure.nat <i386sol2>: Remove.
1314         <sol2-64>: Fold into ...
1315         <sol2>: ... this.
1316         Move common settings to default section.
1317         Add sol-thread.o.
1318         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1319         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1320         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1321         <i[34567]86-*-solaris*>: Remove.
1322         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1323
1324         * configure.ac: Remove wctype in libw check.
1325         (_MSE_INT_H): Don't define on Solaris 7-9.
1326         <solaris*>: Remove libthread_db.so.1 check.
1327         * configure: Regenerate.
1328         * config.in: Regenerate.
1329
1330         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1331         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1332         (gdb_ps_size_t): Remove.
1333         Use base types in users.
1334         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1335
1336         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1337
1338 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1339
1340         PR build/22206
1341         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1342         (adi_is_addr_mapped): Likewise.
1343         (PSR_ICC): Don't redefine.
1344         (PSR_IMPL): Likewise.
1345
1346 2017-09-25  Tom Tromey  <tom@tromey.com>
1347
1348         * regcache.c (regcache::dump): Use string_printf.
1349
1350 2017-09-25  Tom Tromey  <tom@tromey.com>
1351
1352         * regcache.c (class regcache_invalidator): New.
1353         (struct register_to_invalidate): Remove.
1354         (make_cleanup_regcache_invalidate): Remove.
1355         (regcache::raw_write): Use regcache_invalidator.
1356
1357 2017-09-25  Tom Tromey  <tom@tromey.com>
1358
1359         * spu-tdep.c (spu2ppu_sniffer): Update.
1360         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1361         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1362         Remove.
1363         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1364         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1365         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1366         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1367         (frame_pop): Update.
1368
1369 2017-09-25  Tom Tromey  <tom@tromey.com>
1370
1371         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1372         * regcache.h (regcache_xfree): Don't declare.
1373         * regcache.c (regcache_xfree): Remove.
1374         (do_regcache_xfree): Use delete.
1375         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1376         * linux-fork.c (free_fork): Use delete.
1377         (fork_save_infrun_state): Likewise.
1378         * jit.c (jit_dealloc_cache): Use delete.
1379         * infrun.c (discard_infcall_suspend_state): Use delete.
1380
1381 2017-09-25  Tom Tromey  <tom@tromey.com>
1382
1383         * regcache.h (regcache_xmalloc): Don't declare.
1384         (regcache_raw_set_cached_value): Update comment.
1385         * regcache.c (regcache_xmalloc): Remove.
1386         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1387         * jit.c (jit_frame_sniffer): Use new.
1388         * frame.c (frame_save_as_regcache): Use new.
1389
1390 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1391
1392         * NEWS: Advertise support for guarded-storage registers on IBM z.
1393
1394 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1395
1396         * s390-linux-nat.c (have_regset_gs): New static variable.
1397         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1398         control block and guarded-storage broadcast control regsets.
1399         (s390_read_description): Detect whether the target has
1400         guarded-storage support, return appropriate tdesc.
1401         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1402         (features/s390x-gs-linux64.c): Likewise.
1403         (struct gdbarch_tdep) <have_gs>: New field.
1404         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1405         (s390_gsbc_regset): New variables.
1406         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1407         and s390_gsbc_regset, if applicable.
1408         (s390_core_read_description): Check whether core file was from a
1409         target with guarded-storage support; include appropriate regsets.
1410         (s390_gdbarch_init): Add registers for guarded-storage support.
1411         (_initialize_s390_tdep): Initialize new target descriptions that
1412         include registers for guarded-storage support.
1413         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1414         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1415         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1416         (S390_NUM_REGS): Adjust macro definition.
1417         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1418         (tdesc_s390x_gs_linux64): New declarations.
1419
1420 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1421
1422         * features/s390-gs-linux64.xml: New file.
1423         * features/s390-gs.xml: New file.
1424         * features/s390-gsbc.xml: New file.
1425         * features/s390x-gs-linux64.xml: New file.
1426         * features/Makefile (WHICH): Add s390-gs-linux64 and
1427         s390x-gs-linux64.
1428         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1429         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1430         * features/s390-gs-linux64.c: New generated file.
1431         * features/s390x-gs-linux64.c: New file.
1432         * regformats/s390-gs-linux64.dat: New file.
1433         * regformats/s390x-gs-linux64.dat: New file.
1434
1435 2017-09-23  Tom Tromey  <tom@tromey.com>
1436
1437         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1438
1439 2017-09-22  Tom Tromey  <tom@tromey.com>
1440
1441         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1442         type to scoped_restore_tmpl.
1443         <scoped_input_handler>: Initialize m_quit_handler directly.
1444
1445 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1446
1447         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1448         (cd_command): Likewise.  Free "current_directory" before
1449         assigning to it.
1450         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1451         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1452         * top.c (gdb_dirbuf): Remove global declaration.
1453         * top.h (gdb_dirbuf): Likewise.
1454
1455 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1456
1457         * gnulib/aclocal.m4: Regenerate.
1458         * gnulib/config.in: Regenerate.
1459         * gnulib/configure: Regenerate.
1460         * gnulib/import/Makefile.am: Regenerate.
1461         * gnulib/import/Makefile.in: Regenerate.
1462         * gnulib/import/assure.h: New file.
1463         * gnulib/import/at-func.c: Likewise
1464         * gnulib/import/chdir-long.c: New file.
1465         * gnulib/import/chdir-long.h: New file.
1466         * gnulib/import/cloexec.c: New file.
1467         * gnulib/import/cloexec.h: New file.
1468         * gnulib/import/close.c: New file.
1469         * gnulib/import/closedir.c: New file.
1470         * gnulib/import/dirent-private.h: New file.
1471         * gnulib/import/dup-safer.c: New file.
1472         * gnulib/import/dup.c: New file.
1473         * gnulib/import/dup2.c: New file.
1474         * gnulib/import/error.c: New file.
1475         * gnulib/import/error.h: New file.
1476         * gnulib/import/exitfail.c: New file.
1477         * gnulib/import/exitfail.h: New file.
1478         * gnulib/import/fchdir.c: New file.
1479         * gnulib/import/fcntl.c: New file.
1480         * gnulib/import/fcntl.in.h: New file.
1481         * gnulib/import/fd-hook.c: New file.
1482         * gnulib/import/fd-hook.h: New file.
1483         * gnulib/import/fd-safer.c: New file.
1484         * gnulib/import/fdopendir.c: New file.
1485         * gnulib/import/filename.h: New file.
1486         * gnulib/import/filenamecat-lgpl.c: New file.
1487         * gnulib/import/filenamecat.h: New file.
1488         * gnulib/import/fstat.c: New file.
1489         * gnulib/import/fstatat.c: New file.
1490         * gnulib/import/getcwd-lgpl.c: New file.
1491         * gnulib/import/getcwd.c: New file.
1492         * gnulib/import/getdtablesize.c: New file.
1493         * gnulib/import/getlogin_r.c: New file.
1494         * gnulib/import/getprogname.c: New file.
1495         * gnulib/import/getprogname.h: New file.
1496         * gnulib/import/gettext.h: New file.
1497         * gnulib/import/glob-libc.h: New file.
1498         * gnulib/import/glob.c: New file.
1499         * gnulib/import/glob.in.h: New file.
1500         * gnulib/import/intprops.h: New file.
1501         * gnulib/import/m4/chdir-long.m4: New file.
1502         * gnulib/import/m4/close.m4: New file.
1503         * gnulib/import/m4/closedir.m4: New file.
1504         * gnulib/import/m4/d-ino.m4: New file.
1505         * gnulib/import/m4/d-type.m4: New file.
1506         * gnulib/import/m4/dup.m4: New file.
1507         * gnulib/import/m4/dup2.m4: New file.
1508         * gnulib/import/m4/error.m4: New file.
1509         * gnulib/import/m4/fchdir.m4: New file.
1510         * gnulib/import/m4/fcntl.m4: New file.
1511         * gnulib/import/m4/fcntl_h.m4: New file.
1512         * gnulib/import/m4/fdopendir.m4: New file.
1513         * gnulib/import/m4/filenamecat.m4: New file.
1514         * gnulib/import/m4/fstat.m4: New file.
1515         * gnulib/import/m4/fstatat.m4: New file.
1516         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1517         * gnulib/import/m4/getcwd-path-max.m4: New file.
1518         * gnulib/import/m4/getcwd.m4: New file.
1519         * gnulib/import/m4/getdtablesize.m4: New file.
1520         * gnulib/import/m4/getlogin_r.m4: New file.
1521         * gnulib/import/m4/getprogname.m4: New file.
1522         * gnulib/import/m4/glob.m4: New file.
1523         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1524         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1525         * gnulib/import/m4/mempcpy.m4: New file.
1526         * gnulib/import/m4/memrchr.m4: New file.
1527         * gnulib/import/m4/mode_t.m4: New file.
1528         * gnulib/import/m4/msvc-inval.m4: New file.
1529         * gnulib/import/m4/msvc-nothrow.m4: New file.
1530         * gnulib/import/m4/open.m4: New file.
1531         * gnulib/import/m4/openat.m4: New file.
1532         * gnulib/import/m4/opendir.m4: New file.
1533         * gnulib/import/m4/readdir.m4: New file.
1534         * gnulib/import/m4/realloc.m4: New file.
1535         * gnulib/import/m4/rewinddir.m4: New file.
1536         * gnulib/import/m4/save-cwd.m4: New file.
1537         * gnulib/import/m4/strdup.m4: New file.
1538         * gnulib/import/m4/strerror.m4: New file.
1539         * gnulib/import/m4/unistd-safer.m4: New file.
1540         * gnulib/import/mempcpy.c: New file.
1541         * gnulib/import/memrchr.c: New file.
1542         * gnulib/import/msvc-inval.c: New file.
1543         * gnulib/import/msvc-inval.h: New file.
1544         * gnulib/import/msvc-nothrow.c: New file.
1545         * gnulib/import/msvc-nothrow.h: New file.
1546         * gnulib/import/open.c: New file.
1547         * gnulib/import/openat-die.c: New file.
1548         * gnulib/import/openat-priv.h: New file.
1549         * gnulib/import/openat-proc.c: New file.
1550         * gnulib/import/openat.c: New file.
1551         * gnulib/import/openat.h: New file.
1552         * gnulib/import/opendir.c: New file.
1553         * gnulib/import/pipe-safer.c: New file.
1554         * gnulib/import/readdir.c: New file.
1555         * gnulib/import/realloc.c: New file.
1556         * gnulib/import/rewinddir.c: New file.
1557         * gnulib/import/save-cwd.c: New file.
1558         * gnulib/import/save-cwd.h: New file.
1559         * gnulib/import/strdup.c: New file.
1560         * gnulib/import/strerror-override.c: New file.
1561         * gnulib/import/strerror-override.h: New file.
1562         * gnulib/import/strerror.c: New file.
1563         * gnulib/import/unistd--.h: New file.
1564         * gnulib/import/unistd-safer.h: New file.
1565         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1566         "getcwd" and "glob".
1567         * ser-tcp.c: Undefine "close" before redefining it.
1568
1569 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1570
1571         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1572         get rid of res_val.
1573
1574 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1575
1576         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1577         <sol2,sparc>: Likewise.
1578         <sol2-64,i386>: Likewise.
1579
1580         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1581         -Wdeprecated-declarations on *-*-solaris*.
1582         * configure: Regenerate.
1583
1584         * procfs.c: Include "nat/inferior.h".
1585         (procfs_info_proc): Fix typo.
1586
1587 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1588
1589         * remote.c (vector): Include.
1590         (struct private_thread_info): Add field, thread_handle.
1591         (free_private_thread_info): Deallocate storage associated with
1592         thread handle.
1593         (get_private_info_thread): Initialize `thread_handle' field.
1594         (struct thread_item): Add field, thread_handle.
1595         (clear_threads_listing_context): Deallocate storage associated
1596         with thread handle.
1597         (start_thread): Add support for "handle" attribute.
1598         (thread_attributes): Add "handle".
1599         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1600         field.
1601         (remote_update_thread_list): Update thread_handle.
1602         (remote_thread_handle_to_thread_info): New function.
1603         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1604
1605 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1606
1607         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1608         function.
1609         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1610         * python/python-internal.h (thread_object_type): Declare.
1611
1612 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1613
1614         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1615         (target_thread_handle_to_thread_info): Declare.
1616         * target.c (target_thread_handle_to_thread_info): New function.
1617         * target-delegates.c: Regenerate.
1618         * gdbthread.h (find_thread_by_handle): Declare.
1619         * thread.c (find_thread_by_handle): New function.
1620         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1621         function.
1622         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1623
1624 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1625
1626         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1627
1628 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1629
1630         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1631
1632 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1633
1634         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1635         to gdb_target_obs.
1636
1637 2017-09-20  Tom Tromey  <tom@tromey.com>
1638
1639         * breakpoint.c (struct counted_command_line): Remove.
1640         (breakpoint_commands): Update.
1641         (alloc_counted_command_line, incref_counted_command_line)
1642         (decref_counted_command_line, do_cleanup_counted_command_line)
1643         (make_cleanup_decref_counted_command_line): Remove.
1644         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1645         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1646         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1647         (save_breakpoints): Update.
1648         * breakpoint.h (counted_command_line): Now a typedef to
1649         shared_ptr.
1650         (struct breakpoint) <commands>: Now a counted_command_line.
1651         (struct bpstats) <command>: Likewise.
1652
1653 2017-09-20  Tom Tromey  <tom@tromey.com>
1654
1655         * breakpoint.c (struct commands_info, do_map_commands_command):
1656         Remove.
1657         (commands_command_1): Update.
1658         (iterate_over_related_breakpoints): Take a function_view.
1659         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1660         (delete_command): Update.
1661         (map_breakpoint_numbers): Take a function_view.
1662         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1663         (disable_command): Update.
1664         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1665         (enable_command): Update.
1666         (struct disp_data, do_enable_breakpoint_disp)
1667         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1668         (do_map_enable_delete_breakpoint): Remove.
1669         (enable_once_command, enable_count_command, enable_delete_command)
1670         (delete_trace_variable_command): Update.
1671
1672 2017-09-20  Tom Tromey  <tom@tromey.com>
1673
1674         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1675         (bpstat_clear): Use delete.
1676         (bpstats): New constructors.
1677         (bpstat_copy, bpstat_stop_status): Use new.
1678         (dprintf_after_condition_true): Update.
1679         * breakpoint.h (bpstats::bpstats): Add constructors.
1680         (bpstats::~bpstats): Add destructor.
1681
1682 2017-09-20  Pedro Alves  <palves@redhat.com>
1683
1684         * eval.c (make_params): Delete, refactored as ...
1685         (class fake_method): ... this new type's ctor.
1686         (fake_method::~fake_method): New.
1687         (evaluate_subexp_standard): Use 'fake_method'.
1688
1689 2017-09-20  Tom Tromey  <tom@tromey.com>
1690
1691         * windows-nat.c (get_windows_debug_event, windows_wait)
1692         (do_initial_windows_stuff, windows_attach): Update.
1693         * utils.c (vwarning, internal_vproblem): Update.
1694         (ui_unregister_input_event_handler_cleanup)
1695         (prepare_to_handle_input): Remove.
1696         (class scoped_input_handler): New.
1697         (defaulted_query, prompt_for_continue): Update.
1698         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1699         Update.
1700         * top.c (undo_terminal_modifications_before_exit): Update.
1701         * target/target.h (target_terminal_init, target_terminal_inferior)
1702         (target_terminal_ours): Don't declare.
1703         (class target_terminal): New.
1704         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1705         (target_terminal_ours_for_output)
1706         (make_cleanup_restore_target_terminal): Don't declare.
1707         (target_terminal_info): Remove.
1708         * target.c (enum terminal_state, terminal_state): Remove.
1709         (target_terminal::terminal_state): Define.
1710         (target_terminal::init): Rename from target_terminal_init.
1711         (target_terminal::inferior): Rename from
1712         target_terminal_inferior.
1713         (target_terminal::ours): Rename from target_terminal_ours.
1714         (target_terminal::ours_for_output): Rename from
1715         target_terminal_ours_for_output.
1716         (target_terminal::info): New method.
1717         (cleanup_restore_target_terminal)
1718         (make_cleanup_restore_target_terminal): Remove.
1719         * solib.c (handle_solib_event): Update.
1720         * remote.c (remote_serial_quit_handler): Update.
1721         (remote_terminal_inferior, remote_wait_as): Update.
1722         * record-full.c (record_full_wait_1): Update.
1723         * nto-procfs.c (procfs_create_inferior): Update.
1724         * nat/fork-inferior.c (startup_inferior): Update.
1725         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1726         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1727         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1728         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1729         (mi_breakpoint_created, mi_breakpoint_deleted)
1730         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1731         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1732         (mi_user_selected_context_changed, report_initial_inferior):
1733         Update.
1734         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1735         (linux_nat_terminal_inferior): Update.
1736         * infrun.c (follow_fork_inferior)
1737         (handle_vfork_child_exec_or_exit, do_target_resume)
1738         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1739         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1740         Update.
1741         * inflow.c (child_terminal_init, info_terminal_command): Update.
1742         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1743         (attach_command): Update.
1744         * infcall.c (call_thread_fsm_should_stop): Update.
1745         * gnu-nat.c (gnu_attach): Update.
1746         * extension.c (struct active_ext_lang_state)
1747         (restore_active_ext_lang): Update.
1748         * exceptions.c (print_flush): Update.
1749         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1750         (struct quit_handler_cleanup_data, restore_quit_handler)
1751         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1752         Remove.
1753         * cp-support.c (gdb_demangle): Update.
1754         * breakpoint.c (update_inserted_breakpoint_locations)
1755         (insert_breakpoint_locations, handle_jit_event)
1756         (disable_breakpoints_in_unloaded_shlib): Update.
1757         * annotate.c (annotate_breakpoints_invalid)
1758         (annotate_frames_invalid): Update.
1759
1760 2017-09-20  Tom Tromey  <tom@tromey.com>
1761
1762         * main.c (catch_command_errors): Rename from
1763         catch_command_errors_const.
1764         (captured_main_1): Update.
1765
1766 2017-09-20  Pedro Alves  <palves@redhat.com>
1767
1768         * cli/cli-cmds.c (list_command): Use print_sal_location.
1769         (print_sal_location): New function.
1770         (ambiguous_line_spec): Use print_sal_location.
1771         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1772         * symtab.c (find_function_start_sal): Likewise.
1773         * symtab.h (symtab_and_line::symbol): New field.
1774
1775 2017-09-20  Pedro Alves  <palves@redhat.com>
1776
1777         * linespec.c (minsym_found): Handle non-text minsyms.
1778         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1779
1780 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1781
1782         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1783         backslash.
1784
1785 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1786
1787         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1788         vmovups instead vmovaps.
1789         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1790
1791 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1792
1793         * NEWS (Changes since GDB 8.0): Add starti.
1794         * infcmd.c (enum run_break): New.
1795         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1796         case.
1797         (run_command): Use enum run_how.
1798         (start_command): Likewise.
1799         (starti_command): New function.
1800         (RUN_ARGS_HELP): New macro.
1801         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1802         commands.  Add starti command.
1803
1804 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1805
1806         * Makefile.in (monitor.o): Remove the rule.
1807
1808 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1809
1810         * annotate.h (struct annotate_arg_emitter): Use
1811         DISABLE_COPY_AND_ASSIGN.
1812         * common/refcounted-object.h (refcounted_object): Likewise.
1813         * completer.h (struct completion_result): Likewise.
1814         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1815         * filename-seen-cache.h (filename_seen_cache): Likewise.
1816         * gdbcore.h (thread_section_name): Likewise.
1817         * gdb_regex.h (compiled_regex): Likewise.
1818         * gdbthread.h (scoped_restore_current_thread): Likewise.
1819         * inferior.h (scoped_restore_current_inferior): Likewise.
1820         * jit.c (jit_reader): Likewise.
1821         * linespec.h (struct linespec_result): Likewise.
1822         * mi/mi-parse.h (struct mi_parse): Likewise.
1823         * nat/fork-inferior.c (execv_argv): Likewise.
1824         * progspace.h (scoped_restore_current_program_space): Likewise.
1825         * python/python-internal.h (class gdbpy_enter): Likewise.
1826         * regcache.h (regcache): Likewise.
1827         * target-descriptions.c (struct tdesc_reg): Likewise.
1828         (struct tdesc_type): Likewise.
1829         (struct tdesc_feature): Likewise.
1830         * ui-out.h (ui_out_emit_type): Likewise.
1831
1832 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1833
1834         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1835         label abort_expression.
1836
1837 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1838
1839         * common/buffer.c (buffer_xml_printf): Adjust.
1840         * common/xml-utils.c (xml_escape_text): Change return type to
1841         std::string, update code accordingly.
1842         * common/xml-utils.h (xml_escape_text): Change return type to
1843         std::string.
1844         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1845         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1846         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1847         Adjust.
1848
1849 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1850
1851         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1852         (SUBDIR_UNITTESTS_OBS): Add new object file.
1853         * unittests/xml-utils-selftests.c: New file.
1854
1855 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1856
1857         * common/selftest.h (selftest): New struct/interface.
1858         (register_test): Add name parameter, add new overload.
1859         (run_tests): Add filter parameter.
1860         (for_each_selftest_ftype): New typedef.
1861         (for_each_selftest): New declaration.
1862         * common/selftest.c (tests): Change type to
1863         map<string, unique_ptr<selftest>>.
1864         (simple_selftest): New struct.
1865         (register_test): New function.
1866         (register_test): Add name parameter and use it.
1867         (run_tests): Add filter parameter and use it.  Add prints.
1868         Adjust to vector -> map change.
1869         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1870         registering selftests.
1871         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1872         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1873         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1874         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1875         * findvar.c (_initialize_findvar): Likewise.
1876         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1877         * maint.c (maintenance_selftest): Update call to run_tests.
1878         (maintenance_info_selftests): New function.
1879         (_initialize_maint_cmds): Register "maintenance info selftests"
1880         command.  Update "maintenance selftest" doc.
1881         * regcache.c (_initialize_regcache): Add names when registering
1882         selftests.
1883         * rust-exp.y (_initialize_rust_exp): Likewise.
1884         * selftest-arch.c (gdbarch_selftest): New struct.
1885         (gdbarch_tests): Remove.
1886         (register_test_foreach_arch): Add name parameter.  Call
1887         register_test.
1888         (tests_with_arch): Remove, move most content to
1889         gdbarch_selftest::operator().
1890         (_initialize_selftests_foreach_arch): Remove.
1891         * selftest-arch.h (register_test_foreach_arch): Add name
1892         parameter.
1893         (run_tests_with_arch): New declaration.
1894         * utils-selftests.c (_initialize_utils_selftests): Add names
1895         when registering selftests.
1896         * utils.c (_initialize_utils): Likewise.
1897         * unittests/array-view-selftests.c
1898         (_initialize_array_view_selftests): Likewise.
1899         * unittests/environ-selftests.c (_initialize_environ_selftests):
1900         Likewise.
1901         * unittests/function-view-selftests.c
1902         (_initialize_function_view_selftests): Likewise.
1903         * unittests/offset-type-selftests.c
1904         (_initialize_offset_type_selftests): Likewise.
1905         * unittests/optional-selftests.c
1906         (_initialize_optional_selftests): Likewise.
1907         * unittests/scoped_restore-selftests.c
1908         (_initialize_scoped_restore_selftests): Likewise.
1909         * NEWS: Document "maintenance selftest" and "maint info
1910         selftests".
1911
1912 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1913
1914         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1915         scoped_restore.
1916
1917 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1918
1919         * mi/mi-main.c (mi_load_progress): Make uiout variable
1920         a unique_ptr.
1921
1922 2017-09-15  Pedro Alves  <palves@redhat.com>
1923
1924         * compile/compile-c-types.c (convert_enum, convert_int)
1925         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1926
1927 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1928
1929         * dwarf2read.c (copy_string): Remove.
1930         (parse_macro_definition): Replace copy_string with savestring.
1931
1932 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1933
1934         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1935         gdb_target_obs.
1936         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1937         Likewise.
1938         (i[34567]86-*-linux*): Likewise.
1939
1940 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1941
1942         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1943         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1944         <stack>: Change type to std::vector.
1945         <stack_len, stack_allocated>: Remove.
1946         <grow_stack>: Remove.
1947         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1948         (dwarf_expr_context::~dwarf_expr_context): Remove.
1949         (dwarf_expr_context::grow_stack): Remove.
1950         (dwarf_expr_context::push): Adjust.
1951         (dwarf_expr_context::pop): Adjust.
1952         (dwarf_expr_context::fetch): Adjust.
1953         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1954         (dwarf_expr_context::stack_empty_p): Adjust.
1955         (dwarf_expr_context::execute_stack_op): Adjust.
1956
1957 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1958
1959         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1960         return type to bool.
1961         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1962
1963 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1964
1965         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1966         Change type to bool.
1967         (dwarf_stack_value) <in_stack_memory>: Likewise.
1968         (dwarf_expr_context) <push_address>: Change parameter type to
1969         bool.
1970         <fetch_in_stack_memory>: Change return type to bool.
1971         <push>: Change parameter type to bool.
1972         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1973         to bool.
1974         (dwarf_expr_context::push_address): Likewise.
1975         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1976         to bool.
1977         (dwarf_expr_context::execute_stack_op): Adjust.
1978         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1979
1980 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1981
1982         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1983         (struct dwarf_expr_context) <n_pieces>: Remove.
1984         <pieces>: Change type to std::vector.
1985         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1986         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1987         pieces.
1988         (dwarf_expr_context::add_piece): Adjust.
1989         * dwarf2loc.c (struct piece_closure): Initialize fields.
1990         <n_pieces>: Remove.
1991         <pieces>: Change type to std::vector.
1992         (allocate_piece_closure): Adjust, change parameter to
1993         std::vector rvalue and std::move it to piece_closure.
1994         (rw_pieced_value): Adjust.
1995         (check_pieced_synthetic_pointer): Adjust.
1996         (indirect_synthetic_pointer): Adjust.
1997         (coerce_pieced_ref): Adjust.
1998         (free_pieced_value_closure):  Adjust.  Use delete to free
1999         piece_closure.
2000         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2001         to allocate_piece_closure.
2002         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2003
2004 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2005
2006         * probe.h (probe_ops_cp): Remove typedef.
2007         (DEF_VEC_P (probe_ops_cp)): Remove.
2008         (all_probe_ops): Change type to std::vector.
2009         * probe.c (info_probes_for_ops): Adjust to vector change.
2010         (probe_linespec_to_ops): Likewise.
2011         (all_probe_ops): Change type to std::vector.
2012         (_initialize_probe): Adjust to vector change.
2013         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2014         * elfread.c (elf_get_probes): Likewise.
2015         * stap-probe.c (_initialize_stap_probe): Likewise.
2016
2017 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2018
2019         * probe.h (struct bound_probe): Define constructors.
2020         * probe.c (bound_probe_s): Remove typedef.
2021         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2022         (collect_probes): Change return type to std::vector, remove
2023         cleanup.
2024         (compare_probes): Return bool, change parameter type.  Change
2025         semantic to "less than".
2026         (gen_ui_out_table_header_info): Change parameter to std::vector
2027         and update.
2028         (exists_probe_with_pops): Likewise.
2029         (info_probes_for_ops): Update to std::vector change.
2030         (enable_probes_command): Likewise.
2031         (disable_probes_command): Likewise.
2032
2033 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2034
2035         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2036         vec to std::vector.
2037         * probe.c (parse_probes_in_pspace): Update.
2038         (find_probes_in_objfile): Update.
2039         (find_probe_by_pc): Update.
2040         (collect_probes): Update.
2041         (probe_any_get_probes): Update.
2042         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2043         return type to reference to std::vector.
2044         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2045         std::vector and update.
2046         (dtrace_process_dof): Likewise.
2047         (dtrace_get_probes): Likewise.
2048         * elfread.c (elf_get_probes): Change return type to std::vector,
2049         store an std::vector in bfd_data.
2050         (probe_key_free): Update to std::vector.
2051         * stap-probe.c (handle_stap_probe): Change parameter to
2052         std::vector and update.
2053         (stap_get_probes): Likewise.
2054         * symfile-debug.c (debug_sym_get_probes): Change return type to
2055         std::vector and update.
2056
2057 2017-09-11  Tom Tromey  <tom@tromey.com>
2058
2059         * breakpoint.c (program_breakpoint_here_p): Update.
2060         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2061         from make_show_memory_breakpoints_cleanup.  Return a
2062         scoped_restore_tmpl<int>.
2063         (restore_show_memory_breakpoints): Remove.
2064         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2065         * mem-break.c (memory_validate_breakpoint): Update.
2066         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2067         (ia64_memory_remove_breakpoint): Update.
2068         (ia64_breakpoint_from_pc): Update.
2069         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2070         from make_show_memory_breakpoints_cleanup.
2071
2072 2017-09-11  Tom Tromey  <tom@tromey.com>
2073
2074         * d-namespace.c (d_lookup_symbol): Use std::string.
2075         (find_symbol_in_baseclass): Likewise.
2076
2077 2017-09-11  Tom Tromey  <tom@tromey.com>
2078
2079         * ctf.c (ctf_start): Use std::string.
2080
2081 2017-09-11  Tom Tromey  <tom@tromey.com>
2082
2083         * ada-lang.c (is_known_support_routine): Update.
2084         (ada_unhandled_exception_name_addr_from_raise): Update.
2085         * guile/scm-frame.c (gdbscm_frame_name): Update.
2086         * python/py-frame.c (frapy_name): Update.
2087         (frapy_function): Update.
2088         * stack.h (find_frame_funname): Update.
2089         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2090         (print_frame): Update.
2091
2092 2017-09-11  Tom Tromey  <tom@tromey.com>
2093
2094         * findcmd.c (put_bits): Take a gdb::byte_vector.
2095         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2096         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2097         cleanups.
2098         (find_command): Update.
2099
2100 2017-09-11  Tom Tromey  <tom@tromey.com>
2101
2102         * cli/cli-script.c (class scoped_restore_hook_in): New.
2103         (clear_hook_in_cleanup): Remove.
2104         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2105         scoped_restore_hook_in.
2106
2107 2017-09-11  Tom Tromey  <tom@tromey.com>
2108
2109         * cli/cli-script.c (restore_interp): Remove.
2110         (read_command_lines): Use scoped_restore_interp.
2111         * interps.c (scoped_restore_interp::set_temp): Rename from
2112         interp_set_temp.
2113         * interps.h (class scoped_restore_interp): New.
2114         (interp_set_temp): Remove.
2115
2116 2017-09-11  Tom Tromey  <tom@tromey.com>
2117
2118         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2119         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2120         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2121         scoped_restore.
2122         (mi_cmd_break_insert_1): Update.
2123         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2124         scoped_restore.
2125
2126 2017-09-11  Tom Tromey  <tom@tromey.com>
2127
2128         * demangle.c (demangle_command): Update.
2129         * breakpoint.c (disable_command): Update.
2130         (enable_command): Update.
2131         (find_location_by_number): Make "number" const.  Use
2132         get_number_trailer.
2133         * cli/cli-utils.c (extract_arg): Return std::string.
2134         * probe.c (parse_probe_linespec): Update.  Change types.
2135         (collect_probes): Take string arguments.
2136         (parse_probe_linespec): Likewise.
2137         (info_probes_for_ops): Update.
2138         (enable_probes_command): Update.
2139         (disable_probes_command): Update.
2140         * break-catch-sig.c (catch_signal_split_args): Update.
2141         * mi/mi-parse.c (mi_parse): Update.
2142
2143 2017-09-11  Tom Tromey  <tom@tromey.com>
2144
2145         * language.h (language_enum): Make argument const.
2146         * language.c (language_enum): Make argument const.
2147
2148 2017-09-11  Tom Tromey  <tom@tromey.com>
2149
2150         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2151         as function.
2152         (skip_to_space): Rename from skip_to_space_const.
2153         * common/common-utils.c (skip_to_space): New function.
2154         (skip_to_space): Rename from skip_to_space_const.
2155         * cli/cli-utils.h (get_number): Rename from get_number_const.
2156         (extract_arg): Rename from extract_arg_const.
2157         * cli/cli-utils.c (get_number): Rename from get_number_const.
2158         (extract_arg): Rename from extract_arg_const.
2159         (number_or_range_parser::get_number): Use ::get_number.
2160         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2161         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2162         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2163         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2164         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2165         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2166         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2167         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2168
2169 2017-09-11  Tom Tromey  <tom@tromey.com>
2170
2171         * python/python.c (do_start_initialization): Use
2172         py-event-types.def to initialize types.
2173         Define all object type structures.
2174         * python/python-internal.h: Don't declare event initialization
2175         functions.
2176         * python/py-threadevent.c (thread_event_object_type): Don't
2177         define.
2178         * python/py-stopevent.c (stop_event_object_type): Don't define.
2179         * python/py-signalevent.c (signal_event_object_type): Don't
2180         declare or define.
2181         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2182         (clear_objfiles_event_object_type): Don't declare or define.
2183         * python/py-infevents.c (inferior_call_pre_event_object_type)
2184         (inferior_call_post_event_object_type)
2185         (register_changed_event_object_type)
2186         (memory_changed_event_object_type): Don't declare or define.
2187         * python/py-inferior.c (new_thread_event_object_type)
2188         (new_inferior_event_object_type)
2189         (inferior_deleted_event_object_type): Don't declare or define.
2190         * python/py-exitedevent.c (exited_event_object_type): Don't
2191         declare or define.
2192         * python/py-evts.c (gdbpy_initialize_py_events): Use
2193         py-all-events.def.
2194         * python/py-events.h (thread_event_object_type): Don't declare.
2195         (events_object): Use py-all-events.def.
2196         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2197         py-event-types.def.
2198         * python/py-event-types.def: New file.
2199         * python/py-continueevent.c (create_continue_event_object): Don't
2200         declare or define.
2201         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2202         declare or define.
2203         * python/py-all-events.def: New file.
2204
2205 2017-09-11  Tom Tromey  <tom@tromey.com>
2206
2207         * python/py-threadevent.c (create_thread_event_object): Return
2208         gdbpy_ref.
2209         * python/py-stopevent.h (create_stop_event_object)
2210         (create_breakpoint_event_object, create_signal_event_object):
2211         Update.
2212         * python/py-stopevent.c (create_stop_event_object): Return
2213         gdbpy_ref.
2214         (emit_stop_event): Update.
2215         * python/py-signalevent.c (create_signal_event_object): Return
2216         gdbpy_ref.
2217         * python/py-infevents.c (create_inferior_call_event_object):
2218         Update.
2219         * python/py-event.h (create_event_object)
2220         (create_thread_event_object): Update.
2221         * python/py-event.c (create_event_object): Return gdbpy_ref.
2222         * python/py-continueevent.c: Return gdbpy_ref.
2223         * python/py-bpevent.c (create_breakpoint_event_object): Return
2224         gdbpy_ref.
2225
2226 2017-09-11  Tom Tromey  <tom@tromey.com>
2227
2228         PR python/15622:
2229         * NEWS: Add entry.
2230         * python/python.c (do_start_initialization): Initialize new event
2231         types.
2232         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2233         (gdbpy_initialize_inferior_deleted_event)
2234         (gdbpy_initialize_new_thread_event): Declare.
2235         * python/py-threadevent.c (create_thread_event_object): Add option
2236         "thread" parameter.
2237         * python/py-inferior.c (new_thread_event_object_type)
2238         (new_inferior_event_object_type)
2239         (inferior_deleted_event_object_type): Declare.
2240         (python_new_inferior, python_inferior_deleted): New functions.
2241         (add_thread_object): Emit new_thread event.
2242         (gdbpy_initialize_inferior): Attach new functions to corresponding
2243         observers.
2244         (new_thread, new_inferior, inferior_deleted): Define new event
2245         types.
2246         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2247         registries.
2248         * python/py-events.h (events_object) <new_inferior,
2249         inferior_deleted, new_thread>: New fields.
2250         * python/py-event.h (create_thread_event_breakpoint): Add optional
2251         "thread" parameter.
2252
2253 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2254
2255         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2256         check current_ui instead.
2257         (internal_vproblem): Likewise.
2258
2259 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2260
2261         * thread.c (print_thread_info_1): Remove unnecessary calls to
2262         uiout->is_mi_like_p.
2263
2264 2017-09-09  Tom Tromey  <tom@tromey.com>
2265
2266         * namespace.h (add_using_directive): Update.
2267         * namespace.c (add_using_directive): Change type of excludes to
2268         std::vector.
2269         * dwarf2read.c (read_import_statement): Use std::vector.
2270         (read_namespace): Update.
2271         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2272
2273 2017-09-09  Tom Tromey  <tom@tromey.com>
2274
2275         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2276
2277 2017-09-09  Tom Tromey  <tom@tromey.com>
2278
2279         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2280
2281 2017-09-09  Tom Tromey  <tom@tromey.com>
2282
2283         * stack.c (func_command): Use gdb::def_vector.
2284
2285 2017-09-09  Tom Tromey  <tom@tromey.com>
2286
2287         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2288         ui_out_emit_list, ui_out_emit_tuple.
2289         (mi_cmd_var_update): Likewise.
2290
2291 2017-09-09  Tom Tromey  <tom@tromey.com>
2292
2293         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2294         ui_out_redirect_pop.
2295         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2296         ui_out_redirect_pop.
2297         * utils.c (do_ui_out_redirect_pop)
2298         (make_cleanup_ui_out_redirect_pop): Remove.
2299         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2300         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2301         * ui-out.h (ui_out_redirect_pop): New class.
2302
2303 2017-09-09  Tom Tromey  <tom@tromey.com>
2304
2305         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2306         (list_available_thread_groups, mi_cmd_list_thread_groups)
2307         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2308         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2309         Likewise.
2310
2311 2017-09-09  Tom Tromey  <tom@tromey.com>
2312
2313         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2314         ui_out_emit_tuple.
2315
2316 2017-09-09  Tom Tromey  <tom@tromey.com>
2317
2318         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2319         * stack.c (print_frame): Use ui_out_emit_tuple.
2320         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2321         (info_spu_mailbox_command, info_spu_dma_command)
2322         (info_spu_proxydma_command): Likewise.
2323         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2324         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2325         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2326         ui_out_emit_tuple.
2327         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2328
2329 2017-09-09  Tom Tromey  <tom@tromey.com>
2330
2331         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2332         (class ui_out_emit_table): Update comment.
2333         * ui-out.c (do_cleanup_table_end)
2334         (make_cleanup_ui_out_table_begin_end): Remove.
2335         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2336         (info_spu_dma_cmdlist): Likewise.
2337         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2338         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2339         ui_out_emit_table.
2340
2341 2017-09-09  Tom Tromey  <tom@tromey.com>
2342
2343         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2344         ui_out_emit_list, gdb::optional.
2345
2346 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2347
2348         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2349         prototype.
2350         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2351         prototype.
2352         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2353         prototype.
2354         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2355         * ada-exp.y: Remove _initialize_ada_exp prototype.
2356         * ada-lang.c: Remove _initialize_ada_language prototype.
2357         * ada-tasks.c: Remove _initialize_tasks prototype.
2358         * addrmap.c: Remove _initialize_addrmap prototype.
2359         * agent.c: Remove _initialize_agent prototype.
2360         * aix-thread.c: Remove _initialize_aix_thread prototype.
2361         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2362         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2363         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2364         prototype.
2365         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2366         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2367         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2368         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2369         prototype.
2370         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2371         prototype.
2372         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2373         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2374         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2375         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2376         prototype.
2377         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2378         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2379         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2380         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2381         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2382         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2383         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2384         prototype.
2385         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2386         prototype.
2387         * annotate.c: Remove _initialize_annotate prototype.
2388         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2389         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2390         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2391         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2392         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2393         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2394         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2395         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2396         prototype.
2397         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2398         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2399         * auto-load.c: Remove _initialize_auto_load prototype.
2400         * auxv.c: Remove _initialize_auxv prototype.
2401         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2402         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2403         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2404         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2405         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2406         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2407         prototype.
2408         * break-catch-throw.c: Remove _initialize_break_catch_throw
2409         prototype.
2410         * breakpoint.c: Remove _initialize_breakpoint prototype.
2411         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2412         * btrace.c: Remove _initialize_btrace prototype.
2413         * charset.c: Remove _initialize_charset prototype.
2414         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2415         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2416         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2417         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2418         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2419         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2420         * coffread.c: Remove _initialize_coffread prototype.
2421         * compile/compile.c: Remove _initialize_compile prototype.
2422         * complaints.c: Remove _initialize_complaints prototype.
2423         * completer.c: Remove _initialize_completer prototype.
2424         * copying.awk: Remove _initialize_copying prototype.
2425         * copying.c: Regenerate.
2426         * core-regset.c: Remove _initialize_core_regset prototype.
2427         * corefile.c: Remove _initialize_core prototype.
2428         * corelow.c: Remove _initialize_corelow prototype.
2429         * cp-abi.c: Remove _initialize_cp_abi prototype.
2430         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2431         * cp-support.c: Remove _initialize_cp_support prototype.
2432         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2433         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2434         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2435         * ctf.c: Remove _initialize_ctf prototype.
2436         * d-lang.c: Remove _initialize_d_language prototype.
2437         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2438         prototype.
2439         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2440         * dbxread.c: Remove _initialize_dbxread prototype.
2441         * dcache.c: Remove _initialize_dcache prototype.
2442         * demangle.c: Remove _initialize_demangler prototype.
2443         * disasm-selftests.c: Remove _initialize_disasm_selftests
2444         prototype.
2445         * disasm.c: Remove _initialize_disasm prototype.
2446         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2447         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2448         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2449         prototype.
2450         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2451         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2452         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2453         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2454         * elfread.c: Remove _initialize_elfread prototype.
2455         * exec.c: Remove _initialize_exec prototype.
2456         * extension.c: Remove _initialize_extension prototype.
2457         * f-lang.c: Remove _initialize_f_language prototype.
2458         * f-valprint.c: Remove _initialize_f_valprint prototype.
2459         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2460         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2461         * filesystem.c: Remove _initialize_filesystem prototype.
2462         * findcmd.c: Remove _initialize_mem_search prototype.
2463         * fork-child.c: Remove _initialize_fork_child prototype.
2464         * frame-base.c: Remove _initialize_frame_base prototype.
2465         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2466         * frame.c: Remove _initialize_frame prototype.
2467         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2468         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2469         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2470         * gcore.c: Remove _initialize_gcore prototype.
2471         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2472         * gdbarch.c: Regenerate.
2473         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2474         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2475         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2476         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2477         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2478         * go-lang.c: Remove _initialize_go_language prototype.
2479         * go32-nat.c: Remove _initialize_go32_nat prototype.
2480         * guile/guile.c: Remove _initialize_guile prototype.
2481         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2482         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2483         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2484         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2485         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2486         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2487         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2488         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2489         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2490         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2491         prototype.
2492         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2493         prototype.
2494         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2495         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2496         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2497         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2498         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2499         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2500         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2501         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2502         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2503         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2504         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2505         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2506         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2507         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2508         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2509         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2510         prototype.
2511         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2512         prototype.
2513         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2514         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2515         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2516         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2517         * infcall.c: Remove _initialize_infcall prototype.
2518         * infcmd.c: Remove _initialize_infcmd prototype.
2519         * inferior.c: Remove _initialize_inferiors prototype.
2520         * inflow.c: Remove _initialize_inflow prototype.
2521         * infrun.c: Remove _initialize_infrun prototype.
2522         * interps.c: Remove _initialize_interpreter prototype.
2523         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2524         * jit.c: Remove _initialize_jit prototype.
2525         * language.c: Remove _initialize_language prototype.
2526         * linux-fork.c: Remove _initialize_linux_fork prototype.
2527         * linux-nat.c: Remove _initialize_linux_nat prototype.
2528         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2529         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2530         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2531         * m2-lang.c: Remove _initialize_m2_language prototype.
2532         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2533         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2534         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2535         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2536         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2537         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2538         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2539         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2540         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2541         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2542         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2543         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2544         * machoread.c: Remove _initialize_machoread prototype.
2545         * macrocmd.c: Remove _initialize_macrocmd prototype.
2546         * macroscope.c: Remove _initialize_macroscope prototype.
2547         * maint.c: Remove _initialize_maint_cmds prototype.
2548         * mdebugread.c: Remove _initialize_mdebugread prototype.
2549         * memattr.c: Remove _initialize_mem prototype.
2550         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2551         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2552         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2553         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2554         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2555         * microblaze-linux-tdep.c: Remove
2556         _initialize_microblaze_linux_tdep prototype.
2557         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2558         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2559         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2560         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2561         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2562         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2563         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2564         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2565         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2566         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2567         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2568         prototype.
2569         * mipsread.c: Remove _initialize_mipsread prototype.
2570         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2571         prototype.
2572         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2573         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2574         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2575         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2576         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2577         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2578         prototype.
2579         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2580         * nto-procfs.c: Remove _initialize_procfs prototype.
2581         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2582         * objc-lang.c: Remove _initialize_objc_language prototype.
2583         * objfiles.c: Remove _initialize_objfiles prototype.
2584         * observer.c: Remove observer_test_first_notification_function,
2585         observer_test_second_notification_function,
2586         observer_test_third_notification_function, and
2587         _initialize_observer prototypes.
2588         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2589         * osabi.c: Remove _initialize_gdb_osabi prototype.
2590         * osdata.c: Remove _initialize_osdata prototype.
2591         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2592         * parse.c: Remove _initialize_parse prototype.
2593         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2594         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2595         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2596         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2597         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2598         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2599         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2600         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2601         * printcmd.c: Remove _initialize_printcmd prototype.
2602         * probe.c: Remove _initialize_probe prototype.
2603         * proc-api.c: Remove _initialize_proc_api prototype.
2604         * proc-events.c: Remove _initialize_proc_events prototype.
2605         * proc-service.c: Remove _initialize_proc_service prototype.
2606         * procfs.c: Remove _initialize_procfs prototype.
2607         * psymtab.c: Remove _initialize_psymtab prototype.
2608         * python/python.c: Remove _initialize_python prototype.
2609         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2610         * record-btrace.c: Remove _initialize_record_btrace prototype.
2611         * record-full.c: Remove _initialize_record_full prototype.
2612         * record.c: Remove _initialize_record prototype.
2613         * regcache.c: Remove _initialize_regcache prototype.
2614         * reggroups.c: Remove _initialize_reggroup prototype.
2615         * remote-notif.c: Remove _initialize_notif prototype.
2616         * remote-sim.c: Remove _initialize_remote_sim prototype.
2617         * remote.c: Remove _initialize_remote prototype.
2618         * reverse.c: Remove _initialize_reverse prototype.
2619         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2620         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2621         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2622         prototype.
2623         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2624         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2625         * rust-exp.y: Remove _initialize_rust_exp prototype.
2626         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2627         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2628         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2629         * score-tdep.c: Remove _initialize_score_tdep prototype.
2630         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2631         prototype.
2632         * ser-go32.c: Remove _initialize_ser_dos prototype.
2633         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2634         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2635         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2636         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2637         * serial.c: Remove _initialize_serial prototype.
2638         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2639         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2640         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2641         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2642         * skip.c: Remove _initialize_step_skip prototype.
2643         * sol-thread.c: Remove _initialize_sol_thread prototype.
2644         * solib-aix.c: Remove _initialize_solib_aix prototype.
2645         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2646         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2647         * solib-frv.c: Remove _initialize_frv_solib prototype.
2648         * solib-spu.c: Remove _initialize_spu_solib prototype.
2649         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2650         * solib-target.c: Remove _initialize_solib_target prototype.
2651         * solib.c: Remove _initialize_solib prototype.
2652         * source.c: Remove _initialize_source prototype.
2653         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2654         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2655         prototype.
2656         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2657         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2658         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2659         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2660         prototype.
2661         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2662         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2663         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2664         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2665         prototype.
2666         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2667         prototype.
2668         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2669         prototype.
2670         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2671         prototype.
2672         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2673         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2674         prototype.
2675         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2676         prototype.
2677         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2678         prototype.
2679         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2680         prototype.
2681         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2682         prototype.
2683         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2684         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2685         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2686         * stabsread.c: Remove _initialize_stabsread prototype.
2687         * stack.c: Remove _initialize_stack prototype.
2688         * stap-probe.c: Remove _initialize_stap_probe prototype.
2689         * std-regs.c: Remove _initialize_frame_reg prototype.
2690         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2691         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2692         * symfile.c: Remove _initialize_symfile prototype.
2693         * symmisc.c: Remove _initialize_symmisc prototype.
2694         * symtab.c: Remove _initialize_symtab prototype.
2695         * target-dcache.c: Remove _initialize_target_dcache prototype.
2696         * target-descriptions.c: Remove _initialize_target_descriptions
2697         prototype.
2698         * thread.c: Remove _initialize_thread prototype.
2699         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2700         prototype.
2701         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2702         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2703         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2704         prototype.
2705         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2706         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2707         * tracefile.c: Remove _initialize_tracefile prototype.
2708         * tracepoint.c: Remove _initialize_tracepoint prototype.
2709         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2710         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2711         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2712         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2713         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2714         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2715         * tui/tui.c: Remove _initialize_tui prototype.
2716         * typeprint.c: Remove _initialize_typeprint prototype.
2717         * user-regs.c: Remove _initialize_user_regs prototype.
2718         * utils.c: Remove _initialize_utils prototype.
2719         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2720         * valarith.c: Remove _initialize_valarith prototype.
2721         * valops.c: Remove _initialize_valops prototype.
2722         * valprint.c: Remove _initialize_valprint prototype.
2723         * value.c: Remove _initialize_values prototype.
2724         * varobj.c: Remove _initialize_varobj prototype.
2725         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2726         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2727         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2728         * windows-nat.c: Remove _initialize_windows_nat,
2729         _initialize_check_for_gdb_ini, and _initialize_loadable
2730         prototypes.
2731         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2732         * xcoffread.c: Remove _initialize_xcoffread prototype.
2733         * xml-support.c: Remove _initialize_xml_support prototype.
2734         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2735         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2736         prototype.
2737         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2738         prototype.
2739         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2740
2741 2017-09-08  Keith Seitz  <keiths@redhat.com>
2742
2743         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2744         field.
2745
2746 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2747
2748         * f-valprint.c (f_val_print): Remove check for one byte
2749         sized integers. Remove printing of character type.
2750
2751 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2752             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2753             Bernhard Heckel  <bernhard.heckel@intel.com>
2754
2755         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2756         to maintain proper indentation when printing pointers/refs.
2757
2758 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2759
2760         GDB 8.0.1 released.
2761
2762 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2763
2764         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2765
2766 2017-09-05  Tom Tromey  <tom@tromey.com>
2767
2768         * parse.c (funcall_chain): Now a std::vector.
2769         (start_arglist, end_arglist): Simplify.
2770         (free_funcalls): Remove.
2771         (parse_exp_in_context_1): Remove cleanup.
2772
2773 2017-09-05  Tom Tromey  <tom@tromey.com>
2774
2775         * go-exp.y (go_parse): Don't create a cleanup.
2776
2777 2017-09-05  Tom Tromey  <tom@tromey.com>
2778
2779         * d-exp.y (PrimaryExpression): Use std::string.
2780         (d_parse): Don't create a cleanup.
2781
2782 2017-09-05  Tom Tromey  <tom@tromey.com>
2783
2784         * utils.c (do_clear_parser_state): Remove.
2785         (make_cleanup_clear_parser_state): Remove.
2786         * p-exp.y (pascal_parse): Use scoped_restore.
2787         * m2-exp.y (m2_parse): Use scoped_restore.
2788         * f-exp.y (f_parse): Use scoped_restore.
2789         * d-exp.y (d_parse): Use scoped_restore.
2790         * c-exp.y (c_parse): Use scoped_restore.
2791         * ada-exp.y (ada_parse): Use scoped_restore.
2792         * utils.h (make_cleanup_clear_parser_state): Remove.
2793
2794 2017-09-06  Keith Seitz  <keiths@redhat.com>
2795
2796         * dwarf2read.c (dw2_linkage_name_attr): New function.
2797         (dw2_linkage_name): New function.
2798         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2799         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2800         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2801
2802 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2803
2804         * config/djgpp/djconfig.sh: Correct shell portability issue.
2805
2806 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2807
2808         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2809
2810 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2811
2812         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2813         * NEWS: Mention new FreeBSD/mips native configuration.
2814         * configure.host: Add aarch64*-*-freebsd*.
2815         * configure.nat: Likewise.
2816         * aarch64-fbsd-nat.c: New file.
2817
2818 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2819
2820         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2821         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2822         * NEWS: Mention new FreeBSD/aarch64 target.
2823         * configure.tgt: Add aarch64*-*-freebsd*.
2824         * aarch64-fbsd-tdep.c: New file.
2825         * aarch64-fbsd-tdep.h: New file.
2826
2827 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2828
2829         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2830
2831 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2832
2833         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2834         of TLS symbols.
2835
2836 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2837
2838         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2839         call.
2840
2841 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2842
2843         * infrun.c (follow_exec): Call add_thread after
2844         target_find_description.
2845
2846 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2847
2848         * infrun.c (handle_inferior_event_1): When exec'ing, read
2849         stop_pc after follow_exec.
2850
2851 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2852
2853         * remote.c (process_g_packet): Update error message.
2854
2855 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2856
2857         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2858         targets.
2859
2860 2017-09-05  Pedro Alves  <palves@redhat.com>
2861
2862         * eval.c (eval_call, evaluate_funcall): New functions, factored
2863         out from ...
2864         (evaluate_subexp_standard): ... this.
2865
2866 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2867
2868         * amd64-tdep.c (amd64_target_description): Create target
2869         descriptions.
2870         (_initialize_amd64_tdep): Don't call functions
2871         initialize_tdesc_amd64_*.  Add self tests.
2872         * arch/amd64.c (amd64_create_target_description): Add parameter
2873         is_linux.  Call set_tdesc_osabi if is_linux is true.
2874         * arch/amd64.h (amd64_create_target_description): Update the
2875         declaration.
2876         * arch/i386.c (i386_create_target_description): Add parameter
2877         is_linux.  Call set_tdesc_osabi if is_linux is true.
2878         * arch/i386.h (i386_create_target_description): Update
2879         declaration.
2880         * configure.tgt: Add i386.o to gdb_target_obs.
2881         * features/Makefile (XMLTOC): Remove i386/*.xml.
2882         * features/i386/amd64-avx-avx512.c: Remove.
2883         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2884         * features/i386/amd64-avx-mpx.c: Remove.
2885         * features/i386/amd64-avx.c: Remove.
2886         * features/i386/amd64-mpx.c: Remove.
2887         * features/i386/amd64.c: Remove.
2888         * features/i386/i386-avx-avx512.c: Remove.
2889         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2890         * features/i386/i386-avx-mpx.c: Remove.
2891         * features/i386/i386-avx.c: Remove.
2892         * features/i386/i386-mmx.c: Remove.
2893         * features/i386/i386-mpx.c: Remove.
2894         * features/i386/i386.c: Remove.
2895         * i386-tdep.c: Don't include features/i386/i386*.c., include
2896         target-descriptions.h and arch/i386.h.
2897         (i386_target_description): Create target descriptions.
2898         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2899         functions.  Do self tests.
2900
2901 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2902
2903         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2904         * features/i386/amd64-avx-avx512-linux.c: Removed.
2905         * features/i386/amd64-avx-linux.c: Removed.
2906         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2907         * features/i386/amd64-avx-mpx-linux.c: Removed.
2908         * features/i386/amd64-linux.c: Removed.
2909         * features/i386/amd64-mpx-linux.c: Removed.
2910         * features/i386/x32-avx-avx512-linux.c: Removed.
2911         * features/i386/x32-avx-linux.c: Removed.
2912         * features/i386/x32-linux.c: Removed.
2913
2914 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2915
2916         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2917         features/i386/*.c.
2918         (amd64_linux_read_description): Call
2919         amd64_create_target_description.
2920         * arch/amd64.c: New file.
2921         * arch/amd64.h: New file.
2922         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2923         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2924
2925 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2926
2927         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2928         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2929         (amd64_linux_read_description): Create target descriptions.
2930         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2931         functions.  Add unit tests.
2932         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2933         x32-core.xml.
2934         * features/i386/64bit-avx.c: Generated.
2935         * features/i386/64bit-avx512.c: Generated.
2936         * features/i386/64bit-core.c: Generated.
2937         * features/i386/64bit-linux.c: Generated.
2938         * features/i386/64bit-mpx.c: Generated.
2939         * features/i386/64bit-pkeys.c: Generated.
2940         * features/i386/64bit-segments.c: Generated.
2941         * features/i386/64bit-sse.c: Generated.
2942         * features/i386/x32-core.c: Generated.
2943         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2944         c files for amd64-linux and x32-linux.
2945
2946 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2947
2948         * amd64-linux-tdep.c (amd64_linux_read_description): New
2949         function.
2950         (amd64_linux_core_read_description): Call
2951         amd64_linux_read_description.
2952         (amd64_linux_init_abi): Likewise.
2953         (amd64_x32_linux_init_abi): Likewise.
2954         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2955         * x86-linux-nat.c (x86_linux_read_description): Call
2956         amd64_linux_read_description.
2957
2958 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2959
2960         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2961         comments.
2962
2963 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2964
2965         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2966         * features/i386/i386-avx-avx512-linux.c: Remove.
2967         * features/i386/i386-avx-linux.c: Remove.
2968         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2969         * features/i386/i386-avx-mpx-linux.c: Remove.
2970         * features/i386/i386-linux.c: Remove.
2971         * features/i386/i386-mmx-linux.c: Remove.
2972         * features/i386/i386-mpx-linux.c: Remove.
2973
2974 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2975
2976         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2977         (SFILES): Add arch/i386.c.
2978         (HFILES_NO_SRCDIR): Add arch/i386.h.
2979         * arch/i386.c: New file.
2980         * arch/i386.h: New file.
2981         * arch/tdesc.h (allocate_target_description): Declare.
2982         (set_tdesc_architecture): Declare.
2983         (set_tdesc_osabi): Declare.
2984         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2985         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2986         include arch/i386.h.
2987         (i386_linux_read_description): Remove code and call
2988         i386_create_target_description.
2989         (set_tdesc_architecture): New function.
2990         (set_tdesc_osabi): New function.
2991         * target-descriptions.h (allocate_target_description): Remove.
2992
2993 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2994
2995         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2996         * target-descriptions.c (tdesc_create_feature): Likewise, and
2997         adjust code.
2998         * features/i386/32bit-avx.c: Re-generated.
2999         * features/i386/32bit-avx512.c: Re-generated.
3000         * features/i386/32bit-core.c: Re-generated.
3001         * features/i386/32bit-linux.c: Re-generated.
3002         * features/i386/32bit-mpx.c: Re-generated.
3003         * features/i386/32bit-pkeys.c: Re-generated.
3004         * features/i386/32bit-sse.c: Re-generated.
3005
3006 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3007
3008         * regformats/regdef.h (struct reg): Override operator == and !=.
3009
3010 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3011
3012         * arch/tdesc.h: New file.
3013         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3014         * target-descriptions.c: Update comments.
3015         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3016         declarations.
3017         * features/i386/32bit-avx.c: Re-generated.
3018         * features/i386/32bit-avx512.c: Re-generated.
3019         * features/i386/32bit-core.c: Re-generated.
3020         * features/i386/32bit-linux.c: Re-generated.
3021         * features/i386/32bit-mpx.c: Re-generated.
3022         * features/i386/32bit-pkeys.c: Re-generated.
3023         * features/i386/32bit-sse.c: Re-generated.
3024
3025 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3026
3027         * regformats/regdat.sh: Update generated code.
3028
3029 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3030
3031         * regformats/regdat.sh: Adjust code order.
3032
3033 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3034
3035         * expprint.c (dump_subexp_body_standard): Use constant format
3036         string in fprintf_filtered call.
3037
3038 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3039
3040         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3041         NetBSD/i386.
3042         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3043
3044 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3045
3046         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3047
3048 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3049
3050         * bsd-kvm.o: Define _KMEMUSER.
3051         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3052         * configure: Regenerate.
3053
3054 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3055
3056         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3057         * i386-fbsd-nat.c: Likewise.
3058
3059 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3060
3061         * unittests/array-view-selftests.c: Add include of <array>.
3062
3063 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3064
3065         * spu-tdep.c (flush_ea_cache): Add missing argument to
3066         call_function_by_hand.
3067
3068 2017-09-04  Pedro Alves  <palves@redhat.com>
3069
3070         * NEWS (Safer support for debugging with no debug info): New.
3071
3072 2017-09-04  Pedro Alves  <palves@redhat.com>
3073
3074         * c-exp.y (function_method, function_method_void): Add current
3075         instance flags to TYPE_INSTANCE.
3076         * dwarf2read.c (check_modifier): New.
3077         (compute_delayed_physnames): Assert that only C++ adds delayed
3078         physnames.  Mark fn_fields as const/volatile depending on
3079         physname.
3080         * eval.c (make_params): New type_instance_flags parameter.  Use
3081         it as the new type's instance flags.
3082         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3083         flags element and pass it to make_params.
3084         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3085         instance flags element.
3086         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3087         * gdbtypes.h: Include "enum-flags.h".
3088         (type_instance_flags): New enum-flags type.
3089         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3090         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3091         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3092         (follow_type_instance_flags): New function.
3093         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3094         * parser-defs.h (follow_type_instance_flags): Declare.
3095         * valops.c (value_struct_elt_for_reference): const/volatile must
3096         match too.
3097
3098 2017-09-04  Pedro Alves  <palves@redhat.com>
3099
3100         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3101         function/method scopes; lookup the nested name as a function local
3102         static variable.
3103
3104 2017-09-04  Pedro Alves  <palves@redhat.com>
3105
3106         (%type <voidval>): Add function_method.
3107         * c-exp.y (exp): New production for calls with no arguments.
3108         (function_method, function_method_void_or_typelist): New
3109         productions.
3110         (exp): New production for "method()::static_var".
3111         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3112         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3113         Handle OP_FUNC_STATIC_VAR.
3114         * parse.c (operator_length_standard):
3115         Handle OP_FUNC_STATIC_VAR.
3116
3117 2017-09-04  Pedro Alves  <palves@redhat.com>
3118
3119         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3120         handling.
3121         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3122         Ditto.
3123         * parse.c (operator_length_standard, operator_check_standard):
3124         Ditto.
3125         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3126
3127 2017-09-04  Pedro Alves  <palves@redhat.com>
3128
3129         * ax-gdb.c: Include "typeprint.h".
3130         (gen_expr_for_cast): New function.
3131         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3132         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3133         type is unknown.
3134         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3135         nodebug_data_symbol.
3136         * eval.c: Include "typeprint.h".
3137         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3138         Error out if symbol has unknown type.
3139         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3140         evaluate_subexp_for_cast.
3141         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3142         OP_VAR_MSYM_VALUE.
3143         (evaluate_subexp_for_cast): New function.
3144         * gdbtypes.c (init_nodebug_var_type): New function.
3145         (objfile_type): Use it to initialize types of variables with no
3146         debug info.
3147         * typeprint.c (error_unknown_type): New.
3148         * typeprint.h (error_unknown_type): New declaration.
3149         * compile/compile-c-types.c (convert_type_basic): Handle
3150         TYPE_CODE_ERROR; warn and fallback to int for variables with
3151         unknown type.
3152
3153 2017-09-04  Pedro Alves  <palves@redhat.com>
3154
3155         * eval.c (evaluate_var_value): New function, factored out from ...
3156         (evaluate_subexp_standard): ... here.
3157
3158 2017-09-04  Pedro Alves  <palves@redhat.com>
3159
3160         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3161         Remove useless assignments to 'op'.
3162
3163 2017-09-04  Pedro Alves  <palves@redhat.com>
3164
3165         * eval.c (eval_skip_value): New function.
3166         (evaluate_subexp_standard): Use it.
3167
3168 2017-09-04  Pedro Alves  <palves@redhat.com>
3169
3170         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3171         function name from symbol/minsym and pass it to
3172         error_call_unknown_return_type.
3173
3174 2017-09-04  Pedro Alves  <palves@redhat.com>
3175
3176         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3177         * ax-gdb.c (gen_msym_var_ref): New function.
3178         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3179         * eval.c (evaluate_var_msym_value): New function.
3180         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3181         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3182         to call_function_by_hand.
3183         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3184         Handle OP_VAR_MSYM_VALUE.
3185         (union exp_element) <msymbol>: New field.
3186         * minsyms.h (struct type): Forward declare.
3187         (find_minsym_type_and_address): Declare.
3188         * parse.c (write_exp_elt_msym): New function.
3189         (write_exp_msymbol): Delete, refactored as ...
3190         (find_minsym_type_and_address): ... this new function.
3191         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3192         (operator_length_standard, operator_check_standard): Handle
3193         OP_VAR_MSYM_VALUE.
3194         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3195
3196 2017-09-04  Pedro Alves  <palves@redhat.com>
3197
3198         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3199         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3200         unknown.
3201         * ada-typeprint.c (print_func_type): Handle functions with unknown
3202         return type.
3203         * c-typeprint.c (c_type_print_base): Handle functions and methods
3204         with unknown return type.
3205         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3206         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3207         * compile/compile-c-types.c: Include "objfiles.h".
3208         (convert_func): For functions with unknown return type, warn and
3209         default to int.
3210         * compile/compile-object-run.c (compile_object_run): Adjust call
3211         to call_function_by_hand_dummy.
3212         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3213         call_function_by_hand.
3214         * eval.c (evaluate_subexp_standard): Adjust calls to
3215         call_function_by_hand.  Handle functions and methods with unknown
3216         return type.  Pass expect_type to call_function_by_hand.
3217         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3218         return type.
3219         * gcore.c (call_target_sbrk): Adjust call to
3220         call_function_by_hand.
3221         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3222         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3223         an integer address type instead of nodebug.
3224         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3225         call_function_by_hand.
3226         * infcall.c (error_call_unknown_return_type): New function.
3227         (call_function_by_hand): New "default_return_type" parameter.
3228         Pass it down.
3229         (call_function_by_hand_dummy): New "default_return_type"
3230         parameter.  Use it instead of defaulting to int.  If there's no
3231         default and the return type is unknown, throw an error.  If
3232         there's a default return type, and the called function has no
3233         debug info, then assume the function is prototyped.
3234         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3235         New "default_return_type" parameter.
3236         (error_call_unknown_return_type): New declaration.
3237         * linux-fork.c (call_lseek): Cast return type of lseek.
3238         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3239         call_function_by_hand.
3240         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3241         calls to call_function_by_hand.
3242         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3243         return type.
3244         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3245         (value_nsstring, print_object_command): Adjust calls to
3246         call_function_by_hand.
3247         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3248         functions with unknown return type.
3249         (pascal_type_print_func_varspec_suffix): New function.
3250         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3251         TYPE_CODE_METHOD>: Use it.
3252         * python/py-value.c (valpy_call): Adjust call to
3253         call_function_by_hand.
3254         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3255         call_function_by_hand.
3256         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3257         call_function_by_hand.
3258         * valops.c (value_allocate_space_in_inferior): Adjust call to
3259         call_function_by_hand.
3260         * typeprint.c (type_print_unknown_return_type): New function.
3261         * typeprint.h (type_print_unknown_return_type): New declaration.
3262
3263 2017-09-04  Pedro Alves  <palves@redhat.com>
3264
3265         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3266         types with more than one parameter as prototyped.
3267
3268 2017-09-04  Pedro Alves  <palves@redhat.com>
3269
3270         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3271         (disassemble_command): Use gdb_disassembly_flags instead of bare
3272         int.
3273         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3274         (dump_insns, do_mixed_source_and_assembly_deprecated)
3275         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3276         Use gdb_disassembly_flags instead of bare int.
3277         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3278         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3279         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3280         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3281         (enum gdb_disassembly_flag): ... values of this new enumeration.
3282         (gdb_disassembly_flags): Define.
3283         (gdb_disassembly)
3284         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3285         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3286         gdb_disassembly_flags instead of bare int.
3287         * record-btrace.c (btrace_insn_history)
3288         (record_btrace_insn_history, record_btrace_insn_history_range)
3289         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3290         instead of bare int.
3291         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3292         Use gdb_disassembly_flags instead of bare int.
3293         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3294         Define.
3295         * target-delegates.c: Regenerate.
3296         * target.c (target_insn_history, target_insn_history_from)
3297         (target_insn_history_range): Use gdb_disassembly_flags instead of
3298         bare int.
3299         * target.h: Include "disasm.h".
3300         (struct target_ops) <to_insn_history, to_insn_history_from,
3301         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3302         int.
3303         (target_insn_history, target_insn_history_from)
3304         (target_insn_history_range): Use gdb_disassembly_flags instead of
3305         bare int.
3306
3307 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3308
3309         * cli/cli-script.c (build_command_line): For if/while commands,
3310         check whether args is empty.
3311
3312 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3313
3314         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3315         (enum command_control_type): Likewise.
3316         (struct command_line): Likewise.
3317         (free_command_lines): Likewise.
3318         (struct command_lines_deleter): Likewise.
3319         (command_line_up): Likewise.
3320         (read_command_lines): Likewise.
3321         (read_command_lines_1): Likewise.
3322         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3323         (enum command_control_type): Likewise.
3324         (struct command_line): Likewise.
3325         (free_command_lines): Likewise.
3326         (struct command_lines_deleter): Likewise.
3327         (command_line_up): Likewise.
3328         (read_command_lines): Likewise.
3329         (read_command_lines_1): Likewise.
3330         * breakpoint.h: Include cli/cli-script.h.
3331         * extension-priv.h: Likewise.
3332         * gdbcmd.h: Likewise.
3333
3334 2017-09-04  Pedro Alves  <palves@redhat.com>
3335
3336         * ada-lang.c (is_known_support_routine): Move sal declaration to
3337         where it is initialized.
3338         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3339         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3340         (clear_command, update_static_tracepoint): Remove init_sal
3341         references.  Move declarations closer to initializations.
3342         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3343         initializations.
3344         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3345         references.  Move sal declarations closer to initializations.
3346         * frame.c (find_frame_sal): Return a symtab_and_line via function
3347         return instead of output parameter.  Remove init_sal references.
3348         * frame.h (find_frame_sal): Return a symtab_and_line via function
3349         return instead of output parameter.
3350         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3351         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3352         instead of memset.
3353         (gdbscm_find_pc_line): Remove init_sal reference.
3354         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3355         references.  Move declarations closer to initializations.
3356         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3357         initializations.
3358         (finish_backward): Remove init_sal references.  Move declarations
3359         closer to initializations.
3360         * infrun.c (process_event_stop_test, handle_step_into_function)
3361         (insert_hp_step_resume_breakpoint_at_frame)
3362         (insert_step_resume_breakpoint_at_caller): Likewise.
3363         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3364         (symbol_to_sal): Likewise.
3365         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3366         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3367         to its initialization.
3368         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3369         init_sal references.  Move declarations closer to initializations.
3370         * source.c (get_current_source_symtab_and_line): Remove brace
3371         initialization.
3372         (set_current_source_symtab_and_line): Now takes the sal by const
3373         reference.  Remove brace initialization.
3374         (line_info): Remove init_sal reference.
3375         * source.h (set_current_source_symtab_and_line): Now takes a
3376         symtab_and_line via const reference.
3377         * stack.c (set_current_sal_from_frame): Adjust.
3378         (print_frame_info): Adjust.
3379         (get_last_displayed_sal): Return the sal via function return
3380         instead of via output parameter.  Simplify.
3381         (frame_info): Adjust.
3382         * stack.h (get_last_displayed_sal): Return the sal via function
3383         return instead of via output parameter.
3384         * symtab.c (init_sal): Delete.
3385         (find_pc_sect_line): Remove init_sal references.  Move
3386         declarations closer to initializations.
3387         (find_function_start_sal): Remove init_sal references.  Move
3388         declarations closer to initializations.
3389         * symtab.h (struct symtab_and_line): In-class initialize all
3390         fields.
3391         * tracepoint.c (set_traceframe_context)
3392         (print_one_static_tracepoint_marker): Remove init_sal references.
3393         Move declarations closer to initializations.
3394         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3395         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3396         declarations closer to initializations.
3397         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3398         init_sal references.  Adjust.
3399
3400 2017-09-04  Pedro Alves  <palves@redhat.com>
3401
3402         * ax-gdb.c (agent_command_1): Use range-for.
3403         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3404         * breakpoint.c: Include "common/array-view.h".
3405         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3406         parameter from struct symtabs_and_lines to
3407         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3408         (breakpoint_sals_to_pc): Change sals parameter from struct
3409         symtabs_and_lines to std::vector reference.
3410         (check_fast_tracepoint_sals): Change sals parameter from struct
3411         symtabs_and_lines to std::array_view.  Use range-for.
3412         (decode_static_tracepoint_spec): Return a std::vector instead of
3413         symtabs_and_lines.  Update.
3414         (create_breakpoint): Update.
3415         (break_range_command, until_break_command, clear_command): Update.
3416         (base_breakpoint_decode_location, bkpt_decode_location)
3417         (bkpt_probe_create_sals_from_location)
3418         (bkpt_probe_decode_location, tracepoint_decode_location)
3419         (tracepoint_probe_decode_location)
3420         (strace_marker_create_sals_from_location): Return a std::vector
3421         instead of symtabs_and_lines.
3422         (strace_marker_create_breakpoints_sal): Update.
3423         (strace_marker_decode_location): Return a std::vector instead of
3424         symtabs_and_lines.  Update.
3425         (update_breakpoint_locations): Change struct symtabs_and_lines
3426         parameters to gdb::array_view.  Adjust.
3427         (location_to_sals): Return a std::vector instead of
3428         symtabs_and_lines.  Update.
3429         (breakpoint_re_set_default): Use std::vector instead of struct
3430         symtabs_and_lines.
3431         (decode_location_default): Return a std::vector instead of
3432         symtabs_and_lines.  Update.
3433         * breakpoint.h: Include "common/array-view.h".
3434         (struct breakpoint_ops) <decode_location>: Now returns a
3435         std::vector instead of returning a symtabs_and_lines via output
3436         parameter.
3437         (update_breakpoint_locations): Change sals parameters to use
3438         gdb::array_view.
3439         * cli/cli-cmds.c (edit_command, list_command): Update to use
3440         std::vector and gdb::array_view.
3441         (ambiguous_line_spec): Adjust to use gdb::array_view and
3442         range-for.
3443         (compare_symtabs): Rename to ...
3444         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3445         const reference and adjust.
3446         (filter_sals): Rewrite using std::vector and standard algorithms.
3447         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3448         (jump_command): Update to use std::vector.
3449         * linespec.c (struct linespec_state) <canonical_names>: Update
3450         comment.
3451         (add_sal_to_sals_basic): Delete.
3452         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3453         (decode_line_2, create_sals_line_offset)
3454         (convert_address_location_to_sals, convert_linespec_to_sals)
3455         (convert_explicit_location_to_sals, parse_linespec)
3456         (event_location_to_sals, decode_line_full, decode_line_1)
3457         (decode_line_with_current_source)
3458         (decode_line_with_last_displayed, decode_objc)
3459         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3460         (linespec_result::~linespec_result): Adjust to use std::vector
3461         instead of symtabs_and_lines.
3462         * linespec.h (linespec_sals::sals): Now a std::vector.
3463         (struct linespec_result): Use std::vector, bool, and in-class
3464         initialization.
3465         (decode_line_1, decode_line_with_current_source)
3466         (decode_line_with_last_displayed): Return std::vector.
3467         * macrocmd.c (info_macros_command): Use std::vector.
3468         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3469         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3470         std::vector.
3471         * probe.h (parse_probes): Return a std::vector.
3472         * python/python.c (gdbpy_decode_line): Use std::vector and
3473         gdb::array_view.
3474         * source.c (select_source_symtab, line_info): Use std::vector.
3475         * stack.c (func_command): Use std::vector.
3476         * symtab.h (struct symtabs_and_lines): Delete.
3477         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3478
3479 2017-09-04  Pedro Alves  <palves@redhat.com>
3480
3481         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3482         unittests/array-view-selftests.c.
3483         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3484         * common/array-view.h: New file.
3485         * unittests/array-view-selftests.c: New file.
3486
3487 2017-09-04  Pedro Alves  <palves@redhat.com>
3488
3489         * cli/cli-cmds.c (edit_command): Pass message to
3490         ambiguous_line_spec.
3491         (list_command): Pass message to ambiguous_line_spec.  Say
3492         "first"/"last" instead of "start" and "end" to be consistent with
3493         the manual.
3494         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3495         them to print formatted message.
3496
3497 2017-09-04  Pedro Alves  <palves@redhat.com>
3498
3499         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3500         ftrace_update_insns by reference instead of pointer.
3501
3502 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3503
3504         * i386-go32-tdep.c: Include x86-xstate.h.
3505         (i386_go32_init_abi): Call i386_target_description.
3506         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3507         if xcr0 is X86_XSTATE_X87_MASK.
3508         * i386-tdep.h (tdesc_i386): Remove the declaration.
3509         (tdesc_i386_mmx): Likewise.
3510
3511 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3512
3513         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3514         X86_XSTATE_SSE_MASK instead of 0.
3515
3516 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3517
3518         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3519         i386_target_description.
3520         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3521         i386_target_description.
3522         * i386-tdep.c (i386_gdbarch_init): Likewise.
3523
3524 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3525
3526         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3527         (x86_darwin_init_abi_64): Call amd64_target_description.
3528         * amd64-dicos-tdep.c: Likewise.
3529         * amd64-fbsd-nat.c: Likewise.
3530         * amd64-fbsd-tdep.c: Likewise.
3531         * amd64-nbsd-tdep.c: Likewise.
3532         * amd64-obsd-tdep.c: Likewise.
3533         * amd64-sol2-tdep.c: Likewise.
3534         * amd64-windows-tdep.c: Likewise.
3535         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3536
3537 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3538
3539         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3540         (btrace_function) <insn>: Change type to use std::vector.
3541         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3542         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3543         ftrace_update_insns, ftrace_compute_global_level_offset,
3544         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3545         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3546         change to std::vector.
3547         (ftrace_update_insns): Adjust to change to std::vector, change
3548         type of INSN parameter.
3549         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3550         * record-btrace.c (btrace_call_history_insn_range,
3551         btrace_compute_src_line_range,
3552         record_btrace_frame_prev_register): Adjust to change to
3553         std::vector.
3554         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3555         to change to std::vector.
3556
3557 2017-09-03  Tom Tromey  <tom@tromey.com>
3558
3559         * corefile.c (reopen_exec_file): Use std::string.
3560
3561 2017-09-03  Tom Tromey  <tom@tromey.com>
3562
3563         * compile/compile.c (compile_register_name_mangled): Return
3564         std::string.
3565         * compile/compile-loc2c.c (pushf_register_address): Update.
3566         (pushf_register): Update.
3567         * compile/compile-c-types.c (convert_array): Update.
3568         * compile/compile-c-symbols.c (generate_vla_size): Update.
3569         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3570         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3571         (convert_one_symbol): Update.
3572         (generate_c_for_for_one_variable): Update.
3573         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3574         std::string.
3575         (generate_register_struct): Update.
3576         * compile/compile-internal.h (c_get_range_decl_name): Return a
3577         std::string.
3578         (compile_register_name_mangled): Return std::string.
3579
3580 2017-09-03  Tom Tromey  <tom@tromey.com>
3581
3582         * utils.c (perror_string): Return a std::string.
3583         (throw_perror_with_name, perror_warning_with_name): Update.
3584
3585 2017-09-03  Tom Tromey  <tom@tromey.com>
3586
3587         * demangle.c (demangle_command): Use std::string,
3588         unique_xmalloc_ptr.
3589
3590 2017-09-03  Tom Tromey  <tom@tromey.com>
3591
3592         * cli/cli-setshow.c (do_set_command): Use std::string.
3593
3594 2017-09-03  Tom Tromey  <tom@tromey.com>
3595
3596         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3597
3598 2017-09-03  Tom Tromey  <tom@tromey.com>
3599
3600         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3601
3602 2017-09-03  Tom Tromey  <tom@tromey.com>
3603
3604         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3605         gdb::unique_xmalloc_ptr.
3606
3607 2017-09-03  Tom Tromey  <tom@tromey.com>
3608
3609         * thread.c (print_thread_info_1): Use string_printf.
3610         (thread_apply_command, thread_apply_all_command): Use
3611         std::string.
3612
3613 2017-09-03  Tom Tromey  <tom@tromey.com>
3614
3615         * valprint.c (val_print_string): Update.
3616         * gdbcore.h (memory_error_message): Return std::string.
3617         * corefile.c (memory_error_message): Return std::string.
3618         (memory_error): Update.
3619         * breakpoint.c (insert_bp_location): Update.
3620
3621 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3622
3623         * target/waitstatus.h (target_waitstatus_to_string): Change
3624         return type to std::string.
3625         * target/waitstatus.c (target_waitstatus_to_string): Return
3626         std::string.
3627         * target.h (target_waitstatus_to_string): Remove declaration.
3628         * infrun.c (resume, clear_proceed_status_thread,
3629         print_target_wait_results, do_target_wait, save_waitstatus,
3630         stop_all_threads): Adjust.
3631         * record-btrace.c (record_btrace_wait): Adjust.
3632         * target-debug.h
3633         (target_debug_print_struct_target_waitstatus_p): Adjust.
3634
3635 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3636
3637         PR gdb/22046
3638         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3639         detection.
3640
3641 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3642
3643         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3644         for setting/unsetting environment variables on the remote target.
3645         (New remote packets): Add entries for QEnvironmentHexEncoded,
3646         QEnvironmentUnset and QEnvironmentReset.
3647         * common/environ.c (gdb_environ::operator=): Extend method to
3648         handle m_user_set_env_list and m_user_unset_env_list.
3649         (gdb_environ::clear): Likewise.
3650         (match_var_in_string): Change type of first parameter from 'char
3651         *' to 'const char *'.
3652         (gdb_environ::set): Extend method to handle
3653         m_user_set_env_list and m_user_unset_env_list.
3654         (gdb_environ::unset): Likewise.
3655         (gdb_environ::clear_user_set_env): New method.
3656         (gdb_environ::user_set_envp): Likewise.
3657         (gdb_environ::user_unset_envp): Likewise.
3658         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3659         m_user_unset_env_list on move constructor/assignment.
3660         (unset): Add new default parameter 'update_unset_list = true'.
3661         (clear_user_set_env): New method.
3662         (user_set_envp): Likewise.
3663         (user_unset_envp): Likewise.
3664         (m_user_set_env_list): New std::set.
3665         (m_user_unset_env_list): Likewise.
3666         * common/rsp-low.c (hex2str): New function.
3667         (bin2hex): New overload for bin2hex function.
3668         * common/rsp-low.c (hex2str): New prototype.
3669         (str2hex): New overload prototype.
3670         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3671         QEnvironmentUnset and QEnvironmentReset.
3672         (remote_protocol_features): Add QEnvironmentHexEncoded,
3673         QEnvironmentUnset and QEnvironmentReset packets.
3674         (send_environment_packet): New function.
3675         (extended_remote_environment_support): Likewise.
3676         (extended_remote_create_inferior): Call
3677         extended_remote_environment_support.
3678         (_initialize_remote): Add QEnvironmentHexEncoded,
3679         QEnvironmentUnset and QEnvironmentReset packet configs.
3680         * unittests/environ-selftests.c (gdb_selftest_env_var):
3681         New variable.
3682         (test_vector_initialization): New function.
3683         (test_init_from_host_environ): Likewise.
3684         (test_reinit_from_host_environ): Likewise.
3685         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3686         Likewise.
3687         (test_unset_set_empty_vector): Likewise.
3688         (test_vector_clear): Likewise.
3689         (test_std_move): Likewise.
3690         (test_move_constructor):
3691         (test_self_move): Likewise.
3692         (test_set_unset_reset): Likewise.
3693         (run_tests): Rewrite in terms of the functions above.
3694
3695 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3696
3697         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3698         (adi_available): Use a temp variable of type CORE_ADDR as argument
3699         3 when calling target_auxv_search.
3700         (adi_normalize_address): Use masks and xor operators to calculate
3701         normalized address.
3702         (adi_read_versions, adi_write_versions, adi_print_versions)
3703         (do_examine, do_assign): Use paddress.
3704
3705 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3706
3707         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3708         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3709         out of loop and add supply of FIR.
3710         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3711         add collect of FIR.
3712
3713 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3714
3715         PR gdb/21827
3716         * cli/cli-script.c (define_command): Don't convert command name
3717         to lower case.
3718
3719 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3720
3721         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3722         Update all callers accordingly. Remove all code blocks handling
3723         the case where DISPP is not NULL.
3724
3725 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3726
3727         PR symtab/22003
3728         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3729         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3730         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3731
3732 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3733
3734         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3735         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3736         (read_comp_units_from_section): New parameter abbrev_section, use
3737         read_and_check_comp_unit_head, allocate signatured_type if needed.
3738         (create_all_comp_units): Update read_comp_units_from_section caller.
3739
3740 2017-08-23  Pedro Alves  <palves@redhat.com>
3741
3742         PR remote/21852
3743         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3744         to null_ptid and switch to thread without reading the registers
3745         after adding the inferior.
3746
3747 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3748
3749         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3750         compile-gcc.
3751         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3752         (compile_to_object): Implement compile_gcc.
3753         (_initialize_compile): Install "set compile-gcc".  Initialize
3754         compile_gcc.
3755
3756 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3757
3758         * compile/compile.c (compile_to_object): Conditionally call
3759         set_verbose.  Conditionally call compile or compile_v0.
3760
3761 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3762
3763         * sparc64-tdep.h: (adi_normalize_address): New export.
3764         * sparc-nat.h: (open_adi_tag_fd): New export.
3765         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3766         * sparc64-linux-tdep.c:
3767         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3768         (sparc64_linux_handle_segmentation_fault): New function.
3769         (sparc64_linux_init_abi): Register
3770         sparc64_linux_handle_segmentation_fault
3771         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3772         (sparc64_addr_bits_remove): New function.
3773         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3774         (MAX_PROC_NAME_SIZE): New macro.
3775         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3776         (sparc64adilist): New variable.
3777         (adi_proc_list): New variable.
3778         (find_adi_info): New function.
3779         (add_adi_info): New function.
3780         (get_adi_info_proc): New function.
3781         (get_adi_info): New function.
3782         (info_adi_command): New function.
3783         (read_maps_entry): New function.
3784         (adi_available): New function.
3785         (adi_normalize_address): New function.
3786         (adi_align_address): New function.
3787         (adi_convert_byte_count): New function.
3788         (adi_tag_fd): New function.
3789         (adi_is_addr_mapped): New function.
3790         (adi_read_versions): New function.
3791         (adi_write_versions): New function.
3792         (adi_print_versions): New function.
3793         (do_examine): New function.
3794         (do_assign): New function.
3795         (adi_examine_command): New function.
3796         (adi_assign_command): New function.
3797         (_initialize_sparc64_adi_tdep): New function.
3798
3799 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3800
3801         * breakpoint.c (breakpoints_info): Rename to ...
3802         (info_breakpoints_command): ... this.
3803         (watchpoints_info): Rename to ...
3804         (info_watchpoints_command): ... this.
3805         (tracepoints_info): Rename to ...
3806         (info_tracepoints_command): ... this.
3807         (_initialize_breakpoint): Adjust.
3808         * dcache.c (dcache_info): Rename to ...
3809         (info_display_command): ... this.
3810         (_initialize_dcache): Adjust.
3811         * frame.h (args_info): Rename to ...
3812         (info_args_command): ... this.
3813         (locals_info): Rename to ...
3814         (info_locals_command): ... this.
3815         * infcmd.c (nofp_registers_info): Rename to ...
3816         (info_registers_command): ... this.
3817         (float_info): Rename to ...
3818         (info_float_command): ... this.
3819         (program_info): Rename to ...
3820         (info_program_command): ... this.
3821         (all_registers_info): Rename to ...
3822         (info_all_registers_command): ... this.
3823         (vector_info): Rename to ...
3824         (info_vector_command): ... this.
3825         (float_info): Rename to ...
3826         (info_float_command): ... this.
3827         (_initialize_infcmd): Adjust.
3828         * inferior.h (term_info): Rename to ...
3829         (info_terminal_command): ... this.
3830         * inflow.c (term_info): Rename to ...
3831         (info_terminal_command): ... this.
3832         (_initialize_inflow): Adjust.
3833         * infrun.c (signals_info): Rename to ...
3834         (info_signals_command): ... this.
3835         (_initialize_infrun): Adjust.
3836         * objc-lang.c (classes_info): Rename to ...
3837         (info_classes_command): ... this.
3838         (selectors_info): Rename to ...
3839         (info_selectors_command): ... this.
3840         (_initialize_objc_language): Adjust.
3841         * printcmd.c (sym_info): Rename to ...
3842         (info_symbol_command): ... this.
3843         (address_info): Rename to ...
3844         (info_address_command): ... this.
3845         (display_info): Rename to ...
3846         (info_display_command): ... this.
3847         (_initialize_printcmd): Adjust.
3848         * reverse.c (bookmarks_info): Rename to ...
3849         (info_breakpoints_command): ... this.
3850         (_initialize_reverse): Adjust.
3851         * ser-go32.c (dos_info): Rename to ...
3852         (info_serial_command): ... this.
3853         (_initialize_ser_dos): Adjust.
3854         * skip.c (skip_info): Rename to ...
3855         (info_skip_command): ... this.
3856         (_initialize_step_skip): Adjust.
3857         * source.c (line_info): Rename to ...
3858         (info_line_command): ... this.
3859         (source_info): Rename to ...
3860         (info_source_command)
3861         * stack.c (frame_info): Rename to ...
3862         (info_frame_command): ... this.
3863         (locals_info): Rename to ...
3864         (info_locals_command): ... this.
3865         (args_info): Rename to ...
3866         (info_args_command): ... this.
3867         (_initialize_stack): Adjust.
3868         * symtab.c (sources_info): Rename to ...
3869         (info_sources_command): ... this.
3870         (variables_info): Rename to ...
3871         (info_variables_command): ... this.
3872         (functions_info): Rename to ...
3873         (info_functions_command): ... this.
3874         (types_info): Rename to ...
3875         (info_types_command): ... this.
3876         (_initialize_symtab): Adjust.
3877         * target.c (target_info): Rename to ...
3878         (info_target_command): ... this.
3879         (initialize_targets): Adjust.
3880         * tracepoint.c (tvariables_info): Rename to ...
3881         (info_tvariables_command): ... this.
3882         (scope_info): Rename to ...
3883         (info_scope_command): ... this.
3884         (trace_dump_actions): Adjust.
3885         (_initialize_tracepoint): Adjust.
3886
3887 2017-08-22  Tom Tromey  <tom@tromey.com>
3888
3889         * breakpoint.h (install_breakpoint): Update.
3890         * breakpoint.c (add_solib_catchpoint): Update.
3891         (install_breakpoint): Change argument to a std::unique_ptr.
3892         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3893         (create_breakpoint_sal, create_breakpoint): Update.
3894         (watch_command_1, catch_exec_command_1)
3895         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3896         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3897         Return the breakpoint.
3898         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3899         (new_single_step_breakpoint): Update.
3900         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3901         std::unique_ptr.
3902         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3903         std::unique_ptr.
3904         * break-catch-sig.c (create_signal_catchpoint): Use
3905         std::unique_ptr.
3906         * ada-lang.c (create_ada_exception_catchpoint): Use
3907         std::unique_ptr.
3908
3909 2017-08-22  Tom Tromey  <tom@tromey.com>
3910
3911         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3912
3913 2017-08-22  Tom Tromey  <tom@tromey.com>
3914
3915         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3916         (lookup_partial_symbol): Update.
3917
3918 2017-08-22  Tom Tromey  <tom@tromey.com>
3919
3920         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3921         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3922         (find_and_open_source, symtab_to_fullname): Update.
3923         * psymtab.c (psymtab_to_fullname): Update.
3924
3925 2017-08-22  Tom Tromey  <tom@tromey.com>
3926
3927         * exec.c (exec_file_attach): Update.
3928         * linux-thread-db.c (try_thread_db_load): Update.
3929         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3930         * utils.c (gdb_realpath): Change return type.
3931         (gdb_realpath_keepfile): Update.
3932         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3933         (_initialize_utils): Register the new self test.
3934         * source.c (openp): Update.
3935         (find_and_open_source): Update.
3936         * nto-tdep.c (nto_find_and_open_solib): Update.
3937         * main.c (set_gdb_data_directory): Update.
3938         (captured_main_1): Update.
3939         * dwarf2read.c (dwarf2_get_dwz_file): Update
3940         (dw2_map_symbol_filenames): Update.
3941         * auto-load.c (auto_load_safe_path_vec_update): Update.
3942         (filename_is_in_auto_load_safe_path_vec): Change type of
3943         "filename_realp".
3944         (auto_load_objfile_script): Update.
3945         (file_is_auto_load_safe): Update.  Use std::string.
3946         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3947
3948 2017-08-22  Tom Tromey  <tom@tromey.com>
3949
3950         * utils.c (gdb_realpath_keepfile): Return a
3951         gdb::unique_xmalloc_ptr.
3952         * exec.c (exec_file_attach): Update.
3953         * utils.h (gdb_realpath_keepfile): Return a
3954         gdb::unique_xmalloc_ptr.
3955
3956 2017-08-22  Tom Tromey  <tom@tromey.com>
3957
3958         * compile/compile.c (compile_file_command): Use
3959         gdb::unique_xmalloc_ptr, std::string.
3960         * utils.c (gdb_abspath): Change return type.
3961         * source.c (openp): Update.
3962         * objfiles.c (allocate_objfile): Update.
3963         * main.c (set_gdb_data_directory): Update.
3964         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3965
3966 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3967
3968         * cli-cmds.c (list_commands): List actual code around more than
3969         one location.
3970
3971 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3972
3973         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3974
3975 2017-08-21  Pedro Alves  <palves@redhat.com>
3976
3977         PR gdb/19487
3978         * c-exp.y (variable production): Handle function aliases.
3979         * minsyms.c (msymbol_is_text): New function.
3980         * minsyms.h (msymbol_is_text): Declare.
3981         * symtab.c (find_function_alias_target): New function.
3982         * symtab.h (find_function_alias_target): Declare.
3983
3984 2017-08-21  Pedro Alves  <palves@redhat.com>
3985
3986         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3987         typedefs.
3988         * typeprint.c (whatis_exp): If handling "whatis", and expression
3989         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3990         typedefs here.
3991         * valops.c (value_cast): Save "to" type before resolving
3992         stubs/typedefs.  Use that type as resulting value's type.
3993
3994 2017-08-18  Tom Tromey  <tom@tromey.com>
3995             Pedro Alves  <palves@redhat.com>
3996
3997         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3998         * sol-thread.c (sol_thread_resume, sol_thread_wait)
3999         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4000         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4001         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4002         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4003         (linux_get_siginfo_data): Add "thread" argument.  Use
4004         scoped_restore.
4005         * linux-nat.c (linux_child_follow_fork)
4006         (check_stopped_by_watchpoint): Use scoped_restore.
4007         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4008         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4009         (restore_inferior_ptid, save_inferior_ptid): Remove.
4010         * btrace.c (btrace_fetch): Use scoped_restore.
4011         * bsd-uthread.c (bsd_uthread_fetch_registers)
4012         (bsd_uthread_store_registers): Use scoped_restore.
4013         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4014         scoped_restore.
4015         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4016         (aix_thread_xfer_partial): Use scoped_restore.
4017         * inferior.h (save_inferior_ptid): Remove.
4018
4019 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4020
4021         PR tdep/21818
4022         * arm-tdep.c (gdb_print_insn_arm): Mark
4023         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4024
4025 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4026
4027         * NEWS: Mention GDBserver's new option "--selftest".
4028         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4029         * selftest.c: Move it to common/selftest.c.
4030         * selftest.h: Move it to common/selftest.h.
4031         * selftest-arch.c (reset): New function.
4032         (tests_with_arch): Call reset.
4033
4034 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4035
4036         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4037         instead of exception_fprintf and printf_filtered.
4038
4039 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4040
4041         * selftest.c (register_self_test): Rename it to
4042         selftests::register_test.
4043         (run_self_tests): selftest::run_tests.
4044         * selftest.h: Update declarations.
4045         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4046         selftests::register_test_foreach_arch.
4047         * selftest-arch.h: Update declaration.
4048         * aarch64-tdep.c: Update.
4049         * arm-tdep.c: Likewise.
4050         * disasm-selftests.c: Likewise.
4051         * dwarf2loc.c: Likewise.
4052         * dwarf2-frame.c: Likewise.
4053         * findvar.c: Likewise.
4054         * gdbarch-selftests.c: Likewise.
4055         * maint.c (maintenance_selftest): Likewise.
4056         * regcache.c: Likewise.
4057         * rust-exp.y: Likewise.
4058         * selftest-arch.c: Likewise.
4059         * unittests/environ-selftests.c: Likewise.
4060         * unittests/function-view-selftests.c: Likewise.
4061         * unittests/offset-type-selftests.c: Likewise.
4062         * unittests/optional-selftests.c: Likewise.
4063         * unittests/scoped_restore-selftests.c: Likewise.
4064         * utils-selftests.c: Likewise.
4065
4066 2017-08-17  Pedro Alves  <palves@redhat.com>
4067
4068         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4069         local.
4070
4071 2017-08-17  Pedro Alves  <palves@redhat.com>
4072
4073         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4074         field.
4075         (reset_die_in_process): Delete, replaced by ...
4076         (process_die_scope): ... this new class.  Make it responsible for
4077         freeing cu->line_header too.
4078         (process_die): Use process_die_scope.
4079         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4080         cu->line_header_die_owner.  Don't release the line header if it's
4081         owned by the CU.
4082         (setup_type_unit_groups): Make the CU/DIE own the line header.
4083         Don't release the line header here.
4084
4085 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4086
4087         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4088
4089 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4090
4091         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4092         Single-Key mode
4093
4094 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4095
4096         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4097         mode command list.
4098
4099 2017-08-15  Stafford Horne  <shorne@gmail.com>
4100
4101         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4102
4103 2017-08-15  Stafford Horne  <shorne@gmail.com>
4104
4105         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4106
4107 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4108
4109         PR gdb/21954
4110         * infcmd.c (unset_environment_command): Use the 'clear' method on
4111         the environment instead of resetting it.
4112
4113 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4114
4115         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4116         platforms.
4117
4118 2017-08-14  Tom Tromey  <tom@tromey.com>
4119
4120         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4121         (print_binary_chars): Likewise.
4122         (BITS_IN_BYTES): Remove.
4123
4124 2017-08-14  Tom Tromey  <tom@tromey.com>
4125
4126         PR gdb/21675
4127         * valprint.c (LOW_ZERO): Change value to 034.
4128         (print_octal_chars): Add static_asserts for octal constants.
4129         * printcmd.c (print_scalar_formatted): Add 'd' case.
4130
4131 2017-08-11  Tom Tromey  <tom@tromey.com>
4132
4133         * symfile.c (add_symbol_file_command): Use std::vector.
4134
4135 2017-08-14  Tom Tromey  <tom@tromey.com>
4136
4137         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4138         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4139         std::move.
4140         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4141
4142 2017-08-11  Pedro Alves  <palves@redhat.com>
4143
4144         * infrun.c (process_event_stop_test): Adjust
4145         function_name_is_marked_for_skip call.
4146         * skip.c: Include <list>.
4147         (skiplist_entry): Make it a class with private fields, and
4148         getters/setters.
4149         (skiplist_entry_chain): Delete.
4150         (skiplist_entries): New.
4151         (skiplist_entry_count): Delete.
4152         (highest_skiplist_entry_num): New.
4153         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4154         (add_skiplist_entry): Delete.
4155         (skiplist_entry::skiplist_entry): New.
4156         (skiplist_entry::add_entry): New.
4157         (skip_file_command, skip_function): Adjust.
4158         (compile_skip_regexp): Delete.
4159         (skip_command): Don't compile regexp here.  Adjust to use
4160         skiplist_entry::add_entry.
4161         (skip_info): Adjust to use range-for and getters.
4162         (skip_enable_command, skip_disable_command): Adjust to use
4163         range-for and setters.
4164         (skip_delete_command): Adjust to use std::list.
4165         (add_skiplist_entry): Delete.
4166         (skip_file_p): Delete, refactored as ...
4167         (skiplist_entry::do_skip_file_p): ... this new method.
4168         (skip_gfile_p): Delete, refactored as ...
4169         (skiplist_entry::do_gskip_file_p): ... this new method.
4170         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4171         (skiplist_entry::skip_function_p): ... this new method.
4172         (function_name_is_marked_for_skip): Now returns bool, and takes
4173         the function sal by const reference.  Adjust to use range-for and
4174         skiplist_entry methods.
4175         (_initialize_step_skip): Remove references to
4176         skiplist_entry_chain, skiplist_entry_count.
4177         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4178         takes the function sal by const reference.
4179
4180 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4181
4182         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4183         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4184         (dwarf2_frame_cache):
4185         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4186         RETURN_MASK_ALL and set *this_case to NULL.
4187         * frame-unwind.h: Update comments.
4188
4189 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4190
4191         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4192         (dwarf2_frame_state_copy_regs): Remove.
4193         (dwarf2_frame_state_free_regs): Remove.
4194         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4195         (dwarf2_restore_rule): Call method .alloc_regs instead of
4196         dwarf2_frame_state_alloc_regs.
4197         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4198         constructor.  Call std::move.
4199         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4200         (dwarf2_frame_cache): Likewise.
4201
4202         [GDB_SELF_TEST]: Include selftest.h and
4203         selftest-arch.h.
4204         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4205         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4206         execute_cfa_program_test.
4207
4208         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4209         copy ctor, assignment operator, move assignment.
4210         <alloc_regs>: New method.
4211         <swap>: New method.
4212         (struct dwarf2_frame_state): Delete dtor.
4213         (dwarf2_frame_state_alloc_regs): Remove declaration.
4214         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4215         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4216
4217 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4218
4219         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4220         (dwarf2_frame_state::dwarf2_frame_state): New.
4221         (dwarf2_frame_state::~dwarf2_frame_state): New.
4222         (dwarf2_fetch_cfa_info): Update.
4223         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4224         rather than a pointer.  Update code.
4225         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4226         dtor.
4227         <data_align, code_align, retaddr_column>: Change them to const.
4228         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4229         to bool.
4230
4231 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4232
4233         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4234         <loc.exp>: New field.
4235         * dwarf2-frame.c (execute_cfa_program): Update.
4236         (dwarf2_frame_prev_register): Update.
4237
4238 2017-08-10  Pedro Alves  <palves@redhat.com>
4239
4240         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4241
4242 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4243
4244         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4245         (fbsd_pending_children): Use std::list.
4246         (fbsd_remember_child): Likewise.
4247         (fbsd_is_child_pending): Likewise.
4248         (fbsd_pending_vfork_done): Use std::forward_list.
4249         (fbsd_add_vfork_done): Likewise.
4250         (fbsd_is_vfork_done_pending): Likewise.
4251         (fbsd_next_vfork_done): Likewise.
4252
4253 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4254
4255         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4256         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4257         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4258         for `mapfilename'.
4259         (fbsd_xfer_partial): Use gdb::byte_vector.
4260         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4261
4262 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4263
4264         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4265         "filestuff.h".
4266         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4267
4268 2017-08-09  Tom Tromey  <tom@tromey.com>
4269
4270         * skip.c (skiplist_entry): New constructor.
4271         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4272         (skiplist_entry::file_is_glob): Now bool.
4273         (skiplist_entry::file, skiplist_entry::function): Now
4274         std::string.
4275         (make_skip_entry): Return a unique_ptr.  Use new.
4276         (free_skiplist_entry, free_skiplist_entry_cleanup)
4277         (make_free_skiplist_entry_cleanup): Remove.
4278         (skip_command, skip_disable_command, add_skiplist_entry)
4279         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4280         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4281         (function_name_is_marked_for_skip): Update.
4282         (skip_delete_command): Update.  Use delete.
4283
4284 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4285
4286         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4287         (aarch64_linux_core_read_description): New function.
4288         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4289
4290 2017-08-09  Pedro Alves  <palves@redhat.com>
4291
4292         * cp-name-parser.y (cp_comp_to_string): Return a
4293         gdb::unique_xmalloc_ptr<char>.
4294         * cp-support.c (replace_typedefs_qualified_name)
4295         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4296         (cp_canonicalize_string_full): Use op= instead of explicit
4297         convertion.
4298         (cp_class_name_from_physname, method_name_from_physname)
4299         (cp_func_name, cp_remove_params): Adjust to use
4300         gdb::unique_xmalloc_ptr<char>.
4301         * cp-support.h (cp_comp_to_string): Return a
4302         gdb::unique_xmalloc_ptr<char>.
4303         * python/py-type.c (typy_lookup_type): Adjust to use
4304         gdb::unique_xmalloc_ptr<char>.
4305
4306 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4307
4308         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4309
4310 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4311             Yao Qi  <yao.qi@linaro.org>
4312
4313         * cp-support.c (cp_canonicalize_string_full): Use
4314         gdb::unique_xmalloc_ptr<char>.
4315         (cp_canonicalize_string): Likewise.
4316
4317 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4318
4319         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4320         * regformats/i386/amd64-avx-avx512.dat: Remove.
4321         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4322         * regformats/i386/amd64-avx-mpx.dat:Remove.
4323         * regformats/i386/amd64-avx.dat: Remove.
4324         * regformats/i386/amd64-mpx.dat: Remove.
4325         * regformats/i386/i386-avx-avx512.dat: Remove.
4326         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4327         * regformats/i386/i386-avx-mpx.dat: Remove.
4328         * regformats/i386/i386-mmx.dat: Remove.
4329         * regformats/i386/i386-mpx.dat: Remove.
4330
4331 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4332
4333         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4334         * amd64-tdep.c: Don't include features/i386/x32*.c.
4335         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4336         functions.
4337         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4338         and i386/x32-avx-avx512.
4339         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4340         and i386/x32.xml.
4341         * features/i386/x32-avx-avx512.c: Removed.
4342         * features/i386/x32-avx-avx512.xml: Removed.
4343         * features/i386/x32-avx.c: Removed.
4344         * features/i386/x32-avx.xml: Removed.
4345         * features/i386/x32.c: Removed.
4346         * features/i386/x32.xml: Removed.
4347         * regformats/i386/x32-avx-avx512.dat: Removed.
4348         * regformats/i386/x32-avx.dat: Removed.
4349         * regformats/i386/x32.dat: Removed.
4350
4351 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4352
4353         PR breakpoints/21886
4354         * mem-break.c (default_memory_insert_breakpoint): Use
4355         `->placed_address' rather than `->reqstd_address' for the
4356         breakpoint location.
4357
4358 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4359
4360         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4361         assertions.
4362
4363 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4364
4365         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4366         a union of `tdep_info', `tdesc_data' and `id'.
4367         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4368         rather than `info.tdep_info'.
4369         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4370         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4371         * i386-tdep.c (i386_gdbarch_init): Likewise.
4372         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4373         * mips-tdep.c (mips_gdbarch_init): Likewise.
4374         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4375         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4376         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4377         `info.tdep_info'.
4378         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4379         `info.tdep_info'.
4380         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4381         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4382         `info.tdep_info'.
4383         * spu-tdep.c (spu_gdbarch_init): Likewise.
4384         * gdbarch.h: Regenerate.
4385
4386 2017-08-07  Leszek Swirski  <leszeks@google.com>
4387
4388         PR symtab/20899
4389         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4390
4391 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4392
4393         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4394         (gdbsim_open): Rename gdb_argv args object to argv.
4395
4396 2017-08-05  Tom Tromey  <tom@tromey.com>
4397
4398         * compile/compile-object-load.c (compile_object_load): Use
4399         gdb::unique_xmalloc_ptr.
4400         * cli/cli-dump.c (scan_filename): Rename from
4401         scan_filename_with_cleanup.  Change return type.
4402         (scan_expression): Rename from scan_expression_with_cleanup.
4403         Change return type.
4404         (dump_memory_to_file, dump_value_to_file, restore_command):
4405         Use gdb::unique_xmalloc_ptr.  Update.
4406         * cli/cli-cmds.c (find_and_open_script): Use
4407         gdb::unique_xmalloc_ptr.
4408         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4409         * symmisc.c (maintenance_print_symbols)
4410         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4411         * symfile.c (symfile_bfd_open, generic_load)
4412         (add_symbol_file_command, remove_symbol_file_command): Use
4413         gdb::unique_xmalloc_ptr.
4414         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4415         * psymtab.c (maintenance_print_psymbols): Use
4416         gdb::unique_xmalloc_ptr.
4417         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4418         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4419         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4420         (reload_shared_libraries_1): Likewise.
4421
4422 2017-08-05  Tom Tromey  <tom@tromey.com>
4423
4424         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4425         (rust_op_vector, rust_set_vector): New typedefs.
4426         (current_parser): New global.
4427         (work_obstack): Change to pointer type.  Update all users.
4428         (rust_ast, pstate): Remove globals.
4429         (struct rust_parser): New.
4430         (%union) <params, field_inits>: Change type.
4431         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4432         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4433         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4434         (convert_params_to_types, convert_params_to_expression): Change
4435         type of "params".
4436         (ast_string): Change type of "fields".
4437         (rust_parse): Make a rust_parser.  Remove cleanups.
4438         (rust_lex_tests): Make and install an auto_obstack.
4439
4440 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4441
4442         * configure.srv (ipa_x32_linux_regobj): New.
4443         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4444         instead of X86_TDESC_AVX512.
4445         (initialize_low_tracepoint): Call
4446         init_registers_x32_avx_avx512_linux.
4447
4448 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4449
4450         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4451
4452 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4453
4454         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4455
4456 2017-08-03  Tom Tromey  <tom@tromey.com>
4457
4458         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4459         Remove.
4460         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4461
4462 2017-08-03  Tom Tromey  <tom@tromey.com>
4463
4464         * python/py-param.c (compute_enum_values): Use gdb_argv.
4465
4466 2017-08-03  Tom Tromey  <tom@tromey.com>
4467
4468         * utils.h (struct gdb_argv_deleter): New.
4469         (gdb_argv): New class.
4470         * utils.c (gdb_argv::reset): New method.
4471         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4472         * tracefile.c (tsave_command): Use gdb_argv.
4473         * top.c (new_ui_command): Use gdb_argv.
4474         * symmisc.c (maintenance_print_symbols)
4475         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4476         * symfile.c (symbol_file_command, generic_load)
4477         (remove_symbol_file_command): Use gdb_argv.
4478         * stack.c (backtrace_command): Use gdb_argv.
4479         * source.c (add_path, show_substitute_path_command)
4480         (unset_substitute_path_command, set_substitute_path_command):
4481         Use gdb_argv.
4482         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4483         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4484         * remote.c (extended_remote_run, remote_put_command)
4485         (remote_get_command, remote_delete_command): Use gdb_argv.
4486         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4487         (gdbsim_open): Use gdb_argv.
4488         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4489         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4490         * procfs.c (procfs_info_proc): Use gdb_argv.
4491         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4492         * infrun.c (handle_command): Use gdb_argv.
4493         * inferior.c (add_inferior_command, clone_inferior_command):
4494         Use gdb_argv.
4495         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4496         * exec.c (exec_file_command): Use gdb_argv.
4497         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4498         * compile/compile.c (build_argc_argv): Use gdb_argv.
4499
4500 2017-08-03  Tom Tromey  <tom@tromey.com>
4501
4502         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4503
4504 2017-08-03  Tom Tromey  <tom@tromey.com>
4505
4506         * python/python.c (compute_python_string): Return std::string.
4507         (gdbpy_eval_from_control_command): Update.
4508         (do_start_initialization): Use std::string.
4509         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4510         xstrprintf.
4511         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4512         xstrprintf.
4513
4514 2017-08-03  Tom Tromey  <tom@tromey.com>
4515
4516         * top.h (do_restore_instream_cleanup): Remove.
4517         * top.c (do_restore_instream_cleanup): Remove.
4518         (read_command_file): Use scoped_restore.
4519         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4520
4521 2017-08-03  Tom Tromey  <tom@tromey.com>
4522
4523         * cli/cli-script.c (execute_user_command)
4524         (execute_control_command): Use scoped_restore.
4525
4526 2017-08-03  Tom Tromey  <tom@tromey.com>
4527
4528         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4529         (execute_user_command): Remove user_call_depth; use
4530         user_args_stack's size instead.
4531
4532 2017-08-03  Tom Tromey  <tom@tromey.com>
4533
4534         * top.h (in_user_command): Remove.
4535         * top.c (in_user_command): Remove.
4536         * cli/cli-script.c (do_restore_user_call_depth)
4537         (execute_user_command): Update.
4538
4539 2017-08-03  Tom Tromey  <tom@tromey.com>
4540
4541         * valops.c (search_struct_method): Use gdb::byte_vector.
4542         * valarith.c (value_concat): Use std::vector.
4543         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4544         (simple_search_memory): Likewise.
4545         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4546         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4547         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4548         * elfread.c (elf_rel_plt_read): Use std::string.
4549         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4550         * cli/cli-dump.c (restore_section_callback): Use
4551         gdb::byte_vector.
4552
4553 2017-08-03  Tom Tromey  <tom@tromey.com>
4554
4555         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4556
4557 2017-08-03  Tom Tromey  <tom@tromey.com>
4558
4559         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4560         (tui_register_format): Use scoped_restore.
4561
4562 2017-08-03  Tom Tromey  <tom@tromey.com>
4563
4564         * reverse.c (exec_direction_default): Remove.
4565         (exec_reverse_once): Use scoped_restore.
4566         * remote.c (restore_remote_timeout): Remove.
4567         (remote_flash_erase, remote_flash_write, remote_flash_done)
4568         (readchar, remote_serial_write): Use scoped_restore.
4569         * cli/cli-script.c (struct source_cleanup_lines_args)
4570         (source_cleanup_lines): Remove.
4571         (script_from_file): Use scoped_restore.
4572         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4573         (source_command): Use scoped_restore.
4574
4575 2017-08-03  Tom Tromey  <tom@tromey.com>
4576
4577         * utils.h (make_cleanup_free_so): Remove.
4578         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4579         * solist.h (struct so_deleter): New.
4580         (so_list_up): New typedef.
4581         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4582
4583 2017-08-03  Tom Tromey  <tom@tromey.com>
4584
4585         * utils.h (make_cleanup_restore_current_language): Remove.
4586         * utils.c (do_restore_current_language)
4587         (make_cleanup_restore_current_language): Remove.
4588         * parse.c (parse_exp_in_context_1)
4589         (parse_expression_with_language): Use
4590         scoped_restore_current_language.
4591         * mi/mi-main.c (mi_cmd_execute): Use
4592         scoped_restore_current_language.
4593         * language.h (scoped_restore_current_language): New class.
4594
4595 2017-08-03  Tom Tromey  <tom@tromey.com>
4596
4597         * compile/compile.c (cleanup_unlink_file): Remove.
4598         (compile_to_object): Use gdb::unlinker.
4599         (eval_compile_command): Likewise.
4600
4601 2017-08-03  Tom Tromey  <tom@tromey.com>
4602
4603         * utils.h (make_cleanup_fclose): Remove.
4604         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4605
4606 2017-08-03  Tom Tromey  <tom@tromey.com>
4607
4608         * top.c (open_terminal_stream): Return gdb_file_up.
4609         (new_ui_command): Update.
4610
4611 2017-08-03  Tom Tromey  <tom@tromey.com>
4612
4613         * source.c (print_source_lines_base, forward_search_command)
4614         (reverse_search_command): Use gdb_file_up.
4615
4616 2017-08-03  Tom Tromey  <tom@tromey.com>
4617
4618         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4619
4620 2017-08-03  Tom Tromey  <tom@tromey.com>
4621
4622         * cli/cli-cmds.c (find_and_open_script): Change return type.
4623         Remove "streamp" and "full_path" parameters.
4624         (source_script_with_search): Update.
4625         * auto-load.c (source_script_file): Update.
4626         * cli/cli-cmds.h (find_and_open_script): Change type.
4627         (open_script): New struct.
4628
4629 2017-08-03  Tom Tromey  <tom@tromey.com>
4630
4631         * xml-support.c (xml_fetch_content_from_file): Update.
4632         * ui-file.c (stdio_file::open): Update.
4633         * tracefile-tfile.c (tfile_start): Update.
4634         * remote.c (remote_file_put, remote_file_get): Update.
4635         * nat/linux-procfs.c (linux_proc_get_int)
4636         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4637         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4638         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4639         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4640         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4641         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4642         * linux-nat.c (linux_proc_pending_signals): Update.
4643         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4644         (file_closer): Remove.
4645         * compile/compile.c (compile_to_object): Update.
4646         * common/filestuff.h (struct gdb_file_deleter): New.
4647         (gdb_file_up): New typedef.
4648         (gdb_fopen_cloexec): Change return type.
4649         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4650         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4651         (dump_binary_file, restore_binary_file): Update.
4652         * auto-load.c (auto_load_objfile_script_1): Update.
4653
4654 2017-08-03  Tom Tromey  <tom@tromey.com>
4655
4656         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4657         (info_static_tracepoint_markers_command): Likewise.
4658         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4659         * skip.c (skip_info): Use ui_out_emit_table.
4660         * progspace.c (print_program_space): Use ui_out_emit_table.
4661         * osdata.c (info_osdata): Use ui_out_emit_table.
4662         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4663         ui_out_emit_table.
4664         * linux-thread-db.c (info_auto_load_libthread_db): Use
4665         ui_out_emit_table.
4666         * inferior.c (print_inferior): Use ui_out_emit_table.
4667         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4668         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4669         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4670         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4671         * ui-out.h (class ui_out_emit_table): New.
4672
4673 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4674
4675         * mips-tdep.c (mips_fpu_type_str): New function.
4676         (mips_dump_tdep): Call it.
4677
4678 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4679
4680         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4681         `->mips_fpu_type'.
4682
4683 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4684
4685         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4686
4687 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4688
4689         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4690
4691 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4692
4693         * cli/cli-cmds.c (maintenancechecklist): New variable.
4694         * gdbcmd.h (maintenancechecklist): Declare it.
4695         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4696         Call i386_linux_read_description with different masks.
4697         * maint.c (maintenance_check_command): New function.
4698         (_initialize_maint_cmds): Call add_prefix_cmd.
4699         * target-descriptions.c (tdesc_reg): override operator != and ==.
4700         (tdesc_type): Likewise.
4701         (tdesc_feature): Likewise.
4702         (target_desc): Likewise.
4703         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4704         (maintenance_check_xml_descriptions): New function.
4705         (_initialize_target_descriptions) Add command "xml-descriptions".
4706         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4707
4708 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4709
4710         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4711         Include features/i386/32bit-*.c.
4712         (i386_linux_read_description): Generate target description if it
4713         doesn't exist.
4714         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4715         functions.
4716         * features/i386/32bit-linux.c: Re-generated.
4717         * features/i386/32bit-sse.c: Likewise.
4718         * target-descriptions.c (print_c_feature::visit): Print code to
4719         set register number if needed.
4720         (print_c_feature) <m_next_regnum>: New field.
4721
4722 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4723
4724         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4725         (FEATURE_XMLFILES): New.
4726         (FEATURE_CFILES): New.
4727         New rules.
4728         (clean-cfiles): Remove generated c files.
4729         * features/i386/32bit-avx.c: Generated.
4730         * features/i386/32bit-avx512.c: Generated.
4731         * features/i386/32bit-core.c: Generated.
4732         * features/i386/32bit-linux.c: Generated.
4733         * features/i386/32bit-mpx.c: Generated.
4734         * features/i386/32bit-pkeys.c: Generated.
4735         * features/i386/32bit-sse.c: Generated.
4736         * target-descriptions.c: Include algorithm.
4737         (tdesc_element_visitor): Add method visit_end.
4738         (print_c_tdesc): Implement visit_end.
4739         (print_c_tdesc:: m_filename_after_features): Move it to
4740         protected.
4741         (print_c_feature): New class.
4742         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4743         name starts with "i386/32bit-".
4744
4745 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4746
4747         * target-descriptions.c (tdesc_element_visitor): New class.
4748         (tdesc_element): New class.
4749         (tdesc_reg): Inherit from tdesc_element.
4750         (tdesc_reg::accept): New function.
4751         (tdesc_type): Inherit from tdesc_element.
4752         (tdesc_type::accept): New function.
4753         (tdesc_feature): Inherit from tdesc_element.
4754         (tdesc_feature::accept): New function.
4755         (target_desc): Inherit from tdesc_element.
4756         (target_desc::target_desc): New.
4757         (target_desc::~target_desc): New.
4758         (target_desc::accept): New.
4759         (allocate_target_description): Use new.
4760         (free_target_description): Use delete.
4761         (print_c_tdesc): New class.
4762         (maint_print_c_tdesc_cmd): Adjust.
4763
4764         * features/aarch64.c: Re-generated.
4765         * features/arc-arcompact.c: Re-generated.
4766         * features/arc-v2.c: Re-generated.
4767         * features/arm/arm-with-iwmmxt.c: Re-generated.
4768         * features/arm/arm-with-m.c: Re-generated.
4769         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4770         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4771         * features/arm/arm-with-neon.c: Re-generated.
4772         * features/arm/arm-with-vfpv2.c: Re-generated.
4773         * features/arm/arm-with-vfpv3.c: Re-generated.
4774         * features/i386/amd64-avx-avx512.c: Re-generated.
4775         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4776         * features/i386/amd64-avx.c: Re-generated.
4777         * features/i386/amd64-avx-linux.c: Re-generated.
4778         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4779         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4780         * features/i386/amd64-avx-mpx.c: Re-generated.
4781         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4782         * features/i386/amd64.c: Re-generated.
4783         * features/i386/amd64-linux.c: Re-generated.
4784         * features/i386/amd64-mpx.c: Re-generated.
4785         * features/i386/amd64-mpx-linux.c: Re-generated.
4786         * features/i386/i386-avx-avx512.c: Re-generated.
4787         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4788         * features/i386/i386-avx.c: Re-generated.
4789         * features/i386/i386-avx-linux.c: Re-generated.
4790         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4791         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4792         * features/i386/i386-avx-mpx.c: Re-generated.
4793         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4794         * features/i386/i386.c: Re-generated.
4795         * features/i386/i386-linux.c: Re-generated.
4796         * features/i386/i386-mmx.c: Re-generated.
4797         * features/i386/i386-mmx-linux.c: Re-generated.
4798         * features/i386/i386-mpx.c: Re-generated.
4799         * features/i386/i386-mpx-linux.c: Re-generated.
4800         * features/i386/x32-avx-avx512.c: Re-generated.
4801         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4802         * features/i386/x32-avx.c: Re-generated.
4803         * features/i386/x32-avx-linux.c: Re-generated.
4804         * features/i386/x32.c: Re-generated.
4805         * features/i386/x32-linux.c: Re-generated.
4806         * features/microblaze.c: Re-generated.
4807         * features/microblaze-with-stack-protect.c: Re-generated.
4808         * features/mips64-dsp-linux.c: Re-generated.
4809         * features/mips64-linux.c: Re-generated.
4810         * features/mips-dsp-linux.c: Re-generated.
4811         * features/mips-linux.c: Re-generated.
4812         * features/nds32.c: Re-generated.
4813         * features/nios2.c: Re-generated.
4814         * features/nios2-linux.c: Re-generated.
4815         * features/rs6000/powerpc-32.c: Re-generated.
4816         * features/rs6000/powerpc-32l.c: Re-generated.
4817         * features/rs6000/powerpc-403.c: Re-generated.
4818         * features/rs6000/powerpc-403gc.c : Re-generated.
4819         * features/rs6000/powerpc-405.c: Re-generated.
4820         * features/rs6000/powerpc-505.c: Re-generated.
4821         * features/rs6000/powerpc-601.c: Re-generated.
4822         * features/rs6000/powerpc-602.c: Re-generated.
4823         * features/rs6000/powerpc-603.c: Re-generated.
4824         * features/rs6000/powerpc-604.c: Re-generated.
4825         * features/rs6000/powerpc-64.c: Re-generated.
4826         * features/rs6000/powerpc-64l.c: Re-generated.
4827         * features/rs6000/powerpc-7400.c: Re-generated.
4828         * features/rs6000/powerpc-750.c: Re-generated.
4829         * features/rs6000/powerpc-860.c: Re-generated.
4830         * features/rs6000/powerpc-altivec32.c: Re-generated.
4831         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4832         * features/rs6000/powerpc-altivec64.c: Re-generated.
4833         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4834         * features/rs6000/powerpc-cell32l.c: Re-generated.
4835         * features/rs6000/powerpc-cell64l.c: Re-generated.
4836         * features/rs6000/powerpc-e500.c: Re-generated.
4837         * features/rs6000/powerpc-e500l.c: Re-generated.
4838         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4839         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4840         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4841         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4842         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4843         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4844         * features/rs6000/powerpc-vsx32.c: Re-generated.
4845         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4846         * features/rs6000/powerpc-vsx64.c: Re-generated.
4847         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4848         * features/rs6000/rs6000.c: Re-generated.
4849         * features/s390-linux32.c: Re-generated.
4850         * features/s390-linux32v1.c: Re-generated.
4851         * features/s390-linux32v2.c: Re-generated.
4852         * features/s390-linux64.c: Re-generated.
4853         * features/s390-linux64v1.c: Re-generated.
4854         * features/s390-linux64v2.c: Re-generated.
4855         * features/s390-te-linux64.c: Re-generated.
4856         * features/s390-tevx-linux64.c: Re-generated.
4857         * features/s390-vx-linux64.c: Re-generated.
4858         * features/s390x-linux64.c: Re-generated.
4859         * features/s390x-linux64v1.c: Re-generated.
4860         * features/s390x-linux64v2.c: Re-generated.
4861         * features/s390x-te-linux64.c: Re-generated.
4862         * features/s390x-tevx-linux64.c: Re-generated.
4863         * features/s390x-vx-linux64.c: Re-generated.
4864         * features/sparc/sparc32-solaris.c: Re-generated.
4865         * features/sparc/sparc64-solaris.c: Re-generated.
4866         * features/tic6x-c62x.c: Re-generated.
4867         * features/tic6x-c62x-linux.c: Re-generated.
4868         * features/tic6x-c64x.c: Re-generated.
4869         * features/tic6x-c64x-linux.c: Re-generated.
4870         * features/tic6x-c64xp.c: Re-generated.
4871         * features/tic6x-c64xp-linux.c: Re-generated.
4872
4873 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4874
4875         * i386-linux-tdep.c (i386_linux_read_description): New function.
4876         (i386_linux_core_read_description): Call
4877         i386_linux_read_description.
4878         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4879         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4880         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4881         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4882         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4883         * x86-linux-nat.c (x86_linux_read_description): Call
4884         i386_linux_read_description.
4885
4886 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4887
4888         * NEWS: Mention it.
4889         * features/Makefile (%.c: %.xml): Pass the xml file name to
4890         command "maint print c-tdesc".
4891         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4892         name from 'arg'.
4893
4894 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4895
4896         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4897         in-class initialization.
4898         (tdesc_create_feature): Call new instead of XCNEW.
4899         (free_target_description): Ue delete.
4900
4901 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4902
4903         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4904
4905 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4906
4907         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4908         constant.
4909         (amd64_x32_init_abi): Likewise.
4910         * amd64-tdep.h (amd64_init_abi): Update declaration.
4911         (amd64_x32_init_abi): Likewise.
4912
4913 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4914
4915         PR tdep/21717
4916         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4917         condition for FPSCR.
4918         (arm_linux_store_inferior_registers): Likewise.
4919
4920 2017-07-22  Tom Tromey  <tom@tromey.com>
4921
4922         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4923         <syscalls_counts>: Now a std::vector.
4924         (get_catch_syscall_inferior_data): Use "new".
4925         (catch_syscall_inferior_data_cleanup): Use "delete".
4926         (insert_catch_syscall, remove_catch_syscall)
4927         (clear_syscall_counts): Update.
4928
4929 2017-07-22  Tom Tromey  <tom@tromey.com>
4930
4931         * break-catch-syscall.c (syscall_catchpoint)
4932         <syscalls_to_be_caught>: Now a std::vector<int>
4933         (~syscall_catchpoint): Remove.
4934         (insert_catch_syscall, remove_catch_syscall)
4935         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4936         (print_mention_catch_syscall, print_recreate_catch_syscall):
4937         Update.
4938         (create_syscall_event_catchpoint): Change type of "filter"
4939         parameter.
4940         (catch_syscall_split_args): Return a std::vector.
4941         (catch_syscall_command_1, catching_syscall_number_1): Update.
4942
4943 2017-07-22  Tom Tromey  <tom@tromey.com>
4944
4945         * break-catch-throw.c (struct exception_catchpoint)
4946         <exception_rx>: Now a std::string.
4947         (~exception_catchpoint): Remove.
4948         (print_one_detail_exception_catchpoint): Update.
4949         (handle_gnu_v3_exceptions): Change type of except_rx.
4950         (extract_exception_regexp): Return a std::string.
4951         (catch_exception_command_1): Update.
4952
4953 2017-07-22  Tom Tromey  <tom@tromey.com>
4954
4955         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4956         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4957         std::vector.
4958         <catch_all>: Now a bool.
4959         (~signal_catchpoint): Remove.
4960         (signal_catchpoint_insert_location)
4961         (signal_catchpoint_remove_location)
4962         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4963         (signal_catchpoint_print_mention)
4964         (signal_catchpoint_print_recreate)
4965         (signal_catchpoint_explains_signal): Update.
4966         (create_signal_catchpoint): Change type of "filter" and
4967         "catch_all".
4968         (catch_signal_split_args): Return a std::vector.  Change type of
4969         "catch_all".
4970         (catch_signal_command): Update.
4971
4972 2017-07-20  Pedro Alves  <palves@redhat.com>
4973
4974         * ada-lang.c (ada_language_defn): Make extern.
4975         (_initialize_ada_language): Remove add_language call.
4976         * c-lang.c (c_language_defn, cplus_language_defn)
4977         (asm_language_defn, minimal_language_defn): Make extern.
4978         (_initialize_c_language): Delete.
4979         * completer.c (compare_cstrings): Delete, moved to utils.h.
4980         * d-lang.c (d_language_defn): Make extern.
4981         (_initialize_d_language): Remove add_language calls.
4982         * defs.h (enum language): Add comment.
4983         * f-lang.c (f_language_defn): Make extern.
4984         (_initialize_f_language): Remove add_language call.
4985         * go-lang.c (go_language_defn): Make extern.
4986         (_initialize_go_language): Remove add_language call.
4987         * language.c: Include <algorithm>.
4988         (languages): Redefine as const array.
4989         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4990         (set_language_command): Handle "local".  Use for-range loop.
4991         (set_language): Remove loop.
4992         (language_enum): Rewrite.
4993         (language_def, language_str): Remove loops.
4994         (add_language): Delete.
4995         (add_set_language_command): New, based on add_languages.
4996         (skip_language_trampoline): Adjust.
4997         (local_language_defn): Delete.
4998         (language_gdbarch_post_init): Adjust.
4999         (_initialize_language): Remove add_language calls.  Call
5000         add_set_language_command.
5001         * language.h (add_language): Delete.
5002         (auto_language_defn)
5003         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5004         (asm_language_defn, c_language_defn, cplus_language_defn)
5005         (d_language_defn, f_language_defn, go_language_defn)
5006         (m2_language_defn, objc_language_defn, opencl_language_defn)
5007         (pascal_language_defn, rust_language_defn): Declare.
5008         * m2-lang.c (m2_language_defn): Make extern.
5009         (_initialize_m2_language): Remove add_language call.
5010         * objc-lang.c (objc_language_defn): Make extern.
5011         (_initialize_objc_language): Remove add_language call.
5012         * opencl-lang.c (opencl_language_defn): Make extern.
5013         (_initialize_opencl_language): Remove add_language call.
5014         * p-lang.c (pascal_language_defn): Make extern.
5015         (_initialize_pascal_language): Delete.
5016         * rust-lang.c (rust_language_defn): Make extern.
5017         (_initialize_rust_language): Delete.
5018         * utils.h (compare_cstrings): New static inline function.
5019
5020 2017-07-20  Pedro Alves  <palves@redhat.com>
5021
5022         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5023         (get_var_value): Constify parameters.
5024         (get_int_var_value): Change prototype.
5025         (to_fixed_range_type): Adjust.
5026         * ada-lang.h (get_int_var_value): Change prototype.
5027
5028 2017-07-20  Pedro Alves  <palves@redhat.com>
5029
5030         * dwarf2read.c (dw2_lookup_symbol): Use
5031         SYMBOL_MATCHES_SEARCH_NAME.
5032         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5033
5034 2017-07-20  Pedro Alves  <palves@redhat.com>
5035
5036         * block.c (block_iter_name_step, block_iter_name_first)
5037         (block_iter_name_next): Delete.
5038         (block_lookup_symbol_primary): Adjust to use
5039         dict_iter_match_first/dict_iter_match_next.
5040         * block.h (block_iter_name_first, block_iter_name_next): Delete
5041         declarations.
5042         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5043         dict_iter_match_first/dict_iter_match_next.
5044
5045 2017-07-20  Pedro Alves  <palves@redhat.com>
5046
5047         * cp-support.c (cp_find_first_component_aux): Add missing case for
5048         end of string.
5049
5050 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5051
5052         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5053         of dwo_cu's dwo_file.
5054
5055 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5056
5057         * remote.c (store_registers_using_G): Remove one line comment.
5058
5059 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5060
5061         * regcache.c (regcache_cpy): Simplify it.
5062         (regcache::cpy_no_passthrough): Remove it.
5063         * regcache.h (cpy_no_passthrough): Remove it.
5064         (regcache_dup, regcache_cpy): Update comments.
5065
5066 2017-07-18  Pedro Alves  <palves@redhat.com>
5067
5068         * remote-sim.c (sim_command_completer): Adjust to work with a
5069         completion_tracker instead of a VEC.
5070
5071 2017-07-17  Pedro Alves  <palves@redhat.com>
5072
5073         * completer.c (complete_source_filenames): New function.
5074         (complete_address_and_linespec_locations): New function.
5075         (location_completer): Use complete_address_and_linespec_locations.
5076         (completion_tracker::build_completion_result): Honor the tracker's
5077         request to suppress append.
5078         * completer.h (completion_tracker::suppress_append_ws)
5079         (completion_tracker::set_suppress_append_ws): New methods.
5080         (completion_tracker::m_suppress_append_ws): New field.
5081         (complete_source_filenames): New declaration.
5082         * linespec.c (linespec_complete_what): New.
5083         (struct ls_parser) <complete_what, completion_word,
5084         completion_quote_char, completion_quote_end, completion_tracker>:
5085         New fields.
5086         (string_find_incomplete_keyword_at_end): New.
5087         (linespec_lexer_lex_string): Record quote char.  If in completion
5088         mode, don't throw.
5089         (linespec_lexer_consume_token): Advance the completion word point.
5090         (linespec_lexer_peek_token): Save/restore completion info.
5091         (save_stream_and_consume_token): New.
5092         (set_completion_after_number): New.
5093         (linespec_parse_basic): Set what to complete next depending on
5094         token.  Handle function and label completions specially.
5095         (parse_linespec): Disable objc shortcut in completion mode.  Set
5096         what to complete next depending on token type.  Skip keyword if in
5097         completion mode.
5098         (complete_linespec_component, linespec_complete): New.
5099         * linespec.h (linespec_complete): Declare.
5100
5101 2017-07-17  Pedro Alves  <palves@redhat.com>
5102
5103         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5104         Handle 'operator<' / 'operator<<'.
5105
5106 2017-07-17  Pedro Alves  <palves@redhat.com>
5107
5108         * completer.c (collect_explicit_location_matches): Handle
5109         MATCH_LABEL.
5110         (convert_explicit_location_to_linespec): New, factored out from
5111         ...
5112         (convert_explicit_location_to_sals): ... this.
5113         (complete_label): New.
5114         (linespec_complete_label, find_label_symbols_in_block): New.
5115         (find_label_symbols): Add completion_mode parameter and adjust to
5116         call find_label_symbols_in_block.
5117         * linespec.h (linespec_complete_label): Declare.
5118
5119 2017-07-17  Pedro Alves  <palves@redhat.com>
5120
5121         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5122         complete_symbol_mode parameter.
5123         * cli/cli-cmds.c (complete_command): Get the completion result out
5124         of the handle_brkchars tracker if used a custom word point.
5125         * completer.c: Include "linespec.h".
5126         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5127         (advance_to_expression_complete_word_point): New.
5128         (completion_tracker::completes_to_completion_word): New.
5129         (complete_files_symbols): Pass down
5130         complete_symbol_mode::EXPRESSION.
5131         (explicit_options, probe_options): New.
5132         (collect_explicit_location_matches): Complete on the
5133         explictit_loc->foo instead of word.  Use
5134         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5135         keyword and options completions.
5136         (backup_text_ptr): Delete.
5137         (skip_keyword): New.
5138         (complete_explicit_location): Remove 'word' parameter.  Add
5139         language, quoted_arg_start and quoted_arg_end parameters.
5140         Rewrite, parsing left to right.
5141         (location_completer): Rewrite.
5142         (location_completer_handle_brkchars): New function.
5143         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5144         (enum complete_line_internal_reason): Adjust comments.
5145         (completion_tracker::discard_completions): New.
5146         (completer_handle_brkchars_func_for_completer): Handle
5147         location_completer.
5148         (gdb_custom_word_point_brkchars)
5149         (gdb_org_rl_basic_quote_characters): New.
5150         (gdb_completion_word_break_characters_throw)
5151         (completion_find_completion_word): Handle trackers that use a
5152         custom word point.
5153         (completion_tracker::advance_custom_word_point_by): New.
5154         (completion_tracker::build_completion_result): Don't rely on
5155         readline appending the quote char.
5156         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5157         use a custom word point.
5158         (gdb_rl_attempted_completion_function): Restore
5159         rl_basic_quote_characters.
5160         * completer.h (class completion_tracker): Extend intro comment.
5161         (completion_tracker::set_quote_char)
5162         (completion_tracker::quote_char)
5163         (completion_tracker::set_use_custom_word_point)
5164         (completion_tracker::use_custom_word_point)
5165         (completion_tracker::custom_word_point)
5166         (completion_tracker::set_custom_word_point)
5167         (completion_tracker::advance_custom_word_point_by)
5168         (completion_tracker::completes_to_completion_word)
5169         (completion_tracker::discard_completions): New methods.
5170         (completion_tracker::m_quote_char)
5171         (completion_tracker::m_use_custom_word_point)
5172         (completion_tracker::m_custom_word_point): New fields.
5173         (advance_to_expression_complete_word_point): Declare.
5174         * f-lang.c (f_collect_symbol_completion_matches): Add
5175         complete_symbol_mode parameter.
5176         * language.h (struct language_defn)
5177         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5178         parameter.
5179         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5180         (linespec_complete_function): New function.
5181         (linespec_lexer_lex_keyword): Adjust.
5182         * linespec.h (linespec_keywords, linespec_complete_function): New
5183         declarations.
5184         * location.c (find_end_quote): New function.
5185         (explicit_location_lex_one): Add explicit_completion_info
5186         parameter.  Save quoting info.  Don't throw if being called for
5187         completion.  Don't handle Ada operators here.
5188         (is_cp_operator, skip_op_false_positives, first_of)
5189         (explicit_location_lex_one_function): New function.
5190         (string_to_explicit_location): Replace 'dont_throw' parameter with
5191         an explicit_completion_info pointer parameter.  Handle it.  Don't
5192         use explicit_location_lex_one to lex function names.  Use
5193         explicit_location_lex_one_function instead.
5194         * location.h (struct explicit_completion_info): New.
5195         (string_to_explicit_location): Replace 'dont_throw' parameter with
5196         an explicit_completion_info pointer parameter.
5197         * symtab.c (default_collect_symbol_completion_matches_break_on):
5198         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5199         (default_collect_symbol_completion_matches)
5200         (collect_symbol_completion_matches): Add complete_symbol_mode
5201         parameter.
5202         (collect_symbol_completion_matches_type): Pass down
5203         complete_symbol_mode::EXPRESSION.
5204         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5205         parameter.  Handle LINESPEC mode.
5206         * symtab.h (complete_symbol_mode): New.
5207         (default_collect_symbol_completion_matches_break_on)
5208         (default_collect_symbol_completion_matches)
5209         (collect_symbol_completion_matches)
5210         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5211         parameter.
5212
5213 2017-07-17  Pedro Alves  <palves@redhat.com>
5214
5215         * utils.c (enum class strncmp_iw_mode): New.
5216         (strcmp_iw): Rename to ...
5217         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5218         parameters.  Handle them.
5219         (strncmp_iw): New.
5220         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5221         * utils.h (strncmp_iw): Declare.
5222         (strcmp_iw): Move describing comments here.
5223
5224 2017-07-17  Pedro Alves  <palves@redhat.com>
5225
5226         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5227         CP_OPERATOR_STR.
5228         * c-typeprint.c (is_type_conversion_operator): Use
5229         CP_OPERATOR_STR.
5230         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5231         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5232         CP_OPERATOR_LEN.
5233         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5234         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5235         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5236         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5237         CP_OPERATOR_STR.
5238         * location.c: Include "cp-support.h".
5239         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5240         CP_OPERATOR_STR.
5241         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5242         CP_OPERATOR_LEN.
5243
5244 2017-07-17  Pedro Alves  <palves@redhat.com>
5245
5246         * cli/cli-cmds.c (complete_command): Use a completion tracker
5247         along with completion_find_completion_word for handle_brkchars
5248         phase.
5249         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5250         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5251         (struct gdb_rl_completion_word_info): New.
5252         (gdb_rl_find_completion_word): New.
5253         (completion_find_completion_word): New.
5254         * completer.h (completion_find_completion_word): Declare.
5255
5256 2017-07-17  Pedro Alves  <palves@redhat.com>
5257
5258         * ada-lang.c (symbol_completion_match): Adjust comments.
5259         (symbol_completion_add): Replace vector parameter with
5260         completion_tracker parameter.  Use it.
5261         (ada_make_symbol_completion_list): Rename to...
5262         (ada_collect_symbol_completion_matches): ... this.  Add
5263         completion_tracker parameter and use it.
5264         (ada_language_defn): Adjust.
5265         * break-catch-syscall.c (catch_syscall_completer): Adjust
5266         prototype and work with completion_tracker instead of VEC.
5267         * breakpoint.c (condition_completer): Adjust prototype and work
5268         with completion_tracker instead of VEC.
5269         * c-lang.c (c_language_defn, cplus_language_defn)
5270         (asm_language_defn, minimal_language_defn): Adjust to renames.
5271         * cli/cli-cmds.c (complete_command): Rework using
5272         completion_tracker.  Catch exceptions when completing.
5273         * cli/cli-decode.c (integer_unlimited_completer)
5274         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5275         with completion_tracker instead of VEC.
5276         * command.h (struct completion_tracker): Forward declare.
5277         (completer_ftype, completer_handle_brkchars_ftype): Change
5278         types.
5279         (complete_on_cmdlist, complete_on_enum): Adjust.
5280         * completer.c: Include <algorithm>.
5281         (struct gdb_completer_state): New.
5282         (current_completion): New global.
5283         (readline_line_completion_function): Delete.
5284         (noop_completer, filename_completer)
5285         (filename_completer_handle_brkchars, complete_files_symbols)
5286         (linespec_location_completer): Adjust to work with a
5287         completion_tracker instead of a VEC.
5288         (string_or_empty): New.
5289         (collect_explicit_location_matches): Adjust to work with a
5290         completion_tracker instead of a VEC.
5291         (explicit_location_completer): Rename to ...
5292         (complete_explicit_location): ... this and adjust to work with a
5293         completion_tracker instead of a VEC.
5294         (location_completer): Adjust to work with a completion_tracker
5295         instead of a VEC.
5296         (add_struct_fields): Adjust to work with a completion_list instead
5297         of VEC.
5298         (expression_completer): Rename to ...
5299         (complete_expression): ... this and adjust to work with a
5300         completion_tracker instead of a VEC.  Use complete_files_symbols.
5301         (expression_completer): Reimplement on top of complete_expression.
5302         (symbol_completer): Adjust to work with a completion_tracker
5303         instead of a VEC.
5304         (enum complete_line_internal_reason): Add describing comments.
5305         (complete_line_internal_normal_command): Adjust to work with a
5306         completion_tracker instead of a VEC.
5307         (complete_line_internal): Rename to ...
5308         (complete_line_internal_1): ... this and adjust to work with a
5309         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5310         handle_brkchars phase.
5311         (new_completion_tracker): Delete.
5312         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5313         complete_line_internal_1.
5314         (free_completion_tracker): Delete.
5315         (INITIAL_COMPLETION_HTAB_SIZE): New.
5316         (completion_tracker::completion_tracker)
5317         (completion_tracker::~completion_tracker): New.
5318         (maybe_add_completion): Delete.
5319         (completion_tracker::maybe_add_completion)
5320         (completion_tracker::add_completion)
5321         (completion_tracker::add_completions): New.
5322         (throw_max_completions_reached_error): Delete.
5323         (complete_line): Adjust to work with a completion_tracker instead
5324         of a VEC.  Don't create a completion_tracker_t or check for max
5325         completions here.
5326         (command_completer, command_completer_handle_brkchars)
5327         (signal_completer, reg_or_group_completer_1)
5328         (reg_or_group_completer, default_completer_handle_brkchars):
5329         Adjust to work with a completion_tracker.
5330         (gdb_completion_word_break_characters_throw): New.
5331         (gdb_completion_word_break_characters): Reimplement.
5332         (line_completion_function): Delete.
5333         (completion_tracker::recompute_lowest_common_denominator)
5334         (expand_preserving_ws)
5335         (completion_tracker::build_completion_result)
5336         (completion_result::completion_result)
5337         (completion_result::completion_result)
5338         (completion_result::~completion_result)
5339         (completion_result::completion_result)
5340         (completion_result::release_match_list, compare_cstrings)
5341         (completion_result::sort_match_list)
5342         (completion_result::reset_match_list)
5343         (gdb_rl_attempted_completion_function_throw)
5344         (gdb_rl_attempted_completion_function): New.
5345         * completer.h (completion_list, struct completion_result)
5346         (class completion_tracker): New.
5347         (complete_line): Add completion_tracker parameter.
5348         (readline_line_completion_function): Delete.
5349         (gdb_rl_attempted_completion_function): New.
5350         (noop_completer, filename_completer, expression_completer)
5351         (location_completer, symbol_completer, command_completer)
5352         (signal_completer, reg_or_group_completer): Update prototypes.
5353         (completion_tracker_t, new_completion_tracker)
5354         (make_cleanup_free_completion_tracker): Delete.
5355         (enum maybe_add_completion_enum): Delete.
5356         (maybe_add_completion): Delete.
5357         (throw_max_completions_reached_error): Delete.
5358         * corefile.c (complete_set_gnutarget): Adjust to work with a
5359         completion_tracker instead of a VEC.
5360         * cp-abi.c (cp_abi_completer): Adjust to work with a
5361         completion_tracker instead of a VEC.
5362         * d-lang.c (d_language_defn): Adjust.
5363         * disasm.c (disassembler_options_completer): Adjust to work with a
5364         completion_tracker instead of a VEC.
5365         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5366         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5367         with a completion_tracker instead of a VEC.
5368         (f_language_defn): Adjust.
5369         * go-lang.c (go_language_defn): Adjust.
5370         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5371         Adjust to work with a completion_tracker instead of a VEC.
5372         * infrun.c (handle_completer): Likewise.
5373         * interps.c (interpreter_completer): Likewise.
5374         * interps.h (interpreter_completer): Likewise.
5375         * language.c (unknown_language_defn, auto_language_defn)
5376         (local_language_defn): Adjust.
5377         * language.h (language_defn::la_make_symbol_completion_list):
5378         Rename to ...
5379         (language_defn::la_collect_symbol_completion_matches): ... this
5380         and adjust to work with a completion_tracker instead of a VEC.
5381         * m2-lang.c (m2_language_defn): Adjust.
5382         * objc-lang.c (objc_language_defn): Adjust.
5383         * opencl-lang.c (opencl_language_defn): Adjust.
5384         * p-lang.c (pascal_language_defn): Adjust.
5385         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5386         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5387         with a completion_tracker.
5388         * rust-lang.c (rust_language_defn): Adjust.
5389         * symtab.c (free_completion_list, do_free_completion_list)
5390         (return_val, completion_tracker): Delete.
5391         (completion_list_add_name, completion_list_add_symbol)
5392         (completion_list_add_msymbol, completion_list_objc_symbol)
5393         (completion_list_add_fields, add_symtab_completions): Add
5394         completion_tracker parameter and use it.
5395         (default_make_symbol_completion_list_break_on_1): Rename to...
5396         (default_collect_symbol_completion_matches_break_on): ... this.
5397         Add completion_tracker parameter and use it instead of allocating
5398         a completion tracker here.
5399         (default_make_symbol_completion_list_break_on): Delete old
5400         implementation.
5401         (default_make_symbol_completion_list): Delete.
5402         (default_collect_symbol_completion_matches): New.
5403         (make_symbol_completion_list): Delete.
5404         (collect_symbol_completion_matches): New.
5405         (make_symbol_completion_type): Rename to ...
5406         (collect_symbol_completion_matches_type): ... this.  Add
5407         completion_tracker parameter and use it instead of VEC.
5408         (make_file_symbol_completion_list_1): Rename to...
5409         (collect_file_symbol_completion_matches): ... this.  Add
5410         completion_tracker parameter and use it instead of VEC.
5411         (make_file_symbol_completion_list): Delete.
5412         (add_filename_to_list): Use completion_list instead of a VEC.
5413         (add_partial_filename_data::list): Now a completion_list.
5414         (make_source_files_completion_list): Work with a completion_list
5415         instead of a VEC.
5416         * symtab.h: Include "completer.h".
5417         (default_make_symbol_completion_list_break_on)
5418         (default_make_symbol_completion_list, make_symbol_completion_list)
5419         (make_symbol_completion_type, make_file_symbol_completion_list)
5420         (make_source_files_completion_list): Delete.
5421         (default_collect_symbol_completion_matches_break_on)
5422         (default_collect_symbol_completion_matches)
5423         (collect_symbol_completion_matches)
5424         (collect_symbol_completion_matches_type)
5425         (collect_file_symbol_completion_matches)
5426         (make_source_files_completion_list): New.
5427         * top.c (init_main): Don't install a rl_completion_entry_function
5428         hook.  Install a rl_attempted_completion_function hook instead.
5429         * tui/tui-layout.c (layout_completer): Adjust to work with a
5430         completion_tracker.
5431         * tui/tui-regs.c (tui_reggroup_completer):
5432         * tui/tui-win.c (window_name_completer, focus_completer)
5433         (winheight_completer): Adjust to work with a completion_tracker.
5434         * value.c: Include "completer.h".
5435         (complete_internalvar): Adjust to work with a completion_tracker.
5436         * value.h (complete_internalvar): Likewise.
5437
5438 2017-07-17  Pedro Alves  <palves@redhat.com>
5439
5440         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5441         renames.
5442         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5443         comments to completer_ftype's declaration.
5444         <completer_handle_brkchars>: Change type to
5445         completer_handle_brkchars_ftype.
5446         * command.h (completer_ftype): Add describing comment and give
5447         names to parameters.
5448         (completer_ftype_void): Rename to ...
5449         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5450         (set_cmd_completer_handle_brkchars): Adjust.
5451         * completer.c (filename_completer_handle_brkchars): New function.
5452         (complete_line_internal_normal_command): New function, factored
5453         out from ...
5454         (complete_line_internal): ... here.
5455         (command_completer_handle_brkchars)
5456         (default_completer_handle_brkchars)
5457         (completer_handle_brkchars_func_for_completer): New functions.
5458         * completer.h (set_gdb_completion_word_break_characters): Delete
5459         declaration.
5460         (completer_handle_brkchars_func_for_completer): New declaration.
5461         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5462         completer_handle_brkchars_func_for_completer.
5463
5464 2017-07-17  Pedro Alves  <palves@redhat.com>
5465
5466         * completer.c (symbol_completer): New function, based on
5467         make_symbol_completion_list_fn.
5468         * completer.h (symbol_completer): New declaration.
5469         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5470         * python/py-cmd.c (completers): Adjust.
5471         * symtab.c (make_symbol_completion_list_fn): Delete.
5472         * symtab.h (make_symbol_completion_list_fn): Delete.
5473         * cli/cli-decode.c (add_cmd): Adjust.
5474
5475 2017-07-17  Pedro Alves  <palves@redhat.com>
5476
5477         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5478         * dwarf2read.c: Include "filename-seen-cache.h".
5479         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5480         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5481         * filename-seen-cache.c: New file.
5482         * filename-seen-cache.h: New file.
5483         * symtab.c: Include "filename-seen-cache.h".
5484         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5485         (create_filename_seen_cache, clear_filename_seen_cache)
5486         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5487         to filename-seen-cache.h/filename-seen-cache.c.
5488         (output_source_filename, sources_info)
5489         (maybe_add_partial_symtab_filename)
5490         (make_source_files_completion_list): Adjust to use
5491         filename_seen_cache.
5492
5493 2017-07-17  Pedro Alves  <palves@redhat.com>
5494
5495         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5496         fields.
5497         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5498         dwarf2_debug_sections*)): New.
5499         (dwarf2_per_objfile::dwarf2_per_objfile(const
5500         dwarf2_per_objfile&)): Declare as deleted.
5501         (dwarf2_per_objfile::operator=): Declare as deleted.
5502         (dwarf2_per_objfile::dwarf2_per_objfile)
5503         (dwarf2_per_objfile::~dwarf2_per_objfile)
5504         (dwarf2_per_objfile::free_cached_comp_units): New.
5505         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5506         ctor.  Call dwarf2_per_objfile's ctor manually.
5507         (dwarf2_locate_sections): Deleted/refactored as ...
5508         (dwarf2_per_objfile::locate_sections): ... this new method.
5509         (free_cached_comp_units): Defer to
5510         dwarf2_per_objfile::free_cached_comp_units.
5511         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5512
5513 2017-07-14  Tom Tromey  <tom@tromey.com>
5514
5515         PR rust/21764:
5516         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5517         parameter.
5518         <UNOP_SIZEOF>: Split into separate case.
5519         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5520
5521 2017-07-14  Tom Tromey  <tom@tromey.com>
5522
5523         PR rust/21763:
5524         * symtab.c (symbol_matches_domain): Add language_rust to special
5525         case.
5526         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5527         treat LOC_TYPEDEF symbols as variables.
5528
5529 2017-07-14  Pedro Alves  <palves@redhat.com>
5530
5531         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5532         symtabs matching all symtabs with SRCFILE as file name instead of
5533         only considering the first hit, with lookup_symtab.
5534
5535 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5536
5537         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5538         operator_name parameters.
5539         (gen_expr): Update function call.
5540
5541 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5542
5543         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5544         parameter.
5545         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5546         Likewise.
5547         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5548         parameter, use agent_expr::gdbarch instead, update function
5549         calls.
5550         (locexpr_tracepoint_var_ref): Likewise.
5551         (loclist_tracepoint_var_ref): Likewise.
5552         * ax-gdb.c (gen_trace_static_fields): Likewise.
5553         (gen_traced_pop): Likewise.
5554         (gen_frame_args_address): Likewise.
5555         (gen_frame_locals_address): Likewise.
5556         (gen_var_ref): Likewise.
5557         (gen_struct_ref_recursive): Likewise.
5558         (gen_static_field): Likewise.
5559         (gen_maybe_namespace_elt): Likewise.
5560         (gen_expr): Likewise.
5561         (gen_trace_for_var): Likewise.
5562         (gen_trace_for_expr): Likewise.
5563         (gen_trace_for_return_address): Likewise.
5564
5565 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5566
5567         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5568         parameter.
5569         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5570
5571 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5572
5573         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5574         from ax, update calls.
5575         (gen_usual_arithmetic): Likewise.
5576         (gen_integral_promotions): Likewise.
5577         (gen_bitfield_ref): Likewise.
5578         (gen_primitive_field): Likewise.
5579         (gen_struct_ref_recursive): Likewise.
5580         (gen_struct_ref): Likewise.
5581         (gen_maybe_namespace_elt): Likewise.
5582         (gen_struct_elt_for_reference): Likewise.
5583         (gen_namespace_elt): Likewise.
5584         (gen_aggregate_elt_ref): Likewise.
5585         (gen_expr): Get gdbarch from ax, update calls.
5586         (gen_expr_binop_rest): Likewise.
5587
5588 2017-07-13  Pedro Alves  <palves@redhat.com>
5589
5590         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5591         as default tdesc.
5592         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5593         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5594         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5595         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5596         tdep.
5597         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5598         Get final tdesc from the tdep.
5599         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5600         default tdesc.
5601         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5602         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5603         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5604         Use it as default tdesc.
5605         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5606         down to amd_init_abi.  No longer handle fallback tdesc here.
5607         * amd64-tdep.h (tdesc_x32): Declare.
5608         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5609         parameter.
5610         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5611         as default tdesc.
5612
5613 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5614
5615         * s390-linux-tdep.c (s390_process_record): Add support for
5616         instructions new in arch12.
5617
5618 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5619
5620         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5621         PT_GETFSBASE and PT_GETGSBASE.
5622         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5623         PT_SETGSBASE.
5624
5625 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5626
5627         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5628         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5629         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5630         those rules.
5631         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5632         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5633         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5634         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5635         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5636         * features/i386/amd64.xml: Add 64bit-segments.xml.
5637         * features/i386/amd64-avx-avx512.c: Regenerated.
5638         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5639         * features/i386/amd64-avx-mpx.c: Regenerated.
5640         * features/i386/amd64-avx.c: Regenerated.
5641         * features/i386/amd64-mpx.c: Regenerated.
5642         * features/i386/amd64.c: Regenerated.
5643         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5644         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5645         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5646         * regformats/i386/amd64-avx.dat: Regenerated.
5647         * regformats/i386/amd64-mpx.dat: Regenerated.
5648         * regformats/i386/amd64.dat: Regenerated.
5649
5650 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5651
5652         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5653         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5654
5655 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5656
5657         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5658         unsetenv.
5659         * gnulib/aclocal.m4: Regenerate.
5660         * gnulib/config.in: Regenerate.
5661         * gnulib/configure: Regenerate.
5662         * gnulib/import/Makefile.am: Regenerate.
5663         * gnulib/import/Makefile.in: Regenerate.
5664         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5665         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5666         * gnulib/import/m4/environ.m4: New file.
5667         * gnulib/import/m4/setenv.m4: New file.
5668         * gnulib/import/setenv.c: New file.
5669         * gnulib/import/unsetenv.c: New file.
5670
5671 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5672
5673         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5674         address when op is DW_OP_addr.
5675
5676 2017-07-09  Tom Tromey  <tom@tromey.com>
5677
5678         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5679         check and apply to outer type.
5680
5681 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5682
5683         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5684         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5685         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5686         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5687
5688 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5689
5690         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5691
5692 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5693
5694         * corelow.c (get_core_siginfo): Remove.
5695         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5696         instead of get_core_siginfo.
5697         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5698         * gdbarch.h: Re-generate.
5699         * gdbarch.c: Re-generate.
5700         * linux-tdep.c (linux_core_xfer_siginfo): New.
5701         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5702
5703 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5704
5705         * corelow.c (thread_section_name): Move to ...
5706         * gdbcore.h (thread_section_name): ... here.
5707
5708 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5709
5710         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5711         (struct siginfo32): New.
5712         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5713         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5714         via ptrace(PT_LWPINFO).
5715
5716 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5717
5718         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5719         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5720         (fbsd_get_siginfo_type): New.
5721         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5722         (_initialize_fbsd_tdep): New.
5723
5724 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5725
5726         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5727         a singular dwo_unit*) to support multiple CUs in the same way that
5728         multiple TUs are supported.
5729         (create_cus_hash_table): Replace create_dwo_cu with a function for
5730         parsing multiple CUs from a DWO file.
5731         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5732         create_dwo_cu.
5733         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5734         htab_find, rather than comparing the signature to a singleton CU in
5735         the dwo_file.
5736
5737 2017-07-06  Pedro Alves  <palves@redhat.com>
5738
5739         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5740
5741 2017-07-04  Pedro Alves  <palves@redhat.com>
5742
5743         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5744         * gdbtypes.h (TYPE_STATIC): Delete.
5745         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5746         is_synchronized, is_native>: Delete.
5747         <dummy>: Bump.
5748         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5749         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5750         (TYPE_FN_FIELD_ABSTRACT): Delete.
5751
5752 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5753
5754         * buffer.h (buffer_finish): Fix spelling mistakes.
5755
5756 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5757
5758         * .dir-locals.el: Automatically switch to C-style comments in
5759         versions of Emacs that support the feature.
5760
5761 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5762             Pedro Alves  <palves@redhat.com>
5763
5764         PR cli/21688
5765         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5766         (process_next_line): New variable 'inline_cmd'.
5767         Adjust 'if' clauses for "python", "compile" and "guile" to use
5768         'command_name_equals' and check for '!inline_cmd'.
5769
5770 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5771
5772         PR cli/21688
5773         * cli/cli-script.c (command_name_equals_not_inline): New function.
5774         (process_next_line): Adjust 'if' clauses for "python", "compile"
5775         and "guile" to use command_name_equals_not_inline.
5776
5777 2017-06-29  Pedro Alves  <palves@redhat.com>
5778
5779         * completer.c (expression_completer): Call
5780         linespec_location_completer instead of location_completer.
5781
5782 2017-06-29  Pedro Alves  <palves@redhat.com>
5783
5784         * completer.c (expression_completer): Remove code that recomputes
5785         'text' from 'word'.
5786
5787 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5788
5789         * regformats/regdat.sh: Generate code with
5790         "ifndef IN_PROCESS_AGENT".
5791
5792 2017-06-28  Pedro Alves  <palves@redhat.com>
5793
5794         * command.h: Include "common/scoped_restore.h".
5795
5796 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5797
5798         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5799         instead of obstack_grow.
5800
5801 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5802
5803         PR gdb/21337
5804         * symfile.c (reread_symbols): Call objfiles_changed just before
5805         read_symbols.
5806
5807 2017-06-27  Pedro Alves  <palves@redhat.com>
5808
5809         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5810         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5811         (completion_list_add_symbol, completion_list_add_msymbol):
5812         ... these new functions.
5813         (add_symtab_completions)
5814         (default_make_symbol_completion_list_break_on_1): Adjust.
5815
5816 2017-06-27  Pedro Alves  <palves@redhat.com>
5817
5818         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5819         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5820         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5821         dtor.
5822         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5823         'storage_obstack' field an auto_obstack.  In-class initialize all
5824         non-bitfield fields.  Make minsyms_read bool.
5825         * symfile.c (read_symbols): Adjust.
5826
5827 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5828
5829         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5830         (gdbsim_store_register): Likewise.
5831
5832 2017-06-27  Pedro Alves  <palves@redhat.com>
5833
5834         * c-exp.y (name_obstack): Now an auto_obstack.
5835         (yylex): Use auto_obstack::clear.
5836         (c_parse): Use auto_obstack::clear instead of reinitializing and
5837         freeing the obstack.
5838         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5839         * d-exp.y (name_obstack): Now an auto_obstack.
5840         (yylex): Use auto_obstack::clear.
5841         (d_parse): Use auto_obstack::clear instead of reinitializing and
5842         freeing the obstack.
5843         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5844         auto_obstack.
5845         * dwarf2read.c (create_addrmap_from_index)
5846         (dwarf2_build_psymtabs_hard)
5847         (update_enumeration_type_from_children): Likewise.
5848         * gdb_obstack.h (auto_obstack): New type.
5849         * go-exp.y (name_obstack): Now an auto_obstack.
5850         (build_packaged_name): Use auto_obstack::clear.
5851         (go_parse): Use auto_obstack::clear instead of reinitializing and
5852         freeing the obstack.
5853         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5854         auto_obstack.
5855         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5856         * rust-exp.y (work_obstack): Now an auto_obstack.
5857         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5858         reinitializing and freeing the obstack.
5859         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5860         (host_char_to_target): Use auto_obstack.
5861         * utils.h (make_cleanup_obstack_free): Delete declaration.
5862         * valprint.c (generic_emit_char, generic_printstr): Use
5863         auto_obstack.
5864
5865 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5866
5867         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5868         thread.
5869         (darwin_init_thread_list): Don't update dummy thread.
5870         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5871
5872 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5873
5874         * record-full.c (netorder16): Remove.
5875
5876 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5877
5878         * common/diagnostics.h: Define macros for GCC.
5879         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5880         * common/vec.h: Include diagnostics.h.
5881         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5882         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5883         warning.
5884
5885 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5886
5887         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5888         New macro.
5889         * ada-lex.l: Ignore deprecated register warnings.
5890
5891 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5892
5893         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5894         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5895
5896 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5897
5898         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5899         its own line.
5900
5901 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5902
5903         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5904
5905 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5906
5907         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5908         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5909         (xtensa_register_read_masked): Likewise.
5910
5911 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5912
5913         * common/environ.c (gdb_environ::unset): Update comment.
5914
5915 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5916
5917         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5918         registers.
5919
5920 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5921
5922         * record-full.c (record_full_exec_insn): Use byte_vector.
5923
5924 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5925
5926         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5927         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5928
5929 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5930
5931         * remote.c (cached_reg): Move from here...
5932         * regcache.h (cached_reg): ...to here.
5933         * python/py-unwind.c (struct reg_info): Remove.
5934         (cached_frame_info): Use cached_reg_t.
5935         (pyuw_prev_register): Likewise.
5936         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5937         (pyuw_dealloc_cache): Free all registers.
5938
5939 2017-06-22  Pedro Alves  <palves@redhat.com>
5940             Simon Marchi  <simon.marchi@ericsson.com>
5941
5942         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5943         warning.
5944         * common/diagnostics.h: New file.
5945
5946 2017-06-22  Pedro Alves  <palves@redhat.com>
5947
5948         * common/agent.h: Add include guards.
5949
5950 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5951
5952         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5953         talk about addressable units instead of bytes.
5954
5955 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5956
5957         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5958         of '::const_iterator'.
5959
5960 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5961
5962         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5963         'unittests/environ-selftests.c'.
5964         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5965         * charset.c (find_charset_names): Declare object 'iconv_env'.
5966         Update code to use 'iconv_env' object.  Remove call to
5967         'free_environ'.
5968         * common/environ.c: Include <utility>.
5969         (make_environ): Delete function.
5970         (free_environ): Delete function.
5971         (gdb_environ::clear): New function.
5972         (gdb_environ::operator=): New function.
5973         (gdb_environ::get): Likewise.
5974         (environ_vector): Delete function.
5975         (set_in_environ): Delete function.
5976         (gdb_environ::set): New function.
5977         (unset_in_environ): Delete function.
5978         (gdb_environ::unset): New function.
5979         (gdb_environ::envp): Likewise.
5980         * common/environ.h: Include <vector>.
5981         (struct gdb_environ): Delete; transform into...
5982         (class gdb_environ): ... this class.
5983         (free_environ): Delete prototype.
5984         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5985         environ_vector): Likewise.
5986         * infcmd.c (run_command_1): Update code to call
5987         'envp' from 'gdb_environ' class.
5988         (environment_info): Update code to call methods from 'gdb_environ'
5989         class.
5990         (unset_environment_command): Likewise.
5991         (path_info): Likewise.
5992         (path_command): Likewise.
5993         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5994         (inferior::inferior): Initialize 'environment' using the host's
5995         information.
5996         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5997         Include "environ.h".
5998         (class inferior) <environment>: Change type from 'struct
5999         gdb_environ' to 'gdb_environ'.
6000         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6001         methods from 'gdb_environ' class.
6002         * solib.c (solib_find_1): Likewise
6003         * unittests/environ-selftests.c: New file.
6004
6005 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6006
6007         * features/i386/i386-linux.xml: Exchange the order of including
6008         32bit-linux.xml and 32bit-sse.xml.
6009         * features/i386/i386-linux.c: Regenerated.
6010
6011 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6012
6013         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6014         Delete copy ctor and assignment operator.
6015         (tdesc_type): Likewise.
6016         (tdesc_feature): Likewise.
6017         (tdesc_free_reg): Remove.
6018         (tdesc_create_reg): Use new.
6019         (tdesc_free_type): Remove.
6020         (tdesc_create_vector): Use new.
6021         (tdesc_create_union): Likewise.
6022         (tdesc_create_flags): Likewise.
6023         (tdesc_create_enum): Likewise.
6024         (tdesc_free_feature): Delete.
6025         (free_target_description): Use delete.
6026
6027 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6028
6029         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6030         registers.
6031
6032 2017-06-19  Pedro Alves  <palves@redhat.com>
6033
6034         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6035         after gdb::unlinker.
6036
6037 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6038
6039         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6040         gdb_environ to access an environment variable.
6041
6042 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6043
6044         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6045         gdb_byte*.
6046
6047 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6048
6049         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6050
6051 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6052
6053         * configure: Re-generate.
6054         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6055
6056 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6057
6058         * configure: Re-generate.
6059         * warning.m4: Pass -Werror to compiler when checking for
6060         supported warning flags.
6061
6062 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6063
6064         * Makefile.in (COMPILE.pre): Add "-x c++".
6065
6066 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6067             Pedro Alves  <palves@redhat.com>
6068             Yao Qi  <yao.qi@linaro.org>
6069
6070         * defs.h (RequireLongest): New.
6071         (extract_integer): Declare function template.
6072         (extract_signed_integer): Remove the declaration, but define it
6073         static inline.
6074         (extract_unsigned_integer): Likewise.
6075         (store_integer): Declare function template.
6076         (store_signed_integer): Remove the declaration, but define it
6077         static inline.
6078         (store_unsigned_integer): Likewise.
6079         * findvar.c (extract_integer): New function template.
6080         (extract_signed_integer): Remove.
6081         (extract_unsigned_integer): Remove.
6082         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6083         instantiations.
6084         (store_integer): New function template.
6085         (store_signed_integer): Remove.
6086         (store_unsigned_integer): Remove.
6087         (store_integer): Explicit instantiations.
6088         * regcache.c (regcache_raw_read_signed): Update.
6089         (regcache::raw_read): New function.
6090         (regcache::raw_read_signed): Remove.
6091         (regcache::raw_read_unsigned): Remove.
6092         (regcache_raw_read_unsigned): Update.
6093         (regcache_raw_write_unsigned): Update.
6094         (regcache::raw_write_signed): Remove.
6095         (regcache::raw_write): New function.
6096         (regcache_cooked_read_signed): Update.
6097         (regcache::raw_write_unsigned): Remove.
6098         (regcache::cooked_read_signed): Remove.
6099         (regcache_cooked_read_unsigned): Update.
6100         (regcache::cooked_read_unsigned): Remove.
6101         (regcache_cooked_write_signed): Update.
6102         (regcache_cooked_write_unsigned): Update.
6103         * regcache.h (regcache) <raw_read_signed>: Remove.
6104         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6105         <raw_read, raw_write>: New.
6106         <cooked_read_signed, cooked_write_signed>: Remove.
6107         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6108         <cooked_read, cooked_write>: New.
6109         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6110         (sh64_pseudo_register_write): Update.
6111
6112 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6113
6114         * arc-tdep.c (arc_disassembler_options): New variable.
6115         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6116         of default_print_insn.
6117         (arc_delayed_print_insn): Set info->section when needed,
6118         use default_print_insn to retrieve a disassembler.
6119
6120 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6121
6122         PR gdb/21574
6123         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6124         to mention $SHELL and startup-with-shell.
6125
6126 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6127
6128         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6129
6130 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6131
6132         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6133         default_print_insn instead of print_insn_aarch64.
6134         * arm-tdep.c (gdb_print_insn_arm): Call
6135         default_print_insn instead of print_insn_big_arm
6136         and print_insn_little_arm.
6137         * i386-tdep.c (i386_print_insn): Call default_print_insn
6138         instead of print_insn_i386.
6139         * ia64-tdep.c (ia64_print_insn): Call
6140         default_print_insn instead of print_insn_ia64.
6141         * mips-tdep.c (gdb_print_insn_mips): Call
6142         default_print_insn instead of print_insn_big_mips
6143         and print_insn_little_mips.
6144         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6145         instead of print_insn_spu.
6146
6147 2017-06-14  Pedro Alves  <palves@redhat.com>
6148
6149         * ada-lang.c: Include "common/byte-vector.h".
6150         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6151         * charset.c (wchar_iterator::iterate): Resize the vector instead
6152         of reserving it.
6153         * common/byte-vector.h: Include "common/def-vector.h".
6154         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6155         * cli/cli-dump.c: Include "common/byte-vector.h".
6156         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6157         * common/byte-vector.h: New file.
6158         * common/def-vector.h: New file.
6159         * common/default-init-alloc.h: New file.
6160         * dwarf2loc.c: Include "common/byte-vector.h".
6161         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6162         instead of reserving it.
6163         * dwarf2read.c: Include "common/byte-vector.h".
6164         (data_buf::m_vec): Now a gdb::byte_vector.
6165         * gdb_regex.c: Include "common/def-vector.h".
6166         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6167         * mi/mi-main.c: Include "common/byte-vector.h".
6168         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6169         * printcmd.c: Include "common/byte-vector.h".
6170         (print_scalar_formatted): Use gdb::byte_vector.
6171         * valprint.c: Include "common/byte-vector.h".
6172         (maybe_negate_by_bytes, print_decimal_chars): Use
6173         gdb::byte_vector.
6174
6175 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6176
6177         * darwin-nat.c: Include "nat/fork-inferior.h".
6178
6179 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6180
6181         * configure.nat: Factor out Darwin bits that are not
6182         architecture-specific.  Add fork-inferior.o.
6183
6184 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6185
6186         * configure.nat: Factor out AIX bits that are not
6187         architecture-specific.  Add fork-inferior.o.
6188
6189 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6190
6191         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6192         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6193         wrappers that just call rw_pieced_value.
6194
6195 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6196
6197         * dwarf2loc.c (write_pieced_value): When writing the data for a
6198         memory piece, use write_memory_with_notification instead of
6199         write_memory.
6200
6201 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6202
6203         * valops.c (read_value_memory): Change embedded_offset to
6204         represent a bit offset instead of a byte offset.
6205         * value.h (read_value_memory): Adjust comment.
6206
6207 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6208
6209         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6210         dest_offset_bits and source_offset_bits.
6211         (write_pieced_value): Likewise.
6212
6213 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6214
6215         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6216         given by DW_OP_bit_piece.
6217         (write_pieced_value): Likewise.
6218
6219 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6220
6221         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6222         some other preparations to the places where sufficient information
6223         is available.
6224         (write_pieced_value): Likewise.
6225
6226 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6227
6228         * dwarf2loc.c (bits_to_bytes): New function.
6229         (read_pieced_value): Fix offset calculations for register pieces
6230         on big-endian targets.
6231         (write_pieced_value): Likewise.
6232
6233 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6234
6235         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6236         (write_pieced_value): Likewise.
6237
6238 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6239
6240         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6241         transfer the source value's least significant bits, instead of its
6242         lowest-addressed ones.  Rename type_len to max_offset.
6243         (read_pieced_value): Mirror above changes to write_pieced_value as
6244         applicable.
6245
6246 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6247
6248         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6249         truncate full bytes from dest_offset_bits before using it as an
6250         offset into the buffer.
6251
6252 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6253
6254         * dwarf2loc.c (write_pieced_value): Include transfer size in
6255         byte-wise check.
6256
6257 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6258
6259         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6260         calculation of this_size.
6261
6262 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6263
6264         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6265         when targeting a bit-field.
6266         (write_pieced_value): Likewise.
6267
6268 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6269
6270         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6271         (allocate_piece_closure): Drop addr_size parameter.
6272         (dwarf2_evaluate_loc_desc_full): Adjust call to
6273         allocate_piece_closure.
6274
6275 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6276
6277         PR gdb/21226
6278         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6279         the LSB end, independent of endianness.
6280
6281 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6282
6283         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6284         size capping.
6285
6286 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6287
6288         * mips-linux-nat.c: Move include features/mips*-linux.c to
6289         mips-linux-tdep.c.
6290         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6291         to mips-linux-tdep.c.
6292         * mips-linux-tdep.c: Include features/mips*-linux.c
6293         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6294         functions.
6295         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6296         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6297         (tdesc_mips64_dsp_linux): Declare.
6298
6299 2017-06-12  Tom Tromey  <tom@tromey.com>
6300
6301         * valprint.h (val_print_type_code_int): Remove.
6302         * valprint.c (generic_val_print_int): Always call
6303         val_print_scalar_formatted.
6304         (val_print_type_code_int): Remove.
6305         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6306         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6307         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6308         * ada-valprint.c (ada_val_print_num): Use
6309         val_print_scalar_formatted.
6310
6311 2017-06-12  Tom Tromey  <tom@tromey.com>
6312
6313         * printcmd.c (print_scalar_formatted): Unify the two switches.
6314         Don't convert scalars to LONGEST.
6315
6316 2017-06-12  Tom Tromey  <tom@tromey.com>
6317
6318         PR exp/16225:
6319         * valprint.h (print_decimal_chars): Update.
6320         * valprint.c (maybe_negate_by_bytes): New function.
6321         (print_decimal_chars): Add "is_signed" argument.
6322         * printcmd.c (print_scalar_formatted): Update.
6323
6324 2017-06-12  Tom Tromey  <tom@tromey.com>
6325
6326         PR exp/16225:
6327         * valprint.h (print_binary_chars, print_hex_chars): Update.
6328         * valprint.c (val_print_type_code_int): Update.
6329         (print_binary_chars): Add "zero_pad" argument.
6330         (emit_octal_digit): New function.
6331         (print_octal_chars): Don't zero-pad.
6332         (print_decimal_chars): Likewise.
6333         (print_hex_chars): Add "zero_pad" argument.
6334         * sh64-tdep.c (sh64_do_fp_register): Update.
6335         * regcache.c (regcache::dump): Update.
6336         * printcmd.c (print_scalar_formatted): Update.
6337         * infcmd.c (default_print_one_register_info): Update.
6338
6339 2017-06-12  Pedro Alves  <palves@redhat.com>
6340             Alan Hayward  <alan.hayward@arm.com>
6341
6342         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6343         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6344         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6345         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6346         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6347
6348 2017-06-12  Pedro Alves  <palves@redhat.com>
6349
6350         * dwarf2read.c (mapped_symtab::data): Now a vector of
6351         symtab_index_entry instead of vector of
6352         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6353         whether an element's name is NULL instead of checking whether the
6354         element itself is NULL.
6355         (find_slot): Change return type.  Adjust.
6356         (hash_expand, , add_index_entry, uniquify_cu_indices)
6357         (write_hash_table): Adjust.
6358
6359 2017-06-12  Pedro Alves  <palves@redhat.com>
6360
6361         * dwarf2read.c (recursively_count_psymbols): New function.
6362         (write_psymtabs_to_index): Call it to compute number of psyms and
6363         pass estimate size of psyms_seen to unordered_set's ctor.
6364
6365 2017-06-12  Pedro Alves  <palves@redhat.com>
6366
6367         * dwarf2read.c (write_hash_table): Check if key already exists
6368         before emplacing.
6369
6370 2017-06-12  Pedro Alves  <palves@redhat.com>
6371
6372         * dwarf2read.c (data_buf::append_space): Rename to...
6373         (data_buf::grow): ... this, and make private.  Adjust all callers.
6374         (data_buf::append_uint): New method.
6375         (add_address_entry, write_one_signatured_type)
6376         (write_psymtabs_to_index): Use it.
6377
6378 2017-06-12  Pedro Alves  <palves@redhat.com>
6379
6380         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6381         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6382         (data_buf::file_write): Call ::fwrite directly.
6383
6384 2017-06-12  Pedro Alves  <palves@redhat.com>
6385
6386         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6387         std::vector::erase.
6388
6389 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6390
6391         Code cleanup: C++ify .gdb_index producer.
6392         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6393         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6394         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6395         (create_strtab, add_string): Remove.
6396         (file_write, data_buf): New.
6397         (struct symtab_index_entry): Use std::vector for cu_indices.
6398         (struct mapped_symtab): Use std::vector for data.
6399         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6400         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6401         Remove.
6402         (find_slot): Change return type.  Update it to the new data structures.
6403         (hash_expand, add_index_entry): Update it to the new data structures.
6404         (offset_type_compare): Remove.
6405         (uniquify_cu_indices): Update it to the new data structures.
6406         (c_str_view, c_str_view_hasher, vector_hasher): New.
6407         (add_indices_to_cpool): Remove.
6408         (write_hash_table): Update it to the new data structures.
6409         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6410         (eq_psymtab_cu_index): Remove.
6411         (psym_index_map): New typedef.
6412         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6413         reference and std::unordered_map for cu_index_htab.
6414         (add_address_entry, add_address_entry_worker, write_address_map)
6415         (write_psymbols): Update it to the new data structures.
6416         (write_obstack): Remove.
6417         (struct signatured_type_index_data): Change types_list to a data_buf
6418         reference and psyms_seen to a std::unordered_set reference.
6419         (write_one_signatured_type, recursively_write_psymbols)
6420         (write_psymtabs_to_index): Update it to the new data structures.
6421
6422 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6423
6424         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6425         separate-debug-file commands.
6426         * symfile.h (separate_debug_file_debug): New global.
6427         * symfile.c (separate_debug_file_debug): New global.
6428         (separate_debug_file_exists, find_separate_debug_file): Add
6429         debug output.
6430         (_initialize_symfile): Add "set debug separate-debug-file"
6431         command.
6432         * build-id.c (build_id_to_debug_bfd,
6433         find_separate_debug_file_by_buildid): Add debug output.
6434
6435 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6436
6437         * gdbarch.sh (displaced_step_free_closure): Remove.
6438         * gdbarch.h, gdbarch.c: Re-generate.
6439         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6440         displaced_step_free_closure.
6441         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6442         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6443         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6444         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6445         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6446         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6447         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6448         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6449         * infrun.c (displaced_step_clear): Call xfree instead of
6450         gdbarch_displaced_step_free_closure.
6451
6452 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6453
6454         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6455         NULL".
6456
6457 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6458
6459         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6460         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6461         (mn10300_push_dummy_call): Likewise.
6462
6463 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6464
6465         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6466
6467 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6468
6469         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6470
6471 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6472
6473         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6474         able to start inferiors using a shell.
6475         (New remote packets): Announce new packet "QStartupWithShell".
6476         * remote.c: Add PACKET_QStartupWithShell.
6477         (extended_remote_create_inferior): Handle new
6478         PACKET_QStartupWithShell.
6479         (remote_protocol_features) <QStartupWithShell>: New entry for
6480         PACKET_QStartupWithShell.
6481         (_initialize_remote): Call "add_packet_config_cmd" for
6482         QStartupShell.
6483
6484 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6485             Pedro Alves  <palves@redhat.com>
6486
6487         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6488         and "nat/fork-inferior.h".
6489         * common/common-inferior.h: New file, with contents from
6490         "gdb/inferior.h".
6491         * commom/common-utils.c: Include "common-utils.h".
6492         (stringify_argv): New function.
6493         * common/common-utils.h (stringify_argv): New prototype.
6494         * configure.nat: Add "fork-inferior.o" as a dependency for
6495         "*linux*", "fbsd*" and "nbsd*" hosts.
6496         * corefile.c (get_exec_file): Update comment.
6497         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6498         instead of "startup_inferior".
6499         (darwin_create_inferior): Call "add_thread_silent" after
6500         "fork_inferior".
6501         * fork-child.c: Cleanup unnecessary includes.
6502         (SHELL_FILE): Move to "common/common-fork-child.c".
6503         (environ): Likewise.
6504         (exec_wrapper): Initialize.
6505         (get_exec_wrapper): New function.
6506         (breakup_args): Move to "common/common-fork-child.c"; rename to
6507         "breakup_args_for_exec".
6508         (escape_bang_in_quoted_argument): Move to
6509         "common/common-fork-child.c".
6510         (saved_ui): New variable.
6511         (prefork_hook): New function.
6512         (postfork_hook): Likewise.
6513         (postfork_child_hook): Likewise.
6514         (gdb_startup_inferior): Likewise.
6515         (fork_inferior): Move to "common/common-fork-child.c".  Update
6516         function to support gdbserver.
6517         (startup_inferior): Likewise.
6518         * gdbcore.h (get_exec_file): Remove declaration.
6519         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6520         instead of "startup_inferior".  Call "add_thread_silent" after
6521         "fork_inferior".
6522         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6523         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6524         instead of "startup_inferior".  Call "add_thread_silent" after
6525         "fork_inferior".
6526         * inferior.h: Include "common-inferior.h".
6527         (trace_start_error): Move to "common/common-utils.h".
6528         (trace_start_error_with_name): Likewise.
6529         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6530         (startup_inferior): Likewise.
6531         (gdb_startup_inferior): New prototype.
6532         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6533         * nat/fork-inferior.h: New file.
6534         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6535         instead of "startup_inferior".  Call "add_thread_silent" after
6536         "fork_inferior".
6537         * target.h (target_terminal_init): Move prototype to
6538         "target/target.h".
6539         (target_terminal_inferior): Likewise.
6540         (target_terminal_ours): Likewise.
6541         * target/target.h (target_terminal_init): New prototype, moved
6542         from "target.h".
6543         (target_terminal_inferior): Likewise.
6544         (target_terminal_ours): Likewise.
6545         * utils.c (gdb_flush_out_err): New function.
6546
6547 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6548
6549         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6550         * common/common-gdbthread.h: New file, with parts from
6551         "gdb/gdbthread.h".
6552         * gdbthread.h: Include "common-gdbthread.h".
6553         (switch_to_thread): Moved to "common/common-gdbthread.h".
6554
6555 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6556
6557         * Makefile.in (SFILES): Add "common/job-control.c".
6558         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6559         (COMMON_OBS): Add "job-control.o".
6560         * common/job-control.c: New file, with contents from
6561         "gdb/inflow.c".
6562         * common/job-control.h: New file, with contents from "terminal.h".
6563         * fork-child.c: Include "job-control.h".
6564         * inflow.c: Include "job-control.h".
6565         (gdb_setpgid): Move to "common/common-inflow.c".
6566         (_initialize_inflow): Move setting of "job_control" to
6567         "handle_job_control".
6568         * terminal.h (job_control): Moved to "common/common-terminal.h".
6569         (gdb_setpgid): Likewise.
6570         * top.c: Include "job_control.h".
6571         * utils.c: Likewise.
6572         (job_control): Moved to "job-control.c".
6573
6574 2017-06-07  Pedro Alves  <palves@redhat.com>
6575
6576         * Makefile.in (SFILES): Add gdb_regex.c.
6577         (COMMON_OBS): Add gdb_regex.o.
6578         * ada-lang.c (ada_add_standard_exceptions)
6579         (ada_add_exceptions_from_frame, name_matches_regex)
6580         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6581         parameter type to compiled_regex.  Adjust.
6582         (ada_exceptions_list): Use compiled_regex.
6583         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6584         std::unique_ptr<compiled_regex>.
6585         (exception_catchpoint::~exception_catchpoint): Remove regfree
6586         call.
6587         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6588         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6589         * breakpoint.c (solib_catchpoint::compiled): Now a
6590         std::unique_ptr<compiled_regex>.
6591         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6592         (check_status_catch_solib): Adjust to use compiled_regex.
6593         (add_solib_catchpoint): Adjust to use compiled_regex.
6594         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6595         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6596         compiled_regex reference.  Adjust to use it.
6597         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6598         declaration.  Include "gdb_regex.h".
6599         (apropos_cmd): Change regex parameter to compiled_regex reference.
6600         * gdb_regex.c: New file.
6601         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6602         declarations.
6603         (class compiled_regex): New.
6604         * linux-tdep.c: Include "common/gdb_optional.h".
6605         (struct mapping_regexes): New, factored out from
6606         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6607         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6608         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6609         * probe.c: Include "common/gdb_optional.h".
6610         (collect_probes): Use compiled_regex and gdb::optional and remove
6611         cleanups.
6612         * skip.c: Include "common/gdb_optional.h".
6613         (skiplist_entry::compiled_function_regexp): Now a
6614         gdb::optional<compiled_regex>.
6615         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6616         (free_skiplist_entry): Remove regfree call.
6617         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6618         compiled_regex and gdb::optional.
6619         * symtab.c: Include "common/gdb_optional.h".
6620         (search_symbols): Use compiled_regex and gdb::optional.
6621         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6622         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6623         to gdb_regex.c.
6624
6625 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6626
6627         * regcache.c (regcache::save): Avoid buffer use.
6628         (regcache::dump): Likewise.
6629
6630 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6631
6632         * sh-tdep.c (sh_pseudo_register_read): Remove
6633         MAX_REGISTER_SIZE.
6634         (sh_pseudo_register_write): Likewise.
6635         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6636         (sh64_pseudo_register_write): Likewise
6637
6638 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6639
6640         * aarch64-tdep.c (aarch64_store_return_value): Use
6641         V_REGISTER_SIZE.
6642         (aarch64_pseudo_read_value): Likewise.
6643         (aarch64_pseudo_write): Likewise.
6644
6645 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6646
6647         * regformats/regdef.h (set_register_cache): Remove the
6648         declaration.
6649
6650 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6651
6652         * frame.c (frame_unwind_register_signed): Use
6653         frame_unwind_register_value.
6654
6655 2017-06-06  Pedro Alves  <palves@redhat.com>
6656
6657         PR breakpoints/21553
6658         * breakpoint.c (create_breakpoints_sal_default)
6659         (init_breakpoint_sal, create_breakpoint_sal): Use
6660         gdb::unique_xmalloc_ptr for string parameters.
6661         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6662         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6663         (base_breakpoint_create_breakpoints_sal)
6664         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6665         (strace_marker_create_breakpoints_sal)
6666         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6667         string parameters.
6668         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6669         gdb::unique_xmalloc_ptr for string parameters.
6670         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6671         parameters.
6672
6673 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6674
6675         * alpha-tdep.c (alpha_register_to_value): Use
6676         get_frame_register_value.
6677         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6678
6679 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6680
6681         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6682         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6683         (ia64_value_to_register): Likewise.
6684         (ia64_extract_return_value): Likewise.
6685         (ia64_store_return_value): Likewise.
6686         (ia64_push_dummy_call): Likewise.
6687
6688 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6689
6690         GDB 8.0 released.
6691
6692 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6693
6694         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6695
6696 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6697
6698         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6699         parameter.
6700         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6701
6702 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6703
6704         * event-loop.c (poll_timers): Unallocate timer using delete
6705         instead of xfree.
6706
6707 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6708
6709         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6710         (struct breakpoint) <~breakpoint>: New.
6711         (struct watchpoint): Inherit from breakpoint.
6712         <~watchpoint>: New.
6713         <base>: Remove.
6714         (struct tracepoint): Inherit from breakpoint.
6715         <base>: Remove.
6716         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6717         (struct longjmp_breakpoint): Inherit from breakpoint.
6718         <~longjmp_breakpoint>: New.
6719         <base>: Remove.
6720         (new_breakpoint_from_type): Remove casts.
6721         (watchpoint_in_thread_scope): Remove reference to base field.
6722         (watchpoint_del_at_next_stop): Likewise.
6723         (update_watchpoint): Likewise.
6724         (watchpoint_check): Likewise.
6725         (bpstat_check_watchpoint): Likewise.
6726         (set_longjmp_breakpoint): Likewise.
6727         (struct fork_catchpoint): Inherit from breakpoint.
6728         <base>: Remove.
6729         (struct solib_catchpoint): Inherit from breakpoint.
6730         <~solib_catchpoint>: New.
6731         <base>: Remove.
6732         (dtor_catch_solib): Change to ...
6733         (solib_catchpoint::~solib_catchpoint): ... this.
6734         (breakpoint_hit_catch_solib): Remove reference to base field.
6735         (add_solib_catchpoint): Likewise.
6736         (create_fork_vfork_event_catchpoint): Likewise.
6737         (struct exec_catchpoint): Inherit from breakpoint.
6738         <~exec_catchpoint>: New.
6739         <base>: Remove.
6740         (dtor_catch_exec): Change to ...
6741         (exec_catchpoint::~exec_catchpoint): ... this.
6742         (dtor_watchpoint): Change to ...
6743         (watchpoint::~watchpoint): ... this.
6744         (watch_command_1): Remove reference to base field.
6745         (catch_exec_command_1): Likewise.
6746         (base_breakpoint_dtor): Change to ...
6747         (breakpoint::~breakpoint): ... this.
6748         (base_breakpoint_ops): Remove dtor field value.
6749         (longjmp_bkpt_dtor): Change to ...
6750         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6751         (strace_marker_create_breakpoints_sal): Remove reference to base
6752         field.
6753         (delete_breakpoint): Don't manually call breakpoint destructor.
6754         (create_tracepoint_from_upload): Remove reference to base field.
6755         (trace_pass_set_count): Likewise.
6756         (initialize_breakpoint_ops): Don't initialize
6757         momentary_breakpoint_ops, don't set dtors.
6758         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6759         <~ada_catchpoint>: New.
6760         <base>: Remove.
6761         (create_excep_cond_exprs): Remove reference to base field.
6762         (dtor_exception): Change to ...
6763         (ada_catchpoint::~ada_catchpoint): ... this.
6764         (dtor_catch_exception): Remove.
6765         (dtor_catch_exception_unhandled): Remove.
6766         (dtor_catch_assert): Remove.
6767         (create_ada_exception_catchpoint): Remove reference to base
6768         field.
6769         (initialize_ada_catchpoint_ops): Don't set dtors.
6770         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6771         breakpoint.
6772         <~signal_catchpoint>: New.
6773         <base>: Remove.
6774         (signal_catchpoint_dtor): Change to ...
6775         (signal_catchpoint::~signal_catchpoint): ... this.
6776         (create_signal_catchpoint): Remove reference to base field.
6777         (initialize_signal_catchpoint_ops): Don't set dtor.
6778         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6779         from breakpoint.
6780         <~syscall_catchpoint>: New.
6781         <base>: Remove.
6782         (dtor_catch_syscall): Change to ...
6783         (syscall_catchpoint::~syscall_catchpoint): ... this.
6784         (create_syscall_event_catchpoint): Remove reference to base
6785         field.
6786         (initialize_syscall_catchpoint_ops): Don't set dtor.
6787         * break-catch-throw.c (struct exception_catchpoint): Inherit
6788         from breakpoint.
6789         <~exception_catchpoint>: New.
6790         <base>: Remove.
6791         (dtor_exception_catchpoint): Change to ...
6792         (exception_catchpoint::~exception_catchpoint): ... this.
6793         (handle_gnu_v3_exceptions): Remove reference to base field.
6794         (initialize_throw_catchpoint_ops): Don't set dtor.
6795         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6796         field.
6797         * remote.c (remote_get_tracepoint_status): Likewise.
6798         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6799         * tracefile.c (tracefile_fetch_registers): Likewise.
6800         * tracepoint.c (actions_command): Likewise.
6801         (validate_actionline): Likewise.
6802         (tfind_1): Likewise.
6803         (get_traceframe_location): Likewise.
6804         (find_matching_tracepoint_location): Likewise.
6805         (parse_tracepoint_status): Likewise.
6806         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6807
6808 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6809
6810         * breakpoint.c (struct longjmp_breakpoint): New struct.
6811         (is_tracepoint_type): Change return type to bool.
6812         (is_longjmp_type): New function.
6813         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6814         (set_raw_breakpoint_without_location): Use
6815         new_breakpoint_from_type.
6816         (set_raw_breakpoint): Likewise.
6817
6818 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6819
6820         * breakpoint.c (new_breakpoint_from_type): New function.
6821         (create_breakpoint_sal): Use new_breakpoint_from_type and
6822         unique_ptr.
6823         (create_breakpoint): Likewise.
6824
6825 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6826
6827         * memattr.c (mem_info_command): Rename to ...
6828         (info_mem_command): ... this.
6829         (mem_enable_command): Rename to ...
6830         (enable_mem_command): ... this.
6831         (mem_disable_command): Rename to ...
6832         (disable_mem_command): ... this.
6833         (mem_delete_command): Rename to ...
6834         (delete_mem_command): ... this.
6835         (_initialize_mem): Adjust function names.
6836
6837 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6838
6839         * btrace.c (handle_pt_insn_events): New.
6840         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6841         STATUS.  Split into this and ...
6842         (handle_pt_insn_event_flags): ... this.
6843
6844 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6845
6846         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6847         and struct pt_insn.resynced.
6848         * configure: Regenerated.
6849         * config.in: Regenerated.
6850
6851 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6852
6853         * btrace.c (ftrace_find_call_by_number): New function.
6854         (ftrace_new_function): Store objects, not pointers.
6855         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6856         ftrace_new_gap, ftrace_update_function,
6857         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6858         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6859         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6860         btrace_ends_with_single_insn, btrace_call_get): Account for
6861         btrace_thread_info::functions now storing objects.
6862         * btrace.h (struct btrace_thread_info): Add constructor.
6863         (struct btrace_thread_info) <functions>: Make std::vector.
6864         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6865         Initialize with default values.
6866         * record-btrace.c (record_btrace_frame_sniffer): Account for
6867         btrace_thread_info::functions now storing objects.
6868
6869 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6870
6871         * btrace.c: Remove typedef bfun_s.
6872         (ftrace_new_gap): Directly add gaps to the list of gaps.
6873         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6874         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6875         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6876         instead of gdb VEC.
6877
6878 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6879
6880         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6881         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6882         with btrace_thread_info::next_segment and
6883         btrace_thread_info::prev_segment.
6884         * btrace.h: Remove struct btrace_func_link.
6885         (struct btrace_function): Replace pair of function segment pointers
6886         with pair of indices.
6887         * python/py-record-btrace.c (btpy_call_prev_sibling,
6888         btpy_call_next_sibling): Replace references to
6889         btrace_thread_info::segment with btrace_thread_info::next_segment and
6890         btrace_thread_info::prev_segment.
6891         * record-btrace.c (record_btrace_frame_this_id): Use
6892         btrace_find_call_by_number.
6893
6894 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6895
6896         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6897         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6898         btrace_insn_next, btrace_insn_prev): Remove references to
6899         btrace_thread_info::flow.
6900         * btrace.h (struct btrace_function): Remove FLOW.
6901
6902 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6903
6904         * btrace.c (ftrace_find_call_by_number): New function.
6905         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6906         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6907         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6908         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6909         index.
6910         * btrace.h (struct btrace_function): Turn UP into an index.
6911         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6912         as an index.
6913         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6914         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6915         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6916
6917 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6918
6919         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6920         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6921         ftrace_update_function, ftrace_compute_global_level_offset,
6922         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6923         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6924         btrace_insn_end, btrace_is_empty): Remove references to
6925         btrace_thread_info::begin and btrace_thread_info::end.
6926         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6927         (struct btrace_thread_info) <functions>: Adjust comment.
6928         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6929         btrace_thread_info::begin.
6930
6931 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6932
6933         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6934         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6935         ftrace_update_function): Remove arguments that implicitly were always
6936         BTINFO->END.
6937         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6938         Don't pass BTINFO->END.
6939
6940 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6941
6942         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6943         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6944         btrace_find_insn_by_number): Replace function segment pointer with
6945         index.
6946         (btrace_insn_cmp): Simplify.
6947         * btrace.h: (struct btrace_insn_iterator) Rename index to
6948         insn_index.  Replace function segment pointer with index into function
6949         segment vector.
6950         * record-btrace.c (record_btrace_call_history): Replace function
6951         segment pointer use with index.
6952         (record_btrace_frame_sniffer): Retrieve function call segment through
6953         vector.
6954         (record_btrace_set_replay): Remove defunc't safety check.
6955
6956 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6957
6958         * btrace.c (btrace_ends_with_single_insn): New function.
6959         (btrace_call_get, btrace_call_number, btrace_call_begin,
6960         btrace_call_end, btrace_call_next, btrace_call_prev,
6961         btrace_find_call_by_number): Use index into call segment vector
6962         instead of pointer.
6963         (btrace_call_cmp): Simplify.
6964         * btrace.h (struct btrace_call_iterator): Replace function call segment
6965         pointer with index into vector.
6966         * record-btrace.c (record_btrace_call_history): Use index instead of
6967         pointer.
6968
6969 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6970
6971         * btrace.c (btrace_insn_begin, btrace_insn_end,
6972         btrace_find_insn_by_number): Add btinfo to iterator.
6973         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6974
6975 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6976
6977         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6978         and save pointers directly.
6979         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6980         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6981         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6982         changed signature of functions.
6983         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6984         (btrace_fetch): Remove code that adds btrace_function pointers to
6985         vector of btrace_functions.
6986         (btrace_clear): Simplify freeing vector of btrace_functions.
6987
6988 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6989
6990         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6991         Replace VEC_* with std::vector functions.
6992         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6993         (struct btrace_thread_info)<functions>: Change type to std::vector.
6994
6995 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6996
6997         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
6998         "Removed targets and native configurations" up.  Merge duplicate
6999         "New commands" sub-sections.  Add "New options" sub-sections.
7000
7001 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7002
7003         * defs.h (copy_integer_to_size): New declaration.
7004         * findvar.c (copy_integer_to_size): New function.
7005         (do_cint_test): New selftest function.
7006         (copy_integer_to_size_test): Likewise.
7007         (_initialize_findvar): Likewise.
7008         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7009         (mips_fbsd_collect_reg): Use raw_collect_integer.
7010         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7011         (mips64_fill_gregset): Use raw_collect_integer
7012         (mips64_fill_fpregset): Use raw_supply_integer.
7013         * regcache.c (regcache::raw_supply_integer): New function.
7014         (regcache::raw_collect_integer): Likewise.
7015         * regcache.h: (regcache::raw_supply_integer): New declaration.
7016         (regcache::raw_collect_integer): Likewise.
7017
7018 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7019
7020         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7021         (COMMON_OBS): Add gdbarch-selftests.o.
7022         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7023         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7024         * gdbarch-selftests.c: New file.
7025         * regcache.h (regcache) <~regcache>: Mark it virtual if
7026         GDB_SELF_TEST.
7027         <raw_write>: Likewise.
7028
7029 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7030
7031         * regcache.c (current_regcache): Change it to
7032         regcache::current_regcache.
7033         (regcache_observer_target_changed): Update.
7034         (regcache_thread_ptid_changed): Make it a regcache static
7035         method.
7036         (regcache_thread_ptid_changed): Update.
7037         (class regcache_access): New.
7038         (current_regcache_test): Update.
7039         (_initialize_regcache): Update.
7040         * regcache.h: Include forward_list.
7041         (regcache): Declare regcache_thread_ptid_changed and declare
7042         registers_changed_ptid as friend.
7043
7044 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7045
7046         * i387-tdep.c (i387_register_to_value): Use register_size
7047         instead of TYPE_LENGTH.
7048         * m68k-tdep.c (m68k_register_to_value): Likewise.
7049
7050 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7051
7052         * i387-tdep.c (i387_convert_register_p): Return false if type
7053         code isn't TYPE_CODE_FLT.
7054
7055 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7056
7057         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7058         length is 4.
7059         (alpha_register_to_value): Remove type length check.
7060         (alpha_value_to_register): Likewise.
7061
7062 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7063
7064         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7065         TYPE_CODE_FLT.
7066
7067 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7068
7069         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7070         TYPE_CODE_FLT or not.
7071
7072 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7073
7074         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7075         * avr-tdep.c (avr_gdbarch_init): Likewise.
7076         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7077         * cris-tdep.c (cris_gdbarch_init): Likewise.
7078         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7079         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7080         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7081         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7082         * mep-tdep.c (mep_gdbarch_init): Likewise.
7083         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7084         * mips-tdep.c (mips_gdbarch_init): Likewise.
7085         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7086         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7087         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7088         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7089         * v850-tdep.c (v850_gdbarch_init): Likewise.
7090
7091 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7092
7093         * selftest-arch.c (tests_with_arch): Call registers_changed
7094         and reinit_frame_cache.
7095         * selftest.c (run_self_tests): Likewise.
7096
7097 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7098
7099         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7100         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7101
7102 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7103
7104         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7105         set_gdbarch_print_insn.
7106
7107 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7108
7109         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7110         set_gdbarch_print_insn.
7111
7112 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7113
7114         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7115         set_gdbarch_print_insn.
7116         * arc-tdep.c (arc_gdbarch_init): Likewise.
7117         * arch-utils.c: include dis-asm.h.
7118         (default_print_insn): New function.
7119         * arch-utils.h (default_print_insn): Declare.
7120         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7121         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7122         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7123         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7124         * frv-tdep.c (frv_gdbarch_init): Likewise.
7125         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7126         * gdbarch.sh (print_insn): Use default_print_insn.
7127         * gdbarch.c: Regenerated.
7128         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7129         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7130         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7131         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7132         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7133         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7134         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7135         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7136         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7137         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7138         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7139         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7140         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7141         * mt-tdep.c (mt_gdbarch_init): Likewise.
7142         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7143         * nios2-tdep.c (nios2_print_insn): Remove.
7144         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7145         * rx-tdep.c (rx_gdbarch_init): Likewise.
7146         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7147         * score-tdep.c (score_print_insn): Remove.
7148         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7149         * sh-tdep.c (sh_gdbarch_init): Likewise.
7150         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7151         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7152         * tic6x-tdep.c (tic6x_print_insn): Remove.
7153         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7154         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7155         * v850-tdep.c (v850_gdbarch_init): Likewise.
7156         * vax-tdep.c (vax_gdbarch_init): Likewise.
7157         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7158         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7159
7160 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7161
7162         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7163         (MIPS_FP0_REGNUM): Remove.
7164         (MIPS_FSR_REGNUM): Remove.
7165         (mips_fbsd_supply_fpregs): Use mips_regnum.
7166         (mips_fbsd_supply_gregs): Likewise.
7167         (mips_fbsd_collect_fpregs): Likewise.
7168         (mips_fbsd_collect_gregs): Likewise.
7169
7170 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7171
7172         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7173         (getpfpregs_supplies): New function.
7174         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7175         getfpregs_supplies.
7176         (mips_fbsd_store_inferior_registers): Likewise.
7177
7178 2017-05-22  Pedro Alves <palves@redhat.com>
7179
7180         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7181         maintainer.
7182
7183 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7184
7185         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7186         (store_register): Likewise.
7187         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7188         (get_decimal_float_return_value): Likewise.
7189         (do_ppc_sysv_return_value): Likewise.
7190         (ppc64_sysv_abi_push_integer): Likewise.
7191         (ppc64_sysv_abi_push_freg): Likewise.
7192         (ppc64_sysv_abi_return_value_base): Likewise.
7193         (ppc64_sysv_abi_return_value): Likewise.
7194         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7195         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7196         * rs6000-nat.c: Likewise.
7197         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7198         (rs6000_value_to_register): Likewise.
7199         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7200
7201 2017-05-21  Tom Tromey  <tom@tromey.com>
7202
7203         PR rust/21466:
7204         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7205         arrays as "[T]", not "[T; ]".
7206
7207 2017-05-19  Tom Tromey  <tom@tromey.com>
7208
7209         PR rust/21484:
7210         * rust-lang.c (exp_descriptor_rust): New function.
7211         (rust_language_defn): Use it.
7212         * p-lang.c (pascal_language_defn): Update.
7213         * opencl-lang.c (opencl_language_defn): Update.
7214         * objc-lang.c (objc_language_defn): Update.
7215         * m2-lang.c (m2_language_defn): Update.
7216         * language.h (struct language_defn)
7217         <la_watch_location_expression>: New member.
7218         * language.c (unknown_language_defn, auto_language_defn)
7219         (local_language_defn): Update.
7220         * go-lang.c (go_language_defn): Update.
7221         * f-lang.c (f_language_defn): Update.
7222         * d-lang.c (d_language_defn): Update.
7223         * c-lang.h (c_watch_location_expression): Declare.
7224         * c-lang.c (c_watch_location_expression): New function.
7225         (c_language_defn, cplus_language_defn, asm_language_defn)
7226         (minimal_language_defn): Use it.
7227         * breakpoint.c (watch_command_1): Call
7228         la_watch_location_expression.
7229         * ada-lang.c (ada_language_defn): Update.
7230
7231 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7232
7233         PR tui/21482
7234         * gdb_curses.h (NOMACROS): Define.
7235         (NCURSES_NOMACROS): Define.
7236
7237 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7238
7239         PR tui/21482
7240         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7241         arg to char *.
7242         * tui/tui-wingeneral.c (box_win): Likewise.
7243         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7244         (tui_show_source_line): Likewise.
7245         (tui_show_exec_info_content): Likewise.
7246
7247 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7248
7249         * sparc-tdep.c (sparc_structure_return_p)
7250         (sparc_arg_on_registers_p): New functions.
7251         (sparc32_store_arguments): Use them.
7252         * sparc64-tdep.c (sparc64_16_byte_align_p)
7253         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7254         Handle TYPE_CODE_ARRAY.
7255
7256 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7257
7258         * cli/cli-decode.c (add_alias_cmd): New function.
7259         * command.h (add_alias_cmd): Declare.
7260         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7261         instead call add_alias_cmd.
7262
7263 2017-05-17  Pedro Alves  <palves@redhat.com>
7264
7265         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7266         (nat_makefile_frag): ... this.  All references updated.
7267         * configure.ac: Likewise.
7268         * configure.nat: Likewise.  Enhance comments.
7269         * configure: Regenerate.
7270
7271 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7272
7273         * procfs.c (procfs_create_inferior): Change prototype to match
7274         definition.
7275
7276 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7277
7278         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7279         C++ compiler warning.
7280
7281 2017-05-12  Tom Tromey  <tom@tromey.com>
7282
7283         PR rust/21483:
7284         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7285         recurse, just call value_struct_elt directly.
7286
7287 2017-05-12  Tom Tromey  <tom@tromey.com>
7288
7289         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7290         OP_RUST_ARRAY>: Fix.
7291
7292 2017-05-12  Tom Tromey  <tom@tromey.com>
7293
7294         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7295
7296 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7297
7298         * regcache.c: Include <forward_list>.
7299         (struct regcache_list): Remove.
7300         (current_regcache): Update.
7301         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7302         (regcache_thread_ptid_changed): Likewise.
7303         (registers_changed_ptid): Likewise.
7304         (current_regcache_size): Likewise.
7305
7306 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7307
7308         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7309         (current_regcache_size): New function.
7310         (current_regcache_test): New function.
7311         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7312
7313 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7314
7315         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7316         (print_gp_register_row): Use get_frame_register_value.
7317
7318 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7319
7320         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7321         (mips_supply_fpregset): Likewise.
7322         (mips64_supply_gregset): Likewise.
7323
7324 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7325
7326         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7327         regcache->raw_supply_zeroed.
7328
7329 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7330
7331         * configure.nat: Rearrange 'case' statements to match
7332         host before cpu.
7333
7334 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7335
7336         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7337         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7338         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7339         "@nat_extra_makefile_frag@".
7340         (Makefile): Remove dependency on "@frags@".
7341         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7342         (data-directory/Makefile): Likewise.
7343         * config/aarch64/linux.mh: Deleted; moved contents to
7344         "gdb/configure.nat".
7345         * config/alpha/alpha-linux.mh: Likewise.
7346         * config/alpha/nbsd.mh: Likewise.
7347         * config/arm/linux.mh: Likewise.
7348         * config/arm/nbsdelf.mh: Likewise.
7349         * config/i386/cygwin.mh: Likewise.
7350         * config/i386/cygwin64.mh: Likewise.
7351         * config/i386/darwin.mh: Likewise.
7352         * config/i386/fbsd.mh: Likewise.
7353         * config/i386/fbsd64.mh: Likewise.
7354         * config/i386/go32.mh: Likewise.
7355         * config/i386/i386gnu.mh: Likewise.
7356         * config/i386/i386sol2.mh: Likewise.
7357         * config/i386/linux.mh: Likewise.
7358         * config/i386/linux64.mh: Likewise.
7359         * config/i386/mingw.mh: Likewise.
7360         * config/i386/mingw64.mh: Likewise.
7361         * config/i386/nbsd64.mh: Likewise.
7362         * config/i386/nbsdelf.mh: Likewise.
7363         * config/i386/nto.mh: Likewise.
7364         * config/i386/obsd.mh: Likewise.
7365         * config/i386/obsd64.mh: Likewise.
7366         * config/i386/sol2-64.mh: Likewise.
7367         * config/ia64/linux.mh: Likewise.
7368         * config/m32r/linux.mh: Likewise.
7369         * config/m68k/linux.mh: Likewise.
7370         * config/m68k/nbsdelf.mh: Likewise.
7371         * config/m68k/obsd.mh: Likewise.
7372         * config/m88k/obsd.mh: Likewise.
7373         * config/mips/fbsd.mh: Likewise.
7374         * config/mips/linux.mh: Likewise.
7375         * config/mips/nbsd.mh: Likewise.
7376         * config/mips/obsd64.mh: Likewise.
7377         * config/pa/linux.mh: Likewise.
7378         * config/pa/nbsd.mh: Likewise.
7379         * config/pa/obsd.mh: Likewise.
7380         * config/powerpc/aix.mh: Likewise.
7381         * config/powerpc/fbsd.mh: Likewise.
7382         * config/powerpc/linux.mh: Likewise.
7383         * config/powerpc/nbsd.mh: Likewise.
7384         * config/powerpc/obsd.mh: Likewise.
7385         * config/powerpc/ppc64-linux.mh: Likewise.
7386         * config/powerpc/spu-linux.mh: Likewise.
7387         * config/s390/linux.mh: Likewise.
7388         * config/sh/nbsd.mh: Likewise.
7389         * config/sparc/fbsd.mh: Likewise.
7390         * config/sparc/linux.mh: Likewise.
7391         * config/sparc/linux64.mh: Likewise.
7392         * config/sparc/nbsd64.mh: Likewise.
7393         * config/sparc/nbsdelf.mh: Likewise.
7394         * config/sparc/obsd64.mh: Likewise.
7395         * config/sparc/sol2.mh: Likewise.
7396         * config/tilegx/linux.mh: Likewise.
7397         * config/vax/nbsdelf.mh: Likewise.
7398         * config/vax/obsd.mh: Likewise.
7399         * config/xtensa/linux.mh: Likewise.
7400         * config/i386/i386gnu.mn: New file, with excerpts from
7401         "config/i386/i386gnu.mh".
7402         * configure: Regenerate.
7403         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7404         *.mh files under "gdb/config".
7405         * configure.nat: New file, with contents from the
7406         "gdb/config/*/*.mh" files.
7407
7408 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7409
7410         * btrace.c (btrace_clear): Free insn vector.
7411
7412 2017-05-05  Pedro Alves  <palves@redhat.com>
7413
7414         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7415         * configure: Regenerate.
7416
7417 2017-05-04  Pedro Alves  <palves@redhat.com>
7418
7419         * Makefile.in (SFILES): Add progspace-and-thread.c.
7420         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7421         (COMMON_OBS): Add progspace-and-thread.o.
7422         * breakpoint.c: Include "progspace-and-thread.h".
7423         (update_inserted_breakpoint_locations)
7424         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7425         Use scoped_restore_current_pspace_and_thread.
7426         (create_std_terminate_master_breakpoint): Use
7427         scoped_restore_current_program_space.
7428         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7429         (print_breakpoint_location): Use
7430         scoped_restore_current_program_space.
7431         (bp_loc_is_permanent): Use
7432         scoped_restore_current_pspace_and_thread.
7433         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7434         (download_tracepoint_locations): Use
7435         scoped_restore_current_pspace_and_thread.
7436         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7437         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7438         (enum step_over_calls_kind): Moved from inferior.h.
7439         (class scoped_restore_current_thread): New class.
7440         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7441         declaration.
7442         (scoped_restore_current_thread): New class.
7443         * infcmd.c: Include "common/gdb_optional.h".
7444         (continue_1, proceed_after_attach): Use
7445         scoped_restore_current_thread.
7446         (notice_new_inferior): Use scoped_restore_current_thread.
7447         * inferior.c: Include "progspace-and-thread.h".
7448         (restore_inferior, save_current_inferior): Delete.
7449         (add_inferior_command, clone_inferior_command): Use
7450         scoped_restore_current_pspace_and_thread.
7451         * inferior.h (scoped_restore_current_inferior): New class.
7452         * infrun.c: Include "progspace-and-thread.h" and
7453         "common/gdb_optional.h".
7454         (follow_fork_inferior): Use
7455         scoped_restore_current_pspace_and_thread.
7456         (scoped_restore_exited_inferior): New class.
7457         (handle_vfork_child_exec_or_exit): Use
7458         scoped_restore_exited_inferior,
7459         scoped_restore_current_pspace_and_thread,
7460         scoped_restore_current_thread and scoped_restore.
7461         (fetch_inferior_event): Use scoped_restore_current_thread.
7462         * linespec.c (decode_line_full, decode_line_1): Use
7463         scoped_restore_current_program_space.
7464         * mi/mi-main.c: Include "progspace-and-thread.h".
7465         (exec_continue): Use scoped_restore_current_thread.
7466         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7467         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7468         * proc-service.c (ps_pglobal_lookup): Use
7469         scoped_restore_current_program_space.
7470         * progspace-and-thread.c: New file.
7471         * progspace-and-thread.h: New file.
7472         * progspace.c (release_program_space, clone_program_space): Use
7473         scoped_restore_current_program_space.
7474         (restore_program_space, save_current_program_space)
7475         (save_current_space_and_thread): Delete.
7476         (switch_to_program_space_and_thread): Moved to
7477         progspace-and-thread.c.
7478         * progspace.h (save_current_program_space)
7479         (save_current_space_and_thread): Delete declarations.
7480         (scoped_restore_current_program_space): New class.
7481         * remote.c (remote_btrace_maybe_reopen): Use
7482         scoped_restore_current_thread.
7483         * symtab.c: Include "progspace-and-thread.h".
7484         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7485         * thread.c (print_thread_info_1): Use
7486         scoped_restore_current_thread.
7487         (struct current_thread_cleanup): Delete.
7488         (do_restore_current_thread_cleanup)
7489         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7490         (scoped_restore_current_thread::~scoped_restore_current_thread):
7491         ... this new dtor.
7492         (make_cleanup_restore_current_thread): Rename/convert to ...
7493         (scoped_restore_current_thread::scoped_restore_current_thread):
7494         ... this new ctor.
7495         (thread_apply_all_command): Use scoped_restore_current_thread.
7496         (thread_apply_command): Use scoped_restore_current_thread.
7497         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7498         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7499
7500 2017-05-04  Pedro Alves  <palves@redhat.com>
7501
7502         * thread.c (make_cleanup_restore_current_thread): Move
7503         find_thread_ptid call before the is_stopped call.  Assert that the
7504         thread is found.  Replace is_stopped call by checking the thread's
7505         state directly.  Remove unnecessary NULL-thread check.
7506
7507 2017-05-04  Pedro Alves  <palves@redhat.com>
7508
7509         * corelow.c (thread_section_name): New class.
7510         (get_core_register_section, get_core_siginfo): Use it.
7511
7512 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7513
7514         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7515         (get_core_register_section): Remove xfree of NULL pointer.
7516
7517 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7518
7519         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7520         * regcache.c (regcache::raw_supply_zeroed): New function.
7521         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7522
7523 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7524
7525         * gdbarch.sh: Remove commented out definition of
7526         TARGET_CHAR_BIT.
7527         * gdbarch.h: Re-generate.
7528
7529 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7530
7531         * configure: Regenerate.
7532
7533 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7534
7535         * solib-target.c (solib_target_relocate_section_addresses):
7536         Remove num_section_bases, num_bases, segment_bases variables.
7537
7538 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7539
7540         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7541
7542 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7543
7544         * solib-target.c: Include <vector>
7545         (struct lm_info_target) <~lm_info_target>: Remove.
7546         <segment_bases, section_bases>: Change type to
7547         std::vector<CORE_ADDR>.
7548         (library_list_start_segment, library_list_start_section,
7549         library_list_end_library,
7550         solib_target_relocate_section_addresses): Adjust.
7551
7552 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7553
7554         * gdbarch.sh (software_single_step): Change return type to
7555         std::vector<CORE_ADDR>.
7556         * gdbarch.c, gdbarch.h: Re-generate.
7557         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7558         Adjust.
7559         (arm_deal_with_atomic_sequence_raw): Adjust.
7560         (thumb_get_next_pcs_raw): Adjust.
7561         (arm_get_next_pcs_raw): Adjust.
7562         (arm_get_next_pcs): Adjust.
7563         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7564         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7565         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7566         (alpha_software_single_step): Adjust.
7567         * alpha-tdep.h (alpha_software_single_step): Adjust.
7568         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7569         * arm-tdep.c (arm_software_single_step): Adjust.
7570         (arm_breakpoint_kind_from_current_state): Adjust.
7571         * arm-tdep.h (arm_software_single_step): Adjust.
7572         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7573         * cris-tdep.c (cris_software_single_step): Adjust.
7574         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7575         (micromips_deal_with_atomic_sequence): Adjust.
7576         (deal_with_atomic_sequence): Adjust.
7577         (mips_software_single_step): Adjust.
7578         * mips-tdep.h (mips_software_single_step): Adjust.
7579         * moxie-tdep.c (moxie_software_single_step): Adjust.
7580         * nios2-tdep.c (nios2_software_single_step): Adjust.
7581         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7582         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7583         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7584         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7585         * sparc-tdep.c (sparc_software_single_step): Adjust.
7586         * spu-tdep.c (spu_software_single_step): Adjust.
7587         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7588
7589 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7590
7591         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7592         * gdbarch.h: Re-generate.
7593
7594 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7595
7596         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7597         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7598         * python/py-instruction.c, python/py-instruction.h: New file.
7599         * python/py-record.c: Add py-instruction.h include.
7600         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7601         gdb.RecordInstruction.
7602         * python/python-internal.h: Add gdbpy_initialize_instruction
7603         declaration.
7604         * python/python.c (do_start_initialization): Add
7605         gdbpy_initialize_instruction.
7606
7607 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7608
7609         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7610         Remove.
7611         (btrace_func_from_recpy_func): New function.
7612         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7613         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7614         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7615         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7616         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7617         Also, use new helper functions.
7618         (btpy_list_item): Use new helper functions.
7619         (recpy_bt_function_call_history): Use new type name.
7620         (btpy_call_getset): Remove.
7621         (gdbpy_initialize_btrace): Remove code to initialize
7622         gdb.BtraceFunctionCall.
7623         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7624         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7625         recpy_bt_func_prev, recpy_bt_func_next): New export.
7626         * python/py-record.c (recpy_func_type): New static object.
7627         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7628         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7629         recpy_func_next): New function.
7630         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7631         (recpy_func_getset): New static object.
7632         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7633         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7634
7635 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7636
7637         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7638         (btpy_object, btpy_insn_type, btpy_new): Remove.
7639         (btpy_list_object): Use gdb.RecordInstruction type instead of
7640         gdb.BtraceInstruction type.
7641         (btrace_insn_from_recpy_insn): New function.
7642         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7643         btpy_new.
7644         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7645         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7646         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7647         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7648         instead of btpy_object.
7649         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7650         btpy_insn_data, btpy_insn_decode): Rename to ...
7651         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7652         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7653         recpy_bt_insn_decode): This.  Also, use new helper functions.
7654         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7655         recpy_insn_type.
7656         (btpy_insn_getset): Remove.
7657         (gdbpy_initialize_btrace): Remove code to initialize
7658         gdb.BtraceInstruction.  Use recpy_element_object.
7659         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7660         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7661         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7662         * python/py-record.c (recpy_insn_type): New static object.
7663         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7664         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7665         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7666         New function.
7667         (recpy_insn_getset): New static object.
7668         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7669         * python/py-record.h (recpy_element_object): New typedef.
7670         (recpy_insn_type, recpy_insn_new): New export.
7671
7672 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7673
7674         * py-record-btrace.c (btpy_insn_new): Removed.
7675         (btpy_insn_or_gap_new): New function.
7676         (btpy_insn_error): Removed.
7677         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7678         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7679         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7680         btpy_insn_or_gap_new instead of btpy_insn_new.
7681         (btpy_insn_getset): Remove btpy_insn_error.
7682         * py-record.c (recpy_gap_type): New static object.
7683         (recpy_gap_object): New typedef.
7684         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7685         recpy_gap_reason_string): New function.
7686         (recpy_gap_getset): New static object.
7687         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7688         * py-record.h (recpy_gap_new): New export.
7689
7690 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7691
7692         * python/py-record.c (recpy_ptid): Remove.
7693         (recpy_record_getset): Remove recpy_ptid.
7694
7695 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7696
7697         * btrace.c (btrace_fetch): Set inferior_ptid.
7698         * python/py-record-btrace.c: Add "py-record.h" include.
7699         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7700         recpy_bt_end, recpy_bt_instruction_history,
7701         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7702         in gdb.Record object instead of current ptid.
7703         * python/py-record.c: Include new "py-record.h" file.
7704         (recpy_record_object): Moved to py-record.h.
7705         * python/py-record.h: New file.
7706
7707 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7708
7709         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7710         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7711         indentation.
7712
7713 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7714
7715         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7716         the past maintainers section.
7717
7718 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7719
7720         * infcmd.c (get_return_value): Use regcache ctor, and remove
7721         cleanup.
7722
7723 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7724             Pedro Alves  <palves@redhat.com>
7725
7726         * regcache.c (regcache::regcache): New tag dispatch ctor.
7727         (do_cooked_read): Moved above.
7728         (regcache_dup): Use the tag dispatch ctor..
7729         * regcache.h (regcache): Declare ctor, delete copy ctor and
7730         assignment operator, remove friend regcache_dup.
7731
7732 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7733
7734         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7735         call method save instead of regcache_cpy.
7736         * regcache.h (struct regcache): Make regcache_dup a friend.
7737
7738 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7739
7740         * regcache.c (struct regcache): Move to regcache.h
7741         (regcache::arch): New method.
7742         (regcache_get_ptid): Update.
7743         (get_regcache_arch): Call arch method.
7744         (get_regcache_aspace): Call method aspace.
7745         (register_buffer): Change it to method.
7746         (regcache_save): Change it to regcache::save.
7747         (regcache_restore): Likewise.
7748         (regcache_cpy_no_passthrough): Remove the declaration.
7749         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7750         (regcache_cpy_no_passthrough): Change it to method
7751         cpy_no_passthrough.
7752         (regcache_register_status): Change it to method
7753         get_register_status.
7754         (regcache_invalidate): Change it to method invalidate.
7755         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7756         (regcache_raw_update): Change it to method raw_update.
7757         (regcache_raw_read): Likewise.
7758         (regcache_raw_read_signed): Likewise.
7759         (regcache_raw_read_unsigned): Likewise.
7760         (regcache_raw_write_signed): Likewise.
7761         (regcache_raw_write_unsigned): Likewise.
7762         (regcache_cooked_read): Likewise.
7763         (regcache_cooked_read_value): Likewise.
7764         (regcache_cooked_read_signed): Likewise.
7765         (regcache_cooked_read_unsigned): Likewise.
7766         (regcache_cooked_write_signed): Likewise.
7767         (regcache_cooked_write_unsigned): Likewise.
7768         (regcache_raw_set_cached_value): Likewise.
7769         (regcache_raw_write): Likewise.
7770         (regcache_cooked_write): Likewise.
7771         (regcache_xfer_part): Likewise.
7772         (regcache_raw_read_part): Likewise.
7773         (regcache_raw_write_part): Likewise.
7774         (regcache_cooked_read_part): Likewise.
7775         (regcache_cooked_write_part): Likewise.
7776         (regcache_raw_supply): Likewise.
7777         (regcache_raw_collect): Likewise.
7778         (regcache_transfer_regset): Likewise.
7779         (regcache_supply_regset): Likewise.
7780         (regcache_collect_regset): Likewise.
7781         (regcache_debug_print_register): Likewise.
7782         (enum regcache_dump_what): Move it to regcache.h.
7783         (regcache_dump): Change it to method dump.
7784         * regcache.h (enum regcache_dump_what): New.
7785         (class regcache): New.
7786         * target.c (target_fetch_registers): Call method
7787         debug_print_register.
7788         (target_store_registers): Likewise.
7789
7790 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7791
7792         * windows-nat.c (struct lm_info_windows): Initialize field.
7793         (windows_make_so): Allocate lm_info_windows with new.
7794         (windows_free_so): Free lm_info_windows with delete.
7795
7796 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7797
7798         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7799         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7800         cleanup.
7801         (darwin_free_so): Free lm_info_darwin with delete.
7802
7803 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7804
7805         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7806         <l_addr_p>: Change type to bool.
7807         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7808         (svr4_free_so): Free lm_info_svr4 with delete.
7809         (svr4_copy_library_list): Replace memcpy with call to copy
7810         constructor.
7811         (library_list_start_library, svr4_default_sos): Allocate
7812         lm_info_svr4 with new.
7813
7814 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7815
7816         * solib-target.c (struct lm_info_target): Add destructor,
7817         initialize fields.
7818         <name>: Change type to std::string.
7819         (library_list_start_library): Allocate lm_info_target with new.
7820         (solib_target_free_library_list): Free lm_info_target with
7821         delete.
7822         (solib_target_current_sos): Adapt to std::string.
7823         (solib_target_free_so): Free lm_info_target with delete.
7824
7825 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7826
7827         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7828         fields.
7829         (frv_current_sos): Allocate lm_info_frv with new.
7830         (frv_relocate_main_executable): Free lm_info_frv with delete,
7831         allocate with new.
7832         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7833
7834 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7835
7836         * solib-frv.c (struct lm_info_frv): Fix indentation.
7837
7838 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7839
7840         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7841         map field.
7842         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7843         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7844         and allocate with new.
7845         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7846
7847 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7848
7849         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7850         <filename, member_name>: Change type to std::string.
7851         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7852         (library_list_start_library): Allocate lm_info_aix with new.
7853         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7854         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7855         with copy constructor.
7856
7857 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7858
7859         * solist.h (struct lm_info): Remove.
7860         (struct lm_info_base): New class.
7861         (struct so_list) <lm_info>: Change type to lm_info_base *.
7862         * nto-tdep.c (struct lm_info): Remove.
7863         (lm_addr): Adjust.
7864         * solib-aix.c (struct lm_info): Rename to ...
7865         (struct lm_info_aix): ... this.  Extend lm_info_base.
7866         (lm_info_p): Rename to ...
7867         (lm_info_aix_p): ... this, and adjust.
7868         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7869         solib_aix_parse_libraries, library_list_start_library,
7870         solib_aix_free_library_list, solib_aix_parse_libraries,
7871         solib_aix_get_library_list,
7872         solib_aix_relocate_section_addresses, solib_aix_free_so,
7873         solib_aix_get_section_offsets,
7874         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7875         Adjust.
7876         (struct solib_aix_inferior_data) <library_list>: Adjust.
7877         * solib-darwin.c (struct lm_info): Rename to ...
7878         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7879         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7880         * solib-dsbt.c (struct lm_info): Rename to ...
7881         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7882         (struct dsbt_info) <main_executable_lm_info): Adjust.
7883         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7884         dsbt_relocate_section_addresses): Adjust.
7885         * solib-frv.c (struct lm_info): Rename to ...
7886         (struct lm_info_frv): ... this.  Extend lm_info_base.
7887         (main_executable_lm_info): Adjust.
7888         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7889         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7890         find_canonical_descriptor_in_load_object,
7891         frv_fdpic_find_canonical_descriptor): Adjust.
7892         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7893         to lm_info_svr4.
7894         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7895         svr4_clear_so, svr4_copy_library_list,
7896         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7897         svr4_current_sos, svr4_fetch_objfile_link_map,
7898         solist_update_incremental): Adjust.
7899         * solib-svr4.h (struct lm_info_svr4): Move here from
7900         solib-svr4.c.
7901         * solib-target.c (struct lm_info): Rename to ...
7902         (struct lm_info_target): ... this.  Extend lm_info_base.
7903         (lm_info_p): Rename to ...
7904         (lm_info_target_p): ... this.
7905         (solib_target_parse_libraries, library_list_start_segment,
7906         library_list_start_section, library_list_start_library,
7907         library_list_end_library, solib_target_free_library_list,
7908         solib_target_current_sos, solib_target_free_so,
7909         solib_target_relocate_section_addresses): Adjust.
7910         * windows-nat.c (struct lm_info): Rename to ...
7911         (struct lm_info_windows): ... this.  Extend lm_info_base.
7912         (windows_make_so, handle_load_dll, handle_unload_dll,
7913         windows_xfer_shared_libraries): Adjust.
7914
7915 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7916
7917         * solib-darwin.c (struct darwin_so_list): Remove.
7918         (darwin_current_sos): Allocate an so_list object instead of a
7919         darwin_so_list, separately allocate an lm_info object.
7920         (darwin_free_so): Free lm_info.
7921
7922 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7923
7924         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7925         with fprintf_filtered.
7926
7927 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7928
7929         * regcache.c (regcache::regcache): New function.
7930         (regcache::~regcache): New function.
7931         (regcache_xmalloc_1): Remove.
7932         (regcache_xmalloc): Call new regcache.
7933         (regcache_xfree): Call delete regcache.
7934         (get_thread_arch_aspace_regcache): Call new regcache.
7935
7936 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7937
7938         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7939         lwp instead of ptid_get_lwp.
7940
7941 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7942
7943         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7944         lwp_info instead of getting from inferior_ptid.
7945
7946 2017-04-27  Keith Seitz  <keiths@redhat.com>
7947
7948         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7949         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7950         (CV_CONVERSION_BADNESS): Define.
7951         (rank_one_type): Remove overly restrictive rvalue reference
7952         rank checks.
7953         Add cv-qualifier checks and subranks for type equality.
7954         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7955         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7956         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7957
7958 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7959
7960         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7961         count when creating the object.
7962
7963 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7964             Ulrich Weigand  <uweigand@de.ibm.com>
7965
7966         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7967         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7968         is used in AIX.
7969         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7970         (process_xcoff_symbol): Likewise.
7971         (scan_xcoff_symtab): Likewise.
7972
7973 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7974
7975         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7976         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7977         (ia64_access_reg): Use get_frame_register_unsigned.
7978         (ia64_access_rse_reg): Likewise.
7979         (ia64_libunwind_frame_prev_register): Likewise.
7980
7981 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7982
7983         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7984         * gdbarch.c: Regenerated.
7985         * gdbarch.h: Regenerated.
7986         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7987         visibility external.
7988         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7989         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7990         (enum cfa_how_kind): Move to ...
7991         (struct dwarf2_frame_state_reg_info): Likewise.
7992         (struct dwarf2_frame_state): Likewise.
7993         * dwarf2-frame.h: ... here.
7994         (dwarf2_frame_state_alloc_regs): New declaration.
7995         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7996         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7997
7998 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7999
8000         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8001         regcache_raw_read_unsigned.
8002         (xtensa_pseudo_register_write): Likewise.
8003
8004 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8005
8006         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8007         (nds32_pseudo_register_write): Likewise.
8008
8009 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8010
8011         * regcache.c (struct regcache) <readonly_p>: Change its type
8012         to bool.
8013         (regcache_xmalloc_1): Update parameter type and callers update.
8014
8015 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8016
8017         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8018         set_gdbarch_wchar_bit.
8019         * arm-tdep.c (arm_gdbarch_init): Likewise.
8020
8021 2017-04-25  Pedro Alves  <palves@redhat.com>
8022
8023         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8024         (BothAreRelocatable, memcopy, memmove): Don't define.
8025         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8026         macros.
8027
8028 2017-04-25  Pedro Alves  <palves@redhat.com>
8029
8030         * common/common-defs.h: Include "common/poison.h".
8031         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8032         and adjust.
8033         * common/poison.h: New file.
8034         * common/traits.h: Include <type_traits>.
8035         (Not, Or, Requires): New, moved from common/function-view.h.
8036
8037 2017-04-25  Pedro Alves  <palves@redhat.com>
8038
8039         * breakpoint.h (struct breakpoint): In-class initialize all
8040         fields.  Make boolean fields "bool".
8041         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8042         memset call and initializations no longer necessary.
8043
8044 2017-04-25  Pedro Alves  <palves@redhat.com>
8045
8046         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8047         reference.
8048         (pt_btrace_insn): New function.
8049         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8050
8051 2017-04-25  Pedro Alves  <palves@redhat.com>
8052
8053         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8054         "base" field and inherit from "bp_location" instead.  Add
8055         non-default ctor.
8056         (allocate_location_exception): Use new non-default ctor.
8057         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8058         (init_bp_location): Convert to ...
8059         (bp_location::bp_location): ... this new ctor, and remove memset
8060         call.
8061         (base_breakpoint_allocate_location): Use the new non-default ctor.
8062         * breakpoint.h (bp_location): Now a class.  Declare default and
8063         non-default ctors.  In-class initialize all members.
8064         (init_bp_location): Remove declaration.
8065
8066 2017-04-25  Pedro Alves  <palves@redhat.com>
8067
8068         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8069         assignment operator.
8070
8071 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8072
8073         * doublest.c (convert_doublest_to_floatformat): Call
8074         floatformat_totalsize_bytes.
8075
8076 2017-04-22  Tom Tromey  <tom@tromey.com>
8077
8078         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8079         ui_out_emit_list.
8080         * stack.c (print_frame): Use ui_out_emit_list.
8081         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8082         ui_out_emit_list.
8083         * mi/mi-main.c (print_one_inferior)
8084         (mi_cmd_data_list_register_names)
8085         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8086         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8087         ui_out_emit_list.
8088         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8089         (mi_output_solib_attribs): Use ui_out_emit_list,
8090         ui_out_emit_tuple.
8091         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8092         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8093         (mi_cmd_stack_list_args, list_args_or_locals): Use
8094         ui_out_emit_list.
8095         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8096         * breakpoint.c (print_solib_event, output_thread_groups): Use
8097         ui_out_emit_list.
8098
8099 2017-04-22  Tom Tromey  <tom@tromey.com>
8100
8101         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8102         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8103         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8104
8105 2017-04-22  Tom Tromey  <tom@tromey.com>
8106
8107         * tracepoint.c (tvariables_info_1)
8108         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8109
8110 2017-04-22  Tom Tromey  <tom@tromey.com>
8111
8112         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8113         annotate_arg_emitter.
8114         * breakpoint.c (print_mention_watchpoint)
8115         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8116         * annotate.h (struct annotate_arg_emitter): New.
8117
8118 2017-04-22  Tom Tromey  <tom@tromey.com>
8119
8120         * record-btrace.c (record_btrace_insn_history)
8121         (record_btrace_insn_history_range, record_btrace_call_history)
8122         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8123         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8124         ui_out_emit_tuple.
8125         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8126         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8127         * skip.c (skip_info): Use ui_out_emit_tuple.
8128         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8129         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8130         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8131         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8132         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8133         ui_out_emit_tuple.
8134         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8135         (output_register, mi_cmd_data_read_memory)
8136         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8137         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8138         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8139         Use ui_out_emit_tuple.
8140         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8141         ui_out_emit_tuple.
8142         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8143         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8144         * linux-thread-db.c (info_auto_load_libthread_db): Use
8145         ui_out_emit_tuple.
8146         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8147         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8148         * disasm.c (do_mixed_source_and_assembly_deprecated)
8149         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8150         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8151         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8152         * breakpoint.c (print_one_breakpoint_location)
8153         (print_one_breakpoint): Use ui_out_emit_tuple.
8154         * auto-load.c (print_script, info_auto_load_cmd): Use
8155         ui_out_emit_tuple.
8156         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8157
8158 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8159
8160         * thread.c (print_thread_info_1): Remove dead code.
8161
8162 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8163
8164         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8165         GDB_SELF_TEST.
8166         * arm-tdep.c (selftests::arm_record_test): Likewise.
8167
8168 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8169
8170         * regcache.c (regcache_restore): Remove argument 2.  Replace
8171         argument 3 with regcache.  Get register status from
8172         src->register_status and get register contents from
8173         register_buffer (src, regnum).
8174         (regcache_cpy): Update.
8175
8176 2017-04-19  Pedro Alves  <palves@redhat.com>
8177
8178         * gdbthread.h (thread): Add missing closing parenthesis in
8179         comment.
8180
8181 2017-04-19  Pedro Alves  <palves@redhat.com>
8182
8183         * common/refcounted-object.h: New file.
8184         * gdbthread.h: Include "common/refcounted-object.h".
8185         (thread_info): Inherit from refcounted_object and add comments.
8186         (thread_info::incref, thread_info::decref)
8187         (thread_info::m_refcount): Delete.
8188         (thread_info::deletable): Use the refcounted_object::refcount()
8189         method.
8190         * inferior.c (current_inferior_): Add comment.
8191         (set_current_inferior): Increment/decrement refcounts.
8192         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8193         not-deletable instead of comparing with the current inferior.
8194         (initialize_inferiors): Increment the initial inferior's refcount.
8195         * inferior.h (struct inferior): Forward declare.
8196         Include "common/refcounted-object.h".
8197         (current_inferior, set_current_inferior): Move declaration to
8198         before struct inferior's definition, and fix comment.
8199         (inferior): Inherit from refcounted_object.  Add comments.
8200         * thread.c (switch_to_thread_no_regs): Reference the thread's
8201         inferior pointer directly instead of doing a ptid lookup.
8202         (switch_to_no_thread): New function.
8203         (switch_to_thread(thread_info *)): New function, factored out
8204         from ...
8205         (switch_to_thread(ptid_t)): ... this.
8206         (restore_current_thread): Delete.
8207         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8208         fields, and add 'inf' field.
8209         (do_restore_current_thread_cleanup): Check whether old->inf is
8210         alive instead of looking up an inferior by ptid.  Use
8211         switch_to_thread and switch_to_no_thread.
8212         (restore_current_thread_cleanup_dtor): Use old->inf directly
8213         instead of lookup up an inferior by id.  Decref the inferior.
8214         Don't restore 'removable'.
8215         (make_cleanup_restore_current_thread): Same the inferior pointer
8216         in old, instead of the inferior number.  Incref the inferior.
8217         Don't save/clear 'removable'.
8218
8219 2017-04-19  Pedro Alves  <palves@redhat.com>
8220
8221         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8222         unittests/scoped_restore-selftests.c.
8223         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8224         * common/scoped_restore.h (scoped_restore_base): Make "class".
8225         (scoped_restore_base::release): New public method.
8226         (scoped_restore_base::scoped_restore_base): New protected ctor.
8227         (scoped_restore_base::m_saved_var): New protected field.
8228         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8229         scoped_restore_base base class instead of m_saved_var directly.
8230         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8231         (scoped_restore_tmpl::scoped_restore_tmpl(const
8232         scoped_restore_tmpl<T>&)): Likewise.
8233         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8234         method.
8235         (scoped_restore_tmpl::saved_var): New method.
8236         (scoped_restore_tmpl::m_saved_var): Delete.
8237         * inferior.h (inferior::detaching): Now a bool.
8238         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8239         cleanup.
8240         * unittests/scoped_restore-selftests.c: New file.
8241
8242 2017-04-19  Pedro Alves  <palves@redhat.com>
8243
8244         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8245         Re-sort in alphabetic order.
8246
8247 2017-04-18  Pedro Alves  <palves@redhat.com>
8248
8249         * xml-support.c (obstack_xml_printf): Delete.
8250         * xml-support.h (obstack_xml_printf): Delete.
8251
8252 2017-04-18  Pedro Alves  <palves@redhat.com>
8253
8254         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8255         vdebug, verror, body_text, start_element, end_element, name,
8256         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8257         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8258         is_xinclude>: Make private and add m_ prefix.
8259         (gdb_xml_parser::body_text): New method, based on ...
8260         (gdb_xml_body_text): ... this.  Adjust.
8261         (gdb_xml_parser::vdebug): New method, based on ...
8262         (gdb_xml_debug): ... this.  Adjust.
8263         (gdb_xml_parser::verror): New method, based on ...
8264         (gdb_xml_error): ... this.  Adjust.
8265         (gdb_xml_parser::start_element): New method, based on ...
8266         (gdb_xml_start_element): ... this.  Adjust.
8267         (gdb_xml_start_element_wrapper): Defer to
8268         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8269         (gdb_xml_parser::end_element): New method, based on ...
8270         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8271         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8272         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8273         (gdb_xml_parser::use_dtd): New method, based on ...
8274         (gdb_xml_use_dtd): ... this.  Adjust.
8275         (gdb_xml_parser::parse): New method, based on ...
8276         (gdb_xml_parse): ... this.  Adjust.
8277         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8278         (xinclude_start_include): Adjust to call the parser's name method.
8279         (xml_xinclude_default, xml_xinclude_start_doctype)
8280         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8281         method.
8282         (xml_process_xincludes): Adjust to call parser methods.
8283         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8284         declarations.
8285
8286 2017-04-18  Pedro Alves  <palves@redhat.com>
8287
8288         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8289         gdb::optional<std::string>.
8290         * xml-support.c: Include <string>.
8291         (scope_level::scope_level(scope_level &&))
8292         (scope_level::~scope_level): Delete.
8293         (scope_level::body): Now a std::string.
8294         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8295         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8296         parameter.
8297         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8298         (xinclude_parsing_data::output): Now a std::string reference.
8299         (xinclude_start_include): Adjust.
8300         (xml_xinclude_default): Adjust.
8301         (xml_process_xincludes): Add 'output' parameter, and return bool.
8302         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8303         and return bool.
8304         * xml-tdesc.c: Include <unordered_map> and <string>.
8305         (tdesc_xml_cache): Delete.
8306         (tdesc_xml_cache_s): Delete.
8307         (xml_cache): Now an std::unordered_map.
8308         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8309         (target_fetch_description_xml): Change return type to
8310         gdb::optional<std::string>, and adjust.
8311         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8312         (target_fetch_description_xml): Change return type to
8313         gdb::optional<std::string>.
8314
8315 2017-04-18  Pedro Alves  <palves@redhat.com>
8316
8317         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8318         unittests/optional-selftests.c.
8319         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8320         * unittests/optional-selftests.c: New file.
8321         * unittests/optional/assignment/1.cc: New file.
8322         * unittests/optional/assignment/2.cc: New file.
8323         * unittests/optional/assignment/3.cc: New file.
8324         * unittests/optional/assignment/4.cc: New file.
8325         * unittests/optional/assignment/5.cc: New file.
8326         * unittests/optional/assignment/6.cc: New file.
8327         * unittests/optional/assignment/7.cc: New file.
8328         * unittests/optional/cons/copy.cc: New file.
8329         * unittests/optional/cons/default.cc: New file.
8330         * unittests/optional/cons/move.cc: New file.
8331         * unittests/optional/cons/value.cc: New file.
8332         * unittests/optional/in_place.cc: New file.
8333         * unittests/optional/observers/1.cc: New file.
8334         * unittests/optional/observers/2.cc: New file.
8335
8336 2017-04-18  Pedro Alves  <palves@redhat.com>
8337
8338         * common/gdb_optional.h: Include common/traits.h.
8339         (in_place_t): New type.
8340         (in_place): New constexpr variable.
8341         (optional::optional): Remove member initialization of
8342         m_instantiated.
8343         (optional::optional(in_place_t...)): New constructor.
8344         (optional::~optional): Use reset.
8345         (optional::optional(const optional&)): New.
8346         (optional::optional(const optional&&)): New.
8347         (optional::optional(T &)): New.
8348         (optional::optional(T &&)): New.
8349         (operator::operator=(const optional &)): New.
8350         (operator::operator=(optional &&)): New.
8351         (operator::operator= (const T &))
8352         (operator::operator= (T &&))
8353         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8354         (operator::reset): New.
8355         (operator::m_instantiated):: Add in-class initializer.
8356         * common/traits.h: Include <type_traits>.
8357         (struct And): New types.
8358
8359 2017-04-18  Pedro Alves  <palves@redhat.com>
8360
8361         * xml-support.c: Include <vector>.
8362         (scope_level::scope_level(const gdb_xml_element *))
8363         (scope_level::scope_level(scope_level&&)): New.
8364         (scope_level::~scope_level): New.
8365         (scope_level_s): Delete.
8366         (gdb_xml_parser::scopes): Now a std::vector.
8367         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8368         Use std::vector.
8369         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8370         scope cleanup code.
8371         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8372         of the scopes member.  Use std::vector::emplace_back.
8373
8374 2017-04-18  Pedro Alves  <palves@redhat.com>
8375
8376         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8377         a bool.
8378         (gdb_xml_end_element): Change type of first parameter.
8379         (gdb_xml_cleanup): Rename to ...
8380         (gdb_xml_parser::~gdb_xml_parser): ... this.
8381         (gdb_xml_create_parser_and_cleanup): Delete with ...
8382         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8383         to this new ctor.
8384         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8385         using gdb_xml_create_parser_and_cleanup.
8386         (xinclude_parsing_data): Add ctor/dtor.
8387         (xml_xinclude_cleanup): Delete.
8388         (xml_process_xincludes): Create a local xinclude_parsing_data
8389         instead of heap-allocating one.  Create a local gdb_xml_parser
8390         instead of heap-allocating one with
8391         gdb_xml_create_parser_and_cleanup.
8392
8393 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8394
8395         PR threads/20743
8396         * fbsd-nat.c (resume_one_thread_cb): Remove.
8397         (resume_all_threads_cb): Remove.
8398         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8399         iterate_over_threads.
8400
8401 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8402
8403         * NEWS: Create a new section for the next release branch.
8404         Rename the section of the current branch, now that it has
8405         been cut.
8406
8407 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8408
8409         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8410         * version.in: Bump version to 8.0.50.DATE-git.
8411
8412 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8413
8414         PR gdb/21385
8415         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8416         independently of the host, and fix build breakage on Cygwin.
8417
8418 2017-04-13  Pedro Alves  <palves@redhat.com>
8419
8420         * inferior.c (free_inferior): Convert to ...
8421         (inferior::~inferior): ... this dtor.
8422         (inferior::inferior): New ctor, factored out from ...
8423         (add_inferior_silent): ... here.  Allocate the inferior with a new
8424         expression.
8425         (delete_inferior): Call delete instead of free_inferior.
8426         * inferior.h (gdb_environ, continuation): Forward declare.
8427         (inferior): Now a class.  Add in-class initialization to all
8428         members.  Make boolean fields bool, except 'detaching'.
8429         (inferior::inferior): New explicit ctor.
8430         (inferior::~inferior): New.
8431
8432 2017-04-13  Pedro Alves  <palves@redhat.com>
8433
8434         * inferior.c (init_inferior_list): Delete.
8435         * inferior.h (init_inferior_list): Delete.
8436
8437 2017-04-13  Pedro Alves  <palves@redhat.com>
8438
8439         PR threads/13217
8440         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8441         (top level): Call it twice, with different thread sets.
8442
8443 2017-04-13  Pedro Alves  <palves@redhat.com>
8444
8445         * thread.c: Include <algorithm>.
8446         (thread_array_cleanup): Delete.
8447         (scoped_inc_dec_ref): New class.
8448         (live_threads_count): New function.
8449         (set_thread_refcount): Delete.
8450         (tp_array_compar_ascending): Now a bool.
8451         (tp_array_compar): Convert to a std::sort comparison function.
8452         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8453         and live_threads_count.
8454
8455 2017-04-13  Pedro Alves  <palves@redhat.com>
8456
8457         * infrun.c (follow_fork_inferior): Also switch the current
8458         inferior.
8459
8460 2017-04-13  Pedro Alves  <palves@redhat.com>
8461
8462         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8463         before calling create_internal_breakpoint.
8464
8465 2017-04-13  Pedro Alves  <palves@redhat.com>
8466
8467         * fork-child.c (execv_argv): New class.
8468         (breakup_args): Refactored as ...
8469         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8470         Copy arguments to storage and replace separators with NULL
8471         terminators in place.
8472         (escape_bang_in_quoted_argument): Adjust to return bool.
8473         (execv_argv::execv_argv): New ctor.
8474         (execv_argv::init_for_shell): New method, factored out from
8475         fork_inferior.  Don't strdup strings into the vector.
8476         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8477         Remove free_vector_argv call.
8478
8479 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8480
8481         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8482         tdep->rx_psw_type.
8483
8484 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8485
8486         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8487         * rx-tdep.c (rx_gdbarch_init): Likewise.
8488
8489 2017-04-13  Pedro Alves  <palves@redhat.com>
8490
8491         * breakpoint.h (struct breakpoint): Reindent.
8492
8493 2017-04-13  Pedro Alves  <palves@redhat.com>
8494
8495         * breakpoint.c (bp_location): Rename to ...
8496         (bp_locations): ... this.  All references updated.
8497         (bp_location_count): Rename to ...
8498         (bp_locations_count): ... this.  All references updated.
8499         (bp_location_placed_address_before_address_max): Rename to ...
8500         (bp_locations_placed_address_before_address_max): ... this.  All
8501         references updated.
8502         (bp_location_shadow_len_after_address_max): Rename to ...
8503         (bp_locations_shadow_len_after_address_max): ... this.  All
8504         references updated.
8505         (bp_location_compare_addrs): Rename to ...
8506         (bp_locations_compare_addrs): ... this.  All references updated.
8507         (bp_location_compare):Rename to ...
8508         (bp_locations_compare): ... this.  All references updated.
8509         (bp_location_target_extensions_update): Rename to ...
8510         (bp_locations_target_extensions_update): ... this.  All references
8511         updated.
8512
8513 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8514
8515         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8516         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8517         'sgtty.h'.
8518         * common/gdb_termios.h: New file, with parts of "terminal.h".
8519         * inflow.c: Include "gdb_termios.h".
8520         * ser-unix.c: Include "gdb_termios.h".
8521         * terminal.h: Move terminal-related defines to
8522         "common/gdb_termios.h".
8523
8524 2017-04-12  Tom Tromey  <tom@tromey.com>
8525
8526         * probe.c (parse_probes): Update.
8527         * location.h (delete_event_location): Don't declare.
8528         (event_location_deleter::operator()): Update.
8529         * location.c (event_location_deleter::operator()): Rename from
8530         delete_event_location.
8531         * linespec.h (linespec_result) <location>: Change type to
8532         event_location_up.
8533         * linespec.c (canonicalize_linespec, event_location_to_sals)
8534         (decode_objc): Update.
8535         (linespec_result): Don't call delete_event_location.
8536         * breakpoint.c (create_breakpoints_sal)
8537         (bkpt_probe_create_sals_from_location)
8538         (strace_marker_create_sals_from_location): Update.
8539
8540 2017-04-12  Tom Tromey  <tom@tromey.com>
8541
8542         * linespec.h (struct linespec_result): Add constructor and
8543         destructor.
8544         (init_linespec_result, destroy_linespec_result)
8545         (make_cleanup_destroy_linespec_result): Don't declare.
8546         * linespec.c (init_linespec_result): Remove.
8547         (linespec_result::~linespec_result): Rename from
8548         destroy_linespec_result.  Update.
8549         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8550         Remove.
8551         * breakpoint.c (create_breakpoint, break_range_command)
8552         (decode_location_default): Update.
8553         * ax-gdb.c (agent_command_1): Update.
8554
8555 2017-04-12  Tom Tromey  <tom@tromey.com>
8556
8557         * remote.c (remote_download_tracepoint): Update.
8558         * python/py-breakpoint.c (bppy_get_location): Update.
8559         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8560         (gdbscm_breakpoint_location): Update.
8561         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8562         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8563         Change type to event_location_up.
8564         * breakpoint.c (create_overlay_event_breakpoint)
8565         (create_longjmp_master_breakpoint)
8566         (create_std_terminate_master_breakpoint)
8567         (create_exception_master_breakpoint)
8568         (breakpoint_event_location_empty_p, print_breakpoint_location)
8569         (print_one_breakpoint_location, create_thread_event_breakpoint)
8570         (init_breakpoint_sal, create_breakpoint)
8571         (print_recreate_ranged_breakpoint, break_range_command)
8572         (init_ada_exception_breakpoint, say_where): Update.
8573         (base_breakpoint_dtor): Don't call delete_event_location.
8574         (bkpt_print_recreate, tracepoint_print_recreate)
8575         (dprintf_print_recreate, update_static_tracepoint)
8576         (breakpoint_re_set_default): Update.
8577
8578 2017-04-12  Tom Tromey  <tom@tromey.com>
8579
8580         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8581         type of "to_do".  Update.
8582         (compute_stack_depth): Use std::vector.
8583
8584 2017-04-12  Tom Tromey  <tom@tromey.com>
8585
8586         * printcmd.c (find_instruction_backward): Use std::vector.
8587
8588 2017-04-12  Tom Tromey  <tom@tromey.com>
8589
8590         * symfile.c (objfilep): Remove typedef.
8591         (reread_symbols): Use a std::vector.
8592
8593 2017-04-12  Tom Tromey  <tom@tromey.com>
8594
8595         * mi/mi-main.c (exec_direction_forward): Remove.
8596         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8597         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8598         scoped_restore.
8599         * guile/guile.c (guile_repl_command, guile_command)
8600         (gdbscm_execute_gdb_command): Use scoped_restore.
8601         * go-exp.y (go_parse): Use scoped_restore.
8602         * d-exp.y (d_parse): Use scoped_restore.
8603         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8604         * c-exp.y (c_parse): Use scoped_restore.
8605
8606 2017-04-12  Tom Tromey  <tom@tromey.com>
8607
8608         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8609         (mi_parse): Update return type.
8610         (mi_parse_free): Remove.
8611         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8612         (mi_parse::~mi_parse): Rename from mi_parse_free.
8613         (mi_parse_cleanup): Remove.
8614         (mi_parse): Return a unique_ptr.  Use new.
8615         * mi/mi-main.c (mi_execute_command): Update.
8616
8617 2017-04-12  Tom Tromey  <tom@tromey.com>
8618
8619         * location.c (explicit_location_lex_one): Return a
8620         unique_xmalloc_ptr.
8621         (string_to_explicit_location): Update.  Remove cleanups.
8622
8623 2017-04-12  Tom Tromey  <tom@tromey.com>
8624
8625         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8626         (compare_value_and_voffset): Change type.  Update.
8627         (compute_vtable_size): Change type of "offset_vec".
8628         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8629         (gnuv3_get_typeid): Remove extraneous declaration.
8630
8631 2017-04-12  Tom Tromey  <tom@tromey.com>
8632
8633         * charset.h (wchar_iterator): Fix comment.
8634
8635 2017-04-12  Tom Tromey  <tom@tromey.com>
8636
8637         * charset.c (iconv_wrapper): New class.
8638         (cleanup_iconv): Remove.
8639         (convert_between_encodings): Use it.
8640
8641 2017-04-12  Tom Tromey  <tom@tromey.com>
8642
8643         * symfile.h (increment_reading_symtab): Update type.
8644         * symfile.c (decrement_reading_symtab): Remove.
8645         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8646         * psymtab.c (psymtab_to_symtab): Update.
8647         * dwarf2read.c (dw2_instantiate_symtab): Update.
8648
8649 2017-04-12  Tom Tromey  <tom@tromey.com>
8650
8651         * jit.c (struct jit_reader): Declare separately.  Add constructor
8652         and destructor.  Change type of "handle".
8653         (loaded_jit_reader): Define separately.
8654         (jit_reader_load): Update.  New "new".
8655         (jit_reader_unload_command): Use "delete".
8656         * gdb-dlfcn.h (struct dlclose_deleter): New.
8657         (gdb_dlhandle_up): New typedef.
8658         (gdb_dlopen, gdb_dlsym): Update types.
8659         (gdb_dlclose): Remove.
8660         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8661         (gdb_dlsym): Change type of "handle".
8662         (make_cleanup_dlclose): Remove.
8663         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8664         * compile/compile-c-support.c (load_libcc): Update.
8665
8666 2017-04-12  Tom Tromey  <tom@tromey.com>
8667
8668         * symtab.h (find_pcs_for_symtab_line): Change return type.
8669         * symtab.c (find_pcs_for_symtab_line): Change return type.
8670         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8671         type of "vec".  Update.
8672         (ltpy_get_pcs_for_line): Update.
8673         * linespec.c (decode_digits_ordinary): Update.
8674
8675 2017-04-12  Tom Tromey  <tom@tromey.com>
8676
8677         * tracepoint.c (actions_command): Update.
8678         * python/python.c (python_command, python_interactive_command):
8679         Update.
8680         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8681         * guile/guile.c (guile_command): Update.
8682         * defs.h (read_command_lines, read_command_lines_1): Return
8683         command_line_up.
8684         (command_lines_deleter): New struct.
8685         (command_line_up): New typedef.
8686         * compile/compile.c (compile_code_command)
8687         (compile_print_command): Update.
8688         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8689         command_line_up.
8690         (make_cleanup_free_command_lines): Remove.
8691         * cli/cli-script.c (get_command_line, read_command_lines_1)
8692         (copy_command_lines): Return command_line_up.
8693         (while_command, if_command, read_command_lines, define_command)
8694         (document_command): Update.
8695         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8696         Remove.
8697         * breakpoint.h (breakpoint_set_commands): Change type of
8698         "commands".
8699         * breakpoint.c (breakpoint_set_commands): Change type of
8700         "commands".  Update.
8701         (do_map_commands_command, update_dprintf_command_list)
8702         (create_tracepoint_from_upload): Update.
8703
8704 2017-04-12  Tom Tromey  <tom@tromey.com>
8705
8706         * tracepoint.c (scope_info): Update.
8707         * spu-tdep.c (spu_catch_start): Update.
8708         * python/python.c (gdbpy_decode_line): Update.
8709         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8710         * python/py-breakpoint.c (bppy_init): Update.
8711         * probe.c (parse_probes): Update.
8712         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8713         * location.h (event_location_deleter): New struct.
8714         (event_location_up): New typedef.
8715         (new_linespec_location, new_address_location, new_probe_location)
8716         (new_explicit_location, copy_event_location)
8717         (string_to_event_location, string_to_event_location_basic)
8718         (string_to_explicit_location): Update return type.
8719         (make_cleanup_delete_event_location): Remove.
8720         * location.c (new_linespec_location, new_address_location)
8721         (new_probe_location, new_explicit_location, copy_event_location):
8722         Return event_location_up.
8723         (delete_event_location_cleanup)
8724         (make_cleanup_delete_event_location): Remove.
8725         (string_to_explicit_location, string_to_event_location_basic)
8726         (string_to_event_location): Return event_location_up.
8727         * linespec.c (canonicalize_linespec, event_location_to_sals)
8728         (decode_line_with_current_source)
8729         (decode_line_with_last_displayed, decode_objc): Update.
8730         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8731         * completer.c (location_completer): Update.
8732         * cli/cli-cmds.c (edit_command, list_command): Update.
8733         * breakpoint.c (create_overlay_event_breakpoint)
8734         (create_longjmp_master_breakpoint)
8735         (create_std_terminate_master_breakpoint)
8736         (create_exception_master_breakpoint)
8737         (create_thread_event_breakpoint): Update.
8738         (init_breakpoint_sal): Update.  Remove some dead code.
8739         (create_breakpoint_sal): Change type of "location".  Update.
8740         (create_breakpoints_sal, create_breakpoint, break_command_1)
8741         (dprintf_command, break_range_command, until_break_command)
8742         (init_ada_exception_breakpoint)
8743         (strace_marker_create_sals_from_location)
8744         (update_static_tracepoint, trace_command, ftrace_command)
8745         (strace_command, create_tracepoint_from_upload): Update.
8746         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8747         * ax-gdb.c (agent_command_1): Update.
8748
8749 2017-04-12  Pedro Alves  <palves@redhat.com>
8750
8751         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8752         * configure.tgt: Handle i[34567]86-*-go32* and
8753         i[34567]86-*-msdosdjgpp*.
8754         * i386-tdep.c (i386_svr4_reg_to_regnum):
8755         Make extern.
8756         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8757         i386-go32-tdep.c.
8758         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8759         * i386-go32-tdep.c: New file.
8760         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8761         declarations.
8762
8763 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8764
8765         * aix-thread.c (pd_status2str): Change return type to const char *.
8766
8767 2017-04-12  Pedro Alves  <palves@redhat.com>
8768
8769         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8770         calls to set_gdbarch_gnu_triplet_regexp.
8771
8772 2017-04-12  Pedro Alves  <palves@redhat.com>
8773
8774         PR gdb/21323
8775         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8776         New enum value.
8777         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8778         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8779         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8780         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8781         * gdbarch.h, gdbarch.c: Regenerate.
8782         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8783         gdbarch_wchar_bit and gdbarch_wchar_signed.
8784         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8785         * arm-tdep.c (arm_gdbarch_init): Likewise.
8786         * avr-tdep.c (avr_gdbarch_init): Likewise.
8787         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8788         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8789         * i386-tdep.c (i386_go32_init_abi): Likewise.
8790         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8791         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8792         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8793         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8794         * sh-tdep.c (sh_gdbarch_init): Likewise.
8795         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8796         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8797         * windows-tdep.c (windows_init_abi): Likewise.
8798         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8799
8800 2017-04-12  Pedro Alves  <palves@redhat.com>
8801
8802         PR c++/21323
8803         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8804         cplus_primitive_type_char32_t>: New enum values.
8805         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8806         and cplus_primitive_type_char32_t.
8807         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8808         32, use the archtecture's built-in type for char16_t and char32_t,
8809         respectively.  Otherwise, fallback to init_integer_type as before,
8810         but make the type unsigned, and issue a complaint.
8811         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8812
8813 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8814
8815         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8816         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8817
8818 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8819
8820         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8821         'const char *'.
8822
8823 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8824
8825         * common/common-utils.c (free_vector_argv): New function.
8826         * common/common-utils.h: Include <vector>.
8827         (free_vector_argv): New prototype.
8828         * darwin-nat.c (darwin_create_inferior): Rewrite function
8829         prototype in order to constify "exec_file" and accept a
8830         "std::string" for "allargs".
8831         * fork-child.c: Include <vector>.
8832         (breakup_args): Rewrite function, using C++.
8833         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8834         and accept "std::string" for "allargs".  Update the code to
8835         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8836         and "execvp".
8837         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8838         order to constify "exec_file" and accept a "std::string" for
8839         "allargs".
8840         * go32-nat.c (go32_create_inferior): Likewise.
8841         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8842         * infcmd.c (run_command_1): Constify "exec_file".  Use
8843         "std::string" for inferior arguments.
8844         * inferior.h (fork_inferior): Update prototype.
8845         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8846         prototype in order to constify "exec_file" and accept a
8847         "std::string" for "allargs".
8848         * nto-procfs.c (procfs_create_inferior): Likewise.
8849         * procfs.c (procfs_create_inferior): Likewise.
8850         * remote-sim.c (gdbsim_create_inferior): Likewise.
8851         * remote.c (extended_remote_run): Update code to accept
8852         "std::string" as argument.
8853         (extended_remote_create_inferior): Rewrite function prototype in
8854         order to constify "exec_file" and accept a "std::string" for
8855         "allargs".
8856         * rs6000-nat.c (super_create_inferior): Likewise.
8857         (rs6000_create_inferior): Likewise.
8858         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8859         * windows-nat.c (windows_create_inferior): Likewise.
8860
8861 2017-04-11  Pedro Alves  <palves@redhat.com>
8862
8863         * thread.c: Fix whitespace throughout.
8864
8865 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8866
8867         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8868
8869 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8870
8871         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8872
8873 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8874
8875         PR gdb/21364
8876         * osdata.c (info_osdata): Check if 'type' is an empty string
8877         instead of NULL.
8878
8879 2017-04-10  Pedro Alves  <palves@redhat.com>
8880
8881         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8882         (ptid_to_global_thread_id, in_thread_list)
8883         (do_captured_list_thread_ids, set_resumed, set_running)
8884         (set_executing, set_stop_requested, finish_thread_state)
8885         (validate_registers_access, can_access_registers_ptid)
8886         (print_thread_info_1, switch_to_thread)
8887         (do_restore_current_thread_cleanup)
8888         (make_cleanup_restore_current_thread, thread_command)
8889         (thread_name_command): Use operator== instead of ptid_equal.
8890
8891 2017-04-10  Pedro Alves  <palves@redhat.com>
8892
8893         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8894         (current_thread_cleanup_chain): Delete.
8895         (restore_current_thread_cleanup_dtor)
8896         (make_cleanup_restore_current_thread): Remove references to
8897         current_thread_cleanup_chain.
8898
8899 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8900
8901         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8902         REG_UNKNOWN.
8903
8904 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8905
8906         PR gdb/19942
8907         * gdbthread.h (thread_info::deletable): New method.
8908         (thread_info::incref): New method.
8909         (thread_info::decref): New method.
8910         (thread_info::refcount): Move it to private.
8911         * infrun.c (save_stop_context): Call inc_refcount.
8912         (release_stop_context_cleanup): Likewise.
8913         * thread.c (set_thread_exited): New function.
8914         (init_thread_list): Delete "tp" only it is deletable, otherwise
8915         call set_thread_exited.
8916         (delete_thread_1): Call set_thread_exited.
8917         (current_thread_cleanup) <inferior_pid>: Remove.
8918         <thread>: New field.
8919         (restore_current_thread_ptid_changed): Removed.
8920         (do_restore_current_thread_cleanup): Adjust.
8921         (restore_current_thread_cleanup_dtor): Don't call
8922         find_thread_ptid.
8923         (set_thread_refcount): Use dec_refcount.
8924         (make_cleanup_restore_current_thread): Adjust.
8925         (thread_apply_all_command): Call inc_refcount.
8926         (_initialize_thread): Don't call
8927         observer_attach_thread_ptid_changed.
8928
8929 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8930
8931         * thread.c (delete_thread_1): Hoist code on marking thread as
8932         exited.
8933
8934 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8935
8936         * windows-nat.c (windows_detach): Initialize ptid with
8937         minus_one_ptid.
8938
8939 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8940
8941         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8942
8943 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8944
8945         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8946         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8947         (bfin_pseudo_register_write): Likewise
8948
8949 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8950
8951         * common/ptid.h (struct ptid): Change to...
8952         (class ptid_t): ... this.
8953         <ptid_t>: New constructors.
8954         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8955         matches>: New methods.
8956         <make_null, make_minus_one>: New static methods.
8957         <pid>: Rename to...
8958         <m_pid>: ...this.
8959         <lwp>: Rename to...
8960         <m_lwp>: ...this.
8961         <tid>: Rename to...
8962         <m_tid>: ...this.
8963         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8964         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8965         as references, move comment to class ptid_t.
8966         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8967         ptid_t static methods.
8968         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8969         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8970         Take ptid arguments as references, implement using ptid_t methods.
8971         * unittests/ptid-selftests.c: New file.
8972         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8973         unittests/ptid-selftests.c.
8974         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8975
8976 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8977
8978         * python/python.c (python_run_simple_file): Cast mode literal to
8979         non-const char pointer as expected by PyFile_FromString.
8980
8981 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8982
8983         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8984         minus_one_ptid and null_ptid.
8985
8986 2017-04-05  Pedro Alves  <palves@redhat.com>
8987
8988         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8989         * configure: Regenerate.
8990
8991 2017-04-05  Pedro Alves  <palves@redhat.com>
8992
8993         * ada-exp.y (yyerror): Constify.
8994         * ada-lang.c (bound_name, get_selections)
8995         (ada_variant_discrim_type)
8996         (ada_variant_discrim_name, ada_value_struct_elt)
8997         (ada_lookup_struct_elt_type, is_unchecked_variant)
8998         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8999         (catch_ada_exception_command_split)
9000         (catch_ada_assert_command_split, catch_assert_command)
9001         (ada_op_name): Constify.
9002         * ada-lang.h (ada_yyerror, get_selections)
9003         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9004         * arc-tdep.c (arc_print_frame_cache): Constify.
9005         * arm-tdep.c (arm_skip_stub): Constify.
9006         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9007         (gen_aggregate_elt_ref): Constify.
9008         * bcache.c (print_bcache_statistics): Constify.
9009         * bcache.h (print_bcache_statistics): Constify.
9010         * break-catch-throw.c (catch_exception_command_1):
9011         * breakpoint.c (struct ep_type_description::description):
9012         Constify.
9013         (add_solib_catchpoint): Constify.
9014         (catch_fork_command_1): Add cast.
9015         (add_catch_command): Constify.
9016         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9017         Constify.
9018         * bsd-uthread.c (bsd_uthread_state): Constify.
9019         * buildsym.c (patch_subfile_names): Constify.
9020         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9021         Constify.
9022         * c-exp.y (yyerror): Constify.
9023         (token::oper): Constify.
9024         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9025         * c-varobj.c (cplus_describe_child): Constify.
9026         * charset.c (find_charset_names): Add cast.
9027         (find_charset_names): Constify array and add const_cast.
9028         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9029         (edit_command): Constify.
9030         * cli/cli-decode.c (lookup_cmd): Constify.
9031         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9032         Constify.
9033         (struct dump_context): Constify.
9034         (add_dump_command, restore_command): Constify.
9035         * cli/cli-script.c (get_command_line): Constify.
9036         * cli/cli-script.h (get_command_line): Constify.
9037         * cli/cli-utils.c (check_for_argument): Constify.
9038         * cli/cli-utils.h (check_for_argument): Constify.
9039         * coff-pe-read.c (struct read_pe_section_data): Constify.
9040         * command.h (lookup_cmd): Constify.
9041         * common/print-utils.c (decimal2str): Constify.
9042         * completer.c (gdb_print_filename): Constify.
9043         * corefile.c (set_gnutarget): Constify.
9044         * cp-name-parser.y (yyerror): Constify.
9045         * cp-valprint.c (cp_print_class_member): Constify.
9046         * cris-tdep.c (cris_register_name, crisv32_register_name):
9047         Constify.
9048         * d-exp.y (yyerror): Constify.
9049         (struct token::oper): Constify.
9050         * d-lang.h (d_yyerror): Constify.
9051         * dbxread.c (struct header_file_location::name): Constify.
9052         (add_old_header_file, add_new_header_file, last_function_name)
9053         (dbx_next_symbol_text, add_bincl_to_list)
9054         (find_corresponding_bincl_psymtab, set_namestring)
9055         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9056         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9057         * defs.h (command_line_input, print_address_symbolic)
9058         (deprecated_readline_begin_hook): Constify.
9059         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9060         Constify.
9061         * event-top.c (handle_line_of_input): Constify and add cast.
9062         * exceptions.c (catch_errors): Constify.
9063         * exceptions.h (catch_errors): Constify.
9064         * expprint.c (print_subexp_standard, op_string, op_name)
9065         (op_name_standard, dump_raw_expression, dump_raw_expression):
9066         * expression.h (op_name, op_string, dump_raw_expression):
9067         Constify.
9068         * f-exp.y (yyerror): Constify.
9069         (struct token::oper): Constify.
9070         (struct f77_boolean_val::name): Constify.
9071         * f-lang.c (f_word_break_characters): Constify.
9072         * f-lang.h (f_yyerror): Constify.
9073         * fork-child.c (fork_inferior): Add cast.
9074         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9075         (new_variant): Constify.
9076         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9077         * gdbarch.c: Regenerate.
9078         * gdbcore.h (set_gnutarget): Constify.
9079         * go-exp.y (yyerror): Constify.
9080         (token::oper): Constify.
9081         * go-lang.h (go_yyerror): Constify.
9082         * go32-nat.c (go32_sysinfo): Constify.
9083         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9084         * guile/scm-cmd.c (cmdscm_function): Constify.
9085         * guile/scm-param.c (pascm_param_value): Constify.
9086         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9087         (h8300sx_register_name): Constify.
9088         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9089         Constify.
9090         * ia64-tdep.c (ia64_register_names): Constify.
9091         * infcmd.c (construct_inferior_arguments): Constify.
9092         (path_command, attach_post_wait): Constify.
9093         * language.c (show_range_command, show_case_command)
9094         (unk_lang_error): Constify.
9095         * language.h (language_defn::la_error)
9096         (language_defn::la_name_of_this): Constify.
9097         * linespec.c (decode_line_2): Constify.
9098         * linux-thread-db.c (thread_db_err_str): Constify.
9099         * lm32-tdep.c (lm32_register_name): Constify.
9100         * m2-exp.y (yyerror): Constify.
9101         * m2-lang.h (m2_yyerror): Constify.
9102         * m32r-tdep.c (m32r_register_names): Constify and make static.
9103         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9104         * m88k-tdep.c (m88k_register_name): Constify.
9105         * macroexp.c (appendmem): Constify.
9106         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9107         (upgrade_type, parse_external, parse_partial_symbols)
9108         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9109         (new_symbol): Constify.
9110         * memattr.c (mem_info_command): Constify.
9111         * mep-tdep.c (register_name_from_keyword): Constify.
9112         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9113         Constify.
9114         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9115         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9116         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9117         cast.
9118         (mi_execute_async_cli_command): Constify.
9119         * mips-tdep.c (mips_register_name): Constify.
9120         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9121         (am33_register_name, am33_2_register_name)
9122         * moxie-tdep.c (moxie_register_names): Constify.
9123         * nat/linux-osdata.c (osdata_type): Constify fields.
9124         * nto-tdep.c (nto_parse_redirection): Constify.
9125         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9126         (lookup_child_selector): Constify.
9127         (objc_methcall::name): Constify.
9128         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9129         (lookup_struct_typedef): Constify.
9130         * objfiles.c (pc_in_section): Constify.
9131         * objfiles.h (pc_in_section): Constify.
9132         * p-exp.y (struct token::oper): Constify.
9133         (yyerror): Constify.
9134         * p-lang.h (pascal_yyerror): Constify.
9135         * parser-defs.h (op_name_standard): Constify.
9136         (op_print::string): Constify.
9137         (exp_descriptor::op_name): Constify.
9138         * printcmd.c (print_address_symbolic): Constify.
9139         * psymtab.c (print_partial_symbols): Constify.
9140         * python/py-breakpoint.c (stop_func): Constify.
9141         (bppy_get_expression): Constify.
9142         * python/py-cmd.c (cmdpy_completer::name): Constify.
9143         (cmdpy_function): Constify.
9144         * python/py-event.c (evpy_add_attribute)
9145         (gdbpy_initialize_event_generic): Constify.
9146         * python/py-event.h (evpy_add_attribute)
9147         (gdbpy_initialize_event_generic): Constify.
9148         * python/py-evts.c (add_new_registry): Constify.
9149         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9150         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9151         * python/py-inferior.c (get_buffer): Add cast.
9152         * python/py-param.c (parm_constant::name): Constify.
9153         * python/py-unwind.c (fprint_frame_id): Constify.
9154         * python/python.c (gdbpy_parameter_value): Constify.
9155         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9156         * remote.c (memory_packet_config::name): Constify.
9157         (show_packet_config_cmd, remote_write_bytes)
9158         (remote_buffer_add_string):
9159         * reverse.c (exec_reverse_once): Constify.
9160         * rs6000-tdep.c (variant::name, variant::description): Constify.
9161         * rust-exp.y (rustyyerror): Constify.
9162         * rust-lang.c (rust_op_name): Constify.
9163         * rust-lang.h (rustyyerror): Constify.
9164         * serial.h (serial_ops::name): Constify.
9165         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9166         (sh_sh3e_register_name, sh_sh2e_register_name)
9167         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9168         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9169         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9170         (sh_sh4al_dsp_register_name): Constify.
9171         * sh64-tdep.c (sh64_register_name): Constify.
9172         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9173         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9174         * stabsread.c (patch_block_stabs, read_type_number)
9175         (ref_map::stabs, ref_add, process_reference)
9176         (symbol_reference_defined, define_symbol, define_symbol)
9177         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9178         (read_one_struct_field, read_struct_fields, read_baseclasses)
9179         (read_tilde_fields, read_struct_type, read_array_type)
9180         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9181         (read_huge_number, read_range_type, read_args, common_block_start)
9182         (find_name_end): Constify.
9183         * stabsread.h (common_block_start, define_symbol)
9184         (process_one_symbol, symbol_reference_defined, ref_add):
9185         * symfile.c (get_section_index, add_symbol_file_command):
9186         * symfile.h (get_section_index): Constify.
9187         * target-descriptions.c (tdesc_type::name): Constify.
9188         (tdesc_free_type): Add cast.
9189         * target.c (find_default_run_target):
9190         (add_deprecated_target_alias, find_default_run_target)
9191         (target_announce_detach): Constify.
9192         (do_option): Constify.
9193         * target.h (add_deprecated_target_alias): Constify.
9194         * thread.c (print_thread_info_1): Constify.
9195         * top.c (deprecated_readline_begin_hook, command_line_input):
9196         Constify.
9197         (init_main): Add casts.
9198         * top.h (handle_line_of_input): Constify.
9199         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9200         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9201         (tfind_command): Rename to ...
9202         (tfind_command_1): ... this and constify.
9203         (tfind_command): New function.
9204         (tfind_end_command, tfind_start_command): Adjust.
9205         (encode_source_string): Constify.
9206         * tracepoint.h (encode_source_string): Constify.
9207         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9208         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9209         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9210         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9211         * tui/tui-win.c (parse_scrolling_args): Constify.
9212         * tui/tui-windata.c (tui_erase_data_content): Constify.
9213         * tui/tui-windata.h (tui_erase_data_content): Constify.
9214         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9215         * tui/tui.c (tui_enable): Add cast.
9216         * utils.c (defaulted_query): Constify.
9217         (init_page_info): Add cast.
9218         (puts_debug, subset_compare): Constify.
9219         * utils.h (subset_compare): Constify.
9220         * varobj.c (varobj_format_string): Constify.
9221         * varobj.h (varobj_format_string): Constify.
9222         * vax-tdep.c (vax_register_name): Constify.
9223         * windows-nat.c (windows_detach): Constify.
9224         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9225         * xml-support.c (gdb_xml_end_element): Constify.
9226         * xml-tdesc.c (tdesc_start_reg): Constify.
9227         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9228         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9229         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9230
9231 2017-04-05  Pedro Alves  <palves@redhat.com>
9232
9233         * proc-api.c (struct trans): Constify.
9234         (procfs_note): Constify.
9235         * proc-events.c (struct trans, syscall_table):
9236         * proc-flags.c (struct trans): Constify.
9237         * proc-utils.h (procfs_note): Constify.
9238         * proc-why.c (struct trans): Constify.
9239         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9240         (procfs_detach): Constify.
9241         * sol-thread.c (struct string_map): Constify.
9242         (td_err_string, td_state_string): Constify.
9243
9244 2017-04-05  Pedro Alves  <palves@redhat.com>
9245
9246         * proc-api.c (procfs_filename): Don't initialize
9247         procfs_filename.
9248         (prepare_to_trace): Assume procfs_filename is non-NULL.
9249         (_initialize_proc_api): Give procfs_filename a default value here.
9250
9251 2017-04-05  Pedro Alves  <palves@redhat.com>
9252
9253         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9254         'cond_string' parameter.
9255         (extract_exception_regexp): Constify 'string' parameter.
9256         (catch_exception_command_1): Constify.
9257         * breakpoint.c (init_catchpoint)
9258         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9259         parameter.
9260         (ep_parse_optional_if_clause, catch_fork_command_1)
9261         (catch_exec_command_1): Constify.
9262         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9263         parameter.
9264         (ep_parse_optional_if_clause): Constify.
9265         * cli/cli-utils.c (remove_trailing_whitespace)
9266         (check_for_argument): Constify.
9267         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9268         non-const overload.
9269         (check_for_argument): Likewise.
9270
9271 2017-04-05  Pedro Alves  <palves@redhat.com>
9272
9273         * event-top.c (command_line_handler): Add cast to execute_command
9274         call.
9275         * record-btrace.c (cmd_record_btrace_bts_start)
9276         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9277         (cmd_record_btrace_start): Add cast to execute_command call.
9278         * record-full.c (record_full_goto_insn):
9279         * record.c (record_start, record_stop): Add cast to
9280         execute_command_to_string calls.
9281         (cmd_record_start): Add cast to execute_command calls.
9282
9283 2017-04-05  Pedro Alves  <palves@redhat.com>
9284
9285         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9286         static inline function.
9287         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9288         array and use gdb_PyArg_ParseTupleAndKeywords.
9289         * python/py-cmd.c (cmdpy_init): Likewise.
9290         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9291         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9292         (infpy_search_memory): Likewise.
9293         * python/py-objfile.c (objfpy_add_separate_debug_file)
9294         (gdbpy_lookup_objfile): Likewise.
9295         * python/py-symbol.c (gdbpy_lookup_symbol)
9296         (gdbpy_lookup_global_symbol): Likewise.
9297         * python/py-type.c (gdbpy_lookup_type): Likewise.
9298         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9299         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9300         Likewise.
9301
9302 2017-04-05  Pedro Alves  <palves@redhat.com>
9303
9304         * python/python-internal.h (gdb_PyGetSetDef): New type.
9305         * python/py-block.c (block_object_getset)
9306         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9307         * python/py-event.c (event_object_getset)
9308         (finish_breakpoint_object_getset): Likewise.
9309         * python/py-inferior.c (inferior_object_getset): Likewise.
9310         * python/py-infthread.c (thread_object_getset): Likewise.
9311         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9312         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9313         * python/py-objfile.c (objfile_getset): Likewise.
9314         * python/py-progspace.c (pspace_getset): Likewise.
9315         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9316         Likewise.
9317         * python/py-record.c (recpy_record_getset): Likewise.
9318         * python/py-symbol.c (symbol_object_getset): Likewise.
9319         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9320         Likewise.
9321         * python/py-type.c (type_object_getset, field_object_getset):
9322         Likewise.
9323         * python/py-value.c (value_object_getset): Likewise.
9324
9325 2017-04-05  Pedro Alves  <palves@redhat.com>
9326
9327         * python/python-internal.h (gdb_PyObject_CallMethod)
9328         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9329         New functions.
9330         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9331         (PySys_GetObject, PySys_SetPath): New macros.
9332
9333 2017-04-05  Pedro Alves  <palves@redhat.com>
9334
9335         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9336         info_osdata_command.
9337         * osdata.c (info_osdata_command): Rename to ...
9338         (info_osdata): ... this.  Constify 'type' parameter, and remove
9339         the 'from_tty' parameter.  Accept NULL TYPE.
9340         (info_osdata_command): New function.
9341         * osdata.h (info_osdata_command): Remove declaration.
9342         (info_osdata): New declaration.
9343
9344 2017-04-05  Pedro Alves  <palves@redhat.com>
9345
9346         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9347         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9348         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9349         parameter.
9350         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9351         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9352         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9353         parameter.
9354         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9355         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9356         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9357         (mi_cmd_file_list_exec_source_files)
9358         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9359         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9360         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9361         parameter.
9362         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9363         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9364         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9365         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9366         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9367         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9368         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9369         'command' parameter.
9370         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9371         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9372         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9373         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9374         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9375         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9376         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9377         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9378         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9379         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9380         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9381         parameter.
9382         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9383         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9384         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9385         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9386         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9387         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9388         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9389         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9390         (mi_cmd_data_list_changed_registers)
9391         (mi_cmd_data_write_register_values)
9392         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9393         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9394         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9395         (mi_cmd_list_features, mi_cmd_list_target_features)
9396         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9397         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9398         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9399         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9400         (mi_cmd_trace_frame_collected): Constify 'command'
9401         parameter.
9402         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9403         'command' parameter.
9404
9405 2017-04-05  Pedro Alves  <palves@redhat.com>
9406
9407         * ada-lang.c (ada_completer_word_break_characters): Now a const
9408         array.
9409         (ada_get_gdb_completer_word_break_characters): Constify.
9410         * completer.c (gdb_completer_command_word_break_characters)
9411         (gdb_completer_file_name_break_characters)
9412         (gdb_completer_quote_characters): Now const arrays.
9413         (get_gdb_completer_quote_characters): Constify.
9414         (set_rl_completer_word_break_characters): New function.
9415         (set_gdb_completion_word_break_characters)
9416         (complete_line_internal): Use it.
9417         * completer.h (get_gdb_completer_quote_characters): Constify.
9418         (set_rl_completer_word_break_characters): Declare.
9419         * f-lang.c (f_word_break_characters): Constify.
9420         * language.c (default_word_break_characters): Constify.
9421         * language.h (language_defn::la_word_break_characters): Constify.
9422         (default_word_break_characters): Constify.
9423         * top.c (init_main): Use set_rl_completer_word_break_characters.
9424
9425 2017-04-05  Pedro Alves  <palves@redhat.com>
9426
9427         * aix-thread.c (aix_thread_pid_to_str)
9428         (aix_thread_extra_thread_info): Constify.
9429         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9430         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9431         (bsd_uthread_pid_to_str): Constify.
9432         * corelow.c (core_pid_to_str): Constify.
9433         * darwin-nat.c (darwin_pid_to_str): Constify.
9434         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9435         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9436         Constify.
9437         * gnu-nat.c (gnu_pid_to_str): Constify.
9438         * go32-nat.c (go32_pid_to_str): Constify.
9439         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9440         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9441         * inferior.c (inferior_pid_to_str): Constify.
9442         * linux-nat.c (linux_nat_pid_to_str): Constify.
9443         * linux-tdep.c (linux_core_pid_to_str): Constify.
9444         * linux-thread-db.c (thread_db_pid_to_str)
9445         (thread_db_extra_thread_info): Constify.
9446         * nto-tdep.c (nto_extra_thread_info): Constify.
9447         * nto-tdep.h (nto_extra_thread_info): Constify.
9448         * obsd-nat.c (obsd_pid_to_str): Constify.
9449         * procfs.c (procfs_pid_to_str): Constify.
9450         * ravenscar-thread.c (ravenscar_extra_thread_info)
9451         (ravenscar_pid_to_str): Constify.
9452         * remote-sim.c (gdbsim_pid_to_str): Constify.
9453         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9454         Constify.
9455         * sol-thread.c (solaris_pid_to_str): Constify.
9456         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9457         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9458         * target.c (default_pid_to_str, target_pid_to_str)
9459         (normal_pid_to_str, default_pid_to_str): Constify.
9460         * target.h (target_ops::to_pid_to_str)
9461         (target_ops::to_extra_thread_info): Constify.
9462         (target_pid_to_str, normal_pid_to_str): Constify.
9463         * windows-nat.c (windows_pid_to_str): Constify.
9464         * gdbarch.sh (core_pid_to_str): Constify.
9465         * target-delegates.c: Regenerate.
9466         * gdbarch.h, gdbarch.c: Regenerate.
9467
9468 2017-04-05  Pedro Alves  <palves@redhat.com>
9469
9470         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9471         the memory of the temporary warning_pre_print override.
9472         * utils.c (warning_pre_print): Constify.
9473         * utils.h (warning_pre_print): Constify.
9474
9475 2017-04-05  Pedro Alves  <palves@redhat.com>
9476
9477         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9478         (shell_command): New function.
9479         (make_command): Use std::string.
9480         (init_cli_cmds): Register shell_command instead of shell_escape.
9481
9482 2017-04-05  Pedro Alves  <palves@redhat.com>
9483
9484         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9485         * tracepoint.c (default_collect): Don't initialize.
9486
9487 2017-04-05  Pedro Alves  <palves@redhat.com>
9488
9489         * macroexp.c (macro_buffer::shared): Now a bool.
9490         (init_buffer): Update.
9491         (init_shared_buffer): Constify 'addr' parameter.
9492         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9493         casts.
9494
9495 2017-04-05  Pedro Alves  <palves@redhat.com>
9496
9497         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9498         * disasm.c (set_disassembler_options): Constify local.
9499         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9500
9501 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9502
9503         PR gdb/21352
9504         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9505         option.
9506
9507 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9508
9509         * frame.c (frame_unwind_register_unsigned): Call
9510         frame_unwind_register_value.
9511
9512 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9513
9514         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9515         Use gdb_test_multiple, and don't match anchor.
9516
9517 2017-04-05  Pedro Alves  <palves@redhat.com>
9518
9519         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9520         (Write After Approval): Remove Simon Marchi.
9521
9522 2017-04-05  Pedro Alves  <palves@redhat.com>
9523
9524         * common/gdb_optional.h (optional::optional): Make constexpr and
9525         initialize m_dummy.
9526
9527 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9528
9529         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9530         (amd64fbsd_jmp_buf_reg_offset): Remove.
9531         (amd64fbsd_supply_uthread): Remove function.
9532         (amd64fbsd_collect_uthread): Remove function.
9533         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9534         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9535         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9536         (fbsd-nat.c): Update comment.
9537         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9538         (i386fbsd_jmp_buf_reg_offset): Remove.
9539         (i386fbsd_supply_uthread): Remove function.
9540         (i386fbsd_collect_uthread): Remove function.
9541         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9542
9543 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9544
9545         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9546         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9547         * NEWS: Mention that support for FreeBSD/alpha was removed.
9548         * alpha-fbsd-tdep.c: Delete file.
9549         * config/alpha/fbsd.mh: Delete file.
9550         * configure.host: Delete alpha*-*-freebsd* and
9551         alpha*-*-kfreebsd*-gnu.
9552         * configure.tgt: Delete alpha*-*-freebsd* and
9553         alpha*-*-kfreebsd*-gnu.
9554
9555 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9556
9557         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9558         amd64bsd_store_inferior_registers): Use ptid from regcache.
9559
9560 2017-04-04  Pedro Alves  <palves@redhat.com>
9561
9562         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9563         data fields, make them private and add "m_" prefixes.
9564         (lnp_state_machine::lnp_state_machine): New ctor.
9565         (record_line, check_line_address, handle_set_discriminator)
9566         (handle_set_address, handle_advance_pc, handle_special_opcode)
9567         (handle_advance_line, handle_set_file, handle_negate_stmt)
9568         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9569         (end_sequence, advance_line): New methods.
9570         (m_gdbarch, m_record_lines_p): New fields.
9571         (lnp_reader_state): Delete.
9572         (dwarf_record_line): Rename to ...
9573         (lnp_state_machine::record_line): ... adjust.
9574         (init_lnp_state_machine): Delete.
9575         (lnp_state_machine::lnp_state_machine): New.
9576         (check_line_address): Rename to ...
9577         (lnp_state_machine::check_line_address): This.
9578         (dwarf_decode_lines_1): Remove reference to "reader_state".
9579         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9580         State machine internal state manipulation moved to
9581         lnp_state_machine methods.
9582
9583 2017-04-04  Pedro Alves  <palves@redhat.com>
9584
9585         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9586         unittests/offset-type-selftests.c.
9587         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9588         * common/offset-type.h: New file.
9589         * common/preprocessor.h: New file.
9590         * common/traits.h: New file.
9591         * common/valid-expr.h: New file.
9592         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9593         sect_offset and cu_offset strong typedefs throughout.
9594         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9595         typedefs throughout.
9596         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9597         sect_offset and cu_offset strong typedefs throughout.
9598         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9599         typedefs throughout.
9600         * gdbtypes.h: Include "common/offset-type.h".
9601         (cu_offset): Now an offset type (strong typedef) instead of a
9602         struct.
9603         (sect_offset): Likewise.
9604         (union call_site_parameter_u): Rename "param_offset" field to
9605         "param_cu_off".
9606         * unittests/offset-type-selftests.c: New file.
9607
9608 2017-04-04  Pedro Alves  <palves@redhat.com>
9609
9610         * common/underlying.h: New file.
9611         * dwarf2read.c: Include "common/gdb_optional.h" and
9612         "common/underlying.h".
9613         (dir_index, file_name_index): New types.
9614         (file_entry): Use them.
9615         (file_entry::include): Use to_underlying.
9616         (line_header::add_file_name): Use dir_index.
9617         (read_formatted_entries): Use gdb::optional.  Read form before
9618         writting to file_entry.
9619         (dwarf_decode_line_header): Use dir_index.
9620         (lnp_state_machine::current_file): Use to_underlying.
9621         (lnp_state_machine::file): Change type to file_name_index.
9622         (dwarf_record_line): Use to_underlying.
9623         (init_lnp_state_machine): Use file_name_index.
9624         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9625
9626 2017-04-04  Pedro Alves  <palves@redhat.com>
9627
9628         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9629         operator bool, has_value and get methods.
9630
9631 2017-04-04  Pedro Alves  <palves@redhat.com>
9632
9633         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9634         fields.
9635         (line_header): Initialize all data fields.  Change type of
9636         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9637         Change type of include_dirs to std::vector<const char *>.  Remove
9638         num_include_dirs, include_dirs_size.  Change type of file_names to
9639         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9640         (line_header::line_header): New.
9641         (line_header::add_include_dir, line_header::add_file_name): New
9642         methods.
9643         (line_header::include_dir_at): Remove NULL check.
9644         (line_header::file_name_at): Add const overload.
9645         (line_header_up): New unique_ptr typedef.
9646         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9647         std::vector.  Remove free_line_header call.
9648         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9649         free_line_header call.
9650         (free_cu_line_header): Delete.
9651         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9652         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9653         Adjust to use std::vector.
9654         (free_line_header): Delete.
9655         (free_line_header_voidp): Use delete.
9656         (add_include_dir): Replace with ...
9657         (line_header::add_include_dir): ... this method.  Use std::vector.
9658         (add_file_name): Replace with ...
9659         (line_header::add_file_name): ... this method.  Use std::vector.
9660         (add_include_dir_stub): Delete.
9661         (read_formatted_entries): Remove memset.
9662         (dwarf_decode_line_header): Return a line_header_up instead of a
9663         raw pointer.  Remove cleanup handling.  Pass lambdas to
9664         read_formatted_entries.  Adjust to use line_header methods.
9665         (dwarf_decode_lines_1): Adjust to use line_header methods.
9666         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9667         use std::vector.
9668
9669 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9670
9671         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9672         instead of struct ptid.
9673
9674 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9675
9676         * frame.c (get_frame_register_bytes): Unwind using value.
9677         (put_frame_register_bytes): Likewise.
9678
9679 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9680
9681         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9682         aggregate-like.
9683
9684 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9685
9686         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9687
9688 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9689
9690         * gdbthread.h (struct thread_info): Declare constructor and
9691         destructor.  Add some in-class member initializers.
9692         * thread.c (free_thread): Remove.
9693         (init_thread_list): Call delete instead of free_thread.
9694         (new_thread): Call thread_info constructor.
9695         (thread_info::thread_info): New function.
9696         (thread_info::~thread_info): New function.
9697         (delete_thread_1): Call delete instead of free_thread.
9698         (make_cleanup_restore_current_thread): Move tp and frame to
9699         inner block.
9700
9701 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9702
9703         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9704         (arc_skip_prologue): Likewise.
9705         (arc_make_frame_cache): Likewise.
9706         (arc_pv_get_operand): New function.
9707         (arc_is_in_prologue): Likewise.
9708         (arc_analyze_prologue): Likewise.
9709         (arc_print_frame_cache): Likewise.
9710         (MAX_PROLOGUE_LENGTH): New constant.
9711
9712 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9713
9714         * configure.tgt: Add arc-insn.o.
9715         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9716         (dump_arc_instruction_command): New function.
9717         (arc_fprintf_disasm): Likewise.
9718         (arc_disassemble_info): Likewise.
9719         (arc_insn_get_operand_value): Likewise.
9720         (arc_insn_get_operand_value_signed): Likewise.
9721         (arc_insn_get_memory_base_reg): Likewise.
9722         (arc_insn_get_memory_offset): Likewise.
9723         (arc_insn_get_branch_target): Likewise.
9724         (arc_insn_dump): Likewise.
9725         (arc_insn_get_linear_next_pc): Likewise.
9726         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9727         (arc_disassemble_info): Likewise.
9728         (arc_insn_get_branch_target): Likewise.
9729         (arc_insn_get_linear_next_pc): Likewise.
9730         * NEWS: Mention new "maint print arc arc-instruction".
9731
9732 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9733
9734         * arc-tdep (maintenance_print_arc_list): New variable.
9735         (maintenance_print_arc_command): New function.
9736
9737 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9738
9739         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9740         Add "limm" and "reserved".
9741         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9742         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9743         * arc-tdep.h (arc_regnum): Likewise.
9744
9745 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9746
9747         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9748         for THREADPTR register.
9749         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9750         register.
9751         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9752         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9753         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9754
9755 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9756
9757         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9758         registers above gdbarch_num_regs (gdbarch) as privileged in
9759         call0 ABI.
9760
9761 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9762
9763         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9764         for a single specified register or for all registers in
9765         a0_base..a0_base + C0_NREGS range.
9766         (supply_gregset_reg): Call regcache_raw_supply for a single
9767         specified register or for all registers in a0_base..a0_base +
9768         C0_NREGS range.
9769
9770 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9771
9772         * arch/xtensa.h (C0_NREGS): Add definition.
9773         * xtensa-tdep.c (C0_NREGS): Remove definition.
9774
9775 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9776
9777         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9778         Drop xtensa_default_isa initialization.
9779         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9780
9781 2017-03-27  Pedro Alves  <palves@redhat.com>
9782
9783         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9784         (file_entry::include_dir): New method.
9785         (line_header::include_dir_at, line_header::file_name_at): New
9786         methods.
9787         (setup_type_unit_groups, setup_type_unit_groups)
9788         (psymtab_include_file_name): Simplify using the new methods.
9789         (lnp_state_machine) <the_line_header>: New field.
9790         <file>: Add comment.
9791         (lnp_state_machine::current_file): New method.
9792         (dwarf_record_line): Simplify using the new methods.
9793         (init_lnp_state_machine): Initialize the "the_line_header" field.
9794         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9795         Simplify using the new methods.
9796
9797 2017-03-27  Pedro Alves  <palves@redhat.com>
9798
9799         * cp-name-parser.y (make_empty): Delete.
9800         (demangler_special, nested_name, ptr_operator, array_indicator)
9801         (direct_declarator, declarator_1): Use fill_comp instead of
9802         make_empty.
9803
9804 2017-03-27  Pedro Alves  <palves@redhat.com>
9805
9806         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9807         to ATTRIBUTE_PRINTF.
9808         * solib-target.c (library_list_start_list): Print "string" not
9809         "version".
9810         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9811         gdb_xml_error call.
9812
9813 2017-03-27  Pedro Alves  <palves@redhat.com>
9814
9815         * dwarf2read.c (struct file_and_directory): New.
9816         (dwarf2_get_dwz_file): Adjust to use std::string.
9817         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9818         (find_file_and_directory): Adjust to return a file_and_directory
9819         object.
9820         (read_file_scope): Adjust to use file_and_directory.  Remove
9821         make_cleanup/do_cleanups calls.
9822         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9823         make_cleanup/do_cleanups calls.
9824         * python/python.c (do_start_initialization): Adjust to ldirname
9825         returning a std::string.
9826         * utils.c (ldirname): Now returns a std::string.
9827         * utils.h (ldirname): Change return type to std::string.
9828         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9829         returning a std::string.
9830         * xml-tdesc.c (file_read_description_xml): Likewise.
9831
9832 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9833
9834         * regcache.c (regcache_debug_print_register): New function.
9835         * regcache.h (regcache_debug_print_register): New declaration.
9836         * target.c (debug_print_register): Remove.
9837         (target_fetch_registers): Call regcache_debug_print_register.
9838         (target_store_registers): Likewise.
9839
9840 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9841
9842         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9843         reference beyond the 'lh->include_dirs' array before accessing to
9844         it.
9845         (psymtab_include_file_name): Likewise.
9846         (dwarf_decode_lines_1): Likewise.
9847         (dwarf_decode_lines): Likewise.
9848         (file_file_name): Likewise.
9849
9850 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9851
9852         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9853         inferior_ptid.
9854         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9855         ps_lsetfpregs): Likewise.
9856         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9857         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9858         ps_lsetfpregs): Likewise.
9859         * target.c (target_fetch_registers, target_store_registers):
9860         Remove asserts.
9861
9862 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9863
9864         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9865
9866 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9867
9868         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9869         (_initialize_aarch64_tdep): Register it.
9870         (aarch64_record_load_store): Handle PRFM instruction.
9871         (aarch64_process_record_test): New function.
9872
9873 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9874
9875         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9876         indentation.
9877
9878 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9879
9880         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9881
9882 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9883
9884         python/python.c (do_start_initialization): Fix memory leak.
9885
9886 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9887
9888         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9889         using get_ptrace_pid.
9890         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9891         inferior_ptid.
9892         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9893         inferior_ptid instead of pid.
9894
9895 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9896
9897         * aarch64-tdep.c: Wrap locally used classes in anonymous
9898         namespace.
9899         * arm-tdep.c: Likewise.
9900         * linespec.c: Likewise.
9901         * ui-out.c: Likewise.
9902
9903 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9904
9905         PR gdb/19637
9906         * python/lib/gdb/printer/bound_registers.py: Import sys.
9907
9908 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9909
9910         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9911         windows_thread_info parameter and use it instead of
9912         current_thread.
9913         (windows_fetch_inferior_registers): Don't set current_thread,
9914         pass the thread to do_windows_fetch_inferior_registers.  Use
9915         ptid from regcache instead of inferior_ptid.
9916         (do_windows_store_inferior_registers): Add windows_thread_info
9917         parameter and use it instead of current_thread.
9918         (windows_store_inferior_registers): Don't set current_thread,
9919         pass the thread to do_windows_store_inferior_registers.  Use
9920         ptid from regcache instead of inferior_ptid.
9921
9922 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9923
9924         * ser-mingw.c (ser_windows_raw): Remove reference to
9925         struct serial::current_timeout.
9926
9927 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9928
9929         PR tdep/20928
9930         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9931         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9932         (sparc64_fsr_type): Fix %fsr decoding.
9933
9934 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9935
9936         * python/py-record-btrace.c (btpy_insn_data): Change return type
9937         for Python 2.
9938
9939 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9940
9941         * spu-linux-nat.c (spu_fetch_inferior_registers,
9942         spu_store_inferior_registers): Use ptid from regcache, set and
9943         restore inferior_ptid.
9944         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9945         Likewise.
9946
9947 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9948
9949         * i386-linux-nat.c (fetch_register, store_register,
9950         i386_linux_fetch_inferior_registers,
9951         i386_linux_store_inferior_registers): Use ptid from regcache.
9952         * ia64-linux-nat.c (ia64_linux_fetch_register,
9953         ia64_linux_store_register): Likewise.
9954         * inf-ptrace.c (inf_ptrace_fetch_register,
9955         inf_ptrace_store_register): Likewise.
9956         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9957         m32r_linux_store_inferior_registers): Likewise.
9958         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9959         m68kbsd_store_inferior_registers): Likewise.
9960         * m68k-linux-nat.c (fetch_register, store_register,
9961         m68k_linux_fetch_inferior_registers,
9962         m68k_linux_store_inferior_registers): Likewise.
9963         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9964         m88kbsd_store_inferior_registers): Likewise.
9965         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9966         mips_fbsd_store_inferior_registers): Likewise.
9967         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9968         mips64_linux_regsets_store_registers): Likewise.
9969         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9970         mipsnbsd_store_inferior_registers): Likewise.
9971         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9972         mips64obsd_store_inferior_registers): Likewise.
9973         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9974         Likewise.
9975         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9976         ppcfbsd_store_inferior_registers): Likewise.
9977         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9978         ppc_linux_store_inferior_registers): Likewise.
9979         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9980         ppcnbsd_store_inferior_registers): Likewise.
9981         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9982         ppcobsd_store_registers): Likewise.
9983         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9984         Likewise.
9985         * ravenscar-thread.c (ravenscar_fetch_registers,
9986         ravenscar_store_registers, ravenscar_prepare_to_store):
9987         Likewise.
9988         * record-btrace.c (record_btrace_fetch_registers,
9989         record_btrace_store_registers, record_btrace_prepare_to_store):
9990         Likewise.
9991         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9992         Lookup inferior using ptid from regcache, instead of
9993         current_inferior.
9994         * remote.c (remote_fetch_registers, remote_store_registers): Use
9995         ptid from regcache.
9996         * rs6000-nat.c (fetch_register, store_register): Likewise.
9997         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9998         s390_linux_store_inferior_registers): Likewise.
9999         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10000         shnbsd_store_inferior_registers): Likewise.
10001         * sol-thread.c (sol_thread_fetch_registers,
10002         sol_thread_store_registers): Likewise.
10003         * sparc-nat.c (sparc_fetch_inferior_registers,
10004         sparc_store_inferior_registers): Likewise.
10005         * tilegx-linux-nat.c (fetch_inferior_registers,
10006         store_inferior_registers): Likewise.
10007         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10008         vaxbsd_store_inferior_registers): Likewise.
10009         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10010         store_xtregs): Likewise.
10011
10012 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10013
10014         PR gdb/14441
10015         * NEWS: Mention support for rvalue references in GDB and python.
10016         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10017         supports both lvalue and rvalue references.
10018
10019 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10020
10021         PR gdb/14441
10022         * gdbtypes.c (rank_one_type): Implement overloading
10023         resolution rules regarding rvalue references.
10024
10025 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10026
10027         PR gdb/14441
10028         * aarch64-tdep.c (aarch64_type_align)
10029         (aarch64_extract_return_value, aarch64_store_return_value): Change
10030         lvalue reference type checks to general reference type checks.
10031         * amd64-tdep.c (amd64_classify): Likewise.
10032         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10033         Likewise.
10034         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10035         (arm_store_return_value): Likewise.
10036         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10037         * c-typeprint.c (c_print_type): Likewise.
10038         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10039         (cplus_number_of_children, cplus_describe_child): Likewise.
10040         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10041         * completer.c (expression_completer): Likewise.
10042         * cp-support.c (make_symbol_overload_list_adl_namespace):
10043         Likewise.
10044         * darwin-nat-info.c (info_mach_region_command): Likewise.
10045         * dwarf2loc.c (entry_data_value_coerce_ref)
10046         (value_of_dwarf_reg_entry): Likewise.
10047         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10048         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10049         Likewise.
10050         * findvar.c (extract_typed_address, store_typed_address):
10051         Likewise.
10052         * gdbtypes.c (rank_one_type): Likewise.
10053         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10054         * infcall.c (value_arg_coerce): Likewise.
10055         * language.c (pointer_type): Likewise.
10056         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10057         Likewise.
10058         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10059         * mn10300-tdep.c (mn10300_type_align): Likewise.
10060         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10061         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10062         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10063         Likewise.
10064         * printcmd.c (print_formatted, x_command): Likewise.
10065         * python/py-type.c (typy_get_composite, typy_template_argument):
10066         Likewise.
10067         * python/py-value.c (valpy_referenced_value)
10068         (valpy_get_dynamic_type, value_has_field): Likewise.
10069         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10070         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10071         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10072         * spu-tdep.c (spu_scalar_value_p): Likewise.
10073         * symtab.c (lookup_symbol_aux): Likewise.
10074         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10075         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10076         Likewise.
10077         * valops.c (value_cast_pointers, value_cast)
10078         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10079         (value_struct_elt, value_struct_elt_bitpos)
10080         (value_find_oload_method_list, find_overload_match)
10081         (value_rtti_indirect_type): Likewise.
10082         * valprint.c (val_print_scalar_type_p, generic_val_print):
10083         Likewise.
10084         * value.c (value_actual_type, value_as_address, unpack_long)
10085         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10086         (coerce_ref): Likewise.
10087         * varobj.c (varobj_get_value_type): Likewise.
10088
10089 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10090
10091         PR gdb/14441
10092         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10093         table of constants.
10094         * python/lib/gdb/command/explore.py: Support exploring values
10095         of rvalue reference types.
10096         * python/lib/gdb/types.py: Implement get_basic_type() for
10097         rvalue reference types.
10098         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10099         constant.
10100         * python/py-value.c (valpy_getitem): Add an rvalue reference
10101         check.
10102         (valpy_reference_value): Add new parameter "refcode".
10103         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10104         New wrappers for valpy_reference_value().
10105         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10106         (gdbpy_invoke_xmethod): Likewise.
10107
10108 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10109
10110         PR gdb/14441
10111         * dwarf2read.c (process_die, read_type_die_1): Handle the
10112         DW_TAG_rvalue_reference_type DIE.
10113         (read_tag_reference_type): Add new parameter "refcode".
10114
10115 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10116
10117         PR gdb/14441
10118         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10119         (c_type_print_modifier, c_type_print_varspec_suffix)
10120         (c_type_print_base): Support printing rvalue reference types.
10121         * c-valprint.c (c_val_print, c_value_print): Support printing
10122         rvalue reference values.
10123
10124 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10125
10126         PR gdb/14441
10127         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10128         typename.
10129         * cp-support.c (replace_typedefs): Handle
10130         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10131         * python/py-type.c (typy_lookup_type): Likewise.
10132
10133 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10134
10135         PR gdb/14441
10136         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10137         * parse.c (insert_type): Change assert statement.
10138         (follow_types): Handle rvalue reference types.
10139         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10140         constant.
10141
10142 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10143
10144         PR gdb/14441
10145         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10146         value_ref() interface.
10147         * c-valprint.c (c_value_print): Likewise.
10148         * infcall.c (value_arg_coerce): Likewise.
10149         * python/py-value.c (valpy_reference_value): Likewise.
10150         * valops.c (value_cast, value_reinterpret_cast)
10151         (value_dynamic_cast, typecmp): Likewise.
10152         (value_ref): Parameterize by kind of return value reference type.
10153         * value.h (value_ref): Add new parameter "refcode".
10154
10155 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10156
10157         PR gdb/14441
10158         * dwarf2read.c (read_tag_reference_type): Use
10159         lookup_lvalue_reference_type() instead of lookup_reference_type().
10160         * eval.c (evaluate_subexp_standard): Likewise.
10161         * f-exp.y: Likewise.
10162         * gdbtypes.c (make_reference_type, lookup_reference_type):
10163         Generalize with rvalue reference types.
10164         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10165         convenience wrappers for lookup_reference_type().
10166         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10167         reference kind parameter.
10168         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10169         wrappers for lookup_reference_type().
10170         * guile/scm-type.c (gdbscm_type_reference): Use
10171         lookup_lvalue_reference_type() instead of lookup_reference_type().
10172         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10173         * parse.c (follow_types): Likewise.
10174         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10175         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10176         Likewise.
10177         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10178         (gdbpy_invoke_xmethod): Likewise.
10179         * stabsread.c: Provide extra argument to make_reference_type()
10180         call.
10181         * valops.c (value_ref, value_rtti_indirect_type): Use
10182         lookup_lvalue_reference_type() instead of lookup_reference_type().
10183
10184 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10185
10186         PR gdb/14441
10187         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10188         (TYPE_IS_REFERENCE): New macro.
10189         (struct type): Add rvalue_reference_type field.
10190         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10191
10192 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10193
10194         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10195         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10196         New function definition.
10197         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10198         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10199         New function declaration.
10200         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10201         * mi/mi-interp.h: New file.
10202         * solib.c (info_sharedlibrary_command): Replace for loop with
10203         ALL_SO_LIBS macro
10204         * solib.h (update_solib_list): New function declaration.
10205         (so_list_head): Move macro.
10206         * solist.h (ALL_SO_LIBS): New macro.
10207
10208 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10209
10210         * infcmd.c (post_create_inferior): Remove unused argument in
10211         call to solib_add.
10212         * remote.c (remote_start_remote): Likewise.
10213         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10214         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10215         (enable_break): Likewise.
10216         * solib.c (update_solib_list): Remove unused target argument
10217         and its documentation.
10218         (solib_add): Remove unused target argument.  Remove unused
10219         argument in call to update_solib_list.
10220         (info_sharedlibrary_command): Remove unused argument in call
10221         to update_solib_list.
10222         (sharedlibrary_command): Remove unused argument in call to
10223         solib_add.
10224         (handle_solib_event): Likewise.
10225         (reload_shared_libraries): Likewise.
10226         * solib.h (solib_add): Remove unused target argument.
10227
10228 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10229
10230         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10231         (s390_displaced_step_fixup): Cover relative branches with the
10232         default fixup handling.  This fixes lack of support for some
10233         relative branch instructions.
10234
10235 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10236
10237         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10238         ptid from regcache.
10239
10240 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10241
10242         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10243         i386_darwin_store_inferior_registers): Use ptid from regcache.
10244
10245 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10246
10247         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10248         i386bsd_store_inferior_registers): Use ptid from regcache.
10249
10250 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10251
10252         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10253         hppaobsd_store_registers): Use ptid from regcache.
10254
10255 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10256
10257         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10258         hppanbsd_store_registers): Use ptid from regcache.
10259
10260 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10261
10262         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10263         from regcache.  Use get_ptrace_pid.
10264
10265 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10266
10267         * corelow.c (get_core_register_section): Use ptid from regcache,
10268         update doc.
10269
10270 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10271
10272         * bsd-uthread.c (bsd_uthread_fetch_registers,
10273         bsd_uthread_store_registers): Use ptid from regcache, set and
10274         restore inferior_ptid.
10275
10276 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10277
10278         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10279         fetch_fp_regs, store_register, store_regs, store_fp_register,
10280         store_fp_regs): Use ptid from regcache.
10281
10282 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10283
10284         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10285         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10286         store_vfp_regs): Use ptid from regcache.
10287
10288 2017-03-17  Pedro Alves  <palves@redhat.com>
10289
10290         PR remote/21188
10291         * ser-base.c (ser_base_wait_for): Add comment.
10292         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10293         version.
10294         * ser-unix.c (hardwire_raw): Remove reference to
10295         scb->current_timeout.
10296         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10297         (hardwire_ops): Install ser_base_readchar instead of
10298         hardwire_readchar.
10299         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10300         Remove fields.
10301
10302 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10303
10304         PR gdb/19637
10305         * python/lib/gdb/printer/bound_registers.py: Add support for
10306         Python 3.
10307
10308 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10309
10310         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10311         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10312         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10313         byte_offset to subobj_byte_offset.  Fix the handling of
10314         DWARF_VALUE_STACK on big-endian targets when coming via an
10315         implicit pointer.
10316         (dwarf2_evaluate_loc_desc): Adjust call to
10317         dwarf2_evaluate_loc_desc_full.
10318         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10319         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10320
10321 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10322
10323         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10324         and REVSH instructions.
10325
10326 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10327
10328         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10329         (arm_record_test): Declare.
10330         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10331         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10332         align with the manual.
10333         (thumb_record_misc): Adjust the code order to align with the
10334         manual.
10335         (thumb2_record_decode_insn_handler): Fix instruction matching.
10336         (instruction_reader_thumb): New class.
10337         (arm_record_test): New function.
10338
10339 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10340
10341         * arm-tdep.c (abstract_memory_reader): New class.
10342         (instruction_reader): New class.
10343         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10344         (decode_insn): Likewise.
10345
10346 2017-03-16  Doug Evans  <dje@google.com>
10347
10348         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10349         member.  Change type of TYPE member to SCM.  All uses updated.
10350         (lsscm_make_lazy_string_smob): Add assert.
10351         (lsscm_make_lazy_string): Flag bad length values.
10352         (lsscm_elt_type): New function.
10353         (gdbscm_lazy_string_to_value): Rewrite to use
10354         lsscm_safe_lazy_string_to_value.
10355         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10356         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10357         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10358         in incoming type.
10359         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10360         * guile/scm-type.c (tyscm_scm_to_type): New function.
10361
10362 2017-03-15  Doug Evans  <dje@google.com>
10363
10364         PR python/17728, python/18439, python/18779
10365         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10366         member.  Change type of TYPE member to PyObject *.  All uses updated.
10367         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10368         (gdbpy_create_lazy_string_object): Flag bad length values.
10369         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10370         Handle typedefs in incoming type.
10371         (stpy_lazy_string_elt_type): New function.
10372         (gdbpy_extract_lazy_string): Call it.
10373         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10374         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10375         typedefs in incoming type.
10376
10377 2017-03-16  Doug Evans  <dje@google.com>
10378
10379         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10380         * guile/scm-type.c (tyscm_scm_to_type): New function.
10381
10382 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10383
10384         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10385         "ULONGEST" for "skip".
10386
10387 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10388
10389         PR gdb/21220
10390         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10391         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10392         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10393         over ptrace peek/poke until end of buffer or error.
10394
10395 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10396
10397         * parse.c (length_of_subexp): Make static.
10398         * parser-defs.h (length_of_subexp): Remove.
10399
10400 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10401
10402         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10403         as well.
10404
10405 2017-03-14  Pedro Alves  <palves@redhat.com>
10406
10407         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10408         (main): Use std::unique_ptr.  Remove calls to
10409         cp_demangled_name_parse_free.
10410
10411 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10412
10413         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10414         alphabsd_store_inferior_registers): Use regcache->ptid instead
10415         of inferior_ptid.
10416
10417 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10418
10419         * aix-thread.c (aix_thread_fetch_registers,
10420         aix_thread_store_registers): Use regcache->ptid instead of
10421         inferior_ptid.
10422
10423 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10424
10425         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10426         store_gregs_to_thread, fetch_fpregs_from_thread,
10427         store_fpregs_to_thread): Use regcache->ptid instead of
10428         inferior_ptid.
10429
10430 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10431
10432         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10433         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10434         instead of inferior_ptid.
10435
10436 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10437
10438         * target.c (target_fetch_registers, target_store_registers): Add
10439         assert.
10440
10441 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10442
10443         * regcache.h (regcache_get_ptid): New function.
10444         * regcache.c (regcache_get_ptid): New function.
10445
10446 2017-03-13  Mark Wielaard  <mark@klomp.org>
10447
10448         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10449
10450 2017-03-10  Keith Seitz  <keiths@redhat.com>
10451
10452         PR c++/8218
10453         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10454
10455 2017-03-08  Pedro Alves  <palves@redhat.com>
10456
10457         PR gdb/18360
10458         * infrun.c (start_step_over, do_target_resume, resume)
10459         (restart_threads): Assert we're not resuming a thread that is
10460         meant to be stopped.
10461         (infrun_thread_stop_requested_callback): Delete.
10462         (infrun_thread_stop_requested): If the thread is internally
10463         stopped, queue a pending stop event and clear the thread's
10464         inline-frame state.
10465         (handle_stop_requested): New function.
10466         (handle_syscall_event, handle_inferior_event_1): Use
10467         handle_stop_requested.
10468         (handle_stop_requested): New function.
10469         (handle_signal_stop): Set the thread's stop_signal here instead of
10470         at caller.
10471         (finish_step_over): Clear step over info unconditionally.
10472         (handle_signal_stop): If the user had interrupted the event
10473         thread, consider the stop a random signal.
10474         (handle_signal_stop) <signal arrived while stepping over
10475         breakpoint>: Don't restart threads here.
10476         (stop_waiting): Don't clear step-over info here.
10477
10478 2017-03-08  Pedro Alves  <palves@redhat.com>
10479
10480         PR 21206
10481         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10482         goes to argument 2, not 1.
10483
10484 2017-03-08  Pedro Alves  <palves@redhat.com>
10485
10486         PR cli/21218
10487         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10488         display_gdb_prompt.
10489         (command_line_input): Add comment.
10490
10491 2017-03-08  Pedro Alves  <palves@redhat.com>
10492
10493         PR tui/21216
10494         * tui/tui-file.c (tui_file::write): New.
10495         * tui/tui-file.h (tui_file): Override "write".
10496         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10497         factored out from ...
10498         (tui_puts): ... here.
10499         (tui_putc): Use them.
10500         (tui_write): New function.
10501         * tui/tui-io.h (tui_write): Declare.
10502
10503 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10504
10505         * Makefile.in (SFILES): Replace "environ.c" with
10506         "common/environ.c".
10507         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10508         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10509         to...
10510         * common/environ.c: ... here.
10511         * environ.h: Moved to...
10512         * common/environ.h: ... here.
10513
10514 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10515
10516         * gdbarch.sh (pstring_ptr): New static function.
10517         (gdbarch_disassembler_options): Use it.
10518         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10519         not valid_disassembler_option->name.
10520         * gdbarch.c: Regenerate.
10521
10522 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10523
10524         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10525
10526 2017-03-07  Pedro Alves  <palves@redhat.com>
10527
10528         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10529
10530 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10531
10532         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10533         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10534         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10535         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10536
10537 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10538
10539         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10540
10541 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10542
10543         * remote.c (remote_add_target_side_commands): Use range-based
10544         for loop.
10545
10546 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10547
10548         PR gdb/21165
10549         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10550         value is lazy.
10551         * valprint.c (common_val_print): Likewise.
10552
10553 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10554
10555         * NEWS: Mention new set/show disassembler-options commands.
10556         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10557         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10558         (prospective_options): New static variable.
10559         (gdb_disassembler::gdb_disassembler): Initialize
10560         m_di.disassembler_options.
10561         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10562         (get_disassembler_options): New function.
10563         (set_disassembler_options): Likewise.
10564         (set_disassembler_options_sfunc): Likewise.
10565         (show_disassembler_options_sfunc): Likewise.
10566         (disassembler_options_completer): Likewise.
10567         (_initialize_disasm): Likewise.
10568         * disasm.h (get_disassembler_options): New prototype.
10569         (set_disassembler_options): Likewise.
10570         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10571         (gdbarch_verify_disassembler_options): Likewise.
10572         * gdbarch.c: Regenerate.
10573         * gdbarch.h: Likewise.
10574         * arm-tdep.c (num_disassembly_options): Delete.
10575         (set_disassembly_style): Likewise.
10576         (arm_disassembler_options): New static variable.
10577         (set_disassembly_style_sfunc): Convert short style name into long
10578         option name.  Call set_disassembler_options.
10579         (show_disassembly_style_sfunc): New function.
10580         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10581         set_gdbarch_verify_disassembler_options.
10582         (_initialize_arm_tdep): Delete regnames variable and update callers.
10583         (arm_disassembler_options): Initialize.
10584         (disasm_options): New variable.
10585         (num_disassembly_options): Rename from this...
10586         (num_disassembly_styles): ...to this.  Compute by scanning through
10587         disasm_options.
10588         (valid_disassembly_styles): Initialize using disasm_options.
10589         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10590         set_arm_regname_option.
10591         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10592         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10593         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10594         set_gdbarch_verify_disassembler_options.
10595         * s390-tdep.c (s390_disassembler_options): New static variable.
10596         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10597         set_gdbarch_verify_disassembler_options.
10598
10599 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10600
10601         * remote.c (remote_add_target_side_condition): Remove "struct"
10602         keyword from range-based for loop.
10603
10604 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10605
10606         * remote.c (remote_add_target_side_condition): Use range-based
10607         for loop.  Update comment.
10608
10609 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10610
10611         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10612
10613 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10614
10615         * regcache.c (regcache_raw_update): New function.
10616         (regcache_raw_read): Move code to regcache_raw_update.
10617         * regcache.h (regcache_raw_update): New declaration.
10618         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10619
10620 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10621
10622         * dwarf2read.c (create_debug_type_hash_table): Initialize
10623         header.signature and header.type_offset_in_tu.
10624
10625 2017-02-24  Pedro Alves  <palves@redhat.com>
10626
10627         * symtab.c (make_file_symbol_completion_list_1): Use
10628         add_symtab_completions.
10629
10630 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10631
10632         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10633
10634 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10635
10636         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10637         I386_MAX_REGISTER_SIZE.
10638         (i386_pseudo_register_write): Likewise.
10639         (i386_process_record): Likewise.
10640         * i387-tdep.c (i387_supply_xsave): Likewise.
10641         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10642         (store_register): Likewise.
10643
10644 2017-02-23  Pedro Alves  <palves@redhat.com>
10645
10646         * ada-lang.c: Include "common/function-view.h".
10647         (ada_iterate_over_symbols): Adjust to use function_view as
10648         callback type.
10649         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10650         (ada_make_symbol_completion_list): Use a lambda.
10651         (ada_exc_search_name_matches): Delete.
10652         (name_matches_regex): New.
10653         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10654         * compile/compile-c-support.c: Include "common/function-view.h".
10655         (print_one_macro): Change prototype to accept a ui_file pointer.
10656         (write_macro_definitions): Use a lambda.
10657         * dwarf2read.c: Include "common/function-view.h".
10658         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10659         (dw2_expand_symtabs_matching): Adjust to use function_view as
10660         callback type.
10661         * language.h: Include "common/function-view.h".
10662         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10663         function_view as callback type.
10664         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10665         * linespec.c: Include "common/function-view.h".
10666         (collect_info::add_symbol): New method.
10667         (struct symbol_and_data_callback, iterate_inline_only, struct
10668         symbol_matcher_data, iterate_name_matcher): Delete.
10669         (iterate_over_all_matching_symtabs): Adjust to use function_view
10670         as callback type and lambdas.
10671         (iterate_over_file_blocks): Adjust to use function_view as
10672         callback type.
10673         (decode_compound_collector): Now a class with private fields.
10674         (decode_compound_collector::release_symbols): New method.
10675         (collect_one_symbol): Rename to...
10676         (decode_compound_collector::operator()): ... this and adjust.
10677         (lookup_prefix_sym): decode_compound_collector construction bits
10678         move to decode_compound_collector ctor.  Pass the
10679         decode_compound_collector object directly as callback.  Remove
10680         cleanups and use decode_compound_collector::release_symbols
10681         instead.
10682         (symtab_collector): Now a class with private fields.
10683         (symtab_collector::release_symtabs): New method.
10684         (add_symtabs_to_list): Rename to...
10685         (symtab_collector::operator()): ... this and adjust.
10686         (collect_symtabs_from_filename): symtab_collector construction
10687         bits move to symtab_collector ctor.  Pass the symtab_collector
10688         object directly as callback.  Remove cleanups and use
10689         symtab_collector::release_symtabs instead.
10690         (collect_symbols): Delete.
10691         (add_matching_symbols_to_info): Use lambdas.
10692         * macrocmd.c (print_macro_callback): Delete.
10693         (info_macro_command): Use a lambda.
10694         (info_macros_command): Pass print_macro_definition as callable
10695         directly.
10696         (print_one_macro): Remove 'ignore' parameter.
10697         (macro_list_command): Adjust.
10698         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10699         (macro_for_each_data::user_data): Delete field.
10700         (foreach_macro): Adjust to call the function_view.
10701         (macro_for_each): Adjust to use function_view as callback type.
10702         (foreach_macro_in_scope): Adjust to call the function_view.
10703         (macro_for_each_in_scope): Adjust to use function_view as callback
10704         type.
10705         * macrotab.h: Include "common/function-view.h".
10706         (macro_callback_fn): Declare a prototype instead of a pointer.
10707         Remove "user_data" parameter.
10708         (macro_for_each, macro_for_each_in_scope): Adjust to use
10709         function_view as callback type.
10710         * psymtab.c (partial_map_expand_apply)
10711         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10712         Adjust to use function_view as callback type and to return bool.
10713         (psym_expand_symtabs_matching): Adjust to use function_view as
10714         callback types.
10715         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10716         to use function_view as callback type and to return bool.
10717         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10718         callback types.
10719         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10720         as callback types.
10721         * symfile.h: Include "common/function-view.h".
10722         (expand_symtabs_file_matcher_ftype)
10723         (expand_symtabs_symbol_matcher_ftype)
10724         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10725         return bool.
10726         (quick_symbol_functions::map_symtabs_matching_filename)
10727         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10728         function_view as callback type and return bool.
10729         (expand_symtabs_matching): Adjust to use function_view as callback
10730         type.
10731         (maintenance_expand_name_matcher)
10732         (maintenance_expand_file_matcher): Delete.
10733         (maintenance_expand_symtabs): Use lambdas.
10734         * symtab.c (iterate_over_some_symtabs): Adjust to use
10735         function_view as callback types and return bool.
10736         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10737         of a cleanup.
10738         (lookup_symtab_callback): Delete.
10739         (lookup_symtab): Use a lambda.
10740         (iterate_over_symbols): Adjust to use function_view as callback
10741         type.
10742         (struct search_symbols_data, search_symbols_file_matches)
10743         (search_symbols_name_matches): Delete.
10744         (search_symbols): Use a pair of lambdas.
10745         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10746         (symtab_expansion_callback): Delete.
10747         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10748         * symtab.h: Include "common/function-view.h".
10749         (iterate_over_some_symtabs): Adjust to use function_view as
10750         callback type and return bool.
10751         (iterate_over_symtabs): Adjust to use function_view as callback
10752         type.
10753         (symbol_found_callback_ftype): Remove 'data' parameter and return
10754         bool.
10755         (iterate_over_symbols): Adjust to use function_view as callback
10756         type.
10757
10758 2017-02-23  Pedro Alves  <palves@redhat.com>
10759
10760         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10761         (%.o) <unittests/%.c>: New pattern.
10762         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10763         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10764         * common/function-view.h: New file.
10765         * unittests/function-view-selftests.c: New file.
10766         * configure: Regenerate.
10767
10768 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10769
10770         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10771         inferior_ptid.
10772         * go32-nat.c (go32_thread_alive): Likewise.
10773
10774 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10775
10776         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10777         delete.
10778
10779 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10780
10781         * varobj.c (varobj_clear_saved_item): Use delete instead of
10782         xfree.
10783         (update_dynamic_varobj_children): Likewise.
10784
10785 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10786
10787         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10788
10789 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10790
10791         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10792         m_enum_value to 0 in default constructor.
10793
10794 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10795
10796         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10797         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10798         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10799         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10800         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10801         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10802         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10803         IS_STORE_CONDITIONAL_INSN.
10804
10805 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10806
10807         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10808
10809 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10810
10811         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10812
10813 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10814
10815         * dwarf2read.c (skip_one_die, read_attribute_value)
10816         (dwarf2_const_value_attr, dump_die_shallow)
10817         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10818         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10819
10820 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10821
10822         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10823         (dwarf_parse_macro_header): Accept DWARF version 5.
10824         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10825
10826 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10827
10828         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10829         DW_AT_GNU_*.
10830         * common/common-exceptions.h (enum errors): Likewise.
10831         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10832         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10833         (dwarf_expr_context::execute_stack_op): Likewise.
10834         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10835         Likewise.
10836         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10837         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10838         (show_entry_values_debug, call_site_to_target_addr)
10839         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10840         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10841         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10842         (value_of_dwarf_block_entry, indirect_pieced_value)
10843         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10844         (disassemble_dwarf_expression): Likewise.
10845         * dwarf2read.c (process_die, inherit_abstract_dies)
10846         (read_call_site_scope): Likewise.
10847         * gdbtypes.h (struct func_type, struct call_site_parameter)
10848         (struct call_site): Likewise.
10849         * stack.c (read_frame_arg): Likewise.
10850         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10851
10852 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10853
10854         * defs.h (read_unsigned_leb128): New declaration.
10855         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10856         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10857         (dwarf2_find_location_expression): Call also
10858         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10859         * dwarf2loc.h (dwarf2_version): New declaration.
10860         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10861         rnglists.
10862         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10863         .debug_rnglists.
10864         (struct dwop_section_names): Add loclists_dwo.
10865         (dwop_section_names): Add .debug_loclists.dwo.
10866         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10867         (struct dwarf2_per_cu_data): Add dwarf_version.
10868         (struct dwo_sections): Add loclists.
10869         (struct attr_abbrev): Add implicit_const.
10870         (read_indirect_line_string): New declaration.
10871         (read_unsigned_leb128): Delete declaration.
10872         (rcuh_kind): New definition.
10873         (read_and_check_comp_unit_head): Change parameter
10874         is_debug_types_section to section_kind.
10875         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10876         (read_comp_unit_head): Change parameter abfd to section, add parameter
10877         section_kind.  Handle DWARF-5.
10878         (error_check_comp_unit_head): Accept also DWARF version 5.
10879         (read_and_check_comp_unit_head): Change parameter
10880         is_debug_types_section to section_kind.
10881         (read_and_check_type_unit_head): Delete function.
10882         (read_abbrev_offset): Handle DWARF-5.
10883         (create_debug_type_hash_table): Add parameter section_kind.  Process
10884         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10885         comp_unit_head.
10886         (create_debug_types_hash_table): Update create_debug_type_hash_table
10887         caller.
10888         (create_all_type_units): Call create_debug_type_hash_table.
10889         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10890         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10891         caller.
10892         (skip_one_die): Handle DW_FORM_implicit_const.
10893         (dwarf2_rnglists_process): New function.
10894         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10895         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10896         (read_attribute_value): Handle DW_FORM_implicit_const,
10897         DW_FORM_line_strp.
10898         (read_attribute): Handle DW_FORM_implicit_const.
10899         (read_indirect_string_at_offset_from): New function from
10900         read_indirect_string_at_offset.
10901         (read_indirect_string_at_offset): Call
10902         read_indirect_string_at_offset_from.
10903         (read_indirect_line_string_at_offset): New function.
10904         (read_indirect_string): New function comment.
10905         (read_indirect_line_string): New function.
10906         (read_unsigned_leb128): Make it global.
10907         (dwarf2_string_attr): Handle DWARF-5.
10908         (add_include_dir_stub, read_formatted_entries): New functions.
10909         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10910         Handle DWARF-5.
10911         (per_cu_header_read_in): Update read_comp_unit_head caller.
10912         (dwarf2_version): New function.
10913         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10914         rnglists.
10915         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10916         fields.
10917
10918 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10919
10920         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10921
10922 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10923
10924         * dwarf2read.c (dwarf2_ranges_process): New function from
10925         dwarf2_ranges_read.
10926         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10927         dwarf2_ranges_process.
10928
10929 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10930
10931         * dwarf2read.c (create_debug_type_hash_table): New function from
10932         create_debug_types_hash_table.
10933         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10934         (create_all_type_units, open_and_init_dwo_file): Update
10935         create_debug_types_hash_table callers.
10936
10937 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10938
10939         PR gdb/16188
10940         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10941         refer to 'ap', not 'args'.
10942
10943 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10944             Pedro Alves  <palves@redhat.com>
10945
10946         PR gdb/16188
10947         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10948         calls succeeded.
10949         * fork-child.c (trace_start_error): New function.
10950         (trace_start_error_with_name): Likewise.
10951         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10952         * inf-ptrace.c (inf_ptrace_me): Likewise.
10953         * inferior.h (trace_start_error): New prototype.
10954         (trace_start_error_with_name): Likewise.
10955
10956 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10957
10958         PR gdb/21164
10959         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10960         NULL before using it.
10961         * symmisc.c (maintenance_print_symbols): Likewise.
10962         (maintenance_print_msymbols): Likewise.
10963
10964 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10965
10966         * NEWS: Add record Python bindings entry.
10967
10968 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10969
10970         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10971         py-record-full.o.
10972         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10973         * python/py-record-btrace.c, python/py-record-btrace.h,
10974         python/py-record-full.c, python/py-record-full.h: New file.
10975         * python/py-record.c: Add include for py-record-btrace.h and
10976         py-record-full.h.
10977         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10978         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10979         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10980         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10981         New definition.
10982         (gdbpy_initialize_btrace): New export.
10983         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10984
10985 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10986
10987         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10988         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10989         * python/py-record.c: New file.
10990         * python/python-internal.h (gdbpy_start_recording,
10991         gdbpy_current_recording, gdpy_stop_recording,
10992         gdbpy_initialize_record): New export.
10993         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10994         (python_GdbMethods): Add gdbpy_start_recording,
10995         gdbpy_current_recording and gdbpy_stop_recording.
10996
10997 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10998
10999         * record-btrace.c (record_btrace_record_method): New function.
11000         (init_record_btrace_ops): Initialize to_record_method.
11001         * record-full.c (record_full_record_method): New function.
11002         (init_record_full_ops, init_record_full_core_ops): Add
11003         record_full_record_method.
11004         * record.h (enum record_method): New enum.
11005         * target-debug.h (target_debug_print_enum_record_method: New define.
11006         * target-delegates.c: Regenerate.
11007         * target.c (target_record_method): New function.
11008         * target.h: Include record.h.
11009         (struct target_ops) <to_record_method>: New field.
11010         (target_record_method): New export.
11011
11012 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11013
11014         * record.h (record_start, record_stop): New export.
11015         * record.c (record_start, record_stop): New function.
11016
11017 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11018
11019         * btrace.c (btrace_fetch): Copy function call segments pointer
11020         into a vector.
11021         (btrace_clear): Clear the vector.
11022         (btrace_find_insn_by_number): Use binary search to find the correct
11023         function call segment.
11024         * btrace.h (brace_fun_p): New typedef.
11025         (struct btrace_thread_info) <functions>: New field.
11026
11027 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11028
11029         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11030         * btrace.c (btrace_decode_error): ... here.  New function.
11031         * btrace.h (btrace_decode_error): New export.
11032
11033 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11034
11035         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11036         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11037         btrace_find_insn_by_number): Remove special case for gaps.
11038         * btrace.h (btrace_insn_get_error): New export.
11039         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11040         * record-btrace.c (btrace_insn_history): Print number for gaps.
11041         (record_btrace_info, record_btrace_goto): Handle gaps.
11042
11043 2017-02-14  Tom Tromey  <tom@tromey.com>
11044
11045         PR python/13598:
11046         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11047         event.
11048         * python/py-evts.c (gdbpy_initialize_py_events): Add
11049         before_prompt registry.
11050         * python/py-events.h (events_object) <before_prompt>: New field.
11051
11052 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11053
11054         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11055
11056 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11057
11058         * symfile (_initialize_symfile): Add usage text to the load command's
11059         help text.
11060
11061 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11062
11063         * utils.c (defaulted_query): Don't query on secondary UIs.
11064
11065 2017-02-10  Tom Tromey  <tom@tromey.com>
11066
11067         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11068
11069 2017-02-10  Tom Tromey  <tom@tromey.com>
11070
11071         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11072         "cleanup" local.
11073         * python/py-type.c (typy_legacy_template_argument): Remove
11074         unnecessary "cleanup" local.
11075
11076 2017-02-10  Tom Tromey  <tom@tromey.com>
11077
11078         * python/python.c (do_start_initialization): New function, from
11079         _initialize_python.
11080         (_initialize_python): Call do_start_initialization.
11081         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11082         goto.
11083
11084 2017-02-10  Tom Tromey  <tom@tromey.com>
11085
11086         * python/py-prettyprint.c (pretty_print_one_value): Use
11087         gdbpy_ref.
11088
11089 2017-02-10  Tom Tromey  <tom@tromey.com>
11090
11091         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11092         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11093         gdbpy_ref.
11094         * python/py-type.c (field_new): Use gdbpy_ref.
11095         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11096         gdbpy_ref.
11097         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11098         (py_free_pspace): Likewise.
11099         (pspace_to_pspace_object): Likewise.
11100         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11101         (py_free_objfile): Likewise.
11102         (objfile_to_objfile_object): Likewise.
11103         * python/py-inferior.c (delete_thread_object): Use
11104         gdbpy_ref.
11105         (infpy_read_memory): Likewise.
11106         (py_free_inferior): Likewise.
11107         * python/py-evtregistry.c (create_eventregistry_object): Use
11108         gdbpy_ref.
11109         * python/py-event.c (create_event_object): Use gdbpy_ref.
11110
11111 2017-02-10  Tom Tromey  <tom@tromey.com>
11112
11113         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11114         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11115         used.
11116         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11117         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11118         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11119         python/py-framefilter.c, python/py-function.c,
11120         python/py-inferior.c, python/py-infevents.c,
11121         python/py-linetable.c, python/py-newobjfileevent.c,
11122         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11123         python/py-signalevent.c, python/py-stopevent.c,
11124         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11125         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11126         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11127         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11128
11129 2017-02-10  Tom Tromey  <tom@tromey.com>
11130
11131         * ui-out.h (ui_out_emit_type): New class.
11132         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11133         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11134         and ui_out_emit_tuple.
11135         (enumerate_locals): Likewise.
11136         (py_mi_print_variables, py_print_locals, py_print_args): Use
11137         ui_out_emit_list.
11138         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11139         ui_out_emit_list.
11140         * common/gdb_optional.h: New file.
11141
11142 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11143
11144         * MAINTAINERS (Write After Approval): Update my e-mail address.
11145
11146 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11147
11148         PR gdb/21122
11149         * breakpoint.c (_initialize_breakpoint): Update the help description
11150         of the 'commands' command to indicate that it takes a list argument.
11151
11152 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11153
11154         * interps.c (current_interp_set_logging): Remove "return".
11155
11156 2017-02-09  Gary Benson  <gbenson@redhat.com>
11157
11158         * symtab.c (add_symtab_completions): Prevent NULL pointer
11159         dereference.
11160
11161 2017-02-08  Pedro Alves  <palves@redhat.com>
11162
11163         * interps.c (interp::interp): Remove reference to quiet_p.
11164         (interp_set): Make static.  Remove dead "Switching to" output
11165         code.
11166         (interp_quiet_p, interp_set_quiet): Delete.
11167         (interpreter_exec_cmd): Don't set the interpreter quiet.
11168         * interps.h (interp_quiet_p): Make static.
11169         (class interp) <quiet_p>: Remove field
11170
11171 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11172
11173         * cli/cli-decode.c (find_command_name_length): Make it extern.
11174         * cli/cli-decode.h (find_command_name_length): Declare.
11175         * cli/cli-script.c (command_name_equals, line_first_arg):
11176         New functions.
11177         (process_next_line): Use cli-decode to parse command names.
11178         (build_command_line): Make args a constant pointer.
11179
11180 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11181
11182         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11183         Remove case-insensitive search.
11184
11185 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11186
11187         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11188         at the end of the line.  Avoids an ARI warning.
11189
11190 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11191
11192         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11193         rdseed instructions.
11194         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11195
11196 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11197
11198         PR tdep/20936
11199         Provide and use sparc32 and sparc64 target description XML files.
11200         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11201         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11202         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11203         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11204         * features/sparc/sparc32-solaris.xml: New file.
11205         * features/sparc/sparc64-solaris.xml: New file.
11206         * features/sparc/sparc32-solaris.c: Generated.
11207         * features/sparc/sparc64-solaris.c: Generated.
11208         * sparc-tdep.h: Account for differences in target descriptions.
11209         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11210         (sparc32_register_type): Use target provided registers.
11211         (validate_tdesc_registers): New function.
11212         (sparc32_gdbarch_init): Use tdesc_has_registers.
11213         Set pseudoregister functions.
11214         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11215         (sparc64_register_type): Use target provided registers.
11216         (sparc64_init_abi): Set pseudoregister functions.
11217
11218 2017-02-03  Tom Tromey  <tom@tromey.com>
11219
11220         PR rust/21097:
11221         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11222         with a single member.
11223
11224 2017-02-03  Pedro Alves  <palves@redhat.com>
11225
11226         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11227         (cli_interp_base::~cli_interp_base): New.
11228         (cli_interp): New struct.
11229         (as_cli_interp): Cast the interp itself to cli_interp.
11230         (cli_interpreter_pre_command_loop): Rename to ...
11231         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11232         parameter.
11233         (cli_interpreter_init): Rename to ...
11234         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11235         boolean.  Make extern.
11236         (cli_interpreter_resume): Rename to ...
11237         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11238         extern.
11239         (cli_interpreter_suspend): Rename to ...
11240         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11241         extern.
11242         (cli_interpreter_exec): Rename to ...
11243         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11244         extern.
11245         (cli_interpreter_supports_command_editing): Rename to ...
11246         (cli_interp_base::supports_command_editing): ... this.  Remove
11247         'interp' parameter.  Make extern.
11248         (cli_ui_out): Rename to ...
11249         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11250         Make extern.
11251         (cli_set_logging): Rename to ...
11252         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11253         parameter.  Make extern.
11254         (cli_interp_procs): Delete.
11255         (cli_interp_factory): Adjust to use "new".
11256         * cli/cli-interp.h: Include "interps.h".
11257         (struct cli_interp_base): New struct.
11258         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11259         (interp_new): Delete.
11260         (interp::interp, interp::~interp): New.
11261         (interp_set): Use bool, and return void.  Assume the interpreter
11262         has suspend, init and resume methods, and that the all return
11263         void.
11264         (set_top_level_interpreter): interp_set returns void.
11265         (interp_ui_out): Adapt.
11266         (current_interp_set_logging): Adapt.
11267         (interp_data): Delete.
11268         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11269         (interp_exec): Adapt.
11270         (top_level_interpreter_data): Delete.
11271         * interps.h (interp_init_ftype, interp_resume_ftype)
11272         (interp_suspend_ftype, interp_exec_ftype)
11273         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11274         (class interp): New.
11275         (interp_new): Delete.
11276         (interp_set): Now returns void.  Use bool.
11277         (interp_data, top_level_interpreter_data): Delete.
11278         * mi/mi-common.h: Include interps.h.
11279         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11280         init, resume, suspect, exec, interp_ui_out, set_logging and
11281         pre_command_loop methods.
11282         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11283         (mi_interpreter_init): Rename to ...
11284         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11285         bool, return void and make extern.  Adjust.
11286         (mi_interpreter_resume): ... Rename to ...
11287         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11288         return void and make extern.  Adjust.
11289         (mi_interpreter_suspend): ... Rename to ...
11290         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11291         return void and make extern.  Adjust.
11292         (mi_interpreter_exec): ... Rename to ...
11293         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11294         extern.  Adjust.
11295         (mi_interpreter_pre_command_loop): ... Rename to ...
11296         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11297         parameter and make extern.
11298         (mi_on_normal_stop_1): Adjust.
11299         (mi_ui_out): Rename to ...
11300         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11301         parameter and make extern.  Adjust.
11302         (mi_set_logging): Rename to ...
11303         (mi_interp::set_logging): ... this.  Remove the 'interp'
11304         parameter and make extern.  Adjust.
11305         (mi_interp_procs): Delete.
11306         (mi_interp_factory): Adjust to use 'new'.
11307         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11308         (mi_print_exception, mi_execute_command, mi_load_progress):
11309         Adjust.
11310         * tui/tui-interp.c (tui_interp): New class.
11311         (as_tui_interp): Return a tui_interp pointer.
11312         (tui_on_normal_stop, tui_on_signal_received)
11313         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11314         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11315         to use interp::interp_ui_out.
11316         (tui_init): Rename to ...
11317         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11318         bool, return void and make extern.  Adjust.
11319         (tui_resume): Rename to ...
11320         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11321         return void and make extern.  Adjust.
11322         (tui_suspend): Rename to ...
11323         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11324         return void and make extern.  Adjust.
11325         (tui_ui_out): Rename to ...
11326         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11327         parameter, and make extern.  Adjust.
11328         (tui_exec): Rename to ...
11329         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11330         make extern.
11331         (tui_interp_procs): Delete.
11332         (tui_interp_factory): Use "new".
11333
11334 2017-02-02  Tom Tromey  <tom@tromey.com>
11335
11336         * rust-exp.y (ends_raw_string, space_then_number)
11337         (rust_identifier_start_p): Return bool.
11338         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11339         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11340         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11341         (rust_chartype_p): Return bool.
11342         (val_print_struct, rust_print_struct_def, rust_print_type):
11343         Update.
11344         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11345         Return bool.
11346
11347 2017-02-02  Tom Tromey  <tom@tromey.com>
11348
11349         * rust-lang.c: Reindent.
11350
11351 2017-02-02  Tom Tromey  <tom@tromey.com>
11352
11353         * rust-lang.h (rust_crate_for_block): Update.
11354         * rust-lang.c (rust_crate_for_block): Return std::string.
11355         (rust_get_disr_info): Use std:;string, not
11356         gdb::unique_xmalloc_ptr.
11357         * rust-exp.y (crate_name): Update.
11358
11359 2017-02-02  Pedro Alves  <palves@redhat.com>
11360
11361         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11362         field out of gdb_disassembler_test and make it static.
11363
11364 2017-02-02  Pedro Alves  <palves@redhat.com>
11365
11366         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11367         mi1_interp and mi_interp fields.
11368
11369 2017-02-02  Pedro Alves  <palves@redhat.com>
11370
11371         * cli/cli-interp.c (struct saved_output_files, saved_output):
11372         Moved from cli/cli-logging.c.
11373         (cli_set_logging): New function.
11374         (cli_interp_procs): Install cli_set_logging.
11375         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11376         Declare.
11377         * cli/cli-logging.c (struct saved_output_files, saved_output):
11378         Moved to cli/cli-interp.c.
11379         (pop_output_files): Don't save outputs here.
11380         (make_logging_output): New function.
11381         (handle_redirections): Don't build tee nor save previous outputs
11382         here.
11383         * interps.c (current_interp_set_logging): Change prototype.
11384         Assume there's always a set_logging_proc method installed.
11385         * interps.h (interp_set_logging_ftype): Change prototype.
11386         (current_interp_set_logging): Change prototype and adjust comment.
11387         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11388         use make_logging_output.
11389         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11390 2017-02-02  Pedro Alves  <palves@redhat.com>
11391
11392         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11393         from ...
11394         (set_logging_overwrite): ... here.
11395         (logging_no_redirect_file): Delete.
11396         (set_logging_redirect): Don't handle redirection on the fly.
11397         Instead warn that "logging off" / "logging on" is necessary.
11398         (pop_output_files): Delete references to logging_no_redirect_file.
11399         (show_logging_command): Always speak in terms of what will happen
11400         once logging is reenabled.
11401
11402 2017-02-02  Pedro Alves  <palves@redhat.com>
11403
11404         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11405
11406 2017-02-02  Pedro Alves  <palves@redhat.com>
11407
11408         * disasm.c (gdb_pretty_print_insn): Rename to ...
11409         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11410         Remove gdbarch parameter.  Adapt to clear the object's buffers
11411         instead of allocating new buffers, and to print using the object's
11412         gdb_disassembler instead of calling gdb_print_insn.
11413         (dump_insns): Use gdb_pretty_print_disassembler.
11414         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11415         (gdb_pretty_print_disassembler): New class.
11416         * record-btrace.c (btrace_insn_history): Use
11417         gdb_pretty_print_disassembler.
11418
11419 2017-02-02  Pedro Alves  <palves@redhat.com>
11420
11421         * ada-lang.c (type_as_string): Use string_file.
11422         * ada-valprint.c (ada_print_floating): Use string_file.
11423         * ada-varobj.c (ada_varobj_scalar_image)
11424         (ada_varobj_get_value_image): Use string_file.
11425         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11426         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11427         * breakpoint.c (update_inserted_breakpoint_locations)
11428         (insert_breakpoint_locations, reattach_breakpoints)
11429         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11430         (print_it_watchpoint): Use string_file.
11431         (save_breakpoints): Use stdio_file.
11432         * c-exp.y (oper): Use string_file.
11433         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11434         tee_file.
11435         (pop_output_files): Use delete.
11436         (handle_redirections): Use stdio_file and tee_file.
11437         * cli/cli-setshow.c (do_show_command): Use string_file.
11438         * compile/compile-c-support.c (c_compute_program): Use
11439         string_file.
11440         * compile/compile-c-symbols.c (generate_vla_size): Take a
11441         'string_file &' instead of a 'ui_file *'.
11442         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11443         of a 'ui_file *'.  Use string_file.
11444         (generate_c_for_variable_locations): Take a 'string_file &'
11445         instead of a 'ui_file *'.
11446         * compile/compile-internal.h (generate_c_for_for_one_variable):
11447         Take a 'string_file &' instead of a 'ui_file *'.
11448         * compile/compile-loc2c.c (push, pushf, unary, binary)
11449         (print_label, pushf_register_address, pushf_register)
11450         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11451         'ui_file *'.  Adjust.
11452         * compile/compile.c (compile_to_object): Use string_file.
11453         * compile/compile.h (compile_dwarf_expr_to_c)
11454         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11455         'ui_file *'.
11456         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11457         (replace_typedefs_qualified_name): Use string_file and
11458         obstack_copy0.
11459         * disasm.c (gdb_pretty_print_insn): Use string_file.
11460         (gdb_disassembly): Adjust reference the null_stream global.
11461         (do_ui_file_delete): Delete.
11462         (gdb_insn_length): Use null_stream.
11463         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11464         * dwarf2loc.c (dwarf2_compile_property_to_c)
11465         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11466         'string_file &' instead of a 'ui_file *'.
11467         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11468         * dwarf2read.c (do_ui_file_peek_last): Delete.
11469         (dwarf2_compute_name): Use string_file.
11470         * event-top.c (gdb_setup_readline): Use stdio_file.
11471         * gdbarch.sh (verify_gdbarch): Use string_file.
11472         * gdbtypes.c (safe_parse_type): Use null_stream.
11473         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11474         string_file.
11475         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11476         'string_file *' instead of a 'ui_file *'.
11477         (gdbscm_arch_disassemble): Use string_file.
11478         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11479         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11480         inherits from ui_file.
11481         (ioscm_file_port_delete, ioscm_file_port_rewind)
11482         (ioscm_file_port_put): Delete.
11483         (ioscm_file_port_write): Rename to ...
11484         (ioscm_file_port::write): ... this.  Remove file_port_magic
11485         checks.
11486         (ioscm_file_port_new): Delete.
11487         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11488         ui_file_up.
11489         * guile/scm-type.c (tyscm_type_name): Use string_file.
11490         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11491         Use string_file.
11492         * infcmd.c (print_return_value_1): Use string_file.
11493         * infrun.c (print_target_wait_results): Use string_file.
11494         * language.c (add_language): Use string_file.
11495         * location.c (explicit_to_string_internal): Use string_file.
11496         * main.c (captured_main_1): Use null_file.
11497         * maint.c (maintenance_print_architecture): Use stdio_file.
11498         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11499         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11500         event_channel>: Change type to mi_console_file pointer.
11501         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11502         (mi_console_file_delete): Delete.
11503         (struct mi_console_file): Delete.
11504         (mi_console_file_magic): Delete.
11505         (mi_console_file_new): Delete.
11506         (mi_console_file::mi_console_file): New.
11507         (mi_console_file_delete): Delete.
11508         (mi_console_file_fputs): Delete.
11509         (mi_console_file::write): New.
11510         (mi_console_raw_packet): Delete.
11511         (mi_console_file::flush): New.
11512         (mi_console_file_flush): Delete.
11513         (mi_console_set_raw): Rename to ...
11514         (mi_console_file::set_raw): ... this.
11515         * mi/mi-console.h (class mi_console_file): New class.
11516         (mi_console_file_new, mi_console_set_raw): Delete.
11517         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11518         (mi_set_logging): Use delete and tee_file.  Adjust.
11519         * mi/mi-main.c (output_register): Use string_file.
11520         (mi_cmd_data_evaluate_expression): Use string_file.
11521         (mi_cmd_data_read_memory): Use string_file.
11522         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11523         * mi/mi-out.c (mi_ui_out::main_stream): New.
11524         (mi_ui_out::rewind): Use main_stream and
11525         string_file.
11526         (mi_ui_out::put): Use main_stream and string_file.
11527         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11528         Allocate a 'string_file' instead.
11529         (mi_out_new): Don't allocate a mem_fileopen stream here.
11530         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11531         (mi_ui_out::main_stream): Declare method.
11532         * printcmd.c (eval_command): Use string_file.
11533         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11534         * python/py-arch.c (archpy_disassemble): Use string_file.
11535         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11536         * python/py-frame.c (frapy_str): Use string_file.
11537         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11538         Use string_file.
11539         * python/py-type.c (typy_str): Use string_file.
11540         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11541         * python/py-value.c (valpy_str): Use string_file.
11542         * record-btrace.c (btrace_insn_history): Use string_file.
11543         * regcache.c (regcache_print): Use stdio_file.
11544         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11545         * remote.c (escape_buffer): Use string_file.
11546         * rust-lang.c (rust_get_disr_info): Use string_file.
11547         * serial.c (serial_open_ops_1): Use stdio_file.
11548         (do_serial_close): Use delete.
11549         * stack.c (print_frame_arg): Use string_file.
11550         (print_frame_args): Remove local mem_fileopen stream, not used.
11551         (print_frame): Use string_file.
11552         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11553         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11554         Take a 'string_file *' instead of a 'ui_file *'.
11555         * top.c (new_ui): Use stdio_file and stderr_file.
11556         (free_ui): Use delete.
11557         (execute_command_to_string): Use string_file.
11558         (quit_confirm): Use string_file.
11559         * tracepoint.c (collection_list::append_exp): Use string_file.
11560         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11561         * tui/tui-file.c: Don't include "ui-file.h".
11562         (enum streamtype, struct tui_stream): Delete.
11563         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11564         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11565         (tui_file::tui_file): New method.
11566         (tui_file_fputs): Delete.
11567         (tui_file_get_strbuf): Delete.
11568         (tui_file::puts): New method.
11569         (tui_file_adjust_strbuf): Delete.
11570         (tui_file_flush): Delete.
11571         (tui_file::flush): New method.
11572         * tui/tui-file.h: Tweak intro comment.
11573         Include ui-file.h.
11574         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11575         (tui_file_adjust_strbuf): Delete declarations.
11576         (class tui_file): New class.
11577         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11578         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11579         (tui_register_format): Use string_stream.
11580         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11581         (tui_get_function_from_frame): Use string_file.
11582         * typeprint.c (type_to_string): Use string_file.
11583         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11584         (null_stream): New global.
11585         (ui_file_delete): Delete.
11586         (ui_file::ui_file): New.
11587         (null_file_isatty): Delete.
11588         (ui_file::~ui_file): New.
11589         (null_file_rewind): Delete.
11590         (ui_file::printf): New.
11591         (null_file_put): Delete.
11592         (null_file_flush): Delete.
11593         (ui_file::putstr): New.
11594         (null_file_write): Delete.
11595         (ui_file::putstrn): New.
11596         (null_file_read): Delete.
11597         (ui_file::putc): New.
11598         (null_file_fputs): Delete.
11599         (null_file_write_async_safe): Delete.
11600         (ui_file::vprintf): New.
11601         (null_file_delete): Delete.
11602         (null_file::write): New.
11603         (null_file_fseek): Delete.
11604         (null_file::puts): New.
11605         (ui_file_data): Delete.
11606         (null_file::write_async_safe): New.
11607         (gdb_flush, ui_file_isatty): Adjust.
11608         (ui_file_put, ui_file_rewind): Delete.
11609         (ui_file_write): Adjust.
11610         (ui_file_write_for_put): Delete.
11611         (ui_file_write_async_safe, ui_file_read): Adjust.
11612         (ui_file_fseek): Delete.
11613         (fputs_unfiltered): Adjust.
11614         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11615         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11616         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11617         (set_ui_file_data): Delete.
11618         (string_file::~string_file, string_file::write)
11619         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11620         (do_ui_file_as_string, ui_file_as_string): Delete.
11621         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11622         (struct mem_file): Delete.
11623         (mem_file_new): Delete.
11624         (stdio_file::stdio_file): New.
11625         (mem_file_delete): Delete.
11626         (stdio_file::stdio_file): New.
11627         (mem_fileopen): Delete.
11628         (stdio_file::~stdio_file): New.
11629         (mem_file_rewind): Delete.
11630         (stdio_file::set_stream): New.
11631         (mem_file_put): Delete.
11632         (stdio_file::open): New.
11633         (mem_file_write): Delete.
11634         (stdio_file_magic, struct stdio_file): Delete.
11635         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11636         (stdio_file::flush): New.
11637         (stdio_file_read): Rename to ...
11638         (stdio_file::read): ... this.  Adjust.
11639         (stdio_file_write): Rename to ...
11640         (stdio_file::write): ... this.  Adjust.
11641         (stdio_file_write_async_safe): Rename to ...
11642         (stdio_file::write_async_safe) ... this.  Adjust.
11643         (stdio_file_fputs): Rename to ...
11644         (stdio_file::puts) ... this.  Adjust.
11645         (stdio_file_isatty): Delete.
11646         (stdio_file_fseek): Delete.
11647         (stdio_file::isatty): New.
11648         (stderr_file_write): Rename to ...
11649         (stderr_file::write) ... this.  Adjust.
11650         (stderr_file_fputs): Rename to ...
11651         (stderr_file::puts) ... this.  Adjust.
11652         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11653         (stderr_file::stderr_file): New.
11654         (tee_file_magic): Delete.
11655         (struct tee_file): Delete.
11656         (tee_file::tee_file): New.
11657         (tee_file_new): Delete.
11658         (tee_file::~tee_file): New.
11659         (tee_file_delete): Delete.
11660         (tee_file_flush): Rename to ...
11661         (tee_file::flush): ... this.  Adjust.
11662         (tee_file_write): Rename to ...
11663         (tee_file::write): ... this.  Adjust.
11664         (tee_file::write_async_safe): New.
11665         (tee_file_fputs): Rename to ...
11666         (tee_file::puts): ... this.  Adjust.
11667         (tee_file_isatty): Rename to ...
11668         (tee_file::isatty): ... this.  Adjust.
11669         * ui-file.h (struct obstack, struct ui_file): Don't
11670         forward-declare.
11671         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11672         (ui_file_write_ftype)
11673         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11674         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11675         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11676         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11677         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11678         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11679         (set_ui_file_fseek): Delete.
11680         (ui_file_data, ui_file_delete, ui_file_rewind)
11681         (struct ui_file): New.
11682         (ui_file_up): New.
11683         (class null_file): New.
11684         (null_stream): Declare.
11685         (ui_file_write_for_put, ui_file_put): Delete.
11686         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11687         Delete.
11688         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11689         (gdb_fopen, tee_file_new): Delete.
11690         (struct string_file): New.
11691         (struct stdio_file): New.
11692         (stdio_file_up): New.
11693         (struct stderr_file): New.
11694         (class tee_file): New.
11695         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11696         of a 'ui_file *'.  Adjust.
11697         * ui-out.h (class ui_out) <field_stream>: Likewise.
11698         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11699         (null_stream): Delete.
11700         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11701         Adjust.
11702         * utils.h (struct ui_file): Delete forward declaration..
11703         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11704         (error_stream): Take a 'string_file &' instead of a
11705         'ui_file *'.
11706         * varobj.c (varobj_value_get_print_value): Use string_file.
11707         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11708         * gdbarch.c: Regenerate.
11709
11710 2017-02-02  Pedro Alves  <palves@redhat.com>
11711
11712         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11713         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11714         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11715         Adjust to call gdb_print_insn instead of
11716         gdb_disassembler::print_insn.
11717         (dump_insns, do_mixed_source_and_assembly_deprecated)
11718         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11719         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11720         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11721         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11722         declaration.
11723         (gdb_pretty_print_insn): Re-add declaration.
11724         * record-btrace.c (btrace_insn_history): Don't allocate a
11725         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11726
11727 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11728
11729         * disasm.h (gdb_disassembly): Remove file_string parameter.
11730         * disasm.c (gdb_disassembly): Likewise.
11731         * cli/cli-cmds.c (print_disassembly): Adapt.
11732         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11733         * stack.c (do_gdb_disassembly): Likewise.
11734
11735 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11736
11737         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11738         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11739         targets.  And if the implicit value is longer than needed, extract
11740         the first bytes instead of the "least significant" ones.
11741
11742 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11743
11744         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11745         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11746         (btrace_fetch): Assert can_access_registers_ptid.
11747         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11748         validate_registers_access.
11749
11750 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11751
11752         * gdbthread.h (can_access_registers_ptid): New.
11753         * thread.c (can_access_registers_ptid): New.
11754
11755 2017-02-01  Pedro Alves  <palves@redhat.com>
11756
11757         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11758
11759 2017-01-31  Pedro Alves  <palves@redhat.com>
11760
11761         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11762         Fix typos.
11763
11764 2017-01-31  Pedro Alves  <palves@redhat.com>
11765
11766         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11767         not used.
11768
11769 2017-01-31  Pedro Alves  <palves@redhat.com>
11770
11771         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11772
11773 2017-01-31  Pedro Alves  <palves@redhat.com>
11774
11775         * common/scoped_restore.h
11776         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11777         change the value's parameter type to T2.
11778         (make_scoped_restore): Likewise.
11779
11780 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11781             Richard Henderson  <rth@redhat.com>
11782
11783         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11784         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11785         GS_BASE for older kernels.
11786         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11787         GS_BASE for older kernels.
11788         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11789         and GS_BASE to the offset table.
11790         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11791         system register group.
11792         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11793         for older kernels.
11794         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11795         amd64 ABI.
11796         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11797         AMD64_GSBASE_REGNUM.
11798         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11799         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11800         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11801         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11802         i386/64bit-segments.xml in those rules.
11803         * features/i386/64bit-segments.xml: New file.
11804         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11805         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11806         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11807         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11808         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11809         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11810         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11811         * features/i386/amd64-avx-linux.c: Regenerated.
11812         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11813         * features/i386/amd64-avx-mpx.c: Regenerated.
11814         * features/i386/amd64-avx512-linux.c: Regenerated.
11815         * features/i386/amd64-linux.c: Regenerated.
11816         * features/i386/amd64-mpx-linux.c: Regenerated.
11817         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11818         * features/i386/i386-avx-mpx.c: Regenerated.
11819         * features/i386/x32-avx-linux.c: Regenerated.
11820         * features/i386/x32-avx512-linux.c: Regenerated.
11821         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11822         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11823         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11824         * regformats/i386/amd64-linux.dat: Regenerated.
11825         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11826         * regformats/i386/x32-avx-linux.dat: Regenerated.
11827         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11828         * regformats/i386/x32-linux.dat: Regenerated.
11829
11830 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11831
11832         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11833         Set to AMD64_NUM_REGS.
11834
11835 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11836
11837         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11838         that checks validity of a register number.
11839
11840 2017-01-27  Kees Cook  <keescook@google.com>
11841
11842         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11843         fetch_fpregs if target has fpa registers.
11844         (arm_linux_store_inferior_registers): Call store_fpregs if target
11845         has fpa registers.
11846
11847 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11848
11849         * cris-tdep.c (cris_gdbarch_init): Remove check for
11850         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11851
11852 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11853
11854         * corelow.c (get_core_register_section): Check for regset
11855         existence before checking for REGSET_VARIABLE_SIZE.
11856
11857 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11858             Pedro Alves  <palves@redhat.com>
11859
11860         PR gdb/20939
11861         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11862         call memory_error, save memaddr instead.
11863         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11864         negative, cal memory_error.
11865         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11866
11867 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11868
11869         * disasm-selftests.c (memory_error_test): New function.
11870         (_initialize_disasm_selftests): Register memory_error_test.
11871
11872 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11873
11874         * Makefile.in (SFILES): Add disasm-selftests.c and
11875         selftest-arch.c.
11876         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11877         * disasm-selftests.c: New file.
11878         * selftest-arch.c: New file.
11879         * selftest-arch.h: New file.
11880
11881 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11882
11883         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11884         to bfd_arch_mep.  Don't return 0 if section is not
11885         found.  Call print_insn_mep.
11886
11887 2017-01-26  Pedro Alves  <palves@redhat.com>
11888             Yao Qi  <yao.qi@linaro.org>
11889
11890         * arm-tdep.c: Include "disasm.h".
11891         (gdb_print_insn_arm): Update code to get gdbarch.
11892         * disasm.c (dis_asm_read_memory): Change it to
11893         gdb_disassembler::dis_asm_read_memory.
11894         (dis_asm_memory_error): Likewise.
11895         (dis_asm_print_address): Likewise.
11896         (gdb_pretty_print_insn): Change it to
11897         gdb_disassembler::pretty_print_insn.
11898         (dump_insns): Add one argument gdb_disassemlber.  All
11899         callers updated.
11900         (do_mixed_source_and_assembly_deprecated): Likewise.
11901         (do_mixed_source_and_assembly): Likewise.
11902         (do_assembly_only): Likewise.
11903         (gdb_disassembler::gdb_disassembler): New.
11904         (gdb_disassembler::print_insn): New.
11905         * disasm.h (class gdb_disassembler): New.
11906         (gdb_pretty_print_insn): Remove declaration.
11907         (gdb_disassemble_info): Likewise.
11908         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11909         (gdbscm_disasm_read_memory_worker): Update.
11910         (gdbscm_disasm_read_memory): Update.
11911         (gdbscm_disasm_memory_error): Remove.
11912         (gdbscm_disasm_print_address): Remove.
11913         (gdbscm_disassembler::gdbscm_disassembler): New.
11914         (gdbscm_print_insn_from_port): Update.
11915         * mips-tdep.c: Include disasm.h.
11916         (gdb_print_insn_mips): Update code to get gdbarch.
11917         * record-btrace.c (btrace_insn_history): Update.
11918         * spu-tdep.c: Include disasm.h.
11919         (struct spu_dis_asm_data): Remove.
11920         (struct spu_dis_asm_info): New.
11921         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11922         SPU id.
11923         (gdb_print_insn_spu): Cast disassemble_info to
11924         spu_dis_asm_info.
11925
11926 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11927
11928         * disasm.c (do_ui_file_delete): Delete.
11929         (gdb_insn_length): Move code creating stream to ...
11930         * utils.c (null_stream): ... here.  New function.
11931         * utils.h (null_stream): Declare.
11932
11933 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11934
11935         * python/py-inferior.c (find_thread_object): Return directly
11936         from the loop.  Remove "found" variable.
11937
11938 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11939
11940         GDB 7.12.1 released.
11941
11942 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11943
11944         * python/py-function.c (fnpy_call): Reorder declarations to have
11945         the gdbpy_enter object declared first.
11946         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11947
11948 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11949
11950         PR python/21068
11951         * python/python-internal.h (PyMem_RawMalloc): Define for
11952         Python < 3.4.
11953         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11954         PyMem_RawMalloc instead of PyMem_Malloc.
11955
11956 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11957             Luis Machado  <lgustavo@codesourcery.com>
11958
11959         * NEWS (New commands): Mention flash-erase.
11960         (New MI commands): Mention target-flash-erase.
11961         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11962         command.
11963         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11964         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11965         * target.c (flash_erase_command): New function.
11966         (initialize_targets): Add new flash-erase command.
11967         * target.h (flash_erase_command): New declaration.
11968
11969 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11970
11971         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11972         HAVE_SYS_PROCFS_H is defined.
11973
11974 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11975
11976         * remote.c (struct cached_reg): Change data into a pointer.
11977         * (stop_reply_dtr): Free data pointers before deleting vector.
11978         (process_stop_reply): Likewise.
11979         (remote_parse_stop_reply): Allocate space for data
11980
11981 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11982
11983         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11984         MAX_REGISTER_SIZE.
11985         (amd64_pseudo_register_read_value): Likewise.
11986         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11987         (store_register_using_P): Likewise.
11988         * regcache.c (regcache_xfer_part): Likewise.
11989
11990 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11991
11992         Split real and pseudo registers.
11993         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11994         (sparc32_pseudo_regnum): New enum.
11995         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11996         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11997         (SPARC32_CP0_REGISTERS): New macro.
11998         (sparc32_pseudo_register_name): New function.
11999         (sparc32_register_name): Use sparc32_pseudo_register_name.
12000         (sparc32_pseudo_register_type): New function.
12001         (sparc32_register_type): Use sparc32_pseudo_register_type.
12002         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12003         pseudo register numbers.
12004         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12005         (SPARC64_CP0_REGISTERS): New macro.
12006         (sparc64_pseudo_register_name): New function.
12007         (sparc64_register_name): Use sparc64_pseudo_register_name.
12008         (sparc64_pseudo_register_type): New function.
12009         (sparc64_register_type): Use sparc64_pseudo_register_type.
12010         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12011         pseudo register numbers.
12012         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12013         sparc64_store_arguments): Handle pseudo register numbers.
12014
12015 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12016
12017         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12018         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12019         output.
12020         (getpkt_or_notif_sane_1): Likewise.
12021
12022 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12023
12024         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12025         of CC.  Pass "-x c++-header" instead of "-x c".
12026
12027 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12028
12029         * remote.c (remote_can_async_p): Update comment.
12030
12031 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12032
12033         * linux-nat.c (linux_nat_can_async_p): Update comment.
12034
12035 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12036
12037         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12038
12039 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12040
12041         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12042
12043 2017-01-10  Tom Tromey  <tom@tromey.com>
12044
12045         * python/py-type.c (typy_legacy_template_argument): Update.
12046         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12047         ~demangle_parse_info): Declare new members.
12048         (cp_demangled_name_to_comp): Return unique_ptr.
12049         (cp_demangled_name_parse_free)
12050         (make_cleanup_cp_demangled_name_parse_free)
12051         (cp_new_demangle_parse_info): Remove.
12052         * cp-support.c (do_demangled_name_parse_free_cleanup)
12053         (make_cleanup_cp_demangled_name_parse_free): Remove.
12054         (inspect_type, cp_canonicalize_string_full)
12055         (cp_canonicalize_string): Update.
12056         (mangled_name_to_comp): Change return type.
12057         (cp_class_name_from_physname, method_name_from_physname)
12058         (cp_func_name, cp_remove_params): Update.
12059         * cp-name-parser.y (demangle_parse_info): New constructor, from
12060         cp_new_demangle_parse_info.
12061         (~demangle_parse_info): New destructor, from
12062         cp_demangled_name_parse_free.
12063         (cp_merge_demangle_parse_infos): Update.
12064         (cp_demangled_name_to_comp): Change return type.
12065
12066 2017-01-10  Tom Tromey  <tom@tromey.com>
12067
12068         * top.c (prevent_dont_repeat): Change return type.
12069         * python/python.c (execute_gdb_command): Use std::string.
12070         Update.
12071         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12072         * command.h (prevent_dont_repeat): Change return type.
12073         * breakpoint.c (bpstat_do_actions_1): Update.
12074
12075 2017-01-10  Tom Tromey  <tom@tromey.com>
12076
12077         * value.h (scoped_value_mark::~scoped_value_mark): Call
12078         free_to_mark.
12079         (scoped_value_mark::free_to_mark): New method.
12080         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12081         scoped_value_mark.
12082
12083 2017-01-10  Tom Tromey  <tom@tromey.com>
12084
12085         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12086         (valpy_reference_value, valpy_const_value, valpy_get_address)
12087         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12088         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12089         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12090         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12091         scoped_value_mark.
12092         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12093         * value.h (scoped_value_mark): New class.
12094
12095 2017-01-10  Tom Tromey  <tom@tromey.com>
12096
12097         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12098         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12099         * psymtab.c (discard_psymtabs_upto): Remove.
12100         (make_cleanup_discard_psymtabs): Remove.
12101         (struct psymtab_state): Remove.
12102
12103 2017-01-10  Tom Tromey  <tom@tromey.com>
12104
12105         * record-full.c (record_full_save_cleanups): Remove.
12106         (record_full_save): Use gdb::unlinker.
12107         * gcore.c (do_bfd_delete_cleanup): Remove.
12108         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12109         cleanups.
12110         * dwarf2read.c (unlink_if_set): Remove.
12111         (write_psymtabs_to_index): Use gdb::unlinker.
12112         * common/gdb_unlinker.h: New file.
12113
12114 2017-01-10  Tom Tromey  <tom@tromey.com>
12115
12116         * windows-tdep.c (windows_xfer_shared_library): Update.
12117         * windows-nat.c (windows_make_so): Update.
12118         * utils.h (make_cleanup_bfd_unref): Remove.
12119         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12120         * symfile.h (symfile_bfd_open)
12121         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12122         * symfile.c (read_symbols, symbol_file_add)
12123         (separate_debug_file_exists): Update.
12124         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12125         (generic_load, reread_symbols): Update.
12126         * symfile-mem.c (symbol_file_add_from_memory): Update.
12127         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12128         (spu_symbol_file_add_from_memory): Update.
12129         * solist.h (struct target_so_ops) <bfd_open>: Return
12130         gdb_bfd_ref_ptr.
12131         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12132         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12133         gdb_bfd_ref_ptr.
12134         (solib_map_sections, reload_shared_libraries_1): Update.
12135         * solib-svr4.c (enable_break): Update.
12136         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12137         * solib-frv.c (enable_break2): Update.
12138         * solib-dsbt.c (enable_break): Update.
12139         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12140         gdb_bfd_ref_ptr.
12141         (darwin_solib_get_all_image_info_addr_at_init): Update.
12142         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12143         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12144         * record-full.c (record_full_save): Update.
12145         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12146         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12147         * minidebug.c (find_separate_debug_file_in_section): Return
12148         gdb_bfd_ref_ptr.
12149         * machoread.c (macho_add_oso_symfile): Change abfd to
12150         gdb_bfd_ref_ptr.
12151         (macho_symfile_read_all_oso): Update.
12152         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12153         (macho_symfile_read): Update.
12154         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12155         (jit_bfd_try_read_symtab): Update.
12156         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12157         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12158         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12159         gdb_bfd_ref_ptr.
12160         (gdb_bfd_ref_policy): New struct.
12161         (gdb_bfd_ref_ptr): New typedef.
12162         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12163         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12164         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12165         gdb_bfd_ref_ptr.
12166         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12167         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12168         (gcore_command): Update.
12169         * exec.c (exec_file_attach): Update.
12170         * elfread.c (elf_symfile_read): Update.
12171         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12172         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12173         (open_and_init_dwo_file): Update.
12174         (open_dwp_file): Return gdb_bfd_ref_ptr.
12175         (open_and_init_dwp_file): Update.
12176         * corelow.c (core_open): Update.
12177         * compile/compile-object-load.c (compile_object_load): Update.
12178         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12179         * coffread.c (coff_symfile_read): Update.
12180         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12181         gdb_bfd_ref_ptr.  Rename.
12182         (dump_bfd_file, restore_command): Update.
12183         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12184         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12185         (find_separate_debug_file_by_buildid): Update.
12186
12187 2017-01-10  Tom Tromey  <tom@tromey.com>
12188
12189         * common/gdb_ref_ptr.h: New file.
12190         * python/py-ref.h (struct gdbpy_ref_policy): New.
12191         (gdbpy_ref): Now a typedef.
12192
12193 2017-01-10  Tom Tromey  <tom@tromey.com>
12194
12195         * utils.h (make_cleanup_htab_delete): Don't declare.
12196         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12197         Remove.
12198         * linespec.c (decode_compound_collector): Add constructor,
12199         destructor.
12200         (lookup_prefix_sym): Remove cleanup.
12201         (symtab_collector): Add constructor, destructor.
12202         (collect_symtabs_from_filename): Remove cleanup.
12203         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12204         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12205         Use htab_up.
12206         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12207         * dwarf2read.c (dw2_expand_symtabs_matching)
12208         (dw2_map_symbol_filenames, dwarf_decode_macros)
12209         (write_psymtabs_to_index): Use htab_up.
12210         * dwarf2loc.c (func_verify_no_selftailcall)
12211         (call_site_find_chain_1, func_verify_no_selftailcall)
12212         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12213         std::vector, gdb::unique_xmalloc_ptr.
12214         (call_sitep): Remove typedef.
12215         (dwarf2_locexpr_baton_eval): Remove unused variable.
12216
12217 2017-01-10  Tom Tromey  <tom@tromey.com>
12218
12219         * python/python-internal.h (make_cleanup_py_decref)
12220         (make_cleanup_py_xdecref): Don't declare.
12221         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12222         (py_xdecref, make_cleanup_py_xdecref): Remove.
12223
12224 2017-01-10  Tom Tromey  <tom@tromey.com>
12225
12226         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12227         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12228
12229 2017-01-10  Tom Tromey  <tom@tromey.com>
12230
12231         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12232
12233 2017-01-10  Tom Tromey  <tom@tromey.com>
12234
12235         * python/py-utils.c (unicode_to_encoded_string)
12236         (python_string_to_target_string)
12237         (python_string_to_target_python_string)
12238         (python_string_to_host_string, gdbpy_obj_to_string)
12239         (get_addr_from_python): Use gdbpy_ref.
12240
12241 2017-01-10  Tom Tromey  <tom@tromey.com>
12242
12243         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12244         gdbpy_ref.
12245
12246 2017-01-10  Tom Tromey  <tom@tromey.com>
12247
12248         * python/python.c (eval_python_command, gdbpy_decode_line)
12249         (gdbpy_run_events, gdbpy_start_type_printers)
12250         (gdbpy_apply_type_printers): Use gdbpy_ref.
12251
12252 2017-01-10  Tom Tromey  <tom@tromey.com>
12253
12254         * python/py-param.c (get_doc_string, compute_enum_values): Use
12255         gdbpy_ref.
12256
12257 2017-01-10  Tom Tromey  <tom@tromey.com>
12258
12259         * python/py-inferior.c (find_thread_object, build_inferior_list):
12260         Use gdbpy_ref.
12261
12262 2017-01-10  Tom Tromey  <tom@tromey.com>
12263
12264         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12265
12266 2017-01-10  Tom Tromey  <tom@tromey.com>
12267
12268         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12269         gdbpy_ref.
12270
12271 2017-01-10  Tom Tromey  <tom@tromey.com>
12272
12273         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12274         extra incref.
12275         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12276         Use gdbpy_ref.
12277
12278 2017-01-10  Tom Tromey  <tom@tromey.com>
12279
12280         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12281         gdbpy_ref.
12282
12283 2017-01-10  Tom Tromey  <tom@tromey.com>
12284
12285         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12286         decref results of PyArg_ParseTupleAndKeywords.
12287
12288 2017-01-10  Tom Tromey  <tom@tromey.com>
12289
12290         * python/python.c (python_run_simple_file): Use
12291         unique_xmalloc_ptr, gdbpy_ref.
12292
12293 2017-01-10  Tom Tromey  <tom@tromey.com>
12294
12295         * python/py-prettyprint.c (print_stack_unless_memory_error)
12296         (print_string_repr, print_children): Use gdbpy_ref.
12297         (dummy_python_frame): New class.
12298         (dummy_python_frame::dummy_python_frame): Rename from
12299         push_dummy_python_frame.
12300         (py_restore_tstate): Remove.
12301
12302 2017-01-10  Tom Tromey  <tom@tromey.com>
12303
12304         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12305
12306 2017-01-10  Tom Tromey  <tom@tromey.com>
12307
12308         * python/python.c (ensure_python_env, restore_python_env):
12309         Remove.
12310         * python/python-internal.h (ensure_python_env): Don't declare.
12311         * varobj.h (varobj_ensure_python_env): Don't declare.
12312         * varobj.c (varobj_ensure_python_env): Remove.
12313
12314 2017-01-10  Tom Tromey  <tom@tromey.com>
12315
12316         * varobj.c (varobj_value_get_print_value): Use
12317         gdbpy_enter_varobj.
12318
12319 2017-01-10  Tom Tromey  <tom@tromey.com>
12320
12321         * python/py-prettyprint.c (print_string_repr, print_children):
12322         Update.
12323         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12324         of "encoding".
12325         * varobj.c (varobj_value_get_print_value): Update.
12326         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12327
12328 2017-01-10  Tom Tromey  <tom@tromey.com>
12329
12330         * varobj.c (varobj_get_display_hint)
12331         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12332         (varobj_set_visualizer, free_variable): Use
12333         gdbpy_enter_varobj.
12334
12335 2017-01-10  Tom Tromey  <tom@tromey.com>
12336
12337         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12338         (do_finish_initialization): New function.  Use gdbpy_ref.
12339         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12340         do_finish_initialization.
12341
12342 2017-01-10  Tom Tromey  <tom@tromey.com>
12343
12344         * python/py-param.c (get_set_value, get_show_value): Use
12345         gdbpy_enter, gdbpy_ref.
12346
12347 2017-01-10  Tom Tromey  <tom@tromey.com>
12348
12349         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12350
12351 2017-01-10  Tom Tromey  <tom@tromey.com>
12352
12353         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12354
12355 2017-01-10  Tom Tromey  <tom@tromey.com>
12356
12357         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12358         Use gdbpy_enter_varobj.
12359
12360 2017-01-10  Tom Tromey  <tom@tromey.com>
12361
12362         * varobj.c (gdbpy_enter_varobj): New constructor.
12363         * python/python-internal.h (gdbpy_enter_varobj): New class.
12364         * python/py-varobj.c (py_varobj_get_iterator): Use
12365         gdbpy_enter_varobj.
12366
12367 2017-01-10  Tom Tromey  <tom@tromey.com>
12368
12369         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12370         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12371         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12372         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12373         unique_xmalloc_ptr.
12374         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12375
12376 2017-01-10  Tom Tromey  <tom@tromey.com>
12377
12378         * python/py-xmethods.c (invoke_match_method): Use
12379         gdbpy_ref.
12380
12381 2017-01-10  Tom Tromey  <tom@tromey.com>
12382
12383         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12384         gdbpy_enter, gdbpy_ref.
12385
12386 2017-01-10  Tom Tromey  <tom@tromey.com>
12387
12388         * python/python.c (python_interactive_command): Use gdbpy_enter.
12389
12390 2017-01-10  Tom Tromey  <tom@tromey.com>
12391
12392         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12393         gdbpy_ref.
12394
12395 2017-01-10  Tom Tromey  <tom@tromey.com>
12396
12397         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12398         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12399
12400 2017-01-10  Tom Tromey  <tom@tromey.com>
12401
12402         * utils.h (htab_deleter): New struct.
12403         (htab_up): New typedef.
12404         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12405         gdbpy_enter, gdbpy_ref, htab_up.
12406
12407 2017-01-10  Tom Tromey  <tom@tromey.com>
12408
12409         * python/py-unwind.c (pending_frame_invalidate): Remove.
12410         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12411
12412 2017-01-10  Tom Tromey  <tom@tromey.com>
12413
12414         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12415         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12416
12417 2017-01-10  Tom Tromey  <tom@tromey.com>
12418
12419         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12420
12421 2017-01-10  Tom Tromey  <tom@tromey.com>
12422
12423         * python/python.c (gdbpy_eval_from_control_command)
12424         (gdbpy_source_script, gdbpy_run_events)
12425         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12426         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12427         gdbpy_enter.
12428
12429 2017-01-10  Tom Tromey  <tom@tromey.com>
12430
12431         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12432
12433 2017-01-10  Tom Tromey  <tom@tromey.com>
12434
12435         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12436
12437 2017-01-10  Tom Tromey  <tom@tromey.com>
12438
12439         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12440         (python_on_inferior_call_pre, python_on_inferior_call_post)
12441         (python_on_memory_change, python_on_register_change)
12442         (python_inferior_exit, python_new_objfile, add_thread_object)
12443         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12444
12445 2017-01-10  Tom Tromey  <tom@tromey.com>
12446
12447         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12448         (bpfinishpy_handle_exit): Use gdbpy_enter.
12449
12450 2017-01-10  Tom Tromey  <tom@tromey.com>
12451
12452         * python/py-cmd.c (cmdpy_destroyer)
12453         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12454         gdbpy_enter.
12455
12456 2017-01-10  Tom Tromey  <tom@tromey.com>
12457
12458         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12459         gdbpy_enter.
12460         (gdbpy_breakpoint_has_cond): Likewise.
12461
12462 2017-01-10  Tom Tromey  <tom@tromey.com>
12463
12464         * python/python.c (gdbpy_enter): New constructor.
12465         (~gdbpy_enter): New destructor.
12466         (restore_python_env, ensure_python_env): Rewrite.
12467         * python/python-internal.h (gdbpy_enter): New class.
12468
12469 2017-01-10  Tom Tromey  <tom@tromey.com>
12470
12471         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12472
12473 2017-01-10  Tom Tromey  <tom@tromey.com>
12474
12475         * python/py-value.c (value_has_field, get_field_flag)
12476         (get_field_type, valpy_getitem, convert_value_from_python): Use
12477         gdbpy_ref.
12478
12479 2017-01-10  Tom Tromey  <tom@tromey.com>
12480
12481         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12482         gdbpy_ref.
12483
12484 2017-01-10  Tom Tromey  <tom@tromey.com>
12485
12486         * python/py-prettyprint.c (search_pp_list)
12487         (find_pretty_printer_from_objfiles)
12488         (find_pretty_printer_from_progspace)
12489         (find_pretty_printer_from_gdb, find_pretty_printer)
12490         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12491         gdbpy_ref.
12492
12493 2017-01-10  Tom Tromey  <tom@tromey.com>
12494
12495         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12496
12497 2017-01-10  Tom Tromey  <tom@tromey.com>
12498
12499         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12500         (ltpy_get_all_source_lines): Use gdbpy_ref.
12501
12502 2017-01-10  Tom Tromey  <tom@tromey.com>
12503
12504         * python/py-framefilter.c (extract_sym, extract_value)
12505         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12506         gdbpy_ref.
12507
12508 2017-01-10  Tom Tromey  <tom@tromey.com>
12509
12510         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12511
12512 2017-01-10  Tom Tromey  <tom@tromey.com>
12513
12514         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12515
12516 2017-01-10  Tom Tromey  <tom@tromey.com>
12517
12518         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12519         gdbpy_ref.
12520
12521 2017-01-10  Tom Tromey  <tom@tromey.com>
12522
12523         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12524
12525 2017-01-10  Tom Tromey  <tom@tromey.com>
12526
12527         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12528         (typy_range): Use gdbpy_ref.
12529
12530 2017-01-10  Tom Tromey  <tom@tromey.com>
12531
12532         * python/py-threadevent.c (create_thread_event_object): Use
12533         gdbpy_ref.
12534         * python/py-stopevent.c (create_stop_event_object): Simplify.
12535         (emit_stop_event): Use gdbpy_ref.
12536         * python/py-signalevent.c (create_signal_event_object): Use
12537         gdbpy_ref.
12538         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12539         (emit_new_objfile_event, create_clear_objfiles_event_object)
12540         (emit_clear_objfiles_event): Use gdbpy_ref.
12541         * python/py-infevents.c (create_inferior_call_event_object)
12542         (create_register_changed_event_object)
12543         (create_memory_changed_event_object, emit_inferior_call_event)
12544         (emit_memory_changed_event, emit_register_changed_event): Use
12545         gdbpy_ref.
12546         * python/py-exitedevent.c (create_exited_event_object)
12547         (emit_exited_event): Use gdbpy_ref.
12548         * python/py-event.h (evpy_emit_event): Remove
12549         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12550         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12551         * python/py-continueevent.c (emit_continue_event): Use
12552         gdbpy_ref.
12553         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12554         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12555         gdbpy_ref.
12556         * python/py-bpevent.c (create_breakpoint_event_object): Use
12557         gdbpy_ref.
12558
12559 2017-01-10  Tom Tromey  <tom@tromey.com>
12560
12561         * python/py-ref.h: New file.
12562
12563 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12564
12565         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12566         void.
12567         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12568         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12569         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12570         * ui-out.c (ui_out::redirect): Likewise.
12571         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12572         * cli/cli-logging.c (set_logging_redirect): Update call site of
12573         ui_out::redirect.
12574         (handle_redirections): Likewise.
12575         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12576         * top.c (execute_command_to_string): Likewise.
12577         * utils.c (do_ui_out_redirect_pop): Likewise.
12578
12579 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12580
12581         * stack.c (_initialize_stack): Update "frame" command help message.
12582
12583 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12584
12585         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12586
12587 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12588
12589         * x86-linux-nat.h: Include gdb_proc_service.h.
12590
12591 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12592
12593         * ser-base.h: Include serial.h.
12594
12595 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12596
12597         * ppc-linux-tdep.h: Include ppc-tdep.h.
12598
12599 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12600
12601         * nat/amd64-linux-siginfo.h: Include signal.h.
12602
12603 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12604
12605         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12606
12607 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12608
12609         * mi/mi-parse.h: Include mi-cmds.h.
12610
12611 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12612
12613         * inf-loop.c: Don't include "target.h".
12614         * inf-loop.h: Include it here.
12615
12616 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12617
12618         * dfp.h: Include "dboulest.h" and "expression.h".
12619
12620 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12621
12622         * ax-gdb.h: Include "ax.h".
12623
12624 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12625
12626         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12627         with nat/gdb_ptrace.h.
12628
12629 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12630
12631         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12632         new line.
12633         (mips64_fbsd_sigframe_init): Likewise.
12634
12635 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12636
12637         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12638         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12639
12640 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12641
12642         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12643         * NEWS: Mention new FreeBSD/mips native configuration.
12644         * config/mips/fbsd.mh: New file.
12645         * configure.host: Add mips*-*-freebsd*.
12646         * mips-fbsd-nat.c: New file.
12647
12648 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12649
12650         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12651         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12652         * NEWS: Mention new FreeBSD/mips target.
12653         * configure.tgt: Add mips*-*-freebsd*.
12654         * mips-fbsd-tdep.c: New file.
12655         * mips-fbsd-tdep.h: New file.
12656
12657 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12658
12659         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12660         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12661
12662 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12663
12664         Update copyright year range in all GDB files.
12665
12666 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12667
12668         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12669
12670 For older changes see ChangeLog-2016.
12671 \f
12672 Local Variables:
12673 mode: change-log
12674 left-margin: 8
12675 fill-column: 74
12676 version-control: never
12677 coding: utf-8
12678 End: