Change breakpoint event locations to event_location_up
[external/binutils.git] / gdb / ChangeLog
1 2017-04-12  Tom Tromey  <tom@tromey.com>
2
3         * remote.c (remote_download_tracepoint): Update.
4         * python/py-breakpoint.c (bppy_get_location): Update.
5         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
6         (gdbscm_breakpoint_location): Update.
7         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8         * breakpoint.h (struct breakpoint) <location, location_range_end>:
9         Change type to event_location_up.
10         * breakpoint.c (create_overlay_event_breakpoint)
11         (create_longjmp_master_breakpoint)
12         (create_std_terminate_master_breakpoint)
13         (create_exception_master_breakpoint)
14         (breakpoint_event_location_empty_p, print_breakpoint_location)
15         (print_one_breakpoint_location, create_thread_event_breakpoint)
16         (init_breakpoint_sal, create_breakpoint)
17         (print_recreate_ranged_breakpoint, break_range_command)
18         (init_ada_exception_breakpoint, say_where): Update.
19         (base_breakpoint_dtor): Don't call delete_event_location.
20         (bkpt_print_recreate, tracepoint_print_recreate)
21         (dprintf_print_recreate, update_static_tracepoint)
22         (breakpoint_re_set_default): Update.
23
24 2017-04-12  Tom Tromey  <tom@tromey.com>
25
26         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
27         type of "to_do".  Update.
28         (compute_stack_depth): Use std::vector.
29
30 2017-04-12  Tom Tromey  <tom@tromey.com>
31
32         * printcmd.c (find_instruction_backward): Use std::vector.
33
34 2017-04-12  Tom Tromey  <tom@tromey.com>
35
36         * symfile.c (objfilep): Remove typedef.
37         (reread_symbols): Use a std::vector.
38
39 2017-04-12  Tom Tromey  <tom@tromey.com>
40
41         * mi/mi-main.c (exec_direction_forward): Remove.
42         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
43         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
44         scoped_restore.
45         * guile/guile.c (guile_repl_command, guile_command)
46         (gdbscm_execute_gdb_command): Use scoped_restore.
47         * go-exp.y (go_parse): Use scoped_restore.
48         * d-exp.y (d_parse): Use scoped_restore.
49         * cli/cli-decode.c (cmd_func): Use scoped_restore.
50         * c-exp.y (c_parse): Use scoped_restore.
51
52 2017-04-12  Tom Tromey  <tom@tromey.com>
53
54         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
55         (mi_parse): Update return type.
56         (mi_parse_free): Remove.
57         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
58         (mi_parse::~mi_parse): Rename from mi_parse_free.
59         (mi_parse_cleanup): Remove.
60         (mi_parse): Return a unique_ptr.  Use new.
61         * mi/mi-main.c (mi_execute_command): Update.
62
63 2017-04-12  Tom Tromey  <tom@tromey.com>
64
65         * location.c (explicit_location_lex_one): Return a
66         unique_xmalloc_ptr.
67         (string_to_explicit_location): Update.  Remove cleanups.
68
69 2017-04-12  Tom Tromey  <tom@tromey.com>
70
71         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
72         (compare_value_and_voffset): Change type.  Update.
73         (compute_vtable_size): Change type of "offset_vec".
74         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
75         (gnuv3_get_typeid): Remove extraneous declaration.
76
77 2017-04-12  Tom Tromey  <tom@tromey.com>
78
79         * charset.h (wchar_iterator): Fix comment.
80
81 2017-04-12  Tom Tromey  <tom@tromey.com>
82
83         * charset.c (iconv_wrapper): New class.
84         (cleanup_iconv): Remove.
85         (convert_between_encodings): Use it.
86
87 2017-04-12  Tom Tromey  <tom@tromey.com>
88
89         * symfile.h (increment_reading_symtab): Update type.
90         * symfile.c (decrement_reading_symtab): Remove.
91         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
92         * psymtab.c (psymtab_to_symtab): Update.
93         * dwarf2read.c (dw2_instantiate_symtab): Update.
94
95 2017-04-12  Tom Tromey  <tom@tromey.com>
96
97         * jit.c (struct jit_reader): Declare separately.  Add constructor
98         and destructor.  Change type of "handle".
99         (loaded_jit_reader): Define separately.
100         (jit_reader_load): Update.  New "new".
101         (jit_reader_unload_command): Use "delete".
102         * gdb-dlfcn.h (struct dlclose_deleter): New.
103         (gdb_dlhandle_up): New typedef.
104         (gdb_dlopen, gdb_dlsym): Update types.
105         (gdb_dlclose): Remove.
106         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
107         (gdb_dlsym): Change type of "handle".
108         (make_cleanup_dlclose): Remove.
109         (dlclose_deleter::operator()): Rename from gdb_dlclose.
110         * compile/compile-c-support.c (load_libcc): Update.
111
112 2017-04-12  Tom Tromey  <tom@tromey.com>
113
114         * symtab.h (find_pcs_for_symtab_line): Change return type.
115         * symtab.c (find_pcs_for_symtab_line): Change return type.
116         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
117         type of "vec".  Update.
118         (ltpy_get_pcs_for_line): Update.
119         * linespec.c (decode_digits_ordinary): Update.
120
121 2017-04-12  Tom Tromey  <tom@tromey.com>
122
123         * tracepoint.c (actions_command): Update.
124         * python/python.c (python_command, python_interactive_command):
125         Update.
126         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
127         * guile/guile.c (guile_command): Update.
128         * defs.h (read_command_lines, read_command_lines_1): Return
129         command_line_up.
130         (command_lines_deleter): New struct.
131         (command_line_up): New typedef.
132         * compile/compile.c (compile_code_command)
133         (compile_print_command): Update.
134         * cli/cli-script.h (get_command_line, copy_command_lines): Return
135         command_line_up.
136         (make_cleanup_free_command_lines): Remove.
137         * cli/cli-script.c (get_command_line, read_command_lines_1)
138         (copy_command_lines): Return command_line_up.
139         (while_command, if_command, read_command_lines, define_command)
140         (document_command): Update.
141         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
142         Remove.
143         * breakpoint.h (breakpoint_set_commands): Change type of
144         "commands".
145         * breakpoint.c (breakpoint_set_commands): Change type of
146         "commands".  Update.
147         (do_map_commands_command, update_dprintf_command_list)
148         (create_tracepoint_from_upload): Update.
149
150 2017-04-12  Tom Tromey  <tom@tromey.com>
151
152         * tracepoint.c (scope_info): Update.
153         * spu-tdep.c (spu_catch_start): Update.
154         * python/python.c (gdbpy_decode_line): Update.
155         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
156         * python/py-breakpoint.c (bppy_init): Update.
157         * probe.c (parse_probes): Update.
158         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
159         * location.h (event_location_deleter): New struct.
160         (event_location_up): New typedef.
161         (new_linespec_location, new_address_location, new_probe_location)
162         (new_explicit_location, copy_event_location)
163         (string_to_event_location, string_to_event_location_basic)
164         (string_to_explicit_location): Update return type.
165         (make_cleanup_delete_event_location): Remove.
166         * location.c (new_linespec_location, new_address_location)
167         (new_probe_location, new_explicit_location, copy_event_location):
168         Return event_location_up.
169         (delete_event_location_cleanup)
170         (make_cleanup_delete_event_location): Remove.
171         (string_to_explicit_location, string_to_event_location_basic)
172         (string_to_event_location): Return event_location_up.
173         * linespec.c (canonicalize_linespec, event_location_to_sals)
174         (decode_line_with_current_source)
175         (decode_line_with_last_displayed, decode_objc): Update.
176         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
177         * completer.c (location_completer): Update.
178         * cli/cli-cmds.c (edit_command, list_command): Update.
179         * breakpoint.c (create_overlay_event_breakpoint)
180         (create_longjmp_master_breakpoint)
181         (create_std_terminate_master_breakpoint)
182         (create_exception_master_breakpoint)
183         (create_thread_event_breakpoint): Update.
184         (init_breakpoint_sal): Update.  Remove some dead code.
185         (create_breakpoint_sal): Change type of "location".  Update.
186         (create_breakpoints_sal, create_breakpoint, break_command_1)
187         (dprintf_command, break_range_command, until_break_command)
188         (init_ada_exception_breakpoint)
189         (strace_marker_create_sals_from_location)
190         (update_static_tracepoint, trace_command, ftrace_command)
191         (strace_command, create_tracepoint_from_upload): Update.
192         * break-catch-throw.c (re_set_exception_catchpoint): Update.
193         * ax-gdb.c (agent_command_1): Update.
194
195 2017-04-12  Pedro Alves  <palves@redhat.com>
196
197         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
198         * configure.tgt: Handle i[34567]86-*-go32* and
199         i[34567]86-*-msdosdjgpp*.
200         * i386-tdep.c (i386_svr4_reg_to_regnum):
201         Make extern.
202         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
203         i386-go32-tdep.c.
204         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
205         * i386-go32-tdep.c: New file.
206         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
207         declarations.
208
209 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
210
211         * aix-thread.c (pd_status2str): Change return type to const char *.
212
213 2017-04-12  Pedro Alves  <palves@redhat.com>
214
215         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
216         calls to set_gdbarch_gnu_triplet_regexp.
217
218 2017-04-12  Pedro Alves  <palves@redhat.com>
219
220         PR gdb/21323
221         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
222         New enum value.
223         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
224         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
225         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
226         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
227         * gdbarch.h, gdbarch.c: Regenerate.
228         * aarch64-tdep.c (aarch64_gdbarch_init): Override
229         gdbarch_wchar_bit and gdbarch_wchar_signed.
230         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
231         * arm-tdep.c (arm_gdbarch_init): Likewise.
232         * avr-tdep.c (avr_gdbarch_init): Likewise.
233         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
234         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
235         * i386-tdep.c (i386_go32_init_abi): Likewise.
236         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
237         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
238         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
239         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
240         * sh-tdep.c (sh_gdbarch_init): Likewise.
241         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
242         * sparc64-tdep.c (sparc64_init_abi): Likewise.
243         * windows-tdep.c (windows_init_abi): Likewise.
244         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
245
246 2017-04-12  Pedro Alves  <palves@redhat.com>
247
248         PR c++/21323
249         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
250         cplus_primitive_type_char32_t>: New enum values.
251         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
252         and cplus_primitive_type_char32_t.
253         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
254         32, use the archtecture's built-in type for char16_t and char32_t,
255         respectively.  Otherwise, fallback to init_integer_type as before,
256         but make the type unsigned, and issue a complaint.
257         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
258
259 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
260
261         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
262         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
263
264 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
265
266         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
267         'const char *'.
268
269 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
270
271         * common/common-utils.c (free_vector_argv): New function.
272         * common/common-utils.h: Include <vector>.
273         (free_vector_argv): New prototype.
274         * darwin-nat.c (darwin_create_inferior): Rewrite function
275         prototype in order to constify "exec_file" and accept a
276         "std::string" for "allargs".
277         * fork-child.c: Include <vector>.
278         (breakup_args): Rewrite function, using C++.
279         (fork_inferior): Rewrite function header, constify "exec_file_arg"
280         and accept "std::string" for "allargs".  Update the code to
281         calculate "argv" based on "allargs".  Update calls to "exec_fun"
282         and "execvp".
283         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
284         order to constify "exec_file" and accept a "std::string" for
285         "allargs".
286         * go32-nat.c (go32_create_inferior): Likewise.
287         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
288         * infcmd.c (run_command_1): Constify "exec_file".  Use
289         "std::string" for inferior arguments.
290         * inferior.h (fork_inferior): Update prototype.
291         * linux-nat.c (linux_nat_create_inferior): Rewrite function
292         prototype in order to constify "exec_file" and accept a
293         "std::string" for "allargs".
294         * nto-procfs.c (procfs_create_inferior): Likewise.
295         * procfs.c (procfs_create_inferior): Likewise.
296         * remote-sim.c (gdbsim_create_inferior): Likewise.
297         * remote.c (extended_remote_run): Update code to accept
298         "std::string" as argument.
299         (extended_remote_create_inferior): Rewrite function prototype in
300         order to constify "exec_file" and accept a "std::string" for
301         "allargs".
302         * rs6000-nat.c (super_create_inferior): Likewise.
303         (rs6000_create_inferior): Likewise.
304         * target.h (struct target_ops) <to_create_inferior>: Likewise.
305         * windows-nat.c (windows_create_inferior): Likewise.
306
307 2017-04-11  Pedro Alves  <palves@redhat.com>
308
309         * thread.c: Fix whitespace throughout.
310
311 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
312
313         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
314
315 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
316
317         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
318
319 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
320
321         PR gdb/21364
322         * osdata.c (info_osdata): Check if 'type' is an empty string
323         instead of NULL.
324
325 2017-04-10  Pedro Alves  <palves@redhat.com>
326
327         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
328         (ptid_to_global_thread_id, in_thread_list)
329         (do_captured_list_thread_ids, set_resumed, set_running)
330         (set_executing, set_stop_requested, finish_thread_state)
331         (validate_registers_access, can_access_registers_ptid)
332         (print_thread_info_1, switch_to_thread)
333         (do_restore_current_thread_cleanup)
334         (make_cleanup_restore_current_thread, thread_command)
335         (thread_name_command): Use operator== instead of ptid_equal.
336
337 2017-04-10  Pedro Alves  <palves@redhat.com>
338
339         * thread.c (struct current_thread_cleanup) <next>: Delete field.
340         (current_thread_cleanup_chain): Delete.
341         (restore_current_thread_cleanup_dtor)
342         (make_cleanup_restore_current_thread): Remove references to
343         current_thread_cleanup_chain.
344
345 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
346
347         * msp430-tdep.c (msp430_pseudo_register_read): Never return
348         REG_UNKNOWN.
349
350 2017-04-10  Yao Qi  <yao.qi@linaro.org>
351
352         PR gdb/19942
353         * gdbthread.h (thread_info::deletable): New method.
354         (thread_info::incref): New method.
355         (thread_info::decref): New method.
356         (thread_info::refcount): Move it to private.
357         * infrun.c (save_stop_context): Call inc_refcount.
358         (release_stop_context_cleanup): Likewise.
359         * thread.c (set_thread_exited): New function.
360         (init_thread_list): Delete "tp" only it is deletable, otherwise
361         call set_thread_exited.
362         (delete_thread_1): Call set_thread_exited.
363         (current_thread_cleanup) <inferior_pid>: Remove.
364         <thread>: New field.
365         (restore_current_thread_ptid_changed): Removed.
366         (do_restore_current_thread_cleanup): Adjust.
367         (restore_current_thread_cleanup_dtor): Don't call
368         find_thread_ptid.
369         (set_thread_refcount): Use dec_refcount.
370         (make_cleanup_restore_current_thread): Adjust.
371         (thread_apply_all_command): Call inc_refcount.
372         (_initialize_thread): Don't call
373         observer_attach_thread_ptid_changed.
374
375 2017-04-10  Yao Qi  <yao.qi@linaro.org>
376
377         * thread.c (delete_thread_1): Hoist code on marking thread as
378         exited.
379
380 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
381
382         * windows-nat.c (windows_detach): Initialize ptid with
383         minus_one_ptid.
384
385 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
386
387         * unittests/ptid-selftests.c: Fix erroneous assert messages.
388
389 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
390
391         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
392         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
393         (bfin_pseudo_register_write): Likewise
394
395 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
396
397         * common/ptid.h (struct ptid): Change to...
398         (class ptid_t): ... this.
399         <ptid_t>: New constructors.
400         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
401         matches>: New methods.
402         <make_null, make_minus_one>: New static methods.
403         <pid>: Rename to...
404         <m_pid>: ...this.
405         <lwp>: Rename to...
406         <m_lwp>: ...this.
407         <tid>: Rename to...
408         <m_tid>: ...this.
409         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
410         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
411         as references, move comment to class ptid_t.
412         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
413         ptid_t static methods.
414         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
415         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
416         Take ptid arguments as references, implement using ptid_t methods.
417         * unittests/ptid-selftests.c: New file.
418         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
419         unittests/ptid-selftests.c.
420         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
421
422 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
423
424         * python/python.c (python_run_simple_file): Cast mode literal to
425         non-const char pointer as expected by PyFile_FromString.
426
427 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
428
429         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
430         minus_one_ptid and null_ptid.
431
432 2017-04-05  Pedro Alves  <palves@redhat.com>
433
434         * warning.m4 (build_warnings): Remove -Wno-write-strings.
435         * configure: Regenerate.
436
437 2017-04-05  Pedro Alves  <palves@redhat.com>
438
439         * ada-exp.y (yyerror): Constify.
440         * ada-lang.c (bound_name, get_selections)
441         (ada_variant_discrim_type)
442         (ada_variant_discrim_name, ada_value_struct_elt)
443         (ada_lookup_struct_elt_type, is_unchecked_variant)
444         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
445         (catch_ada_exception_command_split)
446         (catch_ada_assert_command_split, catch_assert_command)
447         (ada_op_name): Constify.
448         * ada-lang.h (ada_yyerror, get_selections)
449         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
450         * arc-tdep.c (arc_print_frame_cache): Constify.
451         * arm-tdep.c (arm_skip_stub): Constify.
452         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
453         (gen_aggregate_elt_ref): Constify.
454         * bcache.c (print_bcache_statistics): Constify.
455         * bcache.h (print_bcache_statistics): Constify.
456         * break-catch-throw.c (catch_exception_command_1):
457         * breakpoint.c (struct ep_type_description::description):
458         Constify.
459         (add_solib_catchpoint): Constify.
460         (catch_fork_command_1): Add cast.
461         (add_catch_command): Constify.
462         * breakpoint.h (add_catch_command, add_solib_catchpoint):
463         Constify.
464         * bsd-uthread.c (bsd_uthread_state): Constify.
465         * buildsym.c (patch_subfile_names): Constify.
466         * buildsym.h (next_symbol_text_func, patch_subfile_names):
467         Constify.
468         * c-exp.y (yyerror): Constify.
469         (token::oper): Constify.
470         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
471         * c-varobj.c (cplus_describe_child): Constify.
472         * charset.c (find_charset_names): Add cast.
473         (find_charset_names): Constify array and add const_cast.
474         * cli/cli-cmds.c (complete_command, cd_command): Constify.
475         (edit_command): Constify.
476         * cli/cli-decode.c (lookup_cmd): Constify.
477         * cli/cli-dump.c (dump_memory_command, dump_value_command):
478         Constify.
479         (struct dump_context): Constify.
480         (add_dump_command, restore_command): Constify.
481         * cli/cli-script.c (get_command_line): Constify.
482         * cli/cli-script.h (get_command_line): Constify.
483         * cli/cli-utils.c (check_for_argument): Constify.
484         * cli/cli-utils.h (check_for_argument): Constify.
485         * coff-pe-read.c (struct read_pe_section_data): Constify.
486         * command.h (lookup_cmd): Constify.
487         * common/print-utils.c (decimal2str): Constify.
488         * completer.c (gdb_print_filename): Constify.
489         * corefile.c (set_gnutarget): Constify.
490         * cp-name-parser.y (yyerror): Constify.
491         * cp-valprint.c (cp_print_class_member): Constify.
492         * cris-tdep.c (cris_register_name, crisv32_register_name):
493         Constify.
494         * d-exp.y (yyerror): Constify.
495         (struct token::oper): Constify.
496         * d-lang.h (d_yyerror): Constify.
497         * dbxread.c (struct header_file_location::name): Constify.
498         (add_old_header_file, add_new_header_file, last_function_name)
499         (dbx_next_symbol_text, add_bincl_to_list)
500         (find_corresponding_bincl_psymtab, set_namestring)
501         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
502         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
503         * defs.h (command_line_input, print_address_symbolic)
504         (deprecated_readline_begin_hook): Constify.
505         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
506         Constify.
507         * event-top.c (handle_line_of_input): Constify and add cast.
508         * exceptions.c (catch_errors): Constify.
509         * exceptions.h (catch_errors): Constify.
510         * expprint.c (print_subexp_standard, op_string, op_name)
511         (op_name_standard, dump_raw_expression, dump_raw_expression):
512         * expression.h (op_name, op_string, dump_raw_expression):
513         Constify.
514         * f-exp.y (yyerror): Constify.
515         (struct token::oper): Constify.
516         (struct f77_boolean_val::name): Constify.
517         * f-lang.c (f_word_break_characters): Constify.
518         * f-lang.h (f_yyerror): Constify.
519         * fork-child.c (fork_inferior): Add cast.
520         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
521         (new_variant): Constify.
522         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
523         * gdbarch.c: Regenerate.
524         * gdbcore.h (set_gnutarget): Constify.
525         * go-exp.y (yyerror): Constify.
526         (token::oper): Constify.
527         * go-lang.h (go_yyerror): Constify.
528         * go32-nat.c (go32_sysinfo): Constify.
529         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
530         * guile/scm-cmd.c (cmdscm_function): Constify.
531         * guile/scm-param.c (pascm_param_value): Constify.
532         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
533         (h8300sx_register_name): Constify.
534         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
535         Constify.
536         * ia64-tdep.c (ia64_register_names): Constify.
537         * infcmd.c (construct_inferior_arguments): Constify.
538         (path_command, attach_post_wait): Constify.
539         * language.c (show_range_command, show_case_command)
540         (unk_lang_error): Constify.
541         * language.h (language_defn::la_error)
542         (language_defn::la_name_of_this): Constify.
543         * linespec.c (decode_line_2): Constify.
544         * linux-thread-db.c (thread_db_err_str): Constify.
545         * lm32-tdep.c (lm32_register_name): Constify.
546         * m2-exp.y (yyerror): Constify.
547         * m2-lang.h (m2_yyerror): Constify.
548         * m32r-tdep.c (m32r_register_names): Constify and make static.
549         * m68hc11-tdep.c (m68hc11_register_names): Constify.
550         * m88k-tdep.c (m88k_register_name): Constify.
551         * macroexp.c (appendmem): Constify.
552         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
553         (upgrade_type, parse_external, parse_partial_symbols)
554         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
555         (new_symbol): Constify.
556         * memattr.c (mem_info_command): Constify.
557         * mep-tdep.c (register_name_from_keyword): Constify.
558         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
559         Constify.
560         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
561         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
562         * mi/mi-main.c (captured_mi_execute_command): Constify and add
563         cast.
564         (mi_execute_async_cli_command): Constify.
565         * mips-tdep.c (mips_register_name): Constify.
566         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
567         (am33_register_name, am33_2_register_name)
568         * moxie-tdep.c (moxie_register_names): Constify.
569         * nat/linux-osdata.c (osdata_type): Constify fields.
570         * nto-tdep.c (nto_parse_redirection): Constify.
571         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
572         (lookup_child_selector): Constify.
573         (objc_methcall::name): Constify.
574         * objc-lang.h (lookup_objc_class, lookup_child_selector)
575         (lookup_struct_typedef): Constify.
576         * objfiles.c (pc_in_section): Constify.
577         * objfiles.h (pc_in_section): Constify.
578         * p-exp.y (struct token::oper): Constify.
579         (yyerror): Constify.
580         * p-lang.h (pascal_yyerror): Constify.
581         * parser-defs.h (op_name_standard): Constify.
582         (op_print::string): Constify.
583         (exp_descriptor::op_name): Constify.
584         * printcmd.c (print_address_symbolic): Constify.
585         * psymtab.c (print_partial_symbols): Constify.
586         * python/py-breakpoint.c (stop_func): Constify.
587         (bppy_get_expression): Constify.
588         * python/py-cmd.c (cmdpy_completer::name): Constify.
589         (cmdpy_function): Constify.
590         * python/py-event.c (evpy_add_attribute)
591         (gdbpy_initialize_event_generic): Constify.
592         * python/py-event.h (evpy_add_attribute)
593         (gdbpy_initialize_event_generic): Constify.
594         * python/py-evts.c (add_new_registry): Constify.
595         * python/py-finishbreakpoint.c (outofscope_func): Constify.
596         * python/py-framefilter.c (get_py_iter_from_func): Constify.
597         * python/py-inferior.c (get_buffer): Add cast.
598         * python/py-param.c (parm_constant::name): Constify.
599         * python/py-unwind.c (fprint_frame_id): Constify.
600         * python/python.c (gdbpy_parameter_value): Constify.
601         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
602         * remote.c (memory_packet_config::name): Constify.
603         (show_packet_config_cmd, remote_write_bytes)
604         (remote_buffer_add_string):
605         * reverse.c (exec_reverse_once): Constify.
606         * rs6000-tdep.c (variant::name, variant::description): Constify.
607         * rust-exp.y (rustyyerror): Constify.
608         * rust-lang.c (rust_op_name): Constify.
609         * rust-lang.h (rustyyerror): Constify.
610         * serial.h (serial_ops::name): Constify.
611         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
612         (sh_sh3e_register_name, sh_sh2e_register_name)
613         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
614         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
615         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
616         (sh_sh4al_dsp_register_name): Constify.
617         * sh64-tdep.c (sh64_register_name): Constify.
618         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
619         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
620         * stabsread.c (patch_block_stabs, read_type_number)
621         (ref_map::stabs, ref_add, process_reference)
622         (symbol_reference_defined, define_symbol, define_symbol)
623         (error_type, read_type, read_member_functions, read_cpp_abbrev)
624         (read_one_struct_field, read_struct_fields, read_baseclasses)
625         (read_tilde_fields, read_struct_type, read_array_type)
626         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
627         (read_huge_number, read_range_type, read_args, common_block_start)
628         (find_name_end): Constify.
629         * stabsread.h (common_block_start, define_symbol)
630         (process_one_symbol, symbol_reference_defined, ref_add):
631         * symfile.c (get_section_index, add_symbol_file_command):
632         * symfile.h (get_section_index): Constify.
633         * target-descriptions.c (tdesc_type::name): Constify.
634         (tdesc_free_type): Add cast.
635         * target.c (find_default_run_target):
636         (add_deprecated_target_alias, find_default_run_target)
637         (target_announce_detach): Constify.
638         (do_option): Constify.
639         * target.h (add_deprecated_target_alias): Constify.
640         * thread.c (print_thread_info_1): Constify.
641         * top.c (deprecated_readline_begin_hook, command_line_input):
642         Constify.
643         (init_main): Add casts.
644         * top.h (handle_line_of_input): Constify.
645         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
646         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
647         (tfind_command): Rename to ...
648         (tfind_command_1): ... this and constify.
649         (tfind_command): New function.
650         (tfind_end_command, tfind_start_command): Adjust.
651         (encode_source_string): Constify.
652         * tracepoint.h (encode_source_string): Constify.
653         * tui/tui-data.c (tui_partial_win_by_name): Constify.
654         * tui/tui-data.h (tui_partial_win_by_name): Constify.
655         * tui/tui-source.c (tui_set_source_content_nil): Constify.
656         * tui/tui-source.h (tui_set_source_content_nil): Constify.
657         * tui/tui-win.c (parse_scrolling_args): Constify.
658         * tui/tui-windata.c (tui_erase_data_content): Constify.
659         * tui/tui-windata.h (tui_erase_data_content): Constify.
660         * tui/tui-winsource.c (tui_erase_source_content): Constify.
661         * tui/tui.c (tui_enable): Add cast.
662         * utils.c (defaulted_query): Constify.
663         (init_page_info): Add cast.
664         (puts_debug, subset_compare): Constify.
665         * utils.h (subset_compare): Constify.
666         * varobj.c (varobj_format_string): Constify.
667         * varobj.h (varobj_format_string): Constify.
668         * vax-tdep.c (vax_register_name): Constify.
669         * windows-nat.c (windows_detach): Constify.
670         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
671         * xml-support.c (gdb_xml_end_element): Constify.
672         * xml-tdesc.c (tdesc_start_reg): Constify.
673         * xstormy16-tdep.c (xstormy16_register_name): Constify.
674         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
675         * xtensa-tdep.h (xtensa_register_t::name): Constify.
676
677 2017-04-05  Pedro Alves  <palves@redhat.com>
678
679         * proc-api.c (struct trans): Constify.
680         (procfs_note): Constify.
681         * proc-events.c (struct trans, syscall_table):
682         * proc-flags.c (struct trans): Constify.
683         * proc-utils.h (procfs_note): Constify.
684         * proc-why.c (struct trans): Constify.
685         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
686         (procfs_detach): Constify.
687         * sol-thread.c (struct string_map): Constify.
688         (td_err_string, td_state_string): Constify.
689
690 2017-04-05  Pedro Alves  <palves@redhat.com>
691
692         * proc-api.c (procfs_filename): Don't initialize
693         procfs_filename.
694         (prepare_to_trace): Assume procfs_filename is non-NULL.
695         (_initialize_proc_api): Give procfs_filename a default value here.
696
697 2017-04-05  Pedro Alves  <palves@redhat.com>
698
699         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
700         'cond_string' parameter.
701         (extract_exception_regexp): Constify 'string' parameter.
702         (catch_exception_command_1): Constify.
703         * breakpoint.c (init_catchpoint)
704         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
705         parameter.
706         (ep_parse_optional_if_clause, catch_fork_command_1)
707         (catch_exec_command_1): Constify.
708         * breakpoint.h (init_catchpoint): Constify 'cond_string'
709         parameter.
710         (ep_parse_optional_if_clause): Constify.
711         * cli/cli-utils.c (remove_trailing_whitespace)
712         (check_for_argument): Constify.
713         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
714         non-const overload.
715         (check_for_argument): Likewise.
716
717 2017-04-05  Pedro Alves  <palves@redhat.com>
718
719         * event-top.c (command_line_handler): Add cast to execute_command
720         call.
721         * record-btrace.c (cmd_record_btrace_bts_start)
722         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
723         (cmd_record_btrace_start): Add cast to execute_command call.
724         * record-full.c (record_full_goto_insn):
725         * record.c (record_start, record_stop): Add cast to
726         execute_command_to_string calls.
727         (cmd_record_start): Add cast to execute_command calls.
728
729 2017-04-05  Pedro Alves  <palves@redhat.com>
730
731         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
732         static inline function.
733         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
734         array and use gdb_PyArg_ParseTupleAndKeywords.
735         * python/py-cmd.c (cmdpy_init): Likewise.
736         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
737         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
738         (infpy_search_memory): Likewise.
739         * python/py-objfile.c (objfpy_add_separate_debug_file)
740         (gdbpy_lookup_objfile): Likewise.
741         * python/py-symbol.c (gdbpy_lookup_symbol)
742         (gdbpy_lookup_global_symbol): Likewise.
743         * python/py-type.c (gdbpy_lookup_type): Likewise.
744         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
745         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
746         Likewise.
747
748 2017-04-05  Pedro Alves  <palves@redhat.com>
749
750         * python/python-internal.h (gdb_PyGetSetDef): New type.
751         * python/py-block.c (block_object_getset)
752         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
753         * python/py-event.c (event_object_getset)
754         (finish_breakpoint_object_getset): Likewise.
755         * python/py-inferior.c (inferior_object_getset): Likewise.
756         * python/py-infthread.c (thread_object_getset): Likewise.
757         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
758         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
759         * python/py-objfile.c (objfile_getset): Likewise.
760         * python/py-progspace.c (pspace_getset): Likewise.
761         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
762         Likewise.
763         * python/py-record.c (recpy_record_getset): Likewise.
764         * python/py-symbol.c (symbol_object_getset): Likewise.
765         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
766         Likewise.
767         * python/py-type.c (type_object_getset, field_object_getset):
768         Likewise.
769         * python/py-value.c (value_object_getset): Likewise.
770
771 2017-04-05  Pedro Alves  <palves@redhat.com>
772
773         * python/python-internal.h (gdb_PyObject_CallMethod)
774         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
775         New functions.
776         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
777         (PySys_GetObject, PySys_SetPath): New macros.
778
779 2017-04-05  Pedro Alves  <palves@redhat.com>
780
781         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
782         info_osdata_command.
783         * osdata.c (info_osdata_command): Rename to ...
784         (info_osdata): ... this.  Constify 'type' parameter, and remove
785         the 'from_tty' parameter.  Accept NULL TYPE.
786         (info_osdata_command): New function.
787         * osdata.h (info_osdata_command): Remove declaration.
788         (info_osdata): New declaration.
789
790 2017-04-05  Pedro Alves  <palves@redhat.com>
791
792         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
793         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
794         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
795         parameter.
796         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
797         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
798         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
799         parameter.
800         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
801         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
802         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
803         (mi_cmd_file_list_exec_source_files)
804         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
805         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
806         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
807         parameter.
808         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
809         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
810         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
811         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
812         (mi_cmd_stack_info_frame): Constify 'command' parameter.
813         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
814         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
815         'command' parameter.
816         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
817         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
818         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
819         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
820         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
821         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
822         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
823         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
824         (mi_cmd_var_set_update_range): Constify 'command' parameter.
825         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
826         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
827         parameter.
828         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
829         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
830         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
831         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
832         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
833         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
834         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
835         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
836         (mi_cmd_data_list_changed_registers)
837         (mi_cmd_data_write_register_values)
838         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
839         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
840         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
841         (mi_cmd_list_features, mi_cmd_list_target_features)
842         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
843         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
844         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
845         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
846         (mi_cmd_trace_frame_collected): Constify 'command'
847         parameter.
848         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
849         'command' parameter.
850
851 2017-04-05  Pedro Alves  <palves@redhat.com>
852
853         * ada-lang.c (ada_completer_word_break_characters): Now a const
854         array.
855         (ada_get_gdb_completer_word_break_characters): Constify.
856         * completer.c (gdb_completer_command_word_break_characters)
857         (gdb_completer_file_name_break_characters)
858         (gdb_completer_quote_characters): Now const arrays.
859         (get_gdb_completer_quote_characters): Constify.
860         (set_rl_completer_word_break_characters): New function.
861         (set_gdb_completion_word_break_characters)
862         (complete_line_internal): Use it.
863         * completer.h (get_gdb_completer_quote_characters): Constify.
864         (set_rl_completer_word_break_characters): Declare.
865         * f-lang.c (f_word_break_characters): Constify.
866         * language.c (default_word_break_characters): Constify.
867         * language.h (language_defn::la_word_break_characters): Constify.
868         (default_word_break_characters): Constify.
869         * top.c (init_main): Use set_rl_completer_word_break_characters.
870
871 2017-04-05  Pedro Alves  <palves@redhat.com>
872
873         * aix-thread.c (aix_thread_pid_to_str)
874         (aix_thread_extra_thread_info): Constify.
875         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
876         * bsd-uthread.c (bsd_uthread_extra_thread_info)
877         (bsd_uthread_pid_to_str): Constify.
878         * corelow.c (core_pid_to_str): Constify.
879         * darwin-nat.c (darwin_pid_to_str): Constify.
880         * fbsd-nat.c (fbsd_pid_to_str): Constify.
881         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
882         Constify.
883         * gnu-nat.c (gnu_pid_to_str): Constify.
884         * go32-nat.c (go32_pid_to_str): Constify.
885         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
886         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
887         * inferior.c (inferior_pid_to_str): Constify.
888         * linux-nat.c (linux_nat_pid_to_str): Constify.
889         * linux-tdep.c (linux_core_pid_to_str): Constify.
890         * linux-thread-db.c (thread_db_pid_to_str)
891         (thread_db_extra_thread_info): Constify.
892         * nto-tdep.c (nto_extra_thread_info): Constify.
893         * nto-tdep.h (nto_extra_thread_info): Constify.
894         * obsd-nat.c (obsd_pid_to_str): Constify.
895         * procfs.c (procfs_pid_to_str): Constify.
896         * ravenscar-thread.c (ravenscar_extra_thread_info)
897         (ravenscar_pid_to_str): Constify.
898         * remote-sim.c (gdbsim_pid_to_str): Constify.
899         * remote.c (remote_threads_extra_info, remote_pid_to_str):
900         Constify.
901         * sol-thread.c (solaris_pid_to_str): Constify.
902         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
903         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
904         * target.c (default_pid_to_str, target_pid_to_str)
905         (normal_pid_to_str, default_pid_to_str): Constify.
906         * target.h (target_ops::to_pid_to_str)
907         (target_ops::to_extra_thread_info): Constify.
908         (target_pid_to_str, normal_pid_to_str): Constify.
909         * windows-nat.c (windows_pid_to_str): Constify.
910         * gdbarch.sh (core_pid_to_str): Constify.
911         * target-delegates.c: Regenerate.
912         * gdbarch.h, gdbarch.c: Regenerate.
913
914 2017-04-05  Pedro Alves  <palves@redhat.com>
915
916         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
917         the memory of the temporary warning_pre_print override.
918         * utils.c (warning_pre_print): Constify.
919         * utils.h (warning_pre_print): Constify.
920
921 2017-04-05  Pedro Alves  <palves@redhat.com>
922
923         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
924         (shell_command): New function.
925         (make_command): Use std::string.
926         (init_cli_cmds): Register shell_command instead of shell_escape.
927
928 2017-04-05  Pedro Alves  <palves@redhat.com>
929
930         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
931         * tracepoint.c (default_collect): Don't initialize.
932
933 2017-04-05  Pedro Alves  <palves@redhat.com>
934
935         * macroexp.c (macro_buffer::shared): Now a bool.
936         (init_buffer): Update.
937         (init_shared_buffer): Constify 'addr' parameter.
938         (substitute_args, expand, macro_expand, macro_expand_next): Remove
939         casts.
940
941 2017-04-05  Pedro Alves  <palves@redhat.com>
942
943         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
944         * disasm.c (set_disassembler_options): Constify local.
945         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
946
947 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
948
949         PR gdb/21352
950         * tracefile.c (tsave_command): Fix argument parsing for '-r'
951         option.
952
953 2017-04-05  Yao Qi  <yao.qi@linaro.org>
954
955         * frame.c (frame_unwind_register_unsigned): Call
956         frame_unwind_register_value.
957
958 2017-04-05  Yao Qi  <yao.qi@linaro.org>
959
960         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
961         Use gdb_test_multiple, and don't match anchor.
962
963 2017-04-05  Pedro Alves  <palves@redhat.com>
964
965         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
966         (Write After Approval): Remove Simon Marchi.
967
968 2017-04-05  Pedro Alves  <palves@redhat.com>
969
970         * common/gdb_optional.h (optional::optional): Make constexpr and
971         initialize m_dummy.
972
973 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
974
975         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
976         (amd64fbsd_jmp_buf_reg_offset): Remove.
977         (amd64fbsd_supply_uthread): Remove function.
978         (amd64fbsd_collect_uthread): Remove function.
979         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
980         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
981         (x86_64-*-freebsd*): Remove bsd-uthread.o.
982         (fbsd-nat.c): Update comment.
983         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
984         (i386fbsd_jmp_buf_reg_offset): Remove.
985         (i386fbsd_supply_uthread): Remove function.
986         (i386fbsd_collect_uthread): Remove function.
987         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
988
989 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
990
991         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
992         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
993         * NEWS: Mention that support for FreeBSD/alpha was removed.
994         * alpha-fbsd-tdep.c: Delete file.
995         * config/alpha/fbsd.mh: Delete file.
996         * configure.host: Delete alpha*-*-freebsd* and
997         alpha*-*-kfreebsd*-gnu.
998         * configure.tgt: Delete alpha*-*-freebsd* and
999         alpha*-*-kfreebsd*-gnu.
1000
1001 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
1002
1003         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
1004         amd64bsd_store_inferior_registers): Use ptid from regcache.
1005
1006 2017-04-04  Pedro Alves  <palves@redhat.com>
1007
1008         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
1009         data fields, make them private and add "m_" prefixes.
1010         (lnp_state_machine::lnp_state_machine): New ctor.
1011         (record_line, check_line_address, handle_set_discriminator)
1012         (handle_set_address, handle_advance_pc, handle_special_opcode)
1013         (handle_advance_line, handle_set_file, handle_negate_stmt)
1014         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
1015         (end_sequence, advance_line): New methods.
1016         (m_gdbarch, m_record_lines_p): New fields.
1017         (lnp_reader_state): Delete.
1018         (dwarf_record_line): Rename to ...
1019         (lnp_state_machine::record_line): ... adjust.
1020         (init_lnp_state_machine): Delete.
1021         (lnp_state_machine::lnp_state_machine): New.
1022         (check_line_address): Rename to ...
1023         (lnp_state_machine::check_line_address): This.
1024         (dwarf_decode_lines_1): Remove reference to "reader_state".
1025         Adjust lnp_state_machine having a non-default ctor.  Use bool.
1026         State machine internal state manipulation moved to
1027         lnp_state_machine methods.
1028
1029 2017-04-04  Pedro Alves  <palves@redhat.com>
1030
1031         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1032         unittests/offset-type-selftests.c.
1033         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
1034         * common/offset-type.h: New file.
1035         * common/preprocessor.h: New file.
1036         * common/traits.h: New file.
1037         * common/valid-expr.h: New file.
1038         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
1039         sect_offset and cu_offset strong typedefs throughout.
1040         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
1041         typedefs throughout.
1042         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
1043         sect_offset and cu_offset strong typedefs throughout.
1044         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
1045         typedefs throughout.
1046         * gdbtypes.h: Include "common/offset-type.h".
1047         (cu_offset): Now an offset type (strong typedef) instead of a
1048         struct.
1049         (sect_offset): Likewise.
1050         (union call_site_parameter_u): Rename "param_offset" field to
1051         "param_cu_off".
1052         * unittests/offset-type-selftests.c: New file.
1053
1054 2017-04-04  Pedro Alves  <palves@redhat.com>
1055
1056         * common/underlying.h: New file.
1057         * dwarf2read.c: Include "common/gdb_optional.h" and
1058         "common/underlying.h".
1059         (dir_index, file_name_index): New types.
1060         (file_entry): Use them.
1061         (file_entry::include): Use to_underlying.
1062         (line_header::add_file_name): Use dir_index.
1063         (read_formatted_entries): Use gdb::optional.  Read form before
1064         writting to file_entry.
1065         (dwarf_decode_line_header): Use dir_index.
1066         (lnp_state_machine::current_file): Use to_underlying.
1067         (lnp_state_machine::file): Change type to file_name_index.
1068         (dwarf_record_line): Use to_underlying.
1069         (init_lnp_state_machine): Use file_name_index.
1070         (dwarf_decode_lines_1): Use dir_index and file_name_index.
1071
1072 2017-04-04  Pedro Alves  <palves@redhat.com>
1073
1074         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
1075         operator bool, has_value and get methods.
1076
1077 2017-04-04  Pedro Alves  <palves@redhat.com>
1078
1079         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
1080         fields.
1081         (line_header): Initialize all data fields.  Change type of
1082         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
1083         Change type of include_dirs to std::vector<const char *>.  Remove
1084         num_include_dirs, include_dirs_size.  Change type of file_names to
1085         std::vector<file_entry>.  Remove num_file_names, file_names_size.
1086         (line_header::line_header): New.
1087         (line_header::add_include_dir, line_header::add_file_name): New
1088         methods.
1089         (line_header::include_dir_at): Remove NULL check.
1090         (line_header::file_name_at): Add const overload.
1091         (line_header_up): New unique_ptr typedef.
1092         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
1093         std::vector.  Remove free_line_header call.
1094         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
1095         free_line_header call.
1096         (free_cu_line_header): Delete.
1097         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
1098         (setup_type_unit_groups): Use line_header_up instead of cleanups.
1099         Adjust to use std::vector.
1100         (free_line_header): Delete.
1101         (free_line_header_voidp): Use delete.
1102         (add_include_dir): Replace with ...
1103         (line_header::add_include_dir): ... this method.  Use std::vector.
1104         (add_file_name): Replace with ...
1105         (line_header::add_file_name): ... this method.  Use std::vector.
1106         (add_include_dir_stub): Delete.
1107         (read_formatted_entries): Remove memset.
1108         (dwarf_decode_line_header): Return a line_header_up instead of a
1109         raw pointer.  Remove cleanup handling.  Pass lambdas to
1110         read_formatted_entries.  Adjust to use line_header methods.
1111         (dwarf_decode_lines_1): Adjust to use line_header methods.
1112         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
1113         use std::vector.
1114
1115 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
1116
1117         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
1118         instead of struct ptid.
1119
1120 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
1121
1122         * frame.c (get_frame_register_bytes): Unwind using value.
1123         (put_frame_register_bytes): Likewise.
1124
1125 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
1126
1127         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
1128
1129 2017-03-29  Yao Qi  <yao.qi@linaro.org>
1130
1131         * gdbthread.h (struct thread_info): Declare constructor and
1132         destructor.  Add some in-class member initializers.
1133         * thread.c (free_thread): Remove.
1134         (init_thread_list): Call delete instead of free_thread.
1135         (new_thread): Call thread_info constructor.
1136         (thread_info::thread_info): New function.
1137         (thread_info::~thread_info): New function.
1138         (delete_thread_1): Call delete instead of free_thread.
1139         (make_cleanup_restore_current_thread): Move tp and frame to
1140         inner block.
1141
1142 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
1143
1144         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
1145         (arc_skip_prologue): Likewise.
1146         (arc_make_frame_cache): Likewise.
1147         (arc_pv_get_operand): New function.
1148         (arc_is_in_prologue): Likewise.
1149         (arc_analyze_prologue): Likewise.
1150         (arc_print_frame_cache): Likewise.
1151         (MAX_PROLOGUE_LENGTH): New constant.
1152
1153 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
1154
1155         * configure.tgt: Add arc-insn.o.
1156         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
1157         (dump_arc_instruction_command): New function.
1158         (arc_fprintf_disasm): Likewise.
1159         (arc_disassemble_info): Likewise.
1160         (arc_insn_get_operand_value): Likewise.
1161         (arc_insn_get_operand_value_signed): Likewise.
1162         (arc_insn_get_memory_base_reg): Likewise.
1163         (arc_insn_get_memory_offset): Likewise.
1164         (arc_insn_get_branch_target): Likewise.
1165         (arc_insn_dump): Likewise.
1166         (arc_insn_get_linear_next_pc): Likewise.
1167         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
1168         (arc_disassemble_info): Likewise.
1169         (arc_insn_get_branch_target): Likewise.
1170         (arc_insn_get_linear_next_pc): Likewise.
1171         * NEWS: Mention new "maint print arc arc-instruction".
1172
1173 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
1174
1175         * arc-tdep (maintenance_print_arc_list): New variable.
1176         (maintenance_print_arc_command): New function.
1177
1178 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
1179
1180         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
1181         Add "limm" and "reserved".
1182         (arc_cannot_fetch_register, arc_cannot_store_register): Add
1183         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
1184         * arc-tdep.h (arc_regnum): Likewise.
1185
1186 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
1187
1188         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
1189         for THREADPTR register.
1190         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
1191         register.
1192         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
1193         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
1194         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
1195
1196 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
1197
1198         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
1199         registers above gdbarch_num_regs (gdbarch) as privileged in
1200         call0 ABI.
1201
1202 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
1203
1204         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
1205         for a single specified register or for all registers in
1206         a0_base..a0_base + C0_NREGS range.
1207         (supply_gregset_reg): Call regcache_raw_supply for a single
1208         specified register or for all registers in a0_base..a0_base +
1209         C0_NREGS range.
1210
1211 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
1212
1213         * arch/xtensa.h (C0_NREGS): Add definition.
1214         * xtensa-tdep.c (C0_NREGS): Remove definition.
1215
1216 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
1217
1218         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
1219         Drop xtensa_default_isa initialization.
1220         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
1221
1222 2017-03-27  Pedro Alves  <palves@redhat.com>
1223
1224         * dwarf2read.c (file_entry) <dir_index>: Add comment.
1225         (file_entry::include_dir): New method.
1226         (line_header::include_dir_at, line_header::file_name_at): New
1227         methods.
1228         (setup_type_unit_groups, setup_type_unit_groups)
1229         (psymtab_include_file_name): Simplify using the new methods.
1230         (lnp_state_machine) <the_line_header>: New field.
1231         <file>: Add comment.
1232         (lnp_state_machine::current_file): New method.
1233         (dwarf_record_line): Simplify using the new methods.
1234         (init_lnp_state_machine): Initialize the "the_line_header" field.
1235         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
1236         Simplify using the new methods.
1237
1238 2017-03-27  Pedro Alves  <palves@redhat.com>
1239
1240         * cp-name-parser.y (make_empty): Delete.
1241         (demangler_special, nested_name, ptr_operator, array_indicator)
1242         (direct_declarator, declarator_1): Use fill_comp instead of
1243         make_empty.
1244
1245 2017-03-27  Pedro Alves  <palves@redhat.com>
1246
1247         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
1248         to ATTRIBUTE_PRINTF.
1249         * solib-target.c (library_list_start_list): Print "string" not
1250         "version".
1251         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
1252         gdb_xml_error call.
1253
1254 2017-03-27  Pedro Alves  <palves@redhat.com>
1255
1256         * dwarf2read.c (struct file_and_directory): New.
1257         (dwarf2_get_dwz_file): Adjust to use std::string.
1258         (dw2_get_file_names_reader): Adjust to use file_and_directory.
1259         (find_file_and_directory): Adjust to return a file_and_directory
1260         object.
1261         (read_file_scope): Adjust to use file_and_directory.  Remove
1262         make_cleanup/do_cleanups calls.
1263         (open_and_init_dwp_file): Adjust to use std::string.  Remove
1264         make_cleanup/do_cleanups calls.
1265         * python/python.c (do_start_initialization): Adjust to ldirname
1266         returning a std::string.
1267         * utils.c (ldirname): Now returns a std::string.
1268         * utils.h (ldirname): Change return type to std::string.
1269         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
1270         returning a std::string.
1271         * xml-tdesc.c (file_read_description_xml): Likewise.
1272
1273 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
1274
1275         * regcache.c (regcache_debug_print_register): New function.
1276         * regcache.h (regcache_debug_print_register): New declaration.
1277         * target.c (debug_print_register): Remove.
1278         (target_fetch_registers): Call regcache_debug_print_register.
1279         (target_store_registers): Likewise.
1280
1281 2017-03-24  Pádraig Brady  <pbrady@fb.com>
1282
1283         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
1284         reference beyond the 'lh->include_dirs' array before accessing to
1285         it.
1286         (psymtab_include_file_name): Likewise.
1287         (dwarf_decode_lines_1): Likewise.
1288         (dwarf_decode_lines): Likewise.
1289         (file_file_name): Likewise.
1290
1291 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
1292
1293         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
1294         inferior_ptid.
1295         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
1296         ps_lsetfpregs): Likewise.
1297         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
1298         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
1299         ps_lsetfpregs): Likewise.
1300         * target.c (target_fetch_registers, target_store_registers):
1301         Remove asserts.
1302
1303 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
1304
1305         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
1306
1307 2017-03-23  Yao Qi  <yao.qi@linaro.org>
1308
1309         * aarch64-tdep.c (aarch64_process_record_test): Declare.
1310         (_initialize_aarch64_tdep): Register it.
1311         (aarch64_record_load_store): Handle PRFM instruction.
1312         (aarch64_process_record_test): New function.
1313
1314 2017-03-23  Yao Qi  <yao.qi@linaro.org>
1315
1316         * aarch64-tdep.c (aarch64_record_load_store): Fix code
1317         indentation.
1318
1319 2017-03-23  Yao Qi  <yao.qi@linaro.org>
1320
1321         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
1322
1323 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1324
1325         python/python.c (do_start_initialization): Fix memory leak.
1326
1327 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
1328
1329         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
1330         using get_ptrace_pid.
1331         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
1332         inferior_ptid.
1333         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
1334         inferior_ptid instead of pid.
1335
1336 2017-03-22  Yao Qi  <yao.qi@linaro.org>
1337
1338         * aarch64-tdep.c: Wrap locally used classes in anonymous
1339         namespace.
1340         * arm-tdep.c: Likewise.
1341         * linespec.c: Likewise.
1342         * ui-out.c: Likewise.
1343
1344 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
1345
1346         PR gdb/19637
1347         * python/lib/gdb/printer/bound_registers.py: Import sys.
1348
1349 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
1350
1351         * windows-nat.c (do_windows_fetch_inferior_registers): Add
1352         windows_thread_info parameter and use it instead of
1353         current_thread.
1354         (windows_fetch_inferior_registers): Don't set current_thread,
1355         pass the thread to do_windows_fetch_inferior_registers.  Use
1356         ptid from regcache instead of inferior_ptid.
1357         (do_windows_store_inferior_registers): Add windows_thread_info
1358         parameter and use it instead of current_thread.
1359         (windows_store_inferior_registers): Don't set current_thread,
1360         pass the thread to do_windows_store_inferior_registers.  Use
1361         ptid from regcache instead of inferior_ptid.
1362
1363 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
1364
1365         * ser-mingw.c (ser_windows_raw): Remove reference to
1366         struct serial::current_timeout.
1367
1368 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
1369
1370         PR tdep/20928
1371         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
1372         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
1373         (sparc64_fsr_type): Fix %fsr decoding.
1374
1375 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
1376
1377         * python/py-record-btrace.c (btpy_insn_data): Change return type
1378         for Python 2.
1379
1380 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
1381
1382         * spu-linux-nat.c (spu_fetch_inferior_registers,
1383         spu_store_inferior_registers): Use ptid from regcache, set and
1384         restore inferior_ptid.
1385         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
1386         Likewise.
1387
1388 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
1389
1390         * i386-linux-nat.c (fetch_register, store_register,
1391         i386_linux_fetch_inferior_registers,
1392         i386_linux_store_inferior_registers): Use ptid from regcache.
1393         * ia64-linux-nat.c (ia64_linux_fetch_register,
1394         ia64_linux_store_register): Likewise.
1395         * inf-ptrace.c (inf_ptrace_fetch_register,
1396         inf_ptrace_store_register): Likewise.
1397         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
1398         m32r_linux_store_inferior_registers): Likewise.
1399         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
1400         m68kbsd_store_inferior_registers): Likewise.
1401         * m68k-linux-nat.c (fetch_register, store_register,
1402         m68k_linux_fetch_inferior_registers,
1403         m68k_linux_store_inferior_registers): Likewise.
1404         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
1405         m88kbsd_store_inferior_registers): Likewise.
1406         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
1407         mips_fbsd_store_inferior_registers): Likewise.
1408         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
1409         mips64_linux_regsets_store_registers): Likewise.
1410         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
1411         mipsnbsd_store_inferior_registers): Likewise.
1412         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
1413         mips64obsd_store_inferior_registers): Likewise.
1414         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
1415         Likewise.
1416         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
1417         ppcfbsd_store_inferior_registers): Likewise.
1418         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
1419         ppc_linux_store_inferior_registers): Likewise.
1420         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
1421         ppcnbsd_store_inferior_registers): Likewise.
1422         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
1423         ppcobsd_store_registers): Likewise.
1424         * procfs.c (procfs_fetch_registers, procfs_store_registers):
1425         Likewise.
1426         * ravenscar-thread.c (ravenscar_fetch_registers,
1427         ravenscar_store_registers, ravenscar_prepare_to_store):
1428         Likewise.
1429         * record-btrace.c (record_btrace_fetch_registers,
1430         record_btrace_store_registers, record_btrace_prepare_to_store):
1431         Likewise.
1432         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
1433         Lookup inferior using ptid from regcache, instead of
1434         current_inferior.
1435         * remote.c (remote_fetch_registers, remote_store_registers): Use
1436         ptid from regcache.
1437         * rs6000-nat.c (fetch_register, store_register): Likewise.
1438         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
1439         s390_linux_store_inferior_registers): Likewise.
1440         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
1441         shnbsd_store_inferior_registers): Likewise.
1442         * sol-thread.c (sol_thread_fetch_registers,
1443         sol_thread_store_registers): Likewise.
1444         * sparc-nat.c (sparc_fetch_inferior_registers,
1445         sparc_store_inferior_registers): Likewise.
1446         * tilegx-linux-nat.c (fetch_inferior_registers,
1447         store_inferior_registers): Likewise.
1448         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
1449         vaxbsd_store_inferior_registers): Likewise.
1450         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
1451         store_xtregs): Likewise.
1452
1453 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1454
1455         PR gdb/14441
1456         * NEWS: Mention support for rvalue references in GDB and python.
1457         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
1458         supports both lvalue and rvalue references.
1459
1460 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1461
1462         PR gdb/14441
1463         * gdbtypes.c (rank_one_type): Implement overloading
1464         resolution rules regarding rvalue references.
1465
1466 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1467
1468         PR gdb/14441
1469         * aarch64-tdep.c (aarch64_type_align)
1470         (aarch64_extract_return_value, aarch64_store_return_value): Change
1471         lvalue reference type checks to general reference type checks.
1472         * amd64-tdep.c (amd64_classify): Likewise.
1473         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
1474         Likewise.
1475         * arm-tdep.c (arm_type_align, arm_extract_return_value)
1476         (arm_store_return_value): Likewise.
1477         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
1478         * c-typeprint.c (c_print_type): Likewise.
1479         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
1480         (cplus_number_of_children, cplus_describe_child): Likewise.
1481         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1482         * completer.c (expression_completer): Likewise.
1483         * cp-support.c (make_symbol_overload_list_adl_namespace):
1484         Likewise.
1485         * darwin-nat-info.c (info_mach_region_command): Likewise.
1486         * dwarf2loc.c (entry_data_value_coerce_ref)
1487         (value_of_dwarf_reg_entry): Likewise.
1488         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
1489         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
1490         Likewise.
1491         * findvar.c (extract_typed_address, store_typed_address):
1492         Likewise.
1493         * gdbtypes.c (rank_one_type): Likewise.
1494         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
1495         * infcall.c (value_arg_coerce): Likewise.
1496         * language.c (pointer_type): Likewise.
1497         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
1498         Likewise.
1499         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
1500         * mn10300-tdep.c (mn10300_type_align): Likewise.
1501         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1502         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
1503         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
1504         Likewise.
1505         * printcmd.c (print_formatted, x_command): Likewise.
1506         * python/py-type.c (typy_get_composite, typy_template_argument):
1507         Likewise.
1508         * python/py-value.c (valpy_referenced_value)
1509         (valpy_get_dynamic_type, value_has_field): Likewise.
1510         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
1511         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
1512         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
1513         * spu-tdep.c (spu_scalar_value_p): Likewise.
1514         * symtab.c (lookup_symbol_aux): Likewise.
1515         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
1516         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
1517         Likewise.
1518         * valops.c (value_cast_pointers, value_cast)
1519         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
1520         (value_struct_elt, value_struct_elt_bitpos)
1521         (value_find_oload_method_list, find_overload_match)
1522         (value_rtti_indirect_type): Likewise.
1523         * valprint.c (val_print_scalar_type_p, generic_val_print):
1524         Likewise.
1525         * value.c (value_actual_type, value_as_address, unpack_long)
1526         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
1527         (coerce_ref): Likewise.
1528         * varobj.c (varobj_get_value_type): Likewise.
1529
1530 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1531
1532         PR gdb/14441
1533         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
1534         table of constants.
1535         * python/lib/gdb/command/explore.py: Support exploring values
1536         of rvalue reference types.
1537         * python/lib/gdb/types.py: Implement get_basic_type() for
1538         rvalue reference types.
1539         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
1540         constant.
1541         * python/py-value.c (valpy_getitem): Add an rvalue reference
1542         check.
1543         (valpy_reference_value): Add new parameter "refcode".
1544         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
1545         New wrappers for valpy_reference_value().
1546         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
1547         (gdbpy_invoke_xmethod): Likewise.
1548
1549 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1550
1551         PR gdb/14441
1552         * dwarf2read.c (process_die, read_type_die_1): Handle the
1553         DW_TAG_rvalue_reference_type DIE.
1554         (read_tag_reference_type): Add new parameter "refcode".
1555
1556 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1557
1558         PR gdb/14441
1559         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
1560         (c_type_print_modifier, c_type_print_varspec_suffix)
1561         (c_type_print_base): Support printing rvalue reference types.
1562         * c-valprint.c (c_val_print, c_value_print): Support printing
1563         rvalue reference values.
1564
1565 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1566
1567         PR gdb/14441
1568         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
1569         typename.
1570         * cp-support.c (replace_typedefs): Handle
1571         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
1572         * python/py-type.c (typy_lookup_type): Likewise.
1573
1574 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1575
1576         PR gdb/14441
1577         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
1578         * parse.c (insert_type): Change assert statement.
1579         (follow_types): Handle rvalue reference types.
1580         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
1581         constant.
1582
1583 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1584
1585         PR gdb/14441
1586         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
1587         value_ref() interface.
1588         * c-valprint.c (c_value_print): Likewise.
1589         * infcall.c (value_arg_coerce): Likewise.
1590         * python/py-value.c (valpy_reference_value): Likewise.
1591         * valops.c (value_cast, value_reinterpret_cast)
1592         (value_dynamic_cast, typecmp): Likewise.
1593         (value_ref): Parameterize by kind of return value reference type.
1594         * value.h (value_ref): Add new parameter "refcode".
1595
1596 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1597
1598         PR gdb/14441
1599         * dwarf2read.c (read_tag_reference_type): Use
1600         lookup_lvalue_reference_type() instead of lookup_reference_type().
1601         * eval.c (evaluate_subexp_standard): Likewise.
1602         * f-exp.y: Likewise.
1603         * gdbtypes.c (make_reference_type, lookup_reference_type):
1604         Generalize with rvalue reference types.
1605         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
1606         convenience wrappers for lookup_reference_type().
1607         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
1608         reference kind parameter.
1609         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
1610         wrappers for lookup_reference_type().
1611         * guile/scm-type.c (gdbscm_type_reference): Use
1612         lookup_lvalue_reference_type() instead of lookup_reference_type().
1613         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
1614         * parse.c (follow_types): Likewise.
1615         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
1616         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
1617         Likewise.
1618         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
1619         (gdbpy_invoke_xmethod): Likewise.
1620         * stabsread.c: Provide extra argument to make_reference_type()
1621         call.
1622         * valops.c (value_ref, value_rtti_indirect_type): Use
1623         lookup_lvalue_reference_type() instead of lookup_reference_type().
1624
1625 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1626
1627         PR gdb/14441
1628         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
1629         (TYPE_IS_REFERENCE): New macro.
1630         (struct type): Add rvalue_reference_type field.
1631         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
1632
1633 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
1634
1635         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
1636         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
1637         New function definition.
1638         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
1639         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
1640         New function declaration.
1641         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
1642         * mi/mi-interp.h: New file.
1643         * solib.c (info_sharedlibrary_command): Replace for loop with
1644         ALL_SO_LIBS macro
1645         * solib.h (update_solib_list): New function declaration.
1646         (so_list_head): Move macro.
1647         * solist.h (ALL_SO_LIBS): New macro.
1648
1649 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
1650
1651         * infcmd.c (post_create_inferior): Remove unused argument in
1652         call to solib_add.
1653         * remote.c (remote_start_remote): Likewise.
1654         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
1655         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
1656         (enable_break): Likewise.
1657         * solib.c (update_solib_list): Remove unused target argument
1658         and its documentation.
1659         (solib_add): Remove unused target argument.  Remove unused
1660         argument in call to update_solib_list.
1661         (info_sharedlibrary_command): Remove unused argument in call
1662         to update_solib_list.
1663         (sharedlibrary_command): Remove unused argument in call to
1664         solib_add.
1665         (handle_solib_event): Likewise.
1666         (reload_shared_libraries): Likewise.
1667         * solib.h (solib_add): Remove unused target argument.
1668
1669 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1670
1671         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
1672         (s390_displaced_step_fixup): Cover relative branches with the
1673         default fixup handling.  This fixes lack of support for some
1674         relative branch instructions.
1675
1676 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1677
1678         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
1679         ptid from regcache.
1680
1681 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1682
1683         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
1684         i386_darwin_store_inferior_registers): Use ptid from regcache.
1685
1686 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1687
1688         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
1689         i386bsd_store_inferior_registers): Use ptid from regcache.
1690
1691 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1692
1693         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
1694         hppaobsd_store_registers): Use ptid from regcache.
1695
1696 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1697
1698         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
1699         hppanbsd_store_registers): Use ptid from regcache.
1700
1701 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1702
1703         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
1704         from regcache.  Use get_ptrace_pid.
1705
1706 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1707
1708         * corelow.c (get_core_register_section): Use ptid from regcache,
1709         update doc.
1710
1711 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1712
1713         * bsd-uthread.c (bsd_uthread_fetch_registers,
1714         bsd_uthread_store_registers): Use ptid from regcache, set and
1715         restore inferior_ptid.
1716
1717 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1718
1719         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
1720         fetch_fp_regs, store_register, store_regs, store_fp_register,
1721         store_fp_regs): Use ptid from regcache.
1722
1723 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1724
1725         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
1726         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
1727         store_vfp_regs): Use ptid from regcache.
1728
1729 2017-03-17  Pedro Alves  <palves@redhat.com>
1730
1731         PR remote/21188
1732         * ser-base.c (ser_base_wait_for): Add comment.
1733         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
1734         version.
1735         * ser-unix.c (hardwire_raw): Remove reference to
1736         scb->current_timeout.
1737         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
1738         (hardwire_ops): Install ser_base_readchar instead of
1739         hardwire_readchar.
1740         * serial.h (struct serial) <current_timeout, timeout_remaining>:
1741         Remove fields.
1742
1743 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
1744
1745         PR gdb/19637
1746         * python/lib/gdb/printer/bound_registers.py: Add support for
1747         Python 3.
1748
1749 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1750
1751         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
1752         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
1753         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
1754         byte_offset to subobj_byte_offset.  Fix the handling of
1755         DWARF_VALUE_STACK on big-endian targets when coming via an
1756         implicit pointer.
1757         (dwarf2_evaluate_loc_desc): Adjust call to
1758         dwarf2_evaluate_loc_desc_full.
1759         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
1760         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
1761
1762 2017-03-16  Yao Qi  <yao.qi@linaro.org>
1763
1764         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
1765         and REVSH instructions.
1766
1767 2017-03-16  Yao Qi  <yao.qi@linaro.org>
1768
1769         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
1770         (arm_record_test): Declare.
1771         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
1772         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
1773         align with the manual.
1774         (thumb_record_misc): Adjust the code order to align with the
1775         manual.
1776         (thumb2_record_decode_insn_handler): Fix instruction matching.
1777         (instruction_reader_thumb): New class.
1778         (arm_record_test): New function.
1779
1780 2017-03-16  Yao Qi  <yao.qi@linaro.org>
1781
1782         * arm-tdep.c (abstract_memory_reader): New class.
1783         (instruction_reader): New class.
1784         (extract_arm_insn): Add argument 'reader'.  Callers updated.
1785         (decode_insn): Likewise.
1786
1787 2017-03-16  Doug Evans  <dje@google.com>
1788
1789         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
1790         member.  Change type of TYPE member to SCM.  All uses updated.
1791         (lsscm_make_lazy_string_smob): Add assert.
1792         (lsscm_make_lazy_string): Flag bad length values.
1793         (lsscm_elt_type): New function.
1794         (gdbscm_lazy_string_to_value): Rewrite to use
1795         lsscm_safe_lazy_string_to_value.
1796         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
1797         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
1798         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
1799         in incoming type.
1800         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
1801         * guile/scm-type.c (tyscm_scm_to_type): New function.
1802
1803 2017-03-15  Doug Evans  <dje@google.com>
1804
1805         PR python/17728, python/18439, python/18779
1806         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
1807         member.  Change type of TYPE member to PyObject *.  All uses updated.
1808         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
1809         (gdbpy_create_lazy_string_object): Flag bad length values.
1810         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
1811         Handle typedefs in incoming type.
1812         (stpy_lazy_string_elt_type): New function.
1813         (gdbpy_extract_lazy_string): Call it.
1814         * python/py-value.c (valpy_lazy_string): Flag bad length values.
1815         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
1816         typedefs in incoming type.
1817
1818 2017-03-16  Doug Evans  <dje@google.com>
1819
1820         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
1821         * guile/scm-type.c (tyscm_scm_to_type): New function.
1822
1823 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
1824
1825         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
1826         "ULONGEST" for "skip".
1827
1828 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1829
1830         PR gdb/21220
1831         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
1832         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
1833         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
1834         over ptrace peek/poke until end of buffer or error.
1835
1836 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
1837
1838         * parse.c (length_of_subexp): Make static.
1839         * parser-defs.h (length_of_subexp): Remove.
1840
1841 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1842
1843         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
1844         as well.
1845
1846 2017-03-14  Pedro Alves  <palves@redhat.com>
1847
1848         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
1849         (main): Use std::unique_ptr.  Remove calls to
1850         cp_demangled_name_parse_free.
1851
1852 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1853
1854         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
1855         alphabsd_store_inferior_registers): Use regcache->ptid instead
1856         of inferior_ptid.
1857
1858 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1859
1860         * aix-thread.c (aix_thread_fetch_registers,
1861         aix_thread_store_registers): Use regcache->ptid instead of
1862         inferior_ptid.
1863
1864 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1865
1866         * aarch64-linux-nat.c (fetch_gregs_from_thread,
1867         store_gregs_to_thread, fetch_fpregs_from_thread,
1868         store_fpregs_to_thread): Use regcache->ptid instead of
1869         inferior_ptid.
1870
1871 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1872
1873         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
1874         amd64_linux_fetch_inferior_registers): Use regcache->ptid
1875         instead of inferior_ptid.
1876
1877 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1878
1879         * target.c (target_fetch_registers, target_store_registers): Add
1880         assert.
1881
1882 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1883
1884         * regcache.h (regcache_get_ptid): New function.
1885         * regcache.c (regcache_get_ptid): New function.
1886
1887 2017-03-13  Mark Wielaard  <mark@klomp.org>
1888
1889         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
1890
1891 2017-03-10  Keith Seitz  <keiths@redhat.com>
1892
1893         PR c++/8218
1894         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
1895
1896 2017-03-08  Pedro Alves  <palves@redhat.com>
1897
1898         PR gdb/18360
1899         * infrun.c (start_step_over, do_target_resume, resume)
1900         (restart_threads): Assert we're not resuming a thread that is
1901         meant to be stopped.
1902         (infrun_thread_stop_requested_callback): Delete.
1903         (infrun_thread_stop_requested): If the thread is internally
1904         stopped, queue a pending stop event and clear the thread's
1905         inline-frame state.
1906         (handle_stop_requested): New function.
1907         (handle_syscall_event, handle_inferior_event_1): Use
1908         handle_stop_requested.
1909         (handle_stop_requested): New function.
1910         (handle_signal_stop): Set the thread's stop_signal here instead of
1911         at caller.
1912         (finish_step_over): Clear step over info unconditionally.
1913         (handle_signal_stop): If the user had interrupted the event
1914         thread, consider the stop a random signal.
1915         (handle_signal_stop) <signal arrived while stepping over
1916         breakpoint>: Don't restart threads here.
1917         (stop_waiting): Don't clear step-over info here.
1918
1919 2017-03-08  Pedro Alves  <palves@redhat.com>
1920
1921         PR 21206
1922         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
1923         goes to argument 2, not 1.
1924
1925 2017-03-08  Pedro Alves  <palves@redhat.com>
1926
1927         PR cli/21218
1928         * top.c (gdb_readline_wrapper): Avoid passing NULL to
1929         display_gdb_prompt.
1930         (command_line_input): Add comment.
1931
1932 2017-03-08  Pedro Alves  <palves@redhat.com>
1933
1934         PR tui/21216
1935         * tui/tui-file.c (tui_file::write): New.
1936         * tui/tui-file.h (tui_file): Override "write".
1937         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
1938         factored out from ...
1939         (tui_puts): ... here.
1940         (tui_putc): Use them.
1941         (tui_write): New function.
1942         * tui/tui-io.h (tui_write): Declare.
1943
1944 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1945
1946         * Makefile.in (SFILES): Replace "environ.c" with
1947         "common/environ.c".
1948         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
1949         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
1950         to...
1951         * common/environ.c: ... here.
1952         * environ.h: Moved to...
1953         * common/environ.h: ... here.
1954
1955 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
1956
1957         * gdbarch.sh (pstring_ptr): New static function.
1958         (gdbarch_disassembler_options): Use it.
1959         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
1960         not valid_disassembler_option->name.
1961         * gdbarch.c: Regenerate.
1962
1963 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
1964
1965         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
1966
1967 2017-03-07  Pedro Alves  <palves@redhat.com>
1968
1969         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
1970
1971 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1972
1973         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
1974         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
1975         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
1976         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
1977
1978 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
1979
1980         * xtensa-linux-nat.c (fetch_gregs): Remove const.
1981
1982 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
1983
1984         * remote.c (remote_add_target_side_commands): Use range-based
1985         for loop.
1986
1987 2017-03-03  Yao Qi  <yao.qi@linaro.org>
1988
1989         PR gdb/21165
1990         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
1991         value is lazy.
1992         * valprint.c (common_val_print): Likewise.
1993
1994 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
1995
1996         * NEWS: Mention new set/show disassembler-options commands.
1997         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
1998         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
1999         (prospective_options): New static variable.
2000         (gdb_disassembler::gdb_disassembler): Initialize
2001         m_di.disassembler_options.
2002         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
2003         (get_disassembler_options): New function.
2004         (set_disassembler_options): Likewise.
2005         (set_disassembler_options_sfunc): Likewise.
2006         (show_disassembler_options_sfunc): Likewise.
2007         (disassembler_options_completer): Likewise.
2008         (_initialize_disasm): Likewise.
2009         * disasm.h (get_disassembler_options): New prototype.
2010         (set_disassembler_options): Likewise.
2011         * gdbarch.sh (gdbarch_disassembler_options): New variable.
2012         (gdbarch_verify_disassembler_options): Likewise.
2013         * gdbarch.c: Regenerate.
2014         * gdbarch.h: Likewise.
2015         * arm-tdep.c (num_disassembly_options): Delete.
2016         (set_disassembly_style): Likewise.
2017         (arm_disassembler_options): New static variable.
2018         (set_disassembly_style_sfunc): Convert short style name into long
2019         option name.  Call set_disassembler_options.
2020         (show_disassembly_style_sfunc): New function.
2021         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
2022         set_gdbarch_verify_disassembler_options.
2023         (_initialize_arm_tdep): Delete regnames variable and update callers.
2024         (arm_disassembler_options): Initialize.
2025         (disasm_options): New variable.
2026         (num_disassembly_options): Rename from this...
2027         (num_disassembly_styles): ...to this.  Compute by scanning through
2028         disasm_options.
2029         (valid_disassembly_styles): Initialize using disasm_options.
2030         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
2031         set_arm_regname_option.
2032         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
2033         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
2034         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
2035         set_gdbarch_verify_disassembler_options.
2036         * s390-tdep.c (s390_disassembler_options): New static variable.
2037         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
2038         set_gdbarch_verify_disassembler_options.
2039
2040 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
2041
2042         * remote.c (remote_add_target_side_condition): Remove "struct"
2043         keyword from range-based for loop.
2044
2045 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
2046
2047         * remote.c (remote_add_target_side_condition): Use range-based
2048         for loop.  Update comment.
2049
2050 2017-02-27  Yao Qi  <yao.qi@linaro.org>
2051
2052         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
2053
2054 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
2055
2056         * regcache.c (regcache_raw_update): New function.
2057         (regcache_raw_read): Move code to regcache_raw_update.
2058         * regcache.h (regcache_raw_update): New declaration.
2059         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
2060
2061 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
2062
2063         * dwarf2read.c (create_debug_type_hash_table): Initialize
2064         header.signature and header.type_offset_in_tu.
2065
2066 2017-02-24  Pedro Alves  <palves@redhat.com>
2067
2068         * symtab.c (make_file_symbol_completion_list_1): Use
2069         add_symtab_completions.
2070
2071 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
2072
2073         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
2074
2075 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
2076
2077         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
2078         I386_MAX_REGISTER_SIZE.
2079         (i386_pseudo_register_write): Likewise.
2080         (i386_process_record): Likewise.
2081         * i387-tdep.c (i387_supply_xsave): Likewise.
2082         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
2083         (store_register): Likewise.
2084
2085 2017-02-23  Pedro Alves  <palves@redhat.com>
2086
2087         * ada-lang.c: Include "common/function-view.h".
2088         (ada_iterate_over_symbols): Adjust to use function_view as
2089         callback type.
2090         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
2091         (ada_make_symbol_completion_list): Use a lambda.
2092         (ada_exc_search_name_matches): Delete.
2093         (name_matches_regex): New.
2094         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
2095         * compile/compile-c-support.c: Include "common/function-view.h".
2096         (print_one_macro): Change prototype to accept a ui_file pointer.
2097         (write_macro_definitions): Use a lambda.
2098         * dwarf2read.c: Include "common/function-view.h".
2099         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
2100         (dw2_expand_symtabs_matching): Adjust to use function_view as
2101         callback type.
2102         * language.h: Include "common/function-view.h".
2103         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
2104         function_view as callback type.
2105         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
2106         * linespec.c: Include "common/function-view.h".
2107         (collect_info::add_symbol): New method.
2108         (struct symbol_and_data_callback, iterate_inline_only, struct
2109         symbol_matcher_data, iterate_name_matcher): Delete.
2110         (iterate_over_all_matching_symtabs): Adjust to use function_view
2111         as callback type and lambdas.
2112         (iterate_over_file_blocks): Adjust to use function_view as
2113         callback type.
2114         (decode_compound_collector): Now a class with private fields.
2115         (decode_compound_collector::release_symbols): New method.
2116         (collect_one_symbol): Rename to...
2117         (decode_compound_collector::operator()): ... this and adjust.
2118         (lookup_prefix_sym): decode_compound_collector construction bits
2119         move to decode_compound_collector ctor.  Pass the
2120         decode_compound_collector object directly as callback.  Remove
2121         cleanups and use decode_compound_collector::release_symbols
2122         instead.
2123         (symtab_collector): Now a class with private fields.
2124         (symtab_collector::release_symtabs): New method.
2125         (add_symtabs_to_list): Rename to...
2126         (symtab_collector::operator()): ... this and adjust.
2127         (collect_symtabs_from_filename): symtab_collector construction
2128         bits move to symtab_collector ctor.  Pass the symtab_collector
2129         object directly as callback.  Remove cleanups and use
2130         symtab_collector::release_symtabs instead.
2131         (collect_symbols): Delete.
2132         (add_matching_symbols_to_info): Use lambdas.
2133         * macrocmd.c (print_macro_callback): Delete.
2134         (info_macro_command): Use a lambda.
2135         (info_macros_command): Pass print_macro_definition as callable
2136         directly.
2137         (print_one_macro): Remove 'ignore' parameter.
2138         (macro_list_command): Adjust.
2139         * macrotab.c (macro_for_each_data::fn): Now a function_view.
2140         (macro_for_each_data::user_data): Delete field.
2141         (foreach_macro): Adjust to call the function_view.
2142         (macro_for_each): Adjust to use function_view as callback type.
2143         (foreach_macro_in_scope): Adjust to call the function_view.
2144         (macro_for_each_in_scope): Adjust to use function_view as callback
2145         type.
2146         * macrotab.h: Include "common/function-view.h".
2147         (macro_callback_fn): Declare a prototype instead of a pointer.
2148         Remove "user_data" parameter.
2149         (macro_for_each, macro_for_each_in_scope): Adjust to use
2150         function_view as callback type.
2151         * psymtab.c (partial_map_expand_apply)
2152         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
2153         Adjust to use function_view as callback type and to return bool.
2154         (psym_expand_symtabs_matching): Adjust to use function_view as
2155         callback types.
2156         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
2157         to use function_view as callback type and to return bool.
2158         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
2159         callback types.
2160         * symfile.c (expand_symtabs_matching): Adjust to use function_view
2161         as callback types.
2162         * symfile.h: Include "common/function-view.h".
2163         (expand_symtabs_file_matcher_ftype)
2164         (expand_symtabs_symbol_matcher_ftype)
2165         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
2166         return bool.
2167         (quick_symbol_functions::map_symtabs_matching_filename)
2168         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
2169         function_view as callback type and return bool.
2170         (expand_symtabs_matching): Adjust to use function_view as callback
2171         type.
2172         (maintenance_expand_name_matcher)
2173         (maintenance_expand_file_matcher): Delete.
2174         (maintenance_expand_symtabs): Use lambdas.
2175         * symtab.c (iterate_over_some_symtabs): Adjust to use
2176         function_view as callback types and return bool.
2177         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
2178         of a cleanup.
2179         (lookup_symtab_callback): Delete.
2180         (lookup_symtab): Use a lambda.
2181         (iterate_over_symbols): Adjust to use function_view as callback
2182         type.
2183         (struct search_symbols_data, search_symbols_file_matches)
2184         (search_symbols_name_matches): Delete.
2185         (search_symbols): Use a pair of lambdas.
2186         (struct add_name_data, add_macro_name, symbol_completion_matcher)
2187         (symtab_expansion_callback): Delete.
2188         (default_make_symbol_completion_list_break_on_1): Use lambdas.
2189         * symtab.h: Include "common/function-view.h".
2190         (iterate_over_some_symtabs): Adjust to use function_view as
2191         callback type and return bool.
2192         (iterate_over_symtabs): Adjust to use function_view as callback
2193         type.
2194         (symbol_found_callback_ftype): Remove 'data' parameter and return
2195         bool.
2196         (iterate_over_symbols): Adjust to use function_view as callback
2197         type.
2198
2199 2017-02-23  Pedro Alves  <palves@redhat.com>
2200
2201         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
2202         (%.o) <unittests/%.c>: New pattern.
2203         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
2204         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
2205         * common/function-view.h: New file.
2206         * unittests/function-view-selftests.c: New file.
2207         * configure: Regenerate.
2208
2209 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
2210
2211         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
2212         inferior_ptid.
2213         * go32-nat.c (go32_thread_alive): Likewise.
2214
2215 2017-02-23  Yao Qi  <yao.qi@linaro.org>
2216
2217         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
2218         delete.
2219
2220 2017-02-23  Yao Qi  <yao.qi@linaro.org>
2221
2222         * varobj.c (varobj_clear_saved_item): Use delete instead of
2223         xfree.
2224         (update_dynamic_varobj_children): Likewise.
2225
2226 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
2227
2228         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
2229
2230 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
2231
2232         * common/enum-flags.h (enum_flags::enum_flags): Initialize
2233         m_enum_value to 0 in default constructor.
2234
2235 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2236
2237         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
2238         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
2239         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
2240         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
2241         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
2242         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
2243         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
2244         IS_STORE_CONDITIONAL_INSN.
2245
2246 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
2247
2248         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
2249
2250 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
2251
2252         * NEWS (Changes since GDB 7.12): Add DWARF-5.
2253
2254 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
2255
2256         * dwarf2read.c (skip_one_die, read_attribute_value)
2257         (dwarf2_const_value_attr, dump_die_shallow)
2258         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2259         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
2260
2261 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
2262
2263         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
2264         (dwarf_parse_macro_header): Accept DWARF version 5.
2265         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
2266
2267 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
2268
2269         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
2270         DW_AT_GNU_*.
2271         * common/common-exceptions.h (enum errors): Likewise.
2272         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
2273         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
2274         (dwarf_expr_context::execute_stack_op): Likewise.
2275         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
2276         Likewise.
2277         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
2278         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
2279         (show_entry_values_debug, call_site_to_target_addr)
2280         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
2281         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
2282         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
2283         (value_of_dwarf_block_entry, indirect_pieced_value)
2284         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
2285         (disassemble_dwarf_expression): Likewise.
2286         * dwarf2read.c (process_die, inherit_abstract_dies)
2287         (read_call_site_scope): Likewise.
2288         * gdbtypes.h (struct func_type, struct call_site_parameter)
2289         (struct call_site): Likewise.
2290         * stack.c (read_frame_arg): Likewise.
2291         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
2292
2293 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
2294
2295         * defs.h (read_unsigned_leb128): New declaration.
2296         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
2297         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
2298         (dwarf2_find_location_expression): Call also
2299         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
2300         * dwarf2loc.h (dwarf2_version): New declaration.
2301         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
2302         rnglists.
2303         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
2304         .debug_rnglists.
2305         (struct dwop_section_names): Add loclists_dwo.
2306         (dwop_section_names): Add .debug_loclists.dwo.
2307         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
2308         (struct dwarf2_per_cu_data): Add dwarf_version.
2309         (struct dwo_sections): Add loclists.
2310         (struct attr_abbrev): Add implicit_const.
2311         (read_indirect_line_string): New declaration.
2312         (read_unsigned_leb128): Delete declaration.
2313         (rcuh_kind): New definition.
2314         (read_and_check_comp_unit_head): Change parameter
2315         is_debug_types_section to section_kind.
2316         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
2317         (read_comp_unit_head): Change parameter abfd to section, add parameter
2318         section_kind.  Handle DWARF-5.
2319         (error_check_comp_unit_head): Accept also DWARF version 5.
2320         (read_and_check_comp_unit_head): Change parameter
2321         is_debug_types_section to section_kind.
2322         (read_and_check_type_unit_head): Delete function.
2323         (read_abbrev_offset): Handle DWARF-5.
2324         (create_debug_type_hash_table): Add parameter section_kind.  Process
2325         only DW_UT_type.  Use signature and type_offset_in_tu from struct
2326         comp_unit_head.
2327         (create_debug_types_hash_table): Update create_debug_type_hash_table
2328         caller.
2329         (create_all_type_units): Call create_debug_type_hash_table.
2330         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
2331         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
2332         caller.
2333         (skip_one_die): Handle DW_FORM_implicit_const.
2334         (dwarf2_rnglists_process): New function.
2335         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
2336         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
2337         (read_attribute_value): Handle DW_FORM_implicit_const,
2338         DW_FORM_line_strp.
2339         (read_attribute): Handle DW_FORM_implicit_const.
2340         (read_indirect_string_at_offset_from): New function from
2341         read_indirect_string_at_offset.
2342         (read_indirect_string_at_offset): Call
2343         read_indirect_string_at_offset_from.
2344         (read_indirect_line_string_at_offset): New function.
2345         (read_indirect_string): New function comment.
2346         (read_indirect_line_string): New function.
2347         (read_unsigned_leb128): Make it global.
2348         (dwarf2_string_attr): Handle DWARF-5.
2349         (add_include_dir_stub, read_formatted_entries): New functions.
2350         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
2351         Handle DWARF-5.
2352         (per_cu_header_read_in): Update read_comp_unit_head caller.
2353         (dwarf2_version): New function.
2354         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
2355         rnglists.
2356         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
2357         fields.
2358
2359 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
2360
2361         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
2362
2363 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
2364
2365         * dwarf2read.c (dwarf2_ranges_process): New function from
2366         dwarf2_ranges_read.
2367         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
2368         dwarf2_ranges_process.
2369
2370 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
2371
2372         * dwarf2read.c (create_debug_type_hash_table): New function from
2373         create_debug_types_hash_table.
2374         (create_debug_types_hash_table): Call create_debug_type_hash_table.
2375         (create_all_type_units, open_and_init_dwo_file): Update
2376         create_debug_types_hash_table callers.
2377
2378 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
2379
2380         PR gdb/16188
2381         * fork-child.c (trace_start_error): Fix thinko.  va_end should
2382         refer to 'ap', not 'args'.
2383
2384 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
2385             Pedro Alves  <palves@redhat.com>
2386
2387         PR gdb/16188
2388         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
2389         calls succeeded.
2390         * fork-child.c (trace_start_error): New function.
2391         (trace_start_error_with_name): Likewise.
2392         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
2393         * inf-ptrace.c (inf_ptrace_me): Likewise.
2394         * inferior.h (trace_start_error): New prototype.
2395         (trace_start_error_with_name): Likewise.
2396
2397 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2398
2399         PR gdb/21164
2400         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
2401         NULL before using it.
2402         * symmisc.c (maintenance_print_symbols): Likewise.
2403         (maintenance_print_msymbols): Likewise.
2404
2405 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2406
2407         * NEWS: Add record Python bindings entry.
2408
2409 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2410
2411         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
2412         py-record-full.o.
2413         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
2414         * python/py-record-btrace.c, python/py-record-btrace.h,
2415         python/py-record-full.c, python/py-record-full.h: New file.
2416         * python/py-record.c: Add include for py-record-btrace.h and
2417         py-record-full.h.
2418         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
2419         recpy_instruction_history, recpy_function_call_history, recpy_begin,
2420         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
2421         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
2422         New definition.
2423         (gdbpy_initialize_btrace): New export.
2424         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
2425
2426 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2427
2428         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
2429         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
2430         * python/py-record.c: New file.
2431         * python/python-internal.h (gdbpy_start_recording,
2432         gdbpy_current_recording, gdpy_stop_recording,
2433         gdbpy_initialize_record): New export.
2434         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
2435         (python_GdbMethods): Add gdbpy_start_recording,
2436         gdbpy_current_recording and gdbpy_stop_recording.
2437
2438 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2439
2440         * record-btrace.c (record_btrace_record_method): New function.
2441         (init_record_btrace_ops): Initialize to_record_method.
2442         * record-full.c (record_full_record_method): New function.
2443         (init_record_full_ops, init_record_full_core_ops): Add
2444         record_full_record_method.
2445         * record.h (enum record_method): New enum.
2446         * target-debug.h (target_debug_print_enum_record_method: New define.
2447         * target-delegates.c: Regenerate.
2448         * target.c (target_record_method): New function.
2449         * target.h: Include record.h.
2450         (struct target_ops) <to_record_method>: New field.
2451         (target_record_method): New export.
2452
2453 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2454
2455         * record.h (record_start, record_stop): New export.
2456         * record.c (record_start, record_stop): New function.
2457
2458 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2459
2460         * btrace.c (btrace_fetch): Copy function call segments pointer
2461         into a vector.
2462         (btrace_clear): Clear the vector.
2463         (btrace_find_insn_by_number): Use binary search to find the correct
2464         function call segment.
2465         * btrace.h (brace_fun_p): New typedef.
2466         (struct btrace_thread_info) <functions>: New field.
2467
2468 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2469
2470         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
2471         * btrace.c (btrace_decode_error): ... here.  New function.
2472         * btrace.h (btrace_decode_error): New export.
2473
2474 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2475
2476         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
2477         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
2478         btrace_find_insn_by_number): Remove special case for gaps.
2479         * btrace.h (btrace_insn_get_error): New export.
2480         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
2481         * record-btrace.c (btrace_insn_history): Print number for gaps.
2482         (record_btrace_info, record_btrace_goto): Handle gaps.
2483
2484 2017-02-14  Tom Tromey  <tom@tromey.com>
2485
2486         PR python/13598:
2487         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
2488         event.
2489         * python/py-evts.c (gdbpy_initialize_py_events): Add
2490         before_prompt registry.
2491         * python/py-events.h (events_object) <before_prompt>: New field.
2492
2493 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
2494
2495         * btrace.c (ftrace_new_switch): Preserve up link and flags.
2496
2497 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
2498
2499         * symfile (_initialize_symfile): Add usage text to the load command's
2500         help text.
2501
2502 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
2503
2504         * utils.c (defaulted_query): Don't query on secondary UIs.
2505
2506 2017-02-10  Tom Tromey  <tom@tromey.com>
2507
2508         * rust-lang.c (rust_get_disr_info): Remove unused variable.
2509
2510 2017-02-10  Tom Tromey  <tom@tromey.com>
2511
2512         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
2513         "cleanup" local.
2514         * python/py-type.c (typy_legacy_template_argument): Remove
2515         unnecessary "cleanup" local.
2516
2517 2017-02-10  Tom Tromey  <tom@tromey.com>
2518
2519         * python/python.c (do_start_initialization): New function, from
2520         _initialize_python.
2521         (_initialize_python): Call do_start_initialization.
2522         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
2523         goto.
2524
2525 2017-02-10  Tom Tromey  <tom@tromey.com>
2526
2527         * python/py-prettyprint.c (pretty_print_one_value): Use
2528         gdbpy_ref.
2529
2530 2017-02-10  Tom Tromey  <tom@tromey.com>
2531
2532         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
2533         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
2534         gdbpy_ref.
2535         * python/py-type.c (field_new): Use gdbpy_ref.
2536         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
2537         gdbpy_ref.
2538         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
2539         (py_free_pspace): Likewise.
2540         (pspace_to_pspace_object): Likewise.
2541         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
2542         (py_free_objfile): Likewise.
2543         (objfile_to_objfile_object): Likewise.
2544         * python/py-inferior.c (delete_thread_object): Use
2545         gdbpy_ref.
2546         (infpy_read_memory): Likewise.
2547         (py_free_inferior): Likewise.
2548         * python/py-evtregistry.c (create_eventregistry_object): Use
2549         gdbpy_ref.
2550         * python/py-event.c (create_event_object): Use gdbpy_ref.
2551
2552 2017-02-10  Tom Tromey  <tom@tromey.com>
2553
2554         * python/py-ref.h (gdbpy_ref_policy): Now a template.
2555         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
2556         used.
2557         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
2558         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
2559         python/py-exitedevent.c, python/py-finishbreakpoint.c,
2560         python/py-framefilter.c, python/py-function.c,
2561         python/py-inferior.c, python/py-infevents.c,
2562         python/py-linetable.c, python/py-newobjfileevent.c,
2563         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
2564         python/py-signalevent.c, python/py-stopevent.c,
2565         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
2566         python/py-unwind.c, python/py-utils.c, python/py-value.c,
2567         python/py-varobj.c, python/py-xmethods.c, python/python.c,
2568         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
2569
2570 2017-02-10  Tom Tromey  <tom@tromey.com>
2571
2572         * ui-out.h (ui_out_emit_type): New class.
2573         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
2574         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
2575         and ui_out_emit_tuple.
2576         (enumerate_locals): Likewise.
2577         (py_mi_print_variables, py_print_locals, py_print_args): Use
2578         ui_out_emit_list.
2579         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
2580         ui_out_emit_list.
2581         * common/gdb_optional.h: New file.
2582
2583 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
2584
2585         * MAINTAINERS (Write After Approval): Update my e-mail address.
2586
2587 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
2588
2589         PR gdb/21122
2590         * breakpoint.c (_initialize_breakpoint): Update the help description
2591         of the 'commands' command to indicate that it takes a list argument.
2592
2593 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
2594
2595         * interps.c (current_interp_set_logging): Remove "return".
2596
2597 2017-02-09  Gary Benson  <gbenson@redhat.com>
2598
2599         * symtab.c (add_symtab_completions): Prevent NULL pointer
2600         dereference.
2601
2602 2017-02-08  Pedro Alves  <palves@redhat.com>
2603
2604         * interps.c (interp::interp): Remove reference to quiet_p.
2605         (interp_set): Make static.  Remove dead "Switching to" output
2606         code.
2607         (interp_quiet_p, interp_set_quiet): Delete.
2608         (interpreter_exec_cmd): Don't set the interpreter quiet.
2609         * interps.h (interp_quiet_p): Make static.
2610         (class interp) <quiet_p>: Remove field
2611
2612 2017-02-08  Jerome Guitton  <guitton@adacore.com>
2613
2614         * cli/cli-decode.c (find_command_name_length): Make it extern.
2615         * cli/cli-decode.h (find_command_name_length): Declare.
2616         * cli/cli-script.c (command_name_equals, line_first_arg):
2617         New functions.
2618         (process_next_line): Use cli-decode to parse command names.
2619         (build_command_line): Make args a constant pointer.
2620
2621 2017-02-08  Jerome Guitton  <guitton@adacore.com>
2622
2623         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
2624         Remove case-insensitive search.
2625
2626 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
2627
2628         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
2629         at the end of the line.  Avoids an ARI warning.
2630
2631 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
2632
2633         * NEWS: Mention support for record/replay of Intel 64 rdrand and
2634         rdseed instructions.
2635         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
2636
2637 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
2638
2639         PR tdep/20936
2640         Provide and use sparc32 and sparc64 target description XML files.
2641         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
2642         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
2643         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
2644         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
2645         * features/sparc/sparc32-solaris.xml: New file.
2646         * features/sparc/sparc64-solaris.xml: New file.
2647         * features/sparc/sparc32-solaris.c: Generated.
2648         * features/sparc/sparc64-solaris.c: Generated.
2649         * sparc-tdep.h: Account for differences in target descriptions.
2650         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
2651         (sparc32_register_type): Use target provided registers.
2652         (validate_tdesc_registers): New function.
2653         (sparc32_gdbarch_init): Use tdesc_has_registers.
2654         Set pseudoregister functions.
2655         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
2656         (sparc64_register_type): Use target provided registers.
2657         (sparc64_init_abi): Set pseudoregister functions.
2658
2659 2017-02-03  Tom Tromey  <tom@tromey.com>
2660
2661         PR rust/21097:
2662         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
2663         with a single member.
2664
2665 2017-02-03  Pedro Alves  <palves@redhat.com>
2666
2667         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
2668         (cli_interp_base::~cli_interp_base): New.
2669         (cli_interp): New struct.
2670         (as_cli_interp): Cast the interp itself to cli_interp.
2671         (cli_interpreter_pre_command_loop): Rename to ...
2672         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
2673         parameter.
2674         (cli_interpreter_init): Rename to ...
2675         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
2676         boolean.  Make extern.
2677         (cli_interpreter_resume): Rename to ...
2678         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
2679         extern.
2680         (cli_interpreter_suspend): Rename to ...
2681         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
2682         extern.
2683         (cli_interpreter_exec): Rename to ...
2684         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
2685         extern.
2686         (cli_interpreter_supports_command_editing): Rename to ...
2687         (cli_interp_base::supports_command_editing): ... this.  Remove
2688         'interp' parameter.  Make extern.
2689         (cli_ui_out): Rename to ...
2690         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
2691         Make extern.
2692         (cli_set_logging): Rename to ...
2693         (cli_interp_base::set_logging): ... this.  Remove 'interp'
2694         parameter.  Make extern.
2695         (cli_interp_procs): Delete.
2696         (cli_interp_factory): Adjust to use "new".
2697         * cli/cli-interp.h: Include "interps.h".
2698         (struct cli_interp_base): New struct.
2699         * interps.c (struct interp): Delete.  Fields moved to interps.h.
2700         (interp_new): Delete.
2701         (interp::interp, interp::~interp): New.
2702         (interp_set): Use bool, and return void.  Assume the interpreter
2703         has suspend, init and resume methods, and that the all return
2704         void.
2705         (set_top_level_interpreter): interp_set returns void.
2706         (interp_ui_out): Adapt.
2707         (current_interp_set_logging): Adapt.
2708         (interp_data): Delete.
2709         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
2710         (interp_exec): Adapt.
2711         (top_level_interpreter_data): Delete.
2712         * interps.h (interp_init_ftype, interp_resume_ftype)
2713         (interp_suspend_ftype, interp_exec_ftype)
2714         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
2715         (class interp): New.
2716         (interp_new): Delete.
2717         (interp_set): Now returns void.  Use bool.
2718         (interp_data, top_level_interpreter_data): Delete.
2719         * mi/mi-common.h: Include interps.h.
2720         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
2721         init, resume, suspect, exec, interp_ui_out, set_logging and
2722         pre_command_loop methods.
2723         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
2724         (mi_interpreter_init): Rename to ...
2725         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
2726         bool, return void and make extern.  Adjust.
2727         (mi_interpreter_resume): ... Rename to ...
2728         (mi_interp::resume): ... this.  Remove the 'data' parameter,
2729         return void and make extern.  Adjust.
2730         (mi_interpreter_suspend): ... Rename to ...
2731         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
2732         return void and make extern.  Adjust.
2733         (mi_interpreter_exec): ... Rename to ...
2734         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
2735         extern.  Adjust.
2736         (mi_interpreter_pre_command_loop): ... Rename to ...
2737         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
2738         parameter and make extern.
2739         (mi_on_normal_stop_1): Adjust.
2740         (mi_ui_out): Rename to ...
2741         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
2742         parameter and make extern.  Adjust.
2743         (mi_set_logging): Rename to ...
2744         (mi_interp::set_logging): ... this.  Remove the 'interp'
2745         parameter and make extern.  Adjust.
2746         (mi_interp_procs): Delete.
2747         (mi_interp_factory): Adjust to use 'new'.
2748         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
2749         (mi_print_exception, mi_execute_command, mi_load_progress):
2750         Adjust.
2751         * tui/tui-interp.c (tui_interp): New class.
2752         (as_tui_interp): Return a tui_interp pointer.
2753         (tui_on_normal_stop, tui_on_signal_received)
2754         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
2755         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
2756         to use interp::interp_ui_out.
2757         (tui_init): Rename to ...
2758         (tui_interp::init): ... this.  Remove the 'self' parameter, use
2759         bool, return void and make extern.  Adjust.
2760         (tui_resume): Rename to ...
2761         (tui_interp::resume): ... this.  Remove the 'data' parameter,
2762         return void and make extern.  Adjust.
2763         (tui_suspend): Rename to ...
2764         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
2765         return void and make extern.  Adjust.
2766         (tui_ui_out): Rename to ...
2767         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
2768         parameter, and make extern.  Adjust.
2769         (tui_exec): Rename to ...
2770         (tui_interp::exec): ... this.  Remove the 'data' parameter and
2771         make extern.
2772         (tui_interp_procs): Delete.
2773         (tui_interp_factory): Use "new".
2774
2775 2017-02-02  Tom Tromey  <tom@tromey.com>
2776
2777         * rust-exp.y (ends_raw_string, space_then_number)
2778         (rust_identifier_start_p): Return bool.
2779         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
2780         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
2781         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
2782         (rust_chartype_p): Return bool.
2783         (val_print_struct, rust_print_struct_def, rust_print_type):
2784         Update.
2785         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
2786         Return bool.
2787
2788 2017-02-02  Tom Tromey  <tom@tromey.com>
2789
2790         * rust-lang.c: Reindent.
2791
2792 2017-02-02  Tom Tromey  <tom@tromey.com>
2793
2794         * rust-lang.h (rust_crate_for_block): Update.
2795         * rust-lang.c (rust_crate_for_block): Return std::string.
2796         (rust_get_disr_info): Use std:;string, not
2797         gdb::unique_xmalloc_ptr.
2798         * rust-exp.y (crate_name): Update.
2799
2800 2017-02-02  Pedro Alves  <palves@redhat.com>
2801
2802         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
2803         field out of gdb_disassembler_test and make it static.
2804
2805 2017-02-02  Pedro Alves  <palves@redhat.com>
2806
2807         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
2808         mi1_interp and mi_interp fields.
2809
2810 2017-02-02  Pedro Alves  <palves@redhat.com>
2811
2812         * cli/cli-interp.c (struct saved_output_files, saved_output):
2813         Moved from cli/cli-logging.c.
2814         (cli_set_logging): New function.
2815         (cli_interp_procs): Install cli_set_logging.
2816         * cli/cli-interp.h (make_logging_output, cli_set_logging):
2817         Declare.
2818         * cli/cli-logging.c (struct saved_output_files, saved_output):
2819         Moved to cli/cli-interp.c.
2820         (pop_output_files): Don't save outputs here.
2821         (make_logging_output): New function.
2822         (handle_redirections): Don't build tee nor save previous outputs
2823         here.
2824         * interps.c (current_interp_set_logging): Change prototype.
2825         Assume there's always a set_logging_proc method installed.
2826         * interps.h (interp_set_logging_ftype): Change prototype.
2827         (current_interp_set_logging): Change prototype and adjust comment.
2828         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
2829         use make_logging_output.
2830         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
2831 2017-02-02  Pedro Alves  <palves@redhat.com>
2832
2833         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
2834         from ...
2835         (set_logging_overwrite): ... here.
2836         (logging_no_redirect_file): Delete.
2837         (set_logging_redirect): Don't handle redirection on the fly.
2838         Instead warn that "logging off" / "logging on" is necessary.
2839         (pop_output_files): Delete references to logging_no_redirect_file.
2840         (show_logging_command): Always speak in terms of what will happen
2841         once logging is reenabled.
2842
2843 2017-02-02  Pedro Alves  <palves@redhat.com>
2844
2845         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
2846
2847 2017-02-02  Pedro Alves  <palves@redhat.com>
2848
2849         * disasm.c (gdb_pretty_print_insn): Rename to ...
2850         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
2851         Remove gdbarch parameter.  Adapt to clear the object's buffers
2852         instead of allocating new buffers, and to print using the object's
2853         gdb_disassembler instead of calling gdb_print_insn.
2854         (dump_insns): Use gdb_pretty_print_disassembler.
2855         * disasm.h (gdb_pretty_print_insn): Delete declaration.
2856         (gdb_pretty_print_disassembler): New class.
2857         * record-btrace.c (btrace_insn_history): Use
2858         gdb_pretty_print_disassembler.
2859
2860 2017-02-02  Pedro Alves  <palves@redhat.com>
2861
2862         * ada-lang.c (type_as_string): Use string_file.
2863         * ada-valprint.c (ada_print_floating): Use string_file.
2864         * ada-varobj.c (ada_varobj_scalar_image)
2865         (ada_varobj_get_value_image): Use string_file.
2866         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
2867         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
2868         * breakpoint.c (update_inserted_breakpoint_locations)
2869         (insert_breakpoint_locations, reattach_breakpoints)
2870         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
2871         (print_it_watchpoint): Use string_file.
2872         (save_breakpoints): Use stdio_file.
2873         * c-exp.y (oper): Use string_file.
2874         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
2875         tee_file.
2876         (pop_output_files): Use delete.
2877         (handle_redirections): Use stdio_file and tee_file.
2878         * cli/cli-setshow.c (do_show_command): Use string_file.
2879         * compile/compile-c-support.c (c_compute_program): Use
2880         string_file.
2881         * compile/compile-c-symbols.c (generate_vla_size): Take a
2882         'string_file &' instead of a 'ui_file *'.
2883         (generate_c_for_for_one_variable): Take a 'string_file &' instead
2884         of a 'ui_file *'.  Use string_file.
2885         (generate_c_for_variable_locations): Take a 'string_file &'
2886         instead of a 'ui_file *'.
2887         * compile/compile-internal.h (generate_c_for_for_one_variable):
2888         Take a 'string_file &' instead of a 'ui_file *'.
2889         * compile/compile-loc2c.c (push, pushf, unary, binary)
2890         (print_label, pushf_register_address, pushf_register)
2891         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
2892         'ui_file *'.  Adjust.
2893         * compile/compile.c (compile_to_object): Use string_file.
2894         * compile/compile.h (compile_dwarf_expr_to_c)
2895         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
2896         'ui_file *'.
2897         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
2898         (replace_typedefs_qualified_name): Use string_file and
2899         obstack_copy0.
2900         * disasm.c (gdb_pretty_print_insn): Use string_file.
2901         (gdb_disassembly): Adjust reference the null_stream global.
2902         (do_ui_file_delete): Delete.
2903         (gdb_insn_length): Use null_stream.
2904         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
2905         * dwarf2loc.c (dwarf2_compile_property_to_c)
2906         (locexpr_generate_c_location, loclist_generate_c_location): Take a
2907         'string_file &' instead of a 'ui_file *'.
2908         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
2909         * dwarf2read.c (do_ui_file_peek_last): Delete.
2910         (dwarf2_compute_name): Use string_file.
2911         * event-top.c (gdb_setup_readline): Use stdio_file.
2912         * gdbarch.sh (verify_gdbarch): Use string_file.
2913         * gdbtypes.c (safe_parse_type): Use null_stream.
2914         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
2915         string_file.
2916         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
2917         'string_file *' instead of a 'ui_file *'.
2918         (gdbscm_arch_disassemble): Use string_file.
2919         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
2920         * guile/scm-ports.c (class ioscm_file_port): Now a class that
2921         inherits from ui_file.
2922         (ioscm_file_port_delete, ioscm_file_port_rewind)
2923         (ioscm_file_port_put): Delete.
2924         (ioscm_file_port_write): Rename to ...
2925         (ioscm_file_port::write): ... this.  Remove file_port_magic
2926         checks.
2927         (ioscm_file_port_new): Delete.
2928         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
2929         ui_file_up.
2930         * guile/scm-type.c (tyscm_type_name): Use string_file.
2931         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
2932         Use string_file.
2933         * infcmd.c (print_return_value_1): Use string_file.
2934         * infrun.c (print_target_wait_results): Use string_file.
2935         * language.c (add_language): Use string_file.
2936         * location.c (explicit_to_string_internal): Use string_file.
2937         * main.c (captured_main_1): Use null_file.
2938         * maint.c (maintenance_print_architecture): Use stdio_file.
2939         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
2940         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
2941         event_channel>: Change type to mi_console_file pointer.
2942         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
2943         (mi_console_file_delete): Delete.
2944         (struct mi_console_file): Delete.
2945         (mi_console_file_magic): Delete.
2946         (mi_console_file_new): Delete.
2947         (mi_console_file::mi_console_file): New.
2948         (mi_console_file_delete): Delete.
2949         (mi_console_file_fputs): Delete.
2950         (mi_console_file::write): New.
2951         (mi_console_raw_packet): Delete.
2952         (mi_console_file::flush): New.
2953         (mi_console_file_flush): Delete.
2954         (mi_console_set_raw): Rename to ...
2955         (mi_console_file::set_raw): ... this.
2956         * mi/mi-console.h (class mi_console_file): New class.
2957         (mi_console_file_new, mi_console_set_raw): Delete.
2958         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
2959         (mi_set_logging): Use delete and tee_file.  Adjust.
2960         * mi/mi-main.c (output_register): Use string_file.
2961         (mi_cmd_data_evaluate_expression): Use string_file.
2962         (mi_cmd_data_read_memory): Use string_file.
2963         (mi_cmd_execute, print_variable_or_computed): Use string_file.
2964         * mi/mi-out.c (mi_ui_out::main_stream): New.
2965         (mi_ui_out::rewind): Use main_stream and
2966         string_file.
2967         (mi_ui_out::put): Use main_stream and string_file.
2968         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
2969         Allocate a 'string_file' instead.
2970         (mi_out_new): Don't allocate a mem_fileopen stream here.
2971         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
2972         (mi_ui_out::main_stream): Declare method.
2973         * printcmd.c (eval_command): Use string_file.
2974         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
2975         * python/py-arch.c (archpy_disassemble): Use string_file.
2976         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
2977         * python/py-frame.c (frapy_str): Use string_file.
2978         * python/py-framefilter.c (py_print_type, py_print_single_arg):
2979         Use string_file.
2980         * python/py-type.c (typy_str): Use string_file.
2981         * python/py-unwind.c (unwind_infopy_str): Use string_file.
2982         * python/py-value.c (valpy_str): Use string_file.
2983         * record-btrace.c (btrace_insn_history): Use string_file.
2984         * regcache.c (regcache_print): Use stdio_file.
2985         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
2986         * remote.c (escape_buffer): Use string_file.
2987         * rust-lang.c (rust_get_disr_info): Use string_file.
2988         * serial.c (serial_open_ops_1): Use stdio_file.
2989         (do_serial_close): Use delete.
2990         * stack.c (print_frame_arg): Use string_file.
2991         (print_frame_args): Remove local mem_fileopen stream, not used.
2992         (print_frame): Use string_file.
2993         * symmisc.c (maintenance_print_symbols): Use stdio_file.
2994         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2995         Take a 'string_file *' instead of a 'ui_file *'.
2996         * top.c (new_ui): Use stdio_file and stderr_file.
2997         (free_ui): Use delete.
2998         (execute_command_to_string): Use string_file.
2999         (quit_confirm): Use string_file.
3000         * tracepoint.c (collection_list::append_exp): Use string_file.
3001         * tui/tui-disasm.c (tui_disassemble): Use string_file.
3002         * tui/tui-file.c: Don't include "ui-file.h".
3003         (enum streamtype, struct tui_stream): Delete.
3004         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
3005         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
3006         (tui_file::tui_file): New method.
3007         (tui_file_fputs): Delete.
3008         (tui_file_get_strbuf): Delete.
3009         (tui_file::puts): New method.
3010         (tui_file_adjust_strbuf): Delete.
3011         (tui_file_flush): Delete.
3012         (tui_file::flush): New method.
3013         * tui/tui-file.h: Tweak intro comment.
3014         Include ui-file.h.
3015         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
3016         (tui_file_adjust_strbuf): Delete declarations.
3017         (class tui_file): New class.
3018         * tui/tui-io.c (tui_initialize_io): Use tui_file.
3019         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
3020         (tui_register_format): Use string_stream.
3021         * tui/tui-stack.c (tui_make_status_line): Use string_file.
3022         (tui_get_function_from_frame): Use string_file.
3023         * typeprint.c (type_to_string): Use string_file.
3024         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
3025         (null_stream): New global.
3026         (ui_file_delete): Delete.
3027         (ui_file::ui_file): New.
3028         (null_file_isatty): Delete.
3029         (ui_file::~ui_file): New.
3030         (null_file_rewind): Delete.
3031         (ui_file::printf): New.
3032         (null_file_put): Delete.
3033         (null_file_flush): Delete.
3034         (ui_file::putstr): New.
3035         (null_file_write): Delete.
3036         (ui_file::putstrn): New.
3037         (null_file_read): Delete.
3038         (ui_file::putc): New.
3039         (null_file_fputs): Delete.
3040         (null_file_write_async_safe): Delete.
3041         (ui_file::vprintf): New.
3042         (null_file_delete): Delete.
3043         (null_file::write): New.
3044         (null_file_fseek): Delete.
3045         (null_file::puts): New.
3046         (ui_file_data): Delete.
3047         (null_file::write_async_safe): New.
3048         (gdb_flush, ui_file_isatty): Adjust.
3049         (ui_file_put, ui_file_rewind): Delete.
3050         (ui_file_write): Adjust.
3051         (ui_file_write_for_put): Delete.
3052         (ui_file_write_async_safe, ui_file_read): Adjust.
3053         (ui_file_fseek): Delete.
3054         (fputs_unfiltered): Adjust.
3055         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
3056         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
3057         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
3058         (set_ui_file_data): Delete.
3059         (string_file::~string_file, string_file::write)
3060         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
3061         (do_ui_file_as_string, ui_file_as_string): Delete.
3062         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
3063         (struct mem_file): Delete.
3064         (mem_file_new): Delete.
3065         (stdio_file::stdio_file): New.
3066         (mem_file_delete): Delete.
3067         (stdio_file::stdio_file): New.
3068         (mem_fileopen): Delete.
3069         (stdio_file::~stdio_file): New.
3070         (mem_file_rewind): Delete.
3071         (stdio_file::set_stream): New.
3072         (mem_file_put): Delete.
3073         (stdio_file::open): New.
3074         (mem_file_write): Delete.
3075         (stdio_file_magic, struct stdio_file): Delete.
3076         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
3077         (stdio_file::flush): New.
3078         (stdio_file_read): Rename to ...
3079         (stdio_file::read): ... this.  Adjust.
3080         (stdio_file_write): Rename to ...
3081         (stdio_file::write): ... this.  Adjust.
3082         (stdio_file_write_async_safe): Rename to ...
3083         (stdio_file::write_async_safe) ... this.  Adjust.
3084         (stdio_file_fputs): Rename to ...
3085         (stdio_file::puts) ... this.  Adjust.
3086         (stdio_file_isatty): Delete.
3087         (stdio_file_fseek): Delete.
3088         (stdio_file::isatty): New.
3089         (stderr_file_write): Rename to ...
3090         (stderr_file::write) ... this.  Adjust.
3091         (stderr_file_fputs): Rename to ...
3092         (stderr_file::puts) ... this.  Adjust.
3093         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
3094         (stderr_file::stderr_file): New.
3095         (tee_file_magic): Delete.
3096         (struct tee_file): Delete.
3097         (tee_file::tee_file): New.
3098         (tee_file_new): Delete.
3099         (tee_file::~tee_file): New.
3100         (tee_file_delete): Delete.
3101         (tee_file_flush): Rename to ...
3102         (tee_file::flush): ... this.  Adjust.
3103         (tee_file_write): Rename to ...
3104         (tee_file::write): ... this.  Adjust.
3105         (tee_file::write_async_safe): New.
3106         (tee_file_fputs): Rename to ...
3107         (tee_file::puts): ... this.  Adjust.
3108         (tee_file_isatty): Rename to ...
3109         (tee_file::isatty): ... this.  Adjust.
3110         * ui-file.h (struct obstack, struct ui_file): Don't
3111         forward-declare.
3112         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
3113         (ui_file_write_ftype)
3114         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
3115         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
3116         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
3117         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
3118         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
3119         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
3120         (set_ui_file_fseek): Delete.
3121         (ui_file_data, ui_file_delete, ui_file_rewind)
3122         (struct ui_file): New.
3123         (ui_file_up): New.
3124         (class null_file): New.
3125         (null_stream): Declare.
3126         (ui_file_write_for_put, ui_file_put): Delete.
3127         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
3128         Delete.
3129         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
3130         (gdb_fopen, tee_file_new): Delete.
3131         (struct string_file): New.
3132         (struct stdio_file): New.
3133         (stdio_file_up): New.
3134         (struct stderr_file): New.
3135         (class tee_file): New.
3136         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
3137         of a 'ui_file *'.  Adjust.
3138         * ui-out.h (class ui_out) <field_stream>: Likewise.
3139         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
3140         (null_stream): Delete.
3141         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
3142         Adjust.
3143         * utils.h (struct ui_file): Delete forward declaration..
3144         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
3145         (error_stream): Take a 'string_file &' instead of a
3146         'ui_file *'.
3147         * varobj.c (varobj_value_get_print_value): Use string_file.
3148         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
3149         * gdbarch.c: Regenerate.
3150
3151 2017-02-02  Pedro Alves  <palves@redhat.com>
3152
3153         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
3154         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
3155         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
3156         Adjust to call gdb_print_insn instead of
3157         gdb_disassembler::print_insn.
3158         (dump_insns, do_mixed_source_and_assembly_deprecated)
3159         (do_mixed_source_and_assembly, do_assembly_only): Add back a
3160         'gdbarch' parameter.  Remove gdb_disassembler parameter.
3161         (gdb_disassembly): Don't allocate a gdb_disassembler here.
3162         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
3163         declaration.
3164         (gdb_pretty_print_insn): Re-add declaration.
3165         * record-btrace.c (btrace_insn_history): Don't allocate a
3166         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
3167
3168 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
3169
3170         * disasm.h (gdb_disassembly): Remove file_string parameter.
3171         * disasm.c (gdb_disassembly): Likewise.
3172         * cli/cli-cmds.c (print_disassembly): Adapt.
3173         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
3174         * stack.c (do_gdb_disassembly): Likewise.
3175
3176 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3177
3178         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
3179         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
3180         targets.  And if the implicit value is longer than needed, extract
3181         the first bytes instead of the "least significant" ones.
3182
3183 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
3184
3185         * btrace.c (btrace_enable): Do not call btrace_add_pc for
3186         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
3187         (btrace_fetch): Assert can_access_registers_ptid.
3188         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
3189         validate_registers_access.
3190
3191 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
3192
3193         * gdbthread.h (can_access_registers_ptid): New.
3194         * thread.c (can_access_registers_ptid): New.
3195
3196 2017-02-01  Pedro Alves  <palves@redhat.com>
3197
3198         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
3199
3200 2017-01-31  Pedro Alves  <palves@redhat.com>
3201
3202         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
3203         Fix typos.
3204
3205 2017-01-31  Pedro Alves  <palves@redhat.com>
3206
3207         * stack.c (print_frame_args): Remove local mem_fileopen stream,
3208         not used.
3209
3210 2017-01-31  Pedro Alves  <palves@redhat.com>
3211
3212         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
3213
3214 2017-01-31  Pedro Alves  <palves@redhat.com>
3215
3216         * common/scoped_restore.h
3217         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
3218         change the value's parameter type to T2.
3219         (make_scoped_restore): Likewise.
3220
3221 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3222             Richard Henderson  <rth@redhat.com>
3223
3224         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
3225         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
3226         GS_BASE for older kernels.
3227         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
3228         GS_BASE for older kernels.
3229         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
3230         and GS_BASE to the offset table.
3231         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
3232         system register group.
3233         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
3234         for older kernels.
3235         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
3236         amd64 ABI.
3237         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
3238         AMD64_GSBASE_REGNUM.
3239         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
3240         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
3241         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
3242         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
3243         i386/64bit-segments.xml in those rules.
3244         * features/i386/64bit-segments.xml: New file.
3245         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
3246         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
3247         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
3248         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
3249         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
3250         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
3251         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
3252         * features/i386/amd64-avx-linux.c: Regenerated.
3253         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
3254         * features/i386/amd64-avx-mpx.c: Regenerated.
3255         * features/i386/amd64-avx512-linux.c: Regenerated.
3256         * features/i386/amd64-linux.c: Regenerated.
3257         * features/i386/amd64-mpx-linux.c: Regenerated.
3258         * features/i386/i386-avx-mpx-linux.c: Regenerated.
3259         * features/i386/i386-avx-mpx.c: Regenerated.
3260         * features/i386/x32-avx-linux.c: Regenerated.
3261         * features/i386/x32-avx512-linux.c: Regenerated.
3262         * regformats/i386/amd64-avx-linux.dat: Regenerated.
3263         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
3264         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
3265         * regformats/i386/amd64-linux.dat: Regenerated.
3266         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
3267         * regformats/i386/x32-avx-linux.dat: Regenerated.
3268         * regformats/i386/x32-avx512-linux.dat: Regenerated.
3269         * regformats/i386/x32-linux.dat: Regenerated.
3270
3271 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3272
3273         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
3274         Set to AMD64_NUM_REGS.
3275
3276 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3277
3278         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
3279         that checks validity of a register number.
3280
3281 2017-01-27  Kees Cook  <keescook@google.com>
3282
3283         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
3284         fetch_fpregs if target has fpa registers.
3285         (arm_linux_store_inferior_registers): Call store_fpregs if target
3286         has fpa registers.
3287
3288 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3289
3290         * cris-tdep.c (cris_gdbarch_init): Remove check for
3291         info.byte_order and force it to BFD_ENDIAN_LITTLE.
3292
3293 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3294
3295         * corelow.c (get_core_register_section): Check for regset
3296         existence before checking for REGSET_VARIABLE_SIZE.
3297
3298 2017-01-26  Yao Qi  <yao.qi@linaro.org>
3299             Pedro Alves  <palves@redhat.com>
3300
3301         PR gdb/20939
3302         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
3303         call memory_error, save memaddr instead.
3304         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
3305         negative, cal memory_error.
3306         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
3307
3308 2017-01-26  Yao Qi  <yao.qi@linaro.org>
3309
3310         * disasm-selftests.c (memory_error_test): New function.
3311         (_initialize_disasm_selftests): Register memory_error_test.
3312
3313 2017-01-26  Yao Qi  <yao.qi@linaro.org>
3314
3315         * Makefile.in (SFILES): Add disasm-selftests.c and
3316         selftest-arch.c.
3317         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
3318         * disasm-selftests.c: New file.
3319         * selftest-arch.c: New file.
3320         * selftest-arch.h: New file.
3321
3322 2017-01-26  Yao Qi  <yao.qi@linaro.org>
3323
3324         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
3325         to bfd_arch_mep.  Don't return 0 if section is not
3326         found.  Call print_insn_mep.
3327
3328 2017-01-26  Pedro Alves  <palves@redhat.com>
3329             Yao Qi  <yao.qi@linaro.org>
3330
3331         * arm-tdep.c: Include "disasm.h".
3332         (gdb_print_insn_arm): Update code to get gdbarch.
3333         * disasm.c (dis_asm_read_memory): Change it to
3334         gdb_disassembler::dis_asm_read_memory.
3335         (dis_asm_memory_error): Likewise.
3336         (dis_asm_print_address): Likewise.
3337         (gdb_pretty_print_insn): Change it to
3338         gdb_disassembler::pretty_print_insn.
3339         (dump_insns): Add one argument gdb_disassemlber.  All
3340         callers updated.
3341         (do_mixed_source_and_assembly_deprecated): Likewise.
3342         (do_mixed_source_and_assembly): Likewise.
3343         (do_assembly_only): Likewise.
3344         (gdb_disassembler::gdb_disassembler): New.
3345         (gdb_disassembler::print_insn): New.
3346         * disasm.h (class gdb_disassembler): New.
3347         (gdb_pretty_print_insn): Remove declaration.
3348         (gdb_disassemble_info): Likewise.
3349         * guile/scm-disasm.c (class gdbscm_disassembler): New.
3350         (gdbscm_disasm_read_memory_worker): Update.
3351         (gdbscm_disasm_read_memory): Update.
3352         (gdbscm_disasm_memory_error): Remove.
3353         (gdbscm_disasm_print_address): Remove.
3354         (gdbscm_disassembler::gdbscm_disassembler): New.
3355         (gdbscm_print_insn_from_port): Update.
3356         * mips-tdep.c: Include disasm.h.
3357         (gdb_print_insn_mips): Update code to get gdbarch.
3358         * record-btrace.c (btrace_insn_history): Update.
3359         * spu-tdep.c: Include disasm.h.
3360         (struct spu_dis_asm_data): Remove.
3361         (struct spu_dis_asm_info): New.
3362         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
3363         SPU id.
3364         (gdb_print_insn_spu): Cast disassemble_info to
3365         spu_dis_asm_info.
3366
3367 2017-01-26  Yao Qi  <yao.qi@linaro.org>
3368
3369         * disasm.c (do_ui_file_delete): Delete.
3370         (gdb_insn_length): Move code creating stream to ...
3371         * utils.c (null_stream): ... here.  New function.
3372         * utils.h (null_stream): Declare.
3373
3374 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
3375
3376         * python/py-inferior.c (find_thread_object): Return directly
3377         from the loop.  Remove "found" variable.
3378
3379 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
3380
3381         GDB 7.12.1 released.
3382
3383 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
3384
3385         * python/py-function.c (fnpy_call): Reorder declarations to have
3386         the gdbpy_enter object declared first.
3387         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
3388
3389 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
3390
3391         PR python/21068
3392         * python/python-internal.h (PyMem_RawMalloc): Define for
3393         Python < 3.4.
3394         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
3395         PyMem_RawMalloc instead of PyMem_Malloc.
3396
3397 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
3398             Luis Machado  <lgustavo@codesourcery.com>
3399
3400         * NEWS (New commands): Mention flash-erase.
3401         (New MI commands): Mention target-flash-erase.
3402         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
3403         command.
3404         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
3405         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
3406         * target.c (flash_erase_command): New function.
3407         (initialize_targets): Add new flash-erase command.
3408         * target.h (flash_erase_command): New declaration.
3409
3410 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
3411
3412         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
3413         HAVE_SYS_PROCFS_H is defined.
3414
3415 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
3416
3417         * remote.c (struct cached_reg): Change data into a pointer.
3418         * (stop_reply_dtr): Free data pointers before deleting vector.
3419         (process_stop_reply): Likewise.
3420         (remote_parse_stop_reply): Allocate space for data
3421
3422 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
3423
3424         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
3425         MAX_REGISTER_SIZE.
3426         (amd64_pseudo_register_read_value): Likewise.
3427         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
3428         (store_register_using_P): Likewise.
3429         * regcache.c (regcache_xfer_part): Likewise.
3430
3431 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
3432
3433         Split real and pseudo registers.
3434         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
3435         (sparc32_pseudo_regnum): New enum.
3436         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
3437         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
3438         (SPARC32_CP0_REGISTERS): New macro.
3439         (sparc32_pseudo_register_name): New function.
3440         (sparc32_register_name): Use sparc32_pseudo_register_name.
3441         (sparc32_pseudo_register_type): New function.
3442         (sparc32_register_type): Use sparc32_pseudo_register_type.
3443         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
3444         pseudo register numbers.
3445         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
3446         (SPARC64_CP0_REGISTERS): New macro.
3447         (sparc64_pseudo_register_name): New function.
3448         (sparc64_register_name): Use sparc64_pseudo_register_name.
3449         (sparc64_pseudo_register_type): New function.
3450         (sparc64_register_type): Use sparc64_pseudo_register_type.
3451         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
3452         pseudo register numbers.
3453         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
3454         sparc64_store_arguments): Handle pseudo register numbers.
3455
3456 2017-01-13  Yao Qi  <yao.qi@linaro.org>
3457
3458         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
3459         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
3460         output.
3461         (getpkt_or_notif_sane_1): Likewise.
3462
3463 2017-01-13  Yao Qi  <yao.qi@linaro.org>
3464
3465         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
3466         of CC.  Pass "-x c++-header" instead of "-x c".
3467
3468 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
3469
3470         * remote.c (remote_can_async_p): Update comment.
3471
3472 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
3473
3474         * linux-nat.c (linux_nat_can_async_p): Update comment.
3475
3476 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
3477
3478         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
3479
3480 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
3481
3482         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
3483
3484 2017-01-10  Tom Tromey  <tom@tromey.com>
3485
3486         * python/py-type.c (typy_legacy_template_argument): Update.
3487         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
3488         ~demangle_parse_info): Declare new members.
3489         (cp_demangled_name_to_comp): Return unique_ptr.
3490         (cp_demangled_name_parse_free)
3491         (make_cleanup_cp_demangled_name_parse_free)
3492         (cp_new_demangle_parse_info): Remove.
3493         * cp-support.c (do_demangled_name_parse_free_cleanup)
3494         (make_cleanup_cp_demangled_name_parse_free): Remove.
3495         (inspect_type, cp_canonicalize_string_full)
3496         (cp_canonicalize_string): Update.
3497         (mangled_name_to_comp): Change return type.
3498         (cp_class_name_from_physname, method_name_from_physname)
3499         (cp_func_name, cp_remove_params): Update.
3500         * cp-name-parser.y (demangle_parse_info): New constructor, from
3501         cp_new_demangle_parse_info.
3502         (~demangle_parse_info): New destructor, from
3503         cp_demangled_name_parse_free.
3504         (cp_merge_demangle_parse_infos): Update.
3505         (cp_demangled_name_to_comp): Change return type.
3506
3507 2017-01-10  Tom Tromey  <tom@tromey.com>
3508
3509         * top.c (prevent_dont_repeat): Change return type.
3510         * python/python.c (execute_gdb_command): Use std::string.
3511         Update.
3512         * guile/guile.c (gdbscm_execute_gdb_command): Update.
3513         * command.h (prevent_dont_repeat): Change return type.
3514         * breakpoint.c (bpstat_do_actions_1): Update.
3515
3516 2017-01-10  Tom Tromey  <tom@tromey.com>
3517
3518         * value.h (scoped_value_mark::~scoped_value_mark): Call
3519         free_to_mark.
3520         (scoped_value_mark::free_to_mark): New method.
3521         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
3522         scoped_value_mark.
3523
3524 2017-01-10  Tom Tromey  <tom@tromey.com>
3525
3526         * python/py-value.c (valpy_dereference, valpy_referenced_value)
3527         (valpy_reference_value, valpy_const_value, valpy_get_address)
3528         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
3529         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
3530         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
3531         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
3532         scoped_value_mark.
3533         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
3534         * value.h (scoped_value_mark): New class.
3535
3536 2017-01-10  Tom Tromey  <tom@tromey.com>
3537
3538         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
3539         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
3540         * psymtab.c (discard_psymtabs_upto): Remove.
3541         (make_cleanup_discard_psymtabs): Remove.
3542         (struct psymtab_state): Remove.
3543
3544 2017-01-10  Tom Tromey  <tom@tromey.com>
3545
3546         * record-full.c (record_full_save_cleanups): Remove.
3547         (record_full_save): Use gdb::unlinker.
3548         * gcore.c (do_bfd_delete_cleanup): Remove.
3549         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
3550         cleanups.
3551         * dwarf2read.c (unlink_if_set): Remove.
3552         (write_psymtabs_to_index): Use gdb::unlinker.
3553         * common/gdb_unlinker.h: New file.
3554
3555 2017-01-10  Tom Tromey  <tom@tromey.com>
3556
3557         * windows-tdep.c (windows_xfer_shared_library): Update.
3558         * windows-nat.c (windows_make_so): Update.
3559         * utils.h (make_cleanup_bfd_unref): Remove.
3560         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
3561         * symfile.h (symfile_bfd_open)
3562         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
3563         * symfile.c (read_symbols, symbol_file_add)
3564         (separate_debug_file_exists): Update.
3565         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
3566         (generic_load, reread_symbols): Update.
3567         * symfile-mem.c (symbol_file_add_from_memory): Update.
3568         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
3569         (spu_symbol_file_add_from_memory): Update.
3570         * solist.h (struct target_so_ops) <bfd_open>: Return
3571         gdb_bfd_ref_ptr.
3572         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
3573         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
3574         gdb_bfd_ref_ptr.
3575         (solib_map_sections, reload_shared_libraries_1): Update.
3576         * solib-svr4.c (enable_break): Update.
3577         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
3578         * solib-frv.c (enable_break2): Update.
3579         * solib-dsbt.c (enable_break): Update.
3580         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
3581         gdb_bfd_ref_ptr.
3582         (darwin_solib_get_all_image_info_addr_at_init): Update.
3583         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
3584         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
3585         * record-full.c (record_full_save): Update.
3586         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
3587         * procfs.c (insert_dbx_link_bpt_in_file): Update.
3588         * minidebug.c (find_separate_debug_file_in_section): Return
3589         gdb_bfd_ref_ptr.
3590         * machoread.c (macho_add_oso_symfile): Change abfd to
3591         gdb_bfd_ref_ptr.
3592         (macho_symfile_read_all_oso): Update.
3593         (macho_check_dsym): Return gdb_bfd_ref_ptr.
3594         (macho_symfile_read): Update.
3595         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
3596         (jit_bfd_try_read_symtab): Update.
3597         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3598         (gdb_bfd_openw, gdb_bfd_openr_iovec)
3599         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
3600         gdb_bfd_ref_ptr.
3601         (gdb_bfd_ref_policy): New struct.
3602         (gdb_bfd_ref_ptr): New typedef.
3603         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3604         (gdb_bfd_openw, gdb_bfd_openr_iovec)
3605         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
3606         gdb_bfd_ref_ptr.
3607         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
3608         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
3609         (gcore_command): Update.
3610         * exec.c (exec_file_attach): Update.
3611         * elfread.c (elf_symfile_read): Update.
3612         * dwarf2read.c (dwarf2_get_dwz_file): Update.
3613         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
3614         (open_and_init_dwo_file): Update.
3615         (open_dwp_file): Return gdb_bfd_ref_ptr.
3616         (open_and_init_dwp_file): Update.
3617         * corelow.c (core_open): Update.
3618         * compile/compile-object-load.c (compile_object_load): Update.
3619         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
3620         * coffread.c (coff_symfile_read): Update.
3621         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
3622         gdb_bfd_ref_ptr.  Rename.
3623         (dump_bfd_file, restore_command): Update.
3624         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
3625         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
3626         (find_separate_debug_file_by_buildid): Update.
3627
3628 2017-01-10  Tom Tromey  <tom@tromey.com>
3629
3630         * common/gdb_ref_ptr.h: New file.
3631         * python/py-ref.h (struct gdbpy_ref_policy): New.
3632         (gdbpy_ref): Now a typedef.
3633
3634 2017-01-10  Tom Tromey  <tom@tromey.com>
3635
3636         * utils.h (make_cleanup_htab_delete): Don't declare.
3637         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
3638         Remove.
3639         * linespec.c (decode_compound_collector): Add constructor,
3640         destructor.
3641         (lookup_prefix_sym): Remove cleanup.
3642         (symtab_collector): Add constructor, destructor.
3643         (collect_symtabs_from_filename): Remove cleanup.
3644         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
3645         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3646         Use htab_up.
3647         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
3648         * dwarf2read.c (dw2_expand_symtabs_matching)
3649         (dw2_map_symbol_filenames, dwarf_decode_macros)
3650         (write_psymtabs_to_index): Use htab_up.
3651         * dwarf2loc.c (func_verify_no_selftailcall)
3652         (call_site_find_chain_1, func_verify_no_selftailcall)
3653         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
3654         std::vector, gdb::unique_xmalloc_ptr.
3655         (call_sitep): Remove typedef.
3656         (dwarf2_locexpr_baton_eval): Remove unused variable.
3657
3658 2017-01-10  Tom Tromey  <tom@tromey.com>
3659
3660         * python/python-internal.h (make_cleanup_py_decref)
3661         (make_cleanup_py_xdecref): Don't declare.
3662         * python/py-utils.c (py_decref, make_cleanup_py_decref)
3663         (py_xdecref, make_cleanup_py_xdecref): Remove.
3664
3665 2017-01-10  Tom Tromey  <tom@tromey.com>
3666
3667         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
3668         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
3669
3670 2017-01-10  Tom Tromey  <tom@tromey.com>
3671
3672         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
3673
3674 2017-01-10  Tom Tromey  <tom@tromey.com>
3675
3676         * python/py-utils.c (unicode_to_encoded_string)
3677         (python_string_to_target_string)
3678         (python_string_to_target_python_string)
3679         (python_string_to_host_string, gdbpy_obj_to_string)
3680         (get_addr_from_python): Use gdbpy_ref.
3681
3682 2017-01-10  Tom Tromey  <tom@tromey.com>
3683
3684         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
3685         gdbpy_ref.
3686
3687 2017-01-10  Tom Tromey  <tom@tromey.com>
3688
3689         * python/python.c (eval_python_command, gdbpy_decode_line)
3690         (gdbpy_run_events, gdbpy_start_type_printers)
3691         (gdbpy_apply_type_printers): Use gdbpy_ref.
3692
3693 2017-01-10  Tom Tromey  <tom@tromey.com>
3694
3695         * python/py-param.c (get_doc_string, compute_enum_values): Use
3696         gdbpy_ref.
3697
3698 2017-01-10  Tom Tromey  <tom@tromey.com>
3699
3700         * python/py-inferior.c (find_thread_object, build_inferior_list):
3701         Use gdbpy_ref.
3702
3703 2017-01-10  Tom Tromey  <tom@tromey.com>
3704
3705         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
3706
3707 2017-01-10  Tom Tromey  <tom@tromey.com>
3708
3709         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
3710         gdbpy_ref.
3711
3712 2017-01-10  Tom Tromey  <tom@tromey.com>
3713
3714         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
3715         extra incref.
3716         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
3717         Use gdbpy_ref.
3718
3719 2017-01-10  Tom Tromey  <tom@tromey.com>
3720
3721         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
3722         gdbpy_ref.
3723
3724 2017-01-10  Tom Tromey  <tom@tromey.com>
3725
3726         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
3727         decref results of PyArg_ParseTupleAndKeywords.
3728
3729 2017-01-10  Tom Tromey  <tom@tromey.com>
3730
3731         * python/python.c (python_run_simple_file): Use
3732         unique_xmalloc_ptr, gdbpy_ref.
3733
3734 2017-01-10  Tom Tromey  <tom@tromey.com>
3735
3736         * python/py-prettyprint.c (print_stack_unless_memory_error)
3737         (print_string_repr, print_children): Use gdbpy_ref.
3738         (dummy_python_frame): New class.
3739         (dummy_python_frame::dummy_python_frame): Rename from
3740         push_dummy_python_frame.
3741         (py_restore_tstate): Remove.
3742
3743 2017-01-10  Tom Tromey  <tom@tromey.com>
3744
3745         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
3746
3747 2017-01-10  Tom Tromey  <tom@tromey.com>
3748
3749         * python/python.c (ensure_python_env, restore_python_env):
3750         Remove.
3751         * python/python-internal.h (ensure_python_env): Don't declare.
3752         * varobj.h (varobj_ensure_python_env): Don't declare.
3753         * varobj.c (varobj_ensure_python_env): Remove.
3754
3755 2017-01-10  Tom Tromey  <tom@tromey.com>
3756
3757         * varobj.c (varobj_value_get_print_value): Use
3758         gdbpy_enter_varobj.
3759
3760 2017-01-10  Tom Tromey  <tom@tromey.com>
3761
3762         * python/py-prettyprint.c (print_string_repr, print_children):
3763         Update.
3764         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
3765         of "encoding".
3766         * varobj.c (varobj_value_get_print_value): Update.
3767         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
3768
3769 2017-01-10  Tom Tromey  <tom@tromey.com>
3770
3771         * varobj.c (varobj_get_display_hint)
3772         (dynamic_varobj_has_child_method, install_new_value_visualizer)
3773         (varobj_set_visualizer, free_variable): Use
3774         gdbpy_enter_varobj.
3775
3776 2017-01-10  Tom Tromey  <tom@tromey.com>
3777
3778         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
3779         (do_finish_initialization): New function.  Use gdbpy_ref.
3780         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
3781         do_finish_initialization.
3782
3783 2017-01-10  Tom Tromey  <tom@tromey.com>
3784
3785         * python/py-param.c (get_set_value, get_show_value): Use
3786         gdbpy_enter, gdbpy_ref.
3787
3788 2017-01-10  Tom Tromey  <tom@tromey.com>
3789
3790         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
3791
3792 2017-01-10  Tom Tromey  <tom@tromey.com>
3793
3794         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
3795
3796 2017-01-10  Tom Tromey  <tom@tromey.com>
3797
3798         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
3799         Use gdbpy_enter_varobj.
3800
3801 2017-01-10  Tom Tromey  <tom@tromey.com>
3802
3803         * varobj.c (gdbpy_enter_varobj): New constructor.
3804         * python/python-internal.h (gdbpy_enter_varobj): New class.
3805         * python/py-varobj.c (py_varobj_get_iterator): Use
3806         gdbpy_enter_varobj.
3807
3808 2017-01-10  Tom Tromey  <tom@tromey.com>
3809
3810         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
3811         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
3812         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
3813         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
3814         unique_xmalloc_ptr.
3815         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
3816
3817 2017-01-10  Tom Tromey  <tom@tromey.com>
3818
3819         * python/py-xmethods.c (invoke_match_method): Use
3820         gdbpy_ref.
3821
3822 2017-01-10  Tom Tromey  <tom@tromey.com>
3823
3824         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
3825         gdbpy_enter, gdbpy_ref.
3826
3827 2017-01-10  Tom Tromey  <tom@tromey.com>
3828
3829         * python/python.c (python_interactive_command): Use gdbpy_enter.
3830
3831 2017-01-10  Tom Tromey  <tom@tromey.com>
3832
3833         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
3834         gdbpy_ref.
3835
3836 2017-01-10  Tom Tromey  <tom@tromey.com>
3837
3838         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
3839         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
3840
3841 2017-01-10  Tom Tromey  <tom@tromey.com>
3842
3843         * utils.h (htab_deleter): New struct.
3844         (htab_up): New typedef.
3845         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
3846         gdbpy_enter, gdbpy_ref, htab_up.
3847
3848 2017-01-10  Tom Tromey  <tom@tromey.com>
3849
3850         * python/py-unwind.c (pending_frame_invalidate): Remove.
3851         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
3852
3853 2017-01-10  Tom Tromey  <tom@tromey.com>
3854
3855         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
3856         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
3857
3858 2017-01-10  Tom Tromey  <tom@tromey.com>
3859
3860         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
3861
3862 2017-01-10  Tom Tromey  <tom@tromey.com>
3863
3864         * python/python.c (gdbpy_eval_from_control_command)
3865         (gdbpy_source_script, gdbpy_run_events)
3866         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
3867         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
3868         gdbpy_enter.
3869
3870 2017-01-10  Tom Tromey  <tom@tromey.com>
3871
3872         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
3873
3874 2017-01-10  Tom Tromey  <tom@tromey.com>
3875
3876         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
3877
3878 2017-01-10  Tom Tromey  <tom@tromey.com>
3879
3880         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
3881         (python_on_inferior_call_pre, python_on_inferior_call_post)
3882         (python_on_memory_change, python_on_register_change)
3883         (python_inferior_exit, python_new_objfile, add_thread_object)
3884         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
3885
3886 2017-01-10  Tom Tromey  <tom@tromey.com>
3887
3888         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
3889         (bpfinishpy_handle_exit): Use gdbpy_enter.
3890
3891 2017-01-10  Tom Tromey  <tom@tromey.com>
3892
3893         * python/py-cmd.c (cmdpy_destroyer)
3894         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
3895         gdbpy_enter.
3896
3897 2017-01-10  Tom Tromey  <tom@tromey.com>
3898
3899         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
3900         gdbpy_enter.
3901         (gdbpy_breakpoint_has_cond): Likewise.
3902
3903 2017-01-10  Tom Tromey  <tom@tromey.com>
3904
3905         * python/python.c (gdbpy_enter): New constructor.
3906         (~gdbpy_enter): New destructor.
3907         (restore_python_env, ensure_python_env): Rewrite.
3908         * python/python-internal.h (gdbpy_enter): New class.
3909
3910 2017-01-10  Tom Tromey  <tom@tromey.com>
3911
3912         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
3913
3914 2017-01-10  Tom Tromey  <tom@tromey.com>
3915
3916         * python/py-value.c (value_has_field, get_field_flag)
3917         (get_field_type, valpy_getitem, convert_value_from_python): Use
3918         gdbpy_ref.
3919
3920 2017-01-10  Tom Tromey  <tom@tromey.com>
3921
3922         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
3923         gdbpy_ref.
3924
3925 2017-01-10  Tom Tromey  <tom@tromey.com>
3926
3927         * python/py-prettyprint.c (search_pp_list)
3928         (find_pretty_printer_from_objfiles)
3929         (find_pretty_printer_from_progspace)
3930         (find_pretty_printer_from_gdb, find_pretty_printer)
3931         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
3932         gdbpy_ref.
3933
3934 2017-01-10  Tom Tromey  <tom@tromey.com>
3935
3936         * python/py-param.c (call_doc_function): Use gdbpy_ref.
3937
3938 2017-01-10  Tom Tromey  <tom@tromey.com>
3939
3940         * python/py-linetable.c (build_line_table_tuple_from_pcs)
3941         (ltpy_get_all_source_lines): Use gdbpy_ref.
3942
3943 2017-01-10  Tom Tromey  <tom@tromey.com>
3944
3945         * python/py-framefilter.c (extract_sym, extract_value)
3946         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
3947         gdbpy_ref.
3948
3949 2017-01-10  Tom Tromey  <tom@tromey.com>
3950
3951         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
3952
3953 2017-01-10  Tom Tromey  <tom@tromey.com>
3954
3955         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
3956
3957 2017-01-10  Tom Tromey  <tom@tromey.com>
3958
3959         * python/py-function.c (convert_values_to_python, fnpy_init): Use
3960         gdbpy_ref.
3961
3962 2017-01-10  Tom Tromey  <tom@tromey.com>
3963
3964         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
3965
3966 2017-01-10  Tom Tromey  <tom@tromey.com>
3967
3968         * python/py-type.c (convert_field, make_fielditem, typy_fields)
3969         (typy_range): Use gdbpy_ref.
3970
3971 2017-01-10  Tom Tromey  <tom@tromey.com>
3972
3973         * python/py-threadevent.c (create_thread_event_object): Use
3974         gdbpy_ref.
3975         * python/py-stopevent.c (create_stop_event_object): Simplify.
3976         (emit_stop_event): Use gdbpy_ref.
3977         * python/py-signalevent.c (create_signal_event_object): Use
3978         gdbpy_ref.
3979         * python/py-newobjfileevent.c (create_new_objfile_event_object)
3980         (emit_new_objfile_event, create_clear_objfiles_event_object)
3981         (emit_clear_objfiles_event): Use gdbpy_ref.
3982         * python/py-infevents.c (create_inferior_call_event_object)
3983         (create_register_changed_event_object)
3984         (create_memory_changed_event_object, emit_inferior_call_event)
3985         (emit_memory_changed_event, emit_register_changed_event): Use
3986         gdbpy_ref.
3987         * python/py-exitedevent.c (create_exited_event_object)
3988         (emit_exited_event): Use gdbpy_ref.
3989         * python/py-event.h (evpy_emit_event): Remove
3990         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
3991         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
3992         * python/py-continueevent.c (emit_continue_event): Use
3993         gdbpy_ref.
3994         * python/py-breakpoint.c (gdbpy_breakpoint_created)
3995         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
3996         gdbpy_ref.
3997         * python/py-bpevent.c (create_breakpoint_event_object): Use
3998         gdbpy_ref.
3999
4000 2017-01-10  Tom Tromey  <tom@tromey.com>
4001
4002         * python/py-ref.h: New file.
4003
4004 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
4005
4006         * cli-out.c (cli_ui_out::do_redirect): Change return type to
4007         void.
4008         * cli-out.h (cli_ui_out::do_redirect): Likewise.
4009         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
4010         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
4011         * ui-out.c (ui_out::redirect): Likewise.
4012         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
4013         * cli/cli-logging.c (set_logging_redirect): Update call site of
4014         ui_out::redirect.
4015         (handle_redirections): Likewise.
4016         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
4017         * top.c (execute_command_to_string): Likewise.
4018         * utils.c (do_ui_out_redirect_pop): Likewise.
4019
4020 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
4021
4022         * stack.c (_initialize_stack): Update "frame" command help message.
4023
4024 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
4025
4026         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
4027
4028 2017-01-06  Yao Qi  <yao.qi@linaro.org>
4029
4030         * x86-linux-nat.h: Include gdb_proc_service.h.
4031
4032 2017-01-06  Yao Qi  <yao.qi@linaro.org>
4033
4034         * ser-base.h: Include serial.h.
4035
4036 2017-01-06  Yao Qi  <yao.qi@linaro.org>
4037
4038         * ppc-linux-tdep.h: Include ppc-tdep.h.
4039
4040 2017-01-06  Yao Qi  <yao.qi@linaro.org>
4041
4042         * nat/amd64-linux-siginfo.h: Include signal.h.
4043
4044 2017-01-06  Yao Qi  <yao.qi@linaro.org>
4045
4046         * nat/aarch64-linux-hw-point.h: Include break-common.h.
4047
4048 2017-01-06  Yao Qi  <yao.qi@linaro.org>
4049
4050         * mi/mi-parse.h: Include mi-cmds.h.
4051
4052 2017-01-06  Yao Qi  <yao.qi@linaro.org>
4053
4054         * inf-loop.c: Don't include "target.h".
4055         * inf-loop.h: Include it here.
4056
4057 2017-01-06  Yao Qi  <yao.qi@linaro.org>
4058
4059         * dfp.h: Include "dboulest.h" and "expression.h".
4060
4061 2017-01-06  Yao Qi  <yao.qi@linaro.org>
4062
4063         * ax-gdb.h: Include "ax.h".
4064
4065 2017-01-06  Yao Qi  <yao.qi@linaro.org>
4066
4067         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
4068         with nat/gdb_ptrace.h.
4069
4070 2017-01-05  Yao Qi  <yao.qi@linaro.org>
4071
4072         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
4073         new line.
4074         (mips64_fbsd_sigframe_init): Likewise.
4075
4076 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
4077
4078         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
4079         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
4080
4081 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
4082
4083         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4084         * NEWS: Mention new FreeBSD/mips native configuration.
4085         * config/mips/fbsd.mh: New file.
4086         * configure.host: Add mips*-*-freebsd*.
4087         * mips-fbsd-nat.c: New file.
4088
4089 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
4090
4091         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
4092         (ALLDEPFILES): Add mips-fbsd-tdep.c.
4093         * NEWS: Mention new FreeBSD/mips target.
4094         * configure.tgt: Add mips*-*-freebsd*.
4095         * mips-fbsd-tdep.c: New file.
4096         * mips-fbsd-tdep.h: New file.
4097
4098 2017-01-04  Yao Qi  <yao.qi@linaro.org>
4099
4100         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
4101         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
4102
4103 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
4104
4105         Update copyright year range in all GDB files.
4106
4107 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
4108
4109         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
4110
4111 For older changes see ChangeLog-2016.
4112 \f
4113 Local Variables:
4114 mode: change-log
4115 left-margin: 8
4116 fill-column: 74
4117 version-control: never
4118 coding: utf-8
4119 End: