459f0ff3a9b2c76cda9628550c26440701ce9a20
[external/binutils.git] / gdb / ChangeLog
1 2017-10-11  Mark Rages  <markrages@gmail.com>
2
3         * target-memory.c (block_boundaries): Fix for block address not
4         aligned on block size.
5
6 2017-10-10  Pedro Alves <palves@redhat.com>
7             Tom Tromey  <tom@tromey.com>
8
9         * breakpoint.c (struct captured_breakpoint_query_args)
10         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
11         (print_breakpoint): New.
12         * breakpoint.h (print_breakpoint): Declare.
13         * common/common-exceptions.h (enum return_reason): Remove
14         references to catch_exceptions.
15         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
16         Delete.
17         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
18         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
19         * gdb.h: Delete.
20         * gdbthread.h (thread_select): Declare.
21         * mi/mi-cmd-break.c: Don't include gdb.h.
22         (breakpoint_notify): Use print_breakpoint.
23         * mi/mi-cmd-catch.c: Don't include gdb.h.
24         * mi/mi-interp.c: Don't include gdb.h.
25         (mi_print_breakpoint_for_event): New.
26         (mi_breakpoint_created, mi_breakpoint_modified): Use
27         mi_print_breakpoint_for_event.
28         * mi/mi-main.c: Don't include gdb.h.
29         (mi_cmd_thread_select): Parse the global thread ID here.  Use
30         thread_select instead of gdb_thread_select.
31         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
32         of using gdb_list_thread_ids.
33         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
34         FILEIO_ENOSYS here.
35         (remote_fileio_request): Use TRY/CATCH instead of
36         catch_exceptions.
37         * symfile-mem.c (struct symbol_file_add_from_memory_args)
38         (symbol_file_add_from_memory_wrapper): Delete.
39         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
40         * thread.c: Don't include gdb.h.
41         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
42         (thread_alive): Use thread_select.
43         (do_captured_thread_select): Delete, parts salvaged as ...
44         (thread_select): ... this new function.
45         (gdb_thread_select): Delete.
46
47 2017-10-10  Pedro Alves  <palves@redhat.com>
48             Tom Tromey  <tom@tromey.com>
49
50         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
51         and reverse logic.
52         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
53         No longer macros.  Instead ...
54         (enum wp_check_result): They're now values of this new
55         enumeration.
56         (watchpoint_check): Change return type to wp_check_result and
57         parameter type to bpstat.
58         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
59         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
60         catch_errors.  Reverse logic of watchpoint_check call.
61         (breakpoint_re_set_one): Now returns void and takes a breakpoint
62         pointer as parameter.
63         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
64         * common/common-exceptions.c (throw_exception_sjlj): Update
65         comments to avoid mentioning catch_errors.
66         * exceptions.c (catch_errors): Delete.
67         * exceptions.h: Update comments to avoid mentioning catch_errors.
68         (catch_errors_ftype, catch_errors): Delete.
69         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
70         (hook_stop_stub): Delete.
71         (restore_selected_frame): Change return type to void, and
72         parameter type to const frame_id &.
73         (restore_infcall_control_state): Use TRY/CATCH instead of
74         catch_errors.
75         * main.c (captured_command_loop): Return void and remove
76         parameter.  Remove references to catch_errors.
77         (captured_main): Use TRY/CATCH instead of catch_errors.
78         * objc-lang.c (objc_submethod_helper_data)
79         (find_objc_msgcall_submethod_helper): Delete.
80         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
81         catch_errors.
82         * record-full.c (record_full_message): Return void.
83         (record_full_message_args, record_full_message_wrapper): Delete.
84         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
85         instead of catch_errors.
86         * solib-aix.c (solib_aix_open_symbol_file_object): Change
87         parameter type to int.
88         * solib-darwin.c (open_symbol_file_object): Ditto.
89         * solib-dsbt.c (open_symbol_file_object): Ditto.
90         * solib-frv.c (open_symbol_file_object): Ditto.
91         * solib-svr4.c (open_symbol_file_object): Ditto.
92         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
93         * solib.c (update_solib_list): Use TRY/CATCH instead of
94         catch_errors.
95         * solist.h (struct target_so_ops) <open_symbol_file_object>:
96         Change type.
97         * symmisc.c (struct print_symbol_args): Remove.
98         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
99         (print_symbol): Change type.
100         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
101         and remove parameters.
102         (catch_errors): New.
103         (get_windows_debug_event): Adjust.
104
105 2017-10-09  Tom Tromey  <tom@tromey.com>
106
107         * mi/mi-main.c (free_splay_tree): Remove.
108         (list_available_thread_groups): Use splay_tree_up.
109         * common/gdb_splay_tree.h: New file.
110
111 2017-10-09  Tom Tromey  <tom@tromey.com>
112
113         * mi/mi-main.c (do_nothing): Remove.
114         (list_available_thread_groups): Update.
115
116 2017-10-09  Pedro Alves  <palves@redhat.com>
117
118         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
119         reading registers when switching context.
120
121 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
122
123         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
124         (fbsd_convert_siginfo): Likewise.
125         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
126
127 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
128
129         * configure.ac (try_guile_versions): Remove guile-2.2.
130         * configure: Regenerate.
131
132 2017-10-09  Tom Tromey  <tom@tromey.com>
133
134         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
135         (COMPILE.pre): Use $(CXX).
136
137 2017-10-09  Pedro Alves  <palves@redhat.com>
138
139         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
140         Use bool.
141         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
142         * cp-support.h (cp_remove_params): Now returns a
143         gdb::unique_xmalloc_ptr.
144         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
145         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
146         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
147         returning a gdb::unique_xmalloc_ptr.
148         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
149         * stack.c (find_frame_funname): Adjust to cp_remove_params
150         returning a gdb::unique_xmalloc_ptr.
151
152 2017-10-08  Tom Tromey  <tom@tromey.com>
153
154         * dwarf2read.c (dwarf2_get_dwz_file): Use
155         gdb::unique_xmalloc_ptr.
156         (find_slot_in_mapped_hash): Likewise.
157         (dwarf2_physname): Likewise.
158         (create_dwo_unit_in_dwp_v1): Use std::string.
159         (create_dwo_unit_in_dwp_v2): Likewise.
160         (lookup_dwo_cutu): Likewise.
161         (inherit_abstract_dies): Use std::vector.
162         (read_array_type): Likewise.
163         (dwarf_decode_macros): Remove unused declaration.
164         (unsigned_int_compar): Remove.
165         (dwarf2_build_psymtabs_hard): Use scoped_restore.
166         (psymtabs_addrmap_cleanup): Remove.
167
168 2017-10-08  Tom Tromey  <tom@tromey.com>
169
170         * frame-unwind.c (frame_unwind_try_unwinder): Update.
171         * frame.h (frame_cleanup_after_sniffer): Declare.
172         (frame_prepare_for_sniffer): Return void.
173         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
174         type of argument.
175         (frame_prepare_for_sniffer): Return void.
176
177 2017-10-08  Tom Tromey  <tom@tromey.com>
178
179         * utils.h (make_cleanup_value_free): Remove.
180         * utils.c (do_value_free, struct cleanup): Remove.
181         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
182         Use gdb_value_up.
183         * value.h (struct value_deleter): New.
184         (gdb_value_up): New typedef.
185
186 2017-10-08  Tom Tromey  <tom@tromey.com>
187
188         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
189         (make_cleanup_free_search_symbols): Remove.
190         (search_symbols): Return std::vector.
191         (symbol_search::compare_search_syms): Now member of
192         symbol_search.  Change arguments.
193         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
194         (symtab_symbol_info, rbreak_command): Update.
195         * symtab.h (struct symbol_search) <next>: Remove.
196         Add constructors.
197         (symbol_search::operator<): New function.
198         (symbol_search::operator==): New function.
199         (search_symbols): Remove std::vector.
200         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
201         (symbol_search::compare_search_syms): Declare.
202
203 2017-10-06  Yao Qi  <yao.qi@linaro.org>
204
205         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
206         arch/aarch64-insn.o.
207         Remove one rule.
208         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
209
210 2017-10-06  Yao Qi  <yao.qi@linaro.org>
211
212         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
213         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
214         arch/arm-linux.o respectively.
215         * configure.tgt: Likewise.
216
217 2017-10-06  Yao Qi  <yao.qi@linaro.org>
218
219         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
220         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
221
222 2017-10-06  Pedro Alves  <palves@redhat.com>
223
224         * windows-nat.c: Include <algorithm>.
225
226 2017-10-06  Yao Qi  <yao.qi@linaro.org>
227
228         * configure.tgt (i386_tobjs): New variable.
229         (amd64_tobjs): New variable.
230         Set $cpu_obs and $os_obs.
231
232 2017-10-06  Yao Qi  <yao.qi@linaro.org>
233
234         * Makefile.in (CONFIG_SRC_SUBDIR): New.
235         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
236         (clean): Remove object files and dependency files.
237         (distclean): Remove the directory.
238         * configure.ac: Invoke AC_CONFIG_COMMANDS.
239         * configure: Re-generated.
240         * configure.tgt: Replace amd64.o with arch/amd64.o.
241
242 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
243
244         PR build/22188
245         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
246         and SETEND.
247
248 2017-10-05  Pedro Alves  <palves@redhat.com>
249
250         * linux-nat.c (linux_child_follow_fork): When following the parent
251         and detaching the child, consult the parent thread's architecture
252         instead of the child's.
253
254 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
255
256         * ax.h: Do not include "doublest.h".
257         (union agent_val): Remove.
258
259 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
260
261         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
262         (decimal_to_string): Return std::string object.
263         (decimal_from_string): Accept std::string object.  Return bool.
264         (decimal_from_integral, decimal_from_doublest): Remove.
265         (decimal_from_longest): Add prototype.
266         (decimal_from_ulongest): Likewise.
267         (decimal_to_longest): Likewise.
268         (decimal_from_doublest): Likewise.
269         * dfp.c: Do not include "gdbtypes.h" or "value.h".
270         (MAX_DECIMAL_STRING): Move here.
271         (decimal_to_string): Return std::string object.
272         (decimal_from_string): Accept std::string object.  Return bool.
273         (decimal_from_integral): Remove, replace by ...
274         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
275         (decimal_to_longest): New function.
276         (decimal_from_floating): Remove, replace by ...
277         (decimal_from_doublest): ... this new function.
278         (decimal_to_doublest): Update to new decimal_to_string interface.
279
280         * value.c (unpack_long): Use decimal_to_longest.
281         * valops.c (value_cast): Use decimal_from_doublest instead of
282         decimal_from_floating.  Use decimal_from_[u]longest isntead of
283         decimal_from_integral.
284         * valarith.c (value_args_as_decimal): Likewise.
285         * valprint.c (print_decimal_floating): Update to new
286         decimal_to_string interface.
287         * printcmd.c (printf_decfloat): Likewise.
288         * c-exp.y (parse_number): Update to new decimal_from_string interface.
289
290 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
291
292         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
293         * gdbtypes.c: Include "floatformat.h".
294         * value.c: Likewise.
295         * m68k-tdep.c: Likewise.
296
297         * findvar.c: Do not include "floatformat.h".
298         * amd64-darwin-tdep.c: Likewise.
299         * arm-linux-tdep.c: Likewise.
300         * i386-darwin-tdep.c: Likewise.
301         * i387-tdep.c: Likewise.
302         * m68k-linux-tdep.c: Likewise.
303         * mep-tdep.c: Likewise.
304         * mips-tdep.c: Likewise.
305         * nios2-tdep.c: Likewise.
306         * s390-linux-tdep.c: Likewise.
307         * sparc-obsd-tdep.c: Likewise.
308         * sparc-tdep.c: Likewise.
309         * sparc64-tdep.c: Likewise.
310         * spu-tdep.c: Likewise.
311         * tic6x-tdep.c: Likewise.
312         * tilegx-tdep.c: Likewise.
313         * vax-tdep.c: Likewise.
314         * xstormy16-tdep.c: Likewise.
315         * xtensa-tdep.c: Likewise.
316
317         * top.c: Do not include "doublest.h".
318         * aarch64-tdep.c: Likewise.
319         * alpha-tdep.c: Likewise.
320         * arm-linux-tdep.c: Likewise.
321         * m68k-linux-tdep.c: Likewise.
322         * tilegx-tdep.c: Likewise.
323         * xstormy16-tdep.c: Likewise.
324
325 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
326
327         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
328         (mipsn32_fbsd_sigframe): Define.
329         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
330         for FreeBSD/mipsn32.
331
332 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
333
334         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
335         AT_HWCAP.
336
337 2017-10-05  Tristan Gingold  <tgingold@free.fr>
338
339         * MAINTAINERS (Misc): Update my email address.
340
341 2017-10-04  Pedro Alves  <palves@redhat.com>
342
343         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
344         it instead of target_gdbarch.
345         (get_remote_state, get_remote_packet_size): Adjust
346         get_remote_arch_state calls, passing down target_gdbarch
347         explicitly.
348         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
349         'gdbarch' and use it instead of target_gdbarch.
350         (get_memory_packet_size): Adjust get_remote_arch_state calls,
351         passing down target_gdbarch explicitly.
352         (struct stop_reply) <arch>: New field.
353         (remote_parse_stop_reply): Use the stopped thread's architecture,
354         not the current inferior's.  Save the architecture in the
355         stop_reply.
356         (process_stop_reply): Use the stop reply's architecture.
357         (process_g_packet, remote_fetch_registers)
358         (remote_prepare_to_store, store_registers_using_G)
359         (remote_store_registers): Adjust get_remote_arch_state calls,
360         using the regcache's architecture.
361         (remote_get_trace_status): Adjust get_remote_arch_state calls,
362         passing down target_gdbarch explicitly.
363         * spu-multiarch.c (spu_thread_architecture): Defer to the target
364         beneath instead of calling target_gdbarch.
365         * target.c (default_thread_architecture): Use the specified
366         inferior's architecture, instead of the current inferior's
367         architecture (via target_gdbarch).
368
369 2017-10-04  Pedro Alves  <palves@redhat.com>
370
371         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
372         case.
373         (regcache_print): Handle !target_has_registers here instead.
374
375 2017-10-04  Pedro Alves  <palves@redhat.com>
376
377         * frame.c (create_test_frame): Delete.
378         * frame.h (create_test_frame): Delete.
379         * gdbarch-selftests.c: Include gdbthread.h and target.h.
380         (class regcache_test): Delete.
381         (test_target_has_registers, test_target_has_stack)
382         (test_target_has_memory, test_target_prepare_to_store)
383         (test_target_store_registers): New functions.
384         (test_target_ops): New class.
385         (register_to_value_test): Error out if there's already a
386         process_stratum (or higher) target pushed.  Create a fuller mock
387         environment, with mock target_ops, inferior, address space, thread
388         and inferior_ptid.
389         * progspace.c (struct address_space): Move to ...
390         * progspace.h (struct address_space): ... here.
391         * regcache.h (regcache::~regcache, regcache::raw_write)
392         [GDB_SELF_TEST]: No longer virtual.
393
394 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
395
396         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
397
398 2017-10-04  Pedro Alves  <palves@redhat.com>
399
400         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
401         out of 'between TRY and CATCH'.
402
403 2017-10-04  Pedro Alves  <palves@redhat.com>
404
405         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
406         * common/common-exceptions.h (TRY): Open an outermost scope.
407         Expand intro comment.
408         (CATCH): Reindent.
409         (END_CATCH): Close the outermost scope.
410         * completer.c (complete_line_internal): Add missing END_CATCH.
411
412 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
413
414         * NEWS (Changes since GDB 8.0): Add entry about new
415         'set-cwd-on-gdbserver' feature.
416         (New remote packets): Add entry for QSetWorkingDir.
417         * common/common-inferior.h (set_inferior_cwd): New prototype.
418         * infcmd.c (set_inferior_cwd): Remove "static".
419         (show_cwd_command): Expand text to include remote debugging.
420         * remote.c: Add PACKET_QSetWorkingDir.
421         (remote_protocol_features) <QSetWorkingDir>: New entry for
422         PACKET_QSetWorkingDir.
423         (extended_remote_set_inferior_cwd): New function.
424         (extended_remote_create_inferior): Call
425         "extended_remote_set_inferior_cwd".
426         (_initialize_remote): Call "add_packet_config_cmd" for
427         QSetWorkingDir.
428
429 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
430
431         * NEWS (New commands): Mention "set/show cwd".
432         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
433         "cd" command's help text.
434         * common/common-inferior.h (get_inferior_cwd): New prototype.
435         * infcmd.c (inferior_cwd_scratch): New global variable.
436         (set_inferior_cwd): New function.
437         (get_inferior_cwd): Likewise.
438         (set_cwd_command): Likewise.
439         (show_cwd_command): Likewise.
440         (_initialize_infcmd): Add "set/show cwd" commands.
441         * inferior.h (class inferior) <cwd>: New field.
442         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
443         (fork_inferior): Change inferior's cwd before its execution.
444         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
445         to CreateProcess.
446
447 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
448
449         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
450         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
451         (COMMON_OBS): Add gdb_tilde_expand.o.
452         * common/gdb_tilde_expand.c: New file.
453         * common/gdb_tilde_expand.h: Likewise.
454
455 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
456
457         * gdbarch.sh (objfile): Remove duplicate declaration.
458         * gdbarch.h: Regenerate.
459
460 2017-10-03  Tom Tromey  <tom@tromey.com>
461
462         * utils.c (internal_vproblem): Use string_vprintf.
463
464 2017-10-03  Tom Tromey  <tom@tromey.com>
465
466         * printcmd.c (info_symbol_command): Use std::string.
467
468 2017-10-03  Tom Tromey  <tom@tromey.com>
469
470         * top.c (gdb_safe_append_history): Use std::string.
471
472 2017-10-03  Tom Tromey  <tom@tromey.com>
473
474         * event-top.c (stdin_event_handler): Update.
475         * main.c (captured_main_1): Update.
476         * top.h (make_delete_ui_cleanup): Remove.
477         (struct ui): Add constructor and destructor.
478         (new_ui, delete_ui): Remove.
479         * top.c (make_delete_ui_cleanup): Remove.
480         (new_ui_command): Use std::unique_ptr.
481         (delete_ui_cleanup): Remove.
482         (ui::ui): Rename from new_ui.  Update.
483         (free_ui): Remove.
484         (ui::~ui): Rename from delete_ui.  Update.
485
486 2017-10-03  Tom Tromey  <tom@tromey.com>
487
488         * symfile.c (load_progress): Use gdb::byte_vector.
489
490 2017-10-03  Tom Tromey  <tom@tromey.com>
491
492         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
493         declaration.
494         * printcmd.c (x_command): Remove unused declaration.
495         * symfile.c (symbol_file_command): Remove unused declaration.
496
497 2017-10-03  Tom Tromey  <tom@tromey.com>
498
499         * utils.c (internal_vproblem): Use std::string.
500         (defaulted_query): Likewise.
501
502 2017-10-03  Tom Tromey  <tom@tromey.com>
503
504         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
505         * top.c (execute_command_to_string): Update.
506         * utils.c (make_cleanup_restore_page_info): Remove.
507         (do_restore_page_info_cleanup): Remove.
508         (set_batch_flag_and_restore_page_info):
509         New.
510         (make_cleanup_restore_page_info): Remove.
511         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
512         (~set_batch_flag_and_restore_page_info): New
513         (make_cleanup_restore_uinteger): Remove.
514         (make_cleanup_restore_integer): Remove.
515         (struct restore_integer_closure): Remove.
516         (restore_integer): Remove.
517         * utils.h (struct set_batch_flag_and_restore_page_info): New
518         class.
519         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
520         (make_cleanup_restore_page_info): Remove.
521         (make_cleanup_restore_uinteger) Remove.
522         (make_cleanup_restore_integer) Remove.
523
524 2017-10-03  Tom Tromey  <tom@tromey.com>
525
526         * record-full.h (record_full_gdb_operation_disable_set): Return
527         scoped_restore_tmpl<int>.
528         * infrun.c (adjust_pc_after_break): Update.
529         (handle_signal_stop): Update.
530         * record-full.c (record_full_gdb_operation_disable_set): Return
531         scoped_restore_tmpl<int>.
532         (record_full_wait_1, record_full_insert_breakpoint)
533         (record_full_remove_breakpoint, record_full_save)
534         (record_full_goto_insn): Update.
535
536 2017-10-02  Tom Tromey  <tom@tromey.com>
537
538         PR rust/22236:
539         * rust-lang.c (rust_val_print_str): New function.
540         (val_print_struct): Call it.
541         (rust_subscript): Preserve name of slice type.
542
543 2017-10-02  Tom Tromey  <tom@tromey.com>
544
545         * rust-lang.c (rust_subscript): Handle slices in
546         EVAL_AVOID_SIDE_EFFECTS case.
547
548 2017-10-02  Tom Tromey  <tom@tromey.com>
549
550         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
551
552 2017-10-02  Tom Tromey  <tom@tromey.com>
553
554         * rust-lang.h (rust_slice_type): Add "extern".
555
556 2017-10-02  Tom Tromey  <tom@tromey.com>
557             Pedro Alves  <palves@redhat.com>
558
559         * ada-lang.h (ada_exc_info::operator<): Make const.
560         (ada_exc_info::operator==): Make const.
561         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
562         Make const.
563
564 2017-09-29  Tom Tromey  <tom@tromey.com>
565
566         * target.c (read_whatever_is_readable): Change type of "result".
567         Update.
568         (free_memory_read_result_vector): Remove.
569         (read_memory_robust): Change return type.  Update.
570         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
571         bin2hex, std::string.
572         * target.h (memory_read_result_s): Remove typedef.
573         (free_memory_read_result_vector): Remove.
574         (read_memory_robust): Return std::vector.
575
576 2017-09-29  Tom Tromey  <tom@tromey.com>
577
578         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
579
580 2017-09-29  Tom Tromey  <tom@tromey.com>
581
582         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
583         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
584         operator< and operator==.
585         (ada_exceptions_list): Return a std::vector.
586         * ada-lang.c (ada_exc_info::operator<): Rename from
587         compare_ada_exception_info.
588         (ada_exc_info::operator==): New.
589         (sort_remove_dups_ada_exceptions_list): Change type of
590         "exceptions".
591         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
592         (ada_add_global_exceptions): Likewise.
593         (ada_exceptions_list_1): Return a std::vector.
594         (ada_exceptions_list): Likewise.
595
596 2017-09-29  Tom Tromey  <tom@tromey.com>
597
598         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
599         'std::set *'.
600         (print_one_inferior): Update.
601         (free_vector_of_ints): Remove.
602         (list_available_thread_groups): Change "ids" to std::set.
603         (mi_cmd_list_thread_groups): Update.
604         (struct collect_cores_data) <core>: Now a std::set.
605         (collect_cores): Update.
606         (unique): Remove.
607         (print_one_inferior): Update.
608
609 2017-09-29  Tom Tromey  <tom@tromey.com>
610
611         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
612         (mi_execute_async_cli_command): Likewise.
613         (mi_cmd_trace_frame_collected): Use field_fmt.
614
615 2017-09-29  Tom Tromey  <tom@tromey.com>
616
617         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
618         gdb::byte_vector.
619
620 2017-09-29  Tom Tromey  <tom@tromey.com>
621
622         * mi/mi-parse.c (mi_parse): Remove unused declaration.
623
624 2017-09-29  Tom Tromey  <tom@tromey.com>
625
626         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
627
628 2017-09-29  Tom Tromey  <tom@tromey.com>
629
630         * varobj.h (varobj_gen_name): Return std::string.
631         * varobj.c (varobj_gen_name): Return std::string.
632         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
633         (mi_cmd_var_delete): Don't copy "name".
634
635 2017-09-29  Tom Tromey  <tom@tromey.com>
636
637         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
638         (mi_cmd_break_insert_1): Update.
639
640 2017-09-29  Tom Tromey  <tom@tromey.com>
641
642         * target.h (make_scoped_defer_target_commit_resume): Update.
643         * target.c (make_scoped_defer_target_commit_resume): Rename from
644         make_cleanup_defer_target_commit_resume.  Return a
645         scoped_restore.
646         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
647
648 2017-09-29  Tom Tromey  <tom@tromey.com>
649
650         * main.c (captured_main_1): Remove unused declaration.
651         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
652
653 2017-09-29  Tom Tromey  <tom@tromey.com>
654
655         * symtab.c (search_symbols): Remove unused outer cleanup.
656         (make_source_files_completion_list): Remove unused declaration.
657
658 2017-09-29  Tom Tromey  <tom@tromey.com>
659
660         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
661
662 2017-09-29  Tom Tromey  <tom@tromey.com>
663
664         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
665         gdb::byte_vector.
666
667 2017-09-29  Tom Tromey  <tom@tromey.com>
668
669         * complaints.c (vcomplaint): Use std::string.
670
671 2017-09-29  Tom Tromey  <tom@tromey.com>
672
673         * tracepoint.c (trace_variable_command): Use std::string.
674         (encode_actions_1): Remove unused declarations.
675         (create_tsv_from_upload): Use std::string.
676
677 2017-09-29  Tom Tromey  <tom@tromey.com>
678
679         * cp-support.c (gdb_demangle): Use std::string.
680
681 2017-09-29  Tom Tromey  <tom@tromey.com>
682
683         * stack.c (parse_frame_specification): Use std::string
684         (info_frame_command): Use gdb::unique_xmalloc_ptr.
685
686 2017-09-29  Tom Tromey  <tom@tromey.com>
687
688         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
689
690 2017-09-29  Tom Tromey  <tom@tromey.com>
691
692         * utils.c (vfprintf_maybe_filtered): Use std::string.
693         (vfprintf_unfiltered): Likewise.
694
695 2017-09-29  Tom Tromey  <tom@tromey.com>
696
697         * event-top.c (top_level_prompt): Return std::string.
698         (display_gdb_prompt): Update.
699
700 2017-09-29  Tom Tromey  <tom@tromey.com>
701
702         * unittests/common-utils-selftests.c (format): New function.
703         (string_vprintf_tests): New function.
704         (_initialize_common_utils_selftests): Register new tests.
705         * common/common-utils.c (string_vprintf): New function.
706         * common/common-utils.h (string_vprintf): Declare.
707
708 2017-09-29  Pedro Alves  <palves@redhat.com>
709
710         * common/rsp-low.c (unpack_varlen_hex): Constify.
711         * common/rsp-low.h (unpack_varlen_hex): Constify.
712         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
713         Constify.
714         * remote.c (remote_set_permissions, read_ptid)
715         (remote_current_thread, remote_get_threads_with_qthreadinfo)
716         (remote_static_tracepoint_marker_at)
717         (remote_static_tracepoint_markers_by_strid)
718         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
719         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
720         (parse_tracepoint_definition, parse_tsv_definition)
721         (parse_static_tracepoint_marker_definition): Constify.
722         * tracepoint.h (parse_static_tracepoint_marker_definition)
723         (parse_trace_status, parse_tracepoint_status)
724         (parse_tracepoint_definition, parse_tsv_definition): Constify.
725
726 2017-09-29  Pedro Alves  <palves@redhat.com>
727
728         * remote.c (target_buf, target_buf_size): Delete.
729         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
730         Use the connection's packet buffer instead.
731         All callers adjusted.
732         (_initialize_remote): Remove references to target_buf and
733         target_buf_size.
734
735 2017-09-28  Pedro Alves  <palves@redhat.com>
736
737         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
738         unittests/common-utils-selftests.c.
739         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
740         (COMMON_OBS): Remove utils-selftests.o.
741         * utils-selftests.c: Move to ...
742         * unittests/common-utils-selftests.c: ... here and rename self
743         test to "string_printf".
744
745 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
746
747         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
748         having NULL cus or tus.
749
750 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
751
752         * arm-tdep.c: (convert_from_extended): Remove.
753         (convert_to_extended): Likewise.
754         (arm_extract_return_value): Use convert_typed_floating.
755         (arm_store_return_value): Likewise.
756
757         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
758         * sh-tdep.c: Do not include "floatformat.h".
759         (sh_littlebyte_bigword_type): New function.
760         (sh_register_convert_to_virtual): Use convert_typed_floating.
761         (sh_register_convert_to_raw): Likewise.
762         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
763         (sh64_littlebyte_bigword_type): New function.
764         (sh64_extract_return_value): Use convert_typed_floating.
765         (sh64_register_convert_to_virtual): Likewise.
766         (sh64_register_convert_to_raw): Likewise.
767
768 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
769
770         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
771         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
772
773         * gdbtypes.h (union type_specific): Make field floatformat hold
774         just a single struct floatformat, not an array.
775         (floatformat_from_type): Move here.
776         * gdbtypes.c (floatformat_from_type): Move here.  Update to
777         changed TYPE_FLOATFORMAT definition.
778         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
779         (recursive_dump_type): Likewise.
780         (init_float_type): Install correct floatformat for byte order.
781         (arch_float_type): Likewise.
782
783 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
784
785         * gdbtypes.c (init_type): Change incoming argument from
786         length-in-bytes to length-in-bits.  Assert length is a
787         multiple of TARGET_CHAR_BITS.
788         (arch_type, arch_flags_type): Likewise.
789         (init_integer_type): Update call to init_type.
790         (init_character_type): Likewise.
791         (init_boolean_type): Likewise.
792         (init_float_type): Likewise.
793         (init_decfloat_type): Likewise.
794         (init_complex_type): Likewise.
795         (init_pointer_type): Likewise.
796         (objfile_type): Likewise.
797         (arch_integer_type): Update call to arch_type.
798         (arch_character_type): Likewise.
799         (arch_boolean_type): Likewise.
800         (arch_float_type): Likewise.
801         (arch_decfloat_type): Likewise.
802         (arch_complex_type): Likewise.
803         (arch_pointer_type): Likewise.
804         (gdbtypes_post_init): Likewise.
805
806         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
807         (read_base_type): Likewise.
808         * mdebugread.c (basic_type): Likewise.
809         * stabsread.c (dbx_init_float_type): Likewise.
810         (rs6000_builtin_type): Likewise.
811         (read_range_type): Likewise.  Also, fix call to init_integer_type
812         with erroneous length argument.
813
814         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
815         * d-lang.c (build_d_types): Likewise.
816         * f-lang.c (build_fortran_types): Likewise.
817         * go-lang.c (build_go_types): Likewise.
818         * opencl-lang.c (build_opencl_types): Likewise.
819         * jit.c (finalize_symtab): Likewise.
820         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
821         (build_std_type_info_type): Likewise.
822         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
823         update call to arch_flags_type.
824
825         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
826         arch_type.
827         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
828         * windows-tdep.c (windows_get_tlb_type): Likewise.
829
830         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
831         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
832         * m32c-tdep.c (make_types): Likewise.
833         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
834         (rl78_psw_type): Update call to arch_flags_type.
835         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
836         * rx-tdep.c (rx_psw_type): Likewise.
837         (rx_fpsw_type): Likewise.
838         * sparc-tdep.c (sparc_psr_type): Likewise.
839         (sparc_fsr_type): Likewise.
840         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
841         (sparc64_ccr_type): Likewise.
842         (sparc64_fsr_type): Likewise.
843         (sparc64_fprs_type): Likewise.
844
845 2017-09-27  Tom Tromey  <tom@tromey.com>
846
847         * findcmd.c (find_command): Constify.
848
849 2017-09-27  Tom Tromey  <tom@tromey.com>
850
851         * ada-tasks.c (task_command_1, task_command): Constify.
852
853 2017-09-27  Tom Tromey  <tom@tromey.com>
854
855         * symtab.c (maintenance_print_symbol_cache)
856         (maintenance_flush_symbol_cache)
857         (maintenance_print_symbol_cache_statistics): Constify.
858
859 2017-09-27  Tom Tromey  <tom@tromey.com>
860
861         * inferior.c (detach_inferior_command, kill_inferior_command)
862         (inferior_command): Constify.
863
864 2017-09-27  Tom Tromey  <tom@tromey.com>
865
866         * regcache.c (regcache_print, maintenance_print_registers)
867         (maintenance_print_raw_registers)
868         (maintenance_print_cooked_registers)
869         (maintenance_print_register_groups)
870         (maintenance_print_remote_registers): Constify.
871
872 2017-09-27  Tom Tromey  <tom@tromey.com>
873
874         * printcmd.c (map_display_numbers, undisplay_command)
875         (enable_disable_display_command, enable_display_command)
876         (disable_display_command): Constify.
877
878 2017-09-27  Tom Tromey  <tom@tromey.com>
879
880         * breakpoint.h (delete_command): Don't declare.
881         * breakpoint.c (delete_command, enable_once_command)
882         (enable_count_command, enable_delete_command, breakpoint_1)
883         (maintenance_info_breakpoints, stopin_command, stopat_command)
884         (delete_command, delete_trace_command, save_breakpoints)
885         (save_breakpoints_command, save_tracepoints_command): Constify.
886
887 2017-09-27  Tom Tromey  <tom@tromey.com>
888
889         * macrocmd.c (macro_expand_command, macro_expand_once_command)
890         (skip_ws, extract_identifier, macro_define_command)
891         (macro_undef_command, macro_list_command): Constify.
892
893 2017-09-27  Tom Tromey  <tom@tromey.com>
894
895         * infcmd.c (environment_info, set_environment_command)
896         (unset_environment_command, path_info, info_proc_cmd_1)
897         (info_proc_cmd_mappings, info_proc_cmd_stat)
898         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
899         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
900
901 2017-09-27  Tom Tromey  <tom@tromey.com>
902
903         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
904         Constify.
905
906 2017-09-27  Tom Tromey  <tom@tromey.com>
907
908         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
909
910 2017-09-27  Tom Tromey  <tom@tromey.com>
911
912         * demangle.c (demangle_command): Constify.
913
914 2017-09-27  Tom Tromey  <tom@tromey.com>
915
916         * progspace.c (maintenance_info_program_spaces_command):
917         Constify.
918
919 2017-09-27  Tom Tromey  <tom@tromey.com>
920
921         * compile/compile.c (check_raw_argument, compile_file_command)
922         (compile_code_command, compile_print_command): Constify.
923
924 2017-09-27  Tom Tromey  <tom@tromey.com>
925
926         * reggroups.c (maintenance_print_reggroups): Constify.
927
928 2017-09-27  Tom Tromey  <tom@tromey.com>
929
930         * dwarf2read.c (save_gdb_index_command): Constify.
931
932 2017-09-27  Tom Tromey  <tom@tromey.com>
933
934         * stap-probe.c (info_probes_stap_command): Constify.
935
936 2017-09-27  Tom Tromey  <tom@tromey.com>
937
938         * fork-child.c (unset_exec_wrapper_command): Constify.
939
940 2017-09-27  Tom Tromey  <tom@tromey.com>
941
942         * btrace.c (get_uint, get_context_size, no_chunk)
943         (maint_btrace_packet_history_cmd)
944         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
945         (maint_info_btrace_cmd): Constify.
946
947 2017-09-27  Tom Tromey  <tom@tromey.com>
948
949         * reverse.c (delete_bookmark_command): Constify.
950
951 2017-09-27  Tom Tromey  <tom@tromey.com>
952
953         * remote.c (set_memory_packet_size)
954         (set_memory_write_packet_size, show_memory_write_packet_size)
955         (set_memory_read_packet_size, show_memory_read_packet_size)
956         (compare_sections_command, packet_command, remote_put_command)
957         (remote_get_command, remote_delete_command): Constify.
958
959 2017-09-27  Tom Tromey  <tom@tromey.com>
960
961         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
962         (set_mipsfpu_double_command, set_mipsfpu_none_command)
963         (set_mipsfpu_auto_command): Constify.
964
965 2017-09-27  Tom Tromey  <tom@tromey.com>
966
967         * cli/cli-cmds.h (cd_command): Constify.
968         * cli/cli-cmds.c (cd_command): Constify.
969
970 2017-09-27  Tom Tromey  <tom@tromey.com>
971
972         * thread.c (thread_name_command, thread_find_command): Constify.
973
974 2017-09-27  Tom Tromey  <tom@tromey.com>
975
976         * probe.c (enable_probes_command, disable_probes_command):
977         Constify.
978
979 2017-09-27  Tom Tromey  <tom@tromey.com>
980
981         * symfile.c (symbol_file_command): Constify.
982         * gdbcore.h (deprecated_file_changed_hook): Constify.
983         * exec.c (deprecated_file_changed_hook, exec_file_command)
984         (file_command): Constify.
985         * defs.h (symbol_file_command): Constify.
986
987 2017-09-27  Tom Tromey  <tom@tromey.com>
988
989         * remote-fileio.c (set_system_call_allowed)
990         (show_system_call_allowed): Constify.
991
992 2017-09-27  Tom Tromey  <tom@tromey.com>
993
994         * tracepoint.c (delete_trace_variable_command)
995         (tfind_end_command, tfind_start_command, tfind_pc_command)
996         (tfind_tracepoint_command, tfind_line_command)
997         (tfind_range_command, tfind_outside_command): Constify.
998
999 2017-09-27  Tom Tromey  <tom@tromey.com>
1000
1001         * ax-gdb.c (maint_agent_printf_command, agent_command)
1002         (agent_eval_command): Constify.
1003
1004 2017-09-27  Tom Tromey  <tom@tromey.com>
1005
1006         * tracepoint.c (info_scope_command): Constify.
1007         * python/python.c (gdbpy_decode_line): Constify.
1008         * python/py-breakpoint.c (bppy_init): Constify.
1009         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1010         * location.h: (new_linespec_location)
1011         (string_to_event_location_basic, string_to_event_location):
1012         Constify.
1013         * location.c (new_linespec_location)
1014         (string_to_event_location_basic, string_to_event_location):
1015         Constify.
1016         * linespec.h (decode_line_with_current_source)
1017         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1018         * linespec.c (linespec_lex_to_end)
1019         (decode_line_with_current_source)
1020         (decode_line_with_last_displayed): Constify.
1021         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1022         Constify.
1023         * cli/cli-cmds.c (edit_command, list_command): Constify.
1024         * breakpoint.h (until_break_command, watch_command_wrapper)
1025         (awatch_command_wrapper, rwatch_command_wrapper)
1026         (init_ada_exception_breakpoint): Constify.
1027         * breakpoint.c (break_command_1, dprintf_command)
1028         (break_range_command, watch_command_wrapper)
1029         (rwatch_command_wrapper, awatch_command_wrapper)
1030         (until_break_command, init_ada_exception_breakpoint)
1031         (strace_marker_create_sals_from_location, trace_command)
1032         (ftrace_command, strace_command, struct tracepoint): Constify.
1033         * ax-gdb.c (agent_command_1): Constify.
1034         * ada-lang.c (ada_exception_sal): Constify.
1035
1036 2017-09-27  Tom Tromey  <tom@tromey.com>
1037
1038         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1039         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1040         (get_context_size, no_chunk, get_insn_history_modifiers)
1041         (cmd_record_insn_history, get_call_history_modifiers)
1042         (cmd_record_call_history): Constify.
1043
1044 2017-09-27  Tom Tromey  <tom@tromey.com>
1045
1046         * source.c (show_substitute_path_command)
1047         (unset_substitute_path_command, set_substitute_path_command):
1048         Constify.
1049
1050 2017-09-27  Tom Tromey  <tom@tromey.com>
1051
1052         * typeprint.c (maintenance_print_type): Constify.
1053         * maint.c (maintenance_dump_me, maintenance_demangle)
1054         (maintenance_time_display, maintenance_info_sections)
1055         (maintenance_print_statistics, maintenance_deprecate)
1056         (maintenance_undeprecate): Constify.
1057         (maintenance_do_deprecate): Constify.  Use std::string.
1058         (maintenance_selftest): Constify.
1059         * gdbtypes.h (maintenance_print_type): Constify.
1060
1061 2017-09-27  Tom Tromey  <tom@tromey.com>
1062
1063         * hppa-tdep.c (unwind_command): Constify.
1064
1065 2017-09-27  Tom Tromey  <tom@tromey.com>
1066
1067         * target-descriptions.c (unset_tdesc_filename_cmd)
1068         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1069         Constify.
1070
1071 2017-09-27  Tom Tromey  <tom@tromey.com>
1072
1073         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1074
1075 2017-09-27  Tom Tromey  <tom@tromey.com>
1076
1077         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1078
1079 2017-09-27  Tom Tromey  <tom@tromey.com>
1080
1081         * tui/tui-regs.c (tui_reg_command): Constify.
1082
1083 2017-09-27  Tom Tromey  <tom@tromey.com>
1084
1085         * skip.c (skip_file_command, skip_function_command)
1086         (skip_enable_command, skip_disable_command, skip_delete_command):
1087         Constify.
1088
1089 2017-09-27  Tom Tromey  <tom@tromey.com>
1090
1091         * record-btrace.c (cmd_record_btrace_bts_start)
1092         (cmd_record_btrace_pt_start): Constify.
1093
1094 2017-09-27  Tom Tromey  <tom@tromey.com>
1095
1096         * symmisc.c (maintenance_print_symbols)
1097         (maintenance_print_msymbols, maintenance_print_objfiles)
1098         (maintenance_info_symtabs, maintenance_check_symtabs)
1099         (maintenance_expand_symtabs, maintenance_info_line_tables):
1100         Constify.
1101
1102 2017-09-27  Tom Tromey  <tom@tromey.com>
1103
1104         * top.c (new_ui_command): Constify.
1105
1106 2017-09-27  Tom Tromey  <tom@tromey.com>
1107
1108         * symfile.c (add_symbol_file_command)
1109         (remove_symbol_file_command, list_overlays_command)
1110         (map_overlay_command, unmap_overlay_command)
1111         (overlay_auto_command, overlay_manual_command)
1112         (overlay_off_command, overlay_load_command): Constify.
1113
1114 2017-09-27  Tom Tromey  <tom@tromey.com>
1115
1116         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1117         (info_spu_mailbox_command, info_spu_dma_command)
1118         (info_spu_proxydma_command): Constify.
1119
1120 2017-09-27  Tom Tromey  <tom@tromey.com>
1121
1122         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1123
1124 2017-09-27  Tom Tromey  <tom@tromey.com>
1125
1126         * cli/cli-script.c (user_defined_command): Constify.
1127
1128 2017-09-27  Tom Tromey  <tom@tromey.com>
1129
1130         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1131         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1132         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1133         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1134         (dump_binary_value, append_binary_memory, append_binary_value):
1135         Constify.
1136         (struct dump_context) <func>: Constify.
1137         (add_dump_command): Update.
1138
1139 2017-09-27  Tom Tromey  <tom@tromey.com>
1140
1141         * cli/cli-cmds.c (show_version, show_configuration)
1142         (source_command, show_user): Constify.
1143
1144 2017-09-27  Tom Tromey  <tom@tromey.com>
1145
1146         * target.c (maintenance_print_target_stack): Constify.
1147
1148 2017-09-27  Tom Tromey  <tom@tromey.com>
1149
1150         * interps.c (interpreter_exec_cmd): Constify.
1151
1152 2017-09-27  Tom Tromey  <tom@tromey.com>
1153
1154         * record-full.c (cmd_record_full_restore): Constify.
1155
1156 2017-09-27  Tom Tromey  <tom@tromey.com>
1157
1158         * memattr.c (enable_mem_command, disable_mem_command)
1159         (delete_mem_command): Constify.
1160
1161 2017-09-27  Tom Tromey  <tom@tromey.com>
1162
1163         * value.c (show_convenience): Constify.
1164
1165 2017-09-27  Tom Tromey  <tom@tromey.com>
1166
1167         * gdbcore.h (core_file_command): Update.
1168         * corefile.c (core_file_command): Constify.
1169
1170 2017-09-27  Tom Tromey  <tom@tromey.com>
1171
1172         * user-regs.c (maintenance_print_user_registers): Constify.
1173
1174 2017-09-27  Tom Tromey  <tom@tromey.com>
1175
1176         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1177
1178 2017-09-27  Tom Tromey  <tom@tromey.com>
1179
1180         * cp-support.c (first_component_command): Constify.
1181
1182 2017-09-27  Tom Tromey  <tom@tromey.com>
1183
1184         * psymtab.c (maintenance_print_psymbols)
1185         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1186         Constify.
1187
1188 2017-09-27  Tom Tromey  <tom@tromey.com>
1189
1190         * windows-tdep.c (display_tib): Constify.
1191
1192 2017-09-27  Tom Tromey  <tom@tromey.com>
1193
1194         * linux-fork.c (delete_checkpoint_command)
1195         (detach_checkpoint_command): Constify.
1196
1197 2017-09-27  Tom Tromey  <tom@tromey.com>
1198
1199         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1200
1201 2017-09-27  Tom Tromey  <tom@tromey.com>
1202
1203         * arc-tdep.c (dump_arc_instruction_command): Constify.
1204
1205 2017-09-27  Tom Tromey  <tom@tromey.com>
1206
1207         * valprint.c (set_radix, show_radix): Constify.
1208
1209 2017-09-27  Tom Tromey  <tom@tromey.com>
1210
1211         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1212
1213 2017-09-27  Tom Tromey  <tom@tromey.com>
1214
1215         * command.h (not_just_help_class_command): Update.
1216         * cli/cli-decode.h (not_just_help_class_command): Update.
1217         * cli/cli-decode.c (not_just_help_class_command): Constify.
1218
1219 2017-09-27  Tom Tromey  <tom@tromey.com>
1220
1221         * gdb_bfd.c (maintenance_info_bfds): Constify.
1222
1223 2017-09-27  Tom Tromey  <tom@tromey.com>
1224
1225         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1226         overloads.
1227         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1228         (do_const_cfunc): New function.
1229         (cmd_cfunc_eq): New overload.
1230         (cli_user_command_p): Check do_const_cfunc.
1231         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1232         const_cfunc.
1233         * command.h (add_cmd): Add const overload and no-function
1234         overload.
1235         (set_cmd_cfunc): Add const overload.
1236         (cmd_const_cfunc_ftype): Declare.
1237         (cmd_cfunc_eq): Add const overload.
1238         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1239         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1240         overload.
1241
1242 2017-09-27  Tom Tromey  <tom@tromey.com>
1243
1244         * macroexp.c (get_next_token_for_substitution): New function.
1245         (substitute_args): Call it.  Check for __VA_OPT__.
1246
1247 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1248             Pedro Alves <palves@redhat.com>
1249
1250         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1251         producer_is_icc_lt_14.
1252         (producer_is_icc_lt_14): New function.
1253         (check_producer): Add code for checking version of ICC.
1254         (producer_is_icc): Move to producer.c.
1255         (read_structure_type): Restrict ICC workaround to ICC<14.
1256         * producer.c: Include selftest.h.
1257         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1258         New functions.
1259         * producer.h (producer_is_icc): New declaration.
1260
1261 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1262
1263         * Makefile.in (SFILES): Add producer.c.
1264         (COMMON_OBS): Add producer.o
1265         * amd64-tdep.c (producer.h): Add new include.
1266         * dwarf2read.c (producer.h): Add new include.
1267         * producer.c: New file.
1268         * producer.h: New file.
1269         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1270         producer.c.
1271         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1272         producer.h.
1273
1274 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1275
1276         * configure.ac: Search ncursesw before ncurses.
1277         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1278         * gdb_curses.h: Include <ncursesw/ncurses.h>
1279         * config.in, configure: Regenerate.
1280
1281 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1282
1283         PR gdb/22185
1284         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1285         obsolete.
1286         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1287         Remove i386sol2 support.
1288         * configure.nat <i386sol2>: Remove.
1289         <sol2-64>: Fold into ...
1290         <sol2>: ... this.
1291         Move common settings to default section.
1292         Add sol-thread.o.
1293         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1294         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1295         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1296         <i[34567]86-*-solaris*>: Remove.
1297         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1298
1299         * configure.ac: Remove wctype in libw check.
1300         (_MSE_INT_H): Don't define on Solaris 7-9.
1301         <solaris*>: Remove libthread_db.so.1 check.
1302         * configure: Regenerate.
1303         * config.in: Regenerate.
1304
1305         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1306         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1307         (gdb_ps_size_t): Remove.
1308         Use base types in users.
1309         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1310
1311         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1312
1313 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1314
1315         PR build/22206
1316         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1317         (adi_is_addr_mapped): Likewise.
1318         (PSR_ICC): Don't redefine.
1319         (PSR_IMPL): Likewise.
1320
1321 2017-09-25  Tom Tromey  <tom@tromey.com>
1322
1323         * regcache.c (regcache::dump): Use string_printf.
1324
1325 2017-09-25  Tom Tromey  <tom@tromey.com>
1326
1327         * regcache.c (class regcache_invalidator): New.
1328         (struct register_to_invalidate): Remove.
1329         (make_cleanup_regcache_invalidate): Remove.
1330         (regcache::raw_write): Use regcache_invalidator.
1331
1332 2017-09-25  Tom Tromey  <tom@tromey.com>
1333
1334         * spu-tdep.c (spu2ppu_sniffer): Update.
1335         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1336         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1337         Remove.
1338         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1339         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1340         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1341         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1342         (frame_pop): Update.
1343
1344 2017-09-25  Tom Tromey  <tom@tromey.com>
1345
1346         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1347         * regcache.h (regcache_xfree): Don't declare.
1348         * regcache.c (regcache_xfree): Remove.
1349         (do_regcache_xfree): Use delete.
1350         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1351         * linux-fork.c (free_fork): Use delete.
1352         (fork_save_infrun_state): Likewise.
1353         * jit.c (jit_dealloc_cache): Use delete.
1354         * infrun.c (discard_infcall_suspend_state): Use delete.
1355
1356 2017-09-25  Tom Tromey  <tom@tromey.com>
1357
1358         * regcache.h (regcache_xmalloc): Don't declare.
1359         (regcache_raw_set_cached_value): Update comment.
1360         * regcache.c (regcache_xmalloc): Remove.
1361         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1362         * jit.c (jit_frame_sniffer): Use new.
1363         * frame.c (frame_save_as_regcache): Use new.
1364
1365 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1366
1367         * NEWS: Advertise support for guarded-storage registers on IBM z.
1368
1369 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1370
1371         * s390-linux-nat.c (have_regset_gs): New static variable.
1372         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1373         control block and guarded-storage broadcast control regsets.
1374         (s390_read_description): Detect whether the target has
1375         guarded-storage support, return appropriate tdesc.
1376         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1377         (features/s390x-gs-linux64.c): Likewise.
1378         (struct gdbarch_tdep) <have_gs>: New field.
1379         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1380         (s390_gsbc_regset): New variables.
1381         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1382         and s390_gsbc_regset, if applicable.
1383         (s390_core_read_description): Check whether core file was from a
1384         target with guarded-storage support; include appropriate regsets.
1385         (s390_gdbarch_init): Add registers for guarded-storage support.
1386         (_initialize_s390_tdep): Initialize new target descriptions that
1387         include registers for guarded-storage support.
1388         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1389         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1390         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1391         (S390_NUM_REGS): Adjust macro definition.
1392         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1393         (tdesc_s390x_gs_linux64): New declarations.
1394
1395 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1396
1397         * features/s390-gs-linux64.xml: New file.
1398         * features/s390-gs.xml: New file.
1399         * features/s390-gsbc.xml: New file.
1400         * features/s390x-gs-linux64.xml: New file.
1401         * features/Makefile (WHICH): Add s390-gs-linux64 and
1402         s390x-gs-linux64.
1403         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1404         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1405         * features/s390-gs-linux64.c: New generated file.
1406         * features/s390x-gs-linux64.c: New file.
1407         * regformats/s390-gs-linux64.dat: New file.
1408         * regformats/s390x-gs-linux64.dat: New file.
1409
1410 2017-09-23  Tom Tromey  <tom@tromey.com>
1411
1412         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1413
1414 2017-09-22  Tom Tromey  <tom@tromey.com>
1415
1416         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1417         type to scoped_restore_tmpl.
1418         <scoped_input_handler>: Initialize m_quit_handler directly.
1419
1420 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1421
1422         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1423         (cd_command): Likewise.  Free "current_directory" before
1424         assigning to it.
1425         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1426         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1427         * top.c (gdb_dirbuf): Remove global declaration.
1428         * top.h (gdb_dirbuf): Likewise.
1429
1430 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1431
1432         * gnulib/aclocal.m4: Regenerate.
1433         * gnulib/config.in: Regenerate.
1434         * gnulib/configure: Regenerate.
1435         * gnulib/import/Makefile.am: Regenerate.
1436         * gnulib/import/Makefile.in: Regenerate.
1437         * gnulib/import/assure.h: New file.
1438         * gnulib/import/at-func.c: Likewise
1439         * gnulib/import/chdir-long.c: New file.
1440         * gnulib/import/chdir-long.h: New file.
1441         * gnulib/import/cloexec.c: New file.
1442         * gnulib/import/cloexec.h: New file.
1443         * gnulib/import/close.c: New file.
1444         * gnulib/import/closedir.c: New file.
1445         * gnulib/import/dirent-private.h: New file.
1446         * gnulib/import/dup-safer.c: New file.
1447         * gnulib/import/dup.c: New file.
1448         * gnulib/import/dup2.c: New file.
1449         * gnulib/import/error.c: New file.
1450         * gnulib/import/error.h: New file.
1451         * gnulib/import/exitfail.c: New file.
1452         * gnulib/import/exitfail.h: New file.
1453         * gnulib/import/fchdir.c: New file.
1454         * gnulib/import/fcntl.c: New file.
1455         * gnulib/import/fcntl.in.h: New file.
1456         * gnulib/import/fd-hook.c: New file.
1457         * gnulib/import/fd-hook.h: New file.
1458         * gnulib/import/fd-safer.c: New file.
1459         * gnulib/import/fdopendir.c: New file.
1460         * gnulib/import/filename.h: New file.
1461         * gnulib/import/filenamecat-lgpl.c: New file.
1462         * gnulib/import/filenamecat.h: New file.
1463         * gnulib/import/fstat.c: New file.
1464         * gnulib/import/fstatat.c: New file.
1465         * gnulib/import/getcwd-lgpl.c: New file.
1466         * gnulib/import/getcwd.c: New file.
1467         * gnulib/import/getdtablesize.c: New file.
1468         * gnulib/import/getlogin_r.c: New file.
1469         * gnulib/import/getprogname.c: New file.
1470         * gnulib/import/getprogname.h: New file.
1471         * gnulib/import/gettext.h: New file.
1472         * gnulib/import/glob-libc.h: New file.
1473         * gnulib/import/glob.c: New file.
1474         * gnulib/import/glob.in.h: New file.
1475         * gnulib/import/intprops.h: New file.
1476         * gnulib/import/m4/chdir-long.m4: New file.
1477         * gnulib/import/m4/close.m4: New file.
1478         * gnulib/import/m4/closedir.m4: New file.
1479         * gnulib/import/m4/d-ino.m4: New file.
1480         * gnulib/import/m4/d-type.m4: New file.
1481         * gnulib/import/m4/dup.m4: New file.
1482         * gnulib/import/m4/dup2.m4: New file.
1483         * gnulib/import/m4/error.m4: New file.
1484         * gnulib/import/m4/fchdir.m4: New file.
1485         * gnulib/import/m4/fcntl.m4: New file.
1486         * gnulib/import/m4/fcntl_h.m4: New file.
1487         * gnulib/import/m4/fdopendir.m4: New file.
1488         * gnulib/import/m4/filenamecat.m4: New file.
1489         * gnulib/import/m4/fstat.m4: New file.
1490         * gnulib/import/m4/fstatat.m4: New file.
1491         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1492         * gnulib/import/m4/getcwd-path-max.m4: New file.
1493         * gnulib/import/m4/getcwd.m4: New file.
1494         * gnulib/import/m4/getdtablesize.m4: New file.
1495         * gnulib/import/m4/getlogin_r.m4: New file.
1496         * gnulib/import/m4/getprogname.m4: New file.
1497         * gnulib/import/m4/glob.m4: New file.
1498         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1499         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1500         * gnulib/import/m4/mempcpy.m4: New file.
1501         * gnulib/import/m4/memrchr.m4: New file.
1502         * gnulib/import/m4/mode_t.m4: New file.
1503         * gnulib/import/m4/msvc-inval.m4: New file.
1504         * gnulib/import/m4/msvc-nothrow.m4: New file.
1505         * gnulib/import/m4/open.m4: New file.
1506         * gnulib/import/m4/openat.m4: New file.
1507         * gnulib/import/m4/opendir.m4: New file.
1508         * gnulib/import/m4/readdir.m4: New file.
1509         * gnulib/import/m4/realloc.m4: New file.
1510         * gnulib/import/m4/rewinddir.m4: New file.
1511         * gnulib/import/m4/save-cwd.m4: New file.
1512         * gnulib/import/m4/strdup.m4: New file.
1513         * gnulib/import/m4/strerror.m4: New file.
1514         * gnulib/import/m4/unistd-safer.m4: New file.
1515         * gnulib/import/mempcpy.c: New file.
1516         * gnulib/import/memrchr.c: New file.
1517         * gnulib/import/msvc-inval.c: New file.
1518         * gnulib/import/msvc-inval.h: New file.
1519         * gnulib/import/msvc-nothrow.c: New file.
1520         * gnulib/import/msvc-nothrow.h: New file.
1521         * gnulib/import/open.c: New file.
1522         * gnulib/import/openat-die.c: New file.
1523         * gnulib/import/openat-priv.h: New file.
1524         * gnulib/import/openat-proc.c: New file.
1525         * gnulib/import/openat.c: New file.
1526         * gnulib/import/openat.h: New file.
1527         * gnulib/import/opendir.c: New file.
1528         * gnulib/import/pipe-safer.c: New file.
1529         * gnulib/import/readdir.c: New file.
1530         * gnulib/import/realloc.c: New file.
1531         * gnulib/import/rewinddir.c: New file.
1532         * gnulib/import/save-cwd.c: New file.
1533         * gnulib/import/save-cwd.h: New file.
1534         * gnulib/import/strdup.c: New file.
1535         * gnulib/import/strerror-override.c: New file.
1536         * gnulib/import/strerror-override.h: New file.
1537         * gnulib/import/strerror.c: New file.
1538         * gnulib/import/unistd--.h: New file.
1539         * gnulib/import/unistd-safer.h: New file.
1540         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1541         "getcwd" and "glob".
1542         * ser-tcp.c: Undefine "close" before redefining it.
1543
1544 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1545
1546         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1547         get rid of res_val.
1548
1549 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1550
1551         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1552         <sol2,sparc>: Likewise.
1553         <sol2-64,i386>: Likewise.
1554
1555         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1556         -Wdeprecated-declarations on *-*-solaris*.
1557         * configure: Regenerate.
1558
1559         * procfs.c: Include "nat/inferior.h".
1560         (procfs_info_proc): Fix typo.
1561
1562 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1563
1564         * remote.c (vector): Include.
1565         (struct private_thread_info): Add field, thread_handle.
1566         (free_private_thread_info): Deallocate storage associated with
1567         thread handle.
1568         (get_private_info_thread): Initialize `thread_handle' field.
1569         (struct thread_item): Add field, thread_handle.
1570         (clear_threads_listing_context): Deallocate storage associated
1571         with thread handle.
1572         (start_thread): Add support for "handle" attribute.
1573         (thread_attributes): Add "handle".
1574         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1575         field.
1576         (remote_update_thread_list): Update thread_handle.
1577         (remote_thread_handle_to_thread_info): New function.
1578         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1579
1580 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1581
1582         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1583         function.
1584         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1585         * python/python-internal.h (thread_object_type): Declare.
1586
1587 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1588
1589         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1590         (target_thread_handle_to_thread_info): Declare.
1591         * target.c (target_thread_handle_to_thread_info): New function.
1592         * target-delegates.c: Regenerate.
1593         * gdbthread.h (find_thread_by_handle): Declare.
1594         * thread.c (find_thread_by_handle): New function.
1595         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1596         function.
1597         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1598
1599 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1600
1601         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1602
1603 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1604
1605         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1606
1607 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1608
1609         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1610         to gdb_target_obs.
1611
1612 2017-09-20  Tom Tromey  <tom@tromey.com>
1613
1614         * breakpoint.c (struct counted_command_line): Remove.
1615         (breakpoint_commands): Update.
1616         (alloc_counted_command_line, incref_counted_command_line)
1617         (decref_counted_command_line, do_cleanup_counted_command_line)
1618         (make_cleanup_decref_counted_command_line): Remove.
1619         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1620         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1621         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1622         (save_breakpoints): Update.
1623         * breakpoint.h (counted_command_line): Now a typedef to
1624         shared_ptr.
1625         (struct breakpoint) <commands>: Now a counted_command_line.
1626         (struct bpstats) <command>: Likewise.
1627
1628 2017-09-20  Tom Tromey  <tom@tromey.com>
1629
1630         * breakpoint.c (struct commands_info, do_map_commands_command):
1631         Remove.
1632         (commands_command_1): Update.
1633         (iterate_over_related_breakpoints): Take a function_view.
1634         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1635         (delete_command): Update.
1636         (map_breakpoint_numbers): Take a function_view.
1637         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1638         (disable_command): Update.
1639         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1640         (enable_command): Update.
1641         (struct disp_data, do_enable_breakpoint_disp)
1642         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1643         (do_map_enable_delete_breakpoint): Remove.
1644         (enable_once_command, enable_count_command, enable_delete_command)
1645         (delete_trace_variable_command): Update.
1646
1647 2017-09-20  Tom Tromey  <tom@tromey.com>
1648
1649         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1650         (bpstat_clear): Use delete.
1651         (bpstats): New constructors.
1652         (bpstat_copy, bpstat_stop_status): Use new.
1653         (dprintf_after_condition_true): Update.
1654         * breakpoint.h (bpstats::bpstats): Add constructors.
1655         (bpstats::~bpstats): Add destructor.
1656
1657 2017-09-20  Pedro Alves  <palves@redhat.com>
1658
1659         * eval.c (make_params): Delete, refactored as ...
1660         (class fake_method): ... this new type's ctor.
1661         (fake_method::~fake_method): New.
1662         (evaluate_subexp_standard): Use 'fake_method'.
1663
1664 2017-09-20  Tom Tromey  <tom@tromey.com>
1665
1666         * windows-nat.c (get_windows_debug_event, windows_wait)
1667         (do_initial_windows_stuff, windows_attach): Update.
1668         * utils.c (vwarning, internal_vproblem): Update.
1669         (ui_unregister_input_event_handler_cleanup)
1670         (prepare_to_handle_input): Remove.
1671         (class scoped_input_handler): New.
1672         (defaulted_query, prompt_for_continue): Update.
1673         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1674         Update.
1675         * top.c (undo_terminal_modifications_before_exit): Update.
1676         * target/target.h (target_terminal_init, target_terminal_inferior)
1677         (target_terminal_ours): Don't declare.
1678         (class target_terminal): New.
1679         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1680         (target_terminal_ours_for_output)
1681         (make_cleanup_restore_target_terminal): Don't declare.
1682         (target_terminal_info): Remove.
1683         * target.c (enum terminal_state, terminal_state): Remove.
1684         (target_terminal::terminal_state): Define.
1685         (target_terminal::init): Rename from target_terminal_init.
1686         (target_terminal::inferior): Rename from
1687         target_terminal_inferior.
1688         (target_terminal::ours): Rename from target_terminal_ours.
1689         (target_terminal::ours_for_output): Rename from
1690         target_terminal_ours_for_output.
1691         (target_terminal::info): New method.
1692         (cleanup_restore_target_terminal)
1693         (make_cleanup_restore_target_terminal): Remove.
1694         * solib.c (handle_solib_event): Update.
1695         * remote.c (remote_serial_quit_handler): Update.
1696         (remote_terminal_inferior, remote_wait_as): Update.
1697         * record-full.c (record_full_wait_1): Update.
1698         * nto-procfs.c (procfs_create_inferior): Update.
1699         * nat/fork-inferior.c (startup_inferior): Update.
1700         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1701         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1702         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1703         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1704         (mi_breakpoint_created, mi_breakpoint_deleted)
1705         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1706         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1707         (mi_user_selected_context_changed, report_initial_inferior):
1708         Update.
1709         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1710         (linux_nat_terminal_inferior): Update.
1711         * infrun.c (follow_fork_inferior)
1712         (handle_vfork_child_exec_or_exit, do_target_resume)
1713         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1714         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1715         Update.
1716         * inflow.c (child_terminal_init, info_terminal_command): Update.
1717         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1718         (attach_command): Update.
1719         * infcall.c (call_thread_fsm_should_stop): Update.
1720         * gnu-nat.c (gnu_attach): Update.
1721         * extension.c (struct active_ext_lang_state)
1722         (restore_active_ext_lang): Update.
1723         * exceptions.c (print_flush): Update.
1724         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1725         (struct quit_handler_cleanup_data, restore_quit_handler)
1726         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1727         Remove.
1728         * cp-support.c (gdb_demangle): Update.
1729         * breakpoint.c (update_inserted_breakpoint_locations)
1730         (insert_breakpoint_locations, handle_jit_event)
1731         (disable_breakpoints_in_unloaded_shlib): Update.
1732         * annotate.c (annotate_breakpoints_invalid)
1733         (annotate_frames_invalid): Update.
1734
1735 2017-09-20  Tom Tromey  <tom@tromey.com>
1736
1737         * main.c (catch_command_errors): Rename from
1738         catch_command_errors_const.
1739         (captured_main_1): Update.
1740
1741 2017-09-20  Pedro Alves  <palves@redhat.com>
1742
1743         * cli/cli-cmds.c (list_command): Use print_sal_location.
1744         (print_sal_location): New function.
1745         (ambiguous_line_spec): Use print_sal_location.
1746         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1747         * symtab.c (find_function_start_sal): Likewise.
1748         * symtab.h (symtab_and_line::symbol): New field.
1749
1750 2017-09-20  Pedro Alves  <palves@redhat.com>
1751
1752         * linespec.c (minsym_found): Handle non-text minsyms.
1753         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1754
1755 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1756
1757         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1758         backslash.
1759
1760 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1761
1762         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1763         vmovups instead vmovaps.
1764         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1765
1766 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1767
1768         * NEWS (Changes since GDB 8.0): Add starti.
1769         * infcmd.c (enum run_break): New.
1770         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1771         case.
1772         (run_command): Use enum run_how.
1773         (start_command): Likewise.
1774         (starti_command): New function.
1775         (RUN_ARGS_HELP): New macro.
1776         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1777         commands.  Add starti command.
1778
1779 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1780
1781         * Makefile.in (monitor.o): Remove the rule.
1782
1783 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1784
1785         * annotate.h (struct annotate_arg_emitter): Use
1786         DISABLE_COPY_AND_ASSIGN.
1787         * common/refcounted-object.h (refcounted_object): Likewise.
1788         * completer.h (struct completion_result): Likewise.
1789         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1790         * filename-seen-cache.h (filename_seen_cache): Likewise.
1791         * gdbcore.h (thread_section_name): Likewise.
1792         * gdb_regex.h (compiled_regex): Likewise.
1793         * gdbthread.h (scoped_restore_current_thread): Likewise.
1794         * inferior.h (scoped_restore_current_inferior): Likewise.
1795         * jit.c (jit_reader): Likewise.
1796         * linespec.h (struct linespec_result): Likewise.
1797         * mi/mi-parse.h (struct mi_parse): Likewise.
1798         * nat/fork-inferior.c (execv_argv): Likewise.
1799         * progspace.h (scoped_restore_current_program_space): Likewise.
1800         * python/python-internal.h (class gdbpy_enter): Likewise.
1801         * regcache.h (regcache): Likewise.
1802         * target-descriptions.c (struct tdesc_reg): Likewise.
1803         (struct tdesc_type): Likewise.
1804         (struct tdesc_feature): Likewise.
1805         * ui-out.h (ui_out_emit_type): Likewise.
1806
1807 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1808
1809         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1810         label abort_expression.
1811
1812 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1813
1814         * common/buffer.c (buffer_xml_printf): Adjust.
1815         * common/xml-utils.c (xml_escape_text): Change return type to
1816         std::string, update code accordingly.
1817         * common/xml-utils.h (xml_escape_text): Change return type to
1818         std::string.
1819         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1820         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1821         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1822         Adjust.
1823
1824 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1825
1826         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1827         (SUBDIR_UNITTESTS_OBS): Add new object file.
1828         * unittests/xml-utils-selftests.c: New file.
1829
1830 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1831
1832         * common/selftest.h (selftest): New struct/interface.
1833         (register_test): Add name parameter, add new overload.
1834         (run_tests): Add filter parameter.
1835         (for_each_selftest_ftype): New typedef.
1836         (for_each_selftest): New declaration.
1837         * common/selftest.c (tests): Change type to
1838         map<string, unique_ptr<selftest>>.
1839         (simple_selftest): New struct.
1840         (register_test): New function.
1841         (register_test): Add name parameter and use it.
1842         (run_tests): Add filter parameter and use it.  Add prints.
1843         Adjust to vector -> map change.
1844         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1845         registering selftests.
1846         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1847         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1848         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1849         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1850         * findvar.c (_initialize_findvar): Likewise.
1851         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1852         * maint.c (maintenance_selftest): Update call to run_tests.
1853         (maintenance_info_selftests): New function.
1854         (_initialize_maint_cmds): Register "maintenance info selftests"
1855         command.  Update "maintenance selftest" doc.
1856         * regcache.c (_initialize_regcache): Add names when registering
1857         selftests.
1858         * rust-exp.y (_initialize_rust_exp): Likewise.
1859         * selftest-arch.c (gdbarch_selftest): New struct.
1860         (gdbarch_tests): Remove.
1861         (register_test_foreach_arch): Add name parameter.  Call
1862         register_test.
1863         (tests_with_arch): Remove, move most content to
1864         gdbarch_selftest::operator().
1865         (_initialize_selftests_foreach_arch): Remove.
1866         * selftest-arch.h (register_test_foreach_arch): Add name
1867         parameter.
1868         (run_tests_with_arch): New declaration.
1869         * utils-selftests.c (_initialize_utils_selftests): Add names
1870         when registering selftests.
1871         * utils.c (_initialize_utils): Likewise.
1872         * unittests/array-view-selftests.c
1873         (_initialize_array_view_selftests): Likewise.
1874         * unittests/environ-selftests.c (_initialize_environ_selftests):
1875         Likewise.
1876         * unittests/function-view-selftests.c
1877         (_initialize_function_view_selftests): Likewise.
1878         * unittests/offset-type-selftests.c
1879         (_initialize_offset_type_selftests): Likewise.
1880         * unittests/optional-selftests.c
1881         (_initialize_optional_selftests): Likewise.
1882         * unittests/scoped_restore-selftests.c
1883         (_initialize_scoped_restore_selftests): Likewise.
1884         * NEWS: Document "maintenance selftest" and "maint info
1885         selftests".
1886
1887 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1888
1889         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1890         scoped_restore.
1891
1892 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1893
1894         * mi/mi-main.c (mi_load_progress): Make uiout variable
1895         a unique_ptr.
1896
1897 2017-09-15  Pedro Alves  <palves@redhat.com>
1898
1899         * compile/compile-c-types.c (convert_enum, convert_int)
1900         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1901
1902 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1903
1904         * dwarf2read.c (copy_string): Remove.
1905         (parse_macro_definition): Replace copy_string with savestring.
1906
1907 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1908
1909         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1910         gdb_target_obs.
1911         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1912         Likewise.
1913         (i[34567]86-*-linux*): Likewise.
1914
1915 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1916
1917         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1918         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1919         <stack>: Change type to std::vector.
1920         <stack_len, stack_allocated>: Remove.
1921         <grow_stack>: Remove.
1922         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1923         (dwarf_expr_context::~dwarf_expr_context): Remove.
1924         (dwarf_expr_context::grow_stack): Remove.
1925         (dwarf_expr_context::push): Adjust.
1926         (dwarf_expr_context::pop): Adjust.
1927         (dwarf_expr_context::fetch): Adjust.
1928         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1929         (dwarf_expr_context::stack_empty_p): Adjust.
1930         (dwarf_expr_context::execute_stack_op): Adjust.
1931
1932 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1933
1934         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1935         return type to bool.
1936         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1937
1938 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1939
1940         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1941         Change type to bool.
1942         (dwarf_stack_value) <in_stack_memory>: Likewise.
1943         (dwarf_expr_context) <push_address>: Change parameter type to
1944         bool.
1945         <fetch_in_stack_memory>: Change return type to bool.
1946         <push>: Change parameter type to bool.
1947         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1948         to bool.
1949         (dwarf_expr_context::push_address): Likewise.
1950         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1951         to bool.
1952         (dwarf_expr_context::execute_stack_op): Adjust.
1953         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1954
1955 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1956
1957         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1958         (struct dwarf_expr_context) <n_pieces>: Remove.
1959         <pieces>: Change type to std::vector.
1960         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1961         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1962         pieces.
1963         (dwarf_expr_context::add_piece): Adjust.
1964         * dwarf2loc.c (struct piece_closure): Initialize fields.
1965         <n_pieces>: Remove.
1966         <pieces>: Change type to std::vector.
1967         (allocate_piece_closure): Adjust, change parameter to
1968         std::vector rvalue and std::move it to piece_closure.
1969         (rw_pieced_value): Adjust.
1970         (check_pieced_synthetic_pointer): Adjust.
1971         (indirect_synthetic_pointer): Adjust.
1972         (coerce_pieced_ref): Adjust.
1973         (free_pieced_value_closure):  Adjust.  Use delete to free
1974         piece_closure.
1975         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
1976         to allocate_piece_closure.
1977         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1978
1979 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1980
1981         * probe.h (probe_ops_cp): Remove typedef.
1982         (DEF_VEC_P (probe_ops_cp)): Remove.
1983         (all_probe_ops): Change type to std::vector.
1984         * probe.c (info_probes_for_ops): Adjust to vector change.
1985         (probe_linespec_to_ops): Likewise.
1986         (all_probe_ops): Change type to std::vector.
1987         (_initialize_probe): Adjust to vector change.
1988         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1989         * elfread.c (elf_get_probes): Likewise.
1990         * stap-probe.c (_initialize_stap_probe): Likewise.
1991
1992 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1993
1994         * probe.h (struct bound_probe): Define constructors.
1995         * probe.c (bound_probe_s): Remove typedef.
1996         (DEF_VEC_O (bound_probe_s)): Remove VEC.
1997         (collect_probes): Change return type to std::vector, remove
1998         cleanup.
1999         (compare_probes): Return bool, change parameter type.  Change
2000         semantic to "less than".
2001         (gen_ui_out_table_header_info): Change parameter to std::vector
2002         and update.
2003         (exists_probe_with_pops): Likewise.
2004         (info_probes_for_ops): Update to std::vector change.
2005         (enable_probes_command): Likewise.
2006         (disable_probes_command): Likewise.
2007
2008 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2009
2010         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2011         vec to std::vector.
2012         * probe.c (parse_probes_in_pspace): Update.
2013         (find_probes_in_objfile): Update.
2014         (find_probe_by_pc): Update.
2015         (collect_probes): Update.
2016         (probe_any_get_probes): Update.
2017         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2018         return type to reference to std::vector.
2019         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2020         std::vector and update.
2021         (dtrace_process_dof): Likewise.
2022         (dtrace_get_probes): Likewise.
2023         * elfread.c (elf_get_probes): Change return type to std::vector,
2024         store an std::vector in bfd_data.
2025         (probe_key_free): Update to std::vector.
2026         * stap-probe.c (handle_stap_probe): Change parameter to
2027         std::vector and update.
2028         (stap_get_probes): Likewise.
2029         * symfile-debug.c (debug_sym_get_probes): Change return type to
2030         std::vector and update.
2031
2032 2017-09-11  Tom Tromey  <tom@tromey.com>
2033
2034         * breakpoint.c (program_breakpoint_here_p): Update.
2035         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2036         from make_show_memory_breakpoints_cleanup.  Return a
2037         scoped_restore_tmpl<int>.
2038         (restore_show_memory_breakpoints): Remove.
2039         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2040         * mem-break.c (memory_validate_breakpoint): Update.
2041         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2042         (ia64_memory_remove_breakpoint): Update.
2043         (ia64_breakpoint_from_pc): Update.
2044         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2045         from make_show_memory_breakpoints_cleanup.
2046
2047 2017-09-11  Tom Tromey  <tom@tromey.com>
2048
2049         * d-namespace.c (d_lookup_symbol): Use std::string.
2050         (find_symbol_in_baseclass): Likewise.
2051
2052 2017-09-11  Tom Tromey  <tom@tromey.com>
2053
2054         * ctf.c (ctf_start): Use std::string.
2055
2056 2017-09-11  Tom Tromey  <tom@tromey.com>
2057
2058         * ada-lang.c (is_known_support_routine): Update.
2059         (ada_unhandled_exception_name_addr_from_raise): Update.
2060         * guile/scm-frame.c (gdbscm_frame_name): Update.
2061         * python/py-frame.c (frapy_name): Update.
2062         (frapy_function): Update.
2063         * stack.h (find_frame_funname): Update.
2064         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2065         (print_frame): Update.
2066
2067 2017-09-11  Tom Tromey  <tom@tromey.com>
2068
2069         * findcmd.c (put_bits): Take a gdb::byte_vector.
2070         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2071         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2072         cleanups.
2073         (find_command): Update.
2074
2075 2017-09-11  Tom Tromey  <tom@tromey.com>
2076
2077         * cli/cli-script.c (class scoped_restore_hook_in): New.
2078         (clear_hook_in_cleanup): Remove.
2079         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2080         scoped_restore_hook_in.
2081
2082 2017-09-11  Tom Tromey  <tom@tromey.com>
2083
2084         * cli/cli-script.c (restore_interp): Remove.
2085         (read_command_lines): Use scoped_restore_interp.
2086         * interps.c (scoped_restore_interp::set_temp): Rename from
2087         interp_set_temp.
2088         * interps.h (class scoped_restore_interp): New.
2089         (interp_set_temp): Remove.
2090
2091 2017-09-11  Tom Tromey  <tom@tromey.com>
2092
2093         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2094         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2095         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2096         scoped_restore.
2097         (mi_cmd_break_insert_1): Update.
2098         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2099         scoped_restore.
2100
2101 2017-09-11  Tom Tromey  <tom@tromey.com>
2102
2103         * demangle.c (demangle_command): Update.
2104         * breakpoint.c (disable_command): Update.
2105         (enable_command): Update.
2106         (find_location_by_number): Make "number" const.  Use
2107         get_number_trailer.
2108         * cli/cli-utils.c (extract_arg): Return std::string.
2109         * probe.c (parse_probe_linespec): Update.  Change types.
2110         (collect_probes): Take string arguments.
2111         (parse_probe_linespec): Likewise.
2112         (info_probes_for_ops): Update.
2113         (enable_probes_command): Update.
2114         (disable_probes_command): Update.
2115         * break-catch-sig.c (catch_signal_split_args): Update.
2116         * mi/mi-parse.c (mi_parse): Update.
2117
2118 2017-09-11  Tom Tromey  <tom@tromey.com>
2119
2120         * language.h (language_enum): Make argument const.
2121         * language.c (language_enum): Make argument const.
2122
2123 2017-09-11  Tom Tromey  <tom@tromey.com>
2124
2125         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2126         as function.
2127         (skip_to_space): Rename from skip_to_space_const.
2128         * common/common-utils.c (skip_to_space): New function.
2129         (skip_to_space): Rename from skip_to_space_const.
2130         * cli/cli-utils.h (get_number): Rename from get_number_const.
2131         (extract_arg): Rename from extract_arg_const.
2132         * cli/cli-utils.c (get_number): Rename from get_number_const.
2133         (extract_arg): Rename from extract_arg_const.
2134         (number_or_range_parser::get_number): Use ::get_number.
2135         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2136         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2137         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2138         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2139         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2140         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2141         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2142         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2143
2144 2017-09-11  Tom Tromey  <tom@tromey.com>
2145
2146         * python/python.c (do_start_initialization): Use
2147         py-event-types.def to initialize types.
2148         Define all object type structures.
2149         * python/python-internal.h: Don't declare event initialization
2150         functions.
2151         * python/py-threadevent.c (thread_event_object_type): Don't
2152         define.
2153         * python/py-stopevent.c (stop_event_object_type): Don't define.
2154         * python/py-signalevent.c (signal_event_object_type): Don't
2155         declare or define.
2156         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2157         (clear_objfiles_event_object_type): Don't declare or define.
2158         * python/py-infevents.c (inferior_call_pre_event_object_type)
2159         (inferior_call_post_event_object_type)
2160         (register_changed_event_object_type)
2161         (memory_changed_event_object_type): Don't declare or define.
2162         * python/py-inferior.c (new_thread_event_object_type)
2163         (new_inferior_event_object_type)
2164         (inferior_deleted_event_object_type): Don't declare or define.
2165         * python/py-exitedevent.c (exited_event_object_type): Don't
2166         declare or define.
2167         * python/py-evts.c (gdbpy_initialize_py_events): Use
2168         py-all-events.def.
2169         * python/py-events.h (thread_event_object_type): Don't declare.
2170         (events_object): Use py-all-events.def.
2171         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2172         py-event-types.def.
2173         * python/py-event-types.def: New file.
2174         * python/py-continueevent.c (create_continue_event_object): Don't
2175         declare or define.
2176         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2177         declare or define.
2178         * python/py-all-events.def: New file.
2179
2180 2017-09-11  Tom Tromey  <tom@tromey.com>
2181
2182         * python/py-threadevent.c (create_thread_event_object): Return
2183         gdbpy_ref.
2184         * python/py-stopevent.h (create_stop_event_object)
2185         (create_breakpoint_event_object, create_signal_event_object):
2186         Update.
2187         * python/py-stopevent.c (create_stop_event_object): Return
2188         gdbpy_ref.
2189         (emit_stop_event): Update.
2190         * python/py-signalevent.c (create_signal_event_object): Return
2191         gdbpy_ref.
2192         * python/py-infevents.c (create_inferior_call_event_object):
2193         Update.
2194         * python/py-event.h (create_event_object)
2195         (create_thread_event_object): Update.
2196         * python/py-event.c (create_event_object): Return gdbpy_ref.
2197         * python/py-continueevent.c: Return gdbpy_ref.
2198         * python/py-bpevent.c (create_breakpoint_event_object): Return
2199         gdbpy_ref.
2200
2201 2017-09-11  Tom Tromey  <tom@tromey.com>
2202
2203         PR python/15622:
2204         * NEWS: Add entry.
2205         * python/python.c (do_start_initialization): Initialize new event
2206         types.
2207         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2208         (gdbpy_initialize_inferior_deleted_event)
2209         (gdbpy_initialize_new_thread_event): Declare.
2210         * python/py-threadevent.c (create_thread_event_object): Add option
2211         "thread" parameter.
2212         * python/py-inferior.c (new_thread_event_object_type)
2213         (new_inferior_event_object_type)
2214         (inferior_deleted_event_object_type): Declare.
2215         (python_new_inferior, python_inferior_deleted): New functions.
2216         (add_thread_object): Emit new_thread event.
2217         (gdbpy_initialize_inferior): Attach new functions to corresponding
2218         observers.
2219         (new_thread, new_inferior, inferior_deleted): Define new event
2220         types.
2221         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2222         registries.
2223         * python/py-events.h (events_object) <new_inferior,
2224         inferior_deleted, new_thread>: New fields.
2225         * python/py-event.h (create_thread_event_breakpoint): Add optional
2226         "thread" parameter.
2227
2228 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2229
2230         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2231         check current_ui instead.
2232         (internal_vproblem): Likewise.
2233
2234 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2235
2236         * thread.c (print_thread_info_1): Remove unnecessary calls to
2237         uiout->is_mi_like_p.
2238
2239 2017-09-09  Tom Tromey  <tom@tromey.com>
2240
2241         * namespace.h (add_using_directive): Update.
2242         * namespace.c (add_using_directive): Change type of excludes to
2243         std::vector.
2244         * dwarf2read.c (read_import_statement): Use std::vector.
2245         (read_namespace): Update.
2246         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2247
2248 2017-09-09  Tom Tromey  <tom@tromey.com>
2249
2250         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2251
2252 2017-09-09  Tom Tromey  <tom@tromey.com>
2253
2254         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2255
2256 2017-09-09  Tom Tromey  <tom@tromey.com>
2257
2258         * stack.c (func_command): Use gdb::def_vector.
2259
2260 2017-09-09  Tom Tromey  <tom@tromey.com>
2261
2262         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2263         ui_out_emit_list, ui_out_emit_tuple.
2264         (mi_cmd_var_update): Likewise.
2265
2266 2017-09-09  Tom Tromey  <tom@tromey.com>
2267
2268         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2269         ui_out_redirect_pop.
2270         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2271         ui_out_redirect_pop.
2272         * utils.c (do_ui_out_redirect_pop)
2273         (make_cleanup_ui_out_redirect_pop): Remove.
2274         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2275         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2276         * ui-out.h (ui_out_redirect_pop): New class.
2277
2278 2017-09-09  Tom Tromey  <tom@tromey.com>
2279
2280         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2281         (list_available_thread_groups, mi_cmd_list_thread_groups)
2282         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2283         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2284         Likewise.
2285
2286 2017-09-09  Tom Tromey  <tom@tromey.com>
2287
2288         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2289         ui_out_emit_tuple.
2290
2291 2017-09-09  Tom Tromey  <tom@tromey.com>
2292
2293         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2294         * stack.c (print_frame): Use ui_out_emit_tuple.
2295         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2296         (info_spu_mailbox_command, info_spu_dma_command)
2297         (info_spu_proxydma_command): Likewise.
2298         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2299         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2300         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2301         ui_out_emit_tuple.
2302         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2303
2304 2017-09-09  Tom Tromey  <tom@tromey.com>
2305
2306         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2307         (class ui_out_emit_table): Update comment.
2308         * ui-out.c (do_cleanup_table_end)
2309         (make_cleanup_ui_out_table_begin_end): Remove.
2310         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2311         (info_spu_dma_cmdlist): Likewise.
2312         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2313         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2314         ui_out_emit_table.
2315
2316 2017-09-09  Tom Tromey  <tom@tromey.com>
2317
2318         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2319         ui_out_emit_list, gdb::optional.
2320
2321 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2322
2323         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2324         prototype.
2325         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2326         prototype.
2327         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2328         prototype.
2329         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2330         * ada-exp.y: Remove _initialize_ada_exp prototype.
2331         * ada-lang.c: Remove _initialize_ada_language prototype.
2332         * ada-tasks.c: Remove _initialize_tasks prototype.
2333         * addrmap.c: Remove _initialize_addrmap prototype.
2334         * agent.c: Remove _initialize_agent prototype.
2335         * aix-thread.c: Remove _initialize_aix_thread prototype.
2336         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2337         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2338         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2339         prototype.
2340         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2341         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2342         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2343         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2344         prototype.
2345         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2346         prototype.
2347         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2348         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2349         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2350         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2351         prototype.
2352         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2353         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2354         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2355         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2356         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2357         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2358         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2359         prototype.
2360         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2361         prototype.
2362         * annotate.c: Remove _initialize_annotate prototype.
2363         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2364         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2365         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2366         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2367         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2368         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2369         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2370         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2371         prototype.
2372         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2373         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2374         * auto-load.c: Remove _initialize_auto_load prototype.
2375         * auxv.c: Remove _initialize_auxv prototype.
2376         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2377         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2378         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2379         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2380         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2381         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2382         prototype.
2383         * break-catch-throw.c: Remove _initialize_break_catch_throw
2384         prototype.
2385         * breakpoint.c: Remove _initialize_breakpoint prototype.
2386         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2387         * btrace.c: Remove _initialize_btrace prototype.
2388         * charset.c: Remove _initialize_charset prototype.
2389         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2390         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2391         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2392         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2393         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2394         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2395         * coffread.c: Remove _initialize_coffread prototype.
2396         * compile/compile.c: Remove _initialize_compile prototype.
2397         * complaints.c: Remove _initialize_complaints prototype.
2398         * completer.c: Remove _initialize_completer prototype.
2399         * copying.awk: Remove _initialize_copying prototype.
2400         * copying.c: Regenerate.
2401         * core-regset.c: Remove _initialize_core_regset prototype.
2402         * corefile.c: Remove _initialize_core prototype.
2403         * corelow.c: Remove _initialize_corelow prototype.
2404         * cp-abi.c: Remove _initialize_cp_abi prototype.
2405         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2406         * cp-support.c: Remove _initialize_cp_support prototype.
2407         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2408         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2409         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2410         * ctf.c: Remove _initialize_ctf prototype.
2411         * d-lang.c: Remove _initialize_d_language prototype.
2412         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2413         prototype.
2414         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2415         * dbxread.c: Remove _initialize_dbxread prototype.
2416         * dcache.c: Remove _initialize_dcache prototype.
2417         * demangle.c: Remove _initialize_demangler prototype.
2418         * disasm-selftests.c: Remove _initialize_disasm_selftests
2419         prototype.
2420         * disasm.c: Remove _initialize_disasm prototype.
2421         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2422         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2423         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2424         prototype.
2425         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2426         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2427         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2428         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2429         * elfread.c: Remove _initialize_elfread prototype.
2430         * exec.c: Remove _initialize_exec prototype.
2431         * extension.c: Remove _initialize_extension prototype.
2432         * f-lang.c: Remove _initialize_f_language prototype.
2433         * f-valprint.c: Remove _initialize_f_valprint prototype.
2434         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2435         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2436         * filesystem.c: Remove _initialize_filesystem prototype.
2437         * findcmd.c: Remove _initialize_mem_search prototype.
2438         * fork-child.c: Remove _initialize_fork_child prototype.
2439         * frame-base.c: Remove _initialize_frame_base prototype.
2440         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2441         * frame.c: Remove _initialize_frame prototype.
2442         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2443         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2444         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2445         * gcore.c: Remove _initialize_gcore prototype.
2446         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2447         * gdbarch.c: Regenerate.
2448         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2449         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2450         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2451         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2452         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2453         * go-lang.c: Remove _initialize_go_language prototype.
2454         * go32-nat.c: Remove _initialize_go32_nat prototype.
2455         * guile/guile.c: Remove _initialize_guile prototype.
2456         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2457         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2458         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2459         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2460         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2461         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2462         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2463         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2464         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2465         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2466         prototype.
2467         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2468         prototype.
2469         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2470         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2471         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2472         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2473         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2474         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2475         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2476         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2477         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2478         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2479         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2480         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2481         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2482         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2483         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2484         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2485         prototype.
2486         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2487         prototype.
2488         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2489         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2490         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2491         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2492         * infcall.c: Remove _initialize_infcall prototype.
2493         * infcmd.c: Remove _initialize_infcmd prototype.
2494         * inferior.c: Remove _initialize_inferiors prototype.
2495         * inflow.c: Remove _initialize_inflow prototype.
2496         * infrun.c: Remove _initialize_infrun prototype.
2497         * interps.c: Remove _initialize_interpreter prototype.
2498         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2499         * jit.c: Remove _initialize_jit prototype.
2500         * language.c: Remove _initialize_language prototype.
2501         * linux-fork.c: Remove _initialize_linux_fork prototype.
2502         * linux-nat.c: Remove _initialize_linux_nat prototype.
2503         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2504         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2505         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2506         * m2-lang.c: Remove _initialize_m2_language prototype.
2507         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2508         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2509         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2510         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2511         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2512         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2513         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2514         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2515         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2516         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2517         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2518         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2519         * machoread.c: Remove _initialize_machoread prototype.
2520         * macrocmd.c: Remove _initialize_macrocmd prototype.
2521         * macroscope.c: Remove _initialize_macroscope prototype.
2522         * maint.c: Remove _initialize_maint_cmds prototype.
2523         * mdebugread.c: Remove _initialize_mdebugread prototype.
2524         * memattr.c: Remove _initialize_mem prototype.
2525         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2526         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2527         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2528         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2529         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2530         * microblaze-linux-tdep.c: Remove
2531         _initialize_microblaze_linux_tdep prototype.
2532         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2533         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2534         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2535         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2536         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2537         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2538         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2539         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2540         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2541         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2542         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2543         prototype.
2544         * mipsread.c: Remove _initialize_mipsread prototype.
2545         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2546         prototype.
2547         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2548         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2549         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2550         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2551         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2552         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2553         prototype.
2554         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2555         * nto-procfs.c: Remove _initialize_procfs prototype.
2556         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2557         * objc-lang.c: Remove _initialize_objc_language prototype.
2558         * objfiles.c: Remove _initialize_objfiles prototype.
2559         * observer.c: Remove observer_test_first_notification_function,
2560         observer_test_second_notification_function,
2561         observer_test_third_notification_function, and
2562         _initialize_observer prototypes.
2563         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2564         * osabi.c: Remove _initialize_gdb_osabi prototype.
2565         * osdata.c: Remove _initialize_osdata prototype.
2566         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2567         * parse.c: Remove _initialize_parse prototype.
2568         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2569         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2570         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2571         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2572         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2573         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2574         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2575         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2576         * printcmd.c: Remove _initialize_printcmd prototype.
2577         * probe.c: Remove _initialize_probe prototype.
2578         * proc-api.c: Remove _initialize_proc_api prototype.
2579         * proc-events.c: Remove _initialize_proc_events prototype.
2580         * proc-service.c: Remove _initialize_proc_service prototype.
2581         * procfs.c: Remove _initialize_procfs prototype.
2582         * psymtab.c: Remove _initialize_psymtab prototype.
2583         * python/python.c: Remove _initialize_python prototype.
2584         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2585         * record-btrace.c: Remove _initialize_record_btrace prototype.
2586         * record-full.c: Remove _initialize_record_full prototype.
2587         * record.c: Remove _initialize_record prototype.
2588         * regcache.c: Remove _initialize_regcache prototype.
2589         * reggroups.c: Remove _initialize_reggroup prototype.
2590         * remote-notif.c: Remove _initialize_notif prototype.
2591         * remote-sim.c: Remove _initialize_remote_sim prototype.
2592         * remote.c: Remove _initialize_remote prototype.
2593         * reverse.c: Remove _initialize_reverse prototype.
2594         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2595         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2596         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2597         prototype.
2598         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2599         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2600         * rust-exp.y: Remove _initialize_rust_exp prototype.
2601         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2602         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2603         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2604         * score-tdep.c: Remove _initialize_score_tdep prototype.
2605         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2606         prototype.
2607         * ser-go32.c: Remove _initialize_ser_dos prototype.
2608         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2609         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2610         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2611         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2612         * serial.c: Remove _initialize_serial prototype.
2613         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2614         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2615         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2616         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2617         * skip.c: Remove _initialize_step_skip prototype.
2618         * sol-thread.c: Remove _initialize_sol_thread prototype.
2619         * solib-aix.c: Remove _initialize_solib_aix prototype.
2620         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2621         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2622         * solib-frv.c: Remove _initialize_frv_solib prototype.
2623         * solib-spu.c: Remove _initialize_spu_solib prototype.
2624         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2625         * solib-target.c: Remove _initialize_solib_target prototype.
2626         * solib.c: Remove _initialize_solib prototype.
2627         * source.c: Remove _initialize_source prototype.
2628         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2629         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2630         prototype.
2631         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2632         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2633         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2634         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2635         prototype.
2636         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2637         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2638         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2639         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2640         prototype.
2641         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2642         prototype.
2643         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2644         prototype.
2645         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2646         prototype.
2647         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2648         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2649         prototype.
2650         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2651         prototype.
2652         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2653         prototype.
2654         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2655         prototype.
2656         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2657         prototype.
2658         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2659         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2660         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2661         * stabsread.c: Remove _initialize_stabsread prototype.
2662         * stack.c: Remove _initialize_stack prototype.
2663         * stap-probe.c: Remove _initialize_stap_probe prototype.
2664         * std-regs.c: Remove _initialize_frame_reg prototype.
2665         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2666         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2667         * symfile.c: Remove _initialize_symfile prototype.
2668         * symmisc.c: Remove _initialize_symmisc prototype.
2669         * symtab.c: Remove _initialize_symtab prototype.
2670         * target-dcache.c: Remove _initialize_target_dcache prototype.
2671         * target-descriptions.c: Remove _initialize_target_descriptions
2672         prototype.
2673         * thread.c: Remove _initialize_thread prototype.
2674         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2675         prototype.
2676         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2677         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2678         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2679         prototype.
2680         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2681         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2682         * tracefile.c: Remove _initialize_tracefile prototype.
2683         * tracepoint.c: Remove _initialize_tracepoint prototype.
2684         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2685         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2686         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2687         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2688         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2689         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2690         * tui/tui.c: Remove _initialize_tui prototype.
2691         * typeprint.c: Remove _initialize_typeprint prototype.
2692         * user-regs.c: Remove _initialize_user_regs prototype.
2693         * utils.c: Remove _initialize_utils prototype.
2694         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2695         * valarith.c: Remove _initialize_valarith prototype.
2696         * valops.c: Remove _initialize_valops prototype.
2697         * valprint.c: Remove _initialize_valprint prototype.
2698         * value.c: Remove _initialize_values prototype.
2699         * varobj.c: Remove _initialize_varobj prototype.
2700         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2701         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2702         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2703         * windows-nat.c: Remove _initialize_windows_nat,
2704         _initialize_check_for_gdb_ini, and _initialize_loadable
2705         prototypes.
2706         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2707         * xcoffread.c: Remove _initialize_xcoffread prototype.
2708         * xml-support.c: Remove _initialize_xml_support prototype.
2709         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2710         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2711         prototype.
2712         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2713         prototype.
2714         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2715
2716 2017-09-08  Keith Seitz  <keiths@redhat.com>
2717
2718         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2719         field.
2720
2721 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2722
2723         * f-valprint.c (f_val_print): Remove check for one byte
2724         sized integers. Remove printing of character type.
2725
2726 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2727             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2728             Bernhard Heckel  <bernhard.heckel@intel.com>
2729
2730         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2731         to maintain proper indentation when printing pointers/refs.
2732
2733 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2734
2735         GDB 8.0.1 released.
2736
2737 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2738
2739         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2740
2741 2017-09-05  Tom Tromey  <tom@tromey.com>
2742
2743         * parse.c (funcall_chain): Now a std::vector.
2744         (start_arglist, end_arglist): Simplify.
2745         (free_funcalls): Remove.
2746         (parse_exp_in_context_1): Remove cleanup.
2747
2748 2017-09-05  Tom Tromey  <tom@tromey.com>
2749
2750         * go-exp.y (go_parse): Don't create a cleanup.
2751
2752 2017-09-05  Tom Tromey  <tom@tromey.com>
2753
2754         * d-exp.y (PrimaryExpression): Use std::string.
2755         (d_parse): Don't create a cleanup.
2756
2757 2017-09-05  Tom Tromey  <tom@tromey.com>
2758
2759         * utils.c (do_clear_parser_state): Remove.
2760         (make_cleanup_clear_parser_state): Remove.
2761         * p-exp.y (pascal_parse): Use scoped_restore.
2762         * m2-exp.y (m2_parse): Use scoped_restore.
2763         * f-exp.y (f_parse): Use scoped_restore.
2764         * d-exp.y (d_parse): Use scoped_restore.
2765         * c-exp.y (c_parse): Use scoped_restore.
2766         * ada-exp.y (ada_parse): Use scoped_restore.
2767         * utils.h (make_cleanup_clear_parser_state): Remove.
2768
2769 2017-09-06  Keith Seitz  <keiths@redhat.com>
2770
2771         * dwarf2read.c (dw2_linkage_name_attr): New function.
2772         (dw2_linkage_name): New function.
2773         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2774         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2775         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2776
2777 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2778
2779         * config/djgpp/djconfig.sh: Correct shell portability issue.
2780
2781 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2782
2783         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2784
2785 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2786
2787         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2788         * NEWS: Mention new FreeBSD/mips native configuration.
2789         * configure.host: Add aarch64*-*-freebsd*.
2790         * configure.nat: Likewise.
2791         * aarch64-fbsd-nat.c: New file.
2792
2793 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2794
2795         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2796         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2797         * NEWS: Mention new FreeBSD/aarch64 target.
2798         * configure.tgt: Add aarch64*-*-freebsd*.
2799         * aarch64-fbsd-tdep.c: New file.
2800         * aarch64-fbsd-tdep.h: New file.
2801
2802 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2803
2804         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2805
2806 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2807
2808         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2809         of TLS symbols.
2810
2811 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2812
2813         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2814         call.
2815
2816 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2817
2818         * infrun.c (follow_exec): Call add_thread after
2819         target_find_description.
2820
2821 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2822
2823         * infrun.c (handle_inferior_event_1): When exec'ing, read
2824         stop_pc after follow_exec.
2825
2826 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2827
2828         * remote.c (process_g_packet): Update error message.
2829
2830 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2831
2832         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2833         targets.
2834
2835 2017-09-05  Pedro Alves  <palves@redhat.com>
2836
2837         * eval.c (eval_call, evaluate_funcall): New functions, factored
2838         out from ...
2839         (evaluate_subexp_standard): ... this.
2840
2841 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2842
2843         * amd64-tdep.c (amd64_target_description): Create target
2844         descriptions.
2845         (_initialize_amd64_tdep): Don't call functions
2846         initialize_tdesc_amd64_*.  Add self tests.
2847         * arch/amd64.c (amd64_create_target_description): Add parameter
2848         is_linux.  Call set_tdesc_osabi if is_linux is true.
2849         * arch/amd64.h (amd64_create_target_description): Update the
2850         declaration.
2851         * arch/i386.c (i386_create_target_description): Add parameter
2852         is_linux.  Call set_tdesc_osabi if is_linux is true.
2853         * arch/i386.h (i386_create_target_description): Update
2854         declaration.
2855         * configure.tgt: Add i386.o to gdb_target_obs.
2856         * features/Makefile (XMLTOC): Remove i386/*.xml.
2857         * features/i386/amd64-avx-avx512.c: Remove.
2858         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2859         * features/i386/amd64-avx-mpx.c: Remove.
2860         * features/i386/amd64-avx.c: Remove.
2861         * features/i386/amd64-mpx.c: Remove.
2862         * features/i386/amd64.c: Remove.
2863         * features/i386/i386-avx-avx512.c: Remove.
2864         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2865         * features/i386/i386-avx-mpx.c: Remove.
2866         * features/i386/i386-avx.c: Remove.
2867         * features/i386/i386-mmx.c: Remove.
2868         * features/i386/i386-mpx.c: Remove.
2869         * features/i386/i386.c: Remove.
2870         * i386-tdep.c: Don't include features/i386/i386*.c., include
2871         target-descriptions.h and arch/i386.h.
2872         (i386_target_description): Create target descriptions.
2873         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2874         functions.  Do self tests.
2875
2876 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2877
2878         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2879         * features/i386/amd64-avx-avx512-linux.c: Removed.
2880         * features/i386/amd64-avx-linux.c: Removed.
2881         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2882         * features/i386/amd64-avx-mpx-linux.c: Removed.
2883         * features/i386/amd64-linux.c: Removed.
2884         * features/i386/amd64-mpx-linux.c: Removed.
2885         * features/i386/x32-avx-avx512-linux.c: Removed.
2886         * features/i386/x32-avx-linux.c: Removed.
2887         * features/i386/x32-linux.c: Removed.
2888
2889 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2890
2891         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2892         features/i386/*.c.
2893         (amd64_linux_read_description): Call
2894         amd64_create_target_description.
2895         * arch/amd64.c: New file.
2896         * arch/amd64.h: New file.
2897         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2898         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2899
2900 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2901
2902         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2903         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2904         (amd64_linux_read_description): Create target descriptions.
2905         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2906         functions.  Add unit tests.
2907         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2908         x32-core.xml.
2909         * features/i386/64bit-avx.c: Generated.
2910         * features/i386/64bit-avx512.c: Generated.
2911         * features/i386/64bit-core.c: Generated.
2912         * features/i386/64bit-linux.c: Generated.
2913         * features/i386/64bit-mpx.c: Generated.
2914         * features/i386/64bit-pkeys.c: Generated.
2915         * features/i386/64bit-segments.c: Generated.
2916         * features/i386/64bit-sse.c: Generated.
2917         * features/i386/x32-core.c: Generated.
2918         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2919         c files for amd64-linux and x32-linux.
2920
2921 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2922
2923         * amd64-linux-tdep.c (amd64_linux_read_description): New
2924         function.
2925         (amd64_linux_core_read_description): Call
2926         amd64_linux_read_description.
2927         (amd64_linux_init_abi): Likewise.
2928         (amd64_x32_linux_init_abi): Likewise.
2929         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2930         * x86-linux-nat.c (x86_linux_read_description): Call
2931         amd64_linux_read_description.
2932
2933 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2934
2935         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2936         comments.
2937
2938 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2939
2940         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2941         * features/i386/i386-avx-avx512-linux.c: Remove.
2942         * features/i386/i386-avx-linux.c: Remove.
2943         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2944         * features/i386/i386-avx-mpx-linux.c: Remove.
2945         * features/i386/i386-linux.c: Remove.
2946         * features/i386/i386-mmx-linux.c: Remove.
2947         * features/i386/i386-mpx-linux.c: Remove.
2948
2949 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2950
2951         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2952         (SFILES): Add arch/i386.c.
2953         (HFILES_NO_SRCDIR): Add arch/i386.h.
2954         * arch/i386.c: New file.
2955         * arch/i386.h: New file.
2956         * arch/tdesc.h (allocate_target_description): Declare.
2957         (set_tdesc_architecture): Declare.
2958         (set_tdesc_osabi): Declare.
2959         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2960         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2961         include arch/i386.h.
2962         (i386_linux_read_description): Remove code and call
2963         i386_create_target_description.
2964         (set_tdesc_architecture): New function.
2965         (set_tdesc_osabi): New function.
2966         * target-descriptions.h (allocate_target_description): Remove.
2967
2968 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2969
2970         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2971         * target-descriptions.c (tdesc_create_feature): Likewise, and
2972         adjust code.
2973         * features/i386/32bit-avx.c: Re-generated.
2974         * features/i386/32bit-avx512.c: Re-generated.
2975         * features/i386/32bit-core.c: Re-generated.
2976         * features/i386/32bit-linux.c: Re-generated.
2977         * features/i386/32bit-mpx.c: Re-generated.
2978         * features/i386/32bit-pkeys.c: Re-generated.
2979         * features/i386/32bit-sse.c: Re-generated.
2980
2981 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2982
2983         * regformats/regdef.h (struct reg): Override operator == and !=.
2984
2985 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2986
2987         * arch/tdesc.h: New file.
2988         * regformats/regdat.sh: Generate code using tdesc_create_reg.
2989         * target-descriptions.c: Update comments.
2990         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
2991         declarations.
2992         * features/i386/32bit-avx.c: Re-generated.
2993         * features/i386/32bit-avx512.c: Re-generated.
2994         * features/i386/32bit-core.c: Re-generated.
2995         * features/i386/32bit-linux.c: Re-generated.
2996         * features/i386/32bit-mpx.c: Re-generated.
2997         * features/i386/32bit-pkeys.c: Re-generated.
2998         * features/i386/32bit-sse.c: Re-generated.
2999
3000 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3001
3002         * regformats/regdat.sh: Update generated code.
3003
3004 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3005
3006         * regformats/regdat.sh: Adjust code order.
3007
3008 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3009
3010         * expprint.c (dump_subexp_body_standard): Use constant format
3011         string in fprintf_filtered call.
3012
3013 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3014
3015         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3016         NetBSD/i386.
3017         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3018
3019 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3020
3021         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3022
3023 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3024
3025         * bsd-kvm.o: Define _KMEMUSER.
3026         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3027         * configure: Regenerate.
3028
3029 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3030
3031         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3032         * i386-fbsd-nat.c: Likewise.
3033
3034 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3035
3036         * unittests/array-view-selftests.c: Add include of <array>.
3037
3038 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3039
3040         * spu-tdep.c (flush_ea_cache): Add missing argument to
3041         call_function_by_hand.
3042
3043 2017-09-04  Pedro Alves  <palves@redhat.com>
3044
3045         * NEWS (Safer support for debugging with no debug info): New.
3046
3047 2017-09-04  Pedro Alves  <palves@redhat.com>
3048
3049         * c-exp.y (function_method, function_method_void): Add current
3050         instance flags to TYPE_INSTANCE.
3051         * dwarf2read.c (check_modifier): New.
3052         (compute_delayed_physnames): Assert that only C++ adds delayed
3053         physnames.  Mark fn_fields as const/volatile depending on
3054         physname.
3055         * eval.c (make_params): New type_instance_flags parameter.  Use
3056         it as the new type's instance flags.
3057         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3058         flags element and pass it to make_params.
3059         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3060         instance flags element.
3061         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3062         * gdbtypes.h: Include "enum-flags.h".
3063         (type_instance_flags): New enum-flags type.
3064         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3065         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3066         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3067         (follow_type_instance_flags): New function.
3068         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3069         * parser-defs.h (follow_type_instance_flags): Declare.
3070         * valops.c (value_struct_elt_for_reference): const/volatile must
3071         match too.
3072
3073 2017-09-04  Pedro Alves  <palves@redhat.com>
3074
3075         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3076         function/method scopes; lookup the nested name as a function local
3077         static variable.
3078
3079 2017-09-04  Pedro Alves  <palves@redhat.com>
3080
3081         (%type <voidval>): Add function_method.
3082         * c-exp.y (exp): New production for calls with no arguments.
3083         (function_method, function_method_void_or_typelist): New
3084         productions.
3085         (exp): New production for "method()::static_var".
3086         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3087         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3088         Handle OP_FUNC_STATIC_VAR.
3089         * parse.c (operator_length_standard):
3090         Handle OP_FUNC_STATIC_VAR.
3091
3092 2017-09-04  Pedro Alves  <palves@redhat.com>
3093
3094         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3095         handling.
3096         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3097         Ditto.
3098         * parse.c (operator_length_standard, operator_check_standard):
3099         Ditto.
3100         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3101
3102 2017-09-04  Pedro Alves  <palves@redhat.com>
3103
3104         * ax-gdb.c: Include "typeprint.h".
3105         (gen_expr_for_cast): New function.
3106         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3107         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3108         type is unknown.
3109         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3110         nodebug_data_symbol.
3111         * eval.c: Include "typeprint.h".
3112         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3113         Error out if symbol has unknown type.
3114         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3115         evaluate_subexp_for_cast.
3116         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3117         OP_VAR_MSYM_VALUE.
3118         (evaluate_subexp_for_cast): New function.
3119         * gdbtypes.c (init_nodebug_var_type): New function.
3120         (objfile_type): Use it to initialize types of variables with no
3121         debug info.
3122         * typeprint.c (error_unknown_type): New.
3123         * typeprint.h (error_unknown_type): New declaration.
3124         * compile/compile-c-types.c (convert_type_basic): Handle
3125         TYPE_CODE_ERROR; warn and fallback to int for variables with
3126         unknown type.
3127
3128 2017-09-04  Pedro Alves  <palves@redhat.com>
3129
3130         * eval.c (evaluate_var_value): New function, factored out from ...
3131         (evaluate_subexp_standard): ... here.
3132
3133 2017-09-04  Pedro Alves  <palves@redhat.com>
3134
3135         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3136         Remove useless assignments to 'op'.
3137
3138 2017-09-04  Pedro Alves  <palves@redhat.com>
3139
3140         * eval.c (eval_skip_value): New function.
3141         (evaluate_subexp_standard): Use it.
3142
3143 2017-09-04  Pedro Alves  <palves@redhat.com>
3144
3145         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3146         function name from symbol/minsym and pass it to
3147         error_call_unknown_return_type.
3148
3149 2017-09-04  Pedro Alves  <palves@redhat.com>
3150
3151         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3152         * ax-gdb.c (gen_msym_var_ref): New function.
3153         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3154         * eval.c (evaluate_var_msym_value): New function.
3155         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3156         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3157         to call_function_by_hand.
3158         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3159         Handle OP_VAR_MSYM_VALUE.
3160         (union exp_element) <msymbol>: New field.
3161         * minsyms.h (struct type): Forward declare.
3162         (find_minsym_type_and_address): Declare.
3163         * parse.c (write_exp_elt_msym): New function.
3164         (write_exp_msymbol): Delete, refactored as ...
3165         (find_minsym_type_and_address): ... this new function.
3166         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3167         (operator_length_standard, operator_check_standard): Handle
3168         OP_VAR_MSYM_VALUE.
3169         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3170
3171 2017-09-04  Pedro Alves  <palves@redhat.com>
3172
3173         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3174         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3175         unknown.
3176         * ada-typeprint.c (print_func_type): Handle functions with unknown
3177         return type.
3178         * c-typeprint.c (c_type_print_base): Handle functions and methods
3179         with unknown return type.
3180         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3181         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3182         * compile/compile-c-types.c: Include "objfiles.h".
3183         (convert_func): For functions with unknown return type, warn and
3184         default to int.
3185         * compile/compile-object-run.c (compile_object_run): Adjust call
3186         to call_function_by_hand_dummy.
3187         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3188         call_function_by_hand.
3189         * eval.c (evaluate_subexp_standard): Adjust calls to
3190         call_function_by_hand.  Handle functions and methods with unknown
3191         return type.  Pass expect_type to call_function_by_hand.
3192         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3193         return type.
3194         * gcore.c (call_target_sbrk): Adjust call to
3195         call_function_by_hand.
3196         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3197         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3198         an integer address type instead of nodebug.
3199         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3200         call_function_by_hand.
3201         * infcall.c (error_call_unknown_return_type): New function.
3202         (call_function_by_hand): New "default_return_type" parameter.
3203         Pass it down.
3204         (call_function_by_hand_dummy): New "default_return_type"
3205         parameter.  Use it instead of defaulting to int.  If there's no
3206         default and the return type is unknown, throw an error.  If
3207         there's a default return type, and the called function has no
3208         debug info, then assume the function is prototyped.
3209         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3210         New "default_return_type" parameter.
3211         (error_call_unknown_return_type): New declaration.
3212         * linux-fork.c (call_lseek): Cast return type of lseek.
3213         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3214         call_function_by_hand.
3215         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3216         calls to call_function_by_hand.
3217         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3218         return type.
3219         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3220         (value_nsstring, print_object_command): Adjust calls to
3221         call_function_by_hand.
3222         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3223         functions with unknown return type.
3224         (pascal_type_print_func_varspec_suffix): New function.
3225         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3226         TYPE_CODE_METHOD>: Use it.
3227         * python/py-value.c (valpy_call): Adjust call to
3228         call_function_by_hand.
3229         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3230         call_function_by_hand.
3231         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3232         call_function_by_hand.
3233         * valops.c (value_allocate_space_in_inferior): Adjust call to
3234         call_function_by_hand.
3235         * typeprint.c (type_print_unknown_return_type): New function.
3236         * typeprint.h (type_print_unknown_return_type): New declaration.
3237
3238 2017-09-04  Pedro Alves  <palves@redhat.com>
3239
3240         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3241         types with more than one parameter as prototyped.
3242
3243 2017-09-04  Pedro Alves  <palves@redhat.com>
3244
3245         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3246         (disassemble_command): Use gdb_disassembly_flags instead of bare
3247         int.
3248         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3249         (dump_insns, do_mixed_source_and_assembly_deprecated)
3250         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3251         Use gdb_disassembly_flags instead of bare int.
3252         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3253         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3254         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3255         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3256         (enum gdb_disassembly_flag): ... values of this new enumeration.
3257         (gdb_disassembly_flags): Define.
3258         (gdb_disassembly)
3259         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3260         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3261         gdb_disassembly_flags instead of bare int.
3262         * record-btrace.c (btrace_insn_history)
3263         (record_btrace_insn_history, record_btrace_insn_history_range)
3264         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3265         instead of bare int.
3266         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3267         Use gdb_disassembly_flags instead of bare int.
3268         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3269         Define.
3270         * target-delegates.c: Regenerate.
3271         * target.c (target_insn_history, target_insn_history_from)
3272         (target_insn_history_range): Use gdb_disassembly_flags instead of
3273         bare int.
3274         * target.h: Include "disasm.h".
3275         (struct target_ops) <to_insn_history, to_insn_history_from,
3276         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3277         int.
3278         (target_insn_history, target_insn_history_from)
3279         (target_insn_history_range): Use gdb_disassembly_flags instead of
3280         bare int.
3281
3282 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3283
3284         * cli/cli-script.c (build_command_line): For if/while commands,
3285         check whether args is empty.
3286
3287 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3288
3289         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3290         (enum command_control_type): Likewise.
3291         (struct command_line): Likewise.
3292         (free_command_lines): Likewise.
3293         (struct command_lines_deleter): Likewise.
3294         (command_line_up): Likewise.
3295         (read_command_lines): Likewise.
3296         (read_command_lines_1): Likewise.
3297         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3298         (enum command_control_type): Likewise.
3299         (struct command_line): Likewise.
3300         (free_command_lines): Likewise.
3301         (struct command_lines_deleter): Likewise.
3302         (command_line_up): Likewise.
3303         (read_command_lines): Likewise.
3304         (read_command_lines_1): Likewise.
3305         * breakpoint.h: Include cli/cli-script.h.
3306         * extension-priv.h: Likewise.
3307         * gdbcmd.h: Likewise.
3308
3309 2017-09-04  Pedro Alves  <palves@redhat.com>
3310
3311         * ada-lang.c (is_known_support_routine): Move sal declaration to
3312         where it is initialized.
3313         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3314         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3315         (clear_command, update_static_tracepoint): Remove init_sal
3316         references.  Move declarations closer to initializations.
3317         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3318         initializations.
3319         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3320         references.  Move sal declarations closer to initializations.
3321         * frame.c (find_frame_sal): Return a symtab_and_line via function
3322         return instead of output parameter.  Remove init_sal references.
3323         * frame.h (find_frame_sal): Return a symtab_and_line via function
3324         return instead of output parameter.
3325         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3326         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3327         instead of memset.
3328         (gdbscm_find_pc_line): Remove init_sal reference.
3329         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3330         references.  Move declarations closer to initializations.
3331         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3332         initializations.
3333         (finish_backward): Remove init_sal references.  Move declarations
3334         closer to initializations.
3335         * infrun.c (process_event_stop_test, handle_step_into_function)
3336         (insert_hp_step_resume_breakpoint_at_frame)
3337         (insert_step_resume_breakpoint_at_caller): Likewise.
3338         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3339         (symbol_to_sal): Likewise.
3340         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3341         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3342         to its initialization.
3343         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3344         init_sal references.  Move declarations closer to initializations.
3345         * source.c (get_current_source_symtab_and_line): Remove brace
3346         initialization.
3347         (set_current_source_symtab_and_line): Now takes the sal by const
3348         reference.  Remove brace initialization.
3349         (line_info): Remove init_sal reference.
3350         * source.h (set_current_source_symtab_and_line): Now takes a
3351         symtab_and_line via const reference.
3352         * stack.c (set_current_sal_from_frame): Adjust.
3353         (print_frame_info): Adjust.
3354         (get_last_displayed_sal): Return the sal via function return
3355         instead of via output parameter.  Simplify.
3356         (frame_info): Adjust.
3357         * stack.h (get_last_displayed_sal): Return the sal via function
3358         return instead of via output parameter.
3359         * symtab.c (init_sal): Delete.
3360         (find_pc_sect_line): Remove init_sal references.  Move
3361         declarations closer to initializations.
3362         (find_function_start_sal): Remove init_sal references.  Move
3363         declarations closer to initializations.
3364         * symtab.h (struct symtab_and_line): In-class initialize all
3365         fields.
3366         * tracepoint.c (set_traceframe_context)
3367         (print_one_static_tracepoint_marker): Remove init_sal references.
3368         Move declarations closer to initializations.
3369         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3370         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3371         declarations closer to initializations.
3372         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3373         init_sal references.  Adjust.
3374
3375 2017-09-04  Pedro Alves  <palves@redhat.com>
3376
3377         * ax-gdb.c (agent_command_1): Use range-for.
3378         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3379         * breakpoint.c: Include "common/array-view.h".
3380         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3381         parameter from struct symtabs_and_lines to
3382         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3383         (breakpoint_sals_to_pc): Change sals parameter from struct
3384         symtabs_and_lines to std::vector reference.
3385         (check_fast_tracepoint_sals): Change sals parameter from struct
3386         symtabs_and_lines to std::array_view.  Use range-for.
3387         (decode_static_tracepoint_spec): Return a std::vector instead of
3388         symtabs_and_lines.  Update.
3389         (create_breakpoint): Update.
3390         (break_range_command, until_break_command, clear_command): Update.
3391         (base_breakpoint_decode_location, bkpt_decode_location)
3392         (bkpt_probe_create_sals_from_location)
3393         (bkpt_probe_decode_location, tracepoint_decode_location)
3394         (tracepoint_probe_decode_location)
3395         (strace_marker_create_sals_from_location): Return a std::vector
3396         instead of symtabs_and_lines.
3397         (strace_marker_create_breakpoints_sal): Update.
3398         (strace_marker_decode_location): Return a std::vector instead of
3399         symtabs_and_lines.  Update.
3400         (update_breakpoint_locations): Change struct symtabs_and_lines
3401         parameters to gdb::array_view.  Adjust.
3402         (location_to_sals): Return a std::vector instead of
3403         symtabs_and_lines.  Update.
3404         (breakpoint_re_set_default): Use std::vector instead of struct
3405         symtabs_and_lines.
3406         (decode_location_default): Return a std::vector instead of
3407         symtabs_and_lines.  Update.
3408         * breakpoint.h: Include "common/array-view.h".
3409         (struct breakpoint_ops) <decode_location>: Now returns a
3410         std::vector instead of returning a symtabs_and_lines via output
3411         parameter.
3412         (update_breakpoint_locations): Change sals parameters to use
3413         gdb::array_view.
3414         * cli/cli-cmds.c (edit_command, list_command): Update to use
3415         std::vector and gdb::array_view.
3416         (ambiguous_line_spec): Adjust to use gdb::array_view and
3417         range-for.
3418         (compare_symtabs): Rename to ...
3419         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3420         const reference and adjust.
3421         (filter_sals): Rewrite using std::vector and standard algorithms.
3422         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3423         (jump_command): Update to use std::vector.
3424         * linespec.c (struct linespec_state) <canonical_names>: Update
3425         comment.
3426         (add_sal_to_sals_basic): Delete.
3427         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3428         (decode_line_2, create_sals_line_offset)
3429         (convert_address_location_to_sals, convert_linespec_to_sals)
3430         (convert_explicit_location_to_sals, parse_linespec)
3431         (event_location_to_sals, decode_line_full, decode_line_1)
3432         (decode_line_with_current_source)
3433         (decode_line_with_last_displayed, decode_objc)
3434         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3435         (linespec_result::~linespec_result): Adjust to use std::vector
3436         instead of symtabs_and_lines.
3437         * linespec.h (linespec_sals::sals): Now a std::vector.
3438         (struct linespec_result): Use std::vector, bool, and in-class
3439         initialization.
3440         (decode_line_1, decode_line_with_current_source)
3441         (decode_line_with_last_displayed): Return std::vector.
3442         * macrocmd.c (info_macros_command): Use std::vector.
3443         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3444         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3445         std::vector.
3446         * probe.h (parse_probes): Return a std::vector.
3447         * python/python.c (gdbpy_decode_line): Use std::vector and
3448         gdb::array_view.
3449         * source.c (select_source_symtab, line_info): Use std::vector.
3450         * stack.c (func_command): Use std::vector.
3451         * symtab.h (struct symtabs_and_lines): Delete.
3452         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3453
3454 2017-09-04  Pedro Alves  <palves@redhat.com>
3455
3456         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3457         unittests/array-view-selftests.c.
3458         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3459         * common/array-view.h: New file.
3460         * unittests/array-view-selftests.c: New file.
3461
3462 2017-09-04  Pedro Alves  <palves@redhat.com>
3463
3464         * cli/cli-cmds.c (edit_command): Pass message to
3465         ambiguous_line_spec.
3466         (list_command): Pass message to ambiguous_line_spec.  Say
3467         "first"/"last" instead of "start" and "end" to be consistent with
3468         the manual.
3469         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3470         them to print formatted message.
3471
3472 2017-09-04  Pedro Alves  <palves@redhat.com>
3473
3474         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3475         ftrace_update_insns by reference instead of pointer.
3476
3477 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3478
3479         * i386-go32-tdep.c: Include x86-xstate.h.
3480         (i386_go32_init_abi): Call i386_target_description.
3481         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3482         if xcr0 is X86_XSTATE_X87_MASK.
3483         * i386-tdep.h (tdesc_i386): Remove the declaration.
3484         (tdesc_i386_mmx): Likewise.
3485
3486 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3487
3488         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3489         X86_XSTATE_SSE_MASK instead of 0.
3490
3491 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3492
3493         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3494         i386_target_description.
3495         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3496         i386_target_description.
3497         * i386-tdep.c (i386_gdbarch_init): Likewise.
3498
3499 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3500
3501         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3502         (x86_darwin_init_abi_64): Call amd64_target_description.
3503         * amd64-dicos-tdep.c: Likewise.
3504         * amd64-fbsd-nat.c: Likewise.
3505         * amd64-fbsd-tdep.c: Likewise.
3506         * amd64-nbsd-tdep.c: Likewise.
3507         * amd64-obsd-tdep.c: Likewise.
3508         * amd64-sol2-tdep.c: Likewise.
3509         * amd64-windows-tdep.c: Likewise.
3510         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3511
3512 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3513
3514         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3515         (btrace_function) <insn>: Change type to use std::vector.
3516         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3517         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3518         ftrace_update_insns, ftrace_compute_global_level_offset,
3519         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3520         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3521         change to std::vector.
3522         (ftrace_update_insns): Adjust to change to std::vector, change
3523         type of INSN parameter.
3524         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3525         * record-btrace.c (btrace_call_history_insn_range,
3526         btrace_compute_src_line_range,
3527         record_btrace_frame_prev_register): Adjust to change to
3528         std::vector.
3529         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3530         to change to std::vector.
3531
3532 2017-09-03  Tom Tromey  <tom@tromey.com>
3533
3534         * corefile.c (reopen_exec_file): Use std::string.
3535
3536 2017-09-03  Tom Tromey  <tom@tromey.com>
3537
3538         * compile/compile.c (compile_register_name_mangled): Return
3539         std::string.
3540         * compile/compile-loc2c.c (pushf_register_address): Update.
3541         (pushf_register): Update.
3542         * compile/compile-c-types.c (convert_array): Update.
3543         * compile/compile-c-symbols.c (generate_vla_size): Update.
3544         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3545         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3546         (convert_one_symbol): Update.
3547         (generate_c_for_for_one_variable): Update.
3548         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3549         std::string.
3550         (generate_register_struct): Update.
3551         * compile/compile-internal.h (c_get_range_decl_name): Return a
3552         std::string.
3553         (compile_register_name_mangled): Return std::string.
3554
3555 2017-09-03  Tom Tromey  <tom@tromey.com>
3556
3557         * utils.c (perror_string): Return a std::string.
3558         (throw_perror_with_name, perror_warning_with_name): Update.
3559
3560 2017-09-03  Tom Tromey  <tom@tromey.com>
3561
3562         * demangle.c (demangle_command): Use std::string,
3563         unique_xmalloc_ptr.
3564
3565 2017-09-03  Tom Tromey  <tom@tromey.com>
3566
3567         * cli/cli-setshow.c (do_set_command): Use std::string.
3568
3569 2017-09-03  Tom Tromey  <tom@tromey.com>
3570
3571         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3572
3573 2017-09-03  Tom Tromey  <tom@tromey.com>
3574
3575         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3576
3577 2017-09-03  Tom Tromey  <tom@tromey.com>
3578
3579         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3580         gdb::unique_xmalloc_ptr.
3581
3582 2017-09-03  Tom Tromey  <tom@tromey.com>
3583
3584         * thread.c (print_thread_info_1): Use string_printf.
3585         (thread_apply_command, thread_apply_all_command): Use
3586         std::string.
3587
3588 2017-09-03  Tom Tromey  <tom@tromey.com>
3589
3590         * valprint.c (val_print_string): Update.
3591         * gdbcore.h (memory_error_message): Return std::string.
3592         * corefile.c (memory_error_message): Return std::string.
3593         (memory_error): Update.
3594         * breakpoint.c (insert_bp_location): Update.
3595
3596 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3597
3598         * target/waitstatus.h (target_waitstatus_to_string): Change
3599         return type to std::string.
3600         * target/waitstatus.c (target_waitstatus_to_string): Return
3601         std::string.
3602         * target.h (target_waitstatus_to_string): Remove declaration.
3603         * infrun.c (resume, clear_proceed_status_thread,
3604         print_target_wait_results, do_target_wait, save_waitstatus,
3605         stop_all_threads): Adjust.
3606         * record-btrace.c (record_btrace_wait): Adjust.
3607         * target-debug.h
3608         (target_debug_print_struct_target_waitstatus_p): Adjust.
3609
3610 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3611
3612         PR gdb/22046
3613         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3614         detection.
3615
3616 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3617
3618         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3619         for setting/unsetting environment variables on the remote target.
3620         (New remote packets): Add entries for QEnvironmentHexEncoded,
3621         QEnvironmentUnset and QEnvironmentReset.
3622         * common/environ.c (gdb_environ::operator=): Extend method to
3623         handle m_user_set_env_list and m_user_unset_env_list.
3624         (gdb_environ::clear): Likewise.
3625         (match_var_in_string): Change type of first parameter from 'char
3626         *' to 'const char *'.
3627         (gdb_environ::set): Extend method to handle
3628         m_user_set_env_list and m_user_unset_env_list.
3629         (gdb_environ::unset): Likewise.
3630         (gdb_environ::clear_user_set_env): New method.
3631         (gdb_environ::user_set_envp): Likewise.
3632         (gdb_environ::user_unset_envp): Likewise.
3633         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3634         m_user_unset_env_list on move constructor/assignment.
3635         (unset): Add new default parameter 'update_unset_list = true'.
3636         (clear_user_set_env): New method.
3637         (user_set_envp): Likewise.
3638         (user_unset_envp): Likewise.
3639         (m_user_set_env_list): New std::set.
3640         (m_user_unset_env_list): Likewise.
3641         * common/rsp-low.c (hex2str): New function.
3642         (bin2hex): New overload for bin2hex function.
3643         * common/rsp-low.c (hex2str): New prototype.
3644         (str2hex): New overload prototype.
3645         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3646         QEnvironmentUnset and QEnvironmentReset.
3647         (remote_protocol_features): Add QEnvironmentHexEncoded,
3648         QEnvironmentUnset and QEnvironmentReset packets.
3649         (send_environment_packet): New function.
3650         (extended_remote_environment_support): Likewise.
3651         (extended_remote_create_inferior): Call
3652         extended_remote_environment_support.
3653         (_initialize_remote): Add QEnvironmentHexEncoded,
3654         QEnvironmentUnset and QEnvironmentReset packet configs.
3655         * unittests/environ-selftests.c (gdb_selftest_env_var):
3656         New variable.
3657         (test_vector_initialization): New function.
3658         (test_init_from_host_environ): Likewise.
3659         (test_reinit_from_host_environ): Likewise.
3660         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3661         Likewise.
3662         (test_unset_set_empty_vector): Likewise.
3663         (test_vector_clear): Likewise.
3664         (test_std_move): Likewise.
3665         (test_move_constructor):
3666         (test_self_move): Likewise.
3667         (test_set_unset_reset): Likewise.
3668         (run_tests): Rewrite in terms of the functions above.
3669
3670 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3671
3672         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3673         (adi_available): Use a temp variable of type CORE_ADDR as argument
3674         3 when calling target_auxv_search.
3675         (adi_normalize_address): Use masks and xor operators to calculate
3676         normalized address.
3677         (adi_read_versions, adi_write_versions, adi_print_versions)
3678         (do_examine, do_assign): Use paddress.
3679
3680 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3681
3682         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3683         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3684         out of loop and add supply of FIR.
3685         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3686         add collect of FIR.
3687
3688 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3689
3690         PR gdb/21827
3691         * cli/cli-script.c (define_command): Don't convert command name
3692         to lower case.
3693
3694 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3695
3696         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3697         Update all callers accordingly. Remove all code blocks handling
3698         the case where DISPP is not NULL.
3699
3700 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3701
3702         PR symtab/22003
3703         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3704         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3705         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3706
3707 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3708
3709         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3710         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3711         (read_comp_units_from_section): New parameter abbrev_section, use
3712         read_and_check_comp_unit_head, allocate signatured_type if needed.
3713         (create_all_comp_units): Update read_comp_units_from_section caller.
3714
3715 2017-08-23  Pedro Alves  <palves@redhat.com>
3716
3717         PR remote/21852
3718         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3719         to null_ptid and switch to thread without reading the registers
3720         after adding the inferior.
3721
3722 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3723
3724         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3725         compile-gcc.
3726         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3727         (compile_to_object): Implement compile_gcc.
3728         (_initialize_compile): Install "set compile-gcc".  Initialize
3729         compile_gcc.
3730
3731 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3732
3733         * compile/compile.c (compile_to_object): Conditionally call
3734         set_verbose.  Conditionally call compile or compile_v0.
3735
3736 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3737
3738         * sparc64-tdep.h: (adi_normalize_address): New export.
3739         * sparc-nat.h: (open_adi_tag_fd): New export.
3740         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3741         * sparc64-linux-tdep.c:
3742         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3743         (sparc64_linux_handle_segmentation_fault): New function.
3744         (sparc64_linux_init_abi): Register
3745         sparc64_linux_handle_segmentation_fault
3746         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3747         (sparc64_addr_bits_remove): New function.
3748         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3749         (MAX_PROC_NAME_SIZE): New macro.
3750         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3751         (sparc64adilist): New variable.
3752         (adi_proc_list): New variable.
3753         (find_adi_info): New function.
3754         (add_adi_info): New function.
3755         (get_adi_info_proc): New function.
3756         (get_adi_info): New function.
3757         (info_adi_command): New function.
3758         (read_maps_entry): New function.
3759         (adi_available): New function.
3760         (adi_normalize_address): New function.
3761         (adi_align_address): New function.
3762         (adi_convert_byte_count): New function.
3763         (adi_tag_fd): New function.
3764         (adi_is_addr_mapped): New function.
3765         (adi_read_versions): New function.
3766         (adi_write_versions): New function.
3767         (adi_print_versions): New function.
3768         (do_examine): New function.
3769         (do_assign): New function.
3770         (adi_examine_command): New function.
3771         (adi_assign_command): New function.
3772         (_initialize_sparc64_adi_tdep): New function.
3773
3774 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3775
3776         * breakpoint.c (breakpoints_info): Rename to ...
3777         (info_breakpoints_command): ... this.
3778         (watchpoints_info): Rename to ...
3779         (info_watchpoints_command): ... this.
3780         (tracepoints_info): Rename to ...
3781         (info_tracepoints_command): ... this.
3782         (_initialize_breakpoint): Adjust.
3783         * dcache.c (dcache_info): Rename to ...
3784         (info_display_command): ... this.
3785         (_initialize_dcache): Adjust.
3786         * frame.h (args_info): Rename to ...
3787         (info_args_command): ... this.
3788         (locals_info): Rename to ...
3789         (info_locals_command): ... this.
3790         * infcmd.c (nofp_registers_info): Rename to ...
3791         (info_registers_command): ... this.
3792         (float_info): Rename to ...
3793         (info_float_command): ... this.
3794         (program_info): Rename to ...
3795         (info_program_command): ... this.
3796         (all_registers_info): Rename to ...
3797         (info_all_registers_command): ... this.
3798         (vector_info): Rename to ...
3799         (info_vector_command): ... this.
3800         (float_info): Rename to ...
3801         (info_float_command): ... this.
3802         (_initialize_infcmd): Adjust.
3803         * inferior.h (term_info): Rename to ...
3804         (info_terminal_command): ... this.
3805         * inflow.c (term_info): Rename to ...
3806         (info_terminal_command): ... this.
3807         (_initialize_inflow): Adjust.
3808         * infrun.c (signals_info): Rename to ...
3809         (info_signals_command): ... this.
3810         (_initialize_infrun): Adjust.
3811         * objc-lang.c (classes_info): Rename to ...
3812         (info_classes_command): ... this.
3813         (selectors_info): Rename to ...
3814         (info_selectors_command): ... this.
3815         (_initialize_objc_language): Adjust.
3816         * printcmd.c (sym_info): Rename to ...
3817         (info_symbol_command): ... this.
3818         (address_info): Rename to ...
3819         (info_address_command): ... this.
3820         (display_info): Rename to ...
3821         (info_display_command): ... this.
3822         (_initialize_printcmd): Adjust.
3823         * reverse.c (bookmarks_info): Rename to ...
3824         (info_breakpoints_command): ... this.
3825         (_initialize_reverse): Adjust.
3826         * ser-go32.c (dos_info): Rename to ...
3827         (info_serial_command): ... this.
3828         (_initialize_ser_dos): Adjust.
3829         * skip.c (skip_info): Rename to ...
3830         (info_skip_command): ... this.
3831         (_initialize_step_skip): Adjust.
3832         * source.c (line_info): Rename to ...
3833         (info_line_command): ... this.
3834         (source_info): Rename to ...
3835         (info_source_command)
3836         * stack.c (frame_info): Rename to ...
3837         (info_frame_command): ... this.
3838         (locals_info): Rename to ...
3839         (info_locals_command): ... this.
3840         (args_info): Rename to ...
3841         (info_args_command): ... this.
3842         (_initialize_stack): Adjust.
3843         * symtab.c (sources_info): Rename to ...
3844         (info_sources_command): ... this.
3845         (variables_info): Rename to ...
3846         (info_variables_command): ... this.
3847         (functions_info): Rename to ...
3848         (info_functions_command): ... this.
3849         (types_info): Rename to ...
3850         (info_types_command): ... this.
3851         (_initialize_symtab): Adjust.
3852         * target.c (target_info): Rename to ...
3853         (info_target_command): ... this.
3854         (initialize_targets): Adjust.
3855         * tracepoint.c (tvariables_info): Rename to ...
3856         (info_tvariables_command): ... this.
3857         (scope_info): Rename to ...
3858         (info_scope_command): ... this.
3859         (trace_dump_actions): Adjust.
3860         (_initialize_tracepoint): Adjust.
3861
3862 2017-08-22  Tom Tromey  <tom@tromey.com>
3863
3864         * breakpoint.h (install_breakpoint): Update.
3865         * breakpoint.c (add_solib_catchpoint): Update.
3866         (install_breakpoint): Change argument to a std::unique_ptr.
3867         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3868         (create_breakpoint_sal, create_breakpoint): Update.
3869         (watch_command_1, catch_exec_command_1)
3870         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3871         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3872         Return the breakpoint.
3873         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3874         (new_single_step_breakpoint): Update.
3875         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3876         std::unique_ptr.
3877         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3878         std::unique_ptr.
3879         * break-catch-sig.c (create_signal_catchpoint): Use
3880         std::unique_ptr.
3881         * ada-lang.c (create_ada_exception_catchpoint): Use
3882         std::unique_ptr.
3883
3884 2017-08-22  Tom Tromey  <tom@tromey.com>
3885
3886         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3887
3888 2017-08-22  Tom Tromey  <tom@tromey.com>
3889
3890         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3891         (lookup_partial_symbol): Update.
3892
3893 2017-08-22  Tom Tromey  <tom@tromey.com>
3894
3895         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3896         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3897         (find_and_open_source, symtab_to_fullname): Update.
3898         * psymtab.c (psymtab_to_fullname): Update.
3899
3900 2017-08-22  Tom Tromey  <tom@tromey.com>
3901
3902         * exec.c (exec_file_attach): Update.
3903         * linux-thread-db.c (try_thread_db_load): Update.
3904         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3905         * utils.c (gdb_realpath): Change return type.
3906         (gdb_realpath_keepfile): Update.
3907         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3908         (_initialize_utils): Register the new self test.
3909         * source.c (openp): Update.
3910         (find_and_open_source): Update.
3911         * nto-tdep.c (nto_find_and_open_solib): Update.
3912         * main.c (set_gdb_data_directory): Update.
3913         (captured_main_1): Update.
3914         * dwarf2read.c (dwarf2_get_dwz_file): Update
3915         (dw2_map_symbol_filenames): Update.
3916         * auto-load.c (auto_load_safe_path_vec_update): Update.
3917         (filename_is_in_auto_load_safe_path_vec): Change type of
3918         "filename_realp".
3919         (auto_load_objfile_script): Update.
3920         (file_is_auto_load_safe): Update.  Use std::string.
3921         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3922
3923 2017-08-22  Tom Tromey  <tom@tromey.com>
3924
3925         * utils.c (gdb_realpath_keepfile): Return a
3926         gdb::unique_xmalloc_ptr.
3927         * exec.c (exec_file_attach): Update.
3928         * utils.h (gdb_realpath_keepfile): Return a
3929         gdb::unique_xmalloc_ptr.
3930
3931 2017-08-22  Tom Tromey  <tom@tromey.com>
3932
3933         * compile/compile.c (compile_file_command): Use
3934         gdb::unique_xmalloc_ptr, std::string.
3935         * utils.c (gdb_abspath): Change return type.
3936         * source.c (openp): Update.
3937         * objfiles.c (allocate_objfile): Update.
3938         * main.c (set_gdb_data_directory): Update.
3939         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3940
3941 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3942
3943         * cli-cmds.c (list_commands): List actual code around more than
3944         one location.
3945
3946 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3947
3948         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3949
3950 2017-08-21  Pedro Alves  <palves@redhat.com>
3951
3952         PR gdb/19487
3953         * c-exp.y (variable production): Handle function aliases.
3954         * minsyms.c (msymbol_is_text): New function.
3955         * minsyms.h (msymbol_is_text): Declare.
3956         * symtab.c (find_function_alias_target): New function.
3957         * symtab.h (find_function_alias_target): Declare.
3958
3959 2017-08-21  Pedro Alves  <palves@redhat.com>
3960
3961         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3962         typedefs.
3963         * typeprint.c (whatis_exp): If handling "whatis", and expression
3964         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3965         typedefs here.
3966         * valops.c (value_cast): Save "to" type before resolving
3967         stubs/typedefs.  Use that type as resulting value's type.
3968
3969 2017-08-18  Tom Tromey  <tom@tromey.com>
3970             Pedro Alves  <palves@redhat.com>
3971
3972         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3973         * sol-thread.c (sol_thread_resume, sol_thread_wait)
3974         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3975         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3976         * proc-service.c (ps_xfer_memory): Use scoped_restore.
3977         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3978         (linux_get_siginfo_data): Add "thread" argument.  Use
3979         scoped_restore.
3980         * linux-nat.c (linux_child_follow_fork)
3981         (check_stopped_by_watchpoint): Use scoped_restore.
3982         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3983         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3984         (restore_inferior_ptid, save_inferior_ptid): Remove.
3985         * btrace.c (btrace_fetch): Use scoped_restore.
3986         * bsd-uthread.c (bsd_uthread_fetch_registers)
3987         (bsd_uthread_store_registers): Use scoped_restore.
3988         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3989         scoped_restore.
3990         * aix-thread.c (aix_thread_resume, aix_thread_wait)
3991         (aix_thread_xfer_partial): Use scoped_restore.
3992         * inferior.h (save_inferior_ptid): Remove.
3993
3994 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3995
3996         PR tdep/21818
3997         * arm-tdep.c (gdb_print_insn_arm): Mark
3998         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3999
4000 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4001
4002         * NEWS: Mention GDBserver's new option "--selftest".
4003         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4004         * selftest.c: Move it to common/selftest.c.
4005         * selftest.h: Move it to common/selftest.h.
4006         * selftest-arch.c (reset): New function.
4007         (tests_with_arch): Call reset.
4008
4009 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4010
4011         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4012         instead of exception_fprintf and printf_filtered.
4013
4014 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4015
4016         * selftest.c (register_self_test): Rename it to
4017         selftests::register_test.
4018         (run_self_tests): selftest::run_tests.
4019         * selftest.h: Update declarations.
4020         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4021         selftests::register_test_foreach_arch.
4022         * selftest-arch.h: Update declaration.
4023         * aarch64-tdep.c: Update.
4024         * arm-tdep.c: Likewise.
4025         * disasm-selftests.c: Likewise.
4026         * dwarf2loc.c: Likewise.
4027         * dwarf2-frame.c: Likewise.
4028         * findvar.c: Likewise.
4029         * gdbarch-selftests.c: Likewise.
4030         * maint.c (maintenance_selftest): Likewise.
4031         * regcache.c: Likewise.
4032         * rust-exp.y: Likewise.
4033         * selftest-arch.c: Likewise.
4034         * unittests/environ-selftests.c: Likewise.
4035         * unittests/function-view-selftests.c: Likewise.
4036         * unittests/offset-type-selftests.c: Likewise.
4037         * unittests/optional-selftests.c: Likewise.
4038         * unittests/scoped_restore-selftests.c: Likewise.
4039         * utils-selftests.c: Likewise.
4040
4041 2017-08-17  Pedro Alves  <palves@redhat.com>
4042
4043         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4044         local.
4045
4046 2017-08-17  Pedro Alves  <palves@redhat.com>
4047
4048         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4049         field.
4050         (reset_die_in_process): Delete, replaced by ...
4051         (process_die_scope): ... this new class.  Make it responsible for
4052         freeing cu->line_header too.
4053         (process_die): Use process_die_scope.
4054         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4055         cu->line_header_die_owner.  Don't release the line header if it's
4056         owned by the CU.
4057         (setup_type_unit_groups): Make the CU/DIE own the line header.
4058         Don't release the line header here.
4059
4060 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4061
4062         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4063
4064 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4065
4066         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4067         Single-Key mode
4068
4069 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4070
4071         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4072         mode command list.
4073
4074 2017-08-15  Stafford Horne  <shorne@gmail.com>
4075
4076         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4077
4078 2017-08-15  Stafford Horne  <shorne@gmail.com>
4079
4080         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4081
4082 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4083
4084         PR gdb/21954
4085         * infcmd.c (unset_environment_command): Use the 'clear' method on
4086         the environment instead of resetting it.
4087
4088 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4089
4090         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4091         platforms.
4092
4093 2017-08-14  Tom Tromey  <tom@tromey.com>
4094
4095         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4096         (print_binary_chars): Likewise.
4097         (BITS_IN_BYTES): Remove.
4098
4099 2017-08-14  Tom Tromey  <tom@tromey.com>
4100
4101         PR gdb/21675
4102         * valprint.c (LOW_ZERO): Change value to 034.
4103         (print_octal_chars): Add static_asserts for octal constants.
4104         * printcmd.c (print_scalar_formatted): Add 'd' case.
4105
4106 2017-08-11  Tom Tromey  <tom@tromey.com>
4107
4108         * symfile.c (add_symbol_file_command): Use std::vector.
4109
4110 2017-08-14  Tom Tromey  <tom@tromey.com>
4111
4112         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4113         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4114         std::move.
4115         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4116
4117 2017-08-11  Pedro Alves  <palves@redhat.com>
4118
4119         * infrun.c (process_event_stop_test): Adjust
4120         function_name_is_marked_for_skip call.
4121         * skip.c: Include <list>.
4122         (skiplist_entry): Make it a class with private fields, and
4123         getters/setters.
4124         (skiplist_entry_chain): Delete.
4125         (skiplist_entries): New.
4126         (skiplist_entry_count): Delete.
4127         (highest_skiplist_entry_num): New.
4128         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4129         (add_skiplist_entry): Delete.
4130         (skiplist_entry::skiplist_entry): New.
4131         (skiplist_entry::add_entry): New.
4132         (skip_file_command, skip_function): Adjust.
4133         (compile_skip_regexp): Delete.
4134         (skip_command): Don't compile regexp here.  Adjust to use
4135         skiplist_entry::add_entry.
4136         (skip_info): Adjust to use range-for and getters.
4137         (skip_enable_command, skip_disable_command): Adjust to use
4138         range-for and setters.
4139         (skip_delete_command): Adjust to use std::list.
4140         (add_skiplist_entry): Delete.
4141         (skip_file_p): Delete, refactored as ...
4142         (skiplist_entry::do_skip_file_p): ... this new method.
4143         (skip_gfile_p): Delete, refactored as ...
4144         (skiplist_entry::do_gskip_file_p): ... this new method.
4145         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4146         (skiplist_entry::skip_function_p): ... this new method.
4147         (function_name_is_marked_for_skip): Now returns bool, and takes
4148         the function sal by const reference.  Adjust to use range-for and
4149         skiplist_entry methods.
4150         (_initialize_step_skip): Remove references to
4151         skiplist_entry_chain, skiplist_entry_count.
4152         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4153         takes the function sal by const reference.
4154
4155 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4156
4157         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4158         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4159         (dwarf2_frame_cache):
4160         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4161         RETURN_MASK_ALL and set *this_case to NULL.
4162         * frame-unwind.h: Update comments.
4163
4164 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4165
4166         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4167         (dwarf2_frame_state_copy_regs): Remove.
4168         (dwarf2_frame_state_free_regs): Remove.
4169         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4170         (dwarf2_restore_rule): Call method .alloc_regs instead of
4171         dwarf2_frame_state_alloc_regs.
4172         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4173         constructor.  Call std::move.
4174         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4175         (dwarf2_frame_cache): Likewise.
4176
4177         [GDB_SELF_TEST]: Include selftest.h and
4178         selftest-arch.h.
4179         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4180         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4181         execute_cfa_program_test.
4182
4183         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4184         copy ctor, assignment operator, move assignment.
4185         <alloc_regs>: New method.
4186         <swap>: New method.
4187         (struct dwarf2_frame_state): Delete dtor.
4188         (dwarf2_frame_state_alloc_regs): Remove declaration.
4189         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4190         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4191
4192 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4193
4194         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4195         (dwarf2_frame_state::dwarf2_frame_state): New.
4196         (dwarf2_frame_state::~dwarf2_frame_state): New.
4197         (dwarf2_fetch_cfa_info): Update.
4198         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4199         rather than a pointer.  Update code.
4200         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4201         dtor.
4202         <data_align, code_align, retaddr_column>: Change them to const.
4203         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4204         to bool.
4205
4206 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4207
4208         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4209         <loc.exp>: New field.
4210         * dwarf2-frame.c (execute_cfa_program): Update.
4211         (dwarf2_frame_prev_register): Update.
4212
4213 2017-08-10  Pedro Alves  <palves@redhat.com>
4214
4215         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4216
4217 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4218
4219         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4220         (fbsd_pending_children): Use std::list.
4221         (fbsd_remember_child): Likewise.
4222         (fbsd_is_child_pending): Likewise.
4223         (fbsd_pending_vfork_done): Use std::forward_list.
4224         (fbsd_add_vfork_done): Likewise.
4225         (fbsd_is_vfork_done_pending): Likewise.
4226         (fbsd_next_vfork_done): Likewise.
4227
4228 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4229
4230         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4231         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4232         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4233         for `mapfilename'.
4234         (fbsd_xfer_partial): Use gdb::byte_vector.
4235         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4236
4237 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4238
4239         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4240         "filestuff.h".
4241         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4242
4243 2017-08-09  Tom Tromey  <tom@tromey.com>
4244
4245         * skip.c (skiplist_entry): New constructor.
4246         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4247         (skiplist_entry::file_is_glob): Now bool.
4248         (skiplist_entry::file, skiplist_entry::function): Now
4249         std::string.
4250         (make_skip_entry): Return a unique_ptr.  Use new.
4251         (free_skiplist_entry, free_skiplist_entry_cleanup)
4252         (make_free_skiplist_entry_cleanup): Remove.
4253         (skip_command, skip_disable_command, add_skiplist_entry)
4254         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4255         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4256         (function_name_is_marked_for_skip): Update.
4257         (skip_delete_command): Update.  Use delete.
4258
4259 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4260
4261         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4262         (aarch64_linux_core_read_description): New function.
4263         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4264
4265 2017-08-09  Pedro Alves  <palves@redhat.com>
4266
4267         * cp-name-parser.y (cp_comp_to_string): Return a
4268         gdb::unique_xmalloc_ptr<char>.
4269         * cp-support.c (replace_typedefs_qualified_name)
4270         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4271         (cp_canonicalize_string_full): Use op= instead of explicit
4272         convertion.
4273         (cp_class_name_from_physname, method_name_from_physname)
4274         (cp_func_name, cp_remove_params): Adjust to use
4275         gdb::unique_xmalloc_ptr<char>.
4276         * cp-support.h (cp_comp_to_string): Return a
4277         gdb::unique_xmalloc_ptr<char>.
4278         * python/py-type.c (typy_lookup_type): Adjust to use
4279         gdb::unique_xmalloc_ptr<char>.
4280
4281 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4282
4283         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4284
4285 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4286             Yao Qi  <yao.qi@linaro.org>
4287
4288         * cp-support.c (cp_canonicalize_string_full): Use
4289         gdb::unique_xmalloc_ptr<char>.
4290         (cp_canonicalize_string): Likewise.
4291
4292 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4293
4294         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4295         * regformats/i386/amd64-avx-avx512.dat: Remove.
4296         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4297         * regformats/i386/amd64-avx-mpx.dat:Remove.
4298         * regformats/i386/amd64-avx.dat: Remove.
4299         * regformats/i386/amd64-mpx.dat: Remove.
4300         * regformats/i386/i386-avx-avx512.dat: Remove.
4301         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4302         * regformats/i386/i386-avx-mpx.dat: Remove.
4303         * regformats/i386/i386-mmx.dat: Remove.
4304         * regformats/i386/i386-mpx.dat: Remove.
4305
4306 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4307
4308         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4309         * amd64-tdep.c: Don't include features/i386/x32*.c.
4310         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4311         functions.
4312         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4313         and i386/x32-avx-avx512.
4314         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4315         and i386/x32.xml.
4316         * features/i386/x32-avx-avx512.c: Removed.
4317         * features/i386/x32-avx-avx512.xml: Removed.
4318         * features/i386/x32-avx.c: Removed.
4319         * features/i386/x32-avx.xml: Removed.
4320         * features/i386/x32.c: Removed.
4321         * features/i386/x32.xml: Removed.
4322         * regformats/i386/x32-avx-avx512.dat: Removed.
4323         * regformats/i386/x32-avx.dat: Removed.
4324         * regformats/i386/x32.dat: Removed.
4325
4326 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4327
4328         PR breakpoints/21886
4329         * mem-break.c (default_memory_insert_breakpoint): Use
4330         `->placed_address' rather than `->reqstd_address' for the
4331         breakpoint location.
4332
4333 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4334
4335         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4336         assertions.
4337
4338 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4339
4340         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4341         a union of `tdep_info', `tdesc_data' and `id'.
4342         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4343         rather than `info.tdep_info'.
4344         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4345         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4346         * i386-tdep.c (i386_gdbarch_init): Likewise.
4347         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4348         * mips-tdep.c (mips_gdbarch_init): Likewise.
4349         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4350         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4351         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4352         `info.tdep_info'.
4353         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4354         `info.tdep_info'.
4355         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4356         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4357         `info.tdep_info'.
4358         * spu-tdep.c (spu_gdbarch_init): Likewise.
4359         * gdbarch.h: Regenerate.
4360
4361 2017-08-07  Leszek Swirski  <leszeks@google.com>
4362
4363         PR symtab/20899
4364         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4365
4366 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4367
4368         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4369         (gdbsim_open): Rename gdb_argv args object to argv.
4370
4371 2017-08-05  Tom Tromey  <tom@tromey.com>
4372
4373         * compile/compile-object-load.c (compile_object_load): Use
4374         gdb::unique_xmalloc_ptr.
4375         * cli/cli-dump.c (scan_filename): Rename from
4376         scan_filename_with_cleanup.  Change return type.
4377         (scan_expression): Rename from scan_expression_with_cleanup.
4378         Change return type.
4379         (dump_memory_to_file, dump_value_to_file, restore_command):
4380         Use gdb::unique_xmalloc_ptr.  Update.
4381         * cli/cli-cmds.c (find_and_open_script): Use
4382         gdb::unique_xmalloc_ptr.
4383         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4384         * symmisc.c (maintenance_print_symbols)
4385         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4386         * symfile.c (symfile_bfd_open, generic_load)
4387         (add_symbol_file_command, remove_symbol_file_command): Use
4388         gdb::unique_xmalloc_ptr.
4389         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4390         * psymtab.c (maintenance_print_psymbols): Use
4391         gdb::unique_xmalloc_ptr.
4392         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4393         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4394         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4395         (reload_shared_libraries_1): Likewise.
4396
4397 2017-08-05  Tom Tromey  <tom@tromey.com>
4398
4399         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4400         (rust_op_vector, rust_set_vector): New typedefs.
4401         (current_parser): New global.
4402         (work_obstack): Change to pointer type.  Update all users.
4403         (rust_ast, pstate): Remove globals.
4404         (struct rust_parser): New.
4405         (%union) <params, field_inits>: Change type.
4406         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4407         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4408         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4409         (convert_params_to_types, convert_params_to_expression): Change
4410         type of "params".
4411         (ast_string): Change type of "fields".
4412         (rust_parse): Make a rust_parser.  Remove cleanups.
4413         (rust_lex_tests): Make and install an auto_obstack.
4414
4415 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4416
4417         * configure.srv (ipa_x32_linux_regobj): New.
4418         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4419         instead of X86_TDESC_AVX512.
4420         (initialize_low_tracepoint): Call
4421         init_registers_x32_avx_avx512_linux.
4422
4423 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4424
4425         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4426
4427 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4428
4429         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4430
4431 2017-08-03  Tom Tromey  <tom@tromey.com>
4432
4433         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4434         Remove.
4435         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4436
4437 2017-08-03  Tom Tromey  <tom@tromey.com>
4438
4439         * python/py-param.c (compute_enum_values): Use gdb_argv.
4440
4441 2017-08-03  Tom Tromey  <tom@tromey.com>
4442
4443         * utils.h (struct gdb_argv_deleter): New.
4444         (gdb_argv): New class.
4445         * utils.c (gdb_argv::reset): New method.
4446         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4447         * tracefile.c (tsave_command): Use gdb_argv.
4448         * top.c (new_ui_command): Use gdb_argv.
4449         * symmisc.c (maintenance_print_symbols)
4450         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4451         * symfile.c (symbol_file_command, generic_load)
4452         (remove_symbol_file_command): Use gdb_argv.
4453         * stack.c (backtrace_command): Use gdb_argv.
4454         * source.c (add_path, show_substitute_path_command)
4455         (unset_substitute_path_command, set_substitute_path_command):
4456         Use gdb_argv.
4457         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4458         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4459         * remote.c (extended_remote_run, remote_put_command)
4460         (remote_get_command, remote_delete_command): Use gdb_argv.
4461         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4462         (gdbsim_open): Use gdb_argv.
4463         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4464         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4465         * procfs.c (procfs_info_proc): Use gdb_argv.
4466         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4467         * infrun.c (handle_command): Use gdb_argv.
4468         * inferior.c (add_inferior_command, clone_inferior_command):
4469         Use gdb_argv.
4470         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4471         * exec.c (exec_file_command): Use gdb_argv.
4472         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4473         * compile/compile.c (build_argc_argv): Use gdb_argv.
4474
4475 2017-08-03  Tom Tromey  <tom@tromey.com>
4476
4477         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4478
4479 2017-08-03  Tom Tromey  <tom@tromey.com>
4480
4481         * python/python.c (compute_python_string): Return std::string.
4482         (gdbpy_eval_from_control_command): Update.
4483         (do_start_initialization): Use std::string.
4484         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4485         xstrprintf.
4486         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4487         xstrprintf.
4488
4489 2017-08-03  Tom Tromey  <tom@tromey.com>
4490
4491         * top.h (do_restore_instream_cleanup): Remove.
4492         * top.c (do_restore_instream_cleanup): Remove.
4493         (read_command_file): Use scoped_restore.
4494         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4495
4496 2017-08-03  Tom Tromey  <tom@tromey.com>
4497
4498         * cli/cli-script.c (execute_user_command)
4499         (execute_control_command): Use scoped_restore.
4500
4501 2017-08-03  Tom Tromey  <tom@tromey.com>
4502
4503         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4504         (execute_user_command): Remove user_call_depth; use
4505         user_args_stack's size instead.
4506
4507 2017-08-03  Tom Tromey  <tom@tromey.com>
4508
4509         * top.h (in_user_command): Remove.
4510         * top.c (in_user_command): Remove.
4511         * cli/cli-script.c (do_restore_user_call_depth)
4512         (execute_user_command): Update.
4513
4514 2017-08-03  Tom Tromey  <tom@tromey.com>
4515
4516         * valops.c (search_struct_method): Use gdb::byte_vector.
4517         * valarith.c (value_concat): Use std::vector.
4518         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4519         (simple_search_memory): Likewise.
4520         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4521         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4522         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4523         * elfread.c (elf_rel_plt_read): Use std::string.
4524         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4525         * cli/cli-dump.c (restore_section_callback): Use
4526         gdb::byte_vector.
4527
4528 2017-08-03  Tom Tromey  <tom@tromey.com>
4529
4530         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4531
4532 2017-08-03  Tom Tromey  <tom@tromey.com>
4533
4534         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4535         (tui_register_format): Use scoped_restore.
4536
4537 2017-08-03  Tom Tromey  <tom@tromey.com>
4538
4539         * reverse.c (exec_direction_default): Remove.
4540         (exec_reverse_once): Use scoped_restore.
4541         * remote.c (restore_remote_timeout): Remove.
4542         (remote_flash_erase, remote_flash_write, remote_flash_done)
4543         (readchar, remote_serial_write): Use scoped_restore.
4544         * cli/cli-script.c (struct source_cleanup_lines_args)
4545         (source_cleanup_lines): Remove.
4546         (script_from_file): Use scoped_restore.
4547         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4548         (source_command): Use scoped_restore.
4549
4550 2017-08-03  Tom Tromey  <tom@tromey.com>
4551
4552         * utils.h (make_cleanup_free_so): Remove.
4553         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4554         * solist.h (struct so_deleter): New.
4555         (so_list_up): New typedef.
4556         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4557
4558 2017-08-03  Tom Tromey  <tom@tromey.com>
4559
4560         * utils.h (make_cleanup_restore_current_language): Remove.
4561         * utils.c (do_restore_current_language)
4562         (make_cleanup_restore_current_language): Remove.
4563         * parse.c (parse_exp_in_context_1)
4564         (parse_expression_with_language): Use
4565         scoped_restore_current_language.
4566         * mi/mi-main.c (mi_cmd_execute): Use
4567         scoped_restore_current_language.
4568         * language.h (scoped_restore_current_language): New class.
4569
4570 2017-08-03  Tom Tromey  <tom@tromey.com>
4571
4572         * compile/compile.c (cleanup_unlink_file): Remove.
4573         (compile_to_object): Use gdb::unlinker.
4574         (eval_compile_command): Likewise.
4575
4576 2017-08-03  Tom Tromey  <tom@tromey.com>
4577
4578         * utils.h (make_cleanup_fclose): Remove.
4579         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4580
4581 2017-08-03  Tom Tromey  <tom@tromey.com>
4582
4583         * top.c (open_terminal_stream): Return gdb_file_up.
4584         (new_ui_command): Update.
4585
4586 2017-08-03  Tom Tromey  <tom@tromey.com>
4587
4588         * source.c (print_source_lines_base, forward_search_command)
4589         (reverse_search_command): Use gdb_file_up.
4590
4591 2017-08-03  Tom Tromey  <tom@tromey.com>
4592
4593         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4594
4595 2017-08-03  Tom Tromey  <tom@tromey.com>
4596
4597         * cli/cli-cmds.c (find_and_open_script): Change return type.
4598         Remove "streamp" and "full_path" parameters.
4599         (source_script_with_search): Update.
4600         * auto-load.c (source_script_file): Update.
4601         * cli/cli-cmds.h (find_and_open_script): Change type.
4602         (open_script): New struct.
4603
4604 2017-08-03  Tom Tromey  <tom@tromey.com>
4605
4606         * xml-support.c (xml_fetch_content_from_file): Update.
4607         * ui-file.c (stdio_file::open): Update.
4608         * tracefile-tfile.c (tfile_start): Update.
4609         * remote.c (remote_file_put, remote_file_get): Update.
4610         * nat/linux-procfs.c (linux_proc_get_int)
4611         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4612         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4613         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4614         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4615         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4616         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4617         * linux-nat.c (linux_proc_pending_signals): Update.
4618         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4619         (file_closer): Remove.
4620         * compile/compile.c (compile_to_object): Update.
4621         * common/filestuff.h (struct gdb_file_deleter): New.
4622         (gdb_file_up): New typedef.
4623         (gdb_fopen_cloexec): Change return type.
4624         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4625         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4626         (dump_binary_file, restore_binary_file): Update.
4627         * auto-load.c (auto_load_objfile_script_1): Update.
4628
4629 2017-08-03  Tom Tromey  <tom@tromey.com>
4630
4631         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4632         (info_static_tracepoint_markers_command): Likewise.
4633         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4634         * skip.c (skip_info): Use ui_out_emit_table.
4635         * progspace.c (print_program_space): Use ui_out_emit_table.
4636         * osdata.c (info_osdata): Use ui_out_emit_table.
4637         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4638         ui_out_emit_table.
4639         * linux-thread-db.c (info_auto_load_libthread_db): Use
4640         ui_out_emit_table.
4641         * inferior.c (print_inferior): Use ui_out_emit_table.
4642         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4643         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4644         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4645         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4646         * ui-out.h (class ui_out_emit_table): New.
4647
4648 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4649
4650         * mips-tdep.c (mips_fpu_type_str): New function.
4651         (mips_dump_tdep): Call it.
4652
4653 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4654
4655         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4656         `->mips_fpu_type'.
4657
4658 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4659
4660         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4661
4662 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4663
4664         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4665
4666 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4667
4668         * cli/cli-cmds.c (maintenancechecklist): New variable.
4669         * gdbcmd.h (maintenancechecklist): Declare it.
4670         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4671         Call i386_linux_read_description with different masks.
4672         * maint.c (maintenance_check_command): New function.
4673         (_initialize_maint_cmds): Call add_prefix_cmd.
4674         * target-descriptions.c (tdesc_reg): override operator != and ==.
4675         (tdesc_type): Likewise.
4676         (tdesc_feature): Likewise.
4677         (target_desc): Likewise.
4678         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4679         (maintenance_check_xml_descriptions): New function.
4680         (_initialize_target_descriptions) Add command "xml-descriptions".
4681         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4682
4683 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4684
4685         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4686         Include features/i386/32bit-*.c.
4687         (i386_linux_read_description): Generate target description if it
4688         doesn't exist.
4689         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4690         functions.
4691         * features/i386/32bit-linux.c: Re-generated.
4692         * features/i386/32bit-sse.c: Likewise.
4693         * target-descriptions.c (print_c_feature::visit): Print code to
4694         set register number if needed.
4695         (print_c_feature) <m_next_regnum>: New field.
4696
4697 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4698
4699         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4700         (FEATURE_XMLFILES): New.
4701         (FEATURE_CFILES): New.
4702         New rules.
4703         (clean-cfiles): Remove generated c files.
4704         * features/i386/32bit-avx.c: Generated.
4705         * features/i386/32bit-avx512.c: Generated.
4706         * features/i386/32bit-core.c: Generated.
4707         * features/i386/32bit-linux.c: Generated.
4708         * features/i386/32bit-mpx.c: Generated.
4709         * features/i386/32bit-pkeys.c: Generated.
4710         * features/i386/32bit-sse.c: Generated.
4711         * target-descriptions.c: Include algorithm.
4712         (tdesc_element_visitor): Add method visit_end.
4713         (print_c_tdesc): Implement visit_end.
4714         (print_c_tdesc:: m_filename_after_features): Move it to
4715         protected.
4716         (print_c_feature): New class.
4717         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4718         name starts with "i386/32bit-".
4719
4720 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4721
4722         * target-descriptions.c (tdesc_element_visitor): New class.
4723         (tdesc_element): New class.
4724         (tdesc_reg): Inherit from tdesc_element.
4725         (tdesc_reg::accept): New function.
4726         (tdesc_type): Inherit from tdesc_element.
4727         (tdesc_type::accept): New function.
4728         (tdesc_feature): Inherit from tdesc_element.
4729         (tdesc_feature::accept): New function.
4730         (target_desc): Inherit from tdesc_element.
4731         (target_desc::target_desc): New.
4732         (target_desc::~target_desc): New.
4733         (target_desc::accept): New.
4734         (allocate_target_description): Use new.
4735         (free_target_description): Use delete.
4736         (print_c_tdesc): New class.
4737         (maint_print_c_tdesc_cmd): Adjust.
4738
4739         * features/aarch64.c: Re-generated.
4740         * features/arc-arcompact.c: Re-generated.
4741         * features/arc-v2.c: Re-generated.
4742         * features/arm/arm-with-iwmmxt.c: Re-generated.
4743         * features/arm/arm-with-m.c: Re-generated.
4744         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4745         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4746         * features/arm/arm-with-neon.c: Re-generated.
4747         * features/arm/arm-with-vfpv2.c: Re-generated.
4748         * features/arm/arm-with-vfpv3.c: Re-generated.
4749         * features/i386/amd64-avx-avx512.c: Re-generated.
4750         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4751         * features/i386/amd64-avx.c: Re-generated.
4752         * features/i386/amd64-avx-linux.c: Re-generated.
4753         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4754         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4755         * features/i386/amd64-avx-mpx.c: Re-generated.
4756         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4757         * features/i386/amd64.c: Re-generated.
4758         * features/i386/amd64-linux.c: Re-generated.
4759         * features/i386/amd64-mpx.c: Re-generated.
4760         * features/i386/amd64-mpx-linux.c: Re-generated.
4761         * features/i386/i386-avx-avx512.c: Re-generated.
4762         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4763         * features/i386/i386-avx.c: Re-generated.
4764         * features/i386/i386-avx-linux.c: Re-generated.
4765         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4766         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4767         * features/i386/i386-avx-mpx.c: Re-generated.
4768         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4769         * features/i386/i386.c: Re-generated.
4770         * features/i386/i386-linux.c: Re-generated.
4771         * features/i386/i386-mmx.c: Re-generated.
4772         * features/i386/i386-mmx-linux.c: Re-generated.
4773         * features/i386/i386-mpx.c: Re-generated.
4774         * features/i386/i386-mpx-linux.c: Re-generated.
4775         * features/i386/x32-avx-avx512.c: Re-generated.
4776         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4777         * features/i386/x32-avx.c: Re-generated.
4778         * features/i386/x32-avx-linux.c: Re-generated.
4779         * features/i386/x32.c: Re-generated.
4780         * features/i386/x32-linux.c: Re-generated.
4781         * features/microblaze.c: Re-generated.
4782         * features/microblaze-with-stack-protect.c: Re-generated.
4783         * features/mips64-dsp-linux.c: Re-generated.
4784         * features/mips64-linux.c: Re-generated.
4785         * features/mips-dsp-linux.c: Re-generated.
4786         * features/mips-linux.c: Re-generated.
4787         * features/nds32.c: Re-generated.
4788         * features/nios2.c: Re-generated.
4789         * features/nios2-linux.c: Re-generated.
4790         * features/rs6000/powerpc-32.c: Re-generated.
4791         * features/rs6000/powerpc-32l.c: Re-generated.
4792         * features/rs6000/powerpc-403.c: Re-generated.
4793         * features/rs6000/powerpc-403gc.c : Re-generated.
4794         * features/rs6000/powerpc-405.c: Re-generated.
4795         * features/rs6000/powerpc-505.c: Re-generated.
4796         * features/rs6000/powerpc-601.c: Re-generated.
4797         * features/rs6000/powerpc-602.c: Re-generated.
4798         * features/rs6000/powerpc-603.c: Re-generated.
4799         * features/rs6000/powerpc-604.c: Re-generated.
4800         * features/rs6000/powerpc-64.c: Re-generated.
4801         * features/rs6000/powerpc-64l.c: Re-generated.
4802         * features/rs6000/powerpc-7400.c: Re-generated.
4803         * features/rs6000/powerpc-750.c: Re-generated.
4804         * features/rs6000/powerpc-860.c: Re-generated.
4805         * features/rs6000/powerpc-altivec32.c: Re-generated.
4806         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4807         * features/rs6000/powerpc-altivec64.c: Re-generated.
4808         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4809         * features/rs6000/powerpc-cell32l.c: Re-generated.
4810         * features/rs6000/powerpc-cell64l.c: Re-generated.
4811         * features/rs6000/powerpc-e500.c: Re-generated.
4812         * features/rs6000/powerpc-e500l.c: Re-generated.
4813         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4814         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4815         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4816         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4817         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4818         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4819         * features/rs6000/powerpc-vsx32.c: Re-generated.
4820         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4821         * features/rs6000/powerpc-vsx64.c: Re-generated.
4822         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4823         * features/rs6000/rs6000.c: Re-generated.
4824         * features/s390-linux32.c: Re-generated.
4825         * features/s390-linux32v1.c: Re-generated.
4826         * features/s390-linux32v2.c: Re-generated.
4827         * features/s390-linux64.c: Re-generated.
4828         * features/s390-linux64v1.c: Re-generated.
4829         * features/s390-linux64v2.c: Re-generated.
4830         * features/s390-te-linux64.c: Re-generated.
4831         * features/s390-tevx-linux64.c: Re-generated.
4832         * features/s390-vx-linux64.c: Re-generated.
4833         * features/s390x-linux64.c: Re-generated.
4834         * features/s390x-linux64v1.c: Re-generated.
4835         * features/s390x-linux64v2.c: Re-generated.
4836         * features/s390x-te-linux64.c: Re-generated.
4837         * features/s390x-tevx-linux64.c: Re-generated.
4838         * features/s390x-vx-linux64.c: Re-generated.
4839         * features/sparc/sparc32-solaris.c: Re-generated.
4840         * features/sparc/sparc64-solaris.c: Re-generated.
4841         * features/tic6x-c62x.c: Re-generated.
4842         * features/tic6x-c62x-linux.c: Re-generated.
4843         * features/tic6x-c64x.c: Re-generated.
4844         * features/tic6x-c64x-linux.c: Re-generated.
4845         * features/tic6x-c64xp.c: Re-generated.
4846         * features/tic6x-c64xp-linux.c: Re-generated.
4847
4848 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4849
4850         * i386-linux-tdep.c (i386_linux_read_description): New function.
4851         (i386_linux_core_read_description): Call
4852         i386_linux_read_description.
4853         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4854         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4855         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4856         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4857         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4858         * x86-linux-nat.c (x86_linux_read_description): Call
4859         i386_linux_read_description.
4860
4861 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4862
4863         * NEWS: Mention it.
4864         * features/Makefile (%.c: %.xml): Pass the xml file name to
4865         command "maint print c-tdesc".
4866         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4867         name from 'arg'.
4868
4869 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4870
4871         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4872         in-class initialization.
4873         (tdesc_create_feature): Call new instead of XCNEW.
4874         (free_target_description): Ue delete.
4875
4876 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4877
4878         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4879
4880 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4881
4882         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4883         constant.
4884         (amd64_x32_init_abi): Likewise.
4885         * amd64-tdep.h (amd64_init_abi): Update declaration.
4886         (amd64_x32_init_abi): Likewise.
4887
4888 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4889
4890         PR tdep/21717
4891         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4892         condition for FPSCR.
4893         (arm_linux_store_inferior_registers): Likewise.
4894
4895 2017-07-22  Tom Tromey  <tom@tromey.com>
4896
4897         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4898         <syscalls_counts>: Now a std::vector.
4899         (get_catch_syscall_inferior_data): Use "new".
4900         (catch_syscall_inferior_data_cleanup): Use "delete".
4901         (insert_catch_syscall, remove_catch_syscall)
4902         (clear_syscall_counts): Update.
4903
4904 2017-07-22  Tom Tromey  <tom@tromey.com>
4905
4906         * break-catch-syscall.c (syscall_catchpoint)
4907         <syscalls_to_be_caught>: Now a std::vector<int>
4908         (~syscall_catchpoint): Remove.
4909         (insert_catch_syscall, remove_catch_syscall)
4910         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4911         (print_mention_catch_syscall, print_recreate_catch_syscall):
4912         Update.
4913         (create_syscall_event_catchpoint): Change type of "filter"
4914         parameter.
4915         (catch_syscall_split_args): Return a std::vector.
4916         (catch_syscall_command_1, catching_syscall_number_1): Update.
4917
4918 2017-07-22  Tom Tromey  <tom@tromey.com>
4919
4920         * break-catch-throw.c (struct exception_catchpoint)
4921         <exception_rx>: Now a std::string.
4922         (~exception_catchpoint): Remove.
4923         (print_one_detail_exception_catchpoint): Update.
4924         (handle_gnu_v3_exceptions): Change type of except_rx.
4925         (extract_exception_regexp): Return a std::string.
4926         (catch_exception_command_1): Update.
4927
4928 2017-07-22  Tom Tromey  <tom@tromey.com>
4929
4930         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4931         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4932         std::vector.
4933         <catch_all>: Now a bool.
4934         (~signal_catchpoint): Remove.
4935         (signal_catchpoint_insert_location)
4936         (signal_catchpoint_remove_location)
4937         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4938         (signal_catchpoint_print_mention)
4939         (signal_catchpoint_print_recreate)
4940         (signal_catchpoint_explains_signal): Update.
4941         (create_signal_catchpoint): Change type of "filter" and
4942         "catch_all".
4943         (catch_signal_split_args): Return a std::vector.  Change type of
4944         "catch_all".
4945         (catch_signal_command): Update.
4946
4947 2017-07-20  Pedro Alves  <palves@redhat.com>
4948
4949         * ada-lang.c (ada_language_defn): Make extern.
4950         (_initialize_ada_language): Remove add_language call.
4951         * c-lang.c (c_language_defn, cplus_language_defn)
4952         (asm_language_defn, minimal_language_defn): Make extern.
4953         (_initialize_c_language): Delete.
4954         * completer.c (compare_cstrings): Delete, moved to utils.h.
4955         * d-lang.c (d_language_defn): Make extern.
4956         (_initialize_d_language): Remove add_language calls.
4957         * defs.h (enum language): Add comment.
4958         * f-lang.c (f_language_defn): Make extern.
4959         (_initialize_f_language): Remove add_language call.
4960         * go-lang.c (go_language_defn): Make extern.
4961         (_initialize_go_language): Remove add_language call.
4962         * language.c: Include <algorithm>.
4963         (languages): Redefine as const array.
4964         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4965         (set_language_command): Handle "local".  Use for-range loop.
4966         (set_language): Remove loop.
4967         (language_enum): Rewrite.
4968         (language_def, language_str): Remove loops.
4969         (add_language): Delete.
4970         (add_set_language_command): New, based on add_languages.
4971         (skip_language_trampoline): Adjust.
4972         (local_language_defn): Delete.
4973         (language_gdbarch_post_init): Adjust.
4974         (_initialize_language): Remove add_language calls.  Call
4975         add_set_language_command.
4976         * language.h (add_language): Delete.
4977         (auto_language_defn)
4978         (unknown_language_defn, minimal_language_defn, ada_language_defn)
4979         (asm_language_defn, c_language_defn, cplus_language_defn)
4980         (d_language_defn, f_language_defn, go_language_defn)
4981         (m2_language_defn, objc_language_defn, opencl_language_defn)
4982         (pascal_language_defn, rust_language_defn): Declare.
4983         * m2-lang.c (m2_language_defn): Make extern.
4984         (_initialize_m2_language): Remove add_language call.
4985         * objc-lang.c (objc_language_defn): Make extern.
4986         (_initialize_objc_language): Remove add_language call.
4987         * opencl-lang.c (opencl_language_defn): Make extern.
4988         (_initialize_opencl_language): Remove add_language call.
4989         * p-lang.c (pascal_language_defn): Make extern.
4990         (_initialize_pascal_language): Delete.
4991         * rust-lang.c (rust_language_defn): Make extern.
4992         (_initialize_rust_language): Delete.
4993         * utils.h (compare_cstrings): New static inline function.
4994
4995 2017-07-20  Pedro Alves  <palves@redhat.com>
4996
4997         * ada-lang.c (ada_to_fixed_type_1): Adjust.
4998         (get_var_value): Constify parameters.
4999         (get_int_var_value): Change prototype.
5000         (to_fixed_range_type): Adjust.
5001         * ada-lang.h (get_int_var_value): Change prototype.
5002
5003 2017-07-20  Pedro Alves  <palves@redhat.com>
5004
5005         * dwarf2read.c (dw2_lookup_symbol): Use
5006         SYMBOL_MATCHES_SEARCH_NAME.
5007         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5008
5009 2017-07-20  Pedro Alves  <palves@redhat.com>
5010
5011         * block.c (block_iter_name_step, block_iter_name_first)
5012         (block_iter_name_next): Delete.
5013         (block_lookup_symbol_primary): Adjust to use
5014         dict_iter_match_first/dict_iter_match_next.
5015         * block.h (block_iter_name_first, block_iter_name_next): Delete
5016         declarations.
5017         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5018         dict_iter_match_first/dict_iter_match_next.
5019
5020 2017-07-20  Pedro Alves  <palves@redhat.com>
5021
5022         * cp-support.c (cp_find_first_component_aux): Add missing case for
5023         end of string.
5024
5025 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5026
5027         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5028         of dwo_cu's dwo_file.
5029
5030 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5031
5032         * remote.c (store_registers_using_G): Remove one line comment.
5033
5034 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5035
5036         * regcache.c (regcache_cpy): Simplify it.
5037         (regcache::cpy_no_passthrough): Remove it.
5038         * regcache.h (cpy_no_passthrough): Remove it.
5039         (regcache_dup, regcache_cpy): Update comments.
5040
5041 2017-07-18  Pedro Alves  <palves@redhat.com>
5042
5043         * remote-sim.c (sim_command_completer): Adjust to work with a
5044         completion_tracker instead of a VEC.
5045
5046 2017-07-17  Pedro Alves  <palves@redhat.com>
5047
5048         * completer.c (complete_source_filenames): New function.
5049         (complete_address_and_linespec_locations): New function.
5050         (location_completer): Use complete_address_and_linespec_locations.
5051         (completion_tracker::build_completion_result): Honor the tracker's
5052         request to suppress append.
5053         * completer.h (completion_tracker::suppress_append_ws)
5054         (completion_tracker::set_suppress_append_ws): New methods.
5055         (completion_tracker::m_suppress_append_ws): New field.
5056         (complete_source_filenames): New declaration.
5057         * linespec.c (linespec_complete_what): New.
5058         (struct ls_parser) <complete_what, completion_word,
5059         completion_quote_char, completion_quote_end, completion_tracker>:
5060         New fields.
5061         (string_find_incomplete_keyword_at_end): New.
5062         (linespec_lexer_lex_string): Record quote char.  If in completion
5063         mode, don't throw.
5064         (linespec_lexer_consume_token): Advance the completion word point.
5065         (linespec_lexer_peek_token): Save/restore completion info.
5066         (save_stream_and_consume_token): New.
5067         (set_completion_after_number): New.
5068         (linespec_parse_basic): Set what to complete next depending on
5069         token.  Handle function and label completions specially.
5070         (parse_linespec): Disable objc shortcut in completion mode.  Set
5071         what to complete next depending on token type.  Skip keyword if in
5072         completion mode.
5073         (complete_linespec_component, linespec_complete): New.
5074         * linespec.h (linespec_complete): Declare.
5075
5076 2017-07-17  Pedro Alves  <palves@redhat.com>
5077
5078         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5079         Handle 'operator<' / 'operator<<'.
5080
5081 2017-07-17  Pedro Alves  <palves@redhat.com>
5082
5083         * completer.c (collect_explicit_location_matches): Handle
5084         MATCH_LABEL.
5085         (convert_explicit_location_to_linespec): New, factored out from
5086         ...
5087         (convert_explicit_location_to_sals): ... this.
5088         (complete_label): New.
5089         (linespec_complete_label, find_label_symbols_in_block): New.
5090         (find_label_symbols): Add completion_mode parameter and adjust to
5091         call find_label_symbols_in_block.
5092         * linespec.h (linespec_complete_label): Declare.
5093
5094 2017-07-17  Pedro Alves  <palves@redhat.com>
5095
5096         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5097         complete_symbol_mode parameter.
5098         * cli/cli-cmds.c (complete_command): Get the completion result out
5099         of the handle_brkchars tracker if used a custom word point.
5100         * completer.c: Include "linespec.h".
5101         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5102         (advance_to_expression_complete_word_point): New.
5103         (completion_tracker::completes_to_completion_word): New.
5104         (complete_files_symbols): Pass down
5105         complete_symbol_mode::EXPRESSION.
5106         (explicit_options, probe_options): New.
5107         (collect_explicit_location_matches): Complete on the
5108         explictit_loc->foo instead of word.  Use
5109         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5110         keyword and options completions.
5111         (backup_text_ptr): Delete.
5112         (skip_keyword): New.
5113         (complete_explicit_location): Remove 'word' parameter.  Add
5114         language, quoted_arg_start and quoted_arg_end parameters.
5115         Rewrite, parsing left to right.
5116         (location_completer): Rewrite.
5117         (location_completer_handle_brkchars): New function.
5118         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5119         (enum complete_line_internal_reason): Adjust comments.
5120         (completion_tracker::discard_completions): New.
5121         (completer_handle_brkchars_func_for_completer): Handle
5122         location_completer.
5123         (gdb_custom_word_point_brkchars)
5124         (gdb_org_rl_basic_quote_characters): New.
5125         (gdb_completion_word_break_characters_throw)
5126         (completion_find_completion_word): Handle trackers that use a
5127         custom word point.
5128         (completion_tracker::advance_custom_word_point_by): New.
5129         (completion_tracker::build_completion_result): Don't rely on
5130         readline appending the quote char.
5131         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5132         use a custom word point.
5133         (gdb_rl_attempted_completion_function): Restore
5134         rl_basic_quote_characters.
5135         * completer.h (class completion_tracker): Extend intro comment.
5136         (completion_tracker::set_quote_char)
5137         (completion_tracker::quote_char)
5138         (completion_tracker::set_use_custom_word_point)
5139         (completion_tracker::use_custom_word_point)
5140         (completion_tracker::custom_word_point)
5141         (completion_tracker::set_custom_word_point)
5142         (completion_tracker::advance_custom_word_point_by)
5143         (completion_tracker::completes_to_completion_word)
5144         (completion_tracker::discard_completions): New methods.
5145         (completion_tracker::m_quote_char)
5146         (completion_tracker::m_use_custom_word_point)
5147         (completion_tracker::m_custom_word_point): New fields.
5148         (advance_to_expression_complete_word_point): Declare.
5149         * f-lang.c (f_collect_symbol_completion_matches): Add
5150         complete_symbol_mode parameter.
5151         * language.h (struct language_defn)
5152         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5153         parameter.
5154         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5155         (linespec_complete_function): New function.
5156         (linespec_lexer_lex_keyword): Adjust.
5157         * linespec.h (linespec_keywords, linespec_complete_function): New
5158         declarations.
5159         * location.c (find_end_quote): New function.
5160         (explicit_location_lex_one): Add explicit_completion_info
5161         parameter.  Save quoting info.  Don't throw if being called for
5162         completion.  Don't handle Ada operators here.
5163         (is_cp_operator, skip_op_false_positives, first_of)
5164         (explicit_location_lex_one_function): New function.
5165         (string_to_explicit_location): Replace 'dont_throw' parameter with
5166         an explicit_completion_info pointer parameter.  Handle it.  Don't
5167         use explicit_location_lex_one to lex function names.  Use
5168         explicit_location_lex_one_function instead.
5169         * location.h (struct explicit_completion_info): New.
5170         (string_to_explicit_location): Replace 'dont_throw' parameter with
5171         an explicit_completion_info pointer parameter.
5172         * symtab.c (default_collect_symbol_completion_matches_break_on):
5173         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5174         (default_collect_symbol_completion_matches)
5175         (collect_symbol_completion_matches): Add complete_symbol_mode
5176         parameter.
5177         (collect_symbol_completion_matches_type): Pass down
5178         complete_symbol_mode::EXPRESSION.
5179         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5180         parameter.  Handle LINESPEC mode.
5181         * symtab.h (complete_symbol_mode): New.
5182         (default_collect_symbol_completion_matches_break_on)
5183         (default_collect_symbol_completion_matches)
5184         (collect_symbol_completion_matches)
5185         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5186         parameter.
5187
5188 2017-07-17  Pedro Alves  <palves@redhat.com>
5189
5190         * utils.c (enum class strncmp_iw_mode): New.
5191         (strcmp_iw): Rename to ...
5192         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5193         parameters.  Handle them.
5194         (strncmp_iw): New.
5195         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5196         * utils.h (strncmp_iw): Declare.
5197         (strcmp_iw): Move describing comments here.
5198
5199 2017-07-17  Pedro Alves  <palves@redhat.com>
5200
5201         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5202         CP_OPERATOR_STR.
5203         * c-typeprint.c (is_type_conversion_operator): Use
5204         CP_OPERATOR_STR.
5205         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5206         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5207         CP_OPERATOR_LEN.
5208         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5209         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5210         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5211         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5212         CP_OPERATOR_STR.
5213         * location.c: Include "cp-support.h".
5214         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5215         CP_OPERATOR_STR.
5216         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5217         CP_OPERATOR_LEN.
5218
5219 2017-07-17  Pedro Alves  <palves@redhat.com>
5220
5221         * cli/cli-cmds.c (complete_command): Use a completion tracker
5222         along with completion_find_completion_word for handle_brkchars
5223         phase.
5224         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5225         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5226         (struct gdb_rl_completion_word_info): New.
5227         (gdb_rl_find_completion_word): New.
5228         (completion_find_completion_word): New.
5229         * completer.h (completion_find_completion_word): Declare.
5230
5231 2017-07-17  Pedro Alves  <palves@redhat.com>
5232
5233         * ada-lang.c (symbol_completion_match): Adjust comments.
5234         (symbol_completion_add): Replace vector parameter with
5235         completion_tracker parameter.  Use it.
5236         (ada_make_symbol_completion_list): Rename to...
5237         (ada_collect_symbol_completion_matches): ... this.  Add
5238         completion_tracker parameter and use it.
5239         (ada_language_defn): Adjust.
5240         * break-catch-syscall.c (catch_syscall_completer): Adjust
5241         prototype and work with completion_tracker instead of VEC.
5242         * breakpoint.c (condition_completer): Adjust prototype and work
5243         with completion_tracker instead of VEC.
5244         * c-lang.c (c_language_defn, cplus_language_defn)
5245         (asm_language_defn, minimal_language_defn): Adjust to renames.
5246         * cli/cli-cmds.c (complete_command): Rework using
5247         completion_tracker.  Catch exceptions when completing.
5248         * cli/cli-decode.c (integer_unlimited_completer)
5249         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5250         with completion_tracker instead of VEC.
5251         * command.h (struct completion_tracker): Forward declare.
5252         (completer_ftype, completer_handle_brkchars_ftype): Change
5253         types.
5254         (complete_on_cmdlist, complete_on_enum): Adjust.
5255         * completer.c: Include <algorithm>.
5256         (struct gdb_completer_state): New.
5257         (current_completion): New global.
5258         (readline_line_completion_function): Delete.
5259         (noop_completer, filename_completer)
5260         (filename_completer_handle_brkchars, complete_files_symbols)
5261         (linespec_location_completer): Adjust to work with a
5262         completion_tracker instead of a VEC.
5263         (string_or_empty): New.
5264         (collect_explicit_location_matches): Adjust to work with a
5265         completion_tracker instead of a VEC.
5266         (explicit_location_completer): Rename to ...
5267         (complete_explicit_location): ... this and adjust to work with a
5268         completion_tracker instead of a VEC.
5269         (location_completer): Adjust to work with a completion_tracker
5270         instead of a VEC.
5271         (add_struct_fields): Adjust to work with a completion_list instead
5272         of VEC.
5273         (expression_completer): Rename to ...
5274         (complete_expression): ... this and adjust to work with a
5275         completion_tracker instead of a VEC.  Use complete_files_symbols.
5276         (expression_completer): Reimplement on top of complete_expression.
5277         (symbol_completer): Adjust to work with a completion_tracker
5278         instead of a VEC.
5279         (enum complete_line_internal_reason): Add describing comments.
5280         (complete_line_internal_normal_command): Adjust to work with a
5281         completion_tracker instead of a VEC.
5282         (complete_line_internal): Rename to ...
5283         (complete_line_internal_1): ... this and adjust to work with a
5284         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5285         handle_brkchars phase.
5286         (new_completion_tracker): Delete.
5287         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5288         complete_line_internal_1.
5289         (free_completion_tracker): Delete.
5290         (INITIAL_COMPLETION_HTAB_SIZE): New.
5291         (completion_tracker::completion_tracker)
5292         (completion_tracker::~completion_tracker): New.
5293         (maybe_add_completion): Delete.
5294         (completion_tracker::maybe_add_completion)
5295         (completion_tracker::add_completion)
5296         (completion_tracker::add_completions): New.
5297         (throw_max_completions_reached_error): Delete.
5298         (complete_line): Adjust to work with a completion_tracker instead
5299         of a VEC.  Don't create a completion_tracker_t or check for max
5300         completions here.
5301         (command_completer, command_completer_handle_brkchars)
5302         (signal_completer, reg_or_group_completer_1)
5303         (reg_or_group_completer, default_completer_handle_brkchars):
5304         Adjust to work with a completion_tracker.
5305         (gdb_completion_word_break_characters_throw): New.
5306         (gdb_completion_word_break_characters): Reimplement.
5307         (line_completion_function): Delete.
5308         (completion_tracker::recompute_lowest_common_denominator)
5309         (expand_preserving_ws)
5310         (completion_tracker::build_completion_result)
5311         (completion_result::completion_result)
5312         (completion_result::completion_result)
5313         (completion_result::~completion_result)
5314         (completion_result::completion_result)
5315         (completion_result::release_match_list, compare_cstrings)
5316         (completion_result::sort_match_list)
5317         (completion_result::reset_match_list)
5318         (gdb_rl_attempted_completion_function_throw)
5319         (gdb_rl_attempted_completion_function): New.
5320         * completer.h (completion_list, struct completion_result)
5321         (class completion_tracker): New.
5322         (complete_line): Add completion_tracker parameter.
5323         (readline_line_completion_function): Delete.
5324         (gdb_rl_attempted_completion_function): New.
5325         (noop_completer, filename_completer, expression_completer)
5326         (location_completer, symbol_completer, command_completer)
5327         (signal_completer, reg_or_group_completer): Update prototypes.
5328         (completion_tracker_t, new_completion_tracker)
5329         (make_cleanup_free_completion_tracker): Delete.
5330         (enum maybe_add_completion_enum): Delete.
5331         (maybe_add_completion): Delete.
5332         (throw_max_completions_reached_error): Delete.
5333         * corefile.c (complete_set_gnutarget): Adjust to work with a
5334         completion_tracker instead of a VEC.
5335         * cp-abi.c (cp_abi_completer): Adjust to work with a
5336         completion_tracker instead of a VEC.
5337         * d-lang.c (d_language_defn): Adjust.
5338         * disasm.c (disassembler_options_completer): Adjust to work with a
5339         completion_tracker instead of a VEC.
5340         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5341         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5342         with a completion_tracker instead of a VEC.
5343         (f_language_defn): Adjust.
5344         * go-lang.c (go_language_defn): Adjust.
5345         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5346         Adjust to work with a completion_tracker instead of a VEC.
5347         * infrun.c (handle_completer): Likewise.
5348         * interps.c (interpreter_completer): Likewise.
5349         * interps.h (interpreter_completer): Likewise.
5350         * language.c (unknown_language_defn, auto_language_defn)
5351         (local_language_defn): Adjust.
5352         * language.h (language_defn::la_make_symbol_completion_list):
5353         Rename to ...
5354         (language_defn::la_collect_symbol_completion_matches): ... this
5355         and adjust to work with a completion_tracker instead of a VEC.
5356         * m2-lang.c (m2_language_defn): Adjust.
5357         * objc-lang.c (objc_language_defn): Adjust.
5358         * opencl-lang.c (opencl_language_defn): Adjust.
5359         * p-lang.c (pascal_language_defn): Adjust.
5360         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5361         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5362         with a completion_tracker.
5363         * rust-lang.c (rust_language_defn): Adjust.
5364         * symtab.c (free_completion_list, do_free_completion_list)
5365         (return_val, completion_tracker): Delete.
5366         (completion_list_add_name, completion_list_add_symbol)
5367         (completion_list_add_msymbol, completion_list_objc_symbol)
5368         (completion_list_add_fields, add_symtab_completions): Add
5369         completion_tracker parameter and use it.
5370         (default_make_symbol_completion_list_break_on_1): Rename to...
5371         (default_collect_symbol_completion_matches_break_on): ... this.
5372         Add completion_tracker parameter and use it instead of allocating
5373         a completion tracker here.
5374         (default_make_symbol_completion_list_break_on): Delete old
5375         implementation.
5376         (default_make_symbol_completion_list): Delete.
5377         (default_collect_symbol_completion_matches): New.
5378         (make_symbol_completion_list): Delete.
5379         (collect_symbol_completion_matches): New.
5380         (make_symbol_completion_type): Rename to ...
5381         (collect_symbol_completion_matches_type): ... this.  Add
5382         completion_tracker parameter and use it instead of VEC.
5383         (make_file_symbol_completion_list_1): Rename to...
5384         (collect_file_symbol_completion_matches): ... this.  Add
5385         completion_tracker parameter and use it instead of VEC.
5386         (make_file_symbol_completion_list): Delete.
5387         (add_filename_to_list): Use completion_list instead of a VEC.
5388         (add_partial_filename_data::list): Now a completion_list.
5389         (make_source_files_completion_list): Work with a completion_list
5390         instead of a VEC.
5391         * symtab.h: Include "completer.h".
5392         (default_make_symbol_completion_list_break_on)
5393         (default_make_symbol_completion_list, make_symbol_completion_list)
5394         (make_symbol_completion_type, make_file_symbol_completion_list)
5395         (make_source_files_completion_list): Delete.
5396         (default_collect_symbol_completion_matches_break_on)
5397         (default_collect_symbol_completion_matches)
5398         (collect_symbol_completion_matches)
5399         (collect_symbol_completion_matches_type)
5400         (collect_file_symbol_completion_matches)
5401         (make_source_files_completion_list): New.
5402         * top.c (init_main): Don't install a rl_completion_entry_function
5403         hook.  Install a rl_attempted_completion_function hook instead.
5404         * tui/tui-layout.c (layout_completer): Adjust to work with a
5405         completion_tracker.
5406         * tui/tui-regs.c (tui_reggroup_completer):
5407         * tui/tui-win.c (window_name_completer, focus_completer)
5408         (winheight_completer): Adjust to work with a completion_tracker.
5409         * value.c: Include "completer.h".
5410         (complete_internalvar): Adjust to work with a completion_tracker.
5411         * value.h (complete_internalvar): Likewise.
5412
5413 2017-07-17  Pedro Alves  <palves@redhat.com>
5414
5415         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5416         renames.
5417         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5418         comments to completer_ftype's declaration.
5419         <completer_handle_brkchars>: Change type to
5420         completer_handle_brkchars_ftype.
5421         * command.h (completer_ftype): Add describing comment and give
5422         names to parameters.
5423         (completer_ftype_void): Rename to ...
5424         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5425         (set_cmd_completer_handle_brkchars): Adjust.
5426         * completer.c (filename_completer_handle_brkchars): New function.
5427         (complete_line_internal_normal_command): New function, factored
5428         out from ...
5429         (complete_line_internal): ... here.
5430         (command_completer_handle_brkchars)
5431         (default_completer_handle_brkchars)
5432         (completer_handle_brkchars_func_for_completer): New functions.
5433         * completer.h (set_gdb_completion_word_break_characters): Delete
5434         declaration.
5435         (completer_handle_brkchars_func_for_completer): New declaration.
5436         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5437         completer_handle_brkchars_func_for_completer.
5438
5439 2017-07-17  Pedro Alves  <palves@redhat.com>
5440
5441         * completer.c (symbol_completer): New function, based on
5442         make_symbol_completion_list_fn.
5443         * completer.h (symbol_completer): New declaration.
5444         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5445         * python/py-cmd.c (completers): Adjust.
5446         * symtab.c (make_symbol_completion_list_fn): Delete.
5447         * symtab.h (make_symbol_completion_list_fn): Delete.
5448         * cli/cli-decode.c (add_cmd): Adjust.
5449
5450 2017-07-17  Pedro Alves  <palves@redhat.com>
5451
5452         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5453         * dwarf2read.c: Include "filename-seen-cache.h".
5454         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5455         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5456         * filename-seen-cache.c: New file.
5457         * filename-seen-cache.h: New file.
5458         * symtab.c: Include "filename-seen-cache.h".
5459         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5460         (create_filename_seen_cache, clear_filename_seen_cache)
5461         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5462         to filename-seen-cache.h/filename-seen-cache.c.
5463         (output_source_filename, sources_info)
5464         (maybe_add_partial_symtab_filename)
5465         (make_source_files_completion_list): Adjust to use
5466         filename_seen_cache.
5467
5468 2017-07-17  Pedro Alves  <palves@redhat.com>
5469
5470         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5471         fields.
5472         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5473         dwarf2_debug_sections*)): New.
5474         (dwarf2_per_objfile::dwarf2_per_objfile(const
5475         dwarf2_per_objfile&)): Declare as deleted.
5476         (dwarf2_per_objfile::operator=): Declare as deleted.
5477         (dwarf2_per_objfile::dwarf2_per_objfile)
5478         (dwarf2_per_objfile::~dwarf2_per_objfile)
5479         (dwarf2_per_objfile::free_cached_comp_units): New.
5480         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5481         ctor.  Call dwarf2_per_objfile's ctor manually.
5482         (dwarf2_locate_sections): Deleted/refactored as ...
5483         (dwarf2_per_objfile::locate_sections): ... this new method.
5484         (free_cached_comp_units): Defer to
5485         dwarf2_per_objfile::free_cached_comp_units.
5486         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5487
5488 2017-07-14  Tom Tromey  <tom@tromey.com>
5489
5490         PR rust/21764:
5491         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5492         parameter.
5493         <UNOP_SIZEOF>: Split into separate case.
5494         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5495
5496 2017-07-14  Tom Tromey  <tom@tromey.com>
5497
5498         PR rust/21763:
5499         * symtab.c (symbol_matches_domain): Add language_rust to special
5500         case.
5501         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5502         treat LOC_TYPEDEF symbols as variables.
5503
5504 2017-07-14  Pedro Alves  <palves@redhat.com>
5505
5506         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5507         symtabs matching all symtabs with SRCFILE as file name instead of
5508         only considering the first hit, with lookup_symtab.
5509
5510 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5511
5512         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5513         operator_name parameters.
5514         (gen_expr): Update function call.
5515
5516 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5517
5518         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5519         parameter.
5520         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5521         Likewise.
5522         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5523         parameter, use agent_expr::gdbarch instead, update function
5524         calls.
5525         (locexpr_tracepoint_var_ref): Likewise.
5526         (loclist_tracepoint_var_ref): Likewise.
5527         * ax-gdb.c (gen_trace_static_fields): Likewise.
5528         (gen_traced_pop): Likewise.
5529         (gen_frame_args_address): Likewise.
5530         (gen_frame_locals_address): Likewise.
5531         (gen_var_ref): Likewise.
5532         (gen_struct_ref_recursive): Likewise.
5533         (gen_static_field): Likewise.
5534         (gen_maybe_namespace_elt): Likewise.
5535         (gen_expr): Likewise.
5536         (gen_trace_for_var): Likewise.
5537         (gen_trace_for_expr): Likewise.
5538         (gen_trace_for_return_address): Likewise.
5539
5540 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5541
5542         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5543         parameter.
5544         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5545
5546 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5547
5548         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5549         from ax, update calls.
5550         (gen_usual_arithmetic): Likewise.
5551         (gen_integral_promotions): Likewise.
5552         (gen_bitfield_ref): Likewise.
5553         (gen_primitive_field): Likewise.
5554         (gen_struct_ref_recursive): Likewise.
5555         (gen_struct_ref): Likewise.
5556         (gen_maybe_namespace_elt): Likewise.
5557         (gen_struct_elt_for_reference): Likewise.
5558         (gen_namespace_elt): Likewise.
5559         (gen_aggregate_elt_ref): Likewise.
5560         (gen_expr): Get gdbarch from ax, update calls.
5561         (gen_expr_binop_rest): Likewise.
5562
5563 2017-07-13  Pedro Alves  <palves@redhat.com>
5564
5565         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5566         as default tdesc.
5567         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5568         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5569         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5570         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5571         tdep.
5572         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5573         Get final tdesc from the tdep.
5574         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5575         default tdesc.
5576         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5577         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5578         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5579         Use it as default tdesc.
5580         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5581         down to amd_init_abi.  No longer handle fallback tdesc here.
5582         * amd64-tdep.h (tdesc_x32): Declare.
5583         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5584         parameter.
5585         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5586         as default tdesc.
5587
5588 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5589
5590         * s390-linux-tdep.c (s390_process_record): Add support for
5591         instructions new in arch12.
5592
5593 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5594
5595         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5596         PT_GETFSBASE and PT_GETGSBASE.
5597         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5598         PT_SETGSBASE.
5599
5600 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5601
5602         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5603         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5604         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5605         those rules.
5606         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5607         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5608         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5609         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5610         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5611         * features/i386/amd64.xml: Add 64bit-segments.xml.
5612         * features/i386/amd64-avx-avx512.c: Regenerated.
5613         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5614         * features/i386/amd64-avx-mpx.c: Regenerated.
5615         * features/i386/amd64-avx.c: Regenerated.
5616         * features/i386/amd64-mpx.c: Regenerated.
5617         * features/i386/amd64.c: Regenerated.
5618         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5619         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5620         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5621         * regformats/i386/amd64-avx.dat: Regenerated.
5622         * regformats/i386/amd64-mpx.dat: Regenerated.
5623         * regformats/i386/amd64.dat: Regenerated.
5624
5625 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5626
5627         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5628         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5629
5630 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5631
5632         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5633         unsetenv.
5634         * gnulib/aclocal.m4: Regenerate.
5635         * gnulib/config.in: Regenerate.
5636         * gnulib/configure: Regenerate.
5637         * gnulib/import/Makefile.am: Regenerate.
5638         * gnulib/import/Makefile.in: Regenerate.
5639         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5640         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5641         * gnulib/import/m4/environ.m4: New file.
5642         * gnulib/import/m4/setenv.m4: New file.
5643         * gnulib/import/setenv.c: New file.
5644         * gnulib/import/unsetenv.c: New file.
5645
5646 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5647
5648         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5649         address when op is DW_OP_addr.
5650
5651 2017-07-09  Tom Tromey  <tom@tromey.com>
5652
5653         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5654         check and apply to outer type.
5655
5656 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5657
5658         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5659         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5660         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5661         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5662
5663 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5664
5665         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5666
5667 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5668
5669         * corelow.c (get_core_siginfo): Remove.
5670         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5671         instead of get_core_siginfo.
5672         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5673         * gdbarch.h: Re-generate.
5674         * gdbarch.c: Re-generate.
5675         * linux-tdep.c (linux_core_xfer_siginfo): New.
5676         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5677
5678 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5679
5680         * corelow.c (thread_section_name): Move to ...
5681         * gdbcore.h (thread_section_name): ... here.
5682
5683 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5684
5685         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5686         (struct siginfo32): New.
5687         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5688         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5689         via ptrace(PT_LWPINFO).
5690
5691 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5692
5693         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5694         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5695         (fbsd_get_siginfo_type): New.
5696         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5697         (_initialize_fbsd_tdep): New.
5698
5699 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5700
5701         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5702         a singular dwo_unit*) to support multiple CUs in the same way that
5703         multiple TUs are supported.
5704         (create_cus_hash_table): Replace create_dwo_cu with a function for
5705         parsing multiple CUs from a DWO file.
5706         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5707         create_dwo_cu.
5708         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5709         htab_find, rather than comparing the signature to a singleton CU in
5710         the dwo_file.
5711
5712 2017-07-06  Pedro Alves  <palves@redhat.com>
5713
5714         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5715
5716 2017-07-04  Pedro Alves  <palves@redhat.com>
5717
5718         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5719         * gdbtypes.h (TYPE_STATIC): Delete.
5720         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5721         is_synchronized, is_native>: Delete.
5722         <dummy>: Bump.
5723         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5724         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5725         (TYPE_FN_FIELD_ABSTRACT): Delete.
5726
5727 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5728
5729         * buffer.h (buffer_finish): Fix spelling mistakes.
5730
5731 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5732
5733         * .dir-locals.el: Automatically switch to C-style comments in
5734         versions of Emacs that support the feature.
5735
5736 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5737             Pedro Alves  <palves@redhat.com>
5738
5739         PR cli/21688
5740         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5741         (process_next_line): New variable 'inline_cmd'.
5742         Adjust 'if' clauses for "python", "compile" and "guile" to use
5743         'command_name_equals' and check for '!inline_cmd'.
5744
5745 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5746
5747         PR cli/21688
5748         * cli/cli-script.c (command_name_equals_not_inline): New function.
5749         (process_next_line): Adjust 'if' clauses for "python", "compile"
5750         and "guile" to use command_name_equals_not_inline.
5751
5752 2017-06-29  Pedro Alves  <palves@redhat.com>
5753
5754         * completer.c (expression_completer): Call
5755         linespec_location_completer instead of location_completer.
5756
5757 2017-06-29  Pedro Alves  <palves@redhat.com>
5758
5759         * completer.c (expression_completer): Remove code that recomputes
5760         'text' from 'word'.
5761
5762 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5763
5764         * regformats/regdat.sh: Generate code with
5765         "ifndef IN_PROCESS_AGENT".
5766
5767 2017-06-28  Pedro Alves  <palves@redhat.com>
5768
5769         * command.h: Include "common/scoped_restore.h".
5770
5771 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5772
5773         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5774         instead of obstack_grow.
5775
5776 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5777
5778         PR gdb/21337
5779         * symfile.c (reread_symbols): Call objfiles_changed just before
5780         read_symbols.
5781
5782 2017-06-27  Pedro Alves  <palves@redhat.com>
5783
5784         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5785         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5786         (completion_list_add_symbol, completion_list_add_msymbol):
5787         ... these new functions.
5788         (add_symtab_completions)
5789         (default_make_symbol_completion_list_break_on_1): Adjust.
5790
5791 2017-06-27  Pedro Alves  <palves@redhat.com>
5792
5793         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5794         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5795         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5796         dtor.
5797         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5798         'storage_obstack' field an auto_obstack.  In-class initialize all
5799         non-bitfield fields.  Make minsyms_read bool.
5800         * symfile.c (read_symbols): Adjust.
5801
5802 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5803
5804         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5805         (gdbsim_store_register): Likewise.
5806
5807 2017-06-27  Pedro Alves  <palves@redhat.com>
5808
5809         * c-exp.y (name_obstack): Now an auto_obstack.
5810         (yylex): Use auto_obstack::clear.
5811         (c_parse): Use auto_obstack::clear instead of reinitializing and
5812         freeing the obstack.
5813         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5814         * d-exp.y (name_obstack): Now an auto_obstack.
5815         (yylex): Use auto_obstack::clear.
5816         (d_parse): Use auto_obstack::clear instead of reinitializing and
5817         freeing the obstack.
5818         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5819         auto_obstack.
5820         * dwarf2read.c (create_addrmap_from_index)
5821         (dwarf2_build_psymtabs_hard)
5822         (update_enumeration_type_from_children): Likewise.
5823         * gdb_obstack.h (auto_obstack): New type.
5824         * go-exp.y (name_obstack): Now an auto_obstack.
5825         (build_packaged_name): Use auto_obstack::clear.
5826         (go_parse): Use auto_obstack::clear instead of reinitializing and
5827         freeing the obstack.
5828         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5829         auto_obstack.
5830         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5831         * rust-exp.y (work_obstack): Now an auto_obstack.
5832         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5833         reinitializing and freeing the obstack.
5834         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5835         (host_char_to_target): Use auto_obstack.
5836         * utils.h (make_cleanup_obstack_free): Delete declaration.
5837         * valprint.c (generic_emit_char, generic_printstr): Use
5838         auto_obstack.
5839
5840 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5841
5842         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5843         thread.
5844         (darwin_init_thread_list): Don't update dummy thread.
5845         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5846
5847 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5848
5849         * record-full.c (netorder16): Remove.
5850
5851 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5852
5853         * common/diagnostics.h: Define macros for GCC.
5854         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5855         * common/vec.h: Include diagnostics.h.
5856         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5857         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5858         warning.
5859
5860 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5861
5862         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5863         New macro.
5864         * ada-lex.l: Ignore deprecated register warnings.
5865
5866 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5867
5868         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5869         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5870
5871 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5872
5873         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5874         its own line.
5875
5876 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5877
5878         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5879
5880 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5881
5882         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5883         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5884         (xtensa_register_read_masked): Likewise.
5885
5886 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5887
5888         * common/environ.c (gdb_environ::unset): Update comment.
5889
5890 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5891
5892         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5893         registers.
5894
5895 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5896
5897         * record-full.c (record_full_exec_insn): Use byte_vector.
5898
5899 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5900
5901         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5902         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5903
5904 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5905
5906         * remote.c (cached_reg): Move from here...
5907         * regcache.h (cached_reg): ...to here.
5908         * python/py-unwind.c (struct reg_info): Remove.
5909         (cached_frame_info): Use cached_reg_t.
5910         (pyuw_prev_register): Likewise.
5911         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5912         (pyuw_dealloc_cache): Free all registers.
5913
5914 2017-06-22  Pedro Alves  <palves@redhat.com>
5915             Simon Marchi  <simon.marchi@ericsson.com>
5916
5917         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5918         warning.
5919         * common/diagnostics.h: New file.
5920
5921 2017-06-22  Pedro Alves  <palves@redhat.com>
5922
5923         * common/agent.h: Add include guards.
5924
5925 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5926
5927         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5928         talk about addressable units instead of bytes.
5929
5930 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5931
5932         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5933         of '::const_iterator'.
5934
5935 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5936
5937         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5938         'unittests/environ-selftests.c'.
5939         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5940         * charset.c (find_charset_names): Declare object 'iconv_env'.
5941         Update code to use 'iconv_env' object.  Remove call to
5942         'free_environ'.
5943         * common/environ.c: Include <utility>.
5944         (make_environ): Delete function.
5945         (free_environ): Delete function.
5946         (gdb_environ::clear): New function.
5947         (gdb_environ::operator=): New function.
5948         (gdb_environ::get): Likewise.
5949         (environ_vector): Delete function.
5950         (set_in_environ): Delete function.
5951         (gdb_environ::set): New function.
5952         (unset_in_environ): Delete function.
5953         (gdb_environ::unset): New function.
5954         (gdb_environ::envp): Likewise.
5955         * common/environ.h: Include <vector>.
5956         (struct gdb_environ): Delete; transform into...
5957         (class gdb_environ): ... this class.
5958         (free_environ): Delete prototype.
5959         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5960         environ_vector): Likewise.
5961         * infcmd.c (run_command_1): Update code to call
5962         'envp' from 'gdb_environ' class.
5963         (environment_info): Update code to call methods from 'gdb_environ'
5964         class.
5965         (unset_environment_command): Likewise.
5966         (path_info): Likewise.
5967         (path_command): Likewise.
5968         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5969         (inferior::inferior): Initialize 'environment' using the host's
5970         information.
5971         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5972         Include "environ.h".
5973         (class inferior) <environment>: Change type from 'struct
5974         gdb_environ' to 'gdb_environ'.
5975         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5976         methods from 'gdb_environ' class.
5977         * solib.c (solib_find_1): Likewise
5978         * unittests/environ-selftests.c: New file.
5979
5980 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5981
5982         * features/i386/i386-linux.xml: Exchange the order of including
5983         32bit-linux.xml and 32bit-sse.xml.
5984         * features/i386/i386-linux.c: Regenerated.
5985
5986 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5987
5988         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5989         Delete copy ctor and assignment operator.
5990         (tdesc_type): Likewise.
5991         (tdesc_feature): Likewise.
5992         (tdesc_free_reg): Remove.
5993         (tdesc_create_reg): Use new.
5994         (tdesc_free_type): Remove.
5995         (tdesc_create_vector): Use new.
5996         (tdesc_create_union): Likewise.
5997         (tdesc_create_flags): Likewise.
5998         (tdesc_create_enum): Likewise.
5999         (tdesc_free_feature): Delete.
6000         (free_target_description): Use delete.
6001
6002 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6003
6004         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6005         registers.
6006
6007 2017-06-19  Pedro Alves  <palves@redhat.com>
6008
6009         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6010         after gdb::unlinker.
6011
6012 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6013
6014         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6015         gdb_environ to access an environment variable.
6016
6017 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6018
6019         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6020         gdb_byte*.
6021
6022 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6023
6024         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6025
6026 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6027
6028         * configure: Re-generate.
6029         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6030
6031 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6032
6033         * configure: Re-generate.
6034         * warning.m4: Pass -Werror to compiler when checking for
6035         supported warning flags.
6036
6037 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6038
6039         * Makefile.in (COMPILE.pre): Add "-x c++".
6040
6041 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6042             Pedro Alves  <palves@redhat.com>
6043             Yao Qi  <yao.qi@linaro.org>
6044
6045         * defs.h (RequireLongest): New.
6046         (extract_integer): Declare function template.
6047         (extract_signed_integer): Remove the declaration, but define it
6048         static inline.
6049         (extract_unsigned_integer): Likewise.
6050         (store_integer): Declare function template.
6051         (store_signed_integer): Remove the declaration, but define it
6052         static inline.
6053         (store_unsigned_integer): Likewise.
6054         * findvar.c (extract_integer): New function template.
6055         (extract_signed_integer): Remove.
6056         (extract_unsigned_integer): Remove.
6057         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6058         instantiations.
6059         (store_integer): New function template.
6060         (store_signed_integer): Remove.
6061         (store_unsigned_integer): Remove.
6062         (store_integer): Explicit instantiations.
6063         * regcache.c (regcache_raw_read_signed): Update.
6064         (regcache::raw_read): New function.
6065         (regcache::raw_read_signed): Remove.
6066         (regcache::raw_read_unsigned): Remove.
6067         (regcache_raw_read_unsigned): Update.
6068         (regcache_raw_write_unsigned): Update.
6069         (regcache::raw_write_signed): Remove.
6070         (regcache::raw_write): New function.
6071         (regcache_cooked_read_signed): Update.
6072         (regcache::raw_write_unsigned): Remove.
6073         (regcache::cooked_read_signed): Remove.
6074         (regcache_cooked_read_unsigned): Update.
6075         (regcache::cooked_read_unsigned): Remove.
6076         (regcache_cooked_write_signed): Update.
6077         (regcache_cooked_write_unsigned): Update.
6078         * regcache.h (regcache) <raw_read_signed>: Remove.
6079         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6080         <raw_read, raw_write>: New.
6081         <cooked_read_signed, cooked_write_signed>: Remove.
6082         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6083         <cooked_read, cooked_write>: New.
6084         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6085         (sh64_pseudo_register_write): Update.
6086
6087 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6088
6089         * arc-tdep.c (arc_disassembler_options): New variable.
6090         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6091         of default_print_insn.
6092         (arc_delayed_print_insn): Set info->section when needed,
6093         use default_print_insn to retrieve a disassembler.
6094
6095 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6096
6097         PR gdb/21574
6098         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6099         to mention $SHELL and startup-with-shell.
6100
6101 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6102
6103         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6104
6105 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6106
6107         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6108         default_print_insn instead of print_insn_aarch64.
6109         * arm-tdep.c (gdb_print_insn_arm): Call
6110         default_print_insn instead of print_insn_big_arm
6111         and print_insn_little_arm.
6112         * i386-tdep.c (i386_print_insn): Call default_print_insn
6113         instead of print_insn_i386.
6114         * ia64-tdep.c (ia64_print_insn): Call
6115         default_print_insn instead of print_insn_ia64.
6116         * mips-tdep.c (gdb_print_insn_mips): Call
6117         default_print_insn instead of print_insn_big_mips
6118         and print_insn_little_mips.
6119         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6120         instead of print_insn_spu.
6121
6122 2017-06-14  Pedro Alves  <palves@redhat.com>
6123
6124         * ada-lang.c: Include "common/byte-vector.h".
6125         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6126         * charset.c (wchar_iterator::iterate): Resize the vector instead
6127         of reserving it.
6128         * common/byte-vector.h: Include "common/def-vector.h".
6129         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6130         * cli/cli-dump.c: Include "common/byte-vector.h".
6131         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6132         * common/byte-vector.h: New file.
6133         * common/def-vector.h: New file.
6134         * common/default-init-alloc.h: New file.
6135         * dwarf2loc.c: Include "common/byte-vector.h".
6136         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6137         instead of reserving it.
6138         * dwarf2read.c: Include "common/byte-vector.h".
6139         (data_buf::m_vec): Now a gdb::byte_vector.
6140         * gdb_regex.c: Include "common/def-vector.h".
6141         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6142         * mi/mi-main.c: Include "common/byte-vector.h".
6143         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6144         * printcmd.c: Include "common/byte-vector.h".
6145         (print_scalar_formatted): Use gdb::byte_vector.
6146         * valprint.c: Include "common/byte-vector.h".
6147         (maybe_negate_by_bytes, print_decimal_chars): Use
6148         gdb::byte_vector.
6149
6150 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6151
6152         * darwin-nat.c: Include "nat/fork-inferior.h".
6153
6154 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6155
6156         * configure.nat: Factor out Darwin bits that are not
6157         architecture-specific.  Add fork-inferior.o.
6158
6159 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6160
6161         * configure.nat: Factor out AIX bits that are not
6162         architecture-specific.  Add fork-inferior.o.
6163
6164 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6165
6166         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6167         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6168         wrappers that just call rw_pieced_value.
6169
6170 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6171
6172         * dwarf2loc.c (write_pieced_value): When writing the data for a
6173         memory piece, use write_memory_with_notification instead of
6174         write_memory.
6175
6176 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6177
6178         * valops.c (read_value_memory): Change embedded_offset to
6179         represent a bit offset instead of a byte offset.
6180         * value.h (read_value_memory): Adjust comment.
6181
6182 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6183
6184         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6185         dest_offset_bits and source_offset_bits.
6186         (write_pieced_value): Likewise.
6187
6188 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6189
6190         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6191         given by DW_OP_bit_piece.
6192         (write_pieced_value): Likewise.
6193
6194 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6195
6196         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6197         some other preparations to the places where sufficient information
6198         is available.
6199         (write_pieced_value): Likewise.
6200
6201 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6202
6203         * dwarf2loc.c (bits_to_bytes): New function.
6204         (read_pieced_value): Fix offset calculations for register pieces
6205         on big-endian targets.
6206         (write_pieced_value): Likewise.
6207
6208 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6209
6210         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6211         (write_pieced_value): Likewise.
6212
6213 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6214
6215         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6216         transfer the source value's least significant bits, instead of its
6217         lowest-addressed ones.  Rename type_len to max_offset.
6218         (read_pieced_value): Mirror above changes to write_pieced_value as
6219         applicable.
6220
6221 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6222
6223         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6224         truncate full bytes from dest_offset_bits before using it as an
6225         offset into the buffer.
6226
6227 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6228
6229         * dwarf2loc.c (write_pieced_value): Include transfer size in
6230         byte-wise check.
6231
6232 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6233
6234         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6235         calculation of this_size.
6236
6237 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6238
6239         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6240         when targeting a bit-field.
6241         (write_pieced_value): Likewise.
6242
6243 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6244
6245         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6246         (allocate_piece_closure): Drop addr_size parameter.
6247         (dwarf2_evaluate_loc_desc_full): Adjust call to
6248         allocate_piece_closure.
6249
6250 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6251
6252         PR gdb/21226
6253         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6254         the LSB end, independent of endianness.
6255
6256 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6257
6258         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6259         size capping.
6260
6261 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6262
6263         * mips-linux-nat.c: Move include features/mips*-linux.c to
6264         mips-linux-tdep.c.
6265         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6266         to mips-linux-tdep.c.
6267         * mips-linux-tdep.c: Include features/mips*-linux.c
6268         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6269         functions.
6270         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6271         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6272         (tdesc_mips64_dsp_linux): Declare.
6273
6274 2017-06-12  Tom Tromey  <tom@tromey.com>
6275
6276         * valprint.h (val_print_type_code_int): Remove.
6277         * valprint.c (generic_val_print_int): Always call
6278         val_print_scalar_formatted.
6279         (val_print_type_code_int): Remove.
6280         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6281         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6282         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6283         * ada-valprint.c (ada_val_print_num): Use
6284         val_print_scalar_formatted.
6285
6286 2017-06-12  Tom Tromey  <tom@tromey.com>
6287
6288         * printcmd.c (print_scalar_formatted): Unify the two switches.
6289         Don't convert scalars to LONGEST.
6290
6291 2017-06-12  Tom Tromey  <tom@tromey.com>
6292
6293         PR exp/16225:
6294         * valprint.h (print_decimal_chars): Update.
6295         * valprint.c (maybe_negate_by_bytes): New function.
6296         (print_decimal_chars): Add "is_signed" argument.
6297         * printcmd.c (print_scalar_formatted): Update.
6298
6299 2017-06-12  Tom Tromey  <tom@tromey.com>
6300
6301         PR exp/16225:
6302         * valprint.h (print_binary_chars, print_hex_chars): Update.
6303         * valprint.c (val_print_type_code_int): Update.
6304         (print_binary_chars): Add "zero_pad" argument.
6305         (emit_octal_digit): New function.
6306         (print_octal_chars): Don't zero-pad.
6307         (print_decimal_chars): Likewise.
6308         (print_hex_chars): Add "zero_pad" argument.
6309         * sh64-tdep.c (sh64_do_fp_register): Update.
6310         * regcache.c (regcache::dump): Update.
6311         * printcmd.c (print_scalar_formatted): Update.
6312         * infcmd.c (default_print_one_register_info): Update.
6313
6314 2017-06-12  Pedro Alves  <palves@redhat.com>
6315             Alan Hayward  <alan.hayward@arm.com>
6316
6317         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6318         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6319         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6320         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6321         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6322
6323 2017-06-12  Pedro Alves  <palves@redhat.com>
6324
6325         * dwarf2read.c (mapped_symtab::data): Now a vector of
6326         symtab_index_entry instead of vector of
6327         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6328         whether an element's name is NULL instead of checking whether the
6329         element itself is NULL.
6330         (find_slot): Change return type.  Adjust.
6331         (hash_expand, , add_index_entry, uniquify_cu_indices)
6332         (write_hash_table): Adjust.
6333
6334 2017-06-12  Pedro Alves  <palves@redhat.com>
6335
6336         * dwarf2read.c (recursively_count_psymbols): New function.
6337         (write_psymtabs_to_index): Call it to compute number of psyms and
6338         pass estimate size of psyms_seen to unordered_set's ctor.
6339
6340 2017-06-12  Pedro Alves  <palves@redhat.com>
6341
6342         * dwarf2read.c (write_hash_table): Check if key already exists
6343         before emplacing.
6344
6345 2017-06-12  Pedro Alves  <palves@redhat.com>
6346
6347         * dwarf2read.c (data_buf::append_space): Rename to...
6348         (data_buf::grow): ... this, and make private.  Adjust all callers.
6349         (data_buf::append_uint): New method.
6350         (add_address_entry, write_one_signatured_type)
6351         (write_psymtabs_to_index): Use it.
6352
6353 2017-06-12  Pedro Alves  <palves@redhat.com>
6354
6355         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6356         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6357         (data_buf::file_write): Call ::fwrite directly.
6358
6359 2017-06-12  Pedro Alves  <palves@redhat.com>
6360
6361         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6362         std::vector::erase.
6363
6364 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6365
6366         Code cleanup: C++ify .gdb_index producer.
6367         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6368         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6369         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6370         (create_strtab, add_string): Remove.
6371         (file_write, data_buf): New.
6372         (struct symtab_index_entry): Use std::vector for cu_indices.
6373         (struct mapped_symtab): Use std::vector for data.
6374         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6375         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6376         Remove.
6377         (find_slot): Change return type.  Update it to the new data structures.
6378         (hash_expand, add_index_entry): Update it to the new data structures.
6379         (offset_type_compare): Remove.
6380         (uniquify_cu_indices): Update it to the new data structures.
6381         (c_str_view, c_str_view_hasher, vector_hasher): New.
6382         (add_indices_to_cpool): Remove.
6383         (write_hash_table): Update it to the new data structures.
6384         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6385         (eq_psymtab_cu_index): Remove.
6386         (psym_index_map): New typedef.
6387         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6388         reference and std::unordered_map for cu_index_htab.
6389         (add_address_entry, add_address_entry_worker, write_address_map)
6390         (write_psymbols): Update it to the new data structures.
6391         (write_obstack): Remove.
6392         (struct signatured_type_index_data): Change types_list to a data_buf
6393         reference and psyms_seen to a std::unordered_set reference.
6394         (write_one_signatured_type, recursively_write_psymbols)
6395         (write_psymtabs_to_index): Update it to the new data structures.
6396
6397 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6398
6399         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6400         separate-debug-file commands.
6401         * symfile.h (separate_debug_file_debug): New global.
6402         * symfile.c (separate_debug_file_debug): New global.
6403         (separate_debug_file_exists, find_separate_debug_file): Add
6404         debug output.
6405         (_initialize_symfile): Add "set debug separate-debug-file"
6406         command.
6407         * build-id.c (build_id_to_debug_bfd,
6408         find_separate_debug_file_by_buildid): Add debug output.
6409
6410 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6411
6412         * gdbarch.sh (displaced_step_free_closure): Remove.
6413         * gdbarch.h, gdbarch.c: Re-generate.
6414         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6415         displaced_step_free_closure.
6416         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6417         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6418         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6419         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6420         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6421         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6422         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6423         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6424         * infrun.c (displaced_step_clear): Call xfree instead of
6425         gdbarch_displaced_step_free_closure.
6426
6427 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6428
6429         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6430         NULL".
6431
6432 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6433
6434         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6435         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6436         (mn10300_push_dummy_call): Likewise.
6437
6438 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6439
6440         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6441
6442 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6443
6444         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6445
6446 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6447
6448         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6449         able to start inferiors using a shell.
6450         (New remote packets): Announce new packet "QStartupWithShell".
6451         * remote.c: Add PACKET_QStartupWithShell.
6452         (extended_remote_create_inferior): Handle new
6453         PACKET_QStartupWithShell.
6454         (remote_protocol_features) <QStartupWithShell>: New entry for
6455         PACKET_QStartupWithShell.
6456         (_initialize_remote): Call "add_packet_config_cmd" for
6457         QStartupShell.
6458
6459 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6460             Pedro Alves  <palves@redhat.com>
6461
6462         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6463         and "nat/fork-inferior.h".
6464         * common/common-inferior.h: New file, with contents from
6465         "gdb/inferior.h".
6466         * commom/common-utils.c: Include "common-utils.h".
6467         (stringify_argv): New function.
6468         * common/common-utils.h (stringify_argv): New prototype.
6469         * configure.nat: Add "fork-inferior.o" as a dependency for
6470         "*linux*", "fbsd*" and "nbsd*" hosts.
6471         * corefile.c (get_exec_file): Update comment.
6472         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6473         instead of "startup_inferior".
6474         (darwin_create_inferior): Call "add_thread_silent" after
6475         "fork_inferior".
6476         * fork-child.c: Cleanup unnecessary includes.
6477         (SHELL_FILE): Move to "common/common-fork-child.c".
6478         (environ): Likewise.
6479         (exec_wrapper): Initialize.
6480         (get_exec_wrapper): New function.
6481         (breakup_args): Move to "common/common-fork-child.c"; rename to
6482         "breakup_args_for_exec".
6483         (escape_bang_in_quoted_argument): Move to
6484         "common/common-fork-child.c".
6485         (saved_ui): New variable.
6486         (prefork_hook): New function.
6487         (postfork_hook): Likewise.
6488         (postfork_child_hook): Likewise.
6489         (gdb_startup_inferior): Likewise.
6490         (fork_inferior): Move to "common/common-fork-child.c".  Update
6491         function to support gdbserver.
6492         (startup_inferior): Likewise.
6493         * gdbcore.h (get_exec_file): Remove declaration.
6494         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6495         instead of "startup_inferior".  Call "add_thread_silent" after
6496         "fork_inferior".
6497         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6498         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6499         instead of "startup_inferior".  Call "add_thread_silent" after
6500         "fork_inferior".
6501         * inferior.h: Include "common-inferior.h".
6502         (trace_start_error): Move to "common/common-utils.h".
6503         (trace_start_error_with_name): Likewise.
6504         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6505         (startup_inferior): Likewise.
6506         (gdb_startup_inferior): New prototype.
6507         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6508         * nat/fork-inferior.h: New file.
6509         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6510         instead of "startup_inferior".  Call "add_thread_silent" after
6511         "fork_inferior".
6512         * target.h (target_terminal_init): Move prototype to
6513         "target/target.h".
6514         (target_terminal_inferior): Likewise.
6515         (target_terminal_ours): Likewise.
6516         * target/target.h (target_terminal_init): New prototype, moved
6517         from "target.h".
6518         (target_terminal_inferior): Likewise.
6519         (target_terminal_ours): Likewise.
6520         * utils.c (gdb_flush_out_err): New function.
6521
6522 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6523
6524         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6525         * common/common-gdbthread.h: New file, with parts from
6526         "gdb/gdbthread.h".
6527         * gdbthread.h: Include "common-gdbthread.h".
6528         (switch_to_thread): Moved to "common/common-gdbthread.h".
6529
6530 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6531
6532         * Makefile.in (SFILES): Add "common/job-control.c".
6533         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6534         (COMMON_OBS): Add "job-control.o".
6535         * common/job-control.c: New file, with contents from
6536         "gdb/inflow.c".
6537         * common/job-control.h: New file, with contents from "terminal.h".
6538         * fork-child.c: Include "job-control.h".
6539         * inflow.c: Include "job-control.h".
6540         (gdb_setpgid): Move to "common/common-inflow.c".
6541         (_initialize_inflow): Move setting of "job_control" to
6542         "handle_job_control".
6543         * terminal.h (job_control): Moved to "common/common-terminal.h".
6544         (gdb_setpgid): Likewise.
6545         * top.c: Include "job_control.h".
6546         * utils.c: Likewise.
6547         (job_control): Moved to "job-control.c".
6548
6549 2017-06-07  Pedro Alves  <palves@redhat.com>
6550
6551         * Makefile.in (SFILES): Add gdb_regex.c.
6552         (COMMON_OBS): Add gdb_regex.o.
6553         * ada-lang.c (ada_add_standard_exceptions)
6554         (ada_add_exceptions_from_frame, name_matches_regex)
6555         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6556         parameter type to compiled_regex.  Adjust.
6557         (ada_exceptions_list): Use compiled_regex.
6558         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6559         std::unique_ptr<compiled_regex>.
6560         (exception_catchpoint::~exception_catchpoint): Remove regfree
6561         call.
6562         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6563         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6564         * breakpoint.c (solib_catchpoint::compiled): Now a
6565         std::unique_ptr<compiled_regex>.
6566         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6567         (check_status_catch_solib): Adjust to use compiled_regex.
6568         (add_solib_catchpoint): Adjust to use compiled_regex.
6569         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6570         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6571         compiled_regex reference.  Adjust to use it.
6572         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6573         declaration.  Include "gdb_regex.h".
6574         (apropos_cmd): Change regex parameter to compiled_regex reference.
6575         * gdb_regex.c: New file.
6576         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6577         declarations.
6578         (class compiled_regex): New.
6579         * linux-tdep.c: Include "common/gdb_optional.h".
6580         (struct mapping_regexes): New, factored out from
6581         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6582         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6583         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6584         * probe.c: Include "common/gdb_optional.h".
6585         (collect_probes): Use compiled_regex and gdb::optional and remove
6586         cleanups.
6587         * skip.c: Include "common/gdb_optional.h".
6588         (skiplist_entry::compiled_function_regexp): Now a
6589         gdb::optional<compiled_regex>.
6590         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6591         (free_skiplist_entry): Remove regfree call.
6592         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6593         compiled_regex and gdb::optional.
6594         * symtab.c: Include "common/gdb_optional.h".
6595         (search_symbols): Use compiled_regex and gdb::optional.
6596         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6597         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6598         to gdb_regex.c.
6599
6600 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6601
6602         * regcache.c (regcache::save): Avoid buffer use.
6603         (regcache::dump): Likewise.
6604
6605 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6606
6607         * sh-tdep.c (sh_pseudo_register_read): Remove
6608         MAX_REGISTER_SIZE.
6609         (sh_pseudo_register_write): Likewise.
6610         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6611         (sh64_pseudo_register_write): Likewise
6612
6613 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6614
6615         * aarch64-tdep.c (aarch64_store_return_value): Use
6616         V_REGISTER_SIZE.
6617         (aarch64_pseudo_read_value): Likewise.
6618         (aarch64_pseudo_write): Likewise.
6619
6620 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6621
6622         * regformats/regdef.h (set_register_cache): Remove the
6623         declaration.
6624
6625 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6626
6627         * frame.c (frame_unwind_register_signed): Use
6628         frame_unwind_register_value.
6629
6630 2017-06-06  Pedro Alves  <palves@redhat.com>
6631
6632         PR breakpoints/21553
6633         * breakpoint.c (create_breakpoints_sal_default)
6634         (init_breakpoint_sal, create_breakpoint_sal): Use
6635         gdb::unique_xmalloc_ptr for string parameters.
6636         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6637         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6638         (base_breakpoint_create_breakpoints_sal)
6639         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6640         (strace_marker_create_breakpoints_sal)
6641         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6642         string parameters.
6643         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6644         gdb::unique_xmalloc_ptr for string parameters.
6645         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6646         parameters.
6647
6648 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6649
6650         * alpha-tdep.c (alpha_register_to_value): Use
6651         get_frame_register_value.
6652         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6653
6654 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6655
6656         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6657         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6658         (ia64_value_to_register): Likewise.
6659         (ia64_extract_return_value): Likewise.
6660         (ia64_store_return_value): Likewise.
6661         (ia64_push_dummy_call): Likewise.
6662
6663 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6664
6665         GDB 8.0 released.
6666
6667 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6668
6669         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6670
6671 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6672
6673         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6674         parameter.
6675         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6676
6677 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6678
6679         * event-loop.c (poll_timers): Unallocate timer using delete
6680         instead of xfree.
6681
6682 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6683
6684         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6685         (struct breakpoint) <~breakpoint>: New.
6686         (struct watchpoint): Inherit from breakpoint.
6687         <~watchpoint>: New.
6688         <base>: Remove.
6689         (struct tracepoint): Inherit from breakpoint.
6690         <base>: Remove.
6691         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6692         (struct longjmp_breakpoint): Inherit from breakpoint.
6693         <~longjmp_breakpoint>: New.
6694         <base>: Remove.
6695         (new_breakpoint_from_type): Remove casts.
6696         (watchpoint_in_thread_scope): Remove reference to base field.
6697         (watchpoint_del_at_next_stop): Likewise.
6698         (update_watchpoint): Likewise.
6699         (watchpoint_check): Likewise.
6700         (bpstat_check_watchpoint): Likewise.
6701         (set_longjmp_breakpoint): Likewise.
6702         (struct fork_catchpoint): Inherit from breakpoint.
6703         <base>: Remove.
6704         (struct solib_catchpoint): Inherit from breakpoint.
6705         <~solib_catchpoint>: New.
6706         <base>: Remove.
6707         (dtor_catch_solib): Change to ...
6708         (solib_catchpoint::~solib_catchpoint): ... this.
6709         (breakpoint_hit_catch_solib): Remove reference to base field.
6710         (add_solib_catchpoint): Likewise.
6711         (create_fork_vfork_event_catchpoint): Likewise.
6712         (struct exec_catchpoint): Inherit from breakpoint.
6713         <~exec_catchpoint>: New.
6714         <base>: Remove.
6715         (dtor_catch_exec): Change to ...
6716         (exec_catchpoint::~exec_catchpoint): ... this.
6717         (dtor_watchpoint): Change to ...
6718         (watchpoint::~watchpoint): ... this.
6719         (watch_command_1): Remove reference to base field.
6720         (catch_exec_command_1): Likewise.
6721         (base_breakpoint_dtor): Change to ...
6722         (breakpoint::~breakpoint): ... this.
6723         (base_breakpoint_ops): Remove dtor field value.
6724         (longjmp_bkpt_dtor): Change to ...
6725         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6726         (strace_marker_create_breakpoints_sal): Remove reference to base
6727         field.
6728         (delete_breakpoint): Don't manually call breakpoint destructor.
6729         (create_tracepoint_from_upload): Remove reference to base field.
6730         (trace_pass_set_count): Likewise.
6731         (initialize_breakpoint_ops): Don't initialize
6732         momentary_breakpoint_ops, don't set dtors.
6733         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6734         <~ada_catchpoint>: New.
6735         <base>: Remove.
6736         (create_excep_cond_exprs): Remove reference to base field.
6737         (dtor_exception): Change to ...
6738         (ada_catchpoint::~ada_catchpoint): ... this.
6739         (dtor_catch_exception): Remove.
6740         (dtor_catch_exception_unhandled): Remove.
6741         (dtor_catch_assert): Remove.
6742         (create_ada_exception_catchpoint): Remove reference to base
6743         field.
6744         (initialize_ada_catchpoint_ops): Don't set dtors.
6745         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6746         breakpoint.
6747         <~signal_catchpoint>: New.
6748         <base>: Remove.
6749         (signal_catchpoint_dtor): Change to ...
6750         (signal_catchpoint::~signal_catchpoint): ... this.
6751         (create_signal_catchpoint): Remove reference to base field.
6752         (initialize_signal_catchpoint_ops): Don't set dtor.
6753         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6754         from breakpoint.
6755         <~syscall_catchpoint>: New.
6756         <base>: Remove.
6757         (dtor_catch_syscall): Change to ...
6758         (syscall_catchpoint::~syscall_catchpoint): ... this.
6759         (create_syscall_event_catchpoint): Remove reference to base
6760         field.
6761         (initialize_syscall_catchpoint_ops): Don't set dtor.
6762         * break-catch-throw.c (struct exception_catchpoint): Inherit
6763         from breakpoint.
6764         <~exception_catchpoint>: New.
6765         <base>: Remove.
6766         (dtor_exception_catchpoint): Change to ...
6767         (exception_catchpoint::~exception_catchpoint): ... this.
6768         (handle_gnu_v3_exceptions): Remove reference to base field.
6769         (initialize_throw_catchpoint_ops): Don't set dtor.
6770         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6771         field.
6772         * remote.c (remote_get_tracepoint_status): Likewise.
6773         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6774         * tracefile.c (tracefile_fetch_registers): Likewise.
6775         * tracepoint.c (actions_command): Likewise.
6776         (validate_actionline): Likewise.
6777         (tfind_1): Likewise.
6778         (get_traceframe_location): Likewise.
6779         (find_matching_tracepoint_location): Likewise.
6780         (parse_tracepoint_status): Likewise.
6781         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6782
6783 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6784
6785         * breakpoint.c (struct longjmp_breakpoint): New struct.
6786         (is_tracepoint_type): Change return type to bool.
6787         (is_longjmp_type): New function.
6788         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6789         (set_raw_breakpoint_without_location): Use
6790         new_breakpoint_from_type.
6791         (set_raw_breakpoint): Likewise.
6792
6793 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6794
6795         * breakpoint.c (new_breakpoint_from_type): New function.
6796         (create_breakpoint_sal): Use new_breakpoint_from_type and
6797         unique_ptr.
6798         (create_breakpoint): Likewise.
6799
6800 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6801
6802         * memattr.c (mem_info_command): Rename to ...
6803         (info_mem_command): ... this.
6804         (mem_enable_command): Rename to ...
6805         (enable_mem_command): ... this.
6806         (mem_disable_command): Rename to ...
6807         (disable_mem_command): ... this.
6808         (mem_delete_command): Rename to ...
6809         (delete_mem_command): ... this.
6810         (_initialize_mem): Adjust function names.
6811
6812 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6813
6814         * btrace.c (handle_pt_insn_events): New.
6815         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6816         STATUS.  Split into this and ...
6817         (handle_pt_insn_event_flags): ... this.
6818
6819 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6820
6821         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6822         and struct pt_insn.resynced.
6823         * configure: Regenerated.
6824         * config.in: Regenerated.
6825
6826 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6827
6828         * btrace.c (ftrace_find_call_by_number): New function.
6829         (ftrace_new_function): Store objects, not pointers.
6830         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6831         ftrace_new_gap, ftrace_update_function,
6832         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6833         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6834         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6835         btrace_ends_with_single_insn, btrace_call_get): Account for
6836         btrace_thread_info::functions now storing objects.
6837         * btrace.h (struct btrace_thread_info): Add constructor.
6838         (struct btrace_thread_info) <functions>: Make std::vector.
6839         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6840         Initialize with default values.
6841         * record-btrace.c (record_btrace_frame_sniffer): Account for
6842         btrace_thread_info::functions now storing objects.
6843
6844 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6845
6846         * btrace.c: Remove typedef bfun_s.
6847         (ftrace_new_gap): Directly add gaps to the list of gaps.
6848         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6849         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6850         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6851         instead of gdb VEC.
6852
6853 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6854
6855         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6856         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6857         with btrace_thread_info::next_segment and
6858         btrace_thread_info::prev_segment.
6859         * btrace.h: Remove struct btrace_func_link.
6860         (struct btrace_function): Replace pair of function segment pointers
6861         with pair of indices.
6862         * python/py-record-btrace.c (btpy_call_prev_sibling,
6863         btpy_call_next_sibling): Replace references to
6864         btrace_thread_info::segment with btrace_thread_info::next_segment and
6865         btrace_thread_info::prev_segment.
6866         * record-btrace.c (record_btrace_frame_this_id): Use
6867         btrace_find_call_by_number.
6868
6869 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6870
6871         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6872         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6873         btrace_insn_next, btrace_insn_prev): Remove references to
6874         btrace_thread_info::flow.
6875         * btrace.h (struct btrace_function): Remove FLOW.
6876
6877 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6878
6879         * btrace.c (ftrace_find_call_by_number): New function.
6880         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6881         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6882         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6883         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6884         index.
6885         * btrace.h (struct btrace_function): Turn UP into an index.
6886         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6887         as an index.
6888         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6889         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6890         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6891
6892 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6893
6894         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6895         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6896         ftrace_update_function, ftrace_compute_global_level_offset,
6897         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6898         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6899         btrace_insn_end, btrace_is_empty): Remove references to
6900         btrace_thread_info::begin and btrace_thread_info::end.
6901         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6902         (struct btrace_thread_info) <functions>: Adjust comment.
6903         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6904         btrace_thread_info::begin.
6905
6906 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6907
6908         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6909         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6910         ftrace_update_function): Remove arguments that implicitly were always
6911         BTINFO->END.
6912         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6913         Don't pass BTINFO->END.
6914
6915 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6916
6917         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6918         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6919         btrace_find_insn_by_number): Replace function segment pointer with
6920         index.
6921         (btrace_insn_cmp): Simplify.
6922         * btrace.h: (struct btrace_insn_iterator) Rename index to
6923         insn_index.  Replace function segment pointer with index into function
6924         segment vector.
6925         * record-btrace.c (record_btrace_call_history): Replace function
6926         segment pointer use with index.
6927         (record_btrace_frame_sniffer): Retrieve function call segment through
6928         vector.
6929         (record_btrace_set_replay): Remove defunc't safety check.
6930
6931 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6932
6933         * btrace.c (btrace_ends_with_single_insn): New function.
6934         (btrace_call_get, btrace_call_number, btrace_call_begin,
6935         btrace_call_end, btrace_call_next, btrace_call_prev,
6936         btrace_find_call_by_number): Use index into call segment vector
6937         instead of pointer.
6938         (btrace_call_cmp): Simplify.
6939         * btrace.h (struct btrace_call_iterator): Replace function call segment
6940         pointer with index into vector.
6941         * record-btrace.c (record_btrace_call_history): Use index instead of
6942         pointer.
6943
6944 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6945
6946         * btrace.c (btrace_insn_begin, btrace_insn_end,
6947         btrace_find_insn_by_number): Add btinfo to iterator.
6948         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6949
6950 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6951
6952         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6953         and save pointers directly.
6954         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6955         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6956         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6957         changed signature of functions.
6958         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6959         (btrace_fetch): Remove code that adds btrace_function pointers to
6960         vector of btrace_functions.
6961         (btrace_clear): Simplify freeing vector of btrace_functions.
6962
6963 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6964
6965         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6966         Replace VEC_* with std::vector functions.
6967         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6968         (struct btrace_thread_info)<functions>: Change type to std::vector.
6969
6970 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6971
6972         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
6973         "Removed targets and native configurations" up.  Merge duplicate
6974         "New commands" sub-sections.  Add "New options" sub-sections.
6975
6976 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
6977
6978         * defs.h (copy_integer_to_size): New declaration.
6979         * findvar.c (copy_integer_to_size): New function.
6980         (do_cint_test): New selftest function.
6981         (copy_integer_to_size_test): Likewise.
6982         (_initialize_findvar): Likewise.
6983         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6984         (mips_fbsd_collect_reg): Use raw_collect_integer.
6985         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6986         (mips64_fill_gregset): Use raw_collect_integer
6987         (mips64_fill_fpregset): Use raw_supply_integer.
6988         * regcache.c (regcache::raw_supply_integer): New function.
6989         (regcache::raw_collect_integer): Likewise.
6990         * regcache.h: (regcache::raw_supply_integer): New declaration.
6991         (regcache::raw_collect_integer): Likewise.
6992
6993 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6994
6995         * Makefile.in (SFILES): Add gdbarch-selftests.c.
6996         (COMMON_OBS): Add gdbarch-selftests.o.
6997         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6998         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6999         * gdbarch-selftests.c: New file.
7000         * regcache.h (regcache) <~regcache>: Mark it virtual if
7001         GDB_SELF_TEST.
7002         <raw_write>: Likewise.
7003
7004 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7005
7006         * regcache.c (current_regcache): Change it to
7007         regcache::current_regcache.
7008         (regcache_observer_target_changed): Update.
7009         (regcache_thread_ptid_changed): Make it a regcache static
7010         method.
7011         (regcache_thread_ptid_changed): Update.
7012         (class regcache_access): New.
7013         (current_regcache_test): Update.
7014         (_initialize_regcache): Update.
7015         * regcache.h: Include forward_list.
7016         (regcache): Declare regcache_thread_ptid_changed and declare
7017         registers_changed_ptid as friend.
7018
7019 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7020
7021         * i387-tdep.c (i387_register_to_value): Use register_size
7022         instead of TYPE_LENGTH.
7023         * m68k-tdep.c (m68k_register_to_value): Likewise.
7024
7025 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7026
7027         * i387-tdep.c (i387_convert_register_p): Return false if type
7028         code isn't TYPE_CODE_FLT.
7029
7030 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7031
7032         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7033         length is 4.
7034         (alpha_register_to_value): Remove type length check.
7035         (alpha_value_to_register): Likewise.
7036
7037 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7038
7039         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7040         TYPE_CODE_FLT.
7041
7042 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7043
7044         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7045         TYPE_CODE_FLT or not.
7046
7047 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7048
7049         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7050         * avr-tdep.c (avr_gdbarch_init): Likewise.
7051         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7052         * cris-tdep.c (cris_gdbarch_init): Likewise.
7053         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7054         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7055         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7056         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7057         * mep-tdep.c (mep_gdbarch_init): Likewise.
7058         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7059         * mips-tdep.c (mips_gdbarch_init): Likewise.
7060         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7061         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7062         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7063         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7064         * v850-tdep.c (v850_gdbarch_init): Likewise.
7065
7066 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7067
7068         * selftest-arch.c (tests_with_arch): Call registers_changed
7069         and reinit_frame_cache.
7070         * selftest.c (run_self_tests): Likewise.
7071
7072 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7073
7074         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7075         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7076
7077 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7078
7079         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7080         set_gdbarch_print_insn.
7081
7082 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7083
7084         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7085         set_gdbarch_print_insn.
7086
7087 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7088
7089         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7090         set_gdbarch_print_insn.
7091         * arc-tdep.c (arc_gdbarch_init): Likewise.
7092         * arch-utils.c: include dis-asm.h.
7093         (default_print_insn): New function.
7094         * arch-utils.h (default_print_insn): Declare.
7095         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7096         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7097         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7098         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7099         * frv-tdep.c (frv_gdbarch_init): Likewise.
7100         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7101         * gdbarch.sh (print_insn): Use default_print_insn.
7102         * gdbarch.c: Regenerated.
7103         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7104         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7105         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7106         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7107         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7108         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7109         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7110         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7111         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7112         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7113         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7114         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7115         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7116         * mt-tdep.c (mt_gdbarch_init): Likewise.
7117         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7118         * nios2-tdep.c (nios2_print_insn): Remove.
7119         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7120         * rx-tdep.c (rx_gdbarch_init): Likewise.
7121         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7122         * score-tdep.c (score_print_insn): Remove.
7123         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7124         * sh-tdep.c (sh_gdbarch_init): Likewise.
7125         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7126         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7127         * tic6x-tdep.c (tic6x_print_insn): Remove.
7128         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7129         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7130         * v850-tdep.c (v850_gdbarch_init): Likewise.
7131         * vax-tdep.c (vax_gdbarch_init): Likewise.
7132         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7133         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7134
7135 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7136
7137         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7138         (MIPS_FP0_REGNUM): Remove.
7139         (MIPS_FSR_REGNUM): Remove.
7140         (mips_fbsd_supply_fpregs): Use mips_regnum.
7141         (mips_fbsd_supply_gregs): Likewise.
7142         (mips_fbsd_collect_fpregs): Likewise.
7143         (mips_fbsd_collect_gregs): Likewise.
7144
7145 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7146
7147         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7148         (getpfpregs_supplies): New function.
7149         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7150         getfpregs_supplies.
7151         (mips_fbsd_store_inferior_registers): Likewise.
7152
7153 2017-05-22  Pedro Alves <palves@redhat.com>
7154
7155         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7156         maintainer.
7157
7158 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7159
7160         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7161         (store_register): Likewise.
7162         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7163         (get_decimal_float_return_value): Likewise.
7164         (do_ppc_sysv_return_value): Likewise.
7165         (ppc64_sysv_abi_push_integer): Likewise.
7166         (ppc64_sysv_abi_push_freg): Likewise.
7167         (ppc64_sysv_abi_return_value_base): Likewise.
7168         (ppc64_sysv_abi_return_value): Likewise.
7169         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7170         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7171         * rs6000-nat.c: Likewise.
7172         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7173         (rs6000_value_to_register): Likewise.
7174         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7175
7176 2017-05-21  Tom Tromey  <tom@tromey.com>
7177
7178         PR rust/21466:
7179         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7180         arrays as "[T]", not "[T; ]".
7181
7182 2017-05-19  Tom Tromey  <tom@tromey.com>
7183
7184         PR rust/21484:
7185         * rust-lang.c (exp_descriptor_rust): New function.
7186         (rust_language_defn): Use it.
7187         * p-lang.c (pascal_language_defn): Update.
7188         * opencl-lang.c (opencl_language_defn): Update.
7189         * objc-lang.c (objc_language_defn): Update.
7190         * m2-lang.c (m2_language_defn): Update.
7191         * language.h (struct language_defn)
7192         <la_watch_location_expression>: New member.
7193         * language.c (unknown_language_defn, auto_language_defn)
7194         (local_language_defn): Update.
7195         * go-lang.c (go_language_defn): Update.
7196         * f-lang.c (f_language_defn): Update.
7197         * d-lang.c (d_language_defn): Update.
7198         * c-lang.h (c_watch_location_expression): Declare.
7199         * c-lang.c (c_watch_location_expression): New function.
7200         (c_language_defn, cplus_language_defn, asm_language_defn)
7201         (minimal_language_defn): Use it.
7202         * breakpoint.c (watch_command_1): Call
7203         la_watch_location_expression.
7204         * ada-lang.c (ada_language_defn): Update.
7205
7206 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7207
7208         PR tui/21482
7209         * gdb_curses.h (NOMACROS): Define.
7210         (NCURSES_NOMACROS): Define.
7211
7212 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7213
7214         PR tui/21482
7215         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7216         arg to char *.
7217         * tui/tui-wingeneral.c (box_win): Likewise.
7218         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7219         (tui_show_source_line): Likewise.
7220         (tui_show_exec_info_content): Likewise.
7221
7222 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7223
7224         * sparc-tdep.c (sparc_structure_return_p)
7225         (sparc_arg_on_registers_p): New functions.
7226         (sparc32_store_arguments): Use them.
7227         * sparc64-tdep.c (sparc64_16_byte_align_p)
7228         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7229         Handle TYPE_CODE_ARRAY.
7230
7231 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7232
7233         * cli/cli-decode.c (add_alias_cmd): New function.
7234         * command.h (add_alias_cmd): Declare.
7235         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7236         instead call add_alias_cmd.
7237
7238 2017-05-17  Pedro Alves  <palves@redhat.com>
7239
7240         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7241         (nat_makefile_frag): ... this.  All references updated.
7242         * configure.ac: Likewise.
7243         * configure.nat: Likewise.  Enhance comments.
7244         * configure: Regenerate.
7245
7246 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7247
7248         * procfs.c (procfs_create_inferior): Change prototype to match
7249         definition.
7250
7251 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7252
7253         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7254         C++ compiler warning.
7255
7256 2017-05-12  Tom Tromey  <tom@tromey.com>
7257
7258         PR rust/21483:
7259         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7260         recurse, just call value_struct_elt directly.
7261
7262 2017-05-12  Tom Tromey  <tom@tromey.com>
7263
7264         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7265         OP_RUST_ARRAY>: Fix.
7266
7267 2017-05-12  Tom Tromey  <tom@tromey.com>
7268
7269         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7270
7271 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7272
7273         * regcache.c: Include <forward_list>.
7274         (struct regcache_list): Remove.
7275         (current_regcache): Update.
7276         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7277         (regcache_thread_ptid_changed): Likewise.
7278         (registers_changed_ptid): Likewise.
7279         (current_regcache_size): Likewise.
7280
7281 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7282
7283         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7284         (current_regcache_size): New function.
7285         (current_regcache_test): New function.
7286         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7287
7288 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7289
7290         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7291         (print_gp_register_row): Use get_frame_register_value.
7292
7293 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7294
7295         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7296         (mips_supply_fpregset): Likewise.
7297         (mips64_supply_gregset): Likewise.
7298
7299 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7300
7301         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7302         regcache->raw_supply_zeroed.
7303
7304 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7305
7306         * configure.nat: Rearrange 'case' statements to match
7307         host before cpu.
7308
7309 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7310
7311         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7312         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7313         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7314         "@nat_extra_makefile_frag@".
7315         (Makefile): Remove dependency on "@frags@".
7316         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7317         (data-directory/Makefile): Likewise.
7318         * config/aarch64/linux.mh: Deleted; moved contents to
7319         "gdb/configure.nat".
7320         * config/alpha/alpha-linux.mh: Likewise.
7321         * config/alpha/nbsd.mh: Likewise.
7322         * config/arm/linux.mh: Likewise.
7323         * config/arm/nbsdelf.mh: Likewise.
7324         * config/i386/cygwin.mh: Likewise.
7325         * config/i386/cygwin64.mh: Likewise.
7326         * config/i386/darwin.mh: Likewise.
7327         * config/i386/fbsd.mh: Likewise.
7328         * config/i386/fbsd64.mh: Likewise.
7329         * config/i386/go32.mh: Likewise.
7330         * config/i386/i386gnu.mh: Likewise.
7331         * config/i386/i386sol2.mh: Likewise.
7332         * config/i386/linux.mh: Likewise.
7333         * config/i386/linux64.mh: Likewise.
7334         * config/i386/mingw.mh: Likewise.
7335         * config/i386/mingw64.mh: Likewise.
7336         * config/i386/nbsd64.mh: Likewise.
7337         * config/i386/nbsdelf.mh: Likewise.
7338         * config/i386/nto.mh: Likewise.
7339         * config/i386/obsd.mh: Likewise.
7340         * config/i386/obsd64.mh: Likewise.
7341         * config/i386/sol2-64.mh: Likewise.
7342         * config/ia64/linux.mh: Likewise.
7343         * config/m32r/linux.mh: Likewise.
7344         * config/m68k/linux.mh: Likewise.
7345         * config/m68k/nbsdelf.mh: Likewise.
7346         * config/m68k/obsd.mh: Likewise.
7347         * config/m88k/obsd.mh: Likewise.
7348         * config/mips/fbsd.mh: Likewise.
7349         * config/mips/linux.mh: Likewise.
7350         * config/mips/nbsd.mh: Likewise.
7351         * config/mips/obsd64.mh: Likewise.
7352         * config/pa/linux.mh: Likewise.
7353         * config/pa/nbsd.mh: Likewise.
7354         * config/pa/obsd.mh: Likewise.
7355         * config/powerpc/aix.mh: Likewise.
7356         * config/powerpc/fbsd.mh: Likewise.
7357         * config/powerpc/linux.mh: Likewise.
7358         * config/powerpc/nbsd.mh: Likewise.
7359         * config/powerpc/obsd.mh: Likewise.
7360         * config/powerpc/ppc64-linux.mh: Likewise.
7361         * config/powerpc/spu-linux.mh: Likewise.
7362         * config/s390/linux.mh: Likewise.
7363         * config/sh/nbsd.mh: Likewise.
7364         * config/sparc/fbsd.mh: Likewise.
7365         * config/sparc/linux.mh: Likewise.
7366         * config/sparc/linux64.mh: Likewise.
7367         * config/sparc/nbsd64.mh: Likewise.
7368         * config/sparc/nbsdelf.mh: Likewise.
7369         * config/sparc/obsd64.mh: Likewise.
7370         * config/sparc/sol2.mh: Likewise.
7371         * config/tilegx/linux.mh: Likewise.
7372         * config/vax/nbsdelf.mh: Likewise.
7373         * config/vax/obsd.mh: Likewise.
7374         * config/xtensa/linux.mh: Likewise.
7375         * config/i386/i386gnu.mn: New file, with excerpts from
7376         "config/i386/i386gnu.mh".
7377         * configure: Regenerate.
7378         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7379         *.mh files under "gdb/config".
7380         * configure.nat: New file, with contents from the
7381         "gdb/config/*/*.mh" files.
7382
7383 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7384
7385         * btrace.c (btrace_clear): Free insn vector.
7386
7387 2017-05-05  Pedro Alves  <palves@redhat.com>
7388
7389         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7390         * configure: Regenerate.
7391
7392 2017-05-04  Pedro Alves  <palves@redhat.com>
7393
7394         * Makefile.in (SFILES): Add progspace-and-thread.c.
7395         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7396         (COMMON_OBS): Add progspace-and-thread.o.
7397         * breakpoint.c: Include "progspace-and-thread.h".
7398         (update_inserted_breakpoint_locations)
7399         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7400         Use scoped_restore_current_pspace_and_thread.
7401         (create_std_terminate_master_breakpoint): Use
7402         scoped_restore_current_program_space.
7403         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7404         (print_breakpoint_location): Use
7405         scoped_restore_current_program_space.
7406         (bp_loc_is_permanent): Use
7407         scoped_restore_current_pspace_and_thread.
7408         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7409         (download_tracepoint_locations): Use
7410         scoped_restore_current_pspace_and_thread.
7411         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7412         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7413         (enum step_over_calls_kind): Moved from inferior.h.
7414         (class scoped_restore_current_thread): New class.
7415         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7416         declaration.
7417         (scoped_restore_current_thread): New class.
7418         * infcmd.c: Include "common/gdb_optional.h".
7419         (continue_1, proceed_after_attach): Use
7420         scoped_restore_current_thread.
7421         (notice_new_inferior): Use scoped_restore_current_thread.
7422         * inferior.c: Include "progspace-and-thread.h".
7423         (restore_inferior, save_current_inferior): Delete.
7424         (add_inferior_command, clone_inferior_command): Use
7425         scoped_restore_current_pspace_and_thread.
7426         * inferior.h (scoped_restore_current_inferior): New class.
7427         * infrun.c: Include "progspace-and-thread.h" and
7428         "common/gdb_optional.h".
7429         (follow_fork_inferior): Use
7430         scoped_restore_current_pspace_and_thread.
7431         (scoped_restore_exited_inferior): New class.
7432         (handle_vfork_child_exec_or_exit): Use
7433         scoped_restore_exited_inferior,
7434         scoped_restore_current_pspace_and_thread,
7435         scoped_restore_current_thread and scoped_restore.
7436         (fetch_inferior_event): Use scoped_restore_current_thread.
7437         * linespec.c (decode_line_full, decode_line_1): Use
7438         scoped_restore_current_program_space.
7439         * mi/mi-main.c: Include "progspace-and-thread.h".
7440         (exec_continue): Use scoped_restore_current_thread.
7441         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7442         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7443         * proc-service.c (ps_pglobal_lookup): Use
7444         scoped_restore_current_program_space.
7445         * progspace-and-thread.c: New file.
7446         * progspace-and-thread.h: New file.
7447         * progspace.c (release_program_space, clone_program_space): Use
7448         scoped_restore_current_program_space.
7449         (restore_program_space, save_current_program_space)
7450         (save_current_space_and_thread): Delete.
7451         (switch_to_program_space_and_thread): Moved to
7452         progspace-and-thread.c.
7453         * progspace.h (save_current_program_space)
7454         (save_current_space_and_thread): Delete declarations.
7455         (scoped_restore_current_program_space): New class.
7456         * remote.c (remote_btrace_maybe_reopen): Use
7457         scoped_restore_current_thread.
7458         * symtab.c: Include "progspace-and-thread.h".
7459         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7460         * thread.c (print_thread_info_1): Use
7461         scoped_restore_current_thread.
7462         (struct current_thread_cleanup): Delete.
7463         (do_restore_current_thread_cleanup)
7464         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7465         (scoped_restore_current_thread::~scoped_restore_current_thread):
7466         ... this new dtor.
7467         (make_cleanup_restore_current_thread): Rename/convert to ...
7468         (scoped_restore_current_thread::scoped_restore_current_thread):
7469         ... this new ctor.
7470         (thread_apply_all_command): Use scoped_restore_current_thread.
7471         (thread_apply_command): Use scoped_restore_current_thread.
7472         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7473         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7474
7475 2017-05-04  Pedro Alves  <palves@redhat.com>
7476
7477         * thread.c (make_cleanup_restore_current_thread): Move
7478         find_thread_ptid call before the is_stopped call.  Assert that the
7479         thread is found.  Replace is_stopped call by checking the thread's
7480         state directly.  Remove unnecessary NULL-thread check.
7481
7482 2017-05-04  Pedro Alves  <palves@redhat.com>
7483
7484         * corelow.c (thread_section_name): New class.
7485         (get_core_register_section, get_core_siginfo): Use it.
7486
7487 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7488
7489         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7490         (get_core_register_section): Remove xfree of NULL pointer.
7491
7492 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7493
7494         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7495         * regcache.c (regcache::raw_supply_zeroed): New function.
7496         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7497
7498 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7499
7500         * gdbarch.sh: Remove commented out definition of
7501         TARGET_CHAR_BIT.
7502         * gdbarch.h: Re-generate.
7503
7504 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7505
7506         * configure: Regenerate.
7507
7508 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7509
7510         * solib-target.c (solib_target_relocate_section_addresses):
7511         Remove num_section_bases, num_bases, segment_bases variables.
7512
7513 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7514
7515         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7516
7517 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7518
7519         * solib-target.c: Include <vector>
7520         (struct lm_info_target) <~lm_info_target>: Remove.
7521         <segment_bases, section_bases>: Change type to
7522         std::vector<CORE_ADDR>.
7523         (library_list_start_segment, library_list_start_section,
7524         library_list_end_library,
7525         solib_target_relocate_section_addresses): Adjust.
7526
7527 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7528
7529         * gdbarch.sh (software_single_step): Change return type to
7530         std::vector<CORE_ADDR>.
7531         * gdbarch.c, gdbarch.h: Re-generate.
7532         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7533         Adjust.
7534         (arm_deal_with_atomic_sequence_raw): Adjust.
7535         (thumb_get_next_pcs_raw): Adjust.
7536         (arm_get_next_pcs_raw): Adjust.
7537         (arm_get_next_pcs): Adjust.
7538         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7539         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7540         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7541         (alpha_software_single_step): Adjust.
7542         * alpha-tdep.h (alpha_software_single_step): Adjust.
7543         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7544         * arm-tdep.c (arm_software_single_step): Adjust.
7545         (arm_breakpoint_kind_from_current_state): Adjust.
7546         * arm-tdep.h (arm_software_single_step): Adjust.
7547         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7548         * cris-tdep.c (cris_software_single_step): Adjust.
7549         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7550         (micromips_deal_with_atomic_sequence): Adjust.
7551         (deal_with_atomic_sequence): Adjust.
7552         (mips_software_single_step): Adjust.
7553         * mips-tdep.h (mips_software_single_step): Adjust.
7554         * moxie-tdep.c (moxie_software_single_step): Adjust.
7555         * nios2-tdep.c (nios2_software_single_step): Adjust.
7556         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7557         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7558         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7559         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7560         * sparc-tdep.c (sparc_software_single_step): Adjust.
7561         * spu-tdep.c (spu_software_single_step): Adjust.
7562         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7563
7564 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7565
7566         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7567         * gdbarch.h: Re-generate.
7568
7569 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7570
7571         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7572         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7573         * python/py-instruction.c, python/py-instruction.h: New file.
7574         * python/py-record.c: Add py-instruction.h include.
7575         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7576         gdb.RecordInstruction.
7577         * python/python-internal.h: Add gdbpy_initialize_instruction
7578         declaration.
7579         * python/python.c (do_start_initialization): Add
7580         gdbpy_initialize_instruction.
7581
7582 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7583
7584         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7585         Remove.
7586         (btrace_func_from_recpy_func): New function.
7587         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7588         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7589         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7590         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7591         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7592         Also, use new helper functions.
7593         (btpy_list_item): Use new helper functions.
7594         (recpy_bt_function_call_history): Use new type name.
7595         (btpy_call_getset): Remove.
7596         (gdbpy_initialize_btrace): Remove code to initialize
7597         gdb.BtraceFunctionCall.
7598         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7599         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7600         recpy_bt_func_prev, recpy_bt_func_next): New export.
7601         * python/py-record.c (recpy_func_type): New static object.
7602         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7603         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7604         recpy_func_next): New function.
7605         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7606         (recpy_func_getset): New static object.
7607         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7608         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7609
7610 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7611
7612         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7613         (btpy_object, btpy_insn_type, btpy_new): Remove.
7614         (btpy_list_object): Use gdb.RecordInstruction type instead of
7615         gdb.BtraceInstruction type.
7616         (btrace_insn_from_recpy_insn): New function.
7617         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7618         btpy_new.
7619         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7620         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7621         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7622         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7623         instead of btpy_object.
7624         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7625         btpy_insn_data, btpy_insn_decode): Rename to ...
7626         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7627         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7628         recpy_bt_insn_decode): This.  Also, use new helper functions.
7629         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7630         recpy_insn_type.
7631         (btpy_insn_getset): Remove.
7632         (gdbpy_initialize_btrace): Remove code to initialize
7633         gdb.BtraceInstruction.  Use recpy_element_object.
7634         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7635         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7636         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7637         * python/py-record.c (recpy_insn_type): New static object.
7638         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7639         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7640         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7641         New function.
7642         (recpy_insn_getset): New static object.
7643         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7644         * python/py-record.h (recpy_element_object): New typedef.
7645         (recpy_insn_type, recpy_insn_new): New export.
7646
7647 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7648
7649         * py-record-btrace.c (btpy_insn_new): Removed.
7650         (btpy_insn_or_gap_new): New function.
7651         (btpy_insn_error): Removed.
7652         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7653         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7654         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7655         btpy_insn_or_gap_new instead of btpy_insn_new.
7656         (btpy_insn_getset): Remove btpy_insn_error.
7657         * py-record.c (recpy_gap_type): New static object.
7658         (recpy_gap_object): New typedef.
7659         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7660         recpy_gap_reason_string): New function.
7661         (recpy_gap_getset): New static object.
7662         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7663         * py-record.h (recpy_gap_new): New export.
7664
7665 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7666
7667         * python/py-record.c (recpy_ptid): Remove.
7668         (recpy_record_getset): Remove recpy_ptid.
7669
7670 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7671
7672         * btrace.c (btrace_fetch): Set inferior_ptid.
7673         * python/py-record-btrace.c: Add "py-record.h" include.
7674         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7675         recpy_bt_end, recpy_bt_instruction_history,
7676         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7677         in gdb.Record object instead of current ptid.
7678         * python/py-record.c: Include new "py-record.h" file.
7679         (recpy_record_object): Moved to py-record.h.
7680         * python/py-record.h: New file.
7681
7682 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7683
7684         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7685         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7686         indentation.
7687
7688 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7689
7690         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7691         the past maintainers section.
7692
7693 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7694
7695         * infcmd.c (get_return_value): Use regcache ctor, and remove
7696         cleanup.
7697
7698 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7699             Pedro Alves  <palves@redhat.com>
7700
7701         * regcache.c (regcache::regcache): New tag dispatch ctor.
7702         (do_cooked_read): Moved above.
7703         (regcache_dup): Use the tag dispatch ctor..
7704         * regcache.h (regcache): Declare ctor, delete copy ctor and
7705         assignment operator, remove friend regcache_dup.
7706
7707 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7708
7709         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7710         call method save instead of regcache_cpy.
7711         * regcache.h (struct regcache): Make regcache_dup a friend.
7712
7713 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7714
7715         * regcache.c (struct regcache): Move to regcache.h
7716         (regcache::arch): New method.
7717         (regcache_get_ptid): Update.
7718         (get_regcache_arch): Call arch method.
7719         (get_regcache_aspace): Call method aspace.
7720         (register_buffer): Change it to method.
7721         (regcache_save): Change it to regcache::save.
7722         (regcache_restore): Likewise.
7723         (regcache_cpy_no_passthrough): Remove the declaration.
7724         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7725         (regcache_cpy_no_passthrough): Change it to method
7726         cpy_no_passthrough.
7727         (regcache_register_status): Change it to method
7728         get_register_status.
7729         (regcache_invalidate): Change it to method invalidate.
7730         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7731         (regcache_raw_update): Change it to method raw_update.
7732         (regcache_raw_read): Likewise.
7733         (regcache_raw_read_signed): Likewise.
7734         (regcache_raw_read_unsigned): Likewise.
7735         (regcache_raw_write_signed): Likewise.
7736         (regcache_raw_write_unsigned): Likewise.
7737         (regcache_cooked_read): Likewise.
7738         (regcache_cooked_read_value): Likewise.
7739         (regcache_cooked_read_signed): Likewise.
7740         (regcache_cooked_read_unsigned): Likewise.
7741         (regcache_cooked_write_signed): Likewise.
7742         (regcache_cooked_write_unsigned): Likewise.
7743         (regcache_raw_set_cached_value): Likewise.
7744         (regcache_raw_write): Likewise.
7745         (regcache_cooked_write): Likewise.
7746         (regcache_xfer_part): Likewise.
7747         (regcache_raw_read_part): Likewise.
7748         (regcache_raw_write_part): Likewise.
7749         (regcache_cooked_read_part): Likewise.
7750         (regcache_cooked_write_part): Likewise.
7751         (regcache_raw_supply): Likewise.
7752         (regcache_raw_collect): Likewise.
7753         (regcache_transfer_regset): Likewise.
7754         (regcache_supply_regset): Likewise.
7755         (regcache_collect_regset): Likewise.
7756         (regcache_debug_print_register): Likewise.
7757         (enum regcache_dump_what): Move it to regcache.h.
7758         (regcache_dump): Change it to method dump.
7759         * regcache.h (enum regcache_dump_what): New.
7760         (class regcache): New.
7761         * target.c (target_fetch_registers): Call method
7762         debug_print_register.
7763         (target_store_registers): Likewise.
7764
7765 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7766
7767         * windows-nat.c (struct lm_info_windows): Initialize field.
7768         (windows_make_so): Allocate lm_info_windows with new.
7769         (windows_free_so): Free lm_info_windows with delete.
7770
7771 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7772
7773         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7774         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7775         cleanup.
7776         (darwin_free_so): Free lm_info_darwin with delete.
7777
7778 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7779
7780         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7781         <l_addr_p>: Change type to bool.
7782         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7783         (svr4_free_so): Free lm_info_svr4 with delete.
7784         (svr4_copy_library_list): Replace memcpy with call to copy
7785         constructor.
7786         (library_list_start_library, svr4_default_sos): Allocate
7787         lm_info_svr4 with new.
7788
7789 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7790
7791         * solib-target.c (struct lm_info_target): Add destructor,
7792         initialize fields.
7793         <name>: Change type to std::string.
7794         (library_list_start_library): Allocate lm_info_target with new.
7795         (solib_target_free_library_list): Free lm_info_target with
7796         delete.
7797         (solib_target_current_sos): Adapt to std::string.
7798         (solib_target_free_so): Free lm_info_target with delete.
7799
7800 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7801
7802         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7803         fields.
7804         (frv_current_sos): Allocate lm_info_frv with new.
7805         (frv_relocate_main_executable): Free lm_info_frv with delete,
7806         allocate with new.
7807         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7808
7809 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7810
7811         * solib-frv.c (struct lm_info_frv): Fix indentation.
7812
7813 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7814
7815         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7816         map field.
7817         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7818         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7819         and allocate with new.
7820         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7821
7822 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7823
7824         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7825         <filename, member_name>: Change type to std::string.
7826         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7827         (library_list_start_library): Allocate lm_info_aix with new.
7828         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7829         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7830         with copy constructor.
7831
7832 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7833
7834         * solist.h (struct lm_info): Remove.
7835         (struct lm_info_base): New class.
7836         (struct so_list) <lm_info>: Change type to lm_info_base *.
7837         * nto-tdep.c (struct lm_info): Remove.
7838         (lm_addr): Adjust.
7839         * solib-aix.c (struct lm_info): Rename to ...
7840         (struct lm_info_aix): ... this.  Extend lm_info_base.
7841         (lm_info_p): Rename to ...
7842         (lm_info_aix_p): ... this, and adjust.
7843         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7844         solib_aix_parse_libraries, library_list_start_library,
7845         solib_aix_free_library_list, solib_aix_parse_libraries,
7846         solib_aix_get_library_list,
7847         solib_aix_relocate_section_addresses, solib_aix_free_so,
7848         solib_aix_get_section_offsets,
7849         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7850         Adjust.
7851         (struct solib_aix_inferior_data) <library_list>: Adjust.
7852         * solib-darwin.c (struct lm_info): Rename to ...
7853         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7854         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7855         * solib-dsbt.c (struct lm_info): Rename to ...
7856         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7857         (struct dsbt_info) <main_executable_lm_info): Adjust.
7858         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7859         dsbt_relocate_section_addresses): Adjust.
7860         * solib-frv.c (struct lm_info): Rename to ...
7861         (struct lm_info_frv): ... this.  Extend lm_info_base.
7862         (main_executable_lm_info): Adjust.
7863         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7864         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7865         find_canonical_descriptor_in_load_object,
7866         frv_fdpic_find_canonical_descriptor): Adjust.
7867         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7868         to lm_info_svr4.
7869         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7870         svr4_clear_so, svr4_copy_library_list,
7871         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7872         svr4_current_sos, svr4_fetch_objfile_link_map,
7873         solist_update_incremental): Adjust.
7874         * solib-svr4.h (struct lm_info_svr4): Move here from
7875         solib-svr4.c.
7876         * solib-target.c (struct lm_info): Rename to ...
7877         (struct lm_info_target): ... this.  Extend lm_info_base.
7878         (lm_info_p): Rename to ...
7879         (lm_info_target_p): ... this.
7880         (solib_target_parse_libraries, library_list_start_segment,
7881         library_list_start_section, library_list_start_library,
7882         library_list_end_library, solib_target_free_library_list,
7883         solib_target_current_sos, solib_target_free_so,
7884         solib_target_relocate_section_addresses): Adjust.
7885         * windows-nat.c (struct lm_info): Rename to ...
7886         (struct lm_info_windows): ... this.  Extend lm_info_base.
7887         (windows_make_so, handle_load_dll, handle_unload_dll,
7888         windows_xfer_shared_libraries): Adjust.
7889
7890 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7891
7892         * solib-darwin.c (struct darwin_so_list): Remove.
7893         (darwin_current_sos): Allocate an so_list object instead of a
7894         darwin_so_list, separately allocate an lm_info object.
7895         (darwin_free_so): Free lm_info.
7896
7897 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7898
7899         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7900         with fprintf_filtered.
7901
7902 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7903
7904         * regcache.c (regcache::regcache): New function.
7905         (regcache::~regcache): New function.
7906         (regcache_xmalloc_1): Remove.
7907         (regcache_xmalloc): Call new regcache.
7908         (regcache_xfree): Call delete regcache.
7909         (get_thread_arch_aspace_regcache): Call new regcache.
7910
7911 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7912
7913         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7914         lwp instead of ptid_get_lwp.
7915
7916 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7917
7918         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7919         lwp_info instead of getting from inferior_ptid.
7920
7921 2017-04-27  Keith Seitz  <keiths@redhat.com>
7922
7923         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7924         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7925         (CV_CONVERSION_BADNESS): Define.
7926         (rank_one_type): Remove overly restrictive rvalue reference
7927         rank checks.
7928         Add cv-qualifier checks and subranks for type equality.
7929         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7930         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7931         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7932
7933 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7934
7935         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7936         count when creating the object.
7937
7938 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7939             Ulrich Weigand  <uweigand@de.ibm.com>
7940
7941         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7942         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7943         is used in AIX.
7944         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7945         (process_xcoff_symbol): Likewise.
7946         (scan_xcoff_symtab): Likewise.
7947
7948 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7949
7950         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7951         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7952         (ia64_access_reg): Use get_frame_register_unsigned.
7953         (ia64_access_rse_reg): Likewise.
7954         (ia64_libunwind_frame_prev_register): Likewise.
7955
7956 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7957
7958         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7959         * gdbarch.c: Regenerated.
7960         * gdbarch.h: Regenerated.
7961         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7962         visibility external.
7963         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7964         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7965         (enum cfa_how_kind): Move to ...
7966         (struct dwarf2_frame_state_reg_info): Likewise.
7967         (struct dwarf2_frame_state): Likewise.
7968         * dwarf2-frame.h: ... here.
7969         (dwarf2_frame_state_alloc_regs): New declaration.
7970         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7971         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7972
7973 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7974
7975         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7976         regcache_raw_read_unsigned.
7977         (xtensa_pseudo_register_write): Likewise.
7978
7979 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7980
7981         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7982         (nds32_pseudo_register_write): Likewise.
7983
7984 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7985
7986         * regcache.c (struct regcache) <readonly_p>: Change its type
7987         to bool.
7988         (regcache_xmalloc_1): Update parameter type and callers update.
7989
7990 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7991
7992         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7993         set_gdbarch_wchar_bit.
7994         * arm-tdep.c (arm_gdbarch_init): Likewise.
7995
7996 2017-04-25  Pedro Alves  <palves@redhat.com>
7997
7998         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7999         (BothAreRelocatable, memcopy, memmove): Don't define.
8000         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8001         macros.
8002
8003 2017-04-25  Pedro Alves  <palves@redhat.com>
8004
8005         * common/common-defs.h: Include "common/poison.h".
8006         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8007         and adjust.
8008         * common/poison.h: New file.
8009         * common/traits.h: Include <type_traits>.
8010         (Not, Or, Requires): New, moved from common/function-view.h.
8011
8012 2017-04-25  Pedro Alves  <palves@redhat.com>
8013
8014         * breakpoint.h (struct breakpoint): In-class initialize all
8015         fields.  Make boolean fields "bool".
8016         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8017         memset call and initializations no longer necessary.
8018
8019 2017-04-25  Pedro Alves  <palves@redhat.com>
8020
8021         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8022         reference.
8023         (pt_btrace_insn): New function.
8024         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8025
8026 2017-04-25  Pedro Alves  <palves@redhat.com>
8027
8028         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8029         "base" field and inherit from "bp_location" instead.  Add
8030         non-default ctor.
8031         (allocate_location_exception): Use new non-default ctor.
8032         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8033         (init_bp_location): Convert to ...
8034         (bp_location::bp_location): ... this new ctor, and remove memset
8035         call.
8036         (base_breakpoint_allocate_location): Use the new non-default ctor.
8037         * breakpoint.h (bp_location): Now a class.  Declare default and
8038         non-default ctors.  In-class initialize all members.
8039         (init_bp_location): Remove declaration.
8040
8041 2017-04-25  Pedro Alves  <palves@redhat.com>
8042
8043         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8044         assignment operator.
8045
8046 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8047
8048         * doublest.c (convert_doublest_to_floatformat): Call
8049         floatformat_totalsize_bytes.
8050
8051 2017-04-22  Tom Tromey  <tom@tromey.com>
8052
8053         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8054         ui_out_emit_list.
8055         * stack.c (print_frame): Use ui_out_emit_list.
8056         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8057         ui_out_emit_list.
8058         * mi/mi-main.c (print_one_inferior)
8059         (mi_cmd_data_list_register_names)
8060         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8061         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8062         ui_out_emit_list.
8063         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8064         (mi_output_solib_attribs): Use ui_out_emit_list,
8065         ui_out_emit_tuple.
8066         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8067         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8068         (mi_cmd_stack_list_args, list_args_or_locals): Use
8069         ui_out_emit_list.
8070         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8071         * breakpoint.c (print_solib_event, output_thread_groups): Use
8072         ui_out_emit_list.
8073
8074 2017-04-22  Tom Tromey  <tom@tromey.com>
8075
8076         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8077         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8078         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8079
8080 2017-04-22  Tom Tromey  <tom@tromey.com>
8081
8082         * tracepoint.c (tvariables_info_1)
8083         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8084
8085 2017-04-22  Tom Tromey  <tom@tromey.com>
8086
8087         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8088         annotate_arg_emitter.
8089         * breakpoint.c (print_mention_watchpoint)
8090         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8091         * annotate.h (struct annotate_arg_emitter): New.
8092
8093 2017-04-22  Tom Tromey  <tom@tromey.com>
8094
8095         * record-btrace.c (record_btrace_insn_history)
8096         (record_btrace_insn_history_range, record_btrace_call_history)
8097         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8098         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8099         ui_out_emit_tuple.
8100         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8101         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8102         * skip.c (skip_info): Use ui_out_emit_tuple.
8103         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8104         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8105         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8106         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8107         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8108         ui_out_emit_tuple.
8109         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8110         (output_register, mi_cmd_data_read_memory)
8111         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8112         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8113         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8114         Use ui_out_emit_tuple.
8115         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8116         ui_out_emit_tuple.
8117         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8118         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8119         * linux-thread-db.c (info_auto_load_libthread_db): Use
8120         ui_out_emit_tuple.
8121         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8122         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8123         * disasm.c (do_mixed_source_and_assembly_deprecated)
8124         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8125         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8126         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8127         * breakpoint.c (print_one_breakpoint_location)
8128         (print_one_breakpoint): Use ui_out_emit_tuple.
8129         * auto-load.c (print_script, info_auto_load_cmd): Use
8130         ui_out_emit_tuple.
8131         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8132
8133 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8134
8135         * thread.c (print_thread_info_1): Remove dead code.
8136
8137 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8138
8139         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8140         GDB_SELF_TEST.
8141         * arm-tdep.c (selftests::arm_record_test): Likewise.
8142
8143 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8144
8145         * regcache.c (regcache_restore): Remove argument 2.  Replace
8146         argument 3 with regcache.  Get register status from
8147         src->register_status and get register contents from
8148         register_buffer (src, regnum).
8149         (regcache_cpy): Update.
8150
8151 2017-04-19  Pedro Alves  <palves@redhat.com>
8152
8153         * gdbthread.h (thread): Add missing closing parenthesis in
8154         comment.
8155
8156 2017-04-19  Pedro Alves  <palves@redhat.com>
8157
8158         * common/refcounted-object.h: New file.
8159         * gdbthread.h: Include "common/refcounted-object.h".
8160         (thread_info): Inherit from refcounted_object and add comments.
8161         (thread_info::incref, thread_info::decref)
8162         (thread_info::m_refcount): Delete.
8163         (thread_info::deletable): Use the refcounted_object::refcount()
8164         method.
8165         * inferior.c (current_inferior_): Add comment.
8166         (set_current_inferior): Increment/decrement refcounts.
8167         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8168         not-deletable instead of comparing with the current inferior.
8169         (initialize_inferiors): Increment the initial inferior's refcount.
8170         * inferior.h (struct inferior): Forward declare.
8171         Include "common/refcounted-object.h".
8172         (current_inferior, set_current_inferior): Move declaration to
8173         before struct inferior's definition, and fix comment.
8174         (inferior): Inherit from refcounted_object.  Add comments.
8175         * thread.c (switch_to_thread_no_regs): Reference the thread's
8176         inferior pointer directly instead of doing a ptid lookup.
8177         (switch_to_no_thread): New function.
8178         (switch_to_thread(thread_info *)): New function, factored out
8179         from ...
8180         (switch_to_thread(ptid_t)): ... this.
8181         (restore_current_thread): Delete.
8182         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8183         fields, and add 'inf' field.
8184         (do_restore_current_thread_cleanup): Check whether old->inf is
8185         alive instead of looking up an inferior by ptid.  Use
8186         switch_to_thread and switch_to_no_thread.
8187         (restore_current_thread_cleanup_dtor): Use old->inf directly
8188         instead of lookup up an inferior by id.  Decref the inferior.
8189         Don't restore 'removable'.
8190         (make_cleanup_restore_current_thread): Same the inferior pointer
8191         in old, instead of the inferior number.  Incref the inferior.
8192         Don't save/clear 'removable'.
8193
8194 2017-04-19  Pedro Alves  <palves@redhat.com>
8195
8196         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8197         unittests/scoped_restore-selftests.c.
8198         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8199         * common/scoped_restore.h (scoped_restore_base): Make "class".
8200         (scoped_restore_base::release): New public method.
8201         (scoped_restore_base::scoped_restore_base): New protected ctor.
8202         (scoped_restore_base::m_saved_var): New protected field.
8203         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8204         scoped_restore_base base class instead of m_saved_var directly.
8205         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8206         (scoped_restore_tmpl::scoped_restore_tmpl(const
8207         scoped_restore_tmpl<T>&)): Likewise.
8208         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8209         method.
8210         (scoped_restore_tmpl::saved_var): New method.
8211         (scoped_restore_tmpl::m_saved_var): Delete.
8212         * inferior.h (inferior::detaching): Now a bool.
8213         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8214         cleanup.
8215         * unittests/scoped_restore-selftests.c: New file.
8216
8217 2017-04-19  Pedro Alves  <palves@redhat.com>
8218
8219         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8220         Re-sort in alphabetic order.
8221
8222 2017-04-18  Pedro Alves  <palves@redhat.com>
8223
8224         * xml-support.c (obstack_xml_printf): Delete.
8225         * xml-support.h (obstack_xml_printf): Delete.
8226
8227 2017-04-18  Pedro Alves  <palves@redhat.com>
8228
8229         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8230         vdebug, verror, body_text, start_element, end_element, name,
8231         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8232         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8233         is_xinclude>: Make private and add m_ prefix.
8234         (gdb_xml_parser::body_text): New method, based on ...
8235         (gdb_xml_body_text): ... this.  Adjust.
8236         (gdb_xml_parser::vdebug): New method, based on ...
8237         (gdb_xml_debug): ... this.  Adjust.
8238         (gdb_xml_parser::verror): New method, based on ...
8239         (gdb_xml_error): ... this.  Adjust.
8240         (gdb_xml_parser::start_element): New method, based on ...
8241         (gdb_xml_start_element): ... this.  Adjust.
8242         (gdb_xml_start_element_wrapper): Defer to
8243         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8244         (gdb_xml_parser::end_element): New method, based on ...
8245         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8246         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8247         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8248         (gdb_xml_parser::use_dtd): New method, based on ...
8249         (gdb_xml_use_dtd): ... this.  Adjust.
8250         (gdb_xml_parser::parse): New method, based on ...
8251         (gdb_xml_parse): ... this.  Adjust.
8252         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8253         (xinclude_start_include): Adjust to call the parser's name method.
8254         (xml_xinclude_default, xml_xinclude_start_doctype)
8255         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8256         method.
8257         (xml_process_xincludes): Adjust to call parser methods.
8258         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8259         declarations.
8260
8261 2017-04-18  Pedro Alves  <palves@redhat.com>
8262
8263         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8264         gdb::optional<std::string>.
8265         * xml-support.c: Include <string>.
8266         (scope_level::scope_level(scope_level &&))
8267         (scope_level::~scope_level): Delete.
8268         (scope_level::body): Now a std::string.
8269         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8270         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8271         parameter.
8272         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8273         (xinclude_parsing_data::output): Now a std::string reference.
8274         (xinclude_start_include): Adjust.
8275         (xml_xinclude_default): Adjust.
8276         (xml_process_xincludes): Add 'output' parameter, and return bool.
8277         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8278         and return bool.
8279         * xml-tdesc.c: Include <unordered_map> and <string>.
8280         (tdesc_xml_cache): Delete.
8281         (tdesc_xml_cache_s): Delete.
8282         (xml_cache): Now an std::unordered_map.
8283         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8284         (target_fetch_description_xml): Change return type to
8285         gdb::optional<std::string>, and adjust.
8286         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8287         (target_fetch_description_xml): Change return type to
8288         gdb::optional<std::string>.
8289
8290 2017-04-18  Pedro Alves  <palves@redhat.com>
8291
8292         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8293         unittests/optional-selftests.c.
8294         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8295         * unittests/optional-selftests.c: New file.
8296         * unittests/optional/assignment/1.cc: New file.
8297         * unittests/optional/assignment/2.cc: New file.
8298         * unittests/optional/assignment/3.cc: New file.
8299         * unittests/optional/assignment/4.cc: New file.
8300         * unittests/optional/assignment/5.cc: New file.
8301         * unittests/optional/assignment/6.cc: New file.
8302         * unittests/optional/assignment/7.cc: New file.
8303         * unittests/optional/cons/copy.cc: New file.
8304         * unittests/optional/cons/default.cc: New file.
8305         * unittests/optional/cons/move.cc: New file.
8306         * unittests/optional/cons/value.cc: New file.
8307         * unittests/optional/in_place.cc: New file.
8308         * unittests/optional/observers/1.cc: New file.
8309         * unittests/optional/observers/2.cc: New file.
8310
8311 2017-04-18  Pedro Alves  <palves@redhat.com>
8312
8313         * common/gdb_optional.h: Include common/traits.h.
8314         (in_place_t): New type.
8315         (in_place): New constexpr variable.
8316         (optional::optional): Remove member initialization of
8317         m_instantiated.
8318         (optional::optional(in_place_t...)): New constructor.
8319         (optional::~optional): Use reset.
8320         (optional::optional(const optional&)): New.
8321         (optional::optional(const optional&&)): New.
8322         (optional::optional(T &)): New.
8323         (optional::optional(T &&)): New.
8324         (operator::operator=(const optional &)): New.
8325         (operator::operator=(optional &&)): New.
8326         (operator::operator= (const T &))
8327         (operator::operator= (T &&))
8328         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8329         (operator::reset): New.
8330         (operator::m_instantiated):: Add in-class initializer.
8331         * common/traits.h: Include <type_traits>.
8332         (struct And): New types.
8333
8334 2017-04-18  Pedro Alves  <palves@redhat.com>
8335
8336         * xml-support.c: Include <vector>.
8337         (scope_level::scope_level(const gdb_xml_element *))
8338         (scope_level::scope_level(scope_level&&)): New.
8339         (scope_level::~scope_level): New.
8340         (scope_level_s): Delete.
8341         (gdb_xml_parser::scopes): Now a std::vector.
8342         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8343         Use std::vector.
8344         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8345         scope cleanup code.
8346         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8347         of the scopes member.  Use std::vector::emplace_back.
8348
8349 2017-04-18  Pedro Alves  <palves@redhat.com>
8350
8351         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8352         a bool.
8353         (gdb_xml_end_element): Change type of first parameter.
8354         (gdb_xml_cleanup): Rename to ...
8355         (gdb_xml_parser::~gdb_xml_parser): ... this.
8356         (gdb_xml_create_parser_and_cleanup): Delete with ...
8357         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8358         to this new ctor.
8359         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8360         using gdb_xml_create_parser_and_cleanup.
8361         (xinclude_parsing_data): Add ctor/dtor.
8362         (xml_xinclude_cleanup): Delete.
8363         (xml_process_xincludes): Create a local xinclude_parsing_data
8364         instead of heap-allocating one.  Create a local gdb_xml_parser
8365         instead of heap-allocating one with
8366         gdb_xml_create_parser_and_cleanup.
8367
8368 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8369
8370         PR threads/20743
8371         * fbsd-nat.c (resume_one_thread_cb): Remove.
8372         (resume_all_threads_cb): Remove.
8373         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8374         iterate_over_threads.
8375
8376 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8377
8378         * NEWS: Create a new section for the next release branch.
8379         Rename the section of the current branch, now that it has
8380         been cut.
8381
8382 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8383
8384         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8385         * version.in: Bump version to 8.0.50.DATE-git.
8386
8387 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8388
8389         PR gdb/21385
8390         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8391         independently of the host, and fix build breakage on Cygwin.
8392
8393 2017-04-13  Pedro Alves  <palves@redhat.com>
8394
8395         * inferior.c (free_inferior): Convert to ...
8396         (inferior::~inferior): ... this dtor.
8397         (inferior::inferior): New ctor, factored out from ...
8398         (add_inferior_silent): ... here.  Allocate the inferior with a new
8399         expression.
8400         (delete_inferior): Call delete instead of free_inferior.
8401         * inferior.h (gdb_environ, continuation): Forward declare.
8402         (inferior): Now a class.  Add in-class initialization to all
8403         members.  Make boolean fields bool, except 'detaching'.
8404         (inferior::inferior): New explicit ctor.
8405         (inferior::~inferior): New.
8406
8407 2017-04-13  Pedro Alves  <palves@redhat.com>
8408
8409         * inferior.c (init_inferior_list): Delete.
8410         * inferior.h (init_inferior_list): Delete.
8411
8412 2017-04-13  Pedro Alves  <palves@redhat.com>
8413
8414         PR threads/13217
8415         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8416         (top level): Call it twice, with different thread sets.
8417
8418 2017-04-13  Pedro Alves  <palves@redhat.com>
8419
8420         * thread.c: Include <algorithm>.
8421         (thread_array_cleanup): Delete.
8422         (scoped_inc_dec_ref): New class.
8423         (live_threads_count): New function.
8424         (set_thread_refcount): Delete.
8425         (tp_array_compar_ascending): Now a bool.
8426         (tp_array_compar): Convert to a std::sort comparison function.
8427         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8428         and live_threads_count.
8429
8430 2017-04-13  Pedro Alves  <palves@redhat.com>
8431
8432         * infrun.c (follow_fork_inferior): Also switch the current
8433         inferior.
8434
8435 2017-04-13  Pedro Alves  <palves@redhat.com>
8436
8437         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8438         before calling create_internal_breakpoint.
8439
8440 2017-04-13  Pedro Alves  <palves@redhat.com>
8441
8442         * fork-child.c (execv_argv): New class.
8443         (breakup_args): Refactored as ...
8444         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8445         Copy arguments to storage and replace separators with NULL
8446         terminators in place.
8447         (escape_bang_in_quoted_argument): Adjust to return bool.
8448         (execv_argv::execv_argv): New ctor.
8449         (execv_argv::init_for_shell): New method, factored out from
8450         fork_inferior.  Don't strdup strings into the vector.
8451         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8452         Remove free_vector_argv call.
8453
8454 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8455
8456         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8457         tdep->rx_psw_type.
8458
8459 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8460
8461         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8462         * rx-tdep.c (rx_gdbarch_init): Likewise.
8463
8464 2017-04-13  Pedro Alves  <palves@redhat.com>
8465
8466         * breakpoint.h (struct breakpoint): Reindent.
8467
8468 2017-04-13  Pedro Alves  <palves@redhat.com>
8469
8470         * breakpoint.c (bp_location): Rename to ...
8471         (bp_locations): ... this.  All references updated.
8472         (bp_location_count): Rename to ...
8473         (bp_locations_count): ... this.  All references updated.
8474         (bp_location_placed_address_before_address_max): Rename to ...
8475         (bp_locations_placed_address_before_address_max): ... this.  All
8476         references updated.
8477         (bp_location_shadow_len_after_address_max): Rename to ...
8478         (bp_locations_shadow_len_after_address_max): ... this.  All
8479         references updated.
8480         (bp_location_compare_addrs): Rename to ...
8481         (bp_locations_compare_addrs): ... this.  All references updated.
8482         (bp_location_compare):Rename to ...
8483         (bp_locations_compare): ... this.  All references updated.
8484         (bp_location_target_extensions_update): Rename to ...
8485         (bp_locations_target_extensions_update): ... this.  All references
8486         updated.
8487
8488 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8489
8490         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8491         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8492         'sgtty.h'.
8493         * common/gdb_termios.h: New file, with parts of "terminal.h".
8494         * inflow.c: Include "gdb_termios.h".
8495         * ser-unix.c: Include "gdb_termios.h".
8496         * terminal.h: Move terminal-related defines to
8497         "common/gdb_termios.h".
8498
8499 2017-04-12  Tom Tromey  <tom@tromey.com>
8500
8501         * probe.c (parse_probes): Update.
8502         * location.h (delete_event_location): Don't declare.
8503         (event_location_deleter::operator()): Update.
8504         * location.c (event_location_deleter::operator()): Rename from
8505         delete_event_location.
8506         * linespec.h (linespec_result) <location>: Change type to
8507         event_location_up.
8508         * linespec.c (canonicalize_linespec, event_location_to_sals)
8509         (decode_objc): Update.
8510         (linespec_result): Don't call delete_event_location.
8511         * breakpoint.c (create_breakpoints_sal)
8512         (bkpt_probe_create_sals_from_location)
8513         (strace_marker_create_sals_from_location): Update.
8514
8515 2017-04-12  Tom Tromey  <tom@tromey.com>
8516
8517         * linespec.h (struct linespec_result): Add constructor and
8518         destructor.
8519         (init_linespec_result, destroy_linespec_result)
8520         (make_cleanup_destroy_linespec_result): Don't declare.
8521         * linespec.c (init_linespec_result): Remove.
8522         (linespec_result::~linespec_result): Rename from
8523         destroy_linespec_result.  Update.
8524         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8525         Remove.
8526         * breakpoint.c (create_breakpoint, break_range_command)
8527         (decode_location_default): Update.
8528         * ax-gdb.c (agent_command_1): Update.
8529
8530 2017-04-12  Tom Tromey  <tom@tromey.com>
8531
8532         * remote.c (remote_download_tracepoint): Update.
8533         * python/py-breakpoint.c (bppy_get_location): Update.
8534         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8535         (gdbscm_breakpoint_location): Update.
8536         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8537         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8538         Change type to event_location_up.
8539         * breakpoint.c (create_overlay_event_breakpoint)
8540         (create_longjmp_master_breakpoint)
8541         (create_std_terminate_master_breakpoint)
8542         (create_exception_master_breakpoint)
8543         (breakpoint_event_location_empty_p, print_breakpoint_location)
8544         (print_one_breakpoint_location, create_thread_event_breakpoint)
8545         (init_breakpoint_sal, create_breakpoint)
8546         (print_recreate_ranged_breakpoint, break_range_command)
8547         (init_ada_exception_breakpoint, say_where): Update.
8548         (base_breakpoint_dtor): Don't call delete_event_location.
8549         (bkpt_print_recreate, tracepoint_print_recreate)
8550         (dprintf_print_recreate, update_static_tracepoint)
8551         (breakpoint_re_set_default): Update.
8552
8553 2017-04-12  Tom Tromey  <tom@tromey.com>
8554
8555         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8556         type of "to_do".  Update.
8557         (compute_stack_depth): Use std::vector.
8558
8559 2017-04-12  Tom Tromey  <tom@tromey.com>
8560
8561         * printcmd.c (find_instruction_backward): Use std::vector.
8562
8563 2017-04-12  Tom Tromey  <tom@tromey.com>
8564
8565         * symfile.c (objfilep): Remove typedef.
8566         (reread_symbols): Use a std::vector.
8567
8568 2017-04-12  Tom Tromey  <tom@tromey.com>
8569
8570         * mi/mi-main.c (exec_direction_forward): Remove.
8571         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8572         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8573         scoped_restore.
8574         * guile/guile.c (guile_repl_command, guile_command)
8575         (gdbscm_execute_gdb_command): Use scoped_restore.
8576         * go-exp.y (go_parse): Use scoped_restore.
8577         * d-exp.y (d_parse): Use scoped_restore.
8578         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8579         * c-exp.y (c_parse): Use scoped_restore.
8580
8581 2017-04-12  Tom Tromey  <tom@tromey.com>
8582
8583         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8584         (mi_parse): Update return type.
8585         (mi_parse_free): Remove.
8586         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8587         (mi_parse::~mi_parse): Rename from mi_parse_free.
8588         (mi_parse_cleanup): Remove.
8589         (mi_parse): Return a unique_ptr.  Use new.
8590         * mi/mi-main.c (mi_execute_command): Update.
8591
8592 2017-04-12  Tom Tromey  <tom@tromey.com>
8593
8594         * location.c (explicit_location_lex_one): Return a
8595         unique_xmalloc_ptr.
8596         (string_to_explicit_location): Update.  Remove cleanups.
8597
8598 2017-04-12  Tom Tromey  <tom@tromey.com>
8599
8600         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8601         (compare_value_and_voffset): Change type.  Update.
8602         (compute_vtable_size): Change type of "offset_vec".
8603         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8604         (gnuv3_get_typeid): Remove extraneous declaration.
8605
8606 2017-04-12  Tom Tromey  <tom@tromey.com>
8607
8608         * charset.h (wchar_iterator): Fix comment.
8609
8610 2017-04-12  Tom Tromey  <tom@tromey.com>
8611
8612         * charset.c (iconv_wrapper): New class.
8613         (cleanup_iconv): Remove.
8614         (convert_between_encodings): Use it.
8615
8616 2017-04-12  Tom Tromey  <tom@tromey.com>
8617
8618         * symfile.h (increment_reading_symtab): Update type.
8619         * symfile.c (decrement_reading_symtab): Remove.
8620         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8621         * psymtab.c (psymtab_to_symtab): Update.
8622         * dwarf2read.c (dw2_instantiate_symtab): Update.
8623
8624 2017-04-12  Tom Tromey  <tom@tromey.com>
8625
8626         * jit.c (struct jit_reader): Declare separately.  Add constructor
8627         and destructor.  Change type of "handle".
8628         (loaded_jit_reader): Define separately.
8629         (jit_reader_load): Update.  New "new".
8630         (jit_reader_unload_command): Use "delete".
8631         * gdb-dlfcn.h (struct dlclose_deleter): New.
8632         (gdb_dlhandle_up): New typedef.
8633         (gdb_dlopen, gdb_dlsym): Update types.
8634         (gdb_dlclose): Remove.
8635         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8636         (gdb_dlsym): Change type of "handle".
8637         (make_cleanup_dlclose): Remove.
8638         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8639         * compile/compile-c-support.c (load_libcc): Update.
8640
8641 2017-04-12  Tom Tromey  <tom@tromey.com>
8642
8643         * symtab.h (find_pcs_for_symtab_line): Change return type.
8644         * symtab.c (find_pcs_for_symtab_line): Change return type.
8645         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8646         type of "vec".  Update.
8647         (ltpy_get_pcs_for_line): Update.
8648         * linespec.c (decode_digits_ordinary): Update.
8649
8650 2017-04-12  Tom Tromey  <tom@tromey.com>
8651
8652         * tracepoint.c (actions_command): Update.
8653         * python/python.c (python_command, python_interactive_command):
8654         Update.
8655         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8656         * guile/guile.c (guile_command): Update.
8657         * defs.h (read_command_lines, read_command_lines_1): Return
8658         command_line_up.
8659         (command_lines_deleter): New struct.
8660         (command_line_up): New typedef.
8661         * compile/compile.c (compile_code_command)
8662         (compile_print_command): Update.
8663         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8664         command_line_up.
8665         (make_cleanup_free_command_lines): Remove.
8666         * cli/cli-script.c (get_command_line, read_command_lines_1)
8667         (copy_command_lines): Return command_line_up.
8668         (while_command, if_command, read_command_lines, define_command)
8669         (document_command): Update.
8670         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8671         Remove.
8672         * breakpoint.h (breakpoint_set_commands): Change type of
8673         "commands".
8674         * breakpoint.c (breakpoint_set_commands): Change type of
8675         "commands".  Update.
8676         (do_map_commands_command, update_dprintf_command_list)
8677         (create_tracepoint_from_upload): Update.
8678
8679 2017-04-12  Tom Tromey  <tom@tromey.com>
8680
8681         * tracepoint.c (scope_info): Update.
8682         * spu-tdep.c (spu_catch_start): Update.
8683         * python/python.c (gdbpy_decode_line): Update.
8684         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8685         * python/py-breakpoint.c (bppy_init): Update.
8686         * probe.c (parse_probes): Update.
8687         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8688         * location.h (event_location_deleter): New struct.
8689         (event_location_up): New typedef.
8690         (new_linespec_location, new_address_location, new_probe_location)
8691         (new_explicit_location, copy_event_location)
8692         (string_to_event_location, string_to_event_location_basic)
8693         (string_to_explicit_location): Update return type.
8694         (make_cleanup_delete_event_location): Remove.
8695         * location.c (new_linespec_location, new_address_location)
8696         (new_probe_location, new_explicit_location, copy_event_location):
8697         Return event_location_up.
8698         (delete_event_location_cleanup)
8699         (make_cleanup_delete_event_location): Remove.
8700         (string_to_explicit_location, string_to_event_location_basic)
8701         (string_to_event_location): Return event_location_up.
8702         * linespec.c (canonicalize_linespec, event_location_to_sals)
8703         (decode_line_with_current_source)
8704         (decode_line_with_last_displayed, decode_objc): Update.
8705         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8706         * completer.c (location_completer): Update.
8707         * cli/cli-cmds.c (edit_command, list_command): Update.
8708         * breakpoint.c (create_overlay_event_breakpoint)
8709         (create_longjmp_master_breakpoint)
8710         (create_std_terminate_master_breakpoint)
8711         (create_exception_master_breakpoint)
8712         (create_thread_event_breakpoint): Update.
8713         (init_breakpoint_sal): Update.  Remove some dead code.
8714         (create_breakpoint_sal): Change type of "location".  Update.
8715         (create_breakpoints_sal, create_breakpoint, break_command_1)
8716         (dprintf_command, break_range_command, until_break_command)
8717         (init_ada_exception_breakpoint)
8718         (strace_marker_create_sals_from_location)
8719         (update_static_tracepoint, trace_command, ftrace_command)
8720         (strace_command, create_tracepoint_from_upload): Update.
8721         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8722         * ax-gdb.c (agent_command_1): Update.
8723
8724 2017-04-12  Pedro Alves  <palves@redhat.com>
8725
8726         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8727         * configure.tgt: Handle i[34567]86-*-go32* and
8728         i[34567]86-*-msdosdjgpp*.
8729         * i386-tdep.c (i386_svr4_reg_to_regnum):
8730         Make extern.
8731         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8732         i386-go32-tdep.c.
8733         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8734         * i386-go32-tdep.c: New file.
8735         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8736         declarations.
8737
8738 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8739
8740         * aix-thread.c (pd_status2str): Change return type to const char *.
8741
8742 2017-04-12  Pedro Alves  <palves@redhat.com>
8743
8744         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8745         calls to set_gdbarch_gnu_triplet_regexp.
8746
8747 2017-04-12  Pedro Alves  <palves@redhat.com>
8748
8749         PR gdb/21323
8750         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8751         New enum value.
8752         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8753         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8754         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8755         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8756         * gdbarch.h, gdbarch.c: Regenerate.
8757         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8758         gdbarch_wchar_bit and gdbarch_wchar_signed.
8759         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8760         * arm-tdep.c (arm_gdbarch_init): Likewise.
8761         * avr-tdep.c (avr_gdbarch_init): Likewise.
8762         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8763         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8764         * i386-tdep.c (i386_go32_init_abi): Likewise.
8765         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8766         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8767         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8768         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8769         * sh-tdep.c (sh_gdbarch_init): Likewise.
8770         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8771         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8772         * windows-tdep.c (windows_init_abi): Likewise.
8773         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8774
8775 2017-04-12  Pedro Alves  <palves@redhat.com>
8776
8777         PR c++/21323
8778         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8779         cplus_primitive_type_char32_t>: New enum values.
8780         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8781         and cplus_primitive_type_char32_t.
8782         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8783         32, use the archtecture's built-in type for char16_t and char32_t,
8784         respectively.  Otherwise, fallback to init_integer_type as before,
8785         but make the type unsigned, and issue a complaint.
8786         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8787
8788 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8789
8790         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8791         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8792
8793 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8794
8795         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8796         'const char *'.
8797
8798 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8799
8800         * common/common-utils.c (free_vector_argv): New function.
8801         * common/common-utils.h: Include <vector>.
8802         (free_vector_argv): New prototype.
8803         * darwin-nat.c (darwin_create_inferior): Rewrite function
8804         prototype in order to constify "exec_file" and accept a
8805         "std::string" for "allargs".
8806         * fork-child.c: Include <vector>.
8807         (breakup_args): Rewrite function, using C++.
8808         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8809         and accept "std::string" for "allargs".  Update the code to
8810         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8811         and "execvp".
8812         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8813         order to constify "exec_file" and accept a "std::string" for
8814         "allargs".
8815         * go32-nat.c (go32_create_inferior): Likewise.
8816         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8817         * infcmd.c (run_command_1): Constify "exec_file".  Use
8818         "std::string" for inferior arguments.
8819         * inferior.h (fork_inferior): Update prototype.
8820         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8821         prototype in order to constify "exec_file" and accept a
8822         "std::string" for "allargs".
8823         * nto-procfs.c (procfs_create_inferior): Likewise.
8824         * procfs.c (procfs_create_inferior): Likewise.
8825         * remote-sim.c (gdbsim_create_inferior): Likewise.
8826         * remote.c (extended_remote_run): Update code to accept
8827         "std::string" as argument.
8828         (extended_remote_create_inferior): Rewrite function prototype in
8829         order to constify "exec_file" and accept a "std::string" for
8830         "allargs".
8831         * rs6000-nat.c (super_create_inferior): Likewise.
8832         (rs6000_create_inferior): Likewise.
8833         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8834         * windows-nat.c (windows_create_inferior): Likewise.
8835
8836 2017-04-11  Pedro Alves  <palves@redhat.com>
8837
8838         * thread.c: Fix whitespace throughout.
8839
8840 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8841
8842         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8843
8844 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8845
8846         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8847
8848 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8849
8850         PR gdb/21364
8851         * osdata.c (info_osdata): Check if 'type' is an empty string
8852         instead of NULL.
8853
8854 2017-04-10  Pedro Alves  <palves@redhat.com>
8855
8856         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8857         (ptid_to_global_thread_id, in_thread_list)
8858         (do_captured_list_thread_ids, set_resumed, set_running)
8859         (set_executing, set_stop_requested, finish_thread_state)
8860         (validate_registers_access, can_access_registers_ptid)
8861         (print_thread_info_1, switch_to_thread)
8862         (do_restore_current_thread_cleanup)
8863         (make_cleanup_restore_current_thread, thread_command)
8864         (thread_name_command): Use operator== instead of ptid_equal.
8865
8866 2017-04-10  Pedro Alves  <palves@redhat.com>
8867
8868         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8869         (current_thread_cleanup_chain): Delete.
8870         (restore_current_thread_cleanup_dtor)
8871         (make_cleanup_restore_current_thread): Remove references to
8872         current_thread_cleanup_chain.
8873
8874 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8875
8876         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8877         REG_UNKNOWN.
8878
8879 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8880
8881         PR gdb/19942
8882         * gdbthread.h (thread_info::deletable): New method.
8883         (thread_info::incref): New method.
8884         (thread_info::decref): New method.
8885         (thread_info::refcount): Move it to private.
8886         * infrun.c (save_stop_context): Call inc_refcount.
8887         (release_stop_context_cleanup): Likewise.
8888         * thread.c (set_thread_exited): New function.
8889         (init_thread_list): Delete "tp" only it is deletable, otherwise
8890         call set_thread_exited.
8891         (delete_thread_1): Call set_thread_exited.
8892         (current_thread_cleanup) <inferior_pid>: Remove.
8893         <thread>: New field.
8894         (restore_current_thread_ptid_changed): Removed.
8895         (do_restore_current_thread_cleanup): Adjust.
8896         (restore_current_thread_cleanup_dtor): Don't call
8897         find_thread_ptid.
8898         (set_thread_refcount): Use dec_refcount.
8899         (make_cleanup_restore_current_thread): Adjust.
8900         (thread_apply_all_command): Call inc_refcount.
8901         (_initialize_thread): Don't call
8902         observer_attach_thread_ptid_changed.
8903
8904 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8905
8906         * thread.c (delete_thread_1): Hoist code on marking thread as
8907         exited.
8908
8909 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8910
8911         * windows-nat.c (windows_detach): Initialize ptid with
8912         minus_one_ptid.
8913
8914 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8915
8916         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8917
8918 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8919
8920         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8921         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8922         (bfin_pseudo_register_write): Likewise
8923
8924 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8925
8926         * common/ptid.h (struct ptid): Change to...
8927         (class ptid_t): ... this.
8928         <ptid_t>: New constructors.
8929         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8930         matches>: New methods.
8931         <make_null, make_minus_one>: New static methods.
8932         <pid>: Rename to...
8933         <m_pid>: ...this.
8934         <lwp>: Rename to...
8935         <m_lwp>: ...this.
8936         <tid>: Rename to...
8937         <m_tid>: ...this.
8938         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8939         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8940         as references, move comment to class ptid_t.
8941         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8942         ptid_t static methods.
8943         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8944         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8945         Take ptid arguments as references, implement using ptid_t methods.
8946         * unittests/ptid-selftests.c: New file.
8947         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8948         unittests/ptid-selftests.c.
8949         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8950
8951 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8952
8953         * python/python.c (python_run_simple_file): Cast mode literal to
8954         non-const char pointer as expected by PyFile_FromString.
8955
8956 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8957
8958         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8959         minus_one_ptid and null_ptid.
8960
8961 2017-04-05  Pedro Alves  <palves@redhat.com>
8962
8963         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8964         * configure: Regenerate.
8965
8966 2017-04-05  Pedro Alves  <palves@redhat.com>
8967
8968         * ada-exp.y (yyerror): Constify.
8969         * ada-lang.c (bound_name, get_selections)
8970         (ada_variant_discrim_type)
8971         (ada_variant_discrim_name, ada_value_struct_elt)
8972         (ada_lookup_struct_elt_type, is_unchecked_variant)
8973         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8974         (catch_ada_exception_command_split)
8975         (catch_ada_assert_command_split, catch_assert_command)
8976         (ada_op_name): Constify.
8977         * ada-lang.h (ada_yyerror, get_selections)
8978         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8979         * arc-tdep.c (arc_print_frame_cache): Constify.
8980         * arm-tdep.c (arm_skip_stub): Constify.
8981         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8982         (gen_aggregate_elt_ref): Constify.
8983         * bcache.c (print_bcache_statistics): Constify.
8984         * bcache.h (print_bcache_statistics): Constify.
8985         * break-catch-throw.c (catch_exception_command_1):
8986         * breakpoint.c (struct ep_type_description::description):
8987         Constify.
8988         (add_solib_catchpoint): Constify.
8989         (catch_fork_command_1): Add cast.
8990         (add_catch_command): Constify.
8991         * breakpoint.h (add_catch_command, add_solib_catchpoint):
8992         Constify.
8993         * bsd-uthread.c (bsd_uthread_state): Constify.
8994         * buildsym.c (patch_subfile_names): Constify.
8995         * buildsym.h (next_symbol_text_func, patch_subfile_names):
8996         Constify.
8997         * c-exp.y (yyerror): Constify.
8998         (token::oper): Constify.
8999         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9000         * c-varobj.c (cplus_describe_child): Constify.
9001         * charset.c (find_charset_names): Add cast.
9002         (find_charset_names): Constify array and add const_cast.
9003         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9004         (edit_command): Constify.
9005         * cli/cli-decode.c (lookup_cmd): Constify.
9006         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9007         Constify.
9008         (struct dump_context): Constify.
9009         (add_dump_command, restore_command): Constify.
9010         * cli/cli-script.c (get_command_line): Constify.
9011         * cli/cli-script.h (get_command_line): Constify.
9012         * cli/cli-utils.c (check_for_argument): Constify.
9013         * cli/cli-utils.h (check_for_argument): Constify.
9014         * coff-pe-read.c (struct read_pe_section_data): Constify.
9015         * command.h (lookup_cmd): Constify.
9016         * common/print-utils.c (decimal2str): Constify.
9017         * completer.c (gdb_print_filename): Constify.
9018         * corefile.c (set_gnutarget): Constify.
9019         * cp-name-parser.y (yyerror): Constify.
9020         * cp-valprint.c (cp_print_class_member): Constify.
9021         * cris-tdep.c (cris_register_name, crisv32_register_name):
9022         Constify.
9023         * d-exp.y (yyerror): Constify.
9024         (struct token::oper): Constify.
9025         * d-lang.h (d_yyerror): Constify.
9026         * dbxread.c (struct header_file_location::name): Constify.
9027         (add_old_header_file, add_new_header_file, last_function_name)
9028         (dbx_next_symbol_text, add_bincl_to_list)
9029         (find_corresponding_bincl_psymtab, set_namestring)
9030         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9031         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9032         * defs.h (command_line_input, print_address_symbolic)
9033         (deprecated_readline_begin_hook): Constify.
9034         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9035         Constify.
9036         * event-top.c (handle_line_of_input): Constify and add cast.
9037         * exceptions.c (catch_errors): Constify.
9038         * exceptions.h (catch_errors): Constify.
9039         * expprint.c (print_subexp_standard, op_string, op_name)
9040         (op_name_standard, dump_raw_expression, dump_raw_expression):
9041         * expression.h (op_name, op_string, dump_raw_expression):
9042         Constify.
9043         * f-exp.y (yyerror): Constify.
9044         (struct token::oper): Constify.
9045         (struct f77_boolean_val::name): Constify.
9046         * f-lang.c (f_word_break_characters): Constify.
9047         * f-lang.h (f_yyerror): Constify.
9048         * fork-child.c (fork_inferior): Add cast.
9049         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9050         (new_variant): Constify.
9051         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9052         * gdbarch.c: Regenerate.
9053         * gdbcore.h (set_gnutarget): Constify.
9054         * go-exp.y (yyerror): Constify.
9055         (token::oper): Constify.
9056         * go-lang.h (go_yyerror): Constify.
9057         * go32-nat.c (go32_sysinfo): Constify.
9058         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9059         * guile/scm-cmd.c (cmdscm_function): Constify.
9060         * guile/scm-param.c (pascm_param_value): Constify.
9061         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9062         (h8300sx_register_name): Constify.
9063         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9064         Constify.
9065         * ia64-tdep.c (ia64_register_names): Constify.
9066         * infcmd.c (construct_inferior_arguments): Constify.
9067         (path_command, attach_post_wait): Constify.
9068         * language.c (show_range_command, show_case_command)
9069         (unk_lang_error): Constify.
9070         * language.h (language_defn::la_error)
9071         (language_defn::la_name_of_this): Constify.
9072         * linespec.c (decode_line_2): Constify.
9073         * linux-thread-db.c (thread_db_err_str): Constify.
9074         * lm32-tdep.c (lm32_register_name): Constify.
9075         * m2-exp.y (yyerror): Constify.
9076         * m2-lang.h (m2_yyerror): Constify.
9077         * m32r-tdep.c (m32r_register_names): Constify and make static.
9078         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9079         * m88k-tdep.c (m88k_register_name): Constify.
9080         * macroexp.c (appendmem): Constify.
9081         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9082         (upgrade_type, parse_external, parse_partial_symbols)
9083         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9084         (new_symbol): Constify.
9085         * memattr.c (mem_info_command): Constify.
9086         * mep-tdep.c (register_name_from_keyword): Constify.
9087         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9088         Constify.
9089         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9090         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9091         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9092         cast.
9093         (mi_execute_async_cli_command): Constify.
9094         * mips-tdep.c (mips_register_name): Constify.
9095         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9096         (am33_register_name, am33_2_register_name)
9097         * moxie-tdep.c (moxie_register_names): Constify.
9098         * nat/linux-osdata.c (osdata_type): Constify fields.
9099         * nto-tdep.c (nto_parse_redirection): Constify.
9100         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9101         (lookup_child_selector): Constify.
9102         (objc_methcall::name): Constify.
9103         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9104         (lookup_struct_typedef): Constify.
9105         * objfiles.c (pc_in_section): Constify.
9106         * objfiles.h (pc_in_section): Constify.
9107         * p-exp.y (struct token::oper): Constify.
9108         (yyerror): Constify.
9109         * p-lang.h (pascal_yyerror): Constify.
9110         * parser-defs.h (op_name_standard): Constify.
9111         (op_print::string): Constify.
9112         (exp_descriptor::op_name): Constify.
9113         * printcmd.c (print_address_symbolic): Constify.
9114         * psymtab.c (print_partial_symbols): Constify.
9115         * python/py-breakpoint.c (stop_func): Constify.
9116         (bppy_get_expression): Constify.
9117         * python/py-cmd.c (cmdpy_completer::name): Constify.
9118         (cmdpy_function): Constify.
9119         * python/py-event.c (evpy_add_attribute)
9120         (gdbpy_initialize_event_generic): Constify.
9121         * python/py-event.h (evpy_add_attribute)
9122         (gdbpy_initialize_event_generic): Constify.
9123         * python/py-evts.c (add_new_registry): Constify.
9124         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9125         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9126         * python/py-inferior.c (get_buffer): Add cast.
9127         * python/py-param.c (parm_constant::name): Constify.
9128         * python/py-unwind.c (fprint_frame_id): Constify.
9129         * python/python.c (gdbpy_parameter_value): Constify.
9130         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9131         * remote.c (memory_packet_config::name): Constify.
9132         (show_packet_config_cmd, remote_write_bytes)
9133         (remote_buffer_add_string):
9134         * reverse.c (exec_reverse_once): Constify.
9135         * rs6000-tdep.c (variant::name, variant::description): Constify.
9136         * rust-exp.y (rustyyerror): Constify.
9137         * rust-lang.c (rust_op_name): Constify.
9138         * rust-lang.h (rustyyerror): Constify.
9139         * serial.h (serial_ops::name): Constify.
9140         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9141         (sh_sh3e_register_name, sh_sh2e_register_name)
9142         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9143         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9144         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9145         (sh_sh4al_dsp_register_name): Constify.
9146         * sh64-tdep.c (sh64_register_name): Constify.
9147         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9148         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9149         * stabsread.c (patch_block_stabs, read_type_number)
9150         (ref_map::stabs, ref_add, process_reference)
9151         (symbol_reference_defined, define_symbol, define_symbol)
9152         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9153         (read_one_struct_field, read_struct_fields, read_baseclasses)
9154         (read_tilde_fields, read_struct_type, read_array_type)
9155         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9156         (read_huge_number, read_range_type, read_args, common_block_start)
9157         (find_name_end): Constify.
9158         * stabsread.h (common_block_start, define_symbol)
9159         (process_one_symbol, symbol_reference_defined, ref_add):
9160         * symfile.c (get_section_index, add_symbol_file_command):
9161         * symfile.h (get_section_index): Constify.
9162         * target-descriptions.c (tdesc_type::name): Constify.
9163         (tdesc_free_type): Add cast.
9164         * target.c (find_default_run_target):
9165         (add_deprecated_target_alias, find_default_run_target)
9166         (target_announce_detach): Constify.
9167         (do_option): Constify.
9168         * target.h (add_deprecated_target_alias): Constify.
9169         * thread.c (print_thread_info_1): Constify.
9170         * top.c (deprecated_readline_begin_hook, command_line_input):
9171         Constify.
9172         (init_main): Add casts.
9173         * top.h (handle_line_of_input): Constify.
9174         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9175         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9176         (tfind_command): Rename to ...
9177         (tfind_command_1): ... this and constify.
9178         (tfind_command): New function.
9179         (tfind_end_command, tfind_start_command): Adjust.
9180         (encode_source_string): Constify.
9181         * tracepoint.h (encode_source_string): Constify.
9182         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9183         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9184         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9185         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9186         * tui/tui-win.c (parse_scrolling_args): Constify.
9187         * tui/tui-windata.c (tui_erase_data_content): Constify.
9188         * tui/tui-windata.h (tui_erase_data_content): Constify.
9189         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9190         * tui/tui.c (tui_enable): Add cast.
9191         * utils.c (defaulted_query): Constify.
9192         (init_page_info): Add cast.
9193         (puts_debug, subset_compare): Constify.
9194         * utils.h (subset_compare): Constify.
9195         * varobj.c (varobj_format_string): Constify.
9196         * varobj.h (varobj_format_string): Constify.
9197         * vax-tdep.c (vax_register_name): Constify.
9198         * windows-nat.c (windows_detach): Constify.
9199         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9200         * xml-support.c (gdb_xml_end_element): Constify.
9201         * xml-tdesc.c (tdesc_start_reg): Constify.
9202         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9203         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9204         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9205
9206 2017-04-05  Pedro Alves  <palves@redhat.com>
9207
9208         * proc-api.c (struct trans): Constify.
9209         (procfs_note): Constify.
9210         * proc-events.c (struct trans, syscall_table):
9211         * proc-flags.c (struct trans): Constify.
9212         * proc-utils.h (procfs_note): Constify.
9213         * proc-why.c (struct trans): Constify.
9214         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9215         (procfs_detach): Constify.
9216         * sol-thread.c (struct string_map): Constify.
9217         (td_err_string, td_state_string): Constify.
9218
9219 2017-04-05  Pedro Alves  <palves@redhat.com>
9220
9221         * proc-api.c (procfs_filename): Don't initialize
9222         procfs_filename.
9223         (prepare_to_trace): Assume procfs_filename is non-NULL.
9224         (_initialize_proc_api): Give procfs_filename a default value here.
9225
9226 2017-04-05  Pedro Alves  <palves@redhat.com>
9227
9228         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9229         'cond_string' parameter.
9230         (extract_exception_regexp): Constify 'string' parameter.
9231         (catch_exception_command_1): Constify.
9232         * breakpoint.c (init_catchpoint)
9233         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9234         parameter.
9235         (ep_parse_optional_if_clause, catch_fork_command_1)
9236         (catch_exec_command_1): Constify.
9237         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9238         parameter.
9239         (ep_parse_optional_if_clause): Constify.
9240         * cli/cli-utils.c (remove_trailing_whitespace)
9241         (check_for_argument): Constify.
9242         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9243         non-const overload.
9244         (check_for_argument): Likewise.
9245
9246 2017-04-05  Pedro Alves  <palves@redhat.com>
9247
9248         * event-top.c (command_line_handler): Add cast to execute_command
9249         call.
9250         * record-btrace.c (cmd_record_btrace_bts_start)
9251         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9252         (cmd_record_btrace_start): Add cast to execute_command call.
9253         * record-full.c (record_full_goto_insn):
9254         * record.c (record_start, record_stop): Add cast to
9255         execute_command_to_string calls.
9256         (cmd_record_start): Add cast to execute_command calls.
9257
9258 2017-04-05  Pedro Alves  <palves@redhat.com>
9259
9260         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9261         static inline function.
9262         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9263         array and use gdb_PyArg_ParseTupleAndKeywords.
9264         * python/py-cmd.c (cmdpy_init): Likewise.
9265         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9266         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9267         (infpy_search_memory): Likewise.
9268         * python/py-objfile.c (objfpy_add_separate_debug_file)
9269         (gdbpy_lookup_objfile): Likewise.
9270         * python/py-symbol.c (gdbpy_lookup_symbol)
9271         (gdbpy_lookup_global_symbol): Likewise.
9272         * python/py-type.c (gdbpy_lookup_type): Likewise.
9273         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9274         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9275         Likewise.
9276
9277 2017-04-05  Pedro Alves  <palves@redhat.com>
9278
9279         * python/python-internal.h (gdb_PyGetSetDef): New type.
9280         * python/py-block.c (block_object_getset)
9281         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9282         * python/py-event.c (event_object_getset)
9283         (finish_breakpoint_object_getset): Likewise.
9284         * python/py-inferior.c (inferior_object_getset): Likewise.
9285         * python/py-infthread.c (thread_object_getset): Likewise.
9286         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9287         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9288         * python/py-objfile.c (objfile_getset): Likewise.
9289         * python/py-progspace.c (pspace_getset): Likewise.
9290         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9291         Likewise.
9292         * python/py-record.c (recpy_record_getset): Likewise.
9293         * python/py-symbol.c (symbol_object_getset): Likewise.
9294         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9295         Likewise.
9296         * python/py-type.c (type_object_getset, field_object_getset):
9297         Likewise.
9298         * python/py-value.c (value_object_getset): Likewise.
9299
9300 2017-04-05  Pedro Alves  <palves@redhat.com>
9301
9302         * python/python-internal.h (gdb_PyObject_CallMethod)
9303         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9304         New functions.
9305         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9306         (PySys_GetObject, PySys_SetPath): New macros.
9307
9308 2017-04-05  Pedro Alves  <palves@redhat.com>
9309
9310         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9311         info_osdata_command.
9312         * osdata.c (info_osdata_command): Rename to ...
9313         (info_osdata): ... this.  Constify 'type' parameter, and remove
9314         the 'from_tty' parameter.  Accept NULL TYPE.
9315         (info_osdata_command): New function.
9316         * osdata.h (info_osdata_command): Remove declaration.
9317         (info_osdata): New declaration.
9318
9319 2017-04-05  Pedro Alves  <palves@redhat.com>
9320
9321         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9322         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9323         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9324         parameter.
9325         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9326         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9327         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9328         parameter.
9329         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9330         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9331         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9332         (mi_cmd_file_list_exec_source_files)
9333         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9334         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9335         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9336         parameter.
9337         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9338         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9339         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9340         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9341         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9342         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9343         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9344         'command' parameter.
9345         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9346         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9347         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9348         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9349         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9350         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9351         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9352         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9353         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9354         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9355         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9356         parameter.
9357         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9358         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9359         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9360         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9361         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9362         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9363         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9364         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9365         (mi_cmd_data_list_changed_registers)
9366         (mi_cmd_data_write_register_values)
9367         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9368         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9369         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9370         (mi_cmd_list_features, mi_cmd_list_target_features)
9371         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9372         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9373         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9374         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9375         (mi_cmd_trace_frame_collected): Constify 'command'
9376         parameter.
9377         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9378         'command' parameter.
9379
9380 2017-04-05  Pedro Alves  <palves@redhat.com>
9381
9382         * ada-lang.c (ada_completer_word_break_characters): Now a const
9383         array.
9384         (ada_get_gdb_completer_word_break_characters): Constify.
9385         * completer.c (gdb_completer_command_word_break_characters)
9386         (gdb_completer_file_name_break_characters)
9387         (gdb_completer_quote_characters): Now const arrays.
9388         (get_gdb_completer_quote_characters): Constify.
9389         (set_rl_completer_word_break_characters): New function.
9390         (set_gdb_completion_word_break_characters)
9391         (complete_line_internal): Use it.
9392         * completer.h (get_gdb_completer_quote_characters): Constify.
9393         (set_rl_completer_word_break_characters): Declare.
9394         * f-lang.c (f_word_break_characters): Constify.
9395         * language.c (default_word_break_characters): Constify.
9396         * language.h (language_defn::la_word_break_characters): Constify.
9397         (default_word_break_characters): Constify.
9398         * top.c (init_main): Use set_rl_completer_word_break_characters.
9399
9400 2017-04-05  Pedro Alves  <palves@redhat.com>
9401
9402         * aix-thread.c (aix_thread_pid_to_str)
9403         (aix_thread_extra_thread_info): Constify.
9404         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9405         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9406         (bsd_uthread_pid_to_str): Constify.
9407         * corelow.c (core_pid_to_str): Constify.
9408         * darwin-nat.c (darwin_pid_to_str): Constify.
9409         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9410         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9411         Constify.
9412         * gnu-nat.c (gnu_pid_to_str): Constify.
9413         * go32-nat.c (go32_pid_to_str): Constify.
9414         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9415         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9416         * inferior.c (inferior_pid_to_str): Constify.
9417         * linux-nat.c (linux_nat_pid_to_str): Constify.
9418         * linux-tdep.c (linux_core_pid_to_str): Constify.
9419         * linux-thread-db.c (thread_db_pid_to_str)
9420         (thread_db_extra_thread_info): Constify.
9421         * nto-tdep.c (nto_extra_thread_info): Constify.
9422         * nto-tdep.h (nto_extra_thread_info): Constify.
9423         * obsd-nat.c (obsd_pid_to_str): Constify.
9424         * procfs.c (procfs_pid_to_str): Constify.
9425         * ravenscar-thread.c (ravenscar_extra_thread_info)
9426         (ravenscar_pid_to_str): Constify.
9427         * remote-sim.c (gdbsim_pid_to_str): Constify.
9428         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9429         Constify.
9430         * sol-thread.c (solaris_pid_to_str): Constify.
9431         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9432         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9433         * target.c (default_pid_to_str, target_pid_to_str)
9434         (normal_pid_to_str, default_pid_to_str): Constify.
9435         * target.h (target_ops::to_pid_to_str)
9436         (target_ops::to_extra_thread_info): Constify.
9437         (target_pid_to_str, normal_pid_to_str): Constify.
9438         * windows-nat.c (windows_pid_to_str): Constify.
9439         * gdbarch.sh (core_pid_to_str): Constify.
9440         * target-delegates.c: Regenerate.
9441         * gdbarch.h, gdbarch.c: Regenerate.
9442
9443 2017-04-05  Pedro Alves  <palves@redhat.com>
9444
9445         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9446         the memory of the temporary warning_pre_print override.
9447         * utils.c (warning_pre_print): Constify.
9448         * utils.h (warning_pre_print): Constify.
9449
9450 2017-04-05  Pedro Alves  <palves@redhat.com>
9451
9452         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9453         (shell_command): New function.
9454         (make_command): Use std::string.
9455         (init_cli_cmds): Register shell_command instead of shell_escape.
9456
9457 2017-04-05  Pedro Alves  <palves@redhat.com>
9458
9459         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9460         * tracepoint.c (default_collect): Don't initialize.
9461
9462 2017-04-05  Pedro Alves  <palves@redhat.com>
9463
9464         * macroexp.c (macro_buffer::shared): Now a bool.
9465         (init_buffer): Update.
9466         (init_shared_buffer): Constify 'addr' parameter.
9467         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9468         casts.
9469
9470 2017-04-05  Pedro Alves  <palves@redhat.com>
9471
9472         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9473         * disasm.c (set_disassembler_options): Constify local.
9474         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9475
9476 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9477
9478         PR gdb/21352
9479         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9480         option.
9481
9482 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9483
9484         * frame.c (frame_unwind_register_unsigned): Call
9485         frame_unwind_register_value.
9486
9487 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9488
9489         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9490         Use gdb_test_multiple, and don't match anchor.
9491
9492 2017-04-05  Pedro Alves  <palves@redhat.com>
9493
9494         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9495         (Write After Approval): Remove Simon Marchi.
9496
9497 2017-04-05  Pedro Alves  <palves@redhat.com>
9498
9499         * common/gdb_optional.h (optional::optional): Make constexpr and
9500         initialize m_dummy.
9501
9502 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9503
9504         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9505         (amd64fbsd_jmp_buf_reg_offset): Remove.
9506         (amd64fbsd_supply_uthread): Remove function.
9507         (amd64fbsd_collect_uthread): Remove function.
9508         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9509         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9510         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9511         (fbsd-nat.c): Update comment.
9512         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9513         (i386fbsd_jmp_buf_reg_offset): Remove.
9514         (i386fbsd_supply_uthread): Remove function.
9515         (i386fbsd_collect_uthread): Remove function.
9516         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9517
9518 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9519
9520         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9521         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9522         * NEWS: Mention that support for FreeBSD/alpha was removed.
9523         * alpha-fbsd-tdep.c: Delete file.
9524         * config/alpha/fbsd.mh: Delete file.
9525         * configure.host: Delete alpha*-*-freebsd* and
9526         alpha*-*-kfreebsd*-gnu.
9527         * configure.tgt: Delete alpha*-*-freebsd* and
9528         alpha*-*-kfreebsd*-gnu.
9529
9530 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9531
9532         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9533         amd64bsd_store_inferior_registers): Use ptid from regcache.
9534
9535 2017-04-04  Pedro Alves  <palves@redhat.com>
9536
9537         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9538         data fields, make them private and add "m_" prefixes.
9539         (lnp_state_machine::lnp_state_machine): New ctor.
9540         (record_line, check_line_address, handle_set_discriminator)
9541         (handle_set_address, handle_advance_pc, handle_special_opcode)
9542         (handle_advance_line, handle_set_file, handle_negate_stmt)
9543         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9544         (end_sequence, advance_line): New methods.
9545         (m_gdbarch, m_record_lines_p): New fields.
9546         (lnp_reader_state): Delete.
9547         (dwarf_record_line): Rename to ...
9548         (lnp_state_machine::record_line): ... adjust.
9549         (init_lnp_state_machine): Delete.
9550         (lnp_state_machine::lnp_state_machine): New.
9551         (check_line_address): Rename to ...
9552         (lnp_state_machine::check_line_address): This.
9553         (dwarf_decode_lines_1): Remove reference to "reader_state".
9554         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9555         State machine internal state manipulation moved to
9556         lnp_state_machine methods.
9557
9558 2017-04-04  Pedro Alves  <palves@redhat.com>
9559
9560         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9561         unittests/offset-type-selftests.c.
9562         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9563         * common/offset-type.h: New file.
9564         * common/preprocessor.h: New file.
9565         * common/traits.h: New file.
9566         * common/valid-expr.h: New file.
9567         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9568         sect_offset and cu_offset strong typedefs throughout.
9569         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9570         typedefs throughout.
9571         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9572         sect_offset and cu_offset strong typedefs throughout.
9573         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9574         typedefs throughout.
9575         * gdbtypes.h: Include "common/offset-type.h".
9576         (cu_offset): Now an offset type (strong typedef) instead of a
9577         struct.
9578         (sect_offset): Likewise.
9579         (union call_site_parameter_u): Rename "param_offset" field to
9580         "param_cu_off".
9581         * unittests/offset-type-selftests.c: New file.
9582
9583 2017-04-04  Pedro Alves  <palves@redhat.com>
9584
9585         * common/underlying.h: New file.
9586         * dwarf2read.c: Include "common/gdb_optional.h" and
9587         "common/underlying.h".
9588         (dir_index, file_name_index): New types.
9589         (file_entry): Use them.
9590         (file_entry::include): Use to_underlying.
9591         (line_header::add_file_name): Use dir_index.
9592         (read_formatted_entries): Use gdb::optional.  Read form before
9593         writting to file_entry.
9594         (dwarf_decode_line_header): Use dir_index.
9595         (lnp_state_machine::current_file): Use to_underlying.
9596         (lnp_state_machine::file): Change type to file_name_index.
9597         (dwarf_record_line): Use to_underlying.
9598         (init_lnp_state_machine): Use file_name_index.
9599         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9600
9601 2017-04-04  Pedro Alves  <palves@redhat.com>
9602
9603         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9604         operator bool, has_value and get methods.
9605
9606 2017-04-04  Pedro Alves  <palves@redhat.com>
9607
9608         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9609         fields.
9610         (line_header): Initialize all data fields.  Change type of
9611         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9612         Change type of include_dirs to std::vector<const char *>.  Remove
9613         num_include_dirs, include_dirs_size.  Change type of file_names to
9614         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9615         (line_header::line_header): New.
9616         (line_header::add_include_dir, line_header::add_file_name): New
9617         methods.
9618         (line_header::include_dir_at): Remove NULL check.
9619         (line_header::file_name_at): Add const overload.
9620         (line_header_up): New unique_ptr typedef.
9621         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9622         std::vector.  Remove free_line_header call.
9623         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9624         free_line_header call.
9625         (free_cu_line_header): Delete.
9626         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9627         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9628         Adjust to use std::vector.
9629         (free_line_header): Delete.
9630         (free_line_header_voidp): Use delete.
9631         (add_include_dir): Replace with ...
9632         (line_header::add_include_dir): ... this method.  Use std::vector.
9633         (add_file_name): Replace with ...
9634         (line_header::add_file_name): ... this method.  Use std::vector.
9635         (add_include_dir_stub): Delete.
9636         (read_formatted_entries): Remove memset.
9637         (dwarf_decode_line_header): Return a line_header_up instead of a
9638         raw pointer.  Remove cleanup handling.  Pass lambdas to
9639         read_formatted_entries.  Adjust to use line_header methods.
9640         (dwarf_decode_lines_1): Adjust to use line_header methods.
9641         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9642         use std::vector.
9643
9644 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9645
9646         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9647         instead of struct ptid.
9648
9649 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9650
9651         * frame.c (get_frame_register_bytes): Unwind using value.
9652         (put_frame_register_bytes): Likewise.
9653
9654 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9655
9656         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9657         aggregate-like.
9658
9659 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9660
9661         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9662
9663 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9664
9665         * gdbthread.h (struct thread_info): Declare constructor and
9666         destructor.  Add some in-class member initializers.
9667         * thread.c (free_thread): Remove.
9668         (init_thread_list): Call delete instead of free_thread.
9669         (new_thread): Call thread_info constructor.
9670         (thread_info::thread_info): New function.
9671         (thread_info::~thread_info): New function.
9672         (delete_thread_1): Call delete instead of free_thread.
9673         (make_cleanup_restore_current_thread): Move tp and frame to
9674         inner block.
9675
9676 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9677
9678         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9679         (arc_skip_prologue): Likewise.
9680         (arc_make_frame_cache): Likewise.
9681         (arc_pv_get_operand): New function.
9682         (arc_is_in_prologue): Likewise.
9683         (arc_analyze_prologue): Likewise.
9684         (arc_print_frame_cache): Likewise.
9685         (MAX_PROLOGUE_LENGTH): New constant.
9686
9687 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9688
9689         * configure.tgt: Add arc-insn.o.
9690         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9691         (dump_arc_instruction_command): New function.
9692         (arc_fprintf_disasm): Likewise.
9693         (arc_disassemble_info): Likewise.
9694         (arc_insn_get_operand_value): Likewise.
9695         (arc_insn_get_operand_value_signed): Likewise.
9696         (arc_insn_get_memory_base_reg): Likewise.
9697         (arc_insn_get_memory_offset): Likewise.
9698         (arc_insn_get_branch_target): Likewise.
9699         (arc_insn_dump): Likewise.
9700         (arc_insn_get_linear_next_pc): Likewise.
9701         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9702         (arc_disassemble_info): Likewise.
9703         (arc_insn_get_branch_target): Likewise.
9704         (arc_insn_get_linear_next_pc): Likewise.
9705         * NEWS: Mention new "maint print arc arc-instruction".
9706
9707 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9708
9709         * arc-tdep (maintenance_print_arc_list): New variable.
9710         (maintenance_print_arc_command): New function.
9711
9712 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9713
9714         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9715         Add "limm" and "reserved".
9716         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9717         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9718         * arc-tdep.h (arc_regnum): Likewise.
9719
9720 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9721
9722         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9723         for THREADPTR register.
9724         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9725         register.
9726         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9727         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9728         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9729
9730 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9731
9732         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9733         registers above gdbarch_num_regs (gdbarch) as privileged in
9734         call0 ABI.
9735
9736 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9737
9738         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9739         for a single specified register or for all registers in
9740         a0_base..a0_base + C0_NREGS range.
9741         (supply_gregset_reg): Call regcache_raw_supply for a single
9742         specified register or for all registers in a0_base..a0_base +
9743         C0_NREGS range.
9744
9745 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9746
9747         * arch/xtensa.h (C0_NREGS): Add definition.
9748         * xtensa-tdep.c (C0_NREGS): Remove definition.
9749
9750 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9751
9752         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9753         Drop xtensa_default_isa initialization.
9754         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9755
9756 2017-03-27  Pedro Alves  <palves@redhat.com>
9757
9758         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9759         (file_entry::include_dir): New method.
9760         (line_header::include_dir_at, line_header::file_name_at): New
9761         methods.
9762         (setup_type_unit_groups, setup_type_unit_groups)
9763         (psymtab_include_file_name): Simplify using the new methods.
9764         (lnp_state_machine) <the_line_header>: New field.
9765         <file>: Add comment.
9766         (lnp_state_machine::current_file): New method.
9767         (dwarf_record_line): Simplify using the new methods.
9768         (init_lnp_state_machine): Initialize the "the_line_header" field.
9769         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9770         Simplify using the new methods.
9771
9772 2017-03-27  Pedro Alves  <palves@redhat.com>
9773
9774         * cp-name-parser.y (make_empty): Delete.
9775         (demangler_special, nested_name, ptr_operator, array_indicator)
9776         (direct_declarator, declarator_1): Use fill_comp instead of
9777         make_empty.
9778
9779 2017-03-27  Pedro Alves  <palves@redhat.com>
9780
9781         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9782         to ATTRIBUTE_PRINTF.
9783         * solib-target.c (library_list_start_list): Print "string" not
9784         "version".
9785         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9786         gdb_xml_error call.
9787
9788 2017-03-27  Pedro Alves  <palves@redhat.com>
9789
9790         * dwarf2read.c (struct file_and_directory): New.
9791         (dwarf2_get_dwz_file): Adjust to use std::string.
9792         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9793         (find_file_and_directory): Adjust to return a file_and_directory
9794         object.
9795         (read_file_scope): Adjust to use file_and_directory.  Remove
9796         make_cleanup/do_cleanups calls.
9797         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9798         make_cleanup/do_cleanups calls.
9799         * python/python.c (do_start_initialization): Adjust to ldirname
9800         returning a std::string.
9801         * utils.c (ldirname): Now returns a std::string.
9802         * utils.h (ldirname): Change return type to std::string.
9803         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9804         returning a std::string.
9805         * xml-tdesc.c (file_read_description_xml): Likewise.
9806
9807 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9808
9809         * regcache.c (regcache_debug_print_register): New function.
9810         * regcache.h (regcache_debug_print_register): New declaration.
9811         * target.c (debug_print_register): Remove.
9812         (target_fetch_registers): Call regcache_debug_print_register.
9813         (target_store_registers): Likewise.
9814
9815 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9816
9817         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9818         reference beyond the 'lh->include_dirs' array before accessing to
9819         it.
9820         (psymtab_include_file_name): Likewise.
9821         (dwarf_decode_lines_1): Likewise.
9822         (dwarf_decode_lines): Likewise.
9823         (file_file_name): Likewise.
9824
9825 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9826
9827         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9828         inferior_ptid.
9829         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9830         ps_lsetfpregs): Likewise.
9831         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9832         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9833         ps_lsetfpregs): Likewise.
9834         * target.c (target_fetch_registers, target_store_registers):
9835         Remove asserts.
9836
9837 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9838
9839         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9840
9841 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9842
9843         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9844         (_initialize_aarch64_tdep): Register it.
9845         (aarch64_record_load_store): Handle PRFM instruction.
9846         (aarch64_process_record_test): New function.
9847
9848 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9849
9850         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9851         indentation.
9852
9853 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9854
9855         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9856
9857 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9858
9859         python/python.c (do_start_initialization): Fix memory leak.
9860
9861 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9862
9863         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9864         using get_ptrace_pid.
9865         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9866         inferior_ptid.
9867         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9868         inferior_ptid instead of pid.
9869
9870 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9871
9872         * aarch64-tdep.c: Wrap locally used classes in anonymous
9873         namespace.
9874         * arm-tdep.c: Likewise.
9875         * linespec.c: Likewise.
9876         * ui-out.c: Likewise.
9877
9878 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9879
9880         PR gdb/19637
9881         * python/lib/gdb/printer/bound_registers.py: Import sys.
9882
9883 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9884
9885         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9886         windows_thread_info parameter and use it instead of
9887         current_thread.
9888         (windows_fetch_inferior_registers): Don't set current_thread,
9889         pass the thread to do_windows_fetch_inferior_registers.  Use
9890         ptid from regcache instead of inferior_ptid.
9891         (do_windows_store_inferior_registers): Add windows_thread_info
9892         parameter and use it instead of current_thread.
9893         (windows_store_inferior_registers): Don't set current_thread,
9894         pass the thread to do_windows_store_inferior_registers.  Use
9895         ptid from regcache instead of inferior_ptid.
9896
9897 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9898
9899         * ser-mingw.c (ser_windows_raw): Remove reference to
9900         struct serial::current_timeout.
9901
9902 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9903
9904         PR tdep/20928
9905         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9906         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9907         (sparc64_fsr_type): Fix %fsr decoding.
9908
9909 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9910
9911         * python/py-record-btrace.c (btpy_insn_data): Change return type
9912         for Python 2.
9913
9914 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9915
9916         * spu-linux-nat.c (spu_fetch_inferior_registers,
9917         spu_store_inferior_registers): Use ptid from regcache, set and
9918         restore inferior_ptid.
9919         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9920         Likewise.
9921
9922 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9923
9924         * i386-linux-nat.c (fetch_register, store_register,
9925         i386_linux_fetch_inferior_registers,
9926         i386_linux_store_inferior_registers): Use ptid from regcache.
9927         * ia64-linux-nat.c (ia64_linux_fetch_register,
9928         ia64_linux_store_register): Likewise.
9929         * inf-ptrace.c (inf_ptrace_fetch_register,
9930         inf_ptrace_store_register): Likewise.
9931         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9932         m32r_linux_store_inferior_registers): Likewise.
9933         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9934         m68kbsd_store_inferior_registers): Likewise.
9935         * m68k-linux-nat.c (fetch_register, store_register,
9936         m68k_linux_fetch_inferior_registers,
9937         m68k_linux_store_inferior_registers): Likewise.
9938         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9939         m88kbsd_store_inferior_registers): Likewise.
9940         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9941         mips_fbsd_store_inferior_registers): Likewise.
9942         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9943         mips64_linux_regsets_store_registers): Likewise.
9944         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9945         mipsnbsd_store_inferior_registers): Likewise.
9946         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9947         mips64obsd_store_inferior_registers): Likewise.
9948         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9949         Likewise.
9950         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9951         ppcfbsd_store_inferior_registers): Likewise.
9952         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9953         ppc_linux_store_inferior_registers): Likewise.
9954         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9955         ppcnbsd_store_inferior_registers): Likewise.
9956         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9957         ppcobsd_store_registers): Likewise.
9958         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9959         Likewise.
9960         * ravenscar-thread.c (ravenscar_fetch_registers,
9961         ravenscar_store_registers, ravenscar_prepare_to_store):
9962         Likewise.
9963         * record-btrace.c (record_btrace_fetch_registers,
9964         record_btrace_store_registers, record_btrace_prepare_to_store):
9965         Likewise.
9966         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9967         Lookup inferior using ptid from regcache, instead of
9968         current_inferior.
9969         * remote.c (remote_fetch_registers, remote_store_registers): Use
9970         ptid from regcache.
9971         * rs6000-nat.c (fetch_register, store_register): Likewise.
9972         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9973         s390_linux_store_inferior_registers): Likewise.
9974         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9975         shnbsd_store_inferior_registers): Likewise.
9976         * sol-thread.c (sol_thread_fetch_registers,
9977         sol_thread_store_registers): Likewise.
9978         * sparc-nat.c (sparc_fetch_inferior_registers,
9979         sparc_store_inferior_registers): Likewise.
9980         * tilegx-linux-nat.c (fetch_inferior_registers,
9981         store_inferior_registers): Likewise.
9982         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9983         vaxbsd_store_inferior_registers): Likewise.
9984         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9985         store_xtregs): Likewise.
9986
9987 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9988
9989         PR gdb/14441
9990         * NEWS: Mention support for rvalue references in GDB and python.
9991         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9992         supports both lvalue and rvalue references.
9993
9994 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9995
9996         PR gdb/14441
9997         * gdbtypes.c (rank_one_type): Implement overloading
9998         resolution rules regarding rvalue references.
9999
10000 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10001
10002         PR gdb/14441
10003         * aarch64-tdep.c (aarch64_type_align)
10004         (aarch64_extract_return_value, aarch64_store_return_value): Change
10005         lvalue reference type checks to general reference type checks.
10006         * amd64-tdep.c (amd64_classify): Likewise.
10007         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10008         Likewise.
10009         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10010         (arm_store_return_value): Likewise.
10011         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10012         * c-typeprint.c (c_print_type): Likewise.
10013         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10014         (cplus_number_of_children, cplus_describe_child): Likewise.
10015         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10016         * completer.c (expression_completer): Likewise.
10017         * cp-support.c (make_symbol_overload_list_adl_namespace):
10018         Likewise.
10019         * darwin-nat-info.c (info_mach_region_command): Likewise.
10020         * dwarf2loc.c (entry_data_value_coerce_ref)
10021         (value_of_dwarf_reg_entry): Likewise.
10022         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10023         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10024         Likewise.
10025         * findvar.c (extract_typed_address, store_typed_address):
10026         Likewise.
10027         * gdbtypes.c (rank_one_type): Likewise.
10028         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10029         * infcall.c (value_arg_coerce): Likewise.
10030         * language.c (pointer_type): Likewise.
10031         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10032         Likewise.
10033         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10034         * mn10300-tdep.c (mn10300_type_align): Likewise.
10035         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10036         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10037         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10038         Likewise.
10039         * printcmd.c (print_formatted, x_command): Likewise.
10040         * python/py-type.c (typy_get_composite, typy_template_argument):
10041         Likewise.
10042         * python/py-value.c (valpy_referenced_value)
10043         (valpy_get_dynamic_type, value_has_field): Likewise.
10044         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10045         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10046         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10047         * spu-tdep.c (spu_scalar_value_p): Likewise.
10048         * symtab.c (lookup_symbol_aux): Likewise.
10049         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10050         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10051         Likewise.
10052         * valops.c (value_cast_pointers, value_cast)
10053         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10054         (value_struct_elt, value_struct_elt_bitpos)
10055         (value_find_oload_method_list, find_overload_match)
10056         (value_rtti_indirect_type): Likewise.
10057         * valprint.c (val_print_scalar_type_p, generic_val_print):
10058         Likewise.
10059         * value.c (value_actual_type, value_as_address, unpack_long)
10060         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10061         (coerce_ref): Likewise.
10062         * varobj.c (varobj_get_value_type): Likewise.
10063
10064 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10065
10066         PR gdb/14441
10067         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10068         table of constants.
10069         * python/lib/gdb/command/explore.py: Support exploring values
10070         of rvalue reference types.
10071         * python/lib/gdb/types.py: Implement get_basic_type() for
10072         rvalue reference types.
10073         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10074         constant.
10075         * python/py-value.c (valpy_getitem): Add an rvalue reference
10076         check.
10077         (valpy_reference_value): Add new parameter "refcode".
10078         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10079         New wrappers for valpy_reference_value().
10080         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10081         (gdbpy_invoke_xmethod): Likewise.
10082
10083 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10084
10085         PR gdb/14441
10086         * dwarf2read.c (process_die, read_type_die_1): Handle the
10087         DW_TAG_rvalue_reference_type DIE.
10088         (read_tag_reference_type): Add new parameter "refcode".
10089
10090 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10091
10092         PR gdb/14441
10093         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10094         (c_type_print_modifier, c_type_print_varspec_suffix)
10095         (c_type_print_base): Support printing rvalue reference types.
10096         * c-valprint.c (c_val_print, c_value_print): Support printing
10097         rvalue reference values.
10098
10099 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10100
10101         PR gdb/14441
10102         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10103         typename.
10104         * cp-support.c (replace_typedefs): Handle
10105         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10106         * python/py-type.c (typy_lookup_type): Likewise.
10107
10108 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10109
10110         PR gdb/14441
10111         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10112         * parse.c (insert_type): Change assert statement.
10113         (follow_types): Handle rvalue reference types.
10114         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10115         constant.
10116
10117 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10118
10119         PR gdb/14441
10120         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10121         value_ref() interface.
10122         * c-valprint.c (c_value_print): Likewise.
10123         * infcall.c (value_arg_coerce): Likewise.
10124         * python/py-value.c (valpy_reference_value): Likewise.
10125         * valops.c (value_cast, value_reinterpret_cast)
10126         (value_dynamic_cast, typecmp): Likewise.
10127         (value_ref): Parameterize by kind of return value reference type.
10128         * value.h (value_ref): Add new parameter "refcode".
10129
10130 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10131
10132         PR gdb/14441
10133         * dwarf2read.c (read_tag_reference_type): Use
10134         lookup_lvalue_reference_type() instead of lookup_reference_type().
10135         * eval.c (evaluate_subexp_standard): Likewise.
10136         * f-exp.y: Likewise.
10137         * gdbtypes.c (make_reference_type, lookup_reference_type):
10138         Generalize with rvalue reference types.
10139         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10140         convenience wrappers for lookup_reference_type().
10141         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10142         reference kind parameter.
10143         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10144         wrappers for lookup_reference_type().
10145         * guile/scm-type.c (gdbscm_type_reference): Use
10146         lookup_lvalue_reference_type() instead of lookup_reference_type().
10147         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10148         * parse.c (follow_types): Likewise.
10149         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10150         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10151         Likewise.
10152         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10153         (gdbpy_invoke_xmethod): Likewise.
10154         * stabsread.c: Provide extra argument to make_reference_type()
10155         call.
10156         * valops.c (value_ref, value_rtti_indirect_type): Use
10157         lookup_lvalue_reference_type() instead of lookup_reference_type().
10158
10159 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10160
10161         PR gdb/14441
10162         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10163         (TYPE_IS_REFERENCE): New macro.
10164         (struct type): Add rvalue_reference_type field.
10165         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10166
10167 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10168
10169         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10170         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10171         New function definition.
10172         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10173         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10174         New function declaration.
10175         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10176         * mi/mi-interp.h: New file.
10177         * solib.c (info_sharedlibrary_command): Replace for loop with
10178         ALL_SO_LIBS macro
10179         * solib.h (update_solib_list): New function declaration.
10180         (so_list_head): Move macro.
10181         * solist.h (ALL_SO_LIBS): New macro.
10182
10183 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10184
10185         * infcmd.c (post_create_inferior): Remove unused argument in
10186         call to solib_add.
10187         * remote.c (remote_start_remote): Likewise.
10188         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10189         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10190         (enable_break): Likewise.
10191         * solib.c (update_solib_list): Remove unused target argument
10192         and its documentation.
10193         (solib_add): Remove unused target argument.  Remove unused
10194         argument in call to update_solib_list.
10195         (info_sharedlibrary_command): Remove unused argument in call
10196         to update_solib_list.
10197         (sharedlibrary_command): Remove unused argument in call to
10198         solib_add.
10199         (handle_solib_event): Likewise.
10200         (reload_shared_libraries): Likewise.
10201         * solib.h (solib_add): Remove unused target argument.
10202
10203 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10204
10205         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10206         (s390_displaced_step_fixup): Cover relative branches with the
10207         default fixup handling.  This fixes lack of support for some
10208         relative branch instructions.
10209
10210 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10211
10212         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10213         ptid from regcache.
10214
10215 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10216
10217         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10218         i386_darwin_store_inferior_registers): Use ptid from regcache.
10219
10220 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10221
10222         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10223         i386bsd_store_inferior_registers): Use ptid from regcache.
10224
10225 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10226
10227         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10228         hppaobsd_store_registers): Use ptid from regcache.
10229
10230 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10231
10232         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10233         hppanbsd_store_registers): Use ptid from regcache.
10234
10235 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10236
10237         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10238         from regcache.  Use get_ptrace_pid.
10239
10240 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10241
10242         * corelow.c (get_core_register_section): Use ptid from regcache,
10243         update doc.
10244
10245 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10246
10247         * bsd-uthread.c (bsd_uthread_fetch_registers,
10248         bsd_uthread_store_registers): Use ptid from regcache, set and
10249         restore inferior_ptid.
10250
10251 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10252
10253         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10254         fetch_fp_regs, store_register, store_regs, store_fp_register,
10255         store_fp_regs): Use ptid from regcache.
10256
10257 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10258
10259         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10260         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10261         store_vfp_regs): Use ptid from regcache.
10262
10263 2017-03-17  Pedro Alves  <palves@redhat.com>
10264
10265         PR remote/21188
10266         * ser-base.c (ser_base_wait_for): Add comment.
10267         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10268         version.
10269         * ser-unix.c (hardwire_raw): Remove reference to
10270         scb->current_timeout.
10271         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10272         (hardwire_ops): Install ser_base_readchar instead of
10273         hardwire_readchar.
10274         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10275         Remove fields.
10276
10277 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10278
10279         PR gdb/19637
10280         * python/lib/gdb/printer/bound_registers.py: Add support for
10281         Python 3.
10282
10283 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10284
10285         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10286         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10287         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10288         byte_offset to subobj_byte_offset.  Fix the handling of
10289         DWARF_VALUE_STACK on big-endian targets when coming via an
10290         implicit pointer.
10291         (dwarf2_evaluate_loc_desc): Adjust call to
10292         dwarf2_evaluate_loc_desc_full.
10293         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10294         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10295
10296 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10297
10298         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10299         and REVSH instructions.
10300
10301 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10302
10303         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10304         (arm_record_test): Declare.
10305         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10306         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10307         align with the manual.
10308         (thumb_record_misc): Adjust the code order to align with the
10309         manual.
10310         (thumb2_record_decode_insn_handler): Fix instruction matching.
10311         (instruction_reader_thumb): New class.
10312         (arm_record_test): New function.
10313
10314 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10315
10316         * arm-tdep.c (abstract_memory_reader): New class.
10317         (instruction_reader): New class.
10318         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10319         (decode_insn): Likewise.
10320
10321 2017-03-16  Doug Evans  <dje@google.com>
10322
10323         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10324         member.  Change type of TYPE member to SCM.  All uses updated.
10325         (lsscm_make_lazy_string_smob): Add assert.
10326         (lsscm_make_lazy_string): Flag bad length values.
10327         (lsscm_elt_type): New function.
10328         (gdbscm_lazy_string_to_value): Rewrite to use
10329         lsscm_safe_lazy_string_to_value.
10330         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10331         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10332         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10333         in incoming type.
10334         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10335         * guile/scm-type.c (tyscm_scm_to_type): New function.
10336
10337 2017-03-15  Doug Evans  <dje@google.com>
10338
10339         PR python/17728, python/18439, python/18779
10340         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10341         member.  Change type of TYPE member to PyObject *.  All uses updated.
10342         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10343         (gdbpy_create_lazy_string_object): Flag bad length values.
10344         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10345         Handle typedefs in incoming type.
10346         (stpy_lazy_string_elt_type): New function.
10347         (gdbpy_extract_lazy_string): Call it.
10348         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10349         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10350         typedefs in incoming type.
10351
10352 2017-03-16  Doug Evans  <dje@google.com>
10353
10354         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10355         * guile/scm-type.c (tyscm_scm_to_type): New function.
10356
10357 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10358
10359         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10360         "ULONGEST" for "skip".
10361
10362 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10363
10364         PR gdb/21220
10365         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10366         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10367         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10368         over ptrace peek/poke until end of buffer or error.
10369
10370 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10371
10372         * parse.c (length_of_subexp): Make static.
10373         * parser-defs.h (length_of_subexp): Remove.
10374
10375 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10376
10377         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10378         as well.
10379
10380 2017-03-14  Pedro Alves  <palves@redhat.com>
10381
10382         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10383         (main): Use std::unique_ptr.  Remove calls to
10384         cp_demangled_name_parse_free.
10385
10386 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10387
10388         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10389         alphabsd_store_inferior_registers): Use regcache->ptid instead
10390         of inferior_ptid.
10391
10392 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10393
10394         * aix-thread.c (aix_thread_fetch_registers,
10395         aix_thread_store_registers): Use regcache->ptid instead of
10396         inferior_ptid.
10397
10398 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10399
10400         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10401         store_gregs_to_thread, fetch_fpregs_from_thread,
10402         store_fpregs_to_thread): Use regcache->ptid instead of
10403         inferior_ptid.
10404
10405 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10406
10407         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10408         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10409         instead of inferior_ptid.
10410
10411 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10412
10413         * target.c (target_fetch_registers, target_store_registers): Add
10414         assert.
10415
10416 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10417
10418         * regcache.h (regcache_get_ptid): New function.
10419         * regcache.c (regcache_get_ptid): New function.
10420
10421 2017-03-13  Mark Wielaard  <mark@klomp.org>
10422
10423         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10424
10425 2017-03-10  Keith Seitz  <keiths@redhat.com>
10426
10427         PR c++/8218
10428         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10429
10430 2017-03-08  Pedro Alves  <palves@redhat.com>
10431
10432         PR gdb/18360
10433         * infrun.c (start_step_over, do_target_resume, resume)
10434         (restart_threads): Assert we're not resuming a thread that is
10435         meant to be stopped.
10436         (infrun_thread_stop_requested_callback): Delete.
10437         (infrun_thread_stop_requested): If the thread is internally
10438         stopped, queue a pending stop event and clear the thread's
10439         inline-frame state.
10440         (handle_stop_requested): New function.
10441         (handle_syscall_event, handle_inferior_event_1): Use
10442         handle_stop_requested.
10443         (handle_stop_requested): New function.
10444         (handle_signal_stop): Set the thread's stop_signal here instead of
10445         at caller.
10446         (finish_step_over): Clear step over info unconditionally.
10447         (handle_signal_stop): If the user had interrupted the event
10448         thread, consider the stop a random signal.
10449         (handle_signal_stop) <signal arrived while stepping over
10450         breakpoint>: Don't restart threads here.
10451         (stop_waiting): Don't clear step-over info here.
10452
10453 2017-03-08  Pedro Alves  <palves@redhat.com>
10454
10455         PR 21206
10456         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10457         goes to argument 2, not 1.
10458
10459 2017-03-08  Pedro Alves  <palves@redhat.com>
10460
10461         PR cli/21218
10462         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10463         display_gdb_prompt.
10464         (command_line_input): Add comment.
10465
10466 2017-03-08  Pedro Alves  <palves@redhat.com>
10467
10468         PR tui/21216
10469         * tui/tui-file.c (tui_file::write): New.
10470         * tui/tui-file.h (tui_file): Override "write".
10471         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10472         factored out from ...
10473         (tui_puts): ... here.
10474         (tui_putc): Use them.
10475         (tui_write): New function.
10476         * tui/tui-io.h (tui_write): Declare.
10477
10478 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10479
10480         * Makefile.in (SFILES): Replace "environ.c" with
10481         "common/environ.c".
10482         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10483         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10484         to...
10485         * common/environ.c: ... here.
10486         * environ.h: Moved to...
10487         * common/environ.h: ... here.
10488
10489 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10490
10491         * gdbarch.sh (pstring_ptr): New static function.
10492         (gdbarch_disassembler_options): Use it.
10493         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10494         not valid_disassembler_option->name.
10495         * gdbarch.c: Regenerate.
10496
10497 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10498
10499         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10500
10501 2017-03-07  Pedro Alves  <palves@redhat.com>
10502
10503         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10504
10505 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10506
10507         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10508         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10509         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10510         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10511
10512 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10513
10514         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10515
10516 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10517
10518         * remote.c (remote_add_target_side_commands): Use range-based
10519         for loop.
10520
10521 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10522
10523         PR gdb/21165
10524         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10525         value is lazy.
10526         * valprint.c (common_val_print): Likewise.
10527
10528 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10529
10530         * NEWS: Mention new set/show disassembler-options commands.
10531         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10532         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10533         (prospective_options): New static variable.
10534         (gdb_disassembler::gdb_disassembler): Initialize
10535         m_di.disassembler_options.
10536         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10537         (get_disassembler_options): New function.
10538         (set_disassembler_options): Likewise.
10539         (set_disassembler_options_sfunc): Likewise.
10540         (show_disassembler_options_sfunc): Likewise.
10541         (disassembler_options_completer): Likewise.
10542         (_initialize_disasm): Likewise.
10543         * disasm.h (get_disassembler_options): New prototype.
10544         (set_disassembler_options): Likewise.
10545         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10546         (gdbarch_verify_disassembler_options): Likewise.
10547         * gdbarch.c: Regenerate.
10548         * gdbarch.h: Likewise.
10549         * arm-tdep.c (num_disassembly_options): Delete.
10550         (set_disassembly_style): Likewise.
10551         (arm_disassembler_options): New static variable.
10552         (set_disassembly_style_sfunc): Convert short style name into long
10553         option name.  Call set_disassembler_options.
10554         (show_disassembly_style_sfunc): New function.
10555         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10556         set_gdbarch_verify_disassembler_options.
10557         (_initialize_arm_tdep): Delete regnames variable and update callers.
10558         (arm_disassembler_options): Initialize.
10559         (disasm_options): New variable.
10560         (num_disassembly_options): Rename from this...
10561         (num_disassembly_styles): ...to this.  Compute by scanning through
10562         disasm_options.
10563         (valid_disassembly_styles): Initialize using disasm_options.
10564         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10565         set_arm_regname_option.
10566         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10567         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10568         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10569         set_gdbarch_verify_disassembler_options.
10570         * s390-tdep.c (s390_disassembler_options): New static variable.
10571         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10572         set_gdbarch_verify_disassembler_options.
10573
10574 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10575
10576         * remote.c (remote_add_target_side_condition): Remove "struct"
10577         keyword from range-based for loop.
10578
10579 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10580
10581         * remote.c (remote_add_target_side_condition): Use range-based
10582         for loop.  Update comment.
10583
10584 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10585
10586         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10587
10588 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10589
10590         * regcache.c (regcache_raw_update): New function.
10591         (regcache_raw_read): Move code to regcache_raw_update.
10592         * regcache.h (regcache_raw_update): New declaration.
10593         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10594
10595 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10596
10597         * dwarf2read.c (create_debug_type_hash_table): Initialize
10598         header.signature and header.type_offset_in_tu.
10599
10600 2017-02-24  Pedro Alves  <palves@redhat.com>
10601
10602         * symtab.c (make_file_symbol_completion_list_1): Use
10603         add_symtab_completions.
10604
10605 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10606
10607         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10608
10609 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10610
10611         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10612         I386_MAX_REGISTER_SIZE.
10613         (i386_pseudo_register_write): Likewise.
10614         (i386_process_record): Likewise.
10615         * i387-tdep.c (i387_supply_xsave): Likewise.
10616         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10617         (store_register): Likewise.
10618
10619 2017-02-23  Pedro Alves  <palves@redhat.com>
10620
10621         * ada-lang.c: Include "common/function-view.h".
10622         (ada_iterate_over_symbols): Adjust to use function_view as
10623         callback type.
10624         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10625         (ada_make_symbol_completion_list): Use a lambda.
10626         (ada_exc_search_name_matches): Delete.
10627         (name_matches_regex): New.
10628         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10629         * compile/compile-c-support.c: Include "common/function-view.h".
10630         (print_one_macro): Change prototype to accept a ui_file pointer.
10631         (write_macro_definitions): Use a lambda.
10632         * dwarf2read.c: Include "common/function-view.h".
10633         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10634         (dw2_expand_symtabs_matching): Adjust to use function_view as
10635         callback type.
10636         * language.h: Include "common/function-view.h".
10637         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10638         function_view as callback type.
10639         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10640         * linespec.c: Include "common/function-view.h".
10641         (collect_info::add_symbol): New method.
10642         (struct symbol_and_data_callback, iterate_inline_only, struct
10643         symbol_matcher_data, iterate_name_matcher): Delete.
10644         (iterate_over_all_matching_symtabs): Adjust to use function_view
10645         as callback type and lambdas.
10646         (iterate_over_file_blocks): Adjust to use function_view as
10647         callback type.
10648         (decode_compound_collector): Now a class with private fields.
10649         (decode_compound_collector::release_symbols): New method.
10650         (collect_one_symbol): Rename to...
10651         (decode_compound_collector::operator()): ... this and adjust.
10652         (lookup_prefix_sym): decode_compound_collector construction bits
10653         move to decode_compound_collector ctor.  Pass the
10654         decode_compound_collector object directly as callback.  Remove
10655         cleanups and use decode_compound_collector::release_symbols
10656         instead.
10657         (symtab_collector): Now a class with private fields.
10658         (symtab_collector::release_symtabs): New method.
10659         (add_symtabs_to_list): Rename to...
10660         (symtab_collector::operator()): ... this and adjust.
10661         (collect_symtabs_from_filename): symtab_collector construction
10662         bits move to symtab_collector ctor.  Pass the symtab_collector
10663         object directly as callback.  Remove cleanups and use
10664         symtab_collector::release_symtabs instead.
10665         (collect_symbols): Delete.
10666         (add_matching_symbols_to_info): Use lambdas.
10667         * macrocmd.c (print_macro_callback): Delete.
10668         (info_macro_command): Use a lambda.
10669         (info_macros_command): Pass print_macro_definition as callable
10670         directly.
10671         (print_one_macro): Remove 'ignore' parameter.
10672         (macro_list_command): Adjust.
10673         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10674         (macro_for_each_data::user_data): Delete field.
10675         (foreach_macro): Adjust to call the function_view.
10676         (macro_for_each): Adjust to use function_view as callback type.
10677         (foreach_macro_in_scope): Adjust to call the function_view.
10678         (macro_for_each_in_scope): Adjust to use function_view as callback
10679         type.
10680         * macrotab.h: Include "common/function-view.h".
10681         (macro_callback_fn): Declare a prototype instead of a pointer.
10682         Remove "user_data" parameter.
10683         (macro_for_each, macro_for_each_in_scope): Adjust to use
10684         function_view as callback type.
10685         * psymtab.c (partial_map_expand_apply)
10686         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10687         Adjust to use function_view as callback type and to return bool.
10688         (psym_expand_symtabs_matching): Adjust to use function_view as
10689         callback types.
10690         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10691         to use function_view as callback type and to return bool.
10692         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10693         callback types.
10694         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10695         as callback types.
10696         * symfile.h: Include "common/function-view.h".
10697         (expand_symtabs_file_matcher_ftype)
10698         (expand_symtabs_symbol_matcher_ftype)
10699         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10700         return bool.
10701         (quick_symbol_functions::map_symtabs_matching_filename)
10702         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10703         function_view as callback type and return bool.
10704         (expand_symtabs_matching): Adjust to use function_view as callback
10705         type.
10706         (maintenance_expand_name_matcher)
10707         (maintenance_expand_file_matcher): Delete.
10708         (maintenance_expand_symtabs): Use lambdas.
10709         * symtab.c (iterate_over_some_symtabs): Adjust to use
10710         function_view as callback types and return bool.
10711         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10712         of a cleanup.
10713         (lookup_symtab_callback): Delete.
10714         (lookup_symtab): Use a lambda.
10715         (iterate_over_symbols): Adjust to use function_view as callback
10716         type.
10717         (struct search_symbols_data, search_symbols_file_matches)
10718         (search_symbols_name_matches): Delete.
10719         (search_symbols): Use a pair of lambdas.
10720         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10721         (symtab_expansion_callback): Delete.
10722         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10723         * symtab.h: Include "common/function-view.h".
10724         (iterate_over_some_symtabs): Adjust to use function_view as
10725         callback type and return bool.
10726         (iterate_over_symtabs): Adjust to use function_view as callback
10727         type.
10728         (symbol_found_callback_ftype): Remove 'data' parameter and return
10729         bool.
10730         (iterate_over_symbols): Adjust to use function_view as callback
10731         type.
10732
10733 2017-02-23  Pedro Alves  <palves@redhat.com>
10734
10735         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10736         (%.o) <unittests/%.c>: New pattern.
10737         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10738         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10739         * common/function-view.h: New file.
10740         * unittests/function-view-selftests.c: New file.
10741         * configure: Regenerate.
10742
10743 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10744
10745         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10746         inferior_ptid.
10747         * go32-nat.c (go32_thread_alive): Likewise.
10748
10749 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10750
10751         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10752         delete.
10753
10754 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10755
10756         * varobj.c (varobj_clear_saved_item): Use delete instead of
10757         xfree.
10758         (update_dynamic_varobj_children): Likewise.
10759
10760 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10761
10762         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10763
10764 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10765
10766         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10767         m_enum_value to 0 in default constructor.
10768
10769 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10770
10771         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10772         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10773         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10774         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10775         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10776         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10777         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10778         IS_STORE_CONDITIONAL_INSN.
10779
10780 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10781
10782         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10783
10784 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10785
10786         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10787
10788 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10789
10790         * dwarf2read.c (skip_one_die, read_attribute_value)
10791         (dwarf2_const_value_attr, dump_die_shallow)
10792         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10793         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10794
10795 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10796
10797         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10798         (dwarf_parse_macro_header): Accept DWARF version 5.
10799         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10800
10801 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10802
10803         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10804         DW_AT_GNU_*.
10805         * common/common-exceptions.h (enum errors): Likewise.
10806         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10807         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10808         (dwarf_expr_context::execute_stack_op): Likewise.
10809         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10810         Likewise.
10811         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10812         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10813         (show_entry_values_debug, call_site_to_target_addr)
10814         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10815         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10816         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10817         (value_of_dwarf_block_entry, indirect_pieced_value)
10818         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10819         (disassemble_dwarf_expression): Likewise.
10820         * dwarf2read.c (process_die, inherit_abstract_dies)
10821         (read_call_site_scope): Likewise.
10822         * gdbtypes.h (struct func_type, struct call_site_parameter)
10823         (struct call_site): Likewise.
10824         * stack.c (read_frame_arg): Likewise.
10825         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10826
10827 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10828
10829         * defs.h (read_unsigned_leb128): New declaration.
10830         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10831         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10832         (dwarf2_find_location_expression): Call also
10833         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10834         * dwarf2loc.h (dwarf2_version): New declaration.
10835         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10836         rnglists.
10837         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10838         .debug_rnglists.
10839         (struct dwop_section_names): Add loclists_dwo.
10840         (dwop_section_names): Add .debug_loclists.dwo.
10841         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10842         (struct dwarf2_per_cu_data): Add dwarf_version.
10843         (struct dwo_sections): Add loclists.
10844         (struct attr_abbrev): Add implicit_const.
10845         (read_indirect_line_string): New declaration.
10846         (read_unsigned_leb128): Delete declaration.
10847         (rcuh_kind): New definition.
10848         (read_and_check_comp_unit_head): Change parameter
10849         is_debug_types_section to section_kind.
10850         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10851         (read_comp_unit_head): Change parameter abfd to section, add parameter
10852         section_kind.  Handle DWARF-5.
10853         (error_check_comp_unit_head): Accept also DWARF version 5.
10854         (read_and_check_comp_unit_head): Change parameter
10855         is_debug_types_section to section_kind.
10856         (read_and_check_type_unit_head): Delete function.
10857         (read_abbrev_offset): Handle DWARF-5.
10858         (create_debug_type_hash_table): Add parameter section_kind.  Process
10859         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10860         comp_unit_head.
10861         (create_debug_types_hash_table): Update create_debug_type_hash_table
10862         caller.
10863         (create_all_type_units): Call create_debug_type_hash_table.
10864         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10865         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10866         caller.
10867         (skip_one_die): Handle DW_FORM_implicit_const.
10868         (dwarf2_rnglists_process): New function.
10869         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10870         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10871         (read_attribute_value): Handle DW_FORM_implicit_const,
10872         DW_FORM_line_strp.
10873         (read_attribute): Handle DW_FORM_implicit_const.
10874         (read_indirect_string_at_offset_from): New function from
10875         read_indirect_string_at_offset.
10876         (read_indirect_string_at_offset): Call
10877         read_indirect_string_at_offset_from.
10878         (read_indirect_line_string_at_offset): New function.
10879         (read_indirect_string): New function comment.
10880         (read_indirect_line_string): New function.
10881         (read_unsigned_leb128): Make it global.
10882         (dwarf2_string_attr): Handle DWARF-5.
10883         (add_include_dir_stub, read_formatted_entries): New functions.
10884         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10885         Handle DWARF-5.
10886         (per_cu_header_read_in): Update read_comp_unit_head caller.
10887         (dwarf2_version): New function.
10888         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10889         rnglists.
10890         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10891         fields.
10892
10893 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10894
10895         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10896
10897 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10898
10899         * dwarf2read.c (dwarf2_ranges_process): New function from
10900         dwarf2_ranges_read.
10901         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10902         dwarf2_ranges_process.
10903
10904 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10905
10906         * dwarf2read.c (create_debug_type_hash_table): New function from
10907         create_debug_types_hash_table.
10908         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10909         (create_all_type_units, open_and_init_dwo_file): Update
10910         create_debug_types_hash_table callers.
10911
10912 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10913
10914         PR gdb/16188
10915         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10916         refer to 'ap', not 'args'.
10917
10918 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10919             Pedro Alves  <palves@redhat.com>
10920
10921         PR gdb/16188
10922         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10923         calls succeeded.
10924         * fork-child.c (trace_start_error): New function.
10925         (trace_start_error_with_name): Likewise.
10926         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10927         * inf-ptrace.c (inf_ptrace_me): Likewise.
10928         * inferior.h (trace_start_error): New prototype.
10929         (trace_start_error_with_name): Likewise.
10930
10931 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10932
10933         PR gdb/21164
10934         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10935         NULL before using it.
10936         * symmisc.c (maintenance_print_symbols): Likewise.
10937         (maintenance_print_msymbols): Likewise.
10938
10939 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10940
10941         * NEWS: Add record Python bindings entry.
10942
10943 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10944
10945         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10946         py-record-full.o.
10947         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10948         * python/py-record-btrace.c, python/py-record-btrace.h,
10949         python/py-record-full.c, python/py-record-full.h: New file.
10950         * python/py-record.c: Add include for py-record-btrace.h and
10951         py-record-full.h.
10952         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10953         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10954         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10955         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10956         New definition.
10957         (gdbpy_initialize_btrace): New export.
10958         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10959
10960 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10961
10962         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10963         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10964         * python/py-record.c: New file.
10965         * python/python-internal.h (gdbpy_start_recording,
10966         gdbpy_current_recording, gdpy_stop_recording,
10967         gdbpy_initialize_record): New export.
10968         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10969         (python_GdbMethods): Add gdbpy_start_recording,
10970         gdbpy_current_recording and gdbpy_stop_recording.
10971
10972 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10973
10974         * record-btrace.c (record_btrace_record_method): New function.
10975         (init_record_btrace_ops): Initialize to_record_method.
10976         * record-full.c (record_full_record_method): New function.
10977         (init_record_full_ops, init_record_full_core_ops): Add
10978         record_full_record_method.
10979         * record.h (enum record_method): New enum.
10980         * target-debug.h (target_debug_print_enum_record_method: New define.
10981         * target-delegates.c: Regenerate.
10982         * target.c (target_record_method): New function.
10983         * target.h: Include record.h.
10984         (struct target_ops) <to_record_method>: New field.
10985         (target_record_method): New export.
10986
10987 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10988
10989         * record.h (record_start, record_stop): New export.
10990         * record.c (record_start, record_stop): New function.
10991
10992 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10993
10994         * btrace.c (btrace_fetch): Copy function call segments pointer
10995         into a vector.
10996         (btrace_clear): Clear the vector.
10997         (btrace_find_insn_by_number): Use binary search to find the correct
10998         function call segment.
10999         * btrace.h (brace_fun_p): New typedef.
11000         (struct btrace_thread_info) <functions>: New field.
11001
11002 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11003
11004         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11005         * btrace.c (btrace_decode_error): ... here.  New function.
11006         * btrace.h (btrace_decode_error): New export.
11007
11008 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11009
11010         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11011         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11012         btrace_find_insn_by_number): Remove special case for gaps.
11013         * btrace.h (btrace_insn_get_error): New export.
11014         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11015         * record-btrace.c (btrace_insn_history): Print number for gaps.
11016         (record_btrace_info, record_btrace_goto): Handle gaps.
11017
11018 2017-02-14  Tom Tromey  <tom@tromey.com>
11019
11020         PR python/13598:
11021         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11022         event.
11023         * python/py-evts.c (gdbpy_initialize_py_events): Add
11024         before_prompt registry.
11025         * python/py-events.h (events_object) <before_prompt>: New field.
11026
11027 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11028
11029         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11030
11031 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11032
11033         * symfile (_initialize_symfile): Add usage text to the load command's
11034         help text.
11035
11036 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11037
11038         * utils.c (defaulted_query): Don't query on secondary UIs.
11039
11040 2017-02-10  Tom Tromey  <tom@tromey.com>
11041
11042         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11043
11044 2017-02-10  Tom Tromey  <tom@tromey.com>
11045
11046         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11047         "cleanup" local.
11048         * python/py-type.c (typy_legacy_template_argument): Remove
11049         unnecessary "cleanup" local.
11050
11051 2017-02-10  Tom Tromey  <tom@tromey.com>
11052
11053         * python/python.c (do_start_initialization): New function, from
11054         _initialize_python.
11055         (_initialize_python): Call do_start_initialization.
11056         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11057         goto.
11058
11059 2017-02-10  Tom Tromey  <tom@tromey.com>
11060
11061         * python/py-prettyprint.c (pretty_print_one_value): Use
11062         gdbpy_ref.
11063
11064 2017-02-10  Tom Tromey  <tom@tromey.com>
11065
11066         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11067         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11068         gdbpy_ref.
11069         * python/py-type.c (field_new): Use gdbpy_ref.
11070         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11071         gdbpy_ref.
11072         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11073         (py_free_pspace): Likewise.
11074         (pspace_to_pspace_object): Likewise.
11075         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11076         (py_free_objfile): Likewise.
11077         (objfile_to_objfile_object): Likewise.
11078         * python/py-inferior.c (delete_thread_object): Use
11079         gdbpy_ref.
11080         (infpy_read_memory): Likewise.
11081         (py_free_inferior): Likewise.
11082         * python/py-evtregistry.c (create_eventregistry_object): Use
11083         gdbpy_ref.
11084         * python/py-event.c (create_event_object): Use gdbpy_ref.
11085
11086 2017-02-10  Tom Tromey  <tom@tromey.com>
11087
11088         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11089         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11090         used.
11091         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11092         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11093         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11094         python/py-framefilter.c, python/py-function.c,
11095         python/py-inferior.c, python/py-infevents.c,
11096         python/py-linetable.c, python/py-newobjfileevent.c,
11097         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11098         python/py-signalevent.c, python/py-stopevent.c,
11099         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11100         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11101         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11102         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11103
11104 2017-02-10  Tom Tromey  <tom@tromey.com>
11105
11106         * ui-out.h (ui_out_emit_type): New class.
11107         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11108         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11109         and ui_out_emit_tuple.
11110         (enumerate_locals): Likewise.
11111         (py_mi_print_variables, py_print_locals, py_print_args): Use
11112         ui_out_emit_list.
11113         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11114         ui_out_emit_list.
11115         * common/gdb_optional.h: New file.
11116
11117 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11118
11119         * MAINTAINERS (Write After Approval): Update my e-mail address.
11120
11121 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11122
11123         PR gdb/21122
11124         * breakpoint.c (_initialize_breakpoint): Update the help description
11125         of the 'commands' command to indicate that it takes a list argument.
11126
11127 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11128
11129         * interps.c (current_interp_set_logging): Remove "return".
11130
11131 2017-02-09  Gary Benson  <gbenson@redhat.com>
11132
11133         * symtab.c (add_symtab_completions): Prevent NULL pointer
11134         dereference.
11135
11136 2017-02-08  Pedro Alves  <palves@redhat.com>
11137
11138         * interps.c (interp::interp): Remove reference to quiet_p.
11139         (interp_set): Make static.  Remove dead "Switching to" output
11140         code.
11141         (interp_quiet_p, interp_set_quiet): Delete.
11142         (interpreter_exec_cmd): Don't set the interpreter quiet.
11143         * interps.h (interp_quiet_p): Make static.
11144         (class interp) <quiet_p>: Remove field
11145
11146 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11147
11148         * cli/cli-decode.c (find_command_name_length): Make it extern.
11149         * cli/cli-decode.h (find_command_name_length): Declare.
11150         * cli/cli-script.c (command_name_equals, line_first_arg):
11151         New functions.
11152         (process_next_line): Use cli-decode to parse command names.
11153         (build_command_line): Make args a constant pointer.
11154
11155 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11156
11157         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11158         Remove case-insensitive search.
11159
11160 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11161
11162         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11163         at the end of the line.  Avoids an ARI warning.
11164
11165 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11166
11167         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11168         rdseed instructions.
11169         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11170
11171 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11172
11173         PR tdep/20936
11174         Provide and use sparc32 and sparc64 target description XML files.
11175         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11176         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11177         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11178         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11179         * features/sparc/sparc32-solaris.xml: New file.
11180         * features/sparc/sparc64-solaris.xml: New file.
11181         * features/sparc/sparc32-solaris.c: Generated.
11182         * features/sparc/sparc64-solaris.c: Generated.
11183         * sparc-tdep.h: Account for differences in target descriptions.
11184         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11185         (sparc32_register_type): Use target provided registers.
11186         (validate_tdesc_registers): New function.
11187         (sparc32_gdbarch_init): Use tdesc_has_registers.
11188         Set pseudoregister functions.
11189         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11190         (sparc64_register_type): Use target provided registers.
11191         (sparc64_init_abi): Set pseudoregister functions.
11192
11193 2017-02-03  Tom Tromey  <tom@tromey.com>
11194
11195         PR rust/21097:
11196         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11197         with a single member.
11198
11199 2017-02-03  Pedro Alves  <palves@redhat.com>
11200
11201         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11202         (cli_interp_base::~cli_interp_base): New.
11203         (cli_interp): New struct.
11204         (as_cli_interp): Cast the interp itself to cli_interp.
11205         (cli_interpreter_pre_command_loop): Rename to ...
11206         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11207         parameter.
11208         (cli_interpreter_init): Rename to ...
11209         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11210         boolean.  Make extern.
11211         (cli_interpreter_resume): Rename to ...
11212         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11213         extern.
11214         (cli_interpreter_suspend): Rename to ...
11215         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11216         extern.
11217         (cli_interpreter_exec): Rename to ...
11218         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11219         extern.
11220         (cli_interpreter_supports_command_editing): Rename to ...
11221         (cli_interp_base::supports_command_editing): ... this.  Remove
11222         'interp' parameter.  Make extern.
11223         (cli_ui_out): Rename to ...
11224         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11225         Make extern.
11226         (cli_set_logging): Rename to ...
11227         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11228         parameter.  Make extern.
11229         (cli_interp_procs): Delete.
11230         (cli_interp_factory): Adjust to use "new".
11231         * cli/cli-interp.h: Include "interps.h".
11232         (struct cli_interp_base): New struct.
11233         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11234         (interp_new): Delete.
11235         (interp::interp, interp::~interp): New.
11236         (interp_set): Use bool, and return void.  Assume the interpreter
11237         has suspend, init and resume methods, and that the all return
11238         void.
11239         (set_top_level_interpreter): interp_set returns void.
11240         (interp_ui_out): Adapt.
11241         (current_interp_set_logging): Adapt.
11242         (interp_data): Delete.
11243         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11244         (interp_exec): Adapt.
11245         (top_level_interpreter_data): Delete.
11246         * interps.h (interp_init_ftype, interp_resume_ftype)
11247         (interp_suspend_ftype, interp_exec_ftype)
11248         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11249         (class interp): New.
11250         (interp_new): Delete.
11251         (interp_set): Now returns void.  Use bool.
11252         (interp_data, top_level_interpreter_data): Delete.
11253         * mi/mi-common.h: Include interps.h.
11254         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11255         init, resume, suspect, exec, interp_ui_out, set_logging and
11256         pre_command_loop methods.
11257         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11258         (mi_interpreter_init): Rename to ...
11259         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11260         bool, return void and make extern.  Adjust.
11261         (mi_interpreter_resume): ... Rename to ...
11262         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11263         return void and make extern.  Adjust.
11264         (mi_interpreter_suspend): ... Rename to ...
11265         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11266         return void and make extern.  Adjust.
11267         (mi_interpreter_exec): ... Rename to ...
11268         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11269         extern.  Adjust.
11270         (mi_interpreter_pre_command_loop): ... Rename to ...
11271         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11272         parameter and make extern.
11273         (mi_on_normal_stop_1): Adjust.
11274         (mi_ui_out): Rename to ...
11275         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11276         parameter and make extern.  Adjust.
11277         (mi_set_logging): Rename to ...
11278         (mi_interp::set_logging): ... this.  Remove the 'interp'
11279         parameter and make extern.  Adjust.
11280         (mi_interp_procs): Delete.
11281         (mi_interp_factory): Adjust to use 'new'.
11282         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11283         (mi_print_exception, mi_execute_command, mi_load_progress):
11284         Adjust.
11285         * tui/tui-interp.c (tui_interp): New class.
11286         (as_tui_interp): Return a tui_interp pointer.
11287         (tui_on_normal_stop, tui_on_signal_received)
11288         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11289         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11290         to use interp::interp_ui_out.
11291         (tui_init): Rename to ...
11292         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11293         bool, return void and make extern.  Adjust.
11294         (tui_resume): Rename to ...
11295         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11296         return void and make extern.  Adjust.
11297         (tui_suspend): Rename to ...
11298         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11299         return void and make extern.  Adjust.
11300         (tui_ui_out): Rename to ...
11301         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11302         parameter, and make extern.  Adjust.
11303         (tui_exec): Rename to ...
11304         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11305         make extern.
11306         (tui_interp_procs): Delete.
11307         (tui_interp_factory): Use "new".
11308
11309 2017-02-02  Tom Tromey  <tom@tromey.com>
11310
11311         * rust-exp.y (ends_raw_string, space_then_number)
11312         (rust_identifier_start_p): Return bool.
11313         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11314         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11315         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11316         (rust_chartype_p): Return bool.
11317         (val_print_struct, rust_print_struct_def, rust_print_type):
11318         Update.
11319         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11320         Return bool.
11321
11322 2017-02-02  Tom Tromey  <tom@tromey.com>
11323
11324         * rust-lang.c: Reindent.
11325
11326 2017-02-02  Tom Tromey  <tom@tromey.com>
11327
11328         * rust-lang.h (rust_crate_for_block): Update.
11329         * rust-lang.c (rust_crate_for_block): Return std::string.
11330         (rust_get_disr_info): Use std:;string, not
11331         gdb::unique_xmalloc_ptr.
11332         * rust-exp.y (crate_name): Update.
11333
11334 2017-02-02  Pedro Alves  <palves@redhat.com>
11335
11336         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11337         field out of gdb_disassembler_test and make it static.
11338
11339 2017-02-02  Pedro Alves  <palves@redhat.com>
11340
11341         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11342         mi1_interp and mi_interp fields.
11343
11344 2017-02-02  Pedro Alves  <palves@redhat.com>
11345
11346         * cli/cli-interp.c (struct saved_output_files, saved_output):
11347         Moved from cli/cli-logging.c.
11348         (cli_set_logging): New function.
11349         (cli_interp_procs): Install cli_set_logging.
11350         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11351         Declare.
11352         * cli/cli-logging.c (struct saved_output_files, saved_output):
11353         Moved to cli/cli-interp.c.
11354         (pop_output_files): Don't save outputs here.
11355         (make_logging_output): New function.
11356         (handle_redirections): Don't build tee nor save previous outputs
11357         here.
11358         * interps.c (current_interp_set_logging): Change prototype.
11359         Assume there's always a set_logging_proc method installed.
11360         * interps.h (interp_set_logging_ftype): Change prototype.
11361         (current_interp_set_logging): Change prototype and adjust comment.
11362         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11363         use make_logging_output.
11364         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11365 2017-02-02  Pedro Alves  <palves@redhat.com>
11366
11367         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11368         from ...
11369         (set_logging_overwrite): ... here.
11370         (logging_no_redirect_file): Delete.
11371         (set_logging_redirect): Don't handle redirection on the fly.
11372         Instead warn that "logging off" / "logging on" is necessary.
11373         (pop_output_files): Delete references to logging_no_redirect_file.
11374         (show_logging_command): Always speak in terms of what will happen
11375         once logging is reenabled.
11376
11377 2017-02-02  Pedro Alves  <palves@redhat.com>
11378
11379         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11380
11381 2017-02-02  Pedro Alves  <palves@redhat.com>
11382
11383         * disasm.c (gdb_pretty_print_insn): Rename to ...
11384         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11385         Remove gdbarch parameter.  Adapt to clear the object's buffers
11386         instead of allocating new buffers, and to print using the object's
11387         gdb_disassembler instead of calling gdb_print_insn.
11388         (dump_insns): Use gdb_pretty_print_disassembler.
11389         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11390         (gdb_pretty_print_disassembler): New class.
11391         * record-btrace.c (btrace_insn_history): Use
11392         gdb_pretty_print_disassembler.
11393
11394 2017-02-02  Pedro Alves  <palves@redhat.com>
11395
11396         * ada-lang.c (type_as_string): Use string_file.
11397         * ada-valprint.c (ada_print_floating): Use string_file.
11398         * ada-varobj.c (ada_varobj_scalar_image)
11399         (ada_varobj_get_value_image): Use string_file.
11400         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11401         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11402         * breakpoint.c (update_inserted_breakpoint_locations)
11403         (insert_breakpoint_locations, reattach_breakpoints)
11404         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11405         (print_it_watchpoint): Use string_file.
11406         (save_breakpoints): Use stdio_file.
11407         * c-exp.y (oper): Use string_file.
11408         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11409         tee_file.
11410         (pop_output_files): Use delete.
11411         (handle_redirections): Use stdio_file and tee_file.
11412         * cli/cli-setshow.c (do_show_command): Use string_file.
11413         * compile/compile-c-support.c (c_compute_program): Use
11414         string_file.
11415         * compile/compile-c-symbols.c (generate_vla_size): Take a
11416         'string_file &' instead of a 'ui_file *'.
11417         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11418         of a 'ui_file *'.  Use string_file.
11419         (generate_c_for_variable_locations): Take a 'string_file &'
11420         instead of a 'ui_file *'.
11421         * compile/compile-internal.h (generate_c_for_for_one_variable):
11422         Take a 'string_file &' instead of a 'ui_file *'.
11423         * compile/compile-loc2c.c (push, pushf, unary, binary)
11424         (print_label, pushf_register_address, pushf_register)
11425         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11426         'ui_file *'.  Adjust.
11427         * compile/compile.c (compile_to_object): Use string_file.
11428         * compile/compile.h (compile_dwarf_expr_to_c)
11429         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11430         'ui_file *'.
11431         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11432         (replace_typedefs_qualified_name): Use string_file and
11433         obstack_copy0.
11434         * disasm.c (gdb_pretty_print_insn): Use string_file.
11435         (gdb_disassembly): Adjust reference the null_stream global.
11436         (do_ui_file_delete): Delete.
11437         (gdb_insn_length): Use null_stream.
11438         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11439         * dwarf2loc.c (dwarf2_compile_property_to_c)
11440         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11441         'string_file &' instead of a 'ui_file *'.
11442         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11443         * dwarf2read.c (do_ui_file_peek_last): Delete.
11444         (dwarf2_compute_name): Use string_file.
11445         * event-top.c (gdb_setup_readline): Use stdio_file.
11446         * gdbarch.sh (verify_gdbarch): Use string_file.
11447         * gdbtypes.c (safe_parse_type): Use null_stream.
11448         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11449         string_file.
11450         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11451         'string_file *' instead of a 'ui_file *'.
11452         (gdbscm_arch_disassemble): Use string_file.
11453         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11454         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11455         inherits from ui_file.
11456         (ioscm_file_port_delete, ioscm_file_port_rewind)
11457         (ioscm_file_port_put): Delete.
11458         (ioscm_file_port_write): Rename to ...
11459         (ioscm_file_port::write): ... this.  Remove file_port_magic
11460         checks.
11461         (ioscm_file_port_new): Delete.
11462         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11463         ui_file_up.
11464         * guile/scm-type.c (tyscm_type_name): Use string_file.
11465         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11466         Use string_file.
11467         * infcmd.c (print_return_value_1): Use string_file.
11468         * infrun.c (print_target_wait_results): Use string_file.
11469         * language.c (add_language): Use string_file.
11470         * location.c (explicit_to_string_internal): Use string_file.
11471         * main.c (captured_main_1): Use null_file.
11472         * maint.c (maintenance_print_architecture): Use stdio_file.
11473         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11474         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11475         event_channel>: Change type to mi_console_file pointer.
11476         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11477         (mi_console_file_delete): Delete.
11478         (struct mi_console_file): Delete.
11479         (mi_console_file_magic): Delete.
11480         (mi_console_file_new): Delete.
11481         (mi_console_file::mi_console_file): New.
11482         (mi_console_file_delete): Delete.
11483         (mi_console_file_fputs): Delete.
11484         (mi_console_file::write): New.
11485         (mi_console_raw_packet): Delete.
11486         (mi_console_file::flush): New.
11487         (mi_console_file_flush): Delete.
11488         (mi_console_set_raw): Rename to ...
11489         (mi_console_file::set_raw): ... this.
11490         * mi/mi-console.h (class mi_console_file): New class.
11491         (mi_console_file_new, mi_console_set_raw): Delete.
11492         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11493         (mi_set_logging): Use delete and tee_file.  Adjust.
11494         * mi/mi-main.c (output_register): Use string_file.
11495         (mi_cmd_data_evaluate_expression): Use string_file.
11496         (mi_cmd_data_read_memory): Use string_file.
11497         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11498         * mi/mi-out.c (mi_ui_out::main_stream): New.
11499         (mi_ui_out::rewind): Use main_stream and
11500         string_file.
11501         (mi_ui_out::put): Use main_stream and string_file.
11502         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11503         Allocate a 'string_file' instead.
11504         (mi_out_new): Don't allocate a mem_fileopen stream here.
11505         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11506         (mi_ui_out::main_stream): Declare method.
11507         * printcmd.c (eval_command): Use string_file.
11508         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11509         * python/py-arch.c (archpy_disassemble): Use string_file.
11510         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11511         * python/py-frame.c (frapy_str): Use string_file.
11512         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11513         Use string_file.
11514         * python/py-type.c (typy_str): Use string_file.
11515         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11516         * python/py-value.c (valpy_str): Use string_file.
11517         * record-btrace.c (btrace_insn_history): Use string_file.
11518         * regcache.c (regcache_print): Use stdio_file.
11519         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11520         * remote.c (escape_buffer): Use string_file.
11521         * rust-lang.c (rust_get_disr_info): Use string_file.
11522         * serial.c (serial_open_ops_1): Use stdio_file.
11523         (do_serial_close): Use delete.
11524         * stack.c (print_frame_arg): Use string_file.
11525         (print_frame_args): Remove local mem_fileopen stream, not used.
11526         (print_frame): Use string_file.
11527         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11528         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11529         Take a 'string_file *' instead of a 'ui_file *'.
11530         * top.c (new_ui): Use stdio_file and stderr_file.
11531         (free_ui): Use delete.
11532         (execute_command_to_string): Use string_file.
11533         (quit_confirm): Use string_file.
11534         * tracepoint.c (collection_list::append_exp): Use string_file.
11535         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11536         * tui/tui-file.c: Don't include "ui-file.h".
11537         (enum streamtype, struct tui_stream): Delete.
11538         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11539         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11540         (tui_file::tui_file): New method.
11541         (tui_file_fputs): Delete.
11542         (tui_file_get_strbuf): Delete.
11543         (tui_file::puts): New method.
11544         (tui_file_adjust_strbuf): Delete.
11545         (tui_file_flush): Delete.
11546         (tui_file::flush): New method.
11547         * tui/tui-file.h: Tweak intro comment.
11548         Include ui-file.h.
11549         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11550         (tui_file_adjust_strbuf): Delete declarations.
11551         (class tui_file): New class.
11552         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11553         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11554         (tui_register_format): Use string_stream.
11555         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11556         (tui_get_function_from_frame): Use string_file.
11557         * typeprint.c (type_to_string): Use string_file.
11558         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11559         (null_stream): New global.
11560         (ui_file_delete): Delete.
11561         (ui_file::ui_file): New.
11562         (null_file_isatty): Delete.
11563         (ui_file::~ui_file): New.
11564         (null_file_rewind): Delete.
11565         (ui_file::printf): New.
11566         (null_file_put): Delete.
11567         (null_file_flush): Delete.
11568         (ui_file::putstr): New.
11569         (null_file_write): Delete.
11570         (ui_file::putstrn): New.
11571         (null_file_read): Delete.
11572         (ui_file::putc): New.
11573         (null_file_fputs): Delete.
11574         (null_file_write_async_safe): Delete.
11575         (ui_file::vprintf): New.
11576         (null_file_delete): Delete.
11577         (null_file::write): New.
11578         (null_file_fseek): Delete.
11579         (null_file::puts): New.
11580         (ui_file_data): Delete.
11581         (null_file::write_async_safe): New.
11582         (gdb_flush, ui_file_isatty): Adjust.
11583         (ui_file_put, ui_file_rewind): Delete.
11584         (ui_file_write): Adjust.
11585         (ui_file_write_for_put): Delete.
11586         (ui_file_write_async_safe, ui_file_read): Adjust.
11587         (ui_file_fseek): Delete.
11588         (fputs_unfiltered): Adjust.
11589         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11590         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11591         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11592         (set_ui_file_data): Delete.
11593         (string_file::~string_file, string_file::write)
11594         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11595         (do_ui_file_as_string, ui_file_as_string): Delete.
11596         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11597         (struct mem_file): Delete.
11598         (mem_file_new): Delete.
11599         (stdio_file::stdio_file): New.
11600         (mem_file_delete): Delete.
11601         (stdio_file::stdio_file): New.
11602         (mem_fileopen): Delete.
11603         (stdio_file::~stdio_file): New.
11604         (mem_file_rewind): Delete.
11605         (stdio_file::set_stream): New.
11606         (mem_file_put): Delete.
11607         (stdio_file::open): New.
11608         (mem_file_write): Delete.
11609         (stdio_file_magic, struct stdio_file): Delete.
11610         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11611         (stdio_file::flush): New.
11612         (stdio_file_read): Rename to ...
11613         (stdio_file::read): ... this.  Adjust.
11614         (stdio_file_write): Rename to ...
11615         (stdio_file::write): ... this.  Adjust.
11616         (stdio_file_write_async_safe): Rename to ...
11617         (stdio_file::write_async_safe) ... this.  Adjust.
11618         (stdio_file_fputs): Rename to ...
11619         (stdio_file::puts) ... this.  Adjust.
11620         (stdio_file_isatty): Delete.
11621         (stdio_file_fseek): Delete.
11622         (stdio_file::isatty): New.
11623         (stderr_file_write): Rename to ...
11624         (stderr_file::write) ... this.  Adjust.
11625         (stderr_file_fputs): Rename to ...
11626         (stderr_file::puts) ... this.  Adjust.
11627         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11628         (stderr_file::stderr_file): New.
11629         (tee_file_magic): Delete.
11630         (struct tee_file): Delete.
11631         (tee_file::tee_file): New.
11632         (tee_file_new): Delete.
11633         (tee_file::~tee_file): New.
11634         (tee_file_delete): Delete.
11635         (tee_file_flush): Rename to ...
11636         (tee_file::flush): ... this.  Adjust.
11637         (tee_file_write): Rename to ...
11638         (tee_file::write): ... this.  Adjust.
11639         (tee_file::write_async_safe): New.
11640         (tee_file_fputs): Rename to ...
11641         (tee_file::puts): ... this.  Adjust.
11642         (tee_file_isatty): Rename to ...
11643         (tee_file::isatty): ... this.  Adjust.
11644         * ui-file.h (struct obstack, struct ui_file): Don't
11645         forward-declare.
11646         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11647         (ui_file_write_ftype)
11648         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11649         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11650         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11651         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11652         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11653         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11654         (set_ui_file_fseek): Delete.
11655         (ui_file_data, ui_file_delete, ui_file_rewind)
11656         (struct ui_file): New.
11657         (ui_file_up): New.
11658         (class null_file): New.
11659         (null_stream): Declare.
11660         (ui_file_write_for_put, ui_file_put): Delete.
11661         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11662         Delete.
11663         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11664         (gdb_fopen, tee_file_new): Delete.
11665         (struct string_file): New.
11666         (struct stdio_file): New.
11667         (stdio_file_up): New.
11668         (struct stderr_file): New.
11669         (class tee_file): New.
11670         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11671         of a 'ui_file *'.  Adjust.
11672         * ui-out.h (class ui_out) <field_stream>: Likewise.
11673         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11674         (null_stream): Delete.
11675         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11676         Adjust.
11677         * utils.h (struct ui_file): Delete forward declaration..
11678         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11679         (error_stream): Take a 'string_file &' instead of a
11680         'ui_file *'.
11681         * varobj.c (varobj_value_get_print_value): Use string_file.
11682         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11683         * gdbarch.c: Regenerate.
11684
11685 2017-02-02  Pedro Alves  <palves@redhat.com>
11686
11687         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11688         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11689         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11690         Adjust to call gdb_print_insn instead of
11691         gdb_disassembler::print_insn.
11692         (dump_insns, do_mixed_source_and_assembly_deprecated)
11693         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11694         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11695         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11696         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11697         declaration.
11698         (gdb_pretty_print_insn): Re-add declaration.
11699         * record-btrace.c (btrace_insn_history): Don't allocate a
11700         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11701
11702 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11703
11704         * disasm.h (gdb_disassembly): Remove file_string parameter.
11705         * disasm.c (gdb_disassembly): Likewise.
11706         * cli/cli-cmds.c (print_disassembly): Adapt.
11707         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11708         * stack.c (do_gdb_disassembly): Likewise.
11709
11710 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11711
11712         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11713         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11714         targets.  And if the implicit value is longer than needed, extract
11715         the first bytes instead of the "least significant" ones.
11716
11717 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11718
11719         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11720         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11721         (btrace_fetch): Assert can_access_registers_ptid.
11722         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11723         validate_registers_access.
11724
11725 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11726
11727         * gdbthread.h (can_access_registers_ptid): New.
11728         * thread.c (can_access_registers_ptid): New.
11729
11730 2017-02-01  Pedro Alves  <palves@redhat.com>
11731
11732         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11733
11734 2017-01-31  Pedro Alves  <palves@redhat.com>
11735
11736         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11737         Fix typos.
11738
11739 2017-01-31  Pedro Alves  <palves@redhat.com>
11740
11741         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11742         not used.
11743
11744 2017-01-31  Pedro Alves  <palves@redhat.com>
11745
11746         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11747
11748 2017-01-31  Pedro Alves  <palves@redhat.com>
11749
11750         * common/scoped_restore.h
11751         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11752         change the value's parameter type to T2.
11753         (make_scoped_restore): Likewise.
11754
11755 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11756             Richard Henderson  <rth@redhat.com>
11757
11758         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11759         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11760         GS_BASE for older kernels.
11761         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11762         GS_BASE for older kernels.
11763         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11764         and GS_BASE to the offset table.
11765         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11766         system register group.
11767         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11768         for older kernels.
11769         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11770         amd64 ABI.
11771         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11772         AMD64_GSBASE_REGNUM.
11773         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11774         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11775         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11776         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11777         i386/64bit-segments.xml in those rules.
11778         * features/i386/64bit-segments.xml: New file.
11779         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11780         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11781         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11782         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11783         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11784         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11785         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11786         * features/i386/amd64-avx-linux.c: Regenerated.
11787         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11788         * features/i386/amd64-avx-mpx.c: Regenerated.
11789         * features/i386/amd64-avx512-linux.c: Regenerated.
11790         * features/i386/amd64-linux.c: Regenerated.
11791         * features/i386/amd64-mpx-linux.c: Regenerated.
11792         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11793         * features/i386/i386-avx-mpx.c: Regenerated.
11794         * features/i386/x32-avx-linux.c: Regenerated.
11795         * features/i386/x32-avx512-linux.c: Regenerated.
11796         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11797         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11798         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11799         * regformats/i386/amd64-linux.dat: Regenerated.
11800         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11801         * regformats/i386/x32-avx-linux.dat: Regenerated.
11802         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11803         * regformats/i386/x32-linux.dat: Regenerated.
11804
11805 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11806
11807         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11808         Set to AMD64_NUM_REGS.
11809
11810 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11811
11812         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11813         that checks validity of a register number.
11814
11815 2017-01-27  Kees Cook  <keescook@google.com>
11816
11817         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11818         fetch_fpregs if target has fpa registers.
11819         (arm_linux_store_inferior_registers): Call store_fpregs if target
11820         has fpa registers.
11821
11822 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11823
11824         * cris-tdep.c (cris_gdbarch_init): Remove check for
11825         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11826
11827 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11828
11829         * corelow.c (get_core_register_section): Check for regset
11830         existence before checking for REGSET_VARIABLE_SIZE.
11831
11832 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11833             Pedro Alves  <palves@redhat.com>
11834
11835         PR gdb/20939
11836         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11837         call memory_error, save memaddr instead.
11838         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11839         negative, cal memory_error.
11840         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11841
11842 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11843
11844         * disasm-selftests.c (memory_error_test): New function.
11845         (_initialize_disasm_selftests): Register memory_error_test.
11846
11847 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11848
11849         * Makefile.in (SFILES): Add disasm-selftests.c and
11850         selftest-arch.c.
11851         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11852         * disasm-selftests.c: New file.
11853         * selftest-arch.c: New file.
11854         * selftest-arch.h: New file.
11855
11856 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11857
11858         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11859         to bfd_arch_mep.  Don't return 0 if section is not
11860         found.  Call print_insn_mep.
11861
11862 2017-01-26  Pedro Alves  <palves@redhat.com>
11863             Yao Qi  <yao.qi@linaro.org>
11864
11865         * arm-tdep.c: Include "disasm.h".
11866         (gdb_print_insn_arm): Update code to get gdbarch.
11867         * disasm.c (dis_asm_read_memory): Change it to
11868         gdb_disassembler::dis_asm_read_memory.
11869         (dis_asm_memory_error): Likewise.
11870         (dis_asm_print_address): Likewise.
11871         (gdb_pretty_print_insn): Change it to
11872         gdb_disassembler::pretty_print_insn.
11873         (dump_insns): Add one argument gdb_disassemlber.  All
11874         callers updated.
11875         (do_mixed_source_and_assembly_deprecated): Likewise.
11876         (do_mixed_source_and_assembly): Likewise.
11877         (do_assembly_only): Likewise.
11878         (gdb_disassembler::gdb_disassembler): New.
11879         (gdb_disassembler::print_insn): New.
11880         * disasm.h (class gdb_disassembler): New.
11881         (gdb_pretty_print_insn): Remove declaration.
11882         (gdb_disassemble_info): Likewise.
11883         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11884         (gdbscm_disasm_read_memory_worker): Update.
11885         (gdbscm_disasm_read_memory): Update.
11886         (gdbscm_disasm_memory_error): Remove.
11887         (gdbscm_disasm_print_address): Remove.
11888         (gdbscm_disassembler::gdbscm_disassembler): New.
11889         (gdbscm_print_insn_from_port): Update.
11890         * mips-tdep.c: Include disasm.h.
11891         (gdb_print_insn_mips): Update code to get gdbarch.
11892         * record-btrace.c (btrace_insn_history): Update.
11893         * spu-tdep.c: Include disasm.h.
11894         (struct spu_dis_asm_data): Remove.
11895         (struct spu_dis_asm_info): New.
11896         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11897         SPU id.
11898         (gdb_print_insn_spu): Cast disassemble_info to
11899         spu_dis_asm_info.
11900
11901 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11902
11903         * disasm.c (do_ui_file_delete): Delete.
11904         (gdb_insn_length): Move code creating stream to ...
11905         * utils.c (null_stream): ... here.  New function.
11906         * utils.h (null_stream): Declare.
11907
11908 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11909
11910         * python/py-inferior.c (find_thread_object): Return directly
11911         from the loop.  Remove "found" variable.
11912
11913 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11914
11915         GDB 7.12.1 released.
11916
11917 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11918
11919         * python/py-function.c (fnpy_call): Reorder declarations to have
11920         the gdbpy_enter object declared first.
11921         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11922
11923 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11924
11925         PR python/21068
11926         * python/python-internal.h (PyMem_RawMalloc): Define for
11927         Python < 3.4.
11928         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11929         PyMem_RawMalloc instead of PyMem_Malloc.
11930
11931 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11932             Luis Machado  <lgustavo@codesourcery.com>
11933
11934         * NEWS (New commands): Mention flash-erase.
11935         (New MI commands): Mention target-flash-erase.
11936         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11937         command.
11938         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11939         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11940         * target.c (flash_erase_command): New function.
11941         (initialize_targets): Add new flash-erase command.
11942         * target.h (flash_erase_command): New declaration.
11943
11944 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11945
11946         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11947         HAVE_SYS_PROCFS_H is defined.
11948
11949 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11950
11951         * remote.c (struct cached_reg): Change data into a pointer.
11952         * (stop_reply_dtr): Free data pointers before deleting vector.
11953         (process_stop_reply): Likewise.
11954         (remote_parse_stop_reply): Allocate space for data
11955
11956 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11957
11958         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11959         MAX_REGISTER_SIZE.
11960         (amd64_pseudo_register_read_value): Likewise.
11961         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11962         (store_register_using_P): Likewise.
11963         * regcache.c (regcache_xfer_part): Likewise.
11964
11965 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11966
11967         Split real and pseudo registers.
11968         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11969         (sparc32_pseudo_regnum): New enum.
11970         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11971         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11972         (SPARC32_CP0_REGISTERS): New macro.
11973         (sparc32_pseudo_register_name): New function.
11974         (sparc32_register_name): Use sparc32_pseudo_register_name.
11975         (sparc32_pseudo_register_type): New function.
11976         (sparc32_register_type): Use sparc32_pseudo_register_type.
11977         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11978         pseudo register numbers.
11979         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11980         (SPARC64_CP0_REGISTERS): New macro.
11981         (sparc64_pseudo_register_name): New function.
11982         (sparc64_register_name): Use sparc64_pseudo_register_name.
11983         (sparc64_pseudo_register_type): New function.
11984         (sparc64_register_type): Use sparc64_pseudo_register_type.
11985         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11986         pseudo register numbers.
11987         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11988         sparc64_store_arguments): Handle pseudo register numbers.
11989
11990 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11991
11992         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11993         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11994         output.
11995         (getpkt_or_notif_sane_1): Likewise.
11996
11997 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11998
11999         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12000         of CC.  Pass "-x c++-header" instead of "-x c".
12001
12002 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12003
12004         * remote.c (remote_can_async_p): Update comment.
12005
12006 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12007
12008         * linux-nat.c (linux_nat_can_async_p): Update comment.
12009
12010 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12011
12012         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12013
12014 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12015
12016         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12017
12018 2017-01-10  Tom Tromey  <tom@tromey.com>
12019
12020         * python/py-type.c (typy_legacy_template_argument): Update.
12021         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12022         ~demangle_parse_info): Declare new members.
12023         (cp_demangled_name_to_comp): Return unique_ptr.
12024         (cp_demangled_name_parse_free)
12025         (make_cleanup_cp_demangled_name_parse_free)
12026         (cp_new_demangle_parse_info): Remove.
12027         * cp-support.c (do_demangled_name_parse_free_cleanup)
12028         (make_cleanup_cp_demangled_name_parse_free): Remove.
12029         (inspect_type, cp_canonicalize_string_full)
12030         (cp_canonicalize_string): Update.
12031         (mangled_name_to_comp): Change return type.
12032         (cp_class_name_from_physname, method_name_from_physname)
12033         (cp_func_name, cp_remove_params): Update.
12034         * cp-name-parser.y (demangle_parse_info): New constructor, from
12035         cp_new_demangle_parse_info.
12036         (~demangle_parse_info): New destructor, from
12037         cp_demangled_name_parse_free.
12038         (cp_merge_demangle_parse_infos): Update.
12039         (cp_demangled_name_to_comp): Change return type.
12040
12041 2017-01-10  Tom Tromey  <tom@tromey.com>
12042
12043         * top.c (prevent_dont_repeat): Change return type.
12044         * python/python.c (execute_gdb_command): Use std::string.
12045         Update.
12046         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12047         * command.h (prevent_dont_repeat): Change return type.
12048         * breakpoint.c (bpstat_do_actions_1): Update.
12049
12050 2017-01-10  Tom Tromey  <tom@tromey.com>
12051
12052         * value.h (scoped_value_mark::~scoped_value_mark): Call
12053         free_to_mark.
12054         (scoped_value_mark::free_to_mark): New method.
12055         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12056         scoped_value_mark.
12057
12058 2017-01-10  Tom Tromey  <tom@tromey.com>
12059
12060         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12061         (valpy_reference_value, valpy_const_value, valpy_get_address)
12062         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12063         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12064         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12065         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12066         scoped_value_mark.
12067         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12068         * value.h (scoped_value_mark): New class.
12069
12070 2017-01-10  Tom Tromey  <tom@tromey.com>
12071
12072         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12073         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12074         * psymtab.c (discard_psymtabs_upto): Remove.
12075         (make_cleanup_discard_psymtabs): Remove.
12076         (struct psymtab_state): Remove.
12077
12078 2017-01-10  Tom Tromey  <tom@tromey.com>
12079
12080         * record-full.c (record_full_save_cleanups): Remove.
12081         (record_full_save): Use gdb::unlinker.
12082         * gcore.c (do_bfd_delete_cleanup): Remove.
12083         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12084         cleanups.
12085         * dwarf2read.c (unlink_if_set): Remove.
12086         (write_psymtabs_to_index): Use gdb::unlinker.
12087         * common/gdb_unlinker.h: New file.
12088
12089 2017-01-10  Tom Tromey  <tom@tromey.com>
12090
12091         * windows-tdep.c (windows_xfer_shared_library): Update.
12092         * windows-nat.c (windows_make_so): Update.
12093         * utils.h (make_cleanup_bfd_unref): Remove.
12094         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12095         * symfile.h (symfile_bfd_open)
12096         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12097         * symfile.c (read_symbols, symbol_file_add)
12098         (separate_debug_file_exists): Update.
12099         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12100         (generic_load, reread_symbols): Update.
12101         * symfile-mem.c (symbol_file_add_from_memory): Update.
12102         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12103         (spu_symbol_file_add_from_memory): Update.
12104         * solist.h (struct target_so_ops) <bfd_open>: Return
12105         gdb_bfd_ref_ptr.
12106         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12107         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12108         gdb_bfd_ref_ptr.
12109         (solib_map_sections, reload_shared_libraries_1): Update.
12110         * solib-svr4.c (enable_break): Update.
12111         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12112         * solib-frv.c (enable_break2): Update.
12113         * solib-dsbt.c (enable_break): Update.
12114         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12115         gdb_bfd_ref_ptr.
12116         (darwin_solib_get_all_image_info_addr_at_init): Update.
12117         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12118         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12119         * record-full.c (record_full_save): Update.
12120         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12121         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12122         * minidebug.c (find_separate_debug_file_in_section): Return
12123         gdb_bfd_ref_ptr.
12124         * machoread.c (macho_add_oso_symfile): Change abfd to
12125         gdb_bfd_ref_ptr.
12126         (macho_symfile_read_all_oso): Update.
12127         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12128         (macho_symfile_read): Update.
12129         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12130         (jit_bfd_try_read_symtab): Update.
12131         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12132         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12133         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12134         gdb_bfd_ref_ptr.
12135         (gdb_bfd_ref_policy): New struct.
12136         (gdb_bfd_ref_ptr): New typedef.
12137         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12138         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12139         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12140         gdb_bfd_ref_ptr.
12141         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12142         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12143         (gcore_command): Update.
12144         * exec.c (exec_file_attach): Update.
12145         * elfread.c (elf_symfile_read): Update.
12146         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12147         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12148         (open_and_init_dwo_file): Update.
12149         (open_dwp_file): Return gdb_bfd_ref_ptr.
12150         (open_and_init_dwp_file): Update.
12151         * corelow.c (core_open): Update.
12152         * compile/compile-object-load.c (compile_object_load): Update.
12153         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12154         * coffread.c (coff_symfile_read): Update.
12155         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12156         gdb_bfd_ref_ptr.  Rename.
12157         (dump_bfd_file, restore_command): Update.
12158         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12159         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12160         (find_separate_debug_file_by_buildid): Update.
12161
12162 2017-01-10  Tom Tromey  <tom@tromey.com>
12163
12164         * common/gdb_ref_ptr.h: New file.
12165         * python/py-ref.h (struct gdbpy_ref_policy): New.
12166         (gdbpy_ref): Now a typedef.
12167
12168 2017-01-10  Tom Tromey  <tom@tromey.com>
12169
12170         * utils.h (make_cleanup_htab_delete): Don't declare.
12171         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12172         Remove.
12173         * linespec.c (decode_compound_collector): Add constructor,
12174         destructor.
12175         (lookup_prefix_sym): Remove cleanup.
12176         (symtab_collector): Add constructor, destructor.
12177         (collect_symtabs_from_filename): Remove cleanup.
12178         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12179         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12180         Use htab_up.
12181         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12182         * dwarf2read.c (dw2_expand_symtabs_matching)
12183         (dw2_map_symbol_filenames, dwarf_decode_macros)
12184         (write_psymtabs_to_index): Use htab_up.
12185         * dwarf2loc.c (func_verify_no_selftailcall)
12186         (call_site_find_chain_1, func_verify_no_selftailcall)
12187         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12188         std::vector, gdb::unique_xmalloc_ptr.
12189         (call_sitep): Remove typedef.
12190         (dwarf2_locexpr_baton_eval): Remove unused variable.
12191
12192 2017-01-10  Tom Tromey  <tom@tromey.com>
12193
12194         * python/python-internal.h (make_cleanup_py_decref)
12195         (make_cleanup_py_xdecref): Don't declare.
12196         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12197         (py_xdecref, make_cleanup_py_xdecref): Remove.
12198
12199 2017-01-10  Tom Tromey  <tom@tromey.com>
12200
12201         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12202         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12203
12204 2017-01-10  Tom Tromey  <tom@tromey.com>
12205
12206         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12207
12208 2017-01-10  Tom Tromey  <tom@tromey.com>
12209
12210         * python/py-utils.c (unicode_to_encoded_string)
12211         (python_string_to_target_string)
12212         (python_string_to_target_python_string)
12213         (python_string_to_host_string, gdbpy_obj_to_string)
12214         (get_addr_from_python): Use gdbpy_ref.
12215
12216 2017-01-10  Tom Tromey  <tom@tromey.com>
12217
12218         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12219         gdbpy_ref.
12220
12221 2017-01-10  Tom Tromey  <tom@tromey.com>
12222
12223         * python/python.c (eval_python_command, gdbpy_decode_line)
12224         (gdbpy_run_events, gdbpy_start_type_printers)
12225         (gdbpy_apply_type_printers): Use gdbpy_ref.
12226
12227 2017-01-10  Tom Tromey  <tom@tromey.com>
12228
12229         * python/py-param.c (get_doc_string, compute_enum_values): Use
12230         gdbpy_ref.
12231
12232 2017-01-10  Tom Tromey  <tom@tromey.com>
12233
12234         * python/py-inferior.c (find_thread_object, build_inferior_list):
12235         Use gdbpy_ref.
12236
12237 2017-01-10  Tom Tromey  <tom@tromey.com>
12238
12239         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12240
12241 2017-01-10  Tom Tromey  <tom@tromey.com>
12242
12243         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12244         gdbpy_ref.
12245
12246 2017-01-10  Tom Tromey  <tom@tromey.com>
12247
12248         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12249         extra incref.
12250         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12251         Use gdbpy_ref.
12252
12253 2017-01-10  Tom Tromey  <tom@tromey.com>
12254
12255         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12256         gdbpy_ref.
12257
12258 2017-01-10  Tom Tromey  <tom@tromey.com>
12259
12260         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12261         decref results of PyArg_ParseTupleAndKeywords.
12262
12263 2017-01-10  Tom Tromey  <tom@tromey.com>
12264
12265         * python/python.c (python_run_simple_file): Use
12266         unique_xmalloc_ptr, gdbpy_ref.
12267
12268 2017-01-10  Tom Tromey  <tom@tromey.com>
12269
12270         * python/py-prettyprint.c (print_stack_unless_memory_error)
12271         (print_string_repr, print_children): Use gdbpy_ref.
12272         (dummy_python_frame): New class.
12273         (dummy_python_frame::dummy_python_frame): Rename from
12274         push_dummy_python_frame.
12275         (py_restore_tstate): Remove.
12276
12277 2017-01-10  Tom Tromey  <tom@tromey.com>
12278
12279         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12280
12281 2017-01-10  Tom Tromey  <tom@tromey.com>
12282
12283         * python/python.c (ensure_python_env, restore_python_env):
12284         Remove.
12285         * python/python-internal.h (ensure_python_env): Don't declare.
12286         * varobj.h (varobj_ensure_python_env): Don't declare.
12287         * varobj.c (varobj_ensure_python_env): Remove.
12288
12289 2017-01-10  Tom Tromey  <tom@tromey.com>
12290
12291         * varobj.c (varobj_value_get_print_value): Use
12292         gdbpy_enter_varobj.
12293
12294 2017-01-10  Tom Tromey  <tom@tromey.com>
12295
12296         * python/py-prettyprint.c (print_string_repr, print_children):
12297         Update.
12298         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12299         of "encoding".
12300         * varobj.c (varobj_value_get_print_value): Update.
12301         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12302
12303 2017-01-10  Tom Tromey  <tom@tromey.com>
12304
12305         * varobj.c (varobj_get_display_hint)
12306         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12307         (varobj_set_visualizer, free_variable): Use
12308         gdbpy_enter_varobj.
12309
12310 2017-01-10  Tom Tromey  <tom@tromey.com>
12311
12312         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12313         (do_finish_initialization): New function.  Use gdbpy_ref.
12314         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12315         do_finish_initialization.
12316
12317 2017-01-10  Tom Tromey  <tom@tromey.com>
12318
12319         * python/py-param.c (get_set_value, get_show_value): Use
12320         gdbpy_enter, gdbpy_ref.
12321
12322 2017-01-10  Tom Tromey  <tom@tromey.com>
12323
12324         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12325
12326 2017-01-10  Tom Tromey  <tom@tromey.com>
12327
12328         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12329
12330 2017-01-10  Tom Tromey  <tom@tromey.com>
12331
12332         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12333         Use gdbpy_enter_varobj.
12334
12335 2017-01-10  Tom Tromey  <tom@tromey.com>
12336
12337         * varobj.c (gdbpy_enter_varobj): New constructor.
12338         * python/python-internal.h (gdbpy_enter_varobj): New class.
12339         * python/py-varobj.c (py_varobj_get_iterator): Use
12340         gdbpy_enter_varobj.
12341
12342 2017-01-10  Tom Tromey  <tom@tromey.com>
12343
12344         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12345         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12346         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12347         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12348         unique_xmalloc_ptr.
12349         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12350
12351 2017-01-10  Tom Tromey  <tom@tromey.com>
12352
12353         * python/py-xmethods.c (invoke_match_method): Use
12354         gdbpy_ref.
12355
12356 2017-01-10  Tom Tromey  <tom@tromey.com>
12357
12358         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12359         gdbpy_enter, gdbpy_ref.
12360
12361 2017-01-10  Tom Tromey  <tom@tromey.com>
12362
12363         * python/python.c (python_interactive_command): Use gdbpy_enter.
12364
12365 2017-01-10  Tom Tromey  <tom@tromey.com>
12366
12367         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12368         gdbpy_ref.
12369
12370 2017-01-10  Tom Tromey  <tom@tromey.com>
12371
12372         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12373         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12374
12375 2017-01-10  Tom Tromey  <tom@tromey.com>
12376
12377         * utils.h (htab_deleter): New struct.
12378         (htab_up): New typedef.
12379         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12380         gdbpy_enter, gdbpy_ref, htab_up.
12381
12382 2017-01-10  Tom Tromey  <tom@tromey.com>
12383
12384         * python/py-unwind.c (pending_frame_invalidate): Remove.
12385         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12386
12387 2017-01-10  Tom Tromey  <tom@tromey.com>
12388
12389         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12390         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12391
12392 2017-01-10  Tom Tromey  <tom@tromey.com>
12393
12394         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12395
12396 2017-01-10  Tom Tromey  <tom@tromey.com>
12397
12398         * python/python.c (gdbpy_eval_from_control_command)
12399         (gdbpy_source_script, gdbpy_run_events)
12400         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12401         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12402         gdbpy_enter.
12403
12404 2017-01-10  Tom Tromey  <tom@tromey.com>
12405
12406         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12407
12408 2017-01-10  Tom Tromey  <tom@tromey.com>
12409
12410         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12411
12412 2017-01-10  Tom Tromey  <tom@tromey.com>
12413
12414         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12415         (python_on_inferior_call_pre, python_on_inferior_call_post)
12416         (python_on_memory_change, python_on_register_change)
12417         (python_inferior_exit, python_new_objfile, add_thread_object)
12418         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12419
12420 2017-01-10  Tom Tromey  <tom@tromey.com>
12421
12422         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12423         (bpfinishpy_handle_exit): Use gdbpy_enter.
12424
12425 2017-01-10  Tom Tromey  <tom@tromey.com>
12426
12427         * python/py-cmd.c (cmdpy_destroyer)
12428         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12429         gdbpy_enter.
12430
12431 2017-01-10  Tom Tromey  <tom@tromey.com>
12432
12433         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12434         gdbpy_enter.
12435         (gdbpy_breakpoint_has_cond): Likewise.
12436
12437 2017-01-10  Tom Tromey  <tom@tromey.com>
12438
12439         * python/python.c (gdbpy_enter): New constructor.
12440         (~gdbpy_enter): New destructor.
12441         (restore_python_env, ensure_python_env): Rewrite.
12442         * python/python-internal.h (gdbpy_enter): New class.
12443
12444 2017-01-10  Tom Tromey  <tom@tromey.com>
12445
12446         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12447
12448 2017-01-10  Tom Tromey  <tom@tromey.com>
12449
12450         * python/py-value.c (value_has_field, get_field_flag)
12451         (get_field_type, valpy_getitem, convert_value_from_python): Use
12452         gdbpy_ref.
12453
12454 2017-01-10  Tom Tromey  <tom@tromey.com>
12455
12456         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12457         gdbpy_ref.
12458
12459 2017-01-10  Tom Tromey  <tom@tromey.com>
12460
12461         * python/py-prettyprint.c (search_pp_list)
12462         (find_pretty_printer_from_objfiles)
12463         (find_pretty_printer_from_progspace)
12464         (find_pretty_printer_from_gdb, find_pretty_printer)
12465         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12466         gdbpy_ref.
12467
12468 2017-01-10  Tom Tromey  <tom@tromey.com>
12469
12470         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12471
12472 2017-01-10  Tom Tromey  <tom@tromey.com>
12473
12474         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12475         (ltpy_get_all_source_lines): Use gdbpy_ref.
12476
12477 2017-01-10  Tom Tromey  <tom@tromey.com>
12478
12479         * python/py-framefilter.c (extract_sym, extract_value)
12480         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12481         gdbpy_ref.
12482
12483 2017-01-10  Tom Tromey  <tom@tromey.com>
12484
12485         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12486
12487 2017-01-10  Tom Tromey  <tom@tromey.com>
12488
12489         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12490
12491 2017-01-10  Tom Tromey  <tom@tromey.com>
12492
12493         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12494         gdbpy_ref.
12495
12496 2017-01-10  Tom Tromey  <tom@tromey.com>
12497
12498         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12499
12500 2017-01-10  Tom Tromey  <tom@tromey.com>
12501
12502         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12503         (typy_range): Use gdbpy_ref.
12504
12505 2017-01-10  Tom Tromey  <tom@tromey.com>
12506
12507         * python/py-threadevent.c (create_thread_event_object): Use
12508         gdbpy_ref.
12509         * python/py-stopevent.c (create_stop_event_object): Simplify.
12510         (emit_stop_event): Use gdbpy_ref.
12511         * python/py-signalevent.c (create_signal_event_object): Use
12512         gdbpy_ref.
12513         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12514         (emit_new_objfile_event, create_clear_objfiles_event_object)
12515         (emit_clear_objfiles_event): Use gdbpy_ref.
12516         * python/py-infevents.c (create_inferior_call_event_object)
12517         (create_register_changed_event_object)
12518         (create_memory_changed_event_object, emit_inferior_call_event)
12519         (emit_memory_changed_event, emit_register_changed_event): Use
12520         gdbpy_ref.
12521         * python/py-exitedevent.c (create_exited_event_object)
12522         (emit_exited_event): Use gdbpy_ref.
12523         * python/py-event.h (evpy_emit_event): Remove
12524         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12525         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12526         * python/py-continueevent.c (emit_continue_event): Use
12527         gdbpy_ref.
12528         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12529         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12530         gdbpy_ref.
12531         * python/py-bpevent.c (create_breakpoint_event_object): Use
12532         gdbpy_ref.
12533
12534 2017-01-10  Tom Tromey  <tom@tromey.com>
12535
12536         * python/py-ref.h: New file.
12537
12538 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12539
12540         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12541         void.
12542         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12543         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12544         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12545         * ui-out.c (ui_out::redirect): Likewise.
12546         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12547         * cli/cli-logging.c (set_logging_redirect): Update call site of
12548         ui_out::redirect.
12549         (handle_redirections): Likewise.
12550         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12551         * top.c (execute_command_to_string): Likewise.
12552         * utils.c (do_ui_out_redirect_pop): Likewise.
12553
12554 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12555
12556         * stack.c (_initialize_stack): Update "frame" command help message.
12557
12558 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12559
12560         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12561
12562 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12563
12564         * x86-linux-nat.h: Include gdb_proc_service.h.
12565
12566 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12567
12568         * ser-base.h: Include serial.h.
12569
12570 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12571
12572         * ppc-linux-tdep.h: Include ppc-tdep.h.
12573
12574 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12575
12576         * nat/amd64-linux-siginfo.h: Include signal.h.
12577
12578 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12579
12580         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12581
12582 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12583
12584         * mi/mi-parse.h: Include mi-cmds.h.
12585
12586 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12587
12588         * inf-loop.c: Don't include "target.h".
12589         * inf-loop.h: Include it here.
12590
12591 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12592
12593         * dfp.h: Include "dboulest.h" and "expression.h".
12594
12595 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12596
12597         * ax-gdb.h: Include "ax.h".
12598
12599 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12600
12601         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12602         with nat/gdb_ptrace.h.
12603
12604 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12605
12606         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12607         new line.
12608         (mips64_fbsd_sigframe_init): Likewise.
12609
12610 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12611
12612         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12613         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12614
12615 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12616
12617         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12618         * NEWS: Mention new FreeBSD/mips native configuration.
12619         * config/mips/fbsd.mh: New file.
12620         * configure.host: Add mips*-*-freebsd*.
12621         * mips-fbsd-nat.c: New file.
12622
12623 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12624
12625         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12626         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12627         * NEWS: Mention new FreeBSD/mips target.
12628         * configure.tgt: Add mips*-*-freebsd*.
12629         * mips-fbsd-tdep.c: New file.
12630         * mips-fbsd-tdep.h: New file.
12631
12632 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12633
12634         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12635         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12636
12637 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12638
12639         Update copyright year range in all GDB files.
12640
12641 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12642
12643         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12644
12645 For older changes see ChangeLog-2016.
12646 \f
12647 Local Variables:
12648 mode: change-log
12649 left-margin: 8
12650 fill-column: 74
12651 version-control: never
12652 coding: utf-8
12653 End: