6155c587484ca75580b01a2dc96c7c53fd9669d4
[external/binutils.git] / gdb / ChangeLog
1 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2
3         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4         (ALLDEPFILES): Add arm-fbsd-tdep.c.
5         * NEWS: Mention new FreeBSD/arm target.
6         * configure.tgt: Add arm*-*-freebsd*.
7         * arm-fbsd-tdep.c: New file.
8         * arm-fbsd-tdep.h: New file.
9
10 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
11
12         * linux-tdep.c (linux_make_corefile_notes): Remove call to
13         `gdbarch_elfcore_write_linux_prpsinfo'.
14         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
15         method.
16         (elf_internal_linux_prpsinfo): Remove declaration.
17         * gdbarch.h: Regenerate.
18         * gdbarch.c: Regenerate.
19
20 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
21
22         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
23         `set_gdbarch_elfcore_write_linux_prpsinfo'.
24
25 2017-10-11  Pedro Alves  <palves@redhat.com>
26
27         * breakpoint.c (reattach_breakpoints): Delete.
28         * breakpoint.h (reattach_breakpoints): Delete.
29
30 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
31
32         * symfile.c (registered_sym_fns): Make struct, not typedef.
33         (DEF_VEC_O (registered_sym_fns)): Remove.
34         (symtab_fns): Change type to std::vector.
35         (add_symtab_fns): Adjust.
36         (find_sym_fns): Adjust.
37
38 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
39
40         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
41         * arc-tdep.h (arc_arch_is_em): New function.
42         (arc_arch_is_hs): Likewise.
43
44 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
45
46         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
47         parentheses in the declaration.
48         (macro_lookup_inclusion): Likewise.
49         (macro_lookup_definition): Likewise.
50         * p-lang.h (pascal_builtin_types): Likewise.
51         * tui/tui-data.c (tui_win_list): Likewise.
52         * tui/tui-data.h (tui_win_list): Likewise.
53         * utils.h (make_cleanup_free_section_addr_info): Likewise.
54
55 2017-10-11  Mark Rages  <markrages@gmail.com>
56
57         * target-memory.c (block_boundaries): Fix for block address not
58         aligned on block size.
59
60 2017-10-10  Pedro Alves <palves@redhat.com>
61             Tom Tromey  <tom@tromey.com>
62
63         * breakpoint.c (struct captured_breakpoint_query_args)
64         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
65         (print_breakpoint): New.
66         * breakpoint.h (print_breakpoint): Declare.
67         * common/common-exceptions.h (enum return_reason): Remove
68         references to catch_exceptions.
69         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
70         Delete.
71         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
72         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
73         * gdb.h: Delete.
74         * gdbthread.h (thread_select): Declare.
75         * mi/mi-cmd-break.c: Don't include gdb.h.
76         (breakpoint_notify): Use print_breakpoint.
77         * mi/mi-cmd-catch.c: Don't include gdb.h.
78         * mi/mi-interp.c: Don't include gdb.h.
79         (mi_print_breakpoint_for_event): New.
80         (mi_breakpoint_created, mi_breakpoint_modified): Use
81         mi_print_breakpoint_for_event.
82         * mi/mi-main.c: Don't include gdb.h.
83         (mi_cmd_thread_select): Parse the global thread ID here.  Use
84         thread_select instead of gdb_thread_select.
85         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
86         of using gdb_list_thread_ids.
87         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
88         FILEIO_ENOSYS here.
89         (remote_fileio_request): Use TRY/CATCH instead of
90         catch_exceptions.
91         * symfile-mem.c (struct symbol_file_add_from_memory_args)
92         (symbol_file_add_from_memory_wrapper): Delete.
93         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
94         * thread.c: Don't include gdb.h.
95         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
96         (thread_alive): Use thread_select.
97         (do_captured_thread_select): Delete, parts salvaged as ...
98         (thread_select): ... this new function.
99         (gdb_thread_select): Delete.
100
101 2017-10-10  Pedro Alves  <palves@redhat.com>
102             Tom Tromey  <tom@tromey.com>
103
104         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
105         and reverse logic.
106         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
107         No longer macros.  Instead ...
108         (enum wp_check_result): They're now values of this new
109         enumeration.
110         (watchpoint_check): Change return type to wp_check_result and
111         parameter type to bpstat.
112         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
113         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
114         catch_errors.  Reverse logic of watchpoint_check call.
115         (breakpoint_re_set_one): Now returns void and takes a breakpoint
116         pointer as parameter.
117         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
118         * common/common-exceptions.c (throw_exception_sjlj): Update
119         comments to avoid mentioning catch_errors.
120         * exceptions.c (catch_errors): Delete.
121         * exceptions.h: Update comments to avoid mentioning catch_errors.
122         (catch_errors_ftype, catch_errors): Delete.
123         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
124         (hook_stop_stub): Delete.
125         (restore_selected_frame): Change return type to void, and
126         parameter type to const frame_id &.
127         (restore_infcall_control_state): Use TRY/CATCH instead of
128         catch_errors.
129         * main.c (captured_command_loop): Return void and remove
130         parameter.  Remove references to catch_errors.
131         (captured_main): Use TRY/CATCH instead of catch_errors.
132         * objc-lang.c (objc_submethod_helper_data)
133         (find_objc_msgcall_submethod_helper): Delete.
134         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
135         catch_errors.
136         * record-full.c (record_full_message): Return void.
137         (record_full_message_args, record_full_message_wrapper): Delete.
138         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
139         instead of catch_errors.
140         * solib-aix.c (solib_aix_open_symbol_file_object): Change
141         parameter type to int.
142         * solib-darwin.c (open_symbol_file_object): Ditto.
143         * solib-dsbt.c (open_symbol_file_object): Ditto.
144         * solib-frv.c (open_symbol_file_object): Ditto.
145         * solib-svr4.c (open_symbol_file_object): Ditto.
146         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
147         * solib.c (update_solib_list): Use TRY/CATCH instead of
148         catch_errors.
149         * solist.h (struct target_so_ops) <open_symbol_file_object>:
150         Change type.
151         * symmisc.c (struct print_symbol_args): Remove.
152         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
153         (print_symbol): Change type.
154         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
155         and remove parameters.
156         (catch_errors): New.
157         (get_windows_debug_event): Adjust.
158
159 2017-10-09  Tom Tromey  <tom@tromey.com>
160
161         * mi/mi-main.c (free_splay_tree): Remove.
162         (list_available_thread_groups): Use splay_tree_up.
163         * common/gdb_splay_tree.h: New file.
164
165 2017-10-09  Tom Tromey  <tom@tromey.com>
166
167         * mi/mi-main.c (do_nothing): Remove.
168         (list_available_thread_groups): Update.
169
170 2017-10-09  Pedro Alves  <palves@redhat.com>
171
172         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
173         reading registers when switching context.
174
175 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
176
177         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
178         (fbsd_convert_siginfo): Likewise.
179         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
180
181 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
182
183         * configure.ac (try_guile_versions): Remove guile-2.2.
184         * configure: Regenerate.
185
186 2017-10-09  Tom Tromey  <tom@tromey.com>
187
188         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
189         (COMPILE.pre): Use $(CXX).
190
191 2017-10-09  Pedro Alves  <palves@redhat.com>
192
193         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
194         Use bool.
195         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
196         * cp-support.h (cp_remove_params): Now returns a
197         gdb::unique_xmalloc_ptr.
198         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
199         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
200         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
201         returning a gdb::unique_xmalloc_ptr.
202         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
203         * stack.c (find_frame_funname): Adjust to cp_remove_params
204         returning a gdb::unique_xmalloc_ptr.
205
206 2017-10-08  Tom Tromey  <tom@tromey.com>
207
208         * dwarf2read.c (dwarf2_get_dwz_file): Use
209         gdb::unique_xmalloc_ptr.
210         (find_slot_in_mapped_hash): Likewise.
211         (dwarf2_physname): Likewise.
212         (create_dwo_unit_in_dwp_v1): Use std::string.
213         (create_dwo_unit_in_dwp_v2): Likewise.
214         (lookup_dwo_cutu): Likewise.
215         (inherit_abstract_dies): Use std::vector.
216         (read_array_type): Likewise.
217         (dwarf_decode_macros): Remove unused declaration.
218         (unsigned_int_compar): Remove.
219         (dwarf2_build_psymtabs_hard): Use scoped_restore.
220         (psymtabs_addrmap_cleanup): Remove.
221
222 2017-10-08  Tom Tromey  <tom@tromey.com>
223
224         * frame-unwind.c (frame_unwind_try_unwinder): Update.
225         * frame.h (frame_cleanup_after_sniffer): Declare.
226         (frame_prepare_for_sniffer): Return void.
227         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
228         type of argument.
229         (frame_prepare_for_sniffer): Return void.
230
231 2017-10-08  Tom Tromey  <tom@tromey.com>
232
233         * utils.h (make_cleanup_value_free): Remove.
234         * utils.c (do_value_free, struct cleanup): Remove.
235         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
236         Use gdb_value_up.
237         * value.h (struct value_deleter): New.
238         (gdb_value_up): New typedef.
239
240 2017-10-08  Tom Tromey  <tom@tromey.com>
241
242         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
243         (make_cleanup_free_search_symbols): Remove.
244         (search_symbols): Return std::vector.
245         (symbol_search::compare_search_syms): Now member of
246         symbol_search.  Change arguments.
247         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
248         (symtab_symbol_info, rbreak_command): Update.
249         * symtab.h (struct symbol_search) <next>: Remove.
250         Add constructors.
251         (symbol_search::operator<): New function.
252         (symbol_search::operator==): New function.
253         (search_symbols): Remove std::vector.
254         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
255         (symbol_search::compare_search_syms): Declare.
256
257 2017-10-06  Yao Qi  <yao.qi@linaro.org>
258
259         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
260         arch/aarch64-insn.o.
261         Remove one rule.
262         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
263
264 2017-10-06  Yao Qi  <yao.qi@linaro.org>
265
266         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
267         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
268         arch/arm-linux.o respectively.
269         * configure.tgt: Likewise.
270
271 2017-10-06  Yao Qi  <yao.qi@linaro.org>
272
273         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
274         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
275
276 2017-10-06  Pedro Alves  <palves@redhat.com>
277
278         * windows-nat.c: Include <algorithm>.
279
280 2017-10-06  Yao Qi  <yao.qi@linaro.org>
281
282         * configure.tgt (i386_tobjs): New variable.
283         (amd64_tobjs): New variable.
284         Set $cpu_obs and $os_obs.
285
286 2017-10-06  Yao Qi  <yao.qi@linaro.org>
287
288         * Makefile.in (CONFIG_SRC_SUBDIR): New.
289         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
290         (clean): Remove object files and dependency files.
291         (distclean): Remove the directory.
292         * configure.ac: Invoke AC_CONFIG_COMMANDS.
293         * configure: Re-generated.
294         * configure.tgt: Replace amd64.o with arch/amd64.o.
295
296 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
297
298         PR build/22188
299         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
300         and SETEND.
301
302 2017-10-05  Pedro Alves  <palves@redhat.com>
303
304         * linux-nat.c (linux_child_follow_fork): When following the parent
305         and detaching the child, consult the parent thread's architecture
306         instead of the child's.
307
308 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
309
310         * ax.h: Do not include "doublest.h".
311         (union agent_val): Remove.
312
313 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
314
315         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
316         (decimal_to_string): Return std::string object.
317         (decimal_from_string): Accept std::string object.  Return bool.
318         (decimal_from_integral, decimal_from_doublest): Remove.
319         (decimal_from_longest): Add prototype.
320         (decimal_from_ulongest): Likewise.
321         (decimal_to_longest): Likewise.
322         (decimal_from_doublest): Likewise.
323         * dfp.c: Do not include "gdbtypes.h" or "value.h".
324         (MAX_DECIMAL_STRING): Move here.
325         (decimal_to_string): Return std::string object.
326         (decimal_from_string): Accept std::string object.  Return bool.
327         (decimal_from_integral): Remove, replace by ...
328         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
329         (decimal_to_longest): New function.
330         (decimal_from_floating): Remove, replace by ...
331         (decimal_from_doublest): ... this new function.
332         (decimal_to_doublest): Update to new decimal_to_string interface.
333
334         * value.c (unpack_long): Use decimal_to_longest.
335         * valops.c (value_cast): Use decimal_from_doublest instead of
336         decimal_from_floating.  Use decimal_from_[u]longest isntead of
337         decimal_from_integral.
338         * valarith.c (value_args_as_decimal): Likewise.
339         * valprint.c (print_decimal_floating): Update to new
340         decimal_to_string interface.
341         * printcmd.c (printf_decfloat): Likewise.
342         * c-exp.y (parse_number): Update to new decimal_from_string interface.
343
344 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
345
346         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
347         * gdbtypes.c: Include "floatformat.h".
348         * value.c: Likewise.
349         * m68k-tdep.c: Likewise.
350
351         * findvar.c: Do not include "floatformat.h".
352         * amd64-darwin-tdep.c: Likewise.
353         * arm-linux-tdep.c: Likewise.
354         * i386-darwin-tdep.c: Likewise.
355         * i387-tdep.c: Likewise.
356         * m68k-linux-tdep.c: Likewise.
357         * mep-tdep.c: Likewise.
358         * mips-tdep.c: Likewise.
359         * nios2-tdep.c: Likewise.
360         * s390-linux-tdep.c: Likewise.
361         * sparc-obsd-tdep.c: Likewise.
362         * sparc-tdep.c: Likewise.
363         * sparc64-tdep.c: Likewise.
364         * spu-tdep.c: Likewise.
365         * tic6x-tdep.c: Likewise.
366         * tilegx-tdep.c: Likewise.
367         * vax-tdep.c: Likewise.
368         * xstormy16-tdep.c: Likewise.
369         * xtensa-tdep.c: Likewise.
370
371         * top.c: Do not include "doublest.h".
372         * aarch64-tdep.c: Likewise.
373         * alpha-tdep.c: Likewise.
374         * arm-linux-tdep.c: Likewise.
375         * m68k-linux-tdep.c: Likewise.
376         * tilegx-tdep.c: Likewise.
377         * xstormy16-tdep.c: Likewise.
378
379 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
380
381         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
382         (mipsn32_fbsd_sigframe): Define.
383         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
384         for FreeBSD/mipsn32.
385
386 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
387
388         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
389         AT_HWCAP.
390
391 2017-10-05  Tristan Gingold  <tgingold@free.fr>
392
393         * MAINTAINERS (Misc): Update my email address.
394
395 2017-10-04  Pedro Alves  <palves@redhat.com>
396
397         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
398         it instead of target_gdbarch.
399         (get_remote_state, get_remote_packet_size): Adjust
400         get_remote_arch_state calls, passing down target_gdbarch
401         explicitly.
402         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
403         'gdbarch' and use it instead of target_gdbarch.
404         (get_memory_packet_size): Adjust get_remote_arch_state calls,
405         passing down target_gdbarch explicitly.
406         (struct stop_reply) <arch>: New field.
407         (remote_parse_stop_reply): Use the stopped thread's architecture,
408         not the current inferior's.  Save the architecture in the
409         stop_reply.
410         (process_stop_reply): Use the stop reply's architecture.
411         (process_g_packet, remote_fetch_registers)
412         (remote_prepare_to_store, store_registers_using_G)
413         (remote_store_registers): Adjust get_remote_arch_state calls,
414         using the regcache's architecture.
415         (remote_get_trace_status): Adjust get_remote_arch_state calls,
416         passing down target_gdbarch explicitly.
417         * spu-multiarch.c (spu_thread_architecture): Defer to the target
418         beneath instead of calling target_gdbarch.
419         * target.c (default_thread_architecture): Use the specified
420         inferior's architecture, instead of the current inferior's
421         architecture (via target_gdbarch).
422
423 2017-10-04  Pedro Alves  <palves@redhat.com>
424
425         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
426         case.
427         (regcache_print): Handle !target_has_registers here instead.
428
429 2017-10-04  Pedro Alves  <palves@redhat.com>
430
431         * frame.c (create_test_frame): Delete.
432         * frame.h (create_test_frame): Delete.
433         * gdbarch-selftests.c: Include gdbthread.h and target.h.
434         (class regcache_test): Delete.
435         (test_target_has_registers, test_target_has_stack)
436         (test_target_has_memory, test_target_prepare_to_store)
437         (test_target_store_registers): New functions.
438         (test_target_ops): New class.
439         (register_to_value_test): Error out if there's already a
440         process_stratum (or higher) target pushed.  Create a fuller mock
441         environment, with mock target_ops, inferior, address space, thread
442         and inferior_ptid.
443         * progspace.c (struct address_space): Move to ...
444         * progspace.h (struct address_space): ... here.
445         * regcache.h (regcache::~regcache, regcache::raw_write)
446         [GDB_SELF_TEST]: No longer virtual.
447
448 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
449
450         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
451
452 2017-10-04  Pedro Alves  <palves@redhat.com>
453
454         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
455         out of 'between TRY and CATCH'.
456
457 2017-10-04  Pedro Alves  <palves@redhat.com>
458
459         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
460         * common/common-exceptions.h (TRY): Open an outermost scope.
461         Expand intro comment.
462         (CATCH): Reindent.
463         (END_CATCH): Close the outermost scope.
464         * completer.c (complete_line_internal): Add missing END_CATCH.
465
466 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
467
468         * NEWS (Changes since GDB 8.0): Add entry about new
469         'set-cwd-on-gdbserver' feature.
470         (New remote packets): Add entry for QSetWorkingDir.
471         * common/common-inferior.h (set_inferior_cwd): New prototype.
472         * infcmd.c (set_inferior_cwd): Remove "static".
473         (show_cwd_command): Expand text to include remote debugging.
474         * remote.c: Add PACKET_QSetWorkingDir.
475         (remote_protocol_features) <QSetWorkingDir>: New entry for
476         PACKET_QSetWorkingDir.
477         (extended_remote_set_inferior_cwd): New function.
478         (extended_remote_create_inferior): Call
479         "extended_remote_set_inferior_cwd".
480         (_initialize_remote): Call "add_packet_config_cmd" for
481         QSetWorkingDir.
482
483 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
484
485         * NEWS (New commands): Mention "set/show cwd".
486         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
487         "cd" command's help text.
488         * common/common-inferior.h (get_inferior_cwd): New prototype.
489         * infcmd.c (inferior_cwd_scratch): New global variable.
490         (set_inferior_cwd): New function.
491         (get_inferior_cwd): Likewise.
492         (set_cwd_command): Likewise.
493         (show_cwd_command): Likewise.
494         (_initialize_infcmd): Add "set/show cwd" commands.
495         * inferior.h (class inferior) <cwd>: New field.
496         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
497         (fork_inferior): Change inferior's cwd before its execution.
498         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
499         to CreateProcess.
500
501 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
502
503         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
504         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
505         (COMMON_OBS): Add gdb_tilde_expand.o.
506         * common/gdb_tilde_expand.c: New file.
507         * common/gdb_tilde_expand.h: Likewise.
508
509 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
510
511         * gdbarch.sh (objfile): Remove duplicate declaration.
512         * gdbarch.h: Regenerate.
513
514 2017-10-03  Tom Tromey  <tom@tromey.com>
515
516         * utils.c (internal_vproblem): Use string_vprintf.
517
518 2017-10-03  Tom Tromey  <tom@tromey.com>
519
520         * printcmd.c (info_symbol_command): Use std::string.
521
522 2017-10-03  Tom Tromey  <tom@tromey.com>
523
524         * top.c (gdb_safe_append_history): Use std::string.
525
526 2017-10-03  Tom Tromey  <tom@tromey.com>
527
528         * event-top.c (stdin_event_handler): Update.
529         * main.c (captured_main_1): Update.
530         * top.h (make_delete_ui_cleanup): Remove.
531         (struct ui): Add constructor and destructor.
532         (new_ui, delete_ui): Remove.
533         * top.c (make_delete_ui_cleanup): Remove.
534         (new_ui_command): Use std::unique_ptr.
535         (delete_ui_cleanup): Remove.
536         (ui::ui): Rename from new_ui.  Update.
537         (free_ui): Remove.
538         (ui::~ui): Rename from delete_ui.  Update.
539
540 2017-10-03  Tom Tromey  <tom@tromey.com>
541
542         * symfile.c (load_progress): Use gdb::byte_vector.
543
544 2017-10-03  Tom Tromey  <tom@tromey.com>
545
546         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
547         declaration.
548         * printcmd.c (x_command): Remove unused declaration.
549         * symfile.c (symbol_file_command): Remove unused declaration.
550
551 2017-10-03  Tom Tromey  <tom@tromey.com>
552
553         * utils.c (internal_vproblem): Use std::string.
554         (defaulted_query): Likewise.
555
556 2017-10-03  Tom Tromey  <tom@tromey.com>
557
558         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
559         * top.c (execute_command_to_string): Update.
560         * utils.c (make_cleanup_restore_page_info): Remove.
561         (do_restore_page_info_cleanup): Remove.
562         (set_batch_flag_and_restore_page_info):
563         New.
564         (make_cleanup_restore_page_info): Remove.
565         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
566         (~set_batch_flag_and_restore_page_info): New
567         (make_cleanup_restore_uinteger): Remove.
568         (make_cleanup_restore_integer): Remove.
569         (struct restore_integer_closure): Remove.
570         (restore_integer): Remove.
571         * utils.h (struct set_batch_flag_and_restore_page_info): New
572         class.
573         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
574         (make_cleanup_restore_page_info): Remove.
575         (make_cleanup_restore_uinteger) Remove.
576         (make_cleanup_restore_integer) Remove.
577
578 2017-10-03  Tom Tromey  <tom@tromey.com>
579
580         * record-full.h (record_full_gdb_operation_disable_set): Return
581         scoped_restore_tmpl<int>.
582         * infrun.c (adjust_pc_after_break): Update.
583         (handle_signal_stop): Update.
584         * record-full.c (record_full_gdb_operation_disable_set): Return
585         scoped_restore_tmpl<int>.
586         (record_full_wait_1, record_full_insert_breakpoint)
587         (record_full_remove_breakpoint, record_full_save)
588         (record_full_goto_insn): Update.
589
590 2017-10-02  Tom Tromey  <tom@tromey.com>
591
592         PR rust/22236:
593         * rust-lang.c (rust_val_print_str): New function.
594         (val_print_struct): Call it.
595         (rust_subscript): Preserve name of slice type.
596
597 2017-10-02  Tom Tromey  <tom@tromey.com>
598
599         * rust-lang.c (rust_subscript): Handle slices in
600         EVAL_AVOID_SIDE_EFFECTS case.
601
602 2017-10-02  Tom Tromey  <tom@tromey.com>
603
604         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
605
606 2017-10-02  Tom Tromey  <tom@tromey.com>
607
608         * rust-lang.h (rust_slice_type): Add "extern".
609
610 2017-10-02  Tom Tromey  <tom@tromey.com>
611             Pedro Alves  <palves@redhat.com>
612
613         * ada-lang.h (ada_exc_info::operator<): Make const.
614         (ada_exc_info::operator==): Make const.
615         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
616         Make const.
617
618 2017-09-29  Tom Tromey  <tom@tromey.com>
619
620         * target.c (read_whatever_is_readable): Change type of "result".
621         Update.
622         (free_memory_read_result_vector): Remove.
623         (read_memory_robust): Change return type.  Update.
624         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
625         bin2hex, std::string.
626         * target.h (memory_read_result_s): Remove typedef.
627         (free_memory_read_result_vector): Remove.
628         (read_memory_robust): Return std::vector.
629
630 2017-09-29  Tom Tromey  <tom@tromey.com>
631
632         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
633
634 2017-09-29  Tom Tromey  <tom@tromey.com>
635
636         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
637         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
638         operator< and operator==.
639         (ada_exceptions_list): Return a std::vector.
640         * ada-lang.c (ada_exc_info::operator<): Rename from
641         compare_ada_exception_info.
642         (ada_exc_info::operator==): New.
643         (sort_remove_dups_ada_exceptions_list): Change type of
644         "exceptions".
645         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
646         (ada_add_global_exceptions): Likewise.
647         (ada_exceptions_list_1): Return a std::vector.
648         (ada_exceptions_list): Likewise.
649
650 2017-09-29  Tom Tromey  <tom@tromey.com>
651
652         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
653         'std::set *'.
654         (print_one_inferior): Update.
655         (free_vector_of_ints): Remove.
656         (list_available_thread_groups): Change "ids" to std::set.
657         (mi_cmd_list_thread_groups): Update.
658         (struct collect_cores_data) <core>: Now a std::set.
659         (collect_cores): Update.
660         (unique): Remove.
661         (print_one_inferior): Update.
662
663 2017-09-29  Tom Tromey  <tom@tromey.com>
664
665         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
666         (mi_execute_async_cli_command): Likewise.
667         (mi_cmd_trace_frame_collected): Use field_fmt.
668
669 2017-09-29  Tom Tromey  <tom@tromey.com>
670
671         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
672         gdb::byte_vector.
673
674 2017-09-29  Tom Tromey  <tom@tromey.com>
675
676         * mi/mi-parse.c (mi_parse): Remove unused declaration.
677
678 2017-09-29  Tom Tromey  <tom@tromey.com>
679
680         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
681
682 2017-09-29  Tom Tromey  <tom@tromey.com>
683
684         * varobj.h (varobj_gen_name): Return std::string.
685         * varobj.c (varobj_gen_name): Return std::string.
686         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
687         (mi_cmd_var_delete): Don't copy "name".
688
689 2017-09-29  Tom Tromey  <tom@tromey.com>
690
691         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
692         (mi_cmd_break_insert_1): Update.
693
694 2017-09-29  Tom Tromey  <tom@tromey.com>
695
696         * target.h (make_scoped_defer_target_commit_resume): Update.
697         * target.c (make_scoped_defer_target_commit_resume): Rename from
698         make_cleanup_defer_target_commit_resume.  Return a
699         scoped_restore.
700         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
701
702 2017-09-29  Tom Tromey  <tom@tromey.com>
703
704         * main.c (captured_main_1): Remove unused declaration.
705         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
706
707 2017-09-29  Tom Tromey  <tom@tromey.com>
708
709         * symtab.c (search_symbols): Remove unused outer cleanup.
710         (make_source_files_completion_list): Remove unused declaration.
711
712 2017-09-29  Tom Tromey  <tom@tromey.com>
713
714         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
715
716 2017-09-29  Tom Tromey  <tom@tromey.com>
717
718         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
719         gdb::byte_vector.
720
721 2017-09-29  Tom Tromey  <tom@tromey.com>
722
723         * complaints.c (vcomplaint): Use std::string.
724
725 2017-09-29  Tom Tromey  <tom@tromey.com>
726
727         * tracepoint.c (trace_variable_command): Use std::string.
728         (encode_actions_1): Remove unused declarations.
729         (create_tsv_from_upload): Use std::string.
730
731 2017-09-29  Tom Tromey  <tom@tromey.com>
732
733         * cp-support.c (gdb_demangle): Use std::string.
734
735 2017-09-29  Tom Tromey  <tom@tromey.com>
736
737         * stack.c (parse_frame_specification): Use std::string
738         (info_frame_command): Use gdb::unique_xmalloc_ptr.
739
740 2017-09-29  Tom Tromey  <tom@tromey.com>
741
742         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
743
744 2017-09-29  Tom Tromey  <tom@tromey.com>
745
746         * utils.c (vfprintf_maybe_filtered): Use std::string.
747         (vfprintf_unfiltered): Likewise.
748
749 2017-09-29  Tom Tromey  <tom@tromey.com>
750
751         * event-top.c (top_level_prompt): Return std::string.
752         (display_gdb_prompt): Update.
753
754 2017-09-29  Tom Tromey  <tom@tromey.com>
755
756         * unittests/common-utils-selftests.c (format): New function.
757         (string_vprintf_tests): New function.
758         (_initialize_common_utils_selftests): Register new tests.
759         * common/common-utils.c (string_vprintf): New function.
760         * common/common-utils.h (string_vprintf): Declare.
761
762 2017-09-29  Pedro Alves  <palves@redhat.com>
763
764         * common/rsp-low.c (unpack_varlen_hex): Constify.
765         * common/rsp-low.h (unpack_varlen_hex): Constify.
766         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
767         Constify.
768         * remote.c (remote_set_permissions, read_ptid)
769         (remote_current_thread, remote_get_threads_with_qthreadinfo)
770         (remote_static_tracepoint_marker_at)
771         (remote_static_tracepoint_markers_by_strid)
772         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
773         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
774         (parse_tracepoint_definition, parse_tsv_definition)
775         (parse_static_tracepoint_marker_definition): Constify.
776         * tracepoint.h (parse_static_tracepoint_marker_definition)
777         (parse_trace_status, parse_tracepoint_status)
778         (parse_tracepoint_definition, parse_tsv_definition): Constify.
779
780 2017-09-29  Pedro Alves  <palves@redhat.com>
781
782         * remote.c (target_buf, target_buf_size): Delete.
783         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
784         Use the connection's packet buffer instead.
785         All callers adjusted.
786         (_initialize_remote): Remove references to target_buf and
787         target_buf_size.
788
789 2017-09-28  Pedro Alves  <palves@redhat.com>
790
791         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
792         unittests/common-utils-selftests.c.
793         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
794         (COMMON_OBS): Remove utils-selftests.o.
795         * utils-selftests.c: Move to ...
796         * unittests/common-utils-selftests.c: ... here and rename self
797         test to "string_printf".
798
799 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
800
801         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
802         having NULL cus or tus.
803
804 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
805
806         * arm-tdep.c: (convert_from_extended): Remove.
807         (convert_to_extended): Likewise.
808         (arm_extract_return_value): Use convert_typed_floating.
809         (arm_store_return_value): Likewise.
810
811         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
812         * sh-tdep.c: Do not include "floatformat.h".
813         (sh_littlebyte_bigword_type): New function.
814         (sh_register_convert_to_virtual): Use convert_typed_floating.
815         (sh_register_convert_to_raw): Likewise.
816         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
817         (sh64_littlebyte_bigword_type): New function.
818         (sh64_extract_return_value): Use convert_typed_floating.
819         (sh64_register_convert_to_virtual): Likewise.
820         (sh64_register_convert_to_raw): Likewise.
821
822 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
823
824         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
825         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
826
827         * gdbtypes.h (union type_specific): Make field floatformat hold
828         just a single struct floatformat, not an array.
829         (floatformat_from_type): Move here.
830         * gdbtypes.c (floatformat_from_type): Move here.  Update to
831         changed TYPE_FLOATFORMAT definition.
832         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
833         (recursive_dump_type): Likewise.
834         (init_float_type): Install correct floatformat for byte order.
835         (arch_float_type): Likewise.
836
837 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
838
839         * gdbtypes.c (init_type): Change incoming argument from
840         length-in-bytes to length-in-bits.  Assert length is a
841         multiple of TARGET_CHAR_BITS.
842         (arch_type, arch_flags_type): Likewise.
843         (init_integer_type): Update call to init_type.
844         (init_character_type): Likewise.
845         (init_boolean_type): Likewise.
846         (init_float_type): Likewise.
847         (init_decfloat_type): Likewise.
848         (init_complex_type): Likewise.
849         (init_pointer_type): Likewise.
850         (objfile_type): Likewise.
851         (arch_integer_type): Update call to arch_type.
852         (arch_character_type): Likewise.
853         (arch_boolean_type): Likewise.
854         (arch_float_type): Likewise.
855         (arch_decfloat_type): Likewise.
856         (arch_complex_type): Likewise.
857         (arch_pointer_type): Likewise.
858         (gdbtypes_post_init): Likewise.
859
860         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
861         (read_base_type): Likewise.
862         * mdebugread.c (basic_type): Likewise.
863         * stabsread.c (dbx_init_float_type): Likewise.
864         (rs6000_builtin_type): Likewise.
865         (read_range_type): Likewise.  Also, fix call to init_integer_type
866         with erroneous length argument.
867
868         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
869         * d-lang.c (build_d_types): Likewise.
870         * f-lang.c (build_fortran_types): Likewise.
871         * go-lang.c (build_go_types): Likewise.
872         * opencl-lang.c (build_opencl_types): Likewise.
873         * jit.c (finalize_symtab): Likewise.
874         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
875         (build_std_type_info_type): Likewise.
876         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
877         update call to arch_flags_type.
878
879         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
880         arch_type.
881         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
882         * windows-tdep.c (windows_get_tlb_type): Likewise.
883
884         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
885         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
886         * m32c-tdep.c (make_types): Likewise.
887         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
888         (rl78_psw_type): Update call to arch_flags_type.
889         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
890         * rx-tdep.c (rx_psw_type): Likewise.
891         (rx_fpsw_type): Likewise.
892         * sparc-tdep.c (sparc_psr_type): Likewise.
893         (sparc_fsr_type): Likewise.
894         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
895         (sparc64_ccr_type): Likewise.
896         (sparc64_fsr_type): Likewise.
897         (sparc64_fprs_type): Likewise.
898
899 2017-09-27  Tom Tromey  <tom@tromey.com>
900
901         * findcmd.c (find_command): Constify.
902
903 2017-09-27  Tom Tromey  <tom@tromey.com>
904
905         * ada-tasks.c (task_command_1, task_command): Constify.
906
907 2017-09-27  Tom Tromey  <tom@tromey.com>
908
909         * symtab.c (maintenance_print_symbol_cache)
910         (maintenance_flush_symbol_cache)
911         (maintenance_print_symbol_cache_statistics): Constify.
912
913 2017-09-27  Tom Tromey  <tom@tromey.com>
914
915         * inferior.c (detach_inferior_command, kill_inferior_command)
916         (inferior_command): Constify.
917
918 2017-09-27  Tom Tromey  <tom@tromey.com>
919
920         * regcache.c (regcache_print, maintenance_print_registers)
921         (maintenance_print_raw_registers)
922         (maintenance_print_cooked_registers)
923         (maintenance_print_register_groups)
924         (maintenance_print_remote_registers): Constify.
925
926 2017-09-27  Tom Tromey  <tom@tromey.com>
927
928         * printcmd.c (map_display_numbers, undisplay_command)
929         (enable_disable_display_command, enable_display_command)
930         (disable_display_command): Constify.
931
932 2017-09-27  Tom Tromey  <tom@tromey.com>
933
934         * breakpoint.h (delete_command): Don't declare.
935         * breakpoint.c (delete_command, enable_once_command)
936         (enable_count_command, enable_delete_command, breakpoint_1)
937         (maintenance_info_breakpoints, stopin_command, stopat_command)
938         (delete_command, delete_trace_command, save_breakpoints)
939         (save_breakpoints_command, save_tracepoints_command): Constify.
940
941 2017-09-27  Tom Tromey  <tom@tromey.com>
942
943         * macrocmd.c (macro_expand_command, macro_expand_once_command)
944         (skip_ws, extract_identifier, macro_define_command)
945         (macro_undef_command, macro_list_command): Constify.
946
947 2017-09-27  Tom Tromey  <tom@tromey.com>
948
949         * infcmd.c (environment_info, set_environment_command)
950         (unset_environment_command, path_info, info_proc_cmd_1)
951         (info_proc_cmd_mappings, info_proc_cmd_stat)
952         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
953         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
954
955 2017-09-27  Tom Tromey  <tom@tromey.com>
956
957         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
958         Constify.
959
960 2017-09-27  Tom Tromey  <tom@tromey.com>
961
962         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
963
964 2017-09-27  Tom Tromey  <tom@tromey.com>
965
966         * demangle.c (demangle_command): Constify.
967
968 2017-09-27  Tom Tromey  <tom@tromey.com>
969
970         * progspace.c (maintenance_info_program_spaces_command):
971         Constify.
972
973 2017-09-27  Tom Tromey  <tom@tromey.com>
974
975         * compile/compile.c (check_raw_argument, compile_file_command)
976         (compile_code_command, compile_print_command): Constify.
977
978 2017-09-27  Tom Tromey  <tom@tromey.com>
979
980         * reggroups.c (maintenance_print_reggroups): Constify.
981
982 2017-09-27  Tom Tromey  <tom@tromey.com>
983
984         * dwarf2read.c (save_gdb_index_command): Constify.
985
986 2017-09-27  Tom Tromey  <tom@tromey.com>
987
988         * stap-probe.c (info_probes_stap_command): Constify.
989
990 2017-09-27  Tom Tromey  <tom@tromey.com>
991
992         * fork-child.c (unset_exec_wrapper_command): Constify.
993
994 2017-09-27  Tom Tromey  <tom@tromey.com>
995
996         * btrace.c (get_uint, get_context_size, no_chunk)
997         (maint_btrace_packet_history_cmd)
998         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
999         (maint_info_btrace_cmd): Constify.
1000
1001 2017-09-27  Tom Tromey  <tom@tromey.com>
1002
1003         * reverse.c (delete_bookmark_command): Constify.
1004
1005 2017-09-27  Tom Tromey  <tom@tromey.com>
1006
1007         * remote.c (set_memory_packet_size)
1008         (set_memory_write_packet_size, show_memory_write_packet_size)
1009         (set_memory_read_packet_size, show_memory_read_packet_size)
1010         (compare_sections_command, packet_command, remote_put_command)
1011         (remote_get_command, remote_delete_command): Constify.
1012
1013 2017-09-27  Tom Tromey  <tom@tromey.com>
1014
1015         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1016         (set_mipsfpu_double_command, set_mipsfpu_none_command)
1017         (set_mipsfpu_auto_command): Constify.
1018
1019 2017-09-27  Tom Tromey  <tom@tromey.com>
1020
1021         * cli/cli-cmds.h (cd_command): Constify.
1022         * cli/cli-cmds.c (cd_command): Constify.
1023
1024 2017-09-27  Tom Tromey  <tom@tromey.com>
1025
1026         * thread.c (thread_name_command, thread_find_command): Constify.
1027
1028 2017-09-27  Tom Tromey  <tom@tromey.com>
1029
1030         * probe.c (enable_probes_command, disable_probes_command):
1031         Constify.
1032
1033 2017-09-27  Tom Tromey  <tom@tromey.com>
1034
1035         * symfile.c (symbol_file_command): Constify.
1036         * gdbcore.h (deprecated_file_changed_hook): Constify.
1037         * exec.c (deprecated_file_changed_hook, exec_file_command)
1038         (file_command): Constify.
1039         * defs.h (symbol_file_command): Constify.
1040
1041 2017-09-27  Tom Tromey  <tom@tromey.com>
1042
1043         * remote-fileio.c (set_system_call_allowed)
1044         (show_system_call_allowed): Constify.
1045
1046 2017-09-27  Tom Tromey  <tom@tromey.com>
1047
1048         * tracepoint.c (delete_trace_variable_command)
1049         (tfind_end_command, tfind_start_command, tfind_pc_command)
1050         (tfind_tracepoint_command, tfind_line_command)
1051         (tfind_range_command, tfind_outside_command): Constify.
1052
1053 2017-09-27  Tom Tromey  <tom@tromey.com>
1054
1055         * ax-gdb.c (maint_agent_printf_command, agent_command)
1056         (agent_eval_command): Constify.
1057
1058 2017-09-27  Tom Tromey  <tom@tromey.com>
1059
1060         * tracepoint.c (info_scope_command): Constify.
1061         * python/python.c (gdbpy_decode_line): Constify.
1062         * python/py-breakpoint.c (bppy_init): Constify.
1063         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1064         * location.h: (new_linespec_location)
1065         (string_to_event_location_basic, string_to_event_location):
1066         Constify.
1067         * location.c (new_linespec_location)
1068         (string_to_event_location_basic, string_to_event_location):
1069         Constify.
1070         * linespec.h (decode_line_with_current_source)
1071         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1072         * linespec.c (linespec_lex_to_end)
1073         (decode_line_with_current_source)
1074         (decode_line_with_last_displayed): Constify.
1075         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1076         Constify.
1077         * cli/cli-cmds.c (edit_command, list_command): Constify.
1078         * breakpoint.h (until_break_command, watch_command_wrapper)
1079         (awatch_command_wrapper, rwatch_command_wrapper)
1080         (init_ada_exception_breakpoint): Constify.
1081         * breakpoint.c (break_command_1, dprintf_command)
1082         (break_range_command, watch_command_wrapper)
1083         (rwatch_command_wrapper, awatch_command_wrapper)
1084         (until_break_command, init_ada_exception_breakpoint)
1085         (strace_marker_create_sals_from_location, trace_command)
1086         (ftrace_command, strace_command, struct tracepoint): Constify.
1087         * ax-gdb.c (agent_command_1): Constify.
1088         * ada-lang.c (ada_exception_sal): Constify.
1089
1090 2017-09-27  Tom Tromey  <tom@tromey.com>
1091
1092         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1093         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1094         (get_context_size, no_chunk, get_insn_history_modifiers)
1095         (cmd_record_insn_history, get_call_history_modifiers)
1096         (cmd_record_call_history): Constify.
1097
1098 2017-09-27  Tom Tromey  <tom@tromey.com>
1099
1100         * source.c (show_substitute_path_command)
1101         (unset_substitute_path_command, set_substitute_path_command):
1102         Constify.
1103
1104 2017-09-27  Tom Tromey  <tom@tromey.com>
1105
1106         * typeprint.c (maintenance_print_type): Constify.
1107         * maint.c (maintenance_dump_me, maintenance_demangle)
1108         (maintenance_time_display, maintenance_info_sections)
1109         (maintenance_print_statistics, maintenance_deprecate)
1110         (maintenance_undeprecate): Constify.
1111         (maintenance_do_deprecate): Constify.  Use std::string.
1112         (maintenance_selftest): Constify.
1113         * gdbtypes.h (maintenance_print_type): Constify.
1114
1115 2017-09-27  Tom Tromey  <tom@tromey.com>
1116
1117         * hppa-tdep.c (unwind_command): Constify.
1118
1119 2017-09-27  Tom Tromey  <tom@tromey.com>
1120
1121         * target-descriptions.c (unset_tdesc_filename_cmd)
1122         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1123         Constify.
1124
1125 2017-09-27  Tom Tromey  <tom@tromey.com>
1126
1127         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1128
1129 2017-09-27  Tom Tromey  <tom@tromey.com>
1130
1131         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1132
1133 2017-09-27  Tom Tromey  <tom@tromey.com>
1134
1135         * tui/tui-regs.c (tui_reg_command): Constify.
1136
1137 2017-09-27  Tom Tromey  <tom@tromey.com>
1138
1139         * skip.c (skip_file_command, skip_function_command)
1140         (skip_enable_command, skip_disable_command, skip_delete_command):
1141         Constify.
1142
1143 2017-09-27  Tom Tromey  <tom@tromey.com>
1144
1145         * record-btrace.c (cmd_record_btrace_bts_start)
1146         (cmd_record_btrace_pt_start): Constify.
1147
1148 2017-09-27  Tom Tromey  <tom@tromey.com>
1149
1150         * symmisc.c (maintenance_print_symbols)
1151         (maintenance_print_msymbols, maintenance_print_objfiles)
1152         (maintenance_info_symtabs, maintenance_check_symtabs)
1153         (maintenance_expand_symtabs, maintenance_info_line_tables):
1154         Constify.
1155
1156 2017-09-27  Tom Tromey  <tom@tromey.com>
1157
1158         * top.c (new_ui_command): Constify.
1159
1160 2017-09-27  Tom Tromey  <tom@tromey.com>
1161
1162         * symfile.c (add_symbol_file_command)
1163         (remove_symbol_file_command, list_overlays_command)
1164         (map_overlay_command, unmap_overlay_command)
1165         (overlay_auto_command, overlay_manual_command)
1166         (overlay_off_command, overlay_load_command): Constify.
1167
1168 2017-09-27  Tom Tromey  <tom@tromey.com>
1169
1170         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1171         (info_spu_mailbox_command, info_spu_dma_command)
1172         (info_spu_proxydma_command): Constify.
1173
1174 2017-09-27  Tom Tromey  <tom@tromey.com>
1175
1176         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1177
1178 2017-09-27  Tom Tromey  <tom@tromey.com>
1179
1180         * cli/cli-script.c (user_defined_command): Constify.
1181
1182 2017-09-27  Tom Tromey  <tom@tromey.com>
1183
1184         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1185         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1186         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1187         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1188         (dump_binary_value, append_binary_memory, append_binary_value):
1189         Constify.
1190         (struct dump_context) <func>: Constify.
1191         (add_dump_command): Update.
1192
1193 2017-09-27  Tom Tromey  <tom@tromey.com>
1194
1195         * cli/cli-cmds.c (show_version, show_configuration)
1196         (source_command, show_user): Constify.
1197
1198 2017-09-27  Tom Tromey  <tom@tromey.com>
1199
1200         * target.c (maintenance_print_target_stack): Constify.
1201
1202 2017-09-27  Tom Tromey  <tom@tromey.com>
1203
1204         * interps.c (interpreter_exec_cmd): Constify.
1205
1206 2017-09-27  Tom Tromey  <tom@tromey.com>
1207
1208         * record-full.c (cmd_record_full_restore): Constify.
1209
1210 2017-09-27  Tom Tromey  <tom@tromey.com>
1211
1212         * memattr.c (enable_mem_command, disable_mem_command)
1213         (delete_mem_command): Constify.
1214
1215 2017-09-27  Tom Tromey  <tom@tromey.com>
1216
1217         * value.c (show_convenience): Constify.
1218
1219 2017-09-27  Tom Tromey  <tom@tromey.com>
1220
1221         * gdbcore.h (core_file_command): Update.
1222         * corefile.c (core_file_command): Constify.
1223
1224 2017-09-27  Tom Tromey  <tom@tromey.com>
1225
1226         * user-regs.c (maintenance_print_user_registers): Constify.
1227
1228 2017-09-27  Tom Tromey  <tom@tromey.com>
1229
1230         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1231
1232 2017-09-27  Tom Tromey  <tom@tromey.com>
1233
1234         * cp-support.c (first_component_command): Constify.
1235
1236 2017-09-27  Tom Tromey  <tom@tromey.com>
1237
1238         * psymtab.c (maintenance_print_psymbols)
1239         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1240         Constify.
1241
1242 2017-09-27  Tom Tromey  <tom@tromey.com>
1243
1244         * windows-tdep.c (display_tib): Constify.
1245
1246 2017-09-27  Tom Tromey  <tom@tromey.com>
1247
1248         * linux-fork.c (delete_checkpoint_command)
1249         (detach_checkpoint_command): Constify.
1250
1251 2017-09-27  Tom Tromey  <tom@tromey.com>
1252
1253         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1254
1255 2017-09-27  Tom Tromey  <tom@tromey.com>
1256
1257         * arc-tdep.c (dump_arc_instruction_command): Constify.
1258
1259 2017-09-27  Tom Tromey  <tom@tromey.com>
1260
1261         * valprint.c (set_radix, show_radix): Constify.
1262
1263 2017-09-27  Tom Tromey  <tom@tromey.com>
1264
1265         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1266
1267 2017-09-27  Tom Tromey  <tom@tromey.com>
1268
1269         * command.h (not_just_help_class_command): Update.
1270         * cli/cli-decode.h (not_just_help_class_command): Update.
1271         * cli/cli-decode.c (not_just_help_class_command): Constify.
1272
1273 2017-09-27  Tom Tromey  <tom@tromey.com>
1274
1275         * gdb_bfd.c (maintenance_info_bfds): Constify.
1276
1277 2017-09-27  Tom Tromey  <tom@tromey.com>
1278
1279         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1280         overloads.
1281         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1282         (do_const_cfunc): New function.
1283         (cmd_cfunc_eq): New overload.
1284         (cli_user_command_p): Check do_const_cfunc.
1285         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1286         const_cfunc.
1287         * command.h (add_cmd): Add const overload and no-function
1288         overload.
1289         (set_cmd_cfunc): Add const overload.
1290         (cmd_const_cfunc_ftype): Declare.
1291         (cmd_cfunc_eq): Add const overload.
1292         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1293         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1294         overload.
1295
1296 2017-09-27  Tom Tromey  <tom@tromey.com>
1297
1298         * macroexp.c (get_next_token_for_substitution): New function.
1299         (substitute_args): Call it.  Check for __VA_OPT__.
1300
1301 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1302             Pedro Alves <palves@redhat.com>
1303
1304         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1305         producer_is_icc_lt_14.
1306         (producer_is_icc_lt_14): New function.
1307         (check_producer): Add code for checking version of ICC.
1308         (producer_is_icc): Move to producer.c.
1309         (read_structure_type): Restrict ICC workaround to ICC<14.
1310         * producer.c: Include selftest.h.
1311         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1312         New functions.
1313         * producer.h (producer_is_icc): New declaration.
1314
1315 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1316
1317         * Makefile.in (SFILES): Add producer.c.
1318         (COMMON_OBS): Add producer.o
1319         * amd64-tdep.c (producer.h): Add new include.
1320         * dwarf2read.c (producer.h): Add new include.
1321         * producer.c: New file.
1322         * producer.h: New file.
1323         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1324         producer.c.
1325         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1326         producer.h.
1327
1328 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1329
1330         * configure.ac: Search ncursesw before ncurses.
1331         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1332         * gdb_curses.h: Include <ncursesw/ncurses.h>
1333         * config.in, configure: Regenerate.
1334
1335 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1336
1337         PR gdb/22185
1338         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1339         obsolete.
1340         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1341         Remove i386sol2 support.
1342         * configure.nat <i386sol2>: Remove.
1343         <sol2-64>: Fold into ...
1344         <sol2>: ... this.
1345         Move common settings to default section.
1346         Add sol-thread.o.
1347         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1348         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1349         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1350         <i[34567]86-*-solaris*>: Remove.
1351         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1352
1353         * configure.ac: Remove wctype in libw check.
1354         (_MSE_INT_H): Don't define on Solaris 7-9.
1355         <solaris*>: Remove libthread_db.so.1 check.
1356         * configure: Regenerate.
1357         * config.in: Regenerate.
1358
1359         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1360         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1361         (gdb_ps_size_t): Remove.
1362         Use base types in users.
1363         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1364
1365         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1366
1367 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1368
1369         PR build/22206
1370         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1371         (adi_is_addr_mapped): Likewise.
1372         (PSR_ICC): Don't redefine.
1373         (PSR_IMPL): Likewise.
1374
1375 2017-09-25  Tom Tromey  <tom@tromey.com>
1376
1377         * regcache.c (regcache::dump): Use string_printf.
1378
1379 2017-09-25  Tom Tromey  <tom@tromey.com>
1380
1381         * regcache.c (class regcache_invalidator): New.
1382         (struct register_to_invalidate): Remove.
1383         (make_cleanup_regcache_invalidate): Remove.
1384         (regcache::raw_write): Use regcache_invalidator.
1385
1386 2017-09-25  Tom Tromey  <tom@tromey.com>
1387
1388         * spu-tdep.c (spu2ppu_sniffer): Update.
1389         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1390         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1391         Remove.
1392         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1393         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1394         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1395         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1396         (frame_pop): Update.
1397
1398 2017-09-25  Tom Tromey  <tom@tromey.com>
1399
1400         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1401         * regcache.h (regcache_xfree): Don't declare.
1402         * regcache.c (regcache_xfree): Remove.
1403         (do_regcache_xfree): Use delete.
1404         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1405         * linux-fork.c (free_fork): Use delete.
1406         (fork_save_infrun_state): Likewise.
1407         * jit.c (jit_dealloc_cache): Use delete.
1408         * infrun.c (discard_infcall_suspend_state): Use delete.
1409
1410 2017-09-25  Tom Tromey  <tom@tromey.com>
1411
1412         * regcache.h (regcache_xmalloc): Don't declare.
1413         (regcache_raw_set_cached_value): Update comment.
1414         * regcache.c (regcache_xmalloc): Remove.
1415         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1416         * jit.c (jit_frame_sniffer): Use new.
1417         * frame.c (frame_save_as_regcache): Use new.
1418
1419 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1420
1421         * NEWS: Advertise support for guarded-storage registers on IBM z.
1422
1423 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1424
1425         * s390-linux-nat.c (have_regset_gs): New static variable.
1426         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1427         control block and guarded-storage broadcast control regsets.
1428         (s390_read_description): Detect whether the target has
1429         guarded-storage support, return appropriate tdesc.
1430         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1431         (features/s390x-gs-linux64.c): Likewise.
1432         (struct gdbarch_tdep) <have_gs>: New field.
1433         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1434         (s390_gsbc_regset): New variables.
1435         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1436         and s390_gsbc_regset, if applicable.
1437         (s390_core_read_description): Check whether core file was from a
1438         target with guarded-storage support; include appropriate regsets.
1439         (s390_gdbarch_init): Add registers for guarded-storage support.
1440         (_initialize_s390_tdep): Initialize new target descriptions that
1441         include registers for guarded-storage support.
1442         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1443         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1444         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1445         (S390_NUM_REGS): Adjust macro definition.
1446         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1447         (tdesc_s390x_gs_linux64): New declarations.
1448
1449 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1450
1451         * features/s390-gs-linux64.xml: New file.
1452         * features/s390-gs.xml: New file.
1453         * features/s390-gsbc.xml: New file.
1454         * features/s390x-gs-linux64.xml: New file.
1455         * features/Makefile (WHICH): Add s390-gs-linux64 and
1456         s390x-gs-linux64.
1457         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1458         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1459         * features/s390-gs-linux64.c: New generated file.
1460         * features/s390x-gs-linux64.c: New file.
1461         * regformats/s390-gs-linux64.dat: New file.
1462         * regformats/s390x-gs-linux64.dat: New file.
1463
1464 2017-09-23  Tom Tromey  <tom@tromey.com>
1465
1466         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1467
1468 2017-09-22  Tom Tromey  <tom@tromey.com>
1469
1470         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1471         type to scoped_restore_tmpl.
1472         <scoped_input_handler>: Initialize m_quit_handler directly.
1473
1474 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1475
1476         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1477         (cd_command): Likewise.  Free "current_directory" before
1478         assigning to it.
1479         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1480         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1481         * top.c (gdb_dirbuf): Remove global declaration.
1482         * top.h (gdb_dirbuf): Likewise.
1483
1484 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1485
1486         * gnulib/aclocal.m4: Regenerate.
1487         * gnulib/config.in: Regenerate.
1488         * gnulib/configure: Regenerate.
1489         * gnulib/import/Makefile.am: Regenerate.
1490         * gnulib/import/Makefile.in: Regenerate.
1491         * gnulib/import/assure.h: New file.
1492         * gnulib/import/at-func.c: Likewise
1493         * gnulib/import/chdir-long.c: New file.
1494         * gnulib/import/chdir-long.h: New file.
1495         * gnulib/import/cloexec.c: New file.
1496         * gnulib/import/cloexec.h: New file.
1497         * gnulib/import/close.c: New file.
1498         * gnulib/import/closedir.c: New file.
1499         * gnulib/import/dirent-private.h: New file.
1500         * gnulib/import/dup-safer.c: New file.
1501         * gnulib/import/dup.c: New file.
1502         * gnulib/import/dup2.c: New file.
1503         * gnulib/import/error.c: New file.
1504         * gnulib/import/error.h: New file.
1505         * gnulib/import/exitfail.c: New file.
1506         * gnulib/import/exitfail.h: New file.
1507         * gnulib/import/fchdir.c: New file.
1508         * gnulib/import/fcntl.c: New file.
1509         * gnulib/import/fcntl.in.h: New file.
1510         * gnulib/import/fd-hook.c: New file.
1511         * gnulib/import/fd-hook.h: New file.
1512         * gnulib/import/fd-safer.c: New file.
1513         * gnulib/import/fdopendir.c: New file.
1514         * gnulib/import/filename.h: New file.
1515         * gnulib/import/filenamecat-lgpl.c: New file.
1516         * gnulib/import/filenamecat.h: New file.
1517         * gnulib/import/fstat.c: New file.
1518         * gnulib/import/fstatat.c: New file.
1519         * gnulib/import/getcwd-lgpl.c: New file.
1520         * gnulib/import/getcwd.c: New file.
1521         * gnulib/import/getdtablesize.c: New file.
1522         * gnulib/import/getlogin_r.c: New file.
1523         * gnulib/import/getprogname.c: New file.
1524         * gnulib/import/getprogname.h: New file.
1525         * gnulib/import/gettext.h: New file.
1526         * gnulib/import/glob-libc.h: New file.
1527         * gnulib/import/glob.c: New file.
1528         * gnulib/import/glob.in.h: New file.
1529         * gnulib/import/intprops.h: New file.
1530         * gnulib/import/m4/chdir-long.m4: New file.
1531         * gnulib/import/m4/close.m4: New file.
1532         * gnulib/import/m4/closedir.m4: New file.
1533         * gnulib/import/m4/d-ino.m4: New file.
1534         * gnulib/import/m4/d-type.m4: New file.
1535         * gnulib/import/m4/dup.m4: New file.
1536         * gnulib/import/m4/dup2.m4: New file.
1537         * gnulib/import/m4/error.m4: New file.
1538         * gnulib/import/m4/fchdir.m4: New file.
1539         * gnulib/import/m4/fcntl.m4: New file.
1540         * gnulib/import/m4/fcntl_h.m4: New file.
1541         * gnulib/import/m4/fdopendir.m4: New file.
1542         * gnulib/import/m4/filenamecat.m4: New file.
1543         * gnulib/import/m4/fstat.m4: New file.
1544         * gnulib/import/m4/fstatat.m4: New file.
1545         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1546         * gnulib/import/m4/getcwd-path-max.m4: New file.
1547         * gnulib/import/m4/getcwd.m4: New file.
1548         * gnulib/import/m4/getdtablesize.m4: New file.
1549         * gnulib/import/m4/getlogin_r.m4: New file.
1550         * gnulib/import/m4/getprogname.m4: New file.
1551         * gnulib/import/m4/glob.m4: New file.
1552         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1553         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1554         * gnulib/import/m4/mempcpy.m4: New file.
1555         * gnulib/import/m4/memrchr.m4: New file.
1556         * gnulib/import/m4/mode_t.m4: New file.
1557         * gnulib/import/m4/msvc-inval.m4: New file.
1558         * gnulib/import/m4/msvc-nothrow.m4: New file.
1559         * gnulib/import/m4/open.m4: New file.
1560         * gnulib/import/m4/openat.m4: New file.
1561         * gnulib/import/m4/opendir.m4: New file.
1562         * gnulib/import/m4/readdir.m4: New file.
1563         * gnulib/import/m4/realloc.m4: New file.
1564         * gnulib/import/m4/rewinddir.m4: New file.
1565         * gnulib/import/m4/save-cwd.m4: New file.
1566         * gnulib/import/m4/strdup.m4: New file.
1567         * gnulib/import/m4/strerror.m4: New file.
1568         * gnulib/import/m4/unistd-safer.m4: New file.
1569         * gnulib/import/mempcpy.c: New file.
1570         * gnulib/import/memrchr.c: New file.
1571         * gnulib/import/msvc-inval.c: New file.
1572         * gnulib/import/msvc-inval.h: New file.
1573         * gnulib/import/msvc-nothrow.c: New file.
1574         * gnulib/import/msvc-nothrow.h: New file.
1575         * gnulib/import/open.c: New file.
1576         * gnulib/import/openat-die.c: New file.
1577         * gnulib/import/openat-priv.h: New file.
1578         * gnulib/import/openat-proc.c: New file.
1579         * gnulib/import/openat.c: New file.
1580         * gnulib/import/openat.h: New file.
1581         * gnulib/import/opendir.c: New file.
1582         * gnulib/import/pipe-safer.c: New file.
1583         * gnulib/import/readdir.c: New file.
1584         * gnulib/import/realloc.c: New file.
1585         * gnulib/import/rewinddir.c: New file.
1586         * gnulib/import/save-cwd.c: New file.
1587         * gnulib/import/save-cwd.h: New file.
1588         * gnulib/import/strdup.c: New file.
1589         * gnulib/import/strerror-override.c: New file.
1590         * gnulib/import/strerror-override.h: New file.
1591         * gnulib/import/strerror.c: New file.
1592         * gnulib/import/unistd--.h: New file.
1593         * gnulib/import/unistd-safer.h: New file.
1594         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1595         "getcwd" and "glob".
1596         * ser-tcp.c: Undefine "close" before redefining it.
1597
1598 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1599
1600         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1601         get rid of res_val.
1602
1603 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1604
1605         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1606         <sol2,sparc>: Likewise.
1607         <sol2-64,i386>: Likewise.
1608
1609         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1610         -Wdeprecated-declarations on *-*-solaris*.
1611         * configure: Regenerate.
1612
1613         * procfs.c: Include "nat/inferior.h".
1614         (procfs_info_proc): Fix typo.
1615
1616 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1617
1618         * remote.c (vector): Include.
1619         (struct private_thread_info): Add field, thread_handle.
1620         (free_private_thread_info): Deallocate storage associated with
1621         thread handle.
1622         (get_private_info_thread): Initialize `thread_handle' field.
1623         (struct thread_item): Add field, thread_handle.
1624         (clear_threads_listing_context): Deallocate storage associated
1625         with thread handle.
1626         (start_thread): Add support for "handle" attribute.
1627         (thread_attributes): Add "handle".
1628         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1629         field.
1630         (remote_update_thread_list): Update thread_handle.
1631         (remote_thread_handle_to_thread_info): New function.
1632         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1633
1634 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1635
1636         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1637         function.
1638         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1639         * python/python-internal.h (thread_object_type): Declare.
1640
1641 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1642
1643         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1644         (target_thread_handle_to_thread_info): Declare.
1645         * target.c (target_thread_handle_to_thread_info): New function.
1646         * target-delegates.c: Regenerate.
1647         * gdbthread.h (find_thread_by_handle): Declare.
1648         * thread.c (find_thread_by_handle): New function.
1649         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1650         function.
1651         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1652
1653 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1654
1655         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1656
1657 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1658
1659         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1660
1661 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1662
1663         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1664         to gdb_target_obs.
1665
1666 2017-09-20  Tom Tromey  <tom@tromey.com>
1667
1668         * breakpoint.c (struct counted_command_line): Remove.
1669         (breakpoint_commands): Update.
1670         (alloc_counted_command_line, incref_counted_command_line)
1671         (decref_counted_command_line, do_cleanup_counted_command_line)
1672         (make_cleanup_decref_counted_command_line): Remove.
1673         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1674         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1675         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1676         (save_breakpoints): Update.
1677         * breakpoint.h (counted_command_line): Now a typedef to
1678         shared_ptr.
1679         (struct breakpoint) <commands>: Now a counted_command_line.
1680         (struct bpstats) <command>: Likewise.
1681
1682 2017-09-20  Tom Tromey  <tom@tromey.com>
1683
1684         * breakpoint.c (struct commands_info, do_map_commands_command):
1685         Remove.
1686         (commands_command_1): Update.
1687         (iterate_over_related_breakpoints): Take a function_view.
1688         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1689         (delete_command): Update.
1690         (map_breakpoint_numbers): Take a function_view.
1691         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1692         (disable_command): Update.
1693         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1694         (enable_command): Update.
1695         (struct disp_data, do_enable_breakpoint_disp)
1696         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1697         (do_map_enable_delete_breakpoint): Remove.
1698         (enable_once_command, enable_count_command, enable_delete_command)
1699         (delete_trace_variable_command): Update.
1700
1701 2017-09-20  Tom Tromey  <tom@tromey.com>
1702
1703         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1704         (bpstat_clear): Use delete.
1705         (bpstats): New constructors.
1706         (bpstat_copy, bpstat_stop_status): Use new.
1707         (dprintf_after_condition_true): Update.
1708         * breakpoint.h (bpstats::bpstats): Add constructors.
1709         (bpstats::~bpstats): Add destructor.
1710
1711 2017-09-20  Pedro Alves  <palves@redhat.com>
1712
1713         * eval.c (make_params): Delete, refactored as ...
1714         (class fake_method): ... this new type's ctor.
1715         (fake_method::~fake_method): New.
1716         (evaluate_subexp_standard): Use 'fake_method'.
1717
1718 2017-09-20  Tom Tromey  <tom@tromey.com>
1719
1720         * windows-nat.c (get_windows_debug_event, windows_wait)
1721         (do_initial_windows_stuff, windows_attach): Update.
1722         * utils.c (vwarning, internal_vproblem): Update.
1723         (ui_unregister_input_event_handler_cleanup)
1724         (prepare_to_handle_input): Remove.
1725         (class scoped_input_handler): New.
1726         (defaulted_query, prompt_for_continue): Update.
1727         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1728         Update.
1729         * top.c (undo_terminal_modifications_before_exit): Update.
1730         * target/target.h (target_terminal_init, target_terminal_inferior)
1731         (target_terminal_ours): Don't declare.
1732         (class target_terminal): New.
1733         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1734         (target_terminal_ours_for_output)
1735         (make_cleanup_restore_target_terminal): Don't declare.
1736         (target_terminal_info): Remove.
1737         * target.c (enum terminal_state, terminal_state): Remove.
1738         (target_terminal::terminal_state): Define.
1739         (target_terminal::init): Rename from target_terminal_init.
1740         (target_terminal::inferior): Rename from
1741         target_terminal_inferior.
1742         (target_terminal::ours): Rename from target_terminal_ours.
1743         (target_terminal::ours_for_output): Rename from
1744         target_terminal_ours_for_output.
1745         (target_terminal::info): New method.
1746         (cleanup_restore_target_terminal)
1747         (make_cleanup_restore_target_terminal): Remove.
1748         * solib.c (handle_solib_event): Update.
1749         * remote.c (remote_serial_quit_handler): Update.
1750         (remote_terminal_inferior, remote_wait_as): Update.
1751         * record-full.c (record_full_wait_1): Update.
1752         * nto-procfs.c (procfs_create_inferior): Update.
1753         * nat/fork-inferior.c (startup_inferior): Update.
1754         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1755         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1756         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1757         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1758         (mi_breakpoint_created, mi_breakpoint_deleted)
1759         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1760         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1761         (mi_user_selected_context_changed, report_initial_inferior):
1762         Update.
1763         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1764         (linux_nat_terminal_inferior): Update.
1765         * infrun.c (follow_fork_inferior)
1766         (handle_vfork_child_exec_or_exit, do_target_resume)
1767         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1768         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1769         Update.
1770         * inflow.c (child_terminal_init, info_terminal_command): Update.
1771         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1772         (attach_command): Update.
1773         * infcall.c (call_thread_fsm_should_stop): Update.
1774         * gnu-nat.c (gnu_attach): Update.
1775         * extension.c (struct active_ext_lang_state)
1776         (restore_active_ext_lang): Update.
1777         * exceptions.c (print_flush): Update.
1778         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1779         (struct quit_handler_cleanup_data, restore_quit_handler)
1780         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1781         Remove.
1782         * cp-support.c (gdb_demangle): Update.
1783         * breakpoint.c (update_inserted_breakpoint_locations)
1784         (insert_breakpoint_locations, handle_jit_event)
1785         (disable_breakpoints_in_unloaded_shlib): Update.
1786         * annotate.c (annotate_breakpoints_invalid)
1787         (annotate_frames_invalid): Update.
1788
1789 2017-09-20  Tom Tromey  <tom@tromey.com>
1790
1791         * main.c (catch_command_errors): Rename from
1792         catch_command_errors_const.
1793         (captured_main_1): Update.
1794
1795 2017-09-20  Pedro Alves  <palves@redhat.com>
1796
1797         * cli/cli-cmds.c (list_command): Use print_sal_location.
1798         (print_sal_location): New function.
1799         (ambiguous_line_spec): Use print_sal_location.
1800         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1801         * symtab.c (find_function_start_sal): Likewise.
1802         * symtab.h (symtab_and_line::symbol): New field.
1803
1804 2017-09-20  Pedro Alves  <palves@redhat.com>
1805
1806         * linespec.c (minsym_found): Handle non-text minsyms.
1807         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1808
1809 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1810
1811         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1812         backslash.
1813
1814 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1815
1816         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1817         vmovups instead vmovaps.
1818         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1819
1820 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1821
1822         * NEWS (Changes since GDB 8.0): Add starti.
1823         * infcmd.c (enum run_break): New.
1824         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1825         case.
1826         (run_command): Use enum run_how.
1827         (start_command): Likewise.
1828         (starti_command): New function.
1829         (RUN_ARGS_HELP): New macro.
1830         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1831         commands.  Add starti command.
1832
1833 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1834
1835         * Makefile.in (monitor.o): Remove the rule.
1836
1837 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1838
1839         * annotate.h (struct annotate_arg_emitter): Use
1840         DISABLE_COPY_AND_ASSIGN.
1841         * common/refcounted-object.h (refcounted_object): Likewise.
1842         * completer.h (struct completion_result): Likewise.
1843         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1844         * filename-seen-cache.h (filename_seen_cache): Likewise.
1845         * gdbcore.h (thread_section_name): Likewise.
1846         * gdb_regex.h (compiled_regex): Likewise.
1847         * gdbthread.h (scoped_restore_current_thread): Likewise.
1848         * inferior.h (scoped_restore_current_inferior): Likewise.
1849         * jit.c (jit_reader): Likewise.
1850         * linespec.h (struct linespec_result): Likewise.
1851         * mi/mi-parse.h (struct mi_parse): Likewise.
1852         * nat/fork-inferior.c (execv_argv): Likewise.
1853         * progspace.h (scoped_restore_current_program_space): Likewise.
1854         * python/python-internal.h (class gdbpy_enter): Likewise.
1855         * regcache.h (regcache): Likewise.
1856         * target-descriptions.c (struct tdesc_reg): Likewise.
1857         (struct tdesc_type): Likewise.
1858         (struct tdesc_feature): Likewise.
1859         * ui-out.h (ui_out_emit_type): Likewise.
1860
1861 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1862
1863         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1864         label abort_expression.
1865
1866 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1867
1868         * common/buffer.c (buffer_xml_printf): Adjust.
1869         * common/xml-utils.c (xml_escape_text): Change return type to
1870         std::string, update code accordingly.
1871         * common/xml-utils.h (xml_escape_text): Change return type to
1872         std::string.
1873         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1874         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1875         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1876         Adjust.
1877
1878 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1879
1880         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1881         (SUBDIR_UNITTESTS_OBS): Add new object file.
1882         * unittests/xml-utils-selftests.c: New file.
1883
1884 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1885
1886         * common/selftest.h (selftest): New struct/interface.
1887         (register_test): Add name parameter, add new overload.
1888         (run_tests): Add filter parameter.
1889         (for_each_selftest_ftype): New typedef.
1890         (for_each_selftest): New declaration.
1891         * common/selftest.c (tests): Change type to
1892         map<string, unique_ptr<selftest>>.
1893         (simple_selftest): New struct.
1894         (register_test): New function.
1895         (register_test): Add name parameter and use it.
1896         (run_tests): Add filter parameter and use it.  Add prints.
1897         Adjust to vector -> map change.
1898         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1899         registering selftests.
1900         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1901         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1902         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1903         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1904         * findvar.c (_initialize_findvar): Likewise.
1905         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1906         * maint.c (maintenance_selftest): Update call to run_tests.
1907         (maintenance_info_selftests): New function.
1908         (_initialize_maint_cmds): Register "maintenance info selftests"
1909         command.  Update "maintenance selftest" doc.
1910         * regcache.c (_initialize_regcache): Add names when registering
1911         selftests.
1912         * rust-exp.y (_initialize_rust_exp): Likewise.
1913         * selftest-arch.c (gdbarch_selftest): New struct.
1914         (gdbarch_tests): Remove.
1915         (register_test_foreach_arch): Add name parameter.  Call
1916         register_test.
1917         (tests_with_arch): Remove, move most content to
1918         gdbarch_selftest::operator().
1919         (_initialize_selftests_foreach_arch): Remove.
1920         * selftest-arch.h (register_test_foreach_arch): Add name
1921         parameter.
1922         (run_tests_with_arch): New declaration.
1923         * utils-selftests.c (_initialize_utils_selftests): Add names
1924         when registering selftests.
1925         * utils.c (_initialize_utils): Likewise.
1926         * unittests/array-view-selftests.c
1927         (_initialize_array_view_selftests): Likewise.
1928         * unittests/environ-selftests.c (_initialize_environ_selftests):
1929         Likewise.
1930         * unittests/function-view-selftests.c
1931         (_initialize_function_view_selftests): Likewise.
1932         * unittests/offset-type-selftests.c
1933         (_initialize_offset_type_selftests): Likewise.
1934         * unittests/optional-selftests.c
1935         (_initialize_optional_selftests): Likewise.
1936         * unittests/scoped_restore-selftests.c
1937         (_initialize_scoped_restore_selftests): Likewise.
1938         * NEWS: Document "maintenance selftest" and "maint info
1939         selftests".
1940
1941 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1942
1943         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1944         scoped_restore.
1945
1946 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1947
1948         * mi/mi-main.c (mi_load_progress): Make uiout variable
1949         a unique_ptr.
1950
1951 2017-09-15  Pedro Alves  <palves@redhat.com>
1952
1953         * compile/compile-c-types.c (convert_enum, convert_int)
1954         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1955
1956 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1957
1958         * dwarf2read.c (copy_string): Remove.
1959         (parse_macro_definition): Replace copy_string with savestring.
1960
1961 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1962
1963         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1964         gdb_target_obs.
1965         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1966         Likewise.
1967         (i[34567]86-*-linux*): Likewise.
1968
1969 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1970
1971         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1972         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1973         <stack>: Change type to std::vector.
1974         <stack_len, stack_allocated>: Remove.
1975         <grow_stack>: Remove.
1976         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1977         (dwarf_expr_context::~dwarf_expr_context): Remove.
1978         (dwarf_expr_context::grow_stack): Remove.
1979         (dwarf_expr_context::push): Adjust.
1980         (dwarf_expr_context::pop): Adjust.
1981         (dwarf_expr_context::fetch): Adjust.
1982         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1983         (dwarf_expr_context::stack_empty_p): Adjust.
1984         (dwarf_expr_context::execute_stack_op): Adjust.
1985
1986 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1987
1988         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1989         return type to bool.
1990         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1991
1992 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1993
1994         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1995         Change type to bool.
1996         (dwarf_stack_value) <in_stack_memory>: Likewise.
1997         (dwarf_expr_context) <push_address>: Change parameter type to
1998         bool.
1999         <fetch_in_stack_memory>: Change return type to bool.
2000         <push>: Change parameter type to bool.
2001         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2002         to bool.
2003         (dwarf_expr_context::push_address): Likewise.
2004         (dwarf_expr_context::fetch_in_stack_memory): Change return type
2005         to bool.
2006         (dwarf_expr_context::execute_stack_op): Adjust.
2007         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2008
2009 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2010
2011         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2012         (struct dwarf_expr_context) <n_pieces>: Remove.
2013         <pieces>: Change type to std::vector.
2014         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2015         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2016         pieces.
2017         (dwarf_expr_context::add_piece): Adjust.
2018         * dwarf2loc.c (struct piece_closure): Initialize fields.
2019         <n_pieces>: Remove.
2020         <pieces>: Change type to std::vector.
2021         (allocate_piece_closure): Adjust, change parameter to
2022         std::vector rvalue and std::move it to piece_closure.
2023         (rw_pieced_value): Adjust.
2024         (check_pieced_synthetic_pointer): Adjust.
2025         (indirect_synthetic_pointer): Adjust.
2026         (coerce_pieced_ref): Adjust.
2027         (free_pieced_value_closure):  Adjust.  Use delete to free
2028         piece_closure.
2029         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2030         to allocate_piece_closure.
2031         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2032
2033 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2034
2035         * probe.h (probe_ops_cp): Remove typedef.
2036         (DEF_VEC_P (probe_ops_cp)): Remove.
2037         (all_probe_ops): Change type to std::vector.
2038         * probe.c (info_probes_for_ops): Adjust to vector change.
2039         (probe_linespec_to_ops): Likewise.
2040         (all_probe_ops): Change type to std::vector.
2041         (_initialize_probe): Adjust to vector change.
2042         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2043         * elfread.c (elf_get_probes): Likewise.
2044         * stap-probe.c (_initialize_stap_probe): Likewise.
2045
2046 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2047
2048         * probe.h (struct bound_probe): Define constructors.
2049         * probe.c (bound_probe_s): Remove typedef.
2050         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2051         (collect_probes): Change return type to std::vector, remove
2052         cleanup.
2053         (compare_probes): Return bool, change parameter type.  Change
2054         semantic to "less than".
2055         (gen_ui_out_table_header_info): Change parameter to std::vector
2056         and update.
2057         (exists_probe_with_pops): Likewise.
2058         (info_probes_for_ops): Update to std::vector change.
2059         (enable_probes_command): Likewise.
2060         (disable_probes_command): Likewise.
2061
2062 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2063
2064         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2065         vec to std::vector.
2066         * probe.c (parse_probes_in_pspace): Update.
2067         (find_probes_in_objfile): Update.
2068         (find_probe_by_pc): Update.
2069         (collect_probes): Update.
2070         (probe_any_get_probes): Update.
2071         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2072         return type to reference to std::vector.
2073         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2074         std::vector and update.
2075         (dtrace_process_dof): Likewise.
2076         (dtrace_get_probes): Likewise.
2077         * elfread.c (elf_get_probes): Change return type to std::vector,
2078         store an std::vector in bfd_data.
2079         (probe_key_free): Update to std::vector.
2080         * stap-probe.c (handle_stap_probe): Change parameter to
2081         std::vector and update.
2082         (stap_get_probes): Likewise.
2083         * symfile-debug.c (debug_sym_get_probes): Change return type to
2084         std::vector and update.
2085
2086 2017-09-11  Tom Tromey  <tom@tromey.com>
2087
2088         * breakpoint.c (program_breakpoint_here_p): Update.
2089         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2090         from make_show_memory_breakpoints_cleanup.  Return a
2091         scoped_restore_tmpl<int>.
2092         (restore_show_memory_breakpoints): Remove.
2093         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2094         * mem-break.c (memory_validate_breakpoint): Update.
2095         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2096         (ia64_memory_remove_breakpoint): Update.
2097         (ia64_breakpoint_from_pc): Update.
2098         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2099         from make_show_memory_breakpoints_cleanup.
2100
2101 2017-09-11  Tom Tromey  <tom@tromey.com>
2102
2103         * d-namespace.c (d_lookup_symbol): Use std::string.
2104         (find_symbol_in_baseclass): Likewise.
2105
2106 2017-09-11  Tom Tromey  <tom@tromey.com>
2107
2108         * ctf.c (ctf_start): Use std::string.
2109
2110 2017-09-11  Tom Tromey  <tom@tromey.com>
2111
2112         * ada-lang.c (is_known_support_routine): Update.
2113         (ada_unhandled_exception_name_addr_from_raise): Update.
2114         * guile/scm-frame.c (gdbscm_frame_name): Update.
2115         * python/py-frame.c (frapy_name): Update.
2116         (frapy_function): Update.
2117         * stack.h (find_frame_funname): Update.
2118         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2119         (print_frame): Update.
2120
2121 2017-09-11  Tom Tromey  <tom@tromey.com>
2122
2123         * findcmd.c (put_bits): Take a gdb::byte_vector.
2124         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2125         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2126         cleanups.
2127         (find_command): Update.
2128
2129 2017-09-11  Tom Tromey  <tom@tromey.com>
2130
2131         * cli/cli-script.c (class scoped_restore_hook_in): New.
2132         (clear_hook_in_cleanup): Remove.
2133         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2134         scoped_restore_hook_in.
2135
2136 2017-09-11  Tom Tromey  <tom@tromey.com>
2137
2138         * cli/cli-script.c (restore_interp): Remove.
2139         (read_command_lines): Use scoped_restore_interp.
2140         * interps.c (scoped_restore_interp::set_temp): Rename from
2141         interp_set_temp.
2142         * interps.h (class scoped_restore_interp): New.
2143         (interp_set_temp): Remove.
2144
2145 2017-09-11  Tom Tromey  <tom@tromey.com>
2146
2147         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2148         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2149         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2150         scoped_restore.
2151         (mi_cmd_break_insert_1): Update.
2152         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2153         scoped_restore.
2154
2155 2017-09-11  Tom Tromey  <tom@tromey.com>
2156
2157         * demangle.c (demangle_command): Update.
2158         * breakpoint.c (disable_command): Update.
2159         (enable_command): Update.
2160         (find_location_by_number): Make "number" const.  Use
2161         get_number_trailer.
2162         * cli/cli-utils.c (extract_arg): Return std::string.
2163         * probe.c (parse_probe_linespec): Update.  Change types.
2164         (collect_probes): Take string arguments.
2165         (parse_probe_linespec): Likewise.
2166         (info_probes_for_ops): Update.
2167         (enable_probes_command): Update.
2168         (disable_probes_command): Update.
2169         * break-catch-sig.c (catch_signal_split_args): Update.
2170         * mi/mi-parse.c (mi_parse): Update.
2171
2172 2017-09-11  Tom Tromey  <tom@tromey.com>
2173
2174         * language.h (language_enum): Make argument const.
2175         * language.c (language_enum): Make argument const.
2176
2177 2017-09-11  Tom Tromey  <tom@tromey.com>
2178
2179         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2180         as function.
2181         (skip_to_space): Rename from skip_to_space_const.
2182         * common/common-utils.c (skip_to_space): New function.
2183         (skip_to_space): Rename from skip_to_space_const.
2184         * cli/cli-utils.h (get_number): Rename from get_number_const.
2185         (extract_arg): Rename from extract_arg_const.
2186         * cli/cli-utils.c (get_number): Rename from get_number_const.
2187         (extract_arg): Rename from extract_arg_const.
2188         (number_or_range_parser::get_number): Use ::get_number.
2189         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2190         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2191         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2192         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2193         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2194         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2195         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2196         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2197
2198 2017-09-11  Tom Tromey  <tom@tromey.com>
2199
2200         * python/python.c (do_start_initialization): Use
2201         py-event-types.def to initialize types.
2202         Define all object type structures.
2203         * python/python-internal.h: Don't declare event initialization
2204         functions.
2205         * python/py-threadevent.c (thread_event_object_type): Don't
2206         define.
2207         * python/py-stopevent.c (stop_event_object_type): Don't define.
2208         * python/py-signalevent.c (signal_event_object_type): Don't
2209         declare or define.
2210         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2211         (clear_objfiles_event_object_type): Don't declare or define.
2212         * python/py-infevents.c (inferior_call_pre_event_object_type)
2213         (inferior_call_post_event_object_type)
2214         (register_changed_event_object_type)
2215         (memory_changed_event_object_type): Don't declare or define.
2216         * python/py-inferior.c (new_thread_event_object_type)
2217         (new_inferior_event_object_type)
2218         (inferior_deleted_event_object_type): Don't declare or define.
2219         * python/py-exitedevent.c (exited_event_object_type): Don't
2220         declare or define.
2221         * python/py-evts.c (gdbpy_initialize_py_events): Use
2222         py-all-events.def.
2223         * python/py-events.h (thread_event_object_type): Don't declare.
2224         (events_object): Use py-all-events.def.
2225         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2226         py-event-types.def.
2227         * python/py-event-types.def: New file.
2228         * python/py-continueevent.c (create_continue_event_object): Don't
2229         declare or define.
2230         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2231         declare or define.
2232         * python/py-all-events.def: New file.
2233
2234 2017-09-11  Tom Tromey  <tom@tromey.com>
2235
2236         * python/py-threadevent.c (create_thread_event_object): Return
2237         gdbpy_ref.
2238         * python/py-stopevent.h (create_stop_event_object)
2239         (create_breakpoint_event_object, create_signal_event_object):
2240         Update.
2241         * python/py-stopevent.c (create_stop_event_object): Return
2242         gdbpy_ref.
2243         (emit_stop_event): Update.
2244         * python/py-signalevent.c (create_signal_event_object): Return
2245         gdbpy_ref.
2246         * python/py-infevents.c (create_inferior_call_event_object):
2247         Update.
2248         * python/py-event.h (create_event_object)
2249         (create_thread_event_object): Update.
2250         * python/py-event.c (create_event_object): Return gdbpy_ref.
2251         * python/py-continueevent.c: Return gdbpy_ref.
2252         * python/py-bpevent.c (create_breakpoint_event_object): Return
2253         gdbpy_ref.
2254
2255 2017-09-11  Tom Tromey  <tom@tromey.com>
2256
2257         PR python/15622:
2258         * NEWS: Add entry.
2259         * python/python.c (do_start_initialization): Initialize new event
2260         types.
2261         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2262         (gdbpy_initialize_inferior_deleted_event)
2263         (gdbpy_initialize_new_thread_event): Declare.
2264         * python/py-threadevent.c (create_thread_event_object): Add option
2265         "thread" parameter.
2266         * python/py-inferior.c (new_thread_event_object_type)
2267         (new_inferior_event_object_type)
2268         (inferior_deleted_event_object_type): Declare.
2269         (python_new_inferior, python_inferior_deleted): New functions.
2270         (add_thread_object): Emit new_thread event.
2271         (gdbpy_initialize_inferior): Attach new functions to corresponding
2272         observers.
2273         (new_thread, new_inferior, inferior_deleted): Define new event
2274         types.
2275         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2276         registries.
2277         * python/py-events.h (events_object) <new_inferior,
2278         inferior_deleted, new_thread>: New fields.
2279         * python/py-event.h (create_thread_event_breakpoint): Add optional
2280         "thread" parameter.
2281
2282 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2283
2284         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2285         check current_ui instead.
2286         (internal_vproblem): Likewise.
2287
2288 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2289
2290         * thread.c (print_thread_info_1): Remove unnecessary calls to
2291         uiout->is_mi_like_p.
2292
2293 2017-09-09  Tom Tromey  <tom@tromey.com>
2294
2295         * namespace.h (add_using_directive): Update.
2296         * namespace.c (add_using_directive): Change type of excludes to
2297         std::vector.
2298         * dwarf2read.c (read_import_statement): Use std::vector.
2299         (read_namespace): Update.
2300         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2301
2302 2017-09-09  Tom Tromey  <tom@tromey.com>
2303
2304         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2305
2306 2017-09-09  Tom Tromey  <tom@tromey.com>
2307
2308         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2309
2310 2017-09-09  Tom Tromey  <tom@tromey.com>
2311
2312         * stack.c (func_command): Use gdb::def_vector.
2313
2314 2017-09-09  Tom Tromey  <tom@tromey.com>
2315
2316         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2317         ui_out_emit_list, ui_out_emit_tuple.
2318         (mi_cmd_var_update): Likewise.
2319
2320 2017-09-09  Tom Tromey  <tom@tromey.com>
2321
2322         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2323         ui_out_redirect_pop.
2324         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2325         ui_out_redirect_pop.
2326         * utils.c (do_ui_out_redirect_pop)
2327         (make_cleanup_ui_out_redirect_pop): Remove.
2328         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2329         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2330         * ui-out.h (ui_out_redirect_pop): New class.
2331
2332 2017-09-09  Tom Tromey  <tom@tromey.com>
2333
2334         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2335         (list_available_thread_groups, mi_cmd_list_thread_groups)
2336         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2337         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2338         Likewise.
2339
2340 2017-09-09  Tom Tromey  <tom@tromey.com>
2341
2342         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2343         ui_out_emit_tuple.
2344
2345 2017-09-09  Tom Tromey  <tom@tromey.com>
2346
2347         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2348         * stack.c (print_frame): Use ui_out_emit_tuple.
2349         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2350         (info_spu_mailbox_command, info_spu_dma_command)
2351         (info_spu_proxydma_command): Likewise.
2352         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2353         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2354         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2355         ui_out_emit_tuple.
2356         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2357
2358 2017-09-09  Tom Tromey  <tom@tromey.com>
2359
2360         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2361         (class ui_out_emit_table): Update comment.
2362         * ui-out.c (do_cleanup_table_end)
2363         (make_cleanup_ui_out_table_begin_end): Remove.
2364         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2365         (info_spu_dma_cmdlist): Likewise.
2366         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2367         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2368         ui_out_emit_table.
2369
2370 2017-09-09  Tom Tromey  <tom@tromey.com>
2371
2372         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2373         ui_out_emit_list, gdb::optional.
2374
2375 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2376
2377         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2378         prototype.
2379         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2380         prototype.
2381         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2382         prototype.
2383         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2384         * ada-exp.y: Remove _initialize_ada_exp prototype.
2385         * ada-lang.c: Remove _initialize_ada_language prototype.
2386         * ada-tasks.c: Remove _initialize_tasks prototype.
2387         * addrmap.c: Remove _initialize_addrmap prototype.
2388         * agent.c: Remove _initialize_agent prototype.
2389         * aix-thread.c: Remove _initialize_aix_thread prototype.
2390         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2391         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2392         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2393         prototype.
2394         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2395         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2396         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2397         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2398         prototype.
2399         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2400         prototype.
2401         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2402         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2403         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2404         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2405         prototype.
2406         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2407         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2408         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2409         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2410         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2411         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2412         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2413         prototype.
2414         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2415         prototype.
2416         * annotate.c: Remove _initialize_annotate prototype.
2417         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2418         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2419         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2420         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2421         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2422         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2423         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2424         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2425         prototype.
2426         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2427         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2428         * auto-load.c: Remove _initialize_auto_load prototype.
2429         * auxv.c: Remove _initialize_auxv prototype.
2430         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2431         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2432         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2433         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2434         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2435         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2436         prototype.
2437         * break-catch-throw.c: Remove _initialize_break_catch_throw
2438         prototype.
2439         * breakpoint.c: Remove _initialize_breakpoint prototype.
2440         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2441         * btrace.c: Remove _initialize_btrace prototype.
2442         * charset.c: Remove _initialize_charset prototype.
2443         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2444         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2445         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2446         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2447         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2448         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2449         * coffread.c: Remove _initialize_coffread prototype.
2450         * compile/compile.c: Remove _initialize_compile prototype.
2451         * complaints.c: Remove _initialize_complaints prototype.
2452         * completer.c: Remove _initialize_completer prototype.
2453         * copying.awk: Remove _initialize_copying prototype.
2454         * copying.c: Regenerate.
2455         * core-regset.c: Remove _initialize_core_regset prototype.
2456         * corefile.c: Remove _initialize_core prototype.
2457         * corelow.c: Remove _initialize_corelow prototype.
2458         * cp-abi.c: Remove _initialize_cp_abi prototype.
2459         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2460         * cp-support.c: Remove _initialize_cp_support prototype.
2461         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2462         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2463         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2464         * ctf.c: Remove _initialize_ctf prototype.
2465         * d-lang.c: Remove _initialize_d_language prototype.
2466         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2467         prototype.
2468         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2469         * dbxread.c: Remove _initialize_dbxread prototype.
2470         * dcache.c: Remove _initialize_dcache prototype.
2471         * demangle.c: Remove _initialize_demangler prototype.
2472         * disasm-selftests.c: Remove _initialize_disasm_selftests
2473         prototype.
2474         * disasm.c: Remove _initialize_disasm prototype.
2475         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2476         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2477         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2478         prototype.
2479         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2480         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2481         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2482         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2483         * elfread.c: Remove _initialize_elfread prototype.
2484         * exec.c: Remove _initialize_exec prototype.
2485         * extension.c: Remove _initialize_extension prototype.
2486         * f-lang.c: Remove _initialize_f_language prototype.
2487         * f-valprint.c: Remove _initialize_f_valprint prototype.
2488         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2489         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2490         * filesystem.c: Remove _initialize_filesystem prototype.
2491         * findcmd.c: Remove _initialize_mem_search prototype.
2492         * fork-child.c: Remove _initialize_fork_child prototype.
2493         * frame-base.c: Remove _initialize_frame_base prototype.
2494         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2495         * frame.c: Remove _initialize_frame prototype.
2496         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2497         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2498         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2499         * gcore.c: Remove _initialize_gcore prototype.
2500         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2501         * gdbarch.c: Regenerate.
2502         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2503         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2504         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2505         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2506         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2507         * go-lang.c: Remove _initialize_go_language prototype.
2508         * go32-nat.c: Remove _initialize_go32_nat prototype.
2509         * guile/guile.c: Remove _initialize_guile prototype.
2510         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2511         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2512         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2513         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2514         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2515         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2516         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2517         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2518         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2519         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2520         prototype.
2521         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2522         prototype.
2523         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2524         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2525         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2526         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2527         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2528         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2529         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2530         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2531         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2532         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2533         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2534         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2535         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2536         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2537         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2538         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2539         prototype.
2540         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2541         prototype.
2542         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2543         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2544         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2545         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2546         * infcall.c: Remove _initialize_infcall prototype.
2547         * infcmd.c: Remove _initialize_infcmd prototype.
2548         * inferior.c: Remove _initialize_inferiors prototype.
2549         * inflow.c: Remove _initialize_inflow prototype.
2550         * infrun.c: Remove _initialize_infrun prototype.
2551         * interps.c: Remove _initialize_interpreter prototype.
2552         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2553         * jit.c: Remove _initialize_jit prototype.
2554         * language.c: Remove _initialize_language prototype.
2555         * linux-fork.c: Remove _initialize_linux_fork prototype.
2556         * linux-nat.c: Remove _initialize_linux_nat prototype.
2557         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2558         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2559         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2560         * m2-lang.c: Remove _initialize_m2_language prototype.
2561         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2562         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2563         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2564         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2565         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2566         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2567         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2568         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2569         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2570         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2571         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2572         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2573         * machoread.c: Remove _initialize_machoread prototype.
2574         * macrocmd.c: Remove _initialize_macrocmd prototype.
2575         * macroscope.c: Remove _initialize_macroscope prototype.
2576         * maint.c: Remove _initialize_maint_cmds prototype.
2577         * mdebugread.c: Remove _initialize_mdebugread prototype.
2578         * memattr.c: Remove _initialize_mem prototype.
2579         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2580         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2581         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2582         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2583         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2584         * microblaze-linux-tdep.c: Remove
2585         _initialize_microblaze_linux_tdep prototype.
2586         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2587         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2588         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2589         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2590         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2591         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2592         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2593         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2594         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2595         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2596         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2597         prototype.
2598         * mipsread.c: Remove _initialize_mipsread prototype.
2599         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2600         prototype.
2601         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2602         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2603         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2604         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2605         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2606         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2607         prototype.
2608         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2609         * nto-procfs.c: Remove _initialize_procfs prototype.
2610         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2611         * objc-lang.c: Remove _initialize_objc_language prototype.
2612         * objfiles.c: Remove _initialize_objfiles prototype.
2613         * observer.c: Remove observer_test_first_notification_function,
2614         observer_test_second_notification_function,
2615         observer_test_third_notification_function, and
2616         _initialize_observer prototypes.
2617         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2618         * osabi.c: Remove _initialize_gdb_osabi prototype.
2619         * osdata.c: Remove _initialize_osdata prototype.
2620         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2621         * parse.c: Remove _initialize_parse prototype.
2622         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2623         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2624         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2625         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2626         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2627         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2628         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2629         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2630         * printcmd.c: Remove _initialize_printcmd prototype.
2631         * probe.c: Remove _initialize_probe prototype.
2632         * proc-api.c: Remove _initialize_proc_api prototype.
2633         * proc-events.c: Remove _initialize_proc_events prototype.
2634         * proc-service.c: Remove _initialize_proc_service prototype.
2635         * procfs.c: Remove _initialize_procfs prototype.
2636         * psymtab.c: Remove _initialize_psymtab prototype.
2637         * python/python.c: Remove _initialize_python prototype.
2638         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2639         * record-btrace.c: Remove _initialize_record_btrace prototype.
2640         * record-full.c: Remove _initialize_record_full prototype.
2641         * record.c: Remove _initialize_record prototype.
2642         * regcache.c: Remove _initialize_regcache prototype.
2643         * reggroups.c: Remove _initialize_reggroup prototype.
2644         * remote-notif.c: Remove _initialize_notif prototype.
2645         * remote-sim.c: Remove _initialize_remote_sim prototype.
2646         * remote.c: Remove _initialize_remote prototype.
2647         * reverse.c: Remove _initialize_reverse prototype.
2648         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2649         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2650         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2651         prototype.
2652         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2653         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2654         * rust-exp.y: Remove _initialize_rust_exp prototype.
2655         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2656         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2657         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2658         * score-tdep.c: Remove _initialize_score_tdep prototype.
2659         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2660         prototype.
2661         * ser-go32.c: Remove _initialize_ser_dos prototype.
2662         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2663         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2664         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2665         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2666         * serial.c: Remove _initialize_serial prototype.
2667         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2668         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2669         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2670         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2671         * skip.c: Remove _initialize_step_skip prototype.
2672         * sol-thread.c: Remove _initialize_sol_thread prototype.
2673         * solib-aix.c: Remove _initialize_solib_aix prototype.
2674         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2675         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2676         * solib-frv.c: Remove _initialize_frv_solib prototype.
2677         * solib-spu.c: Remove _initialize_spu_solib prototype.
2678         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2679         * solib-target.c: Remove _initialize_solib_target prototype.
2680         * solib.c: Remove _initialize_solib prototype.
2681         * source.c: Remove _initialize_source prototype.
2682         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2683         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2684         prototype.
2685         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2686         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2687         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2688         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2689         prototype.
2690         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2691         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2692         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2693         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2694         prototype.
2695         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2696         prototype.
2697         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2698         prototype.
2699         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2700         prototype.
2701         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2702         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2703         prototype.
2704         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2705         prototype.
2706         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2707         prototype.
2708         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2709         prototype.
2710         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2711         prototype.
2712         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2713         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2714         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2715         * stabsread.c: Remove _initialize_stabsread prototype.
2716         * stack.c: Remove _initialize_stack prototype.
2717         * stap-probe.c: Remove _initialize_stap_probe prototype.
2718         * std-regs.c: Remove _initialize_frame_reg prototype.
2719         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2720         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2721         * symfile.c: Remove _initialize_symfile prototype.
2722         * symmisc.c: Remove _initialize_symmisc prototype.
2723         * symtab.c: Remove _initialize_symtab prototype.
2724         * target-dcache.c: Remove _initialize_target_dcache prototype.
2725         * target-descriptions.c: Remove _initialize_target_descriptions
2726         prototype.
2727         * thread.c: Remove _initialize_thread prototype.
2728         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2729         prototype.
2730         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2731         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2732         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2733         prototype.
2734         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2735         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2736         * tracefile.c: Remove _initialize_tracefile prototype.
2737         * tracepoint.c: Remove _initialize_tracepoint prototype.
2738         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2739         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2740         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2741         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2742         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2743         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2744         * tui/tui.c: Remove _initialize_tui prototype.
2745         * typeprint.c: Remove _initialize_typeprint prototype.
2746         * user-regs.c: Remove _initialize_user_regs prototype.
2747         * utils.c: Remove _initialize_utils prototype.
2748         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2749         * valarith.c: Remove _initialize_valarith prototype.
2750         * valops.c: Remove _initialize_valops prototype.
2751         * valprint.c: Remove _initialize_valprint prototype.
2752         * value.c: Remove _initialize_values prototype.
2753         * varobj.c: Remove _initialize_varobj prototype.
2754         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2755         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2756         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2757         * windows-nat.c: Remove _initialize_windows_nat,
2758         _initialize_check_for_gdb_ini, and _initialize_loadable
2759         prototypes.
2760         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2761         * xcoffread.c: Remove _initialize_xcoffread prototype.
2762         * xml-support.c: Remove _initialize_xml_support prototype.
2763         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2764         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2765         prototype.
2766         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2767         prototype.
2768         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2769
2770 2017-09-08  Keith Seitz  <keiths@redhat.com>
2771
2772         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2773         field.
2774
2775 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2776
2777         * f-valprint.c (f_val_print): Remove check for one byte
2778         sized integers. Remove printing of character type.
2779
2780 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2781             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2782             Bernhard Heckel  <bernhard.heckel@intel.com>
2783
2784         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2785         to maintain proper indentation when printing pointers/refs.
2786
2787 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2788
2789         GDB 8.0.1 released.
2790
2791 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2792
2793         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2794
2795 2017-09-05  Tom Tromey  <tom@tromey.com>
2796
2797         * parse.c (funcall_chain): Now a std::vector.
2798         (start_arglist, end_arglist): Simplify.
2799         (free_funcalls): Remove.
2800         (parse_exp_in_context_1): Remove cleanup.
2801
2802 2017-09-05  Tom Tromey  <tom@tromey.com>
2803
2804         * go-exp.y (go_parse): Don't create a cleanup.
2805
2806 2017-09-05  Tom Tromey  <tom@tromey.com>
2807
2808         * d-exp.y (PrimaryExpression): Use std::string.
2809         (d_parse): Don't create a cleanup.
2810
2811 2017-09-05  Tom Tromey  <tom@tromey.com>
2812
2813         * utils.c (do_clear_parser_state): Remove.
2814         (make_cleanup_clear_parser_state): Remove.
2815         * p-exp.y (pascal_parse): Use scoped_restore.
2816         * m2-exp.y (m2_parse): Use scoped_restore.
2817         * f-exp.y (f_parse): Use scoped_restore.
2818         * d-exp.y (d_parse): Use scoped_restore.
2819         * c-exp.y (c_parse): Use scoped_restore.
2820         * ada-exp.y (ada_parse): Use scoped_restore.
2821         * utils.h (make_cleanup_clear_parser_state): Remove.
2822
2823 2017-09-06  Keith Seitz  <keiths@redhat.com>
2824
2825         * dwarf2read.c (dw2_linkage_name_attr): New function.
2826         (dw2_linkage_name): New function.
2827         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2828         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2829         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2830
2831 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2832
2833         * config/djgpp/djconfig.sh: Correct shell portability issue.
2834
2835 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2836
2837         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2838
2839 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2840
2841         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2842         * NEWS: Mention new FreeBSD/mips native configuration.
2843         * configure.host: Add aarch64*-*-freebsd*.
2844         * configure.nat: Likewise.
2845         * aarch64-fbsd-nat.c: New file.
2846
2847 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2848
2849         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2850         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2851         * NEWS: Mention new FreeBSD/aarch64 target.
2852         * configure.tgt: Add aarch64*-*-freebsd*.
2853         * aarch64-fbsd-tdep.c: New file.
2854         * aarch64-fbsd-tdep.h: New file.
2855
2856 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2857
2858         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2859
2860 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2861
2862         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2863         of TLS symbols.
2864
2865 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2866
2867         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2868         call.
2869
2870 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2871
2872         * infrun.c (follow_exec): Call add_thread after
2873         target_find_description.
2874
2875 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2876
2877         * infrun.c (handle_inferior_event_1): When exec'ing, read
2878         stop_pc after follow_exec.
2879
2880 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2881
2882         * remote.c (process_g_packet): Update error message.
2883
2884 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2885
2886         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2887         targets.
2888
2889 2017-09-05  Pedro Alves  <palves@redhat.com>
2890
2891         * eval.c (eval_call, evaluate_funcall): New functions, factored
2892         out from ...
2893         (evaluate_subexp_standard): ... this.
2894
2895 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2896
2897         * amd64-tdep.c (amd64_target_description): Create target
2898         descriptions.
2899         (_initialize_amd64_tdep): Don't call functions
2900         initialize_tdesc_amd64_*.  Add self tests.
2901         * arch/amd64.c (amd64_create_target_description): Add parameter
2902         is_linux.  Call set_tdesc_osabi if is_linux is true.
2903         * arch/amd64.h (amd64_create_target_description): Update the
2904         declaration.
2905         * arch/i386.c (i386_create_target_description): Add parameter
2906         is_linux.  Call set_tdesc_osabi if is_linux is true.
2907         * arch/i386.h (i386_create_target_description): Update
2908         declaration.
2909         * configure.tgt: Add i386.o to gdb_target_obs.
2910         * features/Makefile (XMLTOC): Remove i386/*.xml.
2911         * features/i386/amd64-avx-avx512.c: Remove.
2912         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2913         * features/i386/amd64-avx-mpx.c: Remove.
2914         * features/i386/amd64-avx.c: Remove.
2915         * features/i386/amd64-mpx.c: Remove.
2916         * features/i386/amd64.c: Remove.
2917         * features/i386/i386-avx-avx512.c: Remove.
2918         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2919         * features/i386/i386-avx-mpx.c: Remove.
2920         * features/i386/i386-avx.c: Remove.
2921         * features/i386/i386-mmx.c: Remove.
2922         * features/i386/i386-mpx.c: Remove.
2923         * features/i386/i386.c: Remove.
2924         * i386-tdep.c: Don't include features/i386/i386*.c., include
2925         target-descriptions.h and arch/i386.h.
2926         (i386_target_description): Create target descriptions.
2927         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2928         functions.  Do self tests.
2929
2930 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2931
2932         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2933         * features/i386/amd64-avx-avx512-linux.c: Removed.
2934         * features/i386/amd64-avx-linux.c: Removed.
2935         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2936         * features/i386/amd64-avx-mpx-linux.c: Removed.
2937         * features/i386/amd64-linux.c: Removed.
2938         * features/i386/amd64-mpx-linux.c: Removed.
2939         * features/i386/x32-avx-avx512-linux.c: Removed.
2940         * features/i386/x32-avx-linux.c: Removed.
2941         * features/i386/x32-linux.c: Removed.
2942
2943 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2944
2945         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2946         features/i386/*.c.
2947         (amd64_linux_read_description): Call
2948         amd64_create_target_description.
2949         * arch/amd64.c: New file.
2950         * arch/amd64.h: New file.
2951         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2952         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2953
2954 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2955
2956         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2957         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2958         (amd64_linux_read_description): Create target descriptions.
2959         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2960         functions.  Add unit tests.
2961         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2962         x32-core.xml.
2963         * features/i386/64bit-avx.c: Generated.
2964         * features/i386/64bit-avx512.c: Generated.
2965         * features/i386/64bit-core.c: Generated.
2966         * features/i386/64bit-linux.c: Generated.
2967         * features/i386/64bit-mpx.c: Generated.
2968         * features/i386/64bit-pkeys.c: Generated.
2969         * features/i386/64bit-segments.c: Generated.
2970         * features/i386/64bit-sse.c: Generated.
2971         * features/i386/x32-core.c: Generated.
2972         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2973         c files for amd64-linux and x32-linux.
2974
2975 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2976
2977         * amd64-linux-tdep.c (amd64_linux_read_description): New
2978         function.
2979         (amd64_linux_core_read_description): Call
2980         amd64_linux_read_description.
2981         (amd64_linux_init_abi): Likewise.
2982         (amd64_x32_linux_init_abi): Likewise.
2983         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2984         * x86-linux-nat.c (x86_linux_read_description): Call
2985         amd64_linux_read_description.
2986
2987 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2988
2989         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2990         comments.
2991
2992 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2993
2994         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2995         * features/i386/i386-avx-avx512-linux.c: Remove.
2996         * features/i386/i386-avx-linux.c: Remove.
2997         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2998         * features/i386/i386-avx-mpx-linux.c: Remove.
2999         * features/i386/i386-linux.c: Remove.
3000         * features/i386/i386-mmx-linux.c: Remove.
3001         * features/i386/i386-mpx-linux.c: Remove.
3002
3003 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3004
3005         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3006         (SFILES): Add arch/i386.c.
3007         (HFILES_NO_SRCDIR): Add arch/i386.h.
3008         * arch/i386.c: New file.
3009         * arch/i386.h: New file.
3010         * arch/tdesc.h (allocate_target_description): Declare.
3011         (set_tdesc_architecture): Declare.
3012         (set_tdesc_osabi): Declare.
3013         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3014         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3015         include arch/i386.h.
3016         (i386_linux_read_description): Remove code and call
3017         i386_create_target_description.
3018         (set_tdesc_architecture): New function.
3019         (set_tdesc_osabi): New function.
3020         * target-descriptions.h (allocate_target_description): Remove.
3021
3022 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3023
3024         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3025         * target-descriptions.c (tdesc_create_feature): Likewise, and
3026         adjust code.
3027         * features/i386/32bit-avx.c: Re-generated.
3028         * features/i386/32bit-avx512.c: Re-generated.
3029         * features/i386/32bit-core.c: Re-generated.
3030         * features/i386/32bit-linux.c: Re-generated.
3031         * features/i386/32bit-mpx.c: Re-generated.
3032         * features/i386/32bit-pkeys.c: Re-generated.
3033         * features/i386/32bit-sse.c: Re-generated.
3034
3035 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3036
3037         * regformats/regdef.h (struct reg): Override operator == and !=.
3038
3039 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3040
3041         * arch/tdesc.h: New file.
3042         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3043         * target-descriptions.c: Update comments.
3044         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3045         declarations.
3046         * features/i386/32bit-avx.c: Re-generated.
3047         * features/i386/32bit-avx512.c: Re-generated.
3048         * features/i386/32bit-core.c: Re-generated.
3049         * features/i386/32bit-linux.c: Re-generated.
3050         * features/i386/32bit-mpx.c: Re-generated.
3051         * features/i386/32bit-pkeys.c: Re-generated.
3052         * features/i386/32bit-sse.c: Re-generated.
3053
3054 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3055
3056         * regformats/regdat.sh: Update generated code.
3057
3058 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3059
3060         * regformats/regdat.sh: Adjust code order.
3061
3062 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3063
3064         * expprint.c (dump_subexp_body_standard): Use constant format
3065         string in fprintf_filtered call.
3066
3067 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3068
3069         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3070         NetBSD/i386.
3071         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3072
3073 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3074
3075         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3076
3077 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3078
3079         * bsd-kvm.o: Define _KMEMUSER.
3080         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3081         * configure: Regenerate.
3082
3083 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3084
3085         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3086         * i386-fbsd-nat.c: Likewise.
3087
3088 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3089
3090         * unittests/array-view-selftests.c: Add include of <array>.
3091
3092 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3093
3094         * spu-tdep.c (flush_ea_cache): Add missing argument to
3095         call_function_by_hand.
3096
3097 2017-09-04  Pedro Alves  <palves@redhat.com>
3098
3099         * NEWS (Safer support for debugging with no debug info): New.
3100
3101 2017-09-04  Pedro Alves  <palves@redhat.com>
3102
3103         * c-exp.y (function_method, function_method_void): Add current
3104         instance flags to TYPE_INSTANCE.
3105         * dwarf2read.c (check_modifier): New.
3106         (compute_delayed_physnames): Assert that only C++ adds delayed
3107         physnames.  Mark fn_fields as const/volatile depending on
3108         physname.
3109         * eval.c (make_params): New type_instance_flags parameter.  Use
3110         it as the new type's instance flags.
3111         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3112         flags element and pass it to make_params.
3113         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3114         instance flags element.
3115         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3116         * gdbtypes.h: Include "enum-flags.h".
3117         (type_instance_flags): New enum-flags type.
3118         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3119         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3120         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3121         (follow_type_instance_flags): New function.
3122         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3123         * parser-defs.h (follow_type_instance_flags): Declare.
3124         * valops.c (value_struct_elt_for_reference): const/volatile must
3125         match too.
3126
3127 2017-09-04  Pedro Alves  <palves@redhat.com>
3128
3129         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3130         function/method scopes; lookup the nested name as a function local
3131         static variable.
3132
3133 2017-09-04  Pedro Alves  <palves@redhat.com>
3134
3135         (%type <voidval>): Add function_method.
3136         * c-exp.y (exp): New production for calls with no arguments.
3137         (function_method, function_method_void_or_typelist): New
3138         productions.
3139         (exp): New production for "method()::static_var".
3140         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3141         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3142         Handle OP_FUNC_STATIC_VAR.
3143         * parse.c (operator_length_standard):
3144         Handle OP_FUNC_STATIC_VAR.
3145
3146 2017-09-04  Pedro Alves  <palves@redhat.com>
3147
3148         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3149         handling.
3150         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3151         Ditto.
3152         * parse.c (operator_length_standard, operator_check_standard):
3153         Ditto.
3154         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3155
3156 2017-09-04  Pedro Alves  <palves@redhat.com>
3157
3158         * ax-gdb.c: Include "typeprint.h".
3159         (gen_expr_for_cast): New function.
3160         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3161         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3162         type is unknown.
3163         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3164         nodebug_data_symbol.
3165         * eval.c: Include "typeprint.h".
3166         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3167         Error out if symbol has unknown type.
3168         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3169         evaluate_subexp_for_cast.
3170         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3171         OP_VAR_MSYM_VALUE.
3172         (evaluate_subexp_for_cast): New function.
3173         * gdbtypes.c (init_nodebug_var_type): New function.
3174         (objfile_type): Use it to initialize types of variables with no
3175         debug info.
3176         * typeprint.c (error_unknown_type): New.
3177         * typeprint.h (error_unknown_type): New declaration.
3178         * compile/compile-c-types.c (convert_type_basic): Handle
3179         TYPE_CODE_ERROR; warn and fallback to int for variables with
3180         unknown type.
3181
3182 2017-09-04  Pedro Alves  <palves@redhat.com>
3183
3184         * eval.c (evaluate_var_value): New function, factored out from ...
3185         (evaluate_subexp_standard): ... here.
3186
3187 2017-09-04  Pedro Alves  <palves@redhat.com>
3188
3189         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3190         Remove useless assignments to 'op'.
3191
3192 2017-09-04  Pedro Alves  <palves@redhat.com>
3193
3194         * eval.c (eval_skip_value): New function.
3195         (evaluate_subexp_standard): Use it.
3196
3197 2017-09-04  Pedro Alves  <palves@redhat.com>
3198
3199         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3200         function name from symbol/minsym and pass it to
3201         error_call_unknown_return_type.
3202
3203 2017-09-04  Pedro Alves  <palves@redhat.com>
3204
3205         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3206         * ax-gdb.c (gen_msym_var_ref): New function.
3207         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3208         * eval.c (evaluate_var_msym_value): New function.
3209         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3210         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3211         to call_function_by_hand.
3212         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3213         Handle OP_VAR_MSYM_VALUE.
3214         (union exp_element) <msymbol>: New field.
3215         * minsyms.h (struct type): Forward declare.
3216         (find_minsym_type_and_address): Declare.
3217         * parse.c (write_exp_elt_msym): New function.
3218         (write_exp_msymbol): Delete, refactored as ...
3219         (find_minsym_type_and_address): ... this new function.
3220         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3221         (operator_length_standard, operator_check_standard): Handle
3222         OP_VAR_MSYM_VALUE.
3223         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3224
3225 2017-09-04  Pedro Alves  <palves@redhat.com>
3226
3227         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3228         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3229         unknown.
3230         * ada-typeprint.c (print_func_type): Handle functions with unknown
3231         return type.
3232         * c-typeprint.c (c_type_print_base): Handle functions and methods
3233         with unknown return type.
3234         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3235         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3236         * compile/compile-c-types.c: Include "objfiles.h".
3237         (convert_func): For functions with unknown return type, warn and
3238         default to int.
3239         * compile/compile-object-run.c (compile_object_run): Adjust call
3240         to call_function_by_hand_dummy.
3241         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3242         call_function_by_hand.
3243         * eval.c (evaluate_subexp_standard): Adjust calls to
3244         call_function_by_hand.  Handle functions and methods with unknown
3245         return type.  Pass expect_type to call_function_by_hand.
3246         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3247         return type.
3248         * gcore.c (call_target_sbrk): Adjust call to
3249         call_function_by_hand.
3250         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3251         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3252         an integer address type instead of nodebug.
3253         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3254         call_function_by_hand.
3255         * infcall.c (error_call_unknown_return_type): New function.
3256         (call_function_by_hand): New "default_return_type" parameter.
3257         Pass it down.
3258         (call_function_by_hand_dummy): New "default_return_type"
3259         parameter.  Use it instead of defaulting to int.  If there's no
3260         default and the return type is unknown, throw an error.  If
3261         there's a default return type, and the called function has no
3262         debug info, then assume the function is prototyped.
3263         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3264         New "default_return_type" parameter.
3265         (error_call_unknown_return_type): New declaration.
3266         * linux-fork.c (call_lseek): Cast return type of lseek.
3267         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3268         call_function_by_hand.
3269         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3270         calls to call_function_by_hand.
3271         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3272         return type.
3273         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3274         (value_nsstring, print_object_command): Adjust calls to
3275         call_function_by_hand.
3276         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3277         functions with unknown return type.
3278         (pascal_type_print_func_varspec_suffix): New function.
3279         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3280         TYPE_CODE_METHOD>: Use it.
3281         * python/py-value.c (valpy_call): Adjust call to
3282         call_function_by_hand.
3283         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3284         call_function_by_hand.
3285         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3286         call_function_by_hand.
3287         * valops.c (value_allocate_space_in_inferior): Adjust call to
3288         call_function_by_hand.
3289         * typeprint.c (type_print_unknown_return_type): New function.
3290         * typeprint.h (type_print_unknown_return_type): New declaration.
3291
3292 2017-09-04  Pedro Alves  <palves@redhat.com>
3293
3294         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3295         types with more than one parameter as prototyped.
3296
3297 2017-09-04  Pedro Alves  <palves@redhat.com>
3298
3299         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3300         (disassemble_command): Use gdb_disassembly_flags instead of bare
3301         int.
3302         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3303         (dump_insns, do_mixed_source_and_assembly_deprecated)
3304         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3305         Use gdb_disassembly_flags instead of bare int.
3306         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3307         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3308         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3309         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3310         (enum gdb_disassembly_flag): ... values of this new enumeration.
3311         (gdb_disassembly_flags): Define.
3312         (gdb_disassembly)
3313         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3314         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3315         gdb_disassembly_flags instead of bare int.
3316         * record-btrace.c (btrace_insn_history)
3317         (record_btrace_insn_history, record_btrace_insn_history_range)
3318         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3319         instead of bare int.
3320         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3321         Use gdb_disassembly_flags instead of bare int.
3322         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3323         Define.
3324         * target-delegates.c: Regenerate.
3325         * target.c (target_insn_history, target_insn_history_from)
3326         (target_insn_history_range): Use gdb_disassembly_flags instead of
3327         bare int.
3328         * target.h: Include "disasm.h".
3329         (struct target_ops) <to_insn_history, to_insn_history_from,
3330         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3331         int.
3332         (target_insn_history, target_insn_history_from)
3333         (target_insn_history_range): Use gdb_disassembly_flags instead of
3334         bare int.
3335
3336 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3337
3338         * cli/cli-script.c (build_command_line): For if/while commands,
3339         check whether args is empty.
3340
3341 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3342
3343         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3344         (enum command_control_type): Likewise.
3345         (struct command_line): Likewise.
3346         (free_command_lines): Likewise.
3347         (struct command_lines_deleter): Likewise.
3348         (command_line_up): Likewise.
3349         (read_command_lines): Likewise.
3350         (read_command_lines_1): Likewise.
3351         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3352         (enum command_control_type): Likewise.
3353         (struct command_line): Likewise.
3354         (free_command_lines): Likewise.
3355         (struct command_lines_deleter): Likewise.
3356         (command_line_up): Likewise.
3357         (read_command_lines): Likewise.
3358         (read_command_lines_1): Likewise.
3359         * breakpoint.h: Include cli/cli-script.h.
3360         * extension-priv.h: Likewise.
3361         * gdbcmd.h: Likewise.
3362
3363 2017-09-04  Pedro Alves  <palves@redhat.com>
3364
3365         * ada-lang.c (is_known_support_routine): Move sal declaration to
3366         where it is initialized.
3367         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3368         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3369         (clear_command, update_static_tracepoint): Remove init_sal
3370         references.  Move declarations closer to initializations.
3371         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3372         initializations.
3373         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3374         references.  Move sal declarations closer to initializations.
3375         * frame.c (find_frame_sal): Return a symtab_and_line via function
3376         return instead of output parameter.  Remove init_sal references.
3377         * frame.h (find_frame_sal): Return a symtab_and_line via function
3378         return instead of output parameter.
3379         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3380         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3381         instead of memset.
3382         (gdbscm_find_pc_line): Remove init_sal reference.
3383         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3384         references.  Move declarations closer to initializations.
3385         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3386         initializations.
3387         (finish_backward): Remove init_sal references.  Move declarations
3388         closer to initializations.
3389         * infrun.c (process_event_stop_test, handle_step_into_function)
3390         (insert_hp_step_resume_breakpoint_at_frame)
3391         (insert_step_resume_breakpoint_at_caller): Likewise.
3392         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3393         (symbol_to_sal): Likewise.
3394         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3395         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3396         to its initialization.
3397         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3398         init_sal references.  Move declarations closer to initializations.
3399         * source.c (get_current_source_symtab_and_line): Remove brace
3400         initialization.
3401         (set_current_source_symtab_and_line): Now takes the sal by const
3402         reference.  Remove brace initialization.
3403         (line_info): Remove init_sal reference.
3404         * source.h (set_current_source_symtab_and_line): Now takes a
3405         symtab_and_line via const reference.
3406         * stack.c (set_current_sal_from_frame): Adjust.
3407         (print_frame_info): Adjust.
3408         (get_last_displayed_sal): Return the sal via function return
3409         instead of via output parameter.  Simplify.
3410         (frame_info): Adjust.
3411         * stack.h (get_last_displayed_sal): Return the sal via function
3412         return instead of via output parameter.
3413         * symtab.c (init_sal): Delete.
3414         (find_pc_sect_line): Remove init_sal references.  Move
3415         declarations closer to initializations.
3416         (find_function_start_sal): Remove init_sal references.  Move
3417         declarations closer to initializations.
3418         * symtab.h (struct symtab_and_line): In-class initialize all
3419         fields.
3420         * tracepoint.c (set_traceframe_context)
3421         (print_one_static_tracepoint_marker): Remove init_sal references.
3422         Move declarations closer to initializations.
3423         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3424         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3425         declarations closer to initializations.
3426         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3427         init_sal references.  Adjust.
3428
3429 2017-09-04  Pedro Alves  <palves@redhat.com>
3430
3431         * ax-gdb.c (agent_command_1): Use range-for.
3432         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3433         * breakpoint.c: Include "common/array-view.h".
3434         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3435         parameter from struct symtabs_and_lines to
3436         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3437         (breakpoint_sals_to_pc): Change sals parameter from struct
3438         symtabs_and_lines to std::vector reference.
3439         (check_fast_tracepoint_sals): Change sals parameter from struct
3440         symtabs_and_lines to std::array_view.  Use range-for.
3441         (decode_static_tracepoint_spec): Return a std::vector instead of
3442         symtabs_and_lines.  Update.
3443         (create_breakpoint): Update.
3444         (break_range_command, until_break_command, clear_command): Update.
3445         (base_breakpoint_decode_location, bkpt_decode_location)
3446         (bkpt_probe_create_sals_from_location)
3447         (bkpt_probe_decode_location, tracepoint_decode_location)
3448         (tracepoint_probe_decode_location)
3449         (strace_marker_create_sals_from_location): Return a std::vector
3450         instead of symtabs_and_lines.
3451         (strace_marker_create_breakpoints_sal): Update.
3452         (strace_marker_decode_location): Return a std::vector instead of
3453         symtabs_and_lines.  Update.
3454         (update_breakpoint_locations): Change struct symtabs_and_lines
3455         parameters to gdb::array_view.  Adjust.
3456         (location_to_sals): Return a std::vector instead of
3457         symtabs_and_lines.  Update.
3458         (breakpoint_re_set_default): Use std::vector instead of struct
3459         symtabs_and_lines.
3460         (decode_location_default): Return a std::vector instead of
3461         symtabs_and_lines.  Update.
3462         * breakpoint.h: Include "common/array-view.h".
3463         (struct breakpoint_ops) <decode_location>: Now returns a
3464         std::vector instead of returning a symtabs_and_lines via output
3465         parameter.
3466         (update_breakpoint_locations): Change sals parameters to use
3467         gdb::array_view.
3468         * cli/cli-cmds.c (edit_command, list_command): Update to use
3469         std::vector and gdb::array_view.
3470         (ambiguous_line_spec): Adjust to use gdb::array_view and
3471         range-for.
3472         (compare_symtabs): Rename to ...
3473         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3474         const reference and adjust.
3475         (filter_sals): Rewrite using std::vector and standard algorithms.
3476         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3477         (jump_command): Update to use std::vector.
3478         * linespec.c (struct linespec_state) <canonical_names>: Update
3479         comment.
3480         (add_sal_to_sals_basic): Delete.
3481         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3482         (decode_line_2, create_sals_line_offset)
3483         (convert_address_location_to_sals, convert_linespec_to_sals)
3484         (convert_explicit_location_to_sals, parse_linespec)
3485         (event_location_to_sals, decode_line_full, decode_line_1)
3486         (decode_line_with_current_source)
3487         (decode_line_with_last_displayed, decode_objc)
3488         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3489         (linespec_result::~linespec_result): Adjust to use std::vector
3490         instead of symtabs_and_lines.
3491         * linespec.h (linespec_sals::sals): Now a std::vector.
3492         (struct linespec_result): Use std::vector, bool, and in-class
3493         initialization.
3494         (decode_line_1, decode_line_with_current_source)
3495         (decode_line_with_last_displayed): Return std::vector.
3496         * macrocmd.c (info_macros_command): Use std::vector.
3497         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3498         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3499         std::vector.
3500         * probe.h (parse_probes): Return a std::vector.
3501         * python/python.c (gdbpy_decode_line): Use std::vector and
3502         gdb::array_view.
3503         * source.c (select_source_symtab, line_info): Use std::vector.
3504         * stack.c (func_command): Use std::vector.
3505         * symtab.h (struct symtabs_and_lines): Delete.
3506         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3507
3508 2017-09-04  Pedro Alves  <palves@redhat.com>
3509
3510         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3511         unittests/array-view-selftests.c.
3512         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3513         * common/array-view.h: New file.
3514         * unittests/array-view-selftests.c: New file.
3515
3516 2017-09-04  Pedro Alves  <palves@redhat.com>
3517
3518         * cli/cli-cmds.c (edit_command): Pass message to
3519         ambiguous_line_spec.
3520         (list_command): Pass message to ambiguous_line_spec.  Say
3521         "first"/"last" instead of "start" and "end" to be consistent with
3522         the manual.
3523         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3524         them to print formatted message.
3525
3526 2017-09-04  Pedro Alves  <palves@redhat.com>
3527
3528         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3529         ftrace_update_insns by reference instead of pointer.
3530
3531 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3532
3533         * i386-go32-tdep.c: Include x86-xstate.h.
3534         (i386_go32_init_abi): Call i386_target_description.
3535         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3536         if xcr0 is X86_XSTATE_X87_MASK.
3537         * i386-tdep.h (tdesc_i386): Remove the declaration.
3538         (tdesc_i386_mmx): Likewise.
3539
3540 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3541
3542         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3543         X86_XSTATE_SSE_MASK instead of 0.
3544
3545 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3546
3547         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3548         i386_target_description.
3549         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3550         i386_target_description.
3551         * i386-tdep.c (i386_gdbarch_init): Likewise.
3552
3553 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3554
3555         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3556         (x86_darwin_init_abi_64): Call amd64_target_description.
3557         * amd64-dicos-tdep.c: Likewise.
3558         * amd64-fbsd-nat.c: Likewise.
3559         * amd64-fbsd-tdep.c: Likewise.
3560         * amd64-nbsd-tdep.c: Likewise.
3561         * amd64-obsd-tdep.c: Likewise.
3562         * amd64-sol2-tdep.c: Likewise.
3563         * amd64-windows-tdep.c: Likewise.
3564         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3565
3566 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3567
3568         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3569         (btrace_function) <insn>: Change type to use std::vector.
3570         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3571         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3572         ftrace_update_insns, ftrace_compute_global_level_offset,
3573         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3574         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3575         change to std::vector.
3576         (ftrace_update_insns): Adjust to change to std::vector, change
3577         type of INSN parameter.
3578         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3579         * record-btrace.c (btrace_call_history_insn_range,
3580         btrace_compute_src_line_range,
3581         record_btrace_frame_prev_register): Adjust to change to
3582         std::vector.
3583         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3584         to change to std::vector.
3585
3586 2017-09-03  Tom Tromey  <tom@tromey.com>
3587
3588         * corefile.c (reopen_exec_file): Use std::string.
3589
3590 2017-09-03  Tom Tromey  <tom@tromey.com>
3591
3592         * compile/compile.c (compile_register_name_mangled): Return
3593         std::string.
3594         * compile/compile-loc2c.c (pushf_register_address): Update.
3595         (pushf_register): Update.
3596         * compile/compile-c-types.c (convert_array): Update.
3597         * compile/compile-c-symbols.c (generate_vla_size): Update.
3598         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3599         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3600         (convert_one_symbol): Update.
3601         (generate_c_for_for_one_variable): Update.
3602         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3603         std::string.
3604         (generate_register_struct): Update.
3605         * compile/compile-internal.h (c_get_range_decl_name): Return a
3606         std::string.
3607         (compile_register_name_mangled): Return std::string.
3608
3609 2017-09-03  Tom Tromey  <tom@tromey.com>
3610
3611         * utils.c (perror_string): Return a std::string.
3612         (throw_perror_with_name, perror_warning_with_name): Update.
3613
3614 2017-09-03  Tom Tromey  <tom@tromey.com>
3615
3616         * demangle.c (demangle_command): Use std::string,
3617         unique_xmalloc_ptr.
3618
3619 2017-09-03  Tom Tromey  <tom@tromey.com>
3620
3621         * cli/cli-setshow.c (do_set_command): Use std::string.
3622
3623 2017-09-03  Tom Tromey  <tom@tromey.com>
3624
3625         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3626
3627 2017-09-03  Tom Tromey  <tom@tromey.com>
3628
3629         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3630
3631 2017-09-03  Tom Tromey  <tom@tromey.com>
3632
3633         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3634         gdb::unique_xmalloc_ptr.
3635
3636 2017-09-03  Tom Tromey  <tom@tromey.com>
3637
3638         * thread.c (print_thread_info_1): Use string_printf.
3639         (thread_apply_command, thread_apply_all_command): Use
3640         std::string.
3641
3642 2017-09-03  Tom Tromey  <tom@tromey.com>
3643
3644         * valprint.c (val_print_string): Update.
3645         * gdbcore.h (memory_error_message): Return std::string.
3646         * corefile.c (memory_error_message): Return std::string.
3647         (memory_error): Update.
3648         * breakpoint.c (insert_bp_location): Update.
3649
3650 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3651
3652         * target/waitstatus.h (target_waitstatus_to_string): Change
3653         return type to std::string.
3654         * target/waitstatus.c (target_waitstatus_to_string): Return
3655         std::string.
3656         * target.h (target_waitstatus_to_string): Remove declaration.
3657         * infrun.c (resume, clear_proceed_status_thread,
3658         print_target_wait_results, do_target_wait, save_waitstatus,
3659         stop_all_threads): Adjust.
3660         * record-btrace.c (record_btrace_wait): Adjust.
3661         * target-debug.h
3662         (target_debug_print_struct_target_waitstatus_p): Adjust.
3663
3664 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3665
3666         PR gdb/22046
3667         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3668         detection.
3669
3670 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3671
3672         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3673         for setting/unsetting environment variables on the remote target.
3674         (New remote packets): Add entries for QEnvironmentHexEncoded,
3675         QEnvironmentUnset and QEnvironmentReset.
3676         * common/environ.c (gdb_environ::operator=): Extend method to
3677         handle m_user_set_env_list and m_user_unset_env_list.
3678         (gdb_environ::clear): Likewise.
3679         (match_var_in_string): Change type of first parameter from 'char
3680         *' to 'const char *'.
3681         (gdb_environ::set): Extend method to handle
3682         m_user_set_env_list and m_user_unset_env_list.
3683         (gdb_environ::unset): Likewise.
3684         (gdb_environ::clear_user_set_env): New method.
3685         (gdb_environ::user_set_envp): Likewise.
3686         (gdb_environ::user_unset_envp): Likewise.
3687         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3688         m_user_unset_env_list on move constructor/assignment.
3689         (unset): Add new default parameter 'update_unset_list = true'.
3690         (clear_user_set_env): New method.
3691         (user_set_envp): Likewise.
3692         (user_unset_envp): Likewise.
3693         (m_user_set_env_list): New std::set.
3694         (m_user_unset_env_list): Likewise.
3695         * common/rsp-low.c (hex2str): New function.
3696         (bin2hex): New overload for bin2hex function.
3697         * common/rsp-low.c (hex2str): New prototype.
3698         (str2hex): New overload prototype.
3699         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3700         QEnvironmentUnset and QEnvironmentReset.
3701         (remote_protocol_features): Add QEnvironmentHexEncoded,
3702         QEnvironmentUnset and QEnvironmentReset packets.
3703         (send_environment_packet): New function.
3704         (extended_remote_environment_support): Likewise.
3705         (extended_remote_create_inferior): Call
3706         extended_remote_environment_support.
3707         (_initialize_remote): Add QEnvironmentHexEncoded,
3708         QEnvironmentUnset and QEnvironmentReset packet configs.
3709         * unittests/environ-selftests.c (gdb_selftest_env_var):
3710         New variable.
3711         (test_vector_initialization): New function.
3712         (test_init_from_host_environ): Likewise.
3713         (test_reinit_from_host_environ): Likewise.
3714         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3715         Likewise.
3716         (test_unset_set_empty_vector): Likewise.
3717         (test_vector_clear): Likewise.
3718         (test_std_move): Likewise.
3719         (test_move_constructor):
3720         (test_self_move): Likewise.
3721         (test_set_unset_reset): Likewise.
3722         (run_tests): Rewrite in terms of the functions above.
3723
3724 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3725
3726         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3727         (adi_available): Use a temp variable of type CORE_ADDR as argument
3728         3 when calling target_auxv_search.
3729         (adi_normalize_address): Use masks and xor operators to calculate
3730         normalized address.
3731         (adi_read_versions, adi_write_versions, adi_print_versions)
3732         (do_examine, do_assign): Use paddress.
3733
3734 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3735
3736         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3737         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3738         out of loop and add supply of FIR.
3739         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3740         add collect of FIR.
3741
3742 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3743
3744         PR gdb/21827
3745         * cli/cli-script.c (define_command): Don't convert command name
3746         to lower case.
3747
3748 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3749
3750         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3751         Update all callers accordingly. Remove all code blocks handling
3752         the case where DISPP is not NULL.
3753
3754 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3755
3756         PR symtab/22003
3757         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3758         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3759         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3760
3761 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3762
3763         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3764         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3765         (read_comp_units_from_section): New parameter abbrev_section, use
3766         read_and_check_comp_unit_head, allocate signatured_type if needed.
3767         (create_all_comp_units): Update read_comp_units_from_section caller.
3768
3769 2017-08-23  Pedro Alves  <palves@redhat.com>
3770
3771         PR remote/21852
3772         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3773         to null_ptid and switch to thread without reading the registers
3774         after adding the inferior.
3775
3776 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3777
3778         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3779         compile-gcc.
3780         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3781         (compile_to_object): Implement compile_gcc.
3782         (_initialize_compile): Install "set compile-gcc".  Initialize
3783         compile_gcc.
3784
3785 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3786
3787         * compile/compile.c (compile_to_object): Conditionally call
3788         set_verbose.  Conditionally call compile or compile_v0.
3789
3790 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3791
3792         * sparc64-tdep.h: (adi_normalize_address): New export.
3793         * sparc-nat.h: (open_adi_tag_fd): New export.
3794         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3795         * sparc64-linux-tdep.c:
3796         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3797         (sparc64_linux_handle_segmentation_fault): New function.
3798         (sparc64_linux_init_abi): Register
3799         sparc64_linux_handle_segmentation_fault
3800         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3801         (sparc64_addr_bits_remove): New function.
3802         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3803         (MAX_PROC_NAME_SIZE): New macro.
3804         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3805         (sparc64adilist): New variable.
3806         (adi_proc_list): New variable.
3807         (find_adi_info): New function.
3808         (add_adi_info): New function.
3809         (get_adi_info_proc): New function.
3810         (get_adi_info): New function.
3811         (info_adi_command): New function.
3812         (read_maps_entry): New function.
3813         (adi_available): New function.
3814         (adi_normalize_address): New function.
3815         (adi_align_address): New function.
3816         (adi_convert_byte_count): New function.
3817         (adi_tag_fd): New function.
3818         (adi_is_addr_mapped): New function.
3819         (adi_read_versions): New function.
3820         (adi_write_versions): New function.
3821         (adi_print_versions): New function.
3822         (do_examine): New function.
3823         (do_assign): New function.
3824         (adi_examine_command): New function.
3825         (adi_assign_command): New function.
3826         (_initialize_sparc64_adi_tdep): New function.
3827
3828 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3829
3830         * breakpoint.c (breakpoints_info): Rename to ...
3831         (info_breakpoints_command): ... this.
3832         (watchpoints_info): Rename to ...
3833         (info_watchpoints_command): ... this.
3834         (tracepoints_info): Rename to ...
3835         (info_tracepoints_command): ... this.
3836         (_initialize_breakpoint): Adjust.
3837         * dcache.c (dcache_info): Rename to ...
3838         (info_display_command): ... this.
3839         (_initialize_dcache): Adjust.
3840         * frame.h (args_info): Rename to ...
3841         (info_args_command): ... this.
3842         (locals_info): Rename to ...
3843         (info_locals_command): ... this.
3844         * infcmd.c (nofp_registers_info): Rename to ...
3845         (info_registers_command): ... this.
3846         (float_info): Rename to ...
3847         (info_float_command): ... this.
3848         (program_info): Rename to ...
3849         (info_program_command): ... this.
3850         (all_registers_info): Rename to ...
3851         (info_all_registers_command): ... this.
3852         (vector_info): Rename to ...
3853         (info_vector_command): ... this.
3854         (float_info): Rename to ...
3855         (info_float_command): ... this.
3856         (_initialize_infcmd): Adjust.
3857         * inferior.h (term_info): Rename to ...
3858         (info_terminal_command): ... this.
3859         * inflow.c (term_info): Rename to ...
3860         (info_terminal_command): ... this.
3861         (_initialize_inflow): Adjust.
3862         * infrun.c (signals_info): Rename to ...
3863         (info_signals_command): ... this.
3864         (_initialize_infrun): Adjust.
3865         * objc-lang.c (classes_info): Rename to ...
3866         (info_classes_command): ... this.
3867         (selectors_info): Rename to ...
3868         (info_selectors_command): ... this.
3869         (_initialize_objc_language): Adjust.
3870         * printcmd.c (sym_info): Rename to ...
3871         (info_symbol_command): ... this.
3872         (address_info): Rename to ...
3873         (info_address_command): ... this.
3874         (display_info): Rename to ...
3875         (info_display_command): ... this.
3876         (_initialize_printcmd): Adjust.
3877         * reverse.c (bookmarks_info): Rename to ...
3878         (info_breakpoints_command): ... this.
3879         (_initialize_reverse): Adjust.
3880         * ser-go32.c (dos_info): Rename to ...
3881         (info_serial_command): ... this.
3882         (_initialize_ser_dos): Adjust.
3883         * skip.c (skip_info): Rename to ...
3884         (info_skip_command): ... this.
3885         (_initialize_step_skip): Adjust.
3886         * source.c (line_info): Rename to ...
3887         (info_line_command): ... this.
3888         (source_info): Rename to ...
3889         (info_source_command)
3890         * stack.c (frame_info): Rename to ...
3891         (info_frame_command): ... this.
3892         (locals_info): Rename to ...
3893         (info_locals_command): ... this.
3894         (args_info): Rename to ...
3895         (info_args_command): ... this.
3896         (_initialize_stack): Adjust.
3897         * symtab.c (sources_info): Rename to ...
3898         (info_sources_command): ... this.
3899         (variables_info): Rename to ...
3900         (info_variables_command): ... this.
3901         (functions_info): Rename to ...
3902         (info_functions_command): ... this.
3903         (types_info): Rename to ...
3904         (info_types_command): ... this.
3905         (_initialize_symtab): Adjust.
3906         * target.c (target_info): Rename to ...
3907         (info_target_command): ... this.
3908         (initialize_targets): Adjust.
3909         * tracepoint.c (tvariables_info): Rename to ...
3910         (info_tvariables_command): ... this.
3911         (scope_info): Rename to ...
3912         (info_scope_command): ... this.
3913         (trace_dump_actions): Adjust.
3914         (_initialize_tracepoint): Adjust.
3915
3916 2017-08-22  Tom Tromey  <tom@tromey.com>
3917
3918         * breakpoint.h (install_breakpoint): Update.
3919         * breakpoint.c (add_solib_catchpoint): Update.
3920         (install_breakpoint): Change argument to a std::unique_ptr.
3921         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3922         (create_breakpoint_sal, create_breakpoint): Update.
3923         (watch_command_1, catch_exec_command_1)
3924         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3925         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3926         Return the breakpoint.
3927         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3928         (new_single_step_breakpoint): Update.
3929         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3930         std::unique_ptr.
3931         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3932         std::unique_ptr.
3933         * break-catch-sig.c (create_signal_catchpoint): Use
3934         std::unique_ptr.
3935         * ada-lang.c (create_ada_exception_catchpoint): Use
3936         std::unique_ptr.
3937
3938 2017-08-22  Tom Tromey  <tom@tromey.com>
3939
3940         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3941
3942 2017-08-22  Tom Tromey  <tom@tromey.com>
3943
3944         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3945         (lookup_partial_symbol): Update.
3946
3947 2017-08-22  Tom Tromey  <tom@tromey.com>
3948
3949         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3950         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3951         (find_and_open_source, symtab_to_fullname): Update.
3952         * psymtab.c (psymtab_to_fullname): Update.
3953
3954 2017-08-22  Tom Tromey  <tom@tromey.com>
3955
3956         * exec.c (exec_file_attach): Update.
3957         * linux-thread-db.c (try_thread_db_load): Update.
3958         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3959         * utils.c (gdb_realpath): Change return type.
3960         (gdb_realpath_keepfile): Update.
3961         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3962         (_initialize_utils): Register the new self test.
3963         * source.c (openp): Update.
3964         (find_and_open_source): Update.
3965         * nto-tdep.c (nto_find_and_open_solib): Update.
3966         * main.c (set_gdb_data_directory): Update.
3967         (captured_main_1): Update.
3968         * dwarf2read.c (dwarf2_get_dwz_file): Update
3969         (dw2_map_symbol_filenames): Update.
3970         * auto-load.c (auto_load_safe_path_vec_update): Update.
3971         (filename_is_in_auto_load_safe_path_vec): Change type of
3972         "filename_realp".
3973         (auto_load_objfile_script): Update.
3974         (file_is_auto_load_safe): Update.  Use std::string.
3975         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3976
3977 2017-08-22  Tom Tromey  <tom@tromey.com>
3978
3979         * utils.c (gdb_realpath_keepfile): Return a
3980         gdb::unique_xmalloc_ptr.
3981         * exec.c (exec_file_attach): Update.
3982         * utils.h (gdb_realpath_keepfile): Return a
3983         gdb::unique_xmalloc_ptr.
3984
3985 2017-08-22  Tom Tromey  <tom@tromey.com>
3986
3987         * compile/compile.c (compile_file_command): Use
3988         gdb::unique_xmalloc_ptr, std::string.
3989         * utils.c (gdb_abspath): Change return type.
3990         * source.c (openp): Update.
3991         * objfiles.c (allocate_objfile): Update.
3992         * main.c (set_gdb_data_directory): Update.
3993         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3994
3995 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3996
3997         * cli-cmds.c (list_commands): List actual code around more than
3998         one location.
3999
4000 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
4001
4002         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4003
4004 2017-08-21  Pedro Alves  <palves@redhat.com>
4005
4006         PR gdb/19487
4007         * c-exp.y (variable production): Handle function aliases.
4008         * minsyms.c (msymbol_is_text): New function.
4009         * minsyms.h (msymbol_is_text): Declare.
4010         * symtab.c (find_function_alias_target): New function.
4011         * symtab.h (find_function_alias_target): Declare.
4012
4013 2017-08-21  Pedro Alves  <palves@redhat.com>
4014
4015         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4016         typedefs.
4017         * typeprint.c (whatis_exp): If handling "whatis", and expression
4018         is OP_TYPE, strip one typedef level.  Otherwise don't strip
4019         typedefs here.
4020         * valops.c (value_cast): Save "to" type before resolving
4021         stubs/typedefs.  Use that type as resulting value's type.
4022
4023 2017-08-18  Tom Tromey  <tom@tromey.com>
4024             Pedro Alves  <palves@redhat.com>
4025
4026         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4027         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4028         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4029         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4030         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4031         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4032         (linux_get_siginfo_data): Add "thread" argument.  Use
4033         scoped_restore.
4034         * linux-nat.c (linux_child_follow_fork)
4035         (check_stopped_by_watchpoint): Use scoped_restore.
4036         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4037         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4038         (restore_inferior_ptid, save_inferior_ptid): Remove.
4039         * btrace.c (btrace_fetch): Use scoped_restore.
4040         * bsd-uthread.c (bsd_uthread_fetch_registers)
4041         (bsd_uthread_store_registers): Use scoped_restore.
4042         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4043         scoped_restore.
4044         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4045         (aix_thread_xfer_partial): Use scoped_restore.
4046         * inferior.h (save_inferior_ptid): Remove.
4047
4048 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4049
4050         PR tdep/21818
4051         * arm-tdep.c (gdb_print_insn_arm): Mark
4052         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4053
4054 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4055
4056         * NEWS: Mention GDBserver's new option "--selftest".
4057         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4058         * selftest.c: Move it to common/selftest.c.
4059         * selftest.h: Move it to common/selftest.h.
4060         * selftest-arch.c (reset): New function.
4061         (tests_with_arch): Call reset.
4062
4063 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4064
4065         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4066         instead of exception_fprintf and printf_filtered.
4067
4068 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4069
4070         * selftest.c (register_self_test): Rename it to
4071         selftests::register_test.
4072         (run_self_tests): selftest::run_tests.
4073         * selftest.h: Update declarations.
4074         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4075         selftests::register_test_foreach_arch.
4076         * selftest-arch.h: Update declaration.
4077         * aarch64-tdep.c: Update.
4078         * arm-tdep.c: Likewise.
4079         * disasm-selftests.c: Likewise.
4080         * dwarf2loc.c: Likewise.
4081         * dwarf2-frame.c: Likewise.
4082         * findvar.c: Likewise.
4083         * gdbarch-selftests.c: Likewise.
4084         * maint.c (maintenance_selftest): Likewise.
4085         * regcache.c: Likewise.
4086         * rust-exp.y: Likewise.
4087         * selftest-arch.c: Likewise.
4088         * unittests/environ-selftests.c: Likewise.
4089         * unittests/function-view-selftests.c: Likewise.
4090         * unittests/offset-type-selftests.c: Likewise.
4091         * unittests/optional-selftests.c: Likewise.
4092         * unittests/scoped_restore-selftests.c: Likewise.
4093         * utils-selftests.c: Likewise.
4094
4095 2017-08-17  Pedro Alves  <palves@redhat.com>
4096
4097         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4098         local.
4099
4100 2017-08-17  Pedro Alves  <palves@redhat.com>
4101
4102         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4103         field.
4104         (reset_die_in_process): Delete, replaced by ...
4105         (process_die_scope): ... this new class.  Make it responsible for
4106         freeing cu->line_header too.
4107         (process_die): Use process_die_scope.
4108         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4109         cu->line_header_die_owner.  Don't release the line header if it's
4110         owned by the CU.
4111         (setup_type_unit_groups): Make the CU/DIE own the line header.
4112         Don't release the line header here.
4113
4114 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4115
4116         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4117
4118 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4119
4120         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4121         Single-Key mode
4122
4123 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4124
4125         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4126         mode command list.
4127
4128 2017-08-15  Stafford Horne  <shorne@gmail.com>
4129
4130         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4131
4132 2017-08-15  Stafford Horne  <shorne@gmail.com>
4133
4134         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4135
4136 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4137
4138         PR gdb/21954
4139         * infcmd.c (unset_environment_command): Use the 'clear' method on
4140         the environment instead of resetting it.
4141
4142 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4143
4144         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4145         platforms.
4146
4147 2017-08-14  Tom Tromey  <tom@tromey.com>
4148
4149         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4150         (print_binary_chars): Likewise.
4151         (BITS_IN_BYTES): Remove.
4152
4153 2017-08-14  Tom Tromey  <tom@tromey.com>
4154
4155         PR gdb/21675
4156         * valprint.c (LOW_ZERO): Change value to 034.
4157         (print_octal_chars): Add static_asserts for octal constants.
4158         * printcmd.c (print_scalar_formatted): Add 'd' case.
4159
4160 2017-08-11  Tom Tromey  <tom@tromey.com>
4161
4162         * symfile.c (add_symbol_file_command): Use std::vector.
4163
4164 2017-08-14  Tom Tromey  <tom@tromey.com>
4165
4166         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4167         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4168         std::move.
4169         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4170
4171 2017-08-11  Pedro Alves  <palves@redhat.com>
4172
4173         * infrun.c (process_event_stop_test): Adjust
4174         function_name_is_marked_for_skip call.
4175         * skip.c: Include <list>.
4176         (skiplist_entry): Make it a class with private fields, and
4177         getters/setters.
4178         (skiplist_entry_chain): Delete.
4179         (skiplist_entries): New.
4180         (skiplist_entry_count): Delete.
4181         (highest_skiplist_entry_num): New.
4182         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4183         (add_skiplist_entry): Delete.
4184         (skiplist_entry::skiplist_entry): New.
4185         (skiplist_entry::add_entry): New.
4186         (skip_file_command, skip_function): Adjust.
4187         (compile_skip_regexp): Delete.
4188         (skip_command): Don't compile regexp here.  Adjust to use
4189         skiplist_entry::add_entry.
4190         (skip_info): Adjust to use range-for and getters.
4191         (skip_enable_command, skip_disable_command): Adjust to use
4192         range-for and setters.
4193         (skip_delete_command): Adjust to use std::list.
4194         (add_skiplist_entry): Delete.
4195         (skip_file_p): Delete, refactored as ...
4196         (skiplist_entry::do_skip_file_p): ... this new method.
4197         (skip_gfile_p): Delete, refactored as ...
4198         (skiplist_entry::do_gskip_file_p): ... this new method.
4199         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4200         (skiplist_entry::skip_function_p): ... this new method.
4201         (function_name_is_marked_for_skip): Now returns bool, and takes
4202         the function sal by const reference.  Adjust to use range-for and
4203         skiplist_entry methods.
4204         (_initialize_step_skip): Remove references to
4205         skiplist_entry_chain, skiplist_entry_count.
4206         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4207         takes the function sal by const reference.
4208
4209 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4210
4211         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4212         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4213         (dwarf2_frame_cache):
4214         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4215         RETURN_MASK_ALL and set *this_case to NULL.
4216         * frame-unwind.h: Update comments.
4217
4218 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4219
4220         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4221         (dwarf2_frame_state_copy_regs): Remove.
4222         (dwarf2_frame_state_free_regs): Remove.
4223         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4224         (dwarf2_restore_rule): Call method .alloc_regs instead of
4225         dwarf2_frame_state_alloc_regs.
4226         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4227         constructor.  Call std::move.
4228         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4229         (dwarf2_frame_cache): Likewise.
4230
4231         [GDB_SELF_TEST]: Include selftest.h and
4232         selftest-arch.h.
4233         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4234         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4235         execute_cfa_program_test.
4236
4237         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4238         copy ctor, assignment operator, move assignment.
4239         <alloc_regs>: New method.
4240         <swap>: New method.
4241         (struct dwarf2_frame_state): Delete dtor.
4242         (dwarf2_frame_state_alloc_regs): Remove declaration.
4243         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4244         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4245
4246 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4247
4248         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4249         (dwarf2_frame_state::dwarf2_frame_state): New.
4250         (dwarf2_frame_state::~dwarf2_frame_state): New.
4251         (dwarf2_fetch_cfa_info): Update.
4252         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4253         rather than a pointer.  Update code.
4254         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4255         dtor.
4256         <data_align, code_align, retaddr_column>: Change them to const.
4257         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4258         to bool.
4259
4260 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4261
4262         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4263         <loc.exp>: New field.
4264         * dwarf2-frame.c (execute_cfa_program): Update.
4265         (dwarf2_frame_prev_register): Update.
4266
4267 2017-08-10  Pedro Alves  <palves@redhat.com>
4268
4269         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4270
4271 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4272
4273         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4274         (fbsd_pending_children): Use std::list.
4275         (fbsd_remember_child): Likewise.
4276         (fbsd_is_child_pending): Likewise.
4277         (fbsd_pending_vfork_done): Use std::forward_list.
4278         (fbsd_add_vfork_done): Likewise.
4279         (fbsd_is_vfork_done_pending): Likewise.
4280         (fbsd_next_vfork_done): Likewise.
4281
4282 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4283
4284         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4285         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4286         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4287         for `mapfilename'.
4288         (fbsd_xfer_partial): Use gdb::byte_vector.
4289         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4290
4291 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4292
4293         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4294         "filestuff.h".
4295         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4296
4297 2017-08-09  Tom Tromey  <tom@tromey.com>
4298
4299         * skip.c (skiplist_entry): New constructor.
4300         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4301         (skiplist_entry::file_is_glob): Now bool.
4302         (skiplist_entry::file, skiplist_entry::function): Now
4303         std::string.
4304         (make_skip_entry): Return a unique_ptr.  Use new.
4305         (free_skiplist_entry, free_skiplist_entry_cleanup)
4306         (make_free_skiplist_entry_cleanup): Remove.
4307         (skip_command, skip_disable_command, add_skiplist_entry)
4308         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4309         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4310         (function_name_is_marked_for_skip): Update.
4311         (skip_delete_command): Update.  Use delete.
4312
4313 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4314
4315         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4316         (aarch64_linux_core_read_description): New function.
4317         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4318
4319 2017-08-09  Pedro Alves  <palves@redhat.com>
4320
4321         * cp-name-parser.y (cp_comp_to_string): Return a
4322         gdb::unique_xmalloc_ptr<char>.
4323         * cp-support.c (replace_typedefs_qualified_name)
4324         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4325         (cp_canonicalize_string_full): Use op= instead of explicit
4326         convertion.
4327         (cp_class_name_from_physname, method_name_from_physname)
4328         (cp_func_name, cp_remove_params): Adjust to use
4329         gdb::unique_xmalloc_ptr<char>.
4330         * cp-support.h (cp_comp_to_string): Return a
4331         gdb::unique_xmalloc_ptr<char>.
4332         * python/py-type.c (typy_lookup_type): Adjust to use
4333         gdb::unique_xmalloc_ptr<char>.
4334
4335 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4336
4337         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4338
4339 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4340             Yao Qi  <yao.qi@linaro.org>
4341
4342         * cp-support.c (cp_canonicalize_string_full): Use
4343         gdb::unique_xmalloc_ptr<char>.
4344         (cp_canonicalize_string): Likewise.
4345
4346 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4347
4348         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4349         * regformats/i386/amd64-avx-avx512.dat: Remove.
4350         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4351         * regformats/i386/amd64-avx-mpx.dat:Remove.
4352         * regformats/i386/amd64-avx.dat: Remove.
4353         * regformats/i386/amd64-mpx.dat: Remove.
4354         * regformats/i386/i386-avx-avx512.dat: Remove.
4355         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4356         * regformats/i386/i386-avx-mpx.dat: Remove.
4357         * regformats/i386/i386-mmx.dat: Remove.
4358         * regformats/i386/i386-mpx.dat: Remove.
4359
4360 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4361
4362         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4363         * amd64-tdep.c: Don't include features/i386/x32*.c.
4364         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4365         functions.
4366         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4367         and i386/x32-avx-avx512.
4368         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4369         and i386/x32.xml.
4370         * features/i386/x32-avx-avx512.c: Removed.
4371         * features/i386/x32-avx-avx512.xml: Removed.
4372         * features/i386/x32-avx.c: Removed.
4373         * features/i386/x32-avx.xml: Removed.
4374         * features/i386/x32.c: Removed.
4375         * features/i386/x32.xml: Removed.
4376         * regformats/i386/x32-avx-avx512.dat: Removed.
4377         * regformats/i386/x32-avx.dat: Removed.
4378         * regformats/i386/x32.dat: Removed.
4379
4380 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4381
4382         PR breakpoints/21886
4383         * mem-break.c (default_memory_insert_breakpoint): Use
4384         `->placed_address' rather than `->reqstd_address' for the
4385         breakpoint location.
4386
4387 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4388
4389         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4390         assertions.
4391
4392 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4393
4394         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4395         a union of `tdep_info', `tdesc_data' and `id'.
4396         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4397         rather than `info.tdep_info'.
4398         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4399         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4400         * i386-tdep.c (i386_gdbarch_init): Likewise.
4401         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4402         * mips-tdep.c (mips_gdbarch_init): Likewise.
4403         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4404         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4405         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4406         `info.tdep_info'.
4407         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4408         `info.tdep_info'.
4409         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4410         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4411         `info.tdep_info'.
4412         * spu-tdep.c (spu_gdbarch_init): Likewise.
4413         * gdbarch.h: Regenerate.
4414
4415 2017-08-07  Leszek Swirski  <leszeks@google.com>
4416
4417         PR symtab/20899
4418         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4419
4420 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4421
4422         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4423         (gdbsim_open): Rename gdb_argv args object to argv.
4424
4425 2017-08-05  Tom Tromey  <tom@tromey.com>
4426
4427         * compile/compile-object-load.c (compile_object_load): Use
4428         gdb::unique_xmalloc_ptr.
4429         * cli/cli-dump.c (scan_filename): Rename from
4430         scan_filename_with_cleanup.  Change return type.
4431         (scan_expression): Rename from scan_expression_with_cleanup.
4432         Change return type.
4433         (dump_memory_to_file, dump_value_to_file, restore_command):
4434         Use gdb::unique_xmalloc_ptr.  Update.
4435         * cli/cli-cmds.c (find_and_open_script): Use
4436         gdb::unique_xmalloc_ptr.
4437         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4438         * symmisc.c (maintenance_print_symbols)
4439         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4440         * symfile.c (symfile_bfd_open, generic_load)
4441         (add_symbol_file_command, remove_symbol_file_command): Use
4442         gdb::unique_xmalloc_ptr.
4443         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4444         * psymtab.c (maintenance_print_psymbols): Use
4445         gdb::unique_xmalloc_ptr.
4446         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4447         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4448         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4449         (reload_shared_libraries_1): Likewise.
4450
4451 2017-08-05  Tom Tromey  <tom@tromey.com>
4452
4453         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4454         (rust_op_vector, rust_set_vector): New typedefs.
4455         (current_parser): New global.
4456         (work_obstack): Change to pointer type.  Update all users.
4457         (rust_ast, pstate): Remove globals.
4458         (struct rust_parser): New.
4459         (%union) <params, field_inits>: Change type.
4460         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4461         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4462         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4463         (convert_params_to_types, convert_params_to_expression): Change
4464         type of "params".
4465         (ast_string): Change type of "fields".
4466         (rust_parse): Make a rust_parser.  Remove cleanups.
4467         (rust_lex_tests): Make and install an auto_obstack.
4468
4469 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4470
4471         * configure.srv (ipa_x32_linux_regobj): New.
4472         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4473         instead of X86_TDESC_AVX512.
4474         (initialize_low_tracepoint): Call
4475         init_registers_x32_avx_avx512_linux.
4476
4477 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4478
4479         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4480
4481 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4482
4483         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4484
4485 2017-08-03  Tom Tromey  <tom@tromey.com>
4486
4487         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4488         Remove.
4489         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4490
4491 2017-08-03  Tom Tromey  <tom@tromey.com>
4492
4493         * python/py-param.c (compute_enum_values): Use gdb_argv.
4494
4495 2017-08-03  Tom Tromey  <tom@tromey.com>
4496
4497         * utils.h (struct gdb_argv_deleter): New.
4498         (gdb_argv): New class.
4499         * utils.c (gdb_argv::reset): New method.
4500         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4501         * tracefile.c (tsave_command): Use gdb_argv.
4502         * top.c (new_ui_command): Use gdb_argv.
4503         * symmisc.c (maintenance_print_symbols)
4504         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4505         * symfile.c (symbol_file_command, generic_load)
4506         (remove_symbol_file_command): Use gdb_argv.
4507         * stack.c (backtrace_command): Use gdb_argv.
4508         * source.c (add_path, show_substitute_path_command)
4509         (unset_substitute_path_command, set_substitute_path_command):
4510         Use gdb_argv.
4511         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4512         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4513         * remote.c (extended_remote_run, remote_put_command)
4514         (remote_get_command, remote_delete_command): Use gdb_argv.
4515         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4516         (gdbsim_open): Use gdb_argv.
4517         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4518         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4519         * procfs.c (procfs_info_proc): Use gdb_argv.
4520         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4521         * infrun.c (handle_command): Use gdb_argv.
4522         * inferior.c (add_inferior_command, clone_inferior_command):
4523         Use gdb_argv.
4524         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4525         * exec.c (exec_file_command): Use gdb_argv.
4526         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4527         * compile/compile.c (build_argc_argv): Use gdb_argv.
4528
4529 2017-08-03  Tom Tromey  <tom@tromey.com>
4530
4531         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4532
4533 2017-08-03  Tom Tromey  <tom@tromey.com>
4534
4535         * python/python.c (compute_python_string): Return std::string.
4536         (gdbpy_eval_from_control_command): Update.
4537         (do_start_initialization): Use std::string.
4538         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4539         xstrprintf.
4540         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4541         xstrprintf.
4542
4543 2017-08-03  Tom Tromey  <tom@tromey.com>
4544
4545         * top.h (do_restore_instream_cleanup): Remove.
4546         * top.c (do_restore_instream_cleanup): Remove.
4547         (read_command_file): Use scoped_restore.
4548         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4549
4550 2017-08-03  Tom Tromey  <tom@tromey.com>
4551
4552         * cli/cli-script.c (execute_user_command)
4553         (execute_control_command): Use scoped_restore.
4554
4555 2017-08-03  Tom Tromey  <tom@tromey.com>
4556
4557         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4558         (execute_user_command): Remove user_call_depth; use
4559         user_args_stack's size instead.
4560
4561 2017-08-03  Tom Tromey  <tom@tromey.com>
4562
4563         * top.h (in_user_command): Remove.
4564         * top.c (in_user_command): Remove.
4565         * cli/cli-script.c (do_restore_user_call_depth)
4566         (execute_user_command): Update.
4567
4568 2017-08-03  Tom Tromey  <tom@tromey.com>
4569
4570         * valops.c (search_struct_method): Use gdb::byte_vector.
4571         * valarith.c (value_concat): Use std::vector.
4572         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4573         (simple_search_memory): Likewise.
4574         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4575         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4576         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4577         * elfread.c (elf_rel_plt_read): Use std::string.
4578         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4579         * cli/cli-dump.c (restore_section_callback): Use
4580         gdb::byte_vector.
4581
4582 2017-08-03  Tom Tromey  <tom@tromey.com>
4583
4584         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4585
4586 2017-08-03  Tom Tromey  <tom@tromey.com>
4587
4588         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4589         (tui_register_format): Use scoped_restore.
4590
4591 2017-08-03  Tom Tromey  <tom@tromey.com>
4592
4593         * reverse.c (exec_direction_default): Remove.
4594         (exec_reverse_once): Use scoped_restore.
4595         * remote.c (restore_remote_timeout): Remove.
4596         (remote_flash_erase, remote_flash_write, remote_flash_done)
4597         (readchar, remote_serial_write): Use scoped_restore.
4598         * cli/cli-script.c (struct source_cleanup_lines_args)
4599         (source_cleanup_lines): Remove.
4600         (script_from_file): Use scoped_restore.
4601         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4602         (source_command): Use scoped_restore.
4603
4604 2017-08-03  Tom Tromey  <tom@tromey.com>
4605
4606         * utils.h (make_cleanup_free_so): Remove.
4607         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4608         * solist.h (struct so_deleter): New.
4609         (so_list_up): New typedef.
4610         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4611
4612 2017-08-03  Tom Tromey  <tom@tromey.com>
4613
4614         * utils.h (make_cleanup_restore_current_language): Remove.
4615         * utils.c (do_restore_current_language)
4616         (make_cleanup_restore_current_language): Remove.
4617         * parse.c (parse_exp_in_context_1)
4618         (parse_expression_with_language): Use
4619         scoped_restore_current_language.
4620         * mi/mi-main.c (mi_cmd_execute): Use
4621         scoped_restore_current_language.
4622         * language.h (scoped_restore_current_language): New class.
4623
4624 2017-08-03  Tom Tromey  <tom@tromey.com>
4625
4626         * compile/compile.c (cleanup_unlink_file): Remove.
4627         (compile_to_object): Use gdb::unlinker.
4628         (eval_compile_command): Likewise.
4629
4630 2017-08-03  Tom Tromey  <tom@tromey.com>
4631
4632         * utils.h (make_cleanup_fclose): Remove.
4633         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4634
4635 2017-08-03  Tom Tromey  <tom@tromey.com>
4636
4637         * top.c (open_terminal_stream): Return gdb_file_up.
4638         (new_ui_command): Update.
4639
4640 2017-08-03  Tom Tromey  <tom@tromey.com>
4641
4642         * source.c (print_source_lines_base, forward_search_command)
4643         (reverse_search_command): Use gdb_file_up.
4644
4645 2017-08-03  Tom Tromey  <tom@tromey.com>
4646
4647         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4648
4649 2017-08-03  Tom Tromey  <tom@tromey.com>
4650
4651         * cli/cli-cmds.c (find_and_open_script): Change return type.
4652         Remove "streamp" and "full_path" parameters.
4653         (source_script_with_search): Update.
4654         * auto-load.c (source_script_file): Update.
4655         * cli/cli-cmds.h (find_and_open_script): Change type.
4656         (open_script): New struct.
4657
4658 2017-08-03  Tom Tromey  <tom@tromey.com>
4659
4660         * xml-support.c (xml_fetch_content_from_file): Update.
4661         * ui-file.c (stdio_file::open): Update.
4662         * tracefile-tfile.c (tfile_start): Update.
4663         * remote.c (remote_file_put, remote_file_get): Update.
4664         * nat/linux-procfs.c (linux_proc_get_int)
4665         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4666         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4667         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4668         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4669         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4670         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4671         * linux-nat.c (linux_proc_pending_signals): Update.
4672         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4673         (file_closer): Remove.
4674         * compile/compile.c (compile_to_object): Update.
4675         * common/filestuff.h (struct gdb_file_deleter): New.
4676         (gdb_file_up): New typedef.
4677         (gdb_fopen_cloexec): Change return type.
4678         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4679         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4680         (dump_binary_file, restore_binary_file): Update.
4681         * auto-load.c (auto_load_objfile_script_1): Update.
4682
4683 2017-08-03  Tom Tromey  <tom@tromey.com>
4684
4685         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4686         (info_static_tracepoint_markers_command): Likewise.
4687         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4688         * skip.c (skip_info): Use ui_out_emit_table.
4689         * progspace.c (print_program_space): Use ui_out_emit_table.
4690         * osdata.c (info_osdata): Use ui_out_emit_table.
4691         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4692         ui_out_emit_table.
4693         * linux-thread-db.c (info_auto_load_libthread_db): Use
4694         ui_out_emit_table.
4695         * inferior.c (print_inferior): Use ui_out_emit_table.
4696         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4697         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4698         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4699         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4700         * ui-out.h (class ui_out_emit_table): New.
4701
4702 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4703
4704         * mips-tdep.c (mips_fpu_type_str): New function.
4705         (mips_dump_tdep): Call it.
4706
4707 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4708
4709         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4710         `->mips_fpu_type'.
4711
4712 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4713
4714         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4715
4716 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4717
4718         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4719
4720 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4721
4722         * cli/cli-cmds.c (maintenancechecklist): New variable.
4723         * gdbcmd.h (maintenancechecklist): Declare it.
4724         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4725         Call i386_linux_read_description with different masks.
4726         * maint.c (maintenance_check_command): New function.
4727         (_initialize_maint_cmds): Call add_prefix_cmd.
4728         * target-descriptions.c (tdesc_reg): override operator != and ==.
4729         (tdesc_type): Likewise.
4730         (tdesc_feature): Likewise.
4731         (target_desc): Likewise.
4732         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4733         (maintenance_check_xml_descriptions): New function.
4734         (_initialize_target_descriptions) Add command "xml-descriptions".
4735         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4736
4737 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4738
4739         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4740         Include features/i386/32bit-*.c.
4741         (i386_linux_read_description): Generate target description if it
4742         doesn't exist.
4743         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4744         functions.
4745         * features/i386/32bit-linux.c: Re-generated.
4746         * features/i386/32bit-sse.c: Likewise.
4747         * target-descriptions.c (print_c_feature::visit): Print code to
4748         set register number if needed.
4749         (print_c_feature) <m_next_regnum>: New field.
4750
4751 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4752
4753         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4754         (FEATURE_XMLFILES): New.
4755         (FEATURE_CFILES): New.
4756         New rules.
4757         (clean-cfiles): Remove generated c files.
4758         * features/i386/32bit-avx.c: Generated.
4759         * features/i386/32bit-avx512.c: Generated.
4760         * features/i386/32bit-core.c: Generated.
4761         * features/i386/32bit-linux.c: Generated.
4762         * features/i386/32bit-mpx.c: Generated.
4763         * features/i386/32bit-pkeys.c: Generated.
4764         * features/i386/32bit-sse.c: Generated.
4765         * target-descriptions.c: Include algorithm.
4766         (tdesc_element_visitor): Add method visit_end.
4767         (print_c_tdesc): Implement visit_end.
4768         (print_c_tdesc:: m_filename_after_features): Move it to
4769         protected.
4770         (print_c_feature): New class.
4771         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4772         name starts with "i386/32bit-".
4773
4774 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4775
4776         * target-descriptions.c (tdesc_element_visitor): New class.
4777         (tdesc_element): New class.
4778         (tdesc_reg): Inherit from tdesc_element.
4779         (tdesc_reg::accept): New function.
4780         (tdesc_type): Inherit from tdesc_element.
4781         (tdesc_type::accept): New function.
4782         (tdesc_feature): Inherit from tdesc_element.
4783         (tdesc_feature::accept): New function.
4784         (target_desc): Inherit from tdesc_element.
4785         (target_desc::target_desc): New.
4786         (target_desc::~target_desc): New.
4787         (target_desc::accept): New.
4788         (allocate_target_description): Use new.
4789         (free_target_description): Use delete.
4790         (print_c_tdesc): New class.
4791         (maint_print_c_tdesc_cmd): Adjust.
4792
4793         * features/aarch64.c: Re-generated.
4794         * features/arc-arcompact.c: Re-generated.
4795         * features/arc-v2.c: Re-generated.
4796         * features/arm/arm-with-iwmmxt.c: Re-generated.
4797         * features/arm/arm-with-m.c: Re-generated.
4798         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4799         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4800         * features/arm/arm-with-neon.c: Re-generated.
4801         * features/arm/arm-with-vfpv2.c: Re-generated.
4802         * features/arm/arm-with-vfpv3.c: Re-generated.
4803         * features/i386/amd64-avx-avx512.c: Re-generated.
4804         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4805         * features/i386/amd64-avx.c: Re-generated.
4806         * features/i386/amd64-avx-linux.c: Re-generated.
4807         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4808         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4809         * features/i386/amd64-avx-mpx.c: Re-generated.
4810         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4811         * features/i386/amd64.c: Re-generated.
4812         * features/i386/amd64-linux.c: Re-generated.
4813         * features/i386/amd64-mpx.c: Re-generated.
4814         * features/i386/amd64-mpx-linux.c: Re-generated.
4815         * features/i386/i386-avx-avx512.c: Re-generated.
4816         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4817         * features/i386/i386-avx.c: Re-generated.
4818         * features/i386/i386-avx-linux.c: Re-generated.
4819         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4820         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4821         * features/i386/i386-avx-mpx.c: Re-generated.
4822         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4823         * features/i386/i386.c: Re-generated.
4824         * features/i386/i386-linux.c: Re-generated.
4825         * features/i386/i386-mmx.c: Re-generated.
4826         * features/i386/i386-mmx-linux.c: Re-generated.
4827         * features/i386/i386-mpx.c: Re-generated.
4828         * features/i386/i386-mpx-linux.c: Re-generated.
4829         * features/i386/x32-avx-avx512.c: Re-generated.
4830         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4831         * features/i386/x32-avx.c: Re-generated.
4832         * features/i386/x32-avx-linux.c: Re-generated.
4833         * features/i386/x32.c: Re-generated.
4834         * features/i386/x32-linux.c: Re-generated.
4835         * features/microblaze.c: Re-generated.
4836         * features/microblaze-with-stack-protect.c: Re-generated.
4837         * features/mips64-dsp-linux.c: Re-generated.
4838         * features/mips64-linux.c: Re-generated.
4839         * features/mips-dsp-linux.c: Re-generated.
4840         * features/mips-linux.c: Re-generated.
4841         * features/nds32.c: Re-generated.
4842         * features/nios2.c: Re-generated.
4843         * features/nios2-linux.c: Re-generated.
4844         * features/rs6000/powerpc-32.c: Re-generated.
4845         * features/rs6000/powerpc-32l.c: Re-generated.
4846         * features/rs6000/powerpc-403.c: Re-generated.
4847         * features/rs6000/powerpc-403gc.c : Re-generated.
4848         * features/rs6000/powerpc-405.c: Re-generated.
4849         * features/rs6000/powerpc-505.c: Re-generated.
4850         * features/rs6000/powerpc-601.c: Re-generated.
4851         * features/rs6000/powerpc-602.c: Re-generated.
4852         * features/rs6000/powerpc-603.c: Re-generated.
4853         * features/rs6000/powerpc-604.c: Re-generated.
4854         * features/rs6000/powerpc-64.c: Re-generated.
4855         * features/rs6000/powerpc-64l.c: Re-generated.
4856         * features/rs6000/powerpc-7400.c: Re-generated.
4857         * features/rs6000/powerpc-750.c: Re-generated.
4858         * features/rs6000/powerpc-860.c: Re-generated.
4859         * features/rs6000/powerpc-altivec32.c: Re-generated.
4860         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4861         * features/rs6000/powerpc-altivec64.c: Re-generated.
4862         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4863         * features/rs6000/powerpc-cell32l.c: Re-generated.
4864         * features/rs6000/powerpc-cell64l.c: Re-generated.
4865         * features/rs6000/powerpc-e500.c: Re-generated.
4866         * features/rs6000/powerpc-e500l.c: Re-generated.
4867         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4868         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4869         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4870         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4871         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4872         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4873         * features/rs6000/powerpc-vsx32.c: Re-generated.
4874         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4875         * features/rs6000/powerpc-vsx64.c: Re-generated.
4876         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4877         * features/rs6000/rs6000.c: Re-generated.
4878         * features/s390-linux32.c: Re-generated.
4879         * features/s390-linux32v1.c: Re-generated.
4880         * features/s390-linux32v2.c: Re-generated.
4881         * features/s390-linux64.c: Re-generated.
4882         * features/s390-linux64v1.c: Re-generated.
4883         * features/s390-linux64v2.c: Re-generated.
4884         * features/s390-te-linux64.c: Re-generated.
4885         * features/s390-tevx-linux64.c: Re-generated.
4886         * features/s390-vx-linux64.c: Re-generated.
4887         * features/s390x-linux64.c: Re-generated.
4888         * features/s390x-linux64v1.c: Re-generated.
4889         * features/s390x-linux64v2.c: Re-generated.
4890         * features/s390x-te-linux64.c: Re-generated.
4891         * features/s390x-tevx-linux64.c: Re-generated.
4892         * features/s390x-vx-linux64.c: Re-generated.
4893         * features/sparc/sparc32-solaris.c: Re-generated.
4894         * features/sparc/sparc64-solaris.c: Re-generated.
4895         * features/tic6x-c62x.c: Re-generated.
4896         * features/tic6x-c62x-linux.c: Re-generated.
4897         * features/tic6x-c64x.c: Re-generated.
4898         * features/tic6x-c64x-linux.c: Re-generated.
4899         * features/tic6x-c64xp.c: Re-generated.
4900         * features/tic6x-c64xp-linux.c: Re-generated.
4901
4902 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4903
4904         * i386-linux-tdep.c (i386_linux_read_description): New function.
4905         (i386_linux_core_read_description): Call
4906         i386_linux_read_description.
4907         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4908         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4909         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4910         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4911         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4912         * x86-linux-nat.c (x86_linux_read_description): Call
4913         i386_linux_read_description.
4914
4915 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4916
4917         * NEWS: Mention it.
4918         * features/Makefile (%.c: %.xml): Pass the xml file name to
4919         command "maint print c-tdesc".
4920         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4921         name from 'arg'.
4922
4923 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4924
4925         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4926         in-class initialization.
4927         (tdesc_create_feature): Call new instead of XCNEW.
4928         (free_target_description): Ue delete.
4929
4930 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4931
4932         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4933
4934 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4935
4936         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4937         constant.
4938         (amd64_x32_init_abi): Likewise.
4939         * amd64-tdep.h (amd64_init_abi): Update declaration.
4940         (amd64_x32_init_abi): Likewise.
4941
4942 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4943
4944         PR tdep/21717
4945         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4946         condition for FPSCR.
4947         (arm_linux_store_inferior_registers): Likewise.
4948
4949 2017-07-22  Tom Tromey  <tom@tromey.com>
4950
4951         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4952         <syscalls_counts>: Now a std::vector.
4953         (get_catch_syscall_inferior_data): Use "new".
4954         (catch_syscall_inferior_data_cleanup): Use "delete".
4955         (insert_catch_syscall, remove_catch_syscall)
4956         (clear_syscall_counts): Update.
4957
4958 2017-07-22  Tom Tromey  <tom@tromey.com>
4959
4960         * break-catch-syscall.c (syscall_catchpoint)
4961         <syscalls_to_be_caught>: Now a std::vector<int>
4962         (~syscall_catchpoint): Remove.
4963         (insert_catch_syscall, remove_catch_syscall)
4964         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4965         (print_mention_catch_syscall, print_recreate_catch_syscall):
4966         Update.
4967         (create_syscall_event_catchpoint): Change type of "filter"
4968         parameter.
4969         (catch_syscall_split_args): Return a std::vector.
4970         (catch_syscall_command_1, catching_syscall_number_1): Update.
4971
4972 2017-07-22  Tom Tromey  <tom@tromey.com>
4973
4974         * break-catch-throw.c (struct exception_catchpoint)
4975         <exception_rx>: Now a std::string.
4976         (~exception_catchpoint): Remove.
4977         (print_one_detail_exception_catchpoint): Update.
4978         (handle_gnu_v3_exceptions): Change type of except_rx.
4979         (extract_exception_regexp): Return a std::string.
4980         (catch_exception_command_1): Update.
4981
4982 2017-07-22  Tom Tromey  <tom@tromey.com>
4983
4984         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4985         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4986         std::vector.
4987         <catch_all>: Now a bool.
4988         (~signal_catchpoint): Remove.
4989         (signal_catchpoint_insert_location)
4990         (signal_catchpoint_remove_location)
4991         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4992         (signal_catchpoint_print_mention)
4993         (signal_catchpoint_print_recreate)
4994         (signal_catchpoint_explains_signal): Update.
4995         (create_signal_catchpoint): Change type of "filter" and
4996         "catch_all".
4997         (catch_signal_split_args): Return a std::vector.  Change type of
4998         "catch_all".
4999         (catch_signal_command): Update.
5000
5001 2017-07-20  Pedro Alves  <palves@redhat.com>
5002
5003         * ada-lang.c (ada_language_defn): Make extern.
5004         (_initialize_ada_language): Remove add_language call.
5005         * c-lang.c (c_language_defn, cplus_language_defn)
5006         (asm_language_defn, minimal_language_defn): Make extern.
5007         (_initialize_c_language): Delete.
5008         * completer.c (compare_cstrings): Delete, moved to utils.h.
5009         * d-lang.c (d_language_defn): Make extern.
5010         (_initialize_d_language): Remove add_language calls.
5011         * defs.h (enum language): Add comment.
5012         * f-lang.c (f_language_defn): Make extern.
5013         (_initialize_f_language): Remove add_language call.
5014         * go-lang.c (go_language_defn): Make extern.
5015         (_initialize_go_language): Remove add_language call.
5016         * language.c: Include <algorithm>.
5017         (languages): Redefine as const array.
5018         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5019         (set_language_command): Handle "local".  Use for-range loop.
5020         (set_language): Remove loop.
5021         (language_enum): Rewrite.
5022         (language_def, language_str): Remove loops.
5023         (add_language): Delete.
5024         (add_set_language_command): New, based on add_languages.
5025         (skip_language_trampoline): Adjust.
5026         (local_language_defn): Delete.
5027         (language_gdbarch_post_init): Adjust.
5028         (_initialize_language): Remove add_language calls.  Call
5029         add_set_language_command.
5030         * language.h (add_language): Delete.
5031         (auto_language_defn)
5032         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5033         (asm_language_defn, c_language_defn, cplus_language_defn)
5034         (d_language_defn, f_language_defn, go_language_defn)
5035         (m2_language_defn, objc_language_defn, opencl_language_defn)
5036         (pascal_language_defn, rust_language_defn): Declare.
5037         * m2-lang.c (m2_language_defn): Make extern.
5038         (_initialize_m2_language): Remove add_language call.
5039         * objc-lang.c (objc_language_defn): Make extern.
5040         (_initialize_objc_language): Remove add_language call.
5041         * opencl-lang.c (opencl_language_defn): Make extern.
5042         (_initialize_opencl_language): Remove add_language call.
5043         * p-lang.c (pascal_language_defn): Make extern.
5044         (_initialize_pascal_language): Delete.
5045         * rust-lang.c (rust_language_defn): Make extern.
5046         (_initialize_rust_language): Delete.
5047         * utils.h (compare_cstrings): New static inline function.
5048
5049 2017-07-20  Pedro Alves  <palves@redhat.com>
5050
5051         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5052         (get_var_value): Constify parameters.
5053         (get_int_var_value): Change prototype.
5054         (to_fixed_range_type): Adjust.
5055         * ada-lang.h (get_int_var_value): Change prototype.
5056
5057 2017-07-20  Pedro Alves  <palves@redhat.com>
5058
5059         * dwarf2read.c (dw2_lookup_symbol): Use
5060         SYMBOL_MATCHES_SEARCH_NAME.
5061         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5062
5063 2017-07-20  Pedro Alves  <palves@redhat.com>
5064
5065         * block.c (block_iter_name_step, block_iter_name_first)
5066         (block_iter_name_next): Delete.
5067         (block_lookup_symbol_primary): Adjust to use
5068         dict_iter_match_first/dict_iter_match_next.
5069         * block.h (block_iter_name_first, block_iter_name_next): Delete
5070         declarations.
5071         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5072         dict_iter_match_first/dict_iter_match_next.
5073
5074 2017-07-20  Pedro Alves  <palves@redhat.com>
5075
5076         * cp-support.c (cp_find_first_component_aux): Add missing case for
5077         end of string.
5078
5079 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5080
5081         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5082         of dwo_cu's dwo_file.
5083
5084 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5085
5086         * remote.c (store_registers_using_G): Remove one line comment.
5087
5088 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5089
5090         * regcache.c (regcache_cpy): Simplify it.
5091         (regcache::cpy_no_passthrough): Remove it.
5092         * regcache.h (cpy_no_passthrough): Remove it.
5093         (regcache_dup, regcache_cpy): Update comments.
5094
5095 2017-07-18  Pedro Alves  <palves@redhat.com>
5096
5097         * remote-sim.c (sim_command_completer): Adjust to work with a
5098         completion_tracker instead of a VEC.
5099
5100 2017-07-17  Pedro Alves  <palves@redhat.com>
5101
5102         * completer.c (complete_source_filenames): New function.
5103         (complete_address_and_linespec_locations): New function.
5104         (location_completer): Use complete_address_and_linespec_locations.
5105         (completion_tracker::build_completion_result): Honor the tracker's
5106         request to suppress append.
5107         * completer.h (completion_tracker::suppress_append_ws)
5108         (completion_tracker::set_suppress_append_ws): New methods.
5109         (completion_tracker::m_suppress_append_ws): New field.
5110         (complete_source_filenames): New declaration.
5111         * linespec.c (linespec_complete_what): New.
5112         (struct ls_parser) <complete_what, completion_word,
5113         completion_quote_char, completion_quote_end, completion_tracker>:
5114         New fields.
5115         (string_find_incomplete_keyword_at_end): New.
5116         (linespec_lexer_lex_string): Record quote char.  If in completion
5117         mode, don't throw.
5118         (linespec_lexer_consume_token): Advance the completion word point.
5119         (linespec_lexer_peek_token): Save/restore completion info.
5120         (save_stream_and_consume_token): New.
5121         (set_completion_after_number): New.
5122         (linespec_parse_basic): Set what to complete next depending on
5123         token.  Handle function and label completions specially.
5124         (parse_linespec): Disable objc shortcut in completion mode.  Set
5125         what to complete next depending on token type.  Skip keyword if in
5126         completion mode.
5127         (complete_linespec_component, linespec_complete): New.
5128         * linespec.h (linespec_complete): Declare.
5129
5130 2017-07-17  Pedro Alves  <palves@redhat.com>
5131
5132         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5133         Handle 'operator<' / 'operator<<'.
5134
5135 2017-07-17  Pedro Alves  <palves@redhat.com>
5136
5137         * completer.c (collect_explicit_location_matches): Handle
5138         MATCH_LABEL.
5139         (convert_explicit_location_to_linespec): New, factored out from
5140         ...
5141         (convert_explicit_location_to_sals): ... this.
5142         (complete_label): New.
5143         (linespec_complete_label, find_label_symbols_in_block): New.
5144         (find_label_symbols): Add completion_mode parameter and adjust to
5145         call find_label_symbols_in_block.
5146         * linespec.h (linespec_complete_label): Declare.
5147
5148 2017-07-17  Pedro Alves  <palves@redhat.com>
5149
5150         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5151         complete_symbol_mode parameter.
5152         * cli/cli-cmds.c (complete_command): Get the completion result out
5153         of the handle_brkchars tracker if used a custom word point.
5154         * completer.c: Include "linespec.h".
5155         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5156         (advance_to_expression_complete_word_point): New.
5157         (completion_tracker::completes_to_completion_word): New.
5158         (complete_files_symbols): Pass down
5159         complete_symbol_mode::EXPRESSION.
5160         (explicit_options, probe_options): New.
5161         (collect_explicit_location_matches): Complete on the
5162         explictit_loc->foo instead of word.  Use
5163         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5164         keyword and options completions.
5165         (backup_text_ptr): Delete.
5166         (skip_keyword): New.
5167         (complete_explicit_location): Remove 'word' parameter.  Add
5168         language, quoted_arg_start and quoted_arg_end parameters.
5169         Rewrite, parsing left to right.
5170         (location_completer): Rewrite.
5171         (location_completer_handle_brkchars): New function.
5172         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5173         (enum complete_line_internal_reason): Adjust comments.
5174         (completion_tracker::discard_completions): New.
5175         (completer_handle_brkchars_func_for_completer): Handle
5176         location_completer.
5177         (gdb_custom_word_point_brkchars)
5178         (gdb_org_rl_basic_quote_characters): New.
5179         (gdb_completion_word_break_characters_throw)
5180         (completion_find_completion_word): Handle trackers that use a
5181         custom word point.
5182         (completion_tracker::advance_custom_word_point_by): New.
5183         (completion_tracker::build_completion_result): Don't rely on
5184         readline appending the quote char.
5185         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5186         use a custom word point.
5187         (gdb_rl_attempted_completion_function): Restore
5188         rl_basic_quote_characters.
5189         * completer.h (class completion_tracker): Extend intro comment.
5190         (completion_tracker::set_quote_char)
5191         (completion_tracker::quote_char)
5192         (completion_tracker::set_use_custom_word_point)
5193         (completion_tracker::use_custom_word_point)
5194         (completion_tracker::custom_word_point)
5195         (completion_tracker::set_custom_word_point)
5196         (completion_tracker::advance_custom_word_point_by)
5197         (completion_tracker::completes_to_completion_word)
5198         (completion_tracker::discard_completions): New methods.
5199         (completion_tracker::m_quote_char)
5200         (completion_tracker::m_use_custom_word_point)
5201         (completion_tracker::m_custom_word_point): New fields.
5202         (advance_to_expression_complete_word_point): Declare.
5203         * f-lang.c (f_collect_symbol_completion_matches): Add
5204         complete_symbol_mode parameter.
5205         * language.h (struct language_defn)
5206         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5207         parameter.
5208         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5209         (linespec_complete_function): New function.
5210         (linespec_lexer_lex_keyword): Adjust.
5211         * linespec.h (linespec_keywords, linespec_complete_function): New
5212         declarations.
5213         * location.c (find_end_quote): New function.
5214         (explicit_location_lex_one): Add explicit_completion_info
5215         parameter.  Save quoting info.  Don't throw if being called for
5216         completion.  Don't handle Ada operators here.
5217         (is_cp_operator, skip_op_false_positives, first_of)
5218         (explicit_location_lex_one_function): New function.
5219         (string_to_explicit_location): Replace 'dont_throw' parameter with
5220         an explicit_completion_info pointer parameter.  Handle it.  Don't
5221         use explicit_location_lex_one to lex function names.  Use
5222         explicit_location_lex_one_function instead.
5223         * location.h (struct explicit_completion_info): New.
5224         (string_to_explicit_location): Replace 'dont_throw' parameter with
5225         an explicit_completion_info pointer parameter.
5226         * symtab.c (default_collect_symbol_completion_matches_break_on):
5227         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5228         (default_collect_symbol_completion_matches)
5229         (collect_symbol_completion_matches): Add complete_symbol_mode
5230         parameter.
5231         (collect_symbol_completion_matches_type): Pass down
5232         complete_symbol_mode::EXPRESSION.
5233         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5234         parameter.  Handle LINESPEC mode.
5235         * symtab.h (complete_symbol_mode): New.
5236         (default_collect_symbol_completion_matches_break_on)
5237         (default_collect_symbol_completion_matches)
5238         (collect_symbol_completion_matches)
5239         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5240         parameter.
5241
5242 2017-07-17  Pedro Alves  <palves@redhat.com>
5243
5244         * utils.c (enum class strncmp_iw_mode): New.
5245         (strcmp_iw): Rename to ...
5246         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5247         parameters.  Handle them.
5248         (strncmp_iw): New.
5249         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5250         * utils.h (strncmp_iw): Declare.
5251         (strcmp_iw): Move describing comments here.
5252
5253 2017-07-17  Pedro Alves  <palves@redhat.com>
5254
5255         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5256         CP_OPERATOR_STR.
5257         * c-typeprint.c (is_type_conversion_operator): Use
5258         CP_OPERATOR_STR.
5259         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5260         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5261         CP_OPERATOR_LEN.
5262         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5263         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5264         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5265         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5266         CP_OPERATOR_STR.
5267         * location.c: Include "cp-support.h".
5268         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5269         CP_OPERATOR_STR.
5270         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5271         CP_OPERATOR_LEN.
5272
5273 2017-07-17  Pedro Alves  <palves@redhat.com>
5274
5275         * cli/cli-cmds.c (complete_command): Use a completion tracker
5276         along with completion_find_completion_word for handle_brkchars
5277         phase.
5278         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5279         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5280         (struct gdb_rl_completion_word_info): New.
5281         (gdb_rl_find_completion_word): New.
5282         (completion_find_completion_word): New.
5283         * completer.h (completion_find_completion_word): Declare.
5284
5285 2017-07-17  Pedro Alves  <palves@redhat.com>
5286
5287         * ada-lang.c (symbol_completion_match): Adjust comments.
5288         (symbol_completion_add): Replace vector parameter with
5289         completion_tracker parameter.  Use it.
5290         (ada_make_symbol_completion_list): Rename to...
5291         (ada_collect_symbol_completion_matches): ... this.  Add
5292         completion_tracker parameter and use it.
5293         (ada_language_defn): Adjust.
5294         * break-catch-syscall.c (catch_syscall_completer): Adjust
5295         prototype and work with completion_tracker instead of VEC.
5296         * breakpoint.c (condition_completer): Adjust prototype and work
5297         with completion_tracker instead of VEC.
5298         * c-lang.c (c_language_defn, cplus_language_defn)
5299         (asm_language_defn, minimal_language_defn): Adjust to renames.
5300         * cli/cli-cmds.c (complete_command): Rework using
5301         completion_tracker.  Catch exceptions when completing.
5302         * cli/cli-decode.c (integer_unlimited_completer)
5303         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5304         with completion_tracker instead of VEC.
5305         * command.h (struct completion_tracker): Forward declare.
5306         (completer_ftype, completer_handle_brkchars_ftype): Change
5307         types.
5308         (complete_on_cmdlist, complete_on_enum): Adjust.
5309         * completer.c: Include <algorithm>.
5310         (struct gdb_completer_state): New.
5311         (current_completion): New global.
5312         (readline_line_completion_function): Delete.
5313         (noop_completer, filename_completer)
5314         (filename_completer_handle_brkchars, complete_files_symbols)
5315         (linespec_location_completer): Adjust to work with a
5316         completion_tracker instead of a VEC.
5317         (string_or_empty): New.
5318         (collect_explicit_location_matches): Adjust to work with a
5319         completion_tracker instead of a VEC.
5320         (explicit_location_completer): Rename to ...
5321         (complete_explicit_location): ... this and adjust to work with a
5322         completion_tracker instead of a VEC.
5323         (location_completer): Adjust to work with a completion_tracker
5324         instead of a VEC.
5325         (add_struct_fields): Adjust to work with a completion_list instead
5326         of VEC.
5327         (expression_completer): Rename to ...
5328         (complete_expression): ... this and adjust to work with a
5329         completion_tracker instead of a VEC.  Use complete_files_symbols.
5330         (expression_completer): Reimplement on top of complete_expression.
5331         (symbol_completer): Adjust to work with a completion_tracker
5332         instead of a VEC.
5333         (enum complete_line_internal_reason): Add describing comments.
5334         (complete_line_internal_normal_command): Adjust to work with a
5335         completion_tracker instead of a VEC.
5336         (complete_line_internal): Rename to ...
5337         (complete_line_internal_1): ... this and adjust to work with a
5338         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5339         handle_brkchars phase.
5340         (new_completion_tracker): Delete.
5341         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5342         complete_line_internal_1.
5343         (free_completion_tracker): Delete.
5344         (INITIAL_COMPLETION_HTAB_SIZE): New.
5345         (completion_tracker::completion_tracker)
5346         (completion_tracker::~completion_tracker): New.
5347         (maybe_add_completion): Delete.
5348         (completion_tracker::maybe_add_completion)
5349         (completion_tracker::add_completion)
5350         (completion_tracker::add_completions): New.
5351         (throw_max_completions_reached_error): Delete.
5352         (complete_line): Adjust to work with a completion_tracker instead
5353         of a VEC.  Don't create a completion_tracker_t or check for max
5354         completions here.
5355         (command_completer, command_completer_handle_brkchars)
5356         (signal_completer, reg_or_group_completer_1)
5357         (reg_or_group_completer, default_completer_handle_brkchars):
5358         Adjust to work with a completion_tracker.
5359         (gdb_completion_word_break_characters_throw): New.
5360         (gdb_completion_word_break_characters): Reimplement.
5361         (line_completion_function): Delete.
5362         (completion_tracker::recompute_lowest_common_denominator)
5363         (expand_preserving_ws)
5364         (completion_tracker::build_completion_result)
5365         (completion_result::completion_result)
5366         (completion_result::completion_result)
5367         (completion_result::~completion_result)
5368         (completion_result::completion_result)
5369         (completion_result::release_match_list, compare_cstrings)
5370         (completion_result::sort_match_list)
5371         (completion_result::reset_match_list)
5372         (gdb_rl_attempted_completion_function_throw)
5373         (gdb_rl_attempted_completion_function): New.
5374         * completer.h (completion_list, struct completion_result)
5375         (class completion_tracker): New.
5376         (complete_line): Add completion_tracker parameter.
5377         (readline_line_completion_function): Delete.
5378         (gdb_rl_attempted_completion_function): New.
5379         (noop_completer, filename_completer, expression_completer)
5380         (location_completer, symbol_completer, command_completer)
5381         (signal_completer, reg_or_group_completer): Update prototypes.
5382         (completion_tracker_t, new_completion_tracker)
5383         (make_cleanup_free_completion_tracker): Delete.
5384         (enum maybe_add_completion_enum): Delete.
5385         (maybe_add_completion): Delete.
5386         (throw_max_completions_reached_error): Delete.
5387         * corefile.c (complete_set_gnutarget): Adjust to work with a
5388         completion_tracker instead of a VEC.
5389         * cp-abi.c (cp_abi_completer): Adjust to work with a
5390         completion_tracker instead of a VEC.
5391         * d-lang.c (d_language_defn): Adjust.
5392         * disasm.c (disassembler_options_completer): Adjust to work with a
5393         completion_tracker instead of a VEC.
5394         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5395         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5396         with a completion_tracker instead of a VEC.
5397         (f_language_defn): Adjust.
5398         * go-lang.c (go_language_defn): Adjust.
5399         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5400         Adjust to work with a completion_tracker instead of a VEC.
5401         * infrun.c (handle_completer): Likewise.
5402         * interps.c (interpreter_completer): Likewise.
5403         * interps.h (interpreter_completer): Likewise.
5404         * language.c (unknown_language_defn, auto_language_defn)
5405         (local_language_defn): Adjust.
5406         * language.h (language_defn::la_make_symbol_completion_list):
5407         Rename to ...
5408         (language_defn::la_collect_symbol_completion_matches): ... this
5409         and adjust to work with a completion_tracker instead of a VEC.
5410         * m2-lang.c (m2_language_defn): Adjust.
5411         * objc-lang.c (objc_language_defn): Adjust.
5412         * opencl-lang.c (opencl_language_defn): Adjust.
5413         * p-lang.c (pascal_language_defn): Adjust.
5414         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5415         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5416         with a completion_tracker.
5417         * rust-lang.c (rust_language_defn): Adjust.
5418         * symtab.c (free_completion_list, do_free_completion_list)
5419         (return_val, completion_tracker): Delete.
5420         (completion_list_add_name, completion_list_add_symbol)
5421         (completion_list_add_msymbol, completion_list_objc_symbol)
5422         (completion_list_add_fields, add_symtab_completions): Add
5423         completion_tracker parameter and use it.
5424         (default_make_symbol_completion_list_break_on_1): Rename to...
5425         (default_collect_symbol_completion_matches_break_on): ... this.
5426         Add completion_tracker parameter and use it instead of allocating
5427         a completion tracker here.
5428         (default_make_symbol_completion_list_break_on): Delete old
5429         implementation.
5430         (default_make_symbol_completion_list): Delete.
5431         (default_collect_symbol_completion_matches): New.
5432         (make_symbol_completion_list): Delete.
5433         (collect_symbol_completion_matches): New.
5434         (make_symbol_completion_type): Rename to ...
5435         (collect_symbol_completion_matches_type): ... this.  Add
5436         completion_tracker parameter and use it instead of VEC.
5437         (make_file_symbol_completion_list_1): Rename to...
5438         (collect_file_symbol_completion_matches): ... this.  Add
5439         completion_tracker parameter and use it instead of VEC.
5440         (make_file_symbol_completion_list): Delete.
5441         (add_filename_to_list): Use completion_list instead of a VEC.
5442         (add_partial_filename_data::list): Now a completion_list.
5443         (make_source_files_completion_list): Work with a completion_list
5444         instead of a VEC.
5445         * symtab.h: Include "completer.h".
5446         (default_make_symbol_completion_list_break_on)
5447         (default_make_symbol_completion_list, make_symbol_completion_list)
5448         (make_symbol_completion_type, make_file_symbol_completion_list)
5449         (make_source_files_completion_list): Delete.
5450         (default_collect_symbol_completion_matches_break_on)
5451         (default_collect_symbol_completion_matches)
5452         (collect_symbol_completion_matches)
5453         (collect_symbol_completion_matches_type)
5454         (collect_file_symbol_completion_matches)
5455         (make_source_files_completion_list): New.
5456         * top.c (init_main): Don't install a rl_completion_entry_function
5457         hook.  Install a rl_attempted_completion_function hook instead.
5458         * tui/tui-layout.c (layout_completer): Adjust to work with a
5459         completion_tracker.
5460         * tui/tui-regs.c (tui_reggroup_completer):
5461         * tui/tui-win.c (window_name_completer, focus_completer)
5462         (winheight_completer): Adjust to work with a completion_tracker.
5463         * value.c: Include "completer.h".
5464         (complete_internalvar): Adjust to work with a completion_tracker.
5465         * value.h (complete_internalvar): Likewise.
5466
5467 2017-07-17  Pedro Alves  <palves@redhat.com>
5468
5469         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5470         renames.
5471         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5472         comments to completer_ftype's declaration.
5473         <completer_handle_brkchars>: Change type to
5474         completer_handle_brkchars_ftype.
5475         * command.h (completer_ftype): Add describing comment and give
5476         names to parameters.
5477         (completer_ftype_void): Rename to ...
5478         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5479         (set_cmd_completer_handle_brkchars): Adjust.
5480         * completer.c (filename_completer_handle_brkchars): New function.
5481         (complete_line_internal_normal_command): New function, factored
5482         out from ...
5483         (complete_line_internal): ... here.
5484         (command_completer_handle_brkchars)
5485         (default_completer_handle_brkchars)
5486         (completer_handle_brkchars_func_for_completer): New functions.
5487         * completer.h (set_gdb_completion_word_break_characters): Delete
5488         declaration.
5489         (completer_handle_brkchars_func_for_completer): New declaration.
5490         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5491         completer_handle_brkchars_func_for_completer.
5492
5493 2017-07-17  Pedro Alves  <palves@redhat.com>
5494
5495         * completer.c (symbol_completer): New function, based on
5496         make_symbol_completion_list_fn.
5497         * completer.h (symbol_completer): New declaration.
5498         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5499         * python/py-cmd.c (completers): Adjust.
5500         * symtab.c (make_symbol_completion_list_fn): Delete.
5501         * symtab.h (make_symbol_completion_list_fn): Delete.
5502         * cli/cli-decode.c (add_cmd): Adjust.
5503
5504 2017-07-17  Pedro Alves  <palves@redhat.com>
5505
5506         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5507         * dwarf2read.c: Include "filename-seen-cache.h".
5508         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5509         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5510         * filename-seen-cache.c: New file.
5511         * filename-seen-cache.h: New file.
5512         * symtab.c: Include "filename-seen-cache.h".
5513         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5514         (create_filename_seen_cache, clear_filename_seen_cache)
5515         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5516         to filename-seen-cache.h/filename-seen-cache.c.
5517         (output_source_filename, sources_info)
5518         (maybe_add_partial_symtab_filename)
5519         (make_source_files_completion_list): Adjust to use
5520         filename_seen_cache.
5521
5522 2017-07-17  Pedro Alves  <palves@redhat.com>
5523
5524         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5525         fields.
5526         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5527         dwarf2_debug_sections*)): New.
5528         (dwarf2_per_objfile::dwarf2_per_objfile(const
5529         dwarf2_per_objfile&)): Declare as deleted.
5530         (dwarf2_per_objfile::operator=): Declare as deleted.
5531         (dwarf2_per_objfile::dwarf2_per_objfile)
5532         (dwarf2_per_objfile::~dwarf2_per_objfile)
5533         (dwarf2_per_objfile::free_cached_comp_units): New.
5534         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5535         ctor.  Call dwarf2_per_objfile's ctor manually.
5536         (dwarf2_locate_sections): Deleted/refactored as ...
5537         (dwarf2_per_objfile::locate_sections): ... this new method.
5538         (free_cached_comp_units): Defer to
5539         dwarf2_per_objfile::free_cached_comp_units.
5540         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5541
5542 2017-07-14  Tom Tromey  <tom@tromey.com>
5543
5544         PR rust/21764:
5545         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5546         parameter.
5547         <UNOP_SIZEOF>: Split into separate case.
5548         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5549
5550 2017-07-14  Tom Tromey  <tom@tromey.com>
5551
5552         PR rust/21763:
5553         * symtab.c (symbol_matches_domain): Add language_rust to special
5554         case.
5555         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5556         treat LOC_TYPEDEF symbols as variables.
5557
5558 2017-07-14  Pedro Alves  <palves@redhat.com>
5559
5560         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5561         symtabs matching all symtabs with SRCFILE as file name instead of
5562         only considering the first hit, with lookup_symtab.
5563
5564 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5565
5566         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5567         operator_name parameters.
5568         (gen_expr): Update function call.
5569
5570 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5571
5572         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5573         parameter.
5574         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5575         Likewise.
5576         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5577         parameter, use agent_expr::gdbarch instead, update function
5578         calls.
5579         (locexpr_tracepoint_var_ref): Likewise.
5580         (loclist_tracepoint_var_ref): Likewise.
5581         * ax-gdb.c (gen_trace_static_fields): Likewise.
5582         (gen_traced_pop): Likewise.
5583         (gen_frame_args_address): Likewise.
5584         (gen_frame_locals_address): Likewise.
5585         (gen_var_ref): Likewise.
5586         (gen_struct_ref_recursive): Likewise.
5587         (gen_static_field): Likewise.
5588         (gen_maybe_namespace_elt): Likewise.
5589         (gen_expr): Likewise.
5590         (gen_trace_for_var): Likewise.
5591         (gen_trace_for_expr): Likewise.
5592         (gen_trace_for_return_address): Likewise.
5593
5594 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5595
5596         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5597         parameter.
5598         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5599
5600 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5601
5602         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5603         from ax, update calls.
5604         (gen_usual_arithmetic): Likewise.
5605         (gen_integral_promotions): Likewise.
5606         (gen_bitfield_ref): Likewise.
5607         (gen_primitive_field): Likewise.
5608         (gen_struct_ref_recursive): Likewise.
5609         (gen_struct_ref): Likewise.
5610         (gen_maybe_namespace_elt): Likewise.
5611         (gen_struct_elt_for_reference): Likewise.
5612         (gen_namespace_elt): Likewise.
5613         (gen_aggregate_elt_ref): Likewise.
5614         (gen_expr): Get gdbarch from ax, update calls.
5615         (gen_expr_binop_rest): Likewise.
5616
5617 2017-07-13  Pedro Alves  <palves@redhat.com>
5618
5619         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5620         as default tdesc.
5621         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5622         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5623         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5624         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5625         tdep.
5626         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5627         Get final tdesc from the tdep.
5628         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5629         default tdesc.
5630         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5631         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5632         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5633         Use it as default tdesc.
5634         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5635         down to amd_init_abi.  No longer handle fallback tdesc here.
5636         * amd64-tdep.h (tdesc_x32): Declare.
5637         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5638         parameter.
5639         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5640         as default tdesc.
5641
5642 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5643
5644         * s390-linux-tdep.c (s390_process_record): Add support for
5645         instructions new in arch12.
5646
5647 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5648
5649         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5650         PT_GETFSBASE and PT_GETGSBASE.
5651         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5652         PT_SETGSBASE.
5653
5654 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5655
5656         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5657         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5658         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5659         those rules.
5660         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5661         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5662         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5663         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5664         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5665         * features/i386/amd64.xml: Add 64bit-segments.xml.
5666         * features/i386/amd64-avx-avx512.c: Regenerated.
5667         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5668         * features/i386/amd64-avx-mpx.c: Regenerated.
5669         * features/i386/amd64-avx.c: Regenerated.
5670         * features/i386/amd64-mpx.c: Regenerated.
5671         * features/i386/amd64.c: Regenerated.
5672         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5673         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5674         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5675         * regformats/i386/amd64-avx.dat: Regenerated.
5676         * regformats/i386/amd64-mpx.dat: Regenerated.
5677         * regformats/i386/amd64.dat: Regenerated.
5678
5679 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5680
5681         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5682         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5683
5684 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5685
5686         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5687         unsetenv.
5688         * gnulib/aclocal.m4: Regenerate.
5689         * gnulib/config.in: Regenerate.
5690         * gnulib/configure: Regenerate.
5691         * gnulib/import/Makefile.am: Regenerate.
5692         * gnulib/import/Makefile.in: Regenerate.
5693         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5694         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5695         * gnulib/import/m4/environ.m4: New file.
5696         * gnulib/import/m4/setenv.m4: New file.
5697         * gnulib/import/setenv.c: New file.
5698         * gnulib/import/unsetenv.c: New file.
5699
5700 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5701
5702         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5703         address when op is DW_OP_addr.
5704
5705 2017-07-09  Tom Tromey  <tom@tromey.com>
5706
5707         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5708         check and apply to outer type.
5709
5710 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5711
5712         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5713         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5714         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5715         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5716
5717 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5718
5719         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5720
5721 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5722
5723         * corelow.c (get_core_siginfo): Remove.
5724         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5725         instead of get_core_siginfo.
5726         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5727         * gdbarch.h: Re-generate.
5728         * gdbarch.c: Re-generate.
5729         * linux-tdep.c (linux_core_xfer_siginfo): New.
5730         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5731
5732 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5733
5734         * corelow.c (thread_section_name): Move to ...
5735         * gdbcore.h (thread_section_name): ... here.
5736
5737 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5738
5739         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5740         (struct siginfo32): New.
5741         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5742         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5743         via ptrace(PT_LWPINFO).
5744
5745 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5746
5747         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5748         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5749         (fbsd_get_siginfo_type): New.
5750         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5751         (_initialize_fbsd_tdep): New.
5752
5753 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5754
5755         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5756         a singular dwo_unit*) to support multiple CUs in the same way that
5757         multiple TUs are supported.
5758         (create_cus_hash_table): Replace create_dwo_cu with a function for
5759         parsing multiple CUs from a DWO file.
5760         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5761         create_dwo_cu.
5762         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5763         htab_find, rather than comparing the signature to a singleton CU in
5764         the dwo_file.
5765
5766 2017-07-06  Pedro Alves  <palves@redhat.com>
5767
5768         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5769
5770 2017-07-04  Pedro Alves  <palves@redhat.com>
5771
5772         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5773         * gdbtypes.h (TYPE_STATIC): Delete.
5774         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5775         is_synchronized, is_native>: Delete.
5776         <dummy>: Bump.
5777         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5778         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5779         (TYPE_FN_FIELD_ABSTRACT): Delete.
5780
5781 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5782
5783         * buffer.h (buffer_finish): Fix spelling mistakes.
5784
5785 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5786
5787         * .dir-locals.el: Automatically switch to C-style comments in
5788         versions of Emacs that support the feature.
5789
5790 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5791             Pedro Alves  <palves@redhat.com>
5792
5793         PR cli/21688
5794         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5795         (process_next_line): New variable 'inline_cmd'.
5796         Adjust 'if' clauses for "python", "compile" and "guile" to use
5797         'command_name_equals' and check for '!inline_cmd'.
5798
5799 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5800
5801         PR cli/21688
5802         * cli/cli-script.c (command_name_equals_not_inline): New function.
5803         (process_next_line): Adjust 'if' clauses for "python", "compile"
5804         and "guile" to use command_name_equals_not_inline.
5805
5806 2017-06-29  Pedro Alves  <palves@redhat.com>
5807
5808         * completer.c (expression_completer): Call
5809         linespec_location_completer instead of location_completer.
5810
5811 2017-06-29  Pedro Alves  <palves@redhat.com>
5812
5813         * completer.c (expression_completer): Remove code that recomputes
5814         'text' from 'word'.
5815
5816 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5817
5818         * regformats/regdat.sh: Generate code with
5819         "ifndef IN_PROCESS_AGENT".
5820
5821 2017-06-28  Pedro Alves  <palves@redhat.com>
5822
5823         * command.h: Include "common/scoped_restore.h".
5824
5825 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5826
5827         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5828         instead of obstack_grow.
5829
5830 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5831
5832         PR gdb/21337
5833         * symfile.c (reread_symbols): Call objfiles_changed just before
5834         read_symbols.
5835
5836 2017-06-27  Pedro Alves  <palves@redhat.com>
5837
5838         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5839         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5840         (completion_list_add_symbol, completion_list_add_msymbol):
5841         ... these new functions.
5842         (add_symtab_completions)
5843         (default_make_symbol_completion_list_break_on_1): Adjust.
5844
5845 2017-06-27  Pedro Alves  <palves@redhat.com>
5846
5847         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5848         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5849         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5850         dtor.
5851         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5852         'storage_obstack' field an auto_obstack.  In-class initialize all
5853         non-bitfield fields.  Make minsyms_read bool.
5854         * symfile.c (read_symbols): Adjust.
5855
5856 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5857
5858         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5859         (gdbsim_store_register): Likewise.
5860
5861 2017-06-27  Pedro Alves  <palves@redhat.com>
5862
5863         * c-exp.y (name_obstack): Now an auto_obstack.
5864         (yylex): Use auto_obstack::clear.
5865         (c_parse): Use auto_obstack::clear instead of reinitializing and
5866         freeing the obstack.
5867         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5868         * d-exp.y (name_obstack): Now an auto_obstack.
5869         (yylex): Use auto_obstack::clear.
5870         (d_parse): Use auto_obstack::clear instead of reinitializing and
5871         freeing the obstack.
5872         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5873         auto_obstack.
5874         * dwarf2read.c (create_addrmap_from_index)
5875         (dwarf2_build_psymtabs_hard)
5876         (update_enumeration_type_from_children): Likewise.
5877         * gdb_obstack.h (auto_obstack): New type.
5878         * go-exp.y (name_obstack): Now an auto_obstack.
5879         (build_packaged_name): Use auto_obstack::clear.
5880         (go_parse): Use auto_obstack::clear instead of reinitializing and
5881         freeing the obstack.
5882         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5883         auto_obstack.
5884         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5885         * rust-exp.y (work_obstack): Now an auto_obstack.
5886         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5887         reinitializing and freeing the obstack.
5888         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5889         (host_char_to_target): Use auto_obstack.
5890         * utils.h (make_cleanup_obstack_free): Delete declaration.
5891         * valprint.c (generic_emit_char, generic_printstr): Use
5892         auto_obstack.
5893
5894 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5895
5896         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5897         thread.
5898         (darwin_init_thread_list): Don't update dummy thread.
5899         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5900
5901 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5902
5903         * record-full.c (netorder16): Remove.
5904
5905 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5906
5907         * common/diagnostics.h: Define macros for GCC.
5908         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5909         * common/vec.h: Include diagnostics.h.
5910         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5911         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5912         warning.
5913
5914 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5915
5916         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5917         New macro.
5918         * ada-lex.l: Ignore deprecated register warnings.
5919
5920 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5921
5922         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5923         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5924
5925 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5926
5927         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5928         its own line.
5929
5930 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5931
5932         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5933
5934 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5935
5936         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5937         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5938         (xtensa_register_read_masked): Likewise.
5939
5940 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5941
5942         * common/environ.c (gdb_environ::unset): Update comment.
5943
5944 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5945
5946         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5947         registers.
5948
5949 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5950
5951         * record-full.c (record_full_exec_insn): Use byte_vector.
5952
5953 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5954
5955         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5956         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5957
5958 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5959
5960         * remote.c (cached_reg): Move from here...
5961         * regcache.h (cached_reg): ...to here.
5962         * python/py-unwind.c (struct reg_info): Remove.
5963         (cached_frame_info): Use cached_reg_t.
5964         (pyuw_prev_register): Likewise.
5965         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5966         (pyuw_dealloc_cache): Free all registers.
5967
5968 2017-06-22  Pedro Alves  <palves@redhat.com>
5969             Simon Marchi  <simon.marchi@ericsson.com>
5970
5971         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5972         warning.
5973         * common/diagnostics.h: New file.
5974
5975 2017-06-22  Pedro Alves  <palves@redhat.com>
5976
5977         * common/agent.h: Add include guards.
5978
5979 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5980
5981         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5982         talk about addressable units instead of bytes.
5983
5984 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5985
5986         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5987         of '::const_iterator'.
5988
5989 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5990
5991         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5992         'unittests/environ-selftests.c'.
5993         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5994         * charset.c (find_charset_names): Declare object 'iconv_env'.
5995         Update code to use 'iconv_env' object.  Remove call to
5996         'free_environ'.
5997         * common/environ.c: Include <utility>.
5998         (make_environ): Delete function.
5999         (free_environ): Delete function.
6000         (gdb_environ::clear): New function.
6001         (gdb_environ::operator=): New function.
6002         (gdb_environ::get): Likewise.
6003         (environ_vector): Delete function.
6004         (set_in_environ): Delete function.
6005         (gdb_environ::set): New function.
6006         (unset_in_environ): Delete function.
6007         (gdb_environ::unset): New function.
6008         (gdb_environ::envp): Likewise.
6009         * common/environ.h: Include <vector>.
6010         (struct gdb_environ): Delete; transform into...
6011         (class gdb_environ): ... this class.
6012         (free_environ): Delete prototype.
6013         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6014         environ_vector): Likewise.
6015         * infcmd.c (run_command_1): Update code to call
6016         'envp' from 'gdb_environ' class.
6017         (environment_info): Update code to call methods from 'gdb_environ'
6018         class.
6019         (unset_environment_command): Likewise.
6020         (path_info): Likewise.
6021         (path_command): Likewise.
6022         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6023         (inferior::inferior): Initialize 'environment' using the host's
6024         information.
6025         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6026         Include "environ.h".
6027         (class inferior) <environment>: Change type from 'struct
6028         gdb_environ' to 'gdb_environ'.
6029         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6030         methods from 'gdb_environ' class.
6031         * solib.c (solib_find_1): Likewise
6032         * unittests/environ-selftests.c: New file.
6033
6034 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6035
6036         * features/i386/i386-linux.xml: Exchange the order of including
6037         32bit-linux.xml and 32bit-sse.xml.
6038         * features/i386/i386-linux.c: Regenerated.
6039
6040 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6041
6042         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6043         Delete copy ctor and assignment operator.
6044         (tdesc_type): Likewise.
6045         (tdesc_feature): Likewise.
6046         (tdesc_free_reg): Remove.
6047         (tdesc_create_reg): Use new.
6048         (tdesc_free_type): Remove.
6049         (tdesc_create_vector): Use new.
6050         (tdesc_create_union): Likewise.
6051         (tdesc_create_flags): Likewise.
6052         (tdesc_create_enum): Likewise.
6053         (tdesc_free_feature): Delete.
6054         (free_target_description): Use delete.
6055
6056 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6057
6058         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6059         registers.
6060
6061 2017-06-19  Pedro Alves  <palves@redhat.com>
6062
6063         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6064         after gdb::unlinker.
6065
6066 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6067
6068         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6069         gdb_environ to access an environment variable.
6070
6071 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6072
6073         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6074         gdb_byte*.
6075
6076 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6077
6078         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6079
6080 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6081
6082         * configure: Re-generate.
6083         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6084
6085 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6086
6087         * configure: Re-generate.
6088         * warning.m4: Pass -Werror to compiler when checking for
6089         supported warning flags.
6090
6091 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6092
6093         * Makefile.in (COMPILE.pre): Add "-x c++".
6094
6095 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6096             Pedro Alves  <palves@redhat.com>
6097             Yao Qi  <yao.qi@linaro.org>
6098
6099         * defs.h (RequireLongest): New.
6100         (extract_integer): Declare function template.
6101         (extract_signed_integer): Remove the declaration, but define it
6102         static inline.
6103         (extract_unsigned_integer): Likewise.
6104         (store_integer): Declare function template.
6105         (store_signed_integer): Remove the declaration, but define it
6106         static inline.
6107         (store_unsigned_integer): Likewise.
6108         * findvar.c (extract_integer): New function template.
6109         (extract_signed_integer): Remove.
6110         (extract_unsigned_integer): Remove.
6111         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6112         instantiations.
6113         (store_integer): New function template.
6114         (store_signed_integer): Remove.
6115         (store_unsigned_integer): Remove.
6116         (store_integer): Explicit instantiations.
6117         * regcache.c (regcache_raw_read_signed): Update.
6118         (regcache::raw_read): New function.
6119         (regcache::raw_read_signed): Remove.
6120         (regcache::raw_read_unsigned): Remove.
6121         (regcache_raw_read_unsigned): Update.
6122         (regcache_raw_write_unsigned): Update.
6123         (regcache::raw_write_signed): Remove.
6124         (regcache::raw_write): New function.
6125         (regcache_cooked_read_signed): Update.
6126         (regcache::raw_write_unsigned): Remove.
6127         (regcache::cooked_read_signed): Remove.
6128         (regcache_cooked_read_unsigned): Update.
6129         (regcache::cooked_read_unsigned): Remove.
6130         (regcache_cooked_write_signed): Update.
6131         (regcache_cooked_write_unsigned): Update.
6132         * regcache.h (regcache) <raw_read_signed>: Remove.
6133         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6134         <raw_read, raw_write>: New.
6135         <cooked_read_signed, cooked_write_signed>: Remove.
6136         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6137         <cooked_read, cooked_write>: New.
6138         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6139         (sh64_pseudo_register_write): Update.
6140
6141 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6142
6143         * arc-tdep.c (arc_disassembler_options): New variable.
6144         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6145         of default_print_insn.
6146         (arc_delayed_print_insn): Set info->section when needed,
6147         use default_print_insn to retrieve a disassembler.
6148
6149 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6150
6151         PR gdb/21574
6152         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6153         to mention $SHELL and startup-with-shell.
6154
6155 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6156
6157         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6158
6159 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6160
6161         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6162         default_print_insn instead of print_insn_aarch64.
6163         * arm-tdep.c (gdb_print_insn_arm): Call
6164         default_print_insn instead of print_insn_big_arm
6165         and print_insn_little_arm.
6166         * i386-tdep.c (i386_print_insn): Call default_print_insn
6167         instead of print_insn_i386.
6168         * ia64-tdep.c (ia64_print_insn): Call
6169         default_print_insn instead of print_insn_ia64.
6170         * mips-tdep.c (gdb_print_insn_mips): Call
6171         default_print_insn instead of print_insn_big_mips
6172         and print_insn_little_mips.
6173         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6174         instead of print_insn_spu.
6175
6176 2017-06-14  Pedro Alves  <palves@redhat.com>
6177
6178         * ada-lang.c: Include "common/byte-vector.h".
6179         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6180         * charset.c (wchar_iterator::iterate): Resize the vector instead
6181         of reserving it.
6182         * common/byte-vector.h: Include "common/def-vector.h".
6183         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6184         * cli/cli-dump.c: Include "common/byte-vector.h".
6185         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6186         * common/byte-vector.h: New file.
6187         * common/def-vector.h: New file.
6188         * common/default-init-alloc.h: New file.
6189         * dwarf2loc.c: Include "common/byte-vector.h".
6190         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6191         instead of reserving it.
6192         * dwarf2read.c: Include "common/byte-vector.h".
6193         (data_buf::m_vec): Now a gdb::byte_vector.
6194         * gdb_regex.c: Include "common/def-vector.h".
6195         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6196         * mi/mi-main.c: Include "common/byte-vector.h".
6197         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6198         * printcmd.c: Include "common/byte-vector.h".
6199         (print_scalar_formatted): Use gdb::byte_vector.
6200         * valprint.c: Include "common/byte-vector.h".
6201         (maybe_negate_by_bytes, print_decimal_chars): Use
6202         gdb::byte_vector.
6203
6204 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6205
6206         * darwin-nat.c: Include "nat/fork-inferior.h".
6207
6208 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6209
6210         * configure.nat: Factor out Darwin bits that are not
6211         architecture-specific.  Add fork-inferior.o.
6212
6213 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6214
6215         * configure.nat: Factor out AIX bits that are not
6216         architecture-specific.  Add fork-inferior.o.
6217
6218 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6219
6220         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6221         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6222         wrappers that just call rw_pieced_value.
6223
6224 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6225
6226         * dwarf2loc.c (write_pieced_value): When writing the data for a
6227         memory piece, use write_memory_with_notification instead of
6228         write_memory.
6229
6230 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6231
6232         * valops.c (read_value_memory): Change embedded_offset to
6233         represent a bit offset instead of a byte offset.
6234         * value.h (read_value_memory): Adjust comment.
6235
6236 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6237
6238         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6239         dest_offset_bits and source_offset_bits.
6240         (write_pieced_value): Likewise.
6241
6242 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6243
6244         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6245         given by DW_OP_bit_piece.
6246         (write_pieced_value): Likewise.
6247
6248 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6249
6250         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6251         some other preparations to the places where sufficient information
6252         is available.
6253         (write_pieced_value): Likewise.
6254
6255 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6256
6257         * dwarf2loc.c (bits_to_bytes): New function.
6258         (read_pieced_value): Fix offset calculations for register pieces
6259         on big-endian targets.
6260         (write_pieced_value): Likewise.
6261
6262 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6263
6264         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6265         (write_pieced_value): Likewise.
6266
6267 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6268
6269         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6270         transfer the source value's least significant bits, instead of its
6271         lowest-addressed ones.  Rename type_len to max_offset.
6272         (read_pieced_value): Mirror above changes to write_pieced_value as
6273         applicable.
6274
6275 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6276
6277         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6278         truncate full bytes from dest_offset_bits before using it as an
6279         offset into the buffer.
6280
6281 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6282
6283         * dwarf2loc.c (write_pieced_value): Include transfer size in
6284         byte-wise check.
6285
6286 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6287
6288         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6289         calculation of this_size.
6290
6291 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6292
6293         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6294         when targeting a bit-field.
6295         (write_pieced_value): Likewise.
6296
6297 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6298
6299         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6300         (allocate_piece_closure): Drop addr_size parameter.
6301         (dwarf2_evaluate_loc_desc_full): Adjust call to
6302         allocate_piece_closure.
6303
6304 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6305
6306         PR gdb/21226
6307         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6308         the LSB end, independent of endianness.
6309
6310 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6311
6312         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6313         size capping.
6314
6315 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6316
6317         * mips-linux-nat.c: Move include features/mips*-linux.c to
6318         mips-linux-tdep.c.
6319         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6320         to mips-linux-tdep.c.
6321         * mips-linux-tdep.c: Include features/mips*-linux.c
6322         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6323         functions.
6324         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6325         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6326         (tdesc_mips64_dsp_linux): Declare.
6327
6328 2017-06-12  Tom Tromey  <tom@tromey.com>
6329
6330         * valprint.h (val_print_type_code_int): Remove.
6331         * valprint.c (generic_val_print_int): Always call
6332         val_print_scalar_formatted.
6333         (val_print_type_code_int): Remove.
6334         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6335         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6336         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6337         * ada-valprint.c (ada_val_print_num): Use
6338         val_print_scalar_formatted.
6339
6340 2017-06-12  Tom Tromey  <tom@tromey.com>
6341
6342         * printcmd.c (print_scalar_formatted): Unify the two switches.
6343         Don't convert scalars to LONGEST.
6344
6345 2017-06-12  Tom Tromey  <tom@tromey.com>
6346
6347         PR exp/16225:
6348         * valprint.h (print_decimal_chars): Update.
6349         * valprint.c (maybe_negate_by_bytes): New function.
6350         (print_decimal_chars): Add "is_signed" argument.
6351         * printcmd.c (print_scalar_formatted): Update.
6352
6353 2017-06-12  Tom Tromey  <tom@tromey.com>
6354
6355         PR exp/16225:
6356         * valprint.h (print_binary_chars, print_hex_chars): Update.
6357         * valprint.c (val_print_type_code_int): Update.
6358         (print_binary_chars): Add "zero_pad" argument.
6359         (emit_octal_digit): New function.
6360         (print_octal_chars): Don't zero-pad.
6361         (print_decimal_chars): Likewise.
6362         (print_hex_chars): Add "zero_pad" argument.
6363         * sh64-tdep.c (sh64_do_fp_register): Update.
6364         * regcache.c (regcache::dump): Update.
6365         * printcmd.c (print_scalar_formatted): Update.
6366         * infcmd.c (default_print_one_register_info): Update.
6367
6368 2017-06-12  Pedro Alves  <palves@redhat.com>
6369             Alan Hayward  <alan.hayward@arm.com>
6370
6371         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6372         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6373         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6374         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6375         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6376
6377 2017-06-12  Pedro Alves  <palves@redhat.com>
6378
6379         * dwarf2read.c (mapped_symtab::data): Now a vector of
6380         symtab_index_entry instead of vector of
6381         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6382         whether an element's name is NULL instead of checking whether the
6383         element itself is NULL.
6384         (find_slot): Change return type.  Adjust.
6385         (hash_expand, , add_index_entry, uniquify_cu_indices)
6386         (write_hash_table): Adjust.
6387
6388 2017-06-12  Pedro Alves  <palves@redhat.com>
6389
6390         * dwarf2read.c (recursively_count_psymbols): New function.
6391         (write_psymtabs_to_index): Call it to compute number of psyms and
6392         pass estimate size of psyms_seen to unordered_set's ctor.
6393
6394 2017-06-12  Pedro Alves  <palves@redhat.com>
6395
6396         * dwarf2read.c (write_hash_table): Check if key already exists
6397         before emplacing.
6398
6399 2017-06-12  Pedro Alves  <palves@redhat.com>
6400
6401         * dwarf2read.c (data_buf::append_space): Rename to...
6402         (data_buf::grow): ... this, and make private.  Adjust all callers.
6403         (data_buf::append_uint): New method.
6404         (add_address_entry, write_one_signatured_type)
6405         (write_psymtabs_to_index): Use it.
6406
6407 2017-06-12  Pedro Alves  <palves@redhat.com>
6408
6409         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6410         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6411         (data_buf::file_write): Call ::fwrite directly.
6412
6413 2017-06-12  Pedro Alves  <palves@redhat.com>
6414
6415         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6416         std::vector::erase.
6417
6418 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6419
6420         Code cleanup: C++ify .gdb_index producer.
6421         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6422         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6423         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6424         (create_strtab, add_string): Remove.
6425         (file_write, data_buf): New.
6426         (struct symtab_index_entry): Use std::vector for cu_indices.
6427         (struct mapped_symtab): Use std::vector for data.
6428         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6429         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6430         Remove.
6431         (find_slot): Change return type.  Update it to the new data structures.
6432         (hash_expand, add_index_entry): Update it to the new data structures.
6433         (offset_type_compare): Remove.
6434         (uniquify_cu_indices): Update it to the new data structures.
6435         (c_str_view, c_str_view_hasher, vector_hasher): New.
6436         (add_indices_to_cpool): Remove.
6437         (write_hash_table): Update it to the new data structures.
6438         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6439         (eq_psymtab_cu_index): Remove.
6440         (psym_index_map): New typedef.
6441         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6442         reference and std::unordered_map for cu_index_htab.
6443         (add_address_entry, add_address_entry_worker, write_address_map)
6444         (write_psymbols): Update it to the new data structures.
6445         (write_obstack): Remove.
6446         (struct signatured_type_index_data): Change types_list to a data_buf
6447         reference and psyms_seen to a std::unordered_set reference.
6448         (write_one_signatured_type, recursively_write_psymbols)
6449         (write_psymtabs_to_index): Update it to the new data structures.
6450
6451 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6452
6453         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6454         separate-debug-file commands.
6455         * symfile.h (separate_debug_file_debug): New global.
6456         * symfile.c (separate_debug_file_debug): New global.
6457         (separate_debug_file_exists, find_separate_debug_file): Add
6458         debug output.
6459         (_initialize_symfile): Add "set debug separate-debug-file"
6460         command.
6461         * build-id.c (build_id_to_debug_bfd,
6462         find_separate_debug_file_by_buildid): Add debug output.
6463
6464 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6465
6466         * gdbarch.sh (displaced_step_free_closure): Remove.
6467         * gdbarch.h, gdbarch.c: Re-generate.
6468         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6469         displaced_step_free_closure.
6470         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6471         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6472         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6473         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6474         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6475         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6476         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6477         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6478         * infrun.c (displaced_step_clear): Call xfree instead of
6479         gdbarch_displaced_step_free_closure.
6480
6481 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6482
6483         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6484         NULL".
6485
6486 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6487
6488         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6489         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6490         (mn10300_push_dummy_call): Likewise.
6491
6492 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6493
6494         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6495
6496 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6497
6498         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6499
6500 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6501
6502         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6503         able to start inferiors using a shell.
6504         (New remote packets): Announce new packet "QStartupWithShell".
6505         * remote.c: Add PACKET_QStartupWithShell.
6506         (extended_remote_create_inferior): Handle new
6507         PACKET_QStartupWithShell.
6508         (remote_protocol_features) <QStartupWithShell>: New entry for
6509         PACKET_QStartupWithShell.
6510         (_initialize_remote): Call "add_packet_config_cmd" for
6511         QStartupShell.
6512
6513 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6514             Pedro Alves  <palves@redhat.com>
6515
6516         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6517         and "nat/fork-inferior.h".
6518         * common/common-inferior.h: New file, with contents from
6519         "gdb/inferior.h".
6520         * commom/common-utils.c: Include "common-utils.h".
6521         (stringify_argv): New function.
6522         * common/common-utils.h (stringify_argv): New prototype.
6523         * configure.nat: Add "fork-inferior.o" as a dependency for
6524         "*linux*", "fbsd*" and "nbsd*" hosts.
6525         * corefile.c (get_exec_file): Update comment.
6526         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6527         instead of "startup_inferior".
6528         (darwin_create_inferior): Call "add_thread_silent" after
6529         "fork_inferior".
6530         * fork-child.c: Cleanup unnecessary includes.
6531         (SHELL_FILE): Move to "common/common-fork-child.c".
6532         (environ): Likewise.
6533         (exec_wrapper): Initialize.
6534         (get_exec_wrapper): New function.
6535         (breakup_args): Move to "common/common-fork-child.c"; rename to
6536         "breakup_args_for_exec".
6537         (escape_bang_in_quoted_argument): Move to
6538         "common/common-fork-child.c".
6539         (saved_ui): New variable.
6540         (prefork_hook): New function.
6541         (postfork_hook): Likewise.
6542         (postfork_child_hook): Likewise.
6543         (gdb_startup_inferior): Likewise.
6544         (fork_inferior): Move to "common/common-fork-child.c".  Update
6545         function to support gdbserver.
6546         (startup_inferior): Likewise.
6547         * gdbcore.h (get_exec_file): Remove declaration.
6548         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6549         instead of "startup_inferior".  Call "add_thread_silent" after
6550         "fork_inferior".
6551         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6552         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6553         instead of "startup_inferior".  Call "add_thread_silent" after
6554         "fork_inferior".
6555         * inferior.h: Include "common-inferior.h".
6556         (trace_start_error): Move to "common/common-utils.h".
6557         (trace_start_error_with_name): Likewise.
6558         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6559         (startup_inferior): Likewise.
6560         (gdb_startup_inferior): New prototype.
6561         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6562         * nat/fork-inferior.h: New file.
6563         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6564         instead of "startup_inferior".  Call "add_thread_silent" after
6565         "fork_inferior".
6566         * target.h (target_terminal_init): Move prototype to
6567         "target/target.h".
6568         (target_terminal_inferior): Likewise.
6569         (target_terminal_ours): Likewise.
6570         * target/target.h (target_terminal_init): New prototype, moved
6571         from "target.h".
6572         (target_terminal_inferior): Likewise.
6573         (target_terminal_ours): Likewise.
6574         * utils.c (gdb_flush_out_err): New function.
6575
6576 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6577
6578         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6579         * common/common-gdbthread.h: New file, with parts from
6580         "gdb/gdbthread.h".
6581         * gdbthread.h: Include "common-gdbthread.h".
6582         (switch_to_thread): Moved to "common/common-gdbthread.h".
6583
6584 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6585
6586         * Makefile.in (SFILES): Add "common/job-control.c".
6587         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6588         (COMMON_OBS): Add "job-control.o".
6589         * common/job-control.c: New file, with contents from
6590         "gdb/inflow.c".
6591         * common/job-control.h: New file, with contents from "terminal.h".
6592         * fork-child.c: Include "job-control.h".
6593         * inflow.c: Include "job-control.h".
6594         (gdb_setpgid): Move to "common/common-inflow.c".
6595         (_initialize_inflow): Move setting of "job_control" to
6596         "handle_job_control".
6597         * terminal.h (job_control): Moved to "common/common-terminal.h".
6598         (gdb_setpgid): Likewise.
6599         * top.c: Include "job_control.h".
6600         * utils.c: Likewise.
6601         (job_control): Moved to "job-control.c".
6602
6603 2017-06-07  Pedro Alves  <palves@redhat.com>
6604
6605         * Makefile.in (SFILES): Add gdb_regex.c.
6606         (COMMON_OBS): Add gdb_regex.o.
6607         * ada-lang.c (ada_add_standard_exceptions)
6608         (ada_add_exceptions_from_frame, name_matches_regex)
6609         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6610         parameter type to compiled_regex.  Adjust.
6611         (ada_exceptions_list): Use compiled_regex.
6612         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6613         std::unique_ptr<compiled_regex>.
6614         (exception_catchpoint::~exception_catchpoint): Remove regfree
6615         call.
6616         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6617         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6618         * breakpoint.c (solib_catchpoint::compiled): Now a
6619         std::unique_ptr<compiled_regex>.
6620         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6621         (check_status_catch_solib): Adjust to use compiled_regex.
6622         (add_solib_catchpoint): Adjust to use compiled_regex.
6623         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6624         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6625         compiled_regex reference.  Adjust to use it.
6626         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6627         declaration.  Include "gdb_regex.h".
6628         (apropos_cmd): Change regex parameter to compiled_regex reference.
6629         * gdb_regex.c: New file.
6630         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6631         declarations.
6632         (class compiled_regex): New.
6633         * linux-tdep.c: Include "common/gdb_optional.h".
6634         (struct mapping_regexes): New, factored out from
6635         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6636         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6637         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6638         * probe.c: Include "common/gdb_optional.h".
6639         (collect_probes): Use compiled_regex and gdb::optional and remove
6640         cleanups.
6641         * skip.c: Include "common/gdb_optional.h".
6642         (skiplist_entry::compiled_function_regexp): Now a
6643         gdb::optional<compiled_regex>.
6644         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6645         (free_skiplist_entry): Remove regfree call.
6646         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6647         compiled_regex and gdb::optional.
6648         * symtab.c: Include "common/gdb_optional.h".
6649         (search_symbols): Use compiled_regex and gdb::optional.
6650         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6651         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6652         to gdb_regex.c.
6653
6654 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6655
6656         * regcache.c (regcache::save): Avoid buffer use.
6657         (regcache::dump): Likewise.
6658
6659 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6660
6661         * sh-tdep.c (sh_pseudo_register_read): Remove
6662         MAX_REGISTER_SIZE.
6663         (sh_pseudo_register_write): Likewise.
6664         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6665         (sh64_pseudo_register_write): Likewise
6666
6667 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6668
6669         * aarch64-tdep.c (aarch64_store_return_value): Use
6670         V_REGISTER_SIZE.
6671         (aarch64_pseudo_read_value): Likewise.
6672         (aarch64_pseudo_write): Likewise.
6673
6674 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6675
6676         * regformats/regdef.h (set_register_cache): Remove the
6677         declaration.
6678
6679 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6680
6681         * frame.c (frame_unwind_register_signed): Use
6682         frame_unwind_register_value.
6683
6684 2017-06-06  Pedro Alves  <palves@redhat.com>
6685
6686         PR breakpoints/21553
6687         * breakpoint.c (create_breakpoints_sal_default)
6688         (init_breakpoint_sal, create_breakpoint_sal): Use
6689         gdb::unique_xmalloc_ptr for string parameters.
6690         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6691         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6692         (base_breakpoint_create_breakpoints_sal)
6693         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6694         (strace_marker_create_breakpoints_sal)
6695         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6696         string parameters.
6697         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6698         gdb::unique_xmalloc_ptr for string parameters.
6699         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6700         parameters.
6701
6702 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6703
6704         * alpha-tdep.c (alpha_register_to_value): Use
6705         get_frame_register_value.
6706         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6707
6708 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6709
6710         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6711         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6712         (ia64_value_to_register): Likewise.
6713         (ia64_extract_return_value): Likewise.
6714         (ia64_store_return_value): Likewise.
6715         (ia64_push_dummy_call): Likewise.
6716
6717 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6718
6719         GDB 8.0 released.
6720
6721 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6722
6723         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6724
6725 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6726
6727         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6728         parameter.
6729         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6730
6731 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6732
6733         * event-loop.c (poll_timers): Unallocate timer using delete
6734         instead of xfree.
6735
6736 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6737
6738         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6739         (struct breakpoint) <~breakpoint>: New.
6740         (struct watchpoint): Inherit from breakpoint.
6741         <~watchpoint>: New.
6742         <base>: Remove.
6743         (struct tracepoint): Inherit from breakpoint.
6744         <base>: Remove.
6745         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6746         (struct longjmp_breakpoint): Inherit from breakpoint.
6747         <~longjmp_breakpoint>: New.
6748         <base>: Remove.
6749         (new_breakpoint_from_type): Remove casts.
6750         (watchpoint_in_thread_scope): Remove reference to base field.
6751         (watchpoint_del_at_next_stop): Likewise.
6752         (update_watchpoint): Likewise.
6753         (watchpoint_check): Likewise.
6754         (bpstat_check_watchpoint): Likewise.
6755         (set_longjmp_breakpoint): Likewise.
6756         (struct fork_catchpoint): Inherit from breakpoint.
6757         <base>: Remove.
6758         (struct solib_catchpoint): Inherit from breakpoint.
6759         <~solib_catchpoint>: New.
6760         <base>: Remove.
6761         (dtor_catch_solib): Change to ...
6762         (solib_catchpoint::~solib_catchpoint): ... this.
6763         (breakpoint_hit_catch_solib): Remove reference to base field.
6764         (add_solib_catchpoint): Likewise.
6765         (create_fork_vfork_event_catchpoint): Likewise.
6766         (struct exec_catchpoint): Inherit from breakpoint.
6767         <~exec_catchpoint>: New.
6768         <base>: Remove.
6769         (dtor_catch_exec): Change to ...
6770         (exec_catchpoint::~exec_catchpoint): ... this.
6771         (dtor_watchpoint): Change to ...
6772         (watchpoint::~watchpoint): ... this.
6773         (watch_command_1): Remove reference to base field.
6774         (catch_exec_command_1): Likewise.
6775         (base_breakpoint_dtor): Change to ...
6776         (breakpoint::~breakpoint): ... this.
6777         (base_breakpoint_ops): Remove dtor field value.
6778         (longjmp_bkpt_dtor): Change to ...
6779         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6780         (strace_marker_create_breakpoints_sal): Remove reference to base
6781         field.
6782         (delete_breakpoint): Don't manually call breakpoint destructor.
6783         (create_tracepoint_from_upload): Remove reference to base field.
6784         (trace_pass_set_count): Likewise.
6785         (initialize_breakpoint_ops): Don't initialize
6786         momentary_breakpoint_ops, don't set dtors.
6787         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6788         <~ada_catchpoint>: New.
6789         <base>: Remove.
6790         (create_excep_cond_exprs): Remove reference to base field.
6791         (dtor_exception): Change to ...
6792         (ada_catchpoint::~ada_catchpoint): ... this.
6793         (dtor_catch_exception): Remove.
6794         (dtor_catch_exception_unhandled): Remove.
6795         (dtor_catch_assert): Remove.
6796         (create_ada_exception_catchpoint): Remove reference to base
6797         field.
6798         (initialize_ada_catchpoint_ops): Don't set dtors.
6799         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6800         breakpoint.
6801         <~signal_catchpoint>: New.
6802         <base>: Remove.
6803         (signal_catchpoint_dtor): Change to ...
6804         (signal_catchpoint::~signal_catchpoint): ... this.
6805         (create_signal_catchpoint): Remove reference to base field.
6806         (initialize_signal_catchpoint_ops): Don't set dtor.
6807         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6808         from breakpoint.
6809         <~syscall_catchpoint>: New.
6810         <base>: Remove.
6811         (dtor_catch_syscall): Change to ...
6812         (syscall_catchpoint::~syscall_catchpoint): ... this.
6813         (create_syscall_event_catchpoint): Remove reference to base
6814         field.
6815         (initialize_syscall_catchpoint_ops): Don't set dtor.
6816         * break-catch-throw.c (struct exception_catchpoint): Inherit
6817         from breakpoint.
6818         <~exception_catchpoint>: New.
6819         <base>: Remove.
6820         (dtor_exception_catchpoint): Change to ...
6821         (exception_catchpoint::~exception_catchpoint): ... this.
6822         (handle_gnu_v3_exceptions): Remove reference to base field.
6823         (initialize_throw_catchpoint_ops): Don't set dtor.
6824         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6825         field.
6826         * remote.c (remote_get_tracepoint_status): Likewise.
6827         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6828         * tracefile.c (tracefile_fetch_registers): Likewise.
6829         * tracepoint.c (actions_command): Likewise.
6830         (validate_actionline): Likewise.
6831         (tfind_1): Likewise.
6832         (get_traceframe_location): Likewise.
6833         (find_matching_tracepoint_location): Likewise.
6834         (parse_tracepoint_status): Likewise.
6835         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6836
6837 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6838
6839         * breakpoint.c (struct longjmp_breakpoint): New struct.
6840         (is_tracepoint_type): Change return type to bool.
6841         (is_longjmp_type): New function.
6842         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6843         (set_raw_breakpoint_without_location): Use
6844         new_breakpoint_from_type.
6845         (set_raw_breakpoint): Likewise.
6846
6847 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6848
6849         * breakpoint.c (new_breakpoint_from_type): New function.
6850         (create_breakpoint_sal): Use new_breakpoint_from_type and
6851         unique_ptr.
6852         (create_breakpoint): Likewise.
6853
6854 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6855
6856         * memattr.c (mem_info_command): Rename to ...
6857         (info_mem_command): ... this.
6858         (mem_enable_command): Rename to ...
6859         (enable_mem_command): ... this.
6860         (mem_disable_command): Rename to ...
6861         (disable_mem_command): ... this.
6862         (mem_delete_command): Rename to ...
6863         (delete_mem_command): ... this.
6864         (_initialize_mem): Adjust function names.
6865
6866 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6867
6868         * btrace.c (handle_pt_insn_events): New.
6869         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6870         STATUS.  Split into this and ...
6871         (handle_pt_insn_event_flags): ... this.
6872
6873 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6874
6875         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6876         and struct pt_insn.resynced.
6877         * configure: Regenerated.
6878         * config.in: Regenerated.
6879
6880 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6881
6882         * btrace.c (ftrace_find_call_by_number): New function.
6883         (ftrace_new_function): Store objects, not pointers.
6884         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6885         ftrace_new_gap, ftrace_update_function,
6886         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6887         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6888         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6889         btrace_ends_with_single_insn, btrace_call_get): Account for
6890         btrace_thread_info::functions now storing objects.
6891         * btrace.h (struct btrace_thread_info): Add constructor.
6892         (struct btrace_thread_info) <functions>: Make std::vector.
6893         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6894         Initialize with default values.
6895         * record-btrace.c (record_btrace_frame_sniffer): Account for
6896         btrace_thread_info::functions now storing objects.
6897
6898 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6899
6900         * btrace.c: Remove typedef bfun_s.
6901         (ftrace_new_gap): Directly add gaps to the list of gaps.
6902         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6903         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6904         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6905         instead of gdb VEC.
6906
6907 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6908
6909         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6910         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6911         with btrace_thread_info::next_segment and
6912         btrace_thread_info::prev_segment.
6913         * btrace.h: Remove struct btrace_func_link.
6914         (struct btrace_function): Replace pair of function segment pointers
6915         with pair of indices.
6916         * python/py-record-btrace.c (btpy_call_prev_sibling,
6917         btpy_call_next_sibling): Replace references to
6918         btrace_thread_info::segment with btrace_thread_info::next_segment and
6919         btrace_thread_info::prev_segment.
6920         * record-btrace.c (record_btrace_frame_this_id): Use
6921         btrace_find_call_by_number.
6922
6923 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6924
6925         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6926         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6927         btrace_insn_next, btrace_insn_prev): Remove references to
6928         btrace_thread_info::flow.
6929         * btrace.h (struct btrace_function): Remove FLOW.
6930
6931 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6932
6933         * btrace.c (ftrace_find_call_by_number): New function.
6934         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6935         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6936         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6937         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6938         index.
6939         * btrace.h (struct btrace_function): Turn UP into an index.
6940         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6941         as an index.
6942         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6943         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6944         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6945
6946 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6947
6948         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6949         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6950         ftrace_update_function, ftrace_compute_global_level_offset,
6951         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6952         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6953         btrace_insn_end, btrace_is_empty): Remove references to
6954         btrace_thread_info::begin and btrace_thread_info::end.
6955         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6956         (struct btrace_thread_info) <functions>: Adjust comment.
6957         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6958         btrace_thread_info::begin.
6959
6960 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6961
6962         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6963         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6964         ftrace_update_function): Remove arguments that implicitly were always
6965         BTINFO->END.
6966         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6967         Don't pass BTINFO->END.
6968
6969 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6970
6971         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6972         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6973         btrace_find_insn_by_number): Replace function segment pointer with
6974         index.
6975         (btrace_insn_cmp): Simplify.
6976         * btrace.h: (struct btrace_insn_iterator) Rename index to
6977         insn_index.  Replace function segment pointer with index into function
6978         segment vector.
6979         * record-btrace.c (record_btrace_call_history): Replace function
6980         segment pointer use with index.
6981         (record_btrace_frame_sniffer): Retrieve function call segment through
6982         vector.
6983         (record_btrace_set_replay): Remove defunc't safety check.
6984
6985 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6986
6987         * btrace.c (btrace_ends_with_single_insn): New function.
6988         (btrace_call_get, btrace_call_number, btrace_call_begin,
6989         btrace_call_end, btrace_call_next, btrace_call_prev,
6990         btrace_find_call_by_number): Use index into call segment vector
6991         instead of pointer.
6992         (btrace_call_cmp): Simplify.
6993         * btrace.h (struct btrace_call_iterator): Replace function call segment
6994         pointer with index into vector.
6995         * record-btrace.c (record_btrace_call_history): Use index instead of
6996         pointer.
6997
6998 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6999
7000         * btrace.c (btrace_insn_begin, btrace_insn_end,
7001         btrace_find_insn_by_number): Add btinfo to iterator.
7002         * btrace.h (struct btrace_insn_iterator): Add btinfo.
7003
7004 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7005
7006         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7007         and save pointers directly.
7008         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7009         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7010         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
7011         changed signature of functions.
7012         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7013         (btrace_fetch): Remove code that adds btrace_function pointers to
7014         vector of btrace_functions.
7015         (btrace_clear): Simplify freeing vector of btrace_functions.
7016
7017 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7018
7019         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7020         Replace VEC_* with std::vector functions.
7021         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7022         (struct btrace_thread_info)<functions>: Change type to std::vector.
7023
7024 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7025
7026         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7027         "Removed targets and native configurations" up.  Merge duplicate
7028         "New commands" sub-sections.  Add "New options" sub-sections.
7029
7030 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7031
7032         * defs.h (copy_integer_to_size): New declaration.
7033         * findvar.c (copy_integer_to_size): New function.
7034         (do_cint_test): New selftest function.
7035         (copy_integer_to_size_test): Likewise.
7036         (_initialize_findvar): Likewise.
7037         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7038         (mips_fbsd_collect_reg): Use raw_collect_integer.
7039         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7040         (mips64_fill_gregset): Use raw_collect_integer
7041         (mips64_fill_fpregset): Use raw_supply_integer.
7042         * regcache.c (regcache::raw_supply_integer): New function.
7043         (regcache::raw_collect_integer): Likewise.
7044         * regcache.h: (regcache::raw_supply_integer): New declaration.
7045         (regcache::raw_collect_integer): Likewise.
7046
7047 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7048
7049         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7050         (COMMON_OBS): Add gdbarch-selftests.o.
7051         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7052         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7053         * gdbarch-selftests.c: New file.
7054         * regcache.h (regcache) <~regcache>: Mark it virtual if
7055         GDB_SELF_TEST.
7056         <raw_write>: Likewise.
7057
7058 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7059
7060         * regcache.c (current_regcache): Change it to
7061         regcache::current_regcache.
7062         (regcache_observer_target_changed): Update.
7063         (regcache_thread_ptid_changed): Make it a regcache static
7064         method.
7065         (regcache_thread_ptid_changed): Update.
7066         (class regcache_access): New.
7067         (current_regcache_test): Update.
7068         (_initialize_regcache): Update.
7069         * regcache.h: Include forward_list.
7070         (regcache): Declare regcache_thread_ptid_changed and declare
7071         registers_changed_ptid as friend.
7072
7073 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7074
7075         * i387-tdep.c (i387_register_to_value): Use register_size
7076         instead of TYPE_LENGTH.
7077         * m68k-tdep.c (m68k_register_to_value): Likewise.
7078
7079 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7080
7081         * i387-tdep.c (i387_convert_register_p): Return false if type
7082         code isn't TYPE_CODE_FLT.
7083
7084 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7085
7086         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7087         length is 4.
7088         (alpha_register_to_value): Remove type length check.
7089         (alpha_value_to_register): Likewise.
7090
7091 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7092
7093         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7094         TYPE_CODE_FLT.
7095
7096 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7097
7098         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7099         TYPE_CODE_FLT or not.
7100
7101 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7102
7103         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7104         * avr-tdep.c (avr_gdbarch_init): Likewise.
7105         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7106         * cris-tdep.c (cris_gdbarch_init): Likewise.
7107         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7108         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7109         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7110         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7111         * mep-tdep.c (mep_gdbarch_init): Likewise.
7112         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7113         * mips-tdep.c (mips_gdbarch_init): Likewise.
7114         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7115         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7116         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7117         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7118         * v850-tdep.c (v850_gdbarch_init): Likewise.
7119
7120 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7121
7122         * selftest-arch.c (tests_with_arch): Call registers_changed
7123         and reinit_frame_cache.
7124         * selftest.c (run_self_tests): Likewise.
7125
7126 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7127
7128         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7129         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7130
7131 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7132
7133         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7134         set_gdbarch_print_insn.
7135
7136 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7137
7138         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7139         set_gdbarch_print_insn.
7140
7141 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7142
7143         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7144         set_gdbarch_print_insn.
7145         * arc-tdep.c (arc_gdbarch_init): Likewise.
7146         * arch-utils.c: include dis-asm.h.
7147         (default_print_insn): New function.
7148         * arch-utils.h (default_print_insn): Declare.
7149         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7150         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7151         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7152         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7153         * frv-tdep.c (frv_gdbarch_init): Likewise.
7154         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7155         * gdbarch.sh (print_insn): Use default_print_insn.
7156         * gdbarch.c: Regenerated.
7157         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7158         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7159         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7160         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7161         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7162         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7163         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7164         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7165         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7166         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7167         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7168         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7169         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7170         * mt-tdep.c (mt_gdbarch_init): Likewise.
7171         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7172         * nios2-tdep.c (nios2_print_insn): Remove.
7173         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7174         * rx-tdep.c (rx_gdbarch_init): Likewise.
7175         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7176         * score-tdep.c (score_print_insn): Remove.
7177         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7178         * sh-tdep.c (sh_gdbarch_init): Likewise.
7179         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7180         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7181         * tic6x-tdep.c (tic6x_print_insn): Remove.
7182         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7183         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7184         * v850-tdep.c (v850_gdbarch_init): Likewise.
7185         * vax-tdep.c (vax_gdbarch_init): Likewise.
7186         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7187         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7188
7189 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7190
7191         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7192         (MIPS_FP0_REGNUM): Remove.
7193         (MIPS_FSR_REGNUM): Remove.
7194         (mips_fbsd_supply_fpregs): Use mips_regnum.
7195         (mips_fbsd_supply_gregs): Likewise.
7196         (mips_fbsd_collect_fpregs): Likewise.
7197         (mips_fbsd_collect_gregs): Likewise.
7198
7199 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7200
7201         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7202         (getpfpregs_supplies): New function.
7203         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7204         getfpregs_supplies.
7205         (mips_fbsd_store_inferior_registers): Likewise.
7206
7207 2017-05-22  Pedro Alves <palves@redhat.com>
7208
7209         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7210         maintainer.
7211
7212 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7213
7214         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7215         (store_register): Likewise.
7216         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7217         (get_decimal_float_return_value): Likewise.
7218         (do_ppc_sysv_return_value): Likewise.
7219         (ppc64_sysv_abi_push_integer): Likewise.
7220         (ppc64_sysv_abi_push_freg): Likewise.
7221         (ppc64_sysv_abi_return_value_base): Likewise.
7222         (ppc64_sysv_abi_return_value): Likewise.
7223         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7224         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7225         * rs6000-nat.c: Likewise.
7226         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7227         (rs6000_value_to_register): Likewise.
7228         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7229
7230 2017-05-21  Tom Tromey  <tom@tromey.com>
7231
7232         PR rust/21466:
7233         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7234         arrays as "[T]", not "[T; ]".
7235
7236 2017-05-19  Tom Tromey  <tom@tromey.com>
7237
7238         PR rust/21484:
7239         * rust-lang.c (exp_descriptor_rust): New function.
7240         (rust_language_defn): Use it.
7241         * p-lang.c (pascal_language_defn): Update.
7242         * opencl-lang.c (opencl_language_defn): Update.
7243         * objc-lang.c (objc_language_defn): Update.
7244         * m2-lang.c (m2_language_defn): Update.
7245         * language.h (struct language_defn)
7246         <la_watch_location_expression>: New member.
7247         * language.c (unknown_language_defn, auto_language_defn)
7248         (local_language_defn): Update.
7249         * go-lang.c (go_language_defn): Update.
7250         * f-lang.c (f_language_defn): Update.
7251         * d-lang.c (d_language_defn): Update.
7252         * c-lang.h (c_watch_location_expression): Declare.
7253         * c-lang.c (c_watch_location_expression): New function.
7254         (c_language_defn, cplus_language_defn, asm_language_defn)
7255         (minimal_language_defn): Use it.
7256         * breakpoint.c (watch_command_1): Call
7257         la_watch_location_expression.
7258         * ada-lang.c (ada_language_defn): Update.
7259
7260 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7261
7262         PR tui/21482
7263         * gdb_curses.h (NOMACROS): Define.
7264         (NCURSES_NOMACROS): Define.
7265
7266 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7267
7268         PR tui/21482
7269         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7270         arg to char *.
7271         * tui/tui-wingeneral.c (box_win): Likewise.
7272         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7273         (tui_show_source_line): Likewise.
7274         (tui_show_exec_info_content): Likewise.
7275
7276 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7277
7278         * sparc-tdep.c (sparc_structure_return_p)
7279         (sparc_arg_on_registers_p): New functions.
7280         (sparc32_store_arguments): Use them.
7281         * sparc64-tdep.c (sparc64_16_byte_align_p)
7282         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7283         Handle TYPE_CODE_ARRAY.
7284
7285 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7286
7287         * cli/cli-decode.c (add_alias_cmd): New function.
7288         * command.h (add_alias_cmd): Declare.
7289         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7290         instead call add_alias_cmd.
7291
7292 2017-05-17  Pedro Alves  <palves@redhat.com>
7293
7294         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7295         (nat_makefile_frag): ... this.  All references updated.
7296         * configure.ac: Likewise.
7297         * configure.nat: Likewise.  Enhance comments.
7298         * configure: Regenerate.
7299
7300 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7301
7302         * procfs.c (procfs_create_inferior): Change prototype to match
7303         definition.
7304
7305 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7306
7307         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7308         C++ compiler warning.
7309
7310 2017-05-12  Tom Tromey  <tom@tromey.com>
7311
7312         PR rust/21483:
7313         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7314         recurse, just call value_struct_elt directly.
7315
7316 2017-05-12  Tom Tromey  <tom@tromey.com>
7317
7318         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7319         OP_RUST_ARRAY>: Fix.
7320
7321 2017-05-12  Tom Tromey  <tom@tromey.com>
7322
7323         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7324
7325 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7326
7327         * regcache.c: Include <forward_list>.
7328         (struct regcache_list): Remove.
7329         (current_regcache): Update.
7330         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7331         (regcache_thread_ptid_changed): Likewise.
7332         (registers_changed_ptid): Likewise.
7333         (current_regcache_size): Likewise.
7334
7335 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7336
7337         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7338         (current_regcache_size): New function.
7339         (current_regcache_test): New function.
7340         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7341
7342 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7343
7344         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7345         (print_gp_register_row): Use get_frame_register_value.
7346
7347 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7348
7349         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7350         (mips_supply_fpregset): Likewise.
7351         (mips64_supply_gregset): Likewise.
7352
7353 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7354
7355         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7356         regcache->raw_supply_zeroed.
7357
7358 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7359
7360         * configure.nat: Rearrange 'case' statements to match
7361         host before cpu.
7362
7363 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7364
7365         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7366         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7367         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7368         "@nat_extra_makefile_frag@".
7369         (Makefile): Remove dependency on "@frags@".
7370         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7371         (data-directory/Makefile): Likewise.
7372         * config/aarch64/linux.mh: Deleted; moved contents to
7373         "gdb/configure.nat".
7374         * config/alpha/alpha-linux.mh: Likewise.
7375         * config/alpha/nbsd.mh: Likewise.
7376         * config/arm/linux.mh: Likewise.
7377         * config/arm/nbsdelf.mh: Likewise.
7378         * config/i386/cygwin.mh: Likewise.
7379         * config/i386/cygwin64.mh: Likewise.
7380         * config/i386/darwin.mh: Likewise.
7381         * config/i386/fbsd.mh: Likewise.
7382         * config/i386/fbsd64.mh: Likewise.
7383         * config/i386/go32.mh: Likewise.
7384         * config/i386/i386gnu.mh: Likewise.
7385         * config/i386/i386sol2.mh: Likewise.
7386         * config/i386/linux.mh: Likewise.
7387         * config/i386/linux64.mh: Likewise.
7388         * config/i386/mingw.mh: Likewise.
7389         * config/i386/mingw64.mh: Likewise.
7390         * config/i386/nbsd64.mh: Likewise.
7391         * config/i386/nbsdelf.mh: Likewise.
7392         * config/i386/nto.mh: Likewise.
7393         * config/i386/obsd.mh: Likewise.
7394         * config/i386/obsd64.mh: Likewise.
7395         * config/i386/sol2-64.mh: Likewise.
7396         * config/ia64/linux.mh: Likewise.
7397         * config/m32r/linux.mh: Likewise.
7398         * config/m68k/linux.mh: Likewise.
7399         * config/m68k/nbsdelf.mh: Likewise.
7400         * config/m68k/obsd.mh: Likewise.
7401         * config/m88k/obsd.mh: Likewise.
7402         * config/mips/fbsd.mh: Likewise.
7403         * config/mips/linux.mh: Likewise.
7404         * config/mips/nbsd.mh: Likewise.
7405         * config/mips/obsd64.mh: Likewise.
7406         * config/pa/linux.mh: Likewise.
7407         * config/pa/nbsd.mh: Likewise.
7408         * config/pa/obsd.mh: Likewise.
7409         * config/powerpc/aix.mh: Likewise.
7410         * config/powerpc/fbsd.mh: Likewise.
7411         * config/powerpc/linux.mh: Likewise.
7412         * config/powerpc/nbsd.mh: Likewise.
7413         * config/powerpc/obsd.mh: Likewise.
7414         * config/powerpc/ppc64-linux.mh: Likewise.
7415         * config/powerpc/spu-linux.mh: Likewise.
7416         * config/s390/linux.mh: Likewise.
7417         * config/sh/nbsd.mh: Likewise.
7418         * config/sparc/fbsd.mh: Likewise.
7419         * config/sparc/linux.mh: Likewise.
7420         * config/sparc/linux64.mh: Likewise.
7421         * config/sparc/nbsd64.mh: Likewise.
7422         * config/sparc/nbsdelf.mh: Likewise.
7423         * config/sparc/obsd64.mh: Likewise.
7424         * config/sparc/sol2.mh: Likewise.
7425         * config/tilegx/linux.mh: Likewise.
7426         * config/vax/nbsdelf.mh: Likewise.
7427         * config/vax/obsd.mh: Likewise.
7428         * config/xtensa/linux.mh: Likewise.
7429         * config/i386/i386gnu.mn: New file, with excerpts from
7430         "config/i386/i386gnu.mh".
7431         * configure: Regenerate.
7432         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7433         *.mh files under "gdb/config".
7434         * configure.nat: New file, with contents from the
7435         "gdb/config/*/*.mh" files.
7436
7437 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7438
7439         * btrace.c (btrace_clear): Free insn vector.
7440
7441 2017-05-05  Pedro Alves  <palves@redhat.com>
7442
7443         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7444         * configure: Regenerate.
7445
7446 2017-05-04  Pedro Alves  <palves@redhat.com>
7447
7448         * Makefile.in (SFILES): Add progspace-and-thread.c.
7449         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7450         (COMMON_OBS): Add progspace-and-thread.o.
7451         * breakpoint.c: Include "progspace-and-thread.h".
7452         (update_inserted_breakpoint_locations)
7453         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7454         Use scoped_restore_current_pspace_and_thread.
7455         (create_std_terminate_master_breakpoint): Use
7456         scoped_restore_current_program_space.
7457         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7458         (print_breakpoint_location): Use
7459         scoped_restore_current_program_space.
7460         (bp_loc_is_permanent): Use
7461         scoped_restore_current_pspace_and_thread.
7462         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7463         (download_tracepoint_locations): Use
7464         scoped_restore_current_pspace_and_thread.
7465         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7466         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7467         (enum step_over_calls_kind): Moved from inferior.h.
7468         (class scoped_restore_current_thread): New class.
7469         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7470         declaration.
7471         (scoped_restore_current_thread): New class.
7472         * infcmd.c: Include "common/gdb_optional.h".
7473         (continue_1, proceed_after_attach): Use
7474         scoped_restore_current_thread.
7475         (notice_new_inferior): Use scoped_restore_current_thread.
7476         * inferior.c: Include "progspace-and-thread.h".
7477         (restore_inferior, save_current_inferior): Delete.
7478         (add_inferior_command, clone_inferior_command): Use
7479         scoped_restore_current_pspace_and_thread.
7480         * inferior.h (scoped_restore_current_inferior): New class.
7481         * infrun.c: Include "progspace-and-thread.h" and
7482         "common/gdb_optional.h".
7483         (follow_fork_inferior): Use
7484         scoped_restore_current_pspace_and_thread.
7485         (scoped_restore_exited_inferior): New class.
7486         (handle_vfork_child_exec_or_exit): Use
7487         scoped_restore_exited_inferior,
7488         scoped_restore_current_pspace_and_thread,
7489         scoped_restore_current_thread and scoped_restore.
7490         (fetch_inferior_event): Use scoped_restore_current_thread.
7491         * linespec.c (decode_line_full, decode_line_1): Use
7492         scoped_restore_current_program_space.
7493         * mi/mi-main.c: Include "progspace-and-thread.h".
7494         (exec_continue): Use scoped_restore_current_thread.
7495         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7496         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7497         * proc-service.c (ps_pglobal_lookup): Use
7498         scoped_restore_current_program_space.
7499         * progspace-and-thread.c: New file.
7500         * progspace-and-thread.h: New file.
7501         * progspace.c (release_program_space, clone_program_space): Use
7502         scoped_restore_current_program_space.
7503         (restore_program_space, save_current_program_space)
7504         (save_current_space_and_thread): Delete.
7505         (switch_to_program_space_and_thread): Moved to
7506         progspace-and-thread.c.
7507         * progspace.h (save_current_program_space)
7508         (save_current_space_and_thread): Delete declarations.
7509         (scoped_restore_current_program_space): New class.
7510         * remote.c (remote_btrace_maybe_reopen): Use
7511         scoped_restore_current_thread.
7512         * symtab.c: Include "progspace-and-thread.h".
7513         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7514         * thread.c (print_thread_info_1): Use
7515         scoped_restore_current_thread.
7516         (struct current_thread_cleanup): Delete.
7517         (do_restore_current_thread_cleanup)
7518         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7519         (scoped_restore_current_thread::~scoped_restore_current_thread):
7520         ... this new dtor.
7521         (make_cleanup_restore_current_thread): Rename/convert to ...
7522         (scoped_restore_current_thread::scoped_restore_current_thread):
7523         ... this new ctor.
7524         (thread_apply_all_command): Use scoped_restore_current_thread.
7525         (thread_apply_command): Use scoped_restore_current_thread.
7526         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7527         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7528
7529 2017-05-04  Pedro Alves  <palves@redhat.com>
7530
7531         * thread.c (make_cleanup_restore_current_thread): Move
7532         find_thread_ptid call before the is_stopped call.  Assert that the
7533         thread is found.  Replace is_stopped call by checking the thread's
7534         state directly.  Remove unnecessary NULL-thread check.
7535
7536 2017-05-04  Pedro Alves  <palves@redhat.com>
7537
7538         * corelow.c (thread_section_name): New class.
7539         (get_core_register_section, get_core_siginfo): Use it.
7540
7541 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7542
7543         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7544         (get_core_register_section): Remove xfree of NULL pointer.
7545
7546 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7547
7548         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7549         * regcache.c (regcache::raw_supply_zeroed): New function.
7550         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7551
7552 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7553
7554         * gdbarch.sh: Remove commented out definition of
7555         TARGET_CHAR_BIT.
7556         * gdbarch.h: Re-generate.
7557
7558 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7559
7560         * configure: Regenerate.
7561
7562 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7563
7564         * solib-target.c (solib_target_relocate_section_addresses):
7565         Remove num_section_bases, num_bases, segment_bases variables.
7566
7567 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7568
7569         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7570
7571 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7572
7573         * solib-target.c: Include <vector>
7574         (struct lm_info_target) <~lm_info_target>: Remove.
7575         <segment_bases, section_bases>: Change type to
7576         std::vector<CORE_ADDR>.
7577         (library_list_start_segment, library_list_start_section,
7578         library_list_end_library,
7579         solib_target_relocate_section_addresses): Adjust.
7580
7581 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7582
7583         * gdbarch.sh (software_single_step): Change return type to
7584         std::vector<CORE_ADDR>.
7585         * gdbarch.c, gdbarch.h: Re-generate.
7586         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7587         Adjust.
7588         (arm_deal_with_atomic_sequence_raw): Adjust.
7589         (thumb_get_next_pcs_raw): Adjust.
7590         (arm_get_next_pcs_raw): Adjust.
7591         (arm_get_next_pcs): Adjust.
7592         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7593         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7594         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7595         (alpha_software_single_step): Adjust.
7596         * alpha-tdep.h (alpha_software_single_step): Adjust.
7597         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7598         * arm-tdep.c (arm_software_single_step): Adjust.
7599         (arm_breakpoint_kind_from_current_state): Adjust.
7600         * arm-tdep.h (arm_software_single_step): Adjust.
7601         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7602         * cris-tdep.c (cris_software_single_step): Adjust.
7603         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7604         (micromips_deal_with_atomic_sequence): Adjust.
7605         (deal_with_atomic_sequence): Adjust.
7606         (mips_software_single_step): Adjust.
7607         * mips-tdep.h (mips_software_single_step): Adjust.
7608         * moxie-tdep.c (moxie_software_single_step): Adjust.
7609         * nios2-tdep.c (nios2_software_single_step): Adjust.
7610         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7611         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7612         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7613         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7614         * sparc-tdep.c (sparc_software_single_step): Adjust.
7615         * spu-tdep.c (spu_software_single_step): Adjust.
7616         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7617
7618 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7619
7620         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7621         * gdbarch.h: Re-generate.
7622
7623 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7624
7625         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7626         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7627         * python/py-instruction.c, python/py-instruction.h: New file.
7628         * python/py-record.c: Add py-instruction.h include.
7629         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7630         gdb.RecordInstruction.
7631         * python/python-internal.h: Add gdbpy_initialize_instruction
7632         declaration.
7633         * python/python.c (do_start_initialization): Add
7634         gdbpy_initialize_instruction.
7635
7636 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7637
7638         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7639         Remove.
7640         (btrace_func_from_recpy_func): New function.
7641         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7642         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7643         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7644         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7645         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7646         Also, use new helper functions.
7647         (btpy_list_item): Use new helper functions.
7648         (recpy_bt_function_call_history): Use new type name.
7649         (btpy_call_getset): Remove.
7650         (gdbpy_initialize_btrace): Remove code to initialize
7651         gdb.BtraceFunctionCall.
7652         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7653         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7654         recpy_bt_func_prev, recpy_bt_func_next): New export.
7655         * python/py-record.c (recpy_func_type): New static object.
7656         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7657         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7658         recpy_func_next): New function.
7659         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7660         (recpy_func_getset): New static object.
7661         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7662         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7663
7664 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7665
7666         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7667         (btpy_object, btpy_insn_type, btpy_new): Remove.
7668         (btpy_list_object): Use gdb.RecordInstruction type instead of
7669         gdb.BtraceInstruction type.
7670         (btrace_insn_from_recpy_insn): New function.
7671         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7672         btpy_new.
7673         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7674         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7675         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7676         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7677         instead of btpy_object.
7678         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7679         btpy_insn_data, btpy_insn_decode): Rename to ...
7680         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7681         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7682         recpy_bt_insn_decode): This.  Also, use new helper functions.
7683         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7684         recpy_insn_type.
7685         (btpy_insn_getset): Remove.
7686         (gdbpy_initialize_btrace): Remove code to initialize
7687         gdb.BtraceInstruction.  Use recpy_element_object.
7688         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7689         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7690         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7691         * python/py-record.c (recpy_insn_type): New static object.
7692         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7693         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7694         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7695         New function.
7696         (recpy_insn_getset): New static object.
7697         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7698         * python/py-record.h (recpy_element_object): New typedef.
7699         (recpy_insn_type, recpy_insn_new): New export.
7700
7701 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7702
7703         * py-record-btrace.c (btpy_insn_new): Removed.
7704         (btpy_insn_or_gap_new): New function.
7705         (btpy_insn_error): Removed.
7706         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7707         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7708         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7709         btpy_insn_or_gap_new instead of btpy_insn_new.
7710         (btpy_insn_getset): Remove btpy_insn_error.
7711         * py-record.c (recpy_gap_type): New static object.
7712         (recpy_gap_object): New typedef.
7713         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7714         recpy_gap_reason_string): New function.
7715         (recpy_gap_getset): New static object.
7716         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7717         * py-record.h (recpy_gap_new): New export.
7718
7719 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7720
7721         * python/py-record.c (recpy_ptid): Remove.
7722         (recpy_record_getset): Remove recpy_ptid.
7723
7724 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7725
7726         * btrace.c (btrace_fetch): Set inferior_ptid.
7727         * python/py-record-btrace.c: Add "py-record.h" include.
7728         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7729         recpy_bt_end, recpy_bt_instruction_history,
7730         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7731         in gdb.Record object instead of current ptid.
7732         * python/py-record.c: Include new "py-record.h" file.
7733         (recpy_record_object): Moved to py-record.h.
7734         * python/py-record.h: New file.
7735
7736 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7737
7738         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7739         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7740         indentation.
7741
7742 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7743
7744         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7745         the past maintainers section.
7746
7747 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7748
7749         * infcmd.c (get_return_value): Use regcache ctor, and remove
7750         cleanup.
7751
7752 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7753             Pedro Alves  <palves@redhat.com>
7754
7755         * regcache.c (regcache::regcache): New tag dispatch ctor.
7756         (do_cooked_read): Moved above.
7757         (regcache_dup): Use the tag dispatch ctor..
7758         * regcache.h (regcache): Declare ctor, delete copy ctor and
7759         assignment operator, remove friend regcache_dup.
7760
7761 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7762
7763         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7764         call method save instead of regcache_cpy.
7765         * regcache.h (struct regcache): Make regcache_dup a friend.
7766
7767 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7768
7769         * regcache.c (struct regcache): Move to regcache.h
7770         (regcache::arch): New method.
7771         (regcache_get_ptid): Update.
7772         (get_regcache_arch): Call arch method.
7773         (get_regcache_aspace): Call method aspace.
7774         (register_buffer): Change it to method.
7775         (regcache_save): Change it to regcache::save.
7776         (regcache_restore): Likewise.
7777         (regcache_cpy_no_passthrough): Remove the declaration.
7778         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7779         (regcache_cpy_no_passthrough): Change it to method
7780         cpy_no_passthrough.
7781         (regcache_register_status): Change it to method
7782         get_register_status.
7783         (regcache_invalidate): Change it to method invalidate.
7784         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7785         (regcache_raw_update): Change it to method raw_update.
7786         (regcache_raw_read): Likewise.
7787         (regcache_raw_read_signed): Likewise.
7788         (regcache_raw_read_unsigned): Likewise.
7789         (regcache_raw_write_signed): Likewise.
7790         (regcache_raw_write_unsigned): Likewise.
7791         (regcache_cooked_read): Likewise.
7792         (regcache_cooked_read_value): Likewise.
7793         (regcache_cooked_read_signed): Likewise.
7794         (regcache_cooked_read_unsigned): Likewise.
7795         (regcache_cooked_write_signed): Likewise.
7796         (regcache_cooked_write_unsigned): Likewise.
7797         (regcache_raw_set_cached_value): Likewise.
7798         (regcache_raw_write): Likewise.
7799         (regcache_cooked_write): Likewise.
7800         (regcache_xfer_part): Likewise.
7801         (regcache_raw_read_part): Likewise.
7802         (regcache_raw_write_part): Likewise.
7803         (regcache_cooked_read_part): Likewise.
7804         (regcache_cooked_write_part): Likewise.
7805         (regcache_raw_supply): Likewise.
7806         (regcache_raw_collect): Likewise.
7807         (regcache_transfer_regset): Likewise.
7808         (regcache_supply_regset): Likewise.
7809         (regcache_collect_regset): Likewise.
7810         (regcache_debug_print_register): Likewise.
7811         (enum regcache_dump_what): Move it to regcache.h.
7812         (regcache_dump): Change it to method dump.
7813         * regcache.h (enum regcache_dump_what): New.
7814         (class regcache): New.
7815         * target.c (target_fetch_registers): Call method
7816         debug_print_register.
7817         (target_store_registers): Likewise.
7818
7819 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7820
7821         * windows-nat.c (struct lm_info_windows): Initialize field.
7822         (windows_make_so): Allocate lm_info_windows with new.
7823         (windows_free_so): Free lm_info_windows with delete.
7824
7825 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7826
7827         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7828         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7829         cleanup.
7830         (darwin_free_so): Free lm_info_darwin with delete.
7831
7832 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7833
7834         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7835         <l_addr_p>: Change type to bool.
7836         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7837         (svr4_free_so): Free lm_info_svr4 with delete.
7838         (svr4_copy_library_list): Replace memcpy with call to copy
7839         constructor.
7840         (library_list_start_library, svr4_default_sos): Allocate
7841         lm_info_svr4 with new.
7842
7843 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7844
7845         * solib-target.c (struct lm_info_target): Add destructor,
7846         initialize fields.
7847         <name>: Change type to std::string.
7848         (library_list_start_library): Allocate lm_info_target with new.
7849         (solib_target_free_library_list): Free lm_info_target with
7850         delete.
7851         (solib_target_current_sos): Adapt to std::string.
7852         (solib_target_free_so): Free lm_info_target with delete.
7853
7854 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7855
7856         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7857         fields.
7858         (frv_current_sos): Allocate lm_info_frv with new.
7859         (frv_relocate_main_executable): Free lm_info_frv with delete,
7860         allocate with new.
7861         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7862
7863 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7864
7865         * solib-frv.c (struct lm_info_frv): Fix indentation.
7866
7867 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7868
7869         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7870         map field.
7871         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7872         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7873         and allocate with new.
7874         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7875
7876 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7877
7878         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7879         <filename, member_name>: Change type to std::string.
7880         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7881         (library_list_start_library): Allocate lm_info_aix with new.
7882         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7883         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7884         with copy constructor.
7885
7886 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7887
7888         * solist.h (struct lm_info): Remove.
7889         (struct lm_info_base): New class.
7890         (struct so_list) <lm_info>: Change type to lm_info_base *.
7891         * nto-tdep.c (struct lm_info): Remove.
7892         (lm_addr): Adjust.
7893         * solib-aix.c (struct lm_info): Rename to ...
7894         (struct lm_info_aix): ... this.  Extend lm_info_base.
7895         (lm_info_p): Rename to ...
7896         (lm_info_aix_p): ... this, and adjust.
7897         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7898         solib_aix_parse_libraries, library_list_start_library,
7899         solib_aix_free_library_list, solib_aix_parse_libraries,
7900         solib_aix_get_library_list,
7901         solib_aix_relocate_section_addresses, solib_aix_free_so,
7902         solib_aix_get_section_offsets,
7903         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7904         Adjust.
7905         (struct solib_aix_inferior_data) <library_list>: Adjust.
7906         * solib-darwin.c (struct lm_info): Rename to ...
7907         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7908         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7909         * solib-dsbt.c (struct lm_info): Rename to ...
7910         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7911         (struct dsbt_info) <main_executable_lm_info): Adjust.
7912         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7913         dsbt_relocate_section_addresses): Adjust.
7914         * solib-frv.c (struct lm_info): Rename to ...
7915         (struct lm_info_frv): ... this.  Extend lm_info_base.
7916         (main_executable_lm_info): Adjust.
7917         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7918         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7919         find_canonical_descriptor_in_load_object,
7920         frv_fdpic_find_canonical_descriptor): Adjust.
7921         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7922         to lm_info_svr4.
7923         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7924         svr4_clear_so, svr4_copy_library_list,
7925         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7926         svr4_current_sos, svr4_fetch_objfile_link_map,
7927         solist_update_incremental): Adjust.
7928         * solib-svr4.h (struct lm_info_svr4): Move here from
7929         solib-svr4.c.
7930         * solib-target.c (struct lm_info): Rename to ...
7931         (struct lm_info_target): ... this.  Extend lm_info_base.
7932         (lm_info_p): Rename to ...
7933         (lm_info_target_p): ... this.
7934         (solib_target_parse_libraries, library_list_start_segment,
7935         library_list_start_section, library_list_start_library,
7936         library_list_end_library, solib_target_free_library_list,
7937         solib_target_current_sos, solib_target_free_so,
7938         solib_target_relocate_section_addresses): Adjust.
7939         * windows-nat.c (struct lm_info): Rename to ...
7940         (struct lm_info_windows): ... this.  Extend lm_info_base.
7941         (windows_make_so, handle_load_dll, handle_unload_dll,
7942         windows_xfer_shared_libraries): Adjust.
7943
7944 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7945
7946         * solib-darwin.c (struct darwin_so_list): Remove.
7947         (darwin_current_sos): Allocate an so_list object instead of a
7948         darwin_so_list, separately allocate an lm_info object.
7949         (darwin_free_so): Free lm_info.
7950
7951 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7952
7953         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7954         with fprintf_filtered.
7955
7956 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7957
7958         * regcache.c (regcache::regcache): New function.
7959         (regcache::~regcache): New function.
7960         (regcache_xmalloc_1): Remove.
7961         (regcache_xmalloc): Call new regcache.
7962         (regcache_xfree): Call delete regcache.
7963         (get_thread_arch_aspace_regcache): Call new regcache.
7964
7965 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7966
7967         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7968         lwp instead of ptid_get_lwp.
7969
7970 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7971
7972         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7973         lwp_info instead of getting from inferior_ptid.
7974
7975 2017-04-27  Keith Seitz  <keiths@redhat.com>
7976
7977         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7978         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7979         (CV_CONVERSION_BADNESS): Define.
7980         (rank_one_type): Remove overly restrictive rvalue reference
7981         rank checks.
7982         Add cv-qualifier checks and subranks for type equality.
7983         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7984         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7985         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7986
7987 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7988
7989         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7990         count when creating the object.
7991
7992 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7993             Ulrich Weigand  <uweigand@de.ibm.com>
7994
7995         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7996         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7997         is used in AIX.
7998         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7999         (process_xcoff_symbol): Likewise.
8000         (scan_xcoff_symtab): Likewise.
8001
8002 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8003
8004         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8005         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8006         (ia64_access_reg): Use get_frame_register_unsigned.
8007         (ia64_access_rse_reg): Likewise.
8008         (ia64_libunwind_frame_prev_register): Likewise.
8009
8010 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
8011
8012         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8013         * gdbarch.c: Regenerated.
8014         * gdbarch.h: Regenerated.
8015         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8016         visibility external.
8017         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8018         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8019         (enum cfa_how_kind): Move to ...
8020         (struct dwarf2_frame_state_reg_info): Likewise.
8021         (struct dwarf2_frame_state): Likewise.
8022         * dwarf2-frame.h: ... here.
8023         (dwarf2_frame_state_alloc_regs): New declaration.
8024         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8025         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8026
8027 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8028
8029         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8030         regcache_raw_read_unsigned.
8031         (xtensa_pseudo_register_write): Likewise.
8032
8033 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8034
8035         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8036         (nds32_pseudo_register_write): Likewise.
8037
8038 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8039
8040         * regcache.c (struct regcache) <readonly_p>: Change its type
8041         to bool.
8042         (regcache_xmalloc_1): Update parameter type and callers update.
8043
8044 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8045
8046         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8047         set_gdbarch_wchar_bit.
8048         * arm-tdep.c (arm_gdbarch_init): Likewise.
8049
8050 2017-04-25  Pedro Alves  <palves@redhat.com>
8051
8052         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8053         (BothAreRelocatable, memcopy, memmove): Don't define.
8054         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8055         macros.
8056
8057 2017-04-25  Pedro Alves  <palves@redhat.com>
8058
8059         * common/common-defs.h: Include "common/poison.h".
8060         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8061         and adjust.
8062         * common/poison.h: New file.
8063         * common/traits.h: Include <type_traits>.
8064         (Not, Or, Requires): New, moved from common/function-view.h.
8065
8066 2017-04-25  Pedro Alves  <palves@redhat.com>
8067
8068         * breakpoint.h (struct breakpoint): In-class initialize all
8069         fields.  Make boolean fields "bool".
8070         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8071         memset call and initializations no longer necessary.
8072
8073 2017-04-25  Pedro Alves  <palves@redhat.com>
8074
8075         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8076         reference.
8077         (pt_btrace_insn): New function.
8078         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8079
8080 2017-04-25  Pedro Alves  <palves@redhat.com>
8081
8082         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8083         "base" field and inherit from "bp_location" instead.  Add
8084         non-default ctor.
8085         (allocate_location_exception): Use new non-default ctor.
8086         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8087         (init_bp_location): Convert to ...
8088         (bp_location::bp_location): ... this new ctor, and remove memset
8089         call.
8090         (base_breakpoint_allocate_location): Use the new non-default ctor.
8091         * breakpoint.h (bp_location): Now a class.  Declare default and
8092         non-default ctors.  In-class initialize all members.
8093         (init_bp_location): Remove declaration.
8094
8095 2017-04-25  Pedro Alves  <palves@redhat.com>
8096
8097         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8098         assignment operator.
8099
8100 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8101
8102         * doublest.c (convert_doublest_to_floatformat): Call
8103         floatformat_totalsize_bytes.
8104
8105 2017-04-22  Tom Tromey  <tom@tromey.com>
8106
8107         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8108         ui_out_emit_list.
8109         * stack.c (print_frame): Use ui_out_emit_list.
8110         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8111         ui_out_emit_list.
8112         * mi/mi-main.c (print_one_inferior)
8113         (mi_cmd_data_list_register_names)
8114         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8115         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8116         ui_out_emit_list.
8117         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8118         (mi_output_solib_attribs): Use ui_out_emit_list,
8119         ui_out_emit_tuple.
8120         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8121         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8122         (mi_cmd_stack_list_args, list_args_or_locals): Use
8123         ui_out_emit_list.
8124         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8125         * breakpoint.c (print_solib_event, output_thread_groups): Use
8126         ui_out_emit_list.
8127
8128 2017-04-22  Tom Tromey  <tom@tromey.com>
8129
8130         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8131         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8132         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8133
8134 2017-04-22  Tom Tromey  <tom@tromey.com>
8135
8136         * tracepoint.c (tvariables_info_1)
8137         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8138
8139 2017-04-22  Tom Tromey  <tom@tromey.com>
8140
8141         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8142         annotate_arg_emitter.
8143         * breakpoint.c (print_mention_watchpoint)
8144         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8145         * annotate.h (struct annotate_arg_emitter): New.
8146
8147 2017-04-22  Tom Tromey  <tom@tromey.com>
8148
8149         * record-btrace.c (record_btrace_insn_history)
8150         (record_btrace_insn_history_range, record_btrace_call_history)
8151         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8152         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8153         ui_out_emit_tuple.
8154         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8155         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8156         * skip.c (skip_info): Use ui_out_emit_tuple.
8157         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8158         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8159         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8160         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8161         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8162         ui_out_emit_tuple.
8163         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8164         (output_register, mi_cmd_data_read_memory)
8165         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8166         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8167         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8168         Use ui_out_emit_tuple.
8169         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8170         ui_out_emit_tuple.
8171         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8172         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8173         * linux-thread-db.c (info_auto_load_libthread_db): Use
8174         ui_out_emit_tuple.
8175         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8176         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8177         * disasm.c (do_mixed_source_and_assembly_deprecated)
8178         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8179         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8180         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8181         * breakpoint.c (print_one_breakpoint_location)
8182         (print_one_breakpoint): Use ui_out_emit_tuple.
8183         * auto-load.c (print_script, info_auto_load_cmd): Use
8184         ui_out_emit_tuple.
8185         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8186
8187 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8188
8189         * thread.c (print_thread_info_1): Remove dead code.
8190
8191 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8192
8193         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8194         GDB_SELF_TEST.
8195         * arm-tdep.c (selftests::arm_record_test): Likewise.
8196
8197 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8198
8199         * regcache.c (regcache_restore): Remove argument 2.  Replace
8200         argument 3 with regcache.  Get register status from
8201         src->register_status and get register contents from
8202         register_buffer (src, regnum).
8203         (regcache_cpy): Update.
8204
8205 2017-04-19  Pedro Alves  <palves@redhat.com>
8206
8207         * gdbthread.h (thread): Add missing closing parenthesis in
8208         comment.
8209
8210 2017-04-19  Pedro Alves  <palves@redhat.com>
8211
8212         * common/refcounted-object.h: New file.
8213         * gdbthread.h: Include "common/refcounted-object.h".
8214         (thread_info): Inherit from refcounted_object and add comments.
8215         (thread_info::incref, thread_info::decref)
8216         (thread_info::m_refcount): Delete.
8217         (thread_info::deletable): Use the refcounted_object::refcount()
8218         method.
8219         * inferior.c (current_inferior_): Add comment.
8220         (set_current_inferior): Increment/decrement refcounts.
8221         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8222         not-deletable instead of comparing with the current inferior.
8223         (initialize_inferiors): Increment the initial inferior's refcount.
8224         * inferior.h (struct inferior): Forward declare.
8225         Include "common/refcounted-object.h".
8226         (current_inferior, set_current_inferior): Move declaration to
8227         before struct inferior's definition, and fix comment.
8228         (inferior): Inherit from refcounted_object.  Add comments.
8229         * thread.c (switch_to_thread_no_regs): Reference the thread's
8230         inferior pointer directly instead of doing a ptid lookup.
8231         (switch_to_no_thread): New function.
8232         (switch_to_thread(thread_info *)): New function, factored out
8233         from ...
8234         (switch_to_thread(ptid_t)): ... this.
8235         (restore_current_thread): Delete.
8236         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8237         fields, and add 'inf' field.
8238         (do_restore_current_thread_cleanup): Check whether old->inf is
8239         alive instead of looking up an inferior by ptid.  Use
8240         switch_to_thread and switch_to_no_thread.
8241         (restore_current_thread_cleanup_dtor): Use old->inf directly
8242         instead of lookup up an inferior by id.  Decref the inferior.
8243         Don't restore 'removable'.
8244         (make_cleanup_restore_current_thread): Same the inferior pointer
8245         in old, instead of the inferior number.  Incref the inferior.
8246         Don't save/clear 'removable'.
8247
8248 2017-04-19  Pedro Alves  <palves@redhat.com>
8249
8250         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8251         unittests/scoped_restore-selftests.c.
8252         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8253         * common/scoped_restore.h (scoped_restore_base): Make "class".
8254         (scoped_restore_base::release): New public method.
8255         (scoped_restore_base::scoped_restore_base): New protected ctor.
8256         (scoped_restore_base::m_saved_var): New protected field.
8257         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8258         scoped_restore_base base class instead of m_saved_var directly.
8259         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8260         (scoped_restore_tmpl::scoped_restore_tmpl(const
8261         scoped_restore_tmpl<T>&)): Likewise.
8262         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8263         method.
8264         (scoped_restore_tmpl::saved_var): New method.
8265         (scoped_restore_tmpl::m_saved_var): Delete.
8266         * inferior.h (inferior::detaching): Now a bool.
8267         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8268         cleanup.
8269         * unittests/scoped_restore-selftests.c: New file.
8270
8271 2017-04-19  Pedro Alves  <palves@redhat.com>
8272
8273         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8274         Re-sort in alphabetic order.
8275
8276 2017-04-18  Pedro Alves  <palves@redhat.com>
8277
8278         * xml-support.c (obstack_xml_printf): Delete.
8279         * xml-support.h (obstack_xml_printf): Delete.
8280
8281 2017-04-18  Pedro Alves  <palves@redhat.com>
8282
8283         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8284         vdebug, verror, body_text, start_element, end_element, name,
8285         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8286         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8287         is_xinclude>: Make private and add m_ prefix.
8288         (gdb_xml_parser::body_text): New method, based on ...
8289         (gdb_xml_body_text): ... this.  Adjust.
8290         (gdb_xml_parser::vdebug): New method, based on ...
8291         (gdb_xml_debug): ... this.  Adjust.
8292         (gdb_xml_parser::verror): New method, based on ...
8293         (gdb_xml_error): ... this.  Adjust.
8294         (gdb_xml_parser::start_element): New method, based on ...
8295         (gdb_xml_start_element): ... this.  Adjust.
8296         (gdb_xml_start_element_wrapper): Defer to
8297         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8298         (gdb_xml_parser::end_element): New method, based on ...
8299         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8300         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8301         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8302         (gdb_xml_parser::use_dtd): New method, based on ...
8303         (gdb_xml_use_dtd): ... this.  Adjust.
8304         (gdb_xml_parser::parse): New method, based on ...
8305         (gdb_xml_parse): ... this.  Adjust.
8306         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8307         (xinclude_start_include): Adjust to call the parser's name method.
8308         (xml_xinclude_default, xml_xinclude_start_doctype)
8309         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8310         method.
8311         (xml_process_xincludes): Adjust to call parser methods.
8312         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8313         declarations.
8314
8315 2017-04-18  Pedro Alves  <palves@redhat.com>
8316
8317         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8318         gdb::optional<std::string>.
8319         * xml-support.c: Include <string>.
8320         (scope_level::scope_level(scope_level &&))
8321         (scope_level::~scope_level): Delete.
8322         (scope_level::body): Now a std::string.
8323         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8324         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8325         parameter.
8326         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8327         (xinclude_parsing_data::output): Now a std::string reference.
8328         (xinclude_start_include): Adjust.
8329         (xml_xinclude_default): Adjust.
8330         (xml_process_xincludes): Add 'output' parameter, and return bool.
8331         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8332         and return bool.
8333         * xml-tdesc.c: Include <unordered_map> and <string>.
8334         (tdesc_xml_cache): Delete.
8335         (tdesc_xml_cache_s): Delete.
8336         (xml_cache): Now an std::unordered_map.
8337         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8338         (target_fetch_description_xml): Change return type to
8339         gdb::optional<std::string>, and adjust.
8340         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8341         (target_fetch_description_xml): Change return type to
8342         gdb::optional<std::string>.
8343
8344 2017-04-18  Pedro Alves  <palves@redhat.com>
8345
8346         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8347         unittests/optional-selftests.c.
8348         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8349         * unittests/optional-selftests.c: New file.
8350         * unittests/optional/assignment/1.cc: New file.
8351         * unittests/optional/assignment/2.cc: New file.
8352         * unittests/optional/assignment/3.cc: New file.
8353         * unittests/optional/assignment/4.cc: New file.
8354         * unittests/optional/assignment/5.cc: New file.
8355         * unittests/optional/assignment/6.cc: New file.
8356         * unittests/optional/assignment/7.cc: New file.
8357         * unittests/optional/cons/copy.cc: New file.
8358         * unittests/optional/cons/default.cc: New file.
8359         * unittests/optional/cons/move.cc: New file.
8360         * unittests/optional/cons/value.cc: New file.
8361         * unittests/optional/in_place.cc: New file.
8362         * unittests/optional/observers/1.cc: New file.
8363         * unittests/optional/observers/2.cc: New file.
8364
8365 2017-04-18  Pedro Alves  <palves@redhat.com>
8366
8367         * common/gdb_optional.h: Include common/traits.h.
8368         (in_place_t): New type.
8369         (in_place): New constexpr variable.
8370         (optional::optional): Remove member initialization of
8371         m_instantiated.
8372         (optional::optional(in_place_t...)): New constructor.
8373         (optional::~optional): Use reset.
8374         (optional::optional(const optional&)): New.
8375         (optional::optional(const optional&&)): New.
8376         (optional::optional(T &)): New.
8377         (optional::optional(T &&)): New.
8378         (operator::operator=(const optional &)): New.
8379         (operator::operator=(optional &&)): New.
8380         (operator::operator= (const T &))
8381         (operator::operator= (T &&))
8382         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8383         (operator::reset): New.
8384         (operator::m_instantiated):: Add in-class initializer.
8385         * common/traits.h: Include <type_traits>.
8386         (struct And): New types.
8387
8388 2017-04-18  Pedro Alves  <palves@redhat.com>
8389
8390         * xml-support.c: Include <vector>.
8391         (scope_level::scope_level(const gdb_xml_element *))
8392         (scope_level::scope_level(scope_level&&)): New.
8393         (scope_level::~scope_level): New.
8394         (scope_level_s): Delete.
8395         (gdb_xml_parser::scopes): Now a std::vector.
8396         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8397         Use std::vector.
8398         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8399         scope cleanup code.
8400         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8401         of the scopes member.  Use std::vector::emplace_back.
8402
8403 2017-04-18  Pedro Alves  <palves@redhat.com>
8404
8405         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8406         a bool.
8407         (gdb_xml_end_element): Change type of first parameter.
8408         (gdb_xml_cleanup): Rename to ...
8409         (gdb_xml_parser::~gdb_xml_parser): ... this.
8410         (gdb_xml_create_parser_and_cleanup): Delete with ...
8411         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8412         to this new ctor.
8413         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8414         using gdb_xml_create_parser_and_cleanup.
8415         (xinclude_parsing_data): Add ctor/dtor.
8416         (xml_xinclude_cleanup): Delete.
8417         (xml_process_xincludes): Create a local xinclude_parsing_data
8418         instead of heap-allocating one.  Create a local gdb_xml_parser
8419         instead of heap-allocating one with
8420         gdb_xml_create_parser_and_cleanup.
8421
8422 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8423
8424         PR threads/20743
8425         * fbsd-nat.c (resume_one_thread_cb): Remove.
8426         (resume_all_threads_cb): Remove.
8427         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8428         iterate_over_threads.
8429
8430 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8431
8432         * NEWS: Create a new section for the next release branch.
8433         Rename the section of the current branch, now that it has
8434         been cut.
8435
8436 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8437
8438         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8439         * version.in: Bump version to 8.0.50.DATE-git.
8440
8441 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8442
8443         PR gdb/21385
8444         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8445         independently of the host, and fix build breakage on Cygwin.
8446
8447 2017-04-13  Pedro Alves  <palves@redhat.com>
8448
8449         * inferior.c (free_inferior): Convert to ...
8450         (inferior::~inferior): ... this dtor.
8451         (inferior::inferior): New ctor, factored out from ...
8452         (add_inferior_silent): ... here.  Allocate the inferior with a new
8453         expression.
8454         (delete_inferior): Call delete instead of free_inferior.
8455         * inferior.h (gdb_environ, continuation): Forward declare.
8456         (inferior): Now a class.  Add in-class initialization to all
8457         members.  Make boolean fields bool, except 'detaching'.
8458         (inferior::inferior): New explicit ctor.
8459         (inferior::~inferior): New.
8460
8461 2017-04-13  Pedro Alves  <palves@redhat.com>
8462
8463         * inferior.c (init_inferior_list): Delete.
8464         * inferior.h (init_inferior_list): Delete.
8465
8466 2017-04-13  Pedro Alves  <palves@redhat.com>
8467
8468         PR threads/13217
8469         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8470         (top level): Call it twice, with different thread sets.
8471
8472 2017-04-13  Pedro Alves  <palves@redhat.com>
8473
8474         * thread.c: Include <algorithm>.
8475         (thread_array_cleanup): Delete.
8476         (scoped_inc_dec_ref): New class.
8477         (live_threads_count): New function.
8478         (set_thread_refcount): Delete.
8479         (tp_array_compar_ascending): Now a bool.
8480         (tp_array_compar): Convert to a std::sort comparison function.
8481         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8482         and live_threads_count.
8483
8484 2017-04-13  Pedro Alves  <palves@redhat.com>
8485
8486         * infrun.c (follow_fork_inferior): Also switch the current
8487         inferior.
8488
8489 2017-04-13  Pedro Alves  <palves@redhat.com>
8490
8491         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8492         before calling create_internal_breakpoint.
8493
8494 2017-04-13  Pedro Alves  <palves@redhat.com>
8495
8496         * fork-child.c (execv_argv): New class.
8497         (breakup_args): Refactored as ...
8498         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8499         Copy arguments to storage and replace separators with NULL
8500         terminators in place.
8501         (escape_bang_in_quoted_argument): Adjust to return bool.
8502         (execv_argv::execv_argv): New ctor.
8503         (execv_argv::init_for_shell): New method, factored out from
8504         fork_inferior.  Don't strdup strings into the vector.
8505         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8506         Remove free_vector_argv call.
8507
8508 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8509
8510         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8511         tdep->rx_psw_type.
8512
8513 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8514
8515         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8516         * rx-tdep.c (rx_gdbarch_init): Likewise.
8517
8518 2017-04-13  Pedro Alves  <palves@redhat.com>
8519
8520         * breakpoint.h (struct breakpoint): Reindent.
8521
8522 2017-04-13  Pedro Alves  <palves@redhat.com>
8523
8524         * breakpoint.c (bp_location): Rename to ...
8525         (bp_locations): ... this.  All references updated.
8526         (bp_location_count): Rename to ...
8527         (bp_locations_count): ... this.  All references updated.
8528         (bp_location_placed_address_before_address_max): Rename to ...
8529         (bp_locations_placed_address_before_address_max): ... this.  All
8530         references updated.
8531         (bp_location_shadow_len_after_address_max): Rename to ...
8532         (bp_locations_shadow_len_after_address_max): ... this.  All
8533         references updated.
8534         (bp_location_compare_addrs): Rename to ...
8535         (bp_locations_compare_addrs): ... this.  All references updated.
8536         (bp_location_compare):Rename to ...
8537         (bp_locations_compare): ... this.  All references updated.
8538         (bp_location_target_extensions_update): Rename to ...
8539         (bp_locations_target_extensions_update): ... this.  All references
8540         updated.
8541
8542 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8543
8544         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8545         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8546         'sgtty.h'.
8547         * common/gdb_termios.h: New file, with parts of "terminal.h".
8548         * inflow.c: Include "gdb_termios.h".
8549         * ser-unix.c: Include "gdb_termios.h".
8550         * terminal.h: Move terminal-related defines to
8551         "common/gdb_termios.h".
8552
8553 2017-04-12  Tom Tromey  <tom@tromey.com>
8554
8555         * probe.c (parse_probes): Update.
8556         * location.h (delete_event_location): Don't declare.
8557         (event_location_deleter::operator()): Update.
8558         * location.c (event_location_deleter::operator()): Rename from
8559         delete_event_location.
8560         * linespec.h (linespec_result) <location>: Change type to
8561         event_location_up.
8562         * linespec.c (canonicalize_linespec, event_location_to_sals)
8563         (decode_objc): Update.
8564         (linespec_result): Don't call delete_event_location.
8565         * breakpoint.c (create_breakpoints_sal)
8566         (bkpt_probe_create_sals_from_location)
8567         (strace_marker_create_sals_from_location): Update.
8568
8569 2017-04-12  Tom Tromey  <tom@tromey.com>
8570
8571         * linespec.h (struct linespec_result): Add constructor and
8572         destructor.
8573         (init_linespec_result, destroy_linespec_result)
8574         (make_cleanup_destroy_linespec_result): Don't declare.
8575         * linespec.c (init_linespec_result): Remove.
8576         (linespec_result::~linespec_result): Rename from
8577         destroy_linespec_result.  Update.
8578         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8579         Remove.
8580         * breakpoint.c (create_breakpoint, break_range_command)
8581         (decode_location_default): Update.
8582         * ax-gdb.c (agent_command_1): Update.
8583
8584 2017-04-12  Tom Tromey  <tom@tromey.com>
8585
8586         * remote.c (remote_download_tracepoint): Update.
8587         * python/py-breakpoint.c (bppy_get_location): Update.
8588         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8589         (gdbscm_breakpoint_location): Update.
8590         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8591         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8592         Change type to event_location_up.
8593         * breakpoint.c (create_overlay_event_breakpoint)
8594         (create_longjmp_master_breakpoint)
8595         (create_std_terminate_master_breakpoint)
8596         (create_exception_master_breakpoint)
8597         (breakpoint_event_location_empty_p, print_breakpoint_location)
8598         (print_one_breakpoint_location, create_thread_event_breakpoint)
8599         (init_breakpoint_sal, create_breakpoint)
8600         (print_recreate_ranged_breakpoint, break_range_command)
8601         (init_ada_exception_breakpoint, say_where): Update.
8602         (base_breakpoint_dtor): Don't call delete_event_location.
8603         (bkpt_print_recreate, tracepoint_print_recreate)
8604         (dprintf_print_recreate, update_static_tracepoint)
8605         (breakpoint_re_set_default): Update.
8606
8607 2017-04-12  Tom Tromey  <tom@tromey.com>
8608
8609         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8610         type of "to_do".  Update.
8611         (compute_stack_depth): Use std::vector.
8612
8613 2017-04-12  Tom Tromey  <tom@tromey.com>
8614
8615         * printcmd.c (find_instruction_backward): Use std::vector.
8616
8617 2017-04-12  Tom Tromey  <tom@tromey.com>
8618
8619         * symfile.c (objfilep): Remove typedef.
8620         (reread_symbols): Use a std::vector.
8621
8622 2017-04-12  Tom Tromey  <tom@tromey.com>
8623
8624         * mi/mi-main.c (exec_direction_forward): Remove.
8625         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8626         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8627         scoped_restore.
8628         * guile/guile.c (guile_repl_command, guile_command)
8629         (gdbscm_execute_gdb_command): Use scoped_restore.
8630         * go-exp.y (go_parse): Use scoped_restore.
8631         * d-exp.y (d_parse): Use scoped_restore.
8632         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8633         * c-exp.y (c_parse): Use scoped_restore.
8634
8635 2017-04-12  Tom Tromey  <tom@tromey.com>
8636
8637         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8638         (mi_parse): Update return type.
8639         (mi_parse_free): Remove.
8640         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8641         (mi_parse::~mi_parse): Rename from mi_parse_free.
8642         (mi_parse_cleanup): Remove.
8643         (mi_parse): Return a unique_ptr.  Use new.
8644         * mi/mi-main.c (mi_execute_command): Update.
8645
8646 2017-04-12  Tom Tromey  <tom@tromey.com>
8647
8648         * location.c (explicit_location_lex_one): Return a
8649         unique_xmalloc_ptr.
8650         (string_to_explicit_location): Update.  Remove cleanups.
8651
8652 2017-04-12  Tom Tromey  <tom@tromey.com>
8653
8654         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8655         (compare_value_and_voffset): Change type.  Update.
8656         (compute_vtable_size): Change type of "offset_vec".
8657         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8658         (gnuv3_get_typeid): Remove extraneous declaration.
8659
8660 2017-04-12  Tom Tromey  <tom@tromey.com>
8661
8662         * charset.h (wchar_iterator): Fix comment.
8663
8664 2017-04-12  Tom Tromey  <tom@tromey.com>
8665
8666         * charset.c (iconv_wrapper): New class.
8667         (cleanup_iconv): Remove.
8668         (convert_between_encodings): Use it.
8669
8670 2017-04-12  Tom Tromey  <tom@tromey.com>
8671
8672         * symfile.h (increment_reading_symtab): Update type.
8673         * symfile.c (decrement_reading_symtab): Remove.
8674         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8675         * psymtab.c (psymtab_to_symtab): Update.
8676         * dwarf2read.c (dw2_instantiate_symtab): Update.
8677
8678 2017-04-12  Tom Tromey  <tom@tromey.com>
8679
8680         * jit.c (struct jit_reader): Declare separately.  Add constructor
8681         and destructor.  Change type of "handle".
8682         (loaded_jit_reader): Define separately.
8683         (jit_reader_load): Update.  New "new".
8684         (jit_reader_unload_command): Use "delete".
8685         * gdb-dlfcn.h (struct dlclose_deleter): New.
8686         (gdb_dlhandle_up): New typedef.
8687         (gdb_dlopen, gdb_dlsym): Update types.
8688         (gdb_dlclose): Remove.
8689         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8690         (gdb_dlsym): Change type of "handle".
8691         (make_cleanup_dlclose): Remove.
8692         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8693         * compile/compile-c-support.c (load_libcc): Update.
8694
8695 2017-04-12  Tom Tromey  <tom@tromey.com>
8696
8697         * symtab.h (find_pcs_for_symtab_line): Change return type.
8698         * symtab.c (find_pcs_for_symtab_line): Change return type.
8699         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8700         type of "vec".  Update.
8701         (ltpy_get_pcs_for_line): Update.
8702         * linespec.c (decode_digits_ordinary): Update.
8703
8704 2017-04-12  Tom Tromey  <tom@tromey.com>
8705
8706         * tracepoint.c (actions_command): Update.
8707         * python/python.c (python_command, python_interactive_command):
8708         Update.
8709         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8710         * guile/guile.c (guile_command): Update.
8711         * defs.h (read_command_lines, read_command_lines_1): Return
8712         command_line_up.
8713         (command_lines_deleter): New struct.
8714         (command_line_up): New typedef.
8715         * compile/compile.c (compile_code_command)
8716         (compile_print_command): Update.
8717         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8718         command_line_up.
8719         (make_cleanup_free_command_lines): Remove.
8720         * cli/cli-script.c (get_command_line, read_command_lines_1)
8721         (copy_command_lines): Return command_line_up.
8722         (while_command, if_command, read_command_lines, define_command)
8723         (document_command): Update.
8724         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8725         Remove.
8726         * breakpoint.h (breakpoint_set_commands): Change type of
8727         "commands".
8728         * breakpoint.c (breakpoint_set_commands): Change type of
8729         "commands".  Update.
8730         (do_map_commands_command, update_dprintf_command_list)
8731         (create_tracepoint_from_upload): Update.
8732
8733 2017-04-12  Tom Tromey  <tom@tromey.com>
8734
8735         * tracepoint.c (scope_info): Update.
8736         * spu-tdep.c (spu_catch_start): Update.
8737         * python/python.c (gdbpy_decode_line): Update.
8738         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8739         * python/py-breakpoint.c (bppy_init): Update.
8740         * probe.c (parse_probes): Update.
8741         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8742         * location.h (event_location_deleter): New struct.
8743         (event_location_up): New typedef.
8744         (new_linespec_location, new_address_location, new_probe_location)
8745         (new_explicit_location, copy_event_location)
8746         (string_to_event_location, string_to_event_location_basic)
8747         (string_to_explicit_location): Update return type.
8748         (make_cleanup_delete_event_location): Remove.
8749         * location.c (new_linespec_location, new_address_location)
8750         (new_probe_location, new_explicit_location, copy_event_location):
8751         Return event_location_up.
8752         (delete_event_location_cleanup)
8753         (make_cleanup_delete_event_location): Remove.
8754         (string_to_explicit_location, string_to_event_location_basic)
8755         (string_to_event_location): Return event_location_up.
8756         * linespec.c (canonicalize_linespec, event_location_to_sals)
8757         (decode_line_with_current_source)
8758         (decode_line_with_last_displayed, decode_objc): Update.
8759         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8760         * completer.c (location_completer): Update.
8761         * cli/cli-cmds.c (edit_command, list_command): Update.
8762         * breakpoint.c (create_overlay_event_breakpoint)
8763         (create_longjmp_master_breakpoint)
8764         (create_std_terminate_master_breakpoint)
8765         (create_exception_master_breakpoint)
8766         (create_thread_event_breakpoint): Update.
8767         (init_breakpoint_sal): Update.  Remove some dead code.
8768         (create_breakpoint_sal): Change type of "location".  Update.
8769         (create_breakpoints_sal, create_breakpoint, break_command_1)
8770         (dprintf_command, break_range_command, until_break_command)
8771         (init_ada_exception_breakpoint)
8772         (strace_marker_create_sals_from_location)
8773         (update_static_tracepoint, trace_command, ftrace_command)
8774         (strace_command, create_tracepoint_from_upload): Update.
8775         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8776         * ax-gdb.c (agent_command_1): Update.
8777
8778 2017-04-12  Pedro Alves  <palves@redhat.com>
8779
8780         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8781         * configure.tgt: Handle i[34567]86-*-go32* and
8782         i[34567]86-*-msdosdjgpp*.
8783         * i386-tdep.c (i386_svr4_reg_to_regnum):
8784         Make extern.
8785         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8786         i386-go32-tdep.c.
8787         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8788         * i386-go32-tdep.c: New file.
8789         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8790         declarations.
8791
8792 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8793
8794         * aix-thread.c (pd_status2str): Change return type to const char *.
8795
8796 2017-04-12  Pedro Alves  <palves@redhat.com>
8797
8798         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8799         calls to set_gdbarch_gnu_triplet_regexp.
8800
8801 2017-04-12  Pedro Alves  <palves@redhat.com>
8802
8803         PR gdb/21323
8804         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8805         New enum value.
8806         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8807         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8808         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8809         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8810         * gdbarch.h, gdbarch.c: Regenerate.
8811         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8812         gdbarch_wchar_bit and gdbarch_wchar_signed.
8813         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8814         * arm-tdep.c (arm_gdbarch_init): Likewise.
8815         * avr-tdep.c (avr_gdbarch_init): Likewise.
8816         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8817         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8818         * i386-tdep.c (i386_go32_init_abi): Likewise.
8819         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8820         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8821         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8822         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8823         * sh-tdep.c (sh_gdbarch_init): Likewise.
8824         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8825         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8826         * windows-tdep.c (windows_init_abi): Likewise.
8827         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8828
8829 2017-04-12  Pedro Alves  <palves@redhat.com>
8830
8831         PR c++/21323
8832         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8833         cplus_primitive_type_char32_t>: New enum values.
8834         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8835         and cplus_primitive_type_char32_t.
8836         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8837         32, use the archtecture's built-in type for char16_t and char32_t,
8838         respectively.  Otherwise, fallback to init_integer_type as before,
8839         but make the type unsigned, and issue a complaint.
8840         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8841
8842 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8843
8844         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8845         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8846
8847 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8848
8849         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8850         'const char *'.
8851
8852 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8853
8854         * common/common-utils.c (free_vector_argv): New function.
8855         * common/common-utils.h: Include <vector>.
8856         (free_vector_argv): New prototype.
8857         * darwin-nat.c (darwin_create_inferior): Rewrite function
8858         prototype in order to constify "exec_file" and accept a
8859         "std::string" for "allargs".
8860         * fork-child.c: Include <vector>.
8861         (breakup_args): Rewrite function, using C++.
8862         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8863         and accept "std::string" for "allargs".  Update the code to
8864         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8865         and "execvp".
8866         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8867         order to constify "exec_file" and accept a "std::string" for
8868         "allargs".
8869         * go32-nat.c (go32_create_inferior): Likewise.
8870         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8871         * infcmd.c (run_command_1): Constify "exec_file".  Use
8872         "std::string" for inferior arguments.
8873         * inferior.h (fork_inferior): Update prototype.
8874         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8875         prototype in order to constify "exec_file" and accept a
8876         "std::string" for "allargs".
8877         * nto-procfs.c (procfs_create_inferior): Likewise.
8878         * procfs.c (procfs_create_inferior): Likewise.
8879         * remote-sim.c (gdbsim_create_inferior): Likewise.
8880         * remote.c (extended_remote_run): Update code to accept
8881         "std::string" as argument.
8882         (extended_remote_create_inferior): Rewrite function prototype in
8883         order to constify "exec_file" and accept a "std::string" for
8884         "allargs".
8885         * rs6000-nat.c (super_create_inferior): Likewise.
8886         (rs6000_create_inferior): Likewise.
8887         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8888         * windows-nat.c (windows_create_inferior): Likewise.
8889
8890 2017-04-11  Pedro Alves  <palves@redhat.com>
8891
8892         * thread.c: Fix whitespace throughout.
8893
8894 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8895
8896         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8897
8898 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8899
8900         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8901
8902 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8903
8904         PR gdb/21364
8905         * osdata.c (info_osdata): Check if 'type' is an empty string
8906         instead of NULL.
8907
8908 2017-04-10  Pedro Alves  <palves@redhat.com>
8909
8910         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8911         (ptid_to_global_thread_id, in_thread_list)
8912         (do_captured_list_thread_ids, set_resumed, set_running)
8913         (set_executing, set_stop_requested, finish_thread_state)
8914         (validate_registers_access, can_access_registers_ptid)
8915         (print_thread_info_1, switch_to_thread)
8916         (do_restore_current_thread_cleanup)
8917         (make_cleanup_restore_current_thread, thread_command)
8918         (thread_name_command): Use operator== instead of ptid_equal.
8919
8920 2017-04-10  Pedro Alves  <palves@redhat.com>
8921
8922         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8923         (current_thread_cleanup_chain): Delete.
8924         (restore_current_thread_cleanup_dtor)
8925         (make_cleanup_restore_current_thread): Remove references to
8926         current_thread_cleanup_chain.
8927
8928 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8929
8930         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8931         REG_UNKNOWN.
8932
8933 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8934
8935         PR gdb/19942
8936         * gdbthread.h (thread_info::deletable): New method.
8937         (thread_info::incref): New method.
8938         (thread_info::decref): New method.
8939         (thread_info::refcount): Move it to private.
8940         * infrun.c (save_stop_context): Call inc_refcount.
8941         (release_stop_context_cleanup): Likewise.
8942         * thread.c (set_thread_exited): New function.
8943         (init_thread_list): Delete "tp" only it is deletable, otherwise
8944         call set_thread_exited.
8945         (delete_thread_1): Call set_thread_exited.
8946         (current_thread_cleanup) <inferior_pid>: Remove.
8947         <thread>: New field.
8948         (restore_current_thread_ptid_changed): Removed.
8949         (do_restore_current_thread_cleanup): Adjust.
8950         (restore_current_thread_cleanup_dtor): Don't call
8951         find_thread_ptid.
8952         (set_thread_refcount): Use dec_refcount.
8953         (make_cleanup_restore_current_thread): Adjust.
8954         (thread_apply_all_command): Call inc_refcount.
8955         (_initialize_thread): Don't call
8956         observer_attach_thread_ptid_changed.
8957
8958 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8959
8960         * thread.c (delete_thread_1): Hoist code on marking thread as
8961         exited.
8962
8963 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8964
8965         * windows-nat.c (windows_detach): Initialize ptid with
8966         minus_one_ptid.
8967
8968 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8969
8970         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8971
8972 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8973
8974         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8975         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8976         (bfin_pseudo_register_write): Likewise
8977
8978 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8979
8980         * common/ptid.h (struct ptid): Change to...
8981         (class ptid_t): ... this.
8982         <ptid_t>: New constructors.
8983         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8984         matches>: New methods.
8985         <make_null, make_minus_one>: New static methods.
8986         <pid>: Rename to...
8987         <m_pid>: ...this.
8988         <lwp>: Rename to...
8989         <m_lwp>: ...this.
8990         <tid>: Rename to...
8991         <m_tid>: ...this.
8992         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8993         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8994         as references, move comment to class ptid_t.
8995         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8996         ptid_t static methods.
8997         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8998         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8999         Take ptid arguments as references, implement using ptid_t methods.
9000         * unittests/ptid-selftests.c: New file.
9001         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9002         unittests/ptid-selftests.c.
9003         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9004
9005 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9006
9007         * python/python.c (python_run_simple_file): Cast mode literal to
9008         non-const char pointer as expected by PyFile_FromString.
9009
9010 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
9011
9012         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9013         minus_one_ptid and null_ptid.
9014
9015 2017-04-05  Pedro Alves  <palves@redhat.com>
9016
9017         * warning.m4 (build_warnings): Remove -Wno-write-strings.
9018         * configure: Regenerate.
9019
9020 2017-04-05  Pedro Alves  <palves@redhat.com>
9021
9022         * ada-exp.y (yyerror): Constify.
9023         * ada-lang.c (bound_name, get_selections)
9024         (ada_variant_discrim_type)
9025         (ada_variant_discrim_name, ada_value_struct_elt)
9026         (ada_lookup_struct_elt_type, is_unchecked_variant)
9027         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9028         (catch_ada_exception_command_split)
9029         (catch_ada_assert_command_split, catch_assert_command)
9030         (ada_op_name): Constify.
9031         * ada-lang.h (ada_yyerror, get_selections)
9032         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9033         * arc-tdep.c (arc_print_frame_cache): Constify.
9034         * arm-tdep.c (arm_skip_stub): Constify.
9035         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9036         (gen_aggregate_elt_ref): Constify.
9037         * bcache.c (print_bcache_statistics): Constify.
9038         * bcache.h (print_bcache_statistics): Constify.
9039         * break-catch-throw.c (catch_exception_command_1):
9040         * breakpoint.c (struct ep_type_description::description):
9041         Constify.
9042         (add_solib_catchpoint): Constify.
9043         (catch_fork_command_1): Add cast.
9044         (add_catch_command): Constify.
9045         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9046         Constify.
9047         * bsd-uthread.c (bsd_uthread_state): Constify.
9048         * buildsym.c (patch_subfile_names): Constify.
9049         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9050         Constify.
9051         * c-exp.y (yyerror): Constify.
9052         (token::oper): Constify.
9053         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9054         * c-varobj.c (cplus_describe_child): Constify.
9055         * charset.c (find_charset_names): Add cast.
9056         (find_charset_names): Constify array and add const_cast.
9057         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9058         (edit_command): Constify.
9059         * cli/cli-decode.c (lookup_cmd): Constify.
9060         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9061         Constify.
9062         (struct dump_context): Constify.
9063         (add_dump_command, restore_command): Constify.
9064         * cli/cli-script.c (get_command_line): Constify.
9065         * cli/cli-script.h (get_command_line): Constify.
9066         * cli/cli-utils.c (check_for_argument): Constify.
9067         * cli/cli-utils.h (check_for_argument): Constify.
9068         * coff-pe-read.c (struct read_pe_section_data): Constify.
9069         * command.h (lookup_cmd): Constify.
9070         * common/print-utils.c (decimal2str): Constify.
9071         * completer.c (gdb_print_filename): Constify.
9072         * corefile.c (set_gnutarget): Constify.
9073         * cp-name-parser.y (yyerror): Constify.
9074         * cp-valprint.c (cp_print_class_member): Constify.
9075         * cris-tdep.c (cris_register_name, crisv32_register_name):
9076         Constify.
9077         * d-exp.y (yyerror): Constify.
9078         (struct token::oper): Constify.
9079         * d-lang.h (d_yyerror): Constify.
9080         * dbxread.c (struct header_file_location::name): Constify.
9081         (add_old_header_file, add_new_header_file, last_function_name)
9082         (dbx_next_symbol_text, add_bincl_to_list)
9083         (find_corresponding_bincl_psymtab, set_namestring)
9084         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9085         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9086         * defs.h (command_line_input, print_address_symbolic)
9087         (deprecated_readline_begin_hook): Constify.
9088         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9089         Constify.
9090         * event-top.c (handle_line_of_input): Constify and add cast.
9091         * exceptions.c (catch_errors): Constify.
9092         * exceptions.h (catch_errors): Constify.
9093         * expprint.c (print_subexp_standard, op_string, op_name)
9094         (op_name_standard, dump_raw_expression, dump_raw_expression):
9095         * expression.h (op_name, op_string, dump_raw_expression):
9096         Constify.
9097         * f-exp.y (yyerror): Constify.
9098         (struct token::oper): Constify.
9099         (struct f77_boolean_val::name): Constify.
9100         * f-lang.c (f_word_break_characters): Constify.
9101         * f-lang.h (f_yyerror): Constify.
9102         * fork-child.c (fork_inferior): Add cast.
9103         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9104         (new_variant): Constify.
9105         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9106         * gdbarch.c: Regenerate.
9107         * gdbcore.h (set_gnutarget): Constify.
9108         * go-exp.y (yyerror): Constify.
9109         (token::oper): Constify.
9110         * go-lang.h (go_yyerror): Constify.
9111         * go32-nat.c (go32_sysinfo): Constify.
9112         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9113         * guile/scm-cmd.c (cmdscm_function): Constify.
9114         * guile/scm-param.c (pascm_param_value): Constify.
9115         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9116         (h8300sx_register_name): Constify.
9117         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9118         Constify.
9119         * ia64-tdep.c (ia64_register_names): Constify.
9120         * infcmd.c (construct_inferior_arguments): Constify.
9121         (path_command, attach_post_wait): Constify.
9122         * language.c (show_range_command, show_case_command)
9123         (unk_lang_error): Constify.
9124         * language.h (language_defn::la_error)
9125         (language_defn::la_name_of_this): Constify.
9126         * linespec.c (decode_line_2): Constify.
9127         * linux-thread-db.c (thread_db_err_str): Constify.
9128         * lm32-tdep.c (lm32_register_name): Constify.
9129         * m2-exp.y (yyerror): Constify.
9130         * m2-lang.h (m2_yyerror): Constify.
9131         * m32r-tdep.c (m32r_register_names): Constify and make static.
9132         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9133         * m88k-tdep.c (m88k_register_name): Constify.
9134         * macroexp.c (appendmem): Constify.
9135         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9136         (upgrade_type, parse_external, parse_partial_symbols)
9137         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9138         (new_symbol): Constify.
9139         * memattr.c (mem_info_command): Constify.
9140         * mep-tdep.c (register_name_from_keyword): Constify.
9141         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9142         Constify.
9143         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9144         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9145         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9146         cast.
9147         (mi_execute_async_cli_command): Constify.
9148         * mips-tdep.c (mips_register_name): Constify.
9149         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9150         (am33_register_name, am33_2_register_name)
9151         * moxie-tdep.c (moxie_register_names): Constify.
9152         * nat/linux-osdata.c (osdata_type): Constify fields.
9153         * nto-tdep.c (nto_parse_redirection): Constify.
9154         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9155         (lookup_child_selector): Constify.
9156         (objc_methcall::name): Constify.
9157         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9158         (lookup_struct_typedef): Constify.
9159         * objfiles.c (pc_in_section): Constify.
9160         * objfiles.h (pc_in_section): Constify.
9161         * p-exp.y (struct token::oper): Constify.
9162         (yyerror): Constify.
9163         * p-lang.h (pascal_yyerror): Constify.
9164         * parser-defs.h (op_name_standard): Constify.
9165         (op_print::string): Constify.
9166         (exp_descriptor::op_name): Constify.
9167         * printcmd.c (print_address_symbolic): Constify.
9168         * psymtab.c (print_partial_symbols): Constify.
9169         * python/py-breakpoint.c (stop_func): Constify.
9170         (bppy_get_expression): Constify.
9171         * python/py-cmd.c (cmdpy_completer::name): Constify.
9172         (cmdpy_function): Constify.
9173         * python/py-event.c (evpy_add_attribute)
9174         (gdbpy_initialize_event_generic): Constify.
9175         * python/py-event.h (evpy_add_attribute)
9176         (gdbpy_initialize_event_generic): Constify.
9177         * python/py-evts.c (add_new_registry): Constify.
9178         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9179         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9180         * python/py-inferior.c (get_buffer): Add cast.
9181         * python/py-param.c (parm_constant::name): Constify.
9182         * python/py-unwind.c (fprint_frame_id): Constify.
9183         * python/python.c (gdbpy_parameter_value): Constify.
9184         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9185         * remote.c (memory_packet_config::name): Constify.
9186         (show_packet_config_cmd, remote_write_bytes)
9187         (remote_buffer_add_string):
9188         * reverse.c (exec_reverse_once): Constify.
9189         * rs6000-tdep.c (variant::name, variant::description): Constify.
9190         * rust-exp.y (rustyyerror): Constify.
9191         * rust-lang.c (rust_op_name): Constify.
9192         * rust-lang.h (rustyyerror): Constify.
9193         * serial.h (serial_ops::name): Constify.
9194         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9195         (sh_sh3e_register_name, sh_sh2e_register_name)
9196         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9197         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9198         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9199         (sh_sh4al_dsp_register_name): Constify.
9200         * sh64-tdep.c (sh64_register_name): Constify.
9201         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9202         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9203         * stabsread.c (patch_block_stabs, read_type_number)
9204         (ref_map::stabs, ref_add, process_reference)
9205         (symbol_reference_defined, define_symbol, define_symbol)
9206         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9207         (read_one_struct_field, read_struct_fields, read_baseclasses)
9208         (read_tilde_fields, read_struct_type, read_array_type)
9209         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9210         (read_huge_number, read_range_type, read_args, common_block_start)
9211         (find_name_end): Constify.
9212         * stabsread.h (common_block_start, define_symbol)
9213         (process_one_symbol, symbol_reference_defined, ref_add):
9214         * symfile.c (get_section_index, add_symbol_file_command):
9215         * symfile.h (get_section_index): Constify.
9216         * target-descriptions.c (tdesc_type::name): Constify.
9217         (tdesc_free_type): Add cast.
9218         * target.c (find_default_run_target):
9219         (add_deprecated_target_alias, find_default_run_target)
9220         (target_announce_detach): Constify.
9221         (do_option): Constify.
9222         * target.h (add_deprecated_target_alias): Constify.
9223         * thread.c (print_thread_info_1): Constify.
9224         * top.c (deprecated_readline_begin_hook, command_line_input):
9225         Constify.
9226         (init_main): Add casts.
9227         * top.h (handle_line_of_input): Constify.
9228         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9229         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9230         (tfind_command): Rename to ...
9231         (tfind_command_1): ... this and constify.
9232         (tfind_command): New function.
9233         (tfind_end_command, tfind_start_command): Adjust.
9234         (encode_source_string): Constify.
9235         * tracepoint.h (encode_source_string): Constify.
9236         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9237         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9238         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9239         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9240         * tui/tui-win.c (parse_scrolling_args): Constify.
9241         * tui/tui-windata.c (tui_erase_data_content): Constify.
9242         * tui/tui-windata.h (tui_erase_data_content): Constify.
9243         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9244         * tui/tui.c (tui_enable): Add cast.
9245         * utils.c (defaulted_query): Constify.
9246         (init_page_info): Add cast.
9247         (puts_debug, subset_compare): Constify.
9248         * utils.h (subset_compare): Constify.
9249         * varobj.c (varobj_format_string): Constify.
9250         * varobj.h (varobj_format_string): Constify.
9251         * vax-tdep.c (vax_register_name): Constify.
9252         * windows-nat.c (windows_detach): Constify.
9253         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9254         * xml-support.c (gdb_xml_end_element): Constify.
9255         * xml-tdesc.c (tdesc_start_reg): Constify.
9256         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9257         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9258         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9259
9260 2017-04-05  Pedro Alves  <palves@redhat.com>
9261
9262         * proc-api.c (struct trans): Constify.
9263         (procfs_note): Constify.
9264         * proc-events.c (struct trans, syscall_table):
9265         * proc-flags.c (struct trans): Constify.
9266         * proc-utils.h (procfs_note): Constify.
9267         * proc-why.c (struct trans): Constify.
9268         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9269         (procfs_detach): Constify.
9270         * sol-thread.c (struct string_map): Constify.
9271         (td_err_string, td_state_string): Constify.
9272
9273 2017-04-05  Pedro Alves  <palves@redhat.com>
9274
9275         * proc-api.c (procfs_filename): Don't initialize
9276         procfs_filename.
9277         (prepare_to_trace): Assume procfs_filename is non-NULL.
9278         (_initialize_proc_api): Give procfs_filename a default value here.
9279
9280 2017-04-05  Pedro Alves  <palves@redhat.com>
9281
9282         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9283         'cond_string' parameter.
9284         (extract_exception_regexp): Constify 'string' parameter.
9285         (catch_exception_command_1): Constify.
9286         * breakpoint.c (init_catchpoint)
9287         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9288         parameter.
9289         (ep_parse_optional_if_clause, catch_fork_command_1)
9290         (catch_exec_command_1): Constify.
9291         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9292         parameter.
9293         (ep_parse_optional_if_clause): Constify.
9294         * cli/cli-utils.c (remove_trailing_whitespace)
9295         (check_for_argument): Constify.
9296         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9297         non-const overload.
9298         (check_for_argument): Likewise.
9299
9300 2017-04-05  Pedro Alves  <palves@redhat.com>
9301
9302         * event-top.c (command_line_handler): Add cast to execute_command
9303         call.
9304         * record-btrace.c (cmd_record_btrace_bts_start)
9305         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9306         (cmd_record_btrace_start): Add cast to execute_command call.
9307         * record-full.c (record_full_goto_insn):
9308         * record.c (record_start, record_stop): Add cast to
9309         execute_command_to_string calls.
9310         (cmd_record_start): Add cast to execute_command calls.
9311
9312 2017-04-05  Pedro Alves  <palves@redhat.com>
9313
9314         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9315         static inline function.
9316         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9317         array and use gdb_PyArg_ParseTupleAndKeywords.
9318         * python/py-cmd.c (cmdpy_init): Likewise.
9319         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9320         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9321         (infpy_search_memory): Likewise.
9322         * python/py-objfile.c (objfpy_add_separate_debug_file)
9323         (gdbpy_lookup_objfile): Likewise.
9324         * python/py-symbol.c (gdbpy_lookup_symbol)
9325         (gdbpy_lookup_global_symbol): Likewise.
9326         * python/py-type.c (gdbpy_lookup_type): Likewise.
9327         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9328         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9329         Likewise.
9330
9331 2017-04-05  Pedro Alves  <palves@redhat.com>
9332
9333         * python/python-internal.h (gdb_PyGetSetDef): New type.
9334         * python/py-block.c (block_object_getset)
9335         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9336         * python/py-event.c (event_object_getset)
9337         (finish_breakpoint_object_getset): Likewise.
9338         * python/py-inferior.c (inferior_object_getset): Likewise.
9339         * python/py-infthread.c (thread_object_getset): Likewise.
9340         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9341         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9342         * python/py-objfile.c (objfile_getset): Likewise.
9343         * python/py-progspace.c (pspace_getset): Likewise.
9344         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9345         Likewise.
9346         * python/py-record.c (recpy_record_getset): Likewise.
9347         * python/py-symbol.c (symbol_object_getset): Likewise.
9348         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9349         Likewise.
9350         * python/py-type.c (type_object_getset, field_object_getset):
9351         Likewise.
9352         * python/py-value.c (value_object_getset): Likewise.
9353
9354 2017-04-05  Pedro Alves  <palves@redhat.com>
9355
9356         * python/python-internal.h (gdb_PyObject_CallMethod)
9357         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9358         New functions.
9359         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9360         (PySys_GetObject, PySys_SetPath): New macros.
9361
9362 2017-04-05  Pedro Alves  <palves@redhat.com>
9363
9364         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9365         info_osdata_command.
9366         * osdata.c (info_osdata_command): Rename to ...
9367         (info_osdata): ... this.  Constify 'type' parameter, and remove
9368         the 'from_tty' parameter.  Accept NULL TYPE.
9369         (info_osdata_command): New function.
9370         * osdata.h (info_osdata_command): Remove declaration.
9371         (info_osdata): New declaration.
9372
9373 2017-04-05  Pedro Alves  <palves@redhat.com>
9374
9375         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9376         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9377         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9378         parameter.
9379         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9380         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9381         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9382         parameter.
9383         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9384         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9385         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9386         (mi_cmd_file_list_exec_source_files)
9387         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9388         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9389         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9390         parameter.
9391         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9392         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9393         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9394         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9395         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9396         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9397         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9398         'command' parameter.
9399         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9400         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9401         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9402         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9403         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9404         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9405         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9406         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9407         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9408         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9409         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9410         parameter.
9411         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9412         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9413         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9414         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9415         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9416         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9417         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9418         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9419         (mi_cmd_data_list_changed_registers)
9420         (mi_cmd_data_write_register_values)
9421         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9422         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9423         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9424         (mi_cmd_list_features, mi_cmd_list_target_features)
9425         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9426         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9427         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9428         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9429         (mi_cmd_trace_frame_collected): Constify 'command'
9430         parameter.
9431         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9432         'command' parameter.
9433
9434 2017-04-05  Pedro Alves  <palves@redhat.com>
9435
9436         * ada-lang.c (ada_completer_word_break_characters): Now a const
9437         array.
9438         (ada_get_gdb_completer_word_break_characters): Constify.
9439         * completer.c (gdb_completer_command_word_break_characters)
9440         (gdb_completer_file_name_break_characters)
9441         (gdb_completer_quote_characters): Now const arrays.
9442         (get_gdb_completer_quote_characters): Constify.
9443         (set_rl_completer_word_break_characters): New function.
9444         (set_gdb_completion_word_break_characters)
9445         (complete_line_internal): Use it.
9446         * completer.h (get_gdb_completer_quote_characters): Constify.
9447         (set_rl_completer_word_break_characters): Declare.
9448         * f-lang.c (f_word_break_characters): Constify.
9449         * language.c (default_word_break_characters): Constify.
9450         * language.h (language_defn::la_word_break_characters): Constify.
9451         (default_word_break_characters): Constify.
9452         * top.c (init_main): Use set_rl_completer_word_break_characters.
9453
9454 2017-04-05  Pedro Alves  <palves@redhat.com>
9455
9456         * aix-thread.c (aix_thread_pid_to_str)
9457         (aix_thread_extra_thread_info): Constify.
9458         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9459         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9460         (bsd_uthread_pid_to_str): Constify.
9461         * corelow.c (core_pid_to_str): Constify.
9462         * darwin-nat.c (darwin_pid_to_str): Constify.
9463         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9464         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9465         Constify.
9466         * gnu-nat.c (gnu_pid_to_str): Constify.
9467         * go32-nat.c (go32_pid_to_str): Constify.
9468         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9469         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9470         * inferior.c (inferior_pid_to_str): Constify.
9471         * linux-nat.c (linux_nat_pid_to_str): Constify.
9472         * linux-tdep.c (linux_core_pid_to_str): Constify.
9473         * linux-thread-db.c (thread_db_pid_to_str)
9474         (thread_db_extra_thread_info): Constify.
9475         * nto-tdep.c (nto_extra_thread_info): Constify.
9476         * nto-tdep.h (nto_extra_thread_info): Constify.
9477         * obsd-nat.c (obsd_pid_to_str): Constify.
9478         * procfs.c (procfs_pid_to_str): Constify.
9479         * ravenscar-thread.c (ravenscar_extra_thread_info)
9480         (ravenscar_pid_to_str): Constify.
9481         * remote-sim.c (gdbsim_pid_to_str): Constify.
9482         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9483         Constify.
9484         * sol-thread.c (solaris_pid_to_str): Constify.
9485         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9486         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9487         * target.c (default_pid_to_str, target_pid_to_str)
9488         (normal_pid_to_str, default_pid_to_str): Constify.
9489         * target.h (target_ops::to_pid_to_str)
9490         (target_ops::to_extra_thread_info): Constify.
9491         (target_pid_to_str, normal_pid_to_str): Constify.
9492         * windows-nat.c (windows_pid_to_str): Constify.
9493         * gdbarch.sh (core_pid_to_str): Constify.
9494         * target-delegates.c: Regenerate.
9495         * gdbarch.h, gdbarch.c: Regenerate.
9496
9497 2017-04-05  Pedro Alves  <palves@redhat.com>
9498
9499         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9500         the memory of the temporary warning_pre_print override.
9501         * utils.c (warning_pre_print): Constify.
9502         * utils.h (warning_pre_print): Constify.
9503
9504 2017-04-05  Pedro Alves  <palves@redhat.com>
9505
9506         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9507         (shell_command): New function.
9508         (make_command): Use std::string.
9509         (init_cli_cmds): Register shell_command instead of shell_escape.
9510
9511 2017-04-05  Pedro Alves  <palves@redhat.com>
9512
9513         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9514         * tracepoint.c (default_collect): Don't initialize.
9515
9516 2017-04-05  Pedro Alves  <palves@redhat.com>
9517
9518         * macroexp.c (macro_buffer::shared): Now a bool.
9519         (init_buffer): Update.
9520         (init_shared_buffer): Constify 'addr' parameter.
9521         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9522         casts.
9523
9524 2017-04-05  Pedro Alves  <palves@redhat.com>
9525
9526         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9527         * disasm.c (set_disassembler_options): Constify local.
9528         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9529
9530 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9531
9532         PR gdb/21352
9533         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9534         option.
9535
9536 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9537
9538         * frame.c (frame_unwind_register_unsigned): Call
9539         frame_unwind_register_value.
9540
9541 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9542
9543         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9544         Use gdb_test_multiple, and don't match anchor.
9545
9546 2017-04-05  Pedro Alves  <palves@redhat.com>
9547
9548         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9549         (Write After Approval): Remove Simon Marchi.
9550
9551 2017-04-05  Pedro Alves  <palves@redhat.com>
9552
9553         * common/gdb_optional.h (optional::optional): Make constexpr and
9554         initialize m_dummy.
9555
9556 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9557
9558         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9559         (amd64fbsd_jmp_buf_reg_offset): Remove.
9560         (amd64fbsd_supply_uthread): Remove function.
9561         (amd64fbsd_collect_uthread): Remove function.
9562         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9563         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9564         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9565         (fbsd-nat.c): Update comment.
9566         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9567         (i386fbsd_jmp_buf_reg_offset): Remove.
9568         (i386fbsd_supply_uthread): Remove function.
9569         (i386fbsd_collect_uthread): Remove function.
9570         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9571
9572 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9573
9574         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9575         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9576         * NEWS: Mention that support for FreeBSD/alpha was removed.
9577         * alpha-fbsd-tdep.c: Delete file.
9578         * config/alpha/fbsd.mh: Delete file.
9579         * configure.host: Delete alpha*-*-freebsd* and
9580         alpha*-*-kfreebsd*-gnu.
9581         * configure.tgt: Delete alpha*-*-freebsd* and
9582         alpha*-*-kfreebsd*-gnu.
9583
9584 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9585
9586         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9587         amd64bsd_store_inferior_registers): Use ptid from regcache.
9588
9589 2017-04-04  Pedro Alves  <palves@redhat.com>
9590
9591         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9592         data fields, make them private and add "m_" prefixes.
9593         (lnp_state_machine::lnp_state_machine): New ctor.
9594         (record_line, check_line_address, handle_set_discriminator)
9595         (handle_set_address, handle_advance_pc, handle_special_opcode)
9596         (handle_advance_line, handle_set_file, handle_negate_stmt)
9597         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9598         (end_sequence, advance_line): New methods.
9599         (m_gdbarch, m_record_lines_p): New fields.
9600         (lnp_reader_state): Delete.
9601         (dwarf_record_line): Rename to ...
9602         (lnp_state_machine::record_line): ... adjust.
9603         (init_lnp_state_machine): Delete.
9604         (lnp_state_machine::lnp_state_machine): New.
9605         (check_line_address): Rename to ...
9606         (lnp_state_machine::check_line_address): This.
9607         (dwarf_decode_lines_1): Remove reference to "reader_state".
9608         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9609         State machine internal state manipulation moved to
9610         lnp_state_machine methods.
9611
9612 2017-04-04  Pedro Alves  <palves@redhat.com>
9613
9614         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9615         unittests/offset-type-selftests.c.
9616         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9617         * common/offset-type.h: New file.
9618         * common/preprocessor.h: New file.
9619         * common/traits.h: New file.
9620         * common/valid-expr.h: New file.
9621         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9622         sect_offset and cu_offset strong typedefs throughout.
9623         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9624         typedefs throughout.
9625         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9626         sect_offset and cu_offset strong typedefs throughout.
9627         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9628         typedefs throughout.
9629         * gdbtypes.h: Include "common/offset-type.h".
9630         (cu_offset): Now an offset type (strong typedef) instead of a
9631         struct.
9632         (sect_offset): Likewise.
9633         (union call_site_parameter_u): Rename "param_offset" field to
9634         "param_cu_off".
9635         * unittests/offset-type-selftests.c: New file.
9636
9637 2017-04-04  Pedro Alves  <palves@redhat.com>
9638
9639         * common/underlying.h: New file.
9640         * dwarf2read.c: Include "common/gdb_optional.h" and
9641         "common/underlying.h".
9642         (dir_index, file_name_index): New types.
9643         (file_entry): Use them.
9644         (file_entry::include): Use to_underlying.
9645         (line_header::add_file_name): Use dir_index.
9646         (read_formatted_entries): Use gdb::optional.  Read form before
9647         writting to file_entry.
9648         (dwarf_decode_line_header): Use dir_index.
9649         (lnp_state_machine::current_file): Use to_underlying.
9650         (lnp_state_machine::file): Change type to file_name_index.
9651         (dwarf_record_line): Use to_underlying.
9652         (init_lnp_state_machine): Use file_name_index.
9653         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9654
9655 2017-04-04  Pedro Alves  <palves@redhat.com>
9656
9657         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9658         operator bool, has_value and get methods.
9659
9660 2017-04-04  Pedro Alves  <palves@redhat.com>
9661
9662         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9663         fields.
9664         (line_header): Initialize all data fields.  Change type of
9665         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9666         Change type of include_dirs to std::vector<const char *>.  Remove
9667         num_include_dirs, include_dirs_size.  Change type of file_names to
9668         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9669         (line_header::line_header): New.
9670         (line_header::add_include_dir, line_header::add_file_name): New
9671         methods.
9672         (line_header::include_dir_at): Remove NULL check.
9673         (line_header::file_name_at): Add const overload.
9674         (line_header_up): New unique_ptr typedef.
9675         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9676         std::vector.  Remove free_line_header call.
9677         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9678         free_line_header call.
9679         (free_cu_line_header): Delete.
9680         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9681         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9682         Adjust to use std::vector.
9683         (free_line_header): Delete.
9684         (free_line_header_voidp): Use delete.
9685         (add_include_dir): Replace with ...
9686         (line_header::add_include_dir): ... this method.  Use std::vector.
9687         (add_file_name): Replace with ...
9688         (line_header::add_file_name): ... this method.  Use std::vector.
9689         (add_include_dir_stub): Delete.
9690         (read_formatted_entries): Remove memset.
9691         (dwarf_decode_line_header): Return a line_header_up instead of a
9692         raw pointer.  Remove cleanup handling.  Pass lambdas to
9693         read_formatted_entries.  Adjust to use line_header methods.
9694         (dwarf_decode_lines_1): Adjust to use line_header methods.
9695         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9696         use std::vector.
9697
9698 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9699
9700         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9701         instead of struct ptid.
9702
9703 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9704
9705         * frame.c (get_frame_register_bytes): Unwind using value.
9706         (put_frame_register_bytes): Likewise.
9707
9708 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9709
9710         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9711         aggregate-like.
9712
9713 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9714
9715         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9716
9717 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9718
9719         * gdbthread.h (struct thread_info): Declare constructor and
9720         destructor.  Add some in-class member initializers.
9721         * thread.c (free_thread): Remove.
9722         (init_thread_list): Call delete instead of free_thread.
9723         (new_thread): Call thread_info constructor.
9724         (thread_info::thread_info): New function.
9725         (thread_info::~thread_info): New function.
9726         (delete_thread_1): Call delete instead of free_thread.
9727         (make_cleanup_restore_current_thread): Move tp and frame to
9728         inner block.
9729
9730 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9731
9732         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9733         (arc_skip_prologue): Likewise.
9734         (arc_make_frame_cache): Likewise.
9735         (arc_pv_get_operand): New function.
9736         (arc_is_in_prologue): Likewise.
9737         (arc_analyze_prologue): Likewise.
9738         (arc_print_frame_cache): Likewise.
9739         (MAX_PROLOGUE_LENGTH): New constant.
9740
9741 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9742
9743         * configure.tgt: Add arc-insn.o.
9744         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9745         (dump_arc_instruction_command): New function.
9746         (arc_fprintf_disasm): Likewise.
9747         (arc_disassemble_info): Likewise.
9748         (arc_insn_get_operand_value): Likewise.
9749         (arc_insn_get_operand_value_signed): Likewise.
9750         (arc_insn_get_memory_base_reg): Likewise.
9751         (arc_insn_get_memory_offset): Likewise.
9752         (arc_insn_get_branch_target): Likewise.
9753         (arc_insn_dump): Likewise.
9754         (arc_insn_get_linear_next_pc): Likewise.
9755         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9756         (arc_disassemble_info): Likewise.
9757         (arc_insn_get_branch_target): Likewise.
9758         (arc_insn_get_linear_next_pc): Likewise.
9759         * NEWS: Mention new "maint print arc arc-instruction".
9760
9761 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9762
9763         * arc-tdep (maintenance_print_arc_list): New variable.
9764         (maintenance_print_arc_command): New function.
9765
9766 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9767
9768         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9769         Add "limm" and "reserved".
9770         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9771         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9772         * arc-tdep.h (arc_regnum): Likewise.
9773
9774 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9775
9776         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9777         for THREADPTR register.
9778         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9779         register.
9780         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9781         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9782         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9783
9784 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9785
9786         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9787         registers above gdbarch_num_regs (gdbarch) as privileged in
9788         call0 ABI.
9789
9790 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9791
9792         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9793         for a single specified register or for all registers in
9794         a0_base..a0_base + C0_NREGS range.
9795         (supply_gregset_reg): Call regcache_raw_supply for a single
9796         specified register or for all registers in a0_base..a0_base +
9797         C0_NREGS range.
9798
9799 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9800
9801         * arch/xtensa.h (C0_NREGS): Add definition.
9802         * xtensa-tdep.c (C0_NREGS): Remove definition.
9803
9804 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9805
9806         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9807         Drop xtensa_default_isa initialization.
9808         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9809
9810 2017-03-27  Pedro Alves  <palves@redhat.com>
9811
9812         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9813         (file_entry::include_dir): New method.
9814         (line_header::include_dir_at, line_header::file_name_at): New
9815         methods.
9816         (setup_type_unit_groups, setup_type_unit_groups)
9817         (psymtab_include_file_name): Simplify using the new methods.
9818         (lnp_state_machine) <the_line_header>: New field.
9819         <file>: Add comment.
9820         (lnp_state_machine::current_file): New method.
9821         (dwarf_record_line): Simplify using the new methods.
9822         (init_lnp_state_machine): Initialize the "the_line_header" field.
9823         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9824         Simplify using the new methods.
9825
9826 2017-03-27  Pedro Alves  <palves@redhat.com>
9827
9828         * cp-name-parser.y (make_empty): Delete.
9829         (demangler_special, nested_name, ptr_operator, array_indicator)
9830         (direct_declarator, declarator_1): Use fill_comp instead of
9831         make_empty.
9832
9833 2017-03-27  Pedro Alves  <palves@redhat.com>
9834
9835         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9836         to ATTRIBUTE_PRINTF.
9837         * solib-target.c (library_list_start_list): Print "string" not
9838         "version".
9839         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9840         gdb_xml_error call.
9841
9842 2017-03-27  Pedro Alves  <palves@redhat.com>
9843
9844         * dwarf2read.c (struct file_and_directory): New.
9845         (dwarf2_get_dwz_file): Adjust to use std::string.
9846         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9847         (find_file_and_directory): Adjust to return a file_and_directory
9848         object.
9849         (read_file_scope): Adjust to use file_and_directory.  Remove
9850         make_cleanup/do_cleanups calls.
9851         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9852         make_cleanup/do_cleanups calls.
9853         * python/python.c (do_start_initialization): Adjust to ldirname
9854         returning a std::string.
9855         * utils.c (ldirname): Now returns a std::string.
9856         * utils.h (ldirname): Change return type to std::string.
9857         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9858         returning a std::string.
9859         * xml-tdesc.c (file_read_description_xml): Likewise.
9860
9861 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9862
9863         * regcache.c (regcache_debug_print_register): New function.
9864         * regcache.h (regcache_debug_print_register): New declaration.
9865         * target.c (debug_print_register): Remove.
9866         (target_fetch_registers): Call regcache_debug_print_register.
9867         (target_store_registers): Likewise.
9868
9869 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9870
9871         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9872         reference beyond the 'lh->include_dirs' array before accessing to
9873         it.
9874         (psymtab_include_file_name): Likewise.
9875         (dwarf_decode_lines_1): Likewise.
9876         (dwarf_decode_lines): Likewise.
9877         (file_file_name): Likewise.
9878
9879 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9880
9881         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9882         inferior_ptid.
9883         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9884         ps_lsetfpregs): Likewise.
9885         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9886         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9887         ps_lsetfpregs): Likewise.
9888         * target.c (target_fetch_registers, target_store_registers):
9889         Remove asserts.
9890
9891 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9892
9893         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9894
9895 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9896
9897         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9898         (_initialize_aarch64_tdep): Register it.
9899         (aarch64_record_load_store): Handle PRFM instruction.
9900         (aarch64_process_record_test): New function.
9901
9902 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9903
9904         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9905         indentation.
9906
9907 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9908
9909         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9910
9911 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9912
9913         python/python.c (do_start_initialization): Fix memory leak.
9914
9915 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9916
9917         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9918         using get_ptrace_pid.
9919         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9920         inferior_ptid.
9921         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9922         inferior_ptid instead of pid.
9923
9924 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9925
9926         * aarch64-tdep.c: Wrap locally used classes in anonymous
9927         namespace.
9928         * arm-tdep.c: Likewise.
9929         * linespec.c: Likewise.
9930         * ui-out.c: Likewise.
9931
9932 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9933
9934         PR gdb/19637
9935         * python/lib/gdb/printer/bound_registers.py: Import sys.
9936
9937 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9938
9939         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9940         windows_thread_info parameter and use it instead of
9941         current_thread.
9942         (windows_fetch_inferior_registers): Don't set current_thread,
9943         pass the thread to do_windows_fetch_inferior_registers.  Use
9944         ptid from regcache instead of inferior_ptid.
9945         (do_windows_store_inferior_registers): Add windows_thread_info
9946         parameter and use it instead of current_thread.
9947         (windows_store_inferior_registers): Don't set current_thread,
9948         pass the thread to do_windows_store_inferior_registers.  Use
9949         ptid from regcache instead of inferior_ptid.
9950
9951 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9952
9953         * ser-mingw.c (ser_windows_raw): Remove reference to
9954         struct serial::current_timeout.
9955
9956 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9957
9958         PR tdep/20928
9959         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9960         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9961         (sparc64_fsr_type): Fix %fsr decoding.
9962
9963 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9964
9965         * python/py-record-btrace.c (btpy_insn_data): Change return type
9966         for Python 2.
9967
9968 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9969
9970         * spu-linux-nat.c (spu_fetch_inferior_registers,
9971         spu_store_inferior_registers): Use ptid from regcache, set and
9972         restore inferior_ptid.
9973         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9974         Likewise.
9975
9976 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9977
9978         * i386-linux-nat.c (fetch_register, store_register,
9979         i386_linux_fetch_inferior_registers,
9980         i386_linux_store_inferior_registers): Use ptid from regcache.
9981         * ia64-linux-nat.c (ia64_linux_fetch_register,
9982         ia64_linux_store_register): Likewise.
9983         * inf-ptrace.c (inf_ptrace_fetch_register,
9984         inf_ptrace_store_register): Likewise.
9985         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9986         m32r_linux_store_inferior_registers): Likewise.
9987         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9988         m68kbsd_store_inferior_registers): Likewise.
9989         * m68k-linux-nat.c (fetch_register, store_register,
9990         m68k_linux_fetch_inferior_registers,
9991         m68k_linux_store_inferior_registers): Likewise.
9992         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9993         m88kbsd_store_inferior_registers): Likewise.
9994         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9995         mips_fbsd_store_inferior_registers): Likewise.
9996         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9997         mips64_linux_regsets_store_registers): Likewise.
9998         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9999         mipsnbsd_store_inferior_registers): Likewise.
10000         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10001         mips64obsd_store_inferior_registers): Likewise.
10002         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10003         Likewise.
10004         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10005         ppcfbsd_store_inferior_registers): Likewise.
10006         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10007         ppc_linux_store_inferior_registers): Likewise.
10008         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10009         ppcnbsd_store_inferior_registers): Likewise.
10010         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10011         ppcobsd_store_registers): Likewise.
10012         * procfs.c (procfs_fetch_registers, procfs_store_registers):
10013         Likewise.
10014         * ravenscar-thread.c (ravenscar_fetch_registers,
10015         ravenscar_store_registers, ravenscar_prepare_to_store):
10016         Likewise.
10017         * record-btrace.c (record_btrace_fetch_registers,
10018         record_btrace_store_registers, record_btrace_prepare_to_store):
10019         Likewise.
10020         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10021         Lookup inferior using ptid from regcache, instead of
10022         current_inferior.
10023         * remote.c (remote_fetch_registers, remote_store_registers): Use
10024         ptid from regcache.
10025         * rs6000-nat.c (fetch_register, store_register): Likewise.
10026         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10027         s390_linux_store_inferior_registers): Likewise.
10028         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10029         shnbsd_store_inferior_registers): Likewise.
10030         * sol-thread.c (sol_thread_fetch_registers,
10031         sol_thread_store_registers): Likewise.
10032         * sparc-nat.c (sparc_fetch_inferior_registers,
10033         sparc_store_inferior_registers): Likewise.
10034         * tilegx-linux-nat.c (fetch_inferior_registers,
10035         store_inferior_registers): Likewise.
10036         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10037         vaxbsd_store_inferior_registers): Likewise.
10038         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10039         store_xtregs): Likewise.
10040
10041 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10042
10043         PR gdb/14441
10044         * NEWS: Mention support for rvalue references in GDB and python.
10045         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10046         supports both lvalue and rvalue references.
10047
10048 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10049
10050         PR gdb/14441
10051         * gdbtypes.c (rank_one_type): Implement overloading
10052         resolution rules regarding rvalue references.
10053
10054 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10055
10056         PR gdb/14441
10057         * aarch64-tdep.c (aarch64_type_align)
10058         (aarch64_extract_return_value, aarch64_store_return_value): Change
10059         lvalue reference type checks to general reference type checks.
10060         * amd64-tdep.c (amd64_classify): Likewise.
10061         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10062         Likewise.
10063         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10064         (arm_store_return_value): Likewise.
10065         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10066         * c-typeprint.c (c_print_type): Likewise.
10067         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10068         (cplus_number_of_children, cplus_describe_child): Likewise.
10069         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10070         * completer.c (expression_completer): Likewise.
10071         * cp-support.c (make_symbol_overload_list_adl_namespace):
10072         Likewise.
10073         * darwin-nat-info.c (info_mach_region_command): Likewise.
10074         * dwarf2loc.c (entry_data_value_coerce_ref)
10075         (value_of_dwarf_reg_entry): Likewise.
10076         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10077         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10078         Likewise.
10079         * findvar.c (extract_typed_address, store_typed_address):
10080         Likewise.
10081         * gdbtypes.c (rank_one_type): Likewise.
10082         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10083         * infcall.c (value_arg_coerce): Likewise.
10084         * language.c (pointer_type): Likewise.
10085         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10086         Likewise.
10087         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10088         * mn10300-tdep.c (mn10300_type_align): Likewise.
10089         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10090         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10091         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10092         Likewise.
10093         * printcmd.c (print_formatted, x_command): Likewise.
10094         * python/py-type.c (typy_get_composite, typy_template_argument):
10095         Likewise.
10096         * python/py-value.c (valpy_referenced_value)
10097         (valpy_get_dynamic_type, value_has_field): Likewise.
10098         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10099         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10100         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10101         * spu-tdep.c (spu_scalar_value_p): Likewise.
10102         * symtab.c (lookup_symbol_aux): Likewise.
10103         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10104         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10105         Likewise.
10106         * valops.c (value_cast_pointers, value_cast)
10107         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10108         (value_struct_elt, value_struct_elt_bitpos)
10109         (value_find_oload_method_list, find_overload_match)
10110         (value_rtti_indirect_type): Likewise.
10111         * valprint.c (val_print_scalar_type_p, generic_val_print):
10112         Likewise.
10113         * value.c (value_actual_type, value_as_address, unpack_long)
10114         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10115         (coerce_ref): Likewise.
10116         * varobj.c (varobj_get_value_type): Likewise.
10117
10118 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10119
10120         PR gdb/14441
10121         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10122         table of constants.
10123         * python/lib/gdb/command/explore.py: Support exploring values
10124         of rvalue reference types.
10125         * python/lib/gdb/types.py: Implement get_basic_type() for
10126         rvalue reference types.
10127         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10128         constant.
10129         * python/py-value.c (valpy_getitem): Add an rvalue reference
10130         check.
10131         (valpy_reference_value): Add new parameter "refcode".
10132         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10133         New wrappers for valpy_reference_value().
10134         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10135         (gdbpy_invoke_xmethod): Likewise.
10136
10137 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10138
10139         PR gdb/14441
10140         * dwarf2read.c (process_die, read_type_die_1): Handle the
10141         DW_TAG_rvalue_reference_type DIE.
10142         (read_tag_reference_type): Add new parameter "refcode".
10143
10144 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10145
10146         PR gdb/14441
10147         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10148         (c_type_print_modifier, c_type_print_varspec_suffix)
10149         (c_type_print_base): Support printing rvalue reference types.
10150         * c-valprint.c (c_val_print, c_value_print): Support printing
10151         rvalue reference values.
10152
10153 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10154
10155         PR gdb/14441
10156         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10157         typename.
10158         * cp-support.c (replace_typedefs): Handle
10159         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10160         * python/py-type.c (typy_lookup_type): Likewise.
10161
10162 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10163
10164         PR gdb/14441
10165         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10166         * parse.c (insert_type): Change assert statement.
10167         (follow_types): Handle rvalue reference types.
10168         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10169         constant.
10170
10171 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10172
10173         PR gdb/14441
10174         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10175         value_ref() interface.
10176         * c-valprint.c (c_value_print): Likewise.
10177         * infcall.c (value_arg_coerce): Likewise.
10178         * python/py-value.c (valpy_reference_value): Likewise.
10179         * valops.c (value_cast, value_reinterpret_cast)
10180         (value_dynamic_cast, typecmp): Likewise.
10181         (value_ref): Parameterize by kind of return value reference type.
10182         * value.h (value_ref): Add new parameter "refcode".
10183
10184 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10185
10186         PR gdb/14441
10187         * dwarf2read.c (read_tag_reference_type): Use
10188         lookup_lvalue_reference_type() instead of lookup_reference_type().
10189         * eval.c (evaluate_subexp_standard): Likewise.
10190         * f-exp.y: Likewise.
10191         * gdbtypes.c (make_reference_type, lookup_reference_type):
10192         Generalize with rvalue reference types.
10193         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10194         convenience wrappers for lookup_reference_type().
10195         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10196         reference kind parameter.
10197         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10198         wrappers for lookup_reference_type().
10199         * guile/scm-type.c (gdbscm_type_reference): Use
10200         lookup_lvalue_reference_type() instead of lookup_reference_type().
10201         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10202         * parse.c (follow_types): Likewise.
10203         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10204         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10205         Likewise.
10206         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10207         (gdbpy_invoke_xmethod): Likewise.
10208         * stabsread.c: Provide extra argument to make_reference_type()
10209         call.
10210         * valops.c (value_ref, value_rtti_indirect_type): Use
10211         lookup_lvalue_reference_type() instead of lookup_reference_type().
10212
10213 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10214
10215         PR gdb/14441
10216         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10217         (TYPE_IS_REFERENCE): New macro.
10218         (struct type): Add rvalue_reference_type field.
10219         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10220
10221 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10222
10223         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10224         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10225         New function definition.
10226         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10227         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10228         New function declaration.
10229         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10230         * mi/mi-interp.h: New file.
10231         * solib.c (info_sharedlibrary_command): Replace for loop with
10232         ALL_SO_LIBS macro
10233         * solib.h (update_solib_list): New function declaration.
10234         (so_list_head): Move macro.
10235         * solist.h (ALL_SO_LIBS): New macro.
10236
10237 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10238
10239         * infcmd.c (post_create_inferior): Remove unused argument in
10240         call to solib_add.
10241         * remote.c (remote_start_remote): Likewise.
10242         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10243         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10244         (enable_break): Likewise.
10245         * solib.c (update_solib_list): Remove unused target argument
10246         and its documentation.
10247         (solib_add): Remove unused target argument.  Remove unused
10248         argument in call to update_solib_list.
10249         (info_sharedlibrary_command): Remove unused argument in call
10250         to update_solib_list.
10251         (sharedlibrary_command): Remove unused argument in call to
10252         solib_add.
10253         (handle_solib_event): Likewise.
10254         (reload_shared_libraries): Likewise.
10255         * solib.h (solib_add): Remove unused target argument.
10256
10257 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10258
10259         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10260         (s390_displaced_step_fixup): Cover relative branches with the
10261         default fixup handling.  This fixes lack of support for some
10262         relative branch instructions.
10263
10264 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10265
10266         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10267         ptid from regcache.
10268
10269 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10270
10271         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10272         i386_darwin_store_inferior_registers): Use ptid from regcache.
10273
10274 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10275
10276         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10277         i386bsd_store_inferior_registers): Use ptid from regcache.
10278
10279 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10280
10281         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10282         hppaobsd_store_registers): Use ptid from regcache.
10283
10284 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10285
10286         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10287         hppanbsd_store_registers): Use ptid from regcache.
10288
10289 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10290
10291         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10292         from regcache.  Use get_ptrace_pid.
10293
10294 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10295
10296         * corelow.c (get_core_register_section): Use ptid from regcache,
10297         update doc.
10298
10299 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10300
10301         * bsd-uthread.c (bsd_uthread_fetch_registers,
10302         bsd_uthread_store_registers): Use ptid from regcache, set and
10303         restore inferior_ptid.
10304
10305 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10306
10307         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10308         fetch_fp_regs, store_register, store_regs, store_fp_register,
10309         store_fp_regs): Use ptid from regcache.
10310
10311 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10312
10313         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10314         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10315         store_vfp_regs): Use ptid from regcache.
10316
10317 2017-03-17  Pedro Alves  <palves@redhat.com>
10318
10319         PR remote/21188
10320         * ser-base.c (ser_base_wait_for): Add comment.
10321         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10322         version.
10323         * ser-unix.c (hardwire_raw): Remove reference to
10324         scb->current_timeout.
10325         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10326         (hardwire_ops): Install ser_base_readchar instead of
10327         hardwire_readchar.
10328         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10329         Remove fields.
10330
10331 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10332
10333         PR gdb/19637
10334         * python/lib/gdb/printer/bound_registers.py: Add support for
10335         Python 3.
10336
10337 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10338
10339         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10340         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10341         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10342         byte_offset to subobj_byte_offset.  Fix the handling of
10343         DWARF_VALUE_STACK on big-endian targets when coming via an
10344         implicit pointer.
10345         (dwarf2_evaluate_loc_desc): Adjust call to
10346         dwarf2_evaluate_loc_desc_full.
10347         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10348         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10349
10350 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10351
10352         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10353         and REVSH instructions.
10354
10355 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10356
10357         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10358         (arm_record_test): Declare.
10359         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10360         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10361         align with the manual.
10362         (thumb_record_misc): Adjust the code order to align with the
10363         manual.
10364         (thumb2_record_decode_insn_handler): Fix instruction matching.
10365         (instruction_reader_thumb): New class.
10366         (arm_record_test): New function.
10367
10368 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10369
10370         * arm-tdep.c (abstract_memory_reader): New class.
10371         (instruction_reader): New class.
10372         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10373         (decode_insn): Likewise.
10374
10375 2017-03-16  Doug Evans  <dje@google.com>
10376
10377         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10378         member.  Change type of TYPE member to SCM.  All uses updated.
10379         (lsscm_make_lazy_string_smob): Add assert.
10380         (lsscm_make_lazy_string): Flag bad length values.
10381         (lsscm_elt_type): New function.
10382         (gdbscm_lazy_string_to_value): Rewrite to use
10383         lsscm_safe_lazy_string_to_value.
10384         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10385         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10386         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10387         in incoming type.
10388         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10389         * guile/scm-type.c (tyscm_scm_to_type): New function.
10390
10391 2017-03-15  Doug Evans  <dje@google.com>
10392
10393         PR python/17728, python/18439, python/18779
10394         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10395         member.  Change type of TYPE member to PyObject *.  All uses updated.
10396         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10397         (gdbpy_create_lazy_string_object): Flag bad length values.
10398         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10399         Handle typedefs in incoming type.
10400         (stpy_lazy_string_elt_type): New function.
10401         (gdbpy_extract_lazy_string): Call it.
10402         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10403         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10404         typedefs in incoming type.
10405
10406 2017-03-16  Doug Evans  <dje@google.com>
10407
10408         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10409         * guile/scm-type.c (tyscm_scm_to_type): New function.
10410
10411 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10412
10413         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10414         "ULONGEST" for "skip".
10415
10416 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10417
10418         PR gdb/21220
10419         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10420         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10421         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10422         over ptrace peek/poke until end of buffer or error.
10423
10424 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10425
10426         * parse.c (length_of_subexp): Make static.
10427         * parser-defs.h (length_of_subexp): Remove.
10428
10429 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10430
10431         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10432         as well.
10433
10434 2017-03-14  Pedro Alves  <palves@redhat.com>
10435
10436         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10437         (main): Use std::unique_ptr.  Remove calls to
10438         cp_demangled_name_parse_free.
10439
10440 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10441
10442         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10443         alphabsd_store_inferior_registers): Use regcache->ptid instead
10444         of inferior_ptid.
10445
10446 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10447
10448         * aix-thread.c (aix_thread_fetch_registers,
10449         aix_thread_store_registers): Use regcache->ptid instead of
10450         inferior_ptid.
10451
10452 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10453
10454         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10455         store_gregs_to_thread, fetch_fpregs_from_thread,
10456         store_fpregs_to_thread): Use regcache->ptid instead of
10457         inferior_ptid.
10458
10459 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10460
10461         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10462         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10463         instead of inferior_ptid.
10464
10465 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10466
10467         * target.c (target_fetch_registers, target_store_registers): Add
10468         assert.
10469
10470 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10471
10472         * regcache.h (regcache_get_ptid): New function.
10473         * regcache.c (regcache_get_ptid): New function.
10474
10475 2017-03-13  Mark Wielaard  <mark@klomp.org>
10476
10477         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10478
10479 2017-03-10  Keith Seitz  <keiths@redhat.com>
10480
10481         PR c++/8218
10482         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10483
10484 2017-03-08  Pedro Alves  <palves@redhat.com>
10485
10486         PR gdb/18360
10487         * infrun.c (start_step_over, do_target_resume, resume)
10488         (restart_threads): Assert we're not resuming a thread that is
10489         meant to be stopped.
10490         (infrun_thread_stop_requested_callback): Delete.
10491         (infrun_thread_stop_requested): If the thread is internally
10492         stopped, queue a pending stop event and clear the thread's
10493         inline-frame state.
10494         (handle_stop_requested): New function.
10495         (handle_syscall_event, handle_inferior_event_1): Use
10496         handle_stop_requested.
10497         (handle_stop_requested): New function.
10498         (handle_signal_stop): Set the thread's stop_signal here instead of
10499         at caller.
10500         (finish_step_over): Clear step over info unconditionally.
10501         (handle_signal_stop): If the user had interrupted the event
10502         thread, consider the stop a random signal.
10503         (handle_signal_stop) <signal arrived while stepping over
10504         breakpoint>: Don't restart threads here.
10505         (stop_waiting): Don't clear step-over info here.
10506
10507 2017-03-08  Pedro Alves  <palves@redhat.com>
10508
10509         PR 21206
10510         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10511         goes to argument 2, not 1.
10512
10513 2017-03-08  Pedro Alves  <palves@redhat.com>
10514
10515         PR cli/21218
10516         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10517         display_gdb_prompt.
10518         (command_line_input): Add comment.
10519
10520 2017-03-08  Pedro Alves  <palves@redhat.com>
10521
10522         PR tui/21216
10523         * tui/tui-file.c (tui_file::write): New.
10524         * tui/tui-file.h (tui_file): Override "write".
10525         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10526         factored out from ...
10527         (tui_puts): ... here.
10528         (tui_putc): Use them.
10529         (tui_write): New function.
10530         * tui/tui-io.h (tui_write): Declare.
10531
10532 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10533
10534         * Makefile.in (SFILES): Replace "environ.c" with
10535         "common/environ.c".
10536         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10537         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10538         to...
10539         * common/environ.c: ... here.
10540         * environ.h: Moved to...
10541         * common/environ.h: ... here.
10542
10543 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10544
10545         * gdbarch.sh (pstring_ptr): New static function.
10546         (gdbarch_disassembler_options): Use it.
10547         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10548         not valid_disassembler_option->name.
10549         * gdbarch.c: Regenerate.
10550
10551 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10552
10553         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10554
10555 2017-03-07  Pedro Alves  <palves@redhat.com>
10556
10557         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10558
10559 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10560
10561         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10562         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10563         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10564         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10565
10566 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10567
10568         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10569
10570 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10571
10572         * remote.c (remote_add_target_side_commands): Use range-based
10573         for loop.
10574
10575 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10576
10577         PR gdb/21165
10578         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10579         value is lazy.
10580         * valprint.c (common_val_print): Likewise.
10581
10582 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10583
10584         * NEWS: Mention new set/show disassembler-options commands.
10585         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10586         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10587         (prospective_options): New static variable.
10588         (gdb_disassembler::gdb_disassembler): Initialize
10589         m_di.disassembler_options.
10590         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10591         (get_disassembler_options): New function.
10592         (set_disassembler_options): Likewise.
10593         (set_disassembler_options_sfunc): Likewise.
10594         (show_disassembler_options_sfunc): Likewise.
10595         (disassembler_options_completer): Likewise.
10596         (_initialize_disasm): Likewise.
10597         * disasm.h (get_disassembler_options): New prototype.
10598         (set_disassembler_options): Likewise.
10599         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10600         (gdbarch_verify_disassembler_options): Likewise.
10601         * gdbarch.c: Regenerate.
10602         * gdbarch.h: Likewise.
10603         * arm-tdep.c (num_disassembly_options): Delete.
10604         (set_disassembly_style): Likewise.
10605         (arm_disassembler_options): New static variable.
10606         (set_disassembly_style_sfunc): Convert short style name into long
10607         option name.  Call set_disassembler_options.
10608         (show_disassembly_style_sfunc): New function.
10609         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10610         set_gdbarch_verify_disassembler_options.
10611         (_initialize_arm_tdep): Delete regnames variable and update callers.
10612         (arm_disassembler_options): Initialize.
10613         (disasm_options): New variable.
10614         (num_disassembly_options): Rename from this...
10615         (num_disassembly_styles): ...to this.  Compute by scanning through
10616         disasm_options.
10617         (valid_disassembly_styles): Initialize using disasm_options.
10618         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10619         set_arm_regname_option.
10620         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10621         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10622         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10623         set_gdbarch_verify_disassembler_options.
10624         * s390-tdep.c (s390_disassembler_options): New static variable.
10625         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10626         set_gdbarch_verify_disassembler_options.
10627
10628 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10629
10630         * remote.c (remote_add_target_side_condition): Remove "struct"
10631         keyword from range-based for loop.
10632
10633 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10634
10635         * remote.c (remote_add_target_side_condition): Use range-based
10636         for loop.  Update comment.
10637
10638 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10639
10640         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10641
10642 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10643
10644         * regcache.c (regcache_raw_update): New function.
10645         (regcache_raw_read): Move code to regcache_raw_update.
10646         * regcache.h (regcache_raw_update): New declaration.
10647         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10648
10649 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10650
10651         * dwarf2read.c (create_debug_type_hash_table): Initialize
10652         header.signature and header.type_offset_in_tu.
10653
10654 2017-02-24  Pedro Alves  <palves@redhat.com>
10655
10656         * symtab.c (make_file_symbol_completion_list_1): Use
10657         add_symtab_completions.
10658
10659 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10660
10661         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10662
10663 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10664
10665         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10666         I386_MAX_REGISTER_SIZE.
10667         (i386_pseudo_register_write): Likewise.
10668         (i386_process_record): Likewise.
10669         * i387-tdep.c (i387_supply_xsave): Likewise.
10670         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10671         (store_register): Likewise.
10672
10673 2017-02-23  Pedro Alves  <palves@redhat.com>
10674
10675         * ada-lang.c: Include "common/function-view.h".
10676         (ada_iterate_over_symbols): Adjust to use function_view as
10677         callback type.
10678         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10679         (ada_make_symbol_completion_list): Use a lambda.
10680         (ada_exc_search_name_matches): Delete.
10681         (name_matches_regex): New.
10682         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10683         * compile/compile-c-support.c: Include "common/function-view.h".
10684         (print_one_macro): Change prototype to accept a ui_file pointer.
10685         (write_macro_definitions): Use a lambda.
10686         * dwarf2read.c: Include "common/function-view.h".
10687         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10688         (dw2_expand_symtabs_matching): Adjust to use function_view as
10689         callback type.
10690         * language.h: Include "common/function-view.h".
10691         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10692         function_view as callback type.
10693         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10694         * linespec.c: Include "common/function-view.h".
10695         (collect_info::add_symbol): New method.
10696         (struct symbol_and_data_callback, iterate_inline_only, struct
10697         symbol_matcher_data, iterate_name_matcher): Delete.
10698         (iterate_over_all_matching_symtabs): Adjust to use function_view
10699         as callback type and lambdas.
10700         (iterate_over_file_blocks): Adjust to use function_view as
10701         callback type.
10702         (decode_compound_collector): Now a class with private fields.
10703         (decode_compound_collector::release_symbols): New method.
10704         (collect_one_symbol): Rename to...
10705         (decode_compound_collector::operator()): ... this and adjust.
10706         (lookup_prefix_sym): decode_compound_collector construction bits
10707         move to decode_compound_collector ctor.  Pass the
10708         decode_compound_collector object directly as callback.  Remove
10709         cleanups and use decode_compound_collector::release_symbols
10710         instead.
10711         (symtab_collector): Now a class with private fields.
10712         (symtab_collector::release_symtabs): New method.
10713         (add_symtabs_to_list): Rename to...
10714         (symtab_collector::operator()): ... this and adjust.
10715         (collect_symtabs_from_filename): symtab_collector construction
10716         bits move to symtab_collector ctor.  Pass the symtab_collector
10717         object directly as callback.  Remove cleanups and use
10718         symtab_collector::release_symtabs instead.
10719         (collect_symbols): Delete.
10720         (add_matching_symbols_to_info): Use lambdas.
10721         * macrocmd.c (print_macro_callback): Delete.
10722         (info_macro_command): Use a lambda.
10723         (info_macros_command): Pass print_macro_definition as callable
10724         directly.
10725         (print_one_macro): Remove 'ignore' parameter.
10726         (macro_list_command): Adjust.
10727         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10728         (macro_for_each_data::user_data): Delete field.
10729         (foreach_macro): Adjust to call the function_view.
10730         (macro_for_each): Adjust to use function_view as callback type.
10731         (foreach_macro_in_scope): Adjust to call the function_view.
10732         (macro_for_each_in_scope): Adjust to use function_view as callback
10733         type.
10734         * macrotab.h: Include "common/function-view.h".
10735         (macro_callback_fn): Declare a prototype instead of a pointer.
10736         Remove "user_data" parameter.
10737         (macro_for_each, macro_for_each_in_scope): Adjust to use
10738         function_view as callback type.
10739         * psymtab.c (partial_map_expand_apply)
10740         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10741         Adjust to use function_view as callback type and to return bool.
10742         (psym_expand_symtabs_matching): Adjust to use function_view as
10743         callback types.
10744         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10745         to use function_view as callback type and to return bool.
10746         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10747         callback types.
10748         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10749         as callback types.
10750         * symfile.h: Include "common/function-view.h".
10751         (expand_symtabs_file_matcher_ftype)
10752         (expand_symtabs_symbol_matcher_ftype)
10753         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10754         return bool.
10755         (quick_symbol_functions::map_symtabs_matching_filename)
10756         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10757         function_view as callback type and return bool.
10758         (expand_symtabs_matching): Adjust to use function_view as callback
10759         type.
10760         (maintenance_expand_name_matcher)
10761         (maintenance_expand_file_matcher): Delete.
10762         (maintenance_expand_symtabs): Use lambdas.
10763         * symtab.c (iterate_over_some_symtabs): Adjust to use
10764         function_view as callback types and return bool.
10765         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10766         of a cleanup.
10767         (lookup_symtab_callback): Delete.
10768         (lookup_symtab): Use a lambda.
10769         (iterate_over_symbols): Adjust to use function_view as callback
10770         type.
10771         (struct search_symbols_data, search_symbols_file_matches)
10772         (search_symbols_name_matches): Delete.
10773         (search_symbols): Use a pair of lambdas.
10774         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10775         (symtab_expansion_callback): Delete.
10776         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10777         * symtab.h: Include "common/function-view.h".
10778         (iterate_over_some_symtabs): Adjust to use function_view as
10779         callback type and return bool.
10780         (iterate_over_symtabs): Adjust to use function_view as callback
10781         type.
10782         (symbol_found_callback_ftype): Remove 'data' parameter and return
10783         bool.
10784         (iterate_over_symbols): Adjust to use function_view as callback
10785         type.
10786
10787 2017-02-23  Pedro Alves  <palves@redhat.com>
10788
10789         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10790         (%.o) <unittests/%.c>: New pattern.
10791         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10792         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10793         * common/function-view.h: New file.
10794         * unittests/function-view-selftests.c: New file.
10795         * configure: Regenerate.
10796
10797 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10798
10799         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10800         inferior_ptid.
10801         * go32-nat.c (go32_thread_alive): Likewise.
10802
10803 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10804
10805         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10806         delete.
10807
10808 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10809
10810         * varobj.c (varobj_clear_saved_item): Use delete instead of
10811         xfree.
10812         (update_dynamic_varobj_children): Likewise.
10813
10814 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10815
10816         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10817
10818 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10819
10820         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10821         m_enum_value to 0 in default constructor.
10822
10823 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10824
10825         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10826         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10827         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10828         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10829         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10830         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10831         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10832         IS_STORE_CONDITIONAL_INSN.
10833
10834 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10835
10836         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10837
10838 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10839
10840         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10841
10842 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10843
10844         * dwarf2read.c (skip_one_die, read_attribute_value)
10845         (dwarf2_const_value_attr, dump_die_shallow)
10846         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10847         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10848
10849 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10850
10851         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10852         (dwarf_parse_macro_header): Accept DWARF version 5.
10853         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10854
10855 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10856
10857         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10858         DW_AT_GNU_*.
10859         * common/common-exceptions.h (enum errors): Likewise.
10860         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10861         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10862         (dwarf_expr_context::execute_stack_op): Likewise.
10863         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10864         Likewise.
10865         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10866         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10867         (show_entry_values_debug, call_site_to_target_addr)
10868         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10869         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10870         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10871         (value_of_dwarf_block_entry, indirect_pieced_value)
10872         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10873         (disassemble_dwarf_expression): Likewise.
10874         * dwarf2read.c (process_die, inherit_abstract_dies)
10875         (read_call_site_scope): Likewise.
10876         * gdbtypes.h (struct func_type, struct call_site_parameter)
10877         (struct call_site): Likewise.
10878         * stack.c (read_frame_arg): Likewise.
10879         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10880
10881 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10882
10883         * defs.h (read_unsigned_leb128): New declaration.
10884         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10885         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10886         (dwarf2_find_location_expression): Call also
10887         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10888         * dwarf2loc.h (dwarf2_version): New declaration.
10889         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10890         rnglists.
10891         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10892         .debug_rnglists.
10893         (struct dwop_section_names): Add loclists_dwo.
10894         (dwop_section_names): Add .debug_loclists.dwo.
10895         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10896         (struct dwarf2_per_cu_data): Add dwarf_version.
10897         (struct dwo_sections): Add loclists.
10898         (struct attr_abbrev): Add implicit_const.
10899         (read_indirect_line_string): New declaration.
10900         (read_unsigned_leb128): Delete declaration.
10901         (rcuh_kind): New definition.
10902         (read_and_check_comp_unit_head): Change parameter
10903         is_debug_types_section to section_kind.
10904         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10905         (read_comp_unit_head): Change parameter abfd to section, add parameter
10906         section_kind.  Handle DWARF-5.
10907         (error_check_comp_unit_head): Accept also DWARF version 5.
10908         (read_and_check_comp_unit_head): Change parameter
10909         is_debug_types_section to section_kind.
10910         (read_and_check_type_unit_head): Delete function.
10911         (read_abbrev_offset): Handle DWARF-5.
10912         (create_debug_type_hash_table): Add parameter section_kind.  Process
10913         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10914         comp_unit_head.
10915         (create_debug_types_hash_table): Update create_debug_type_hash_table
10916         caller.
10917         (create_all_type_units): Call create_debug_type_hash_table.
10918         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10919         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10920         caller.
10921         (skip_one_die): Handle DW_FORM_implicit_const.
10922         (dwarf2_rnglists_process): New function.
10923         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10924         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10925         (read_attribute_value): Handle DW_FORM_implicit_const,
10926         DW_FORM_line_strp.
10927         (read_attribute): Handle DW_FORM_implicit_const.
10928         (read_indirect_string_at_offset_from): New function from
10929         read_indirect_string_at_offset.
10930         (read_indirect_string_at_offset): Call
10931         read_indirect_string_at_offset_from.
10932         (read_indirect_line_string_at_offset): New function.
10933         (read_indirect_string): New function comment.
10934         (read_indirect_line_string): New function.
10935         (read_unsigned_leb128): Make it global.
10936         (dwarf2_string_attr): Handle DWARF-5.
10937         (add_include_dir_stub, read_formatted_entries): New functions.
10938         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10939         Handle DWARF-5.
10940         (per_cu_header_read_in): Update read_comp_unit_head caller.
10941         (dwarf2_version): New function.
10942         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10943         rnglists.
10944         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10945         fields.
10946
10947 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10948
10949         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10950
10951 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10952
10953         * dwarf2read.c (dwarf2_ranges_process): New function from
10954         dwarf2_ranges_read.
10955         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10956         dwarf2_ranges_process.
10957
10958 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10959
10960         * dwarf2read.c (create_debug_type_hash_table): New function from
10961         create_debug_types_hash_table.
10962         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10963         (create_all_type_units, open_and_init_dwo_file): Update
10964         create_debug_types_hash_table callers.
10965
10966 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10967
10968         PR gdb/16188
10969         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10970         refer to 'ap', not 'args'.
10971
10972 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10973             Pedro Alves  <palves@redhat.com>
10974
10975         PR gdb/16188
10976         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10977         calls succeeded.
10978         * fork-child.c (trace_start_error): New function.
10979         (trace_start_error_with_name): Likewise.
10980         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10981         * inf-ptrace.c (inf_ptrace_me): Likewise.
10982         * inferior.h (trace_start_error): New prototype.
10983         (trace_start_error_with_name): Likewise.
10984
10985 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10986
10987         PR gdb/21164
10988         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10989         NULL before using it.
10990         * symmisc.c (maintenance_print_symbols): Likewise.
10991         (maintenance_print_msymbols): Likewise.
10992
10993 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10994
10995         * NEWS: Add record Python bindings entry.
10996
10997 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10998
10999         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11000         py-record-full.o.
11001         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11002         * python/py-record-btrace.c, python/py-record-btrace.h,
11003         python/py-record-full.c, python/py-record-full.h: New file.
11004         * python/py-record.c: Add include for py-record-btrace.h and
11005         py-record-full.h.
11006         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11007         recpy_instruction_history, recpy_function_call_history, recpy_begin,
11008         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11009         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11010         New definition.
11011         (gdbpy_initialize_btrace): New export.
11012         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11013
11014 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11015
11016         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11017         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11018         * python/py-record.c: New file.
11019         * python/python-internal.h (gdbpy_start_recording,
11020         gdbpy_current_recording, gdpy_stop_recording,
11021         gdbpy_initialize_record): New export.
11022         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11023         (python_GdbMethods): Add gdbpy_start_recording,
11024         gdbpy_current_recording and gdbpy_stop_recording.
11025
11026 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11027
11028         * record-btrace.c (record_btrace_record_method): New function.
11029         (init_record_btrace_ops): Initialize to_record_method.
11030         * record-full.c (record_full_record_method): New function.
11031         (init_record_full_ops, init_record_full_core_ops): Add
11032         record_full_record_method.
11033         * record.h (enum record_method): New enum.
11034         * target-debug.h (target_debug_print_enum_record_method: New define.
11035         * target-delegates.c: Regenerate.
11036         * target.c (target_record_method): New function.
11037         * target.h: Include record.h.
11038         (struct target_ops) <to_record_method>: New field.
11039         (target_record_method): New export.
11040
11041 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11042
11043         * record.h (record_start, record_stop): New export.
11044         * record.c (record_start, record_stop): New function.
11045
11046 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11047
11048         * btrace.c (btrace_fetch): Copy function call segments pointer
11049         into a vector.
11050         (btrace_clear): Clear the vector.
11051         (btrace_find_insn_by_number): Use binary search to find the correct
11052         function call segment.
11053         * btrace.h (brace_fun_p): New typedef.
11054         (struct btrace_thread_info) <functions>: New field.
11055
11056 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11057
11058         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11059         * btrace.c (btrace_decode_error): ... here.  New function.
11060         * btrace.h (btrace_decode_error): New export.
11061
11062 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11063
11064         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11065         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11066         btrace_find_insn_by_number): Remove special case for gaps.
11067         * btrace.h (btrace_insn_get_error): New export.
11068         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11069         * record-btrace.c (btrace_insn_history): Print number for gaps.
11070         (record_btrace_info, record_btrace_goto): Handle gaps.
11071
11072 2017-02-14  Tom Tromey  <tom@tromey.com>
11073
11074         PR python/13598:
11075         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11076         event.
11077         * python/py-evts.c (gdbpy_initialize_py_events): Add
11078         before_prompt registry.
11079         * python/py-events.h (events_object) <before_prompt>: New field.
11080
11081 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11082
11083         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11084
11085 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11086
11087         * symfile (_initialize_symfile): Add usage text to the load command's
11088         help text.
11089
11090 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11091
11092         * utils.c (defaulted_query): Don't query on secondary UIs.
11093
11094 2017-02-10  Tom Tromey  <tom@tromey.com>
11095
11096         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11097
11098 2017-02-10  Tom Tromey  <tom@tromey.com>
11099
11100         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11101         "cleanup" local.
11102         * python/py-type.c (typy_legacy_template_argument): Remove
11103         unnecessary "cleanup" local.
11104
11105 2017-02-10  Tom Tromey  <tom@tromey.com>
11106
11107         * python/python.c (do_start_initialization): New function, from
11108         _initialize_python.
11109         (_initialize_python): Call do_start_initialization.
11110         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11111         goto.
11112
11113 2017-02-10  Tom Tromey  <tom@tromey.com>
11114
11115         * python/py-prettyprint.c (pretty_print_one_value): Use
11116         gdbpy_ref.
11117
11118 2017-02-10  Tom Tromey  <tom@tromey.com>
11119
11120         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11121         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11122         gdbpy_ref.
11123         * python/py-type.c (field_new): Use gdbpy_ref.
11124         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11125         gdbpy_ref.
11126         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11127         (py_free_pspace): Likewise.
11128         (pspace_to_pspace_object): Likewise.
11129         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11130         (py_free_objfile): Likewise.
11131         (objfile_to_objfile_object): Likewise.
11132         * python/py-inferior.c (delete_thread_object): Use
11133         gdbpy_ref.
11134         (infpy_read_memory): Likewise.
11135         (py_free_inferior): Likewise.
11136         * python/py-evtregistry.c (create_eventregistry_object): Use
11137         gdbpy_ref.
11138         * python/py-event.c (create_event_object): Use gdbpy_ref.
11139
11140 2017-02-10  Tom Tromey  <tom@tromey.com>
11141
11142         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11143         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11144         used.
11145         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11146         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11147         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11148         python/py-framefilter.c, python/py-function.c,
11149         python/py-inferior.c, python/py-infevents.c,
11150         python/py-linetable.c, python/py-newobjfileevent.c,
11151         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11152         python/py-signalevent.c, python/py-stopevent.c,
11153         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11154         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11155         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11156         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11157
11158 2017-02-10  Tom Tromey  <tom@tromey.com>
11159
11160         * ui-out.h (ui_out_emit_type): New class.
11161         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11162         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11163         and ui_out_emit_tuple.
11164         (enumerate_locals): Likewise.
11165         (py_mi_print_variables, py_print_locals, py_print_args): Use
11166         ui_out_emit_list.
11167         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11168         ui_out_emit_list.
11169         * common/gdb_optional.h: New file.
11170
11171 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11172
11173         * MAINTAINERS (Write After Approval): Update my e-mail address.
11174
11175 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11176
11177         PR gdb/21122
11178         * breakpoint.c (_initialize_breakpoint): Update the help description
11179         of the 'commands' command to indicate that it takes a list argument.
11180
11181 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11182
11183         * interps.c (current_interp_set_logging): Remove "return".
11184
11185 2017-02-09  Gary Benson  <gbenson@redhat.com>
11186
11187         * symtab.c (add_symtab_completions): Prevent NULL pointer
11188         dereference.
11189
11190 2017-02-08  Pedro Alves  <palves@redhat.com>
11191
11192         * interps.c (interp::interp): Remove reference to quiet_p.
11193         (interp_set): Make static.  Remove dead "Switching to" output
11194         code.
11195         (interp_quiet_p, interp_set_quiet): Delete.
11196         (interpreter_exec_cmd): Don't set the interpreter quiet.
11197         * interps.h (interp_quiet_p): Make static.
11198         (class interp) <quiet_p>: Remove field
11199
11200 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11201
11202         * cli/cli-decode.c (find_command_name_length): Make it extern.
11203         * cli/cli-decode.h (find_command_name_length): Declare.
11204         * cli/cli-script.c (command_name_equals, line_first_arg):
11205         New functions.
11206         (process_next_line): Use cli-decode to parse command names.
11207         (build_command_line): Make args a constant pointer.
11208
11209 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11210
11211         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11212         Remove case-insensitive search.
11213
11214 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11215
11216         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11217         at the end of the line.  Avoids an ARI warning.
11218
11219 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11220
11221         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11222         rdseed instructions.
11223         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11224
11225 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11226
11227         PR tdep/20936
11228         Provide and use sparc32 and sparc64 target description XML files.
11229         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11230         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11231         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11232         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11233         * features/sparc/sparc32-solaris.xml: New file.
11234         * features/sparc/sparc64-solaris.xml: New file.
11235         * features/sparc/sparc32-solaris.c: Generated.
11236         * features/sparc/sparc64-solaris.c: Generated.
11237         * sparc-tdep.h: Account for differences in target descriptions.
11238         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11239         (sparc32_register_type): Use target provided registers.
11240         (validate_tdesc_registers): New function.
11241         (sparc32_gdbarch_init): Use tdesc_has_registers.
11242         Set pseudoregister functions.
11243         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11244         (sparc64_register_type): Use target provided registers.
11245         (sparc64_init_abi): Set pseudoregister functions.
11246
11247 2017-02-03  Tom Tromey  <tom@tromey.com>
11248
11249         PR rust/21097:
11250         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11251         with a single member.
11252
11253 2017-02-03  Pedro Alves  <palves@redhat.com>
11254
11255         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11256         (cli_interp_base::~cli_interp_base): New.
11257         (cli_interp): New struct.
11258         (as_cli_interp): Cast the interp itself to cli_interp.
11259         (cli_interpreter_pre_command_loop): Rename to ...
11260         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11261         parameter.
11262         (cli_interpreter_init): Rename to ...
11263         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11264         boolean.  Make extern.
11265         (cli_interpreter_resume): Rename to ...
11266         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11267         extern.
11268         (cli_interpreter_suspend): Rename to ...
11269         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11270         extern.
11271         (cli_interpreter_exec): Rename to ...
11272         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11273         extern.
11274         (cli_interpreter_supports_command_editing): Rename to ...
11275         (cli_interp_base::supports_command_editing): ... this.  Remove
11276         'interp' parameter.  Make extern.
11277         (cli_ui_out): Rename to ...
11278         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11279         Make extern.
11280         (cli_set_logging): Rename to ...
11281         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11282         parameter.  Make extern.
11283         (cli_interp_procs): Delete.
11284         (cli_interp_factory): Adjust to use "new".
11285         * cli/cli-interp.h: Include "interps.h".
11286         (struct cli_interp_base): New struct.
11287         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11288         (interp_new): Delete.
11289         (interp::interp, interp::~interp): New.
11290         (interp_set): Use bool, and return void.  Assume the interpreter
11291         has suspend, init and resume methods, and that the all return
11292         void.
11293         (set_top_level_interpreter): interp_set returns void.
11294         (interp_ui_out): Adapt.
11295         (current_interp_set_logging): Adapt.
11296         (interp_data): Delete.
11297         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11298         (interp_exec): Adapt.
11299         (top_level_interpreter_data): Delete.
11300         * interps.h (interp_init_ftype, interp_resume_ftype)
11301         (interp_suspend_ftype, interp_exec_ftype)
11302         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11303         (class interp): New.
11304         (interp_new): Delete.
11305         (interp_set): Now returns void.  Use bool.
11306         (interp_data, top_level_interpreter_data): Delete.
11307         * mi/mi-common.h: Include interps.h.
11308         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11309         init, resume, suspect, exec, interp_ui_out, set_logging and
11310         pre_command_loop methods.
11311         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11312         (mi_interpreter_init): Rename to ...
11313         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11314         bool, return void and make extern.  Adjust.
11315         (mi_interpreter_resume): ... Rename to ...
11316         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11317         return void and make extern.  Adjust.
11318         (mi_interpreter_suspend): ... Rename to ...
11319         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11320         return void and make extern.  Adjust.
11321         (mi_interpreter_exec): ... Rename to ...
11322         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11323         extern.  Adjust.
11324         (mi_interpreter_pre_command_loop): ... Rename to ...
11325         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11326         parameter and make extern.
11327         (mi_on_normal_stop_1): Adjust.
11328         (mi_ui_out): Rename to ...
11329         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11330         parameter and make extern.  Adjust.
11331         (mi_set_logging): Rename to ...
11332         (mi_interp::set_logging): ... this.  Remove the 'interp'
11333         parameter and make extern.  Adjust.
11334         (mi_interp_procs): Delete.
11335         (mi_interp_factory): Adjust to use 'new'.
11336         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11337         (mi_print_exception, mi_execute_command, mi_load_progress):
11338         Adjust.
11339         * tui/tui-interp.c (tui_interp): New class.
11340         (as_tui_interp): Return a tui_interp pointer.
11341         (tui_on_normal_stop, tui_on_signal_received)
11342         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11343         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11344         to use interp::interp_ui_out.
11345         (tui_init): Rename to ...
11346         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11347         bool, return void and make extern.  Adjust.
11348         (tui_resume): Rename to ...
11349         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11350         return void and make extern.  Adjust.
11351         (tui_suspend): Rename to ...
11352         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11353         return void and make extern.  Adjust.
11354         (tui_ui_out): Rename to ...
11355         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11356         parameter, and make extern.  Adjust.
11357         (tui_exec): Rename to ...
11358         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11359         make extern.
11360         (tui_interp_procs): Delete.
11361         (tui_interp_factory): Use "new".
11362
11363 2017-02-02  Tom Tromey  <tom@tromey.com>
11364
11365         * rust-exp.y (ends_raw_string, space_then_number)
11366         (rust_identifier_start_p): Return bool.
11367         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11368         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11369         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11370         (rust_chartype_p): Return bool.
11371         (val_print_struct, rust_print_struct_def, rust_print_type):
11372         Update.
11373         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11374         Return bool.
11375
11376 2017-02-02  Tom Tromey  <tom@tromey.com>
11377
11378         * rust-lang.c: Reindent.
11379
11380 2017-02-02  Tom Tromey  <tom@tromey.com>
11381
11382         * rust-lang.h (rust_crate_for_block): Update.
11383         * rust-lang.c (rust_crate_for_block): Return std::string.
11384         (rust_get_disr_info): Use std:;string, not
11385         gdb::unique_xmalloc_ptr.
11386         * rust-exp.y (crate_name): Update.
11387
11388 2017-02-02  Pedro Alves  <palves@redhat.com>
11389
11390         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11391         field out of gdb_disassembler_test and make it static.
11392
11393 2017-02-02  Pedro Alves  <palves@redhat.com>
11394
11395         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11396         mi1_interp and mi_interp fields.
11397
11398 2017-02-02  Pedro Alves  <palves@redhat.com>
11399
11400         * cli/cli-interp.c (struct saved_output_files, saved_output):
11401         Moved from cli/cli-logging.c.
11402         (cli_set_logging): New function.
11403         (cli_interp_procs): Install cli_set_logging.
11404         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11405         Declare.
11406         * cli/cli-logging.c (struct saved_output_files, saved_output):
11407         Moved to cli/cli-interp.c.
11408         (pop_output_files): Don't save outputs here.
11409         (make_logging_output): New function.
11410         (handle_redirections): Don't build tee nor save previous outputs
11411         here.
11412         * interps.c (current_interp_set_logging): Change prototype.
11413         Assume there's always a set_logging_proc method installed.
11414         * interps.h (interp_set_logging_ftype): Change prototype.
11415         (current_interp_set_logging): Change prototype and adjust comment.
11416         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11417         use make_logging_output.
11418         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11419 2017-02-02  Pedro Alves  <palves@redhat.com>
11420
11421         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11422         from ...
11423         (set_logging_overwrite): ... here.
11424         (logging_no_redirect_file): Delete.
11425         (set_logging_redirect): Don't handle redirection on the fly.
11426         Instead warn that "logging off" / "logging on" is necessary.
11427         (pop_output_files): Delete references to logging_no_redirect_file.
11428         (show_logging_command): Always speak in terms of what will happen
11429         once logging is reenabled.
11430
11431 2017-02-02  Pedro Alves  <palves@redhat.com>
11432
11433         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11434
11435 2017-02-02  Pedro Alves  <palves@redhat.com>
11436
11437         * disasm.c (gdb_pretty_print_insn): Rename to ...
11438         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11439         Remove gdbarch parameter.  Adapt to clear the object's buffers
11440         instead of allocating new buffers, and to print using the object's
11441         gdb_disassembler instead of calling gdb_print_insn.
11442         (dump_insns): Use gdb_pretty_print_disassembler.
11443         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11444         (gdb_pretty_print_disassembler): New class.
11445         * record-btrace.c (btrace_insn_history): Use
11446         gdb_pretty_print_disassembler.
11447
11448 2017-02-02  Pedro Alves  <palves@redhat.com>
11449
11450         * ada-lang.c (type_as_string): Use string_file.
11451         * ada-valprint.c (ada_print_floating): Use string_file.
11452         * ada-varobj.c (ada_varobj_scalar_image)
11453         (ada_varobj_get_value_image): Use string_file.
11454         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11455         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11456         * breakpoint.c (update_inserted_breakpoint_locations)
11457         (insert_breakpoint_locations, reattach_breakpoints)
11458         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11459         (print_it_watchpoint): Use string_file.
11460         (save_breakpoints): Use stdio_file.
11461         * c-exp.y (oper): Use string_file.
11462         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11463         tee_file.
11464         (pop_output_files): Use delete.
11465         (handle_redirections): Use stdio_file and tee_file.
11466         * cli/cli-setshow.c (do_show_command): Use string_file.
11467         * compile/compile-c-support.c (c_compute_program): Use
11468         string_file.
11469         * compile/compile-c-symbols.c (generate_vla_size): Take a
11470         'string_file &' instead of a 'ui_file *'.
11471         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11472         of a 'ui_file *'.  Use string_file.
11473         (generate_c_for_variable_locations): Take a 'string_file &'
11474         instead of a 'ui_file *'.
11475         * compile/compile-internal.h (generate_c_for_for_one_variable):
11476         Take a 'string_file &' instead of a 'ui_file *'.
11477         * compile/compile-loc2c.c (push, pushf, unary, binary)
11478         (print_label, pushf_register_address, pushf_register)
11479         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11480         'ui_file *'.  Adjust.
11481         * compile/compile.c (compile_to_object): Use string_file.
11482         * compile/compile.h (compile_dwarf_expr_to_c)
11483         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11484         'ui_file *'.
11485         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11486         (replace_typedefs_qualified_name): Use string_file and
11487         obstack_copy0.
11488         * disasm.c (gdb_pretty_print_insn): Use string_file.
11489         (gdb_disassembly): Adjust reference the null_stream global.
11490         (do_ui_file_delete): Delete.
11491         (gdb_insn_length): Use null_stream.
11492         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11493         * dwarf2loc.c (dwarf2_compile_property_to_c)
11494         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11495         'string_file &' instead of a 'ui_file *'.
11496         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11497         * dwarf2read.c (do_ui_file_peek_last): Delete.
11498         (dwarf2_compute_name): Use string_file.
11499         * event-top.c (gdb_setup_readline): Use stdio_file.
11500         * gdbarch.sh (verify_gdbarch): Use string_file.
11501         * gdbtypes.c (safe_parse_type): Use null_stream.
11502         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11503         string_file.
11504         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11505         'string_file *' instead of a 'ui_file *'.
11506         (gdbscm_arch_disassemble): Use string_file.
11507         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11508         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11509         inherits from ui_file.
11510         (ioscm_file_port_delete, ioscm_file_port_rewind)
11511         (ioscm_file_port_put): Delete.
11512         (ioscm_file_port_write): Rename to ...
11513         (ioscm_file_port::write): ... this.  Remove file_port_magic
11514         checks.
11515         (ioscm_file_port_new): Delete.
11516         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11517         ui_file_up.
11518         * guile/scm-type.c (tyscm_type_name): Use string_file.
11519         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11520         Use string_file.
11521         * infcmd.c (print_return_value_1): Use string_file.
11522         * infrun.c (print_target_wait_results): Use string_file.
11523         * language.c (add_language): Use string_file.
11524         * location.c (explicit_to_string_internal): Use string_file.
11525         * main.c (captured_main_1): Use null_file.
11526         * maint.c (maintenance_print_architecture): Use stdio_file.
11527         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11528         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11529         event_channel>: Change type to mi_console_file pointer.
11530         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11531         (mi_console_file_delete): Delete.
11532         (struct mi_console_file): Delete.
11533         (mi_console_file_magic): Delete.
11534         (mi_console_file_new): Delete.
11535         (mi_console_file::mi_console_file): New.
11536         (mi_console_file_delete): Delete.
11537         (mi_console_file_fputs): Delete.
11538         (mi_console_file::write): New.
11539         (mi_console_raw_packet): Delete.
11540         (mi_console_file::flush): New.
11541         (mi_console_file_flush): Delete.
11542         (mi_console_set_raw): Rename to ...
11543         (mi_console_file::set_raw): ... this.
11544         * mi/mi-console.h (class mi_console_file): New class.
11545         (mi_console_file_new, mi_console_set_raw): Delete.
11546         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11547         (mi_set_logging): Use delete and tee_file.  Adjust.
11548         * mi/mi-main.c (output_register): Use string_file.
11549         (mi_cmd_data_evaluate_expression): Use string_file.
11550         (mi_cmd_data_read_memory): Use string_file.
11551         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11552         * mi/mi-out.c (mi_ui_out::main_stream): New.
11553         (mi_ui_out::rewind): Use main_stream and
11554         string_file.
11555         (mi_ui_out::put): Use main_stream and string_file.
11556         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11557         Allocate a 'string_file' instead.
11558         (mi_out_new): Don't allocate a mem_fileopen stream here.
11559         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11560         (mi_ui_out::main_stream): Declare method.
11561         * printcmd.c (eval_command): Use string_file.
11562         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11563         * python/py-arch.c (archpy_disassemble): Use string_file.
11564         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11565         * python/py-frame.c (frapy_str): Use string_file.
11566         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11567         Use string_file.
11568         * python/py-type.c (typy_str): Use string_file.
11569         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11570         * python/py-value.c (valpy_str): Use string_file.
11571         * record-btrace.c (btrace_insn_history): Use string_file.
11572         * regcache.c (regcache_print): Use stdio_file.
11573         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11574         * remote.c (escape_buffer): Use string_file.
11575         * rust-lang.c (rust_get_disr_info): Use string_file.
11576         * serial.c (serial_open_ops_1): Use stdio_file.
11577         (do_serial_close): Use delete.
11578         * stack.c (print_frame_arg): Use string_file.
11579         (print_frame_args): Remove local mem_fileopen stream, not used.
11580         (print_frame): Use string_file.
11581         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11582         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11583         Take a 'string_file *' instead of a 'ui_file *'.
11584         * top.c (new_ui): Use stdio_file and stderr_file.
11585         (free_ui): Use delete.
11586         (execute_command_to_string): Use string_file.
11587         (quit_confirm): Use string_file.
11588         * tracepoint.c (collection_list::append_exp): Use string_file.
11589         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11590         * tui/tui-file.c: Don't include "ui-file.h".
11591         (enum streamtype, struct tui_stream): Delete.
11592         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11593         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11594         (tui_file::tui_file): New method.
11595         (tui_file_fputs): Delete.
11596         (tui_file_get_strbuf): Delete.
11597         (tui_file::puts): New method.
11598         (tui_file_adjust_strbuf): Delete.
11599         (tui_file_flush): Delete.
11600         (tui_file::flush): New method.
11601         * tui/tui-file.h: Tweak intro comment.
11602         Include ui-file.h.
11603         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11604         (tui_file_adjust_strbuf): Delete declarations.
11605         (class tui_file): New class.
11606         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11607         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11608         (tui_register_format): Use string_stream.
11609         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11610         (tui_get_function_from_frame): Use string_file.
11611         * typeprint.c (type_to_string): Use string_file.
11612         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11613         (null_stream): New global.
11614         (ui_file_delete): Delete.
11615         (ui_file::ui_file): New.
11616         (null_file_isatty): Delete.
11617         (ui_file::~ui_file): New.
11618         (null_file_rewind): Delete.
11619         (ui_file::printf): New.
11620         (null_file_put): Delete.
11621         (null_file_flush): Delete.
11622         (ui_file::putstr): New.
11623         (null_file_write): Delete.
11624         (ui_file::putstrn): New.
11625         (null_file_read): Delete.
11626         (ui_file::putc): New.
11627         (null_file_fputs): Delete.
11628         (null_file_write_async_safe): Delete.
11629         (ui_file::vprintf): New.
11630         (null_file_delete): Delete.
11631         (null_file::write): New.
11632         (null_file_fseek): Delete.
11633         (null_file::puts): New.
11634         (ui_file_data): Delete.
11635         (null_file::write_async_safe): New.
11636         (gdb_flush, ui_file_isatty): Adjust.
11637         (ui_file_put, ui_file_rewind): Delete.
11638         (ui_file_write): Adjust.
11639         (ui_file_write_for_put): Delete.
11640         (ui_file_write_async_safe, ui_file_read): Adjust.
11641         (ui_file_fseek): Delete.
11642         (fputs_unfiltered): Adjust.
11643         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11644         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11645         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11646         (set_ui_file_data): Delete.
11647         (string_file::~string_file, string_file::write)
11648         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11649         (do_ui_file_as_string, ui_file_as_string): Delete.
11650         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11651         (struct mem_file): Delete.
11652         (mem_file_new): Delete.
11653         (stdio_file::stdio_file): New.
11654         (mem_file_delete): Delete.
11655         (stdio_file::stdio_file): New.
11656         (mem_fileopen): Delete.
11657         (stdio_file::~stdio_file): New.
11658         (mem_file_rewind): Delete.
11659         (stdio_file::set_stream): New.
11660         (mem_file_put): Delete.
11661         (stdio_file::open): New.
11662         (mem_file_write): Delete.
11663         (stdio_file_magic, struct stdio_file): Delete.
11664         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11665         (stdio_file::flush): New.
11666         (stdio_file_read): Rename to ...
11667         (stdio_file::read): ... this.  Adjust.
11668         (stdio_file_write): Rename to ...
11669         (stdio_file::write): ... this.  Adjust.
11670         (stdio_file_write_async_safe): Rename to ...
11671         (stdio_file::write_async_safe) ... this.  Adjust.
11672         (stdio_file_fputs): Rename to ...
11673         (stdio_file::puts) ... this.  Adjust.
11674         (stdio_file_isatty): Delete.
11675         (stdio_file_fseek): Delete.
11676         (stdio_file::isatty): New.
11677         (stderr_file_write): Rename to ...
11678         (stderr_file::write) ... this.  Adjust.
11679         (stderr_file_fputs): Rename to ...
11680         (stderr_file::puts) ... this.  Adjust.
11681         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11682         (stderr_file::stderr_file): New.
11683         (tee_file_magic): Delete.
11684         (struct tee_file): Delete.
11685         (tee_file::tee_file): New.
11686         (tee_file_new): Delete.
11687         (tee_file::~tee_file): New.
11688         (tee_file_delete): Delete.
11689         (tee_file_flush): Rename to ...
11690         (tee_file::flush): ... this.  Adjust.
11691         (tee_file_write): Rename to ...
11692         (tee_file::write): ... this.  Adjust.
11693         (tee_file::write_async_safe): New.
11694         (tee_file_fputs): Rename to ...
11695         (tee_file::puts): ... this.  Adjust.
11696         (tee_file_isatty): Rename to ...
11697         (tee_file::isatty): ... this.  Adjust.
11698         * ui-file.h (struct obstack, struct ui_file): Don't
11699         forward-declare.
11700         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11701         (ui_file_write_ftype)
11702         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11703         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11704         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11705         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11706         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11707         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11708         (set_ui_file_fseek): Delete.
11709         (ui_file_data, ui_file_delete, ui_file_rewind)
11710         (struct ui_file): New.
11711         (ui_file_up): New.
11712         (class null_file): New.
11713         (null_stream): Declare.
11714         (ui_file_write_for_put, ui_file_put): Delete.
11715         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11716         Delete.
11717         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11718         (gdb_fopen, tee_file_new): Delete.
11719         (struct string_file): New.
11720         (struct stdio_file): New.
11721         (stdio_file_up): New.
11722         (struct stderr_file): New.
11723         (class tee_file): New.
11724         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11725         of a 'ui_file *'.  Adjust.
11726         * ui-out.h (class ui_out) <field_stream>: Likewise.
11727         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11728         (null_stream): Delete.
11729         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11730         Adjust.
11731         * utils.h (struct ui_file): Delete forward declaration..
11732         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11733         (error_stream): Take a 'string_file &' instead of a
11734         'ui_file *'.
11735         * varobj.c (varobj_value_get_print_value): Use string_file.
11736         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11737         * gdbarch.c: Regenerate.
11738
11739 2017-02-02  Pedro Alves  <palves@redhat.com>
11740
11741         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11742         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11743         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11744         Adjust to call gdb_print_insn instead of
11745         gdb_disassembler::print_insn.
11746         (dump_insns, do_mixed_source_and_assembly_deprecated)
11747         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11748         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11749         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11750         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11751         declaration.
11752         (gdb_pretty_print_insn): Re-add declaration.
11753         * record-btrace.c (btrace_insn_history): Don't allocate a
11754         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11755
11756 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11757
11758         * disasm.h (gdb_disassembly): Remove file_string parameter.
11759         * disasm.c (gdb_disassembly): Likewise.
11760         * cli/cli-cmds.c (print_disassembly): Adapt.
11761         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11762         * stack.c (do_gdb_disassembly): Likewise.
11763
11764 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11765
11766         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11767         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11768         targets.  And if the implicit value is longer than needed, extract
11769         the first bytes instead of the "least significant" ones.
11770
11771 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11772
11773         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11774         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11775         (btrace_fetch): Assert can_access_registers_ptid.
11776         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11777         validate_registers_access.
11778
11779 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11780
11781         * gdbthread.h (can_access_registers_ptid): New.
11782         * thread.c (can_access_registers_ptid): New.
11783
11784 2017-02-01  Pedro Alves  <palves@redhat.com>
11785
11786         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11787
11788 2017-01-31  Pedro Alves  <palves@redhat.com>
11789
11790         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11791         Fix typos.
11792
11793 2017-01-31  Pedro Alves  <palves@redhat.com>
11794
11795         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11796         not used.
11797
11798 2017-01-31  Pedro Alves  <palves@redhat.com>
11799
11800         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11801
11802 2017-01-31  Pedro Alves  <palves@redhat.com>
11803
11804         * common/scoped_restore.h
11805         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11806         change the value's parameter type to T2.
11807         (make_scoped_restore): Likewise.
11808
11809 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11810             Richard Henderson  <rth@redhat.com>
11811
11812         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11813         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11814         GS_BASE for older kernels.
11815         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11816         GS_BASE for older kernels.
11817         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11818         and GS_BASE to the offset table.
11819         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11820         system register group.
11821         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11822         for older kernels.
11823         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11824         amd64 ABI.
11825         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11826         AMD64_GSBASE_REGNUM.
11827         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11828         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11829         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11830         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11831         i386/64bit-segments.xml in those rules.
11832         * features/i386/64bit-segments.xml: New file.
11833         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11834         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11835         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11836         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11837         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11838         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11839         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11840         * features/i386/amd64-avx-linux.c: Regenerated.
11841         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11842         * features/i386/amd64-avx-mpx.c: Regenerated.
11843         * features/i386/amd64-avx512-linux.c: Regenerated.
11844         * features/i386/amd64-linux.c: Regenerated.
11845         * features/i386/amd64-mpx-linux.c: Regenerated.
11846         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11847         * features/i386/i386-avx-mpx.c: Regenerated.
11848         * features/i386/x32-avx-linux.c: Regenerated.
11849         * features/i386/x32-avx512-linux.c: Regenerated.
11850         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11851         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11852         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11853         * regformats/i386/amd64-linux.dat: Regenerated.
11854         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11855         * regformats/i386/x32-avx-linux.dat: Regenerated.
11856         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11857         * regformats/i386/x32-linux.dat: Regenerated.
11858
11859 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11860
11861         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11862         Set to AMD64_NUM_REGS.
11863
11864 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11865
11866         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11867         that checks validity of a register number.
11868
11869 2017-01-27  Kees Cook  <keescook@google.com>
11870
11871         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11872         fetch_fpregs if target has fpa registers.
11873         (arm_linux_store_inferior_registers): Call store_fpregs if target
11874         has fpa registers.
11875
11876 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11877
11878         * cris-tdep.c (cris_gdbarch_init): Remove check for
11879         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11880
11881 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11882
11883         * corelow.c (get_core_register_section): Check for regset
11884         existence before checking for REGSET_VARIABLE_SIZE.
11885
11886 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11887             Pedro Alves  <palves@redhat.com>
11888
11889         PR gdb/20939
11890         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11891         call memory_error, save memaddr instead.
11892         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11893         negative, cal memory_error.
11894         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11895
11896 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11897
11898         * disasm-selftests.c (memory_error_test): New function.
11899         (_initialize_disasm_selftests): Register memory_error_test.
11900
11901 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11902
11903         * Makefile.in (SFILES): Add disasm-selftests.c and
11904         selftest-arch.c.
11905         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11906         * disasm-selftests.c: New file.
11907         * selftest-arch.c: New file.
11908         * selftest-arch.h: New file.
11909
11910 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11911
11912         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11913         to bfd_arch_mep.  Don't return 0 if section is not
11914         found.  Call print_insn_mep.
11915
11916 2017-01-26  Pedro Alves  <palves@redhat.com>
11917             Yao Qi  <yao.qi@linaro.org>
11918
11919         * arm-tdep.c: Include "disasm.h".
11920         (gdb_print_insn_arm): Update code to get gdbarch.
11921         * disasm.c (dis_asm_read_memory): Change it to
11922         gdb_disassembler::dis_asm_read_memory.
11923         (dis_asm_memory_error): Likewise.
11924         (dis_asm_print_address): Likewise.
11925         (gdb_pretty_print_insn): Change it to
11926         gdb_disassembler::pretty_print_insn.
11927         (dump_insns): Add one argument gdb_disassemlber.  All
11928         callers updated.
11929         (do_mixed_source_and_assembly_deprecated): Likewise.
11930         (do_mixed_source_and_assembly): Likewise.
11931         (do_assembly_only): Likewise.
11932         (gdb_disassembler::gdb_disassembler): New.
11933         (gdb_disassembler::print_insn): New.
11934         * disasm.h (class gdb_disassembler): New.
11935         (gdb_pretty_print_insn): Remove declaration.
11936         (gdb_disassemble_info): Likewise.
11937         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11938         (gdbscm_disasm_read_memory_worker): Update.
11939         (gdbscm_disasm_read_memory): Update.
11940         (gdbscm_disasm_memory_error): Remove.
11941         (gdbscm_disasm_print_address): Remove.
11942         (gdbscm_disassembler::gdbscm_disassembler): New.
11943         (gdbscm_print_insn_from_port): Update.
11944         * mips-tdep.c: Include disasm.h.
11945         (gdb_print_insn_mips): Update code to get gdbarch.
11946         * record-btrace.c (btrace_insn_history): Update.
11947         * spu-tdep.c: Include disasm.h.
11948         (struct spu_dis_asm_data): Remove.
11949         (struct spu_dis_asm_info): New.
11950         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11951         SPU id.
11952         (gdb_print_insn_spu): Cast disassemble_info to
11953         spu_dis_asm_info.
11954
11955 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11956
11957         * disasm.c (do_ui_file_delete): Delete.
11958         (gdb_insn_length): Move code creating stream to ...
11959         * utils.c (null_stream): ... here.  New function.
11960         * utils.h (null_stream): Declare.
11961
11962 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11963
11964         * python/py-inferior.c (find_thread_object): Return directly
11965         from the loop.  Remove "found" variable.
11966
11967 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11968
11969         GDB 7.12.1 released.
11970
11971 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11972
11973         * python/py-function.c (fnpy_call): Reorder declarations to have
11974         the gdbpy_enter object declared first.
11975         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11976
11977 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11978
11979         PR python/21068
11980         * python/python-internal.h (PyMem_RawMalloc): Define for
11981         Python < 3.4.
11982         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11983         PyMem_RawMalloc instead of PyMem_Malloc.
11984
11985 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11986             Luis Machado  <lgustavo@codesourcery.com>
11987
11988         * NEWS (New commands): Mention flash-erase.
11989         (New MI commands): Mention target-flash-erase.
11990         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11991         command.
11992         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11993         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11994         * target.c (flash_erase_command): New function.
11995         (initialize_targets): Add new flash-erase command.
11996         * target.h (flash_erase_command): New declaration.
11997
11998 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11999
12000         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12001         HAVE_SYS_PROCFS_H is defined.
12002
12003 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12004
12005         * remote.c (struct cached_reg): Change data into a pointer.
12006         * (stop_reply_dtr): Free data pointers before deleting vector.
12007         (process_stop_reply): Likewise.
12008         (remote_parse_stop_reply): Allocate space for data
12009
12010 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12011
12012         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12013         MAX_REGISTER_SIZE.
12014         (amd64_pseudo_register_read_value): Likewise.
12015         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12016         (store_register_using_P): Likewise.
12017         * regcache.c (regcache_xfer_part): Likewise.
12018
12019 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
12020
12021         Split real and pseudo registers.
12022         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12023         (sparc32_pseudo_regnum): New enum.
12024         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12025         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12026         (SPARC32_CP0_REGISTERS): New macro.
12027         (sparc32_pseudo_register_name): New function.
12028         (sparc32_register_name): Use sparc32_pseudo_register_name.
12029         (sparc32_pseudo_register_type): New function.
12030         (sparc32_register_type): Use sparc32_pseudo_register_type.
12031         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12032         pseudo register numbers.
12033         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12034         (SPARC64_CP0_REGISTERS): New macro.
12035         (sparc64_pseudo_register_name): New function.
12036         (sparc64_register_name): Use sparc64_pseudo_register_name.
12037         (sparc64_pseudo_register_type): New function.
12038         (sparc64_register_type): Use sparc64_pseudo_register_type.
12039         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12040         pseudo register numbers.
12041         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12042         sparc64_store_arguments): Handle pseudo register numbers.
12043
12044 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12045
12046         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12047         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12048         output.
12049         (getpkt_or_notif_sane_1): Likewise.
12050
12051 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12052
12053         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12054         of CC.  Pass "-x c++-header" instead of "-x c".
12055
12056 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12057
12058         * remote.c (remote_can_async_p): Update comment.
12059
12060 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12061
12062         * linux-nat.c (linux_nat_can_async_p): Update comment.
12063
12064 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12065
12066         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12067
12068 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12069
12070         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12071
12072 2017-01-10  Tom Tromey  <tom@tromey.com>
12073
12074         * python/py-type.c (typy_legacy_template_argument): Update.
12075         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12076         ~demangle_parse_info): Declare new members.
12077         (cp_demangled_name_to_comp): Return unique_ptr.
12078         (cp_demangled_name_parse_free)
12079         (make_cleanup_cp_demangled_name_parse_free)
12080         (cp_new_demangle_parse_info): Remove.
12081         * cp-support.c (do_demangled_name_parse_free_cleanup)
12082         (make_cleanup_cp_demangled_name_parse_free): Remove.
12083         (inspect_type, cp_canonicalize_string_full)
12084         (cp_canonicalize_string): Update.
12085         (mangled_name_to_comp): Change return type.
12086         (cp_class_name_from_physname, method_name_from_physname)
12087         (cp_func_name, cp_remove_params): Update.
12088         * cp-name-parser.y (demangle_parse_info): New constructor, from
12089         cp_new_demangle_parse_info.
12090         (~demangle_parse_info): New destructor, from
12091         cp_demangled_name_parse_free.
12092         (cp_merge_demangle_parse_infos): Update.
12093         (cp_demangled_name_to_comp): Change return type.
12094
12095 2017-01-10  Tom Tromey  <tom@tromey.com>
12096
12097         * top.c (prevent_dont_repeat): Change return type.
12098         * python/python.c (execute_gdb_command): Use std::string.
12099         Update.
12100         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12101         * command.h (prevent_dont_repeat): Change return type.
12102         * breakpoint.c (bpstat_do_actions_1): Update.
12103
12104 2017-01-10  Tom Tromey  <tom@tromey.com>
12105
12106         * value.h (scoped_value_mark::~scoped_value_mark): Call
12107         free_to_mark.
12108         (scoped_value_mark::free_to_mark): New method.
12109         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12110         scoped_value_mark.
12111
12112 2017-01-10  Tom Tromey  <tom@tromey.com>
12113
12114         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12115         (valpy_reference_value, valpy_const_value, valpy_get_address)
12116         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12117         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12118         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12119         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12120         scoped_value_mark.
12121         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12122         * value.h (scoped_value_mark): New class.
12123
12124 2017-01-10  Tom Tromey  <tom@tromey.com>
12125
12126         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12127         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12128         * psymtab.c (discard_psymtabs_upto): Remove.
12129         (make_cleanup_discard_psymtabs): Remove.
12130         (struct psymtab_state): Remove.
12131
12132 2017-01-10  Tom Tromey  <tom@tromey.com>
12133
12134         * record-full.c (record_full_save_cleanups): Remove.
12135         (record_full_save): Use gdb::unlinker.
12136         * gcore.c (do_bfd_delete_cleanup): Remove.
12137         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12138         cleanups.
12139         * dwarf2read.c (unlink_if_set): Remove.
12140         (write_psymtabs_to_index): Use gdb::unlinker.
12141         * common/gdb_unlinker.h: New file.
12142
12143 2017-01-10  Tom Tromey  <tom@tromey.com>
12144
12145         * windows-tdep.c (windows_xfer_shared_library): Update.
12146         * windows-nat.c (windows_make_so): Update.
12147         * utils.h (make_cleanup_bfd_unref): Remove.
12148         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12149         * symfile.h (symfile_bfd_open)
12150         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12151         * symfile.c (read_symbols, symbol_file_add)
12152         (separate_debug_file_exists): Update.
12153         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12154         (generic_load, reread_symbols): Update.
12155         * symfile-mem.c (symbol_file_add_from_memory): Update.
12156         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12157         (spu_symbol_file_add_from_memory): Update.
12158         * solist.h (struct target_so_ops) <bfd_open>: Return
12159         gdb_bfd_ref_ptr.
12160         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12161         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12162         gdb_bfd_ref_ptr.
12163         (solib_map_sections, reload_shared_libraries_1): Update.
12164         * solib-svr4.c (enable_break): Update.
12165         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12166         * solib-frv.c (enable_break2): Update.
12167         * solib-dsbt.c (enable_break): Update.
12168         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12169         gdb_bfd_ref_ptr.
12170         (darwin_solib_get_all_image_info_addr_at_init): Update.
12171         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12172         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12173         * record-full.c (record_full_save): Update.
12174         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12175         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12176         * minidebug.c (find_separate_debug_file_in_section): Return
12177         gdb_bfd_ref_ptr.
12178         * machoread.c (macho_add_oso_symfile): Change abfd to
12179         gdb_bfd_ref_ptr.
12180         (macho_symfile_read_all_oso): Update.
12181         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12182         (macho_symfile_read): Update.
12183         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12184         (jit_bfd_try_read_symtab): Update.
12185         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12186         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12187         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12188         gdb_bfd_ref_ptr.
12189         (gdb_bfd_ref_policy): New struct.
12190         (gdb_bfd_ref_ptr): New typedef.
12191         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12192         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12193         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12194         gdb_bfd_ref_ptr.
12195         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12196         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12197         (gcore_command): Update.
12198         * exec.c (exec_file_attach): Update.
12199         * elfread.c (elf_symfile_read): Update.
12200         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12201         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12202         (open_and_init_dwo_file): Update.
12203         (open_dwp_file): Return gdb_bfd_ref_ptr.
12204         (open_and_init_dwp_file): Update.
12205         * corelow.c (core_open): Update.
12206         * compile/compile-object-load.c (compile_object_load): Update.
12207         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12208         * coffread.c (coff_symfile_read): Update.
12209         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12210         gdb_bfd_ref_ptr.  Rename.
12211         (dump_bfd_file, restore_command): Update.
12212         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12213         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12214         (find_separate_debug_file_by_buildid): Update.
12215
12216 2017-01-10  Tom Tromey  <tom@tromey.com>
12217
12218         * common/gdb_ref_ptr.h: New file.
12219         * python/py-ref.h (struct gdbpy_ref_policy): New.
12220         (gdbpy_ref): Now a typedef.
12221
12222 2017-01-10  Tom Tromey  <tom@tromey.com>
12223
12224         * utils.h (make_cleanup_htab_delete): Don't declare.
12225         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12226         Remove.
12227         * linespec.c (decode_compound_collector): Add constructor,
12228         destructor.
12229         (lookup_prefix_sym): Remove cleanup.
12230         (symtab_collector): Add constructor, destructor.
12231         (collect_symtabs_from_filename): Remove cleanup.
12232         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12233         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12234         Use htab_up.
12235         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12236         * dwarf2read.c (dw2_expand_symtabs_matching)
12237         (dw2_map_symbol_filenames, dwarf_decode_macros)
12238         (write_psymtabs_to_index): Use htab_up.
12239         * dwarf2loc.c (func_verify_no_selftailcall)
12240         (call_site_find_chain_1, func_verify_no_selftailcall)
12241         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12242         std::vector, gdb::unique_xmalloc_ptr.
12243         (call_sitep): Remove typedef.
12244         (dwarf2_locexpr_baton_eval): Remove unused variable.
12245
12246 2017-01-10  Tom Tromey  <tom@tromey.com>
12247
12248         * python/python-internal.h (make_cleanup_py_decref)
12249         (make_cleanup_py_xdecref): Don't declare.
12250         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12251         (py_xdecref, make_cleanup_py_xdecref): Remove.
12252
12253 2017-01-10  Tom Tromey  <tom@tromey.com>
12254
12255         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12256         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12257
12258 2017-01-10  Tom Tromey  <tom@tromey.com>
12259
12260         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12261
12262 2017-01-10  Tom Tromey  <tom@tromey.com>
12263
12264         * python/py-utils.c (unicode_to_encoded_string)
12265         (python_string_to_target_string)
12266         (python_string_to_target_python_string)
12267         (python_string_to_host_string, gdbpy_obj_to_string)
12268         (get_addr_from_python): Use gdbpy_ref.
12269
12270 2017-01-10  Tom Tromey  <tom@tromey.com>
12271
12272         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12273         gdbpy_ref.
12274
12275 2017-01-10  Tom Tromey  <tom@tromey.com>
12276
12277         * python/python.c (eval_python_command, gdbpy_decode_line)
12278         (gdbpy_run_events, gdbpy_start_type_printers)
12279         (gdbpy_apply_type_printers): Use gdbpy_ref.
12280
12281 2017-01-10  Tom Tromey  <tom@tromey.com>
12282
12283         * python/py-param.c (get_doc_string, compute_enum_values): Use
12284         gdbpy_ref.
12285
12286 2017-01-10  Tom Tromey  <tom@tromey.com>
12287
12288         * python/py-inferior.c (find_thread_object, build_inferior_list):
12289         Use gdbpy_ref.
12290
12291 2017-01-10  Tom Tromey  <tom@tromey.com>
12292
12293         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12294
12295 2017-01-10  Tom Tromey  <tom@tromey.com>
12296
12297         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12298         gdbpy_ref.
12299
12300 2017-01-10  Tom Tromey  <tom@tromey.com>
12301
12302         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12303         extra incref.
12304         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12305         Use gdbpy_ref.
12306
12307 2017-01-10  Tom Tromey  <tom@tromey.com>
12308
12309         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12310         gdbpy_ref.
12311
12312 2017-01-10  Tom Tromey  <tom@tromey.com>
12313
12314         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12315         decref results of PyArg_ParseTupleAndKeywords.
12316
12317 2017-01-10  Tom Tromey  <tom@tromey.com>
12318
12319         * python/python.c (python_run_simple_file): Use
12320         unique_xmalloc_ptr, gdbpy_ref.
12321
12322 2017-01-10  Tom Tromey  <tom@tromey.com>
12323
12324         * python/py-prettyprint.c (print_stack_unless_memory_error)
12325         (print_string_repr, print_children): Use gdbpy_ref.
12326         (dummy_python_frame): New class.
12327         (dummy_python_frame::dummy_python_frame): Rename from
12328         push_dummy_python_frame.
12329         (py_restore_tstate): Remove.
12330
12331 2017-01-10  Tom Tromey  <tom@tromey.com>
12332
12333         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12334
12335 2017-01-10  Tom Tromey  <tom@tromey.com>
12336
12337         * python/python.c (ensure_python_env, restore_python_env):
12338         Remove.
12339         * python/python-internal.h (ensure_python_env): Don't declare.
12340         * varobj.h (varobj_ensure_python_env): Don't declare.
12341         * varobj.c (varobj_ensure_python_env): Remove.
12342
12343 2017-01-10  Tom Tromey  <tom@tromey.com>
12344
12345         * varobj.c (varobj_value_get_print_value): Use
12346         gdbpy_enter_varobj.
12347
12348 2017-01-10  Tom Tromey  <tom@tromey.com>
12349
12350         * python/py-prettyprint.c (print_string_repr, print_children):
12351         Update.
12352         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12353         of "encoding".
12354         * varobj.c (varobj_value_get_print_value): Update.
12355         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12356
12357 2017-01-10  Tom Tromey  <tom@tromey.com>
12358
12359         * varobj.c (varobj_get_display_hint)
12360         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12361         (varobj_set_visualizer, free_variable): Use
12362         gdbpy_enter_varobj.
12363
12364 2017-01-10  Tom Tromey  <tom@tromey.com>
12365
12366         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12367         (do_finish_initialization): New function.  Use gdbpy_ref.
12368         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12369         do_finish_initialization.
12370
12371 2017-01-10  Tom Tromey  <tom@tromey.com>
12372
12373         * python/py-param.c (get_set_value, get_show_value): Use
12374         gdbpy_enter, gdbpy_ref.
12375
12376 2017-01-10  Tom Tromey  <tom@tromey.com>
12377
12378         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12379
12380 2017-01-10  Tom Tromey  <tom@tromey.com>
12381
12382         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12383
12384 2017-01-10  Tom Tromey  <tom@tromey.com>
12385
12386         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12387         Use gdbpy_enter_varobj.
12388
12389 2017-01-10  Tom Tromey  <tom@tromey.com>
12390
12391         * varobj.c (gdbpy_enter_varobj): New constructor.
12392         * python/python-internal.h (gdbpy_enter_varobj): New class.
12393         * python/py-varobj.c (py_varobj_get_iterator): Use
12394         gdbpy_enter_varobj.
12395
12396 2017-01-10  Tom Tromey  <tom@tromey.com>
12397
12398         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12399         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12400         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12401         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12402         unique_xmalloc_ptr.
12403         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12404
12405 2017-01-10  Tom Tromey  <tom@tromey.com>
12406
12407         * python/py-xmethods.c (invoke_match_method): Use
12408         gdbpy_ref.
12409
12410 2017-01-10  Tom Tromey  <tom@tromey.com>
12411
12412         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12413         gdbpy_enter, gdbpy_ref.
12414
12415 2017-01-10  Tom Tromey  <tom@tromey.com>
12416
12417         * python/python.c (python_interactive_command): Use gdbpy_enter.
12418
12419 2017-01-10  Tom Tromey  <tom@tromey.com>
12420
12421         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12422         gdbpy_ref.
12423
12424 2017-01-10  Tom Tromey  <tom@tromey.com>
12425
12426         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12427         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12428
12429 2017-01-10  Tom Tromey  <tom@tromey.com>
12430
12431         * utils.h (htab_deleter): New struct.
12432         (htab_up): New typedef.
12433         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12434         gdbpy_enter, gdbpy_ref, htab_up.
12435
12436 2017-01-10  Tom Tromey  <tom@tromey.com>
12437
12438         * python/py-unwind.c (pending_frame_invalidate): Remove.
12439         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12440
12441 2017-01-10  Tom Tromey  <tom@tromey.com>
12442
12443         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12444         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12445
12446 2017-01-10  Tom Tromey  <tom@tromey.com>
12447
12448         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12449
12450 2017-01-10  Tom Tromey  <tom@tromey.com>
12451
12452         * python/python.c (gdbpy_eval_from_control_command)
12453         (gdbpy_source_script, gdbpy_run_events)
12454         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12455         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12456         gdbpy_enter.
12457
12458 2017-01-10  Tom Tromey  <tom@tromey.com>
12459
12460         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12461
12462 2017-01-10  Tom Tromey  <tom@tromey.com>
12463
12464         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12465
12466 2017-01-10  Tom Tromey  <tom@tromey.com>
12467
12468         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12469         (python_on_inferior_call_pre, python_on_inferior_call_post)
12470         (python_on_memory_change, python_on_register_change)
12471         (python_inferior_exit, python_new_objfile, add_thread_object)
12472         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12473
12474 2017-01-10  Tom Tromey  <tom@tromey.com>
12475
12476         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12477         (bpfinishpy_handle_exit): Use gdbpy_enter.
12478
12479 2017-01-10  Tom Tromey  <tom@tromey.com>
12480
12481         * python/py-cmd.c (cmdpy_destroyer)
12482         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12483         gdbpy_enter.
12484
12485 2017-01-10  Tom Tromey  <tom@tromey.com>
12486
12487         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12488         gdbpy_enter.
12489         (gdbpy_breakpoint_has_cond): Likewise.
12490
12491 2017-01-10  Tom Tromey  <tom@tromey.com>
12492
12493         * python/python.c (gdbpy_enter): New constructor.
12494         (~gdbpy_enter): New destructor.
12495         (restore_python_env, ensure_python_env): Rewrite.
12496         * python/python-internal.h (gdbpy_enter): New class.
12497
12498 2017-01-10  Tom Tromey  <tom@tromey.com>
12499
12500         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12501
12502 2017-01-10  Tom Tromey  <tom@tromey.com>
12503
12504         * python/py-value.c (value_has_field, get_field_flag)
12505         (get_field_type, valpy_getitem, convert_value_from_python): Use
12506         gdbpy_ref.
12507
12508 2017-01-10  Tom Tromey  <tom@tromey.com>
12509
12510         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12511         gdbpy_ref.
12512
12513 2017-01-10  Tom Tromey  <tom@tromey.com>
12514
12515         * python/py-prettyprint.c (search_pp_list)
12516         (find_pretty_printer_from_objfiles)
12517         (find_pretty_printer_from_progspace)
12518         (find_pretty_printer_from_gdb, find_pretty_printer)
12519         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12520         gdbpy_ref.
12521
12522 2017-01-10  Tom Tromey  <tom@tromey.com>
12523
12524         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12525
12526 2017-01-10  Tom Tromey  <tom@tromey.com>
12527
12528         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12529         (ltpy_get_all_source_lines): Use gdbpy_ref.
12530
12531 2017-01-10  Tom Tromey  <tom@tromey.com>
12532
12533         * python/py-framefilter.c (extract_sym, extract_value)
12534         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12535         gdbpy_ref.
12536
12537 2017-01-10  Tom Tromey  <tom@tromey.com>
12538
12539         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12540
12541 2017-01-10  Tom Tromey  <tom@tromey.com>
12542
12543         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12544
12545 2017-01-10  Tom Tromey  <tom@tromey.com>
12546
12547         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12548         gdbpy_ref.
12549
12550 2017-01-10  Tom Tromey  <tom@tromey.com>
12551
12552         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12553
12554 2017-01-10  Tom Tromey  <tom@tromey.com>
12555
12556         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12557         (typy_range): Use gdbpy_ref.
12558
12559 2017-01-10  Tom Tromey  <tom@tromey.com>
12560
12561         * python/py-threadevent.c (create_thread_event_object): Use
12562         gdbpy_ref.
12563         * python/py-stopevent.c (create_stop_event_object): Simplify.
12564         (emit_stop_event): Use gdbpy_ref.
12565         * python/py-signalevent.c (create_signal_event_object): Use
12566         gdbpy_ref.
12567         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12568         (emit_new_objfile_event, create_clear_objfiles_event_object)
12569         (emit_clear_objfiles_event): Use gdbpy_ref.
12570         * python/py-infevents.c (create_inferior_call_event_object)
12571         (create_register_changed_event_object)
12572         (create_memory_changed_event_object, emit_inferior_call_event)
12573         (emit_memory_changed_event, emit_register_changed_event): Use
12574         gdbpy_ref.
12575         * python/py-exitedevent.c (create_exited_event_object)
12576         (emit_exited_event): Use gdbpy_ref.
12577         * python/py-event.h (evpy_emit_event): Remove
12578         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12579         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12580         * python/py-continueevent.c (emit_continue_event): Use
12581         gdbpy_ref.
12582         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12583         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12584         gdbpy_ref.
12585         * python/py-bpevent.c (create_breakpoint_event_object): Use
12586         gdbpy_ref.
12587
12588 2017-01-10  Tom Tromey  <tom@tromey.com>
12589
12590         * python/py-ref.h: New file.
12591
12592 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12593
12594         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12595         void.
12596         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12597         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12598         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12599         * ui-out.c (ui_out::redirect): Likewise.
12600         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12601         * cli/cli-logging.c (set_logging_redirect): Update call site of
12602         ui_out::redirect.
12603         (handle_redirections): Likewise.
12604         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12605         * top.c (execute_command_to_string): Likewise.
12606         * utils.c (do_ui_out_redirect_pop): Likewise.
12607
12608 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12609
12610         * stack.c (_initialize_stack): Update "frame" command help message.
12611
12612 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12613
12614         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12615
12616 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12617
12618         * x86-linux-nat.h: Include gdb_proc_service.h.
12619
12620 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12621
12622         * ser-base.h: Include serial.h.
12623
12624 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12625
12626         * ppc-linux-tdep.h: Include ppc-tdep.h.
12627
12628 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12629
12630         * nat/amd64-linux-siginfo.h: Include signal.h.
12631
12632 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12633
12634         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12635
12636 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12637
12638         * mi/mi-parse.h: Include mi-cmds.h.
12639
12640 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12641
12642         * inf-loop.c: Don't include "target.h".
12643         * inf-loop.h: Include it here.
12644
12645 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12646
12647         * dfp.h: Include "dboulest.h" and "expression.h".
12648
12649 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12650
12651         * ax-gdb.h: Include "ax.h".
12652
12653 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12654
12655         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12656         with nat/gdb_ptrace.h.
12657
12658 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12659
12660         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12661         new line.
12662         (mips64_fbsd_sigframe_init): Likewise.
12663
12664 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12665
12666         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12667         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12668
12669 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12670
12671         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12672         * NEWS: Mention new FreeBSD/mips native configuration.
12673         * config/mips/fbsd.mh: New file.
12674         * configure.host: Add mips*-*-freebsd*.
12675         * mips-fbsd-nat.c: New file.
12676
12677 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12678
12679         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12680         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12681         * NEWS: Mention new FreeBSD/mips target.
12682         * configure.tgt: Add mips*-*-freebsd*.
12683         * mips-fbsd-tdep.c: New file.
12684         * mips-fbsd-tdep.h: New file.
12685
12686 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12687
12688         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12689         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12690
12691 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12692
12693         Update copyright year range in all GDB files.
12694
12695 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12696
12697         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12698
12699 For older changes see ChangeLog-2016.
12700 \f
12701 Local Variables:
12702 mode: change-log
12703 left-margin: 8
12704 fill-column: 74
12705 version-control: never
12706 coding: utf-8
12707 End: