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