Garbage collect reattach_breakpoints
[external/binutils.git] / gdb / ChangeLog
1 2017-10-11  Pedro Alves  <palves@redhat.com>
2
3         * breakpoint.c (reattach_breakpoints): Delete.
4         * breakpoint.h (reattach_breakpoints): Delete.
5
6 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
7
8         * symfile.c (registered_sym_fns): Make struct, not typedef.
9         (DEF_VEC_O (registered_sym_fns)): Remove.
10         (symtab_fns): Change type to std::vector.
11         (add_symtab_fns): Adjust.
12         (find_sym_fns): Adjust.
13
14 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
15
16         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
17         * arc-tdep.h (arc_arch_is_em): New function.
18         (arc_arch_is_hs): Likewise.
19
20 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
21
22         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
23         parentheses in the declaration.
24         (macro_lookup_inclusion): Likewise.
25         (macro_lookup_definition): Likewise.
26         * p-lang.h (pascal_builtin_types): Likewise.
27         * tui/tui-data.c (tui_win_list): Likewise.
28         * tui/tui-data.h (tui_win_list): Likewise.
29         * utils.h (make_cleanup_free_section_addr_info): Likewise.
30
31 2017-10-11  Mark Rages  <markrages@gmail.com>
32
33         * target-memory.c (block_boundaries): Fix for block address not
34         aligned on block size.
35
36 2017-10-10  Pedro Alves <palves@redhat.com>
37             Tom Tromey  <tom@tromey.com>
38
39         * breakpoint.c (struct captured_breakpoint_query_args)
40         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
41         (print_breakpoint): New.
42         * breakpoint.h (print_breakpoint): Declare.
43         * common/common-exceptions.h (enum return_reason): Remove
44         references to catch_exceptions.
45         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
46         Delete.
47         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
48         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
49         * gdb.h: Delete.
50         * gdbthread.h (thread_select): Declare.
51         * mi/mi-cmd-break.c: Don't include gdb.h.
52         (breakpoint_notify): Use print_breakpoint.
53         * mi/mi-cmd-catch.c: Don't include gdb.h.
54         * mi/mi-interp.c: Don't include gdb.h.
55         (mi_print_breakpoint_for_event): New.
56         (mi_breakpoint_created, mi_breakpoint_modified): Use
57         mi_print_breakpoint_for_event.
58         * mi/mi-main.c: Don't include gdb.h.
59         (mi_cmd_thread_select): Parse the global thread ID here.  Use
60         thread_select instead of gdb_thread_select.
61         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
62         of using gdb_list_thread_ids.
63         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
64         FILEIO_ENOSYS here.
65         (remote_fileio_request): Use TRY/CATCH instead of
66         catch_exceptions.
67         * symfile-mem.c (struct symbol_file_add_from_memory_args)
68         (symbol_file_add_from_memory_wrapper): Delete.
69         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
70         * thread.c: Don't include gdb.h.
71         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
72         (thread_alive): Use thread_select.
73         (do_captured_thread_select): Delete, parts salvaged as ...
74         (thread_select): ... this new function.
75         (gdb_thread_select): Delete.
76
77 2017-10-10  Pedro Alves  <palves@redhat.com>
78             Tom Tromey  <tom@tromey.com>
79
80         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
81         and reverse logic.
82         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
83         No longer macros.  Instead ...
84         (enum wp_check_result): They're now values of this new
85         enumeration.
86         (watchpoint_check): Change return type to wp_check_result and
87         parameter type to bpstat.
88         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
89         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
90         catch_errors.  Reverse logic of watchpoint_check call.
91         (breakpoint_re_set_one): Now returns void and takes a breakpoint
92         pointer as parameter.
93         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
94         * common/common-exceptions.c (throw_exception_sjlj): Update
95         comments to avoid mentioning catch_errors.
96         * exceptions.c (catch_errors): Delete.
97         * exceptions.h: Update comments to avoid mentioning catch_errors.
98         (catch_errors_ftype, catch_errors): Delete.
99         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
100         (hook_stop_stub): Delete.
101         (restore_selected_frame): Change return type to void, and
102         parameter type to const frame_id &.
103         (restore_infcall_control_state): Use TRY/CATCH instead of
104         catch_errors.
105         * main.c (captured_command_loop): Return void and remove
106         parameter.  Remove references to catch_errors.
107         (captured_main): Use TRY/CATCH instead of catch_errors.
108         * objc-lang.c (objc_submethod_helper_data)
109         (find_objc_msgcall_submethod_helper): Delete.
110         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
111         catch_errors.
112         * record-full.c (record_full_message): Return void.
113         (record_full_message_args, record_full_message_wrapper): Delete.
114         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
115         instead of catch_errors.
116         * solib-aix.c (solib_aix_open_symbol_file_object): Change
117         parameter type to int.
118         * solib-darwin.c (open_symbol_file_object): Ditto.
119         * solib-dsbt.c (open_symbol_file_object): Ditto.
120         * solib-frv.c (open_symbol_file_object): Ditto.
121         * solib-svr4.c (open_symbol_file_object): Ditto.
122         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
123         * solib.c (update_solib_list): Use TRY/CATCH instead of
124         catch_errors.
125         * solist.h (struct target_so_ops) <open_symbol_file_object>:
126         Change type.
127         * symmisc.c (struct print_symbol_args): Remove.
128         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
129         (print_symbol): Change type.
130         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
131         and remove parameters.
132         (catch_errors): New.
133         (get_windows_debug_event): Adjust.
134
135 2017-10-09  Tom Tromey  <tom@tromey.com>
136
137         * mi/mi-main.c (free_splay_tree): Remove.
138         (list_available_thread_groups): Use splay_tree_up.
139         * common/gdb_splay_tree.h: New file.
140
141 2017-10-09  Tom Tromey  <tom@tromey.com>
142
143         * mi/mi-main.c (do_nothing): Remove.
144         (list_available_thread_groups): Update.
145
146 2017-10-09  Pedro Alves  <palves@redhat.com>
147
148         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
149         reading registers when switching context.
150
151 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
152
153         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
154         (fbsd_convert_siginfo): Likewise.
155         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
156
157 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
158
159         * configure.ac (try_guile_versions): Remove guile-2.2.
160         * configure: Regenerate.
161
162 2017-10-09  Tom Tromey  <tom@tromey.com>
163
164         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
165         (COMPILE.pre): Use $(CXX).
166
167 2017-10-09  Pedro Alves  <palves@redhat.com>
168
169         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
170         Use bool.
171         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
172         * cp-support.h (cp_remove_params): Now returns a
173         gdb::unique_xmalloc_ptr.
174         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
175         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
176         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
177         returning a gdb::unique_xmalloc_ptr.
178         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
179         * stack.c (find_frame_funname): Adjust to cp_remove_params
180         returning a gdb::unique_xmalloc_ptr.
181
182 2017-10-08  Tom Tromey  <tom@tromey.com>
183
184         * dwarf2read.c (dwarf2_get_dwz_file): Use
185         gdb::unique_xmalloc_ptr.
186         (find_slot_in_mapped_hash): Likewise.
187         (dwarf2_physname): Likewise.
188         (create_dwo_unit_in_dwp_v1): Use std::string.
189         (create_dwo_unit_in_dwp_v2): Likewise.
190         (lookup_dwo_cutu): Likewise.
191         (inherit_abstract_dies): Use std::vector.
192         (read_array_type): Likewise.
193         (dwarf_decode_macros): Remove unused declaration.
194         (unsigned_int_compar): Remove.
195         (dwarf2_build_psymtabs_hard): Use scoped_restore.
196         (psymtabs_addrmap_cleanup): Remove.
197
198 2017-10-08  Tom Tromey  <tom@tromey.com>
199
200         * frame-unwind.c (frame_unwind_try_unwinder): Update.
201         * frame.h (frame_cleanup_after_sniffer): Declare.
202         (frame_prepare_for_sniffer): Return void.
203         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
204         type of argument.
205         (frame_prepare_for_sniffer): Return void.
206
207 2017-10-08  Tom Tromey  <tom@tromey.com>
208
209         * utils.h (make_cleanup_value_free): Remove.
210         * utils.c (do_value_free, struct cleanup): Remove.
211         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
212         Use gdb_value_up.
213         * value.h (struct value_deleter): New.
214         (gdb_value_up): New typedef.
215
216 2017-10-08  Tom Tromey  <tom@tromey.com>
217
218         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
219         (make_cleanup_free_search_symbols): Remove.
220         (search_symbols): Return std::vector.
221         (symbol_search::compare_search_syms): Now member of
222         symbol_search.  Change arguments.
223         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
224         (symtab_symbol_info, rbreak_command): Update.
225         * symtab.h (struct symbol_search) <next>: Remove.
226         Add constructors.
227         (symbol_search::operator<): New function.
228         (symbol_search::operator==): New function.
229         (search_symbols): Remove std::vector.
230         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
231         (symbol_search::compare_search_syms): Declare.
232
233 2017-10-06  Yao Qi  <yao.qi@linaro.org>
234
235         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
236         arch/aarch64-insn.o.
237         Remove one rule.
238         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
239
240 2017-10-06  Yao Qi  <yao.qi@linaro.org>
241
242         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
243         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
244         arch/arm-linux.o respectively.
245         * configure.tgt: Likewise.
246
247 2017-10-06  Yao Qi  <yao.qi@linaro.org>
248
249         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
250         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
251
252 2017-10-06  Pedro Alves  <palves@redhat.com>
253
254         * windows-nat.c: Include <algorithm>.
255
256 2017-10-06  Yao Qi  <yao.qi@linaro.org>
257
258         * configure.tgt (i386_tobjs): New variable.
259         (amd64_tobjs): New variable.
260         Set $cpu_obs and $os_obs.
261
262 2017-10-06  Yao Qi  <yao.qi@linaro.org>
263
264         * Makefile.in (CONFIG_SRC_SUBDIR): New.
265         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
266         (clean): Remove object files and dependency files.
267         (distclean): Remove the directory.
268         * configure.ac: Invoke AC_CONFIG_COMMANDS.
269         * configure: Re-generated.
270         * configure.tgt: Replace amd64.o with arch/amd64.o.
271
272 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
273
274         PR build/22188
275         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
276         and SETEND.
277
278 2017-10-05  Pedro Alves  <palves@redhat.com>
279
280         * linux-nat.c (linux_child_follow_fork): When following the parent
281         and detaching the child, consult the parent thread's architecture
282         instead of the child's.
283
284 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
285
286         * ax.h: Do not include "doublest.h".
287         (union agent_val): Remove.
288
289 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
290
291         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
292         (decimal_to_string): Return std::string object.
293         (decimal_from_string): Accept std::string object.  Return bool.
294         (decimal_from_integral, decimal_from_doublest): Remove.
295         (decimal_from_longest): Add prototype.
296         (decimal_from_ulongest): Likewise.
297         (decimal_to_longest): Likewise.
298         (decimal_from_doublest): Likewise.
299         * dfp.c: Do not include "gdbtypes.h" or "value.h".
300         (MAX_DECIMAL_STRING): Move here.
301         (decimal_to_string): Return std::string object.
302         (decimal_from_string): Accept std::string object.  Return bool.
303         (decimal_from_integral): Remove, replace by ...
304         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
305         (decimal_to_longest): New function.
306         (decimal_from_floating): Remove, replace by ...
307         (decimal_from_doublest): ... this new function.
308         (decimal_to_doublest): Update to new decimal_to_string interface.
309
310         * value.c (unpack_long): Use decimal_to_longest.
311         * valops.c (value_cast): Use decimal_from_doublest instead of
312         decimal_from_floating.  Use decimal_from_[u]longest isntead of
313         decimal_from_integral.
314         * valarith.c (value_args_as_decimal): Likewise.
315         * valprint.c (print_decimal_floating): Update to new
316         decimal_to_string interface.
317         * printcmd.c (printf_decfloat): Likewise.
318         * c-exp.y (parse_number): Update to new decimal_from_string interface.
319
320 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
321
322         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
323         * gdbtypes.c: Include "floatformat.h".
324         * value.c: Likewise.
325         * m68k-tdep.c: Likewise.
326
327         * findvar.c: Do not include "floatformat.h".
328         * amd64-darwin-tdep.c: Likewise.
329         * arm-linux-tdep.c: Likewise.
330         * i386-darwin-tdep.c: Likewise.
331         * i387-tdep.c: Likewise.
332         * m68k-linux-tdep.c: Likewise.
333         * mep-tdep.c: Likewise.
334         * mips-tdep.c: Likewise.
335         * nios2-tdep.c: Likewise.
336         * s390-linux-tdep.c: Likewise.
337         * sparc-obsd-tdep.c: Likewise.
338         * sparc-tdep.c: Likewise.
339         * sparc64-tdep.c: Likewise.
340         * spu-tdep.c: Likewise.
341         * tic6x-tdep.c: Likewise.
342         * tilegx-tdep.c: Likewise.
343         * vax-tdep.c: Likewise.
344         * xstormy16-tdep.c: Likewise.
345         * xtensa-tdep.c: Likewise.
346
347         * top.c: Do not include "doublest.h".
348         * aarch64-tdep.c: Likewise.
349         * alpha-tdep.c: Likewise.
350         * arm-linux-tdep.c: Likewise.
351         * m68k-linux-tdep.c: Likewise.
352         * tilegx-tdep.c: Likewise.
353         * xstormy16-tdep.c: Likewise.
354
355 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
356
357         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
358         (mipsn32_fbsd_sigframe): Define.
359         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
360         for FreeBSD/mipsn32.
361
362 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
363
364         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
365         AT_HWCAP.
366
367 2017-10-05  Tristan Gingold  <tgingold@free.fr>
368
369         * MAINTAINERS (Misc): Update my email address.
370
371 2017-10-04  Pedro Alves  <palves@redhat.com>
372
373         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
374         it instead of target_gdbarch.
375         (get_remote_state, get_remote_packet_size): Adjust
376         get_remote_arch_state calls, passing down target_gdbarch
377         explicitly.
378         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
379         'gdbarch' and use it instead of target_gdbarch.
380         (get_memory_packet_size): Adjust get_remote_arch_state calls,
381         passing down target_gdbarch explicitly.
382         (struct stop_reply) <arch>: New field.
383         (remote_parse_stop_reply): Use the stopped thread's architecture,
384         not the current inferior's.  Save the architecture in the
385         stop_reply.
386         (process_stop_reply): Use the stop reply's architecture.
387         (process_g_packet, remote_fetch_registers)
388         (remote_prepare_to_store, store_registers_using_G)
389         (remote_store_registers): Adjust get_remote_arch_state calls,
390         using the regcache's architecture.
391         (remote_get_trace_status): Adjust get_remote_arch_state calls,
392         passing down target_gdbarch explicitly.
393         * spu-multiarch.c (spu_thread_architecture): Defer to the target
394         beneath instead of calling target_gdbarch.
395         * target.c (default_thread_architecture): Use the specified
396         inferior's architecture, instead of the current inferior's
397         architecture (via target_gdbarch).
398
399 2017-10-04  Pedro Alves  <palves@redhat.com>
400
401         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
402         case.
403         (regcache_print): Handle !target_has_registers here instead.
404
405 2017-10-04  Pedro Alves  <palves@redhat.com>
406
407         * frame.c (create_test_frame): Delete.
408         * frame.h (create_test_frame): Delete.
409         * gdbarch-selftests.c: Include gdbthread.h and target.h.
410         (class regcache_test): Delete.
411         (test_target_has_registers, test_target_has_stack)
412         (test_target_has_memory, test_target_prepare_to_store)
413         (test_target_store_registers): New functions.
414         (test_target_ops): New class.
415         (register_to_value_test): Error out if there's already a
416         process_stratum (or higher) target pushed.  Create a fuller mock
417         environment, with mock target_ops, inferior, address space, thread
418         and inferior_ptid.
419         * progspace.c (struct address_space): Move to ...
420         * progspace.h (struct address_space): ... here.
421         * regcache.h (regcache::~regcache, regcache::raw_write)
422         [GDB_SELF_TEST]: No longer virtual.
423
424 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
425
426         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
427
428 2017-10-04  Pedro Alves  <palves@redhat.com>
429
430         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
431         out of 'between TRY and CATCH'.
432
433 2017-10-04  Pedro Alves  <palves@redhat.com>
434
435         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
436         * common/common-exceptions.h (TRY): Open an outermost scope.
437         Expand intro comment.
438         (CATCH): Reindent.
439         (END_CATCH): Close the outermost scope.
440         * completer.c (complete_line_internal): Add missing END_CATCH.
441
442 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
443
444         * NEWS (Changes since GDB 8.0): Add entry about new
445         'set-cwd-on-gdbserver' feature.
446         (New remote packets): Add entry for QSetWorkingDir.
447         * common/common-inferior.h (set_inferior_cwd): New prototype.
448         * infcmd.c (set_inferior_cwd): Remove "static".
449         (show_cwd_command): Expand text to include remote debugging.
450         * remote.c: Add PACKET_QSetWorkingDir.
451         (remote_protocol_features) <QSetWorkingDir>: New entry for
452         PACKET_QSetWorkingDir.
453         (extended_remote_set_inferior_cwd): New function.
454         (extended_remote_create_inferior): Call
455         "extended_remote_set_inferior_cwd".
456         (_initialize_remote): Call "add_packet_config_cmd" for
457         QSetWorkingDir.
458
459 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
460
461         * NEWS (New commands): Mention "set/show cwd".
462         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
463         "cd" command's help text.
464         * common/common-inferior.h (get_inferior_cwd): New prototype.
465         * infcmd.c (inferior_cwd_scratch): New global variable.
466         (set_inferior_cwd): New function.
467         (get_inferior_cwd): Likewise.
468         (set_cwd_command): Likewise.
469         (show_cwd_command): Likewise.
470         (_initialize_infcmd): Add "set/show cwd" commands.
471         * inferior.h (class inferior) <cwd>: New field.
472         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
473         (fork_inferior): Change inferior's cwd before its execution.
474         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
475         to CreateProcess.
476
477 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
478
479         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
480         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
481         (COMMON_OBS): Add gdb_tilde_expand.o.
482         * common/gdb_tilde_expand.c: New file.
483         * common/gdb_tilde_expand.h: Likewise.
484
485 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
486
487         * gdbarch.sh (objfile): Remove duplicate declaration.
488         * gdbarch.h: Regenerate.
489
490 2017-10-03  Tom Tromey  <tom@tromey.com>
491
492         * utils.c (internal_vproblem): Use string_vprintf.
493
494 2017-10-03  Tom Tromey  <tom@tromey.com>
495
496         * printcmd.c (info_symbol_command): Use std::string.
497
498 2017-10-03  Tom Tromey  <tom@tromey.com>
499
500         * top.c (gdb_safe_append_history): Use std::string.
501
502 2017-10-03  Tom Tromey  <tom@tromey.com>
503
504         * event-top.c (stdin_event_handler): Update.
505         * main.c (captured_main_1): Update.
506         * top.h (make_delete_ui_cleanup): Remove.
507         (struct ui): Add constructor and destructor.
508         (new_ui, delete_ui): Remove.
509         * top.c (make_delete_ui_cleanup): Remove.
510         (new_ui_command): Use std::unique_ptr.
511         (delete_ui_cleanup): Remove.
512         (ui::ui): Rename from new_ui.  Update.
513         (free_ui): Remove.
514         (ui::~ui): Rename from delete_ui.  Update.
515
516 2017-10-03  Tom Tromey  <tom@tromey.com>
517
518         * symfile.c (load_progress): Use gdb::byte_vector.
519
520 2017-10-03  Tom Tromey  <tom@tromey.com>
521
522         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
523         declaration.
524         * printcmd.c (x_command): Remove unused declaration.
525         * symfile.c (symbol_file_command): Remove unused declaration.
526
527 2017-10-03  Tom Tromey  <tom@tromey.com>
528
529         * utils.c (internal_vproblem): Use std::string.
530         (defaulted_query): Likewise.
531
532 2017-10-03  Tom Tromey  <tom@tromey.com>
533
534         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
535         * top.c (execute_command_to_string): Update.
536         * utils.c (make_cleanup_restore_page_info): Remove.
537         (do_restore_page_info_cleanup): Remove.
538         (set_batch_flag_and_restore_page_info):
539         New.
540         (make_cleanup_restore_page_info): Remove.
541         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
542         (~set_batch_flag_and_restore_page_info): New
543         (make_cleanup_restore_uinteger): Remove.
544         (make_cleanup_restore_integer): Remove.
545         (struct restore_integer_closure): Remove.
546         (restore_integer): Remove.
547         * utils.h (struct set_batch_flag_and_restore_page_info): New
548         class.
549         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
550         (make_cleanup_restore_page_info): Remove.
551         (make_cleanup_restore_uinteger) Remove.
552         (make_cleanup_restore_integer) Remove.
553
554 2017-10-03  Tom Tromey  <tom@tromey.com>
555
556         * record-full.h (record_full_gdb_operation_disable_set): Return
557         scoped_restore_tmpl<int>.
558         * infrun.c (adjust_pc_after_break): Update.
559         (handle_signal_stop): Update.
560         * record-full.c (record_full_gdb_operation_disable_set): Return
561         scoped_restore_tmpl<int>.
562         (record_full_wait_1, record_full_insert_breakpoint)
563         (record_full_remove_breakpoint, record_full_save)
564         (record_full_goto_insn): Update.
565
566 2017-10-02  Tom Tromey  <tom@tromey.com>
567
568         PR rust/22236:
569         * rust-lang.c (rust_val_print_str): New function.
570         (val_print_struct): Call it.
571         (rust_subscript): Preserve name of slice type.
572
573 2017-10-02  Tom Tromey  <tom@tromey.com>
574
575         * rust-lang.c (rust_subscript): Handle slices in
576         EVAL_AVOID_SIDE_EFFECTS case.
577
578 2017-10-02  Tom Tromey  <tom@tromey.com>
579
580         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
581
582 2017-10-02  Tom Tromey  <tom@tromey.com>
583
584         * rust-lang.h (rust_slice_type): Add "extern".
585
586 2017-10-02  Tom Tromey  <tom@tromey.com>
587             Pedro Alves  <palves@redhat.com>
588
589         * ada-lang.h (ada_exc_info::operator<): Make const.
590         (ada_exc_info::operator==): Make const.
591         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
592         Make const.
593
594 2017-09-29  Tom Tromey  <tom@tromey.com>
595
596         * target.c (read_whatever_is_readable): Change type of "result".
597         Update.
598         (free_memory_read_result_vector): Remove.
599         (read_memory_robust): Change return type.  Update.
600         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
601         bin2hex, std::string.
602         * target.h (memory_read_result_s): Remove typedef.
603         (free_memory_read_result_vector): Remove.
604         (read_memory_robust): Return std::vector.
605
606 2017-09-29  Tom Tromey  <tom@tromey.com>
607
608         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
609
610 2017-09-29  Tom Tromey  <tom@tromey.com>
611
612         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
613         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
614         operator< and operator==.
615         (ada_exceptions_list): Return a std::vector.
616         * ada-lang.c (ada_exc_info::operator<): Rename from
617         compare_ada_exception_info.
618         (ada_exc_info::operator==): New.
619         (sort_remove_dups_ada_exceptions_list): Change type of
620         "exceptions".
621         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
622         (ada_add_global_exceptions): Likewise.
623         (ada_exceptions_list_1): Return a std::vector.
624         (ada_exceptions_list): Likewise.
625
626 2017-09-29  Tom Tromey  <tom@tromey.com>
627
628         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
629         'std::set *'.
630         (print_one_inferior): Update.
631         (free_vector_of_ints): Remove.
632         (list_available_thread_groups): Change "ids" to std::set.
633         (mi_cmd_list_thread_groups): Update.
634         (struct collect_cores_data) <core>: Now a std::set.
635         (collect_cores): Update.
636         (unique): Remove.
637         (print_one_inferior): Update.
638
639 2017-09-29  Tom Tromey  <tom@tromey.com>
640
641         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
642         (mi_execute_async_cli_command): Likewise.
643         (mi_cmd_trace_frame_collected): Use field_fmt.
644
645 2017-09-29  Tom Tromey  <tom@tromey.com>
646
647         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
648         gdb::byte_vector.
649
650 2017-09-29  Tom Tromey  <tom@tromey.com>
651
652         * mi/mi-parse.c (mi_parse): Remove unused declaration.
653
654 2017-09-29  Tom Tromey  <tom@tromey.com>
655
656         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
657
658 2017-09-29  Tom Tromey  <tom@tromey.com>
659
660         * varobj.h (varobj_gen_name): Return std::string.
661         * varobj.c (varobj_gen_name): Return std::string.
662         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
663         (mi_cmd_var_delete): Don't copy "name".
664
665 2017-09-29  Tom Tromey  <tom@tromey.com>
666
667         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
668         (mi_cmd_break_insert_1): Update.
669
670 2017-09-29  Tom Tromey  <tom@tromey.com>
671
672         * target.h (make_scoped_defer_target_commit_resume): Update.
673         * target.c (make_scoped_defer_target_commit_resume): Rename from
674         make_cleanup_defer_target_commit_resume.  Return a
675         scoped_restore.
676         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
677
678 2017-09-29  Tom Tromey  <tom@tromey.com>
679
680         * main.c (captured_main_1): Remove unused declaration.
681         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
682
683 2017-09-29  Tom Tromey  <tom@tromey.com>
684
685         * symtab.c (search_symbols): Remove unused outer cleanup.
686         (make_source_files_completion_list): Remove unused declaration.
687
688 2017-09-29  Tom Tromey  <tom@tromey.com>
689
690         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
691
692 2017-09-29  Tom Tromey  <tom@tromey.com>
693
694         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
695         gdb::byte_vector.
696
697 2017-09-29  Tom Tromey  <tom@tromey.com>
698
699         * complaints.c (vcomplaint): Use std::string.
700
701 2017-09-29  Tom Tromey  <tom@tromey.com>
702
703         * tracepoint.c (trace_variable_command): Use std::string.
704         (encode_actions_1): Remove unused declarations.
705         (create_tsv_from_upload): Use std::string.
706
707 2017-09-29  Tom Tromey  <tom@tromey.com>
708
709         * cp-support.c (gdb_demangle): Use std::string.
710
711 2017-09-29  Tom Tromey  <tom@tromey.com>
712
713         * stack.c (parse_frame_specification): Use std::string
714         (info_frame_command): Use gdb::unique_xmalloc_ptr.
715
716 2017-09-29  Tom Tromey  <tom@tromey.com>
717
718         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
719
720 2017-09-29  Tom Tromey  <tom@tromey.com>
721
722         * utils.c (vfprintf_maybe_filtered): Use std::string.
723         (vfprintf_unfiltered): Likewise.
724
725 2017-09-29  Tom Tromey  <tom@tromey.com>
726
727         * event-top.c (top_level_prompt): Return std::string.
728         (display_gdb_prompt): Update.
729
730 2017-09-29  Tom Tromey  <tom@tromey.com>
731
732         * unittests/common-utils-selftests.c (format): New function.
733         (string_vprintf_tests): New function.
734         (_initialize_common_utils_selftests): Register new tests.
735         * common/common-utils.c (string_vprintf): New function.
736         * common/common-utils.h (string_vprintf): Declare.
737
738 2017-09-29  Pedro Alves  <palves@redhat.com>
739
740         * common/rsp-low.c (unpack_varlen_hex): Constify.
741         * common/rsp-low.h (unpack_varlen_hex): Constify.
742         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
743         Constify.
744         * remote.c (remote_set_permissions, read_ptid)
745         (remote_current_thread, remote_get_threads_with_qthreadinfo)
746         (remote_static_tracepoint_marker_at)
747         (remote_static_tracepoint_markers_by_strid)
748         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
749         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
750         (parse_tracepoint_definition, parse_tsv_definition)
751         (parse_static_tracepoint_marker_definition): Constify.
752         * tracepoint.h (parse_static_tracepoint_marker_definition)
753         (parse_trace_status, parse_tracepoint_status)
754         (parse_tracepoint_definition, parse_tsv_definition): Constify.
755
756 2017-09-29  Pedro Alves  <palves@redhat.com>
757
758         * remote.c (target_buf, target_buf_size): Delete.
759         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
760         Use the connection's packet buffer instead.
761         All callers adjusted.
762         (_initialize_remote): Remove references to target_buf and
763         target_buf_size.
764
765 2017-09-28  Pedro Alves  <palves@redhat.com>
766
767         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
768         unittests/common-utils-selftests.c.
769         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
770         (COMMON_OBS): Remove utils-selftests.o.
771         * utils-selftests.c: Move to ...
772         * unittests/common-utils-selftests.c: ... here and rename self
773         test to "string_printf".
774
775 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
776
777         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
778         having NULL cus or tus.
779
780 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
781
782         * arm-tdep.c: (convert_from_extended): Remove.
783         (convert_to_extended): Likewise.
784         (arm_extract_return_value): Use convert_typed_floating.
785         (arm_store_return_value): Likewise.
786
787         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
788         * sh-tdep.c: Do not include "floatformat.h".
789         (sh_littlebyte_bigword_type): New function.
790         (sh_register_convert_to_virtual): Use convert_typed_floating.
791         (sh_register_convert_to_raw): Likewise.
792         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
793         (sh64_littlebyte_bigword_type): New function.
794         (sh64_extract_return_value): Use convert_typed_floating.
795         (sh64_register_convert_to_virtual): Likewise.
796         (sh64_register_convert_to_raw): Likewise.
797
798 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
799
800         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
801         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
802
803         * gdbtypes.h (union type_specific): Make field floatformat hold
804         just a single struct floatformat, not an array.
805         (floatformat_from_type): Move here.
806         * gdbtypes.c (floatformat_from_type): Move here.  Update to
807         changed TYPE_FLOATFORMAT definition.
808         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
809         (recursive_dump_type): Likewise.
810         (init_float_type): Install correct floatformat for byte order.
811         (arch_float_type): Likewise.
812
813 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
814
815         * gdbtypes.c (init_type): Change incoming argument from
816         length-in-bytes to length-in-bits.  Assert length is a
817         multiple of TARGET_CHAR_BITS.
818         (arch_type, arch_flags_type): Likewise.
819         (init_integer_type): Update call to init_type.
820         (init_character_type): Likewise.
821         (init_boolean_type): Likewise.
822         (init_float_type): Likewise.
823         (init_decfloat_type): Likewise.
824         (init_complex_type): Likewise.
825         (init_pointer_type): Likewise.
826         (objfile_type): Likewise.
827         (arch_integer_type): Update call to arch_type.
828         (arch_character_type): Likewise.
829         (arch_boolean_type): Likewise.
830         (arch_float_type): Likewise.
831         (arch_decfloat_type): Likewise.
832         (arch_complex_type): Likewise.
833         (arch_pointer_type): Likewise.
834         (gdbtypes_post_init): Likewise.
835
836         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
837         (read_base_type): Likewise.
838         * mdebugread.c (basic_type): Likewise.
839         * stabsread.c (dbx_init_float_type): Likewise.
840         (rs6000_builtin_type): Likewise.
841         (read_range_type): Likewise.  Also, fix call to init_integer_type
842         with erroneous length argument.
843
844         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
845         * d-lang.c (build_d_types): Likewise.
846         * f-lang.c (build_fortran_types): Likewise.
847         * go-lang.c (build_go_types): Likewise.
848         * opencl-lang.c (build_opencl_types): Likewise.
849         * jit.c (finalize_symtab): Likewise.
850         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
851         (build_std_type_info_type): Likewise.
852         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
853         update call to arch_flags_type.
854
855         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
856         arch_type.
857         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
858         * windows-tdep.c (windows_get_tlb_type): Likewise.
859
860         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
861         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
862         * m32c-tdep.c (make_types): Likewise.
863         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
864         (rl78_psw_type): Update call to arch_flags_type.
865         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
866         * rx-tdep.c (rx_psw_type): Likewise.
867         (rx_fpsw_type): Likewise.
868         * sparc-tdep.c (sparc_psr_type): Likewise.
869         (sparc_fsr_type): Likewise.
870         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
871         (sparc64_ccr_type): Likewise.
872         (sparc64_fsr_type): Likewise.
873         (sparc64_fprs_type): Likewise.
874
875 2017-09-27  Tom Tromey  <tom@tromey.com>
876
877         * findcmd.c (find_command): Constify.
878
879 2017-09-27  Tom Tromey  <tom@tromey.com>
880
881         * ada-tasks.c (task_command_1, task_command): Constify.
882
883 2017-09-27  Tom Tromey  <tom@tromey.com>
884
885         * symtab.c (maintenance_print_symbol_cache)
886         (maintenance_flush_symbol_cache)
887         (maintenance_print_symbol_cache_statistics): Constify.
888
889 2017-09-27  Tom Tromey  <tom@tromey.com>
890
891         * inferior.c (detach_inferior_command, kill_inferior_command)
892         (inferior_command): Constify.
893
894 2017-09-27  Tom Tromey  <tom@tromey.com>
895
896         * regcache.c (regcache_print, maintenance_print_registers)
897         (maintenance_print_raw_registers)
898         (maintenance_print_cooked_registers)
899         (maintenance_print_register_groups)
900         (maintenance_print_remote_registers): Constify.
901
902 2017-09-27  Tom Tromey  <tom@tromey.com>
903
904         * printcmd.c (map_display_numbers, undisplay_command)
905         (enable_disable_display_command, enable_display_command)
906         (disable_display_command): Constify.
907
908 2017-09-27  Tom Tromey  <tom@tromey.com>
909
910         * breakpoint.h (delete_command): Don't declare.
911         * breakpoint.c (delete_command, enable_once_command)
912         (enable_count_command, enable_delete_command, breakpoint_1)
913         (maintenance_info_breakpoints, stopin_command, stopat_command)
914         (delete_command, delete_trace_command, save_breakpoints)
915         (save_breakpoints_command, save_tracepoints_command): Constify.
916
917 2017-09-27  Tom Tromey  <tom@tromey.com>
918
919         * macrocmd.c (macro_expand_command, macro_expand_once_command)
920         (skip_ws, extract_identifier, macro_define_command)
921         (macro_undef_command, macro_list_command): Constify.
922
923 2017-09-27  Tom Tromey  <tom@tromey.com>
924
925         * infcmd.c (environment_info, set_environment_command)
926         (unset_environment_command, path_info, info_proc_cmd_1)
927         (info_proc_cmd_mappings, info_proc_cmd_stat)
928         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
929         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
930
931 2017-09-27  Tom Tromey  <tom@tromey.com>
932
933         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
934         Constify.
935
936 2017-09-27  Tom Tromey  <tom@tromey.com>
937
938         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
939
940 2017-09-27  Tom Tromey  <tom@tromey.com>
941
942         * demangle.c (demangle_command): Constify.
943
944 2017-09-27  Tom Tromey  <tom@tromey.com>
945
946         * progspace.c (maintenance_info_program_spaces_command):
947         Constify.
948
949 2017-09-27  Tom Tromey  <tom@tromey.com>
950
951         * compile/compile.c (check_raw_argument, compile_file_command)
952         (compile_code_command, compile_print_command): Constify.
953
954 2017-09-27  Tom Tromey  <tom@tromey.com>
955
956         * reggroups.c (maintenance_print_reggroups): Constify.
957
958 2017-09-27  Tom Tromey  <tom@tromey.com>
959
960         * dwarf2read.c (save_gdb_index_command): Constify.
961
962 2017-09-27  Tom Tromey  <tom@tromey.com>
963
964         * stap-probe.c (info_probes_stap_command): Constify.
965
966 2017-09-27  Tom Tromey  <tom@tromey.com>
967
968         * fork-child.c (unset_exec_wrapper_command): Constify.
969
970 2017-09-27  Tom Tromey  <tom@tromey.com>
971
972         * btrace.c (get_uint, get_context_size, no_chunk)
973         (maint_btrace_packet_history_cmd)
974         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
975         (maint_info_btrace_cmd): Constify.
976
977 2017-09-27  Tom Tromey  <tom@tromey.com>
978
979         * reverse.c (delete_bookmark_command): Constify.
980
981 2017-09-27  Tom Tromey  <tom@tromey.com>
982
983         * remote.c (set_memory_packet_size)
984         (set_memory_write_packet_size, show_memory_write_packet_size)
985         (set_memory_read_packet_size, show_memory_read_packet_size)
986         (compare_sections_command, packet_command, remote_put_command)
987         (remote_get_command, remote_delete_command): Constify.
988
989 2017-09-27  Tom Tromey  <tom@tromey.com>
990
991         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
992         (set_mipsfpu_double_command, set_mipsfpu_none_command)
993         (set_mipsfpu_auto_command): Constify.
994
995 2017-09-27  Tom Tromey  <tom@tromey.com>
996
997         * cli/cli-cmds.h (cd_command): Constify.
998         * cli/cli-cmds.c (cd_command): Constify.
999
1000 2017-09-27  Tom Tromey  <tom@tromey.com>
1001
1002         * thread.c (thread_name_command, thread_find_command): Constify.
1003
1004 2017-09-27  Tom Tromey  <tom@tromey.com>
1005
1006         * probe.c (enable_probes_command, disable_probes_command):
1007         Constify.
1008
1009 2017-09-27  Tom Tromey  <tom@tromey.com>
1010
1011         * symfile.c (symbol_file_command): Constify.
1012         * gdbcore.h (deprecated_file_changed_hook): Constify.
1013         * exec.c (deprecated_file_changed_hook, exec_file_command)
1014         (file_command): Constify.
1015         * defs.h (symbol_file_command): Constify.
1016
1017 2017-09-27  Tom Tromey  <tom@tromey.com>
1018
1019         * remote-fileio.c (set_system_call_allowed)
1020         (show_system_call_allowed): Constify.
1021
1022 2017-09-27  Tom Tromey  <tom@tromey.com>
1023
1024         * tracepoint.c (delete_trace_variable_command)
1025         (tfind_end_command, tfind_start_command, tfind_pc_command)
1026         (tfind_tracepoint_command, tfind_line_command)
1027         (tfind_range_command, tfind_outside_command): Constify.
1028
1029 2017-09-27  Tom Tromey  <tom@tromey.com>
1030
1031         * ax-gdb.c (maint_agent_printf_command, agent_command)
1032         (agent_eval_command): Constify.
1033
1034 2017-09-27  Tom Tromey  <tom@tromey.com>
1035
1036         * tracepoint.c (info_scope_command): Constify.
1037         * python/python.c (gdbpy_decode_line): Constify.
1038         * python/py-breakpoint.c (bppy_init): Constify.
1039         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1040         * location.h: (new_linespec_location)
1041         (string_to_event_location_basic, string_to_event_location):
1042         Constify.
1043         * location.c (new_linespec_location)
1044         (string_to_event_location_basic, string_to_event_location):
1045         Constify.
1046         * linespec.h (decode_line_with_current_source)
1047         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1048         * linespec.c (linespec_lex_to_end)
1049         (decode_line_with_current_source)
1050         (decode_line_with_last_displayed): Constify.
1051         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1052         Constify.
1053         * cli/cli-cmds.c (edit_command, list_command): Constify.
1054         * breakpoint.h (until_break_command, watch_command_wrapper)
1055         (awatch_command_wrapper, rwatch_command_wrapper)
1056         (init_ada_exception_breakpoint): Constify.
1057         * breakpoint.c (break_command_1, dprintf_command)
1058         (break_range_command, watch_command_wrapper)
1059         (rwatch_command_wrapper, awatch_command_wrapper)
1060         (until_break_command, init_ada_exception_breakpoint)
1061         (strace_marker_create_sals_from_location, trace_command)
1062         (ftrace_command, strace_command, struct tracepoint): Constify.
1063         * ax-gdb.c (agent_command_1): Constify.
1064         * ada-lang.c (ada_exception_sal): Constify.
1065
1066 2017-09-27  Tom Tromey  <tom@tromey.com>
1067
1068         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1069         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1070         (get_context_size, no_chunk, get_insn_history_modifiers)
1071         (cmd_record_insn_history, get_call_history_modifiers)
1072         (cmd_record_call_history): Constify.
1073
1074 2017-09-27  Tom Tromey  <tom@tromey.com>
1075
1076         * source.c (show_substitute_path_command)
1077         (unset_substitute_path_command, set_substitute_path_command):
1078         Constify.
1079
1080 2017-09-27  Tom Tromey  <tom@tromey.com>
1081
1082         * typeprint.c (maintenance_print_type): Constify.
1083         * maint.c (maintenance_dump_me, maintenance_demangle)
1084         (maintenance_time_display, maintenance_info_sections)
1085         (maintenance_print_statistics, maintenance_deprecate)
1086         (maintenance_undeprecate): Constify.
1087         (maintenance_do_deprecate): Constify.  Use std::string.
1088         (maintenance_selftest): Constify.
1089         * gdbtypes.h (maintenance_print_type): Constify.
1090
1091 2017-09-27  Tom Tromey  <tom@tromey.com>
1092
1093         * hppa-tdep.c (unwind_command): Constify.
1094
1095 2017-09-27  Tom Tromey  <tom@tromey.com>
1096
1097         * target-descriptions.c (unset_tdesc_filename_cmd)
1098         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1099         Constify.
1100
1101 2017-09-27  Tom Tromey  <tom@tromey.com>
1102
1103         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1104
1105 2017-09-27  Tom Tromey  <tom@tromey.com>
1106
1107         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1108
1109 2017-09-27  Tom Tromey  <tom@tromey.com>
1110
1111         * tui/tui-regs.c (tui_reg_command): Constify.
1112
1113 2017-09-27  Tom Tromey  <tom@tromey.com>
1114
1115         * skip.c (skip_file_command, skip_function_command)
1116         (skip_enable_command, skip_disable_command, skip_delete_command):
1117         Constify.
1118
1119 2017-09-27  Tom Tromey  <tom@tromey.com>
1120
1121         * record-btrace.c (cmd_record_btrace_bts_start)
1122         (cmd_record_btrace_pt_start): Constify.
1123
1124 2017-09-27  Tom Tromey  <tom@tromey.com>
1125
1126         * symmisc.c (maintenance_print_symbols)
1127         (maintenance_print_msymbols, maintenance_print_objfiles)
1128         (maintenance_info_symtabs, maintenance_check_symtabs)
1129         (maintenance_expand_symtabs, maintenance_info_line_tables):
1130         Constify.
1131
1132 2017-09-27  Tom Tromey  <tom@tromey.com>
1133
1134         * top.c (new_ui_command): Constify.
1135
1136 2017-09-27  Tom Tromey  <tom@tromey.com>
1137
1138         * symfile.c (add_symbol_file_command)
1139         (remove_symbol_file_command, list_overlays_command)
1140         (map_overlay_command, unmap_overlay_command)
1141         (overlay_auto_command, overlay_manual_command)
1142         (overlay_off_command, overlay_load_command): Constify.
1143
1144 2017-09-27  Tom Tromey  <tom@tromey.com>
1145
1146         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1147         (info_spu_mailbox_command, info_spu_dma_command)
1148         (info_spu_proxydma_command): Constify.
1149
1150 2017-09-27  Tom Tromey  <tom@tromey.com>
1151
1152         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1153
1154 2017-09-27  Tom Tromey  <tom@tromey.com>
1155
1156         * cli/cli-script.c (user_defined_command): Constify.
1157
1158 2017-09-27  Tom Tromey  <tom@tromey.com>
1159
1160         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1161         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1162         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1163         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1164         (dump_binary_value, append_binary_memory, append_binary_value):
1165         Constify.
1166         (struct dump_context) <func>: Constify.
1167         (add_dump_command): Update.
1168
1169 2017-09-27  Tom Tromey  <tom@tromey.com>
1170
1171         * cli/cli-cmds.c (show_version, show_configuration)
1172         (source_command, show_user): Constify.
1173
1174 2017-09-27  Tom Tromey  <tom@tromey.com>
1175
1176         * target.c (maintenance_print_target_stack): Constify.
1177
1178 2017-09-27  Tom Tromey  <tom@tromey.com>
1179
1180         * interps.c (interpreter_exec_cmd): Constify.
1181
1182 2017-09-27  Tom Tromey  <tom@tromey.com>
1183
1184         * record-full.c (cmd_record_full_restore): Constify.
1185
1186 2017-09-27  Tom Tromey  <tom@tromey.com>
1187
1188         * memattr.c (enable_mem_command, disable_mem_command)
1189         (delete_mem_command): Constify.
1190
1191 2017-09-27  Tom Tromey  <tom@tromey.com>
1192
1193         * value.c (show_convenience): Constify.
1194
1195 2017-09-27  Tom Tromey  <tom@tromey.com>
1196
1197         * gdbcore.h (core_file_command): Update.
1198         * corefile.c (core_file_command): Constify.
1199
1200 2017-09-27  Tom Tromey  <tom@tromey.com>
1201
1202         * user-regs.c (maintenance_print_user_registers): Constify.
1203
1204 2017-09-27  Tom Tromey  <tom@tromey.com>
1205
1206         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1207
1208 2017-09-27  Tom Tromey  <tom@tromey.com>
1209
1210         * cp-support.c (first_component_command): Constify.
1211
1212 2017-09-27  Tom Tromey  <tom@tromey.com>
1213
1214         * psymtab.c (maintenance_print_psymbols)
1215         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1216         Constify.
1217
1218 2017-09-27  Tom Tromey  <tom@tromey.com>
1219
1220         * windows-tdep.c (display_tib): Constify.
1221
1222 2017-09-27  Tom Tromey  <tom@tromey.com>
1223
1224         * linux-fork.c (delete_checkpoint_command)
1225         (detach_checkpoint_command): Constify.
1226
1227 2017-09-27  Tom Tromey  <tom@tromey.com>
1228
1229         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1230
1231 2017-09-27  Tom Tromey  <tom@tromey.com>
1232
1233         * arc-tdep.c (dump_arc_instruction_command): Constify.
1234
1235 2017-09-27  Tom Tromey  <tom@tromey.com>
1236
1237         * valprint.c (set_radix, show_radix): Constify.
1238
1239 2017-09-27  Tom Tromey  <tom@tromey.com>
1240
1241         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1242
1243 2017-09-27  Tom Tromey  <tom@tromey.com>
1244
1245         * command.h (not_just_help_class_command): Update.
1246         * cli/cli-decode.h (not_just_help_class_command): Update.
1247         * cli/cli-decode.c (not_just_help_class_command): Constify.
1248
1249 2017-09-27  Tom Tromey  <tom@tromey.com>
1250
1251         * gdb_bfd.c (maintenance_info_bfds): Constify.
1252
1253 2017-09-27  Tom Tromey  <tom@tromey.com>
1254
1255         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1256         overloads.
1257         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1258         (do_const_cfunc): New function.
1259         (cmd_cfunc_eq): New overload.
1260         (cli_user_command_p): Check do_const_cfunc.
1261         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1262         const_cfunc.
1263         * command.h (add_cmd): Add const overload and no-function
1264         overload.
1265         (set_cmd_cfunc): Add const overload.
1266         (cmd_const_cfunc_ftype): Declare.
1267         (cmd_cfunc_eq): Add const overload.
1268         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1269         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1270         overload.
1271
1272 2017-09-27  Tom Tromey  <tom@tromey.com>
1273
1274         * macroexp.c (get_next_token_for_substitution): New function.
1275         (substitute_args): Call it.  Check for __VA_OPT__.
1276
1277 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1278             Pedro Alves <palves@redhat.com>
1279
1280         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1281         producer_is_icc_lt_14.
1282         (producer_is_icc_lt_14): New function.
1283         (check_producer): Add code for checking version of ICC.
1284         (producer_is_icc): Move to producer.c.
1285         (read_structure_type): Restrict ICC workaround to ICC<14.
1286         * producer.c: Include selftest.h.
1287         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1288         New functions.
1289         * producer.h (producer_is_icc): New declaration.
1290
1291 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1292
1293         * Makefile.in (SFILES): Add producer.c.
1294         (COMMON_OBS): Add producer.o
1295         * amd64-tdep.c (producer.h): Add new include.
1296         * dwarf2read.c (producer.h): Add new include.
1297         * producer.c: New file.
1298         * producer.h: New file.
1299         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1300         producer.c.
1301         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1302         producer.h.
1303
1304 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1305
1306         * configure.ac: Search ncursesw before ncurses.
1307         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1308         * gdb_curses.h: Include <ncursesw/ncurses.h>
1309         * config.in, configure: Regenerate.
1310
1311 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1312
1313         PR gdb/22185
1314         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1315         obsolete.
1316         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1317         Remove i386sol2 support.
1318         * configure.nat <i386sol2>: Remove.
1319         <sol2-64>: Fold into ...
1320         <sol2>: ... this.
1321         Move common settings to default section.
1322         Add sol-thread.o.
1323         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1324         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1325         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1326         <i[34567]86-*-solaris*>: Remove.
1327         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1328
1329         * configure.ac: Remove wctype in libw check.
1330         (_MSE_INT_H): Don't define on Solaris 7-9.
1331         <solaris*>: Remove libthread_db.so.1 check.
1332         * configure: Regenerate.
1333         * config.in: Regenerate.
1334
1335         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1336         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1337         (gdb_ps_size_t): Remove.
1338         Use base types in users.
1339         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1340
1341         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1342
1343 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1344
1345         PR build/22206
1346         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1347         (adi_is_addr_mapped): Likewise.
1348         (PSR_ICC): Don't redefine.
1349         (PSR_IMPL): Likewise.
1350
1351 2017-09-25  Tom Tromey  <tom@tromey.com>
1352
1353         * regcache.c (regcache::dump): Use string_printf.
1354
1355 2017-09-25  Tom Tromey  <tom@tromey.com>
1356
1357         * regcache.c (class regcache_invalidator): New.
1358         (struct register_to_invalidate): Remove.
1359         (make_cleanup_regcache_invalidate): Remove.
1360         (regcache::raw_write): Use regcache_invalidator.
1361
1362 2017-09-25  Tom Tromey  <tom@tromey.com>
1363
1364         * spu-tdep.c (spu2ppu_sniffer): Update.
1365         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1366         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1367         Remove.
1368         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1369         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1370         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1371         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1372         (frame_pop): Update.
1373
1374 2017-09-25  Tom Tromey  <tom@tromey.com>
1375
1376         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1377         * regcache.h (regcache_xfree): Don't declare.
1378         * regcache.c (regcache_xfree): Remove.
1379         (do_regcache_xfree): Use delete.
1380         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1381         * linux-fork.c (free_fork): Use delete.
1382         (fork_save_infrun_state): Likewise.
1383         * jit.c (jit_dealloc_cache): Use delete.
1384         * infrun.c (discard_infcall_suspend_state): Use delete.
1385
1386 2017-09-25  Tom Tromey  <tom@tromey.com>
1387
1388         * regcache.h (regcache_xmalloc): Don't declare.
1389         (regcache_raw_set_cached_value): Update comment.
1390         * regcache.c (regcache_xmalloc): Remove.
1391         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1392         * jit.c (jit_frame_sniffer): Use new.
1393         * frame.c (frame_save_as_regcache): Use new.
1394
1395 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1396
1397         * NEWS: Advertise support for guarded-storage registers on IBM z.
1398
1399 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1400
1401         * s390-linux-nat.c (have_regset_gs): New static variable.
1402         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1403         control block and guarded-storage broadcast control regsets.
1404         (s390_read_description): Detect whether the target has
1405         guarded-storage support, return appropriate tdesc.
1406         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1407         (features/s390x-gs-linux64.c): Likewise.
1408         (struct gdbarch_tdep) <have_gs>: New field.
1409         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1410         (s390_gsbc_regset): New variables.
1411         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1412         and s390_gsbc_regset, if applicable.
1413         (s390_core_read_description): Check whether core file was from a
1414         target with guarded-storage support; include appropriate regsets.
1415         (s390_gdbarch_init): Add registers for guarded-storage support.
1416         (_initialize_s390_tdep): Initialize new target descriptions that
1417         include registers for guarded-storage support.
1418         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1419         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1420         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1421         (S390_NUM_REGS): Adjust macro definition.
1422         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1423         (tdesc_s390x_gs_linux64): New declarations.
1424
1425 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1426
1427         * features/s390-gs-linux64.xml: New file.
1428         * features/s390-gs.xml: New file.
1429         * features/s390-gsbc.xml: New file.
1430         * features/s390x-gs-linux64.xml: New file.
1431         * features/Makefile (WHICH): Add s390-gs-linux64 and
1432         s390x-gs-linux64.
1433         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1434         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1435         * features/s390-gs-linux64.c: New generated file.
1436         * features/s390x-gs-linux64.c: New file.
1437         * regformats/s390-gs-linux64.dat: New file.
1438         * regformats/s390x-gs-linux64.dat: New file.
1439
1440 2017-09-23  Tom Tromey  <tom@tromey.com>
1441
1442         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1443
1444 2017-09-22  Tom Tromey  <tom@tromey.com>
1445
1446         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1447         type to scoped_restore_tmpl.
1448         <scoped_input_handler>: Initialize m_quit_handler directly.
1449
1450 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1451
1452         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1453         (cd_command): Likewise.  Free "current_directory" before
1454         assigning to it.
1455         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1456         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1457         * top.c (gdb_dirbuf): Remove global declaration.
1458         * top.h (gdb_dirbuf): Likewise.
1459
1460 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1461
1462         * gnulib/aclocal.m4: Regenerate.
1463         * gnulib/config.in: Regenerate.
1464         * gnulib/configure: Regenerate.
1465         * gnulib/import/Makefile.am: Regenerate.
1466         * gnulib/import/Makefile.in: Regenerate.
1467         * gnulib/import/assure.h: New file.
1468         * gnulib/import/at-func.c: Likewise
1469         * gnulib/import/chdir-long.c: New file.
1470         * gnulib/import/chdir-long.h: New file.
1471         * gnulib/import/cloexec.c: New file.
1472         * gnulib/import/cloexec.h: New file.
1473         * gnulib/import/close.c: New file.
1474         * gnulib/import/closedir.c: New file.
1475         * gnulib/import/dirent-private.h: New file.
1476         * gnulib/import/dup-safer.c: New file.
1477         * gnulib/import/dup.c: New file.
1478         * gnulib/import/dup2.c: New file.
1479         * gnulib/import/error.c: New file.
1480         * gnulib/import/error.h: New file.
1481         * gnulib/import/exitfail.c: New file.
1482         * gnulib/import/exitfail.h: New file.
1483         * gnulib/import/fchdir.c: New file.
1484         * gnulib/import/fcntl.c: New file.
1485         * gnulib/import/fcntl.in.h: New file.
1486         * gnulib/import/fd-hook.c: New file.
1487         * gnulib/import/fd-hook.h: New file.
1488         * gnulib/import/fd-safer.c: New file.
1489         * gnulib/import/fdopendir.c: New file.
1490         * gnulib/import/filename.h: New file.
1491         * gnulib/import/filenamecat-lgpl.c: New file.
1492         * gnulib/import/filenamecat.h: New file.
1493         * gnulib/import/fstat.c: New file.
1494         * gnulib/import/fstatat.c: New file.
1495         * gnulib/import/getcwd-lgpl.c: New file.
1496         * gnulib/import/getcwd.c: New file.
1497         * gnulib/import/getdtablesize.c: New file.
1498         * gnulib/import/getlogin_r.c: New file.
1499         * gnulib/import/getprogname.c: New file.
1500         * gnulib/import/getprogname.h: New file.
1501         * gnulib/import/gettext.h: New file.
1502         * gnulib/import/glob-libc.h: New file.
1503         * gnulib/import/glob.c: New file.
1504         * gnulib/import/glob.in.h: New file.
1505         * gnulib/import/intprops.h: New file.
1506         * gnulib/import/m4/chdir-long.m4: New file.
1507         * gnulib/import/m4/close.m4: New file.
1508         * gnulib/import/m4/closedir.m4: New file.
1509         * gnulib/import/m4/d-ino.m4: New file.
1510         * gnulib/import/m4/d-type.m4: New file.
1511         * gnulib/import/m4/dup.m4: New file.
1512         * gnulib/import/m4/dup2.m4: New file.
1513         * gnulib/import/m4/error.m4: New file.
1514         * gnulib/import/m4/fchdir.m4: New file.
1515         * gnulib/import/m4/fcntl.m4: New file.
1516         * gnulib/import/m4/fcntl_h.m4: New file.
1517         * gnulib/import/m4/fdopendir.m4: New file.
1518         * gnulib/import/m4/filenamecat.m4: New file.
1519         * gnulib/import/m4/fstat.m4: New file.
1520         * gnulib/import/m4/fstatat.m4: New file.
1521         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1522         * gnulib/import/m4/getcwd-path-max.m4: New file.
1523         * gnulib/import/m4/getcwd.m4: New file.
1524         * gnulib/import/m4/getdtablesize.m4: New file.
1525         * gnulib/import/m4/getlogin_r.m4: New file.
1526         * gnulib/import/m4/getprogname.m4: New file.
1527         * gnulib/import/m4/glob.m4: New file.
1528         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1529         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1530         * gnulib/import/m4/mempcpy.m4: New file.
1531         * gnulib/import/m4/memrchr.m4: New file.
1532         * gnulib/import/m4/mode_t.m4: New file.
1533         * gnulib/import/m4/msvc-inval.m4: New file.
1534         * gnulib/import/m4/msvc-nothrow.m4: New file.
1535         * gnulib/import/m4/open.m4: New file.
1536         * gnulib/import/m4/openat.m4: New file.
1537         * gnulib/import/m4/opendir.m4: New file.
1538         * gnulib/import/m4/readdir.m4: New file.
1539         * gnulib/import/m4/realloc.m4: New file.
1540         * gnulib/import/m4/rewinddir.m4: New file.
1541         * gnulib/import/m4/save-cwd.m4: New file.
1542         * gnulib/import/m4/strdup.m4: New file.
1543         * gnulib/import/m4/strerror.m4: New file.
1544         * gnulib/import/m4/unistd-safer.m4: New file.
1545         * gnulib/import/mempcpy.c: New file.
1546         * gnulib/import/memrchr.c: New file.
1547         * gnulib/import/msvc-inval.c: New file.
1548         * gnulib/import/msvc-inval.h: New file.
1549         * gnulib/import/msvc-nothrow.c: New file.
1550         * gnulib/import/msvc-nothrow.h: New file.
1551         * gnulib/import/open.c: New file.
1552         * gnulib/import/openat-die.c: New file.
1553         * gnulib/import/openat-priv.h: New file.
1554         * gnulib/import/openat-proc.c: New file.
1555         * gnulib/import/openat.c: New file.
1556         * gnulib/import/openat.h: New file.
1557         * gnulib/import/opendir.c: New file.
1558         * gnulib/import/pipe-safer.c: New file.
1559         * gnulib/import/readdir.c: New file.
1560         * gnulib/import/realloc.c: New file.
1561         * gnulib/import/rewinddir.c: New file.
1562         * gnulib/import/save-cwd.c: New file.
1563         * gnulib/import/save-cwd.h: New file.
1564         * gnulib/import/strdup.c: New file.
1565         * gnulib/import/strerror-override.c: New file.
1566         * gnulib/import/strerror-override.h: New file.
1567         * gnulib/import/strerror.c: New file.
1568         * gnulib/import/unistd--.h: New file.
1569         * gnulib/import/unistd-safer.h: New file.
1570         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1571         "getcwd" and "glob".
1572         * ser-tcp.c: Undefine "close" before redefining it.
1573
1574 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1575
1576         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1577         get rid of res_val.
1578
1579 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1580
1581         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1582         <sol2,sparc>: Likewise.
1583         <sol2-64,i386>: Likewise.
1584
1585         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1586         -Wdeprecated-declarations on *-*-solaris*.
1587         * configure: Regenerate.
1588
1589         * procfs.c: Include "nat/inferior.h".
1590         (procfs_info_proc): Fix typo.
1591
1592 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1593
1594         * remote.c (vector): Include.
1595         (struct private_thread_info): Add field, thread_handle.
1596         (free_private_thread_info): Deallocate storage associated with
1597         thread handle.
1598         (get_private_info_thread): Initialize `thread_handle' field.
1599         (struct thread_item): Add field, thread_handle.
1600         (clear_threads_listing_context): Deallocate storage associated
1601         with thread handle.
1602         (start_thread): Add support for "handle" attribute.
1603         (thread_attributes): Add "handle".
1604         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1605         field.
1606         (remote_update_thread_list): Update thread_handle.
1607         (remote_thread_handle_to_thread_info): New function.
1608         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1609
1610 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1611
1612         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1613         function.
1614         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1615         * python/python-internal.h (thread_object_type): Declare.
1616
1617 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1618
1619         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1620         (target_thread_handle_to_thread_info): Declare.
1621         * target.c (target_thread_handle_to_thread_info): New function.
1622         * target-delegates.c: Regenerate.
1623         * gdbthread.h (find_thread_by_handle): Declare.
1624         * thread.c (find_thread_by_handle): New function.
1625         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1626         function.
1627         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1628
1629 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1630
1631         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1632
1633 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1634
1635         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1636
1637 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1638
1639         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1640         to gdb_target_obs.
1641
1642 2017-09-20  Tom Tromey  <tom@tromey.com>
1643
1644         * breakpoint.c (struct counted_command_line): Remove.
1645         (breakpoint_commands): Update.
1646         (alloc_counted_command_line, incref_counted_command_line)
1647         (decref_counted_command_line, do_cleanup_counted_command_line)
1648         (make_cleanup_decref_counted_command_line): Remove.
1649         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1650         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1651         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1652         (save_breakpoints): Update.
1653         * breakpoint.h (counted_command_line): Now a typedef to
1654         shared_ptr.
1655         (struct breakpoint) <commands>: Now a counted_command_line.
1656         (struct bpstats) <command>: Likewise.
1657
1658 2017-09-20  Tom Tromey  <tom@tromey.com>
1659
1660         * breakpoint.c (struct commands_info, do_map_commands_command):
1661         Remove.
1662         (commands_command_1): Update.
1663         (iterate_over_related_breakpoints): Take a function_view.
1664         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1665         (delete_command): Update.
1666         (map_breakpoint_numbers): Take a function_view.
1667         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1668         (disable_command): Update.
1669         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1670         (enable_command): Update.
1671         (struct disp_data, do_enable_breakpoint_disp)
1672         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1673         (do_map_enable_delete_breakpoint): Remove.
1674         (enable_once_command, enable_count_command, enable_delete_command)
1675         (delete_trace_variable_command): Update.
1676
1677 2017-09-20  Tom Tromey  <tom@tromey.com>
1678
1679         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1680         (bpstat_clear): Use delete.
1681         (bpstats): New constructors.
1682         (bpstat_copy, bpstat_stop_status): Use new.
1683         (dprintf_after_condition_true): Update.
1684         * breakpoint.h (bpstats::bpstats): Add constructors.
1685         (bpstats::~bpstats): Add destructor.
1686
1687 2017-09-20  Pedro Alves  <palves@redhat.com>
1688
1689         * eval.c (make_params): Delete, refactored as ...
1690         (class fake_method): ... this new type's ctor.
1691         (fake_method::~fake_method): New.
1692         (evaluate_subexp_standard): Use 'fake_method'.
1693
1694 2017-09-20  Tom Tromey  <tom@tromey.com>
1695
1696         * windows-nat.c (get_windows_debug_event, windows_wait)
1697         (do_initial_windows_stuff, windows_attach): Update.
1698         * utils.c (vwarning, internal_vproblem): Update.
1699         (ui_unregister_input_event_handler_cleanup)
1700         (prepare_to_handle_input): Remove.
1701         (class scoped_input_handler): New.
1702         (defaulted_query, prompt_for_continue): Update.
1703         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1704         Update.
1705         * top.c (undo_terminal_modifications_before_exit): Update.
1706         * target/target.h (target_terminal_init, target_terminal_inferior)
1707         (target_terminal_ours): Don't declare.
1708         (class target_terminal): New.
1709         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1710         (target_terminal_ours_for_output)
1711         (make_cleanup_restore_target_terminal): Don't declare.
1712         (target_terminal_info): Remove.
1713         * target.c (enum terminal_state, terminal_state): Remove.
1714         (target_terminal::terminal_state): Define.
1715         (target_terminal::init): Rename from target_terminal_init.
1716         (target_terminal::inferior): Rename from
1717         target_terminal_inferior.
1718         (target_terminal::ours): Rename from target_terminal_ours.
1719         (target_terminal::ours_for_output): Rename from
1720         target_terminal_ours_for_output.
1721         (target_terminal::info): New method.
1722         (cleanup_restore_target_terminal)
1723         (make_cleanup_restore_target_terminal): Remove.
1724         * solib.c (handle_solib_event): Update.
1725         * remote.c (remote_serial_quit_handler): Update.
1726         (remote_terminal_inferior, remote_wait_as): Update.
1727         * record-full.c (record_full_wait_1): Update.
1728         * nto-procfs.c (procfs_create_inferior): Update.
1729         * nat/fork-inferior.c (startup_inferior): Update.
1730         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1731         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1732         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1733         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1734         (mi_breakpoint_created, mi_breakpoint_deleted)
1735         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1736         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1737         (mi_user_selected_context_changed, report_initial_inferior):
1738         Update.
1739         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1740         (linux_nat_terminal_inferior): Update.
1741         * infrun.c (follow_fork_inferior)
1742         (handle_vfork_child_exec_or_exit, do_target_resume)
1743         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1744         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1745         Update.
1746         * inflow.c (child_terminal_init, info_terminal_command): Update.
1747         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1748         (attach_command): Update.
1749         * infcall.c (call_thread_fsm_should_stop): Update.
1750         * gnu-nat.c (gnu_attach): Update.
1751         * extension.c (struct active_ext_lang_state)
1752         (restore_active_ext_lang): Update.
1753         * exceptions.c (print_flush): Update.
1754         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1755         (struct quit_handler_cleanup_data, restore_quit_handler)
1756         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1757         Remove.
1758         * cp-support.c (gdb_demangle): Update.
1759         * breakpoint.c (update_inserted_breakpoint_locations)
1760         (insert_breakpoint_locations, handle_jit_event)
1761         (disable_breakpoints_in_unloaded_shlib): Update.
1762         * annotate.c (annotate_breakpoints_invalid)
1763         (annotate_frames_invalid): Update.
1764
1765 2017-09-20  Tom Tromey  <tom@tromey.com>
1766
1767         * main.c (catch_command_errors): Rename from
1768         catch_command_errors_const.
1769         (captured_main_1): Update.
1770
1771 2017-09-20  Pedro Alves  <palves@redhat.com>
1772
1773         * cli/cli-cmds.c (list_command): Use print_sal_location.
1774         (print_sal_location): New function.
1775         (ambiguous_line_spec): Use print_sal_location.
1776         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1777         * symtab.c (find_function_start_sal): Likewise.
1778         * symtab.h (symtab_and_line::symbol): New field.
1779
1780 2017-09-20  Pedro Alves  <palves@redhat.com>
1781
1782         * linespec.c (minsym_found): Handle non-text minsyms.
1783         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1784
1785 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1786
1787         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1788         backslash.
1789
1790 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1791
1792         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1793         vmovups instead vmovaps.
1794         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1795
1796 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1797
1798         * NEWS (Changes since GDB 8.0): Add starti.
1799         * infcmd.c (enum run_break): New.
1800         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1801         case.
1802         (run_command): Use enum run_how.
1803         (start_command): Likewise.
1804         (starti_command): New function.
1805         (RUN_ARGS_HELP): New macro.
1806         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1807         commands.  Add starti command.
1808
1809 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1810
1811         * Makefile.in (monitor.o): Remove the rule.
1812
1813 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1814
1815         * annotate.h (struct annotate_arg_emitter): Use
1816         DISABLE_COPY_AND_ASSIGN.
1817         * common/refcounted-object.h (refcounted_object): Likewise.
1818         * completer.h (struct completion_result): Likewise.
1819         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1820         * filename-seen-cache.h (filename_seen_cache): Likewise.
1821         * gdbcore.h (thread_section_name): Likewise.
1822         * gdb_regex.h (compiled_regex): Likewise.
1823         * gdbthread.h (scoped_restore_current_thread): Likewise.
1824         * inferior.h (scoped_restore_current_inferior): Likewise.
1825         * jit.c (jit_reader): Likewise.
1826         * linespec.h (struct linespec_result): Likewise.
1827         * mi/mi-parse.h (struct mi_parse): Likewise.
1828         * nat/fork-inferior.c (execv_argv): Likewise.
1829         * progspace.h (scoped_restore_current_program_space): Likewise.
1830         * python/python-internal.h (class gdbpy_enter): Likewise.
1831         * regcache.h (regcache): Likewise.
1832         * target-descriptions.c (struct tdesc_reg): Likewise.
1833         (struct tdesc_type): Likewise.
1834         (struct tdesc_feature): Likewise.
1835         * ui-out.h (ui_out_emit_type): Likewise.
1836
1837 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1838
1839         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1840         label abort_expression.
1841
1842 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1843
1844         * common/buffer.c (buffer_xml_printf): Adjust.
1845         * common/xml-utils.c (xml_escape_text): Change return type to
1846         std::string, update code accordingly.
1847         * common/xml-utils.h (xml_escape_text): Change return type to
1848         std::string.
1849         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1850         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1851         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1852         Adjust.
1853
1854 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1855
1856         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1857         (SUBDIR_UNITTESTS_OBS): Add new object file.
1858         * unittests/xml-utils-selftests.c: New file.
1859
1860 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1861
1862         * common/selftest.h (selftest): New struct/interface.
1863         (register_test): Add name parameter, add new overload.
1864         (run_tests): Add filter parameter.
1865         (for_each_selftest_ftype): New typedef.
1866         (for_each_selftest): New declaration.
1867         * common/selftest.c (tests): Change type to
1868         map<string, unique_ptr<selftest>>.
1869         (simple_selftest): New struct.
1870         (register_test): New function.
1871         (register_test): Add name parameter and use it.
1872         (run_tests): Add filter parameter and use it.  Add prints.
1873         Adjust to vector -> map change.
1874         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1875         registering selftests.
1876         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1877         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1878         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1879         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1880         * findvar.c (_initialize_findvar): Likewise.
1881         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1882         * maint.c (maintenance_selftest): Update call to run_tests.
1883         (maintenance_info_selftests): New function.
1884         (_initialize_maint_cmds): Register "maintenance info selftests"
1885         command.  Update "maintenance selftest" doc.
1886         * regcache.c (_initialize_regcache): Add names when registering
1887         selftests.
1888         * rust-exp.y (_initialize_rust_exp): Likewise.
1889         * selftest-arch.c (gdbarch_selftest): New struct.
1890         (gdbarch_tests): Remove.
1891         (register_test_foreach_arch): Add name parameter.  Call
1892         register_test.
1893         (tests_with_arch): Remove, move most content to
1894         gdbarch_selftest::operator().
1895         (_initialize_selftests_foreach_arch): Remove.
1896         * selftest-arch.h (register_test_foreach_arch): Add name
1897         parameter.
1898         (run_tests_with_arch): New declaration.
1899         * utils-selftests.c (_initialize_utils_selftests): Add names
1900         when registering selftests.
1901         * utils.c (_initialize_utils): Likewise.
1902         * unittests/array-view-selftests.c
1903         (_initialize_array_view_selftests): Likewise.
1904         * unittests/environ-selftests.c (_initialize_environ_selftests):
1905         Likewise.
1906         * unittests/function-view-selftests.c
1907         (_initialize_function_view_selftests): Likewise.
1908         * unittests/offset-type-selftests.c
1909         (_initialize_offset_type_selftests): Likewise.
1910         * unittests/optional-selftests.c
1911         (_initialize_optional_selftests): Likewise.
1912         * unittests/scoped_restore-selftests.c
1913         (_initialize_scoped_restore_selftests): Likewise.
1914         * NEWS: Document "maintenance selftest" and "maint info
1915         selftests".
1916
1917 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1918
1919         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1920         scoped_restore.
1921
1922 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1923
1924         * mi/mi-main.c (mi_load_progress): Make uiout variable
1925         a unique_ptr.
1926
1927 2017-09-15  Pedro Alves  <palves@redhat.com>
1928
1929         * compile/compile-c-types.c (convert_enum, convert_int)
1930         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1931
1932 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1933
1934         * dwarf2read.c (copy_string): Remove.
1935         (parse_macro_definition): Replace copy_string with savestring.
1936
1937 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1938
1939         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1940         gdb_target_obs.
1941         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1942         Likewise.
1943         (i[34567]86-*-linux*): Likewise.
1944
1945 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1946
1947         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1948         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1949         <stack>: Change type to std::vector.
1950         <stack_len, stack_allocated>: Remove.
1951         <grow_stack>: Remove.
1952         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1953         (dwarf_expr_context::~dwarf_expr_context): Remove.
1954         (dwarf_expr_context::grow_stack): Remove.
1955         (dwarf_expr_context::push): Adjust.
1956         (dwarf_expr_context::pop): Adjust.
1957         (dwarf_expr_context::fetch): Adjust.
1958         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1959         (dwarf_expr_context::stack_empty_p): Adjust.
1960         (dwarf_expr_context::execute_stack_op): Adjust.
1961
1962 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1963
1964         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1965         return type to bool.
1966         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1967
1968 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1969
1970         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1971         Change type to bool.
1972         (dwarf_stack_value) <in_stack_memory>: Likewise.
1973         (dwarf_expr_context) <push_address>: Change parameter type to
1974         bool.
1975         <fetch_in_stack_memory>: Change return type to bool.
1976         <push>: Change parameter type to bool.
1977         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1978         to bool.
1979         (dwarf_expr_context::push_address): Likewise.
1980         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1981         to bool.
1982         (dwarf_expr_context::execute_stack_op): Adjust.
1983         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1984
1985 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1986
1987         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1988         (struct dwarf_expr_context) <n_pieces>: Remove.
1989         <pieces>: Change type to std::vector.
1990         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1991         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1992         pieces.
1993         (dwarf_expr_context::add_piece): Adjust.
1994         * dwarf2loc.c (struct piece_closure): Initialize fields.
1995         <n_pieces>: Remove.
1996         <pieces>: Change type to std::vector.
1997         (allocate_piece_closure): Adjust, change parameter to
1998         std::vector rvalue and std::move it to piece_closure.
1999         (rw_pieced_value): Adjust.
2000         (check_pieced_synthetic_pointer): Adjust.
2001         (indirect_synthetic_pointer): Adjust.
2002         (coerce_pieced_ref): Adjust.
2003         (free_pieced_value_closure):  Adjust.  Use delete to free
2004         piece_closure.
2005         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2006         to allocate_piece_closure.
2007         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2008
2009 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2010
2011         * probe.h (probe_ops_cp): Remove typedef.
2012         (DEF_VEC_P (probe_ops_cp)): Remove.
2013         (all_probe_ops): Change type to std::vector.
2014         * probe.c (info_probes_for_ops): Adjust to vector change.
2015         (probe_linespec_to_ops): Likewise.
2016         (all_probe_ops): Change type to std::vector.
2017         (_initialize_probe): Adjust to vector change.
2018         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2019         * elfread.c (elf_get_probes): Likewise.
2020         * stap-probe.c (_initialize_stap_probe): Likewise.
2021
2022 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2023
2024         * probe.h (struct bound_probe): Define constructors.
2025         * probe.c (bound_probe_s): Remove typedef.
2026         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2027         (collect_probes): Change return type to std::vector, remove
2028         cleanup.
2029         (compare_probes): Return bool, change parameter type.  Change
2030         semantic to "less than".
2031         (gen_ui_out_table_header_info): Change parameter to std::vector
2032         and update.
2033         (exists_probe_with_pops): Likewise.
2034         (info_probes_for_ops): Update to std::vector change.
2035         (enable_probes_command): Likewise.
2036         (disable_probes_command): Likewise.
2037
2038 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2039
2040         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2041         vec to std::vector.
2042         * probe.c (parse_probes_in_pspace): Update.
2043         (find_probes_in_objfile): Update.
2044         (find_probe_by_pc): Update.
2045         (collect_probes): Update.
2046         (probe_any_get_probes): Update.
2047         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2048         return type to reference to std::vector.
2049         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2050         std::vector and update.
2051         (dtrace_process_dof): Likewise.
2052         (dtrace_get_probes): Likewise.
2053         * elfread.c (elf_get_probes): Change return type to std::vector,
2054         store an std::vector in bfd_data.
2055         (probe_key_free): Update to std::vector.
2056         * stap-probe.c (handle_stap_probe): Change parameter to
2057         std::vector and update.
2058         (stap_get_probes): Likewise.
2059         * symfile-debug.c (debug_sym_get_probes): Change return type to
2060         std::vector and update.
2061
2062 2017-09-11  Tom Tromey  <tom@tromey.com>
2063
2064         * breakpoint.c (program_breakpoint_here_p): Update.
2065         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2066         from make_show_memory_breakpoints_cleanup.  Return a
2067         scoped_restore_tmpl<int>.
2068         (restore_show_memory_breakpoints): Remove.
2069         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2070         * mem-break.c (memory_validate_breakpoint): Update.
2071         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2072         (ia64_memory_remove_breakpoint): Update.
2073         (ia64_breakpoint_from_pc): Update.
2074         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2075         from make_show_memory_breakpoints_cleanup.
2076
2077 2017-09-11  Tom Tromey  <tom@tromey.com>
2078
2079         * d-namespace.c (d_lookup_symbol): Use std::string.
2080         (find_symbol_in_baseclass): Likewise.
2081
2082 2017-09-11  Tom Tromey  <tom@tromey.com>
2083
2084         * ctf.c (ctf_start): Use std::string.
2085
2086 2017-09-11  Tom Tromey  <tom@tromey.com>
2087
2088         * ada-lang.c (is_known_support_routine): Update.
2089         (ada_unhandled_exception_name_addr_from_raise): Update.
2090         * guile/scm-frame.c (gdbscm_frame_name): Update.
2091         * python/py-frame.c (frapy_name): Update.
2092         (frapy_function): Update.
2093         * stack.h (find_frame_funname): Update.
2094         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2095         (print_frame): Update.
2096
2097 2017-09-11  Tom Tromey  <tom@tromey.com>
2098
2099         * findcmd.c (put_bits): Take a gdb::byte_vector.
2100         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2101         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2102         cleanups.
2103         (find_command): Update.
2104
2105 2017-09-11  Tom Tromey  <tom@tromey.com>
2106
2107         * cli/cli-script.c (class scoped_restore_hook_in): New.
2108         (clear_hook_in_cleanup): Remove.
2109         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2110         scoped_restore_hook_in.
2111
2112 2017-09-11  Tom Tromey  <tom@tromey.com>
2113
2114         * cli/cli-script.c (restore_interp): Remove.
2115         (read_command_lines): Use scoped_restore_interp.
2116         * interps.c (scoped_restore_interp::set_temp): Rename from
2117         interp_set_temp.
2118         * interps.h (class scoped_restore_interp): New.
2119         (interp_set_temp): Remove.
2120
2121 2017-09-11  Tom Tromey  <tom@tromey.com>
2122
2123         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2124         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2125         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2126         scoped_restore.
2127         (mi_cmd_break_insert_1): Update.
2128         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2129         scoped_restore.
2130
2131 2017-09-11  Tom Tromey  <tom@tromey.com>
2132
2133         * demangle.c (demangle_command): Update.
2134         * breakpoint.c (disable_command): Update.
2135         (enable_command): Update.
2136         (find_location_by_number): Make "number" const.  Use
2137         get_number_trailer.
2138         * cli/cli-utils.c (extract_arg): Return std::string.
2139         * probe.c (parse_probe_linespec): Update.  Change types.
2140         (collect_probes): Take string arguments.
2141         (parse_probe_linespec): Likewise.
2142         (info_probes_for_ops): Update.
2143         (enable_probes_command): Update.
2144         (disable_probes_command): Update.
2145         * break-catch-sig.c (catch_signal_split_args): Update.
2146         * mi/mi-parse.c (mi_parse): Update.
2147
2148 2017-09-11  Tom Tromey  <tom@tromey.com>
2149
2150         * language.h (language_enum): Make argument const.
2151         * language.c (language_enum): Make argument const.
2152
2153 2017-09-11  Tom Tromey  <tom@tromey.com>
2154
2155         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2156         as function.
2157         (skip_to_space): Rename from skip_to_space_const.
2158         * common/common-utils.c (skip_to_space): New function.
2159         (skip_to_space): Rename from skip_to_space_const.
2160         * cli/cli-utils.h (get_number): Rename from get_number_const.
2161         (extract_arg): Rename from extract_arg_const.
2162         * cli/cli-utils.c (get_number): Rename from get_number_const.
2163         (extract_arg): Rename from extract_arg_const.
2164         (number_or_range_parser::get_number): Use ::get_number.
2165         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2166         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2167         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2168         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2169         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2170         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2171         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2172         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2173
2174 2017-09-11  Tom Tromey  <tom@tromey.com>
2175
2176         * python/python.c (do_start_initialization): Use
2177         py-event-types.def to initialize types.
2178         Define all object type structures.
2179         * python/python-internal.h: Don't declare event initialization
2180         functions.
2181         * python/py-threadevent.c (thread_event_object_type): Don't
2182         define.
2183         * python/py-stopevent.c (stop_event_object_type): Don't define.
2184         * python/py-signalevent.c (signal_event_object_type): Don't
2185         declare or define.
2186         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2187         (clear_objfiles_event_object_type): Don't declare or define.
2188         * python/py-infevents.c (inferior_call_pre_event_object_type)
2189         (inferior_call_post_event_object_type)
2190         (register_changed_event_object_type)
2191         (memory_changed_event_object_type): Don't declare or define.
2192         * python/py-inferior.c (new_thread_event_object_type)
2193         (new_inferior_event_object_type)
2194         (inferior_deleted_event_object_type): Don't declare or define.
2195         * python/py-exitedevent.c (exited_event_object_type): Don't
2196         declare or define.
2197         * python/py-evts.c (gdbpy_initialize_py_events): Use
2198         py-all-events.def.
2199         * python/py-events.h (thread_event_object_type): Don't declare.
2200         (events_object): Use py-all-events.def.
2201         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2202         py-event-types.def.
2203         * python/py-event-types.def: New file.
2204         * python/py-continueevent.c (create_continue_event_object): Don't
2205         declare or define.
2206         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2207         declare or define.
2208         * python/py-all-events.def: New file.
2209
2210 2017-09-11  Tom Tromey  <tom@tromey.com>
2211
2212         * python/py-threadevent.c (create_thread_event_object): Return
2213         gdbpy_ref.
2214         * python/py-stopevent.h (create_stop_event_object)
2215         (create_breakpoint_event_object, create_signal_event_object):
2216         Update.
2217         * python/py-stopevent.c (create_stop_event_object): Return
2218         gdbpy_ref.
2219         (emit_stop_event): Update.
2220         * python/py-signalevent.c (create_signal_event_object): Return
2221         gdbpy_ref.
2222         * python/py-infevents.c (create_inferior_call_event_object):
2223         Update.
2224         * python/py-event.h (create_event_object)
2225         (create_thread_event_object): Update.
2226         * python/py-event.c (create_event_object): Return gdbpy_ref.
2227         * python/py-continueevent.c: Return gdbpy_ref.
2228         * python/py-bpevent.c (create_breakpoint_event_object): Return
2229         gdbpy_ref.
2230
2231 2017-09-11  Tom Tromey  <tom@tromey.com>
2232
2233         PR python/15622:
2234         * NEWS: Add entry.
2235         * python/python.c (do_start_initialization): Initialize new event
2236         types.
2237         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2238         (gdbpy_initialize_inferior_deleted_event)
2239         (gdbpy_initialize_new_thread_event): Declare.
2240         * python/py-threadevent.c (create_thread_event_object): Add option
2241         "thread" parameter.
2242         * python/py-inferior.c (new_thread_event_object_type)
2243         (new_inferior_event_object_type)
2244         (inferior_deleted_event_object_type): Declare.
2245         (python_new_inferior, python_inferior_deleted): New functions.
2246         (add_thread_object): Emit new_thread event.
2247         (gdbpy_initialize_inferior): Attach new functions to corresponding
2248         observers.
2249         (new_thread, new_inferior, inferior_deleted): Define new event
2250         types.
2251         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2252         registries.
2253         * python/py-events.h (events_object) <new_inferior,
2254         inferior_deleted, new_thread>: New fields.
2255         * python/py-event.h (create_thread_event_breakpoint): Add optional
2256         "thread" parameter.
2257
2258 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2259
2260         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2261         check current_ui instead.
2262         (internal_vproblem): Likewise.
2263
2264 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2265
2266         * thread.c (print_thread_info_1): Remove unnecessary calls to
2267         uiout->is_mi_like_p.
2268
2269 2017-09-09  Tom Tromey  <tom@tromey.com>
2270
2271         * namespace.h (add_using_directive): Update.
2272         * namespace.c (add_using_directive): Change type of excludes to
2273         std::vector.
2274         * dwarf2read.c (read_import_statement): Use std::vector.
2275         (read_namespace): Update.
2276         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2277
2278 2017-09-09  Tom Tromey  <tom@tromey.com>
2279
2280         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2281
2282 2017-09-09  Tom Tromey  <tom@tromey.com>
2283
2284         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2285
2286 2017-09-09  Tom Tromey  <tom@tromey.com>
2287
2288         * stack.c (func_command): Use gdb::def_vector.
2289
2290 2017-09-09  Tom Tromey  <tom@tromey.com>
2291
2292         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2293         ui_out_emit_list, ui_out_emit_tuple.
2294         (mi_cmd_var_update): Likewise.
2295
2296 2017-09-09  Tom Tromey  <tom@tromey.com>
2297
2298         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2299         ui_out_redirect_pop.
2300         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2301         ui_out_redirect_pop.
2302         * utils.c (do_ui_out_redirect_pop)
2303         (make_cleanup_ui_out_redirect_pop): Remove.
2304         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2305         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2306         * ui-out.h (ui_out_redirect_pop): New class.
2307
2308 2017-09-09  Tom Tromey  <tom@tromey.com>
2309
2310         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2311         (list_available_thread_groups, mi_cmd_list_thread_groups)
2312         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2313         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2314         Likewise.
2315
2316 2017-09-09  Tom Tromey  <tom@tromey.com>
2317
2318         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2319         ui_out_emit_tuple.
2320
2321 2017-09-09  Tom Tromey  <tom@tromey.com>
2322
2323         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2324         * stack.c (print_frame): Use ui_out_emit_tuple.
2325         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2326         (info_spu_mailbox_command, info_spu_dma_command)
2327         (info_spu_proxydma_command): Likewise.
2328         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2329         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2330         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2331         ui_out_emit_tuple.
2332         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2333
2334 2017-09-09  Tom Tromey  <tom@tromey.com>
2335
2336         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2337         (class ui_out_emit_table): Update comment.
2338         * ui-out.c (do_cleanup_table_end)
2339         (make_cleanup_ui_out_table_begin_end): Remove.
2340         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2341         (info_spu_dma_cmdlist): Likewise.
2342         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2343         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2344         ui_out_emit_table.
2345
2346 2017-09-09  Tom Tromey  <tom@tromey.com>
2347
2348         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2349         ui_out_emit_list, gdb::optional.
2350
2351 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2352
2353         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2354         prototype.
2355         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2356         prototype.
2357         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2358         prototype.
2359         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2360         * ada-exp.y: Remove _initialize_ada_exp prototype.
2361         * ada-lang.c: Remove _initialize_ada_language prototype.
2362         * ada-tasks.c: Remove _initialize_tasks prototype.
2363         * addrmap.c: Remove _initialize_addrmap prototype.
2364         * agent.c: Remove _initialize_agent prototype.
2365         * aix-thread.c: Remove _initialize_aix_thread prototype.
2366         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2367         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2368         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2369         prototype.
2370         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2371         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2372         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2373         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2374         prototype.
2375         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2376         prototype.
2377         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2378         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2379         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2380         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2381         prototype.
2382         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2383         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2384         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2385         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2386         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2387         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2388         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2389         prototype.
2390         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2391         prototype.
2392         * annotate.c: Remove _initialize_annotate prototype.
2393         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2394         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2395         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2396         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2397         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2398         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2399         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2400         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2401         prototype.
2402         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2403         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2404         * auto-load.c: Remove _initialize_auto_load prototype.
2405         * auxv.c: Remove _initialize_auxv prototype.
2406         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2407         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2408         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2409         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2410         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2411         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2412         prototype.
2413         * break-catch-throw.c: Remove _initialize_break_catch_throw
2414         prototype.
2415         * breakpoint.c: Remove _initialize_breakpoint prototype.
2416         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2417         * btrace.c: Remove _initialize_btrace prototype.
2418         * charset.c: Remove _initialize_charset prototype.
2419         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2420         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2421         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2422         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2423         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2424         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2425         * coffread.c: Remove _initialize_coffread prototype.
2426         * compile/compile.c: Remove _initialize_compile prototype.
2427         * complaints.c: Remove _initialize_complaints prototype.
2428         * completer.c: Remove _initialize_completer prototype.
2429         * copying.awk: Remove _initialize_copying prototype.
2430         * copying.c: Regenerate.
2431         * core-regset.c: Remove _initialize_core_regset prototype.
2432         * corefile.c: Remove _initialize_core prototype.
2433         * corelow.c: Remove _initialize_corelow prototype.
2434         * cp-abi.c: Remove _initialize_cp_abi prototype.
2435         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2436         * cp-support.c: Remove _initialize_cp_support prototype.
2437         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2438         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2439         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2440         * ctf.c: Remove _initialize_ctf prototype.
2441         * d-lang.c: Remove _initialize_d_language prototype.
2442         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2443         prototype.
2444         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2445         * dbxread.c: Remove _initialize_dbxread prototype.
2446         * dcache.c: Remove _initialize_dcache prototype.
2447         * demangle.c: Remove _initialize_demangler prototype.
2448         * disasm-selftests.c: Remove _initialize_disasm_selftests
2449         prototype.
2450         * disasm.c: Remove _initialize_disasm prototype.
2451         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2452         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2453         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2454         prototype.
2455         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2456         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2457         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2458         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2459         * elfread.c: Remove _initialize_elfread prototype.
2460         * exec.c: Remove _initialize_exec prototype.
2461         * extension.c: Remove _initialize_extension prototype.
2462         * f-lang.c: Remove _initialize_f_language prototype.
2463         * f-valprint.c: Remove _initialize_f_valprint prototype.
2464         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2465         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2466         * filesystem.c: Remove _initialize_filesystem prototype.
2467         * findcmd.c: Remove _initialize_mem_search prototype.
2468         * fork-child.c: Remove _initialize_fork_child prototype.
2469         * frame-base.c: Remove _initialize_frame_base prototype.
2470         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2471         * frame.c: Remove _initialize_frame prototype.
2472         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2473         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2474         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2475         * gcore.c: Remove _initialize_gcore prototype.
2476         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2477         * gdbarch.c: Regenerate.
2478         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2479         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2480         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2481         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2482         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2483         * go-lang.c: Remove _initialize_go_language prototype.
2484         * go32-nat.c: Remove _initialize_go32_nat prototype.
2485         * guile/guile.c: Remove _initialize_guile prototype.
2486         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2487         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2488         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2489         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2490         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2491         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2492         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2493         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2494         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2495         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2496         prototype.
2497         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2498         prototype.
2499         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2500         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2501         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2502         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2503         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2504         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2505         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2506         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2507         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2508         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2509         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2510         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2511         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2512         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2513         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2514         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2515         prototype.
2516         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2517         prototype.
2518         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2519         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2520         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2521         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2522         * infcall.c: Remove _initialize_infcall prototype.
2523         * infcmd.c: Remove _initialize_infcmd prototype.
2524         * inferior.c: Remove _initialize_inferiors prototype.
2525         * inflow.c: Remove _initialize_inflow prototype.
2526         * infrun.c: Remove _initialize_infrun prototype.
2527         * interps.c: Remove _initialize_interpreter prototype.
2528         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2529         * jit.c: Remove _initialize_jit prototype.
2530         * language.c: Remove _initialize_language prototype.
2531         * linux-fork.c: Remove _initialize_linux_fork prototype.
2532         * linux-nat.c: Remove _initialize_linux_nat prototype.
2533         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2534         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2535         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2536         * m2-lang.c: Remove _initialize_m2_language prototype.
2537         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2538         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2539         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2540         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2541         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2542         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2543         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2544         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2545         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2546         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2547         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2548         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2549         * machoread.c: Remove _initialize_machoread prototype.
2550         * macrocmd.c: Remove _initialize_macrocmd prototype.
2551         * macroscope.c: Remove _initialize_macroscope prototype.
2552         * maint.c: Remove _initialize_maint_cmds prototype.
2553         * mdebugread.c: Remove _initialize_mdebugread prototype.
2554         * memattr.c: Remove _initialize_mem prototype.
2555         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2556         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2557         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2558         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2559         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2560         * microblaze-linux-tdep.c: Remove
2561         _initialize_microblaze_linux_tdep prototype.
2562         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2563         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2564         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2565         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2566         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2567         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2568         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2569         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2570         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2571         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2572         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2573         prototype.
2574         * mipsread.c: Remove _initialize_mipsread prototype.
2575         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2576         prototype.
2577         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2578         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2579         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2580         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2581         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2582         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2583         prototype.
2584         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2585         * nto-procfs.c: Remove _initialize_procfs prototype.
2586         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2587         * objc-lang.c: Remove _initialize_objc_language prototype.
2588         * objfiles.c: Remove _initialize_objfiles prototype.
2589         * observer.c: Remove observer_test_first_notification_function,
2590         observer_test_second_notification_function,
2591         observer_test_third_notification_function, and
2592         _initialize_observer prototypes.
2593         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2594         * osabi.c: Remove _initialize_gdb_osabi prototype.
2595         * osdata.c: Remove _initialize_osdata prototype.
2596         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2597         * parse.c: Remove _initialize_parse prototype.
2598         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2599         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2600         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2601         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2602         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2603         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2604         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2605         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2606         * printcmd.c: Remove _initialize_printcmd prototype.
2607         * probe.c: Remove _initialize_probe prototype.
2608         * proc-api.c: Remove _initialize_proc_api prototype.
2609         * proc-events.c: Remove _initialize_proc_events prototype.
2610         * proc-service.c: Remove _initialize_proc_service prototype.
2611         * procfs.c: Remove _initialize_procfs prototype.
2612         * psymtab.c: Remove _initialize_psymtab prototype.
2613         * python/python.c: Remove _initialize_python prototype.
2614         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2615         * record-btrace.c: Remove _initialize_record_btrace prototype.
2616         * record-full.c: Remove _initialize_record_full prototype.
2617         * record.c: Remove _initialize_record prototype.
2618         * regcache.c: Remove _initialize_regcache prototype.
2619         * reggroups.c: Remove _initialize_reggroup prototype.
2620         * remote-notif.c: Remove _initialize_notif prototype.
2621         * remote-sim.c: Remove _initialize_remote_sim prototype.
2622         * remote.c: Remove _initialize_remote prototype.
2623         * reverse.c: Remove _initialize_reverse prototype.
2624         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2625         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2626         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2627         prototype.
2628         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2629         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2630         * rust-exp.y: Remove _initialize_rust_exp prototype.
2631         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2632         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2633         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2634         * score-tdep.c: Remove _initialize_score_tdep prototype.
2635         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2636         prototype.
2637         * ser-go32.c: Remove _initialize_ser_dos prototype.
2638         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2639         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2640         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2641         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2642         * serial.c: Remove _initialize_serial prototype.
2643         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2644         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2645         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2646         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2647         * skip.c: Remove _initialize_step_skip prototype.
2648         * sol-thread.c: Remove _initialize_sol_thread prototype.
2649         * solib-aix.c: Remove _initialize_solib_aix prototype.
2650         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2651         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2652         * solib-frv.c: Remove _initialize_frv_solib prototype.
2653         * solib-spu.c: Remove _initialize_spu_solib prototype.
2654         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2655         * solib-target.c: Remove _initialize_solib_target prototype.
2656         * solib.c: Remove _initialize_solib prototype.
2657         * source.c: Remove _initialize_source prototype.
2658         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2659         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2660         prototype.
2661         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2662         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2663         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2664         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2665         prototype.
2666         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2667         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2668         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2669         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2670         prototype.
2671         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2672         prototype.
2673         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2674         prototype.
2675         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2676         prototype.
2677         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2678         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2679         prototype.
2680         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2681         prototype.
2682         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2683         prototype.
2684         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2685         prototype.
2686         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2687         prototype.
2688         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2689         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2690         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2691         * stabsread.c: Remove _initialize_stabsread prototype.
2692         * stack.c: Remove _initialize_stack prototype.
2693         * stap-probe.c: Remove _initialize_stap_probe prototype.
2694         * std-regs.c: Remove _initialize_frame_reg prototype.
2695         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2696         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2697         * symfile.c: Remove _initialize_symfile prototype.
2698         * symmisc.c: Remove _initialize_symmisc prototype.
2699         * symtab.c: Remove _initialize_symtab prototype.
2700         * target-dcache.c: Remove _initialize_target_dcache prototype.
2701         * target-descriptions.c: Remove _initialize_target_descriptions
2702         prototype.
2703         * thread.c: Remove _initialize_thread prototype.
2704         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2705         prototype.
2706         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2707         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2708         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2709         prototype.
2710         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2711         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2712         * tracefile.c: Remove _initialize_tracefile prototype.
2713         * tracepoint.c: Remove _initialize_tracepoint prototype.
2714         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2715         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2716         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2717         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2718         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2719         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2720         * tui/tui.c: Remove _initialize_tui prototype.
2721         * typeprint.c: Remove _initialize_typeprint prototype.
2722         * user-regs.c: Remove _initialize_user_regs prototype.
2723         * utils.c: Remove _initialize_utils prototype.
2724         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2725         * valarith.c: Remove _initialize_valarith prototype.
2726         * valops.c: Remove _initialize_valops prototype.
2727         * valprint.c: Remove _initialize_valprint prototype.
2728         * value.c: Remove _initialize_values prototype.
2729         * varobj.c: Remove _initialize_varobj prototype.
2730         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2731         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2732         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2733         * windows-nat.c: Remove _initialize_windows_nat,
2734         _initialize_check_for_gdb_ini, and _initialize_loadable
2735         prototypes.
2736         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2737         * xcoffread.c: Remove _initialize_xcoffread prototype.
2738         * xml-support.c: Remove _initialize_xml_support prototype.
2739         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2740         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2741         prototype.
2742         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2743         prototype.
2744         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2745
2746 2017-09-08  Keith Seitz  <keiths@redhat.com>
2747
2748         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2749         field.
2750
2751 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2752
2753         * f-valprint.c (f_val_print): Remove check for one byte
2754         sized integers. Remove printing of character type.
2755
2756 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2757             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2758             Bernhard Heckel  <bernhard.heckel@intel.com>
2759
2760         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2761         to maintain proper indentation when printing pointers/refs.
2762
2763 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2764
2765         GDB 8.0.1 released.
2766
2767 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2768
2769         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2770
2771 2017-09-05  Tom Tromey  <tom@tromey.com>
2772
2773         * parse.c (funcall_chain): Now a std::vector.
2774         (start_arglist, end_arglist): Simplify.
2775         (free_funcalls): Remove.
2776         (parse_exp_in_context_1): Remove cleanup.
2777
2778 2017-09-05  Tom Tromey  <tom@tromey.com>
2779
2780         * go-exp.y (go_parse): Don't create a cleanup.
2781
2782 2017-09-05  Tom Tromey  <tom@tromey.com>
2783
2784         * d-exp.y (PrimaryExpression): Use std::string.
2785         (d_parse): Don't create a cleanup.
2786
2787 2017-09-05  Tom Tromey  <tom@tromey.com>
2788
2789         * utils.c (do_clear_parser_state): Remove.
2790         (make_cleanup_clear_parser_state): Remove.
2791         * p-exp.y (pascal_parse): Use scoped_restore.
2792         * m2-exp.y (m2_parse): Use scoped_restore.
2793         * f-exp.y (f_parse): Use scoped_restore.
2794         * d-exp.y (d_parse): Use scoped_restore.
2795         * c-exp.y (c_parse): Use scoped_restore.
2796         * ada-exp.y (ada_parse): Use scoped_restore.
2797         * utils.h (make_cleanup_clear_parser_state): Remove.
2798
2799 2017-09-06  Keith Seitz  <keiths@redhat.com>
2800
2801         * dwarf2read.c (dw2_linkage_name_attr): New function.
2802         (dw2_linkage_name): New function.
2803         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2804         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2805         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2806
2807 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2808
2809         * config/djgpp/djconfig.sh: Correct shell portability issue.
2810
2811 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2812
2813         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2814
2815 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2816
2817         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2818         * NEWS: Mention new FreeBSD/mips native configuration.
2819         * configure.host: Add aarch64*-*-freebsd*.
2820         * configure.nat: Likewise.
2821         * aarch64-fbsd-nat.c: New file.
2822
2823 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2824
2825         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2826         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2827         * NEWS: Mention new FreeBSD/aarch64 target.
2828         * configure.tgt: Add aarch64*-*-freebsd*.
2829         * aarch64-fbsd-tdep.c: New file.
2830         * aarch64-fbsd-tdep.h: New file.
2831
2832 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2833
2834         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2835
2836 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2837
2838         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2839         of TLS symbols.
2840
2841 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2842
2843         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2844         call.
2845
2846 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2847
2848         * infrun.c (follow_exec): Call add_thread after
2849         target_find_description.
2850
2851 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2852
2853         * infrun.c (handle_inferior_event_1): When exec'ing, read
2854         stop_pc after follow_exec.
2855
2856 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2857
2858         * remote.c (process_g_packet): Update error message.
2859
2860 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2861
2862         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2863         targets.
2864
2865 2017-09-05  Pedro Alves  <palves@redhat.com>
2866
2867         * eval.c (eval_call, evaluate_funcall): New functions, factored
2868         out from ...
2869         (evaluate_subexp_standard): ... this.
2870
2871 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2872
2873         * amd64-tdep.c (amd64_target_description): Create target
2874         descriptions.
2875         (_initialize_amd64_tdep): Don't call functions
2876         initialize_tdesc_amd64_*.  Add self tests.
2877         * arch/amd64.c (amd64_create_target_description): Add parameter
2878         is_linux.  Call set_tdesc_osabi if is_linux is true.
2879         * arch/amd64.h (amd64_create_target_description): Update the
2880         declaration.
2881         * arch/i386.c (i386_create_target_description): Add parameter
2882         is_linux.  Call set_tdesc_osabi if is_linux is true.
2883         * arch/i386.h (i386_create_target_description): Update
2884         declaration.
2885         * configure.tgt: Add i386.o to gdb_target_obs.
2886         * features/Makefile (XMLTOC): Remove i386/*.xml.
2887         * features/i386/amd64-avx-avx512.c: Remove.
2888         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2889         * features/i386/amd64-avx-mpx.c: Remove.
2890         * features/i386/amd64-avx.c: Remove.
2891         * features/i386/amd64-mpx.c: Remove.
2892         * features/i386/amd64.c: Remove.
2893         * features/i386/i386-avx-avx512.c: Remove.
2894         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2895         * features/i386/i386-avx-mpx.c: Remove.
2896         * features/i386/i386-avx.c: Remove.
2897         * features/i386/i386-mmx.c: Remove.
2898         * features/i386/i386-mpx.c: Remove.
2899         * features/i386/i386.c: Remove.
2900         * i386-tdep.c: Don't include features/i386/i386*.c., include
2901         target-descriptions.h and arch/i386.h.
2902         (i386_target_description): Create target descriptions.
2903         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2904         functions.  Do self tests.
2905
2906 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2907
2908         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2909         * features/i386/amd64-avx-avx512-linux.c: Removed.
2910         * features/i386/amd64-avx-linux.c: Removed.
2911         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2912         * features/i386/amd64-avx-mpx-linux.c: Removed.
2913         * features/i386/amd64-linux.c: Removed.
2914         * features/i386/amd64-mpx-linux.c: Removed.
2915         * features/i386/x32-avx-avx512-linux.c: Removed.
2916         * features/i386/x32-avx-linux.c: Removed.
2917         * features/i386/x32-linux.c: Removed.
2918
2919 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2920
2921         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2922         features/i386/*.c.
2923         (amd64_linux_read_description): Call
2924         amd64_create_target_description.
2925         * arch/amd64.c: New file.
2926         * arch/amd64.h: New file.
2927         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2928         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2929
2930 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2931
2932         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2933         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2934         (amd64_linux_read_description): Create target descriptions.
2935         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2936         functions.  Add unit tests.
2937         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2938         x32-core.xml.
2939         * features/i386/64bit-avx.c: Generated.
2940         * features/i386/64bit-avx512.c: Generated.
2941         * features/i386/64bit-core.c: Generated.
2942         * features/i386/64bit-linux.c: Generated.
2943         * features/i386/64bit-mpx.c: Generated.
2944         * features/i386/64bit-pkeys.c: Generated.
2945         * features/i386/64bit-segments.c: Generated.
2946         * features/i386/64bit-sse.c: Generated.
2947         * features/i386/x32-core.c: Generated.
2948         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2949         c files for amd64-linux and x32-linux.
2950
2951 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2952
2953         * amd64-linux-tdep.c (amd64_linux_read_description): New
2954         function.
2955         (amd64_linux_core_read_description): Call
2956         amd64_linux_read_description.
2957         (amd64_linux_init_abi): Likewise.
2958         (amd64_x32_linux_init_abi): Likewise.
2959         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2960         * x86-linux-nat.c (x86_linux_read_description): Call
2961         amd64_linux_read_description.
2962
2963 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2964
2965         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2966         comments.
2967
2968 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2969
2970         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2971         * features/i386/i386-avx-avx512-linux.c: Remove.
2972         * features/i386/i386-avx-linux.c: Remove.
2973         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2974         * features/i386/i386-avx-mpx-linux.c: Remove.
2975         * features/i386/i386-linux.c: Remove.
2976         * features/i386/i386-mmx-linux.c: Remove.
2977         * features/i386/i386-mpx-linux.c: Remove.
2978
2979 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2980
2981         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2982         (SFILES): Add arch/i386.c.
2983         (HFILES_NO_SRCDIR): Add arch/i386.h.
2984         * arch/i386.c: New file.
2985         * arch/i386.h: New file.
2986         * arch/tdesc.h (allocate_target_description): Declare.
2987         (set_tdesc_architecture): Declare.
2988         (set_tdesc_osabi): Declare.
2989         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2990         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2991         include arch/i386.h.
2992         (i386_linux_read_description): Remove code and call
2993         i386_create_target_description.
2994         (set_tdesc_architecture): New function.
2995         (set_tdesc_osabi): New function.
2996         * target-descriptions.h (allocate_target_description): Remove.
2997
2998 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2999
3000         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3001         * target-descriptions.c (tdesc_create_feature): Likewise, and
3002         adjust code.
3003         * features/i386/32bit-avx.c: Re-generated.
3004         * features/i386/32bit-avx512.c: Re-generated.
3005         * features/i386/32bit-core.c: Re-generated.
3006         * features/i386/32bit-linux.c: Re-generated.
3007         * features/i386/32bit-mpx.c: Re-generated.
3008         * features/i386/32bit-pkeys.c: Re-generated.
3009         * features/i386/32bit-sse.c: Re-generated.
3010
3011 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3012
3013         * regformats/regdef.h (struct reg): Override operator == and !=.
3014
3015 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3016
3017         * arch/tdesc.h: New file.
3018         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3019         * target-descriptions.c: Update comments.
3020         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3021         declarations.
3022         * features/i386/32bit-avx.c: Re-generated.
3023         * features/i386/32bit-avx512.c: Re-generated.
3024         * features/i386/32bit-core.c: Re-generated.
3025         * features/i386/32bit-linux.c: Re-generated.
3026         * features/i386/32bit-mpx.c: Re-generated.
3027         * features/i386/32bit-pkeys.c: Re-generated.
3028         * features/i386/32bit-sse.c: Re-generated.
3029
3030 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3031
3032         * regformats/regdat.sh: Update generated code.
3033
3034 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3035
3036         * regformats/regdat.sh: Adjust code order.
3037
3038 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3039
3040         * expprint.c (dump_subexp_body_standard): Use constant format
3041         string in fprintf_filtered call.
3042
3043 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3044
3045         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3046         NetBSD/i386.
3047         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3048
3049 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3050
3051         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3052
3053 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3054
3055         * bsd-kvm.o: Define _KMEMUSER.
3056         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3057         * configure: Regenerate.
3058
3059 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3060
3061         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3062         * i386-fbsd-nat.c: Likewise.
3063
3064 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3065
3066         * unittests/array-view-selftests.c: Add include of <array>.
3067
3068 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3069
3070         * spu-tdep.c (flush_ea_cache): Add missing argument to
3071         call_function_by_hand.
3072
3073 2017-09-04  Pedro Alves  <palves@redhat.com>
3074
3075         * NEWS (Safer support for debugging with no debug info): New.
3076
3077 2017-09-04  Pedro Alves  <palves@redhat.com>
3078
3079         * c-exp.y (function_method, function_method_void): Add current
3080         instance flags to TYPE_INSTANCE.
3081         * dwarf2read.c (check_modifier): New.
3082         (compute_delayed_physnames): Assert that only C++ adds delayed
3083         physnames.  Mark fn_fields as const/volatile depending on
3084         physname.
3085         * eval.c (make_params): New type_instance_flags parameter.  Use
3086         it as the new type's instance flags.
3087         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3088         flags element and pass it to make_params.
3089         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3090         instance flags element.
3091         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3092         * gdbtypes.h: Include "enum-flags.h".
3093         (type_instance_flags): New enum-flags type.
3094         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3095         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3096         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3097         (follow_type_instance_flags): New function.
3098         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3099         * parser-defs.h (follow_type_instance_flags): Declare.
3100         * valops.c (value_struct_elt_for_reference): const/volatile must
3101         match too.
3102
3103 2017-09-04  Pedro Alves  <palves@redhat.com>
3104
3105         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3106         function/method scopes; lookup the nested name as a function local
3107         static variable.
3108
3109 2017-09-04  Pedro Alves  <palves@redhat.com>
3110
3111         (%type <voidval>): Add function_method.
3112         * c-exp.y (exp): New production for calls with no arguments.
3113         (function_method, function_method_void_or_typelist): New
3114         productions.
3115         (exp): New production for "method()::static_var".
3116         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3117         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3118         Handle OP_FUNC_STATIC_VAR.
3119         * parse.c (operator_length_standard):
3120         Handle OP_FUNC_STATIC_VAR.
3121
3122 2017-09-04  Pedro Alves  <palves@redhat.com>
3123
3124         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3125         handling.
3126         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3127         Ditto.
3128         * parse.c (operator_length_standard, operator_check_standard):
3129         Ditto.
3130         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3131
3132 2017-09-04  Pedro Alves  <palves@redhat.com>
3133
3134         * ax-gdb.c: Include "typeprint.h".
3135         (gen_expr_for_cast): New function.
3136         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3137         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3138         type is unknown.
3139         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3140         nodebug_data_symbol.
3141         * eval.c: Include "typeprint.h".
3142         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3143         Error out if symbol has unknown type.
3144         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3145         evaluate_subexp_for_cast.
3146         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3147         OP_VAR_MSYM_VALUE.
3148         (evaluate_subexp_for_cast): New function.
3149         * gdbtypes.c (init_nodebug_var_type): New function.
3150         (objfile_type): Use it to initialize types of variables with no
3151         debug info.
3152         * typeprint.c (error_unknown_type): New.
3153         * typeprint.h (error_unknown_type): New declaration.
3154         * compile/compile-c-types.c (convert_type_basic): Handle
3155         TYPE_CODE_ERROR; warn and fallback to int for variables with
3156         unknown type.
3157
3158 2017-09-04  Pedro Alves  <palves@redhat.com>
3159
3160         * eval.c (evaluate_var_value): New function, factored out from ...
3161         (evaluate_subexp_standard): ... here.
3162
3163 2017-09-04  Pedro Alves  <palves@redhat.com>
3164
3165         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3166         Remove useless assignments to 'op'.
3167
3168 2017-09-04  Pedro Alves  <palves@redhat.com>
3169
3170         * eval.c (eval_skip_value): New function.
3171         (evaluate_subexp_standard): Use it.
3172
3173 2017-09-04  Pedro Alves  <palves@redhat.com>
3174
3175         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3176         function name from symbol/minsym and pass it to
3177         error_call_unknown_return_type.
3178
3179 2017-09-04  Pedro Alves  <palves@redhat.com>
3180
3181         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3182         * ax-gdb.c (gen_msym_var_ref): New function.
3183         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3184         * eval.c (evaluate_var_msym_value): New function.
3185         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3186         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3187         to call_function_by_hand.
3188         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3189         Handle OP_VAR_MSYM_VALUE.
3190         (union exp_element) <msymbol>: New field.
3191         * minsyms.h (struct type): Forward declare.
3192         (find_minsym_type_and_address): Declare.
3193         * parse.c (write_exp_elt_msym): New function.
3194         (write_exp_msymbol): Delete, refactored as ...
3195         (find_minsym_type_and_address): ... this new function.
3196         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3197         (operator_length_standard, operator_check_standard): Handle
3198         OP_VAR_MSYM_VALUE.
3199         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3200
3201 2017-09-04  Pedro Alves  <palves@redhat.com>
3202
3203         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3204         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3205         unknown.
3206         * ada-typeprint.c (print_func_type): Handle functions with unknown
3207         return type.
3208         * c-typeprint.c (c_type_print_base): Handle functions and methods
3209         with unknown return type.
3210         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3211         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3212         * compile/compile-c-types.c: Include "objfiles.h".
3213         (convert_func): For functions with unknown return type, warn and
3214         default to int.
3215         * compile/compile-object-run.c (compile_object_run): Adjust call
3216         to call_function_by_hand_dummy.
3217         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3218         call_function_by_hand.
3219         * eval.c (evaluate_subexp_standard): Adjust calls to
3220         call_function_by_hand.  Handle functions and methods with unknown
3221         return type.  Pass expect_type to call_function_by_hand.
3222         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3223         return type.
3224         * gcore.c (call_target_sbrk): Adjust call to
3225         call_function_by_hand.
3226         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3227         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3228         an integer address type instead of nodebug.
3229         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3230         call_function_by_hand.
3231         * infcall.c (error_call_unknown_return_type): New function.
3232         (call_function_by_hand): New "default_return_type" parameter.
3233         Pass it down.
3234         (call_function_by_hand_dummy): New "default_return_type"
3235         parameter.  Use it instead of defaulting to int.  If there's no
3236         default and the return type is unknown, throw an error.  If
3237         there's a default return type, and the called function has no
3238         debug info, then assume the function is prototyped.
3239         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3240         New "default_return_type" parameter.
3241         (error_call_unknown_return_type): New declaration.
3242         * linux-fork.c (call_lseek): Cast return type of lseek.
3243         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3244         call_function_by_hand.
3245         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3246         calls to call_function_by_hand.
3247         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3248         return type.
3249         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3250         (value_nsstring, print_object_command): Adjust calls to
3251         call_function_by_hand.
3252         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3253         functions with unknown return type.
3254         (pascal_type_print_func_varspec_suffix): New function.
3255         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3256         TYPE_CODE_METHOD>: Use it.
3257         * python/py-value.c (valpy_call): Adjust call to
3258         call_function_by_hand.
3259         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3260         call_function_by_hand.
3261         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3262         call_function_by_hand.
3263         * valops.c (value_allocate_space_in_inferior): Adjust call to
3264         call_function_by_hand.
3265         * typeprint.c (type_print_unknown_return_type): New function.
3266         * typeprint.h (type_print_unknown_return_type): New declaration.
3267
3268 2017-09-04  Pedro Alves  <palves@redhat.com>
3269
3270         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3271         types with more than one parameter as prototyped.
3272
3273 2017-09-04  Pedro Alves  <palves@redhat.com>
3274
3275         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3276         (disassemble_command): Use gdb_disassembly_flags instead of bare
3277         int.
3278         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3279         (dump_insns, do_mixed_source_and_assembly_deprecated)
3280         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3281         Use gdb_disassembly_flags instead of bare int.
3282         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3283         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3284         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3285         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3286         (enum gdb_disassembly_flag): ... values of this new enumeration.
3287         (gdb_disassembly_flags): Define.
3288         (gdb_disassembly)
3289         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3290         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3291         gdb_disassembly_flags instead of bare int.
3292         * record-btrace.c (btrace_insn_history)
3293         (record_btrace_insn_history, record_btrace_insn_history_range)
3294         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3295         instead of bare int.
3296         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3297         Use gdb_disassembly_flags instead of bare int.
3298         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3299         Define.
3300         * target-delegates.c: Regenerate.
3301         * target.c (target_insn_history, target_insn_history_from)
3302         (target_insn_history_range): Use gdb_disassembly_flags instead of
3303         bare int.
3304         * target.h: Include "disasm.h".
3305         (struct target_ops) <to_insn_history, to_insn_history_from,
3306         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3307         int.
3308         (target_insn_history, target_insn_history_from)
3309         (target_insn_history_range): Use gdb_disassembly_flags instead of
3310         bare int.
3311
3312 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3313
3314         * cli/cli-script.c (build_command_line): For if/while commands,
3315         check whether args is empty.
3316
3317 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3318
3319         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3320         (enum command_control_type): Likewise.
3321         (struct command_line): Likewise.
3322         (free_command_lines): Likewise.
3323         (struct command_lines_deleter): Likewise.
3324         (command_line_up): Likewise.
3325         (read_command_lines): Likewise.
3326         (read_command_lines_1): Likewise.
3327         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3328         (enum command_control_type): Likewise.
3329         (struct command_line): Likewise.
3330         (free_command_lines): Likewise.
3331         (struct command_lines_deleter): Likewise.
3332         (command_line_up): Likewise.
3333         (read_command_lines): Likewise.
3334         (read_command_lines_1): Likewise.
3335         * breakpoint.h: Include cli/cli-script.h.
3336         * extension-priv.h: Likewise.
3337         * gdbcmd.h: Likewise.
3338
3339 2017-09-04  Pedro Alves  <palves@redhat.com>
3340
3341         * ada-lang.c (is_known_support_routine): Move sal declaration to
3342         where it is initialized.
3343         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3344         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3345         (clear_command, update_static_tracepoint): Remove init_sal
3346         references.  Move declarations closer to initializations.
3347         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3348         initializations.
3349         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3350         references.  Move sal declarations closer to initializations.
3351         * frame.c (find_frame_sal): Return a symtab_and_line via function
3352         return instead of output parameter.  Remove init_sal references.
3353         * frame.h (find_frame_sal): Return a symtab_and_line via function
3354         return instead of output parameter.
3355         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3356         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3357         instead of memset.
3358         (gdbscm_find_pc_line): Remove init_sal reference.
3359         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3360         references.  Move declarations closer to initializations.
3361         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3362         initializations.
3363         (finish_backward): Remove init_sal references.  Move declarations
3364         closer to initializations.
3365         * infrun.c (process_event_stop_test, handle_step_into_function)
3366         (insert_hp_step_resume_breakpoint_at_frame)
3367         (insert_step_resume_breakpoint_at_caller): Likewise.
3368         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3369         (symbol_to_sal): Likewise.
3370         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3371         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3372         to its initialization.
3373         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3374         init_sal references.  Move declarations closer to initializations.
3375         * source.c (get_current_source_symtab_and_line): Remove brace
3376         initialization.
3377         (set_current_source_symtab_and_line): Now takes the sal by const
3378         reference.  Remove brace initialization.
3379         (line_info): Remove init_sal reference.
3380         * source.h (set_current_source_symtab_and_line): Now takes a
3381         symtab_and_line via const reference.
3382         * stack.c (set_current_sal_from_frame): Adjust.
3383         (print_frame_info): Adjust.
3384         (get_last_displayed_sal): Return the sal via function return
3385         instead of via output parameter.  Simplify.
3386         (frame_info): Adjust.
3387         * stack.h (get_last_displayed_sal): Return the sal via function
3388         return instead of via output parameter.
3389         * symtab.c (init_sal): Delete.
3390         (find_pc_sect_line): Remove init_sal references.  Move
3391         declarations closer to initializations.
3392         (find_function_start_sal): Remove init_sal references.  Move
3393         declarations closer to initializations.
3394         * symtab.h (struct symtab_and_line): In-class initialize all
3395         fields.
3396         * tracepoint.c (set_traceframe_context)
3397         (print_one_static_tracepoint_marker): Remove init_sal references.
3398         Move declarations closer to initializations.
3399         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3400         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3401         declarations closer to initializations.
3402         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3403         init_sal references.  Adjust.
3404
3405 2017-09-04  Pedro Alves  <palves@redhat.com>
3406
3407         * ax-gdb.c (agent_command_1): Use range-for.
3408         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3409         * breakpoint.c: Include "common/array-view.h".
3410         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3411         parameter from struct symtabs_and_lines to
3412         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3413         (breakpoint_sals_to_pc): Change sals parameter from struct
3414         symtabs_and_lines to std::vector reference.
3415         (check_fast_tracepoint_sals): Change sals parameter from struct
3416         symtabs_and_lines to std::array_view.  Use range-for.
3417         (decode_static_tracepoint_spec): Return a std::vector instead of
3418         symtabs_and_lines.  Update.
3419         (create_breakpoint): Update.
3420         (break_range_command, until_break_command, clear_command): Update.
3421         (base_breakpoint_decode_location, bkpt_decode_location)
3422         (bkpt_probe_create_sals_from_location)
3423         (bkpt_probe_decode_location, tracepoint_decode_location)
3424         (tracepoint_probe_decode_location)
3425         (strace_marker_create_sals_from_location): Return a std::vector
3426         instead of symtabs_and_lines.
3427         (strace_marker_create_breakpoints_sal): Update.
3428         (strace_marker_decode_location): Return a std::vector instead of
3429         symtabs_and_lines.  Update.
3430         (update_breakpoint_locations): Change struct symtabs_and_lines
3431         parameters to gdb::array_view.  Adjust.
3432         (location_to_sals): Return a std::vector instead of
3433         symtabs_and_lines.  Update.
3434         (breakpoint_re_set_default): Use std::vector instead of struct
3435         symtabs_and_lines.
3436         (decode_location_default): Return a std::vector instead of
3437         symtabs_and_lines.  Update.
3438         * breakpoint.h: Include "common/array-view.h".
3439         (struct breakpoint_ops) <decode_location>: Now returns a
3440         std::vector instead of returning a symtabs_and_lines via output
3441         parameter.
3442         (update_breakpoint_locations): Change sals parameters to use
3443         gdb::array_view.
3444         * cli/cli-cmds.c (edit_command, list_command): Update to use
3445         std::vector and gdb::array_view.
3446         (ambiguous_line_spec): Adjust to use gdb::array_view and
3447         range-for.
3448         (compare_symtabs): Rename to ...
3449         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3450         const reference and adjust.
3451         (filter_sals): Rewrite using std::vector and standard algorithms.
3452         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3453         (jump_command): Update to use std::vector.
3454         * linespec.c (struct linespec_state) <canonical_names>: Update
3455         comment.
3456         (add_sal_to_sals_basic): Delete.
3457         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3458         (decode_line_2, create_sals_line_offset)
3459         (convert_address_location_to_sals, convert_linespec_to_sals)
3460         (convert_explicit_location_to_sals, parse_linespec)
3461         (event_location_to_sals, decode_line_full, decode_line_1)
3462         (decode_line_with_current_source)
3463         (decode_line_with_last_displayed, decode_objc)
3464         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3465         (linespec_result::~linespec_result): Adjust to use std::vector
3466         instead of symtabs_and_lines.
3467         * linespec.h (linespec_sals::sals): Now a std::vector.
3468         (struct linespec_result): Use std::vector, bool, and in-class
3469         initialization.
3470         (decode_line_1, decode_line_with_current_source)
3471         (decode_line_with_last_displayed): Return std::vector.
3472         * macrocmd.c (info_macros_command): Use std::vector.
3473         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3474         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3475         std::vector.
3476         * probe.h (parse_probes): Return a std::vector.
3477         * python/python.c (gdbpy_decode_line): Use std::vector and
3478         gdb::array_view.
3479         * source.c (select_source_symtab, line_info): Use std::vector.
3480         * stack.c (func_command): Use std::vector.
3481         * symtab.h (struct symtabs_and_lines): Delete.
3482         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3483
3484 2017-09-04  Pedro Alves  <palves@redhat.com>
3485
3486         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3487         unittests/array-view-selftests.c.
3488         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3489         * common/array-view.h: New file.
3490         * unittests/array-view-selftests.c: New file.
3491
3492 2017-09-04  Pedro Alves  <palves@redhat.com>
3493
3494         * cli/cli-cmds.c (edit_command): Pass message to
3495         ambiguous_line_spec.
3496         (list_command): Pass message to ambiguous_line_spec.  Say
3497         "first"/"last" instead of "start" and "end" to be consistent with
3498         the manual.
3499         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3500         them to print formatted message.
3501
3502 2017-09-04  Pedro Alves  <palves@redhat.com>
3503
3504         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3505         ftrace_update_insns by reference instead of pointer.
3506
3507 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3508
3509         * i386-go32-tdep.c: Include x86-xstate.h.
3510         (i386_go32_init_abi): Call i386_target_description.
3511         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3512         if xcr0 is X86_XSTATE_X87_MASK.
3513         * i386-tdep.h (tdesc_i386): Remove the declaration.
3514         (tdesc_i386_mmx): Likewise.
3515
3516 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3517
3518         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3519         X86_XSTATE_SSE_MASK instead of 0.
3520
3521 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3522
3523         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3524         i386_target_description.
3525         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3526         i386_target_description.
3527         * i386-tdep.c (i386_gdbarch_init): Likewise.
3528
3529 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3530
3531         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3532         (x86_darwin_init_abi_64): Call amd64_target_description.
3533         * amd64-dicos-tdep.c: Likewise.
3534         * amd64-fbsd-nat.c: Likewise.
3535         * amd64-fbsd-tdep.c: Likewise.
3536         * amd64-nbsd-tdep.c: Likewise.
3537         * amd64-obsd-tdep.c: Likewise.
3538         * amd64-sol2-tdep.c: Likewise.
3539         * amd64-windows-tdep.c: Likewise.
3540         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3541
3542 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3543
3544         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3545         (btrace_function) <insn>: Change type to use std::vector.
3546         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3547         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3548         ftrace_update_insns, ftrace_compute_global_level_offset,
3549         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3550         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3551         change to std::vector.
3552         (ftrace_update_insns): Adjust to change to std::vector, change
3553         type of INSN parameter.
3554         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3555         * record-btrace.c (btrace_call_history_insn_range,
3556         btrace_compute_src_line_range,
3557         record_btrace_frame_prev_register): Adjust to change to
3558         std::vector.
3559         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3560         to change to std::vector.
3561
3562 2017-09-03  Tom Tromey  <tom@tromey.com>
3563
3564         * corefile.c (reopen_exec_file): Use std::string.
3565
3566 2017-09-03  Tom Tromey  <tom@tromey.com>
3567
3568         * compile/compile.c (compile_register_name_mangled): Return
3569         std::string.
3570         * compile/compile-loc2c.c (pushf_register_address): Update.
3571         (pushf_register): Update.
3572         * compile/compile-c-types.c (convert_array): Update.
3573         * compile/compile-c-symbols.c (generate_vla_size): Update.
3574         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3575         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3576         (convert_one_symbol): Update.
3577         (generate_c_for_for_one_variable): Update.
3578         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3579         std::string.
3580         (generate_register_struct): Update.
3581         * compile/compile-internal.h (c_get_range_decl_name): Return a
3582         std::string.
3583         (compile_register_name_mangled): Return std::string.
3584
3585 2017-09-03  Tom Tromey  <tom@tromey.com>
3586
3587         * utils.c (perror_string): Return a std::string.
3588         (throw_perror_with_name, perror_warning_with_name): Update.
3589
3590 2017-09-03  Tom Tromey  <tom@tromey.com>
3591
3592         * demangle.c (demangle_command): Use std::string,
3593         unique_xmalloc_ptr.
3594
3595 2017-09-03  Tom Tromey  <tom@tromey.com>
3596
3597         * cli/cli-setshow.c (do_set_command): Use std::string.
3598
3599 2017-09-03  Tom Tromey  <tom@tromey.com>
3600
3601         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3602
3603 2017-09-03  Tom Tromey  <tom@tromey.com>
3604
3605         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3606
3607 2017-09-03  Tom Tromey  <tom@tromey.com>
3608
3609         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3610         gdb::unique_xmalloc_ptr.
3611
3612 2017-09-03  Tom Tromey  <tom@tromey.com>
3613
3614         * thread.c (print_thread_info_1): Use string_printf.
3615         (thread_apply_command, thread_apply_all_command): Use
3616         std::string.
3617
3618 2017-09-03  Tom Tromey  <tom@tromey.com>
3619
3620         * valprint.c (val_print_string): Update.
3621         * gdbcore.h (memory_error_message): Return std::string.
3622         * corefile.c (memory_error_message): Return std::string.
3623         (memory_error): Update.
3624         * breakpoint.c (insert_bp_location): Update.
3625
3626 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3627
3628         * target/waitstatus.h (target_waitstatus_to_string): Change
3629         return type to std::string.
3630         * target/waitstatus.c (target_waitstatus_to_string): Return
3631         std::string.
3632         * target.h (target_waitstatus_to_string): Remove declaration.
3633         * infrun.c (resume, clear_proceed_status_thread,
3634         print_target_wait_results, do_target_wait, save_waitstatus,
3635         stop_all_threads): Adjust.
3636         * record-btrace.c (record_btrace_wait): Adjust.
3637         * target-debug.h
3638         (target_debug_print_struct_target_waitstatus_p): Adjust.
3639
3640 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3641
3642         PR gdb/22046
3643         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3644         detection.
3645
3646 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3647
3648         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3649         for setting/unsetting environment variables on the remote target.
3650         (New remote packets): Add entries for QEnvironmentHexEncoded,
3651         QEnvironmentUnset and QEnvironmentReset.
3652         * common/environ.c (gdb_environ::operator=): Extend method to
3653         handle m_user_set_env_list and m_user_unset_env_list.
3654         (gdb_environ::clear): Likewise.
3655         (match_var_in_string): Change type of first parameter from 'char
3656         *' to 'const char *'.
3657         (gdb_environ::set): Extend method to handle
3658         m_user_set_env_list and m_user_unset_env_list.
3659         (gdb_environ::unset): Likewise.
3660         (gdb_environ::clear_user_set_env): New method.
3661         (gdb_environ::user_set_envp): Likewise.
3662         (gdb_environ::user_unset_envp): Likewise.
3663         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3664         m_user_unset_env_list on move constructor/assignment.
3665         (unset): Add new default parameter 'update_unset_list = true'.
3666         (clear_user_set_env): New method.
3667         (user_set_envp): Likewise.
3668         (user_unset_envp): Likewise.
3669         (m_user_set_env_list): New std::set.
3670         (m_user_unset_env_list): Likewise.
3671         * common/rsp-low.c (hex2str): New function.
3672         (bin2hex): New overload for bin2hex function.
3673         * common/rsp-low.c (hex2str): New prototype.
3674         (str2hex): New overload prototype.
3675         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3676         QEnvironmentUnset and QEnvironmentReset.
3677         (remote_protocol_features): Add QEnvironmentHexEncoded,
3678         QEnvironmentUnset and QEnvironmentReset packets.
3679         (send_environment_packet): New function.
3680         (extended_remote_environment_support): Likewise.
3681         (extended_remote_create_inferior): Call
3682         extended_remote_environment_support.
3683         (_initialize_remote): Add QEnvironmentHexEncoded,
3684         QEnvironmentUnset and QEnvironmentReset packet configs.
3685         * unittests/environ-selftests.c (gdb_selftest_env_var):
3686         New variable.
3687         (test_vector_initialization): New function.
3688         (test_init_from_host_environ): Likewise.
3689         (test_reinit_from_host_environ): Likewise.
3690         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3691         Likewise.
3692         (test_unset_set_empty_vector): Likewise.
3693         (test_vector_clear): Likewise.
3694         (test_std_move): Likewise.
3695         (test_move_constructor):
3696         (test_self_move): Likewise.
3697         (test_set_unset_reset): Likewise.
3698         (run_tests): Rewrite in terms of the functions above.
3699
3700 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3701
3702         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3703         (adi_available): Use a temp variable of type CORE_ADDR as argument
3704         3 when calling target_auxv_search.
3705         (adi_normalize_address): Use masks and xor operators to calculate
3706         normalized address.
3707         (adi_read_versions, adi_write_versions, adi_print_versions)
3708         (do_examine, do_assign): Use paddress.
3709
3710 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3711
3712         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3713         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3714         out of loop and add supply of FIR.
3715         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3716         add collect of FIR.
3717
3718 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3719
3720         PR gdb/21827
3721         * cli/cli-script.c (define_command): Don't convert command name
3722         to lower case.
3723
3724 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3725
3726         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3727         Update all callers accordingly. Remove all code blocks handling
3728         the case where DISPP is not NULL.
3729
3730 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3731
3732         PR symtab/22003
3733         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3734         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3735         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3736
3737 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3738
3739         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3740         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3741         (read_comp_units_from_section): New parameter abbrev_section, use
3742         read_and_check_comp_unit_head, allocate signatured_type if needed.
3743         (create_all_comp_units): Update read_comp_units_from_section caller.
3744
3745 2017-08-23  Pedro Alves  <palves@redhat.com>
3746
3747         PR remote/21852
3748         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3749         to null_ptid and switch to thread without reading the registers
3750         after adding the inferior.
3751
3752 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3753
3754         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3755         compile-gcc.
3756         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3757         (compile_to_object): Implement compile_gcc.
3758         (_initialize_compile): Install "set compile-gcc".  Initialize
3759         compile_gcc.
3760
3761 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3762
3763         * compile/compile.c (compile_to_object): Conditionally call
3764         set_verbose.  Conditionally call compile or compile_v0.
3765
3766 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3767
3768         * sparc64-tdep.h: (adi_normalize_address): New export.
3769         * sparc-nat.h: (open_adi_tag_fd): New export.
3770         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3771         * sparc64-linux-tdep.c:
3772         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3773         (sparc64_linux_handle_segmentation_fault): New function.
3774         (sparc64_linux_init_abi): Register
3775         sparc64_linux_handle_segmentation_fault
3776         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3777         (sparc64_addr_bits_remove): New function.
3778         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3779         (MAX_PROC_NAME_SIZE): New macro.
3780         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3781         (sparc64adilist): New variable.
3782         (adi_proc_list): New variable.
3783         (find_adi_info): New function.
3784         (add_adi_info): New function.
3785         (get_adi_info_proc): New function.
3786         (get_adi_info): New function.
3787         (info_adi_command): New function.
3788         (read_maps_entry): New function.
3789         (adi_available): New function.
3790         (adi_normalize_address): New function.
3791         (adi_align_address): New function.
3792         (adi_convert_byte_count): New function.
3793         (adi_tag_fd): New function.
3794         (adi_is_addr_mapped): New function.
3795         (adi_read_versions): New function.
3796         (adi_write_versions): New function.
3797         (adi_print_versions): New function.
3798         (do_examine): New function.
3799         (do_assign): New function.
3800         (adi_examine_command): New function.
3801         (adi_assign_command): New function.
3802         (_initialize_sparc64_adi_tdep): New function.
3803
3804 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3805
3806         * breakpoint.c (breakpoints_info): Rename to ...
3807         (info_breakpoints_command): ... this.
3808         (watchpoints_info): Rename to ...
3809         (info_watchpoints_command): ... this.
3810         (tracepoints_info): Rename to ...
3811         (info_tracepoints_command): ... this.
3812         (_initialize_breakpoint): Adjust.
3813         * dcache.c (dcache_info): Rename to ...
3814         (info_display_command): ... this.
3815         (_initialize_dcache): Adjust.
3816         * frame.h (args_info): Rename to ...
3817         (info_args_command): ... this.
3818         (locals_info): Rename to ...
3819         (info_locals_command): ... this.
3820         * infcmd.c (nofp_registers_info): Rename to ...
3821         (info_registers_command): ... this.
3822         (float_info): Rename to ...
3823         (info_float_command): ... this.
3824         (program_info): Rename to ...
3825         (info_program_command): ... this.
3826         (all_registers_info): Rename to ...
3827         (info_all_registers_command): ... this.
3828         (vector_info): Rename to ...
3829         (info_vector_command): ... this.
3830         (float_info): Rename to ...
3831         (info_float_command): ... this.
3832         (_initialize_infcmd): Adjust.
3833         * inferior.h (term_info): Rename to ...
3834         (info_terminal_command): ... this.
3835         * inflow.c (term_info): Rename to ...
3836         (info_terminal_command): ... this.
3837         (_initialize_inflow): Adjust.
3838         * infrun.c (signals_info): Rename to ...
3839         (info_signals_command): ... this.
3840         (_initialize_infrun): Adjust.
3841         * objc-lang.c (classes_info): Rename to ...
3842         (info_classes_command): ... this.
3843         (selectors_info): Rename to ...
3844         (info_selectors_command): ... this.
3845         (_initialize_objc_language): Adjust.
3846         * printcmd.c (sym_info): Rename to ...
3847         (info_symbol_command): ... this.
3848         (address_info): Rename to ...
3849         (info_address_command): ... this.
3850         (display_info): Rename to ...
3851         (info_display_command): ... this.
3852         (_initialize_printcmd): Adjust.
3853         * reverse.c (bookmarks_info): Rename to ...
3854         (info_breakpoints_command): ... this.
3855         (_initialize_reverse): Adjust.
3856         * ser-go32.c (dos_info): Rename to ...
3857         (info_serial_command): ... this.
3858         (_initialize_ser_dos): Adjust.
3859         * skip.c (skip_info): Rename to ...
3860         (info_skip_command): ... this.
3861         (_initialize_step_skip): Adjust.
3862         * source.c (line_info): Rename to ...
3863         (info_line_command): ... this.
3864         (source_info): Rename to ...
3865         (info_source_command)
3866         * stack.c (frame_info): Rename to ...
3867         (info_frame_command): ... this.
3868         (locals_info): Rename to ...
3869         (info_locals_command): ... this.
3870         (args_info): Rename to ...
3871         (info_args_command): ... this.
3872         (_initialize_stack): Adjust.
3873         * symtab.c (sources_info): Rename to ...
3874         (info_sources_command): ... this.
3875         (variables_info): Rename to ...
3876         (info_variables_command): ... this.
3877         (functions_info): Rename to ...
3878         (info_functions_command): ... this.
3879         (types_info): Rename to ...
3880         (info_types_command): ... this.
3881         (_initialize_symtab): Adjust.
3882         * target.c (target_info): Rename to ...
3883         (info_target_command): ... this.
3884         (initialize_targets): Adjust.
3885         * tracepoint.c (tvariables_info): Rename to ...
3886         (info_tvariables_command): ... this.
3887         (scope_info): Rename to ...
3888         (info_scope_command): ... this.
3889         (trace_dump_actions): Adjust.
3890         (_initialize_tracepoint): Adjust.
3891
3892 2017-08-22  Tom Tromey  <tom@tromey.com>
3893
3894         * breakpoint.h (install_breakpoint): Update.
3895         * breakpoint.c (add_solib_catchpoint): Update.
3896         (install_breakpoint): Change argument to a std::unique_ptr.
3897         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3898         (create_breakpoint_sal, create_breakpoint): Update.
3899         (watch_command_1, catch_exec_command_1)
3900         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3901         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3902         Return the breakpoint.
3903         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3904         (new_single_step_breakpoint): Update.
3905         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3906         std::unique_ptr.
3907         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3908         std::unique_ptr.
3909         * break-catch-sig.c (create_signal_catchpoint): Use
3910         std::unique_ptr.
3911         * ada-lang.c (create_ada_exception_catchpoint): Use
3912         std::unique_ptr.
3913
3914 2017-08-22  Tom Tromey  <tom@tromey.com>
3915
3916         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3917
3918 2017-08-22  Tom Tromey  <tom@tromey.com>
3919
3920         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3921         (lookup_partial_symbol): Update.
3922
3923 2017-08-22  Tom Tromey  <tom@tromey.com>
3924
3925         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3926         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3927         (find_and_open_source, symtab_to_fullname): Update.
3928         * psymtab.c (psymtab_to_fullname): Update.
3929
3930 2017-08-22  Tom Tromey  <tom@tromey.com>
3931
3932         * exec.c (exec_file_attach): Update.
3933         * linux-thread-db.c (try_thread_db_load): Update.
3934         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3935         * utils.c (gdb_realpath): Change return type.
3936         (gdb_realpath_keepfile): Update.
3937         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3938         (_initialize_utils): Register the new self test.
3939         * source.c (openp): Update.
3940         (find_and_open_source): Update.
3941         * nto-tdep.c (nto_find_and_open_solib): Update.
3942         * main.c (set_gdb_data_directory): Update.
3943         (captured_main_1): Update.
3944         * dwarf2read.c (dwarf2_get_dwz_file): Update
3945         (dw2_map_symbol_filenames): Update.
3946         * auto-load.c (auto_load_safe_path_vec_update): Update.
3947         (filename_is_in_auto_load_safe_path_vec): Change type of
3948         "filename_realp".
3949         (auto_load_objfile_script): Update.
3950         (file_is_auto_load_safe): Update.  Use std::string.
3951         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3952
3953 2017-08-22  Tom Tromey  <tom@tromey.com>
3954
3955         * utils.c (gdb_realpath_keepfile): Return a
3956         gdb::unique_xmalloc_ptr.
3957         * exec.c (exec_file_attach): Update.
3958         * utils.h (gdb_realpath_keepfile): Return a
3959         gdb::unique_xmalloc_ptr.
3960
3961 2017-08-22  Tom Tromey  <tom@tromey.com>
3962
3963         * compile/compile.c (compile_file_command): Use
3964         gdb::unique_xmalloc_ptr, std::string.
3965         * utils.c (gdb_abspath): Change return type.
3966         * source.c (openp): Update.
3967         * objfiles.c (allocate_objfile): Update.
3968         * main.c (set_gdb_data_directory): Update.
3969         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3970
3971 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3972
3973         * cli-cmds.c (list_commands): List actual code around more than
3974         one location.
3975
3976 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3977
3978         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3979
3980 2017-08-21  Pedro Alves  <palves@redhat.com>
3981
3982         PR gdb/19487
3983         * c-exp.y (variable production): Handle function aliases.
3984         * minsyms.c (msymbol_is_text): New function.
3985         * minsyms.h (msymbol_is_text): Declare.
3986         * symtab.c (find_function_alias_target): New function.
3987         * symtab.h (find_function_alias_target): Declare.
3988
3989 2017-08-21  Pedro Alves  <palves@redhat.com>
3990
3991         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3992         typedefs.
3993         * typeprint.c (whatis_exp): If handling "whatis", and expression
3994         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3995         typedefs here.
3996         * valops.c (value_cast): Save "to" type before resolving
3997         stubs/typedefs.  Use that type as resulting value's type.
3998
3999 2017-08-18  Tom Tromey  <tom@tromey.com>
4000             Pedro Alves  <palves@redhat.com>
4001
4002         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4003         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4004         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4005         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4006         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4007         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4008         (linux_get_siginfo_data): Add "thread" argument.  Use
4009         scoped_restore.
4010         * linux-nat.c (linux_child_follow_fork)
4011         (check_stopped_by_watchpoint): Use scoped_restore.
4012         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4013         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4014         (restore_inferior_ptid, save_inferior_ptid): Remove.
4015         * btrace.c (btrace_fetch): Use scoped_restore.
4016         * bsd-uthread.c (bsd_uthread_fetch_registers)
4017         (bsd_uthread_store_registers): Use scoped_restore.
4018         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4019         scoped_restore.
4020         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4021         (aix_thread_xfer_partial): Use scoped_restore.
4022         * inferior.h (save_inferior_ptid): Remove.
4023
4024 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4025
4026         PR tdep/21818
4027         * arm-tdep.c (gdb_print_insn_arm): Mark
4028         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4029
4030 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4031
4032         * NEWS: Mention GDBserver's new option "--selftest".
4033         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4034         * selftest.c: Move it to common/selftest.c.
4035         * selftest.h: Move it to common/selftest.h.
4036         * selftest-arch.c (reset): New function.
4037         (tests_with_arch): Call reset.
4038
4039 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4040
4041         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4042         instead of exception_fprintf and printf_filtered.
4043
4044 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4045
4046         * selftest.c (register_self_test): Rename it to
4047         selftests::register_test.
4048         (run_self_tests): selftest::run_tests.
4049         * selftest.h: Update declarations.
4050         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4051         selftests::register_test_foreach_arch.
4052         * selftest-arch.h: Update declaration.
4053         * aarch64-tdep.c: Update.
4054         * arm-tdep.c: Likewise.
4055         * disasm-selftests.c: Likewise.
4056         * dwarf2loc.c: Likewise.
4057         * dwarf2-frame.c: Likewise.
4058         * findvar.c: Likewise.
4059         * gdbarch-selftests.c: Likewise.
4060         * maint.c (maintenance_selftest): Likewise.
4061         * regcache.c: Likewise.
4062         * rust-exp.y: Likewise.
4063         * selftest-arch.c: Likewise.
4064         * unittests/environ-selftests.c: Likewise.
4065         * unittests/function-view-selftests.c: Likewise.
4066         * unittests/offset-type-selftests.c: Likewise.
4067         * unittests/optional-selftests.c: Likewise.
4068         * unittests/scoped_restore-selftests.c: Likewise.
4069         * utils-selftests.c: Likewise.
4070
4071 2017-08-17  Pedro Alves  <palves@redhat.com>
4072
4073         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4074         local.
4075
4076 2017-08-17  Pedro Alves  <palves@redhat.com>
4077
4078         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4079         field.
4080         (reset_die_in_process): Delete, replaced by ...
4081         (process_die_scope): ... this new class.  Make it responsible for
4082         freeing cu->line_header too.
4083         (process_die): Use process_die_scope.
4084         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4085         cu->line_header_die_owner.  Don't release the line header if it's
4086         owned by the CU.
4087         (setup_type_unit_groups): Make the CU/DIE own the line header.
4088         Don't release the line header here.
4089
4090 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4091
4092         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4093
4094 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4095
4096         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4097         Single-Key mode
4098
4099 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4100
4101         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4102         mode command list.
4103
4104 2017-08-15  Stafford Horne  <shorne@gmail.com>
4105
4106         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4107
4108 2017-08-15  Stafford Horne  <shorne@gmail.com>
4109
4110         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4111
4112 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4113
4114         PR gdb/21954
4115         * infcmd.c (unset_environment_command): Use the 'clear' method on
4116         the environment instead of resetting it.
4117
4118 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4119
4120         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4121         platforms.
4122
4123 2017-08-14  Tom Tromey  <tom@tromey.com>
4124
4125         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4126         (print_binary_chars): Likewise.
4127         (BITS_IN_BYTES): Remove.
4128
4129 2017-08-14  Tom Tromey  <tom@tromey.com>
4130
4131         PR gdb/21675
4132         * valprint.c (LOW_ZERO): Change value to 034.
4133         (print_octal_chars): Add static_asserts for octal constants.
4134         * printcmd.c (print_scalar_formatted): Add 'd' case.
4135
4136 2017-08-11  Tom Tromey  <tom@tromey.com>
4137
4138         * symfile.c (add_symbol_file_command): Use std::vector.
4139
4140 2017-08-14  Tom Tromey  <tom@tromey.com>
4141
4142         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4143         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4144         std::move.
4145         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4146
4147 2017-08-11  Pedro Alves  <palves@redhat.com>
4148
4149         * infrun.c (process_event_stop_test): Adjust
4150         function_name_is_marked_for_skip call.
4151         * skip.c: Include <list>.
4152         (skiplist_entry): Make it a class with private fields, and
4153         getters/setters.
4154         (skiplist_entry_chain): Delete.
4155         (skiplist_entries): New.
4156         (skiplist_entry_count): Delete.
4157         (highest_skiplist_entry_num): New.
4158         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4159         (add_skiplist_entry): Delete.
4160         (skiplist_entry::skiplist_entry): New.
4161         (skiplist_entry::add_entry): New.
4162         (skip_file_command, skip_function): Adjust.
4163         (compile_skip_regexp): Delete.
4164         (skip_command): Don't compile regexp here.  Adjust to use
4165         skiplist_entry::add_entry.
4166         (skip_info): Adjust to use range-for and getters.
4167         (skip_enable_command, skip_disable_command): Adjust to use
4168         range-for and setters.
4169         (skip_delete_command): Adjust to use std::list.
4170         (add_skiplist_entry): Delete.
4171         (skip_file_p): Delete, refactored as ...
4172         (skiplist_entry::do_skip_file_p): ... this new method.
4173         (skip_gfile_p): Delete, refactored as ...
4174         (skiplist_entry::do_gskip_file_p): ... this new method.
4175         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4176         (skiplist_entry::skip_function_p): ... this new method.
4177         (function_name_is_marked_for_skip): Now returns bool, and takes
4178         the function sal by const reference.  Adjust to use range-for and
4179         skiplist_entry methods.
4180         (_initialize_step_skip): Remove references to
4181         skiplist_entry_chain, skiplist_entry_count.
4182         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4183         takes the function sal by const reference.
4184
4185 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4186
4187         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4188         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4189         (dwarf2_frame_cache):
4190         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4191         RETURN_MASK_ALL and set *this_case to NULL.
4192         * frame-unwind.h: Update comments.
4193
4194 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4195
4196         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4197         (dwarf2_frame_state_copy_regs): Remove.
4198         (dwarf2_frame_state_free_regs): Remove.
4199         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4200         (dwarf2_restore_rule): Call method .alloc_regs instead of
4201         dwarf2_frame_state_alloc_regs.
4202         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4203         constructor.  Call std::move.
4204         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4205         (dwarf2_frame_cache): Likewise.
4206
4207         [GDB_SELF_TEST]: Include selftest.h and
4208         selftest-arch.h.
4209         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4210         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4211         execute_cfa_program_test.
4212
4213         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4214         copy ctor, assignment operator, move assignment.
4215         <alloc_regs>: New method.
4216         <swap>: New method.
4217         (struct dwarf2_frame_state): Delete dtor.
4218         (dwarf2_frame_state_alloc_regs): Remove declaration.
4219         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4220         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4221
4222 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4223
4224         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4225         (dwarf2_frame_state::dwarf2_frame_state): New.
4226         (dwarf2_frame_state::~dwarf2_frame_state): New.
4227         (dwarf2_fetch_cfa_info): Update.
4228         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4229         rather than a pointer.  Update code.
4230         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4231         dtor.
4232         <data_align, code_align, retaddr_column>: Change them to const.
4233         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4234         to bool.
4235
4236 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4237
4238         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4239         <loc.exp>: New field.
4240         * dwarf2-frame.c (execute_cfa_program): Update.
4241         (dwarf2_frame_prev_register): Update.
4242
4243 2017-08-10  Pedro Alves  <palves@redhat.com>
4244
4245         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4246
4247 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4248
4249         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4250         (fbsd_pending_children): Use std::list.
4251         (fbsd_remember_child): Likewise.
4252         (fbsd_is_child_pending): Likewise.
4253         (fbsd_pending_vfork_done): Use std::forward_list.
4254         (fbsd_add_vfork_done): Likewise.
4255         (fbsd_is_vfork_done_pending): Likewise.
4256         (fbsd_next_vfork_done): Likewise.
4257
4258 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4259
4260         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4261         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4262         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4263         for `mapfilename'.
4264         (fbsd_xfer_partial): Use gdb::byte_vector.
4265         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4266
4267 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4268
4269         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4270         "filestuff.h".
4271         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4272
4273 2017-08-09  Tom Tromey  <tom@tromey.com>
4274
4275         * skip.c (skiplist_entry): New constructor.
4276         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4277         (skiplist_entry::file_is_glob): Now bool.
4278         (skiplist_entry::file, skiplist_entry::function): Now
4279         std::string.
4280         (make_skip_entry): Return a unique_ptr.  Use new.
4281         (free_skiplist_entry, free_skiplist_entry_cleanup)
4282         (make_free_skiplist_entry_cleanup): Remove.
4283         (skip_command, skip_disable_command, add_skiplist_entry)
4284         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4285         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4286         (function_name_is_marked_for_skip): Update.
4287         (skip_delete_command): Update.  Use delete.
4288
4289 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4290
4291         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4292         (aarch64_linux_core_read_description): New function.
4293         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4294
4295 2017-08-09  Pedro Alves  <palves@redhat.com>
4296
4297         * cp-name-parser.y (cp_comp_to_string): Return a
4298         gdb::unique_xmalloc_ptr<char>.
4299         * cp-support.c (replace_typedefs_qualified_name)
4300         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4301         (cp_canonicalize_string_full): Use op= instead of explicit
4302         convertion.
4303         (cp_class_name_from_physname, method_name_from_physname)
4304         (cp_func_name, cp_remove_params): Adjust to use
4305         gdb::unique_xmalloc_ptr<char>.
4306         * cp-support.h (cp_comp_to_string): Return a
4307         gdb::unique_xmalloc_ptr<char>.
4308         * python/py-type.c (typy_lookup_type): Adjust to use
4309         gdb::unique_xmalloc_ptr<char>.
4310
4311 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4312
4313         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4314
4315 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4316             Yao Qi  <yao.qi@linaro.org>
4317
4318         * cp-support.c (cp_canonicalize_string_full): Use
4319         gdb::unique_xmalloc_ptr<char>.
4320         (cp_canonicalize_string): Likewise.
4321
4322 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4323
4324         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4325         * regformats/i386/amd64-avx-avx512.dat: Remove.
4326         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4327         * regformats/i386/amd64-avx-mpx.dat:Remove.
4328         * regformats/i386/amd64-avx.dat: Remove.
4329         * regformats/i386/amd64-mpx.dat: Remove.
4330         * regformats/i386/i386-avx-avx512.dat: Remove.
4331         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4332         * regformats/i386/i386-avx-mpx.dat: Remove.
4333         * regformats/i386/i386-mmx.dat: Remove.
4334         * regformats/i386/i386-mpx.dat: Remove.
4335
4336 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4337
4338         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4339         * amd64-tdep.c: Don't include features/i386/x32*.c.
4340         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4341         functions.
4342         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4343         and i386/x32-avx-avx512.
4344         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4345         and i386/x32.xml.
4346         * features/i386/x32-avx-avx512.c: Removed.
4347         * features/i386/x32-avx-avx512.xml: Removed.
4348         * features/i386/x32-avx.c: Removed.
4349         * features/i386/x32-avx.xml: Removed.
4350         * features/i386/x32.c: Removed.
4351         * features/i386/x32.xml: Removed.
4352         * regformats/i386/x32-avx-avx512.dat: Removed.
4353         * regformats/i386/x32-avx.dat: Removed.
4354         * regformats/i386/x32.dat: Removed.
4355
4356 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4357
4358         PR breakpoints/21886
4359         * mem-break.c (default_memory_insert_breakpoint): Use
4360         `->placed_address' rather than `->reqstd_address' for the
4361         breakpoint location.
4362
4363 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4364
4365         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4366         assertions.
4367
4368 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4369
4370         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4371         a union of `tdep_info', `tdesc_data' and `id'.
4372         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4373         rather than `info.tdep_info'.
4374         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4375         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4376         * i386-tdep.c (i386_gdbarch_init): Likewise.
4377         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4378         * mips-tdep.c (mips_gdbarch_init): Likewise.
4379         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4380         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4381         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4382         `info.tdep_info'.
4383         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4384         `info.tdep_info'.
4385         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4386         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4387         `info.tdep_info'.
4388         * spu-tdep.c (spu_gdbarch_init): Likewise.
4389         * gdbarch.h: Regenerate.
4390
4391 2017-08-07  Leszek Swirski  <leszeks@google.com>
4392
4393         PR symtab/20899
4394         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4395
4396 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4397
4398         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4399         (gdbsim_open): Rename gdb_argv args object to argv.
4400
4401 2017-08-05  Tom Tromey  <tom@tromey.com>
4402
4403         * compile/compile-object-load.c (compile_object_load): Use
4404         gdb::unique_xmalloc_ptr.
4405         * cli/cli-dump.c (scan_filename): Rename from
4406         scan_filename_with_cleanup.  Change return type.
4407         (scan_expression): Rename from scan_expression_with_cleanup.
4408         Change return type.
4409         (dump_memory_to_file, dump_value_to_file, restore_command):
4410         Use gdb::unique_xmalloc_ptr.  Update.
4411         * cli/cli-cmds.c (find_and_open_script): Use
4412         gdb::unique_xmalloc_ptr.
4413         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4414         * symmisc.c (maintenance_print_symbols)
4415         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4416         * symfile.c (symfile_bfd_open, generic_load)
4417         (add_symbol_file_command, remove_symbol_file_command): Use
4418         gdb::unique_xmalloc_ptr.
4419         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4420         * psymtab.c (maintenance_print_psymbols): Use
4421         gdb::unique_xmalloc_ptr.
4422         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4423         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4424         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4425         (reload_shared_libraries_1): Likewise.
4426
4427 2017-08-05  Tom Tromey  <tom@tromey.com>
4428
4429         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4430         (rust_op_vector, rust_set_vector): New typedefs.
4431         (current_parser): New global.
4432         (work_obstack): Change to pointer type.  Update all users.
4433         (rust_ast, pstate): Remove globals.
4434         (struct rust_parser): New.
4435         (%union) <params, field_inits>: Change type.
4436         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4437         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4438         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4439         (convert_params_to_types, convert_params_to_expression): Change
4440         type of "params".
4441         (ast_string): Change type of "fields".
4442         (rust_parse): Make a rust_parser.  Remove cleanups.
4443         (rust_lex_tests): Make and install an auto_obstack.
4444
4445 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4446
4447         * configure.srv (ipa_x32_linux_regobj): New.
4448         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4449         instead of X86_TDESC_AVX512.
4450         (initialize_low_tracepoint): Call
4451         init_registers_x32_avx_avx512_linux.
4452
4453 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4454
4455         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4456
4457 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4458
4459         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4460
4461 2017-08-03  Tom Tromey  <tom@tromey.com>
4462
4463         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4464         Remove.
4465         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4466
4467 2017-08-03  Tom Tromey  <tom@tromey.com>
4468
4469         * python/py-param.c (compute_enum_values): Use gdb_argv.
4470
4471 2017-08-03  Tom Tromey  <tom@tromey.com>
4472
4473         * utils.h (struct gdb_argv_deleter): New.
4474         (gdb_argv): New class.
4475         * utils.c (gdb_argv::reset): New method.
4476         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4477         * tracefile.c (tsave_command): Use gdb_argv.
4478         * top.c (new_ui_command): Use gdb_argv.
4479         * symmisc.c (maintenance_print_symbols)
4480         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4481         * symfile.c (symbol_file_command, generic_load)
4482         (remove_symbol_file_command): Use gdb_argv.
4483         * stack.c (backtrace_command): Use gdb_argv.
4484         * source.c (add_path, show_substitute_path_command)
4485         (unset_substitute_path_command, set_substitute_path_command):
4486         Use gdb_argv.
4487         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4488         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4489         * remote.c (extended_remote_run, remote_put_command)
4490         (remote_get_command, remote_delete_command): Use gdb_argv.
4491         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4492         (gdbsim_open): Use gdb_argv.
4493         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4494         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4495         * procfs.c (procfs_info_proc): Use gdb_argv.
4496         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4497         * infrun.c (handle_command): Use gdb_argv.
4498         * inferior.c (add_inferior_command, clone_inferior_command):
4499         Use gdb_argv.
4500         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4501         * exec.c (exec_file_command): Use gdb_argv.
4502         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4503         * compile/compile.c (build_argc_argv): Use gdb_argv.
4504
4505 2017-08-03  Tom Tromey  <tom@tromey.com>
4506
4507         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4508
4509 2017-08-03  Tom Tromey  <tom@tromey.com>
4510
4511         * python/python.c (compute_python_string): Return std::string.
4512         (gdbpy_eval_from_control_command): Update.
4513         (do_start_initialization): Use std::string.
4514         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4515         xstrprintf.
4516         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4517         xstrprintf.
4518
4519 2017-08-03  Tom Tromey  <tom@tromey.com>
4520
4521         * top.h (do_restore_instream_cleanup): Remove.
4522         * top.c (do_restore_instream_cleanup): Remove.
4523         (read_command_file): Use scoped_restore.
4524         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4525
4526 2017-08-03  Tom Tromey  <tom@tromey.com>
4527
4528         * cli/cli-script.c (execute_user_command)
4529         (execute_control_command): Use scoped_restore.
4530
4531 2017-08-03  Tom Tromey  <tom@tromey.com>
4532
4533         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4534         (execute_user_command): Remove user_call_depth; use
4535         user_args_stack's size instead.
4536
4537 2017-08-03  Tom Tromey  <tom@tromey.com>
4538
4539         * top.h (in_user_command): Remove.
4540         * top.c (in_user_command): Remove.
4541         * cli/cli-script.c (do_restore_user_call_depth)
4542         (execute_user_command): Update.
4543
4544 2017-08-03  Tom Tromey  <tom@tromey.com>
4545
4546         * valops.c (search_struct_method): Use gdb::byte_vector.
4547         * valarith.c (value_concat): Use std::vector.
4548         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4549         (simple_search_memory): Likewise.
4550         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4551         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4552         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4553         * elfread.c (elf_rel_plt_read): Use std::string.
4554         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4555         * cli/cli-dump.c (restore_section_callback): Use
4556         gdb::byte_vector.
4557
4558 2017-08-03  Tom Tromey  <tom@tromey.com>
4559
4560         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4561
4562 2017-08-03  Tom Tromey  <tom@tromey.com>
4563
4564         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4565         (tui_register_format): Use scoped_restore.
4566
4567 2017-08-03  Tom Tromey  <tom@tromey.com>
4568
4569         * reverse.c (exec_direction_default): Remove.
4570         (exec_reverse_once): Use scoped_restore.
4571         * remote.c (restore_remote_timeout): Remove.
4572         (remote_flash_erase, remote_flash_write, remote_flash_done)
4573         (readchar, remote_serial_write): Use scoped_restore.
4574         * cli/cli-script.c (struct source_cleanup_lines_args)
4575         (source_cleanup_lines): Remove.
4576         (script_from_file): Use scoped_restore.
4577         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4578         (source_command): Use scoped_restore.
4579
4580 2017-08-03  Tom Tromey  <tom@tromey.com>
4581
4582         * utils.h (make_cleanup_free_so): Remove.
4583         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4584         * solist.h (struct so_deleter): New.
4585         (so_list_up): New typedef.
4586         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4587
4588 2017-08-03  Tom Tromey  <tom@tromey.com>
4589
4590         * utils.h (make_cleanup_restore_current_language): Remove.
4591         * utils.c (do_restore_current_language)
4592         (make_cleanup_restore_current_language): Remove.
4593         * parse.c (parse_exp_in_context_1)
4594         (parse_expression_with_language): Use
4595         scoped_restore_current_language.
4596         * mi/mi-main.c (mi_cmd_execute): Use
4597         scoped_restore_current_language.
4598         * language.h (scoped_restore_current_language): New class.
4599
4600 2017-08-03  Tom Tromey  <tom@tromey.com>
4601
4602         * compile/compile.c (cleanup_unlink_file): Remove.
4603         (compile_to_object): Use gdb::unlinker.
4604         (eval_compile_command): Likewise.
4605
4606 2017-08-03  Tom Tromey  <tom@tromey.com>
4607
4608         * utils.h (make_cleanup_fclose): Remove.
4609         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4610
4611 2017-08-03  Tom Tromey  <tom@tromey.com>
4612
4613         * top.c (open_terminal_stream): Return gdb_file_up.
4614         (new_ui_command): Update.
4615
4616 2017-08-03  Tom Tromey  <tom@tromey.com>
4617
4618         * source.c (print_source_lines_base, forward_search_command)
4619         (reverse_search_command): Use gdb_file_up.
4620
4621 2017-08-03  Tom Tromey  <tom@tromey.com>
4622
4623         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4624
4625 2017-08-03  Tom Tromey  <tom@tromey.com>
4626
4627         * cli/cli-cmds.c (find_and_open_script): Change return type.
4628         Remove "streamp" and "full_path" parameters.
4629         (source_script_with_search): Update.
4630         * auto-load.c (source_script_file): Update.
4631         * cli/cli-cmds.h (find_and_open_script): Change type.
4632         (open_script): New struct.
4633
4634 2017-08-03  Tom Tromey  <tom@tromey.com>
4635
4636         * xml-support.c (xml_fetch_content_from_file): Update.
4637         * ui-file.c (stdio_file::open): Update.
4638         * tracefile-tfile.c (tfile_start): Update.
4639         * remote.c (remote_file_put, remote_file_get): Update.
4640         * nat/linux-procfs.c (linux_proc_get_int)
4641         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4642         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4643         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4644         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4645         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4646         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4647         * linux-nat.c (linux_proc_pending_signals): Update.
4648         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4649         (file_closer): Remove.
4650         * compile/compile.c (compile_to_object): Update.
4651         * common/filestuff.h (struct gdb_file_deleter): New.
4652         (gdb_file_up): New typedef.
4653         (gdb_fopen_cloexec): Change return type.
4654         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4655         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4656         (dump_binary_file, restore_binary_file): Update.
4657         * auto-load.c (auto_load_objfile_script_1): Update.
4658
4659 2017-08-03  Tom Tromey  <tom@tromey.com>
4660
4661         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4662         (info_static_tracepoint_markers_command): Likewise.
4663         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4664         * skip.c (skip_info): Use ui_out_emit_table.
4665         * progspace.c (print_program_space): Use ui_out_emit_table.
4666         * osdata.c (info_osdata): Use ui_out_emit_table.
4667         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4668         ui_out_emit_table.
4669         * linux-thread-db.c (info_auto_load_libthread_db): Use
4670         ui_out_emit_table.
4671         * inferior.c (print_inferior): Use ui_out_emit_table.
4672         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4673         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4674         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4675         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4676         * ui-out.h (class ui_out_emit_table): New.
4677
4678 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4679
4680         * mips-tdep.c (mips_fpu_type_str): New function.
4681         (mips_dump_tdep): Call it.
4682
4683 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4684
4685         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4686         `->mips_fpu_type'.
4687
4688 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4689
4690         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4691
4692 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4693
4694         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4695
4696 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4697
4698         * cli/cli-cmds.c (maintenancechecklist): New variable.
4699         * gdbcmd.h (maintenancechecklist): Declare it.
4700         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4701         Call i386_linux_read_description with different masks.
4702         * maint.c (maintenance_check_command): New function.
4703         (_initialize_maint_cmds): Call add_prefix_cmd.
4704         * target-descriptions.c (tdesc_reg): override operator != and ==.
4705         (tdesc_type): Likewise.
4706         (tdesc_feature): Likewise.
4707         (target_desc): Likewise.
4708         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4709         (maintenance_check_xml_descriptions): New function.
4710         (_initialize_target_descriptions) Add command "xml-descriptions".
4711         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4712
4713 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4714
4715         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4716         Include features/i386/32bit-*.c.
4717         (i386_linux_read_description): Generate target description if it
4718         doesn't exist.
4719         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4720         functions.
4721         * features/i386/32bit-linux.c: Re-generated.
4722         * features/i386/32bit-sse.c: Likewise.
4723         * target-descriptions.c (print_c_feature::visit): Print code to
4724         set register number if needed.
4725         (print_c_feature) <m_next_regnum>: New field.
4726
4727 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4728
4729         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4730         (FEATURE_XMLFILES): New.
4731         (FEATURE_CFILES): New.
4732         New rules.
4733         (clean-cfiles): Remove generated c files.
4734         * features/i386/32bit-avx.c: Generated.
4735         * features/i386/32bit-avx512.c: Generated.
4736         * features/i386/32bit-core.c: Generated.
4737         * features/i386/32bit-linux.c: Generated.
4738         * features/i386/32bit-mpx.c: Generated.
4739         * features/i386/32bit-pkeys.c: Generated.
4740         * features/i386/32bit-sse.c: Generated.
4741         * target-descriptions.c: Include algorithm.
4742         (tdesc_element_visitor): Add method visit_end.
4743         (print_c_tdesc): Implement visit_end.
4744         (print_c_tdesc:: m_filename_after_features): Move it to
4745         protected.
4746         (print_c_feature): New class.
4747         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4748         name starts with "i386/32bit-".
4749
4750 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4751
4752         * target-descriptions.c (tdesc_element_visitor): New class.
4753         (tdesc_element): New class.
4754         (tdesc_reg): Inherit from tdesc_element.
4755         (tdesc_reg::accept): New function.
4756         (tdesc_type): Inherit from tdesc_element.
4757         (tdesc_type::accept): New function.
4758         (tdesc_feature): Inherit from tdesc_element.
4759         (tdesc_feature::accept): New function.
4760         (target_desc): Inherit from tdesc_element.
4761         (target_desc::target_desc): New.
4762         (target_desc::~target_desc): New.
4763         (target_desc::accept): New.
4764         (allocate_target_description): Use new.
4765         (free_target_description): Use delete.
4766         (print_c_tdesc): New class.
4767         (maint_print_c_tdesc_cmd): Adjust.
4768
4769         * features/aarch64.c: Re-generated.
4770         * features/arc-arcompact.c: Re-generated.
4771         * features/arc-v2.c: Re-generated.
4772         * features/arm/arm-with-iwmmxt.c: Re-generated.
4773         * features/arm/arm-with-m.c: Re-generated.
4774         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4775         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4776         * features/arm/arm-with-neon.c: Re-generated.
4777         * features/arm/arm-with-vfpv2.c: Re-generated.
4778         * features/arm/arm-with-vfpv3.c: Re-generated.
4779         * features/i386/amd64-avx-avx512.c: Re-generated.
4780         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4781         * features/i386/amd64-avx.c: Re-generated.
4782         * features/i386/amd64-avx-linux.c: Re-generated.
4783         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4784         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4785         * features/i386/amd64-avx-mpx.c: Re-generated.
4786         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4787         * features/i386/amd64.c: Re-generated.
4788         * features/i386/amd64-linux.c: Re-generated.
4789         * features/i386/amd64-mpx.c: Re-generated.
4790         * features/i386/amd64-mpx-linux.c: Re-generated.
4791         * features/i386/i386-avx-avx512.c: Re-generated.
4792         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4793         * features/i386/i386-avx.c: Re-generated.
4794         * features/i386/i386-avx-linux.c: Re-generated.
4795         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4796         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4797         * features/i386/i386-avx-mpx.c: Re-generated.
4798         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4799         * features/i386/i386.c: Re-generated.
4800         * features/i386/i386-linux.c: Re-generated.
4801         * features/i386/i386-mmx.c: Re-generated.
4802         * features/i386/i386-mmx-linux.c: Re-generated.
4803         * features/i386/i386-mpx.c: Re-generated.
4804         * features/i386/i386-mpx-linux.c: Re-generated.
4805         * features/i386/x32-avx-avx512.c: Re-generated.
4806         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4807         * features/i386/x32-avx.c: Re-generated.
4808         * features/i386/x32-avx-linux.c: Re-generated.
4809         * features/i386/x32.c: Re-generated.
4810         * features/i386/x32-linux.c: Re-generated.
4811         * features/microblaze.c: Re-generated.
4812         * features/microblaze-with-stack-protect.c: Re-generated.
4813         * features/mips64-dsp-linux.c: Re-generated.
4814         * features/mips64-linux.c: Re-generated.
4815         * features/mips-dsp-linux.c: Re-generated.
4816         * features/mips-linux.c: Re-generated.
4817         * features/nds32.c: Re-generated.
4818         * features/nios2.c: Re-generated.
4819         * features/nios2-linux.c: Re-generated.
4820         * features/rs6000/powerpc-32.c: Re-generated.
4821         * features/rs6000/powerpc-32l.c: Re-generated.
4822         * features/rs6000/powerpc-403.c: Re-generated.
4823         * features/rs6000/powerpc-403gc.c : Re-generated.
4824         * features/rs6000/powerpc-405.c: Re-generated.
4825         * features/rs6000/powerpc-505.c: Re-generated.
4826         * features/rs6000/powerpc-601.c: Re-generated.
4827         * features/rs6000/powerpc-602.c: Re-generated.
4828         * features/rs6000/powerpc-603.c: Re-generated.
4829         * features/rs6000/powerpc-604.c: Re-generated.
4830         * features/rs6000/powerpc-64.c: Re-generated.
4831         * features/rs6000/powerpc-64l.c: Re-generated.
4832         * features/rs6000/powerpc-7400.c: Re-generated.
4833         * features/rs6000/powerpc-750.c: Re-generated.
4834         * features/rs6000/powerpc-860.c: Re-generated.
4835         * features/rs6000/powerpc-altivec32.c: Re-generated.
4836         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4837         * features/rs6000/powerpc-altivec64.c: Re-generated.
4838         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4839         * features/rs6000/powerpc-cell32l.c: Re-generated.
4840         * features/rs6000/powerpc-cell64l.c: Re-generated.
4841         * features/rs6000/powerpc-e500.c: Re-generated.
4842         * features/rs6000/powerpc-e500l.c: Re-generated.
4843         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4844         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4845         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4846         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4847         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4848         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4849         * features/rs6000/powerpc-vsx32.c: Re-generated.
4850         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4851         * features/rs6000/powerpc-vsx64.c: Re-generated.
4852         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4853         * features/rs6000/rs6000.c: Re-generated.
4854         * features/s390-linux32.c: Re-generated.
4855         * features/s390-linux32v1.c: Re-generated.
4856         * features/s390-linux32v2.c: Re-generated.
4857         * features/s390-linux64.c: Re-generated.
4858         * features/s390-linux64v1.c: Re-generated.
4859         * features/s390-linux64v2.c: Re-generated.
4860         * features/s390-te-linux64.c: Re-generated.
4861         * features/s390-tevx-linux64.c: Re-generated.
4862         * features/s390-vx-linux64.c: Re-generated.
4863         * features/s390x-linux64.c: Re-generated.
4864         * features/s390x-linux64v1.c: Re-generated.
4865         * features/s390x-linux64v2.c: Re-generated.
4866         * features/s390x-te-linux64.c: Re-generated.
4867         * features/s390x-tevx-linux64.c: Re-generated.
4868         * features/s390x-vx-linux64.c: Re-generated.
4869         * features/sparc/sparc32-solaris.c: Re-generated.
4870         * features/sparc/sparc64-solaris.c: Re-generated.
4871         * features/tic6x-c62x.c: Re-generated.
4872         * features/tic6x-c62x-linux.c: Re-generated.
4873         * features/tic6x-c64x.c: Re-generated.
4874         * features/tic6x-c64x-linux.c: Re-generated.
4875         * features/tic6x-c64xp.c: Re-generated.
4876         * features/tic6x-c64xp-linux.c: Re-generated.
4877
4878 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4879
4880         * i386-linux-tdep.c (i386_linux_read_description): New function.
4881         (i386_linux_core_read_description): Call
4882         i386_linux_read_description.
4883         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4884         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4885         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4886         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4887         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4888         * x86-linux-nat.c (x86_linux_read_description): Call
4889         i386_linux_read_description.
4890
4891 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4892
4893         * NEWS: Mention it.
4894         * features/Makefile (%.c: %.xml): Pass the xml file name to
4895         command "maint print c-tdesc".
4896         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4897         name from 'arg'.
4898
4899 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4900
4901         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4902         in-class initialization.
4903         (tdesc_create_feature): Call new instead of XCNEW.
4904         (free_target_description): Ue delete.
4905
4906 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4907
4908         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4909
4910 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4911
4912         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4913         constant.
4914         (amd64_x32_init_abi): Likewise.
4915         * amd64-tdep.h (amd64_init_abi): Update declaration.
4916         (amd64_x32_init_abi): Likewise.
4917
4918 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4919
4920         PR tdep/21717
4921         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4922         condition for FPSCR.
4923         (arm_linux_store_inferior_registers): Likewise.
4924
4925 2017-07-22  Tom Tromey  <tom@tromey.com>
4926
4927         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4928         <syscalls_counts>: Now a std::vector.
4929         (get_catch_syscall_inferior_data): Use "new".
4930         (catch_syscall_inferior_data_cleanup): Use "delete".
4931         (insert_catch_syscall, remove_catch_syscall)
4932         (clear_syscall_counts): Update.
4933
4934 2017-07-22  Tom Tromey  <tom@tromey.com>
4935
4936         * break-catch-syscall.c (syscall_catchpoint)
4937         <syscalls_to_be_caught>: Now a std::vector<int>
4938         (~syscall_catchpoint): Remove.
4939         (insert_catch_syscall, remove_catch_syscall)
4940         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4941         (print_mention_catch_syscall, print_recreate_catch_syscall):
4942         Update.
4943         (create_syscall_event_catchpoint): Change type of "filter"
4944         parameter.
4945         (catch_syscall_split_args): Return a std::vector.
4946         (catch_syscall_command_1, catching_syscall_number_1): Update.
4947
4948 2017-07-22  Tom Tromey  <tom@tromey.com>
4949
4950         * break-catch-throw.c (struct exception_catchpoint)
4951         <exception_rx>: Now a std::string.
4952         (~exception_catchpoint): Remove.
4953         (print_one_detail_exception_catchpoint): Update.
4954         (handle_gnu_v3_exceptions): Change type of except_rx.
4955         (extract_exception_regexp): Return a std::string.
4956         (catch_exception_command_1): Update.
4957
4958 2017-07-22  Tom Tromey  <tom@tromey.com>
4959
4960         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4961         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4962         std::vector.
4963         <catch_all>: Now a bool.
4964         (~signal_catchpoint): Remove.
4965         (signal_catchpoint_insert_location)
4966         (signal_catchpoint_remove_location)
4967         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4968         (signal_catchpoint_print_mention)
4969         (signal_catchpoint_print_recreate)
4970         (signal_catchpoint_explains_signal): Update.
4971         (create_signal_catchpoint): Change type of "filter" and
4972         "catch_all".
4973         (catch_signal_split_args): Return a std::vector.  Change type of
4974         "catch_all".
4975         (catch_signal_command): Update.
4976
4977 2017-07-20  Pedro Alves  <palves@redhat.com>
4978
4979         * ada-lang.c (ada_language_defn): Make extern.
4980         (_initialize_ada_language): Remove add_language call.
4981         * c-lang.c (c_language_defn, cplus_language_defn)
4982         (asm_language_defn, minimal_language_defn): Make extern.
4983         (_initialize_c_language): Delete.
4984         * completer.c (compare_cstrings): Delete, moved to utils.h.
4985         * d-lang.c (d_language_defn): Make extern.
4986         (_initialize_d_language): Remove add_language calls.
4987         * defs.h (enum language): Add comment.
4988         * f-lang.c (f_language_defn): Make extern.
4989         (_initialize_f_language): Remove add_language call.
4990         * go-lang.c (go_language_defn): Make extern.
4991         (_initialize_go_language): Remove add_language call.
4992         * language.c: Include <algorithm>.
4993         (languages): Redefine as const array.
4994         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4995         (set_language_command): Handle "local".  Use for-range loop.
4996         (set_language): Remove loop.
4997         (language_enum): Rewrite.
4998         (language_def, language_str): Remove loops.
4999         (add_language): Delete.
5000         (add_set_language_command): New, based on add_languages.
5001         (skip_language_trampoline): Adjust.
5002         (local_language_defn): Delete.
5003         (language_gdbarch_post_init): Adjust.
5004         (_initialize_language): Remove add_language calls.  Call
5005         add_set_language_command.
5006         * language.h (add_language): Delete.
5007         (auto_language_defn)
5008         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5009         (asm_language_defn, c_language_defn, cplus_language_defn)
5010         (d_language_defn, f_language_defn, go_language_defn)
5011         (m2_language_defn, objc_language_defn, opencl_language_defn)
5012         (pascal_language_defn, rust_language_defn): Declare.
5013         * m2-lang.c (m2_language_defn): Make extern.
5014         (_initialize_m2_language): Remove add_language call.
5015         * objc-lang.c (objc_language_defn): Make extern.
5016         (_initialize_objc_language): Remove add_language call.
5017         * opencl-lang.c (opencl_language_defn): Make extern.
5018         (_initialize_opencl_language): Remove add_language call.
5019         * p-lang.c (pascal_language_defn): Make extern.
5020         (_initialize_pascal_language): Delete.
5021         * rust-lang.c (rust_language_defn): Make extern.
5022         (_initialize_rust_language): Delete.
5023         * utils.h (compare_cstrings): New static inline function.
5024
5025 2017-07-20  Pedro Alves  <palves@redhat.com>
5026
5027         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5028         (get_var_value): Constify parameters.
5029         (get_int_var_value): Change prototype.
5030         (to_fixed_range_type): Adjust.
5031         * ada-lang.h (get_int_var_value): Change prototype.
5032
5033 2017-07-20  Pedro Alves  <palves@redhat.com>
5034
5035         * dwarf2read.c (dw2_lookup_symbol): Use
5036         SYMBOL_MATCHES_SEARCH_NAME.
5037         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5038
5039 2017-07-20  Pedro Alves  <palves@redhat.com>
5040
5041         * block.c (block_iter_name_step, block_iter_name_first)
5042         (block_iter_name_next): Delete.
5043         (block_lookup_symbol_primary): Adjust to use
5044         dict_iter_match_first/dict_iter_match_next.
5045         * block.h (block_iter_name_first, block_iter_name_next): Delete
5046         declarations.
5047         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5048         dict_iter_match_first/dict_iter_match_next.
5049
5050 2017-07-20  Pedro Alves  <palves@redhat.com>
5051
5052         * cp-support.c (cp_find_first_component_aux): Add missing case for
5053         end of string.
5054
5055 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5056
5057         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5058         of dwo_cu's dwo_file.
5059
5060 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5061
5062         * remote.c (store_registers_using_G): Remove one line comment.
5063
5064 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5065
5066         * regcache.c (regcache_cpy): Simplify it.
5067         (regcache::cpy_no_passthrough): Remove it.
5068         * regcache.h (cpy_no_passthrough): Remove it.
5069         (regcache_dup, regcache_cpy): Update comments.
5070
5071 2017-07-18  Pedro Alves  <palves@redhat.com>
5072
5073         * remote-sim.c (sim_command_completer): Adjust to work with a
5074         completion_tracker instead of a VEC.
5075
5076 2017-07-17  Pedro Alves  <palves@redhat.com>
5077
5078         * completer.c (complete_source_filenames): New function.
5079         (complete_address_and_linespec_locations): New function.
5080         (location_completer): Use complete_address_and_linespec_locations.
5081         (completion_tracker::build_completion_result): Honor the tracker's
5082         request to suppress append.
5083         * completer.h (completion_tracker::suppress_append_ws)
5084         (completion_tracker::set_suppress_append_ws): New methods.
5085         (completion_tracker::m_suppress_append_ws): New field.
5086         (complete_source_filenames): New declaration.
5087         * linespec.c (linespec_complete_what): New.
5088         (struct ls_parser) <complete_what, completion_word,
5089         completion_quote_char, completion_quote_end, completion_tracker>:
5090         New fields.
5091         (string_find_incomplete_keyword_at_end): New.
5092         (linespec_lexer_lex_string): Record quote char.  If in completion
5093         mode, don't throw.
5094         (linespec_lexer_consume_token): Advance the completion word point.
5095         (linespec_lexer_peek_token): Save/restore completion info.
5096         (save_stream_and_consume_token): New.
5097         (set_completion_after_number): New.
5098         (linespec_parse_basic): Set what to complete next depending on
5099         token.  Handle function and label completions specially.
5100         (parse_linespec): Disable objc shortcut in completion mode.  Set
5101         what to complete next depending on token type.  Skip keyword if in
5102         completion mode.
5103         (complete_linespec_component, linespec_complete): New.
5104         * linespec.h (linespec_complete): Declare.
5105
5106 2017-07-17  Pedro Alves  <palves@redhat.com>
5107
5108         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5109         Handle 'operator<' / 'operator<<'.
5110
5111 2017-07-17  Pedro Alves  <palves@redhat.com>
5112
5113         * completer.c (collect_explicit_location_matches): Handle
5114         MATCH_LABEL.
5115         (convert_explicit_location_to_linespec): New, factored out from
5116         ...
5117         (convert_explicit_location_to_sals): ... this.
5118         (complete_label): New.
5119         (linespec_complete_label, find_label_symbols_in_block): New.
5120         (find_label_symbols): Add completion_mode parameter and adjust to
5121         call find_label_symbols_in_block.
5122         * linespec.h (linespec_complete_label): Declare.
5123
5124 2017-07-17  Pedro Alves  <palves@redhat.com>
5125
5126         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5127         complete_symbol_mode parameter.
5128         * cli/cli-cmds.c (complete_command): Get the completion result out
5129         of the handle_brkchars tracker if used a custom word point.
5130         * completer.c: Include "linespec.h".
5131         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5132         (advance_to_expression_complete_word_point): New.
5133         (completion_tracker::completes_to_completion_word): New.
5134         (complete_files_symbols): Pass down
5135         complete_symbol_mode::EXPRESSION.
5136         (explicit_options, probe_options): New.
5137         (collect_explicit_location_matches): Complete on the
5138         explictit_loc->foo instead of word.  Use
5139         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5140         keyword and options completions.
5141         (backup_text_ptr): Delete.
5142         (skip_keyword): New.
5143         (complete_explicit_location): Remove 'word' parameter.  Add
5144         language, quoted_arg_start and quoted_arg_end parameters.
5145         Rewrite, parsing left to right.
5146         (location_completer): Rewrite.
5147         (location_completer_handle_brkchars): New function.
5148         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5149         (enum complete_line_internal_reason): Adjust comments.
5150         (completion_tracker::discard_completions): New.
5151         (completer_handle_brkchars_func_for_completer): Handle
5152         location_completer.
5153         (gdb_custom_word_point_brkchars)
5154         (gdb_org_rl_basic_quote_characters): New.
5155         (gdb_completion_word_break_characters_throw)
5156         (completion_find_completion_word): Handle trackers that use a
5157         custom word point.
5158         (completion_tracker::advance_custom_word_point_by): New.
5159         (completion_tracker::build_completion_result): Don't rely on
5160         readline appending the quote char.
5161         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5162         use a custom word point.
5163         (gdb_rl_attempted_completion_function): Restore
5164         rl_basic_quote_characters.
5165         * completer.h (class completion_tracker): Extend intro comment.
5166         (completion_tracker::set_quote_char)
5167         (completion_tracker::quote_char)
5168         (completion_tracker::set_use_custom_word_point)
5169         (completion_tracker::use_custom_word_point)
5170         (completion_tracker::custom_word_point)
5171         (completion_tracker::set_custom_word_point)
5172         (completion_tracker::advance_custom_word_point_by)
5173         (completion_tracker::completes_to_completion_word)
5174         (completion_tracker::discard_completions): New methods.
5175         (completion_tracker::m_quote_char)
5176         (completion_tracker::m_use_custom_word_point)
5177         (completion_tracker::m_custom_word_point): New fields.
5178         (advance_to_expression_complete_word_point): Declare.
5179         * f-lang.c (f_collect_symbol_completion_matches): Add
5180         complete_symbol_mode parameter.
5181         * language.h (struct language_defn)
5182         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5183         parameter.
5184         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5185         (linespec_complete_function): New function.
5186         (linespec_lexer_lex_keyword): Adjust.
5187         * linespec.h (linespec_keywords, linespec_complete_function): New
5188         declarations.
5189         * location.c (find_end_quote): New function.
5190         (explicit_location_lex_one): Add explicit_completion_info
5191         parameter.  Save quoting info.  Don't throw if being called for
5192         completion.  Don't handle Ada operators here.
5193         (is_cp_operator, skip_op_false_positives, first_of)
5194         (explicit_location_lex_one_function): New function.
5195         (string_to_explicit_location): Replace 'dont_throw' parameter with
5196         an explicit_completion_info pointer parameter.  Handle it.  Don't
5197         use explicit_location_lex_one to lex function names.  Use
5198         explicit_location_lex_one_function instead.
5199         * location.h (struct explicit_completion_info): New.
5200         (string_to_explicit_location): Replace 'dont_throw' parameter with
5201         an explicit_completion_info pointer parameter.
5202         * symtab.c (default_collect_symbol_completion_matches_break_on):
5203         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5204         (default_collect_symbol_completion_matches)
5205         (collect_symbol_completion_matches): Add complete_symbol_mode
5206         parameter.
5207         (collect_symbol_completion_matches_type): Pass down
5208         complete_symbol_mode::EXPRESSION.
5209         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5210         parameter.  Handle LINESPEC mode.
5211         * symtab.h (complete_symbol_mode): New.
5212         (default_collect_symbol_completion_matches_break_on)
5213         (default_collect_symbol_completion_matches)
5214         (collect_symbol_completion_matches)
5215         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5216         parameter.
5217
5218 2017-07-17  Pedro Alves  <palves@redhat.com>
5219
5220         * utils.c (enum class strncmp_iw_mode): New.
5221         (strcmp_iw): Rename to ...
5222         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5223         parameters.  Handle them.
5224         (strncmp_iw): New.
5225         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5226         * utils.h (strncmp_iw): Declare.
5227         (strcmp_iw): Move describing comments here.
5228
5229 2017-07-17  Pedro Alves  <palves@redhat.com>
5230
5231         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5232         CP_OPERATOR_STR.
5233         * c-typeprint.c (is_type_conversion_operator): Use
5234         CP_OPERATOR_STR.
5235         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5236         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5237         CP_OPERATOR_LEN.
5238         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5239         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5240         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5241         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5242         CP_OPERATOR_STR.
5243         * location.c: Include "cp-support.h".
5244         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5245         CP_OPERATOR_STR.
5246         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5247         CP_OPERATOR_LEN.
5248
5249 2017-07-17  Pedro Alves  <palves@redhat.com>
5250
5251         * cli/cli-cmds.c (complete_command): Use a completion tracker
5252         along with completion_find_completion_word for handle_brkchars
5253         phase.
5254         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5255         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5256         (struct gdb_rl_completion_word_info): New.
5257         (gdb_rl_find_completion_word): New.
5258         (completion_find_completion_word): New.
5259         * completer.h (completion_find_completion_word): Declare.
5260
5261 2017-07-17  Pedro Alves  <palves@redhat.com>
5262
5263         * ada-lang.c (symbol_completion_match): Adjust comments.
5264         (symbol_completion_add): Replace vector parameter with
5265         completion_tracker parameter.  Use it.
5266         (ada_make_symbol_completion_list): Rename to...
5267         (ada_collect_symbol_completion_matches): ... this.  Add
5268         completion_tracker parameter and use it.
5269         (ada_language_defn): Adjust.
5270         * break-catch-syscall.c (catch_syscall_completer): Adjust
5271         prototype and work with completion_tracker instead of VEC.
5272         * breakpoint.c (condition_completer): Adjust prototype and work
5273         with completion_tracker instead of VEC.
5274         * c-lang.c (c_language_defn, cplus_language_defn)
5275         (asm_language_defn, minimal_language_defn): Adjust to renames.
5276         * cli/cli-cmds.c (complete_command): Rework using
5277         completion_tracker.  Catch exceptions when completing.
5278         * cli/cli-decode.c (integer_unlimited_completer)
5279         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5280         with completion_tracker instead of VEC.
5281         * command.h (struct completion_tracker): Forward declare.
5282         (completer_ftype, completer_handle_brkchars_ftype): Change
5283         types.
5284         (complete_on_cmdlist, complete_on_enum): Adjust.
5285         * completer.c: Include <algorithm>.
5286         (struct gdb_completer_state): New.
5287         (current_completion): New global.
5288         (readline_line_completion_function): Delete.
5289         (noop_completer, filename_completer)
5290         (filename_completer_handle_brkchars, complete_files_symbols)
5291         (linespec_location_completer): Adjust to work with a
5292         completion_tracker instead of a VEC.
5293         (string_or_empty): New.
5294         (collect_explicit_location_matches): Adjust to work with a
5295         completion_tracker instead of a VEC.
5296         (explicit_location_completer): Rename to ...
5297         (complete_explicit_location): ... this and adjust to work with a
5298         completion_tracker instead of a VEC.
5299         (location_completer): Adjust to work with a completion_tracker
5300         instead of a VEC.
5301         (add_struct_fields): Adjust to work with a completion_list instead
5302         of VEC.
5303         (expression_completer): Rename to ...
5304         (complete_expression): ... this and adjust to work with a
5305         completion_tracker instead of a VEC.  Use complete_files_symbols.
5306         (expression_completer): Reimplement on top of complete_expression.
5307         (symbol_completer): Adjust to work with a completion_tracker
5308         instead of a VEC.
5309         (enum complete_line_internal_reason): Add describing comments.
5310         (complete_line_internal_normal_command): Adjust to work with a
5311         completion_tracker instead of a VEC.
5312         (complete_line_internal): Rename to ...
5313         (complete_line_internal_1): ... this and adjust to work with a
5314         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5315         handle_brkchars phase.
5316         (new_completion_tracker): Delete.
5317         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5318         complete_line_internal_1.
5319         (free_completion_tracker): Delete.
5320         (INITIAL_COMPLETION_HTAB_SIZE): New.
5321         (completion_tracker::completion_tracker)
5322         (completion_tracker::~completion_tracker): New.
5323         (maybe_add_completion): Delete.
5324         (completion_tracker::maybe_add_completion)
5325         (completion_tracker::add_completion)
5326         (completion_tracker::add_completions): New.
5327         (throw_max_completions_reached_error): Delete.
5328         (complete_line): Adjust to work with a completion_tracker instead
5329         of a VEC.  Don't create a completion_tracker_t or check for max
5330         completions here.
5331         (command_completer, command_completer_handle_brkchars)
5332         (signal_completer, reg_or_group_completer_1)
5333         (reg_or_group_completer, default_completer_handle_brkchars):
5334         Adjust to work with a completion_tracker.
5335         (gdb_completion_word_break_characters_throw): New.
5336         (gdb_completion_word_break_characters): Reimplement.
5337         (line_completion_function): Delete.
5338         (completion_tracker::recompute_lowest_common_denominator)
5339         (expand_preserving_ws)
5340         (completion_tracker::build_completion_result)
5341         (completion_result::completion_result)
5342         (completion_result::completion_result)
5343         (completion_result::~completion_result)
5344         (completion_result::completion_result)
5345         (completion_result::release_match_list, compare_cstrings)
5346         (completion_result::sort_match_list)
5347         (completion_result::reset_match_list)
5348         (gdb_rl_attempted_completion_function_throw)
5349         (gdb_rl_attempted_completion_function): New.
5350         * completer.h (completion_list, struct completion_result)
5351         (class completion_tracker): New.
5352         (complete_line): Add completion_tracker parameter.
5353         (readline_line_completion_function): Delete.
5354         (gdb_rl_attempted_completion_function): New.
5355         (noop_completer, filename_completer, expression_completer)
5356         (location_completer, symbol_completer, command_completer)
5357         (signal_completer, reg_or_group_completer): Update prototypes.
5358         (completion_tracker_t, new_completion_tracker)
5359         (make_cleanup_free_completion_tracker): Delete.
5360         (enum maybe_add_completion_enum): Delete.
5361         (maybe_add_completion): Delete.
5362         (throw_max_completions_reached_error): Delete.
5363         * corefile.c (complete_set_gnutarget): Adjust to work with a
5364         completion_tracker instead of a VEC.
5365         * cp-abi.c (cp_abi_completer): Adjust to work with a
5366         completion_tracker instead of a VEC.
5367         * d-lang.c (d_language_defn): Adjust.
5368         * disasm.c (disassembler_options_completer): Adjust to work with a
5369         completion_tracker instead of a VEC.
5370         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5371         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5372         with a completion_tracker instead of a VEC.
5373         (f_language_defn): Adjust.
5374         * go-lang.c (go_language_defn): Adjust.
5375         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5376         Adjust to work with a completion_tracker instead of a VEC.
5377         * infrun.c (handle_completer): Likewise.
5378         * interps.c (interpreter_completer): Likewise.
5379         * interps.h (interpreter_completer): Likewise.
5380         * language.c (unknown_language_defn, auto_language_defn)
5381         (local_language_defn): Adjust.
5382         * language.h (language_defn::la_make_symbol_completion_list):
5383         Rename to ...
5384         (language_defn::la_collect_symbol_completion_matches): ... this
5385         and adjust to work with a completion_tracker instead of a VEC.
5386         * m2-lang.c (m2_language_defn): Adjust.
5387         * objc-lang.c (objc_language_defn): Adjust.
5388         * opencl-lang.c (opencl_language_defn): Adjust.
5389         * p-lang.c (pascal_language_defn): Adjust.
5390         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5391         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5392         with a completion_tracker.
5393         * rust-lang.c (rust_language_defn): Adjust.
5394         * symtab.c (free_completion_list, do_free_completion_list)
5395         (return_val, completion_tracker): Delete.
5396         (completion_list_add_name, completion_list_add_symbol)
5397         (completion_list_add_msymbol, completion_list_objc_symbol)
5398         (completion_list_add_fields, add_symtab_completions): Add
5399         completion_tracker parameter and use it.
5400         (default_make_symbol_completion_list_break_on_1): Rename to...
5401         (default_collect_symbol_completion_matches_break_on): ... this.
5402         Add completion_tracker parameter and use it instead of allocating
5403         a completion tracker here.
5404         (default_make_symbol_completion_list_break_on): Delete old
5405         implementation.
5406         (default_make_symbol_completion_list): Delete.
5407         (default_collect_symbol_completion_matches): New.
5408         (make_symbol_completion_list): Delete.
5409         (collect_symbol_completion_matches): New.
5410         (make_symbol_completion_type): Rename to ...
5411         (collect_symbol_completion_matches_type): ... this.  Add
5412         completion_tracker parameter and use it instead of VEC.
5413         (make_file_symbol_completion_list_1): Rename to...
5414         (collect_file_symbol_completion_matches): ... this.  Add
5415         completion_tracker parameter and use it instead of VEC.
5416         (make_file_symbol_completion_list): Delete.
5417         (add_filename_to_list): Use completion_list instead of a VEC.
5418         (add_partial_filename_data::list): Now a completion_list.
5419         (make_source_files_completion_list): Work with a completion_list
5420         instead of a VEC.
5421         * symtab.h: Include "completer.h".
5422         (default_make_symbol_completion_list_break_on)
5423         (default_make_symbol_completion_list, make_symbol_completion_list)
5424         (make_symbol_completion_type, make_file_symbol_completion_list)
5425         (make_source_files_completion_list): Delete.
5426         (default_collect_symbol_completion_matches_break_on)
5427         (default_collect_symbol_completion_matches)
5428         (collect_symbol_completion_matches)
5429         (collect_symbol_completion_matches_type)
5430         (collect_file_symbol_completion_matches)
5431         (make_source_files_completion_list): New.
5432         * top.c (init_main): Don't install a rl_completion_entry_function
5433         hook.  Install a rl_attempted_completion_function hook instead.
5434         * tui/tui-layout.c (layout_completer): Adjust to work with a
5435         completion_tracker.
5436         * tui/tui-regs.c (tui_reggroup_completer):
5437         * tui/tui-win.c (window_name_completer, focus_completer)
5438         (winheight_completer): Adjust to work with a completion_tracker.
5439         * value.c: Include "completer.h".
5440         (complete_internalvar): Adjust to work with a completion_tracker.
5441         * value.h (complete_internalvar): Likewise.
5442
5443 2017-07-17  Pedro Alves  <palves@redhat.com>
5444
5445         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5446         renames.
5447         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5448         comments to completer_ftype's declaration.
5449         <completer_handle_brkchars>: Change type to
5450         completer_handle_brkchars_ftype.
5451         * command.h (completer_ftype): Add describing comment and give
5452         names to parameters.
5453         (completer_ftype_void): Rename to ...
5454         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5455         (set_cmd_completer_handle_brkchars): Adjust.
5456         * completer.c (filename_completer_handle_brkchars): New function.
5457         (complete_line_internal_normal_command): New function, factored
5458         out from ...
5459         (complete_line_internal): ... here.
5460         (command_completer_handle_brkchars)
5461         (default_completer_handle_brkchars)
5462         (completer_handle_brkchars_func_for_completer): New functions.
5463         * completer.h (set_gdb_completion_word_break_characters): Delete
5464         declaration.
5465         (completer_handle_brkchars_func_for_completer): New declaration.
5466         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5467         completer_handle_brkchars_func_for_completer.
5468
5469 2017-07-17  Pedro Alves  <palves@redhat.com>
5470
5471         * completer.c (symbol_completer): New function, based on
5472         make_symbol_completion_list_fn.
5473         * completer.h (symbol_completer): New declaration.
5474         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5475         * python/py-cmd.c (completers): Adjust.
5476         * symtab.c (make_symbol_completion_list_fn): Delete.
5477         * symtab.h (make_symbol_completion_list_fn): Delete.
5478         * cli/cli-decode.c (add_cmd): Adjust.
5479
5480 2017-07-17  Pedro Alves  <palves@redhat.com>
5481
5482         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5483         * dwarf2read.c: Include "filename-seen-cache.h".
5484         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5485         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5486         * filename-seen-cache.c: New file.
5487         * filename-seen-cache.h: New file.
5488         * symtab.c: Include "filename-seen-cache.h".
5489         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5490         (create_filename_seen_cache, clear_filename_seen_cache)
5491         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5492         to filename-seen-cache.h/filename-seen-cache.c.
5493         (output_source_filename, sources_info)
5494         (maybe_add_partial_symtab_filename)
5495         (make_source_files_completion_list): Adjust to use
5496         filename_seen_cache.
5497
5498 2017-07-17  Pedro Alves  <palves@redhat.com>
5499
5500         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5501         fields.
5502         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5503         dwarf2_debug_sections*)): New.
5504         (dwarf2_per_objfile::dwarf2_per_objfile(const
5505         dwarf2_per_objfile&)): Declare as deleted.
5506         (dwarf2_per_objfile::operator=): Declare as deleted.
5507         (dwarf2_per_objfile::dwarf2_per_objfile)
5508         (dwarf2_per_objfile::~dwarf2_per_objfile)
5509         (dwarf2_per_objfile::free_cached_comp_units): New.
5510         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5511         ctor.  Call dwarf2_per_objfile's ctor manually.
5512         (dwarf2_locate_sections): Deleted/refactored as ...
5513         (dwarf2_per_objfile::locate_sections): ... this new method.
5514         (free_cached_comp_units): Defer to
5515         dwarf2_per_objfile::free_cached_comp_units.
5516         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5517
5518 2017-07-14  Tom Tromey  <tom@tromey.com>
5519
5520         PR rust/21764:
5521         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5522         parameter.
5523         <UNOP_SIZEOF>: Split into separate case.
5524         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5525
5526 2017-07-14  Tom Tromey  <tom@tromey.com>
5527
5528         PR rust/21763:
5529         * symtab.c (symbol_matches_domain): Add language_rust to special
5530         case.
5531         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5532         treat LOC_TYPEDEF symbols as variables.
5533
5534 2017-07-14  Pedro Alves  <palves@redhat.com>
5535
5536         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5537         symtabs matching all symtabs with SRCFILE as file name instead of
5538         only considering the first hit, with lookup_symtab.
5539
5540 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5541
5542         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5543         operator_name parameters.
5544         (gen_expr): Update function call.
5545
5546 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5547
5548         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5549         parameter.
5550         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5551         Likewise.
5552         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5553         parameter, use agent_expr::gdbarch instead, update function
5554         calls.
5555         (locexpr_tracepoint_var_ref): Likewise.
5556         (loclist_tracepoint_var_ref): Likewise.
5557         * ax-gdb.c (gen_trace_static_fields): Likewise.
5558         (gen_traced_pop): Likewise.
5559         (gen_frame_args_address): Likewise.
5560         (gen_frame_locals_address): Likewise.
5561         (gen_var_ref): Likewise.
5562         (gen_struct_ref_recursive): Likewise.
5563         (gen_static_field): Likewise.
5564         (gen_maybe_namespace_elt): Likewise.
5565         (gen_expr): Likewise.
5566         (gen_trace_for_var): Likewise.
5567         (gen_trace_for_expr): Likewise.
5568         (gen_trace_for_return_address): Likewise.
5569
5570 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5571
5572         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5573         parameter.
5574         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5575
5576 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5577
5578         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5579         from ax, update calls.
5580         (gen_usual_arithmetic): Likewise.
5581         (gen_integral_promotions): Likewise.
5582         (gen_bitfield_ref): Likewise.
5583         (gen_primitive_field): Likewise.
5584         (gen_struct_ref_recursive): Likewise.
5585         (gen_struct_ref): Likewise.
5586         (gen_maybe_namespace_elt): Likewise.
5587         (gen_struct_elt_for_reference): Likewise.
5588         (gen_namespace_elt): Likewise.
5589         (gen_aggregate_elt_ref): Likewise.
5590         (gen_expr): Get gdbarch from ax, update calls.
5591         (gen_expr_binop_rest): Likewise.
5592
5593 2017-07-13  Pedro Alves  <palves@redhat.com>
5594
5595         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5596         as default tdesc.
5597         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5598         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5599         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5600         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5601         tdep.
5602         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5603         Get final tdesc from the tdep.
5604         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5605         default tdesc.
5606         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5607         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5608         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5609         Use it as default tdesc.
5610         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5611         down to amd_init_abi.  No longer handle fallback tdesc here.
5612         * amd64-tdep.h (tdesc_x32): Declare.
5613         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5614         parameter.
5615         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5616         as default tdesc.
5617
5618 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5619
5620         * s390-linux-tdep.c (s390_process_record): Add support for
5621         instructions new in arch12.
5622
5623 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5624
5625         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5626         PT_GETFSBASE and PT_GETGSBASE.
5627         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5628         PT_SETGSBASE.
5629
5630 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5631
5632         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5633         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5634         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5635         those rules.
5636         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5637         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5638         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5639         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5640         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5641         * features/i386/amd64.xml: Add 64bit-segments.xml.
5642         * features/i386/amd64-avx-avx512.c: Regenerated.
5643         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5644         * features/i386/amd64-avx-mpx.c: Regenerated.
5645         * features/i386/amd64-avx.c: Regenerated.
5646         * features/i386/amd64-mpx.c: Regenerated.
5647         * features/i386/amd64.c: Regenerated.
5648         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5649         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5650         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5651         * regformats/i386/amd64-avx.dat: Regenerated.
5652         * regformats/i386/amd64-mpx.dat: Regenerated.
5653         * regformats/i386/amd64.dat: Regenerated.
5654
5655 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5656
5657         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5658         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5659
5660 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5661
5662         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5663         unsetenv.
5664         * gnulib/aclocal.m4: Regenerate.
5665         * gnulib/config.in: Regenerate.
5666         * gnulib/configure: Regenerate.
5667         * gnulib/import/Makefile.am: Regenerate.
5668         * gnulib/import/Makefile.in: Regenerate.
5669         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5670         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5671         * gnulib/import/m4/environ.m4: New file.
5672         * gnulib/import/m4/setenv.m4: New file.
5673         * gnulib/import/setenv.c: New file.
5674         * gnulib/import/unsetenv.c: New file.
5675
5676 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5677
5678         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5679         address when op is DW_OP_addr.
5680
5681 2017-07-09  Tom Tromey  <tom@tromey.com>
5682
5683         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5684         check and apply to outer type.
5685
5686 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5687
5688         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5689         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5690         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5691         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5692
5693 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5694
5695         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5696
5697 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5698
5699         * corelow.c (get_core_siginfo): Remove.
5700         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5701         instead of get_core_siginfo.
5702         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5703         * gdbarch.h: Re-generate.
5704         * gdbarch.c: Re-generate.
5705         * linux-tdep.c (linux_core_xfer_siginfo): New.
5706         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5707
5708 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5709
5710         * corelow.c (thread_section_name): Move to ...
5711         * gdbcore.h (thread_section_name): ... here.
5712
5713 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5714
5715         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5716         (struct siginfo32): New.
5717         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5718         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5719         via ptrace(PT_LWPINFO).
5720
5721 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5722
5723         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5724         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5725         (fbsd_get_siginfo_type): New.
5726         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5727         (_initialize_fbsd_tdep): New.
5728
5729 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5730
5731         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5732         a singular dwo_unit*) to support multiple CUs in the same way that
5733         multiple TUs are supported.
5734         (create_cus_hash_table): Replace create_dwo_cu with a function for
5735         parsing multiple CUs from a DWO file.
5736         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5737         create_dwo_cu.
5738         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5739         htab_find, rather than comparing the signature to a singleton CU in
5740         the dwo_file.
5741
5742 2017-07-06  Pedro Alves  <palves@redhat.com>
5743
5744         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5745
5746 2017-07-04  Pedro Alves  <palves@redhat.com>
5747
5748         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5749         * gdbtypes.h (TYPE_STATIC): Delete.
5750         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5751         is_synchronized, is_native>: Delete.
5752         <dummy>: Bump.
5753         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5754         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5755         (TYPE_FN_FIELD_ABSTRACT): Delete.
5756
5757 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5758
5759         * buffer.h (buffer_finish): Fix spelling mistakes.
5760
5761 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5762
5763         * .dir-locals.el: Automatically switch to C-style comments in
5764         versions of Emacs that support the feature.
5765
5766 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5767             Pedro Alves  <palves@redhat.com>
5768
5769         PR cli/21688
5770         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5771         (process_next_line): New variable 'inline_cmd'.
5772         Adjust 'if' clauses for "python", "compile" and "guile" to use
5773         'command_name_equals' and check for '!inline_cmd'.
5774
5775 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5776
5777         PR cli/21688
5778         * cli/cli-script.c (command_name_equals_not_inline): New function.
5779         (process_next_line): Adjust 'if' clauses for "python", "compile"
5780         and "guile" to use command_name_equals_not_inline.
5781
5782 2017-06-29  Pedro Alves  <palves@redhat.com>
5783
5784         * completer.c (expression_completer): Call
5785         linespec_location_completer instead of location_completer.
5786
5787 2017-06-29  Pedro Alves  <palves@redhat.com>
5788
5789         * completer.c (expression_completer): Remove code that recomputes
5790         'text' from 'word'.
5791
5792 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5793
5794         * regformats/regdat.sh: Generate code with
5795         "ifndef IN_PROCESS_AGENT".
5796
5797 2017-06-28  Pedro Alves  <palves@redhat.com>
5798
5799         * command.h: Include "common/scoped_restore.h".
5800
5801 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5802
5803         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5804         instead of obstack_grow.
5805
5806 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5807
5808         PR gdb/21337
5809         * symfile.c (reread_symbols): Call objfiles_changed just before
5810         read_symbols.
5811
5812 2017-06-27  Pedro Alves  <palves@redhat.com>
5813
5814         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5815         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5816         (completion_list_add_symbol, completion_list_add_msymbol):
5817         ... these new functions.
5818         (add_symtab_completions)
5819         (default_make_symbol_completion_list_break_on_1): Adjust.
5820
5821 2017-06-27  Pedro Alves  <palves@redhat.com>
5822
5823         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5824         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5825         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5826         dtor.
5827         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5828         'storage_obstack' field an auto_obstack.  In-class initialize all
5829         non-bitfield fields.  Make minsyms_read bool.
5830         * symfile.c (read_symbols): Adjust.
5831
5832 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5833
5834         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5835         (gdbsim_store_register): Likewise.
5836
5837 2017-06-27  Pedro Alves  <palves@redhat.com>
5838
5839         * c-exp.y (name_obstack): Now an auto_obstack.
5840         (yylex): Use auto_obstack::clear.
5841         (c_parse): Use auto_obstack::clear instead of reinitializing and
5842         freeing the obstack.
5843         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5844         * d-exp.y (name_obstack): Now an auto_obstack.
5845         (yylex): Use auto_obstack::clear.
5846         (d_parse): Use auto_obstack::clear instead of reinitializing and
5847         freeing the obstack.
5848         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5849         auto_obstack.
5850         * dwarf2read.c (create_addrmap_from_index)
5851         (dwarf2_build_psymtabs_hard)
5852         (update_enumeration_type_from_children): Likewise.
5853         * gdb_obstack.h (auto_obstack): New type.
5854         * go-exp.y (name_obstack): Now an auto_obstack.
5855         (build_packaged_name): Use auto_obstack::clear.
5856         (go_parse): Use auto_obstack::clear instead of reinitializing and
5857         freeing the obstack.
5858         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5859         auto_obstack.
5860         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5861         * rust-exp.y (work_obstack): Now an auto_obstack.
5862         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5863         reinitializing and freeing the obstack.
5864         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5865         (host_char_to_target): Use auto_obstack.
5866         * utils.h (make_cleanup_obstack_free): Delete declaration.
5867         * valprint.c (generic_emit_char, generic_printstr): Use
5868         auto_obstack.
5869
5870 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5871
5872         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5873         thread.
5874         (darwin_init_thread_list): Don't update dummy thread.
5875         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5876
5877 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5878
5879         * record-full.c (netorder16): Remove.
5880
5881 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5882
5883         * common/diagnostics.h: Define macros for GCC.
5884         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5885         * common/vec.h: Include diagnostics.h.
5886         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5887         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5888         warning.
5889
5890 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5891
5892         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5893         New macro.
5894         * ada-lex.l: Ignore deprecated register warnings.
5895
5896 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5897
5898         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5899         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5900
5901 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5902
5903         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5904         its own line.
5905
5906 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5907
5908         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5909
5910 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5911
5912         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5913         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5914         (xtensa_register_read_masked): Likewise.
5915
5916 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5917
5918         * common/environ.c (gdb_environ::unset): Update comment.
5919
5920 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5921
5922         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5923         registers.
5924
5925 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5926
5927         * record-full.c (record_full_exec_insn): Use byte_vector.
5928
5929 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5930
5931         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5932         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5933
5934 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5935
5936         * remote.c (cached_reg): Move from here...
5937         * regcache.h (cached_reg): ...to here.
5938         * python/py-unwind.c (struct reg_info): Remove.
5939         (cached_frame_info): Use cached_reg_t.
5940         (pyuw_prev_register): Likewise.
5941         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5942         (pyuw_dealloc_cache): Free all registers.
5943
5944 2017-06-22  Pedro Alves  <palves@redhat.com>
5945             Simon Marchi  <simon.marchi@ericsson.com>
5946
5947         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5948         warning.
5949         * common/diagnostics.h: New file.
5950
5951 2017-06-22  Pedro Alves  <palves@redhat.com>
5952
5953         * common/agent.h: Add include guards.
5954
5955 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5956
5957         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5958         talk about addressable units instead of bytes.
5959
5960 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5961
5962         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5963         of '::const_iterator'.
5964
5965 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5966
5967         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5968         'unittests/environ-selftests.c'.
5969         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5970         * charset.c (find_charset_names): Declare object 'iconv_env'.
5971         Update code to use 'iconv_env' object.  Remove call to
5972         'free_environ'.
5973         * common/environ.c: Include <utility>.
5974         (make_environ): Delete function.
5975         (free_environ): Delete function.
5976         (gdb_environ::clear): New function.
5977         (gdb_environ::operator=): New function.
5978         (gdb_environ::get): Likewise.
5979         (environ_vector): Delete function.
5980         (set_in_environ): Delete function.
5981         (gdb_environ::set): New function.
5982         (unset_in_environ): Delete function.
5983         (gdb_environ::unset): New function.
5984         (gdb_environ::envp): Likewise.
5985         * common/environ.h: Include <vector>.
5986         (struct gdb_environ): Delete; transform into...
5987         (class gdb_environ): ... this class.
5988         (free_environ): Delete prototype.
5989         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5990         environ_vector): Likewise.
5991         * infcmd.c (run_command_1): Update code to call
5992         'envp' from 'gdb_environ' class.
5993         (environment_info): Update code to call methods from 'gdb_environ'
5994         class.
5995         (unset_environment_command): Likewise.
5996         (path_info): Likewise.
5997         (path_command): Likewise.
5998         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5999         (inferior::inferior): Initialize 'environment' using the host's
6000         information.
6001         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6002         Include "environ.h".
6003         (class inferior) <environment>: Change type from 'struct
6004         gdb_environ' to 'gdb_environ'.
6005         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6006         methods from 'gdb_environ' class.
6007         * solib.c (solib_find_1): Likewise
6008         * unittests/environ-selftests.c: New file.
6009
6010 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6011
6012         * features/i386/i386-linux.xml: Exchange the order of including
6013         32bit-linux.xml and 32bit-sse.xml.
6014         * features/i386/i386-linux.c: Regenerated.
6015
6016 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6017
6018         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6019         Delete copy ctor and assignment operator.
6020         (tdesc_type): Likewise.
6021         (tdesc_feature): Likewise.
6022         (tdesc_free_reg): Remove.
6023         (tdesc_create_reg): Use new.
6024         (tdesc_free_type): Remove.
6025         (tdesc_create_vector): Use new.
6026         (tdesc_create_union): Likewise.
6027         (tdesc_create_flags): Likewise.
6028         (tdesc_create_enum): Likewise.
6029         (tdesc_free_feature): Delete.
6030         (free_target_description): Use delete.
6031
6032 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6033
6034         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6035         registers.
6036
6037 2017-06-19  Pedro Alves  <palves@redhat.com>
6038
6039         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6040         after gdb::unlinker.
6041
6042 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6043
6044         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6045         gdb_environ to access an environment variable.
6046
6047 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6048
6049         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6050         gdb_byte*.
6051
6052 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6053
6054         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6055
6056 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6057
6058         * configure: Re-generate.
6059         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6060
6061 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6062
6063         * configure: Re-generate.
6064         * warning.m4: Pass -Werror to compiler when checking for
6065         supported warning flags.
6066
6067 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6068
6069         * Makefile.in (COMPILE.pre): Add "-x c++".
6070
6071 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6072             Pedro Alves  <palves@redhat.com>
6073             Yao Qi  <yao.qi@linaro.org>
6074
6075         * defs.h (RequireLongest): New.
6076         (extract_integer): Declare function template.
6077         (extract_signed_integer): Remove the declaration, but define it
6078         static inline.
6079         (extract_unsigned_integer): Likewise.
6080         (store_integer): Declare function template.
6081         (store_signed_integer): Remove the declaration, but define it
6082         static inline.
6083         (store_unsigned_integer): Likewise.
6084         * findvar.c (extract_integer): New function template.
6085         (extract_signed_integer): Remove.
6086         (extract_unsigned_integer): Remove.
6087         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6088         instantiations.
6089         (store_integer): New function template.
6090         (store_signed_integer): Remove.
6091         (store_unsigned_integer): Remove.
6092         (store_integer): Explicit instantiations.
6093         * regcache.c (regcache_raw_read_signed): Update.
6094         (regcache::raw_read): New function.
6095         (regcache::raw_read_signed): Remove.
6096         (regcache::raw_read_unsigned): Remove.
6097         (regcache_raw_read_unsigned): Update.
6098         (regcache_raw_write_unsigned): Update.
6099         (regcache::raw_write_signed): Remove.
6100         (regcache::raw_write): New function.
6101         (regcache_cooked_read_signed): Update.
6102         (regcache::raw_write_unsigned): Remove.
6103         (regcache::cooked_read_signed): Remove.
6104         (regcache_cooked_read_unsigned): Update.
6105         (regcache::cooked_read_unsigned): Remove.
6106         (regcache_cooked_write_signed): Update.
6107         (regcache_cooked_write_unsigned): Update.
6108         * regcache.h (regcache) <raw_read_signed>: Remove.
6109         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6110         <raw_read, raw_write>: New.
6111         <cooked_read_signed, cooked_write_signed>: Remove.
6112         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6113         <cooked_read, cooked_write>: New.
6114         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6115         (sh64_pseudo_register_write): Update.
6116
6117 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6118
6119         * arc-tdep.c (arc_disassembler_options): New variable.
6120         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6121         of default_print_insn.
6122         (arc_delayed_print_insn): Set info->section when needed,
6123         use default_print_insn to retrieve a disassembler.
6124
6125 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6126
6127         PR gdb/21574
6128         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6129         to mention $SHELL and startup-with-shell.
6130
6131 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6132
6133         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6134
6135 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6136
6137         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6138         default_print_insn instead of print_insn_aarch64.
6139         * arm-tdep.c (gdb_print_insn_arm): Call
6140         default_print_insn instead of print_insn_big_arm
6141         and print_insn_little_arm.
6142         * i386-tdep.c (i386_print_insn): Call default_print_insn
6143         instead of print_insn_i386.
6144         * ia64-tdep.c (ia64_print_insn): Call
6145         default_print_insn instead of print_insn_ia64.
6146         * mips-tdep.c (gdb_print_insn_mips): Call
6147         default_print_insn instead of print_insn_big_mips
6148         and print_insn_little_mips.
6149         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6150         instead of print_insn_spu.
6151
6152 2017-06-14  Pedro Alves  <palves@redhat.com>
6153
6154         * ada-lang.c: Include "common/byte-vector.h".
6155         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6156         * charset.c (wchar_iterator::iterate): Resize the vector instead
6157         of reserving it.
6158         * common/byte-vector.h: Include "common/def-vector.h".
6159         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6160         * cli/cli-dump.c: Include "common/byte-vector.h".
6161         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6162         * common/byte-vector.h: New file.
6163         * common/def-vector.h: New file.
6164         * common/default-init-alloc.h: New file.
6165         * dwarf2loc.c: Include "common/byte-vector.h".
6166         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6167         instead of reserving it.
6168         * dwarf2read.c: Include "common/byte-vector.h".
6169         (data_buf::m_vec): Now a gdb::byte_vector.
6170         * gdb_regex.c: Include "common/def-vector.h".
6171         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6172         * mi/mi-main.c: Include "common/byte-vector.h".
6173         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6174         * printcmd.c: Include "common/byte-vector.h".
6175         (print_scalar_formatted): Use gdb::byte_vector.
6176         * valprint.c: Include "common/byte-vector.h".
6177         (maybe_negate_by_bytes, print_decimal_chars): Use
6178         gdb::byte_vector.
6179
6180 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6181
6182         * darwin-nat.c: Include "nat/fork-inferior.h".
6183
6184 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6185
6186         * configure.nat: Factor out Darwin bits that are not
6187         architecture-specific.  Add fork-inferior.o.
6188
6189 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6190
6191         * configure.nat: Factor out AIX bits that are not
6192         architecture-specific.  Add fork-inferior.o.
6193
6194 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6195
6196         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6197         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6198         wrappers that just call rw_pieced_value.
6199
6200 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6201
6202         * dwarf2loc.c (write_pieced_value): When writing the data for a
6203         memory piece, use write_memory_with_notification instead of
6204         write_memory.
6205
6206 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6207
6208         * valops.c (read_value_memory): Change embedded_offset to
6209         represent a bit offset instead of a byte offset.
6210         * value.h (read_value_memory): Adjust comment.
6211
6212 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6213
6214         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6215         dest_offset_bits and source_offset_bits.
6216         (write_pieced_value): Likewise.
6217
6218 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6219
6220         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6221         given by DW_OP_bit_piece.
6222         (write_pieced_value): Likewise.
6223
6224 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6225
6226         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6227         some other preparations to the places where sufficient information
6228         is available.
6229         (write_pieced_value): Likewise.
6230
6231 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6232
6233         * dwarf2loc.c (bits_to_bytes): New function.
6234         (read_pieced_value): Fix offset calculations for register pieces
6235         on big-endian targets.
6236         (write_pieced_value): Likewise.
6237
6238 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6239
6240         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6241         (write_pieced_value): Likewise.
6242
6243 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6244
6245         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6246         transfer the source value's least significant bits, instead of its
6247         lowest-addressed ones.  Rename type_len to max_offset.
6248         (read_pieced_value): Mirror above changes to write_pieced_value as
6249         applicable.
6250
6251 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6252
6253         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6254         truncate full bytes from dest_offset_bits before using it as an
6255         offset into the buffer.
6256
6257 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6258
6259         * dwarf2loc.c (write_pieced_value): Include transfer size in
6260         byte-wise check.
6261
6262 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6263
6264         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6265         calculation of this_size.
6266
6267 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6268
6269         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6270         when targeting a bit-field.
6271         (write_pieced_value): Likewise.
6272
6273 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6274
6275         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6276         (allocate_piece_closure): Drop addr_size parameter.
6277         (dwarf2_evaluate_loc_desc_full): Adjust call to
6278         allocate_piece_closure.
6279
6280 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6281
6282         PR gdb/21226
6283         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6284         the LSB end, independent of endianness.
6285
6286 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6287
6288         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6289         size capping.
6290
6291 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6292
6293         * mips-linux-nat.c: Move include features/mips*-linux.c to
6294         mips-linux-tdep.c.
6295         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6296         to mips-linux-tdep.c.
6297         * mips-linux-tdep.c: Include features/mips*-linux.c
6298         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6299         functions.
6300         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6301         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6302         (tdesc_mips64_dsp_linux): Declare.
6303
6304 2017-06-12  Tom Tromey  <tom@tromey.com>
6305
6306         * valprint.h (val_print_type_code_int): Remove.
6307         * valprint.c (generic_val_print_int): Always call
6308         val_print_scalar_formatted.
6309         (val_print_type_code_int): Remove.
6310         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6311         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6312         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6313         * ada-valprint.c (ada_val_print_num): Use
6314         val_print_scalar_formatted.
6315
6316 2017-06-12  Tom Tromey  <tom@tromey.com>
6317
6318         * printcmd.c (print_scalar_formatted): Unify the two switches.
6319         Don't convert scalars to LONGEST.
6320
6321 2017-06-12  Tom Tromey  <tom@tromey.com>
6322
6323         PR exp/16225:
6324         * valprint.h (print_decimal_chars): Update.
6325         * valprint.c (maybe_negate_by_bytes): New function.
6326         (print_decimal_chars): Add "is_signed" argument.
6327         * printcmd.c (print_scalar_formatted): Update.
6328
6329 2017-06-12  Tom Tromey  <tom@tromey.com>
6330
6331         PR exp/16225:
6332         * valprint.h (print_binary_chars, print_hex_chars): Update.
6333         * valprint.c (val_print_type_code_int): Update.
6334         (print_binary_chars): Add "zero_pad" argument.
6335         (emit_octal_digit): New function.
6336         (print_octal_chars): Don't zero-pad.
6337         (print_decimal_chars): Likewise.
6338         (print_hex_chars): Add "zero_pad" argument.
6339         * sh64-tdep.c (sh64_do_fp_register): Update.
6340         * regcache.c (regcache::dump): Update.
6341         * printcmd.c (print_scalar_formatted): Update.
6342         * infcmd.c (default_print_one_register_info): Update.
6343
6344 2017-06-12  Pedro Alves  <palves@redhat.com>
6345             Alan Hayward  <alan.hayward@arm.com>
6346
6347         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6348         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6349         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6350         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6351         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6352
6353 2017-06-12  Pedro Alves  <palves@redhat.com>
6354
6355         * dwarf2read.c (mapped_symtab::data): Now a vector of
6356         symtab_index_entry instead of vector of
6357         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6358         whether an element's name is NULL instead of checking whether the
6359         element itself is NULL.
6360         (find_slot): Change return type.  Adjust.
6361         (hash_expand, , add_index_entry, uniquify_cu_indices)
6362         (write_hash_table): Adjust.
6363
6364 2017-06-12  Pedro Alves  <palves@redhat.com>
6365
6366         * dwarf2read.c (recursively_count_psymbols): New function.
6367         (write_psymtabs_to_index): Call it to compute number of psyms and
6368         pass estimate size of psyms_seen to unordered_set's ctor.
6369
6370 2017-06-12  Pedro Alves  <palves@redhat.com>
6371
6372         * dwarf2read.c (write_hash_table): Check if key already exists
6373         before emplacing.
6374
6375 2017-06-12  Pedro Alves  <palves@redhat.com>
6376
6377         * dwarf2read.c (data_buf::append_space): Rename to...
6378         (data_buf::grow): ... this, and make private.  Adjust all callers.
6379         (data_buf::append_uint): New method.
6380         (add_address_entry, write_one_signatured_type)
6381         (write_psymtabs_to_index): Use it.
6382
6383 2017-06-12  Pedro Alves  <palves@redhat.com>
6384
6385         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6386         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6387         (data_buf::file_write): Call ::fwrite directly.
6388
6389 2017-06-12  Pedro Alves  <palves@redhat.com>
6390
6391         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6392         std::vector::erase.
6393
6394 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6395
6396         Code cleanup: C++ify .gdb_index producer.
6397         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6398         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6399         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6400         (create_strtab, add_string): Remove.
6401         (file_write, data_buf): New.
6402         (struct symtab_index_entry): Use std::vector for cu_indices.
6403         (struct mapped_symtab): Use std::vector for data.
6404         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6405         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6406         Remove.
6407         (find_slot): Change return type.  Update it to the new data structures.
6408         (hash_expand, add_index_entry): Update it to the new data structures.
6409         (offset_type_compare): Remove.
6410         (uniquify_cu_indices): Update it to the new data structures.
6411         (c_str_view, c_str_view_hasher, vector_hasher): New.
6412         (add_indices_to_cpool): Remove.
6413         (write_hash_table): Update it to the new data structures.
6414         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6415         (eq_psymtab_cu_index): Remove.
6416         (psym_index_map): New typedef.
6417         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6418         reference and std::unordered_map for cu_index_htab.
6419         (add_address_entry, add_address_entry_worker, write_address_map)
6420         (write_psymbols): Update it to the new data structures.
6421         (write_obstack): Remove.
6422         (struct signatured_type_index_data): Change types_list to a data_buf
6423         reference and psyms_seen to a std::unordered_set reference.
6424         (write_one_signatured_type, recursively_write_psymbols)
6425         (write_psymtabs_to_index): Update it to the new data structures.
6426
6427 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6428
6429         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6430         separate-debug-file commands.
6431         * symfile.h (separate_debug_file_debug): New global.
6432         * symfile.c (separate_debug_file_debug): New global.
6433         (separate_debug_file_exists, find_separate_debug_file): Add
6434         debug output.
6435         (_initialize_symfile): Add "set debug separate-debug-file"
6436         command.
6437         * build-id.c (build_id_to_debug_bfd,
6438         find_separate_debug_file_by_buildid): Add debug output.
6439
6440 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6441
6442         * gdbarch.sh (displaced_step_free_closure): Remove.
6443         * gdbarch.h, gdbarch.c: Re-generate.
6444         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6445         displaced_step_free_closure.
6446         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6447         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6448         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6449         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6450         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6451         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6452         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6453         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6454         * infrun.c (displaced_step_clear): Call xfree instead of
6455         gdbarch_displaced_step_free_closure.
6456
6457 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6458
6459         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6460         NULL".
6461
6462 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6463
6464         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6465         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6466         (mn10300_push_dummy_call): Likewise.
6467
6468 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6469
6470         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6471
6472 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6473
6474         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6475
6476 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6477
6478         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6479         able to start inferiors using a shell.
6480         (New remote packets): Announce new packet "QStartupWithShell".
6481         * remote.c: Add PACKET_QStartupWithShell.
6482         (extended_remote_create_inferior): Handle new
6483         PACKET_QStartupWithShell.
6484         (remote_protocol_features) <QStartupWithShell>: New entry for
6485         PACKET_QStartupWithShell.
6486         (_initialize_remote): Call "add_packet_config_cmd" for
6487         QStartupShell.
6488
6489 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6490             Pedro Alves  <palves@redhat.com>
6491
6492         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6493         and "nat/fork-inferior.h".
6494         * common/common-inferior.h: New file, with contents from
6495         "gdb/inferior.h".
6496         * commom/common-utils.c: Include "common-utils.h".
6497         (stringify_argv): New function.
6498         * common/common-utils.h (stringify_argv): New prototype.
6499         * configure.nat: Add "fork-inferior.o" as a dependency for
6500         "*linux*", "fbsd*" and "nbsd*" hosts.
6501         * corefile.c (get_exec_file): Update comment.
6502         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6503         instead of "startup_inferior".
6504         (darwin_create_inferior): Call "add_thread_silent" after
6505         "fork_inferior".
6506         * fork-child.c: Cleanup unnecessary includes.
6507         (SHELL_FILE): Move to "common/common-fork-child.c".
6508         (environ): Likewise.
6509         (exec_wrapper): Initialize.
6510         (get_exec_wrapper): New function.
6511         (breakup_args): Move to "common/common-fork-child.c"; rename to
6512         "breakup_args_for_exec".
6513         (escape_bang_in_quoted_argument): Move to
6514         "common/common-fork-child.c".
6515         (saved_ui): New variable.
6516         (prefork_hook): New function.
6517         (postfork_hook): Likewise.
6518         (postfork_child_hook): Likewise.
6519         (gdb_startup_inferior): Likewise.
6520         (fork_inferior): Move to "common/common-fork-child.c".  Update
6521         function to support gdbserver.
6522         (startup_inferior): Likewise.
6523         * gdbcore.h (get_exec_file): Remove declaration.
6524         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6525         instead of "startup_inferior".  Call "add_thread_silent" after
6526         "fork_inferior".
6527         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6528         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6529         instead of "startup_inferior".  Call "add_thread_silent" after
6530         "fork_inferior".
6531         * inferior.h: Include "common-inferior.h".
6532         (trace_start_error): Move to "common/common-utils.h".
6533         (trace_start_error_with_name): Likewise.
6534         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6535         (startup_inferior): Likewise.
6536         (gdb_startup_inferior): New prototype.
6537         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6538         * nat/fork-inferior.h: New file.
6539         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6540         instead of "startup_inferior".  Call "add_thread_silent" after
6541         "fork_inferior".
6542         * target.h (target_terminal_init): Move prototype to
6543         "target/target.h".
6544         (target_terminal_inferior): Likewise.
6545         (target_terminal_ours): Likewise.
6546         * target/target.h (target_terminal_init): New prototype, moved
6547         from "target.h".
6548         (target_terminal_inferior): Likewise.
6549         (target_terminal_ours): Likewise.
6550         * utils.c (gdb_flush_out_err): New function.
6551
6552 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6553
6554         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6555         * common/common-gdbthread.h: New file, with parts from
6556         "gdb/gdbthread.h".
6557         * gdbthread.h: Include "common-gdbthread.h".
6558         (switch_to_thread): Moved to "common/common-gdbthread.h".
6559
6560 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6561
6562         * Makefile.in (SFILES): Add "common/job-control.c".
6563         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6564         (COMMON_OBS): Add "job-control.o".
6565         * common/job-control.c: New file, with contents from
6566         "gdb/inflow.c".
6567         * common/job-control.h: New file, with contents from "terminal.h".
6568         * fork-child.c: Include "job-control.h".
6569         * inflow.c: Include "job-control.h".
6570         (gdb_setpgid): Move to "common/common-inflow.c".
6571         (_initialize_inflow): Move setting of "job_control" to
6572         "handle_job_control".
6573         * terminal.h (job_control): Moved to "common/common-terminal.h".
6574         (gdb_setpgid): Likewise.
6575         * top.c: Include "job_control.h".
6576         * utils.c: Likewise.
6577         (job_control): Moved to "job-control.c".
6578
6579 2017-06-07  Pedro Alves  <palves@redhat.com>
6580
6581         * Makefile.in (SFILES): Add gdb_regex.c.
6582         (COMMON_OBS): Add gdb_regex.o.
6583         * ada-lang.c (ada_add_standard_exceptions)
6584         (ada_add_exceptions_from_frame, name_matches_regex)
6585         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6586         parameter type to compiled_regex.  Adjust.
6587         (ada_exceptions_list): Use compiled_regex.
6588         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6589         std::unique_ptr<compiled_regex>.
6590         (exception_catchpoint::~exception_catchpoint): Remove regfree
6591         call.
6592         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6593         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6594         * breakpoint.c (solib_catchpoint::compiled): Now a
6595         std::unique_ptr<compiled_regex>.
6596         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6597         (check_status_catch_solib): Adjust to use compiled_regex.
6598         (add_solib_catchpoint): Adjust to use compiled_regex.
6599         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6600         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6601         compiled_regex reference.  Adjust to use it.
6602         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6603         declaration.  Include "gdb_regex.h".
6604         (apropos_cmd): Change regex parameter to compiled_regex reference.
6605         * gdb_regex.c: New file.
6606         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6607         declarations.
6608         (class compiled_regex): New.
6609         * linux-tdep.c: Include "common/gdb_optional.h".
6610         (struct mapping_regexes): New, factored out from
6611         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6612         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6613         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6614         * probe.c: Include "common/gdb_optional.h".
6615         (collect_probes): Use compiled_regex and gdb::optional and remove
6616         cleanups.
6617         * skip.c: Include "common/gdb_optional.h".
6618         (skiplist_entry::compiled_function_regexp): Now a
6619         gdb::optional<compiled_regex>.
6620         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6621         (free_skiplist_entry): Remove regfree call.
6622         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6623         compiled_regex and gdb::optional.
6624         * symtab.c: Include "common/gdb_optional.h".
6625         (search_symbols): Use compiled_regex and gdb::optional.
6626         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6627         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6628         to gdb_regex.c.
6629
6630 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6631
6632         * regcache.c (regcache::save): Avoid buffer use.
6633         (regcache::dump): Likewise.
6634
6635 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6636
6637         * sh-tdep.c (sh_pseudo_register_read): Remove
6638         MAX_REGISTER_SIZE.
6639         (sh_pseudo_register_write): Likewise.
6640         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6641         (sh64_pseudo_register_write): Likewise
6642
6643 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6644
6645         * aarch64-tdep.c (aarch64_store_return_value): Use
6646         V_REGISTER_SIZE.
6647         (aarch64_pseudo_read_value): Likewise.
6648         (aarch64_pseudo_write): Likewise.
6649
6650 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6651
6652         * regformats/regdef.h (set_register_cache): Remove the
6653         declaration.
6654
6655 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6656
6657         * frame.c (frame_unwind_register_signed): Use
6658         frame_unwind_register_value.
6659
6660 2017-06-06  Pedro Alves  <palves@redhat.com>
6661
6662         PR breakpoints/21553
6663         * breakpoint.c (create_breakpoints_sal_default)
6664         (init_breakpoint_sal, create_breakpoint_sal): Use
6665         gdb::unique_xmalloc_ptr for string parameters.
6666         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6667         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6668         (base_breakpoint_create_breakpoints_sal)
6669         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6670         (strace_marker_create_breakpoints_sal)
6671         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6672         string parameters.
6673         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6674         gdb::unique_xmalloc_ptr for string parameters.
6675         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6676         parameters.
6677
6678 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6679
6680         * alpha-tdep.c (alpha_register_to_value): Use
6681         get_frame_register_value.
6682         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6683
6684 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6685
6686         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6687         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6688         (ia64_value_to_register): Likewise.
6689         (ia64_extract_return_value): Likewise.
6690         (ia64_store_return_value): Likewise.
6691         (ia64_push_dummy_call): Likewise.
6692
6693 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6694
6695         GDB 8.0 released.
6696
6697 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6698
6699         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6700
6701 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6702
6703         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6704         parameter.
6705         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6706
6707 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6708
6709         * event-loop.c (poll_timers): Unallocate timer using delete
6710         instead of xfree.
6711
6712 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6713
6714         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6715         (struct breakpoint) <~breakpoint>: New.
6716         (struct watchpoint): Inherit from breakpoint.
6717         <~watchpoint>: New.
6718         <base>: Remove.
6719         (struct tracepoint): Inherit from breakpoint.
6720         <base>: Remove.
6721         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6722         (struct longjmp_breakpoint): Inherit from breakpoint.
6723         <~longjmp_breakpoint>: New.
6724         <base>: Remove.
6725         (new_breakpoint_from_type): Remove casts.
6726         (watchpoint_in_thread_scope): Remove reference to base field.
6727         (watchpoint_del_at_next_stop): Likewise.
6728         (update_watchpoint): Likewise.
6729         (watchpoint_check): Likewise.
6730         (bpstat_check_watchpoint): Likewise.
6731         (set_longjmp_breakpoint): Likewise.
6732         (struct fork_catchpoint): Inherit from breakpoint.
6733         <base>: Remove.
6734         (struct solib_catchpoint): Inherit from breakpoint.
6735         <~solib_catchpoint>: New.
6736         <base>: Remove.
6737         (dtor_catch_solib): Change to ...
6738         (solib_catchpoint::~solib_catchpoint): ... this.
6739         (breakpoint_hit_catch_solib): Remove reference to base field.
6740         (add_solib_catchpoint): Likewise.
6741         (create_fork_vfork_event_catchpoint): Likewise.
6742         (struct exec_catchpoint): Inherit from breakpoint.
6743         <~exec_catchpoint>: New.
6744         <base>: Remove.
6745         (dtor_catch_exec): Change to ...
6746         (exec_catchpoint::~exec_catchpoint): ... this.
6747         (dtor_watchpoint): Change to ...
6748         (watchpoint::~watchpoint): ... this.
6749         (watch_command_1): Remove reference to base field.
6750         (catch_exec_command_1): Likewise.
6751         (base_breakpoint_dtor): Change to ...
6752         (breakpoint::~breakpoint): ... this.
6753         (base_breakpoint_ops): Remove dtor field value.
6754         (longjmp_bkpt_dtor): Change to ...
6755         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6756         (strace_marker_create_breakpoints_sal): Remove reference to base
6757         field.
6758         (delete_breakpoint): Don't manually call breakpoint destructor.
6759         (create_tracepoint_from_upload): Remove reference to base field.
6760         (trace_pass_set_count): Likewise.
6761         (initialize_breakpoint_ops): Don't initialize
6762         momentary_breakpoint_ops, don't set dtors.
6763         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6764         <~ada_catchpoint>: New.
6765         <base>: Remove.
6766         (create_excep_cond_exprs): Remove reference to base field.
6767         (dtor_exception): Change to ...
6768         (ada_catchpoint::~ada_catchpoint): ... this.
6769         (dtor_catch_exception): Remove.
6770         (dtor_catch_exception_unhandled): Remove.
6771         (dtor_catch_assert): Remove.
6772         (create_ada_exception_catchpoint): Remove reference to base
6773         field.
6774         (initialize_ada_catchpoint_ops): Don't set dtors.
6775         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6776         breakpoint.
6777         <~signal_catchpoint>: New.
6778         <base>: Remove.
6779         (signal_catchpoint_dtor): Change to ...
6780         (signal_catchpoint::~signal_catchpoint): ... this.
6781         (create_signal_catchpoint): Remove reference to base field.
6782         (initialize_signal_catchpoint_ops): Don't set dtor.
6783         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6784         from breakpoint.
6785         <~syscall_catchpoint>: New.
6786         <base>: Remove.
6787         (dtor_catch_syscall): Change to ...
6788         (syscall_catchpoint::~syscall_catchpoint): ... this.
6789         (create_syscall_event_catchpoint): Remove reference to base
6790         field.
6791         (initialize_syscall_catchpoint_ops): Don't set dtor.
6792         * break-catch-throw.c (struct exception_catchpoint): Inherit
6793         from breakpoint.
6794         <~exception_catchpoint>: New.
6795         <base>: Remove.
6796         (dtor_exception_catchpoint): Change to ...
6797         (exception_catchpoint::~exception_catchpoint): ... this.
6798         (handle_gnu_v3_exceptions): Remove reference to base field.
6799         (initialize_throw_catchpoint_ops): Don't set dtor.
6800         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6801         field.
6802         * remote.c (remote_get_tracepoint_status): Likewise.
6803         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6804         * tracefile.c (tracefile_fetch_registers): Likewise.
6805         * tracepoint.c (actions_command): Likewise.
6806         (validate_actionline): Likewise.
6807         (tfind_1): Likewise.
6808         (get_traceframe_location): Likewise.
6809         (find_matching_tracepoint_location): Likewise.
6810         (parse_tracepoint_status): Likewise.
6811         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6812
6813 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6814
6815         * breakpoint.c (struct longjmp_breakpoint): New struct.
6816         (is_tracepoint_type): Change return type to bool.
6817         (is_longjmp_type): New function.
6818         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6819         (set_raw_breakpoint_without_location): Use
6820         new_breakpoint_from_type.
6821         (set_raw_breakpoint): Likewise.
6822
6823 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6824
6825         * breakpoint.c (new_breakpoint_from_type): New function.
6826         (create_breakpoint_sal): Use new_breakpoint_from_type and
6827         unique_ptr.
6828         (create_breakpoint): Likewise.
6829
6830 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6831
6832         * memattr.c (mem_info_command): Rename to ...
6833         (info_mem_command): ... this.
6834         (mem_enable_command): Rename to ...
6835         (enable_mem_command): ... this.
6836         (mem_disable_command): Rename to ...
6837         (disable_mem_command): ... this.
6838         (mem_delete_command): Rename to ...
6839         (delete_mem_command): ... this.
6840         (_initialize_mem): Adjust function names.
6841
6842 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6843
6844         * btrace.c (handle_pt_insn_events): New.
6845         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6846         STATUS.  Split into this and ...
6847         (handle_pt_insn_event_flags): ... this.
6848
6849 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6850
6851         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6852         and struct pt_insn.resynced.
6853         * configure: Regenerated.
6854         * config.in: Regenerated.
6855
6856 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6857
6858         * btrace.c (ftrace_find_call_by_number): New function.
6859         (ftrace_new_function): Store objects, not pointers.
6860         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6861         ftrace_new_gap, ftrace_update_function,
6862         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6863         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6864         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6865         btrace_ends_with_single_insn, btrace_call_get): Account for
6866         btrace_thread_info::functions now storing objects.
6867         * btrace.h (struct btrace_thread_info): Add constructor.
6868         (struct btrace_thread_info) <functions>: Make std::vector.
6869         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6870         Initialize with default values.
6871         * record-btrace.c (record_btrace_frame_sniffer): Account for
6872         btrace_thread_info::functions now storing objects.
6873
6874 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6875
6876         * btrace.c: Remove typedef bfun_s.
6877         (ftrace_new_gap): Directly add gaps to the list of gaps.
6878         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6879         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6880         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6881         instead of gdb VEC.
6882
6883 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6884
6885         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6886         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6887         with btrace_thread_info::next_segment and
6888         btrace_thread_info::prev_segment.
6889         * btrace.h: Remove struct btrace_func_link.
6890         (struct btrace_function): Replace pair of function segment pointers
6891         with pair of indices.
6892         * python/py-record-btrace.c (btpy_call_prev_sibling,
6893         btpy_call_next_sibling): Replace references to
6894         btrace_thread_info::segment with btrace_thread_info::next_segment and
6895         btrace_thread_info::prev_segment.
6896         * record-btrace.c (record_btrace_frame_this_id): Use
6897         btrace_find_call_by_number.
6898
6899 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6900
6901         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6902         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6903         btrace_insn_next, btrace_insn_prev): Remove references to
6904         btrace_thread_info::flow.
6905         * btrace.h (struct btrace_function): Remove FLOW.
6906
6907 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6908
6909         * btrace.c (ftrace_find_call_by_number): New function.
6910         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6911         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6912         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6913         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6914         index.
6915         * btrace.h (struct btrace_function): Turn UP into an index.
6916         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6917         as an index.
6918         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6919         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6920         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6921
6922 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6923
6924         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6925         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6926         ftrace_update_function, ftrace_compute_global_level_offset,
6927         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6928         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6929         btrace_insn_end, btrace_is_empty): Remove references to
6930         btrace_thread_info::begin and btrace_thread_info::end.
6931         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6932         (struct btrace_thread_info) <functions>: Adjust comment.
6933         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6934         btrace_thread_info::begin.
6935
6936 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6937
6938         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6939         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6940         ftrace_update_function): Remove arguments that implicitly were always
6941         BTINFO->END.
6942         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6943         Don't pass BTINFO->END.
6944
6945 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6946
6947         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6948         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6949         btrace_find_insn_by_number): Replace function segment pointer with
6950         index.
6951         (btrace_insn_cmp): Simplify.
6952         * btrace.h: (struct btrace_insn_iterator) Rename index to
6953         insn_index.  Replace function segment pointer with index into function
6954         segment vector.
6955         * record-btrace.c (record_btrace_call_history): Replace function
6956         segment pointer use with index.
6957         (record_btrace_frame_sniffer): Retrieve function call segment through
6958         vector.
6959         (record_btrace_set_replay): Remove defunc't safety check.
6960
6961 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6962
6963         * btrace.c (btrace_ends_with_single_insn): New function.
6964         (btrace_call_get, btrace_call_number, btrace_call_begin,
6965         btrace_call_end, btrace_call_next, btrace_call_prev,
6966         btrace_find_call_by_number): Use index into call segment vector
6967         instead of pointer.
6968         (btrace_call_cmp): Simplify.
6969         * btrace.h (struct btrace_call_iterator): Replace function call segment
6970         pointer with index into vector.
6971         * record-btrace.c (record_btrace_call_history): Use index instead of
6972         pointer.
6973
6974 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6975
6976         * btrace.c (btrace_insn_begin, btrace_insn_end,
6977         btrace_find_insn_by_number): Add btinfo to iterator.
6978         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6979
6980 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6981
6982         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6983         and save pointers directly.
6984         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6985         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6986         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6987         changed signature of functions.
6988         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6989         (btrace_fetch): Remove code that adds btrace_function pointers to
6990         vector of btrace_functions.
6991         (btrace_clear): Simplify freeing vector of btrace_functions.
6992
6993 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6994
6995         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6996         Replace VEC_* with std::vector functions.
6997         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6998         (struct btrace_thread_info)<functions>: Change type to std::vector.
6999
7000 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7001
7002         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7003         "Removed targets and native configurations" up.  Merge duplicate
7004         "New commands" sub-sections.  Add "New options" sub-sections.
7005
7006 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7007
7008         * defs.h (copy_integer_to_size): New declaration.
7009         * findvar.c (copy_integer_to_size): New function.
7010         (do_cint_test): New selftest function.
7011         (copy_integer_to_size_test): Likewise.
7012         (_initialize_findvar): Likewise.
7013         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7014         (mips_fbsd_collect_reg): Use raw_collect_integer.
7015         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7016         (mips64_fill_gregset): Use raw_collect_integer
7017         (mips64_fill_fpregset): Use raw_supply_integer.
7018         * regcache.c (regcache::raw_supply_integer): New function.
7019         (regcache::raw_collect_integer): Likewise.
7020         * regcache.h: (regcache::raw_supply_integer): New declaration.
7021         (regcache::raw_collect_integer): Likewise.
7022
7023 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7024
7025         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7026         (COMMON_OBS): Add gdbarch-selftests.o.
7027         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7028         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7029         * gdbarch-selftests.c: New file.
7030         * regcache.h (regcache) <~regcache>: Mark it virtual if
7031         GDB_SELF_TEST.
7032         <raw_write>: Likewise.
7033
7034 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7035
7036         * regcache.c (current_regcache): Change it to
7037         regcache::current_regcache.
7038         (regcache_observer_target_changed): Update.
7039         (regcache_thread_ptid_changed): Make it a regcache static
7040         method.
7041         (regcache_thread_ptid_changed): Update.
7042         (class regcache_access): New.
7043         (current_regcache_test): Update.
7044         (_initialize_regcache): Update.
7045         * regcache.h: Include forward_list.
7046         (regcache): Declare regcache_thread_ptid_changed and declare
7047         registers_changed_ptid as friend.
7048
7049 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7050
7051         * i387-tdep.c (i387_register_to_value): Use register_size
7052         instead of TYPE_LENGTH.
7053         * m68k-tdep.c (m68k_register_to_value): Likewise.
7054
7055 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7056
7057         * i387-tdep.c (i387_convert_register_p): Return false if type
7058         code isn't TYPE_CODE_FLT.
7059
7060 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7061
7062         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7063         length is 4.
7064         (alpha_register_to_value): Remove type length check.
7065         (alpha_value_to_register): Likewise.
7066
7067 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7068
7069         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7070         TYPE_CODE_FLT.
7071
7072 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7073
7074         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7075         TYPE_CODE_FLT or not.
7076
7077 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7078
7079         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7080         * avr-tdep.c (avr_gdbarch_init): Likewise.
7081         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7082         * cris-tdep.c (cris_gdbarch_init): Likewise.
7083         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7084         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7085         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7086         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7087         * mep-tdep.c (mep_gdbarch_init): Likewise.
7088         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7089         * mips-tdep.c (mips_gdbarch_init): Likewise.
7090         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7091         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7092         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7093         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7094         * v850-tdep.c (v850_gdbarch_init): Likewise.
7095
7096 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7097
7098         * selftest-arch.c (tests_with_arch): Call registers_changed
7099         and reinit_frame_cache.
7100         * selftest.c (run_self_tests): Likewise.
7101
7102 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7103
7104         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7105         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7106
7107 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7108
7109         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7110         set_gdbarch_print_insn.
7111
7112 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7113
7114         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7115         set_gdbarch_print_insn.
7116
7117 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7118
7119         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7120         set_gdbarch_print_insn.
7121         * arc-tdep.c (arc_gdbarch_init): Likewise.
7122         * arch-utils.c: include dis-asm.h.
7123         (default_print_insn): New function.
7124         * arch-utils.h (default_print_insn): Declare.
7125         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7126         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7127         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7128         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7129         * frv-tdep.c (frv_gdbarch_init): Likewise.
7130         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7131         * gdbarch.sh (print_insn): Use default_print_insn.
7132         * gdbarch.c: Regenerated.
7133         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7134         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7135         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7136         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7137         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7138         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7139         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7140         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7141         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7142         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7143         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7144         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7145         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7146         * mt-tdep.c (mt_gdbarch_init): Likewise.
7147         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7148         * nios2-tdep.c (nios2_print_insn): Remove.
7149         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7150         * rx-tdep.c (rx_gdbarch_init): Likewise.
7151         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7152         * score-tdep.c (score_print_insn): Remove.
7153         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7154         * sh-tdep.c (sh_gdbarch_init): Likewise.
7155         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7156         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7157         * tic6x-tdep.c (tic6x_print_insn): Remove.
7158         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7159         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7160         * v850-tdep.c (v850_gdbarch_init): Likewise.
7161         * vax-tdep.c (vax_gdbarch_init): Likewise.
7162         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7163         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7164
7165 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7166
7167         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7168         (MIPS_FP0_REGNUM): Remove.
7169         (MIPS_FSR_REGNUM): Remove.
7170         (mips_fbsd_supply_fpregs): Use mips_regnum.
7171         (mips_fbsd_supply_gregs): Likewise.
7172         (mips_fbsd_collect_fpregs): Likewise.
7173         (mips_fbsd_collect_gregs): Likewise.
7174
7175 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7176
7177         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7178         (getpfpregs_supplies): New function.
7179         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7180         getfpregs_supplies.
7181         (mips_fbsd_store_inferior_registers): Likewise.
7182
7183 2017-05-22  Pedro Alves <palves@redhat.com>
7184
7185         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7186         maintainer.
7187
7188 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7189
7190         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7191         (store_register): Likewise.
7192         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7193         (get_decimal_float_return_value): Likewise.
7194         (do_ppc_sysv_return_value): Likewise.
7195         (ppc64_sysv_abi_push_integer): Likewise.
7196         (ppc64_sysv_abi_push_freg): Likewise.
7197         (ppc64_sysv_abi_return_value_base): Likewise.
7198         (ppc64_sysv_abi_return_value): Likewise.
7199         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7200         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7201         * rs6000-nat.c: Likewise.
7202         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7203         (rs6000_value_to_register): Likewise.
7204         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7205
7206 2017-05-21  Tom Tromey  <tom@tromey.com>
7207
7208         PR rust/21466:
7209         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7210         arrays as "[T]", not "[T; ]".
7211
7212 2017-05-19  Tom Tromey  <tom@tromey.com>
7213
7214         PR rust/21484:
7215         * rust-lang.c (exp_descriptor_rust): New function.
7216         (rust_language_defn): Use it.
7217         * p-lang.c (pascal_language_defn): Update.
7218         * opencl-lang.c (opencl_language_defn): Update.
7219         * objc-lang.c (objc_language_defn): Update.
7220         * m2-lang.c (m2_language_defn): Update.
7221         * language.h (struct language_defn)
7222         <la_watch_location_expression>: New member.
7223         * language.c (unknown_language_defn, auto_language_defn)
7224         (local_language_defn): Update.
7225         * go-lang.c (go_language_defn): Update.
7226         * f-lang.c (f_language_defn): Update.
7227         * d-lang.c (d_language_defn): Update.
7228         * c-lang.h (c_watch_location_expression): Declare.
7229         * c-lang.c (c_watch_location_expression): New function.
7230         (c_language_defn, cplus_language_defn, asm_language_defn)
7231         (minimal_language_defn): Use it.
7232         * breakpoint.c (watch_command_1): Call
7233         la_watch_location_expression.
7234         * ada-lang.c (ada_language_defn): Update.
7235
7236 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7237
7238         PR tui/21482
7239         * gdb_curses.h (NOMACROS): Define.
7240         (NCURSES_NOMACROS): Define.
7241
7242 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7243
7244         PR tui/21482
7245         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7246         arg to char *.
7247         * tui/tui-wingeneral.c (box_win): Likewise.
7248         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7249         (tui_show_source_line): Likewise.
7250         (tui_show_exec_info_content): Likewise.
7251
7252 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7253
7254         * sparc-tdep.c (sparc_structure_return_p)
7255         (sparc_arg_on_registers_p): New functions.
7256         (sparc32_store_arguments): Use them.
7257         * sparc64-tdep.c (sparc64_16_byte_align_p)
7258         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7259         Handle TYPE_CODE_ARRAY.
7260
7261 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7262
7263         * cli/cli-decode.c (add_alias_cmd): New function.
7264         * command.h (add_alias_cmd): Declare.
7265         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7266         instead call add_alias_cmd.
7267
7268 2017-05-17  Pedro Alves  <palves@redhat.com>
7269
7270         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7271         (nat_makefile_frag): ... this.  All references updated.
7272         * configure.ac: Likewise.
7273         * configure.nat: Likewise.  Enhance comments.
7274         * configure: Regenerate.
7275
7276 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7277
7278         * procfs.c (procfs_create_inferior): Change prototype to match
7279         definition.
7280
7281 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7282
7283         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7284         C++ compiler warning.
7285
7286 2017-05-12  Tom Tromey  <tom@tromey.com>
7287
7288         PR rust/21483:
7289         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7290         recurse, just call value_struct_elt directly.
7291
7292 2017-05-12  Tom Tromey  <tom@tromey.com>
7293
7294         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7295         OP_RUST_ARRAY>: Fix.
7296
7297 2017-05-12  Tom Tromey  <tom@tromey.com>
7298
7299         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7300
7301 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7302
7303         * regcache.c: Include <forward_list>.
7304         (struct regcache_list): Remove.
7305         (current_regcache): Update.
7306         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7307         (regcache_thread_ptid_changed): Likewise.
7308         (registers_changed_ptid): Likewise.
7309         (current_regcache_size): Likewise.
7310
7311 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7312
7313         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7314         (current_regcache_size): New function.
7315         (current_regcache_test): New function.
7316         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7317
7318 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7319
7320         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7321         (print_gp_register_row): Use get_frame_register_value.
7322
7323 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7324
7325         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7326         (mips_supply_fpregset): Likewise.
7327         (mips64_supply_gregset): Likewise.
7328
7329 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7330
7331         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7332         regcache->raw_supply_zeroed.
7333
7334 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7335
7336         * configure.nat: Rearrange 'case' statements to match
7337         host before cpu.
7338
7339 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7340
7341         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7342         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7343         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7344         "@nat_extra_makefile_frag@".
7345         (Makefile): Remove dependency on "@frags@".
7346         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7347         (data-directory/Makefile): Likewise.
7348         * config/aarch64/linux.mh: Deleted; moved contents to
7349         "gdb/configure.nat".
7350         * config/alpha/alpha-linux.mh: Likewise.
7351         * config/alpha/nbsd.mh: Likewise.
7352         * config/arm/linux.mh: Likewise.
7353         * config/arm/nbsdelf.mh: Likewise.
7354         * config/i386/cygwin.mh: Likewise.
7355         * config/i386/cygwin64.mh: Likewise.
7356         * config/i386/darwin.mh: Likewise.
7357         * config/i386/fbsd.mh: Likewise.
7358         * config/i386/fbsd64.mh: Likewise.
7359         * config/i386/go32.mh: Likewise.
7360         * config/i386/i386gnu.mh: Likewise.
7361         * config/i386/i386sol2.mh: Likewise.
7362         * config/i386/linux.mh: Likewise.
7363         * config/i386/linux64.mh: Likewise.
7364         * config/i386/mingw.mh: Likewise.
7365         * config/i386/mingw64.mh: Likewise.
7366         * config/i386/nbsd64.mh: Likewise.
7367         * config/i386/nbsdelf.mh: Likewise.
7368         * config/i386/nto.mh: Likewise.
7369         * config/i386/obsd.mh: Likewise.
7370         * config/i386/obsd64.mh: Likewise.
7371         * config/i386/sol2-64.mh: Likewise.
7372         * config/ia64/linux.mh: Likewise.
7373         * config/m32r/linux.mh: Likewise.
7374         * config/m68k/linux.mh: Likewise.
7375         * config/m68k/nbsdelf.mh: Likewise.
7376         * config/m68k/obsd.mh: Likewise.
7377         * config/m88k/obsd.mh: Likewise.
7378         * config/mips/fbsd.mh: Likewise.
7379         * config/mips/linux.mh: Likewise.
7380         * config/mips/nbsd.mh: Likewise.
7381         * config/mips/obsd64.mh: Likewise.
7382         * config/pa/linux.mh: Likewise.
7383         * config/pa/nbsd.mh: Likewise.
7384         * config/pa/obsd.mh: Likewise.
7385         * config/powerpc/aix.mh: Likewise.
7386         * config/powerpc/fbsd.mh: Likewise.
7387         * config/powerpc/linux.mh: Likewise.
7388         * config/powerpc/nbsd.mh: Likewise.
7389         * config/powerpc/obsd.mh: Likewise.
7390         * config/powerpc/ppc64-linux.mh: Likewise.
7391         * config/powerpc/spu-linux.mh: Likewise.
7392         * config/s390/linux.mh: Likewise.
7393         * config/sh/nbsd.mh: Likewise.
7394         * config/sparc/fbsd.mh: Likewise.
7395         * config/sparc/linux.mh: Likewise.
7396         * config/sparc/linux64.mh: Likewise.
7397         * config/sparc/nbsd64.mh: Likewise.
7398         * config/sparc/nbsdelf.mh: Likewise.
7399         * config/sparc/obsd64.mh: Likewise.
7400         * config/sparc/sol2.mh: Likewise.
7401         * config/tilegx/linux.mh: Likewise.
7402         * config/vax/nbsdelf.mh: Likewise.
7403         * config/vax/obsd.mh: Likewise.
7404         * config/xtensa/linux.mh: Likewise.
7405         * config/i386/i386gnu.mn: New file, with excerpts from
7406         "config/i386/i386gnu.mh".
7407         * configure: Regenerate.
7408         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7409         *.mh files under "gdb/config".
7410         * configure.nat: New file, with contents from the
7411         "gdb/config/*/*.mh" files.
7412
7413 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7414
7415         * btrace.c (btrace_clear): Free insn vector.
7416
7417 2017-05-05  Pedro Alves  <palves@redhat.com>
7418
7419         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7420         * configure: Regenerate.
7421
7422 2017-05-04  Pedro Alves  <palves@redhat.com>
7423
7424         * Makefile.in (SFILES): Add progspace-and-thread.c.
7425         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7426         (COMMON_OBS): Add progspace-and-thread.o.
7427         * breakpoint.c: Include "progspace-and-thread.h".
7428         (update_inserted_breakpoint_locations)
7429         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7430         Use scoped_restore_current_pspace_and_thread.
7431         (create_std_terminate_master_breakpoint): Use
7432         scoped_restore_current_program_space.
7433         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7434         (print_breakpoint_location): Use
7435         scoped_restore_current_program_space.
7436         (bp_loc_is_permanent): Use
7437         scoped_restore_current_pspace_and_thread.
7438         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7439         (download_tracepoint_locations): Use
7440         scoped_restore_current_pspace_and_thread.
7441         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7442         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7443         (enum step_over_calls_kind): Moved from inferior.h.
7444         (class scoped_restore_current_thread): New class.
7445         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7446         declaration.
7447         (scoped_restore_current_thread): New class.
7448         * infcmd.c: Include "common/gdb_optional.h".
7449         (continue_1, proceed_after_attach): Use
7450         scoped_restore_current_thread.
7451         (notice_new_inferior): Use scoped_restore_current_thread.
7452         * inferior.c: Include "progspace-and-thread.h".
7453         (restore_inferior, save_current_inferior): Delete.
7454         (add_inferior_command, clone_inferior_command): Use
7455         scoped_restore_current_pspace_and_thread.
7456         * inferior.h (scoped_restore_current_inferior): New class.
7457         * infrun.c: Include "progspace-and-thread.h" and
7458         "common/gdb_optional.h".
7459         (follow_fork_inferior): Use
7460         scoped_restore_current_pspace_and_thread.
7461         (scoped_restore_exited_inferior): New class.
7462         (handle_vfork_child_exec_or_exit): Use
7463         scoped_restore_exited_inferior,
7464         scoped_restore_current_pspace_and_thread,
7465         scoped_restore_current_thread and scoped_restore.
7466         (fetch_inferior_event): Use scoped_restore_current_thread.
7467         * linespec.c (decode_line_full, decode_line_1): Use
7468         scoped_restore_current_program_space.
7469         * mi/mi-main.c: Include "progspace-and-thread.h".
7470         (exec_continue): Use scoped_restore_current_thread.
7471         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7472         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7473         * proc-service.c (ps_pglobal_lookup): Use
7474         scoped_restore_current_program_space.
7475         * progspace-and-thread.c: New file.
7476         * progspace-and-thread.h: New file.
7477         * progspace.c (release_program_space, clone_program_space): Use
7478         scoped_restore_current_program_space.
7479         (restore_program_space, save_current_program_space)
7480         (save_current_space_and_thread): Delete.
7481         (switch_to_program_space_and_thread): Moved to
7482         progspace-and-thread.c.
7483         * progspace.h (save_current_program_space)
7484         (save_current_space_and_thread): Delete declarations.
7485         (scoped_restore_current_program_space): New class.
7486         * remote.c (remote_btrace_maybe_reopen): Use
7487         scoped_restore_current_thread.
7488         * symtab.c: Include "progspace-and-thread.h".
7489         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7490         * thread.c (print_thread_info_1): Use
7491         scoped_restore_current_thread.
7492         (struct current_thread_cleanup): Delete.
7493         (do_restore_current_thread_cleanup)
7494         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7495         (scoped_restore_current_thread::~scoped_restore_current_thread):
7496         ... this new dtor.
7497         (make_cleanup_restore_current_thread): Rename/convert to ...
7498         (scoped_restore_current_thread::scoped_restore_current_thread):
7499         ... this new ctor.
7500         (thread_apply_all_command): Use scoped_restore_current_thread.
7501         (thread_apply_command): Use scoped_restore_current_thread.
7502         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7503         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7504
7505 2017-05-04  Pedro Alves  <palves@redhat.com>
7506
7507         * thread.c (make_cleanup_restore_current_thread): Move
7508         find_thread_ptid call before the is_stopped call.  Assert that the
7509         thread is found.  Replace is_stopped call by checking the thread's
7510         state directly.  Remove unnecessary NULL-thread check.
7511
7512 2017-05-04  Pedro Alves  <palves@redhat.com>
7513
7514         * corelow.c (thread_section_name): New class.
7515         (get_core_register_section, get_core_siginfo): Use it.
7516
7517 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7518
7519         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7520         (get_core_register_section): Remove xfree of NULL pointer.
7521
7522 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7523
7524         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7525         * regcache.c (regcache::raw_supply_zeroed): New function.
7526         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7527
7528 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7529
7530         * gdbarch.sh: Remove commented out definition of
7531         TARGET_CHAR_BIT.
7532         * gdbarch.h: Re-generate.
7533
7534 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7535
7536         * configure: Regenerate.
7537
7538 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7539
7540         * solib-target.c (solib_target_relocate_section_addresses):
7541         Remove num_section_bases, num_bases, segment_bases variables.
7542
7543 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7544
7545         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7546
7547 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7548
7549         * solib-target.c: Include <vector>
7550         (struct lm_info_target) <~lm_info_target>: Remove.
7551         <segment_bases, section_bases>: Change type to
7552         std::vector<CORE_ADDR>.
7553         (library_list_start_segment, library_list_start_section,
7554         library_list_end_library,
7555         solib_target_relocate_section_addresses): Adjust.
7556
7557 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7558
7559         * gdbarch.sh (software_single_step): Change return type to
7560         std::vector<CORE_ADDR>.
7561         * gdbarch.c, gdbarch.h: Re-generate.
7562         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7563         Adjust.
7564         (arm_deal_with_atomic_sequence_raw): Adjust.
7565         (thumb_get_next_pcs_raw): Adjust.
7566         (arm_get_next_pcs_raw): Adjust.
7567         (arm_get_next_pcs): Adjust.
7568         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7569         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7570         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7571         (alpha_software_single_step): Adjust.
7572         * alpha-tdep.h (alpha_software_single_step): Adjust.
7573         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7574         * arm-tdep.c (arm_software_single_step): Adjust.
7575         (arm_breakpoint_kind_from_current_state): Adjust.
7576         * arm-tdep.h (arm_software_single_step): Adjust.
7577         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7578         * cris-tdep.c (cris_software_single_step): Adjust.
7579         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7580         (micromips_deal_with_atomic_sequence): Adjust.
7581         (deal_with_atomic_sequence): Adjust.
7582         (mips_software_single_step): Adjust.
7583         * mips-tdep.h (mips_software_single_step): Adjust.
7584         * moxie-tdep.c (moxie_software_single_step): Adjust.
7585         * nios2-tdep.c (nios2_software_single_step): Adjust.
7586         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7587         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7588         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7589         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7590         * sparc-tdep.c (sparc_software_single_step): Adjust.
7591         * spu-tdep.c (spu_software_single_step): Adjust.
7592         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7593
7594 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7595
7596         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7597         * gdbarch.h: Re-generate.
7598
7599 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7600
7601         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7602         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7603         * python/py-instruction.c, python/py-instruction.h: New file.
7604         * python/py-record.c: Add py-instruction.h include.
7605         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7606         gdb.RecordInstruction.
7607         * python/python-internal.h: Add gdbpy_initialize_instruction
7608         declaration.
7609         * python/python.c (do_start_initialization): Add
7610         gdbpy_initialize_instruction.
7611
7612 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7613
7614         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7615         Remove.
7616         (btrace_func_from_recpy_func): New function.
7617         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7618         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7619         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7620         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7621         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7622         Also, use new helper functions.
7623         (btpy_list_item): Use new helper functions.
7624         (recpy_bt_function_call_history): Use new type name.
7625         (btpy_call_getset): Remove.
7626         (gdbpy_initialize_btrace): Remove code to initialize
7627         gdb.BtraceFunctionCall.
7628         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7629         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7630         recpy_bt_func_prev, recpy_bt_func_next): New export.
7631         * python/py-record.c (recpy_func_type): New static object.
7632         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7633         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7634         recpy_func_next): New function.
7635         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7636         (recpy_func_getset): New static object.
7637         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7638         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7639
7640 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7641
7642         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7643         (btpy_object, btpy_insn_type, btpy_new): Remove.
7644         (btpy_list_object): Use gdb.RecordInstruction type instead of
7645         gdb.BtraceInstruction type.
7646         (btrace_insn_from_recpy_insn): New function.
7647         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7648         btpy_new.
7649         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7650         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7651         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7652         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7653         instead of btpy_object.
7654         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7655         btpy_insn_data, btpy_insn_decode): Rename to ...
7656         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7657         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7658         recpy_bt_insn_decode): This.  Also, use new helper functions.
7659         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7660         recpy_insn_type.
7661         (btpy_insn_getset): Remove.
7662         (gdbpy_initialize_btrace): Remove code to initialize
7663         gdb.BtraceInstruction.  Use recpy_element_object.
7664         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7665         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7666         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7667         * python/py-record.c (recpy_insn_type): New static object.
7668         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7669         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7670         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7671         New function.
7672         (recpy_insn_getset): New static object.
7673         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7674         * python/py-record.h (recpy_element_object): New typedef.
7675         (recpy_insn_type, recpy_insn_new): New export.
7676
7677 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7678
7679         * py-record-btrace.c (btpy_insn_new): Removed.
7680         (btpy_insn_or_gap_new): New function.
7681         (btpy_insn_error): Removed.
7682         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7683         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7684         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7685         btpy_insn_or_gap_new instead of btpy_insn_new.
7686         (btpy_insn_getset): Remove btpy_insn_error.
7687         * py-record.c (recpy_gap_type): New static object.
7688         (recpy_gap_object): New typedef.
7689         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7690         recpy_gap_reason_string): New function.
7691         (recpy_gap_getset): New static object.
7692         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7693         * py-record.h (recpy_gap_new): New export.
7694
7695 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7696
7697         * python/py-record.c (recpy_ptid): Remove.
7698         (recpy_record_getset): Remove recpy_ptid.
7699
7700 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7701
7702         * btrace.c (btrace_fetch): Set inferior_ptid.
7703         * python/py-record-btrace.c: Add "py-record.h" include.
7704         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7705         recpy_bt_end, recpy_bt_instruction_history,
7706         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7707         in gdb.Record object instead of current ptid.
7708         * python/py-record.c: Include new "py-record.h" file.
7709         (recpy_record_object): Moved to py-record.h.
7710         * python/py-record.h: New file.
7711
7712 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7713
7714         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7715         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7716         indentation.
7717
7718 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7719
7720         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7721         the past maintainers section.
7722
7723 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7724
7725         * infcmd.c (get_return_value): Use regcache ctor, and remove
7726         cleanup.
7727
7728 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7729             Pedro Alves  <palves@redhat.com>
7730
7731         * regcache.c (regcache::regcache): New tag dispatch ctor.
7732         (do_cooked_read): Moved above.
7733         (regcache_dup): Use the tag dispatch ctor..
7734         * regcache.h (regcache): Declare ctor, delete copy ctor and
7735         assignment operator, remove friend regcache_dup.
7736
7737 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7738
7739         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7740         call method save instead of regcache_cpy.
7741         * regcache.h (struct regcache): Make regcache_dup a friend.
7742
7743 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7744
7745         * regcache.c (struct regcache): Move to regcache.h
7746         (regcache::arch): New method.
7747         (regcache_get_ptid): Update.
7748         (get_regcache_arch): Call arch method.
7749         (get_regcache_aspace): Call method aspace.
7750         (register_buffer): Change it to method.
7751         (regcache_save): Change it to regcache::save.
7752         (regcache_restore): Likewise.
7753         (regcache_cpy_no_passthrough): Remove the declaration.
7754         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7755         (regcache_cpy_no_passthrough): Change it to method
7756         cpy_no_passthrough.
7757         (regcache_register_status): Change it to method
7758         get_register_status.
7759         (regcache_invalidate): Change it to method invalidate.
7760         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7761         (regcache_raw_update): Change it to method raw_update.
7762         (regcache_raw_read): Likewise.
7763         (regcache_raw_read_signed): Likewise.
7764         (regcache_raw_read_unsigned): Likewise.
7765         (regcache_raw_write_signed): Likewise.
7766         (regcache_raw_write_unsigned): Likewise.
7767         (regcache_cooked_read): Likewise.
7768         (regcache_cooked_read_value): Likewise.
7769         (regcache_cooked_read_signed): Likewise.
7770         (regcache_cooked_read_unsigned): Likewise.
7771         (regcache_cooked_write_signed): Likewise.
7772         (regcache_cooked_write_unsigned): Likewise.
7773         (regcache_raw_set_cached_value): Likewise.
7774         (regcache_raw_write): Likewise.
7775         (regcache_cooked_write): Likewise.
7776         (regcache_xfer_part): Likewise.
7777         (regcache_raw_read_part): Likewise.
7778         (regcache_raw_write_part): Likewise.
7779         (regcache_cooked_read_part): Likewise.
7780         (regcache_cooked_write_part): Likewise.
7781         (regcache_raw_supply): Likewise.
7782         (regcache_raw_collect): Likewise.
7783         (regcache_transfer_regset): Likewise.
7784         (regcache_supply_regset): Likewise.
7785         (regcache_collect_regset): Likewise.
7786         (regcache_debug_print_register): Likewise.
7787         (enum regcache_dump_what): Move it to regcache.h.
7788         (regcache_dump): Change it to method dump.
7789         * regcache.h (enum regcache_dump_what): New.
7790         (class regcache): New.
7791         * target.c (target_fetch_registers): Call method
7792         debug_print_register.
7793         (target_store_registers): Likewise.
7794
7795 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7796
7797         * windows-nat.c (struct lm_info_windows): Initialize field.
7798         (windows_make_so): Allocate lm_info_windows with new.
7799         (windows_free_so): Free lm_info_windows with delete.
7800
7801 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7802
7803         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7804         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7805         cleanup.
7806         (darwin_free_so): Free lm_info_darwin with delete.
7807
7808 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7809
7810         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7811         <l_addr_p>: Change type to bool.
7812         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7813         (svr4_free_so): Free lm_info_svr4 with delete.
7814         (svr4_copy_library_list): Replace memcpy with call to copy
7815         constructor.
7816         (library_list_start_library, svr4_default_sos): Allocate
7817         lm_info_svr4 with new.
7818
7819 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7820
7821         * solib-target.c (struct lm_info_target): Add destructor,
7822         initialize fields.
7823         <name>: Change type to std::string.
7824         (library_list_start_library): Allocate lm_info_target with new.
7825         (solib_target_free_library_list): Free lm_info_target with
7826         delete.
7827         (solib_target_current_sos): Adapt to std::string.
7828         (solib_target_free_so): Free lm_info_target with delete.
7829
7830 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7831
7832         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7833         fields.
7834         (frv_current_sos): Allocate lm_info_frv with new.
7835         (frv_relocate_main_executable): Free lm_info_frv with delete,
7836         allocate with new.
7837         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7838
7839 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7840
7841         * solib-frv.c (struct lm_info_frv): Fix indentation.
7842
7843 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7844
7845         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7846         map field.
7847         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7848         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7849         and allocate with new.
7850         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7851
7852 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7853
7854         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7855         <filename, member_name>: Change type to std::string.
7856         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7857         (library_list_start_library): Allocate lm_info_aix with new.
7858         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7859         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7860         with copy constructor.
7861
7862 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7863
7864         * solist.h (struct lm_info): Remove.
7865         (struct lm_info_base): New class.
7866         (struct so_list) <lm_info>: Change type to lm_info_base *.
7867         * nto-tdep.c (struct lm_info): Remove.
7868         (lm_addr): Adjust.
7869         * solib-aix.c (struct lm_info): Rename to ...
7870         (struct lm_info_aix): ... this.  Extend lm_info_base.
7871         (lm_info_p): Rename to ...
7872         (lm_info_aix_p): ... this, and adjust.
7873         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7874         solib_aix_parse_libraries, library_list_start_library,
7875         solib_aix_free_library_list, solib_aix_parse_libraries,
7876         solib_aix_get_library_list,
7877         solib_aix_relocate_section_addresses, solib_aix_free_so,
7878         solib_aix_get_section_offsets,
7879         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7880         Adjust.
7881         (struct solib_aix_inferior_data) <library_list>: Adjust.
7882         * solib-darwin.c (struct lm_info): Rename to ...
7883         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7884         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7885         * solib-dsbt.c (struct lm_info): Rename to ...
7886         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7887         (struct dsbt_info) <main_executable_lm_info): Adjust.
7888         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7889         dsbt_relocate_section_addresses): Adjust.
7890         * solib-frv.c (struct lm_info): Rename to ...
7891         (struct lm_info_frv): ... this.  Extend lm_info_base.
7892         (main_executable_lm_info): Adjust.
7893         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7894         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7895         find_canonical_descriptor_in_load_object,
7896         frv_fdpic_find_canonical_descriptor): Adjust.
7897         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7898         to lm_info_svr4.
7899         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7900         svr4_clear_so, svr4_copy_library_list,
7901         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7902         svr4_current_sos, svr4_fetch_objfile_link_map,
7903         solist_update_incremental): Adjust.
7904         * solib-svr4.h (struct lm_info_svr4): Move here from
7905         solib-svr4.c.
7906         * solib-target.c (struct lm_info): Rename to ...
7907         (struct lm_info_target): ... this.  Extend lm_info_base.
7908         (lm_info_p): Rename to ...
7909         (lm_info_target_p): ... this.
7910         (solib_target_parse_libraries, library_list_start_segment,
7911         library_list_start_section, library_list_start_library,
7912         library_list_end_library, solib_target_free_library_list,
7913         solib_target_current_sos, solib_target_free_so,
7914         solib_target_relocate_section_addresses): Adjust.
7915         * windows-nat.c (struct lm_info): Rename to ...
7916         (struct lm_info_windows): ... this.  Extend lm_info_base.
7917         (windows_make_so, handle_load_dll, handle_unload_dll,
7918         windows_xfer_shared_libraries): Adjust.
7919
7920 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7921
7922         * solib-darwin.c (struct darwin_so_list): Remove.
7923         (darwin_current_sos): Allocate an so_list object instead of a
7924         darwin_so_list, separately allocate an lm_info object.
7925         (darwin_free_so): Free lm_info.
7926
7927 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7928
7929         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7930         with fprintf_filtered.
7931
7932 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7933
7934         * regcache.c (regcache::regcache): New function.
7935         (regcache::~regcache): New function.
7936         (regcache_xmalloc_1): Remove.
7937         (regcache_xmalloc): Call new regcache.
7938         (regcache_xfree): Call delete regcache.
7939         (get_thread_arch_aspace_regcache): Call new regcache.
7940
7941 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7942
7943         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7944         lwp instead of ptid_get_lwp.
7945
7946 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7947
7948         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7949         lwp_info instead of getting from inferior_ptid.
7950
7951 2017-04-27  Keith Seitz  <keiths@redhat.com>
7952
7953         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7954         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7955         (CV_CONVERSION_BADNESS): Define.
7956         (rank_one_type): Remove overly restrictive rvalue reference
7957         rank checks.
7958         Add cv-qualifier checks and subranks for type equality.
7959         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7960         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7961         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7962
7963 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7964
7965         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7966         count when creating the object.
7967
7968 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7969             Ulrich Weigand  <uweigand@de.ibm.com>
7970
7971         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7972         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7973         is used in AIX.
7974         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7975         (process_xcoff_symbol): Likewise.
7976         (scan_xcoff_symtab): Likewise.
7977
7978 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7979
7980         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7981         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7982         (ia64_access_reg): Use get_frame_register_unsigned.
7983         (ia64_access_rse_reg): Likewise.
7984         (ia64_libunwind_frame_prev_register): Likewise.
7985
7986 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7987
7988         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7989         * gdbarch.c: Regenerated.
7990         * gdbarch.h: Regenerated.
7991         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7992         visibility external.
7993         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7994         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7995         (enum cfa_how_kind): Move to ...
7996         (struct dwarf2_frame_state_reg_info): Likewise.
7997         (struct dwarf2_frame_state): Likewise.
7998         * dwarf2-frame.h: ... here.
7999         (dwarf2_frame_state_alloc_regs): New declaration.
8000         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8001         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8002
8003 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8004
8005         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8006         regcache_raw_read_unsigned.
8007         (xtensa_pseudo_register_write): Likewise.
8008
8009 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8010
8011         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8012         (nds32_pseudo_register_write): Likewise.
8013
8014 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8015
8016         * regcache.c (struct regcache) <readonly_p>: Change its type
8017         to bool.
8018         (regcache_xmalloc_1): Update parameter type and callers update.
8019
8020 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8021
8022         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8023         set_gdbarch_wchar_bit.
8024         * arm-tdep.c (arm_gdbarch_init): Likewise.
8025
8026 2017-04-25  Pedro Alves  <palves@redhat.com>
8027
8028         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8029         (BothAreRelocatable, memcopy, memmove): Don't define.
8030         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8031         macros.
8032
8033 2017-04-25  Pedro Alves  <palves@redhat.com>
8034
8035         * common/common-defs.h: Include "common/poison.h".
8036         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8037         and adjust.
8038         * common/poison.h: New file.
8039         * common/traits.h: Include <type_traits>.
8040         (Not, Or, Requires): New, moved from common/function-view.h.
8041
8042 2017-04-25  Pedro Alves  <palves@redhat.com>
8043
8044         * breakpoint.h (struct breakpoint): In-class initialize all
8045         fields.  Make boolean fields "bool".
8046         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8047         memset call and initializations no longer necessary.
8048
8049 2017-04-25  Pedro Alves  <palves@redhat.com>
8050
8051         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8052         reference.
8053         (pt_btrace_insn): New function.
8054         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8055
8056 2017-04-25  Pedro Alves  <palves@redhat.com>
8057
8058         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8059         "base" field and inherit from "bp_location" instead.  Add
8060         non-default ctor.
8061         (allocate_location_exception): Use new non-default ctor.
8062         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8063         (init_bp_location): Convert to ...
8064         (bp_location::bp_location): ... this new ctor, and remove memset
8065         call.
8066         (base_breakpoint_allocate_location): Use the new non-default ctor.
8067         * breakpoint.h (bp_location): Now a class.  Declare default and
8068         non-default ctors.  In-class initialize all members.
8069         (init_bp_location): Remove declaration.
8070
8071 2017-04-25  Pedro Alves  <palves@redhat.com>
8072
8073         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8074         assignment operator.
8075
8076 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8077
8078         * doublest.c (convert_doublest_to_floatformat): Call
8079         floatformat_totalsize_bytes.
8080
8081 2017-04-22  Tom Tromey  <tom@tromey.com>
8082
8083         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8084         ui_out_emit_list.
8085         * stack.c (print_frame): Use ui_out_emit_list.
8086         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8087         ui_out_emit_list.
8088         * mi/mi-main.c (print_one_inferior)
8089         (mi_cmd_data_list_register_names)
8090         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8091         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8092         ui_out_emit_list.
8093         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8094         (mi_output_solib_attribs): Use ui_out_emit_list,
8095         ui_out_emit_tuple.
8096         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8097         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8098         (mi_cmd_stack_list_args, list_args_or_locals): Use
8099         ui_out_emit_list.
8100         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8101         * breakpoint.c (print_solib_event, output_thread_groups): Use
8102         ui_out_emit_list.
8103
8104 2017-04-22  Tom Tromey  <tom@tromey.com>
8105
8106         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8107         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8108         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8109
8110 2017-04-22  Tom Tromey  <tom@tromey.com>
8111
8112         * tracepoint.c (tvariables_info_1)
8113         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8114
8115 2017-04-22  Tom Tromey  <tom@tromey.com>
8116
8117         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8118         annotate_arg_emitter.
8119         * breakpoint.c (print_mention_watchpoint)
8120         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8121         * annotate.h (struct annotate_arg_emitter): New.
8122
8123 2017-04-22  Tom Tromey  <tom@tromey.com>
8124
8125         * record-btrace.c (record_btrace_insn_history)
8126         (record_btrace_insn_history_range, record_btrace_call_history)
8127         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8128         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8129         ui_out_emit_tuple.
8130         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8131         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8132         * skip.c (skip_info): Use ui_out_emit_tuple.
8133         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8134         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8135         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8136         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8137         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8138         ui_out_emit_tuple.
8139         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8140         (output_register, mi_cmd_data_read_memory)
8141         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8142         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8143         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8144         Use ui_out_emit_tuple.
8145         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8146         ui_out_emit_tuple.
8147         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8148         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8149         * linux-thread-db.c (info_auto_load_libthread_db): Use
8150         ui_out_emit_tuple.
8151         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8152         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8153         * disasm.c (do_mixed_source_and_assembly_deprecated)
8154         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8155         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8156         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8157         * breakpoint.c (print_one_breakpoint_location)
8158         (print_one_breakpoint): Use ui_out_emit_tuple.
8159         * auto-load.c (print_script, info_auto_load_cmd): Use
8160         ui_out_emit_tuple.
8161         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8162
8163 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8164
8165         * thread.c (print_thread_info_1): Remove dead code.
8166
8167 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8168
8169         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8170         GDB_SELF_TEST.
8171         * arm-tdep.c (selftests::arm_record_test): Likewise.
8172
8173 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8174
8175         * regcache.c (regcache_restore): Remove argument 2.  Replace
8176         argument 3 with regcache.  Get register status from
8177         src->register_status and get register contents from
8178         register_buffer (src, regnum).
8179         (regcache_cpy): Update.
8180
8181 2017-04-19  Pedro Alves  <palves@redhat.com>
8182
8183         * gdbthread.h (thread): Add missing closing parenthesis in
8184         comment.
8185
8186 2017-04-19  Pedro Alves  <palves@redhat.com>
8187
8188         * common/refcounted-object.h: New file.
8189         * gdbthread.h: Include "common/refcounted-object.h".
8190         (thread_info): Inherit from refcounted_object and add comments.
8191         (thread_info::incref, thread_info::decref)
8192         (thread_info::m_refcount): Delete.
8193         (thread_info::deletable): Use the refcounted_object::refcount()
8194         method.
8195         * inferior.c (current_inferior_): Add comment.
8196         (set_current_inferior): Increment/decrement refcounts.
8197         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8198         not-deletable instead of comparing with the current inferior.
8199         (initialize_inferiors): Increment the initial inferior's refcount.
8200         * inferior.h (struct inferior): Forward declare.
8201         Include "common/refcounted-object.h".
8202         (current_inferior, set_current_inferior): Move declaration to
8203         before struct inferior's definition, and fix comment.
8204         (inferior): Inherit from refcounted_object.  Add comments.
8205         * thread.c (switch_to_thread_no_regs): Reference the thread's
8206         inferior pointer directly instead of doing a ptid lookup.
8207         (switch_to_no_thread): New function.
8208         (switch_to_thread(thread_info *)): New function, factored out
8209         from ...
8210         (switch_to_thread(ptid_t)): ... this.
8211         (restore_current_thread): Delete.
8212         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8213         fields, and add 'inf' field.
8214         (do_restore_current_thread_cleanup): Check whether old->inf is
8215         alive instead of looking up an inferior by ptid.  Use
8216         switch_to_thread and switch_to_no_thread.
8217         (restore_current_thread_cleanup_dtor): Use old->inf directly
8218         instead of lookup up an inferior by id.  Decref the inferior.
8219         Don't restore 'removable'.
8220         (make_cleanup_restore_current_thread): Same the inferior pointer
8221         in old, instead of the inferior number.  Incref the inferior.
8222         Don't save/clear 'removable'.
8223
8224 2017-04-19  Pedro Alves  <palves@redhat.com>
8225
8226         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8227         unittests/scoped_restore-selftests.c.
8228         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8229         * common/scoped_restore.h (scoped_restore_base): Make "class".
8230         (scoped_restore_base::release): New public method.
8231         (scoped_restore_base::scoped_restore_base): New protected ctor.
8232         (scoped_restore_base::m_saved_var): New protected field.
8233         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8234         scoped_restore_base base class instead of m_saved_var directly.
8235         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8236         (scoped_restore_tmpl::scoped_restore_tmpl(const
8237         scoped_restore_tmpl<T>&)): Likewise.
8238         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8239         method.
8240         (scoped_restore_tmpl::saved_var): New method.
8241         (scoped_restore_tmpl::m_saved_var): Delete.
8242         * inferior.h (inferior::detaching): Now a bool.
8243         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8244         cleanup.
8245         * unittests/scoped_restore-selftests.c: New file.
8246
8247 2017-04-19  Pedro Alves  <palves@redhat.com>
8248
8249         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8250         Re-sort in alphabetic order.
8251
8252 2017-04-18  Pedro Alves  <palves@redhat.com>
8253
8254         * xml-support.c (obstack_xml_printf): Delete.
8255         * xml-support.h (obstack_xml_printf): Delete.
8256
8257 2017-04-18  Pedro Alves  <palves@redhat.com>
8258
8259         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8260         vdebug, verror, body_text, start_element, end_element, name,
8261         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8262         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8263         is_xinclude>: Make private and add m_ prefix.
8264         (gdb_xml_parser::body_text): New method, based on ...
8265         (gdb_xml_body_text): ... this.  Adjust.
8266         (gdb_xml_parser::vdebug): New method, based on ...
8267         (gdb_xml_debug): ... this.  Adjust.
8268         (gdb_xml_parser::verror): New method, based on ...
8269         (gdb_xml_error): ... this.  Adjust.
8270         (gdb_xml_parser::start_element): New method, based on ...
8271         (gdb_xml_start_element): ... this.  Adjust.
8272         (gdb_xml_start_element_wrapper): Defer to
8273         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8274         (gdb_xml_parser::end_element): New method, based on ...
8275         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8276         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8277         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8278         (gdb_xml_parser::use_dtd): New method, based on ...
8279         (gdb_xml_use_dtd): ... this.  Adjust.
8280         (gdb_xml_parser::parse): New method, based on ...
8281         (gdb_xml_parse): ... this.  Adjust.
8282         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8283         (xinclude_start_include): Adjust to call the parser's name method.
8284         (xml_xinclude_default, xml_xinclude_start_doctype)
8285         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8286         method.
8287         (xml_process_xincludes): Adjust to call parser methods.
8288         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8289         declarations.
8290
8291 2017-04-18  Pedro Alves  <palves@redhat.com>
8292
8293         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8294         gdb::optional<std::string>.
8295         * xml-support.c: Include <string>.
8296         (scope_level::scope_level(scope_level &&))
8297         (scope_level::~scope_level): Delete.
8298         (scope_level::body): Now a std::string.
8299         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8300         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8301         parameter.
8302         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8303         (xinclude_parsing_data::output): Now a std::string reference.
8304         (xinclude_start_include): Adjust.
8305         (xml_xinclude_default): Adjust.
8306         (xml_process_xincludes): Add 'output' parameter, and return bool.
8307         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8308         and return bool.
8309         * xml-tdesc.c: Include <unordered_map> and <string>.
8310         (tdesc_xml_cache): Delete.
8311         (tdesc_xml_cache_s): Delete.
8312         (xml_cache): Now an std::unordered_map.
8313         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8314         (target_fetch_description_xml): Change return type to
8315         gdb::optional<std::string>, and adjust.
8316         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8317         (target_fetch_description_xml): Change return type to
8318         gdb::optional<std::string>.
8319
8320 2017-04-18  Pedro Alves  <palves@redhat.com>
8321
8322         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8323         unittests/optional-selftests.c.
8324         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8325         * unittests/optional-selftests.c: New file.
8326         * unittests/optional/assignment/1.cc: New file.
8327         * unittests/optional/assignment/2.cc: New file.
8328         * unittests/optional/assignment/3.cc: New file.
8329         * unittests/optional/assignment/4.cc: New file.
8330         * unittests/optional/assignment/5.cc: New file.
8331         * unittests/optional/assignment/6.cc: New file.
8332         * unittests/optional/assignment/7.cc: New file.
8333         * unittests/optional/cons/copy.cc: New file.
8334         * unittests/optional/cons/default.cc: New file.
8335         * unittests/optional/cons/move.cc: New file.
8336         * unittests/optional/cons/value.cc: New file.
8337         * unittests/optional/in_place.cc: New file.
8338         * unittests/optional/observers/1.cc: New file.
8339         * unittests/optional/observers/2.cc: New file.
8340
8341 2017-04-18  Pedro Alves  <palves@redhat.com>
8342
8343         * common/gdb_optional.h: Include common/traits.h.
8344         (in_place_t): New type.
8345         (in_place): New constexpr variable.
8346         (optional::optional): Remove member initialization of
8347         m_instantiated.
8348         (optional::optional(in_place_t...)): New constructor.
8349         (optional::~optional): Use reset.
8350         (optional::optional(const optional&)): New.
8351         (optional::optional(const optional&&)): New.
8352         (optional::optional(T &)): New.
8353         (optional::optional(T &&)): New.
8354         (operator::operator=(const optional &)): New.
8355         (operator::operator=(optional &&)): New.
8356         (operator::operator= (const T &))
8357         (operator::operator= (T &&))
8358         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8359         (operator::reset): New.
8360         (operator::m_instantiated):: Add in-class initializer.
8361         * common/traits.h: Include <type_traits>.
8362         (struct And): New types.
8363
8364 2017-04-18  Pedro Alves  <palves@redhat.com>
8365
8366         * xml-support.c: Include <vector>.
8367         (scope_level::scope_level(const gdb_xml_element *))
8368         (scope_level::scope_level(scope_level&&)): New.
8369         (scope_level::~scope_level): New.
8370         (scope_level_s): Delete.
8371         (gdb_xml_parser::scopes): Now a std::vector.
8372         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8373         Use std::vector.
8374         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8375         scope cleanup code.
8376         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8377         of the scopes member.  Use std::vector::emplace_back.
8378
8379 2017-04-18  Pedro Alves  <palves@redhat.com>
8380
8381         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8382         a bool.
8383         (gdb_xml_end_element): Change type of first parameter.
8384         (gdb_xml_cleanup): Rename to ...
8385         (gdb_xml_parser::~gdb_xml_parser): ... this.
8386         (gdb_xml_create_parser_and_cleanup): Delete with ...
8387         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8388         to this new ctor.
8389         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8390         using gdb_xml_create_parser_and_cleanup.
8391         (xinclude_parsing_data): Add ctor/dtor.
8392         (xml_xinclude_cleanup): Delete.
8393         (xml_process_xincludes): Create a local xinclude_parsing_data
8394         instead of heap-allocating one.  Create a local gdb_xml_parser
8395         instead of heap-allocating one with
8396         gdb_xml_create_parser_and_cleanup.
8397
8398 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8399
8400         PR threads/20743
8401         * fbsd-nat.c (resume_one_thread_cb): Remove.
8402         (resume_all_threads_cb): Remove.
8403         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8404         iterate_over_threads.
8405
8406 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8407
8408         * NEWS: Create a new section for the next release branch.
8409         Rename the section of the current branch, now that it has
8410         been cut.
8411
8412 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8413
8414         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8415         * version.in: Bump version to 8.0.50.DATE-git.
8416
8417 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8418
8419         PR gdb/21385
8420         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8421         independently of the host, and fix build breakage on Cygwin.
8422
8423 2017-04-13  Pedro Alves  <palves@redhat.com>
8424
8425         * inferior.c (free_inferior): Convert to ...
8426         (inferior::~inferior): ... this dtor.
8427         (inferior::inferior): New ctor, factored out from ...
8428         (add_inferior_silent): ... here.  Allocate the inferior with a new
8429         expression.
8430         (delete_inferior): Call delete instead of free_inferior.
8431         * inferior.h (gdb_environ, continuation): Forward declare.
8432         (inferior): Now a class.  Add in-class initialization to all
8433         members.  Make boolean fields bool, except 'detaching'.
8434         (inferior::inferior): New explicit ctor.
8435         (inferior::~inferior): New.
8436
8437 2017-04-13  Pedro Alves  <palves@redhat.com>
8438
8439         * inferior.c (init_inferior_list): Delete.
8440         * inferior.h (init_inferior_list): Delete.
8441
8442 2017-04-13  Pedro Alves  <palves@redhat.com>
8443
8444         PR threads/13217
8445         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8446         (top level): Call it twice, with different thread sets.
8447
8448 2017-04-13  Pedro Alves  <palves@redhat.com>
8449
8450         * thread.c: Include <algorithm>.
8451         (thread_array_cleanup): Delete.
8452         (scoped_inc_dec_ref): New class.
8453         (live_threads_count): New function.
8454         (set_thread_refcount): Delete.
8455         (tp_array_compar_ascending): Now a bool.
8456         (tp_array_compar): Convert to a std::sort comparison function.
8457         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8458         and live_threads_count.
8459
8460 2017-04-13  Pedro Alves  <palves@redhat.com>
8461
8462         * infrun.c (follow_fork_inferior): Also switch the current
8463         inferior.
8464
8465 2017-04-13  Pedro Alves  <palves@redhat.com>
8466
8467         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8468         before calling create_internal_breakpoint.
8469
8470 2017-04-13  Pedro Alves  <palves@redhat.com>
8471
8472         * fork-child.c (execv_argv): New class.
8473         (breakup_args): Refactored as ...
8474         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8475         Copy arguments to storage and replace separators with NULL
8476         terminators in place.
8477         (escape_bang_in_quoted_argument): Adjust to return bool.
8478         (execv_argv::execv_argv): New ctor.
8479         (execv_argv::init_for_shell): New method, factored out from
8480         fork_inferior.  Don't strdup strings into the vector.
8481         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8482         Remove free_vector_argv call.
8483
8484 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8485
8486         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8487         tdep->rx_psw_type.
8488
8489 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8490
8491         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8492         * rx-tdep.c (rx_gdbarch_init): Likewise.
8493
8494 2017-04-13  Pedro Alves  <palves@redhat.com>
8495
8496         * breakpoint.h (struct breakpoint): Reindent.
8497
8498 2017-04-13  Pedro Alves  <palves@redhat.com>
8499
8500         * breakpoint.c (bp_location): Rename to ...
8501         (bp_locations): ... this.  All references updated.
8502         (bp_location_count): Rename to ...
8503         (bp_locations_count): ... this.  All references updated.
8504         (bp_location_placed_address_before_address_max): Rename to ...
8505         (bp_locations_placed_address_before_address_max): ... this.  All
8506         references updated.
8507         (bp_location_shadow_len_after_address_max): Rename to ...
8508         (bp_locations_shadow_len_after_address_max): ... this.  All
8509         references updated.
8510         (bp_location_compare_addrs): Rename to ...
8511         (bp_locations_compare_addrs): ... this.  All references updated.
8512         (bp_location_compare):Rename to ...
8513         (bp_locations_compare): ... this.  All references updated.
8514         (bp_location_target_extensions_update): Rename to ...
8515         (bp_locations_target_extensions_update): ... this.  All references
8516         updated.
8517
8518 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8519
8520         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8521         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8522         'sgtty.h'.
8523         * common/gdb_termios.h: New file, with parts of "terminal.h".
8524         * inflow.c: Include "gdb_termios.h".
8525         * ser-unix.c: Include "gdb_termios.h".
8526         * terminal.h: Move terminal-related defines to
8527         "common/gdb_termios.h".
8528
8529 2017-04-12  Tom Tromey  <tom@tromey.com>
8530
8531         * probe.c (parse_probes): Update.
8532         * location.h (delete_event_location): Don't declare.
8533         (event_location_deleter::operator()): Update.
8534         * location.c (event_location_deleter::operator()): Rename from
8535         delete_event_location.
8536         * linespec.h (linespec_result) <location>: Change type to
8537         event_location_up.
8538         * linespec.c (canonicalize_linespec, event_location_to_sals)
8539         (decode_objc): Update.
8540         (linespec_result): Don't call delete_event_location.
8541         * breakpoint.c (create_breakpoints_sal)
8542         (bkpt_probe_create_sals_from_location)
8543         (strace_marker_create_sals_from_location): Update.
8544
8545 2017-04-12  Tom Tromey  <tom@tromey.com>
8546
8547         * linespec.h (struct linespec_result): Add constructor and
8548         destructor.
8549         (init_linespec_result, destroy_linespec_result)
8550         (make_cleanup_destroy_linespec_result): Don't declare.
8551         * linespec.c (init_linespec_result): Remove.
8552         (linespec_result::~linespec_result): Rename from
8553         destroy_linespec_result.  Update.
8554         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8555         Remove.
8556         * breakpoint.c (create_breakpoint, break_range_command)
8557         (decode_location_default): Update.
8558         * ax-gdb.c (agent_command_1): Update.
8559
8560 2017-04-12  Tom Tromey  <tom@tromey.com>
8561
8562         * remote.c (remote_download_tracepoint): Update.
8563         * python/py-breakpoint.c (bppy_get_location): Update.
8564         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8565         (gdbscm_breakpoint_location): Update.
8566         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8567         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8568         Change type to event_location_up.
8569         * breakpoint.c (create_overlay_event_breakpoint)
8570         (create_longjmp_master_breakpoint)
8571         (create_std_terminate_master_breakpoint)
8572         (create_exception_master_breakpoint)
8573         (breakpoint_event_location_empty_p, print_breakpoint_location)
8574         (print_one_breakpoint_location, create_thread_event_breakpoint)
8575         (init_breakpoint_sal, create_breakpoint)
8576         (print_recreate_ranged_breakpoint, break_range_command)
8577         (init_ada_exception_breakpoint, say_where): Update.
8578         (base_breakpoint_dtor): Don't call delete_event_location.
8579         (bkpt_print_recreate, tracepoint_print_recreate)
8580         (dprintf_print_recreate, update_static_tracepoint)
8581         (breakpoint_re_set_default): Update.
8582
8583 2017-04-12  Tom Tromey  <tom@tromey.com>
8584
8585         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8586         type of "to_do".  Update.
8587         (compute_stack_depth): Use std::vector.
8588
8589 2017-04-12  Tom Tromey  <tom@tromey.com>
8590
8591         * printcmd.c (find_instruction_backward): Use std::vector.
8592
8593 2017-04-12  Tom Tromey  <tom@tromey.com>
8594
8595         * symfile.c (objfilep): Remove typedef.
8596         (reread_symbols): Use a std::vector.
8597
8598 2017-04-12  Tom Tromey  <tom@tromey.com>
8599
8600         * mi/mi-main.c (exec_direction_forward): Remove.
8601         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8602         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8603         scoped_restore.
8604         * guile/guile.c (guile_repl_command, guile_command)
8605         (gdbscm_execute_gdb_command): Use scoped_restore.
8606         * go-exp.y (go_parse): Use scoped_restore.
8607         * d-exp.y (d_parse): Use scoped_restore.
8608         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8609         * c-exp.y (c_parse): Use scoped_restore.
8610
8611 2017-04-12  Tom Tromey  <tom@tromey.com>
8612
8613         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8614         (mi_parse): Update return type.
8615         (mi_parse_free): Remove.
8616         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8617         (mi_parse::~mi_parse): Rename from mi_parse_free.
8618         (mi_parse_cleanup): Remove.
8619         (mi_parse): Return a unique_ptr.  Use new.
8620         * mi/mi-main.c (mi_execute_command): Update.
8621
8622 2017-04-12  Tom Tromey  <tom@tromey.com>
8623
8624         * location.c (explicit_location_lex_one): Return a
8625         unique_xmalloc_ptr.
8626         (string_to_explicit_location): Update.  Remove cleanups.
8627
8628 2017-04-12  Tom Tromey  <tom@tromey.com>
8629
8630         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8631         (compare_value_and_voffset): Change type.  Update.
8632         (compute_vtable_size): Change type of "offset_vec".
8633         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8634         (gnuv3_get_typeid): Remove extraneous declaration.
8635
8636 2017-04-12  Tom Tromey  <tom@tromey.com>
8637
8638         * charset.h (wchar_iterator): Fix comment.
8639
8640 2017-04-12  Tom Tromey  <tom@tromey.com>
8641
8642         * charset.c (iconv_wrapper): New class.
8643         (cleanup_iconv): Remove.
8644         (convert_between_encodings): Use it.
8645
8646 2017-04-12  Tom Tromey  <tom@tromey.com>
8647
8648         * symfile.h (increment_reading_symtab): Update type.
8649         * symfile.c (decrement_reading_symtab): Remove.
8650         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8651         * psymtab.c (psymtab_to_symtab): Update.
8652         * dwarf2read.c (dw2_instantiate_symtab): Update.
8653
8654 2017-04-12  Tom Tromey  <tom@tromey.com>
8655
8656         * jit.c (struct jit_reader): Declare separately.  Add constructor
8657         and destructor.  Change type of "handle".
8658         (loaded_jit_reader): Define separately.
8659         (jit_reader_load): Update.  New "new".
8660         (jit_reader_unload_command): Use "delete".
8661         * gdb-dlfcn.h (struct dlclose_deleter): New.
8662         (gdb_dlhandle_up): New typedef.
8663         (gdb_dlopen, gdb_dlsym): Update types.
8664         (gdb_dlclose): Remove.
8665         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8666         (gdb_dlsym): Change type of "handle".
8667         (make_cleanup_dlclose): Remove.
8668         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8669         * compile/compile-c-support.c (load_libcc): Update.
8670
8671 2017-04-12  Tom Tromey  <tom@tromey.com>
8672
8673         * symtab.h (find_pcs_for_symtab_line): Change return type.
8674         * symtab.c (find_pcs_for_symtab_line): Change return type.
8675         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8676         type of "vec".  Update.
8677         (ltpy_get_pcs_for_line): Update.
8678         * linespec.c (decode_digits_ordinary): Update.
8679
8680 2017-04-12  Tom Tromey  <tom@tromey.com>
8681
8682         * tracepoint.c (actions_command): Update.
8683         * python/python.c (python_command, python_interactive_command):
8684         Update.
8685         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8686         * guile/guile.c (guile_command): Update.
8687         * defs.h (read_command_lines, read_command_lines_1): Return
8688         command_line_up.
8689         (command_lines_deleter): New struct.
8690         (command_line_up): New typedef.
8691         * compile/compile.c (compile_code_command)
8692         (compile_print_command): Update.
8693         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8694         command_line_up.
8695         (make_cleanup_free_command_lines): Remove.
8696         * cli/cli-script.c (get_command_line, read_command_lines_1)
8697         (copy_command_lines): Return command_line_up.
8698         (while_command, if_command, read_command_lines, define_command)
8699         (document_command): Update.
8700         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8701         Remove.
8702         * breakpoint.h (breakpoint_set_commands): Change type of
8703         "commands".
8704         * breakpoint.c (breakpoint_set_commands): Change type of
8705         "commands".  Update.
8706         (do_map_commands_command, update_dprintf_command_list)
8707         (create_tracepoint_from_upload): Update.
8708
8709 2017-04-12  Tom Tromey  <tom@tromey.com>
8710
8711         * tracepoint.c (scope_info): Update.
8712         * spu-tdep.c (spu_catch_start): Update.
8713         * python/python.c (gdbpy_decode_line): Update.
8714         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8715         * python/py-breakpoint.c (bppy_init): Update.
8716         * probe.c (parse_probes): Update.
8717         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8718         * location.h (event_location_deleter): New struct.
8719         (event_location_up): New typedef.
8720         (new_linespec_location, new_address_location, new_probe_location)
8721         (new_explicit_location, copy_event_location)
8722         (string_to_event_location, string_to_event_location_basic)
8723         (string_to_explicit_location): Update return type.
8724         (make_cleanup_delete_event_location): Remove.
8725         * location.c (new_linespec_location, new_address_location)
8726         (new_probe_location, new_explicit_location, copy_event_location):
8727         Return event_location_up.
8728         (delete_event_location_cleanup)
8729         (make_cleanup_delete_event_location): Remove.
8730         (string_to_explicit_location, string_to_event_location_basic)
8731         (string_to_event_location): Return event_location_up.
8732         * linespec.c (canonicalize_linespec, event_location_to_sals)
8733         (decode_line_with_current_source)
8734         (decode_line_with_last_displayed, decode_objc): Update.
8735         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8736         * completer.c (location_completer): Update.
8737         * cli/cli-cmds.c (edit_command, list_command): Update.
8738         * breakpoint.c (create_overlay_event_breakpoint)
8739         (create_longjmp_master_breakpoint)
8740         (create_std_terminate_master_breakpoint)
8741         (create_exception_master_breakpoint)
8742         (create_thread_event_breakpoint): Update.
8743         (init_breakpoint_sal): Update.  Remove some dead code.
8744         (create_breakpoint_sal): Change type of "location".  Update.
8745         (create_breakpoints_sal, create_breakpoint, break_command_1)
8746         (dprintf_command, break_range_command, until_break_command)
8747         (init_ada_exception_breakpoint)
8748         (strace_marker_create_sals_from_location)
8749         (update_static_tracepoint, trace_command, ftrace_command)
8750         (strace_command, create_tracepoint_from_upload): Update.
8751         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8752         * ax-gdb.c (agent_command_1): Update.
8753
8754 2017-04-12  Pedro Alves  <palves@redhat.com>
8755
8756         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8757         * configure.tgt: Handle i[34567]86-*-go32* and
8758         i[34567]86-*-msdosdjgpp*.
8759         * i386-tdep.c (i386_svr4_reg_to_regnum):
8760         Make extern.
8761         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8762         i386-go32-tdep.c.
8763         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8764         * i386-go32-tdep.c: New file.
8765         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8766         declarations.
8767
8768 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8769
8770         * aix-thread.c (pd_status2str): Change return type to const char *.
8771
8772 2017-04-12  Pedro Alves  <palves@redhat.com>
8773
8774         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8775         calls to set_gdbarch_gnu_triplet_regexp.
8776
8777 2017-04-12  Pedro Alves  <palves@redhat.com>
8778
8779         PR gdb/21323
8780         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8781         New enum value.
8782         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8783         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8784         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8785         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8786         * gdbarch.h, gdbarch.c: Regenerate.
8787         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8788         gdbarch_wchar_bit and gdbarch_wchar_signed.
8789         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8790         * arm-tdep.c (arm_gdbarch_init): Likewise.
8791         * avr-tdep.c (avr_gdbarch_init): Likewise.
8792         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8793         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8794         * i386-tdep.c (i386_go32_init_abi): Likewise.
8795         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8796         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8797         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8798         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8799         * sh-tdep.c (sh_gdbarch_init): Likewise.
8800         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8801         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8802         * windows-tdep.c (windows_init_abi): Likewise.
8803         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8804
8805 2017-04-12  Pedro Alves  <palves@redhat.com>
8806
8807         PR c++/21323
8808         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8809         cplus_primitive_type_char32_t>: New enum values.
8810         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8811         and cplus_primitive_type_char32_t.
8812         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8813         32, use the archtecture's built-in type for char16_t and char32_t,
8814         respectively.  Otherwise, fallback to init_integer_type as before,
8815         but make the type unsigned, and issue a complaint.
8816         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8817
8818 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8819
8820         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8821         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8822
8823 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8824
8825         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8826         'const char *'.
8827
8828 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8829
8830         * common/common-utils.c (free_vector_argv): New function.
8831         * common/common-utils.h: Include <vector>.
8832         (free_vector_argv): New prototype.
8833         * darwin-nat.c (darwin_create_inferior): Rewrite function
8834         prototype in order to constify "exec_file" and accept a
8835         "std::string" for "allargs".
8836         * fork-child.c: Include <vector>.
8837         (breakup_args): Rewrite function, using C++.
8838         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8839         and accept "std::string" for "allargs".  Update the code to
8840         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8841         and "execvp".
8842         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8843         order to constify "exec_file" and accept a "std::string" for
8844         "allargs".
8845         * go32-nat.c (go32_create_inferior): Likewise.
8846         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8847         * infcmd.c (run_command_1): Constify "exec_file".  Use
8848         "std::string" for inferior arguments.
8849         * inferior.h (fork_inferior): Update prototype.
8850         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8851         prototype in order to constify "exec_file" and accept a
8852         "std::string" for "allargs".
8853         * nto-procfs.c (procfs_create_inferior): Likewise.
8854         * procfs.c (procfs_create_inferior): Likewise.
8855         * remote-sim.c (gdbsim_create_inferior): Likewise.
8856         * remote.c (extended_remote_run): Update code to accept
8857         "std::string" as argument.
8858         (extended_remote_create_inferior): Rewrite function prototype in
8859         order to constify "exec_file" and accept a "std::string" for
8860         "allargs".
8861         * rs6000-nat.c (super_create_inferior): Likewise.
8862         (rs6000_create_inferior): Likewise.
8863         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8864         * windows-nat.c (windows_create_inferior): Likewise.
8865
8866 2017-04-11  Pedro Alves  <palves@redhat.com>
8867
8868         * thread.c: Fix whitespace throughout.
8869
8870 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8871
8872         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8873
8874 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8875
8876         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8877
8878 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8879
8880         PR gdb/21364
8881         * osdata.c (info_osdata): Check if 'type' is an empty string
8882         instead of NULL.
8883
8884 2017-04-10  Pedro Alves  <palves@redhat.com>
8885
8886         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8887         (ptid_to_global_thread_id, in_thread_list)
8888         (do_captured_list_thread_ids, set_resumed, set_running)
8889         (set_executing, set_stop_requested, finish_thread_state)
8890         (validate_registers_access, can_access_registers_ptid)
8891         (print_thread_info_1, switch_to_thread)
8892         (do_restore_current_thread_cleanup)
8893         (make_cleanup_restore_current_thread, thread_command)
8894         (thread_name_command): Use operator== instead of ptid_equal.
8895
8896 2017-04-10  Pedro Alves  <palves@redhat.com>
8897
8898         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8899         (current_thread_cleanup_chain): Delete.
8900         (restore_current_thread_cleanup_dtor)
8901         (make_cleanup_restore_current_thread): Remove references to
8902         current_thread_cleanup_chain.
8903
8904 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8905
8906         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8907         REG_UNKNOWN.
8908
8909 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8910
8911         PR gdb/19942
8912         * gdbthread.h (thread_info::deletable): New method.
8913         (thread_info::incref): New method.
8914         (thread_info::decref): New method.
8915         (thread_info::refcount): Move it to private.
8916         * infrun.c (save_stop_context): Call inc_refcount.
8917         (release_stop_context_cleanup): Likewise.
8918         * thread.c (set_thread_exited): New function.
8919         (init_thread_list): Delete "tp" only it is deletable, otherwise
8920         call set_thread_exited.
8921         (delete_thread_1): Call set_thread_exited.
8922         (current_thread_cleanup) <inferior_pid>: Remove.
8923         <thread>: New field.
8924         (restore_current_thread_ptid_changed): Removed.
8925         (do_restore_current_thread_cleanup): Adjust.
8926         (restore_current_thread_cleanup_dtor): Don't call
8927         find_thread_ptid.
8928         (set_thread_refcount): Use dec_refcount.
8929         (make_cleanup_restore_current_thread): Adjust.
8930         (thread_apply_all_command): Call inc_refcount.
8931         (_initialize_thread): Don't call
8932         observer_attach_thread_ptid_changed.
8933
8934 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8935
8936         * thread.c (delete_thread_1): Hoist code on marking thread as
8937         exited.
8938
8939 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8940
8941         * windows-nat.c (windows_detach): Initialize ptid with
8942         minus_one_ptid.
8943
8944 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8945
8946         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8947
8948 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8949
8950         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8951         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8952         (bfin_pseudo_register_write): Likewise
8953
8954 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8955
8956         * common/ptid.h (struct ptid): Change to...
8957         (class ptid_t): ... this.
8958         <ptid_t>: New constructors.
8959         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8960         matches>: New methods.
8961         <make_null, make_minus_one>: New static methods.
8962         <pid>: Rename to...
8963         <m_pid>: ...this.
8964         <lwp>: Rename to...
8965         <m_lwp>: ...this.
8966         <tid>: Rename to...
8967         <m_tid>: ...this.
8968         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8969         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8970         as references, move comment to class ptid_t.
8971         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8972         ptid_t static methods.
8973         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8974         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8975         Take ptid arguments as references, implement using ptid_t methods.
8976         * unittests/ptid-selftests.c: New file.
8977         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8978         unittests/ptid-selftests.c.
8979         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8980
8981 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8982
8983         * python/python.c (python_run_simple_file): Cast mode literal to
8984         non-const char pointer as expected by PyFile_FromString.
8985
8986 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8987
8988         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8989         minus_one_ptid and null_ptid.
8990
8991 2017-04-05  Pedro Alves  <palves@redhat.com>
8992
8993         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8994         * configure: Regenerate.
8995
8996 2017-04-05  Pedro Alves  <palves@redhat.com>
8997
8998         * ada-exp.y (yyerror): Constify.
8999         * ada-lang.c (bound_name, get_selections)
9000         (ada_variant_discrim_type)
9001         (ada_variant_discrim_name, ada_value_struct_elt)
9002         (ada_lookup_struct_elt_type, is_unchecked_variant)
9003         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9004         (catch_ada_exception_command_split)
9005         (catch_ada_assert_command_split, catch_assert_command)
9006         (ada_op_name): Constify.
9007         * ada-lang.h (ada_yyerror, get_selections)
9008         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9009         * arc-tdep.c (arc_print_frame_cache): Constify.
9010         * arm-tdep.c (arm_skip_stub): Constify.
9011         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9012         (gen_aggregate_elt_ref): Constify.
9013         * bcache.c (print_bcache_statistics): Constify.
9014         * bcache.h (print_bcache_statistics): Constify.
9015         * break-catch-throw.c (catch_exception_command_1):
9016         * breakpoint.c (struct ep_type_description::description):
9017         Constify.
9018         (add_solib_catchpoint): Constify.
9019         (catch_fork_command_1): Add cast.
9020         (add_catch_command): Constify.
9021         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9022         Constify.
9023         * bsd-uthread.c (bsd_uthread_state): Constify.
9024         * buildsym.c (patch_subfile_names): Constify.
9025         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9026         Constify.
9027         * c-exp.y (yyerror): Constify.
9028         (token::oper): Constify.
9029         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9030         * c-varobj.c (cplus_describe_child): Constify.
9031         * charset.c (find_charset_names): Add cast.
9032         (find_charset_names): Constify array and add const_cast.
9033         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9034         (edit_command): Constify.
9035         * cli/cli-decode.c (lookup_cmd): Constify.
9036         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9037         Constify.
9038         (struct dump_context): Constify.
9039         (add_dump_command, restore_command): Constify.
9040         * cli/cli-script.c (get_command_line): Constify.
9041         * cli/cli-script.h (get_command_line): Constify.
9042         * cli/cli-utils.c (check_for_argument): Constify.
9043         * cli/cli-utils.h (check_for_argument): Constify.
9044         * coff-pe-read.c (struct read_pe_section_data): Constify.
9045         * command.h (lookup_cmd): Constify.
9046         * common/print-utils.c (decimal2str): Constify.
9047         * completer.c (gdb_print_filename): Constify.
9048         * corefile.c (set_gnutarget): Constify.
9049         * cp-name-parser.y (yyerror): Constify.
9050         * cp-valprint.c (cp_print_class_member): Constify.
9051         * cris-tdep.c (cris_register_name, crisv32_register_name):
9052         Constify.
9053         * d-exp.y (yyerror): Constify.
9054         (struct token::oper): Constify.
9055         * d-lang.h (d_yyerror): Constify.
9056         * dbxread.c (struct header_file_location::name): Constify.
9057         (add_old_header_file, add_new_header_file, last_function_name)
9058         (dbx_next_symbol_text, add_bincl_to_list)
9059         (find_corresponding_bincl_psymtab, set_namestring)
9060         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9061         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9062         * defs.h (command_line_input, print_address_symbolic)
9063         (deprecated_readline_begin_hook): Constify.
9064         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9065         Constify.
9066         * event-top.c (handle_line_of_input): Constify and add cast.
9067         * exceptions.c (catch_errors): Constify.
9068         * exceptions.h (catch_errors): Constify.
9069         * expprint.c (print_subexp_standard, op_string, op_name)
9070         (op_name_standard, dump_raw_expression, dump_raw_expression):
9071         * expression.h (op_name, op_string, dump_raw_expression):
9072         Constify.
9073         * f-exp.y (yyerror): Constify.
9074         (struct token::oper): Constify.
9075         (struct f77_boolean_val::name): Constify.
9076         * f-lang.c (f_word_break_characters): Constify.
9077         * f-lang.h (f_yyerror): Constify.
9078         * fork-child.c (fork_inferior): Add cast.
9079         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9080         (new_variant): Constify.
9081         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9082         * gdbarch.c: Regenerate.
9083         * gdbcore.h (set_gnutarget): Constify.
9084         * go-exp.y (yyerror): Constify.
9085         (token::oper): Constify.
9086         * go-lang.h (go_yyerror): Constify.
9087         * go32-nat.c (go32_sysinfo): Constify.
9088         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9089         * guile/scm-cmd.c (cmdscm_function): Constify.
9090         * guile/scm-param.c (pascm_param_value): Constify.
9091         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9092         (h8300sx_register_name): Constify.
9093         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9094         Constify.
9095         * ia64-tdep.c (ia64_register_names): Constify.
9096         * infcmd.c (construct_inferior_arguments): Constify.
9097         (path_command, attach_post_wait): Constify.
9098         * language.c (show_range_command, show_case_command)
9099         (unk_lang_error): Constify.
9100         * language.h (language_defn::la_error)
9101         (language_defn::la_name_of_this): Constify.
9102         * linespec.c (decode_line_2): Constify.
9103         * linux-thread-db.c (thread_db_err_str): Constify.
9104         * lm32-tdep.c (lm32_register_name): Constify.
9105         * m2-exp.y (yyerror): Constify.
9106         * m2-lang.h (m2_yyerror): Constify.
9107         * m32r-tdep.c (m32r_register_names): Constify and make static.
9108         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9109         * m88k-tdep.c (m88k_register_name): Constify.
9110         * macroexp.c (appendmem): Constify.
9111         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9112         (upgrade_type, parse_external, parse_partial_symbols)
9113         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9114         (new_symbol): Constify.
9115         * memattr.c (mem_info_command): Constify.
9116         * mep-tdep.c (register_name_from_keyword): Constify.
9117         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9118         Constify.
9119         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9120         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9121         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9122         cast.
9123         (mi_execute_async_cli_command): Constify.
9124         * mips-tdep.c (mips_register_name): Constify.
9125         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9126         (am33_register_name, am33_2_register_name)
9127         * moxie-tdep.c (moxie_register_names): Constify.
9128         * nat/linux-osdata.c (osdata_type): Constify fields.
9129         * nto-tdep.c (nto_parse_redirection): Constify.
9130         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9131         (lookup_child_selector): Constify.
9132         (objc_methcall::name): Constify.
9133         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9134         (lookup_struct_typedef): Constify.
9135         * objfiles.c (pc_in_section): Constify.
9136         * objfiles.h (pc_in_section): Constify.
9137         * p-exp.y (struct token::oper): Constify.
9138         (yyerror): Constify.
9139         * p-lang.h (pascal_yyerror): Constify.
9140         * parser-defs.h (op_name_standard): Constify.
9141         (op_print::string): Constify.
9142         (exp_descriptor::op_name): Constify.
9143         * printcmd.c (print_address_symbolic): Constify.
9144         * psymtab.c (print_partial_symbols): Constify.
9145         * python/py-breakpoint.c (stop_func): Constify.
9146         (bppy_get_expression): Constify.
9147         * python/py-cmd.c (cmdpy_completer::name): Constify.
9148         (cmdpy_function): Constify.
9149         * python/py-event.c (evpy_add_attribute)
9150         (gdbpy_initialize_event_generic): Constify.
9151         * python/py-event.h (evpy_add_attribute)
9152         (gdbpy_initialize_event_generic): Constify.
9153         * python/py-evts.c (add_new_registry): Constify.
9154         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9155         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9156         * python/py-inferior.c (get_buffer): Add cast.
9157         * python/py-param.c (parm_constant::name): Constify.
9158         * python/py-unwind.c (fprint_frame_id): Constify.
9159         * python/python.c (gdbpy_parameter_value): Constify.
9160         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9161         * remote.c (memory_packet_config::name): Constify.
9162         (show_packet_config_cmd, remote_write_bytes)
9163         (remote_buffer_add_string):
9164         * reverse.c (exec_reverse_once): Constify.
9165         * rs6000-tdep.c (variant::name, variant::description): Constify.
9166         * rust-exp.y (rustyyerror): Constify.
9167         * rust-lang.c (rust_op_name): Constify.
9168         * rust-lang.h (rustyyerror): Constify.
9169         * serial.h (serial_ops::name): Constify.
9170         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9171         (sh_sh3e_register_name, sh_sh2e_register_name)
9172         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9173         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9174         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9175         (sh_sh4al_dsp_register_name): Constify.
9176         * sh64-tdep.c (sh64_register_name): Constify.
9177         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9178         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9179         * stabsread.c (patch_block_stabs, read_type_number)
9180         (ref_map::stabs, ref_add, process_reference)
9181         (symbol_reference_defined, define_symbol, define_symbol)
9182         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9183         (read_one_struct_field, read_struct_fields, read_baseclasses)
9184         (read_tilde_fields, read_struct_type, read_array_type)
9185         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9186         (read_huge_number, read_range_type, read_args, common_block_start)
9187         (find_name_end): Constify.
9188         * stabsread.h (common_block_start, define_symbol)
9189         (process_one_symbol, symbol_reference_defined, ref_add):
9190         * symfile.c (get_section_index, add_symbol_file_command):
9191         * symfile.h (get_section_index): Constify.
9192         * target-descriptions.c (tdesc_type::name): Constify.
9193         (tdesc_free_type): Add cast.
9194         * target.c (find_default_run_target):
9195         (add_deprecated_target_alias, find_default_run_target)
9196         (target_announce_detach): Constify.
9197         (do_option): Constify.
9198         * target.h (add_deprecated_target_alias): Constify.
9199         * thread.c (print_thread_info_1): Constify.
9200         * top.c (deprecated_readline_begin_hook, command_line_input):
9201         Constify.
9202         (init_main): Add casts.
9203         * top.h (handle_line_of_input): Constify.
9204         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9205         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9206         (tfind_command): Rename to ...
9207         (tfind_command_1): ... this and constify.
9208         (tfind_command): New function.
9209         (tfind_end_command, tfind_start_command): Adjust.
9210         (encode_source_string): Constify.
9211         * tracepoint.h (encode_source_string): Constify.
9212         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9213         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9214         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9215         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9216         * tui/tui-win.c (parse_scrolling_args): Constify.
9217         * tui/tui-windata.c (tui_erase_data_content): Constify.
9218         * tui/tui-windata.h (tui_erase_data_content): Constify.
9219         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9220         * tui/tui.c (tui_enable): Add cast.
9221         * utils.c (defaulted_query): Constify.
9222         (init_page_info): Add cast.
9223         (puts_debug, subset_compare): Constify.
9224         * utils.h (subset_compare): Constify.
9225         * varobj.c (varobj_format_string): Constify.
9226         * varobj.h (varobj_format_string): Constify.
9227         * vax-tdep.c (vax_register_name): Constify.
9228         * windows-nat.c (windows_detach): Constify.
9229         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9230         * xml-support.c (gdb_xml_end_element): Constify.
9231         * xml-tdesc.c (tdesc_start_reg): Constify.
9232         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9233         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9234         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9235
9236 2017-04-05  Pedro Alves  <palves@redhat.com>
9237
9238         * proc-api.c (struct trans): Constify.
9239         (procfs_note): Constify.
9240         * proc-events.c (struct trans, syscall_table):
9241         * proc-flags.c (struct trans): Constify.
9242         * proc-utils.h (procfs_note): Constify.
9243         * proc-why.c (struct trans): Constify.
9244         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9245         (procfs_detach): Constify.
9246         * sol-thread.c (struct string_map): Constify.
9247         (td_err_string, td_state_string): Constify.
9248
9249 2017-04-05  Pedro Alves  <palves@redhat.com>
9250
9251         * proc-api.c (procfs_filename): Don't initialize
9252         procfs_filename.
9253         (prepare_to_trace): Assume procfs_filename is non-NULL.
9254         (_initialize_proc_api): Give procfs_filename a default value here.
9255
9256 2017-04-05  Pedro Alves  <palves@redhat.com>
9257
9258         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9259         'cond_string' parameter.
9260         (extract_exception_regexp): Constify 'string' parameter.
9261         (catch_exception_command_1): Constify.
9262         * breakpoint.c (init_catchpoint)
9263         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9264         parameter.
9265         (ep_parse_optional_if_clause, catch_fork_command_1)
9266         (catch_exec_command_1): Constify.
9267         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9268         parameter.
9269         (ep_parse_optional_if_clause): Constify.
9270         * cli/cli-utils.c (remove_trailing_whitespace)
9271         (check_for_argument): Constify.
9272         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9273         non-const overload.
9274         (check_for_argument): Likewise.
9275
9276 2017-04-05  Pedro Alves  <palves@redhat.com>
9277
9278         * event-top.c (command_line_handler): Add cast to execute_command
9279         call.
9280         * record-btrace.c (cmd_record_btrace_bts_start)
9281         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9282         (cmd_record_btrace_start): Add cast to execute_command call.
9283         * record-full.c (record_full_goto_insn):
9284         * record.c (record_start, record_stop): Add cast to
9285         execute_command_to_string calls.
9286         (cmd_record_start): Add cast to execute_command calls.
9287
9288 2017-04-05  Pedro Alves  <palves@redhat.com>
9289
9290         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9291         static inline function.
9292         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9293         array and use gdb_PyArg_ParseTupleAndKeywords.
9294         * python/py-cmd.c (cmdpy_init): Likewise.
9295         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9296         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9297         (infpy_search_memory): Likewise.
9298         * python/py-objfile.c (objfpy_add_separate_debug_file)
9299         (gdbpy_lookup_objfile): Likewise.
9300         * python/py-symbol.c (gdbpy_lookup_symbol)
9301         (gdbpy_lookup_global_symbol): Likewise.
9302         * python/py-type.c (gdbpy_lookup_type): Likewise.
9303         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9304         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9305         Likewise.
9306
9307 2017-04-05  Pedro Alves  <palves@redhat.com>
9308
9309         * python/python-internal.h (gdb_PyGetSetDef): New type.
9310         * python/py-block.c (block_object_getset)
9311         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9312         * python/py-event.c (event_object_getset)
9313         (finish_breakpoint_object_getset): Likewise.
9314         * python/py-inferior.c (inferior_object_getset): Likewise.
9315         * python/py-infthread.c (thread_object_getset): Likewise.
9316         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9317         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9318         * python/py-objfile.c (objfile_getset): Likewise.
9319         * python/py-progspace.c (pspace_getset): Likewise.
9320         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9321         Likewise.
9322         * python/py-record.c (recpy_record_getset): Likewise.
9323         * python/py-symbol.c (symbol_object_getset): Likewise.
9324         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9325         Likewise.
9326         * python/py-type.c (type_object_getset, field_object_getset):
9327         Likewise.
9328         * python/py-value.c (value_object_getset): Likewise.
9329
9330 2017-04-05  Pedro Alves  <palves@redhat.com>
9331
9332         * python/python-internal.h (gdb_PyObject_CallMethod)
9333         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9334         New functions.
9335         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9336         (PySys_GetObject, PySys_SetPath): New macros.
9337
9338 2017-04-05  Pedro Alves  <palves@redhat.com>
9339
9340         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9341         info_osdata_command.
9342         * osdata.c (info_osdata_command): Rename to ...
9343         (info_osdata): ... this.  Constify 'type' parameter, and remove
9344         the 'from_tty' parameter.  Accept NULL TYPE.
9345         (info_osdata_command): New function.
9346         * osdata.h (info_osdata_command): Remove declaration.
9347         (info_osdata): New declaration.
9348
9349 2017-04-05  Pedro Alves  <palves@redhat.com>
9350
9351         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9352         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9353         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9354         parameter.
9355         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9356         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9357         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9358         parameter.
9359         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9360         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9361         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9362         (mi_cmd_file_list_exec_source_files)
9363         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9364         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9365         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9366         parameter.
9367         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9368         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9369         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9370         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9371         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9372         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9373         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9374         'command' parameter.
9375         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9376         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9377         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9378         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9379         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9380         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9381         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9382         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9383         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9384         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9385         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9386         parameter.
9387         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9388         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9389         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9390         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9391         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9392         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9393         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9394         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9395         (mi_cmd_data_list_changed_registers)
9396         (mi_cmd_data_write_register_values)
9397         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9398         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9399         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9400         (mi_cmd_list_features, mi_cmd_list_target_features)
9401         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9402         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9403         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9404         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9405         (mi_cmd_trace_frame_collected): Constify 'command'
9406         parameter.
9407         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9408         'command' parameter.
9409
9410 2017-04-05  Pedro Alves  <palves@redhat.com>
9411
9412         * ada-lang.c (ada_completer_word_break_characters): Now a const
9413         array.
9414         (ada_get_gdb_completer_word_break_characters): Constify.
9415         * completer.c (gdb_completer_command_word_break_characters)
9416         (gdb_completer_file_name_break_characters)
9417         (gdb_completer_quote_characters): Now const arrays.
9418         (get_gdb_completer_quote_characters): Constify.
9419         (set_rl_completer_word_break_characters): New function.
9420         (set_gdb_completion_word_break_characters)
9421         (complete_line_internal): Use it.
9422         * completer.h (get_gdb_completer_quote_characters): Constify.
9423         (set_rl_completer_word_break_characters): Declare.
9424         * f-lang.c (f_word_break_characters): Constify.
9425         * language.c (default_word_break_characters): Constify.
9426         * language.h (language_defn::la_word_break_characters): Constify.
9427         (default_word_break_characters): Constify.
9428         * top.c (init_main): Use set_rl_completer_word_break_characters.
9429
9430 2017-04-05  Pedro Alves  <palves@redhat.com>
9431
9432         * aix-thread.c (aix_thread_pid_to_str)
9433         (aix_thread_extra_thread_info): Constify.
9434         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9435         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9436         (bsd_uthread_pid_to_str): Constify.
9437         * corelow.c (core_pid_to_str): Constify.
9438         * darwin-nat.c (darwin_pid_to_str): Constify.
9439         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9440         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9441         Constify.
9442         * gnu-nat.c (gnu_pid_to_str): Constify.
9443         * go32-nat.c (go32_pid_to_str): Constify.
9444         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9445         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9446         * inferior.c (inferior_pid_to_str): Constify.
9447         * linux-nat.c (linux_nat_pid_to_str): Constify.
9448         * linux-tdep.c (linux_core_pid_to_str): Constify.
9449         * linux-thread-db.c (thread_db_pid_to_str)
9450         (thread_db_extra_thread_info): Constify.
9451         * nto-tdep.c (nto_extra_thread_info): Constify.
9452         * nto-tdep.h (nto_extra_thread_info): Constify.
9453         * obsd-nat.c (obsd_pid_to_str): Constify.
9454         * procfs.c (procfs_pid_to_str): Constify.
9455         * ravenscar-thread.c (ravenscar_extra_thread_info)
9456         (ravenscar_pid_to_str): Constify.
9457         * remote-sim.c (gdbsim_pid_to_str): Constify.
9458         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9459         Constify.
9460         * sol-thread.c (solaris_pid_to_str): Constify.
9461         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9462         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9463         * target.c (default_pid_to_str, target_pid_to_str)
9464         (normal_pid_to_str, default_pid_to_str): Constify.
9465         * target.h (target_ops::to_pid_to_str)
9466         (target_ops::to_extra_thread_info): Constify.
9467         (target_pid_to_str, normal_pid_to_str): Constify.
9468         * windows-nat.c (windows_pid_to_str): Constify.
9469         * gdbarch.sh (core_pid_to_str): Constify.
9470         * target-delegates.c: Regenerate.
9471         * gdbarch.h, gdbarch.c: Regenerate.
9472
9473 2017-04-05  Pedro Alves  <palves@redhat.com>
9474
9475         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9476         the memory of the temporary warning_pre_print override.
9477         * utils.c (warning_pre_print): Constify.
9478         * utils.h (warning_pre_print): Constify.
9479
9480 2017-04-05  Pedro Alves  <palves@redhat.com>
9481
9482         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9483         (shell_command): New function.
9484         (make_command): Use std::string.
9485         (init_cli_cmds): Register shell_command instead of shell_escape.
9486
9487 2017-04-05  Pedro Alves  <palves@redhat.com>
9488
9489         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9490         * tracepoint.c (default_collect): Don't initialize.
9491
9492 2017-04-05  Pedro Alves  <palves@redhat.com>
9493
9494         * macroexp.c (macro_buffer::shared): Now a bool.
9495         (init_buffer): Update.
9496         (init_shared_buffer): Constify 'addr' parameter.
9497         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9498         casts.
9499
9500 2017-04-05  Pedro Alves  <palves@redhat.com>
9501
9502         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9503         * disasm.c (set_disassembler_options): Constify local.
9504         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9505
9506 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9507
9508         PR gdb/21352
9509         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9510         option.
9511
9512 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9513
9514         * frame.c (frame_unwind_register_unsigned): Call
9515         frame_unwind_register_value.
9516
9517 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9518
9519         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9520         Use gdb_test_multiple, and don't match anchor.
9521
9522 2017-04-05  Pedro Alves  <palves@redhat.com>
9523
9524         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9525         (Write After Approval): Remove Simon Marchi.
9526
9527 2017-04-05  Pedro Alves  <palves@redhat.com>
9528
9529         * common/gdb_optional.h (optional::optional): Make constexpr and
9530         initialize m_dummy.
9531
9532 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9533
9534         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9535         (amd64fbsd_jmp_buf_reg_offset): Remove.
9536         (amd64fbsd_supply_uthread): Remove function.
9537         (amd64fbsd_collect_uthread): Remove function.
9538         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9539         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9540         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9541         (fbsd-nat.c): Update comment.
9542         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9543         (i386fbsd_jmp_buf_reg_offset): Remove.
9544         (i386fbsd_supply_uthread): Remove function.
9545         (i386fbsd_collect_uthread): Remove function.
9546         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9547
9548 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9549
9550         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9551         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9552         * NEWS: Mention that support for FreeBSD/alpha was removed.
9553         * alpha-fbsd-tdep.c: Delete file.
9554         * config/alpha/fbsd.mh: Delete file.
9555         * configure.host: Delete alpha*-*-freebsd* and
9556         alpha*-*-kfreebsd*-gnu.
9557         * configure.tgt: Delete alpha*-*-freebsd* and
9558         alpha*-*-kfreebsd*-gnu.
9559
9560 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9561
9562         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9563         amd64bsd_store_inferior_registers): Use ptid from regcache.
9564
9565 2017-04-04  Pedro Alves  <palves@redhat.com>
9566
9567         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9568         data fields, make them private and add "m_" prefixes.
9569         (lnp_state_machine::lnp_state_machine): New ctor.
9570         (record_line, check_line_address, handle_set_discriminator)
9571         (handle_set_address, handle_advance_pc, handle_special_opcode)
9572         (handle_advance_line, handle_set_file, handle_negate_stmt)
9573         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9574         (end_sequence, advance_line): New methods.
9575         (m_gdbarch, m_record_lines_p): New fields.
9576         (lnp_reader_state): Delete.
9577         (dwarf_record_line): Rename to ...
9578         (lnp_state_machine::record_line): ... adjust.
9579         (init_lnp_state_machine): Delete.
9580         (lnp_state_machine::lnp_state_machine): New.
9581         (check_line_address): Rename to ...
9582         (lnp_state_machine::check_line_address): This.
9583         (dwarf_decode_lines_1): Remove reference to "reader_state".
9584         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9585         State machine internal state manipulation moved to
9586         lnp_state_machine methods.
9587
9588 2017-04-04  Pedro Alves  <palves@redhat.com>
9589
9590         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9591         unittests/offset-type-selftests.c.
9592         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9593         * common/offset-type.h: New file.
9594         * common/preprocessor.h: New file.
9595         * common/traits.h: New file.
9596         * common/valid-expr.h: New file.
9597         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9598         sect_offset and cu_offset strong typedefs throughout.
9599         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9600         typedefs throughout.
9601         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9602         sect_offset and cu_offset strong typedefs throughout.
9603         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9604         typedefs throughout.
9605         * gdbtypes.h: Include "common/offset-type.h".
9606         (cu_offset): Now an offset type (strong typedef) instead of a
9607         struct.
9608         (sect_offset): Likewise.
9609         (union call_site_parameter_u): Rename "param_offset" field to
9610         "param_cu_off".
9611         * unittests/offset-type-selftests.c: New file.
9612
9613 2017-04-04  Pedro Alves  <palves@redhat.com>
9614
9615         * common/underlying.h: New file.
9616         * dwarf2read.c: Include "common/gdb_optional.h" and
9617         "common/underlying.h".
9618         (dir_index, file_name_index): New types.
9619         (file_entry): Use them.
9620         (file_entry::include): Use to_underlying.
9621         (line_header::add_file_name): Use dir_index.
9622         (read_formatted_entries): Use gdb::optional.  Read form before
9623         writting to file_entry.
9624         (dwarf_decode_line_header): Use dir_index.
9625         (lnp_state_machine::current_file): Use to_underlying.
9626         (lnp_state_machine::file): Change type to file_name_index.
9627         (dwarf_record_line): Use to_underlying.
9628         (init_lnp_state_machine): Use file_name_index.
9629         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9630
9631 2017-04-04  Pedro Alves  <palves@redhat.com>
9632
9633         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9634         operator bool, has_value and get methods.
9635
9636 2017-04-04  Pedro Alves  <palves@redhat.com>
9637
9638         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9639         fields.
9640         (line_header): Initialize all data fields.  Change type of
9641         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9642         Change type of include_dirs to std::vector<const char *>.  Remove
9643         num_include_dirs, include_dirs_size.  Change type of file_names to
9644         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9645         (line_header::line_header): New.
9646         (line_header::add_include_dir, line_header::add_file_name): New
9647         methods.
9648         (line_header::include_dir_at): Remove NULL check.
9649         (line_header::file_name_at): Add const overload.
9650         (line_header_up): New unique_ptr typedef.
9651         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9652         std::vector.  Remove free_line_header call.
9653         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9654         free_line_header call.
9655         (free_cu_line_header): Delete.
9656         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9657         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9658         Adjust to use std::vector.
9659         (free_line_header): Delete.
9660         (free_line_header_voidp): Use delete.
9661         (add_include_dir): Replace with ...
9662         (line_header::add_include_dir): ... this method.  Use std::vector.
9663         (add_file_name): Replace with ...
9664         (line_header::add_file_name): ... this method.  Use std::vector.
9665         (add_include_dir_stub): Delete.
9666         (read_formatted_entries): Remove memset.
9667         (dwarf_decode_line_header): Return a line_header_up instead of a
9668         raw pointer.  Remove cleanup handling.  Pass lambdas to
9669         read_formatted_entries.  Adjust to use line_header methods.
9670         (dwarf_decode_lines_1): Adjust to use line_header methods.
9671         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9672         use std::vector.
9673
9674 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9675
9676         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9677         instead of struct ptid.
9678
9679 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9680
9681         * frame.c (get_frame_register_bytes): Unwind using value.
9682         (put_frame_register_bytes): Likewise.
9683
9684 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9685
9686         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9687         aggregate-like.
9688
9689 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9690
9691         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9692
9693 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9694
9695         * gdbthread.h (struct thread_info): Declare constructor and
9696         destructor.  Add some in-class member initializers.
9697         * thread.c (free_thread): Remove.
9698         (init_thread_list): Call delete instead of free_thread.
9699         (new_thread): Call thread_info constructor.
9700         (thread_info::thread_info): New function.
9701         (thread_info::~thread_info): New function.
9702         (delete_thread_1): Call delete instead of free_thread.
9703         (make_cleanup_restore_current_thread): Move tp and frame to
9704         inner block.
9705
9706 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9707
9708         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9709         (arc_skip_prologue): Likewise.
9710         (arc_make_frame_cache): Likewise.
9711         (arc_pv_get_operand): New function.
9712         (arc_is_in_prologue): Likewise.
9713         (arc_analyze_prologue): Likewise.
9714         (arc_print_frame_cache): Likewise.
9715         (MAX_PROLOGUE_LENGTH): New constant.
9716
9717 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9718
9719         * configure.tgt: Add arc-insn.o.
9720         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9721         (dump_arc_instruction_command): New function.
9722         (arc_fprintf_disasm): Likewise.
9723         (arc_disassemble_info): Likewise.
9724         (arc_insn_get_operand_value): Likewise.
9725         (arc_insn_get_operand_value_signed): Likewise.
9726         (arc_insn_get_memory_base_reg): Likewise.
9727         (arc_insn_get_memory_offset): Likewise.
9728         (arc_insn_get_branch_target): Likewise.
9729         (arc_insn_dump): Likewise.
9730         (arc_insn_get_linear_next_pc): Likewise.
9731         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9732         (arc_disassemble_info): Likewise.
9733         (arc_insn_get_branch_target): Likewise.
9734         (arc_insn_get_linear_next_pc): Likewise.
9735         * NEWS: Mention new "maint print arc arc-instruction".
9736
9737 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9738
9739         * arc-tdep (maintenance_print_arc_list): New variable.
9740         (maintenance_print_arc_command): New function.
9741
9742 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9743
9744         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9745         Add "limm" and "reserved".
9746         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9747         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9748         * arc-tdep.h (arc_regnum): Likewise.
9749
9750 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9751
9752         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9753         for THREADPTR register.
9754         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9755         register.
9756         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9757         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9758         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9759
9760 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9761
9762         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9763         registers above gdbarch_num_regs (gdbarch) as privileged in
9764         call0 ABI.
9765
9766 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9767
9768         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9769         for a single specified register or for all registers in
9770         a0_base..a0_base + C0_NREGS range.
9771         (supply_gregset_reg): Call regcache_raw_supply for a single
9772         specified register or for all registers in a0_base..a0_base +
9773         C0_NREGS range.
9774
9775 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9776
9777         * arch/xtensa.h (C0_NREGS): Add definition.
9778         * xtensa-tdep.c (C0_NREGS): Remove definition.
9779
9780 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9781
9782         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9783         Drop xtensa_default_isa initialization.
9784         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9785
9786 2017-03-27  Pedro Alves  <palves@redhat.com>
9787
9788         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9789         (file_entry::include_dir): New method.
9790         (line_header::include_dir_at, line_header::file_name_at): New
9791         methods.
9792         (setup_type_unit_groups, setup_type_unit_groups)
9793         (psymtab_include_file_name): Simplify using the new methods.
9794         (lnp_state_machine) <the_line_header>: New field.
9795         <file>: Add comment.
9796         (lnp_state_machine::current_file): New method.
9797         (dwarf_record_line): Simplify using the new methods.
9798         (init_lnp_state_machine): Initialize the "the_line_header" field.
9799         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9800         Simplify using the new methods.
9801
9802 2017-03-27  Pedro Alves  <palves@redhat.com>
9803
9804         * cp-name-parser.y (make_empty): Delete.
9805         (demangler_special, nested_name, ptr_operator, array_indicator)
9806         (direct_declarator, declarator_1): Use fill_comp instead of
9807         make_empty.
9808
9809 2017-03-27  Pedro Alves  <palves@redhat.com>
9810
9811         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9812         to ATTRIBUTE_PRINTF.
9813         * solib-target.c (library_list_start_list): Print "string" not
9814         "version".
9815         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9816         gdb_xml_error call.
9817
9818 2017-03-27  Pedro Alves  <palves@redhat.com>
9819
9820         * dwarf2read.c (struct file_and_directory): New.
9821         (dwarf2_get_dwz_file): Adjust to use std::string.
9822         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9823         (find_file_and_directory): Adjust to return a file_and_directory
9824         object.
9825         (read_file_scope): Adjust to use file_and_directory.  Remove
9826         make_cleanup/do_cleanups calls.
9827         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9828         make_cleanup/do_cleanups calls.
9829         * python/python.c (do_start_initialization): Adjust to ldirname
9830         returning a std::string.
9831         * utils.c (ldirname): Now returns a std::string.
9832         * utils.h (ldirname): Change return type to std::string.
9833         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9834         returning a std::string.
9835         * xml-tdesc.c (file_read_description_xml): Likewise.
9836
9837 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9838
9839         * regcache.c (regcache_debug_print_register): New function.
9840         * regcache.h (regcache_debug_print_register): New declaration.
9841         * target.c (debug_print_register): Remove.
9842         (target_fetch_registers): Call regcache_debug_print_register.
9843         (target_store_registers): Likewise.
9844
9845 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9846
9847         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9848         reference beyond the 'lh->include_dirs' array before accessing to
9849         it.
9850         (psymtab_include_file_name): Likewise.
9851         (dwarf_decode_lines_1): Likewise.
9852         (dwarf_decode_lines): Likewise.
9853         (file_file_name): Likewise.
9854
9855 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9856
9857         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9858         inferior_ptid.
9859         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9860         ps_lsetfpregs): Likewise.
9861         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9862         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9863         ps_lsetfpregs): Likewise.
9864         * target.c (target_fetch_registers, target_store_registers):
9865         Remove asserts.
9866
9867 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9868
9869         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9870
9871 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9872
9873         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9874         (_initialize_aarch64_tdep): Register it.
9875         (aarch64_record_load_store): Handle PRFM instruction.
9876         (aarch64_process_record_test): New function.
9877
9878 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9879
9880         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9881         indentation.
9882
9883 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9884
9885         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9886
9887 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9888
9889         python/python.c (do_start_initialization): Fix memory leak.
9890
9891 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9892
9893         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9894         using get_ptrace_pid.
9895         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9896         inferior_ptid.
9897         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9898         inferior_ptid instead of pid.
9899
9900 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9901
9902         * aarch64-tdep.c: Wrap locally used classes in anonymous
9903         namespace.
9904         * arm-tdep.c: Likewise.
9905         * linespec.c: Likewise.
9906         * ui-out.c: Likewise.
9907
9908 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9909
9910         PR gdb/19637
9911         * python/lib/gdb/printer/bound_registers.py: Import sys.
9912
9913 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9914
9915         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9916         windows_thread_info parameter and use it instead of
9917         current_thread.
9918         (windows_fetch_inferior_registers): Don't set current_thread,
9919         pass the thread to do_windows_fetch_inferior_registers.  Use
9920         ptid from regcache instead of inferior_ptid.
9921         (do_windows_store_inferior_registers): Add windows_thread_info
9922         parameter and use it instead of current_thread.
9923         (windows_store_inferior_registers): Don't set current_thread,
9924         pass the thread to do_windows_store_inferior_registers.  Use
9925         ptid from regcache instead of inferior_ptid.
9926
9927 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9928
9929         * ser-mingw.c (ser_windows_raw): Remove reference to
9930         struct serial::current_timeout.
9931
9932 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9933
9934         PR tdep/20928
9935         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9936         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9937         (sparc64_fsr_type): Fix %fsr decoding.
9938
9939 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9940
9941         * python/py-record-btrace.c (btpy_insn_data): Change return type
9942         for Python 2.
9943
9944 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9945
9946         * spu-linux-nat.c (spu_fetch_inferior_registers,
9947         spu_store_inferior_registers): Use ptid from regcache, set and
9948         restore inferior_ptid.
9949         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9950         Likewise.
9951
9952 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9953
9954         * i386-linux-nat.c (fetch_register, store_register,
9955         i386_linux_fetch_inferior_registers,
9956         i386_linux_store_inferior_registers): Use ptid from regcache.
9957         * ia64-linux-nat.c (ia64_linux_fetch_register,
9958         ia64_linux_store_register): Likewise.
9959         * inf-ptrace.c (inf_ptrace_fetch_register,
9960         inf_ptrace_store_register): Likewise.
9961         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9962         m32r_linux_store_inferior_registers): Likewise.
9963         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9964         m68kbsd_store_inferior_registers): Likewise.
9965         * m68k-linux-nat.c (fetch_register, store_register,
9966         m68k_linux_fetch_inferior_registers,
9967         m68k_linux_store_inferior_registers): Likewise.
9968         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9969         m88kbsd_store_inferior_registers): Likewise.
9970         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9971         mips_fbsd_store_inferior_registers): Likewise.
9972         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9973         mips64_linux_regsets_store_registers): Likewise.
9974         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9975         mipsnbsd_store_inferior_registers): Likewise.
9976         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9977         mips64obsd_store_inferior_registers): Likewise.
9978         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9979         Likewise.
9980         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9981         ppcfbsd_store_inferior_registers): Likewise.
9982         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9983         ppc_linux_store_inferior_registers): Likewise.
9984         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9985         ppcnbsd_store_inferior_registers): Likewise.
9986         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9987         ppcobsd_store_registers): Likewise.
9988         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9989         Likewise.
9990         * ravenscar-thread.c (ravenscar_fetch_registers,
9991         ravenscar_store_registers, ravenscar_prepare_to_store):
9992         Likewise.
9993         * record-btrace.c (record_btrace_fetch_registers,
9994         record_btrace_store_registers, record_btrace_prepare_to_store):
9995         Likewise.
9996         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9997         Lookup inferior using ptid from regcache, instead of
9998         current_inferior.
9999         * remote.c (remote_fetch_registers, remote_store_registers): Use
10000         ptid from regcache.
10001         * rs6000-nat.c (fetch_register, store_register): Likewise.
10002         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10003         s390_linux_store_inferior_registers): Likewise.
10004         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10005         shnbsd_store_inferior_registers): Likewise.
10006         * sol-thread.c (sol_thread_fetch_registers,
10007         sol_thread_store_registers): Likewise.
10008         * sparc-nat.c (sparc_fetch_inferior_registers,
10009         sparc_store_inferior_registers): Likewise.
10010         * tilegx-linux-nat.c (fetch_inferior_registers,
10011         store_inferior_registers): Likewise.
10012         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10013         vaxbsd_store_inferior_registers): Likewise.
10014         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10015         store_xtregs): Likewise.
10016
10017 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10018
10019         PR gdb/14441
10020         * NEWS: Mention support for rvalue references in GDB and python.
10021         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10022         supports both lvalue and rvalue references.
10023
10024 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10025
10026         PR gdb/14441
10027         * gdbtypes.c (rank_one_type): Implement overloading
10028         resolution rules regarding rvalue references.
10029
10030 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10031
10032         PR gdb/14441
10033         * aarch64-tdep.c (aarch64_type_align)
10034         (aarch64_extract_return_value, aarch64_store_return_value): Change
10035         lvalue reference type checks to general reference type checks.
10036         * amd64-tdep.c (amd64_classify): Likewise.
10037         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10038         Likewise.
10039         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10040         (arm_store_return_value): Likewise.
10041         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10042         * c-typeprint.c (c_print_type): Likewise.
10043         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10044         (cplus_number_of_children, cplus_describe_child): Likewise.
10045         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10046         * completer.c (expression_completer): Likewise.
10047         * cp-support.c (make_symbol_overload_list_adl_namespace):
10048         Likewise.
10049         * darwin-nat-info.c (info_mach_region_command): Likewise.
10050         * dwarf2loc.c (entry_data_value_coerce_ref)
10051         (value_of_dwarf_reg_entry): Likewise.
10052         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10053         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10054         Likewise.
10055         * findvar.c (extract_typed_address, store_typed_address):
10056         Likewise.
10057         * gdbtypes.c (rank_one_type): Likewise.
10058         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10059         * infcall.c (value_arg_coerce): Likewise.
10060         * language.c (pointer_type): Likewise.
10061         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10062         Likewise.
10063         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10064         * mn10300-tdep.c (mn10300_type_align): Likewise.
10065         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10066         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10067         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10068         Likewise.
10069         * printcmd.c (print_formatted, x_command): Likewise.
10070         * python/py-type.c (typy_get_composite, typy_template_argument):
10071         Likewise.
10072         * python/py-value.c (valpy_referenced_value)
10073         (valpy_get_dynamic_type, value_has_field): Likewise.
10074         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10075         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10076         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10077         * spu-tdep.c (spu_scalar_value_p): Likewise.
10078         * symtab.c (lookup_symbol_aux): Likewise.
10079         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10080         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10081         Likewise.
10082         * valops.c (value_cast_pointers, value_cast)
10083         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10084         (value_struct_elt, value_struct_elt_bitpos)
10085         (value_find_oload_method_list, find_overload_match)
10086         (value_rtti_indirect_type): Likewise.
10087         * valprint.c (val_print_scalar_type_p, generic_val_print):
10088         Likewise.
10089         * value.c (value_actual_type, value_as_address, unpack_long)
10090         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10091         (coerce_ref): Likewise.
10092         * varobj.c (varobj_get_value_type): Likewise.
10093
10094 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10095
10096         PR gdb/14441
10097         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10098         table of constants.
10099         * python/lib/gdb/command/explore.py: Support exploring values
10100         of rvalue reference types.
10101         * python/lib/gdb/types.py: Implement get_basic_type() for
10102         rvalue reference types.
10103         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10104         constant.
10105         * python/py-value.c (valpy_getitem): Add an rvalue reference
10106         check.
10107         (valpy_reference_value): Add new parameter "refcode".
10108         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10109         New wrappers for valpy_reference_value().
10110         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10111         (gdbpy_invoke_xmethod): Likewise.
10112
10113 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10114
10115         PR gdb/14441
10116         * dwarf2read.c (process_die, read_type_die_1): Handle the
10117         DW_TAG_rvalue_reference_type DIE.
10118         (read_tag_reference_type): Add new parameter "refcode".
10119
10120 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10121
10122         PR gdb/14441
10123         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10124         (c_type_print_modifier, c_type_print_varspec_suffix)
10125         (c_type_print_base): Support printing rvalue reference types.
10126         * c-valprint.c (c_val_print, c_value_print): Support printing
10127         rvalue reference values.
10128
10129 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10130
10131         PR gdb/14441
10132         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10133         typename.
10134         * cp-support.c (replace_typedefs): Handle
10135         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10136         * python/py-type.c (typy_lookup_type): Likewise.
10137
10138 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10139
10140         PR gdb/14441
10141         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10142         * parse.c (insert_type): Change assert statement.
10143         (follow_types): Handle rvalue reference types.
10144         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10145         constant.
10146
10147 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10148
10149         PR gdb/14441
10150         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10151         value_ref() interface.
10152         * c-valprint.c (c_value_print): Likewise.
10153         * infcall.c (value_arg_coerce): Likewise.
10154         * python/py-value.c (valpy_reference_value): Likewise.
10155         * valops.c (value_cast, value_reinterpret_cast)
10156         (value_dynamic_cast, typecmp): Likewise.
10157         (value_ref): Parameterize by kind of return value reference type.
10158         * value.h (value_ref): Add new parameter "refcode".
10159
10160 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10161
10162         PR gdb/14441
10163         * dwarf2read.c (read_tag_reference_type): Use
10164         lookup_lvalue_reference_type() instead of lookup_reference_type().
10165         * eval.c (evaluate_subexp_standard): Likewise.
10166         * f-exp.y: Likewise.
10167         * gdbtypes.c (make_reference_type, lookup_reference_type):
10168         Generalize with rvalue reference types.
10169         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10170         convenience wrappers for lookup_reference_type().
10171         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10172         reference kind parameter.
10173         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10174         wrappers for lookup_reference_type().
10175         * guile/scm-type.c (gdbscm_type_reference): Use
10176         lookup_lvalue_reference_type() instead of lookup_reference_type().
10177         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10178         * parse.c (follow_types): Likewise.
10179         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10180         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10181         Likewise.
10182         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10183         (gdbpy_invoke_xmethod): Likewise.
10184         * stabsread.c: Provide extra argument to make_reference_type()
10185         call.
10186         * valops.c (value_ref, value_rtti_indirect_type): Use
10187         lookup_lvalue_reference_type() instead of lookup_reference_type().
10188
10189 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10190
10191         PR gdb/14441
10192         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10193         (TYPE_IS_REFERENCE): New macro.
10194         (struct type): Add rvalue_reference_type field.
10195         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10196
10197 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10198
10199         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10200         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10201         New function definition.
10202         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10203         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10204         New function declaration.
10205         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10206         * mi/mi-interp.h: New file.
10207         * solib.c (info_sharedlibrary_command): Replace for loop with
10208         ALL_SO_LIBS macro
10209         * solib.h (update_solib_list): New function declaration.
10210         (so_list_head): Move macro.
10211         * solist.h (ALL_SO_LIBS): New macro.
10212
10213 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10214
10215         * infcmd.c (post_create_inferior): Remove unused argument in
10216         call to solib_add.
10217         * remote.c (remote_start_remote): Likewise.
10218         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10219         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10220         (enable_break): Likewise.
10221         * solib.c (update_solib_list): Remove unused target argument
10222         and its documentation.
10223         (solib_add): Remove unused target argument.  Remove unused
10224         argument in call to update_solib_list.
10225         (info_sharedlibrary_command): Remove unused argument in call
10226         to update_solib_list.
10227         (sharedlibrary_command): Remove unused argument in call to
10228         solib_add.
10229         (handle_solib_event): Likewise.
10230         (reload_shared_libraries): Likewise.
10231         * solib.h (solib_add): Remove unused target argument.
10232
10233 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10234
10235         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10236         (s390_displaced_step_fixup): Cover relative branches with the
10237         default fixup handling.  This fixes lack of support for some
10238         relative branch instructions.
10239
10240 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10241
10242         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10243         ptid from regcache.
10244
10245 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10246
10247         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10248         i386_darwin_store_inferior_registers): Use ptid from regcache.
10249
10250 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10251
10252         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10253         i386bsd_store_inferior_registers): Use ptid from regcache.
10254
10255 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10256
10257         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10258         hppaobsd_store_registers): Use ptid from regcache.
10259
10260 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10261
10262         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10263         hppanbsd_store_registers): Use ptid from regcache.
10264
10265 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10266
10267         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10268         from regcache.  Use get_ptrace_pid.
10269
10270 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10271
10272         * corelow.c (get_core_register_section): Use ptid from regcache,
10273         update doc.
10274
10275 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10276
10277         * bsd-uthread.c (bsd_uthread_fetch_registers,
10278         bsd_uthread_store_registers): Use ptid from regcache, set and
10279         restore inferior_ptid.
10280
10281 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10282
10283         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10284         fetch_fp_regs, store_register, store_regs, store_fp_register,
10285         store_fp_regs): Use ptid from regcache.
10286
10287 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10288
10289         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10290         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10291         store_vfp_regs): Use ptid from regcache.
10292
10293 2017-03-17  Pedro Alves  <palves@redhat.com>
10294
10295         PR remote/21188
10296         * ser-base.c (ser_base_wait_for): Add comment.
10297         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10298         version.
10299         * ser-unix.c (hardwire_raw): Remove reference to
10300         scb->current_timeout.
10301         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10302         (hardwire_ops): Install ser_base_readchar instead of
10303         hardwire_readchar.
10304         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10305         Remove fields.
10306
10307 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10308
10309         PR gdb/19637
10310         * python/lib/gdb/printer/bound_registers.py: Add support for
10311         Python 3.
10312
10313 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10314
10315         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10316         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10317         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10318         byte_offset to subobj_byte_offset.  Fix the handling of
10319         DWARF_VALUE_STACK on big-endian targets when coming via an
10320         implicit pointer.
10321         (dwarf2_evaluate_loc_desc): Adjust call to
10322         dwarf2_evaluate_loc_desc_full.
10323         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10324         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10325
10326 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10327
10328         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10329         and REVSH instructions.
10330
10331 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10332
10333         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10334         (arm_record_test): Declare.
10335         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10336         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10337         align with the manual.
10338         (thumb_record_misc): Adjust the code order to align with the
10339         manual.
10340         (thumb2_record_decode_insn_handler): Fix instruction matching.
10341         (instruction_reader_thumb): New class.
10342         (arm_record_test): New function.
10343
10344 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10345
10346         * arm-tdep.c (abstract_memory_reader): New class.
10347         (instruction_reader): New class.
10348         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10349         (decode_insn): Likewise.
10350
10351 2017-03-16  Doug Evans  <dje@google.com>
10352
10353         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10354         member.  Change type of TYPE member to SCM.  All uses updated.
10355         (lsscm_make_lazy_string_smob): Add assert.
10356         (lsscm_make_lazy_string): Flag bad length values.
10357         (lsscm_elt_type): New function.
10358         (gdbscm_lazy_string_to_value): Rewrite to use
10359         lsscm_safe_lazy_string_to_value.
10360         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10361         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10362         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10363         in incoming type.
10364         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10365         * guile/scm-type.c (tyscm_scm_to_type): New function.
10366
10367 2017-03-15  Doug Evans  <dje@google.com>
10368
10369         PR python/17728, python/18439, python/18779
10370         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10371         member.  Change type of TYPE member to PyObject *.  All uses updated.
10372         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10373         (gdbpy_create_lazy_string_object): Flag bad length values.
10374         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10375         Handle typedefs in incoming type.
10376         (stpy_lazy_string_elt_type): New function.
10377         (gdbpy_extract_lazy_string): Call it.
10378         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10379         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10380         typedefs in incoming type.
10381
10382 2017-03-16  Doug Evans  <dje@google.com>
10383
10384         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10385         * guile/scm-type.c (tyscm_scm_to_type): New function.
10386
10387 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10388
10389         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10390         "ULONGEST" for "skip".
10391
10392 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10393
10394         PR gdb/21220
10395         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10396         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10397         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10398         over ptrace peek/poke until end of buffer or error.
10399
10400 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10401
10402         * parse.c (length_of_subexp): Make static.
10403         * parser-defs.h (length_of_subexp): Remove.
10404
10405 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10406
10407         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10408         as well.
10409
10410 2017-03-14  Pedro Alves  <palves@redhat.com>
10411
10412         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10413         (main): Use std::unique_ptr.  Remove calls to
10414         cp_demangled_name_parse_free.
10415
10416 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10417
10418         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10419         alphabsd_store_inferior_registers): Use regcache->ptid instead
10420         of inferior_ptid.
10421
10422 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10423
10424         * aix-thread.c (aix_thread_fetch_registers,
10425         aix_thread_store_registers): Use regcache->ptid instead of
10426         inferior_ptid.
10427
10428 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10429
10430         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10431         store_gregs_to_thread, fetch_fpregs_from_thread,
10432         store_fpregs_to_thread): Use regcache->ptid instead of
10433         inferior_ptid.
10434
10435 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10436
10437         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10438         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10439         instead of inferior_ptid.
10440
10441 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10442
10443         * target.c (target_fetch_registers, target_store_registers): Add
10444         assert.
10445
10446 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10447
10448         * regcache.h (regcache_get_ptid): New function.
10449         * regcache.c (regcache_get_ptid): New function.
10450
10451 2017-03-13  Mark Wielaard  <mark@klomp.org>
10452
10453         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10454
10455 2017-03-10  Keith Seitz  <keiths@redhat.com>
10456
10457         PR c++/8218
10458         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10459
10460 2017-03-08  Pedro Alves  <palves@redhat.com>
10461
10462         PR gdb/18360
10463         * infrun.c (start_step_over, do_target_resume, resume)
10464         (restart_threads): Assert we're not resuming a thread that is
10465         meant to be stopped.
10466         (infrun_thread_stop_requested_callback): Delete.
10467         (infrun_thread_stop_requested): If the thread is internally
10468         stopped, queue a pending stop event and clear the thread's
10469         inline-frame state.
10470         (handle_stop_requested): New function.
10471         (handle_syscall_event, handle_inferior_event_1): Use
10472         handle_stop_requested.
10473         (handle_stop_requested): New function.
10474         (handle_signal_stop): Set the thread's stop_signal here instead of
10475         at caller.
10476         (finish_step_over): Clear step over info unconditionally.
10477         (handle_signal_stop): If the user had interrupted the event
10478         thread, consider the stop a random signal.
10479         (handle_signal_stop) <signal arrived while stepping over
10480         breakpoint>: Don't restart threads here.
10481         (stop_waiting): Don't clear step-over info here.
10482
10483 2017-03-08  Pedro Alves  <palves@redhat.com>
10484
10485         PR 21206
10486         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10487         goes to argument 2, not 1.
10488
10489 2017-03-08  Pedro Alves  <palves@redhat.com>
10490
10491         PR cli/21218
10492         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10493         display_gdb_prompt.
10494         (command_line_input): Add comment.
10495
10496 2017-03-08  Pedro Alves  <palves@redhat.com>
10497
10498         PR tui/21216
10499         * tui/tui-file.c (tui_file::write): New.
10500         * tui/tui-file.h (tui_file): Override "write".
10501         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10502         factored out from ...
10503         (tui_puts): ... here.
10504         (tui_putc): Use them.
10505         (tui_write): New function.
10506         * tui/tui-io.h (tui_write): Declare.
10507
10508 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10509
10510         * Makefile.in (SFILES): Replace "environ.c" with
10511         "common/environ.c".
10512         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10513         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10514         to...
10515         * common/environ.c: ... here.
10516         * environ.h: Moved to...
10517         * common/environ.h: ... here.
10518
10519 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10520
10521         * gdbarch.sh (pstring_ptr): New static function.
10522         (gdbarch_disassembler_options): Use it.
10523         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10524         not valid_disassembler_option->name.
10525         * gdbarch.c: Regenerate.
10526
10527 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10528
10529         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10530
10531 2017-03-07  Pedro Alves  <palves@redhat.com>
10532
10533         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10534
10535 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10536
10537         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10538         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10539         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10540         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10541
10542 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10543
10544         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10545
10546 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10547
10548         * remote.c (remote_add_target_side_commands): Use range-based
10549         for loop.
10550
10551 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10552
10553         PR gdb/21165
10554         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10555         value is lazy.
10556         * valprint.c (common_val_print): Likewise.
10557
10558 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10559
10560         * NEWS: Mention new set/show disassembler-options commands.
10561         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10562         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10563         (prospective_options): New static variable.
10564         (gdb_disassembler::gdb_disassembler): Initialize
10565         m_di.disassembler_options.
10566         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10567         (get_disassembler_options): New function.
10568         (set_disassembler_options): Likewise.
10569         (set_disassembler_options_sfunc): Likewise.
10570         (show_disassembler_options_sfunc): Likewise.
10571         (disassembler_options_completer): Likewise.
10572         (_initialize_disasm): Likewise.
10573         * disasm.h (get_disassembler_options): New prototype.
10574         (set_disassembler_options): Likewise.
10575         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10576         (gdbarch_verify_disassembler_options): Likewise.
10577         * gdbarch.c: Regenerate.
10578         * gdbarch.h: Likewise.
10579         * arm-tdep.c (num_disassembly_options): Delete.
10580         (set_disassembly_style): Likewise.
10581         (arm_disassembler_options): New static variable.
10582         (set_disassembly_style_sfunc): Convert short style name into long
10583         option name.  Call set_disassembler_options.
10584         (show_disassembly_style_sfunc): New function.
10585         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10586         set_gdbarch_verify_disassembler_options.
10587         (_initialize_arm_tdep): Delete regnames variable and update callers.
10588         (arm_disassembler_options): Initialize.
10589         (disasm_options): New variable.
10590         (num_disassembly_options): Rename from this...
10591         (num_disassembly_styles): ...to this.  Compute by scanning through
10592         disasm_options.
10593         (valid_disassembly_styles): Initialize using disasm_options.
10594         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10595         set_arm_regname_option.
10596         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10597         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10598         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10599         set_gdbarch_verify_disassembler_options.
10600         * s390-tdep.c (s390_disassembler_options): New static variable.
10601         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10602         set_gdbarch_verify_disassembler_options.
10603
10604 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10605
10606         * remote.c (remote_add_target_side_condition): Remove "struct"
10607         keyword from range-based for loop.
10608
10609 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10610
10611         * remote.c (remote_add_target_side_condition): Use range-based
10612         for loop.  Update comment.
10613
10614 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10615
10616         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10617
10618 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10619
10620         * regcache.c (regcache_raw_update): New function.
10621         (regcache_raw_read): Move code to regcache_raw_update.
10622         * regcache.h (regcache_raw_update): New declaration.
10623         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10624
10625 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10626
10627         * dwarf2read.c (create_debug_type_hash_table): Initialize
10628         header.signature and header.type_offset_in_tu.
10629
10630 2017-02-24  Pedro Alves  <palves@redhat.com>
10631
10632         * symtab.c (make_file_symbol_completion_list_1): Use
10633         add_symtab_completions.
10634
10635 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10636
10637         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10638
10639 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10640
10641         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10642         I386_MAX_REGISTER_SIZE.
10643         (i386_pseudo_register_write): Likewise.
10644         (i386_process_record): Likewise.
10645         * i387-tdep.c (i387_supply_xsave): Likewise.
10646         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10647         (store_register): Likewise.
10648
10649 2017-02-23  Pedro Alves  <palves@redhat.com>
10650
10651         * ada-lang.c: Include "common/function-view.h".
10652         (ada_iterate_over_symbols): Adjust to use function_view as
10653         callback type.
10654         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10655         (ada_make_symbol_completion_list): Use a lambda.
10656         (ada_exc_search_name_matches): Delete.
10657         (name_matches_regex): New.
10658         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10659         * compile/compile-c-support.c: Include "common/function-view.h".
10660         (print_one_macro): Change prototype to accept a ui_file pointer.
10661         (write_macro_definitions): Use a lambda.
10662         * dwarf2read.c: Include "common/function-view.h".
10663         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10664         (dw2_expand_symtabs_matching): Adjust to use function_view as
10665         callback type.
10666         * language.h: Include "common/function-view.h".
10667         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10668         function_view as callback type.
10669         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10670         * linespec.c: Include "common/function-view.h".
10671         (collect_info::add_symbol): New method.
10672         (struct symbol_and_data_callback, iterate_inline_only, struct
10673         symbol_matcher_data, iterate_name_matcher): Delete.
10674         (iterate_over_all_matching_symtabs): Adjust to use function_view
10675         as callback type and lambdas.
10676         (iterate_over_file_blocks): Adjust to use function_view as
10677         callback type.
10678         (decode_compound_collector): Now a class with private fields.
10679         (decode_compound_collector::release_symbols): New method.
10680         (collect_one_symbol): Rename to...
10681         (decode_compound_collector::operator()): ... this and adjust.
10682         (lookup_prefix_sym): decode_compound_collector construction bits
10683         move to decode_compound_collector ctor.  Pass the
10684         decode_compound_collector object directly as callback.  Remove
10685         cleanups and use decode_compound_collector::release_symbols
10686         instead.
10687         (symtab_collector): Now a class with private fields.
10688         (symtab_collector::release_symtabs): New method.
10689         (add_symtabs_to_list): Rename to...
10690         (symtab_collector::operator()): ... this and adjust.
10691         (collect_symtabs_from_filename): symtab_collector construction
10692         bits move to symtab_collector ctor.  Pass the symtab_collector
10693         object directly as callback.  Remove cleanups and use
10694         symtab_collector::release_symtabs instead.
10695         (collect_symbols): Delete.
10696         (add_matching_symbols_to_info): Use lambdas.
10697         * macrocmd.c (print_macro_callback): Delete.
10698         (info_macro_command): Use a lambda.
10699         (info_macros_command): Pass print_macro_definition as callable
10700         directly.
10701         (print_one_macro): Remove 'ignore' parameter.
10702         (macro_list_command): Adjust.
10703         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10704         (macro_for_each_data::user_data): Delete field.
10705         (foreach_macro): Adjust to call the function_view.
10706         (macro_for_each): Adjust to use function_view as callback type.
10707         (foreach_macro_in_scope): Adjust to call the function_view.
10708         (macro_for_each_in_scope): Adjust to use function_view as callback
10709         type.
10710         * macrotab.h: Include "common/function-view.h".
10711         (macro_callback_fn): Declare a prototype instead of a pointer.
10712         Remove "user_data" parameter.
10713         (macro_for_each, macro_for_each_in_scope): Adjust to use
10714         function_view as callback type.
10715         * psymtab.c (partial_map_expand_apply)
10716         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10717         Adjust to use function_view as callback type and to return bool.
10718         (psym_expand_symtabs_matching): Adjust to use function_view as
10719         callback types.
10720         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10721         to use function_view as callback type and to return bool.
10722         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10723         callback types.
10724         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10725         as callback types.
10726         * symfile.h: Include "common/function-view.h".
10727         (expand_symtabs_file_matcher_ftype)
10728         (expand_symtabs_symbol_matcher_ftype)
10729         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10730         return bool.
10731         (quick_symbol_functions::map_symtabs_matching_filename)
10732         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10733         function_view as callback type and return bool.
10734         (expand_symtabs_matching): Adjust to use function_view as callback
10735         type.
10736         (maintenance_expand_name_matcher)
10737         (maintenance_expand_file_matcher): Delete.
10738         (maintenance_expand_symtabs): Use lambdas.
10739         * symtab.c (iterate_over_some_symtabs): Adjust to use
10740         function_view as callback types and return bool.
10741         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10742         of a cleanup.
10743         (lookup_symtab_callback): Delete.
10744         (lookup_symtab): Use a lambda.
10745         (iterate_over_symbols): Adjust to use function_view as callback
10746         type.
10747         (struct search_symbols_data, search_symbols_file_matches)
10748         (search_symbols_name_matches): Delete.
10749         (search_symbols): Use a pair of lambdas.
10750         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10751         (symtab_expansion_callback): Delete.
10752         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10753         * symtab.h: Include "common/function-view.h".
10754         (iterate_over_some_symtabs): Adjust to use function_view as
10755         callback type and return bool.
10756         (iterate_over_symtabs): Adjust to use function_view as callback
10757         type.
10758         (symbol_found_callback_ftype): Remove 'data' parameter and return
10759         bool.
10760         (iterate_over_symbols): Adjust to use function_view as callback
10761         type.
10762
10763 2017-02-23  Pedro Alves  <palves@redhat.com>
10764
10765         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10766         (%.o) <unittests/%.c>: New pattern.
10767         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10768         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10769         * common/function-view.h: New file.
10770         * unittests/function-view-selftests.c: New file.
10771         * configure: Regenerate.
10772
10773 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10774
10775         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10776         inferior_ptid.
10777         * go32-nat.c (go32_thread_alive): Likewise.
10778
10779 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10780
10781         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10782         delete.
10783
10784 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10785
10786         * varobj.c (varobj_clear_saved_item): Use delete instead of
10787         xfree.
10788         (update_dynamic_varobj_children): Likewise.
10789
10790 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10791
10792         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10793
10794 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10795
10796         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10797         m_enum_value to 0 in default constructor.
10798
10799 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10800
10801         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10802         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10803         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10804         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10805         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10806         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10807         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10808         IS_STORE_CONDITIONAL_INSN.
10809
10810 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10811
10812         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10813
10814 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10815
10816         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10817
10818 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10819
10820         * dwarf2read.c (skip_one_die, read_attribute_value)
10821         (dwarf2_const_value_attr, dump_die_shallow)
10822         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10823         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10824
10825 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10826
10827         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10828         (dwarf_parse_macro_header): Accept DWARF version 5.
10829         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10830
10831 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10832
10833         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10834         DW_AT_GNU_*.
10835         * common/common-exceptions.h (enum errors): Likewise.
10836         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10837         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10838         (dwarf_expr_context::execute_stack_op): Likewise.
10839         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10840         Likewise.
10841         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10842         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10843         (show_entry_values_debug, call_site_to_target_addr)
10844         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10845         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10846         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10847         (value_of_dwarf_block_entry, indirect_pieced_value)
10848         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10849         (disassemble_dwarf_expression): Likewise.
10850         * dwarf2read.c (process_die, inherit_abstract_dies)
10851         (read_call_site_scope): Likewise.
10852         * gdbtypes.h (struct func_type, struct call_site_parameter)
10853         (struct call_site): Likewise.
10854         * stack.c (read_frame_arg): Likewise.
10855         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10856
10857 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10858
10859         * defs.h (read_unsigned_leb128): New declaration.
10860         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10861         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10862         (dwarf2_find_location_expression): Call also
10863         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10864         * dwarf2loc.h (dwarf2_version): New declaration.
10865         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10866         rnglists.
10867         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10868         .debug_rnglists.
10869         (struct dwop_section_names): Add loclists_dwo.
10870         (dwop_section_names): Add .debug_loclists.dwo.
10871         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10872         (struct dwarf2_per_cu_data): Add dwarf_version.
10873         (struct dwo_sections): Add loclists.
10874         (struct attr_abbrev): Add implicit_const.
10875         (read_indirect_line_string): New declaration.
10876         (read_unsigned_leb128): Delete declaration.
10877         (rcuh_kind): New definition.
10878         (read_and_check_comp_unit_head): Change parameter
10879         is_debug_types_section to section_kind.
10880         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10881         (read_comp_unit_head): Change parameter abfd to section, add parameter
10882         section_kind.  Handle DWARF-5.
10883         (error_check_comp_unit_head): Accept also DWARF version 5.
10884         (read_and_check_comp_unit_head): Change parameter
10885         is_debug_types_section to section_kind.
10886         (read_and_check_type_unit_head): Delete function.
10887         (read_abbrev_offset): Handle DWARF-5.
10888         (create_debug_type_hash_table): Add parameter section_kind.  Process
10889         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10890         comp_unit_head.
10891         (create_debug_types_hash_table): Update create_debug_type_hash_table
10892         caller.
10893         (create_all_type_units): Call create_debug_type_hash_table.
10894         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10895         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10896         caller.
10897         (skip_one_die): Handle DW_FORM_implicit_const.
10898         (dwarf2_rnglists_process): New function.
10899         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10900         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10901         (read_attribute_value): Handle DW_FORM_implicit_const,
10902         DW_FORM_line_strp.
10903         (read_attribute): Handle DW_FORM_implicit_const.
10904         (read_indirect_string_at_offset_from): New function from
10905         read_indirect_string_at_offset.
10906         (read_indirect_string_at_offset): Call
10907         read_indirect_string_at_offset_from.
10908         (read_indirect_line_string_at_offset): New function.
10909         (read_indirect_string): New function comment.
10910         (read_indirect_line_string): New function.
10911         (read_unsigned_leb128): Make it global.
10912         (dwarf2_string_attr): Handle DWARF-5.
10913         (add_include_dir_stub, read_formatted_entries): New functions.
10914         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10915         Handle DWARF-5.
10916         (per_cu_header_read_in): Update read_comp_unit_head caller.
10917         (dwarf2_version): New function.
10918         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10919         rnglists.
10920         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10921         fields.
10922
10923 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10924
10925         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10926
10927 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10928
10929         * dwarf2read.c (dwarf2_ranges_process): New function from
10930         dwarf2_ranges_read.
10931         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10932         dwarf2_ranges_process.
10933
10934 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10935
10936         * dwarf2read.c (create_debug_type_hash_table): New function from
10937         create_debug_types_hash_table.
10938         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10939         (create_all_type_units, open_and_init_dwo_file): Update
10940         create_debug_types_hash_table callers.
10941
10942 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10943
10944         PR gdb/16188
10945         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10946         refer to 'ap', not 'args'.
10947
10948 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10949             Pedro Alves  <palves@redhat.com>
10950
10951         PR gdb/16188
10952         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10953         calls succeeded.
10954         * fork-child.c (trace_start_error): New function.
10955         (trace_start_error_with_name): Likewise.
10956         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10957         * inf-ptrace.c (inf_ptrace_me): Likewise.
10958         * inferior.h (trace_start_error): New prototype.
10959         (trace_start_error_with_name): Likewise.
10960
10961 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10962
10963         PR gdb/21164
10964         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10965         NULL before using it.
10966         * symmisc.c (maintenance_print_symbols): Likewise.
10967         (maintenance_print_msymbols): Likewise.
10968
10969 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10970
10971         * NEWS: Add record Python bindings entry.
10972
10973 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10974
10975         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10976         py-record-full.o.
10977         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10978         * python/py-record-btrace.c, python/py-record-btrace.h,
10979         python/py-record-full.c, python/py-record-full.h: New file.
10980         * python/py-record.c: Add include for py-record-btrace.h and
10981         py-record-full.h.
10982         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10983         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10984         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10985         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10986         New definition.
10987         (gdbpy_initialize_btrace): New export.
10988         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10989
10990 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10991
10992         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10993         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10994         * python/py-record.c: New file.
10995         * python/python-internal.h (gdbpy_start_recording,
10996         gdbpy_current_recording, gdpy_stop_recording,
10997         gdbpy_initialize_record): New export.
10998         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10999         (python_GdbMethods): Add gdbpy_start_recording,
11000         gdbpy_current_recording and gdbpy_stop_recording.
11001
11002 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11003
11004         * record-btrace.c (record_btrace_record_method): New function.
11005         (init_record_btrace_ops): Initialize to_record_method.
11006         * record-full.c (record_full_record_method): New function.
11007         (init_record_full_ops, init_record_full_core_ops): Add
11008         record_full_record_method.
11009         * record.h (enum record_method): New enum.
11010         * target-debug.h (target_debug_print_enum_record_method: New define.
11011         * target-delegates.c: Regenerate.
11012         * target.c (target_record_method): New function.
11013         * target.h: Include record.h.
11014         (struct target_ops) <to_record_method>: New field.
11015         (target_record_method): New export.
11016
11017 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11018
11019         * record.h (record_start, record_stop): New export.
11020         * record.c (record_start, record_stop): New function.
11021
11022 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11023
11024         * btrace.c (btrace_fetch): Copy function call segments pointer
11025         into a vector.
11026         (btrace_clear): Clear the vector.
11027         (btrace_find_insn_by_number): Use binary search to find the correct
11028         function call segment.
11029         * btrace.h (brace_fun_p): New typedef.
11030         (struct btrace_thread_info) <functions>: New field.
11031
11032 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11033
11034         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11035         * btrace.c (btrace_decode_error): ... here.  New function.
11036         * btrace.h (btrace_decode_error): New export.
11037
11038 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11039
11040         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11041         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11042         btrace_find_insn_by_number): Remove special case for gaps.
11043         * btrace.h (btrace_insn_get_error): New export.
11044         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11045         * record-btrace.c (btrace_insn_history): Print number for gaps.
11046         (record_btrace_info, record_btrace_goto): Handle gaps.
11047
11048 2017-02-14  Tom Tromey  <tom@tromey.com>
11049
11050         PR python/13598:
11051         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11052         event.
11053         * python/py-evts.c (gdbpy_initialize_py_events): Add
11054         before_prompt registry.
11055         * python/py-events.h (events_object) <before_prompt>: New field.
11056
11057 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11058
11059         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11060
11061 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11062
11063         * symfile (_initialize_symfile): Add usage text to the load command's
11064         help text.
11065
11066 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11067
11068         * utils.c (defaulted_query): Don't query on secondary UIs.
11069
11070 2017-02-10  Tom Tromey  <tom@tromey.com>
11071
11072         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11073
11074 2017-02-10  Tom Tromey  <tom@tromey.com>
11075
11076         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11077         "cleanup" local.
11078         * python/py-type.c (typy_legacy_template_argument): Remove
11079         unnecessary "cleanup" local.
11080
11081 2017-02-10  Tom Tromey  <tom@tromey.com>
11082
11083         * python/python.c (do_start_initialization): New function, from
11084         _initialize_python.
11085         (_initialize_python): Call do_start_initialization.
11086         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11087         goto.
11088
11089 2017-02-10  Tom Tromey  <tom@tromey.com>
11090
11091         * python/py-prettyprint.c (pretty_print_one_value): Use
11092         gdbpy_ref.
11093
11094 2017-02-10  Tom Tromey  <tom@tromey.com>
11095
11096         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11097         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11098         gdbpy_ref.
11099         * python/py-type.c (field_new): Use gdbpy_ref.
11100         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11101         gdbpy_ref.
11102         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11103         (py_free_pspace): Likewise.
11104         (pspace_to_pspace_object): Likewise.
11105         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11106         (py_free_objfile): Likewise.
11107         (objfile_to_objfile_object): Likewise.
11108         * python/py-inferior.c (delete_thread_object): Use
11109         gdbpy_ref.
11110         (infpy_read_memory): Likewise.
11111         (py_free_inferior): Likewise.
11112         * python/py-evtregistry.c (create_eventregistry_object): Use
11113         gdbpy_ref.
11114         * python/py-event.c (create_event_object): Use gdbpy_ref.
11115
11116 2017-02-10  Tom Tromey  <tom@tromey.com>
11117
11118         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11119         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11120         used.
11121         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11122         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11123         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11124         python/py-framefilter.c, python/py-function.c,
11125         python/py-inferior.c, python/py-infevents.c,
11126         python/py-linetable.c, python/py-newobjfileevent.c,
11127         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11128         python/py-signalevent.c, python/py-stopevent.c,
11129         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11130         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11131         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11132         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11133
11134 2017-02-10  Tom Tromey  <tom@tromey.com>
11135
11136         * ui-out.h (ui_out_emit_type): New class.
11137         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11138         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11139         and ui_out_emit_tuple.
11140         (enumerate_locals): Likewise.
11141         (py_mi_print_variables, py_print_locals, py_print_args): Use
11142         ui_out_emit_list.
11143         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11144         ui_out_emit_list.
11145         * common/gdb_optional.h: New file.
11146
11147 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11148
11149         * MAINTAINERS (Write After Approval): Update my e-mail address.
11150
11151 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11152
11153         PR gdb/21122
11154         * breakpoint.c (_initialize_breakpoint): Update the help description
11155         of the 'commands' command to indicate that it takes a list argument.
11156
11157 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11158
11159         * interps.c (current_interp_set_logging): Remove "return".
11160
11161 2017-02-09  Gary Benson  <gbenson@redhat.com>
11162
11163         * symtab.c (add_symtab_completions): Prevent NULL pointer
11164         dereference.
11165
11166 2017-02-08  Pedro Alves  <palves@redhat.com>
11167
11168         * interps.c (interp::interp): Remove reference to quiet_p.
11169         (interp_set): Make static.  Remove dead "Switching to" output
11170         code.
11171         (interp_quiet_p, interp_set_quiet): Delete.
11172         (interpreter_exec_cmd): Don't set the interpreter quiet.
11173         * interps.h (interp_quiet_p): Make static.
11174         (class interp) <quiet_p>: Remove field
11175
11176 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11177
11178         * cli/cli-decode.c (find_command_name_length): Make it extern.
11179         * cli/cli-decode.h (find_command_name_length): Declare.
11180         * cli/cli-script.c (command_name_equals, line_first_arg):
11181         New functions.
11182         (process_next_line): Use cli-decode to parse command names.
11183         (build_command_line): Make args a constant pointer.
11184
11185 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11186
11187         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11188         Remove case-insensitive search.
11189
11190 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11191
11192         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11193         at the end of the line.  Avoids an ARI warning.
11194
11195 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11196
11197         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11198         rdseed instructions.
11199         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11200
11201 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11202
11203         PR tdep/20936
11204         Provide and use sparc32 and sparc64 target description XML files.
11205         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11206         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11207         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11208         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11209         * features/sparc/sparc32-solaris.xml: New file.
11210         * features/sparc/sparc64-solaris.xml: New file.
11211         * features/sparc/sparc32-solaris.c: Generated.
11212         * features/sparc/sparc64-solaris.c: Generated.
11213         * sparc-tdep.h: Account for differences in target descriptions.
11214         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11215         (sparc32_register_type): Use target provided registers.
11216         (validate_tdesc_registers): New function.
11217         (sparc32_gdbarch_init): Use tdesc_has_registers.
11218         Set pseudoregister functions.
11219         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11220         (sparc64_register_type): Use target provided registers.
11221         (sparc64_init_abi): Set pseudoregister functions.
11222
11223 2017-02-03  Tom Tromey  <tom@tromey.com>
11224
11225         PR rust/21097:
11226         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11227         with a single member.
11228
11229 2017-02-03  Pedro Alves  <palves@redhat.com>
11230
11231         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11232         (cli_interp_base::~cli_interp_base): New.
11233         (cli_interp): New struct.
11234         (as_cli_interp): Cast the interp itself to cli_interp.
11235         (cli_interpreter_pre_command_loop): Rename to ...
11236         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11237         parameter.
11238         (cli_interpreter_init): Rename to ...
11239         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11240         boolean.  Make extern.
11241         (cli_interpreter_resume): Rename to ...
11242         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11243         extern.
11244         (cli_interpreter_suspend): Rename to ...
11245         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11246         extern.
11247         (cli_interpreter_exec): Rename to ...
11248         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11249         extern.
11250         (cli_interpreter_supports_command_editing): Rename to ...
11251         (cli_interp_base::supports_command_editing): ... this.  Remove
11252         'interp' parameter.  Make extern.
11253         (cli_ui_out): Rename to ...
11254         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11255         Make extern.
11256         (cli_set_logging): Rename to ...
11257         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11258         parameter.  Make extern.
11259         (cli_interp_procs): Delete.
11260         (cli_interp_factory): Adjust to use "new".
11261         * cli/cli-interp.h: Include "interps.h".
11262         (struct cli_interp_base): New struct.
11263         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11264         (interp_new): Delete.
11265         (interp::interp, interp::~interp): New.
11266         (interp_set): Use bool, and return void.  Assume the interpreter
11267         has suspend, init and resume methods, and that the all return
11268         void.
11269         (set_top_level_interpreter): interp_set returns void.
11270         (interp_ui_out): Adapt.
11271         (current_interp_set_logging): Adapt.
11272         (interp_data): Delete.
11273         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11274         (interp_exec): Adapt.
11275         (top_level_interpreter_data): Delete.
11276         * interps.h (interp_init_ftype, interp_resume_ftype)
11277         (interp_suspend_ftype, interp_exec_ftype)
11278         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11279         (class interp): New.
11280         (interp_new): Delete.
11281         (interp_set): Now returns void.  Use bool.
11282         (interp_data, top_level_interpreter_data): Delete.
11283         * mi/mi-common.h: Include interps.h.
11284         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11285         init, resume, suspect, exec, interp_ui_out, set_logging and
11286         pre_command_loop methods.
11287         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11288         (mi_interpreter_init): Rename to ...
11289         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11290         bool, return void and make extern.  Adjust.
11291         (mi_interpreter_resume): ... Rename to ...
11292         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11293         return void and make extern.  Adjust.
11294         (mi_interpreter_suspend): ... Rename to ...
11295         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11296         return void and make extern.  Adjust.
11297         (mi_interpreter_exec): ... Rename to ...
11298         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11299         extern.  Adjust.
11300         (mi_interpreter_pre_command_loop): ... Rename to ...
11301         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11302         parameter and make extern.
11303         (mi_on_normal_stop_1): Adjust.
11304         (mi_ui_out): Rename to ...
11305         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11306         parameter and make extern.  Adjust.
11307         (mi_set_logging): Rename to ...
11308         (mi_interp::set_logging): ... this.  Remove the 'interp'
11309         parameter and make extern.  Adjust.
11310         (mi_interp_procs): Delete.
11311         (mi_interp_factory): Adjust to use 'new'.
11312         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11313         (mi_print_exception, mi_execute_command, mi_load_progress):
11314         Adjust.
11315         * tui/tui-interp.c (tui_interp): New class.
11316         (as_tui_interp): Return a tui_interp pointer.
11317         (tui_on_normal_stop, tui_on_signal_received)
11318         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11319         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11320         to use interp::interp_ui_out.
11321         (tui_init): Rename to ...
11322         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11323         bool, return void and make extern.  Adjust.
11324         (tui_resume): Rename to ...
11325         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11326         return void and make extern.  Adjust.
11327         (tui_suspend): Rename to ...
11328         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11329         return void and make extern.  Adjust.
11330         (tui_ui_out): Rename to ...
11331         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11332         parameter, and make extern.  Adjust.
11333         (tui_exec): Rename to ...
11334         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11335         make extern.
11336         (tui_interp_procs): Delete.
11337         (tui_interp_factory): Use "new".
11338
11339 2017-02-02  Tom Tromey  <tom@tromey.com>
11340
11341         * rust-exp.y (ends_raw_string, space_then_number)
11342         (rust_identifier_start_p): Return bool.
11343         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11344         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11345         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11346         (rust_chartype_p): Return bool.
11347         (val_print_struct, rust_print_struct_def, rust_print_type):
11348         Update.
11349         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11350         Return bool.
11351
11352 2017-02-02  Tom Tromey  <tom@tromey.com>
11353
11354         * rust-lang.c: Reindent.
11355
11356 2017-02-02  Tom Tromey  <tom@tromey.com>
11357
11358         * rust-lang.h (rust_crate_for_block): Update.
11359         * rust-lang.c (rust_crate_for_block): Return std::string.
11360         (rust_get_disr_info): Use std:;string, not
11361         gdb::unique_xmalloc_ptr.
11362         * rust-exp.y (crate_name): Update.
11363
11364 2017-02-02  Pedro Alves  <palves@redhat.com>
11365
11366         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11367         field out of gdb_disassembler_test and make it static.
11368
11369 2017-02-02  Pedro Alves  <palves@redhat.com>
11370
11371         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11372         mi1_interp and mi_interp fields.
11373
11374 2017-02-02  Pedro Alves  <palves@redhat.com>
11375
11376         * cli/cli-interp.c (struct saved_output_files, saved_output):
11377         Moved from cli/cli-logging.c.
11378         (cli_set_logging): New function.
11379         (cli_interp_procs): Install cli_set_logging.
11380         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11381         Declare.
11382         * cli/cli-logging.c (struct saved_output_files, saved_output):
11383         Moved to cli/cli-interp.c.
11384         (pop_output_files): Don't save outputs here.
11385         (make_logging_output): New function.
11386         (handle_redirections): Don't build tee nor save previous outputs
11387         here.
11388         * interps.c (current_interp_set_logging): Change prototype.
11389         Assume there's always a set_logging_proc method installed.
11390         * interps.h (interp_set_logging_ftype): Change prototype.
11391         (current_interp_set_logging): Change prototype and adjust comment.
11392         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11393         use make_logging_output.
11394         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11395 2017-02-02  Pedro Alves  <palves@redhat.com>
11396
11397         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11398         from ...
11399         (set_logging_overwrite): ... here.
11400         (logging_no_redirect_file): Delete.
11401         (set_logging_redirect): Don't handle redirection on the fly.
11402         Instead warn that "logging off" / "logging on" is necessary.
11403         (pop_output_files): Delete references to logging_no_redirect_file.
11404         (show_logging_command): Always speak in terms of what will happen
11405         once logging is reenabled.
11406
11407 2017-02-02  Pedro Alves  <palves@redhat.com>
11408
11409         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11410
11411 2017-02-02  Pedro Alves  <palves@redhat.com>
11412
11413         * disasm.c (gdb_pretty_print_insn): Rename to ...
11414         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11415         Remove gdbarch parameter.  Adapt to clear the object's buffers
11416         instead of allocating new buffers, and to print using the object's
11417         gdb_disassembler instead of calling gdb_print_insn.
11418         (dump_insns): Use gdb_pretty_print_disassembler.
11419         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11420         (gdb_pretty_print_disassembler): New class.
11421         * record-btrace.c (btrace_insn_history): Use
11422         gdb_pretty_print_disassembler.
11423
11424 2017-02-02  Pedro Alves  <palves@redhat.com>
11425
11426         * ada-lang.c (type_as_string): Use string_file.
11427         * ada-valprint.c (ada_print_floating): Use string_file.
11428         * ada-varobj.c (ada_varobj_scalar_image)
11429         (ada_varobj_get_value_image): Use string_file.
11430         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11431         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11432         * breakpoint.c (update_inserted_breakpoint_locations)
11433         (insert_breakpoint_locations, reattach_breakpoints)
11434         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11435         (print_it_watchpoint): Use string_file.
11436         (save_breakpoints): Use stdio_file.
11437         * c-exp.y (oper): Use string_file.
11438         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11439         tee_file.
11440         (pop_output_files): Use delete.
11441         (handle_redirections): Use stdio_file and tee_file.
11442         * cli/cli-setshow.c (do_show_command): Use string_file.
11443         * compile/compile-c-support.c (c_compute_program): Use
11444         string_file.
11445         * compile/compile-c-symbols.c (generate_vla_size): Take a
11446         'string_file &' instead of a 'ui_file *'.
11447         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11448         of a 'ui_file *'.  Use string_file.
11449         (generate_c_for_variable_locations): Take a 'string_file &'
11450         instead of a 'ui_file *'.
11451         * compile/compile-internal.h (generate_c_for_for_one_variable):
11452         Take a 'string_file &' instead of a 'ui_file *'.
11453         * compile/compile-loc2c.c (push, pushf, unary, binary)
11454         (print_label, pushf_register_address, pushf_register)
11455         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11456         'ui_file *'.  Adjust.
11457         * compile/compile.c (compile_to_object): Use string_file.
11458         * compile/compile.h (compile_dwarf_expr_to_c)
11459         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11460         'ui_file *'.
11461         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11462         (replace_typedefs_qualified_name): Use string_file and
11463         obstack_copy0.
11464         * disasm.c (gdb_pretty_print_insn): Use string_file.
11465         (gdb_disassembly): Adjust reference the null_stream global.
11466         (do_ui_file_delete): Delete.
11467         (gdb_insn_length): Use null_stream.
11468         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11469         * dwarf2loc.c (dwarf2_compile_property_to_c)
11470         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11471         'string_file &' instead of a 'ui_file *'.
11472         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11473         * dwarf2read.c (do_ui_file_peek_last): Delete.
11474         (dwarf2_compute_name): Use string_file.
11475         * event-top.c (gdb_setup_readline): Use stdio_file.
11476         * gdbarch.sh (verify_gdbarch): Use string_file.
11477         * gdbtypes.c (safe_parse_type): Use null_stream.
11478         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11479         string_file.
11480         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11481         'string_file *' instead of a 'ui_file *'.
11482         (gdbscm_arch_disassemble): Use string_file.
11483         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11484         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11485         inherits from ui_file.
11486         (ioscm_file_port_delete, ioscm_file_port_rewind)
11487         (ioscm_file_port_put): Delete.
11488         (ioscm_file_port_write): Rename to ...
11489         (ioscm_file_port::write): ... this.  Remove file_port_magic
11490         checks.
11491         (ioscm_file_port_new): Delete.
11492         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11493         ui_file_up.
11494         * guile/scm-type.c (tyscm_type_name): Use string_file.
11495         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11496         Use string_file.
11497         * infcmd.c (print_return_value_1): Use string_file.
11498         * infrun.c (print_target_wait_results): Use string_file.
11499         * language.c (add_language): Use string_file.
11500         * location.c (explicit_to_string_internal): Use string_file.
11501         * main.c (captured_main_1): Use null_file.
11502         * maint.c (maintenance_print_architecture): Use stdio_file.
11503         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11504         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11505         event_channel>: Change type to mi_console_file pointer.
11506         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11507         (mi_console_file_delete): Delete.
11508         (struct mi_console_file): Delete.
11509         (mi_console_file_magic): Delete.
11510         (mi_console_file_new): Delete.
11511         (mi_console_file::mi_console_file): New.
11512         (mi_console_file_delete): Delete.
11513         (mi_console_file_fputs): Delete.
11514         (mi_console_file::write): New.
11515         (mi_console_raw_packet): Delete.
11516         (mi_console_file::flush): New.
11517         (mi_console_file_flush): Delete.
11518         (mi_console_set_raw): Rename to ...
11519         (mi_console_file::set_raw): ... this.
11520         * mi/mi-console.h (class mi_console_file): New class.
11521         (mi_console_file_new, mi_console_set_raw): Delete.
11522         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11523         (mi_set_logging): Use delete and tee_file.  Adjust.
11524         * mi/mi-main.c (output_register): Use string_file.
11525         (mi_cmd_data_evaluate_expression): Use string_file.
11526         (mi_cmd_data_read_memory): Use string_file.
11527         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11528         * mi/mi-out.c (mi_ui_out::main_stream): New.
11529         (mi_ui_out::rewind): Use main_stream and
11530         string_file.
11531         (mi_ui_out::put): Use main_stream and string_file.
11532         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11533         Allocate a 'string_file' instead.
11534         (mi_out_new): Don't allocate a mem_fileopen stream here.
11535         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11536         (mi_ui_out::main_stream): Declare method.
11537         * printcmd.c (eval_command): Use string_file.
11538         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11539         * python/py-arch.c (archpy_disassemble): Use string_file.
11540         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11541         * python/py-frame.c (frapy_str): Use string_file.
11542         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11543         Use string_file.
11544         * python/py-type.c (typy_str): Use string_file.
11545         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11546         * python/py-value.c (valpy_str): Use string_file.
11547         * record-btrace.c (btrace_insn_history): Use string_file.
11548         * regcache.c (regcache_print): Use stdio_file.
11549         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11550         * remote.c (escape_buffer): Use string_file.
11551         * rust-lang.c (rust_get_disr_info): Use string_file.
11552         * serial.c (serial_open_ops_1): Use stdio_file.
11553         (do_serial_close): Use delete.
11554         * stack.c (print_frame_arg): Use string_file.
11555         (print_frame_args): Remove local mem_fileopen stream, not used.
11556         (print_frame): Use string_file.
11557         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11558         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11559         Take a 'string_file *' instead of a 'ui_file *'.
11560         * top.c (new_ui): Use stdio_file and stderr_file.
11561         (free_ui): Use delete.
11562         (execute_command_to_string): Use string_file.
11563         (quit_confirm): Use string_file.
11564         * tracepoint.c (collection_list::append_exp): Use string_file.
11565         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11566         * tui/tui-file.c: Don't include "ui-file.h".
11567         (enum streamtype, struct tui_stream): Delete.
11568         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11569         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11570         (tui_file::tui_file): New method.
11571         (tui_file_fputs): Delete.
11572         (tui_file_get_strbuf): Delete.
11573         (tui_file::puts): New method.
11574         (tui_file_adjust_strbuf): Delete.
11575         (tui_file_flush): Delete.
11576         (tui_file::flush): New method.
11577         * tui/tui-file.h: Tweak intro comment.
11578         Include ui-file.h.
11579         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11580         (tui_file_adjust_strbuf): Delete declarations.
11581         (class tui_file): New class.
11582         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11583         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11584         (tui_register_format): Use string_stream.
11585         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11586         (tui_get_function_from_frame): Use string_file.
11587         * typeprint.c (type_to_string): Use string_file.
11588         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11589         (null_stream): New global.
11590         (ui_file_delete): Delete.
11591         (ui_file::ui_file): New.
11592         (null_file_isatty): Delete.
11593         (ui_file::~ui_file): New.
11594         (null_file_rewind): Delete.
11595         (ui_file::printf): New.
11596         (null_file_put): Delete.
11597         (null_file_flush): Delete.
11598         (ui_file::putstr): New.
11599         (null_file_write): Delete.
11600         (ui_file::putstrn): New.
11601         (null_file_read): Delete.
11602         (ui_file::putc): New.
11603         (null_file_fputs): Delete.
11604         (null_file_write_async_safe): Delete.
11605         (ui_file::vprintf): New.
11606         (null_file_delete): Delete.
11607         (null_file::write): New.
11608         (null_file_fseek): Delete.
11609         (null_file::puts): New.
11610         (ui_file_data): Delete.
11611         (null_file::write_async_safe): New.
11612         (gdb_flush, ui_file_isatty): Adjust.
11613         (ui_file_put, ui_file_rewind): Delete.
11614         (ui_file_write): Adjust.
11615         (ui_file_write_for_put): Delete.
11616         (ui_file_write_async_safe, ui_file_read): Adjust.
11617         (ui_file_fseek): Delete.
11618         (fputs_unfiltered): Adjust.
11619         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11620         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11621         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11622         (set_ui_file_data): Delete.
11623         (string_file::~string_file, string_file::write)
11624         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11625         (do_ui_file_as_string, ui_file_as_string): Delete.
11626         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11627         (struct mem_file): Delete.
11628         (mem_file_new): Delete.
11629         (stdio_file::stdio_file): New.
11630         (mem_file_delete): Delete.
11631         (stdio_file::stdio_file): New.
11632         (mem_fileopen): Delete.
11633         (stdio_file::~stdio_file): New.
11634         (mem_file_rewind): Delete.
11635         (stdio_file::set_stream): New.
11636         (mem_file_put): Delete.
11637         (stdio_file::open): New.
11638         (mem_file_write): Delete.
11639         (stdio_file_magic, struct stdio_file): Delete.
11640         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11641         (stdio_file::flush): New.
11642         (stdio_file_read): Rename to ...
11643         (stdio_file::read): ... this.  Adjust.
11644         (stdio_file_write): Rename to ...
11645         (stdio_file::write): ... this.  Adjust.
11646         (stdio_file_write_async_safe): Rename to ...
11647         (stdio_file::write_async_safe) ... this.  Adjust.
11648         (stdio_file_fputs): Rename to ...
11649         (stdio_file::puts) ... this.  Adjust.
11650         (stdio_file_isatty): Delete.
11651         (stdio_file_fseek): Delete.
11652         (stdio_file::isatty): New.
11653         (stderr_file_write): Rename to ...
11654         (stderr_file::write) ... this.  Adjust.
11655         (stderr_file_fputs): Rename to ...
11656         (stderr_file::puts) ... this.  Adjust.
11657         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11658         (stderr_file::stderr_file): New.
11659         (tee_file_magic): Delete.
11660         (struct tee_file): Delete.
11661         (tee_file::tee_file): New.
11662         (tee_file_new): Delete.
11663         (tee_file::~tee_file): New.
11664         (tee_file_delete): Delete.
11665         (tee_file_flush): Rename to ...
11666         (tee_file::flush): ... this.  Adjust.
11667         (tee_file_write): Rename to ...
11668         (tee_file::write): ... this.  Adjust.
11669         (tee_file::write_async_safe): New.
11670         (tee_file_fputs): Rename to ...
11671         (tee_file::puts): ... this.  Adjust.
11672         (tee_file_isatty): Rename to ...
11673         (tee_file::isatty): ... this.  Adjust.
11674         * ui-file.h (struct obstack, struct ui_file): Don't
11675         forward-declare.
11676         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11677         (ui_file_write_ftype)
11678         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11679         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11680         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11681         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11682         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11683         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11684         (set_ui_file_fseek): Delete.
11685         (ui_file_data, ui_file_delete, ui_file_rewind)
11686         (struct ui_file): New.
11687         (ui_file_up): New.
11688         (class null_file): New.
11689         (null_stream): Declare.
11690         (ui_file_write_for_put, ui_file_put): Delete.
11691         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11692         Delete.
11693         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11694         (gdb_fopen, tee_file_new): Delete.
11695         (struct string_file): New.
11696         (struct stdio_file): New.
11697         (stdio_file_up): New.
11698         (struct stderr_file): New.
11699         (class tee_file): New.
11700         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11701         of a 'ui_file *'.  Adjust.
11702         * ui-out.h (class ui_out) <field_stream>: Likewise.
11703         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11704         (null_stream): Delete.
11705         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11706         Adjust.
11707         * utils.h (struct ui_file): Delete forward declaration..
11708         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11709         (error_stream): Take a 'string_file &' instead of a
11710         'ui_file *'.
11711         * varobj.c (varobj_value_get_print_value): Use string_file.
11712         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11713         * gdbarch.c: Regenerate.
11714
11715 2017-02-02  Pedro Alves  <palves@redhat.com>
11716
11717         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11718         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11719         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11720         Adjust to call gdb_print_insn instead of
11721         gdb_disassembler::print_insn.
11722         (dump_insns, do_mixed_source_and_assembly_deprecated)
11723         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11724         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11725         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11726         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11727         declaration.
11728         (gdb_pretty_print_insn): Re-add declaration.
11729         * record-btrace.c (btrace_insn_history): Don't allocate a
11730         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11731
11732 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11733
11734         * disasm.h (gdb_disassembly): Remove file_string parameter.
11735         * disasm.c (gdb_disassembly): Likewise.
11736         * cli/cli-cmds.c (print_disassembly): Adapt.
11737         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11738         * stack.c (do_gdb_disassembly): Likewise.
11739
11740 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11741
11742         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11743         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11744         targets.  And if the implicit value is longer than needed, extract
11745         the first bytes instead of the "least significant" ones.
11746
11747 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11748
11749         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11750         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11751         (btrace_fetch): Assert can_access_registers_ptid.
11752         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11753         validate_registers_access.
11754
11755 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11756
11757         * gdbthread.h (can_access_registers_ptid): New.
11758         * thread.c (can_access_registers_ptid): New.
11759
11760 2017-02-01  Pedro Alves  <palves@redhat.com>
11761
11762         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11763
11764 2017-01-31  Pedro Alves  <palves@redhat.com>
11765
11766         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11767         Fix typos.
11768
11769 2017-01-31  Pedro Alves  <palves@redhat.com>
11770
11771         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11772         not used.
11773
11774 2017-01-31  Pedro Alves  <palves@redhat.com>
11775
11776         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11777
11778 2017-01-31  Pedro Alves  <palves@redhat.com>
11779
11780         * common/scoped_restore.h
11781         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11782         change the value's parameter type to T2.
11783         (make_scoped_restore): Likewise.
11784
11785 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11786             Richard Henderson  <rth@redhat.com>
11787
11788         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11789         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11790         GS_BASE for older kernels.
11791         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11792         GS_BASE for older kernels.
11793         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11794         and GS_BASE to the offset table.
11795         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11796         system register group.
11797         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11798         for older kernels.
11799         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11800         amd64 ABI.
11801         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11802         AMD64_GSBASE_REGNUM.
11803         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11804         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11805         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11806         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11807         i386/64bit-segments.xml in those rules.
11808         * features/i386/64bit-segments.xml: New file.
11809         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11810         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11811         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11812         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11813         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11814         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11815         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11816         * features/i386/amd64-avx-linux.c: Regenerated.
11817         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11818         * features/i386/amd64-avx-mpx.c: Regenerated.
11819         * features/i386/amd64-avx512-linux.c: Regenerated.
11820         * features/i386/amd64-linux.c: Regenerated.
11821         * features/i386/amd64-mpx-linux.c: Regenerated.
11822         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11823         * features/i386/i386-avx-mpx.c: Regenerated.
11824         * features/i386/x32-avx-linux.c: Regenerated.
11825         * features/i386/x32-avx512-linux.c: Regenerated.
11826         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11827         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11828         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11829         * regformats/i386/amd64-linux.dat: Regenerated.
11830         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11831         * regformats/i386/x32-avx-linux.dat: Regenerated.
11832         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11833         * regformats/i386/x32-linux.dat: Regenerated.
11834
11835 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11836
11837         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11838         Set to AMD64_NUM_REGS.
11839
11840 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11841
11842         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11843         that checks validity of a register number.
11844
11845 2017-01-27  Kees Cook  <keescook@google.com>
11846
11847         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11848         fetch_fpregs if target has fpa registers.
11849         (arm_linux_store_inferior_registers): Call store_fpregs if target
11850         has fpa registers.
11851
11852 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11853
11854         * cris-tdep.c (cris_gdbarch_init): Remove check for
11855         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11856
11857 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11858
11859         * corelow.c (get_core_register_section): Check for regset
11860         existence before checking for REGSET_VARIABLE_SIZE.
11861
11862 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11863             Pedro Alves  <palves@redhat.com>
11864
11865         PR gdb/20939
11866         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11867         call memory_error, save memaddr instead.
11868         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11869         negative, cal memory_error.
11870         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11871
11872 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11873
11874         * disasm-selftests.c (memory_error_test): New function.
11875         (_initialize_disasm_selftests): Register memory_error_test.
11876
11877 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11878
11879         * Makefile.in (SFILES): Add disasm-selftests.c and
11880         selftest-arch.c.
11881         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11882         * disasm-selftests.c: New file.
11883         * selftest-arch.c: New file.
11884         * selftest-arch.h: New file.
11885
11886 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11887
11888         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11889         to bfd_arch_mep.  Don't return 0 if section is not
11890         found.  Call print_insn_mep.
11891
11892 2017-01-26  Pedro Alves  <palves@redhat.com>
11893             Yao Qi  <yao.qi@linaro.org>
11894
11895         * arm-tdep.c: Include "disasm.h".
11896         (gdb_print_insn_arm): Update code to get gdbarch.
11897         * disasm.c (dis_asm_read_memory): Change it to
11898         gdb_disassembler::dis_asm_read_memory.
11899         (dis_asm_memory_error): Likewise.
11900         (dis_asm_print_address): Likewise.
11901         (gdb_pretty_print_insn): Change it to
11902         gdb_disassembler::pretty_print_insn.
11903         (dump_insns): Add one argument gdb_disassemlber.  All
11904         callers updated.
11905         (do_mixed_source_and_assembly_deprecated): Likewise.
11906         (do_mixed_source_and_assembly): Likewise.
11907         (do_assembly_only): Likewise.
11908         (gdb_disassembler::gdb_disassembler): New.
11909         (gdb_disassembler::print_insn): New.
11910         * disasm.h (class gdb_disassembler): New.
11911         (gdb_pretty_print_insn): Remove declaration.
11912         (gdb_disassemble_info): Likewise.
11913         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11914         (gdbscm_disasm_read_memory_worker): Update.
11915         (gdbscm_disasm_read_memory): Update.
11916         (gdbscm_disasm_memory_error): Remove.
11917         (gdbscm_disasm_print_address): Remove.
11918         (gdbscm_disassembler::gdbscm_disassembler): New.
11919         (gdbscm_print_insn_from_port): Update.
11920         * mips-tdep.c: Include disasm.h.
11921         (gdb_print_insn_mips): Update code to get gdbarch.
11922         * record-btrace.c (btrace_insn_history): Update.
11923         * spu-tdep.c: Include disasm.h.
11924         (struct spu_dis_asm_data): Remove.
11925         (struct spu_dis_asm_info): New.
11926         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11927         SPU id.
11928         (gdb_print_insn_spu): Cast disassemble_info to
11929         spu_dis_asm_info.
11930
11931 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11932
11933         * disasm.c (do_ui_file_delete): Delete.
11934         (gdb_insn_length): Move code creating stream to ...
11935         * utils.c (null_stream): ... here.  New function.
11936         * utils.h (null_stream): Declare.
11937
11938 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11939
11940         * python/py-inferior.c (find_thread_object): Return directly
11941         from the loop.  Remove "found" variable.
11942
11943 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11944
11945         GDB 7.12.1 released.
11946
11947 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11948
11949         * python/py-function.c (fnpy_call): Reorder declarations to have
11950         the gdbpy_enter object declared first.
11951         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11952
11953 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11954
11955         PR python/21068
11956         * python/python-internal.h (PyMem_RawMalloc): Define for
11957         Python < 3.4.
11958         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11959         PyMem_RawMalloc instead of PyMem_Malloc.
11960
11961 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11962             Luis Machado  <lgustavo@codesourcery.com>
11963
11964         * NEWS (New commands): Mention flash-erase.
11965         (New MI commands): Mention target-flash-erase.
11966         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11967         command.
11968         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11969         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11970         * target.c (flash_erase_command): New function.
11971         (initialize_targets): Add new flash-erase command.
11972         * target.h (flash_erase_command): New declaration.
11973
11974 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11975
11976         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11977         HAVE_SYS_PROCFS_H is defined.
11978
11979 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11980
11981         * remote.c (struct cached_reg): Change data into a pointer.
11982         * (stop_reply_dtr): Free data pointers before deleting vector.
11983         (process_stop_reply): Likewise.
11984         (remote_parse_stop_reply): Allocate space for data
11985
11986 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11987
11988         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11989         MAX_REGISTER_SIZE.
11990         (amd64_pseudo_register_read_value): Likewise.
11991         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11992         (store_register_using_P): Likewise.
11993         * regcache.c (regcache_xfer_part): Likewise.
11994
11995 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11996
11997         Split real and pseudo registers.
11998         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11999         (sparc32_pseudo_regnum): New enum.
12000         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12001         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12002         (SPARC32_CP0_REGISTERS): New macro.
12003         (sparc32_pseudo_register_name): New function.
12004         (sparc32_register_name): Use sparc32_pseudo_register_name.
12005         (sparc32_pseudo_register_type): New function.
12006         (sparc32_register_type): Use sparc32_pseudo_register_type.
12007         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12008         pseudo register numbers.
12009         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12010         (SPARC64_CP0_REGISTERS): New macro.
12011         (sparc64_pseudo_register_name): New function.
12012         (sparc64_register_name): Use sparc64_pseudo_register_name.
12013         (sparc64_pseudo_register_type): New function.
12014         (sparc64_register_type): Use sparc64_pseudo_register_type.
12015         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12016         pseudo register numbers.
12017         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12018         sparc64_store_arguments): Handle pseudo register numbers.
12019
12020 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12021
12022         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12023         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12024         output.
12025         (getpkt_or_notif_sane_1): Likewise.
12026
12027 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12028
12029         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12030         of CC.  Pass "-x c++-header" instead of "-x c".
12031
12032 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12033
12034         * remote.c (remote_can_async_p): Update comment.
12035
12036 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12037
12038         * linux-nat.c (linux_nat_can_async_p): Update comment.
12039
12040 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12041
12042         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12043
12044 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12045
12046         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12047
12048 2017-01-10  Tom Tromey  <tom@tromey.com>
12049
12050         * python/py-type.c (typy_legacy_template_argument): Update.
12051         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12052         ~demangle_parse_info): Declare new members.
12053         (cp_demangled_name_to_comp): Return unique_ptr.
12054         (cp_demangled_name_parse_free)
12055         (make_cleanup_cp_demangled_name_parse_free)
12056         (cp_new_demangle_parse_info): Remove.
12057         * cp-support.c (do_demangled_name_parse_free_cleanup)
12058         (make_cleanup_cp_demangled_name_parse_free): Remove.
12059         (inspect_type, cp_canonicalize_string_full)
12060         (cp_canonicalize_string): Update.
12061         (mangled_name_to_comp): Change return type.
12062         (cp_class_name_from_physname, method_name_from_physname)
12063         (cp_func_name, cp_remove_params): Update.
12064         * cp-name-parser.y (demangle_parse_info): New constructor, from
12065         cp_new_demangle_parse_info.
12066         (~demangle_parse_info): New destructor, from
12067         cp_demangled_name_parse_free.
12068         (cp_merge_demangle_parse_infos): Update.
12069         (cp_demangled_name_to_comp): Change return type.
12070
12071 2017-01-10  Tom Tromey  <tom@tromey.com>
12072
12073         * top.c (prevent_dont_repeat): Change return type.
12074         * python/python.c (execute_gdb_command): Use std::string.
12075         Update.
12076         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12077         * command.h (prevent_dont_repeat): Change return type.
12078         * breakpoint.c (bpstat_do_actions_1): Update.
12079
12080 2017-01-10  Tom Tromey  <tom@tromey.com>
12081
12082         * value.h (scoped_value_mark::~scoped_value_mark): Call
12083         free_to_mark.
12084         (scoped_value_mark::free_to_mark): New method.
12085         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12086         scoped_value_mark.
12087
12088 2017-01-10  Tom Tromey  <tom@tromey.com>
12089
12090         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12091         (valpy_reference_value, valpy_const_value, valpy_get_address)
12092         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12093         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12094         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12095         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12096         scoped_value_mark.
12097         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12098         * value.h (scoped_value_mark): New class.
12099
12100 2017-01-10  Tom Tromey  <tom@tromey.com>
12101
12102         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12103         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12104         * psymtab.c (discard_psymtabs_upto): Remove.
12105         (make_cleanup_discard_psymtabs): Remove.
12106         (struct psymtab_state): Remove.
12107
12108 2017-01-10  Tom Tromey  <tom@tromey.com>
12109
12110         * record-full.c (record_full_save_cleanups): Remove.
12111         (record_full_save): Use gdb::unlinker.
12112         * gcore.c (do_bfd_delete_cleanup): Remove.
12113         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12114         cleanups.
12115         * dwarf2read.c (unlink_if_set): Remove.
12116         (write_psymtabs_to_index): Use gdb::unlinker.
12117         * common/gdb_unlinker.h: New file.
12118
12119 2017-01-10  Tom Tromey  <tom@tromey.com>
12120
12121         * windows-tdep.c (windows_xfer_shared_library): Update.
12122         * windows-nat.c (windows_make_so): Update.
12123         * utils.h (make_cleanup_bfd_unref): Remove.
12124         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12125         * symfile.h (symfile_bfd_open)
12126         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12127         * symfile.c (read_symbols, symbol_file_add)
12128         (separate_debug_file_exists): Update.
12129         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12130         (generic_load, reread_symbols): Update.
12131         * symfile-mem.c (symbol_file_add_from_memory): Update.
12132         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12133         (spu_symbol_file_add_from_memory): Update.
12134         * solist.h (struct target_so_ops) <bfd_open>: Return
12135         gdb_bfd_ref_ptr.
12136         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12137         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12138         gdb_bfd_ref_ptr.
12139         (solib_map_sections, reload_shared_libraries_1): Update.
12140         * solib-svr4.c (enable_break): Update.
12141         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12142         * solib-frv.c (enable_break2): Update.
12143         * solib-dsbt.c (enable_break): Update.
12144         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12145         gdb_bfd_ref_ptr.
12146         (darwin_solib_get_all_image_info_addr_at_init): Update.
12147         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12148         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12149         * record-full.c (record_full_save): Update.
12150         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12151         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12152         * minidebug.c (find_separate_debug_file_in_section): Return
12153         gdb_bfd_ref_ptr.
12154         * machoread.c (macho_add_oso_symfile): Change abfd to
12155         gdb_bfd_ref_ptr.
12156         (macho_symfile_read_all_oso): Update.
12157         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12158         (macho_symfile_read): Update.
12159         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12160         (jit_bfd_try_read_symtab): Update.
12161         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12162         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12163         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12164         gdb_bfd_ref_ptr.
12165         (gdb_bfd_ref_policy): New struct.
12166         (gdb_bfd_ref_ptr): New typedef.
12167         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12168         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12169         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12170         gdb_bfd_ref_ptr.
12171         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12172         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12173         (gcore_command): Update.
12174         * exec.c (exec_file_attach): Update.
12175         * elfread.c (elf_symfile_read): Update.
12176         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12177         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12178         (open_and_init_dwo_file): Update.
12179         (open_dwp_file): Return gdb_bfd_ref_ptr.
12180         (open_and_init_dwp_file): Update.
12181         * corelow.c (core_open): Update.
12182         * compile/compile-object-load.c (compile_object_load): Update.
12183         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12184         * coffread.c (coff_symfile_read): Update.
12185         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12186         gdb_bfd_ref_ptr.  Rename.
12187         (dump_bfd_file, restore_command): Update.
12188         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12189         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12190         (find_separate_debug_file_by_buildid): Update.
12191
12192 2017-01-10  Tom Tromey  <tom@tromey.com>
12193
12194         * common/gdb_ref_ptr.h: New file.
12195         * python/py-ref.h (struct gdbpy_ref_policy): New.
12196         (gdbpy_ref): Now a typedef.
12197
12198 2017-01-10  Tom Tromey  <tom@tromey.com>
12199
12200         * utils.h (make_cleanup_htab_delete): Don't declare.
12201         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12202         Remove.
12203         * linespec.c (decode_compound_collector): Add constructor,
12204         destructor.
12205         (lookup_prefix_sym): Remove cleanup.
12206         (symtab_collector): Add constructor, destructor.
12207         (collect_symtabs_from_filename): Remove cleanup.
12208         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12209         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12210         Use htab_up.
12211         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12212         * dwarf2read.c (dw2_expand_symtabs_matching)
12213         (dw2_map_symbol_filenames, dwarf_decode_macros)
12214         (write_psymtabs_to_index): Use htab_up.
12215         * dwarf2loc.c (func_verify_no_selftailcall)
12216         (call_site_find_chain_1, func_verify_no_selftailcall)
12217         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12218         std::vector, gdb::unique_xmalloc_ptr.
12219         (call_sitep): Remove typedef.
12220         (dwarf2_locexpr_baton_eval): Remove unused variable.
12221
12222 2017-01-10  Tom Tromey  <tom@tromey.com>
12223
12224         * python/python-internal.h (make_cleanup_py_decref)
12225         (make_cleanup_py_xdecref): Don't declare.
12226         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12227         (py_xdecref, make_cleanup_py_xdecref): Remove.
12228
12229 2017-01-10  Tom Tromey  <tom@tromey.com>
12230
12231         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12232         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12233
12234 2017-01-10  Tom Tromey  <tom@tromey.com>
12235
12236         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12237
12238 2017-01-10  Tom Tromey  <tom@tromey.com>
12239
12240         * python/py-utils.c (unicode_to_encoded_string)
12241         (python_string_to_target_string)
12242         (python_string_to_target_python_string)
12243         (python_string_to_host_string, gdbpy_obj_to_string)
12244         (get_addr_from_python): Use gdbpy_ref.
12245
12246 2017-01-10  Tom Tromey  <tom@tromey.com>
12247
12248         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12249         gdbpy_ref.
12250
12251 2017-01-10  Tom Tromey  <tom@tromey.com>
12252
12253         * python/python.c (eval_python_command, gdbpy_decode_line)
12254         (gdbpy_run_events, gdbpy_start_type_printers)
12255         (gdbpy_apply_type_printers): Use gdbpy_ref.
12256
12257 2017-01-10  Tom Tromey  <tom@tromey.com>
12258
12259         * python/py-param.c (get_doc_string, compute_enum_values): Use
12260         gdbpy_ref.
12261
12262 2017-01-10  Tom Tromey  <tom@tromey.com>
12263
12264         * python/py-inferior.c (find_thread_object, build_inferior_list):
12265         Use gdbpy_ref.
12266
12267 2017-01-10  Tom Tromey  <tom@tromey.com>
12268
12269         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12270
12271 2017-01-10  Tom Tromey  <tom@tromey.com>
12272
12273         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12274         gdbpy_ref.
12275
12276 2017-01-10  Tom Tromey  <tom@tromey.com>
12277
12278         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12279         extra incref.
12280         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12281         Use gdbpy_ref.
12282
12283 2017-01-10  Tom Tromey  <tom@tromey.com>
12284
12285         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12286         gdbpy_ref.
12287
12288 2017-01-10  Tom Tromey  <tom@tromey.com>
12289
12290         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12291         decref results of PyArg_ParseTupleAndKeywords.
12292
12293 2017-01-10  Tom Tromey  <tom@tromey.com>
12294
12295         * python/python.c (python_run_simple_file): Use
12296         unique_xmalloc_ptr, gdbpy_ref.
12297
12298 2017-01-10  Tom Tromey  <tom@tromey.com>
12299
12300         * python/py-prettyprint.c (print_stack_unless_memory_error)
12301         (print_string_repr, print_children): Use gdbpy_ref.
12302         (dummy_python_frame): New class.
12303         (dummy_python_frame::dummy_python_frame): Rename from
12304         push_dummy_python_frame.
12305         (py_restore_tstate): Remove.
12306
12307 2017-01-10  Tom Tromey  <tom@tromey.com>
12308
12309         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12310
12311 2017-01-10  Tom Tromey  <tom@tromey.com>
12312
12313         * python/python.c (ensure_python_env, restore_python_env):
12314         Remove.
12315         * python/python-internal.h (ensure_python_env): Don't declare.
12316         * varobj.h (varobj_ensure_python_env): Don't declare.
12317         * varobj.c (varobj_ensure_python_env): Remove.
12318
12319 2017-01-10  Tom Tromey  <tom@tromey.com>
12320
12321         * varobj.c (varobj_value_get_print_value): Use
12322         gdbpy_enter_varobj.
12323
12324 2017-01-10  Tom Tromey  <tom@tromey.com>
12325
12326         * python/py-prettyprint.c (print_string_repr, print_children):
12327         Update.
12328         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12329         of "encoding".
12330         * varobj.c (varobj_value_get_print_value): Update.
12331         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12332
12333 2017-01-10  Tom Tromey  <tom@tromey.com>
12334
12335         * varobj.c (varobj_get_display_hint)
12336         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12337         (varobj_set_visualizer, free_variable): Use
12338         gdbpy_enter_varobj.
12339
12340 2017-01-10  Tom Tromey  <tom@tromey.com>
12341
12342         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12343         (do_finish_initialization): New function.  Use gdbpy_ref.
12344         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12345         do_finish_initialization.
12346
12347 2017-01-10  Tom Tromey  <tom@tromey.com>
12348
12349         * python/py-param.c (get_set_value, get_show_value): Use
12350         gdbpy_enter, gdbpy_ref.
12351
12352 2017-01-10  Tom Tromey  <tom@tromey.com>
12353
12354         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12355
12356 2017-01-10  Tom Tromey  <tom@tromey.com>
12357
12358         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12359
12360 2017-01-10  Tom Tromey  <tom@tromey.com>
12361
12362         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12363         Use gdbpy_enter_varobj.
12364
12365 2017-01-10  Tom Tromey  <tom@tromey.com>
12366
12367         * varobj.c (gdbpy_enter_varobj): New constructor.
12368         * python/python-internal.h (gdbpy_enter_varobj): New class.
12369         * python/py-varobj.c (py_varobj_get_iterator): Use
12370         gdbpy_enter_varobj.
12371
12372 2017-01-10  Tom Tromey  <tom@tromey.com>
12373
12374         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12375         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12376         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12377         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12378         unique_xmalloc_ptr.
12379         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12380
12381 2017-01-10  Tom Tromey  <tom@tromey.com>
12382
12383         * python/py-xmethods.c (invoke_match_method): Use
12384         gdbpy_ref.
12385
12386 2017-01-10  Tom Tromey  <tom@tromey.com>
12387
12388         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12389         gdbpy_enter, gdbpy_ref.
12390
12391 2017-01-10  Tom Tromey  <tom@tromey.com>
12392
12393         * python/python.c (python_interactive_command): Use gdbpy_enter.
12394
12395 2017-01-10  Tom Tromey  <tom@tromey.com>
12396
12397         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12398         gdbpy_ref.
12399
12400 2017-01-10  Tom Tromey  <tom@tromey.com>
12401
12402         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12403         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12404
12405 2017-01-10  Tom Tromey  <tom@tromey.com>
12406
12407         * utils.h (htab_deleter): New struct.
12408         (htab_up): New typedef.
12409         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12410         gdbpy_enter, gdbpy_ref, htab_up.
12411
12412 2017-01-10  Tom Tromey  <tom@tromey.com>
12413
12414         * python/py-unwind.c (pending_frame_invalidate): Remove.
12415         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12416
12417 2017-01-10  Tom Tromey  <tom@tromey.com>
12418
12419         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12420         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12421
12422 2017-01-10  Tom Tromey  <tom@tromey.com>
12423
12424         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12425
12426 2017-01-10  Tom Tromey  <tom@tromey.com>
12427
12428         * python/python.c (gdbpy_eval_from_control_command)
12429         (gdbpy_source_script, gdbpy_run_events)
12430         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12431         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12432         gdbpy_enter.
12433
12434 2017-01-10  Tom Tromey  <tom@tromey.com>
12435
12436         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12437
12438 2017-01-10  Tom Tromey  <tom@tromey.com>
12439
12440         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12441
12442 2017-01-10  Tom Tromey  <tom@tromey.com>
12443
12444         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12445         (python_on_inferior_call_pre, python_on_inferior_call_post)
12446         (python_on_memory_change, python_on_register_change)
12447         (python_inferior_exit, python_new_objfile, add_thread_object)
12448         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12449
12450 2017-01-10  Tom Tromey  <tom@tromey.com>
12451
12452         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12453         (bpfinishpy_handle_exit): Use gdbpy_enter.
12454
12455 2017-01-10  Tom Tromey  <tom@tromey.com>
12456
12457         * python/py-cmd.c (cmdpy_destroyer)
12458         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12459         gdbpy_enter.
12460
12461 2017-01-10  Tom Tromey  <tom@tromey.com>
12462
12463         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12464         gdbpy_enter.
12465         (gdbpy_breakpoint_has_cond): Likewise.
12466
12467 2017-01-10  Tom Tromey  <tom@tromey.com>
12468
12469         * python/python.c (gdbpy_enter): New constructor.
12470         (~gdbpy_enter): New destructor.
12471         (restore_python_env, ensure_python_env): Rewrite.
12472         * python/python-internal.h (gdbpy_enter): New class.
12473
12474 2017-01-10  Tom Tromey  <tom@tromey.com>
12475
12476         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12477
12478 2017-01-10  Tom Tromey  <tom@tromey.com>
12479
12480         * python/py-value.c (value_has_field, get_field_flag)
12481         (get_field_type, valpy_getitem, convert_value_from_python): Use
12482         gdbpy_ref.
12483
12484 2017-01-10  Tom Tromey  <tom@tromey.com>
12485
12486         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12487         gdbpy_ref.
12488
12489 2017-01-10  Tom Tromey  <tom@tromey.com>
12490
12491         * python/py-prettyprint.c (search_pp_list)
12492         (find_pretty_printer_from_objfiles)
12493         (find_pretty_printer_from_progspace)
12494         (find_pretty_printer_from_gdb, find_pretty_printer)
12495         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12496         gdbpy_ref.
12497
12498 2017-01-10  Tom Tromey  <tom@tromey.com>
12499
12500         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12501
12502 2017-01-10  Tom Tromey  <tom@tromey.com>
12503
12504         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12505         (ltpy_get_all_source_lines): Use gdbpy_ref.
12506
12507 2017-01-10  Tom Tromey  <tom@tromey.com>
12508
12509         * python/py-framefilter.c (extract_sym, extract_value)
12510         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12511         gdbpy_ref.
12512
12513 2017-01-10  Tom Tromey  <tom@tromey.com>
12514
12515         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12516
12517 2017-01-10  Tom Tromey  <tom@tromey.com>
12518
12519         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12520
12521 2017-01-10  Tom Tromey  <tom@tromey.com>
12522
12523         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12524         gdbpy_ref.
12525
12526 2017-01-10  Tom Tromey  <tom@tromey.com>
12527
12528         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12529
12530 2017-01-10  Tom Tromey  <tom@tromey.com>
12531
12532         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12533         (typy_range): Use gdbpy_ref.
12534
12535 2017-01-10  Tom Tromey  <tom@tromey.com>
12536
12537         * python/py-threadevent.c (create_thread_event_object): Use
12538         gdbpy_ref.
12539         * python/py-stopevent.c (create_stop_event_object): Simplify.
12540         (emit_stop_event): Use gdbpy_ref.
12541         * python/py-signalevent.c (create_signal_event_object): Use
12542         gdbpy_ref.
12543         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12544         (emit_new_objfile_event, create_clear_objfiles_event_object)
12545         (emit_clear_objfiles_event): Use gdbpy_ref.
12546         * python/py-infevents.c (create_inferior_call_event_object)
12547         (create_register_changed_event_object)
12548         (create_memory_changed_event_object, emit_inferior_call_event)
12549         (emit_memory_changed_event, emit_register_changed_event): Use
12550         gdbpy_ref.
12551         * python/py-exitedevent.c (create_exited_event_object)
12552         (emit_exited_event): Use gdbpy_ref.
12553         * python/py-event.h (evpy_emit_event): Remove
12554         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12555         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12556         * python/py-continueevent.c (emit_continue_event): Use
12557         gdbpy_ref.
12558         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12559         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12560         gdbpy_ref.
12561         * python/py-bpevent.c (create_breakpoint_event_object): Use
12562         gdbpy_ref.
12563
12564 2017-01-10  Tom Tromey  <tom@tromey.com>
12565
12566         * python/py-ref.h: New file.
12567
12568 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12569
12570         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12571         void.
12572         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12573         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12574         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12575         * ui-out.c (ui_out::redirect): Likewise.
12576         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12577         * cli/cli-logging.c (set_logging_redirect): Update call site of
12578         ui_out::redirect.
12579         (handle_redirections): Likewise.
12580         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12581         * top.c (execute_command_to_string): Likewise.
12582         * utils.c (do_ui_out_redirect_pop): Likewise.
12583
12584 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12585
12586         * stack.c (_initialize_stack): Update "frame" command help message.
12587
12588 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12589
12590         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12591
12592 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12593
12594         * x86-linux-nat.h: Include gdb_proc_service.h.
12595
12596 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12597
12598         * ser-base.h: Include serial.h.
12599
12600 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12601
12602         * ppc-linux-tdep.h: Include ppc-tdep.h.
12603
12604 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12605
12606         * nat/amd64-linux-siginfo.h: Include signal.h.
12607
12608 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12609
12610         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12611
12612 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12613
12614         * mi/mi-parse.h: Include mi-cmds.h.
12615
12616 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12617
12618         * inf-loop.c: Don't include "target.h".
12619         * inf-loop.h: Include it here.
12620
12621 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12622
12623         * dfp.h: Include "dboulest.h" and "expression.h".
12624
12625 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12626
12627         * ax-gdb.h: Include "ax.h".
12628
12629 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12630
12631         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12632         with nat/gdb_ptrace.h.
12633
12634 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12635
12636         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12637         new line.
12638         (mips64_fbsd_sigframe_init): Likewise.
12639
12640 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12641
12642         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12643         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12644
12645 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12646
12647         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12648         * NEWS: Mention new FreeBSD/mips native configuration.
12649         * config/mips/fbsd.mh: New file.
12650         * configure.host: Add mips*-*-freebsd*.
12651         * mips-fbsd-nat.c: New file.
12652
12653 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12654
12655         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12656         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12657         * NEWS: Mention new FreeBSD/mips target.
12658         * configure.tgt: Add mips*-*-freebsd*.
12659         * mips-fbsd-tdep.c: New file.
12660         * mips-fbsd-tdep.h: New file.
12661
12662 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12663
12664         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12665         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12666
12667 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12668
12669         Update copyright year range in all GDB files.
12670
12671 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12672
12673         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12674
12675 For older changes see ChangeLog-2016.
12676 \f
12677 Local Variables:
12678 mode: change-log
12679 left-margin: 8
12680 fill-column: 74
12681 version-control: never
12682 coding: utf-8
12683 End: