8ccd7a4b5369cd7ce02972911a49fa282c582dba
[external/binutils.git] / gdb / ChangeLog
1 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4         address when op is DW_OP_addr.
5
6 2017-07-09  Tom Tromey  <tom@tromey.com>
7
8         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9         check and apply to outer type.
10
11 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
12
13         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
14         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
15         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
16         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
17
18 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
19
20         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
21
22 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
23
24         * corelow.c (get_core_siginfo): Remove.
25         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
26         instead of get_core_siginfo.
27         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
28         * gdbarch.h: Re-generate.
29         * gdbarch.c: Re-generate.
30         * linux-tdep.c (linux_core_xfer_siginfo): New.
31         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
32
33 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
34
35         * corelow.c (thread_section_name): Move to ...
36         * gdbcore.h (thread_section_name): ... here.
37
38 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
39
40         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
41         (struct siginfo32): New.
42         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
43         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
44         via ptrace(PT_LWPINFO).
45
46 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
47
48         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
49         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
50         (fbsd_get_siginfo_type): New.
51         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
52         (_initialize_fbsd_tdep): New.
53
54 2017-07-06  David Blaikie  <dblaikie@gmail.com>
55
56         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
57         a singular dwo_unit*) to support multiple CUs in the same way that
58         multiple TUs are supported.
59         (create_cus_hash_table): Replace create_dwo_cu with a function for
60         parsing multiple CUs from a DWO file.
61         (open_and_init_dwo_file): Use create_cus_hash_table rather than
62         create_dwo_cu.
63         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
64         htab_find, rather than comparing the signature to a singleton CU in
65         the dwo_file.
66
67 2017-07-06  Pedro Alves  <palves@redhat.com>
68
69         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
70
71 2017-07-04  Pedro Alves  <palves@redhat.com>
72
73         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
74         * gdbtypes.h (TYPE_STATIC): Delete.
75         (struct fn_field) <is_public, is_abstract, is_static, is_final,
76         is_synchronized, is_native>: Delete.
77         <dummy>: Bump.
78         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
79         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
80         (TYPE_FN_FIELD_ABSTRACT): Delete.
81
82 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
83
84         * buffer.h (buffer_finish): Fix spelling mistakes.
85
86 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
87
88         * .dir-locals.el: Automatically switch to C-style comments in
89         versions of Emacs that support the feature.
90
91 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
92             Pedro Alves  <palves@redhat.com>
93
94         PR cli/21688
95         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
96         (process_next_line): New variable 'inline_cmd'.
97         Adjust 'if' clauses for "python", "compile" and "guile" to use
98         'command_name_equals' and check for '!inline_cmd'.
99
100 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
101
102         PR cli/21688
103         * cli/cli-script.c (command_name_equals_not_inline): New function.
104         (process_next_line): Adjust 'if' clauses for "python", "compile"
105         and "guile" to use command_name_equals_not_inline.
106
107 2017-06-29  Pedro Alves  <palves@redhat.com>
108
109         * completer.c (expression_completer): Call
110         linespec_location_completer instead of location_completer.
111
112 2017-06-29  Pedro Alves  <palves@redhat.com>
113
114         * completer.c (expression_completer): Remove code that recomputes
115         'text' from 'word'.
116
117 2017-06-29  Yao Qi  <yao.qi@linaro.org>
118
119         * regformats/regdat.sh: Generate code with
120         "ifndef IN_PROCESS_AGENT".
121
122 2017-06-28  Pedro Alves  <palves@redhat.com>
123
124         * command.h: Include "common/scoped_restore.h".
125
126 2017-06-28  Yao Qi  <yao.qi@linaro.org>
127
128         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
129         instead of obstack_grow.
130
131 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
132
133         PR gdb/21337
134         * symfile.c (reread_symbols): Call objfiles_changed just before
135         read_symbols.
136
137 2017-06-27  Pedro Alves  <palves@redhat.com>
138
139         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
140         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
141         (completion_list_add_symbol, completion_list_add_msymbol):
142         ... these new functions.
143         (add_symtab_completions)
144         (default_make_symbol_completion_list_break_on_1): Adjust.
145
146 2017-06-27  Pedro Alves  <palves@redhat.com>
147
148         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
149         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
150         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
151         dtor.
152         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
153         'storage_obstack' field an auto_obstack.  In-class initialize all
154         non-bitfield fields.  Make minsyms_read bool.
155         * symfile.c (read_symbols): Adjust.
156
157 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
158
159         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
160         (gdbsim_store_register): Likewise.
161
162 2017-06-27  Pedro Alves  <palves@redhat.com>
163
164         * c-exp.y (name_obstack): Now an auto_obstack.
165         (yylex): Use auto_obstack::clear.
166         (c_parse): Use auto_obstack::clear instead of reinitializing and
167         freeing the obstack.
168         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
169         * d-exp.y (name_obstack): Now an auto_obstack.
170         (yylex): Use auto_obstack::clear.
171         (d_parse): Use auto_obstack::clear instead of reinitializing and
172         freeing the obstack.
173         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
174         auto_obstack.
175         * dwarf2read.c (create_addrmap_from_index)
176         (dwarf2_build_psymtabs_hard)
177         (update_enumeration_type_from_children): Likewise.
178         * gdb_obstack.h (auto_obstack): New type.
179         * go-exp.y (name_obstack): Now an auto_obstack.
180         (build_packaged_name): Use auto_obstack::clear.
181         (go_parse): Use auto_obstack::clear instead of reinitializing and
182         freeing the obstack.
183         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
184         auto_obstack.
185         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
186         * rust-exp.y (work_obstack): Now an auto_obstack.
187         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
188         reinitializing and freeing the obstack.
189         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
190         (host_char_to_target): Use auto_obstack.
191         * utils.h (make_cleanup_obstack_free): Delete declaration.
192         * valprint.c (generic_emit_char, generic_printstr): Use
193         auto_obstack.
194
195 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
196
197         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
198         thread.
199         (darwin_init_thread_list): Don't update dummy thread.
200         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
201
202 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
203
204         * record-full.c (netorder16): Remove.
205
206 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
207
208         * common/diagnostics.h: Define macros for GCC.
209         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
210         * common/vec.h: Include diagnostics.h.
211         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
212         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
213         warning.
214
215 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
216
217         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
218         New macro.
219         * ada-lex.l: Ignore deprecated register warnings.
220
221 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
222
223         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
224         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
225
226 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
227
228         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
229         its own line.
230
231 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
232
233         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
234
235 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
236
237         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
238         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
239         (xtensa_register_read_masked): Likewise.
240
241 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
242
243         * common/environ.c (gdb_environ::unset): Update comment.
244
245 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
246
247         * python/py-unwind.c (pyuw_sniffer): Allocate space for
248         registers.
249
250 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
251
252         * record-full.c (record_full_exec_insn): Use byte_vector.
253
254 2017-06-22  Yao Qi  <yao.qi@linaro.org>
255
256         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
257         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
258
259 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
260
261         * remote.c (cached_reg): Move from here...
262         * regcache.h (cached_reg): ...to here.
263         * python/py-unwind.c (struct reg_info): Remove.
264         (cached_frame_info): Use cached_reg_t.
265         (pyuw_prev_register): Likewise.
266         (pyuw_sniffer): Use cached_reg_t and allocate registers.
267         (pyuw_dealloc_cache): Free all registers.
268
269 2017-06-22  Pedro Alves  <palves@redhat.com>
270             Simon Marchi  <simon.marchi@ericsson.com>
271
272         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
273         warning.
274         * common/diagnostics.h: New file.
275
276 2017-06-22  Pedro Alves  <palves@redhat.com>
277
278         * common/agent.h: Add include guards.
279
280 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
281
282         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
283         talk about addressable units instead of bytes.
284
285 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
286
287         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
288         of '::const_iterator'.
289
290 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
291
292         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
293         'unittests/environ-selftests.c'.
294         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
295         * charset.c (find_charset_names): Declare object 'iconv_env'.
296         Update code to use 'iconv_env' object.  Remove call to
297         'free_environ'.
298         * common/environ.c: Include <utility>.
299         (make_environ): Delete function.
300         (free_environ): Delete function.
301         (gdb_environ::clear): New function.
302         (gdb_environ::operator=): New function.
303         (gdb_environ::get): Likewise.
304         (environ_vector): Delete function.
305         (set_in_environ): Delete function.
306         (gdb_environ::set): New function.
307         (unset_in_environ): Delete function.
308         (gdb_environ::unset): New function.
309         (gdb_environ::envp): Likewise.
310         * common/environ.h: Include <vector>.
311         (struct gdb_environ): Delete; transform into...
312         (class gdb_environ): ... this class.
313         (free_environ): Delete prototype.
314         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
315         environ_vector): Likewise.
316         * infcmd.c (run_command_1): Update code to call
317         'envp' from 'gdb_environ' class.
318         (environment_info): Update code to call methods from 'gdb_environ'
319         class.
320         (unset_environment_command): Likewise.
321         (path_info): Likewise.
322         (path_command): Likewise.
323         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
324         (inferior::inferior): Initialize 'environment' using the host's
325         information.
326         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
327         Include "environ.h".
328         (class inferior) <environment>: Change type from 'struct
329         gdb_environ' to 'gdb_environ'.
330         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
331         methods from 'gdb_environ' class.
332         * solib.c (solib_find_1): Likewise
333         * unittests/environ-selftests.c: New file.
334
335 2017-06-20  Yao Qi  <yao.qi@linaro.org>
336
337         * features/i386/i386-linux.xml: Exchange the order of including
338         32bit-linux.xml and 32bit-sse.xml.
339         * features/i386/i386-linux.c: Regenerated.
340
341 2017-06-20  Yao Qi  <yao.qi@linaro.org>
342
343         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
344         Delete copy ctor and assignment operator.
345         (tdesc_type): Likewise.
346         (tdesc_feature): Likewise.
347         (tdesc_free_reg): Remove.
348         (tdesc_create_reg): Use new.
349         (tdesc_free_type): Remove.
350         (tdesc_create_vector): Use new.
351         (tdesc_create_union): Likewise.
352         (tdesc_create_flags): Likewise.
353         (tdesc_create_enum): Likewise.
354         (tdesc_free_feature): Delete.
355         (free_target_description): Use delete.
356
357 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
358
359         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
360         registers.
361
362 2017-06-19  Pedro Alves  <palves@redhat.com>
363
364         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
365         after gdb::unlinker.
366
367 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
368
369         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
370         gdb_environ to access an environment variable.
371
372 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
373
374         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
375         gdb_byte*.
376
377 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
378
379         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
380
381 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
382
383         * configure: Re-generate.
384         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
385
386 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
387
388         * configure: Re-generate.
389         * warning.m4: Pass -Werror to compiler when checking for
390         supported warning flags.
391
392 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
393
394         * Makefile.in (COMPILE.pre): Add "-x c++".
395
396 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
397             Pedro Alves  <palves@redhat.com>
398             Yao Qi  <yao.qi@linaro.org>
399
400         * defs.h (RequireLongest): New.
401         (extract_integer): Declare function template.
402         (extract_signed_integer): Remove the declaration, but define it
403         static inline.
404         (extract_unsigned_integer): Likewise.
405         (store_integer): Declare function template.
406         (store_signed_integer): Remove the declaration, but define it
407         static inline.
408         (store_unsigned_integer): Likewise.
409         * findvar.c (extract_integer): New function template.
410         (extract_signed_integer): Remove.
411         (extract_unsigned_integer): Remove.
412         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
413         instantiations.
414         (store_integer): New function template.
415         (store_signed_integer): Remove.
416         (store_unsigned_integer): Remove.
417         (store_integer): Explicit instantiations.
418         * regcache.c (regcache_raw_read_signed): Update.
419         (regcache::raw_read): New function.
420         (regcache::raw_read_signed): Remove.
421         (regcache::raw_read_unsigned): Remove.
422         (regcache_raw_read_unsigned): Update.
423         (regcache_raw_write_unsigned): Update.
424         (regcache::raw_write_signed): Remove.
425         (regcache::raw_write): New function.
426         (regcache_cooked_read_signed): Update.
427         (regcache::raw_write_unsigned): Remove.
428         (regcache::cooked_read_signed): Remove.
429         (regcache_cooked_read_unsigned): Update.
430         (regcache::cooked_read_unsigned): Remove.
431         (regcache_cooked_write_signed): Update.
432         (regcache_cooked_write_unsigned): Update.
433         * regcache.h (regcache) <raw_read_signed>: Remove.
434         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
435         <raw_read, raw_write>: New.
436         <cooked_read_signed, cooked_write_signed>: Remove.
437         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
438         <cooked_read, cooked_write>: New.
439         * sh64-tdep.c (sh64_pseudo_register_read): Update.
440         (sh64_pseudo_register_write): Update.
441
442 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
443
444         * arc-tdep.c (arc_disassembler_options): New variable.
445         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
446         of default_print_insn.
447         (arc_delayed_print_insn): Set info->section when needed,
448         use default_print_insn to retrieve a disassembler.
449
450 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
451
452         PR gdb/21574
453         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
454         to mention $SHELL and startup-with-shell.
455
456 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
457
458         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
459
460 2017-06-14  Yao Qi  <yao.qi@linaro.org>
461
462         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
463         default_print_insn instead of print_insn_aarch64.
464         * arm-tdep.c (gdb_print_insn_arm): Call
465         default_print_insn instead of print_insn_big_arm
466         and print_insn_little_arm.
467         * i386-tdep.c (i386_print_insn): Call default_print_insn
468         instead of print_insn_i386.
469         * ia64-tdep.c (ia64_print_insn): Call
470         default_print_insn instead of print_insn_ia64.
471         * mips-tdep.c (gdb_print_insn_mips): Call
472         default_print_insn instead of print_insn_big_mips
473         and print_insn_little_mips.
474         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
475         instead of print_insn_spu.
476
477 2017-06-14  Pedro Alves  <palves@redhat.com>
478
479         * ada-lang.c: Include "common/byte-vector.h".
480         (ada_value_primitive_packed_val): Use gdb::byte_vector.
481         * charset.c (wchar_iterator::iterate): Resize the vector instead
482         of reserving it.
483         * common/byte-vector.h: Include "common/def-vector.h".
484         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
485         * cli/cli-dump.c: Include "common/byte-vector.h".
486         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
487         * common/byte-vector.h: New file.
488         * common/def-vector.h: New file.
489         * common/default-init-alloc.h: New file.
490         * dwarf2loc.c: Include "common/byte-vector.h".
491         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
492         instead of reserving it.
493         * dwarf2read.c: Include "common/byte-vector.h".
494         (data_buf::m_vec): Now a gdb::byte_vector.
495         * gdb_regex.c: Include "common/def-vector.h".
496         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
497         * mi/mi-main.c: Include "common/byte-vector.h".
498         (mi_cmd_data_read_memory): Use gdb::byte_vector.
499         * printcmd.c: Include "common/byte-vector.h".
500         (print_scalar_formatted): Use gdb::byte_vector.
501         * valprint.c: Include "common/byte-vector.h".
502         (maybe_negate_by_bytes, print_decimal_chars): Use
503         gdb::byte_vector.
504
505 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
506
507         * darwin-nat.c: Include "nat/fork-inferior.h".
508
509 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
510
511         * configure.nat: Factor out Darwin bits that are not
512         architecture-specific.  Add fork-inferior.o.
513
514 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
515
516         * configure.nat: Factor out AIX bits that are not
517         architecture-specific.  Add fork-inferior.o.
518
519 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
520
521         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
522         (read_pieced_value, write_pieced_value): ...here.  Reduce to
523         wrappers that just call rw_pieced_value.
524
525 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
526
527         * dwarf2loc.c (write_pieced_value): When writing the data for a
528         memory piece, use write_memory_with_notification instead of
529         write_memory.
530
531 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
532
533         * valops.c (read_value_memory): Change embedded_offset to
534         represent a bit offset instead of a byte offset.
535         * value.h (read_value_memory): Adjust comment.
536
537 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
538
539         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
540         dest_offset_bits and source_offset_bits.
541         (write_pieced_value): Likewise.
542
543 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
544
545         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
546         given by DW_OP_bit_piece.
547         (write_pieced_value): Likewise.
548
549 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
550
551         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
552         some other preparations to the places where sufficient information
553         is available.
554         (write_pieced_value): Likewise.
555
556 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
557
558         * dwarf2loc.c (bits_to_bytes): New function.
559         (read_pieced_value): Fix offset calculations for register pieces
560         on big-endian targets.
561         (write_pieced_value): Likewise.
562
563 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
564
565         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
566         (write_pieced_value): Likewise.
567
568 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
569
570         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
571         transfer the source value's least significant bits, instead of its
572         lowest-addressed ones.  Rename type_len to max_offset.
573         (read_pieced_value): Mirror above changes to write_pieced_value as
574         applicable.
575
576 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
577
578         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
579         truncate full bytes from dest_offset_bits before using it as an
580         offset into the buffer.
581
582 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
583
584         * dwarf2loc.c (write_pieced_value): Include transfer size in
585         byte-wise check.
586
587 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
588
589         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
590         calculation of this_size.
591
592 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
593
594         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
595         when targeting a bit-field.
596         (write_pieced_value): Likewise.
597
598 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
599
600         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
601         (allocate_piece_closure): Drop addr_size parameter.
602         (dwarf2_evaluate_loc_desc_full): Adjust call to
603         allocate_piece_closure.
604
605 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
606
607         PR gdb/21226
608         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
609         the LSB end, independent of endianness.
610
611 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
612
613         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
614         size capping.
615
616 2017-06-13  Yao Qi  <yao.qi@linaro.org>
617
618         * mips-linux-nat.c: Move include features/mips*-linux.c to
619         mips-linux-tdep.c.
620         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
621         to mips-linux-tdep.c.
622         * mips-linux-tdep.c: Include features/mips*-linux.c
623         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
624         functions.
625         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
626         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
627         (tdesc_mips64_dsp_linux): Declare.
628
629 2017-06-12  Tom Tromey  <tom@tromey.com>
630
631         * valprint.h (val_print_type_code_int): Remove.
632         * valprint.c (generic_val_print_int): Always call
633         val_print_scalar_formatted.
634         (val_print_type_code_int): Remove.
635         * printcmd.c (print_scalar_formatted): Handle options->format==0.
636         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
637         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
638         * ada-valprint.c (ada_val_print_num): Use
639         val_print_scalar_formatted.
640
641 2017-06-12  Tom Tromey  <tom@tromey.com>
642
643         * printcmd.c (print_scalar_formatted): Unify the two switches.
644         Don't convert scalars to LONGEST.
645
646 2017-06-12  Tom Tromey  <tom@tromey.com>
647
648         PR exp/16225:
649         * valprint.h (print_decimal_chars): Update.
650         * valprint.c (maybe_negate_by_bytes): New function.
651         (print_decimal_chars): Add "is_signed" argument.
652         * printcmd.c (print_scalar_formatted): Update.
653
654 2017-06-12  Tom Tromey  <tom@tromey.com>
655
656         PR exp/16225:
657         * valprint.h (print_binary_chars, print_hex_chars): Update.
658         * valprint.c (val_print_type_code_int): Update.
659         (print_binary_chars): Add "zero_pad" argument.
660         (emit_octal_digit): New function.
661         (print_octal_chars): Don't zero-pad.
662         (print_decimal_chars): Likewise.
663         (print_hex_chars): Add "zero_pad" argument.
664         * sh64-tdep.c (sh64_do_fp_register): Update.
665         * regcache.c (regcache::dump): Update.
666         * printcmd.c (print_scalar_formatted): Update.
667         * infcmd.c (default_print_one_register_info): Update.
668
669 2017-06-12  Pedro Alves  <palves@redhat.com>
670             Alan Hayward  <alan.hayward@arm.com>
671
672         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
673         (mips_eabi_push_dummy_call): Rename local 'regsize' to
674         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
675         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
676         Assert that abi_regsize bytes fit in 'ref_valbuf'.
677
678 2017-06-12  Pedro Alves  <palves@redhat.com>
679
680         * dwarf2read.c (mapped_symtab::data): Now a vector of
681         symtab_index_entry instead of vector of
682         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
683         whether an element's name is NULL instead of checking whether the
684         element itself is NULL.
685         (find_slot): Change return type.  Adjust.
686         (hash_expand, , add_index_entry, uniquify_cu_indices)
687         (write_hash_table): Adjust.
688
689 2017-06-12  Pedro Alves  <palves@redhat.com>
690
691         * dwarf2read.c (recursively_count_psymbols): New function.
692         (write_psymtabs_to_index): Call it to compute number of psyms and
693         pass estimate size of psyms_seen to unordered_set's ctor.
694
695 2017-06-12  Pedro Alves  <palves@redhat.com>
696
697         * dwarf2read.c (write_hash_table): Check if key already exists
698         before emplacing.
699
700 2017-06-12  Pedro Alves  <palves@redhat.com>
701
702         * dwarf2read.c (data_buf::append_space): Rename to...
703         (data_buf::grow): ... this, and make private.  Adjust all callers.
704         (data_buf::append_uint): New method.
705         (add_address_entry, write_one_signatured_type)
706         (write_psymtabs_to_index): Use it.
707
708 2017-06-12  Pedro Alves  <palves@redhat.com>
709
710         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
711         (file_write (FILE *, const std::vector<Elem>&)): Delete.
712         (data_buf::file_write): Call ::fwrite directly.
713
714 2017-06-12  Pedro Alves  <palves@redhat.com>
715
716         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
717         std::vector::erase.
718
719 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
720
721         Code cleanup: C++ify .gdb_index producer.
722         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
723         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
724         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
725         (create_strtab, add_string): Remove.
726         (file_write, data_buf): New.
727         (struct symtab_index_entry): Use std::vector for cu_indices.
728         (struct mapped_symtab): Use std::vector for data.
729         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
730         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
731         Remove.
732         (find_slot): Change return type.  Update it to the new data structures.
733         (hash_expand, add_index_entry): Update it to the new data structures.
734         (offset_type_compare): Remove.
735         (uniquify_cu_indices): Update it to the new data structures.
736         (c_str_view, c_str_view_hasher, vector_hasher): New.
737         (add_indices_to_cpool): Remove.
738         (write_hash_table): Update it to the new data structures.
739         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
740         (eq_psymtab_cu_index): Remove.
741         (psym_index_map): New typedef.
742         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
743         reference and std::unordered_map for cu_index_htab.
744         (add_address_entry, add_address_entry_worker, write_address_map)
745         (write_psymbols): Update it to the new data structures.
746         (write_obstack): Remove.
747         (struct signatured_type_index_data): Change types_list to a data_buf
748         reference and psyms_seen to a std::unordered_set reference.
749         (write_one_signatured_type, recursively_write_psymbols)
750         (write_psymtabs_to_index): Update it to the new data structures.
751
752 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
753
754         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
755         separate-debug-file commands.
756         * symfile.h (separate_debug_file_debug): New global.
757         * symfile.c (separate_debug_file_debug): New global.
758         (separate_debug_file_exists, find_separate_debug_file): Add
759         debug output.
760         (_initialize_symfile): Add "set debug separate-debug-file"
761         command.
762         * build-id.c (build_id_to_debug_bfd,
763         find_separate_debug_file_by_buildid): Add debug output.
764
765 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
766
767         * gdbarch.sh (displaced_step_free_closure): Remove.
768         * gdbarch.h, gdbarch.c: Re-generate.
769         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
770         displaced_step_free_closure.
771         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
772         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
773         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
774         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
775         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
776         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
777         * arch-utils.h (simple_displaced_step_free_closure): Remove.
778         * arch-utils.c (simple_displaced_step_free_closure): Remove.
779         * infrun.c (displaced_step_clear): Call xfree instead of
780         gdbarch_displaced_step_free_closure.
781
782 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
783
784         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
785         NULL".
786
787 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
788
789         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
790         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
791         (mn10300_push_dummy_call): Likewise.
792
793 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
794
795         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
796
797 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
798
799         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
800
801 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
802
803         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
804         able to start inferiors using a shell.
805         (New remote packets): Announce new packet "QStartupWithShell".
806         * remote.c: Add PACKET_QStartupWithShell.
807         (extended_remote_create_inferior): Handle new
808         PACKET_QStartupWithShell.
809         (remote_protocol_features) <QStartupWithShell>: New entry for
810         PACKET_QStartupWithShell.
811         (_initialize_remote): Call "add_packet_config_cmd" for
812         QStartupShell.
813
814 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
815             Pedro Alves  <palves@redhat.com>
816
817         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
818         and "nat/fork-inferior.h".
819         * common/common-inferior.h: New file, with contents from
820         "gdb/inferior.h".
821         * commom/common-utils.c: Include "common-utils.h".
822         (stringify_argv): New function.
823         * common/common-utils.h (stringify_argv): New prototype.
824         * configure.nat: Add "fork-inferior.o" as a dependency for
825         "*linux*", "fbsd*" and "nbsd*" hosts.
826         * corefile.c (get_exec_file): Update comment.
827         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
828         instead of "startup_inferior".
829         (darwin_create_inferior): Call "add_thread_silent" after
830         "fork_inferior".
831         * fork-child.c: Cleanup unnecessary includes.
832         (SHELL_FILE): Move to "common/common-fork-child.c".
833         (environ): Likewise.
834         (exec_wrapper): Initialize.
835         (get_exec_wrapper): New function.
836         (breakup_args): Move to "common/common-fork-child.c"; rename to
837         "breakup_args_for_exec".
838         (escape_bang_in_quoted_argument): Move to
839         "common/common-fork-child.c".
840         (saved_ui): New variable.
841         (prefork_hook): New function.
842         (postfork_hook): Likewise.
843         (postfork_child_hook): Likewise.
844         (gdb_startup_inferior): Likewise.
845         (fork_inferior): Move to "common/common-fork-child.c".  Update
846         function to support gdbserver.
847         (startup_inferior): Likewise.
848         * gdbcore.h (get_exec_file): Remove declaration.
849         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
850         instead of "startup_inferior".  Call "add_thread_silent" after
851         "fork_inferior".
852         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
853         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
854         instead of "startup_inferior".  Call "add_thread_silent" after
855         "fork_inferior".
856         * inferior.h: Include "common-inferior.h".
857         (trace_start_error): Move to "common/common-utils.h".
858         (trace_start_error_with_name): Likewise.
859         (fork_inferior): Move prototype to "nat/fork-inferior.h".
860         (startup_inferior): Likewise.
861         (gdb_startup_inferior): New prototype.
862         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
863         * nat/fork-inferior.h: New file.
864         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
865         instead of "startup_inferior".  Call "add_thread_silent" after
866         "fork_inferior".
867         * target.h (target_terminal_init): Move prototype to
868         "target/target.h".
869         (target_terminal_inferior): Likewise.
870         (target_terminal_ours): Likewise.
871         * target/target.h (target_terminal_init): New prototype, moved
872         from "target.h".
873         (target_terminal_inferior): Likewise.
874         (target_terminal_ours): Likewise.
875         * utils.c (gdb_flush_out_err): New function.
876
877 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
878
879         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
880         * common/common-gdbthread.h: New file, with parts from
881         "gdb/gdbthread.h".
882         * gdbthread.h: Include "common-gdbthread.h".
883         (switch_to_thread): Moved to "common/common-gdbthread.h".
884
885 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
886
887         * Makefile.in (SFILES): Add "common/job-control.c".
888         (HFILES_NO_SRCDIR): Add "common/job-control.h".
889         (COMMON_OBS): Add "job-control.o".
890         * common/job-control.c: New file, with contents from
891         "gdb/inflow.c".
892         * common/job-control.h: New file, with contents from "terminal.h".
893         * fork-child.c: Include "job-control.h".
894         * inflow.c: Include "job-control.h".
895         (gdb_setpgid): Move to "common/common-inflow.c".
896         (_initialize_inflow): Move setting of "job_control" to
897         "handle_job_control".
898         * terminal.h (job_control): Moved to "common/common-terminal.h".
899         (gdb_setpgid): Likewise.
900         * top.c: Include "job_control.h".
901         * utils.c: Likewise.
902         (job_control): Moved to "job-control.c".
903
904 2017-06-07  Pedro Alves  <palves@redhat.com>
905
906         * Makefile.in (SFILES): Add gdb_regex.c.
907         (COMMON_OBS): Add gdb_regex.o.
908         * ada-lang.c (ada_add_standard_exceptions)
909         (ada_add_exceptions_from_frame, name_matches_regex)
910         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
911         parameter type to compiled_regex.  Adjust.
912         (ada_exceptions_list): Use compiled_regex.
913         * break-catch-throw.c (exception_catchpoint::pattern): Now a
914         std::unique_ptr<compiled_regex>.
915         (exception_catchpoint::~exception_catchpoint): Remove regfree
916         call.
917         (check_status_exception_catchpoint): Adjust to use compiled_regex.
918         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
919         * breakpoint.c (solib_catchpoint::compiled): Now a
920         std::unique_ptr<compiled_regex>.
921         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
922         (check_status_catch_solib): Adjust to use compiled_regex.
923         (add_solib_catchpoint): Adjust to use compiled_regex.
924         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
925         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
926         compiled_regex reference.  Adjust to use it.
927         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
928         declaration.  Include "gdb_regex.h".
929         (apropos_cmd): Change regex parameter to compiled_regex reference.
930         * gdb_regex.c: New file.
931         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
932         declarations.
933         (class compiled_regex): New.
934         * linux-tdep.c: Include "common/gdb_optional.h".
935         (struct mapping_regexes): New, factored out from
936         mapping_is_anonymous_p, and adjusted to use compiled_regex.
937         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
938         gdb::optional and remove cleanups.  Adjust to compiled_regex.
939         * probe.c: Include "common/gdb_optional.h".
940         (collect_probes): Use compiled_regex and gdb::optional and remove
941         cleanups.
942         * skip.c: Include "common/gdb_optional.h".
943         (skiplist_entry::compiled_function_regexp): Now a
944         gdb::optional<compiled_regex>.
945         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
946         (free_skiplist_entry): Remove regfree call.
947         (compile_skip_regexp, skip_rfunction_p): Adjust to use
948         compiled_regex and gdb::optional.
949         * symtab.c: Include "common/gdb_optional.h".
950         (search_symbols): Use compiled_regex and gdb::optional.
951         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
952         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
953         to gdb_regex.c.
954
955 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
956
957         * regcache.c (regcache::save): Avoid buffer use.
958         (regcache::dump): Likewise.
959
960 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
961
962         * sh-tdep.c (sh_pseudo_register_read): Remove
963         MAX_REGISTER_SIZE.
964         (sh_pseudo_register_write): Likewise.
965         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
966         (sh64_pseudo_register_write): Likewise
967
968 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
969
970         * aarch64-tdep.c (aarch64_store_return_value): Use
971         V_REGISTER_SIZE.
972         (aarch64_pseudo_read_value): Likewise.
973         (aarch64_pseudo_write): Likewise.
974
975 2017-06-06  Yao Qi  <yao.qi@linaro.org>
976
977         * regformats/regdef.h (set_register_cache): Remove the
978         declaration.
979
980 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
981
982         * frame.c (frame_unwind_register_signed): Use
983         frame_unwind_register_value.
984
985 2017-06-06  Pedro Alves  <palves@redhat.com>
986
987         PR breakpoints/21553
988         * breakpoint.c (create_breakpoints_sal_default)
989         (init_breakpoint_sal, create_breakpoint_sal): Use
990         gdb::unique_xmalloc_ptr for string parameters.
991         (create_breakpoint): Constify 'extra_string' and 'cond_string'
992         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
993         (base_breakpoint_create_breakpoints_sal)
994         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
995         (strace_marker_create_breakpoints_sal)
996         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
997         string parameters.
998         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
999         gdb::unique_xmalloc_ptr for string parameters.
1000         (create_breakpoint): Constify 'extra_string' and 'cond_string'
1001         parameters.
1002
1003 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
1004
1005         * alpha-tdep.c (alpha_register_to_value): Use
1006         get_frame_register_value.
1007         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
1008
1009 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
1010
1011         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
1012         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
1013         (ia64_value_to_register): Likewise.
1014         (ia64_extract_return_value): Likewise.
1015         (ia64_store_return_value): Likewise.
1016         (ia64_push_dummy_call): Likewise.
1017
1018 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
1019
1020         GDB 8.0 released.
1021
1022 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
1023
1024         * x86-linux-nat.c (struct arch_lwp_info): Remove.
1025
1026 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
1027
1028         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
1029         parameter.
1030         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
1031
1032 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
1033
1034         * event-loop.c (poll_timers): Unallocate timer using delete
1035         instead of xfree.
1036
1037 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
1038
1039         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
1040         (struct breakpoint) <~breakpoint>: New.
1041         (struct watchpoint): Inherit from breakpoint.
1042         <~watchpoint>: New.
1043         <base>: Remove.
1044         (struct tracepoint): Inherit from breakpoint.
1045         <base>: Remove.
1046         * breakpoint.c (longjmp_breakpoint_ops): Remove.
1047         (struct longjmp_breakpoint): Inherit from breakpoint.
1048         <~longjmp_breakpoint>: New.
1049         <base>: Remove.
1050         (new_breakpoint_from_type): Remove casts.
1051         (watchpoint_in_thread_scope): Remove reference to base field.
1052         (watchpoint_del_at_next_stop): Likewise.
1053         (update_watchpoint): Likewise.
1054         (watchpoint_check): Likewise.
1055         (bpstat_check_watchpoint): Likewise.
1056         (set_longjmp_breakpoint): Likewise.
1057         (struct fork_catchpoint): Inherit from breakpoint.
1058         <base>: Remove.
1059         (struct solib_catchpoint): Inherit from breakpoint.
1060         <~solib_catchpoint>: New.
1061         <base>: Remove.
1062         (dtor_catch_solib): Change to ...
1063         (solib_catchpoint::~solib_catchpoint): ... this.
1064         (breakpoint_hit_catch_solib): Remove reference to base field.
1065         (add_solib_catchpoint): Likewise.
1066         (create_fork_vfork_event_catchpoint): Likewise.
1067         (struct exec_catchpoint): Inherit from breakpoint.
1068         <~exec_catchpoint>: New.
1069         <base>: Remove.
1070         (dtor_catch_exec): Change to ...
1071         (exec_catchpoint::~exec_catchpoint): ... this.
1072         (dtor_watchpoint): Change to ...
1073         (watchpoint::~watchpoint): ... this.
1074         (watch_command_1): Remove reference to base field.
1075         (catch_exec_command_1): Likewise.
1076         (base_breakpoint_dtor): Change to ...
1077         (breakpoint::~breakpoint): ... this.
1078         (base_breakpoint_ops): Remove dtor field value.
1079         (longjmp_bkpt_dtor): Change to ...
1080         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
1081         (strace_marker_create_breakpoints_sal): Remove reference to base
1082         field.
1083         (delete_breakpoint): Don't manually call breakpoint destructor.
1084         (create_tracepoint_from_upload): Remove reference to base field.
1085         (trace_pass_set_count): Likewise.
1086         (initialize_breakpoint_ops): Don't initialize
1087         momentary_breakpoint_ops, don't set dtors.
1088         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
1089         <~ada_catchpoint>: New.
1090         <base>: Remove.
1091         (create_excep_cond_exprs): Remove reference to base field.
1092         (dtor_exception): Change to ...
1093         (ada_catchpoint::~ada_catchpoint): ... this.
1094         (dtor_catch_exception): Remove.
1095         (dtor_catch_exception_unhandled): Remove.
1096         (dtor_catch_assert): Remove.
1097         (create_ada_exception_catchpoint): Remove reference to base
1098         field.
1099         (initialize_ada_catchpoint_ops): Don't set dtors.
1100         * break-catch-sig.c (struct signal_catchpoint): Inherit from
1101         breakpoint.
1102         <~signal_catchpoint>: New.
1103         <base>: Remove.
1104         (signal_catchpoint_dtor): Change to ...
1105         (signal_catchpoint::~signal_catchpoint): ... this.
1106         (create_signal_catchpoint): Remove reference to base field.
1107         (initialize_signal_catchpoint_ops): Don't set dtor.
1108         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
1109         from breakpoint.
1110         <~syscall_catchpoint>: New.
1111         <base>: Remove.
1112         (dtor_catch_syscall): Change to ...
1113         (syscall_catchpoint::~syscall_catchpoint): ... this.
1114         (create_syscall_event_catchpoint): Remove reference to base
1115         field.
1116         (initialize_syscall_catchpoint_ops): Don't set dtor.
1117         * break-catch-throw.c (struct exception_catchpoint): Inherit
1118         from breakpoint.
1119         <~exception_catchpoint>: New.
1120         <base>: Remove.
1121         (dtor_exception_catchpoint): Change to ...
1122         (exception_catchpoint::~exception_catchpoint): ... this.
1123         (handle_gnu_v3_exceptions): Remove reference to base field.
1124         (initialize_throw_catchpoint_ops): Don't set dtor.
1125         * ctf.c (ctf_get_traceframe_address): Remove reference to base
1126         field.
1127         * remote.c (remote_get_tracepoint_status): Likewise.
1128         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
1129         * tracefile.c (tracefile_fetch_registers): Likewise.
1130         * tracepoint.c (actions_command): Likewise.
1131         (validate_actionline): Likewise.
1132         (tfind_1): Likewise.
1133         (get_traceframe_location): Likewise.
1134         (find_matching_tracepoint_location): Likewise.
1135         (parse_tracepoint_status): Likewise.
1136         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
1137
1138 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
1139
1140         * breakpoint.c (struct longjmp_breakpoint): New struct.
1141         (is_tracepoint_type): Change return type to bool.
1142         (is_longjmp_type): New function.
1143         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
1144         (set_raw_breakpoint_without_location): Use
1145         new_breakpoint_from_type.
1146         (set_raw_breakpoint): Likewise.
1147
1148 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
1149
1150         * breakpoint.c (new_breakpoint_from_type): New function.
1151         (create_breakpoint_sal): Use new_breakpoint_from_type and
1152         unique_ptr.
1153         (create_breakpoint): Likewise.
1154
1155 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
1156
1157         * memattr.c (mem_info_command): Rename to ...
1158         (info_mem_command): ... this.
1159         (mem_enable_command): Rename to ...
1160         (enable_mem_command): ... this.
1161         (mem_disable_command): Rename to ...
1162         (disable_mem_command): ... this.
1163         (mem_delete_command): Rename to ...
1164         (delete_mem_command): ... this.
1165         (_initialize_mem): Adjust function names.
1166
1167 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
1168
1169         * btrace.c (handle_pt_insn_events): New.
1170         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
1171         STATUS.  Split into this and ...
1172         (handle_pt_insn_event_flags): ... this.
1173
1174 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
1175
1176         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
1177         and struct pt_insn.resynced.
1178         * configure: Regenerated.
1179         * config.in: Regenerated.
1180
1181 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1182
1183         * btrace.c (ftrace_find_call_by_number): New function.
1184         (ftrace_new_function): Store objects, not pointers.
1185         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
1186         ftrace_new_gap, ftrace_update_function,
1187         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
1188         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
1189         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
1190         btrace_ends_with_single_insn, btrace_call_get): Account for
1191         btrace_thread_info::functions now storing objects.
1192         * btrace.h (struct btrace_thread_info): Add constructor.
1193         (struct btrace_thread_info) <functions>: Make std::vector.
1194         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
1195         Initialize with default values.
1196         * record-btrace.c (record_btrace_frame_sniffer): Account for
1197         btrace_thread_info::functions now storing objects.
1198
1199 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1200
1201         * btrace.c: Remove typedef bfun_s.
1202         (ftrace_new_gap): Directly add gaps to the list of gaps.
1203         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
1204         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
1205         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
1206         instead of gdb VEC.
1207
1208 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1209
1210         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
1211         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
1212         with btrace_thread_info::next_segment and
1213         btrace_thread_info::prev_segment.
1214         * btrace.h: Remove struct btrace_func_link.
1215         (struct btrace_function): Replace pair of function segment pointers
1216         with pair of indices.
1217         * python/py-record-btrace.c (btpy_call_prev_sibling,
1218         btpy_call_next_sibling): Replace references to
1219         btrace_thread_info::segment with btrace_thread_info::next_segment and
1220         btrace_thread_info::prev_segment.
1221         * record-btrace.c (record_btrace_frame_this_id): Use
1222         btrace_find_call_by_number.
1223
1224 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1225
1226         * btrace.c (ftrace_new_function, ftrace_fixup_level,
1227         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
1228         btrace_insn_next, btrace_insn_prev): Remove references to
1229         btrace_thread_info::flow.
1230         * btrace.h (struct btrace_function): Remove FLOW.
1231
1232 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1233
1234         * btrace.c (ftrace_find_call_by_number): New function.
1235         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
1236         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
1237         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
1238         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
1239         index.
1240         * btrace.h (struct btrace_function): Turn UP into an index.
1241         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
1242         as an index.
1243         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
1244         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
1245         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
1246
1247 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1248
1249         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
1250         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
1251         ftrace_update_function, ftrace_compute_global_level_offset,
1252         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
1253         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
1254         btrace_insn_end, btrace_is_empty): Remove references to
1255         btrace_thread_info::begin and btrace_thread_info::end.
1256         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
1257         (struct btrace_thread_info) <functions>: Adjust comment.
1258         * record-btrace.c (record_btrace_start_replaying): Remove reference to
1259         btrace_thread_info::begin.
1260
1261 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1262
1263         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
1264         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
1265         ftrace_update_function): Remove arguments that implicitly were always
1266         BTINFO->END.
1267         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
1268         Don't pass BTINFO->END.
1269
1270 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1271
1272         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
1273         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
1274         btrace_find_insn_by_number): Replace function segment pointer with
1275         index.
1276         (btrace_insn_cmp): Simplify.
1277         * btrace.h: (struct btrace_insn_iterator) Rename index to
1278         insn_index.  Replace function segment pointer with index into function
1279         segment vector.
1280         * record-btrace.c (record_btrace_call_history): Replace function
1281         segment pointer use with index.
1282         (record_btrace_frame_sniffer): Retrieve function call segment through
1283         vector.
1284         (record_btrace_set_replay): Remove defunc't safety check.
1285
1286 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1287
1288         * btrace.c (btrace_ends_with_single_insn): New function.
1289         (btrace_call_get, btrace_call_number, btrace_call_begin,
1290         btrace_call_end, btrace_call_next, btrace_call_prev,
1291         btrace_find_call_by_number): Use index into call segment vector
1292         instead of pointer.
1293         (btrace_call_cmp): Simplify.
1294         * btrace.h (struct btrace_call_iterator): Replace function call segment
1295         pointer with index into vector.
1296         * record-btrace.c (record_btrace_call_history): Use index instead of
1297         pointer.
1298
1299 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1300
1301         * btrace.c (btrace_insn_begin, btrace_insn_end,
1302         btrace_find_insn_by_number): Add btinfo to iterator.
1303         * btrace.h (struct btrace_insn_iterator): Add btinfo.
1304
1305 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1306
1307         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
1308         and save pointers directly.
1309         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
1310         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
1311         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
1312         changed signature of functions.
1313         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
1314         (btrace_fetch): Remove code that adds btrace_function pointers to
1315         vector of btrace_functions.
1316         (btrace_clear): Simplify freeing vector of btrace_functions.
1317
1318 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1319
1320         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
1321         Replace VEC_* with std::vector functions.
1322         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
1323         (struct btrace_thread_info)<functions>: Change type to std::vector.
1324
1325 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1326
1327         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
1328         "Removed targets and native configurations" up.  Merge duplicate
1329         "New commands" sub-sections.  Add "New options" sub-sections.
1330
1331 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
1332
1333         * defs.h (copy_integer_to_size): New declaration.
1334         * findvar.c (copy_integer_to_size): New function.
1335         (do_cint_test): New selftest function.
1336         (copy_integer_to_size_test): Likewise.
1337         (_initialize_findvar): Likewise.
1338         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
1339         (mips_fbsd_collect_reg): Use raw_collect_integer.
1340         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
1341         (mips64_fill_gregset): Use raw_collect_integer
1342         (mips64_fill_fpregset): Use raw_supply_integer.
1343         * regcache.c (regcache::raw_supply_integer): New function.
1344         (regcache::raw_collect_integer): Likewise.
1345         * regcache.h: (regcache::raw_supply_integer): New declaration.
1346         (regcache::raw_collect_integer): Likewise.
1347
1348 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1349
1350         * Makefile.in (SFILES): Add gdbarch-selftests.c.
1351         (COMMON_OBS): Add gdbarch-selftests.o.
1352         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
1353         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
1354         * gdbarch-selftests.c: New file.
1355         * regcache.h (regcache) <~regcache>: Mark it virtual if
1356         GDB_SELF_TEST.
1357         <raw_write>: Likewise.
1358
1359 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1360
1361         * regcache.c (current_regcache): Change it to
1362         regcache::current_regcache.
1363         (regcache_observer_target_changed): Update.
1364         (regcache_thread_ptid_changed): Make it a regcache static
1365         method.
1366         (regcache_thread_ptid_changed): Update.
1367         (class regcache_access): New.
1368         (current_regcache_test): Update.
1369         (_initialize_regcache): Update.
1370         * regcache.h: Include forward_list.
1371         (regcache): Declare regcache_thread_ptid_changed and declare
1372         registers_changed_ptid as friend.
1373
1374 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1375
1376         * i387-tdep.c (i387_register_to_value): Use register_size
1377         instead of TYPE_LENGTH.
1378         * m68k-tdep.c (m68k_register_to_value): Likewise.
1379
1380 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1381
1382         * i387-tdep.c (i387_convert_register_p): Return false if type
1383         code isn't TYPE_CODE_FLT.
1384
1385 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1386
1387         * alpha-tdep.c (alpha_convert_register_p): Return true if type
1388         length is 4.
1389         (alpha_register_to_value): Remove type length check.
1390         (alpha_value_to_register): Likewise.
1391
1392 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1393
1394         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
1395         TYPE_CODE_FLT.
1396
1397 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1398
1399         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
1400         TYPE_CODE_FLT or not.
1401
1402 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1403
1404         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
1405         * avr-tdep.c (avr_gdbarch_init): Likewise.
1406         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
1407         * cris-tdep.c (cris_gdbarch_init): Likewise.
1408         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1409         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
1410         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
1411         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
1412         * mep-tdep.c (mep_gdbarch_init): Likewise.
1413         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
1414         * mips-tdep.c (mips_gdbarch_init): Likewise.
1415         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
1416         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
1417         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
1418         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
1419         * v850-tdep.c (v850_gdbarch_init): Likewise.
1420
1421 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1422
1423         * selftest-arch.c (tests_with_arch): Call registers_changed
1424         and reinit_frame_cache.
1425         * selftest.c (run_self_tests): Likewise.
1426
1427 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1428
1429         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
1430         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
1431
1432 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1433
1434         * rl78-tdep.c (rl78_gdbarch_init): Don't call
1435         set_gdbarch_print_insn.
1436
1437 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1438
1439         * h8300-tdep.c (h8300_gdbarch_init): Don't call
1440         set_gdbarch_print_insn.
1441
1442 2017-05-24  Yao Qi  <yao.qi@linaro.org>
1443
1444         * alpha-tdep.c (alpha_gdbarch_init): Don't call
1445         set_gdbarch_print_insn.
1446         * arc-tdep.c (arc_gdbarch_init): Likewise.
1447         * arch-utils.c: include dis-asm.h.
1448         (default_print_insn): New function.
1449         * arch-utils.h (default_print_insn): Declare.
1450         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
1451         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
1452         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
1453         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
1454         * frv-tdep.c (frv_gdbarch_init): Likewise.
1455         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1456         * gdbarch.sh (print_insn): Use default_print_insn.
1457         * gdbarch.c: Regenerated.
1458         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
1459         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
1460         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
1461         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
1462         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
1463         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
1464         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
1465         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
1466         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
1467         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
1468         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
1469         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
1470         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
1471         * mt-tdep.c (mt_gdbarch_init): Likewise.
1472         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1473         * nios2-tdep.c (nios2_print_insn): Remove.
1474         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
1475         * rx-tdep.c (rx_gdbarch_init): Likewise.
1476         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
1477         * score-tdep.c (score_print_insn): Remove.
1478         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
1479         * sh-tdep.c (sh_gdbarch_init): Likewise.
1480         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
1481         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1482         * tic6x-tdep.c (tic6x_print_insn): Remove.
1483         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
1484         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
1485         * v850-tdep.c (v850_gdbarch_init): Likewise.
1486         * vax-tdep.c (vax_gdbarch_init): Likewise.
1487         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
1488         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
1489
1490 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
1491
1492         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
1493         (MIPS_FP0_REGNUM): Remove.
1494         (MIPS_FSR_REGNUM): Remove.
1495         (mips_fbsd_supply_fpregs): Use mips_regnum.
1496         (mips_fbsd_supply_gregs): Likewise.
1497         (mips_fbsd_collect_fpregs): Likewise.
1498         (mips_fbsd_collect_gregs): Likewise.
1499
1500 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
1501
1502         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
1503         (getpfpregs_supplies): New function.
1504         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
1505         getfpregs_supplies.
1506         (mips_fbsd_store_inferior_registers): Likewise.
1507
1508 2017-05-22  Pedro Alves <palves@redhat.com>
1509
1510         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
1511         maintainer.
1512
1513 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
1514
1515         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
1516         (store_register): Likewise.
1517         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1518         (get_decimal_float_return_value): Likewise.
1519         (do_ppc_sysv_return_value): Likewise.
1520         (ppc64_sysv_abi_push_integer): Likewise.
1521         (ppc64_sysv_abi_push_freg): Likewise.
1522         (ppc64_sysv_abi_return_value_base): Likewise.
1523         (ppc64_sysv_abi_return_value): Likewise.
1524         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1525         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1526         * rs6000-nat.c: Likewise.
1527         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
1528         (rs6000_value_to_register): Likewise.
1529         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
1530
1531 2017-05-21  Tom Tromey  <tom@tromey.com>
1532
1533         PR rust/21466:
1534         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
1535         arrays as "[T]", not "[T; ]".
1536
1537 2017-05-19  Tom Tromey  <tom@tromey.com>
1538
1539         PR rust/21484:
1540         * rust-lang.c (exp_descriptor_rust): New function.
1541         (rust_language_defn): Use it.
1542         * p-lang.c (pascal_language_defn): Update.
1543         * opencl-lang.c (opencl_language_defn): Update.
1544         * objc-lang.c (objc_language_defn): Update.
1545         * m2-lang.c (m2_language_defn): Update.
1546         * language.h (struct language_defn)
1547         <la_watch_location_expression>: New member.
1548         * language.c (unknown_language_defn, auto_language_defn)
1549         (local_language_defn): Update.
1550         * go-lang.c (go_language_defn): Update.
1551         * f-lang.c (f_language_defn): Update.
1552         * d-lang.c (d_language_defn): Update.
1553         * c-lang.h (c_watch_location_expression): Declare.
1554         * c-lang.c (c_watch_location_expression): New function.
1555         (c_language_defn, cplus_language_defn, asm_language_defn)
1556         (minimal_language_defn): Use it.
1557         * breakpoint.c (watch_command_1): Call
1558         la_watch_location_expression.
1559         * ada-lang.c (ada_language_defn): Update.
1560
1561 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1562
1563         PR tui/21482
1564         * gdb_curses.h (NOMACROS): Define.
1565         (NCURSES_NOMACROS): Define.
1566
1567 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1568
1569         PR tui/21482
1570         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
1571         arg to char *.
1572         * tui/tui-wingeneral.c (box_win): Likewise.
1573         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
1574         (tui_show_source_line): Likewise.
1575         (tui_show_exec_info_content): Likewise.
1576
1577 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
1578
1579         * sparc-tdep.c (sparc_structure_return_p)
1580         (sparc_arg_on_registers_p): New functions.
1581         (sparc32_store_arguments): Use them.
1582         * sparc64-tdep.c (sparc64_16_byte_align_p)
1583         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
1584         Handle TYPE_CODE_ARRAY.
1585
1586 2017-05-17  Yao Qi  <yao.qi@linaro.org>
1587
1588         * cli/cli-decode.c (add_alias_cmd): New function.
1589         * command.h (add_alias_cmd): Declare.
1590         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
1591         instead call add_alias_cmd.
1592
1593 2017-05-17  Pedro Alves  <palves@redhat.com>
1594
1595         * Makefile.in (nat_extra_makefile_frag): Rename to ...
1596         (nat_makefile_frag): ... this.  All references updated.
1597         * configure.ac: Likewise.
1598         * configure.nat: Likewise.  Enhance comments.
1599         * configure: Regenerate.
1600
1601 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1602
1603         * procfs.c (procfs_create_inferior): Change prototype to match
1604         definition.
1605
1606 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
1607
1608         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
1609         C++ compiler warning.
1610
1611 2017-05-12  Tom Tromey  <tom@tromey.com>
1612
1613         PR rust/21483:
1614         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
1615         recurse, just call value_struct_elt directly.
1616
1617 2017-05-12  Tom Tromey  <tom@tromey.com>
1618
1619         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
1620         OP_RUST_ARRAY>: Fix.
1621
1622 2017-05-12  Tom Tromey  <tom@tromey.com>
1623
1624         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
1625
1626 2017-05-09  Yao Qi  <yao.qi@linaro.org>
1627
1628         * regcache.c: Include <forward_list>.
1629         (struct regcache_list): Remove.
1630         (current_regcache): Update.
1631         (get_thread_arch_aspace_regcache): Update for std::forward_list.
1632         (regcache_thread_ptid_changed): Likewise.
1633         (registers_changed_ptid): Likewise.
1634         (current_regcache_size): Likewise.
1635
1636 2017-05-09  Yao Qi  <yao.qi@linaro.org>
1637
1638         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
1639         (current_regcache_size): New function.
1640         (current_regcache_test): New function.
1641         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
1642
1643 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
1644
1645         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
1646         (print_gp_register_row): Use get_frame_register_value.
1647
1648 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
1649
1650         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
1651         (mips_supply_fpregset): Likewise.
1652         (mips64_supply_gregset): Likewise.
1653
1654 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
1655
1656         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
1657         regcache->raw_supply_zeroed.
1658
1659 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
1660
1661         * configure.nat: Rearrange 'case' statements to match
1662         host before cpu.
1663
1664 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
1665
1666         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
1667         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
1668         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
1669         "@nat_extra_makefile_frag@".
1670         (Makefile): Remove dependency on "@frags@".
1671         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
1672         (data-directory/Makefile): Likewise.
1673         * config/aarch64/linux.mh: Deleted; moved contents to
1674         "gdb/configure.nat".
1675         * config/alpha/alpha-linux.mh: Likewise.
1676         * config/alpha/nbsd.mh: Likewise.
1677         * config/arm/linux.mh: Likewise.
1678         * config/arm/nbsdelf.mh: Likewise.
1679         * config/i386/cygwin.mh: Likewise.
1680         * config/i386/cygwin64.mh: Likewise.
1681         * config/i386/darwin.mh: Likewise.
1682         * config/i386/fbsd.mh: Likewise.
1683         * config/i386/fbsd64.mh: Likewise.
1684         * config/i386/go32.mh: Likewise.
1685         * config/i386/i386gnu.mh: Likewise.
1686         * config/i386/i386sol2.mh: Likewise.
1687         * config/i386/linux.mh: Likewise.
1688         * config/i386/linux64.mh: Likewise.
1689         * config/i386/mingw.mh: Likewise.
1690         * config/i386/mingw64.mh: Likewise.
1691         * config/i386/nbsd64.mh: Likewise.
1692         * config/i386/nbsdelf.mh: Likewise.
1693         * config/i386/nto.mh: Likewise.
1694         * config/i386/obsd.mh: Likewise.
1695         * config/i386/obsd64.mh: Likewise.
1696         * config/i386/sol2-64.mh: Likewise.
1697         * config/ia64/linux.mh: Likewise.
1698         * config/m32r/linux.mh: Likewise.
1699         * config/m68k/linux.mh: Likewise.
1700         * config/m68k/nbsdelf.mh: Likewise.
1701         * config/m68k/obsd.mh: Likewise.
1702         * config/m88k/obsd.mh: Likewise.
1703         * config/mips/fbsd.mh: Likewise.
1704         * config/mips/linux.mh: Likewise.
1705         * config/mips/nbsd.mh: Likewise.
1706         * config/mips/obsd64.mh: Likewise.
1707         * config/pa/linux.mh: Likewise.
1708         * config/pa/nbsd.mh: Likewise.
1709         * config/pa/obsd.mh: Likewise.
1710         * config/powerpc/aix.mh: Likewise.
1711         * config/powerpc/fbsd.mh: Likewise.
1712         * config/powerpc/linux.mh: Likewise.
1713         * config/powerpc/nbsd.mh: Likewise.
1714         * config/powerpc/obsd.mh: Likewise.
1715         * config/powerpc/ppc64-linux.mh: Likewise.
1716         * config/powerpc/spu-linux.mh: Likewise.
1717         * config/s390/linux.mh: Likewise.
1718         * config/sh/nbsd.mh: Likewise.
1719         * config/sparc/fbsd.mh: Likewise.
1720         * config/sparc/linux.mh: Likewise.
1721         * config/sparc/linux64.mh: Likewise.
1722         * config/sparc/nbsd64.mh: Likewise.
1723         * config/sparc/nbsdelf.mh: Likewise.
1724         * config/sparc/obsd64.mh: Likewise.
1725         * config/sparc/sol2.mh: Likewise.
1726         * config/tilegx/linux.mh: Likewise.
1727         * config/vax/nbsdelf.mh: Likewise.
1728         * config/vax/obsd.mh: Likewise.
1729         * config/xtensa/linux.mh: Likewise.
1730         * config/i386/i386gnu.mn: New file, with excerpts from
1731         "config/i386/i386gnu.mh".
1732         * configure: Regenerate.
1733         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
1734         *.mh files under "gdb/config".
1735         * configure.nat: New file, with contents from the
1736         "gdb/config/*/*.mh" files.
1737
1738 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
1739
1740         * btrace.c (btrace_clear): Free insn vector.
1741
1742 2017-05-05  Pedro Alves  <palves@redhat.com>
1743
1744         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
1745         * configure: Regenerate.
1746
1747 2017-05-04  Pedro Alves  <palves@redhat.com>
1748
1749         * Makefile.in (SFILES): Add progspace-and-thread.c.
1750         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
1751         (COMMON_OBS): Add progspace-and-thread.o.
1752         * breakpoint.c: Include "progspace-and-thread.h".
1753         (update_inserted_breakpoint_locations)
1754         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
1755         Use scoped_restore_current_pspace_and_thread.
1756         (create_std_terminate_master_breakpoint): Use
1757         scoped_restore_current_program_space.
1758         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
1759         (print_breakpoint_location): Use
1760         scoped_restore_current_program_space.
1761         (bp_loc_is_permanent): Use
1762         scoped_restore_current_pspace_and_thread.
1763         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
1764         (download_tracepoint_locations): Use
1765         scoped_restore_current_pspace_and_thread.
1766         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
1767         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
1768         (enum step_over_calls_kind): Moved from inferior.h.
1769         (class scoped_restore_current_thread): New class.
1770         * gdbthread.h (make_cleanup_restore_current_thread): Delete
1771         declaration.
1772         (scoped_restore_current_thread): New class.
1773         * infcmd.c: Include "common/gdb_optional.h".
1774         (continue_1, proceed_after_attach): Use
1775         scoped_restore_current_thread.
1776         (notice_new_inferior): Use scoped_restore_current_thread.
1777         * inferior.c: Include "progspace-and-thread.h".
1778         (restore_inferior, save_current_inferior): Delete.
1779         (add_inferior_command, clone_inferior_command): Use
1780         scoped_restore_current_pspace_and_thread.
1781         * inferior.h (scoped_restore_current_inferior): New class.
1782         * infrun.c: Include "progspace-and-thread.h" and
1783         "common/gdb_optional.h".
1784         (follow_fork_inferior): Use
1785         scoped_restore_current_pspace_and_thread.
1786         (scoped_restore_exited_inferior): New class.
1787         (handle_vfork_child_exec_or_exit): Use
1788         scoped_restore_exited_inferior,
1789         scoped_restore_current_pspace_and_thread,
1790         scoped_restore_current_thread and scoped_restore.
1791         (fetch_inferior_event): Use scoped_restore_current_thread.
1792         * linespec.c (decode_line_full, decode_line_1): Use
1793         scoped_restore_current_program_space.
1794         * mi/mi-main.c: Include "progspace-and-thread.h".
1795         (exec_continue): Use scoped_restore_current_thread.
1796         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
1797         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
1798         * proc-service.c (ps_pglobal_lookup): Use
1799         scoped_restore_current_program_space.
1800         * progspace-and-thread.c: New file.
1801         * progspace-and-thread.h: New file.
1802         * progspace.c (release_program_space, clone_program_space): Use
1803         scoped_restore_current_program_space.
1804         (restore_program_space, save_current_program_space)
1805         (save_current_space_and_thread): Delete.
1806         (switch_to_program_space_and_thread): Moved to
1807         progspace-and-thread.c.
1808         * progspace.h (save_current_program_space)
1809         (save_current_space_and_thread): Delete declarations.
1810         (scoped_restore_current_program_space): New class.
1811         * remote.c (remote_btrace_maybe_reopen): Use
1812         scoped_restore_current_thread.
1813         * symtab.c: Include "progspace-and-thread.h".
1814         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
1815         * thread.c (print_thread_info_1): Use
1816         scoped_restore_current_thread.
1817         (struct current_thread_cleanup): Delete.
1818         (do_restore_current_thread_cleanup)
1819         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
1820         (scoped_restore_current_thread::~scoped_restore_current_thread):
1821         ... this new dtor.
1822         (make_cleanup_restore_current_thread): Rename/convert to ...
1823         (scoped_restore_current_thread::scoped_restore_current_thread):
1824         ... this new ctor.
1825         (thread_apply_all_command): Use scoped_restore_current_thread.
1826         (thread_apply_command): Use scoped_restore_current_thread.
1827         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
1828         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
1829
1830 2017-05-04  Pedro Alves  <palves@redhat.com>
1831
1832         * thread.c (make_cleanup_restore_current_thread): Move
1833         find_thread_ptid call before the is_stopped call.  Assert that the
1834         thread is found.  Replace is_stopped call by checking the thread's
1835         state directly.  Remove unnecessary NULL-thread check.
1836
1837 2017-05-04  Pedro Alves  <palves@redhat.com>
1838
1839         * corelow.c (thread_section_name): New class.
1840         (get_core_register_section, get_core_siginfo): Use it.
1841
1842 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1843
1844         * corelow.c (sniff_core_bfd): Remove extra semicolon.
1845         (get_core_register_section): Remove xfree of NULL pointer.
1846
1847 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
1848
1849         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
1850         * regcache.c (regcache::raw_supply_zeroed): New function.
1851         * regcache.h (regcache::raw_supply_zeroed): New declaration.
1852
1853 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
1854
1855         * gdbarch.sh: Remove commented out definition of
1856         TARGET_CHAR_BIT.
1857         * gdbarch.h: Re-generate.
1858
1859 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1860
1861         * configure: Regenerate.
1862
1863 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
1864
1865         * solib-target.c (solib_target_relocate_section_addresses):
1866         Remove num_section_bases, num_bases, segment_bases variables.
1867
1868 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
1869
1870         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
1871
1872 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
1873
1874         * solib-target.c: Include <vector>
1875         (struct lm_info_target) <~lm_info_target>: Remove.
1876         <segment_bases, section_bases>: Change type to
1877         std::vector<CORE_ADDR>.
1878         (library_list_start_segment, library_list_start_section,
1879         library_list_end_library,
1880         solib_target_relocate_section_addresses): Adjust.
1881
1882 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
1883
1884         * gdbarch.sh (software_single_step): Change return type to
1885         std::vector<CORE_ADDR>.
1886         * gdbarch.c, gdbarch.h: Re-generate.
1887         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
1888         Adjust.
1889         (arm_deal_with_atomic_sequence_raw): Adjust.
1890         (thumb_get_next_pcs_raw): Adjust.
1891         (arm_get_next_pcs_raw): Adjust.
1892         (arm_get_next_pcs): Adjust.
1893         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
1894         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
1895         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
1896         (alpha_software_single_step): Adjust.
1897         * alpha-tdep.h (alpha_software_single_step): Adjust.
1898         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
1899         * arm-tdep.c (arm_software_single_step): Adjust.
1900         (arm_breakpoint_kind_from_current_state): Adjust.
1901         * arm-tdep.h (arm_software_single_step): Adjust.
1902         * breakpoint.c (insert_single_step_breakpoint): Adjust.
1903         * cris-tdep.c (cris_software_single_step): Adjust.
1904         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
1905         (micromips_deal_with_atomic_sequence): Adjust.
1906         (deal_with_atomic_sequence): Adjust.
1907         (mips_software_single_step): Adjust.
1908         * mips-tdep.h (mips_software_single_step): Adjust.
1909         * moxie-tdep.c (moxie_software_single_step): Adjust.
1910         * nios2-tdep.c (nios2_software_single_step): Adjust.
1911         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
1912         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
1913         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
1914         * s390-linux-tdep.c (s390_software_single_step): Adjust.
1915         * sparc-tdep.c (sparc_software_single_step): Adjust.
1916         * spu-tdep.c (spu_software_single_step): Adjust.
1917         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
1918
1919 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
1920
1921         * gdbarch.sh: Use semi-colon as field separator instead of colon.
1922         * gdbarch.h: Re-generate.
1923
1924 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
1925
1926         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
1927         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
1928         * python/py-instruction.c, python/py-instruction.h: New file.
1929         * python/py-record.c: Add py-instruction.h include.
1930         (gdbpy_initialize_record): Make gdb.Instruction a super class of
1931         gdb.RecordInstruction.
1932         * python/python-internal.h: Add gdbpy_initialize_instruction
1933         declaration.
1934         * python/python.c (do_start_initialization): Add
1935         gdbpy_initialize_instruction.
1936
1937 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
1938
1939         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
1940         Remove.
1941         (btrace_func_from_recpy_func): New function.
1942         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
1943         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
1944         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
1945         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
1946         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
1947         Also, use new helper functions.
1948         (btpy_list_item): Use new helper functions.
1949         (recpy_bt_function_call_history): Use new type name.
1950         (btpy_call_getset): Remove.
1951         (gdbpy_initialize_btrace): Remove code to initialize
1952         gdb.BtraceFunctionCall.
1953         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
1954         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
1955         recpy_bt_func_prev, recpy_bt_func_next): New export.
1956         * python/py-record.c (recpy_func_type): New static object.
1957         (recpy_func_new, recpy_func_level, recpy_func_symbol,
1958         recpy_func_instructions, recpy_func_up, recpy_func_prev,
1959         recpy_func_next): New function.
1960         (recpy_element_hash, recpy_element_richcompare): Updated comment.
1961         (recpy_func_getset): New static object.
1962         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
1963         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
1964
1965 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
1966
1967         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
1968         (btpy_object, btpy_insn_type, btpy_new): Remove.
1969         (btpy_list_object): Use gdb.RecordInstruction type instead of
1970         gdb.BtraceInstruction type.
1971         (btrace_insn_from_recpy_insn): New function.
1972         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
1973         btpy_new.
1974         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
1975         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
1976         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
1977         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
1978         instead of btpy_object.
1979         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
1980         btpy_insn_data, btpy_insn_decode): Rename to ...
1981         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
1982         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
1983         recpy_bt_insn_decode): This.  Also, use new helper functions.
1984         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
1985         recpy_insn_type.
1986         (btpy_insn_getset): Remove.
1987         (gdbpy_initialize_btrace): Remove code to initialize
1988         gdb.BtraceInstruction.  Use recpy_element_object.
1989         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
1990         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
1991         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
1992         * python/py-record.c (recpy_insn_type): New static object.
1993         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
1994         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
1995         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
1996         New function.
1997         (recpy_insn_getset): New static object.
1998         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
1999         * python/py-record.h (recpy_element_object): New typedef.
2000         (recpy_insn_type, recpy_insn_new): New export.
2001
2002 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
2003
2004         * py-record-btrace.c (btpy_insn_new): Removed.
2005         (btpy_insn_or_gap_new): New function.
2006         (btpy_insn_error): Removed.
2007         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
2008         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
2009         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
2010         btpy_insn_or_gap_new instead of btpy_insn_new.
2011         (btpy_insn_getset): Remove btpy_insn_error.
2012         * py-record.c (recpy_gap_type): New static object.
2013         (recpy_gap_object): New typedef.
2014         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
2015         recpy_gap_reason_string): New function.
2016         (recpy_gap_getset): New static object.
2017         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
2018         * py-record.h (recpy_gap_new): New export.
2019
2020 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
2021
2022         * python/py-record.c (recpy_ptid): Remove.
2023         (recpy_record_getset): Remove recpy_ptid.
2024
2025 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
2026
2027         * btrace.c (btrace_fetch): Set inferior_ptid.
2028         * python/py-record-btrace.c: Add "py-record.h" include.
2029         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
2030         recpy_bt_end, recpy_bt_instruction_history,
2031         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
2032         in gdb.Record object instead of current ptid.
2033         * python/py-record.c: Include new "py-record.h" file.
2034         (recpy_record_object): Moved to py-record.h.
2035         * python/py-record.h: New file.
2036
2037 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
2038
2039         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
2040         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
2041         indentation.
2042
2043 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
2044
2045         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
2046         the past maintainers section.
2047
2048 2017-04-28  Yao Qi  <yao.qi@linaro.org>
2049
2050         * infcmd.c (get_return_value): Use regcache ctor, and remove
2051         cleanup.
2052
2053 2017-04-28  Yao Qi  <yao.qi@linaro.org>
2054             Pedro Alves  <palves@redhat.com>
2055
2056         * regcache.c (regcache::regcache): New tag dispatch ctor.
2057         (do_cooked_read): Moved above.
2058         (regcache_dup): Use the tag dispatch ctor..
2059         * regcache.h (regcache): Declare ctor, delete copy ctor and
2060         assignment operator, remove friend regcache_dup.
2061
2062 2017-04-28  Yao Qi  <yao.qi@linaro.org>
2063
2064         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
2065         call method save instead of regcache_cpy.
2066         * regcache.h (struct regcache): Make regcache_dup a friend.
2067
2068 2017-04-28  Yao Qi  <yao.qi@linaro.org>
2069
2070         * regcache.c (struct regcache): Move to regcache.h
2071         (regcache::arch): New method.
2072         (regcache_get_ptid): Update.
2073         (get_regcache_arch): Call arch method.
2074         (get_regcache_aspace): Call method aspace.
2075         (register_buffer): Change it to method.
2076         (regcache_save): Change it to regcache::save.
2077         (regcache_restore): Likewise.
2078         (regcache_cpy_no_passthrough): Remove the declaration.
2079         (regcache_cpy): Call methods restore and cpy_no_passthrough.
2080         (regcache_cpy_no_passthrough): Change it to method
2081         cpy_no_passthrough.
2082         (regcache_register_status): Change it to method
2083         get_register_status.
2084         (regcache_invalidate): Change it to method invalidate.
2085         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
2086         (regcache_raw_update): Change it to method raw_update.
2087         (regcache_raw_read): Likewise.
2088         (regcache_raw_read_signed): Likewise.
2089         (regcache_raw_read_unsigned): Likewise.
2090         (regcache_raw_write_signed): Likewise.
2091         (regcache_raw_write_unsigned): Likewise.
2092         (regcache_cooked_read): Likewise.
2093         (regcache_cooked_read_value): Likewise.
2094         (regcache_cooked_read_signed): Likewise.
2095         (regcache_cooked_read_unsigned): Likewise.
2096         (regcache_cooked_write_signed): Likewise.
2097         (regcache_cooked_write_unsigned): Likewise.
2098         (regcache_raw_set_cached_value): Likewise.
2099         (regcache_raw_write): Likewise.
2100         (regcache_cooked_write): Likewise.
2101         (regcache_xfer_part): Likewise.
2102         (regcache_raw_read_part): Likewise.
2103         (regcache_raw_write_part): Likewise.
2104         (regcache_cooked_read_part): Likewise.
2105         (regcache_cooked_write_part): Likewise.
2106         (regcache_raw_supply): Likewise.
2107         (regcache_raw_collect): Likewise.
2108         (regcache_transfer_regset): Likewise.
2109         (regcache_supply_regset): Likewise.
2110         (regcache_collect_regset): Likewise.
2111         (regcache_debug_print_register): Likewise.
2112         (enum regcache_dump_what): Move it to regcache.h.
2113         (regcache_dump): Change it to method dump.
2114         * regcache.h (enum regcache_dump_what): New.
2115         (class regcache): New.
2116         * target.c (target_fetch_registers): Call method
2117         debug_print_register.
2118         (target_store_registers): Likewise.
2119
2120 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2121
2122         * windows-nat.c (struct lm_info_windows): Initialize field.
2123         (windows_make_so): Allocate lm_info_windows with new.
2124         (windows_free_so): Free lm_info_windows with delete.
2125
2126 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2127
2128         * solib-darwin.c (struct lm_info_darwin): Initialize field.
2129         (darwin_current_sos): Allocate lm_info_darwin with new, remove
2130         cleanup.
2131         (darwin_free_so): Free lm_info_darwin with delete.
2132
2133 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2134
2135         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
2136         <l_addr_p>: Change type to bool.
2137         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
2138         (svr4_free_so): Free lm_info_svr4 with delete.
2139         (svr4_copy_library_list): Replace memcpy with call to copy
2140         constructor.
2141         (library_list_start_library, svr4_default_sos): Allocate
2142         lm_info_svr4 with new.
2143
2144 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2145
2146         * solib-target.c (struct lm_info_target): Add destructor,
2147         initialize fields.
2148         <name>: Change type to std::string.
2149         (library_list_start_library): Allocate lm_info_target with new.
2150         (solib_target_free_library_list): Free lm_info_target with
2151         delete.
2152         (solib_target_current_sos): Adapt to std::string.
2153         (solib_target_free_so): Free lm_info_target with delete.
2154
2155 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2156
2157         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
2158         fields.
2159         (frv_current_sos): Allocate lm_info_frv with new.
2160         (frv_relocate_main_executable): Free lm_info_frv with delete,
2161         allocate with new.
2162         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
2163
2164 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2165
2166         * solib-frv.c (struct lm_info_frv): Fix indentation.
2167
2168 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2169
2170         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
2171         map field.
2172         (dsbt_current_sos): Allocate lm_info_dsbt with new.
2173         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
2174         and allocate with new.
2175         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
2176
2177 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2178
2179         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
2180         <filename, member_name>: Change type to std::string.
2181         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
2182         (library_list_start_library): Allocate lm_info_aix with new.
2183         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
2184         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
2185         with copy constructor.
2186
2187 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2188
2189         * solist.h (struct lm_info): Remove.
2190         (struct lm_info_base): New class.
2191         (struct so_list) <lm_info>: Change type to lm_info_base *.
2192         * nto-tdep.c (struct lm_info): Remove.
2193         (lm_addr): Adjust.
2194         * solib-aix.c (struct lm_info): Rename to ...
2195         (struct lm_info_aix): ... this.  Extend lm_info_base.
2196         (lm_info_p): Rename to ...
2197         (lm_info_aix_p): ... this, and adjust.
2198         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
2199         solib_aix_parse_libraries, library_list_start_library,
2200         solib_aix_free_library_list, solib_aix_parse_libraries,
2201         solib_aix_get_library_list,
2202         solib_aix_relocate_section_addresses, solib_aix_free_so,
2203         solib_aix_get_section_offsets,
2204         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
2205         Adjust.
2206         (struct solib_aix_inferior_data) <library_list>: Adjust.
2207         * solib-darwin.c (struct lm_info): Rename to ...
2208         (struct lm_info_darwin): ... this.  Extend lm_info_base.
2209         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
2210         * solib-dsbt.c (struct lm_info): Rename to ...
2211         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
2212         (struct dsbt_info) <main_executable_lm_info): Adjust.
2213         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
2214         dsbt_relocate_section_addresses): Adjust.
2215         * solib-frv.c (struct lm_info): Rename to ...
2216         (struct lm_info_frv): ... this.  Extend lm_info_base.
2217         (main_executable_lm_info): Adjust.
2218         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
2219         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
2220         find_canonical_descriptor_in_load_object,
2221         frv_fdpic_find_canonical_descriptor): Adjust.
2222         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
2223         to lm_info_svr4.
2224         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
2225         svr4_clear_so, svr4_copy_library_list,
2226         library_list_start_library, svr4_default_sos, svr4_read_so_list,
2227         svr4_current_sos, svr4_fetch_objfile_link_map,
2228         solist_update_incremental): Adjust.
2229         * solib-svr4.h (struct lm_info_svr4): Move here from
2230         solib-svr4.c.
2231         * solib-target.c (struct lm_info): Rename to ...
2232         (struct lm_info_target): ... this.  Extend lm_info_base.
2233         (lm_info_p): Rename to ...
2234         (lm_info_target_p): ... this.
2235         (solib_target_parse_libraries, library_list_start_segment,
2236         library_list_start_section, library_list_start_library,
2237         library_list_end_library, solib_target_free_library_list,
2238         solib_target_current_sos, solib_target_free_so,
2239         solib_target_relocate_section_addresses): Adjust.
2240         * windows-nat.c (struct lm_info): Rename to ...
2241         (struct lm_info_windows): ... this.  Extend lm_info_base.
2242         (windows_make_so, handle_load_dll, handle_unload_dll,
2243         windows_xfer_shared_libraries): Adjust.
2244
2245 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2246
2247         * solib-darwin.c (struct darwin_so_list): Remove.
2248         (darwin_current_sos): Allocate an so_list object instead of a
2249         darwin_so_list, separately allocate an lm_info object.
2250         (darwin_free_so): Free lm_info.
2251
2252 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
2253
2254         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
2255         with fprintf_filtered.
2256
2257 2017-04-28  Yao Qi  <yao.qi@linaro.org>
2258
2259         * regcache.c (regcache::regcache): New function.
2260         (regcache::~regcache): New function.
2261         (regcache_xmalloc_1): Remove.
2262         (regcache_xmalloc): Call new regcache.
2263         (regcache_xfree): Call delete regcache.
2264         (get_thread_arch_aspace_regcache): Call new regcache.
2265
2266 2017-04-28  Yao Qi  <yao.qi@linaro.org>
2267
2268         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
2269         lwp instead of ptid_get_lwp.
2270
2271 2017-04-28  Yao Qi  <yao.qi@linaro.org>
2272
2273         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
2274         lwp_info instead of getting from inferior_ptid.
2275
2276 2017-04-27  Keith Seitz  <keiths@redhat.com>
2277
2278         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
2279         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
2280         (CV_CONVERSION_BADNESS): Define.
2281         (rank_one_type): Remove overly restrictive rvalue reference
2282         rank checks.
2283         Add cv-qualifier checks and subranks for type equality.
2284         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
2285         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
2286         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
2287
2288 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
2289
2290         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
2291         count when creating the object.
2292
2293 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
2294             Ulrich Weigand  <uweigand@de.ibm.com>
2295
2296         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
2297         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
2298         is used in AIX.
2299         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
2300         (process_xcoff_symbol): Likewise.
2301         (scan_xcoff_symtab): Likewise.
2302
2303 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
2304
2305         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
2306         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
2307         (ia64_access_reg): Use get_frame_register_unsigned.
2308         (ia64_access_rse_reg): Likewise.
2309         (ia64_libunwind_frame_prev_register): Likewise.
2310
2311 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
2312
2313         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
2314         * gdbarch.c: Regenerated.
2315         * gdbarch.h: Regenerated.
2316         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
2317         visibility external.
2318         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
2319         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
2320         (enum cfa_how_kind): Move to ...
2321         (struct dwarf2_frame_state_reg_info): Likewise.
2322         (struct dwarf2_frame_state): Likewise.
2323         * dwarf2-frame.h: ... here.
2324         (dwarf2_frame_state_alloc_regs): New declaration.
2325         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
2326         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
2327
2328 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
2329
2330         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
2331         regcache_raw_read_unsigned.
2332         (xtensa_pseudo_register_write): Likewise.
2333
2334 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
2335
2336         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
2337         (nds32_pseudo_register_write): Likewise.
2338
2339 2017-04-25  Yao Qi  <yao.qi@linaro.org>
2340
2341         * regcache.c (struct regcache) <readonly_p>: Change its type
2342         to bool.
2343         (regcache_xmalloc_1): Update parameter type and callers update.
2344
2345 2017-04-25  Yao Qi  <yao.qi@linaro.org>
2346
2347         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
2348         set_gdbarch_wchar_bit.
2349         * arm-tdep.c (arm_gdbarch_init): Likewise.
2350
2351 2017-04-25  Pedro Alves  <palves@redhat.com>
2352
2353         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
2354         (BothAreRelocatable, memcopy, memmove): Don't define.
2355         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
2356         macros.
2357
2358 2017-04-25  Pedro Alves  <palves@redhat.com>
2359
2360         * common/common-defs.h: Include "common/poison.h".
2361         * common/function-view.h: (Not, Or, Requires): Move to traits.h
2362         and adjust.
2363         * common/poison.h: New file.
2364         * common/traits.h: Include <type_traits>.
2365         (Not, Or, Requires): New, moved from common/function-view.h.
2366
2367 2017-04-25  Pedro Alves  <palves@redhat.com>
2368
2369         * breakpoint.h (struct breakpoint): In-class initialize all
2370         fields.  Make boolean fields "bool".
2371         * breakpoint.c (init_raw_breakpoint_without_location): Remove
2372         memset call and initializations no longer necessary.
2373
2374 2017-04-25  Pedro Alves  <palves@redhat.com>
2375
2376         * btrace.c (pt_btrace_insn_flags): Change parameter type to
2377         reference.
2378         (pt_btrace_insn): New function.
2379         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
2380
2381 2017-04-25  Pedro Alves  <palves@redhat.com>
2382
2383         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
2384         "base" field and inherit from "bp_location" instead.  Add
2385         non-default ctor.
2386         (allocate_location_exception): Use new non-default ctor.
2387         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
2388         (init_bp_location): Convert to ...
2389         (bp_location::bp_location): ... this new ctor, and remove memset
2390         call.
2391         (base_breakpoint_allocate_location): Use the new non-default ctor.
2392         * breakpoint.h (bp_location): Now a class.  Declare default and
2393         non-default ctors.  In-class initialize all members.
2394         (init_bp_location): Remove declaration.
2395
2396 2017-04-25  Pedro Alves  <palves@redhat.com>
2397
2398         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
2399         assignment operator.
2400
2401 2017-04-24  Yao Qi  <yao.qi@linaro.org>
2402
2403         * doublest.c (convert_doublest_to_floatformat): Call
2404         floatformat_totalsize_bytes.
2405
2406 2017-04-22  Tom Tromey  <tom@tromey.com>
2407
2408         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2409         ui_out_emit_list.
2410         * stack.c (print_frame): Use ui_out_emit_list.
2411         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
2412         ui_out_emit_list.
2413         * mi/mi-main.c (print_one_inferior)
2414         (mi_cmd_data_list_register_names)
2415         (mi_cmd_data_list_register_values, mi_cmd_list_features)
2416         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
2417         ui_out_emit_list.
2418         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
2419         (mi_output_solib_attribs): Use ui_out_emit_list,
2420         ui_out_emit_tuple.
2421         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
2422         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
2423         (mi_cmd_stack_list_args, list_args_or_locals): Use
2424         ui_out_emit_list.
2425         * disasm.c (do_assembly_only): Use ui_out_emit_list.
2426         * breakpoint.c (print_solib_event, output_thread_groups): Use
2427         ui_out_emit_list.
2428
2429 2017-04-22  Tom Tromey  <tom@tromey.com>
2430
2431         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
2432         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
2433         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
2434
2435 2017-04-22  Tom Tromey  <tom@tromey.com>
2436
2437         * tracepoint.c (tvariables_info_1)
2438         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
2439
2440 2017-04-22  Tom Tromey  <tom@tromey.com>
2441
2442         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
2443         annotate_arg_emitter.
2444         * breakpoint.c (print_mention_watchpoint)
2445         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
2446         * annotate.h (struct annotate_arg_emitter): New.
2447
2448 2017-04-22  Tom Tromey  <tom@tromey.com>
2449
2450         * record-btrace.c (record_btrace_insn_history)
2451         (record_btrace_insn_history_range, record_btrace_call_history)
2452         (record_btrace_call_history_range): Use ui_out_emit_tuple.
2453         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
2454         ui_out_emit_tuple.
2455         * stack.c (print_frame_info): Use ui_out_emit_tuple.
2456         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
2457         * skip.c (skip_info): Use ui_out_emit_tuple.
2458         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
2459         * progspace.c (print_program_space): Use ui_out_emit_tuple.
2460         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
2461         * osdata.c (info_osdata): Use ui_out_emit_tuple.
2462         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
2463         ui_out_emit_tuple.
2464         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
2465         (output_register, mi_cmd_data_read_memory)
2466         (mi_cmd_data_read_memory_bytes, mi_load_progress)
2467         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
2468         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
2469         Use ui_out_emit_tuple.
2470         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
2471         ui_out_emit_tuple.
2472         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
2473         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
2474         * linux-thread-db.c (info_auto_load_libthread_db): Use
2475         ui_out_emit_tuple.
2476         * inferior.c (print_inferior): Use ui_out_emit_tuple.
2477         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
2478         * disasm.c (do_mixed_source_and_assembly_deprecated)
2479         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
2480         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
2481         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
2482         * breakpoint.c (print_one_breakpoint_location)
2483         (print_one_breakpoint): Use ui_out_emit_tuple.
2484         * auto-load.c (print_script, info_auto_load_cmd): Use
2485         ui_out_emit_tuple.
2486         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
2487
2488 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
2489
2490         * thread.c (print_thread_info_1): Remove dead code.
2491
2492 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
2493
2494         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
2495         GDB_SELF_TEST.
2496         * arm-tdep.c (selftests::arm_record_test): Likewise.
2497
2498 2017-04-21  Yao Qi  <yao.qi@linaro.org>
2499
2500         * regcache.c (regcache_restore): Remove argument 2.  Replace
2501         argument 3 with regcache.  Get register status from
2502         src->register_status and get register contents from
2503         register_buffer (src, regnum).
2504         (regcache_cpy): Update.
2505
2506 2017-04-19  Pedro Alves  <palves@redhat.com>
2507
2508         * gdbthread.h (thread): Add missing closing parenthesis in
2509         comment.
2510
2511 2017-04-19  Pedro Alves  <palves@redhat.com>
2512
2513         * common/refcounted-object.h: New file.
2514         * gdbthread.h: Include "common/refcounted-object.h".
2515         (thread_info): Inherit from refcounted_object and add comments.
2516         (thread_info::incref, thread_info::decref)
2517         (thread_info::m_refcount): Delete.
2518         (thread_info::deletable): Use the refcounted_object::refcount()
2519         method.
2520         * inferior.c (current_inferior_): Add comment.
2521         (set_current_inferior): Increment/decrement refcounts.
2522         (prune_inferiors, remove_inferior_command): Skip inferiors marked
2523         not-deletable instead of comparing with the current inferior.
2524         (initialize_inferiors): Increment the initial inferior's refcount.
2525         * inferior.h (struct inferior): Forward declare.
2526         Include "common/refcounted-object.h".
2527         (current_inferior, set_current_inferior): Move declaration to
2528         before struct inferior's definition, and fix comment.
2529         (inferior): Inherit from refcounted_object.  Add comments.
2530         * thread.c (switch_to_thread_no_regs): Reference the thread's
2531         inferior pointer directly instead of doing a ptid lookup.
2532         (switch_to_no_thread): New function.
2533         (switch_to_thread(thread_info *)): New function, factored out
2534         from ...
2535         (switch_to_thread(ptid_t)): ... this.
2536         (restore_current_thread): Delete.
2537         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
2538         fields, and add 'inf' field.
2539         (do_restore_current_thread_cleanup): Check whether old->inf is
2540         alive instead of looking up an inferior by ptid.  Use
2541         switch_to_thread and switch_to_no_thread.
2542         (restore_current_thread_cleanup_dtor): Use old->inf directly
2543         instead of lookup up an inferior by id.  Decref the inferior.
2544         Don't restore 'removable'.
2545         (make_cleanup_restore_current_thread): Same the inferior pointer
2546         in old, instead of the inferior number.  Incref the inferior.
2547         Don't save/clear 'removable'.
2548
2549 2017-04-19  Pedro Alves  <palves@redhat.com>
2550
2551         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2552         unittests/scoped_restore-selftests.c.
2553         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
2554         * common/scoped_restore.h (scoped_restore_base): Make "class".
2555         (scoped_restore_base::release): New public method.
2556         (scoped_restore_base::scoped_restore_base): New protected ctor.
2557         (scoped_restore_base::m_saved_var): New protected field.
2558         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
2559         scoped_restore_base base class instead of m_saved_var directly.
2560         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
2561         (scoped_restore_tmpl::scoped_restore_tmpl(const
2562         scoped_restore_tmpl<T>&)): Likewise.
2563         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
2564         method.
2565         (scoped_restore_tmpl::saved_var): New method.
2566         (scoped_restore_tmpl::m_saved_var): Delete.
2567         * inferior.h (inferior::detaching): Now a bool.
2568         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
2569         cleanup.
2570         * unittests/scoped_restore-selftests.c: New file.
2571
2572 2017-04-19  Pedro Alves  <palves@redhat.com>
2573
2574         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
2575         Re-sort in alphabetic order.
2576
2577 2017-04-18  Pedro Alves  <palves@redhat.com>
2578
2579         * xml-support.c (obstack_xml_printf): Delete.
2580         * xml-support.h (obstack_xml_printf): Delete.
2581
2582 2017-04-18  Pedro Alves  <palves@redhat.com>
2583
2584         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
2585         vdebug, verror, body_text, start_element, end_element, name,
2586         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
2587         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
2588         is_xinclude>: Make private and add m_ prefix.
2589         (gdb_xml_parser::body_text): New method, based on ...
2590         (gdb_xml_body_text): ... this.  Adjust.
2591         (gdb_xml_parser::vdebug): New method, based on ...
2592         (gdb_xml_debug): ... this.  Adjust.
2593         (gdb_xml_parser::verror): New method, based on ...
2594         (gdb_xml_error): ... this.  Adjust.
2595         (gdb_xml_parser::start_element): New method, based on ...
2596         (gdb_xml_start_element): ... this.  Adjust.
2597         (gdb_xml_start_element_wrapper): Defer to
2598         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
2599         (gdb_xml_parser::end_element): New method, based on ...
2600         (gdb_xml_end_element_wrapper): ... this.  Adjust.
2601         (gdb_xml_parser::~gdb_xml_parser): Adjust.
2602         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
2603         (gdb_xml_parser::use_dtd): New method, based on ...
2604         (gdb_xml_use_dtd): ... this.  Adjust.
2605         (gdb_xml_parser::parse): New method, based on ...
2606         (gdb_xml_parse): ... this.  Adjust.
2607         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
2608         (xinclude_start_include): Adjust to call the parser's name method.
2609         (xml_xinclude_default, xml_xinclude_start_doctype)
2610         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
2611         method.
2612         (xml_process_xincludes): Adjust to call parser methods.
2613         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
2614         declarations.
2615
2616 2017-04-18  Pedro Alves  <palves@redhat.com>
2617
2618         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
2619         gdb::optional<std::string>.
2620         * xml-support.c: Include <string>.
2621         (scope_level::scope_level(scope_level &&))
2622         (scope_level::~scope_level): Delete.
2623         (scope_level::body): Now a std::string.
2624         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
2625         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
2626         parameter.
2627         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
2628         (xinclude_parsing_data::output): Now a std::string reference.
2629         (xinclude_start_include): Adjust.
2630         (xml_xinclude_default): Adjust.
2631         (xml_process_xincludes): Add 'output' parameter, and return bool.
2632         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
2633         and return bool.
2634         * xml-tdesc.c: Include <unordered_map> and <string>.
2635         (tdesc_xml_cache): Delete.
2636         (tdesc_xml_cache_s): Delete.
2637         (xml_cache): Now an std::unordered_map.
2638         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
2639         (target_fetch_description_xml): Change return type to
2640         gdb::optional<std::string>, and adjust.
2641         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
2642         (target_fetch_description_xml): Change return type to
2643         gdb::optional<std::string>.
2644
2645 2017-04-18  Pedro Alves  <palves@redhat.com>
2646
2647         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2648         unittests/optional-selftests.c.
2649         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
2650         * unittests/optional-selftests.c: New file.
2651         * unittests/optional/assignment/1.cc: New file.
2652         * unittests/optional/assignment/2.cc: New file.
2653         * unittests/optional/assignment/3.cc: New file.
2654         * unittests/optional/assignment/4.cc: New file.
2655         * unittests/optional/assignment/5.cc: New file.
2656         * unittests/optional/assignment/6.cc: New file.
2657         * unittests/optional/assignment/7.cc: New file.
2658         * unittests/optional/cons/copy.cc: New file.
2659         * unittests/optional/cons/default.cc: New file.
2660         * unittests/optional/cons/move.cc: New file.
2661         * unittests/optional/cons/value.cc: New file.
2662         * unittests/optional/in_place.cc: New file.
2663         * unittests/optional/observers/1.cc: New file.
2664         * unittests/optional/observers/2.cc: New file.
2665
2666 2017-04-18  Pedro Alves  <palves@redhat.com>
2667
2668         * common/gdb_optional.h: Include common/traits.h.
2669         (in_place_t): New type.
2670         (in_place): New constexpr variable.
2671         (optional::optional): Remove member initialization of
2672         m_instantiated.
2673         (optional::optional(in_place_t...)): New constructor.
2674         (optional::~optional): Use reset.
2675         (optional::optional(const optional&)): New.
2676         (optional::optional(const optional&&)): New.
2677         (optional::optional(T &)): New.
2678         (optional::optional(T &&)): New.
2679         (operator::operator=(const optional &)): New.
2680         (operator::operator=(optional &&)): New.
2681         (operator::operator= (const T &))
2682         (operator::operator= (T &&))
2683         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
2684         (operator::reset): New.
2685         (operator::m_instantiated):: Add in-class initializer.
2686         * common/traits.h: Include <type_traits>.
2687         (struct And): New types.
2688
2689 2017-04-18  Pedro Alves  <palves@redhat.com>
2690
2691         * xml-support.c: Include <vector>.
2692         (scope_level::scope_level(const gdb_xml_element *))
2693         (scope_level::scope_level(scope_level&&)): New.
2694         (scope_level::~scope_level): New.
2695         (scope_level_s): Delete.
2696         (gdb_xml_parser::scopes): Now a std::vector.
2697         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
2698         Use std::vector.
2699         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
2700         scope cleanup code.
2701         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
2702         of the scopes member.  Use std::vector::emplace_back.
2703
2704 2017-04-18  Pedro Alves  <palves@redhat.com>
2705
2706         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
2707         a bool.
2708         (gdb_xml_end_element): Change type of first parameter.
2709         (gdb_xml_cleanup): Rename to ...
2710         (gdb_xml_parser::~gdb_xml_parser): ... this.
2711         (gdb_xml_create_parser_and_cleanup): Delete with ...
2712         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
2713         to this new ctor.
2714         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
2715         using gdb_xml_create_parser_and_cleanup.
2716         (xinclude_parsing_data): Add ctor/dtor.
2717         (xml_xinclude_cleanup): Delete.
2718         (xml_process_xincludes): Create a local xinclude_parsing_data
2719         instead of heap-allocating one.  Create a local gdb_xml_parser
2720         instead of heap-allocating one with
2721         gdb_xml_create_parser_and_cleanup.
2722
2723 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
2724
2725         PR threads/20743
2726         * fbsd-nat.c (resume_one_thread_cb): Remove.
2727         (resume_all_threads_cb): Remove.
2728         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
2729         iterate_over_threads.
2730
2731 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
2732
2733         * NEWS: Create a new section for the next release branch.
2734         Rename the section of the current branch, now that it has
2735         been cut.
2736
2737 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
2738
2739         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
2740         * version.in: Bump version to 8.0.50.DATE-git.
2741
2742 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
2743
2744         PR gdb/21385
2745         * windows-nat.c (windows_create_inferior): Declare 'allargs'
2746         independently of the host, and fix build breakage on Cygwin.
2747
2748 2017-04-13  Pedro Alves  <palves@redhat.com>
2749
2750         * inferior.c (free_inferior): Convert to ...
2751         (inferior::~inferior): ... this dtor.
2752         (inferior::inferior): New ctor, factored out from ...
2753         (add_inferior_silent): ... here.  Allocate the inferior with a new
2754         expression.
2755         (delete_inferior): Call delete instead of free_inferior.
2756         * inferior.h (gdb_environ, continuation): Forward declare.
2757         (inferior): Now a class.  Add in-class initialization to all
2758         members.  Make boolean fields bool, except 'detaching'.
2759         (inferior::inferior): New explicit ctor.
2760         (inferior::~inferior): New.
2761
2762 2017-04-13  Pedro Alves  <palves@redhat.com>
2763
2764         * inferior.c (init_inferior_list): Delete.
2765         * inferior.h (init_inferior_list): Delete.
2766
2767 2017-04-13  Pedro Alves  <palves@redhat.com>
2768
2769         PR threads/13217
2770         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
2771         (top level): Call it twice, with different thread sets.
2772
2773 2017-04-13  Pedro Alves  <palves@redhat.com>
2774
2775         * thread.c: Include <algorithm>.
2776         (thread_array_cleanup): Delete.
2777         (scoped_inc_dec_ref): New class.
2778         (live_threads_count): New function.
2779         (set_thread_refcount): Delete.
2780         (tp_array_compar_ascending): Now a bool.
2781         (tp_array_compar): Convert to a std::sort comparison function.
2782         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
2783         and live_threads_count.
2784
2785 2017-04-13  Pedro Alves  <palves@redhat.com>
2786
2787         * infrun.c (follow_fork_inferior): Also switch the current
2788         inferior.
2789
2790 2017-04-13  Pedro Alves  <palves@redhat.com>
2791
2792         * breakpoint.c (watch_command_1): Save watchpoint-frame info
2793         before calling create_internal_breakpoint.
2794
2795 2017-04-13  Pedro Alves  <palves@redhat.com>
2796
2797         * fork-child.c (execv_argv): New class.
2798         (breakup_args): Refactored as ...
2799         (execv_argv::init_for_no_shell): .. this method of execv_argv.
2800         Copy arguments to storage and replace separators with NULL
2801         terminators in place.
2802         (escape_bang_in_quoted_argument): Adjust to return bool.
2803         (execv_argv::execv_argv): New ctor.
2804         (execv_argv::init_for_shell): New method, factored out from
2805         fork_inferior.  Don't strdup strings into the vector.
2806         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
2807         Remove free_vector_argv call.
2808
2809 2017-04-13  Yao Qi  <yao.qi@linaro.org>
2810
2811         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
2812         tdep->rx_psw_type.
2813
2814 2017-04-13  Yao Qi  <yao.qi@linaro.org>
2815
2816         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
2817         * rx-tdep.c (rx_gdbarch_init): Likewise.
2818
2819 2017-04-13  Pedro Alves  <palves@redhat.com>
2820
2821         * breakpoint.h (struct breakpoint): Reindent.
2822
2823 2017-04-13  Pedro Alves  <palves@redhat.com>
2824
2825         * breakpoint.c (bp_location): Rename to ...
2826         (bp_locations): ... this.  All references updated.
2827         (bp_location_count): Rename to ...
2828         (bp_locations_count): ... this.  All references updated.
2829         (bp_location_placed_address_before_address_max): Rename to ...
2830         (bp_locations_placed_address_before_address_max): ... this.  All
2831         references updated.
2832         (bp_location_shadow_len_after_address_max): Rename to ...
2833         (bp_locations_shadow_len_after_address_max): ... this.  All
2834         references updated.
2835         (bp_location_compare_addrs): Rename to ...
2836         (bp_locations_compare_addrs): ... this.  All references updated.
2837         (bp_location_compare):Rename to ...
2838         (bp_locations_compare): ... this.  All references updated.
2839         (bp_location_target_extensions_update): Rename to ...
2840         (bp_locations_target_extensions_update): ... this.  All references
2841         updated.
2842
2843 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2844
2845         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
2846         * common/common.m4: Check headers 'termios.h', 'termio.h' and
2847         'sgtty.h'.
2848         * common/gdb_termios.h: New file, with parts of "terminal.h".
2849         * inflow.c: Include "gdb_termios.h".
2850         * ser-unix.c: Include "gdb_termios.h".
2851         * terminal.h: Move terminal-related defines to
2852         "common/gdb_termios.h".
2853
2854 2017-04-12  Tom Tromey  <tom@tromey.com>
2855
2856         * probe.c (parse_probes): Update.
2857         * location.h (delete_event_location): Don't declare.
2858         (event_location_deleter::operator()): Update.
2859         * location.c (event_location_deleter::operator()): Rename from
2860         delete_event_location.
2861         * linespec.h (linespec_result) <location>: Change type to
2862         event_location_up.
2863         * linespec.c (canonicalize_linespec, event_location_to_sals)
2864         (decode_objc): Update.
2865         (linespec_result): Don't call delete_event_location.
2866         * breakpoint.c (create_breakpoints_sal)
2867         (bkpt_probe_create_sals_from_location)
2868         (strace_marker_create_sals_from_location): Update.
2869
2870 2017-04-12  Tom Tromey  <tom@tromey.com>
2871
2872         * linespec.h (struct linespec_result): Add constructor and
2873         destructor.
2874         (init_linespec_result, destroy_linespec_result)
2875         (make_cleanup_destroy_linespec_result): Don't declare.
2876         * linespec.c (init_linespec_result): Remove.
2877         (linespec_result::~linespec_result): Rename from
2878         destroy_linespec_result.  Update.
2879         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
2880         Remove.
2881         * breakpoint.c (create_breakpoint, break_range_command)
2882         (decode_location_default): Update.
2883         * ax-gdb.c (agent_command_1): Update.
2884
2885 2017-04-12  Tom Tromey  <tom@tromey.com>
2886
2887         * remote.c (remote_download_tracepoint): Update.
2888         * python/py-breakpoint.c (bppy_get_location): Update.
2889         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
2890         (gdbscm_breakpoint_location): Update.
2891         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
2892         * breakpoint.h (struct breakpoint) <location, location_range_end>:
2893         Change type to event_location_up.
2894         * breakpoint.c (create_overlay_event_breakpoint)
2895         (create_longjmp_master_breakpoint)
2896         (create_std_terminate_master_breakpoint)
2897         (create_exception_master_breakpoint)
2898         (breakpoint_event_location_empty_p, print_breakpoint_location)
2899         (print_one_breakpoint_location, create_thread_event_breakpoint)
2900         (init_breakpoint_sal, create_breakpoint)
2901         (print_recreate_ranged_breakpoint, break_range_command)
2902         (init_ada_exception_breakpoint, say_where): Update.
2903         (base_breakpoint_dtor): Don't call delete_event_location.
2904         (bkpt_print_recreate, tracepoint_print_recreate)
2905         (dprintf_print_recreate, update_static_tracepoint)
2906         (breakpoint_re_set_default): Update.
2907
2908 2017-04-12  Tom Tromey  <tom@tromey.com>
2909
2910         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2911         type of "to_do".  Update.
2912         (compute_stack_depth): Use std::vector.
2913
2914 2017-04-12  Tom Tromey  <tom@tromey.com>
2915
2916         * printcmd.c (find_instruction_backward): Use std::vector.
2917
2918 2017-04-12  Tom Tromey  <tom@tromey.com>
2919
2920         * symfile.c (objfilep): Remove typedef.
2921         (reread_symbols): Use a std::vector.
2922
2923 2017-04-12  Tom Tromey  <tom@tromey.com>
2924
2925         * mi/mi-main.c (exec_direction_forward): Remove.
2926         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
2927         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2928         scoped_restore.
2929         * guile/guile.c (guile_repl_command, guile_command)
2930         (gdbscm_execute_gdb_command): Use scoped_restore.
2931         * go-exp.y (go_parse): Use scoped_restore.
2932         * d-exp.y (d_parse): Use scoped_restore.
2933         * cli/cli-decode.c (cmd_func): Use scoped_restore.
2934         * c-exp.y (c_parse): Use scoped_restore.
2935
2936 2017-04-12  Tom Tromey  <tom@tromey.com>
2937
2938         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
2939         (mi_parse): Update return type.
2940         (mi_parse_free): Remove.
2941         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
2942         (mi_parse::~mi_parse): Rename from mi_parse_free.
2943         (mi_parse_cleanup): Remove.
2944         (mi_parse): Return a unique_ptr.  Use new.
2945         * mi/mi-main.c (mi_execute_command): Update.
2946
2947 2017-04-12  Tom Tromey  <tom@tromey.com>
2948
2949         * location.c (explicit_location_lex_one): Return a
2950         unique_xmalloc_ptr.
2951         (string_to_explicit_location): Update.  Remove cleanups.
2952
2953 2017-04-12  Tom Tromey  <tom@tromey.com>
2954
2955         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
2956         (compare_value_and_voffset): Change type.  Update.
2957         (compute_vtable_size): Change type of "offset_vec".
2958         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
2959         (gnuv3_get_typeid): Remove extraneous declaration.
2960
2961 2017-04-12  Tom Tromey  <tom@tromey.com>
2962
2963         * charset.h (wchar_iterator): Fix comment.
2964
2965 2017-04-12  Tom Tromey  <tom@tromey.com>
2966
2967         * charset.c (iconv_wrapper): New class.
2968         (cleanup_iconv): Remove.
2969         (convert_between_encodings): Use it.
2970
2971 2017-04-12  Tom Tromey  <tom@tromey.com>
2972
2973         * symfile.h (increment_reading_symtab): Update type.
2974         * symfile.c (decrement_reading_symtab): Remove.
2975         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
2976         * psymtab.c (psymtab_to_symtab): Update.
2977         * dwarf2read.c (dw2_instantiate_symtab): Update.
2978
2979 2017-04-12  Tom Tromey  <tom@tromey.com>
2980
2981         * jit.c (struct jit_reader): Declare separately.  Add constructor
2982         and destructor.  Change type of "handle".
2983         (loaded_jit_reader): Define separately.
2984         (jit_reader_load): Update.  New "new".
2985         (jit_reader_unload_command): Use "delete".
2986         * gdb-dlfcn.h (struct dlclose_deleter): New.
2987         (gdb_dlhandle_up): New typedef.
2988         (gdb_dlopen, gdb_dlsym): Update types.
2989         (gdb_dlclose): Remove.
2990         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
2991         (gdb_dlsym): Change type of "handle".
2992         (make_cleanup_dlclose): Remove.
2993         (dlclose_deleter::operator()): Rename from gdb_dlclose.
2994         * compile/compile-c-support.c (load_libcc): Update.
2995
2996 2017-04-12  Tom Tromey  <tom@tromey.com>
2997
2998         * symtab.h (find_pcs_for_symtab_line): Change return type.
2999         * symtab.c (find_pcs_for_symtab_line): Change return type.
3000         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
3001         type of "vec".  Update.
3002         (ltpy_get_pcs_for_line): Update.
3003         * linespec.c (decode_digits_ordinary): Update.
3004
3005 2017-04-12  Tom Tromey  <tom@tromey.com>
3006
3007         * tracepoint.c (actions_command): Update.
3008         * python/python.c (python_command, python_interactive_command):
3009         Update.
3010         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3011         * guile/guile.c (guile_command): Update.
3012         * defs.h (read_command_lines, read_command_lines_1): Return
3013         command_line_up.
3014         (command_lines_deleter): New struct.
3015         (command_line_up): New typedef.
3016         * compile/compile.c (compile_code_command)
3017         (compile_print_command): Update.
3018         * cli/cli-script.h (get_command_line, copy_command_lines): Return
3019         command_line_up.
3020         (make_cleanup_free_command_lines): Remove.
3021         * cli/cli-script.c (get_command_line, read_command_lines_1)
3022         (copy_command_lines): Return command_line_up.
3023         (while_command, if_command, read_command_lines, define_command)
3024         (document_command): Update.
3025         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
3026         Remove.
3027         * breakpoint.h (breakpoint_set_commands): Change type of
3028         "commands".
3029         * breakpoint.c (breakpoint_set_commands): Change type of
3030         "commands".  Update.
3031         (do_map_commands_command, update_dprintf_command_list)
3032         (create_tracepoint_from_upload): Update.
3033
3034 2017-04-12  Tom Tromey  <tom@tromey.com>
3035
3036         * tracepoint.c (scope_info): Update.
3037         * spu-tdep.c (spu_catch_start): Update.
3038         * python/python.c (gdbpy_decode_line): Update.
3039         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
3040         * python/py-breakpoint.c (bppy_init): Update.
3041         * probe.c (parse_probes): Update.
3042         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
3043         * location.h (event_location_deleter): New struct.
3044         (event_location_up): New typedef.
3045         (new_linespec_location, new_address_location, new_probe_location)
3046         (new_explicit_location, copy_event_location)
3047         (string_to_event_location, string_to_event_location_basic)
3048         (string_to_explicit_location): Update return type.
3049         (make_cleanup_delete_event_location): Remove.
3050         * location.c (new_linespec_location, new_address_location)
3051         (new_probe_location, new_explicit_location, copy_event_location):
3052         Return event_location_up.
3053         (delete_event_location_cleanup)
3054         (make_cleanup_delete_event_location): Remove.
3055         (string_to_explicit_location, string_to_event_location_basic)
3056         (string_to_event_location): Return event_location_up.
3057         * linespec.c (canonicalize_linespec, event_location_to_sals)
3058         (decode_line_with_current_source)
3059         (decode_line_with_last_displayed, decode_objc): Update.
3060         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
3061         * completer.c (location_completer): Update.
3062         * cli/cli-cmds.c (edit_command, list_command): Update.
3063         * breakpoint.c (create_overlay_event_breakpoint)
3064         (create_longjmp_master_breakpoint)
3065         (create_std_terminate_master_breakpoint)
3066         (create_exception_master_breakpoint)
3067         (create_thread_event_breakpoint): Update.
3068         (init_breakpoint_sal): Update.  Remove some dead code.
3069         (create_breakpoint_sal): Change type of "location".  Update.
3070         (create_breakpoints_sal, create_breakpoint, break_command_1)
3071         (dprintf_command, break_range_command, until_break_command)
3072         (init_ada_exception_breakpoint)
3073         (strace_marker_create_sals_from_location)
3074         (update_static_tracepoint, trace_command, ftrace_command)
3075         (strace_command, create_tracepoint_from_upload): Update.
3076         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3077         * ax-gdb.c (agent_command_1): Update.
3078
3079 2017-04-12  Pedro Alves  <palves@redhat.com>
3080
3081         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
3082         * configure.tgt: Handle i[34567]86-*-go32* and
3083         i[34567]86-*-msdosdjgpp*.
3084         * i386-tdep.c (i386_svr4_reg_to_regnum):
3085         Make extern.
3086         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
3087         i386-go32-tdep.c.
3088         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
3089         * i386-go32-tdep.c: New file.
3090         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
3091         declarations.
3092
3093 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
3094
3095         * aix-thread.c (pd_status2str): Change return type to const char *.
3096
3097 2017-04-12  Pedro Alves  <palves@redhat.com>
3098
3099         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
3100         calls to set_gdbarch_gnu_triplet_regexp.
3101
3102 2017-04-12  Pedro Alves  <palves@redhat.com>
3103
3104         PR gdb/21323
3105         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
3106         New enum value.
3107         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
3108         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
3109         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
3110         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
3111         * gdbarch.h, gdbarch.c: Regenerate.
3112         * aarch64-tdep.c (aarch64_gdbarch_init): Override
3113         gdbarch_wchar_bit and gdbarch_wchar_signed.
3114         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
3115         * arm-tdep.c (arm_gdbarch_init): Likewise.
3116         * avr-tdep.c (avr_gdbarch_init): Likewise.
3117         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
3118         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
3119         * i386-tdep.c (i386_go32_init_abi): Likewise.
3120         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3121         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3122         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3123         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
3124         * sh-tdep.c (sh_gdbarch_init): Likewise.
3125         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3126         * sparc64-tdep.c (sparc64_init_abi): Likewise.
3127         * windows-tdep.c (windows_init_abi): Likewise.
3128         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
3129
3130 2017-04-12  Pedro Alves  <palves@redhat.com>
3131
3132         PR c++/21323
3133         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
3134         cplus_primitive_type_char32_t>: New enum values.
3135         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
3136         and cplus_primitive_type_char32_t.
3137         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
3138         32, use the archtecture's built-in type for char16_t and char32_t,
3139         respectively.  Otherwise, fallback to init_integer_type as before,
3140         but make the type unsigned, and issue a complaint.
3141         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
3142
3143 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
3144
3145         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
3146         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
3147
3148 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3149
3150         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
3151         'const char *'.
3152
3153 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3154
3155         * common/common-utils.c (free_vector_argv): New function.
3156         * common/common-utils.h: Include <vector>.
3157         (free_vector_argv): New prototype.
3158         * darwin-nat.c (darwin_create_inferior): Rewrite function
3159         prototype in order to constify "exec_file" and accept a
3160         "std::string" for "allargs".
3161         * fork-child.c: Include <vector>.
3162         (breakup_args): Rewrite function, using C++.
3163         (fork_inferior): Rewrite function header, constify "exec_file_arg"
3164         and accept "std::string" for "allargs".  Update the code to
3165         calculate "argv" based on "allargs".  Update calls to "exec_fun"
3166         and "execvp".
3167         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
3168         order to constify "exec_file" and accept a "std::string" for
3169         "allargs".
3170         * go32-nat.c (go32_create_inferior): Likewise.
3171         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
3172         * infcmd.c (run_command_1): Constify "exec_file".  Use
3173         "std::string" for inferior arguments.
3174         * inferior.h (fork_inferior): Update prototype.
3175         * linux-nat.c (linux_nat_create_inferior): Rewrite function
3176         prototype in order to constify "exec_file" and accept a
3177         "std::string" for "allargs".
3178         * nto-procfs.c (procfs_create_inferior): Likewise.
3179         * procfs.c (procfs_create_inferior): Likewise.
3180         * remote-sim.c (gdbsim_create_inferior): Likewise.
3181         * remote.c (extended_remote_run): Update code to accept
3182         "std::string" as argument.
3183         (extended_remote_create_inferior): Rewrite function prototype in
3184         order to constify "exec_file" and accept a "std::string" for
3185         "allargs".
3186         * rs6000-nat.c (super_create_inferior): Likewise.
3187         (rs6000_create_inferior): Likewise.
3188         * target.h (struct target_ops) <to_create_inferior>: Likewise.
3189         * windows-nat.c (windows_create_inferior): Likewise.
3190
3191 2017-04-11  Pedro Alves  <palves@redhat.com>
3192
3193         * thread.c: Fix whitespace throughout.
3194
3195 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
3196
3197         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
3198
3199 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
3200
3201         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
3202
3203 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3204
3205         PR gdb/21364
3206         * osdata.c (info_osdata): Check if 'type' is an empty string
3207         instead of NULL.
3208
3209 2017-04-10  Pedro Alves  <palves@redhat.com>
3210
3211         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
3212         (ptid_to_global_thread_id, in_thread_list)
3213         (do_captured_list_thread_ids, set_resumed, set_running)
3214         (set_executing, set_stop_requested, finish_thread_state)
3215         (validate_registers_access, can_access_registers_ptid)
3216         (print_thread_info_1, switch_to_thread)
3217         (do_restore_current_thread_cleanup)
3218         (make_cleanup_restore_current_thread, thread_command)
3219         (thread_name_command): Use operator== instead of ptid_equal.
3220
3221 2017-04-10  Pedro Alves  <palves@redhat.com>
3222
3223         * thread.c (struct current_thread_cleanup) <next>: Delete field.
3224         (current_thread_cleanup_chain): Delete.
3225         (restore_current_thread_cleanup_dtor)
3226         (make_cleanup_restore_current_thread): Remove references to
3227         current_thread_cleanup_chain.
3228
3229 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
3230
3231         * msp430-tdep.c (msp430_pseudo_register_read): Never return
3232         REG_UNKNOWN.
3233
3234 2017-04-10  Yao Qi  <yao.qi@linaro.org>
3235
3236         PR gdb/19942
3237         * gdbthread.h (thread_info::deletable): New method.
3238         (thread_info::incref): New method.
3239         (thread_info::decref): New method.
3240         (thread_info::refcount): Move it to private.
3241         * infrun.c (save_stop_context): Call inc_refcount.
3242         (release_stop_context_cleanup): Likewise.
3243         * thread.c (set_thread_exited): New function.
3244         (init_thread_list): Delete "tp" only it is deletable, otherwise
3245         call set_thread_exited.
3246         (delete_thread_1): Call set_thread_exited.
3247         (current_thread_cleanup) <inferior_pid>: Remove.
3248         <thread>: New field.
3249         (restore_current_thread_ptid_changed): Removed.
3250         (do_restore_current_thread_cleanup): Adjust.
3251         (restore_current_thread_cleanup_dtor): Don't call
3252         find_thread_ptid.
3253         (set_thread_refcount): Use dec_refcount.
3254         (make_cleanup_restore_current_thread): Adjust.
3255         (thread_apply_all_command): Call inc_refcount.
3256         (_initialize_thread): Don't call
3257         observer_attach_thread_ptid_changed.
3258
3259 2017-04-10  Yao Qi  <yao.qi@linaro.org>
3260
3261         * thread.c (delete_thread_1): Hoist code on marking thread as
3262         exited.
3263
3264 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3265
3266         * windows-nat.c (windows_detach): Initialize ptid with
3267         minus_one_ptid.
3268
3269 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
3270
3271         * unittests/ptid-selftests.c: Fix erroneous assert messages.
3272
3273 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
3274
3275         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
3276         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
3277         (bfin_pseudo_register_write): Likewise
3278
3279 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
3280
3281         * common/ptid.h (struct ptid): Change to...
3282         (class ptid_t): ... this.
3283         <ptid_t>: New constructors.
3284         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
3285         matches>: New methods.
3286         <make_null, make_minus_one>: New static methods.
3287         <pid>: Rename to...
3288         <m_pid>: ...this.
3289         <lwp>: Rename to...
3290         <m_lwp>: ...this.
3291         <tid>: Rename to...
3292         <m_tid>: ...this.
3293         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
3294         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
3295         as references, move comment to class ptid_t.
3296         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
3297         ptid_t static methods.
3298         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
3299         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
3300         Take ptid arguments as references, implement using ptid_t methods.
3301         * unittests/ptid-selftests.c: New file.
3302         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3303         unittests/ptid-selftests.c.
3304         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
3305
3306 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3307
3308         * python/python.c (python_run_simple_file): Cast mode literal to
3309         non-const char pointer as expected by PyFile_FromString.
3310
3311 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
3312
3313         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
3314         minus_one_ptid and null_ptid.
3315
3316 2017-04-05  Pedro Alves  <palves@redhat.com>
3317
3318         * warning.m4 (build_warnings): Remove -Wno-write-strings.
3319         * configure: Regenerate.
3320
3321 2017-04-05  Pedro Alves  <palves@redhat.com>
3322
3323         * ada-exp.y (yyerror): Constify.
3324         * ada-lang.c (bound_name, get_selections)
3325         (ada_variant_discrim_type)
3326         (ada_variant_discrim_name, ada_value_struct_elt)
3327         (ada_lookup_struct_elt_type, is_unchecked_variant)
3328         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
3329         (catch_ada_exception_command_split)
3330         (catch_ada_assert_command_split, catch_assert_command)
3331         (ada_op_name): Constify.
3332         * ada-lang.h (ada_yyerror, get_selections)
3333         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
3334         * arc-tdep.c (arc_print_frame_cache): Constify.
3335         * arm-tdep.c (arm_skip_stub): Constify.
3336         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
3337         (gen_aggregate_elt_ref): Constify.
3338         * bcache.c (print_bcache_statistics): Constify.
3339         * bcache.h (print_bcache_statistics): Constify.
3340         * break-catch-throw.c (catch_exception_command_1):
3341         * breakpoint.c (struct ep_type_description::description):
3342         Constify.
3343         (add_solib_catchpoint): Constify.
3344         (catch_fork_command_1): Add cast.
3345         (add_catch_command): Constify.
3346         * breakpoint.h (add_catch_command, add_solib_catchpoint):
3347         Constify.
3348         * bsd-uthread.c (bsd_uthread_state): Constify.
3349         * buildsym.c (patch_subfile_names): Constify.
3350         * buildsym.h (next_symbol_text_func, patch_subfile_names):
3351         Constify.
3352         * c-exp.y (yyerror): Constify.
3353         (token::oper): Constify.
3354         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
3355         * c-varobj.c (cplus_describe_child): Constify.
3356         * charset.c (find_charset_names): Add cast.
3357         (find_charset_names): Constify array and add const_cast.
3358         * cli/cli-cmds.c (complete_command, cd_command): Constify.
3359         (edit_command): Constify.
3360         * cli/cli-decode.c (lookup_cmd): Constify.
3361         * cli/cli-dump.c (dump_memory_command, dump_value_command):
3362         Constify.
3363         (struct dump_context): Constify.
3364         (add_dump_command, restore_command): Constify.
3365         * cli/cli-script.c (get_command_line): Constify.
3366         * cli/cli-script.h (get_command_line): Constify.
3367         * cli/cli-utils.c (check_for_argument): Constify.
3368         * cli/cli-utils.h (check_for_argument): Constify.
3369         * coff-pe-read.c (struct read_pe_section_data): Constify.
3370         * command.h (lookup_cmd): Constify.
3371         * common/print-utils.c (decimal2str): Constify.
3372         * completer.c (gdb_print_filename): Constify.
3373         * corefile.c (set_gnutarget): Constify.
3374         * cp-name-parser.y (yyerror): Constify.
3375         * cp-valprint.c (cp_print_class_member): Constify.
3376         * cris-tdep.c (cris_register_name, crisv32_register_name):
3377         Constify.
3378         * d-exp.y (yyerror): Constify.
3379         (struct token::oper): Constify.
3380         * d-lang.h (d_yyerror): Constify.
3381         * dbxread.c (struct header_file_location::name): Constify.
3382         (add_old_header_file, add_new_header_file, last_function_name)
3383         (dbx_next_symbol_text, add_bincl_to_list)
3384         (find_corresponding_bincl_psymtab, set_namestring)
3385         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
3386         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
3387         * defs.h (command_line_input, print_address_symbolic)
3388         (deprecated_readline_begin_hook): Constify.
3389         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
3390         Constify.
3391         * event-top.c (handle_line_of_input): Constify and add cast.
3392         * exceptions.c (catch_errors): Constify.
3393         * exceptions.h (catch_errors): Constify.
3394         * expprint.c (print_subexp_standard, op_string, op_name)
3395         (op_name_standard, dump_raw_expression, dump_raw_expression):
3396         * expression.h (op_name, op_string, dump_raw_expression):
3397         Constify.
3398         * f-exp.y (yyerror): Constify.
3399         (struct token::oper): Constify.
3400         (struct f77_boolean_val::name): Constify.
3401         * f-lang.c (f_word_break_characters): Constify.
3402         * f-lang.h (f_yyerror): Constify.
3403         * fork-child.c (fork_inferior): Add cast.
3404         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
3405         (new_variant): Constify.
3406         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
3407         * gdbarch.c: Regenerate.
3408         * gdbcore.h (set_gnutarget): Constify.
3409         * go-exp.y (yyerror): Constify.
3410         (token::oper): Constify.
3411         * go-lang.h (go_yyerror): Constify.
3412         * go32-nat.c (go32_sysinfo): Constify.
3413         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
3414         * guile/scm-cmd.c (cmdscm_function): Constify.
3415         * guile/scm-param.c (pascm_param_value): Constify.
3416         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
3417         (h8300sx_register_name): Constify.
3418         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
3419         Constify.
3420         * ia64-tdep.c (ia64_register_names): Constify.
3421         * infcmd.c (construct_inferior_arguments): Constify.
3422         (path_command, attach_post_wait): Constify.
3423         * language.c (show_range_command, show_case_command)
3424         (unk_lang_error): Constify.
3425         * language.h (language_defn::la_error)
3426         (language_defn::la_name_of_this): Constify.
3427         * linespec.c (decode_line_2): Constify.
3428         * linux-thread-db.c (thread_db_err_str): Constify.
3429         * lm32-tdep.c (lm32_register_name): Constify.
3430         * m2-exp.y (yyerror): Constify.
3431         * m2-lang.h (m2_yyerror): Constify.
3432         * m32r-tdep.c (m32r_register_names): Constify and make static.
3433         * m68hc11-tdep.c (m68hc11_register_names): Constify.
3434         * m88k-tdep.c (m88k_register_name): Constify.
3435         * macroexp.c (appendmem): Constify.
3436         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
3437         (upgrade_type, parse_external, parse_partial_symbols)
3438         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
3439         (new_symbol): Constify.
3440         * memattr.c (mem_info_command): Constify.
3441         * mep-tdep.c (register_name_from_keyword): Constify.
3442         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
3443         Constify.
3444         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
3445         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
3446         * mi/mi-main.c (captured_mi_execute_command): Constify and add
3447         cast.
3448         (mi_execute_async_cli_command): Constify.
3449         * mips-tdep.c (mips_register_name): Constify.
3450         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
3451         (am33_register_name, am33_2_register_name)
3452         * moxie-tdep.c (moxie_register_names): Constify.
3453         * nat/linux-osdata.c (osdata_type): Constify fields.
3454         * nto-tdep.c (nto_parse_redirection): Constify.
3455         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
3456         (lookup_child_selector): Constify.
3457         (objc_methcall::name): Constify.
3458         * objc-lang.h (lookup_objc_class, lookup_child_selector)
3459         (lookup_struct_typedef): Constify.
3460         * objfiles.c (pc_in_section): Constify.
3461         * objfiles.h (pc_in_section): Constify.
3462         * p-exp.y (struct token::oper): Constify.
3463         (yyerror): Constify.
3464         * p-lang.h (pascal_yyerror): Constify.
3465         * parser-defs.h (op_name_standard): Constify.
3466         (op_print::string): Constify.
3467         (exp_descriptor::op_name): Constify.
3468         * printcmd.c (print_address_symbolic): Constify.
3469         * psymtab.c (print_partial_symbols): Constify.
3470         * python/py-breakpoint.c (stop_func): Constify.
3471         (bppy_get_expression): Constify.
3472         * python/py-cmd.c (cmdpy_completer::name): Constify.
3473         (cmdpy_function): Constify.
3474         * python/py-event.c (evpy_add_attribute)
3475         (gdbpy_initialize_event_generic): Constify.
3476         * python/py-event.h (evpy_add_attribute)
3477         (gdbpy_initialize_event_generic): Constify.
3478         * python/py-evts.c (add_new_registry): Constify.
3479         * python/py-finishbreakpoint.c (outofscope_func): Constify.
3480         * python/py-framefilter.c (get_py_iter_from_func): Constify.
3481         * python/py-inferior.c (get_buffer): Add cast.
3482         * python/py-param.c (parm_constant::name): Constify.
3483         * python/py-unwind.c (fprint_frame_id): Constify.
3484         * python/python.c (gdbpy_parameter_value): Constify.
3485         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
3486         * remote.c (memory_packet_config::name): Constify.
3487         (show_packet_config_cmd, remote_write_bytes)
3488         (remote_buffer_add_string):
3489         * reverse.c (exec_reverse_once): Constify.
3490         * rs6000-tdep.c (variant::name, variant::description): Constify.
3491         * rust-exp.y (rustyyerror): Constify.
3492         * rust-lang.c (rust_op_name): Constify.
3493         * rust-lang.h (rustyyerror): Constify.
3494         * serial.h (serial_ops::name): Constify.
3495         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
3496         (sh_sh3e_register_name, sh_sh2e_register_name)
3497         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
3498         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
3499         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
3500         (sh_sh4al_dsp_register_name): Constify.
3501         * sh64-tdep.c (sh64_register_name): Constify.
3502         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
3503         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
3504         * stabsread.c (patch_block_stabs, read_type_number)
3505         (ref_map::stabs, ref_add, process_reference)
3506         (symbol_reference_defined, define_symbol, define_symbol)
3507         (error_type, read_type, read_member_functions, read_cpp_abbrev)
3508         (read_one_struct_field, read_struct_fields, read_baseclasses)
3509         (read_tilde_fields, read_struct_type, read_array_type)
3510         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
3511         (read_huge_number, read_range_type, read_args, common_block_start)
3512         (find_name_end): Constify.
3513         * stabsread.h (common_block_start, define_symbol)
3514         (process_one_symbol, symbol_reference_defined, ref_add):
3515         * symfile.c (get_section_index, add_symbol_file_command):
3516         * symfile.h (get_section_index): Constify.
3517         * target-descriptions.c (tdesc_type::name): Constify.
3518         (tdesc_free_type): Add cast.
3519         * target.c (find_default_run_target):
3520         (add_deprecated_target_alias, find_default_run_target)
3521         (target_announce_detach): Constify.
3522         (do_option): Constify.
3523         * target.h (add_deprecated_target_alias): Constify.
3524         * thread.c (print_thread_info_1): Constify.
3525         * top.c (deprecated_readline_begin_hook, command_line_input):
3526         Constify.
3527         (init_main): Add casts.
3528         * top.h (handle_line_of_input): Constify.
3529         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
3530         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
3531         (tfind_command): Rename to ...
3532         (tfind_command_1): ... this and constify.
3533         (tfind_command): New function.
3534         (tfind_end_command, tfind_start_command): Adjust.
3535         (encode_source_string): Constify.
3536         * tracepoint.h (encode_source_string): Constify.
3537         * tui/tui-data.c (tui_partial_win_by_name): Constify.
3538         * tui/tui-data.h (tui_partial_win_by_name): Constify.
3539         * tui/tui-source.c (tui_set_source_content_nil): Constify.
3540         * tui/tui-source.h (tui_set_source_content_nil): Constify.
3541         * tui/tui-win.c (parse_scrolling_args): Constify.
3542         * tui/tui-windata.c (tui_erase_data_content): Constify.
3543         * tui/tui-windata.h (tui_erase_data_content): Constify.
3544         * tui/tui-winsource.c (tui_erase_source_content): Constify.
3545         * tui/tui.c (tui_enable): Add cast.
3546         * utils.c (defaulted_query): Constify.
3547         (init_page_info): Add cast.
3548         (puts_debug, subset_compare): Constify.
3549         * utils.h (subset_compare): Constify.
3550         * varobj.c (varobj_format_string): Constify.
3551         * varobj.h (varobj_format_string): Constify.
3552         * vax-tdep.c (vax_register_name): Constify.
3553         * windows-nat.c (windows_detach): Constify.
3554         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
3555         * xml-support.c (gdb_xml_end_element): Constify.
3556         * xml-tdesc.c (tdesc_start_reg): Constify.
3557         * xstormy16-tdep.c (xstormy16_register_name): Constify.
3558         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
3559         * xtensa-tdep.h (xtensa_register_t::name): Constify.
3560
3561 2017-04-05  Pedro Alves  <palves@redhat.com>
3562
3563         * proc-api.c (struct trans): Constify.
3564         (procfs_note): Constify.
3565         * proc-events.c (struct trans, syscall_table):
3566         * proc-flags.c (struct trans): Constify.
3567         * proc-utils.h (procfs_note): Constify.
3568         * proc-why.c (struct trans): Constify.
3569         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
3570         (procfs_detach): Constify.
3571         * sol-thread.c (struct string_map): Constify.
3572         (td_err_string, td_state_string): Constify.
3573
3574 2017-04-05  Pedro Alves  <palves@redhat.com>
3575
3576         * proc-api.c (procfs_filename): Don't initialize
3577         procfs_filename.
3578         (prepare_to_trace): Assume procfs_filename is non-NULL.
3579         (_initialize_proc_api): Give procfs_filename a default value here.
3580
3581 2017-04-05  Pedro Alves  <palves@redhat.com>
3582
3583         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
3584         'cond_string' parameter.
3585         (extract_exception_regexp): Constify 'string' parameter.
3586         (catch_exception_command_1): Constify.
3587         * breakpoint.c (init_catchpoint)
3588         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
3589         parameter.
3590         (ep_parse_optional_if_clause, catch_fork_command_1)
3591         (catch_exec_command_1): Constify.
3592         * breakpoint.h (init_catchpoint): Constify 'cond_string'
3593         parameter.
3594         (ep_parse_optional_if_clause): Constify.
3595         * cli/cli-utils.c (remove_trailing_whitespace)
3596         (check_for_argument): Constify.
3597         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
3598         non-const overload.
3599         (check_for_argument): Likewise.
3600
3601 2017-04-05  Pedro Alves  <palves@redhat.com>
3602
3603         * event-top.c (command_line_handler): Add cast to execute_command
3604         call.
3605         * record-btrace.c (cmd_record_btrace_bts_start)
3606         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
3607         (cmd_record_btrace_start): Add cast to execute_command call.
3608         * record-full.c (record_full_goto_insn):
3609         * record.c (record_start, record_stop): Add cast to
3610         execute_command_to_string calls.
3611         (cmd_record_start): Add cast to execute_command calls.
3612
3613 2017-04-05  Pedro Alves  <palves@redhat.com>
3614
3615         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
3616         static inline function.
3617         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
3618         array and use gdb_PyArg_ParseTupleAndKeywords.
3619         * python/py-cmd.c (cmdpy_init): Likewise.
3620         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
3621         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
3622         (infpy_search_memory): Likewise.
3623         * python/py-objfile.c (objfpy_add_separate_debug_file)
3624         (gdbpy_lookup_objfile): Likewise.
3625         * python/py-symbol.c (gdbpy_lookup_symbol)
3626         (gdbpy_lookup_global_symbol): Likewise.
3627         * python/py-type.c (gdbpy_lookup_type): Likewise.
3628         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
3629         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
3630         Likewise.
3631
3632 2017-04-05  Pedro Alves  <palves@redhat.com>
3633
3634         * python/python-internal.h (gdb_PyGetSetDef): New type.
3635         * python/py-block.c (block_object_getset)
3636         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
3637         * python/py-event.c (event_object_getset)
3638         (finish_breakpoint_object_getset): Likewise.
3639         * python/py-inferior.c (inferior_object_getset): Likewise.
3640         * python/py-infthread.c (thread_object_getset): Likewise.
3641         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
3642         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
3643         * python/py-objfile.c (objfile_getset): Likewise.
3644         * python/py-progspace.c (pspace_getset): Likewise.
3645         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
3646         Likewise.
3647         * python/py-record.c (recpy_record_getset): Likewise.
3648         * python/py-symbol.c (symbol_object_getset): Likewise.
3649         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
3650         Likewise.
3651         * python/py-type.c (type_object_getset, field_object_getset):
3652         Likewise.
3653         * python/py-value.c (value_object_getset): Likewise.
3654
3655 2017-04-05  Pedro Alves  <palves@redhat.com>
3656
3657         * python/python-internal.h (gdb_PyObject_CallMethod)
3658         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
3659         New functions.
3660         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
3661         (PySys_GetObject, PySys_SetPath): New macros.
3662
3663 2017-04-05  Pedro Alves  <palves@redhat.com>
3664
3665         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
3666         info_osdata_command.
3667         * osdata.c (info_osdata_command): Rename to ...
3668         (info_osdata): ... this.  Constify 'type' parameter, and remove
3669         the 'from_tty' parameter.  Accept NULL TYPE.
3670         (info_osdata_command): New function.
3671         * osdata.h (info_osdata_command): Remove declaration.
3672         (info_osdata): New declaration.
3673
3674 2017-04-05  Pedro Alves  <palves@redhat.com>
3675
3676         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
3677         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
3678         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
3679         parameter.
3680         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
3681         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
3682         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
3683         parameter.
3684         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
3685         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
3686         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
3687         (mi_cmd_file_list_exec_source_files)
3688         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
3689         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
3690         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
3691         parameter.
3692         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
3693         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
3694         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
3695         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
3696         (mi_cmd_stack_info_frame): Constify 'command' parameter.
3697         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
3698         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
3699         'command' parameter.
3700         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
3701         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
3702         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
3703         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
3704         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
3705         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
3706         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
3707         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
3708         (mi_cmd_var_set_update_range): Constify 'command' parameter.
3709         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
3710         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
3711         parameter.
3712         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
3713         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
3714         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
3715         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
3716         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
3717         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
3718         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
3719         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
3720         (mi_cmd_data_list_changed_registers)
3721         (mi_cmd_data_write_register_values)
3722         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
3723         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
3724         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
3725         (mi_cmd_list_features, mi_cmd_list_target_features)
3726         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
3727         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
3728         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
3729         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
3730         (mi_cmd_trace_frame_collected): Constify 'command'
3731         parameter.
3732         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
3733         'command' parameter.
3734
3735 2017-04-05  Pedro Alves  <palves@redhat.com>
3736
3737         * ada-lang.c (ada_completer_word_break_characters): Now a const
3738         array.
3739         (ada_get_gdb_completer_word_break_characters): Constify.
3740         * completer.c (gdb_completer_command_word_break_characters)
3741         (gdb_completer_file_name_break_characters)
3742         (gdb_completer_quote_characters): Now const arrays.
3743         (get_gdb_completer_quote_characters): Constify.
3744         (set_rl_completer_word_break_characters): New function.
3745         (set_gdb_completion_word_break_characters)
3746         (complete_line_internal): Use it.
3747         * completer.h (get_gdb_completer_quote_characters): Constify.
3748         (set_rl_completer_word_break_characters): Declare.
3749         * f-lang.c (f_word_break_characters): Constify.
3750         * language.c (default_word_break_characters): Constify.
3751         * language.h (language_defn::la_word_break_characters): Constify.
3752         (default_word_break_characters): Constify.
3753         * top.c (init_main): Use set_rl_completer_word_break_characters.
3754
3755 2017-04-05  Pedro Alves  <palves@redhat.com>
3756
3757         * aix-thread.c (aix_thread_pid_to_str)
3758         (aix_thread_extra_thread_info): Constify.
3759         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
3760         * bsd-uthread.c (bsd_uthread_extra_thread_info)
3761         (bsd_uthread_pid_to_str): Constify.
3762         * corelow.c (core_pid_to_str): Constify.
3763         * darwin-nat.c (darwin_pid_to_str): Constify.
3764         * fbsd-nat.c (fbsd_pid_to_str): Constify.
3765         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
3766         Constify.
3767         * gnu-nat.c (gnu_pid_to_str): Constify.
3768         * go32-nat.c (go32_pid_to_str): Constify.
3769         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
3770         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
3771         * inferior.c (inferior_pid_to_str): Constify.
3772         * linux-nat.c (linux_nat_pid_to_str): Constify.
3773         * linux-tdep.c (linux_core_pid_to_str): Constify.
3774         * linux-thread-db.c (thread_db_pid_to_str)
3775         (thread_db_extra_thread_info): Constify.
3776         * nto-tdep.c (nto_extra_thread_info): Constify.
3777         * nto-tdep.h (nto_extra_thread_info): Constify.
3778         * obsd-nat.c (obsd_pid_to_str): Constify.
3779         * procfs.c (procfs_pid_to_str): Constify.
3780         * ravenscar-thread.c (ravenscar_extra_thread_info)
3781         (ravenscar_pid_to_str): Constify.
3782         * remote-sim.c (gdbsim_pid_to_str): Constify.
3783         * remote.c (remote_threads_extra_info, remote_pid_to_str):
3784         Constify.
3785         * sol-thread.c (solaris_pid_to_str): Constify.
3786         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
3787         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
3788         * target.c (default_pid_to_str, target_pid_to_str)
3789         (normal_pid_to_str, default_pid_to_str): Constify.
3790         * target.h (target_ops::to_pid_to_str)
3791         (target_ops::to_extra_thread_info): Constify.
3792         (target_pid_to_str, normal_pid_to_str): Constify.
3793         * windows-nat.c (windows_pid_to_str): Constify.
3794         * gdbarch.sh (core_pid_to_str): Constify.
3795         * target-delegates.c: Regenerate.
3796         * gdbarch.h, gdbarch.c: Regenerate.
3797
3798 2017-04-05  Pedro Alves  <palves@redhat.com>
3799
3800         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
3801         the memory of the temporary warning_pre_print override.
3802         * utils.c (warning_pre_print): Constify.
3803         * utils.h (warning_pre_print): Constify.
3804
3805 2017-04-05  Pedro Alves  <palves@redhat.com>
3806
3807         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
3808         (shell_command): New function.
3809         (make_command): Use std::string.
3810         (init_cli_cmds): Register shell_command instead of shell_escape.
3811
3812 2017-04-05  Pedro Alves  <palves@redhat.com>
3813
3814         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
3815         * tracepoint.c (default_collect): Don't initialize.
3816
3817 2017-04-05  Pedro Alves  <palves@redhat.com>
3818
3819         * macroexp.c (macro_buffer::shared): Now a bool.
3820         (init_buffer): Update.
3821         (init_shared_buffer): Constify 'addr' parameter.
3822         (substitute_args, expand, macro_expand, macro_expand_next): Remove
3823         casts.
3824
3825 2017-04-05  Pedro Alves  <palves@redhat.com>
3826
3827         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
3828         * disasm.c (set_disassembler_options): Constify local.
3829         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
3830
3831 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
3832
3833         PR gdb/21352
3834         * tracefile.c (tsave_command): Fix argument parsing for '-r'
3835         option.
3836
3837 2017-04-05  Yao Qi  <yao.qi@linaro.org>
3838
3839         * frame.c (frame_unwind_register_unsigned): Call
3840         frame_unwind_register_value.
3841
3842 2017-04-05  Yao Qi  <yao.qi@linaro.org>
3843
3844         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
3845         Use gdb_test_multiple, and don't match anchor.
3846
3847 2017-04-05  Pedro Alves  <palves@redhat.com>
3848
3849         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
3850         (Write After Approval): Remove Simon Marchi.
3851
3852 2017-04-05  Pedro Alves  <palves@redhat.com>
3853
3854         * common/gdb_optional.h (optional::optional): Make constexpr and
3855         initialize m_dummy.
3856
3857 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
3858
3859         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
3860         (amd64fbsd_jmp_buf_reg_offset): Remove.
3861         (amd64fbsd_supply_uthread): Remove function.
3862         (amd64fbsd_collect_uthread): Remove function.
3863         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
3864         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
3865         (x86_64-*-freebsd*): Remove bsd-uthread.o.
3866         (fbsd-nat.c): Update comment.
3867         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
3868         (i386fbsd_jmp_buf_reg_offset): Remove.
3869         (i386fbsd_supply_uthread): Remove function.
3870         (i386fbsd_collect_uthread): Remove function.
3871         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
3872
3873 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
3874
3875         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
3876         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
3877         * NEWS: Mention that support for FreeBSD/alpha was removed.
3878         * alpha-fbsd-tdep.c: Delete file.
3879         * config/alpha/fbsd.mh: Delete file.
3880         * configure.host: Delete alpha*-*-freebsd* and
3881         alpha*-*-kfreebsd*-gnu.
3882         * configure.tgt: Delete alpha*-*-freebsd* and
3883         alpha*-*-kfreebsd*-gnu.
3884
3885 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
3886
3887         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
3888         amd64bsd_store_inferior_registers): Use ptid from regcache.
3889
3890 2017-04-04  Pedro Alves  <palves@redhat.com>
3891
3892         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
3893         data fields, make them private and add "m_" prefixes.
3894         (lnp_state_machine::lnp_state_machine): New ctor.
3895         (record_line, check_line_address, handle_set_discriminator)
3896         (handle_set_address, handle_advance_pc, handle_special_opcode)
3897         (handle_advance_line, handle_set_file, handle_negate_stmt)
3898         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
3899         (end_sequence, advance_line): New methods.
3900         (m_gdbarch, m_record_lines_p): New fields.
3901         (lnp_reader_state): Delete.
3902         (dwarf_record_line): Rename to ...
3903         (lnp_state_machine::record_line): ... adjust.
3904         (init_lnp_state_machine): Delete.
3905         (lnp_state_machine::lnp_state_machine): New.
3906         (check_line_address): Rename to ...
3907         (lnp_state_machine::check_line_address): This.
3908         (dwarf_decode_lines_1): Remove reference to "reader_state".
3909         Adjust lnp_state_machine having a non-default ctor.  Use bool.
3910         State machine internal state manipulation moved to
3911         lnp_state_machine methods.
3912
3913 2017-04-04  Pedro Alves  <palves@redhat.com>
3914
3915         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3916         unittests/offset-type-selftests.c.
3917         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
3918         * common/offset-type.h: New file.
3919         * common/preprocessor.h: New file.
3920         * common/traits.h: New file.
3921         * common/valid-expr.h: New file.
3922         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
3923         sect_offset and cu_offset strong typedefs throughout.
3924         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
3925         typedefs throughout.
3926         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
3927         sect_offset and cu_offset strong typedefs throughout.
3928         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
3929         typedefs throughout.
3930         * gdbtypes.h: Include "common/offset-type.h".
3931         (cu_offset): Now an offset type (strong typedef) instead of a
3932         struct.
3933         (sect_offset): Likewise.
3934         (union call_site_parameter_u): Rename "param_offset" field to
3935         "param_cu_off".
3936         * unittests/offset-type-selftests.c: New file.
3937
3938 2017-04-04  Pedro Alves  <palves@redhat.com>
3939
3940         * common/underlying.h: New file.
3941         * dwarf2read.c: Include "common/gdb_optional.h" and
3942         "common/underlying.h".
3943         (dir_index, file_name_index): New types.
3944         (file_entry): Use them.
3945         (file_entry::include): Use to_underlying.
3946         (line_header::add_file_name): Use dir_index.
3947         (read_formatted_entries): Use gdb::optional.  Read form before
3948         writting to file_entry.
3949         (dwarf_decode_line_header): Use dir_index.
3950         (lnp_state_machine::current_file): Use to_underlying.
3951         (lnp_state_machine::file): Change type to file_name_index.
3952         (dwarf_record_line): Use to_underlying.
3953         (init_lnp_state_machine): Use file_name_index.
3954         (dwarf_decode_lines_1): Use dir_index and file_name_index.
3955
3956 2017-04-04  Pedro Alves  <palves@redhat.com>
3957
3958         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
3959         operator bool, has_value and get methods.
3960
3961 2017-04-04  Pedro Alves  <palves@redhat.com>
3962
3963         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
3964         fields.
3965         (line_header): Initialize all data fields.  Change type of
3966         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
3967         Change type of include_dirs to std::vector<const char *>.  Remove
3968         num_include_dirs, include_dirs_size.  Change type of file_names to
3969         std::vector<file_entry>.  Remove num_file_names, file_names_size.
3970         (line_header::line_header): New.
3971         (line_header::add_include_dir, line_header::add_file_name): New
3972         methods.
3973         (line_header::include_dir_at): Remove NULL check.
3974         (line_header::file_name_at): Add const overload.
3975         (line_header_up): New unique_ptr typedef.
3976         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
3977         std::vector.  Remove free_line_header call.
3978         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
3979         free_line_header call.
3980         (free_cu_line_header): Delete.
3981         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
3982         (setup_type_unit_groups): Use line_header_up instead of cleanups.
3983         Adjust to use std::vector.
3984         (free_line_header): Delete.
3985         (free_line_header_voidp): Use delete.
3986         (add_include_dir): Replace with ...
3987         (line_header::add_include_dir): ... this method.  Use std::vector.
3988         (add_file_name): Replace with ...
3989         (line_header::add_file_name): ... this method.  Use std::vector.
3990         (add_include_dir_stub): Delete.
3991         (read_formatted_entries): Remove memset.
3992         (dwarf_decode_line_header): Return a line_header_up instead of a
3993         raw pointer.  Remove cleanup handling.  Pass lambdas to
3994         read_formatted_entries.  Adjust to use line_header methods.
3995         (dwarf_decode_lines_1): Adjust to use line_header methods.
3996         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
3997         use std::vector.
3998
3999 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
4000
4001         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
4002         instead of struct ptid.
4003
4004 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
4005
4006         * frame.c (get_frame_register_bytes): Unwind using value.
4007         (put_frame_register_bytes): Likewise.
4008
4009 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
4010
4011         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
4012         aggregate-like.
4013
4014 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
4015
4016         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
4017
4018 2017-03-29  Yao Qi  <yao.qi@linaro.org>
4019
4020         * gdbthread.h (struct thread_info): Declare constructor and
4021         destructor.  Add some in-class member initializers.
4022         * thread.c (free_thread): Remove.
4023         (init_thread_list): Call delete instead of free_thread.
4024         (new_thread): Call thread_info constructor.
4025         (thread_info::thread_info): New function.
4026         (thread_info::~thread_info): New function.
4027         (delete_thread_1): Call delete instead of free_thread.
4028         (make_cleanup_restore_current_thread): Move tp and frame to
4029         inner block.
4030
4031 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
4032
4033         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
4034         (arc_skip_prologue): Likewise.
4035         (arc_make_frame_cache): Likewise.
4036         (arc_pv_get_operand): New function.
4037         (arc_is_in_prologue): Likewise.
4038         (arc_analyze_prologue): Likewise.
4039         (arc_print_frame_cache): Likewise.
4040         (MAX_PROLOGUE_LENGTH): New constant.
4041
4042 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
4043
4044         * configure.tgt: Add arc-insn.o.
4045         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
4046         (dump_arc_instruction_command): New function.
4047         (arc_fprintf_disasm): Likewise.
4048         (arc_disassemble_info): Likewise.
4049         (arc_insn_get_operand_value): Likewise.
4050         (arc_insn_get_operand_value_signed): Likewise.
4051         (arc_insn_get_memory_base_reg): Likewise.
4052         (arc_insn_get_memory_offset): Likewise.
4053         (arc_insn_get_branch_target): Likewise.
4054         (arc_insn_dump): Likewise.
4055         (arc_insn_get_linear_next_pc): Likewise.
4056         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
4057         (arc_disassemble_info): Likewise.
4058         (arc_insn_get_branch_target): Likewise.
4059         (arc_insn_get_linear_next_pc): Likewise.
4060         * NEWS: Mention new "maint print arc arc-instruction".
4061
4062 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
4063
4064         * arc-tdep (maintenance_print_arc_list): New variable.
4065         (maintenance_print_arc_command): New function.
4066
4067 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
4068
4069         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
4070         Add "limm" and "reserved".
4071         (arc_cannot_fetch_register, arc_cannot_store_register): Add
4072         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
4073         * arc-tdep.h (arc_regnum): Likewise.
4074
4075 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
4076
4077         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
4078         for THREADPTR register.
4079         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
4080         register.
4081         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
4082         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
4083         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
4084
4085 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
4086
4087         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
4088         registers above gdbarch_num_regs (gdbarch) as privileged in
4089         call0 ABI.
4090
4091 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
4092
4093         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
4094         for a single specified register or for all registers in
4095         a0_base..a0_base + C0_NREGS range.
4096         (supply_gregset_reg): Call regcache_raw_supply for a single
4097         specified register or for all registers in a0_base..a0_base +
4098         C0_NREGS range.
4099
4100 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
4101
4102         * arch/xtensa.h (C0_NREGS): Add definition.
4103         * xtensa-tdep.c (C0_NREGS): Remove definition.
4104
4105 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
4106
4107         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
4108         Drop xtensa_default_isa initialization.
4109         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
4110
4111 2017-03-27  Pedro Alves  <palves@redhat.com>
4112
4113         * dwarf2read.c (file_entry) <dir_index>: Add comment.
4114         (file_entry::include_dir): New method.
4115         (line_header::include_dir_at, line_header::file_name_at): New
4116         methods.
4117         (setup_type_unit_groups, setup_type_unit_groups)
4118         (psymtab_include_file_name): Simplify using the new methods.
4119         (lnp_state_machine) <the_line_header>: New field.
4120         <file>: Add comment.
4121         (lnp_state_machine::current_file): New method.
4122         (dwarf_record_line): Simplify using the new methods.
4123         (init_lnp_state_machine): Initialize the "the_line_header" field.
4124         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
4125         Simplify using the new methods.
4126
4127 2017-03-27  Pedro Alves  <palves@redhat.com>
4128
4129         * cp-name-parser.y (make_empty): Delete.
4130         (demangler_special, nested_name, ptr_operator, array_indicator)
4131         (direct_declarator, declarator_1): Use fill_comp instead of
4132         make_empty.
4133
4134 2017-03-27  Pedro Alves  <palves@redhat.com>
4135
4136         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
4137         to ATTRIBUTE_PRINTF.
4138         * solib-target.c (library_list_start_list): Print "string" not
4139         "version".
4140         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
4141         gdb_xml_error call.
4142
4143 2017-03-27  Pedro Alves  <palves@redhat.com>
4144
4145         * dwarf2read.c (struct file_and_directory): New.
4146         (dwarf2_get_dwz_file): Adjust to use std::string.
4147         (dw2_get_file_names_reader): Adjust to use file_and_directory.
4148         (find_file_and_directory): Adjust to return a file_and_directory
4149         object.
4150         (read_file_scope): Adjust to use file_and_directory.  Remove
4151         make_cleanup/do_cleanups calls.
4152         (open_and_init_dwp_file): Adjust to use std::string.  Remove
4153         make_cleanup/do_cleanups calls.
4154         * python/python.c (do_start_initialization): Adjust to ldirname
4155         returning a std::string.
4156         * utils.c (ldirname): Now returns a std::string.
4157         * utils.h (ldirname): Change return type to std::string.
4158         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
4159         returning a std::string.
4160         * xml-tdesc.c (file_read_description_xml): Likewise.
4161
4162 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
4163
4164         * regcache.c (regcache_debug_print_register): New function.
4165         * regcache.h (regcache_debug_print_register): New declaration.
4166         * target.c (debug_print_register): Remove.
4167         (target_fetch_registers): Call regcache_debug_print_register.
4168         (target_store_registers): Likewise.
4169
4170 2017-03-24  Pádraig Brady  <pbrady@fb.com>
4171
4172         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
4173         reference beyond the 'lh->include_dirs' array before accessing to
4174         it.
4175         (psymtab_include_file_name): Likewise.
4176         (dwarf_decode_lines_1): Likewise.
4177         (dwarf_decode_lines): Likewise.
4178         (file_file_name): Likewise.
4179
4180 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
4181
4182         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
4183         inferior_ptid.
4184         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
4185         ps_lsetfpregs): Likewise.
4186         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
4187         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
4188         ps_lsetfpregs): Likewise.
4189         * target.c (target_fetch_registers, target_store_registers):
4190         Remove asserts.
4191
4192 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
4193
4194         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
4195
4196 2017-03-23  Yao Qi  <yao.qi@linaro.org>
4197
4198         * aarch64-tdep.c (aarch64_process_record_test): Declare.
4199         (_initialize_aarch64_tdep): Register it.
4200         (aarch64_record_load_store): Handle PRFM instruction.
4201         (aarch64_process_record_test): New function.
4202
4203 2017-03-23  Yao Qi  <yao.qi@linaro.org>
4204
4205         * aarch64-tdep.c (aarch64_record_load_store): Fix code
4206         indentation.
4207
4208 2017-03-23  Yao Qi  <yao.qi@linaro.org>
4209
4210         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
4211
4212 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4213
4214         python/python.c (do_start_initialization): Fix memory leak.
4215
4216 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
4217
4218         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
4219         using get_ptrace_pid.
4220         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
4221         inferior_ptid.
4222         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
4223         inferior_ptid instead of pid.
4224
4225 2017-03-22  Yao Qi  <yao.qi@linaro.org>
4226
4227         * aarch64-tdep.c: Wrap locally used classes in anonymous
4228         namespace.
4229         * arm-tdep.c: Likewise.
4230         * linespec.c: Likewise.
4231         * ui-out.c: Likewise.
4232
4233 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
4234
4235         PR gdb/19637
4236         * python/lib/gdb/printer/bound_registers.py: Import sys.
4237
4238 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
4239
4240         * windows-nat.c (do_windows_fetch_inferior_registers): Add
4241         windows_thread_info parameter and use it instead of
4242         current_thread.
4243         (windows_fetch_inferior_registers): Don't set current_thread,
4244         pass the thread to do_windows_fetch_inferior_registers.  Use
4245         ptid from regcache instead of inferior_ptid.
4246         (do_windows_store_inferior_registers): Add windows_thread_info
4247         parameter and use it instead of current_thread.
4248         (windows_store_inferior_registers): Don't set current_thread,
4249         pass the thread to do_windows_store_inferior_registers.  Use
4250         ptid from regcache instead of inferior_ptid.
4251
4252 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
4253
4254         * ser-mingw.c (ser_windows_raw): Remove reference to
4255         struct serial::current_timeout.
4256
4257 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
4258
4259         PR tdep/20928
4260         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
4261         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
4262         (sparc64_fsr_type): Fix %fsr decoding.
4263
4264 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
4265
4266         * python/py-record-btrace.c (btpy_insn_data): Change return type
4267         for Python 2.
4268
4269 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
4270
4271         * spu-linux-nat.c (spu_fetch_inferior_registers,
4272         spu_store_inferior_registers): Use ptid from regcache, set and
4273         restore inferior_ptid.
4274         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
4275         Likewise.
4276
4277 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
4278
4279         * i386-linux-nat.c (fetch_register, store_register,
4280         i386_linux_fetch_inferior_registers,
4281         i386_linux_store_inferior_registers): Use ptid from regcache.
4282         * ia64-linux-nat.c (ia64_linux_fetch_register,
4283         ia64_linux_store_register): Likewise.
4284         * inf-ptrace.c (inf_ptrace_fetch_register,
4285         inf_ptrace_store_register): Likewise.
4286         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
4287         m32r_linux_store_inferior_registers): Likewise.
4288         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
4289         m68kbsd_store_inferior_registers): Likewise.
4290         * m68k-linux-nat.c (fetch_register, store_register,
4291         m68k_linux_fetch_inferior_registers,
4292         m68k_linux_store_inferior_registers): Likewise.
4293         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
4294         m88kbsd_store_inferior_registers): Likewise.
4295         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
4296         mips_fbsd_store_inferior_registers): Likewise.
4297         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
4298         mips64_linux_regsets_store_registers): Likewise.
4299         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
4300         mipsnbsd_store_inferior_registers): Likewise.
4301         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
4302         mips64obsd_store_inferior_registers): Likewise.
4303         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
4304         Likewise.
4305         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
4306         ppcfbsd_store_inferior_registers): Likewise.
4307         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
4308         ppc_linux_store_inferior_registers): Likewise.
4309         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
4310         ppcnbsd_store_inferior_registers): Likewise.
4311         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
4312         ppcobsd_store_registers): Likewise.
4313         * procfs.c (procfs_fetch_registers, procfs_store_registers):
4314         Likewise.
4315         * ravenscar-thread.c (ravenscar_fetch_registers,
4316         ravenscar_store_registers, ravenscar_prepare_to_store):
4317         Likewise.
4318         * record-btrace.c (record_btrace_fetch_registers,
4319         record_btrace_store_registers, record_btrace_prepare_to_store):
4320         Likewise.
4321         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
4322         Lookup inferior using ptid from regcache, instead of
4323         current_inferior.
4324         * remote.c (remote_fetch_registers, remote_store_registers): Use
4325         ptid from regcache.
4326         * rs6000-nat.c (fetch_register, store_register): Likewise.
4327         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
4328         s390_linux_store_inferior_registers): Likewise.
4329         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
4330         shnbsd_store_inferior_registers): Likewise.
4331         * sol-thread.c (sol_thread_fetch_registers,
4332         sol_thread_store_registers): Likewise.
4333         * sparc-nat.c (sparc_fetch_inferior_registers,
4334         sparc_store_inferior_registers): Likewise.
4335         * tilegx-linux-nat.c (fetch_inferior_registers,
4336         store_inferior_registers): Likewise.
4337         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
4338         vaxbsd_store_inferior_registers): Likewise.
4339         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
4340         store_xtregs): Likewise.
4341
4342 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
4343
4344         PR gdb/14441
4345         * NEWS: Mention support for rvalue references in GDB and python.
4346         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
4347         supports both lvalue and rvalue references.
4348
4349 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
4350
4351         PR gdb/14441
4352         * gdbtypes.c (rank_one_type): Implement overloading
4353         resolution rules regarding rvalue references.
4354
4355 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
4356
4357         PR gdb/14441
4358         * aarch64-tdep.c (aarch64_type_align)
4359         (aarch64_extract_return_value, aarch64_store_return_value): Change
4360         lvalue reference type checks to general reference type checks.
4361         * amd64-tdep.c (amd64_classify): Likewise.
4362         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
4363         Likewise.
4364         * arm-tdep.c (arm_type_align, arm_extract_return_value)
4365         (arm_store_return_value): Likewise.
4366         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
4367         * c-typeprint.c (c_print_type): Likewise.
4368         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
4369         (cplus_number_of_children, cplus_describe_child): Likewise.
4370         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4371         * completer.c (expression_completer): Likewise.
4372         * cp-support.c (make_symbol_overload_list_adl_namespace):
4373         Likewise.
4374         * darwin-nat-info.c (info_mach_region_command): Likewise.
4375         * dwarf2loc.c (entry_data_value_coerce_ref)
4376         (value_of_dwarf_reg_entry): Likewise.
4377         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
4378         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
4379         Likewise.
4380         * findvar.c (extract_typed_address, store_typed_address):
4381         Likewise.
4382         * gdbtypes.c (rank_one_type): Likewise.
4383         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
4384         * infcall.c (value_arg_coerce): Likewise.
4385         * language.c (pointer_type): Likewise.
4386         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
4387         Likewise.
4388         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
4389         * mn10300-tdep.c (mn10300_type_align): Likewise.
4390         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
4391         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
4392         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
4393         Likewise.
4394         * printcmd.c (print_formatted, x_command): Likewise.
4395         * python/py-type.c (typy_get_composite, typy_template_argument):
4396         Likewise.
4397         * python/py-value.c (valpy_referenced_value)
4398         (valpy_get_dynamic_type, value_has_field): Likewise.
4399         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
4400         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
4401         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
4402         * spu-tdep.c (spu_scalar_value_p): Likewise.
4403         * symtab.c (lookup_symbol_aux): Likewise.
4404         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
4405         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
4406         Likewise.
4407         * valops.c (value_cast_pointers, value_cast)
4408         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
4409         (value_struct_elt, value_struct_elt_bitpos)
4410         (value_find_oload_method_list, find_overload_match)
4411         (value_rtti_indirect_type): Likewise.
4412         * valprint.c (val_print_scalar_type_p, generic_val_print):
4413         Likewise.
4414         * value.c (value_actual_type, value_as_address, unpack_long)
4415         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
4416         (coerce_ref): Likewise.
4417         * varobj.c (varobj_get_value_type): Likewise.
4418
4419 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
4420
4421         PR gdb/14441
4422         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
4423         table of constants.
4424         * python/lib/gdb/command/explore.py: Support exploring values
4425         of rvalue reference types.
4426         * python/lib/gdb/types.py: Implement get_basic_type() for
4427         rvalue reference types.
4428         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
4429         constant.
4430         * python/py-value.c (valpy_getitem): Add an rvalue reference
4431         check.
4432         (valpy_reference_value): Add new parameter "refcode".
4433         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
4434         New wrappers for valpy_reference_value().
4435         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
4436         (gdbpy_invoke_xmethod): Likewise.
4437
4438 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
4439
4440         PR gdb/14441
4441         * dwarf2read.c (process_die, read_type_die_1): Handle the
4442         DW_TAG_rvalue_reference_type DIE.
4443         (read_tag_reference_type): Add new parameter "refcode".
4444
4445 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
4446
4447         PR gdb/14441
4448         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
4449         (c_type_print_modifier, c_type_print_varspec_suffix)
4450         (c_type_print_base): Support printing rvalue reference types.
4451         * c-valprint.c (c_val_print, c_value_print): Support printing
4452         rvalue reference values.
4453
4454 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
4455
4456         PR gdb/14441
4457         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
4458         typename.
4459         * cp-support.c (replace_typedefs): Handle
4460         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
4461         * python/py-type.c (typy_lookup_type): Likewise.
4462
4463 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
4464
4465         PR gdb/14441
4466         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
4467         * parse.c (insert_type): Change assert statement.
4468         (follow_types): Handle rvalue reference types.
4469         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
4470         constant.
4471
4472 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
4473
4474         PR gdb/14441
4475         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
4476         value_ref() interface.
4477         * c-valprint.c (c_value_print): Likewise.
4478         * infcall.c (value_arg_coerce): Likewise.
4479         * python/py-value.c (valpy_reference_value): Likewise.
4480         * valops.c (value_cast, value_reinterpret_cast)
4481         (value_dynamic_cast, typecmp): Likewise.
4482         (value_ref): Parameterize by kind of return value reference type.
4483         * value.h (value_ref): Add new parameter "refcode".
4484
4485 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
4486
4487         PR gdb/14441
4488         * dwarf2read.c (read_tag_reference_type): Use
4489         lookup_lvalue_reference_type() instead of lookup_reference_type().
4490         * eval.c (evaluate_subexp_standard): Likewise.
4491         * f-exp.y: Likewise.
4492         * gdbtypes.c (make_reference_type, lookup_reference_type):
4493         Generalize with rvalue reference types.
4494         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
4495         convenience wrappers for lookup_reference_type().
4496         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
4497         reference kind parameter.
4498         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
4499         wrappers for lookup_reference_type().
4500         * guile/scm-type.c (gdbscm_type_reference): Use
4501         lookup_lvalue_reference_type() instead of lookup_reference_type().
4502         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
4503         * parse.c (follow_types): Likewise.
4504         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
4505         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
4506         Likewise.
4507         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
4508         (gdbpy_invoke_xmethod): Likewise.
4509         * stabsread.c: Provide extra argument to make_reference_type()
4510         call.
4511         * valops.c (value_ref, value_rtti_indirect_type): Use
4512         lookup_lvalue_reference_type() instead of lookup_reference_type().
4513
4514 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
4515
4516         PR gdb/14441
4517         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
4518         (TYPE_IS_REFERENCE): New macro.
4519         (struct type): Add rvalue_reference_type field.
4520         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
4521
4522 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
4523
4524         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
4525         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
4526         New function definition.
4527         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
4528         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
4529         New function declaration.
4530         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
4531         * mi/mi-interp.h: New file.
4532         * solib.c (info_sharedlibrary_command): Replace for loop with
4533         ALL_SO_LIBS macro
4534         * solib.h (update_solib_list): New function declaration.
4535         (so_list_head): Move macro.
4536         * solist.h (ALL_SO_LIBS): New macro.
4537
4538 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
4539
4540         * infcmd.c (post_create_inferior): Remove unused argument in
4541         call to solib_add.
4542         * remote.c (remote_start_remote): Likewise.
4543         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
4544         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
4545         (enable_break): Likewise.
4546         * solib.c (update_solib_list): Remove unused target argument
4547         and its documentation.
4548         (solib_add): Remove unused target argument.  Remove unused
4549         argument in call to update_solib_list.
4550         (info_sharedlibrary_command): Remove unused argument in call
4551         to update_solib_list.
4552         (sharedlibrary_command): Remove unused argument in call to
4553         solib_add.
4554         (handle_solib_event): Likewise.
4555         (reload_shared_libraries): Likewise.
4556         * solib.h (solib_add): Remove unused target argument.
4557
4558 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4559
4560         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
4561         (s390_displaced_step_fixup): Cover relative branches with the
4562         default fixup handling.  This fixes lack of support for some
4563         relative branch instructions.
4564
4565 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
4566
4567         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
4568         ptid from regcache.
4569
4570 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
4571
4572         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
4573         i386_darwin_store_inferior_registers): Use ptid from regcache.
4574
4575 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
4576
4577         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
4578         i386bsd_store_inferior_registers): Use ptid from regcache.
4579
4580 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
4581
4582         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
4583         hppaobsd_store_registers): Use ptid from regcache.
4584
4585 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
4586
4587         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
4588         hppanbsd_store_registers): Use ptid from regcache.
4589
4590 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
4591
4592         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
4593         from regcache.  Use get_ptrace_pid.
4594
4595 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
4596
4597         * corelow.c (get_core_register_section): Use ptid from regcache,
4598         update doc.
4599
4600 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
4601
4602         * bsd-uthread.c (bsd_uthread_fetch_registers,
4603         bsd_uthread_store_registers): Use ptid from regcache, set and
4604         restore inferior_ptid.
4605
4606 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
4607
4608         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
4609         fetch_fp_regs, store_register, store_regs, store_fp_register,
4610         store_fp_regs): Use ptid from regcache.
4611
4612 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
4613
4614         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
4615         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
4616         store_vfp_regs): Use ptid from regcache.
4617
4618 2017-03-17  Pedro Alves  <palves@redhat.com>
4619
4620         PR remote/21188
4621         * ser-base.c (ser_base_wait_for): Add comment.
4622         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
4623         version.
4624         * ser-unix.c (hardwire_raw): Remove reference to
4625         scb->current_timeout.
4626         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
4627         (hardwire_ops): Install ser_base_readchar instead of
4628         hardwire_readchar.
4629         * serial.h (struct serial) <current_timeout, timeout_remaining>:
4630         Remove fields.
4631
4632 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
4633
4634         PR gdb/19637
4635         * python/lib/gdb/printer/bound_registers.py: Add support for
4636         Python 3.
4637
4638 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4639
4640         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
4641         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
4642         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
4643         byte_offset to subobj_byte_offset.  Fix the handling of
4644         DWARF_VALUE_STACK on big-endian targets when coming via an
4645         implicit pointer.
4646         (dwarf2_evaluate_loc_desc): Adjust call to
4647         dwarf2_evaluate_loc_desc_full.
4648         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
4649         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
4650
4651 2017-03-16  Yao Qi  <yao.qi@linaro.org>
4652
4653         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
4654         and REVSH instructions.
4655
4656 2017-03-16  Yao Qi  <yao.qi@linaro.org>
4657
4658         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
4659         (arm_record_test): Declare.
4660         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
4661         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
4662         align with the manual.
4663         (thumb_record_misc): Adjust the code order to align with the
4664         manual.
4665         (thumb2_record_decode_insn_handler): Fix instruction matching.
4666         (instruction_reader_thumb): New class.
4667         (arm_record_test): New function.
4668
4669 2017-03-16  Yao Qi  <yao.qi@linaro.org>
4670
4671         * arm-tdep.c (abstract_memory_reader): New class.
4672         (instruction_reader): New class.
4673         (extract_arm_insn): Add argument 'reader'.  Callers updated.
4674         (decode_insn): Likewise.
4675
4676 2017-03-16  Doug Evans  <dje@google.com>
4677
4678         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
4679         member.  Change type of TYPE member to SCM.  All uses updated.
4680         (lsscm_make_lazy_string_smob): Add assert.
4681         (lsscm_make_lazy_string): Flag bad length values.
4682         (lsscm_elt_type): New function.
4683         (gdbscm_lazy_string_to_value): Rewrite to use
4684         lsscm_safe_lazy_string_to_value.
4685         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
4686         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
4687         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
4688         in incoming type.
4689         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
4690         * guile/scm-type.c (tyscm_scm_to_type): New function.
4691
4692 2017-03-15  Doug Evans  <dje@google.com>
4693
4694         PR python/17728, python/18439, python/18779
4695         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
4696         member.  Change type of TYPE member to PyObject *.  All uses updated.
4697         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
4698         (gdbpy_create_lazy_string_object): Flag bad length values.
4699         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
4700         Handle typedefs in incoming type.
4701         (stpy_lazy_string_elt_type): New function.
4702         (gdbpy_extract_lazy_string): Call it.
4703         * python/py-value.c (valpy_lazy_string): Flag bad length values.
4704         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
4705         typedefs in incoming type.
4706
4707 2017-03-16  Doug Evans  <dje@google.com>
4708
4709         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
4710         * guile/scm-type.c (tyscm_scm_to_type): New function.
4711
4712 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
4713
4714         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
4715         "ULONGEST" for "skip".
4716
4717 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4718
4719         PR gdb/21220
4720         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
4721         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
4722         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
4723         over ptrace peek/poke until end of buffer or error.
4724
4725 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
4726
4727         * parse.c (length_of_subexp): Make static.
4728         * parser-defs.h (length_of_subexp): Remove.
4729
4730 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4731
4732         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
4733         as well.
4734
4735 2017-03-14  Pedro Alves  <palves@redhat.com>
4736
4737         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
4738         (main): Use std::unique_ptr.  Remove calls to
4739         cp_demangled_name_parse_free.
4740
4741 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
4742
4743         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
4744         alphabsd_store_inferior_registers): Use regcache->ptid instead
4745         of inferior_ptid.
4746
4747 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
4748
4749         * aix-thread.c (aix_thread_fetch_registers,
4750         aix_thread_store_registers): Use regcache->ptid instead of
4751         inferior_ptid.
4752
4753 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
4754
4755         * aarch64-linux-nat.c (fetch_gregs_from_thread,
4756         store_gregs_to_thread, fetch_fpregs_from_thread,
4757         store_fpregs_to_thread): Use regcache->ptid instead of
4758         inferior_ptid.
4759
4760 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
4761
4762         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
4763         amd64_linux_fetch_inferior_registers): Use regcache->ptid
4764         instead of inferior_ptid.
4765
4766 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
4767
4768         * target.c (target_fetch_registers, target_store_registers): Add
4769         assert.
4770
4771 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
4772
4773         * regcache.h (regcache_get_ptid): New function.
4774         * regcache.c (regcache_get_ptid): New function.
4775
4776 2017-03-13  Mark Wielaard  <mark@klomp.org>
4777
4778         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
4779
4780 2017-03-10  Keith Seitz  <keiths@redhat.com>
4781
4782         PR c++/8218
4783         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
4784
4785 2017-03-08  Pedro Alves  <palves@redhat.com>
4786
4787         PR gdb/18360
4788         * infrun.c (start_step_over, do_target_resume, resume)
4789         (restart_threads): Assert we're not resuming a thread that is
4790         meant to be stopped.
4791         (infrun_thread_stop_requested_callback): Delete.
4792         (infrun_thread_stop_requested): If the thread is internally
4793         stopped, queue a pending stop event and clear the thread's
4794         inline-frame state.
4795         (handle_stop_requested): New function.
4796         (handle_syscall_event, handle_inferior_event_1): Use
4797         handle_stop_requested.
4798         (handle_stop_requested): New function.
4799         (handle_signal_stop): Set the thread's stop_signal here instead of
4800         at caller.
4801         (finish_step_over): Clear step over info unconditionally.
4802         (handle_signal_stop): If the user had interrupted the event
4803         thread, consider the stop a random signal.
4804         (handle_signal_stop) <signal arrived while stepping over
4805         breakpoint>: Don't restart threads here.
4806         (stop_waiting): Don't clear step-over info here.
4807
4808 2017-03-08  Pedro Alves  <palves@redhat.com>
4809
4810         PR 21206
4811         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
4812         goes to argument 2, not 1.
4813
4814 2017-03-08  Pedro Alves  <palves@redhat.com>
4815
4816         PR cli/21218
4817         * top.c (gdb_readline_wrapper): Avoid passing NULL to
4818         display_gdb_prompt.
4819         (command_line_input): Add comment.
4820
4821 2017-03-08  Pedro Alves  <palves@redhat.com>
4822
4823         PR tui/21216
4824         * tui/tui-file.c (tui_file::write): New.
4825         * tui/tui-file.h (tui_file): Override "write".
4826         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
4827         factored out from ...
4828         (tui_puts): ... here.
4829         (tui_putc): Use them.
4830         (tui_write): New function.
4831         * tui/tui-io.h (tui_write): Declare.
4832
4833 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4834
4835         * Makefile.in (SFILES): Replace "environ.c" with
4836         "common/environ.c".
4837         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
4838         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
4839         to...
4840         * common/environ.c: ... here.
4841         * environ.h: Moved to...
4842         * common/environ.h: ... here.
4843
4844 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
4845
4846         * gdbarch.sh (pstring_ptr): New static function.
4847         (gdbarch_disassembler_options): Use it.
4848         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
4849         not valid_disassembler_option->name.
4850         * gdbarch.c: Regenerate.
4851
4852 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
4853
4854         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
4855
4856 2017-03-07  Pedro Alves  <palves@redhat.com>
4857
4858         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
4859
4860 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4861
4862         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
4863         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
4864         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
4865         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4866
4867 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
4868
4869         * xtensa-linux-nat.c (fetch_gregs): Remove const.
4870
4871 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
4872
4873         * remote.c (remote_add_target_side_commands): Use range-based
4874         for loop.
4875
4876 2017-03-03  Yao Qi  <yao.qi@linaro.org>
4877
4878         PR gdb/21165
4879         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
4880         value is lazy.
4881         * valprint.c (common_val_print): Likewise.
4882
4883 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
4884
4885         * NEWS: Mention new set/show disassembler-options commands.
4886         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
4887         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
4888         (prospective_options): New static variable.
4889         (gdb_disassembler::gdb_disassembler): Initialize
4890         m_di.disassembler_options.
4891         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
4892         (get_disassembler_options): New function.
4893         (set_disassembler_options): Likewise.
4894         (set_disassembler_options_sfunc): Likewise.
4895         (show_disassembler_options_sfunc): Likewise.
4896         (disassembler_options_completer): Likewise.
4897         (_initialize_disasm): Likewise.
4898         * disasm.h (get_disassembler_options): New prototype.
4899         (set_disassembler_options): Likewise.
4900         * gdbarch.sh (gdbarch_disassembler_options): New variable.
4901         (gdbarch_verify_disassembler_options): Likewise.
4902         * gdbarch.c: Regenerate.
4903         * gdbarch.h: Likewise.
4904         * arm-tdep.c (num_disassembly_options): Delete.
4905         (set_disassembly_style): Likewise.
4906         (arm_disassembler_options): New static variable.
4907         (set_disassembly_style_sfunc): Convert short style name into long
4908         option name.  Call set_disassembler_options.
4909         (show_disassembly_style_sfunc): New function.
4910         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
4911         set_gdbarch_verify_disassembler_options.
4912         (_initialize_arm_tdep): Delete regnames variable and update callers.
4913         (arm_disassembler_options): Initialize.
4914         (disasm_options): New variable.
4915         (num_disassembly_options): Rename from this...
4916         (num_disassembly_styles): ...to this.  Compute by scanning through
4917         disasm_options.
4918         (valid_disassembly_styles): Initialize using disasm_options.
4919         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
4920         set_arm_regname_option.
4921         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
4922         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
4923         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
4924         set_gdbarch_verify_disassembler_options.
4925         * s390-tdep.c (s390_disassembler_options): New static variable.
4926         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
4927         set_gdbarch_verify_disassembler_options.
4928
4929 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
4930
4931         * remote.c (remote_add_target_side_condition): Remove "struct"
4932         keyword from range-based for loop.
4933
4934 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
4935
4936         * remote.c (remote_add_target_side_condition): Use range-based
4937         for loop.  Update comment.
4938
4939 2017-02-27  Yao Qi  <yao.qi@linaro.org>
4940
4941         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
4942
4943 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
4944
4945         * regcache.c (regcache_raw_update): New function.
4946         (regcache_raw_read): Move code to regcache_raw_update.
4947         * regcache.h (regcache_raw_update): New declaration.
4948         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
4949
4950 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
4951
4952         * dwarf2read.c (create_debug_type_hash_table): Initialize
4953         header.signature and header.type_offset_in_tu.
4954
4955 2017-02-24  Pedro Alves  <palves@redhat.com>
4956
4957         * symtab.c (make_file_symbol_completion_list_1): Use
4958         add_symtab_completions.
4959
4960 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
4961
4962         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
4963
4964 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
4965
4966         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
4967         I386_MAX_REGISTER_SIZE.
4968         (i386_pseudo_register_write): Likewise.
4969         (i386_process_record): Likewise.
4970         * i387-tdep.c (i387_supply_xsave): Likewise.
4971         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
4972         (store_register): Likewise.
4973
4974 2017-02-23  Pedro Alves  <palves@redhat.com>
4975
4976         * ada-lang.c: Include "common/function-view.h".
4977         (ada_iterate_over_symbols): Adjust to use function_view as
4978         callback type.
4979         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
4980         (ada_make_symbol_completion_list): Use a lambda.
4981         (ada_exc_search_name_matches): Delete.
4982         (name_matches_regex): New.
4983         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
4984         * compile/compile-c-support.c: Include "common/function-view.h".
4985         (print_one_macro): Change prototype to accept a ui_file pointer.
4986         (write_macro_definitions): Use a lambda.
4987         * dwarf2read.c: Include "common/function-view.h".
4988         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
4989         (dw2_expand_symtabs_matching): Adjust to use function_view as
4990         callback type.
4991         * language.h: Include "common/function-view.h".
4992         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
4993         function_view as callback type.
4994         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
4995         * linespec.c: Include "common/function-view.h".
4996         (collect_info::add_symbol): New method.
4997         (struct symbol_and_data_callback, iterate_inline_only, struct
4998         symbol_matcher_data, iterate_name_matcher): Delete.
4999         (iterate_over_all_matching_symtabs): Adjust to use function_view
5000         as callback type and lambdas.
5001         (iterate_over_file_blocks): Adjust to use function_view as
5002         callback type.
5003         (decode_compound_collector): Now a class with private fields.
5004         (decode_compound_collector::release_symbols): New method.
5005         (collect_one_symbol): Rename to...
5006         (decode_compound_collector::operator()): ... this and adjust.
5007         (lookup_prefix_sym): decode_compound_collector construction bits
5008         move to decode_compound_collector ctor.  Pass the
5009         decode_compound_collector object directly as callback.  Remove
5010         cleanups and use decode_compound_collector::release_symbols
5011         instead.
5012         (symtab_collector): Now a class with private fields.
5013         (symtab_collector::release_symtabs): New method.
5014         (add_symtabs_to_list): Rename to...
5015         (symtab_collector::operator()): ... this and adjust.
5016         (collect_symtabs_from_filename): symtab_collector construction
5017         bits move to symtab_collector ctor.  Pass the symtab_collector
5018         object directly as callback.  Remove cleanups and use
5019         symtab_collector::release_symtabs instead.
5020         (collect_symbols): Delete.
5021         (add_matching_symbols_to_info): Use lambdas.
5022         * macrocmd.c (print_macro_callback): Delete.
5023         (info_macro_command): Use a lambda.
5024         (info_macros_command): Pass print_macro_definition as callable
5025         directly.
5026         (print_one_macro): Remove 'ignore' parameter.
5027         (macro_list_command): Adjust.
5028         * macrotab.c (macro_for_each_data::fn): Now a function_view.
5029         (macro_for_each_data::user_data): Delete field.
5030         (foreach_macro): Adjust to call the function_view.
5031         (macro_for_each): Adjust to use function_view as callback type.
5032         (foreach_macro_in_scope): Adjust to call the function_view.
5033         (macro_for_each_in_scope): Adjust to use function_view as callback
5034         type.
5035         * macrotab.h: Include "common/function-view.h".
5036         (macro_callback_fn): Declare a prototype instead of a pointer.
5037         Remove "user_data" parameter.
5038         (macro_for_each, macro_for_each_in_scope): Adjust to use
5039         function_view as callback type.
5040         * psymtab.c (partial_map_expand_apply)
5041         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
5042         Adjust to use function_view as callback type and to return bool.
5043         (psym_expand_symtabs_matching): Adjust to use function_view as
5044         callback types.
5045         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
5046         to use function_view as callback type and to return bool.
5047         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
5048         callback types.
5049         * symfile.c (expand_symtabs_matching): Adjust to use function_view
5050         as callback types.
5051         * symfile.h: Include "common/function-view.h".
5052         (expand_symtabs_file_matcher_ftype)
5053         (expand_symtabs_symbol_matcher_ftype)
5054         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
5055         return bool.
5056         (quick_symbol_functions::map_symtabs_matching_filename)
5057         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
5058         function_view as callback type and return bool.
5059         (expand_symtabs_matching): Adjust to use function_view as callback
5060         type.
5061         (maintenance_expand_name_matcher)
5062         (maintenance_expand_file_matcher): Delete.
5063         (maintenance_expand_symtabs): Use lambdas.
5064         * symtab.c (iterate_over_some_symtabs): Adjust to use
5065         function_view as callback types and return bool.
5066         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
5067         of a cleanup.
5068         (lookup_symtab_callback): Delete.
5069         (lookup_symtab): Use a lambda.
5070         (iterate_over_symbols): Adjust to use function_view as callback
5071         type.
5072         (struct search_symbols_data, search_symbols_file_matches)
5073         (search_symbols_name_matches): Delete.
5074         (search_symbols): Use a pair of lambdas.
5075         (struct add_name_data, add_macro_name, symbol_completion_matcher)
5076         (symtab_expansion_callback): Delete.
5077         (default_make_symbol_completion_list_break_on_1): Use lambdas.
5078         * symtab.h: Include "common/function-view.h".
5079         (iterate_over_some_symtabs): Adjust to use function_view as
5080         callback type and return bool.
5081         (iterate_over_symtabs): Adjust to use function_view as callback
5082         type.
5083         (symbol_found_callback_ftype): Remove 'data' parameter and return
5084         bool.
5085         (iterate_over_symbols): Adjust to use function_view as callback
5086         type.
5087
5088 2017-02-23  Pedro Alves  <palves@redhat.com>
5089
5090         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
5091         (%.o) <unittests/%.c>: New pattern.
5092         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
5093         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
5094         * common/function-view.h: New file.
5095         * unittests/function-view-selftests.c: New file.
5096         * configure: Regenerate.
5097
5098 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
5099
5100         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
5101         inferior_ptid.
5102         * go32-nat.c (go32_thread_alive): Likewise.
5103
5104 2017-02-23  Yao Qi  <yao.qi@linaro.org>
5105
5106         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
5107         delete.
5108
5109 2017-02-23  Yao Qi  <yao.qi@linaro.org>
5110
5111         * varobj.c (varobj_clear_saved_item): Use delete instead of
5112         xfree.
5113         (update_dynamic_varobj_children): Likewise.
5114
5115 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
5116
5117         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
5118
5119 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
5120
5121         * common/enum-flags.h (enum_flags::enum_flags): Initialize
5122         m_enum_value to 0 in default constructor.
5123
5124 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
5125
5126         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
5127         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
5128         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
5129         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
5130         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
5131         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
5132         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
5133         IS_STORE_CONDITIONAL_INSN.
5134
5135 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
5136
5137         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
5138
5139 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5140
5141         * NEWS (Changes since GDB 7.12): Add DWARF-5.
5142
5143 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5144
5145         * dwarf2read.c (skip_one_die, read_attribute_value)
5146         (dwarf2_const_value_attr, dump_die_shallow)
5147         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5148         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
5149
5150 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5151
5152         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
5153         (dwarf_parse_macro_header): Accept DWARF version 5.
5154         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
5155
5156 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5157
5158         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
5159         DW_AT_GNU_*.
5160         * common/common-exceptions.h (enum errors): Likewise.
5161         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
5162         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
5163         (dwarf_expr_context::execute_stack_op): Likewise.
5164         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
5165         Likewise.
5166         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
5167         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
5168         (show_entry_values_debug, call_site_to_target_addr)
5169         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
5170         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
5171         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
5172         (value_of_dwarf_block_entry, indirect_pieced_value)
5173         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
5174         (disassemble_dwarf_expression): Likewise.
5175         * dwarf2read.c (process_die, inherit_abstract_dies)
5176         (read_call_site_scope): Likewise.
5177         * gdbtypes.h (struct func_type, struct call_site_parameter)
5178         (struct call_site): Likewise.
5179         * stack.c (read_frame_arg): Likewise.
5180         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
5181
5182 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5183
5184         * defs.h (read_unsigned_leb128): New declaration.
5185         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
5186         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
5187         (dwarf2_find_location_expression): Call also
5188         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
5189         * dwarf2loc.h (dwarf2_version): New declaration.
5190         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
5191         rnglists.
5192         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
5193         .debug_rnglists.
5194         (struct dwop_section_names): Add loclists_dwo.
5195         (dwop_section_names): Add .debug_loclists.dwo.
5196         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
5197         (struct dwarf2_per_cu_data): Add dwarf_version.
5198         (struct dwo_sections): Add loclists.
5199         (struct attr_abbrev): Add implicit_const.
5200         (read_indirect_line_string): New declaration.
5201         (read_unsigned_leb128): Delete declaration.
5202         (rcuh_kind): New definition.
5203         (read_and_check_comp_unit_head): Change parameter
5204         is_debug_types_section to section_kind.
5205         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
5206         (read_comp_unit_head): Change parameter abfd to section, add parameter
5207         section_kind.  Handle DWARF-5.
5208         (error_check_comp_unit_head): Accept also DWARF version 5.
5209         (read_and_check_comp_unit_head): Change parameter
5210         is_debug_types_section to section_kind.
5211         (read_and_check_type_unit_head): Delete function.
5212         (read_abbrev_offset): Handle DWARF-5.
5213         (create_debug_type_hash_table): Add parameter section_kind.  Process
5214         only DW_UT_type.  Use signature and type_offset_in_tu from struct
5215         comp_unit_head.
5216         (create_debug_types_hash_table): Update create_debug_type_hash_table
5217         caller.
5218         (create_all_type_units): Call create_debug_type_hash_table.
5219         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
5220         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
5221         caller.
5222         (skip_one_die): Handle DW_FORM_implicit_const.
5223         (dwarf2_rnglists_process): New function.
5224         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
5225         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
5226         (read_attribute_value): Handle DW_FORM_implicit_const,
5227         DW_FORM_line_strp.
5228         (read_attribute): Handle DW_FORM_implicit_const.
5229         (read_indirect_string_at_offset_from): New function from
5230         read_indirect_string_at_offset.
5231         (read_indirect_string_at_offset): Call
5232         read_indirect_string_at_offset_from.
5233         (read_indirect_line_string_at_offset): New function.
5234         (read_indirect_string): New function comment.
5235         (read_indirect_line_string): New function.
5236         (read_unsigned_leb128): Make it global.
5237         (dwarf2_string_attr): Handle DWARF-5.
5238         (add_include_dir_stub, read_formatted_entries): New functions.
5239         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
5240         Handle DWARF-5.
5241         (per_cu_header_read_in): Update read_comp_unit_head caller.
5242         (dwarf2_version): New function.
5243         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
5244         rnglists.
5245         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
5246         fields.
5247
5248 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5249
5250         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
5251
5252 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5253
5254         * dwarf2read.c (dwarf2_ranges_process): New function from
5255         dwarf2_ranges_read.
5256         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
5257         dwarf2_ranges_process.
5258
5259 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5260
5261         * dwarf2read.c (create_debug_type_hash_table): New function from
5262         create_debug_types_hash_table.
5263         (create_debug_types_hash_table): Call create_debug_type_hash_table.
5264         (create_all_type_units, open_and_init_dwo_file): Update
5265         create_debug_types_hash_table callers.
5266
5267 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5268
5269         PR gdb/16188
5270         * fork-child.c (trace_start_error): Fix thinko.  va_end should
5271         refer to 'ap', not 'args'.
5272
5273 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5274             Pedro Alves  <palves@redhat.com>
5275
5276         PR gdb/16188
5277         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
5278         calls succeeded.
5279         * fork-child.c (trace_start_error): New function.
5280         (trace_start_error_with_name): Likewise.
5281         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
5282         * inf-ptrace.c (inf_ptrace_me): Likewise.
5283         * inferior.h (trace_start_error): New prototype.
5284         (trace_start_error_with_name): Likewise.
5285
5286 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5287
5288         PR gdb/21164
5289         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
5290         NULL before using it.
5291         * symmisc.c (maintenance_print_symbols): Likewise.
5292         (maintenance_print_msymbols): Likewise.
5293
5294 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
5295
5296         * NEWS: Add record Python bindings entry.
5297
5298 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
5299
5300         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
5301         py-record-full.o.
5302         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
5303         * python/py-record-btrace.c, python/py-record-btrace.h,
5304         python/py-record-full.c, python/py-record-full.h: New file.
5305         * python/py-record.c: Add include for py-record-btrace.h and
5306         py-record-full.h.
5307         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
5308         recpy_instruction_history, recpy_function_call_history, recpy_begin,
5309         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
5310         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
5311         New definition.
5312         (gdbpy_initialize_btrace): New export.
5313         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
5314
5315 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
5316
5317         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
5318         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
5319         * python/py-record.c: New file.
5320         * python/python-internal.h (gdbpy_start_recording,
5321         gdbpy_current_recording, gdpy_stop_recording,
5322         gdbpy_initialize_record): New export.
5323         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
5324         (python_GdbMethods): Add gdbpy_start_recording,
5325         gdbpy_current_recording and gdbpy_stop_recording.
5326
5327 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
5328
5329         * record-btrace.c (record_btrace_record_method): New function.
5330         (init_record_btrace_ops): Initialize to_record_method.
5331         * record-full.c (record_full_record_method): New function.
5332         (init_record_full_ops, init_record_full_core_ops): Add
5333         record_full_record_method.
5334         * record.h (enum record_method): New enum.
5335         * target-debug.h (target_debug_print_enum_record_method: New define.
5336         * target-delegates.c: Regenerate.
5337         * target.c (target_record_method): New function.
5338         * target.h: Include record.h.
5339         (struct target_ops) <to_record_method>: New field.
5340         (target_record_method): New export.
5341
5342 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
5343
5344         * record.h (record_start, record_stop): New export.
5345         * record.c (record_start, record_stop): New function.
5346
5347 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
5348
5349         * btrace.c (btrace_fetch): Copy function call segments pointer
5350         into a vector.
5351         (btrace_clear): Clear the vector.
5352         (btrace_find_insn_by_number): Use binary search to find the correct
5353         function call segment.
5354         * btrace.h (brace_fun_p): New typedef.
5355         (struct btrace_thread_info) <functions>: New field.
5356
5357 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
5358
5359         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
5360         * btrace.c (btrace_decode_error): ... here.  New function.
5361         * btrace.h (btrace_decode_error): New export.
5362
5363 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
5364
5365         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
5366         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
5367         btrace_find_insn_by_number): Remove special case for gaps.
5368         * btrace.h (btrace_insn_get_error): New export.
5369         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
5370         * record-btrace.c (btrace_insn_history): Print number for gaps.
5371         (record_btrace_info, record_btrace_goto): Handle gaps.
5372
5373 2017-02-14  Tom Tromey  <tom@tromey.com>
5374
5375         PR python/13598:
5376         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
5377         event.
5378         * python/py-evts.c (gdbpy_initialize_py_events): Add
5379         before_prompt registry.
5380         * python/py-events.h (events_object) <before_prompt>: New field.
5381
5382 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
5383
5384         * btrace.c (ftrace_new_switch): Preserve up link and flags.
5385
5386 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
5387
5388         * symfile (_initialize_symfile): Add usage text to the load command's
5389         help text.
5390
5391 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
5392
5393         * utils.c (defaulted_query): Don't query on secondary UIs.
5394
5395 2017-02-10  Tom Tromey  <tom@tromey.com>
5396
5397         * rust-lang.c (rust_get_disr_info): Remove unused variable.
5398
5399 2017-02-10  Tom Tromey  <tom@tromey.com>
5400
5401         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
5402         "cleanup" local.
5403         * python/py-type.c (typy_legacy_template_argument): Remove
5404         unnecessary "cleanup" local.
5405
5406 2017-02-10  Tom Tromey  <tom@tromey.com>
5407
5408         * python/python.c (do_start_initialization): New function, from
5409         _initialize_python.
5410         (_initialize_python): Call do_start_initialization.
5411         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
5412         goto.
5413
5414 2017-02-10  Tom Tromey  <tom@tromey.com>
5415
5416         * python/py-prettyprint.c (pretty_print_one_value): Use
5417         gdbpy_ref.
5418
5419 2017-02-10  Tom Tromey  <tom@tromey.com>
5420
5421         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
5422         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
5423         gdbpy_ref.
5424         * python/py-type.c (field_new): Use gdbpy_ref.
5425         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
5426         gdbpy_ref.
5427         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
5428         (py_free_pspace): Likewise.
5429         (pspace_to_pspace_object): Likewise.
5430         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
5431         (py_free_objfile): Likewise.
5432         (objfile_to_objfile_object): Likewise.
5433         * python/py-inferior.c (delete_thread_object): Use
5434         gdbpy_ref.
5435         (infpy_read_memory): Likewise.
5436         (py_free_inferior): Likewise.
5437         * python/py-evtregistry.c (create_eventregistry_object): Use
5438         gdbpy_ref.
5439         * python/py-event.c (create_event_object): Use gdbpy_ref.
5440
5441 2017-02-10  Tom Tromey  <tom@tromey.com>
5442
5443         * python/py-ref.h (gdbpy_ref_policy): Now a template.
5444         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
5445         used.
5446         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
5447         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
5448         python/py-exitedevent.c, python/py-finishbreakpoint.c,
5449         python/py-framefilter.c, python/py-function.c,
5450         python/py-inferior.c, python/py-infevents.c,
5451         python/py-linetable.c, python/py-newobjfileevent.c,
5452         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
5453         python/py-signalevent.c, python/py-stopevent.c,
5454         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
5455         python/py-unwind.c, python/py-utils.c, python/py-value.c,
5456         python/py-varobj.c, python/py-xmethods.c, python/python.c,
5457         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
5458
5459 2017-02-10  Tom Tromey  <tom@tromey.com>
5460
5461         * ui-out.h (ui_out_emit_type): New class.
5462         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
5463         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
5464         and ui_out_emit_tuple.
5465         (enumerate_locals): Likewise.
5466         (py_mi_print_variables, py_print_locals, py_print_args): Use
5467         ui_out_emit_list.
5468         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
5469         ui_out_emit_list.
5470         * common/gdb_optional.h: New file.
5471
5472 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
5473
5474         * MAINTAINERS (Write After Approval): Update my e-mail address.
5475
5476 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
5477
5478         PR gdb/21122
5479         * breakpoint.c (_initialize_breakpoint): Update the help description
5480         of the 'commands' command to indicate that it takes a list argument.
5481
5482 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
5483
5484         * interps.c (current_interp_set_logging): Remove "return".
5485
5486 2017-02-09  Gary Benson  <gbenson@redhat.com>
5487
5488         * symtab.c (add_symtab_completions): Prevent NULL pointer
5489         dereference.
5490
5491 2017-02-08  Pedro Alves  <palves@redhat.com>
5492
5493         * interps.c (interp::interp): Remove reference to quiet_p.
5494         (interp_set): Make static.  Remove dead "Switching to" output
5495         code.
5496         (interp_quiet_p, interp_set_quiet): Delete.
5497         (interpreter_exec_cmd): Don't set the interpreter quiet.
5498         * interps.h (interp_quiet_p): Make static.
5499         (class interp) <quiet_p>: Remove field
5500
5501 2017-02-08  Jerome Guitton  <guitton@adacore.com>
5502
5503         * cli/cli-decode.c (find_command_name_length): Make it extern.
5504         * cli/cli-decode.h (find_command_name_length): Declare.
5505         * cli/cli-script.c (command_name_equals, line_first_arg):
5506         New functions.
5507         (process_next_line): Use cli-decode to parse command names.
5508         (build_command_line): Make args a constant pointer.
5509
5510 2017-02-08  Jerome Guitton  <guitton@adacore.com>
5511
5512         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
5513         Remove case-insensitive search.
5514
5515 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
5516
5517         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
5518         at the end of the line.  Avoids an ARI warning.
5519
5520 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
5521
5522         * NEWS: Mention support for record/replay of Intel 64 rdrand and
5523         rdseed instructions.
5524         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
5525
5526 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
5527
5528         PR tdep/20936
5529         Provide and use sparc32 and sparc64 target description XML files.
5530         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
5531         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
5532         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
5533         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
5534         * features/sparc/sparc32-solaris.xml: New file.
5535         * features/sparc/sparc64-solaris.xml: New file.
5536         * features/sparc/sparc32-solaris.c: Generated.
5537         * features/sparc/sparc64-solaris.c: Generated.
5538         * sparc-tdep.h: Account for differences in target descriptions.
5539         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
5540         (sparc32_register_type): Use target provided registers.
5541         (validate_tdesc_registers): New function.
5542         (sparc32_gdbarch_init): Use tdesc_has_registers.
5543         Set pseudoregister functions.
5544         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
5545         (sparc64_register_type): Use target provided registers.
5546         (sparc64_init_abi): Set pseudoregister functions.
5547
5548 2017-02-03  Tom Tromey  <tom@tromey.com>
5549
5550         PR rust/21097:
5551         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
5552         with a single member.
5553
5554 2017-02-03  Pedro Alves  <palves@redhat.com>
5555
5556         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
5557         (cli_interp_base::~cli_interp_base): New.
5558         (cli_interp): New struct.
5559         (as_cli_interp): Cast the interp itself to cli_interp.
5560         (cli_interpreter_pre_command_loop): Rename to ...
5561         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
5562         parameter.
5563         (cli_interpreter_init): Rename to ...
5564         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
5565         boolean.  Make extern.
5566         (cli_interpreter_resume): Rename to ...
5567         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
5568         extern.
5569         (cli_interpreter_suspend): Rename to ...
5570         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
5571         extern.
5572         (cli_interpreter_exec): Rename to ...
5573         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
5574         extern.
5575         (cli_interpreter_supports_command_editing): Rename to ...
5576         (cli_interp_base::supports_command_editing): ... this.  Remove
5577         'interp' parameter.  Make extern.
5578         (cli_ui_out): Rename to ...
5579         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
5580         Make extern.
5581         (cli_set_logging): Rename to ...
5582         (cli_interp_base::set_logging): ... this.  Remove 'interp'
5583         parameter.  Make extern.
5584         (cli_interp_procs): Delete.
5585         (cli_interp_factory): Adjust to use "new".
5586         * cli/cli-interp.h: Include "interps.h".
5587         (struct cli_interp_base): New struct.
5588         * interps.c (struct interp): Delete.  Fields moved to interps.h.
5589         (interp_new): Delete.
5590         (interp::interp, interp::~interp): New.
5591         (interp_set): Use bool, and return void.  Assume the interpreter
5592         has suspend, init and resume methods, and that the all return
5593         void.
5594         (set_top_level_interpreter): interp_set returns void.
5595         (interp_ui_out): Adapt.
5596         (current_interp_set_logging): Adapt.
5597         (interp_data): Delete.
5598         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
5599         (interp_exec): Adapt.
5600         (top_level_interpreter_data): Delete.
5601         * interps.h (interp_init_ftype, interp_resume_ftype)
5602         (interp_suspend_ftype, interp_exec_ftype)
5603         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
5604         (class interp): New.
5605         (interp_new): Delete.
5606         (interp_set): Now returns void.  Use bool.
5607         (interp_data, top_level_interpreter_data): Delete.
5608         * mi/mi-common.h: Include interps.h.
5609         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
5610         init, resume, suspect, exec, interp_ui_out, set_logging and
5611         pre_command_loop methods.
5612         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
5613         (mi_interpreter_init): Rename to ...
5614         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
5615         bool, return void and make extern.  Adjust.
5616         (mi_interpreter_resume): ... Rename to ...
5617         (mi_interp::resume): ... this.  Remove the 'data' parameter,
5618         return void and make extern.  Adjust.
5619         (mi_interpreter_suspend): ... Rename to ...
5620         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
5621         return void and make extern.  Adjust.
5622         (mi_interpreter_exec): ... Rename to ...
5623         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
5624         extern.  Adjust.
5625         (mi_interpreter_pre_command_loop): ... Rename to ...
5626         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
5627         parameter and make extern.
5628         (mi_on_normal_stop_1): Adjust.
5629         (mi_ui_out): Rename to ...
5630         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
5631         parameter and make extern.  Adjust.
5632         (mi_set_logging): Rename to ...
5633         (mi_interp::set_logging): ... this.  Remove the 'interp'
5634         parameter and make extern.  Adjust.
5635         (mi_interp_procs): Delete.
5636         (mi_interp_factory): Adjust to use 'new'.
5637         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
5638         (mi_print_exception, mi_execute_command, mi_load_progress):
5639         Adjust.
5640         * tui/tui-interp.c (tui_interp): New class.
5641         (as_tui_interp): Return a tui_interp pointer.
5642         (tui_on_normal_stop, tui_on_signal_received)
5643         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
5644         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
5645         to use interp::interp_ui_out.
5646         (tui_init): Rename to ...
5647         (tui_interp::init): ... this.  Remove the 'self' parameter, use
5648         bool, return void and make extern.  Adjust.
5649         (tui_resume): Rename to ...
5650         (tui_interp::resume): ... this.  Remove the 'data' parameter,
5651         return void and make extern.  Adjust.
5652         (tui_suspend): Rename to ...
5653         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
5654         return void and make extern.  Adjust.
5655         (tui_ui_out): Rename to ...
5656         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
5657         parameter, and make extern.  Adjust.
5658         (tui_exec): Rename to ...
5659         (tui_interp::exec): ... this.  Remove the 'data' parameter and
5660         make extern.
5661         (tui_interp_procs): Delete.
5662         (tui_interp_factory): Use "new".
5663
5664 2017-02-02  Tom Tromey  <tom@tromey.com>
5665
5666         * rust-exp.y (ends_raw_string, space_then_number)
5667         (rust_identifier_start_p): Return bool.
5668         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
5669         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
5670         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
5671         (rust_chartype_p): Return bool.
5672         (val_print_struct, rust_print_struct_def, rust_print_type):
5673         Update.
5674         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
5675         Return bool.
5676
5677 2017-02-02  Tom Tromey  <tom@tromey.com>
5678
5679         * rust-lang.c: Reindent.
5680
5681 2017-02-02  Tom Tromey  <tom@tromey.com>
5682
5683         * rust-lang.h (rust_crate_for_block): Update.
5684         * rust-lang.c (rust_crate_for_block): Return std::string.
5685         (rust_get_disr_info): Use std:;string, not
5686         gdb::unique_xmalloc_ptr.
5687         * rust-exp.y (crate_name): Update.
5688
5689 2017-02-02  Pedro Alves  <palves@redhat.com>
5690
5691         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
5692         field out of gdb_disassembler_test and make it static.
5693
5694 2017-02-02  Pedro Alves  <palves@redhat.com>
5695
5696         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
5697         mi1_interp and mi_interp fields.
5698
5699 2017-02-02  Pedro Alves  <palves@redhat.com>
5700
5701         * cli/cli-interp.c (struct saved_output_files, saved_output):
5702         Moved from cli/cli-logging.c.
5703         (cli_set_logging): New function.
5704         (cli_interp_procs): Install cli_set_logging.
5705         * cli/cli-interp.h (make_logging_output, cli_set_logging):
5706         Declare.
5707         * cli/cli-logging.c (struct saved_output_files, saved_output):
5708         Moved to cli/cli-interp.c.
5709         (pop_output_files): Don't save outputs here.
5710         (make_logging_output): New function.
5711         (handle_redirections): Don't build tee nor save previous outputs
5712         here.
5713         * interps.c (current_interp_set_logging): Change prototype.
5714         Assume there's always a set_logging_proc method installed.
5715         * interps.h (interp_set_logging_ftype): Change prototype.
5716         (current_interp_set_logging): Change prototype and adjust comment.
5717         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
5718         use make_logging_output.
5719         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
5720 2017-02-02  Pedro Alves  <palves@redhat.com>
5721
5722         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
5723         from ...
5724         (set_logging_overwrite): ... here.
5725         (logging_no_redirect_file): Delete.
5726         (set_logging_redirect): Don't handle redirection on the fly.
5727         Instead warn that "logging off" / "logging on" is necessary.
5728         (pop_output_files): Delete references to logging_no_redirect_file.
5729         (show_logging_command): Always speak in terms of what will happen
5730         once logging is reenabled.
5731
5732 2017-02-02  Pedro Alves  <palves@redhat.com>
5733
5734         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
5735
5736 2017-02-02  Pedro Alves  <palves@redhat.com>
5737
5738         * disasm.c (gdb_pretty_print_insn): Rename to ...
5739         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
5740         Remove gdbarch parameter.  Adapt to clear the object's buffers
5741         instead of allocating new buffers, and to print using the object's
5742         gdb_disassembler instead of calling gdb_print_insn.
5743         (dump_insns): Use gdb_pretty_print_disassembler.
5744         * disasm.h (gdb_pretty_print_insn): Delete declaration.
5745         (gdb_pretty_print_disassembler): New class.
5746         * record-btrace.c (btrace_insn_history): Use
5747         gdb_pretty_print_disassembler.
5748
5749 2017-02-02  Pedro Alves  <palves@redhat.com>
5750
5751         * ada-lang.c (type_as_string): Use string_file.
5752         * ada-valprint.c (ada_print_floating): Use string_file.
5753         * ada-varobj.c (ada_varobj_scalar_image)
5754         (ada_varobj_get_value_image): Use string_file.
5755         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
5756         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
5757         * breakpoint.c (update_inserted_breakpoint_locations)
5758         (insert_breakpoint_locations, reattach_breakpoints)
5759         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
5760         (print_it_watchpoint): Use string_file.
5761         (save_breakpoints): Use stdio_file.
5762         * c-exp.y (oper): Use string_file.
5763         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
5764         tee_file.
5765         (pop_output_files): Use delete.
5766         (handle_redirections): Use stdio_file and tee_file.
5767         * cli/cli-setshow.c (do_show_command): Use string_file.
5768         * compile/compile-c-support.c (c_compute_program): Use
5769         string_file.
5770         * compile/compile-c-symbols.c (generate_vla_size): Take a
5771         'string_file &' instead of a 'ui_file *'.
5772         (generate_c_for_for_one_variable): Take a 'string_file &' instead
5773         of a 'ui_file *'.  Use string_file.
5774         (generate_c_for_variable_locations): Take a 'string_file &'
5775         instead of a 'ui_file *'.
5776         * compile/compile-internal.h (generate_c_for_for_one_variable):
5777         Take a 'string_file &' instead of a 'ui_file *'.
5778         * compile/compile-loc2c.c (push, pushf, unary, binary)
5779         (print_label, pushf_register_address, pushf_register)
5780         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
5781         'ui_file *'.  Adjust.
5782         * compile/compile.c (compile_to_object): Use string_file.
5783         * compile/compile.h (compile_dwarf_expr_to_c)
5784         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
5785         'ui_file *'.
5786         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
5787         (replace_typedefs_qualified_name): Use string_file and
5788         obstack_copy0.
5789         * disasm.c (gdb_pretty_print_insn): Use string_file.
5790         (gdb_disassembly): Adjust reference the null_stream global.
5791         (do_ui_file_delete): Delete.
5792         (gdb_insn_length): Use null_stream.
5793         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
5794         * dwarf2loc.c (dwarf2_compile_property_to_c)
5795         (locexpr_generate_c_location, loclist_generate_c_location): Take a
5796         'string_file &' instead of a 'ui_file *'.
5797         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
5798         * dwarf2read.c (do_ui_file_peek_last): Delete.
5799         (dwarf2_compute_name): Use string_file.
5800         * event-top.c (gdb_setup_readline): Use stdio_file.
5801         * gdbarch.sh (verify_gdbarch): Use string_file.
5802         * gdbtypes.c (safe_parse_type): Use null_stream.
5803         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
5804         string_file.
5805         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
5806         'string_file *' instead of a 'ui_file *'.
5807         (gdbscm_arch_disassemble): Use string_file.
5808         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
5809         * guile/scm-ports.c (class ioscm_file_port): Now a class that
5810         inherits from ui_file.
5811         (ioscm_file_port_delete, ioscm_file_port_rewind)
5812         (ioscm_file_port_put): Delete.
5813         (ioscm_file_port_write): Rename to ...
5814         (ioscm_file_port::write): ... this.  Remove file_port_magic
5815         checks.
5816         (ioscm_file_port_new): Delete.
5817         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
5818         ui_file_up.
5819         * guile/scm-type.c (tyscm_type_name): Use string_file.
5820         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
5821         Use string_file.
5822         * infcmd.c (print_return_value_1): Use string_file.
5823         * infrun.c (print_target_wait_results): Use string_file.
5824         * language.c (add_language): Use string_file.
5825         * location.c (explicit_to_string_internal): Use string_file.
5826         * main.c (captured_main_1): Use null_file.
5827         * maint.c (maintenance_print_architecture): Use stdio_file.
5828         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
5829         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
5830         event_channel>: Change type to mi_console_file pointer.
5831         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
5832         (mi_console_file_delete): Delete.
5833         (struct mi_console_file): Delete.
5834         (mi_console_file_magic): Delete.
5835         (mi_console_file_new): Delete.
5836         (mi_console_file::mi_console_file): New.
5837         (mi_console_file_delete): Delete.
5838         (mi_console_file_fputs): Delete.
5839         (mi_console_file::write): New.
5840         (mi_console_raw_packet): Delete.
5841         (mi_console_file::flush): New.
5842         (mi_console_file_flush): Delete.
5843         (mi_console_set_raw): Rename to ...
5844         (mi_console_file::set_raw): ... this.
5845         * mi/mi-console.h (class mi_console_file): New class.
5846         (mi_console_file_new, mi_console_set_raw): Delete.
5847         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
5848         (mi_set_logging): Use delete and tee_file.  Adjust.
5849         * mi/mi-main.c (output_register): Use string_file.
5850         (mi_cmd_data_evaluate_expression): Use string_file.
5851         (mi_cmd_data_read_memory): Use string_file.
5852         (mi_cmd_execute, print_variable_or_computed): Use string_file.
5853         * mi/mi-out.c (mi_ui_out::main_stream): New.
5854         (mi_ui_out::rewind): Use main_stream and
5855         string_file.
5856         (mi_ui_out::put): Use main_stream and string_file.
5857         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
5858         Allocate a 'string_file' instead.
5859         (mi_out_new): Don't allocate a mem_fileopen stream here.
5860         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
5861         (mi_ui_out::main_stream): Declare method.
5862         * printcmd.c (eval_command): Use string_file.
5863         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
5864         * python/py-arch.c (archpy_disassemble): Use string_file.
5865         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
5866         * python/py-frame.c (frapy_str): Use string_file.
5867         * python/py-framefilter.c (py_print_type, py_print_single_arg):
5868         Use string_file.
5869         * python/py-type.c (typy_str): Use string_file.
5870         * python/py-unwind.c (unwind_infopy_str): Use string_file.
5871         * python/py-value.c (valpy_str): Use string_file.
5872         * record-btrace.c (btrace_insn_history): Use string_file.
5873         * regcache.c (regcache_print): Use stdio_file.
5874         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
5875         * remote.c (escape_buffer): Use string_file.
5876         * rust-lang.c (rust_get_disr_info): Use string_file.
5877         * serial.c (serial_open_ops_1): Use stdio_file.
5878         (do_serial_close): Use delete.
5879         * stack.c (print_frame_arg): Use string_file.
5880         (print_frame_args): Remove local mem_fileopen stream, not used.
5881         (print_frame): Use string_file.
5882         * symmisc.c (maintenance_print_symbols): Use stdio_file.
5883         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
5884         Take a 'string_file *' instead of a 'ui_file *'.
5885         * top.c (new_ui): Use stdio_file and stderr_file.
5886         (free_ui): Use delete.
5887         (execute_command_to_string): Use string_file.
5888         (quit_confirm): Use string_file.
5889         * tracepoint.c (collection_list::append_exp): Use string_file.
5890         * tui/tui-disasm.c (tui_disassemble): Use string_file.
5891         * tui/tui-file.c: Don't include "ui-file.h".
5892         (enum streamtype, struct tui_stream): Delete.
5893         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
5894         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
5895         (tui_file::tui_file): New method.
5896         (tui_file_fputs): Delete.
5897         (tui_file_get_strbuf): Delete.
5898         (tui_file::puts): New method.
5899         (tui_file_adjust_strbuf): Delete.
5900         (tui_file_flush): Delete.
5901         (tui_file::flush): New method.
5902         * tui/tui-file.h: Tweak intro comment.
5903         Include ui-file.h.
5904         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
5905         (tui_file_adjust_strbuf): Delete declarations.
5906         (class tui_file): New class.
5907         * tui/tui-io.c (tui_initialize_io): Use tui_file.
5908         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
5909         (tui_register_format): Use string_stream.
5910         * tui/tui-stack.c (tui_make_status_line): Use string_file.
5911         (tui_get_function_from_frame): Use string_file.
5912         * typeprint.c (type_to_string): Use string_file.
5913         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
5914         (null_stream): New global.
5915         (ui_file_delete): Delete.
5916         (ui_file::ui_file): New.
5917         (null_file_isatty): Delete.
5918         (ui_file::~ui_file): New.
5919         (null_file_rewind): Delete.
5920         (ui_file::printf): New.
5921         (null_file_put): Delete.
5922         (null_file_flush): Delete.
5923         (ui_file::putstr): New.
5924         (null_file_write): Delete.
5925         (ui_file::putstrn): New.
5926         (null_file_read): Delete.
5927         (ui_file::putc): New.
5928         (null_file_fputs): Delete.
5929         (null_file_write_async_safe): Delete.
5930         (ui_file::vprintf): New.
5931         (null_file_delete): Delete.
5932         (null_file::write): New.
5933         (null_file_fseek): Delete.
5934         (null_file::puts): New.
5935         (ui_file_data): Delete.
5936         (null_file::write_async_safe): New.
5937         (gdb_flush, ui_file_isatty): Adjust.
5938         (ui_file_put, ui_file_rewind): Delete.
5939         (ui_file_write): Adjust.
5940         (ui_file_write_for_put): Delete.
5941         (ui_file_write_async_safe, ui_file_read): Adjust.
5942         (ui_file_fseek): Delete.
5943         (fputs_unfiltered): Adjust.
5944         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
5945         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
5946         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
5947         (set_ui_file_data): Delete.
5948         (string_file::~string_file, string_file::write)
5949         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
5950         (do_ui_file_as_string, ui_file_as_string): Delete.
5951         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
5952         (struct mem_file): Delete.
5953         (mem_file_new): Delete.
5954         (stdio_file::stdio_file): New.
5955         (mem_file_delete): Delete.
5956         (stdio_file::stdio_file): New.
5957         (mem_fileopen): Delete.
5958         (stdio_file::~stdio_file): New.
5959         (mem_file_rewind): Delete.
5960         (stdio_file::set_stream): New.
5961         (mem_file_put): Delete.
5962         (stdio_file::open): New.
5963         (mem_file_write): Delete.
5964         (stdio_file_magic, struct stdio_file): Delete.
5965         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
5966         (stdio_file::flush): New.
5967         (stdio_file_read): Rename to ...
5968         (stdio_file::read): ... this.  Adjust.
5969         (stdio_file_write): Rename to ...
5970         (stdio_file::write): ... this.  Adjust.
5971         (stdio_file_write_async_safe): Rename to ...
5972         (stdio_file::write_async_safe) ... this.  Adjust.
5973         (stdio_file_fputs): Rename to ...
5974         (stdio_file::puts) ... this.  Adjust.
5975         (stdio_file_isatty): Delete.
5976         (stdio_file_fseek): Delete.
5977         (stdio_file::isatty): New.
5978         (stderr_file_write): Rename to ...
5979         (stderr_file::write) ... this.  Adjust.
5980         (stderr_file_fputs): Rename to ...
5981         (stderr_file::puts) ... this.  Adjust.
5982         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
5983         (stderr_file::stderr_file): New.
5984         (tee_file_magic): Delete.
5985         (struct tee_file): Delete.
5986         (tee_file::tee_file): New.
5987         (tee_file_new): Delete.
5988         (tee_file::~tee_file): New.
5989         (tee_file_delete): Delete.
5990         (tee_file_flush): Rename to ...
5991         (tee_file::flush): ... this.  Adjust.
5992         (tee_file_write): Rename to ...
5993         (tee_file::write): ... this.  Adjust.
5994         (tee_file::write_async_safe): New.
5995         (tee_file_fputs): Rename to ...
5996         (tee_file::puts): ... this.  Adjust.
5997         (tee_file_isatty): Rename to ...
5998         (tee_file::isatty): ... this.  Adjust.
5999         * ui-file.h (struct obstack, struct ui_file): Don't
6000         forward-declare.
6001         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
6002         (ui_file_write_ftype)
6003         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
6004         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
6005         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
6006         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
6007         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
6008         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
6009         (set_ui_file_fseek): Delete.
6010         (ui_file_data, ui_file_delete, ui_file_rewind)
6011         (struct ui_file): New.
6012         (ui_file_up): New.
6013         (class null_file): New.
6014         (null_stream): Declare.
6015         (ui_file_write_for_put, ui_file_put): Delete.
6016         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
6017         Delete.
6018         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
6019         (gdb_fopen, tee_file_new): Delete.
6020         (struct string_file): New.
6021         (struct stdio_file): New.
6022         (stdio_file_up): New.
6023         (struct stderr_file): New.
6024         (class tee_file): New.
6025         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
6026         of a 'ui_file *'.  Adjust.
6027         * ui-out.h (class ui_out) <field_stream>: Likewise.
6028         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
6029         (null_stream): Delete.
6030         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
6031         Adjust.
6032         * utils.h (struct ui_file): Delete forward declaration..
6033         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
6034         (error_stream): Take a 'string_file &' instead of a
6035         'ui_file *'.
6036         * varobj.c (varobj_value_get_print_value): Use string_file.
6037         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
6038         * gdbarch.c: Regenerate.
6039
6040 2017-02-02  Pedro Alves  <palves@redhat.com>
6041
6042         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
6043         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
6044         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
6045         Adjust to call gdb_print_insn instead of
6046         gdb_disassembler::print_insn.
6047         (dump_insns, do_mixed_source_and_assembly_deprecated)
6048         (do_mixed_source_and_assembly, do_assembly_only): Add back a
6049         'gdbarch' parameter.  Remove gdb_disassembler parameter.
6050         (gdb_disassembly): Don't allocate a gdb_disassembler here.
6051         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
6052         declaration.
6053         (gdb_pretty_print_insn): Re-add declaration.
6054         * record-btrace.c (btrace_insn_history): Don't allocate a
6055         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
6056
6057 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
6058
6059         * disasm.h (gdb_disassembly): Remove file_string parameter.
6060         * disasm.c (gdb_disassembly): Likewise.
6061         * cli/cli-cmds.c (print_disassembly): Adapt.
6062         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
6063         * stack.c (do_gdb_disassembly): Likewise.
6064
6065 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6066
6067         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
6068         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
6069         targets.  And if the implicit value is longer than needed, extract
6070         the first bytes instead of the "least significant" ones.
6071
6072 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
6073
6074         * btrace.c (btrace_enable): Do not call btrace_add_pc for
6075         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
6076         (btrace_fetch): Assert can_access_registers_ptid.
6077         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
6078         validate_registers_access.
6079
6080 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
6081
6082         * gdbthread.h (can_access_registers_ptid): New.
6083         * thread.c (can_access_registers_ptid): New.
6084
6085 2017-02-01  Pedro Alves  <palves@redhat.com>
6086
6087         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
6088
6089 2017-01-31  Pedro Alves  <palves@redhat.com>
6090
6091         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
6092         Fix typos.
6093
6094 2017-01-31  Pedro Alves  <palves@redhat.com>
6095
6096         * stack.c (print_frame_args): Remove local mem_fileopen stream,
6097         not used.
6098
6099 2017-01-31  Pedro Alves  <palves@redhat.com>
6100
6101         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
6102
6103 2017-01-31  Pedro Alves  <palves@redhat.com>
6104
6105         * common/scoped_restore.h
6106         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
6107         change the value's parameter type to T2.
6108         (make_scoped_restore): Likewise.
6109
6110 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6111             Richard Henderson  <rth@redhat.com>
6112
6113         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
6114         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
6115         GS_BASE for older kernels.
6116         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
6117         GS_BASE for older kernels.
6118         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
6119         and GS_BASE to the offset table.
6120         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
6121         system register group.
6122         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
6123         for older kernels.
6124         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
6125         amd64 ABI.
6126         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
6127         AMD64_GSBASE_REGNUM.
6128         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
6129         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
6130         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
6131         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
6132         i386/64bit-segments.xml in those rules.
6133         * features/i386/64bit-segments.xml: New file.
6134         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
6135         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
6136         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
6137         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
6138         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
6139         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
6140         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
6141         * features/i386/amd64-avx-linux.c: Regenerated.
6142         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
6143         * features/i386/amd64-avx-mpx.c: Regenerated.
6144         * features/i386/amd64-avx512-linux.c: Regenerated.
6145         * features/i386/amd64-linux.c: Regenerated.
6146         * features/i386/amd64-mpx-linux.c: Regenerated.
6147         * features/i386/i386-avx-mpx-linux.c: Regenerated.
6148         * features/i386/i386-avx-mpx.c: Regenerated.
6149         * features/i386/x32-avx-linux.c: Regenerated.
6150         * features/i386/x32-avx512-linux.c: Regenerated.
6151         * regformats/i386/amd64-avx-linux.dat: Regenerated.
6152         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
6153         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
6154         * regformats/i386/amd64-linux.dat: Regenerated.
6155         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
6156         * regformats/i386/x32-avx-linux.dat: Regenerated.
6157         * regformats/i386/x32-avx512-linux.dat: Regenerated.
6158         * regformats/i386/x32-linux.dat: Regenerated.
6159
6160 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6161
6162         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
6163         Set to AMD64_NUM_REGS.
6164
6165 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6166
6167         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
6168         that checks validity of a register number.
6169
6170 2017-01-27  Kees Cook  <keescook@google.com>
6171
6172         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
6173         fetch_fpregs if target has fpa registers.
6174         (arm_linux_store_inferior_registers): Call store_fpregs if target
6175         has fpa registers.
6176
6177 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6178
6179         * cris-tdep.c (cris_gdbarch_init): Remove check for
6180         info.byte_order and force it to BFD_ENDIAN_LITTLE.
6181
6182 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
6183
6184         * corelow.c (get_core_register_section): Check for regset
6185         existence before checking for REGSET_VARIABLE_SIZE.
6186
6187 2017-01-26  Yao Qi  <yao.qi@linaro.org>
6188             Pedro Alves  <palves@redhat.com>
6189
6190         PR gdb/20939
6191         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
6192         call memory_error, save memaddr instead.
6193         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
6194         negative, cal memory_error.
6195         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
6196
6197 2017-01-26  Yao Qi  <yao.qi@linaro.org>
6198
6199         * disasm-selftests.c (memory_error_test): New function.
6200         (_initialize_disasm_selftests): Register memory_error_test.
6201
6202 2017-01-26  Yao Qi  <yao.qi@linaro.org>
6203
6204         * Makefile.in (SFILES): Add disasm-selftests.c and
6205         selftest-arch.c.
6206         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
6207         * disasm-selftests.c: New file.
6208         * selftest-arch.c: New file.
6209         * selftest-arch.h: New file.
6210
6211 2017-01-26  Yao Qi  <yao.qi@linaro.org>
6212
6213         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
6214         to bfd_arch_mep.  Don't return 0 if section is not
6215         found.  Call print_insn_mep.
6216
6217 2017-01-26  Pedro Alves  <palves@redhat.com>
6218             Yao Qi  <yao.qi@linaro.org>
6219
6220         * arm-tdep.c: Include "disasm.h".
6221         (gdb_print_insn_arm): Update code to get gdbarch.
6222         * disasm.c (dis_asm_read_memory): Change it to
6223         gdb_disassembler::dis_asm_read_memory.
6224         (dis_asm_memory_error): Likewise.
6225         (dis_asm_print_address): Likewise.
6226         (gdb_pretty_print_insn): Change it to
6227         gdb_disassembler::pretty_print_insn.
6228         (dump_insns): Add one argument gdb_disassemlber.  All
6229         callers updated.
6230         (do_mixed_source_and_assembly_deprecated): Likewise.
6231         (do_mixed_source_and_assembly): Likewise.
6232         (do_assembly_only): Likewise.
6233         (gdb_disassembler::gdb_disassembler): New.
6234         (gdb_disassembler::print_insn): New.
6235         * disasm.h (class gdb_disassembler): New.
6236         (gdb_pretty_print_insn): Remove declaration.
6237         (gdb_disassemble_info): Likewise.
6238         * guile/scm-disasm.c (class gdbscm_disassembler): New.
6239         (gdbscm_disasm_read_memory_worker): Update.
6240         (gdbscm_disasm_read_memory): Update.
6241         (gdbscm_disasm_memory_error): Remove.
6242         (gdbscm_disasm_print_address): Remove.
6243         (gdbscm_disassembler::gdbscm_disassembler): New.
6244         (gdbscm_print_insn_from_port): Update.
6245         * mips-tdep.c: Include disasm.h.
6246         (gdb_print_insn_mips): Update code to get gdbarch.
6247         * record-btrace.c (btrace_insn_history): Update.
6248         * spu-tdep.c: Include disasm.h.
6249         (struct spu_dis_asm_data): Remove.
6250         (struct spu_dis_asm_info): New.
6251         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
6252         SPU id.
6253         (gdb_print_insn_spu): Cast disassemble_info to
6254         spu_dis_asm_info.
6255
6256 2017-01-26  Yao Qi  <yao.qi@linaro.org>
6257
6258         * disasm.c (do_ui_file_delete): Delete.
6259         (gdb_insn_length): Move code creating stream to ...
6260         * utils.c (null_stream): ... here.  New function.
6261         * utils.h (null_stream): Declare.
6262
6263 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
6264
6265         * python/py-inferior.c (find_thread_object): Return directly
6266         from the loop.  Remove "found" variable.
6267
6268 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
6269
6270         GDB 7.12.1 released.
6271
6272 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
6273
6274         * python/py-function.c (fnpy_call): Reorder declarations to have
6275         the gdbpy_enter object declared first.
6276         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
6277
6278 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
6279
6280         PR python/21068
6281         * python/python-internal.h (PyMem_RawMalloc): Define for
6282         Python < 3.4.
6283         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
6284         PyMem_RawMalloc instead of PyMem_Malloc.
6285
6286 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
6287             Luis Machado  <lgustavo@codesourcery.com>
6288
6289         * NEWS (New commands): Mention flash-erase.
6290         (New MI commands): Mention target-flash-erase.
6291         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
6292         command.
6293         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
6294         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
6295         * target.c (flash_erase_command): New function.
6296         (initialize_targets): Add new flash-erase command.
6297         * target.h (flash_erase_command): New declaration.
6298
6299 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
6300
6301         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
6302         HAVE_SYS_PROCFS_H is defined.
6303
6304 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
6305
6306         * remote.c (struct cached_reg): Change data into a pointer.
6307         * (stop_reply_dtr): Free data pointers before deleting vector.
6308         (process_stop_reply): Likewise.
6309         (remote_parse_stop_reply): Allocate space for data
6310
6311 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
6312
6313         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
6314         MAX_REGISTER_SIZE.
6315         (amd64_pseudo_register_read_value): Likewise.
6316         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
6317         (store_register_using_P): Likewise.
6318         * regcache.c (regcache_xfer_part): Likewise.
6319
6320 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
6321
6322         Split real and pseudo registers.
6323         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
6324         (sparc32_pseudo_regnum): New enum.
6325         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
6326         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
6327         (SPARC32_CP0_REGISTERS): New macro.
6328         (sparc32_pseudo_register_name): New function.
6329         (sparc32_register_name): Use sparc32_pseudo_register_name.
6330         (sparc32_pseudo_register_type): New function.
6331         (sparc32_register_type): Use sparc32_pseudo_register_type.
6332         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
6333         pseudo register numbers.
6334         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
6335         (SPARC64_CP0_REGISTERS): New macro.
6336         (sparc64_pseudo_register_name): New function.
6337         (sparc64_register_name): Use sparc64_pseudo_register_name.
6338         (sparc64_pseudo_register_type): New function.
6339         (sparc64_register_type): Use sparc64_pseudo_register_type.
6340         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
6341         pseudo register numbers.
6342         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
6343         sparc64_store_arguments): Handle pseudo register numbers.
6344
6345 2017-01-13  Yao Qi  <yao.qi@linaro.org>
6346
6347         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
6348         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
6349         output.
6350         (getpkt_or_notif_sane_1): Likewise.
6351
6352 2017-01-13  Yao Qi  <yao.qi@linaro.org>
6353
6354         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
6355         of CC.  Pass "-x c++-header" instead of "-x c".
6356
6357 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
6358
6359         * remote.c (remote_can_async_p): Update comment.
6360
6361 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
6362
6363         * linux-nat.c (linux_nat_can_async_p): Update comment.
6364
6365 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
6366
6367         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
6368
6369 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
6370
6371         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
6372
6373 2017-01-10  Tom Tromey  <tom@tromey.com>
6374
6375         * python/py-type.c (typy_legacy_template_argument): Update.
6376         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
6377         ~demangle_parse_info): Declare new members.
6378         (cp_demangled_name_to_comp): Return unique_ptr.
6379         (cp_demangled_name_parse_free)
6380         (make_cleanup_cp_demangled_name_parse_free)
6381         (cp_new_demangle_parse_info): Remove.
6382         * cp-support.c (do_demangled_name_parse_free_cleanup)
6383         (make_cleanup_cp_demangled_name_parse_free): Remove.
6384         (inspect_type, cp_canonicalize_string_full)
6385         (cp_canonicalize_string): Update.
6386         (mangled_name_to_comp): Change return type.
6387         (cp_class_name_from_physname, method_name_from_physname)
6388         (cp_func_name, cp_remove_params): Update.
6389         * cp-name-parser.y (demangle_parse_info): New constructor, from
6390         cp_new_demangle_parse_info.
6391         (~demangle_parse_info): New destructor, from
6392         cp_demangled_name_parse_free.
6393         (cp_merge_demangle_parse_infos): Update.
6394         (cp_demangled_name_to_comp): Change return type.
6395
6396 2017-01-10  Tom Tromey  <tom@tromey.com>
6397
6398         * top.c (prevent_dont_repeat): Change return type.
6399         * python/python.c (execute_gdb_command): Use std::string.
6400         Update.
6401         * guile/guile.c (gdbscm_execute_gdb_command): Update.
6402         * command.h (prevent_dont_repeat): Change return type.
6403         * breakpoint.c (bpstat_do_actions_1): Update.
6404
6405 2017-01-10  Tom Tromey  <tom@tromey.com>
6406
6407         * value.h (scoped_value_mark::~scoped_value_mark): Call
6408         free_to_mark.
6409         (scoped_value_mark::free_to_mark): New method.
6410         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
6411         scoped_value_mark.
6412
6413 2017-01-10  Tom Tromey  <tom@tromey.com>
6414
6415         * python/py-value.c (valpy_dereference, valpy_referenced_value)
6416         (valpy_reference_value, valpy_const_value, valpy_get_address)
6417         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
6418         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
6419         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
6420         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
6421         scoped_value_mark.
6422         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
6423         * value.h (scoped_value_mark): New class.
6424
6425 2017-01-10  Tom Tromey  <tom@tromey.com>
6426
6427         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
6428         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
6429         * psymtab.c (discard_psymtabs_upto): Remove.
6430         (make_cleanup_discard_psymtabs): Remove.
6431         (struct psymtab_state): Remove.
6432
6433 2017-01-10  Tom Tromey  <tom@tromey.com>
6434
6435         * record-full.c (record_full_save_cleanups): Remove.
6436         (record_full_save): Use gdb::unlinker.
6437         * gcore.c (do_bfd_delete_cleanup): Remove.
6438         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
6439         cleanups.
6440         * dwarf2read.c (unlink_if_set): Remove.
6441         (write_psymtabs_to_index): Use gdb::unlinker.
6442         * common/gdb_unlinker.h: New file.
6443
6444 2017-01-10  Tom Tromey  <tom@tromey.com>
6445
6446         * windows-tdep.c (windows_xfer_shared_library): Update.
6447         * windows-nat.c (windows_make_so): Update.
6448         * utils.h (make_cleanup_bfd_unref): Remove.
6449         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
6450         * symfile.h (symfile_bfd_open)
6451         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
6452         * symfile.c (read_symbols, symbol_file_add)
6453         (separate_debug_file_exists): Update.
6454         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
6455         (generic_load, reread_symbols): Update.
6456         * symfile-mem.c (symbol_file_add_from_memory): Update.
6457         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
6458         (spu_symbol_file_add_from_memory): Update.
6459         * solist.h (struct target_so_ops) <bfd_open>: Return
6460         gdb_bfd_ref_ptr.
6461         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
6462         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
6463         gdb_bfd_ref_ptr.
6464         (solib_map_sections, reload_shared_libraries_1): Update.
6465         * solib-svr4.c (enable_break): Update.
6466         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
6467         * solib-frv.c (enable_break2): Update.
6468         * solib-dsbt.c (enable_break): Update.
6469         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
6470         gdb_bfd_ref_ptr.
6471         (darwin_solib_get_all_image_info_addr_at_init): Update.
6472         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
6473         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
6474         * record-full.c (record_full_save): Update.
6475         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
6476         * procfs.c (insert_dbx_link_bpt_in_file): Update.
6477         * minidebug.c (find_separate_debug_file_in_section): Return
6478         gdb_bfd_ref_ptr.
6479         * machoread.c (macho_add_oso_symfile): Change abfd to
6480         gdb_bfd_ref_ptr.
6481         (macho_symfile_read_all_oso): Update.
6482         (macho_check_dsym): Return gdb_bfd_ref_ptr.
6483         (macho_symfile_read): Update.
6484         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
6485         (jit_bfd_try_read_symtab): Update.
6486         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6487         (gdb_bfd_openw, gdb_bfd_openr_iovec)
6488         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
6489         gdb_bfd_ref_ptr.
6490         (gdb_bfd_ref_policy): New struct.
6491         (gdb_bfd_ref_ptr): New typedef.
6492         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6493         (gdb_bfd_openw, gdb_bfd_openr_iovec)
6494         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
6495         gdb_bfd_ref_ptr.
6496         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
6497         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
6498         (gcore_command): Update.
6499         * exec.c (exec_file_attach): Update.
6500         * elfread.c (elf_symfile_read): Update.
6501         * dwarf2read.c (dwarf2_get_dwz_file): Update.
6502         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
6503         (open_and_init_dwo_file): Update.
6504         (open_dwp_file): Return gdb_bfd_ref_ptr.
6505         (open_and_init_dwp_file): Update.
6506         * corelow.c (core_open): Update.
6507         * compile/compile-object-load.c (compile_object_load): Update.
6508         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
6509         * coffread.c (coff_symfile_read): Update.
6510         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
6511         gdb_bfd_ref_ptr.  Rename.
6512         (dump_bfd_file, restore_command): Update.
6513         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
6514         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
6515         (find_separate_debug_file_by_buildid): Update.
6516
6517 2017-01-10  Tom Tromey  <tom@tromey.com>
6518
6519         * common/gdb_ref_ptr.h: New file.
6520         * python/py-ref.h (struct gdbpy_ref_policy): New.
6521         (gdbpy_ref): Now a typedef.
6522
6523 2017-01-10  Tom Tromey  <tom@tromey.com>
6524
6525         * utils.h (make_cleanup_htab_delete): Don't declare.
6526         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
6527         Remove.
6528         * linespec.c (decode_compound_collector): Add constructor,
6529         destructor.
6530         (lookup_prefix_sym): Remove cleanup.
6531         (symtab_collector): Add constructor, destructor.
6532         (collect_symtabs_from_filename): Remove cleanup.
6533         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
6534         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
6535         Use htab_up.
6536         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
6537         * dwarf2read.c (dw2_expand_symtabs_matching)
6538         (dw2_map_symbol_filenames, dwarf_decode_macros)
6539         (write_psymtabs_to_index): Use htab_up.
6540         * dwarf2loc.c (func_verify_no_selftailcall)
6541         (call_site_find_chain_1, func_verify_no_selftailcall)
6542         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
6543         std::vector, gdb::unique_xmalloc_ptr.
6544         (call_sitep): Remove typedef.
6545         (dwarf2_locexpr_baton_eval): Remove unused variable.
6546
6547 2017-01-10  Tom Tromey  <tom@tromey.com>
6548
6549         * python/python-internal.h (make_cleanup_py_decref)
6550         (make_cleanup_py_xdecref): Don't declare.
6551         * python/py-utils.c (py_decref, make_cleanup_py_decref)
6552         (py_xdecref, make_cleanup_py_xdecref): Remove.
6553
6554 2017-01-10  Tom Tromey  <tom@tromey.com>
6555
6556         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
6557         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
6558
6559 2017-01-10  Tom Tromey  <tom@tromey.com>
6560
6561         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
6562
6563 2017-01-10  Tom Tromey  <tom@tromey.com>
6564
6565         * python/py-utils.c (unicode_to_encoded_string)
6566         (python_string_to_target_string)
6567         (python_string_to_target_python_string)
6568         (python_string_to_host_string, gdbpy_obj_to_string)
6569         (get_addr_from_python): Use gdbpy_ref.
6570
6571 2017-01-10  Tom Tromey  <tom@tromey.com>
6572
6573         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
6574         gdbpy_ref.
6575
6576 2017-01-10  Tom Tromey  <tom@tromey.com>
6577
6578         * python/python.c (eval_python_command, gdbpy_decode_line)
6579         (gdbpy_run_events, gdbpy_start_type_printers)
6580         (gdbpy_apply_type_printers): Use gdbpy_ref.
6581
6582 2017-01-10  Tom Tromey  <tom@tromey.com>
6583
6584         * python/py-param.c (get_doc_string, compute_enum_values): Use
6585         gdbpy_ref.
6586
6587 2017-01-10  Tom Tromey  <tom@tromey.com>
6588
6589         * python/py-inferior.c (find_thread_object, build_inferior_list):
6590         Use gdbpy_ref.
6591
6592 2017-01-10  Tom Tromey  <tom@tromey.com>
6593
6594         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
6595
6596 2017-01-10  Tom Tromey  <tom@tromey.com>
6597
6598         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
6599         gdbpy_ref.
6600
6601 2017-01-10  Tom Tromey  <tom@tromey.com>
6602
6603         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
6604         extra incref.
6605         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
6606         Use gdbpy_ref.
6607
6608 2017-01-10  Tom Tromey  <tom@tromey.com>
6609
6610         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
6611         gdbpy_ref.
6612
6613 2017-01-10  Tom Tromey  <tom@tromey.com>
6614
6615         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
6616         decref results of PyArg_ParseTupleAndKeywords.
6617
6618 2017-01-10  Tom Tromey  <tom@tromey.com>
6619
6620         * python/python.c (python_run_simple_file): Use
6621         unique_xmalloc_ptr, gdbpy_ref.
6622
6623 2017-01-10  Tom Tromey  <tom@tromey.com>
6624
6625         * python/py-prettyprint.c (print_stack_unless_memory_error)
6626         (print_string_repr, print_children): Use gdbpy_ref.
6627         (dummy_python_frame): New class.
6628         (dummy_python_frame::dummy_python_frame): Rename from
6629         push_dummy_python_frame.
6630         (py_restore_tstate): Remove.
6631
6632 2017-01-10  Tom Tromey  <tom@tromey.com>
6633
6634         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
6635
6636 2017-01-10  Tom Tromey  <tom@tromey.com>
6637
6638         * python/python.c (ensure_python_env, restore_python_env):
6639         Remove.
6640         * python/python-internal.h (ensure_python_env): Don't declare.
6641         * varobj.h (varobj_ensure_python_env): Don't declare.
6642         * varobj.c (varobj_ensure_python_env): Remove.
6643
6644 2017-01-10  Tom Tromey  <tom@tromey.com>
6645
6646         * varobj.c (varobj_value_get_print_value): Use
6647         gdbpy_enter_varobj.
6648
6649 2017-01-10  Tom Tromey  <tom@tromey.com>
6650
6651         * python/py-prettyprint.c (print_string_repr, print_children):
6652         Update.
6653         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
6654         of "encoding".
6655         * varobj.c (varobj_value_get_print_value): Update.
6656         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
6657
6658 2017-01-10  Tom Tromey  <tom@tromey.com>
6659
6660         * varobj.c (varobj_get_display_hint)
6661         (dynamic_varobj_has_child_method, install_new_value_visualizer)
6662         (varobj_set_visualizer, free_variable): Use
6663         gdbpy_enter_varobj.
6664
6665 2017-01-10  Tom Tromey  <tom@tromey.com>
6666
6667         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
6668         (do_finish_initialization): New function.  Use gdbpy_ref.
6669         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
6670         do_finish_initialization.
6671
6672 2017-01-10  Tom Tromey  <tom@tromey.com>
6673
6674         * python/py-param.c (get_set_value, get_show_value): Use
6675         gdbpy_enter, gdbpy_ref.
6676
6677 2017-01-10  Tom Tromey  <tom@tromey.com>
6678
6679         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
6680
6681 2017-01-10  Tom Tromey  <tom@tromey.com>
6682
6683         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
6684
6685 2017-01-10  Tom Tromey  <tom@tromey.com>
6686
6687         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
6688         Use gdbpy_enter_varobj.
6689
6690 2017-01-10  Tom Tromey  <tom@tromey.com>
6691
6692         * varobj.c (gdbpy_enter_varobj): New constructor.
6693         * python/python-internal.h (gdbpy_enter_varobj): New class.
6694         * python/py-varobj.c (py_varobj_get_iterator): Use
6695         gdbpy_enter_varobj.
6696
6697 2017-01-10  Tom Tromey  <tom@tromey.com>
6698
6699         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
6700         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
6701         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
6702         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
6703         unique_xmalloc_ptr.
6704         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
6705
6706 2017-01-10  Tom Tromey  <tom@tromey.com>
6707
6708         * python/py-xmethods.c (invoke_match_method): Use
6709         gdbpy_ref.
6710
6711 2017-01-10  Tom Tromey  <tom@tromey.com>
6712
6713         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
6714         gdbpy_enter, gdbpy_ref.
6715
6716 2017-01-10  Tom Tromey  <tom@tromey.com>
6717
6718         * python/python.c (python_interactive_command): Use gdbpy_enter.
6719
6720 2017-01-10  Tom Tromey  <tom@tromey.com>
6721
6722         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
6723         gdbpy_ref.
6724
6725 2017-01-10  Tom Tromey  <tom@tromey.com>
6726
6727         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
6728         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
6729
6730 2017-01-10  Tom Tromey  <tom@tromey.com>
6731
6732         * utils.h (htab_deleter): New struct.
6733         (htab_up): New typedef.
6734         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
6735         gdbpy_enter, gdbpy_ref, htab_up.
6736
6737 2017-01-10  Tom Tromey  <tom@tromey.com>
6738
6739         * python/py-unwind.c (pending_frame_invalidate): Remove.
6740         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
6741
6742 2017-01-10  Tom Tromey  <tom@tromey.com>
6743
6744         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
6745         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
6746
6747 2017-01-10  Tom Tromey  <tom@tromey.com>
6748
6749         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
6750
6751 2017-01-10  Tom Tromey  <tom@tromey.com>
6752
6753         * python/python.c (gdbpy_eval_from_control_command)
6754         (gdbpy_source_script, gdbpy_run_events)
6755         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
6756         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
6757         gdbpy_enter.
6758
6759 2017-01-10  Tom Tromey  <tom@tromey.com>
6760
6761         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
6762
6763 2017-01-10  Tom Tromey  <tom@tromey.com>
6764
6765         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
6766
6767 2017-01-10  Tom Tromey  <tom@tromey.com>
6768
6769         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
6770         (python_on_inferior_call_pre, python_on_inferior_call_post)
6771         (python_on_memory_change, python_on_register_change)
6772         (python_inferior_exit, python_new_objfile, add_thread_object)
6773         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
6774
6775 2017-01-10  Tom Tromey  <tom@tromey.com>
6776
6777         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
6778         (bpfinishpy_handle_exit): Use gdbpy_enter.
6779
6780 2017-01-10  Tom Tromey  <tom@tromey.com>
6781
6782         * python/py-cmd.c (cmdpy_destroyer)
6783         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
6784         gdbpy_enter.
6785
6786 2017-01-10  Tom Tromey  <tom@tromey.com>
6787
6788         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
6789         gdbpy_enter.
6790         (gdbpy_breakpoint_has_cond): Likewise.
6791
6792 2017-01-10  Tom Tromey  <tom@tromey.com>
6793
6794         * python/python.c (gdbpy_enter): New constructor.
6795         (~gdbpy_enter): New destructor.
6796         (restore_python_env, ensure_python_env): Rewrite.
6797         * python/python-internal.h (gdbpy_enter): New class.
6798
6799 2017-01-10  Tom Tromey  <tom@tromey.com>
6800
6801         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
6802
6803 2017-01-10  Tom Tromey  <tom@tromey.com>
6804
6805         * python/py-value.c (value_has_field, get_field_flag)
6806         (get_field_type, valpy_getitem, convert_value_from_python): Use
6807         gdbpy_ref.
6808
6809 2017-01-10  Tom Tromey  <tom@tromey.com>
6810
6811         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
6812         gdbpy_ref.
6813
6814 2017-01-10  Tom Tromey  <tom@tromey.com>
6815
6816         * python/py-prettyprint.c (search_pp_list)
6817         (find_pretty_printer_from_objfiles)
6818         (find_pretty_printer_from_progspace)
6819         (find_pretty_printer_from_gdb, find_pretty_printer)
6820         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
6821         gdbpy_ref.
6822
6823 2017-01-10  Tom Tromey  <tom@tromey.com>
6824
6825         * python/py-param.c (call_doc_function): Use gdbpy_ref.
6826
6827 2017-01-10  Tom Tromey  <tom@tromey.com>
6828
6829         * python/py-linetable.c (build_line_table_tuple_from_pcs)
6830         (ltpy_get_all_source_lines): Use gdbpy_ref.
6831
6832 2017-01-10  Tom Tromey  <tom@tromey.com>
6833
6834         * python/py-framefilter.c (extract_sym, extract_value)
6835         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
6836         gdbpy_ref.
6837
6838 2017-01-10  Tom Tromey  <tom@tromey.com>
6839
6840         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
6841
6842 2017-01-10  Tom Tromey  <tom@tromey.com>
6843
6844         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
6845
6846 2017-01-10  Tom Tromey  <tom@tromey.com>
6847
6848         * python/py-function.c (convert_values_to_python, fnpy_init): Use
6849         gdbpy_ref.
6850
6851 2017-01-10  Tom Tromey  <tom@tromey.com>
6852
6853         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
6854
6855 2017-01-10  Tom Tromey  <tom@tromey.com>
6856
6857         * python/py-type.c (convert_field, make_fielditem, typy_fields)
6858         (typy_range): Use gdbpy_ref.
6859
6860 2017-01-10  Tom Tromey  <tom@tromey.com>
6861
6862         * python/py-threadevent.c (create_thread_event_object): Use
6863         gdbpy_ref.
6864         * python/py-stopevent.c (create_stop_event_object): Simplify.
6865         (emit_stop_event): Use gdbpy_ref.
6866         * python/py-signalevent.c (create_signal_event_object): Use
6867         gdbpy_ref.
6868         * python/py-newobjfileevent.c (create_new_objfile_event_object)
6869         (emit_new_objfile_event, create_clear_objfiles_event_object)
6870         (emit_clear_objfiles_event): Use gdbpy_ref.
6871         * python/py-infevents.c (create_inferior_call_event_object)
6872         (create_register_changed_event_object)
6873         (create_memory_changed_event_object, emit_inferior_call_event)
6874         (emit_memory_changed_event, emit_register_changed_event): Use
6875         gdbpy_ref.
6876         * python/py-exitedevent.c (create_exited_event_object)
6877         (emit_exited_event): Use gdbpy_ref.
6878         * python/py-event.h (evpy_emit_event): Remove
6879         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
6880         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
6881         * python/py-continueevent.c (emit_continue_event): Use
6882         gdbpy_ref.
6883         * python/py-breakpoint.c (gdbpy_breakpoint_created)
6884         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
6885         gdbpy_ref.
6886         * python/py-bpevent.c (create_breakpoint_event_object): Use
6887         gdbpy_ref.
6888
6889 2017-01-10  Tom Tromey  <tom@tromey.com>
6890
6891         * python/py-ref.h: New file.
6892
6893 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
6894
6895         * cli-out.c (cli_ui_out::do_redirect): Change return type to
6896         void.
6897         * cli-out.h (cli_ui_out::do_redirect): Likewise.
6898         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
6899         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
6900         * ui-out.c (ui_out::redirect): Likewise.
6901         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
6902         * cli/cli-logging.c (set_logging_redirect): Update call site of
6903         ui_out::redirect.
6904         (handle_redirections): Likewise.
6905         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
6906         * top.c (execute_command_to_string): Likewise.
6907         * utils.c (do_ui_out_redirect_pop): Likewise.
6908
6909 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
6910
6911         * stack.c (_initialize_stack): Update "frame" command help message.
6912
6913 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
6914
6915         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
6916
6917 2017-01-06  Yao Qi  <yao.qi@linaro.org>
6918
6919         * x86-linux-nat.h: Include gdb_proc_service.h.
6920
6921 2017-01-06  Yao Qi  <yao.qi@linaro.org>
6922
6923         * ser-base.h: Include serial.h.
6924
6925 2017-01-06  Yao Qi  <yao.qi@linaro.org>
6926
6927         * ppc-linux-tdep.h: Include ppc-tdep.h.
6928
6929 2017-01-06  Yao Qi  <yao.qi@linaro.org>
6930
6931         * nat/amd64-linux-siginfo.h: Include signal.h.
6932
6933 2017-01-06  Yao Qi  <yao.qi@linaro.org>
6934
6935         * nat/aarch64-linux-hw-point.h: Include break-common.h.
6936
6937 2017-01-06  Yao Qi  <yao.qi@linaro.org>
6938
6939         * mi/mi-parse.h: Include mi-cmds.h.
6940
6941 2017-01-06  Yao Qi  <yao.qi@linaro.org>
6942
6943         * inf-loop.c: Don't include "target.h".
6944         * inf-loop.h: Include it here.
6945
6946 2017-01-06  Yao Qi  <yao.qi@linaro.org>
6947
6948         * dfp.h: Include "dboulest.h" and "expression.h".
6949
6950 2017-01-06  Yao Qi  <yao.qi@linaro.org>
6951
6952         * ax-gdb.h: Include "ax.h".
6953
6954 2017-01-06  Yao Qi  <yao.qi@linaro.org>
6955
6956         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
6957         with nat/gdb_ptrace.h.
6958
6959 2017-01-05  Yao Qi  <yao.qi@linaro.org>
6960
6961         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
6962         new line.
6963         (mips64_fbsd_sigframe_init): Likewise.
6964
6965 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
6966
6967         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
6968         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
6969
6970 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
6971
6972         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6973         * NEWS: Mention new FreeBSD/mips native configuration.
6974         * config/mips/fbsd.mh: New file.
6975         * configure.host: Add mips*-*-freebsd*.
6976         * mips-fbsd-nat.c: New file.
6977
6978 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
6979
6980         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
6981         (ALLDEPFILES): Add mips-fbsd-tdep.c.
6982         * NEWS: Mention new FreeBSD/mips target.
6983         * configure.tgt: Add mips*-*-freebsd*.
6984         * mips-fbsd-tdep.c: New file.
6985         * mips-fbsd-tdep.h: New file.
6986
6987 2017-01-04  Yao Qi  <yao.qi@linaro.org>
6988
6989         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
6990         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
6991
6992 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
6993
6994         Update copyright year range in all GDB files.
6995
6996 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
6997
6998         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
6999
7000 For older changes see ChangeLog-2016.
7001 \f
7002 Local Variables:
7003 mode: change-log
7004 left-margin: 8
7005 fill-column: 74
7006 version-control: never
7007 coding: utf-8
7008 End: